├── imgs ├── .empty ├── Screenshot_4.png ├── Screenshot_5.png └── Screenshot_6.png ├── hypr ├── menu │ └── rofi │ │ ├── shared │ │ ├── fonts.rasi │ │ └── colors.rasi │ │ ├── askpass.rasi │ │ ├── music.rasi │ │ ├── asroot.rasi │ │ ├── confirm.rasi │ │ ├── powermenu.rasi │ │ ├── wifi.rasi │ │ ├── clipbord.rasi │ │ ├── runner.rasi │ │ └── launcher.rasi ├── scripts │ ├── md-color │ ├── menu_clipbord │ ├── menu_runner │ ├── menu_launcher │ ├── hyprnotifyd │ ├── menu_askpass │ ├── hyprcolorpicker │ ├── menu_wifi │ ├── hyprterm │ ├── hyprbacklight │ ├── hyprvolume │ ├── menu_asroot │ ├── menu_powermenu │ ├── menu_music │ └── hyprscreenshot ├── hyprpaper.conf ├── custom │ ├── system.sh │ ├── color.sh │ ├── theme.sh │ └── apply.sh ├── xsettingsd ├── term │ └── alacritty │ │ ├── fonts.toml │ │ ├── alacritty.toml │ │ └── colors.toml ├── bar │ └── waybar │ │ ├── custom.json │ │ ├── launch.sh │ │ ├── config.json │ │ ├── color.css │ │ ├── style.css │ │ └── modules.json ├── hyprland │ ├── exec.conf │ ├── color.conf │ ├── env.conf │ ├── rule.conf │ ├── autostart.sh │ └── bind.conf ├── notification │ └── dunst │ │ └── dunstrc ├── hyprlock.conf ├── .current └── hyprland.conf └── README.md /imgs/.empty: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /hypr/menu/rofi/shared/fonts.rasi: -------------------------------------------------------------------------------- 1 | 2 | * { 3 | font-family: "Maple Mono SC NF"; 4 | } 5 | -------------------------------------------------------------------------------- /hypr/scripts/md-color: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orion-tan/wayland-dotfile/HEAD/hypr/scripts/md-color -------------------------------------------------------------------------------- /imgs/Screenshot_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orion-tan/wayland-dotfile/HEAD/imgs/Screenshot_4.png -------------------------------------------------------------------------------- /imgs/Screenshot_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orion-tan/wayland-dotfile/HEAD/imgs/Screenshot_5.png -------------------------------------------------------------------------------- /imgs/Screenshot_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orion-tan/wayland-dotfile/HEAD/imgs/Screenshot_6.png -------------------------------------------------------------------------------- /hypr/hyprpaper.conf: -------------------------------------------------------------------------------- 1 | ipc=off 2 | 3 | preload=/home/ticks/.local/share/wallpaper/bg1.png 4 | 5 | wallpaper=eDP-1,/home/ticks/.local/share/wallpaper/bg1.png 6 | 7 | -------------------------------------------------------------------------------- /hypr/scripts/menu_clipbord: -------------------------------------------------------------------------------- 1 | #!/bin/env bash 2 | 3 | HyprDir=${HOME}/.config/hypr 4 | 5 | cliphist list | rofi -dmenu -theme $HyprDir/menu/rofi/clipbord.rasi | cliphist decode | wl-copy -------------------------------------------------------------------------------- /hypr/scripts/menu_runner: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## Copyright (C) 2023 Ticks 4 | ## 5 | ## Run program script 6 | ## 7 | 8 | dir="${HOME}/.config/hypr/menu/rofi" 9 | menu_style="${dir}/runner.rasi" 10 | 11 | rofi -theme "${menu_style}" -show run 2>/dev/null 12 | -------------------------------------------------------------------------------- /hypr/scripts/menu_launcher: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## Copyright (C) 2023 Ticks 4 | ## 5 | ## Start Launcher Script 6 | ## 7 | 8 | dir="${HOME}/.config/hypr/menu/rofi" 9 | menu_style="${dir}/launcher.rasi" 10 | 11 | rofi -show drun -theme ${menu_style} 2>/dev/null 12 | -------------------------------------------------------------------------------- /hypr/scripts/hyprnotifyd: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## Copyright (C) Ticks 4 | ## 5 | ## Start notification application 6 | ## 7 | 8 | conf="${HOME}/.config/hypr/notification/dunst/dunstrc" 9 | 10 | if [[ $(pidof dunst) ]]; then 11 | pkill dunst 12 | fi 13 | 14 | dunst -config ${conf} & 15 | -------------------------------------------------------------------------------- /hypr/custom/system.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ##################################### 4 | ## WayBar 5 | ##################################### 6 | 7 | ## 电池相关 8 | ## ls /sys/class/power_supply/ 查看 9 | BAR_BAT=BAT0 10 | BAR_ADAPTER=AC0 11 | 12 | ## 亮度 13 | ## ls /sys/class/backlight 查看 14 | BAR_BK_DEVICE=amdgpu_bl1 15 | -------------------------------------------------------------------------------- /hypr/xsettingsd: -------------------------------------------------------------------------------- 1 | 2 | Net/ThemeName "Catppuccin-Macchiato" 3 | Net/IconThemeName "Win11" 4 | Gtk/CursorThemeName "Catppuccin-Macchiato-Light" 5 | Net/EnableEventSounds "0" 6 | Net/EnableInputFeedbackSounds "0" 7 | Xft/DPI "-1" 8 | Xft/Hinting 1 9 | Xft/HintStyle "hintslight" 10 | Xft/Antialias 1 11 | Xft/RGBA "rgb" 12 | Xft/lcdfilter "lcdlight" 13 | -------------------------------------------------------------------------------- /hypr/scripts/menu_askpass: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## Copyright (C) 2023 Ticks 4 | ## 5 | ## Get Root Password 6 | ## 7 | 8 | menu_dir="${HOME}/.config/hypr/menu/rofi" 9 | menu_style="${menu_dir}/askpass.rasi" 10 | 11 | rofi -dmenu \ 12 | -p "Root Password" \ 13 | -password \ 14 | -theme "${menu_style}" \ 15 | 2>/dev/null 16 | -------------------------------------------------------------------------------- /hypr/scripts/hyprcolorpicker: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## Copyright (C) 2023 Ticks 4 | ## 5 | ## Pick color script 6 | ## 7 | 8 | notify_cmd='dunstify -u low -h string:x-dunst-stack-tag:obcolorpicker' 9 | 10 | copy_color() { 11 | color=$(hyprpicker) 12 | echo "${color}" | wl-copy 13 | ${notify_cmd} "${color}" 14 | } 15 | 16 | copy_color 17 | -------------------------------------------------------------------------------- /hypr/menu/rofi/shared/colors.rasi: -------------------------------------------------------------------------------- 1 | * { 2 | background: #f8faf0; 3 | surface: #f8faf0; 4 | onSurface: #191d17; 5 | onBackground: #191d17; 6 | primaryContainer: #c3efad; 7 | onPrimaryContainer: #042100; 8 | primary: #426834; 9 | onPrimary: #ffffff; 10 | error: #ba1a1a; 11 | onError: #ffffff; 12 | } 13 | -------------------------------------------------------------------------------- /hypr/term/alacritty/fonts.toml: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2023 Ticks 2 | ## 3 | ## Font configuration for alacritty 4 | ## 5 | 6 | # Normal font face 7 | [font.normal] 8 | family="Maple Mono SC NF" 9 | # Bold font face 10 | [font.bold] 11 | family="Maple Mono SC NF" 12 | # Italic font face 13 | [font.italic] 14 | family="Maple Mono SC NF" 15 | # Bold italic font face 16 | [font.bold_italic] 17 | family="Maple Mono SC NF" 18 | [font] 19 | # Point size 20 | size=14 21 | 22 | 23 | -------------------------------------------------------------------------------- /hypr/bar/waybar/custom.json: -------------------------------------------------------------------------------- 1 | { 2 | "custom/dot": { 3 | "format": "", 4 | "tooltip": false 5 | }, 6 | "custom/dot-alt": { 7 | "format": "", 8 | "tooltip": false 9 | }, 10 | "custom/sysmenu": { 11 | "format": "󰤆", 12 | "tooltip": false, 13 | "on-click": "~/.config/hypr/scripts/menu_powermenu &" 14 | }, 15 | "custom/logo": { 16 | "format": "󰣇", 17 | "tooltip": false, 18 | "on-click": "~/.config/hypr/scripts/menu_launcher &" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /hypr/bar/waybar/launch.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## Copyright (C) 2023 Ticks 4 | ## 5 | ## Launch waybar script 6 | ## 7 | 8 | #CUR_DIR="$(cd "$(dirname "${BASE_SOURCE[0]}")" &>/dev/null && pwd)" 9 | #echo "${CUR_DIR}" 10 | CUR_DIR="${HOME}/.config/hypr/bar/waybar" 11 | 12 | launch_bar() { 13 | killall -q waybar 14 | 15 | while pgrep -u $UID -x waybar >/dev/null; do sleep 1; done 16 | 17 | waybar -c "${CUR_DIR}"/config.json -s "${CUR_DIR}"/style.css & 18 | } 19 | 20 | launch_bar 21 | -------------------------------------------------------------------------------- /hypr/scripts/menu_wifi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | dir="${HOME}/.config/hypr/menu/rofi" 4 | wifi_theme="wifi" 5 | passwd_theme="askpass" 6 | 7 | function get_password() { 8 | echo $(rofi -dmenu -p "Input Password" -password -theme ${dir}/${passwd_theme}.rasi) 9 | } 10 | 11 | bssid=$(nmcli device wifi rescan && nmcli device wifi list | sed -n '1!P'| cut -b 9- | rofi -dmenu -theme ${dir}/${wifi_theme}.rasi -p "wifi" -lines 10 | awk '{print $1}') 12 | [ -z "${bssid}" ] && exit 1 13 | 14 | passwd=`get_password` 15 | 16 | nmcli device wifi connect ${bssid} password ${passwd} -------------------------------------------------------------------------------- /hypr/scripts/hyprterm: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## Copyright (C) 2023 Ticks 4 | ## 5 | ## Launch term in hyprland 6 | ## 7 | 8 | DIR="${HOME}/.config/hypr" 9 | CONFIG="${DIR}/term/alacritty/alacritty.toml" 10 | 11 | if [ "$1" == "--float" ]; then 12 | alacritty --class "alacritty-float,alacritty-float" --config-file "${CONFIG}" 13 | elif [ "$1" == "--full" ]; then 14 | alacritty --class "Fullscreen,Fullscreen" --config-file "${CONFIG}" \ 15 | -o window.startup_mode=fullscreen \ 16 | window.padding.x=20 window.padding.y=20 \ 17 | window.opacity=0.95 18 | else 19 | alacritty --config-file "${CONFIG}" 20 | fi 21 | -------------------------------------------------------------------------------- /hypr/custom/color.sh: -------------------------------------------------------------------------------- 1 | background="f8faf0" 2 | onBackground="191d17" 3 | 4 | primary="426834" 5 | secondary="54624d" 6 | tertiary="386667" 7 | error="ba1a1a" 8 | primaryContainer="c3efad" 9 | secondaryContainer="d5e5c9" 10 | tertiaryContainer="bcebed" 11 | errorContainer="ffdad6" 12 | surfaceDim="d8dbd1" 13 | surface="f8faf0" 14 | surfaceBright="f8faf0" 15 | surfaceContainer="ecefe5" 16 | outline="73796e" 17 | shadow="000000" 18 | inversePrimary="a7d293" 19 | inverseSurface="2e312b" 20 | 21 | onPrimary="ffffff" 22 | onSecondary="ffffff" 23 | onTertiary="ffffff" 24 | onError="ffffff" 25 | onPrimaryContainer="042100" 26 | onSecondaryContainer="131f0e" 27 | onTertiaryContainer="002021" 28 | onErrorContainer="410002" 29 | onSurface="191d17" 30 | scrim="000000" 31 | -------------------------------------------------------------------------------- /hypr/bar/waybar/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "layer": "top", 3 | "position": "top", 4 | "margin-top": 0, 5 | "margin-left": 0, 6 | "margin-right": 0, 7 | "id": "waybar-top", 8 | "classname": "waybar-top", 9 | "include": [ 10 | "~/.config/hypr/bar/waybar/modules.json", 11 | "~/.config/hypr/bar/waybar/custom.json" 12 | ], 13 | "modules-left": [ 14 | "custom/logo", 15 | "custom/dot-alt", 16 | "clock", 17 | "custom/dot", 18 | "cpu" 19 | ], 20 | "modules-center": [ 21 | "hyprland/workspaces" 22 | ], 23 | "modules-right": [ 24 | "network", 25 | "custom/dot", 26 | "pulseaudio", 27 | "custom/dot", 28 | "backlight", 29 | "custom/dot", 30 | "battery", 31 | "custom/dot", 32 | "custom/sysmenu", 33 | "custom/dot-alt", 34 | "tray" 35 | ], 36 | "height": 40 37 | } 38 | -------------------------------------------------------------------------------- /hypr/scripts/hyprbacklight: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## Copyright (C) 2023 Ticks 4 | ## 5 | ## Manager brightness script 6 | ## 7 | 8 | CARD=$(ls /sys/class/backlight | head -n 1) 9 | 10 | notify_cmd='dunstify -u low -h string:x-dunst-stack-tag:obbacklight' 11 | 12 | get_backlight() { 13 | if [[ "${CARD}" == *"intel_"* ]]; then 14 | NUM=$(xbacklight -get) 15 | LIGHT=${NUM%.*} 16 | else 17 | LIGHT=$(printf "%.0f\n" $(light -G)) 18 | fi 19 | echo "${LIGHT}" 20 | } 21 | 22 | notify_user() { 23 | ${notify_cmd} "Backlight: $(get_backlight)%" 24 | } 25 | 26 | inc_backlight() { 27 | if [[ "${CARD}" == *"intel_"* ]]; then 28 | xbacklight -inc 10 && notify_user 29 | else 30 | light -A 10 && notify_user 31 | fi 32 | } 33 | 34 | dec_backlight() { 35 | if [[ "${CARD}" == *"intel_"* ]]; then 36 | xbacklight -dec 10 && notify_user 37 | else 38 | light -U 10 && notify_user 39 | fi 40 | } 41 | 42 | if [[ "$1" == "--get" ]]; then 43 | get_backlight 44 | elif [[ "$1" == "--inc" ]]; then 45 | inc_backlight 46 | elif [[ "$1" == "--dec" ]]; then 47 | dec_backlight 48 | else 49 | get_backlight 50 | fi 51 | -------------------------------------------------------------------------------- /hypr/bar/waybar/color.css: -------------------------------------------------------------------------------- 1 | @define-color background #f8faf0; 2 | @define-color onBackground #191d17; 3 | 4 | @define-color primary #426834; 5 | @define-color secondary #54624d; 6 | @define-color tertiary #386667; 7 | @define-color error #ba1a1a; 8 | @define-color primaryContainer #c3efad; 9 | @define-color secondaryContainer #d5e5c9; 10 | @define-color tertiaryContainer #bcebed; 11 | @define-color errorContainer #ffdad6; 12 | @define-color surfaceDim #d8dbd1; 13 | @define-color surface #f8faf0; 14 | @define-color surfaceBright #f8faf0; 15 | @define-color surfaceContainer #ecefe5; 16 | @define-color outline #73796e; 17 | @define-color shadow #000000; 18 | @define-color inversePrimary #a7d293; 19 | @define-color inverseSurface #2e312b; 20 | 21 | @define-color onPrimary #ffffff; 22 | @define-color onSecondary #ffffff; 23 | @define-color onTertiary #ffffff; 24 | @define-color onError #ffffff; 25 | @define-color onPrimaryContainer #042100; 26 | @define-color onSecondaryContainer #131f0e; 27 | @define-color onTertiaryContainer #002021; 28 | @define-color onErrorContainer #410002; 29 | @define-color onSurface #191d17; 30 | @define-color scrim #000000; 31 | -------------------------------------------------------------------------------- /hypr/hyprland/exec.conf: -------------------------------------------------------------------------------- 1 | # ____________________________________________________________________________________________ # 2 | # _ _ # 3 | # / / / / # 4 | # ---/___ /---------------__----)__----/-----__-----__-----__-/---------__----|/----__-----__- # 5 | # / / / / / ) / ) / / ) / ) / / /___) | /___) / ' # 6 | # _/____/_____(___/____/___/__/______/____(___(__/___/__(___/________(___ ___/|__(___ __(___ _ # 7 | # / / / # 8 | # (_ / / # 9 | 10 | $HyprDir=~/.config/hypr 11 | 12 | # xsettingsd 13 | exec = xsettingsd --config=$HyprDir/xsettingsd 14 | # Waybar 15 | exec = $HyprDir/bar/waybar/launch.sh 16 | # Notifyd 17 | exec = $HyprDir/scripts/hyprnotifyd 18 | # Fcitx5 19 | exec = fcitx5 -d --replace 20 | # mpd 21 | # exec = mpd 22 | # Other 23 | exec = $HyprDir/hyprland/autostart.sh "always" 24 | 25 | # Clipbord 26 | exec-once = wl-paste --type text --watch cliphist store 27 | exec-once = wl-paste --type image --watch cliphist store 28 | # Allow run root applications 29 | # exec-once = xhost + local: 30 | # Other 31 | exec-once = $HyprDir/hyprland/autostart.sh "once" 32 | -------------------------------------------------------------------------------- /hypr/scripts/hyprvolume: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## Copyright (C) 2023 Ticks 4 | ## 5 | ## Set volume in hyprland 6 | ## 7 | 8 | notify_cmd='dunstify -u low -h string:x-dunst-stack-tag:obvolume' 9 | 10 | get_volume() { 11 | echo "$(pactl get-sink-volume @DEFAULT_SINK@ | head -1 | awk -F/ '{print $2}' | sed -e 's/\s//g')" 12 | } 13 | 14 | get_icon() { 15 | echo "" 16 | } 17 | 18 | notify_user() { 19 | ${notify_cmd} "Volume: $(get_volume)" 20 | } 21 | 22 | inc_volume() { 23 | pactl set-sink-volume @DEFAULT_SINK@ +5% && notify_user 24 | } 25 | 26 | dec_volume() { 27 | pactl set-sink-volume @DEFAULT_SINK@ -5% && notify_user 28 | } 29 | 30 | toggle_volume() { 31 | if [[ "$(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}')" == "yes" ]]; then 32 | pactl set-sink-mute @DEFAULT_SINK@ toggle && ${notify_cmd} "Mute" 33 | else 34 | pactl set-sink-mute @DEFAULT_SINK@ toggle && ${notify_cmd} "UnMute" 35 | fi 36 | } 37 | 38 | if [[ -x $(which pactl) ]]; then 39 | if [[ "$1" == "--get" ]]; then 40 | get_volume 41 | elif [[ "$1" == "--inc" ]]; then 42 | inc_volume 43 | elif [[ "$1" == "--dec" ]]; then 44 | dec_volume 45 | elif [[ "$1" == "--toggle" ]]; then 46 | toggle_volume 47 | else 48 | echo "$(get_volume)" 49 | fi 50 | else 51 | ${notify_cmd} "'pactl' not found !" 52 | fi 53 | -------------------------------------------------------------------------------- /hypr/term/alacritty/alacritty.toml: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2023 Ticks 2 | ## 3 | ## See more at /usr/share/doc/alacritty/example/alacritty.toml 4 | ## 5 | 6 | ## Import files (Colors, Fonts, Etc) 7 | ## 导入其他配置文件 8 | import=["~/.config/hypr/term/alacritty/colors.toml", "~/.config/hypr/term/alacritty/fonts.toml"] 9 | 10 | ## Live config reload 11 | ## 自动刷新配置文件 12 | live_config_reload=true 13 | ## 启动目录 14 | # working_directory: None 15 | 16 | ## Set environment variables 17 | ## 设置环境变量 18 | [env] 19 | TERM="alacritty" 20 | 21 | ## Terminal window settings 22 | ## 窗口设置 23 | [window] 24 | ## 窗口修饰,full: 有边框+标题栏,none: 无边框+标题栏 25 | decorations="none" 26 | ## 启动模式 (Fullscreen, Maximized, Windowed) 27 | startup_mode="Windowed" 28 | ## 动态窗口标题 29 | dynamic_title=true 30 | ## Background opacity 31 | ## 背景透明度 32 | opacity=1.0 33 | ## 模糊效果 34 | blur=true 35 | 36 | [window.dimensions] 37 | ## 窗口行数与列数 38 | columns=82 39 | lines=23 40 | 41 | [window.padding] 42 | x=10 43 | y=10 44 | 45 | [scrolling] 46 | ## 历史记录行数 47 | history=5000 48 | ## 每次滚动行数 49 | multiplier=5 50 | 51 | [cursor] 52 | ## 当窗口未聚焦时,光标是否显示为空心框 53 | unfocused_hollow=false 54 | [cursor.style] 55 | ## 光标样式 ( ▇ Block, _ Underline, | Beam) 56 | shape="Block" 57 | ## 光标闪烁 58 | blinking="On" 59 | 60 | [debug] 61 | log_level="Error" 62 | print_events=false 63 | render_timer=false -------------------------------------------------------------------------------- /hypr/term/alacritty/colors.toml: -------------------------------------------------------------------------------- 1 | # Default colors 2 | [colors.primary] 3 | background="#f8faf0" 4 | foreground="#191d17" 5 | dim_foreground="#191d17" 6 | bright_foreground="#191d17" 7 | 8 | # Cursor colors 9 | [colors.cursor] 10 | text="#f8faf0" 11 | cursor="#191d17" 12 | 13 | [colors.vi_mode_cursor] 14 | text="#f8faf0" 15 | cursor="#191d17" 16 | 17 | # Search colors 18 | [colors.search] 19 | matches.foreground="#191d17" 20 | matches.background="#ecefe5" 21 | focused_match.foreground="#ecefe5" 22 | focused_match.background="#191d17" 23 | 24 | [colors.footer_bar] 25 | foreground="#191d17" 26 | background="#f8faf0" 27 | 28 | # Selection colors 29 | [colors.selection] 30 | text="#f8faf0" 31 | background="#191d17" 32 | 33 | # Normal colors 34 | [colors.normal] 35 | black="#11111b" 36 | red="#d20f39" 37 | green="#40a02b" 38 | yellow="#df8e1d" 39 | blue="#1e66f5" 40 | magenta="#8839ef" 41 | cyan="#9ca0b0" 42 | white="#eff1f5" 43 | 44 | # Bright colors 45 | [colors.bright] 46 | black="#11111b" 47 | red="#d20f39" 48 | green="#40a02b" 49 | yellow="#df8e1d" 50 | blue="#1e66f5" 51 | magenta="#8839ef" 52 | cyan="#9ca0b0" 53 | white="#eff1f5" 54 | 55 | # Dim colors 56 | [colors.dim] 57 | black="#11111b" 58 | red="#d20f39" 59 | green="#40a02b" 60 | yellow="#df8e1d" 61 | blue="#1e66f5" 62 | magenta="#8839ef" 63 | cyan="#9ca0b0" 64 | white="#eff1f5" 65 | -------------------------------------------------------------------------------- /hypr/hyprland/color.conf: -------------------------------------------------------------------------------- 1 | # ___________________________________________________________________________________________________ # 2 | # _ _ # 3 | # / / / / / # 4 | # ---/___ /---------------__----)__----/-----__-----__-----__-/---------__-----__----/-----__----)__- # 5 | # / / / / / ) / ) / / ) / ) / / / ' / ) / / ) / ) # 6 | # _/____/_____(___/____/___/__/______/____(___(__/___/__(___/________(___ __(___/__/____(___/__/_____ # 7 | # / / # 8 | # (_ / / # 9 | 10 | 11 | $background=f8faf0 12 | $onBackground=191d17 13 | 14 | $primary=426834 15 | $secondary=54624d 16 | $tertiary=386667 17 | $error=ba1a1a 18 | $primaryContainer=c3efad 19 | $secondaryContainer=d5e5c9 20 | $tertiaryContainer=bcebed 21 | $errorContainer=ffdad6 22 | $surfaceDim=d8dbd1 23 | $surface=f8faf0 24 | $surfaceBright=f8faf0 25 | $surfaceContainer=ecefe5 26 | $outline=73796e 27 | $shadow=000000 28 | $inversePrimary=a7d293 29 | $inverseSurface=2e312b 30 | 31 | $onPrimary=ffffff 32 | $onSecondary=ffffff 33 | $onTertiary=ffffff 34 | $onError=ffffff 35 | $onPrimaryContainer=042100 36 | $onSecondaryContainer=131f0e 37 | $onTertiaryContainer=002021 38 | $onErrorContainer=410002 39 | $onSurface=191d17 40 | $scrim=000000 41 | -------------------------------------------------------------------------------- /hypr/scripts/menu_asroot: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## Copyright (C) 2023 Ticks 4 | ## 5 | ## Run as root script 6 | ## 7 | 8 | dir="${HOME}/.config/hypr" 9 | rootdir="/root/.config/hypr" 10 | menu_dir="${dir}/menu/rofi" 11 | menu_style="${menu_dir}/asroot.rasi" 12 | 13 | prompt="Root" 14 | msg="Run Applications As Root" 15 | term="alacritty --class alacritty-float,alacritty-float --config-file=${rootdir}/term/alacritty/alacritty.yml" 16 | 17 | opt1=" Alacritty" 18 | opt2=" Thunar" 19 | opt3="󰈙 Geany" 20 | opt4=" NeoVim" 21 | 22 | root_cmd() { 23 | SUDO_ASKPASS=${dir}/scripts/menu_askpass sudo -A $1 24 | } 25 | 26 | menu_cmd() { 27 | rofi -dmenu \ 28 | -markup-rows \ 29 | -p "${prompt}" \ 30 | -mesg "${msg}" \ 31 | -theme ${menu_style} 32 | } 33 | 34 | run_menu() { 35 | echo -e "${opt1}\n${opt2}\n${opt3}\n${opt4}" | menu_cmd 36 | } 37 | 38 | run_cmd() { 39 | if [[ "$1" == "--opt1" ]]; then 40 | root_cmd "${term}" 41 | elif [[ "$1" == "--opt2" ]]; then 42 | root_cmd 'dbus-run-session thunar' 43 | elif [[ "$1" == "--opt3" ]]; then 44 | root_cmd geany 45 | elif [[ "$1" == "--opt4" ]]; then 46 | root_cmd "${term} -e nvim" 47 | fi 48 | } 49 | 50 | chosen="$(run_menu)" 51 | case ${chosen} in 52 | ${opt1}) 53 | run_cmd --opt1 54 | ;; 55 | ${opt2}) 56 | run_cmd --opt2 57 | ;; 58 | ${opt3}) 59 | run_cmd --opt3 60 | ;; 61 | ${opt4}) 62 | run_cmd --opt4 63 | ;; 64 | esac 65 | -------------------------------------------------------------------------------- /hypr/hyprland/env.conf: -------------------------------------------------------------------------------- 1 | # _________________________________________________________________________________________ # 2 | # _ _ _____ # 3 | # / / / / / ' # 4 | # ---/___ /---------------__----)__----/-----__-----__-----__-/--------/__--------__------- # 5 | # / / / / / ) / ) / / ) / ) / / / / ) | / # 6 | # _/____/_____(___/____/___/__/______/____(___(__/___/__(___/________/____ ____/___/___|/__ # 7 | # / / # 8 | # (_ / / # 9 | 10 | env=LANG,zh_CN.UTF-8 11 | # 运行Java程序需要 12 | env=_JAVA_AWT_WM_NONREPARENTING,1 13 | # firefox wayland 14 | env=MOZ_ENABLE_WAYLAND,1 15 | # SDL wayland 16 | env=SDL_VIDEODRIVER,wayland 17 | env=CLUTTER_BACKEND,wayland 18 | # QT wayland 19 | env=QT_AUTO_SCREEN_SCALE_FACTOR,1 20 | env=QT_QPA_PLATFORM,wayland;xcb 21 | env=QT_WAYLAND_DISABLE_WINDOWDECORATION,1 22 | env=QT_QPA_PLATFORMTHEME,qt5ct 23 | env=QT_WAYLAND_FORCE_DPI,120 24 | env=GDK_BACKEND,wayland,x11 25 | # XDG 26 | env=XDG_SESSION_TYPE,wayland 27 | env=XDG_SESSION_DESKTOP,Hyprland 28 | env=XDG_CURRENT_DESKTOP,Hyprland 29 | # firefox 30 | env=MOZ_ENABLE_WAYLAND,1 31 | 32 | # GTK 33 | env=GDK_SCALE,1 34 | env=GDK_DPI_SCALE,1.25 35 | env=GTK_THEME,Orchis-Dark 36 | env=XCURSOR_THEME,Bibata-Modern-Ice 37 | env=HYPRCURSOR_THEME,Bibata-Modern-Ice 38 | # 鼠标大小 39 | env=XCURSOR_SIZE,24 40 | env=HYPRCURSOR_SIZE,24 41 | -------------------------------------------------------------------------------- /hypr/hyprland/rule.conf: -------------------------------------------------------------------------------- 1 | # ______________________________________________________________________________________________ # 2 | # _ _ __ ____ # 3 | # | | / / / / ) / # 4 | # --|-/|-/------/------__-----__-/-----__------------__--------/___ /------------/-----__----__- # 5 | # |/ |/ / / ) / / / ) | /| / (_ ` / | / / / /___) (_ ` # 6 | # __/__|____ _/_ ___/___/__(___/____(___/__|/_|/___(__)______/_____|___(___(___/____(___ __(__)_ # 7 | 8 | 9 | # See https://wiki.hyprland.org/Configuring/Window-Rules/ 10 | 11 | # set for opacity 12 | windowrulev2 = opacity 0.9 override 0.9 override, class:^(code)(.*) 13 | windowrulev2 = opacity 0.8 override 0.8 override, class:^(jetbrains-)(.*) 14 | windowrulev2 = opacity 0.9 override 0.9 override, class:^([Tt]ypora)(.*) 15 | windowrulev2 = opacity 0.95 override 0.95 override, class:(.*)(waybar)(.*) 16 | # set for alacritty 17 | windowrulev2 = opacity 0.8 override 0.8 override, class:^([Aa]lacritty)(.*)$ 18 | windowrulev2 = float, class:^(alacritty-float)$ 19 | windowrulev2 = center, class:^(alacritty-float)$ 20 | windowrulev2 = size 60% 60%, class:^(alacritty-float)$ 21 | # window rules for floating window 22 | windowrulev2 = move cursor 0 10, class:^(waybar)$, floating:1 23 | # window rules for Chrome 24 | windowrulev2 = opacity 1.0 override 1.0 override, class:^(Google-chrome)$ 25 | windowrulev2 = opacity 1.0 override 1.0 override, class:^(.*)(firefox)(.*)$ 26 | # window rules for QQ 27 | windowrulev2 = opacity 1.0 override 1.0 override, class:^(QQ)$ 28 | windowrulev2 = float, class:^(QQ)$ 29 | windowrulev2 = center, class:^(QQ)$ -------------------------------------------------------------------------------- /hypr/notification/dunst/dunstrc: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2023 Ticks 2 | ## 3 | ## Dunst configuration 4 | ## 5 | 6 | [global] 7 | ## 屏幕 8 | monitor = 0 9 | follow = mouse 10 | width = 300 11 | height = 80 12 | ## 位置 13 | origin = top-right 14 | ## 距离屏幕边缘偏移 15 | offset = 10x42 16 | ## 圆角 17 | corner_radius = 8 18 | scale = 0 19 | ## 通知条数限制 20 | notification_limit = 0 21 | progress_bar = true 22 | progress_bar_height = 80 23 | progress_bar_frame_width = 2 24 | progress_bar_min_width = 300 25 | progress_bar_max_width = 300 26 | indicate_hidden = yes 27 | transparency = 0 28 | separator_height = 80 29 | padding = 10 30 | horizontal_padding = 15 31 | text_icon_padding = 0 32 | frame_width = 2 33 | gap_size = 0 34 | separator_color = frame 35 | sort = yes 36 | idle_threshold = 120 37 | ## 字体 38 | font = Maple Mono SC NF 14 39 | line_height = 80 40 | markup = full 41 | format = %s\n%b 42 | ## 对齐方向 43 | alignment = left 44 | vertical_alignment = center 45 | show_age_threshold = 60 46 | ellipsize = middle 47 | ignore_newline = no 48 | stack_duplicates = true 49 | hide_duplicate_count = false 50 | show_indicators = yes 51 | enable_recursive_icon_lookup = true 52 | icon_position = left 53 | min_icon_size = 24 54 | max_icon_size = 48 55 | sticky_history = yes 56 | history_length = 20 57 | browser = /usr/bin/xdg-open 58 | always_run_script = true 59 | mouse_left_click = close_current 60 | mouse_middle_click = do_action, close_current 61 | mouse_right_click = close_all 62 | title = Dunst 63 | class = Dunst 64 | 65 | 66 | [urgency_low] 67 | timeout = 2 68 | background = "#f8faf0" 69 | foreground = "#191d17" 70 | frame_color = "#ecefe5" 71 | 72 | [urgency_normal] 73 | timeout = 5 74 | background = "#f8faf0" 75 | foreground = "#191d17" 76 | frame_color = "#ecefe5" 77 | 78 | [urgency_critical] 79 | timeout = 0 80 | background = "#ba1a1a" 81 | foreground = "#ffffff" 82 | frame_color = "#ecefe5" 83 | -------------------------------------------------------------------------------- /hypr/hyprlock.conf: -------------------------------------------------------------------------------- 1 | #################### 2 | ## HyprLock Config 3 | ## WiKi: https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/ 4 | #################### 5 | 6 | 7 | 8 | general { 9 | disable_loading_bar = true 10 | } 11 | 12 | widget_name { 13 | monitor = 14 | } 15 | 16 | background { 17 | monitor = 18 | color = rgb(1e1e2e) 19 | blur_passes = 0 # 0 disables blurring 20 | blur_size = 7 21 | noise = 0.0117 22 | contrast = 0.8916 23 | brightness = 0.8172 24 | vibrancy = 0.1696 25 | vibrancy_darkness = 0.0 26 | } 27 | 28 | input-field { 29 | monitor = 30 | size = 200, 50 31 | outline_thickness = 3 32 | dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8 33 | dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0 34 | dots_center = false 35 | dots_rounding = -1 # -1 default circle, -2 follow input-field rounding 36 | outer_color = rgb(151515) 37 | inner_color = rgb(200, 200, 200) 38 | font_color = rgb(10, 10, 10) 39 | fade_on_empty = true 40 | fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered. 41 | placeholder_text = Input Password... # Text rendered in the input box when it's empty. 42 | hide_input = false 43 | rounding = -1 # -1 means complete rounding (circle/oval) 44 | check_color = rgb(204, 136, 34) 45 | fail_color = rgb(204, 34, 34) # if authentication failed, changes outer_color and fail message color 46 | fail_text = $FAIL ($ATTEMPTS) # can be set to empty 47 | fail_transition = 300 # transition time in ms between normal outer_color and fail_color 48 | capslock_color = -1 49 | numlock_color = -1 50 | bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above) 51 | invert_numlock = false # change color if numlock is off 52 | 53 | position = 0, -20 54 | halign = center 55 | valign = center 56 | } 57 | -------------------------------------------------------------------------------- /hypr/.current: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## Copyright (C) 2023 Ticks 4 | ## 5 | ## Theme Config 6 | ## 不要修改变量名称,仅修改变量值即可!!! 7 | ## 8 | 9 | ######################### 10 | ## Wallpaper 11 | ## 需要 锁屏使用壁纸则需要设置为绝对路径! 12 | ######################### 13 | wallpaper_path="~/.local/share/wallpaper/bg1.png" 14 | ## 是否从壁纸获取颜色 15 | auto_color="true" 16 | ## 颜色主题模式(light / dark) 17 | color_scheme="light" 18 | 19 | ######################### 20 | ## Menu 21 | ######################### 22 | menu_font="Maple Mono SC NF 14" 23 | 24 | ######################### 25 | ## Notification 26 | ######################### 27 | notify_width="300" 28 | notify_height="80" 29 | notify_font="Maple Mono SC NF 14" 30 | notify_border="2" 31 | 32 | ######################## 33 | ## QT 34 | ######################## 35 | qt_wayland_dpi=120 36 | 37 | ######################## 38 | ## GTK 39 | ####################### 40 | ## 应用主题 41 | gtk_theme="Catppuccin-Macchiato" 42 | ## 应用字体大小 43 | gtk_font="Sarasa UI SC 12" 44 | ## 图标主题 45 | gtk_icon_theme="Win11" 46 | ## 光标主题 47 | gtk_cursor_theme="Catppuccin-Macchiato-Light" 48 | ## Gtk 缩放(整数) 49 | gtk_scale=1 50 | ## Gtk dpi 缩放(支持分数) 51 | gtk_dpi_scale=1.5 52 | ## 鼠标大小 53 | cursor_size=24 54 | 55 | ######################## 56 | ## Terminal 57 | ######################## 58 | ## 终端字体 59 | term_font="Maple Mono SC NF" 60 | ## 终端字体大小 61 | term_font_size="14" 62 | 63 | ######################## 64 | ## Hyprland 65 | ######################## 66 | 67 | ## 多久锁屏 (秒) 68 | hypr_lock_timeout=900 69 | 70 | ## 边框宽度 71 | hypr_border=2 72 | ## 内边缘间隔 73 | hypr_gap_in=6 74 | ## 外边缘间隔 75 | hypr_gap_out=16 76 | ## 窗口圆角 77 | hypr_radius=8 78 | ## 是否启用阴影 ("true" / "false"),没什么效果,推荐关闭 79 | hypr_shadow_enable="false" 80 | ## 阴影半径 81 | hypr_shadow_range=4 82 | ## 活动窗口透明度 83 | hypr_opacity=1.0 84 | ## 不活动窗口透明度 85 | hypr_inopacity=1.0 86 | ## 是否启用模糊 87 | hypr_blur_enable="true" 88 | ## 模糊大小 89 | hypr_blur_size=16 90 | ## 是否启用动画 91 | hypr_anim_enable="true" 92 | ## 是否在移动或者改变大小时启用动画 93 | hypr_anim_resize="false" 94 | ## 是否取消显示随机logo壁纸,false则自定义壁纸失效,使用随机壁纸 95 | hypr_dis_random_logo="true" 96 | ## 是否关闭配置文件更改后自动重新加载,false为自动加载 97 | hypr_dis_autoreload="true" -------------------------------------------------------------------------------- /hypr/custom/theme.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## Copyright (C) 2023 Ticks 4 | ## 5 | ## Theme Config 6 | ## 不要修改变量名称,仅修改变量值即可!!! 7 | ## 8 | 9 | ######################### 10 | ## Wallpaper 11 | ## 需要 锁屏使用壁纸则需要设置为绝对路径! 12 | ######################### 13 | wallpaper_path="~/.local/share/wallpaper/bg4.png" 14 | ## 是否从壁纸获取颜色 15 | auto_color="true" 16 | ## 颜色主题模式(light / dark) 17 | color_scheme="dark" 18 | 19 | ######################### 20 | ## Menu 21 | ######################### 22 | menu_font="Maple Mono SC NF 14" 23 | 24 | ######################### 25 | ## Notification 26 | ######################### 27 | notify_width="300" 28 | notify_height="80" 29 | notify_font="Maple Mono SC NF 14" 30 | notify_border="2" 31 | 32 | ######################## 33 | ## QT 34 | ######################## 35 | qt_wayland_dpi=120 36 | 37 | ######################## 38 | ## GTK 39 | ####################### 40 | ## 应用主题 41 | gtk_theme="Orchis-Dark" 42 | ## 应用字体大小 43 | gtk_font="LXGW WenKai GB Screen 12" 44 | ## 图标主题 45 | gtk_icon_theme="Win10Sur-black-dark" 46 | ## Gtk 缩放(整数) 47 | gtk_scale=1 48 | ## Gtk dpi 缩放(支持分数) 49 | gtk_dpi_scale=1.25 50 | ## 光标主题 51 | cursor_theme="Bibata-Modern-Ice" 52 | ## 鼠标大小 53 | cursor_size=24 54 | 55 | ######################## 56 | ## Terminal 57 | ######################## 58 | ## 终端字体 59 | term_font="Maple Mono SC NF" 60 | ## 终端字体大小 61 | term_font_size="14" 62 | 63 | ######################## 64 | ## Hyprland 65 | ######################## 66 | 67 | ## 多久锁屏 (秒) 68 | hypr_lock_timeout=900 69 | 70 | ## 边框宽度 71 | hypr_border=2 72 | ## 内边缘间隔 73 | hypr_gap_in=6 74 | ## 外边缘间隔 75 | hypr_gap_out=16 76 | ## 窗口圆角 77 | hypr_radius=8 78 | ## 是否启用阴影 ("true" / "false"),没什么效果,推荐关闭 79 | hypr_shadow_enable="false" 80 | ## 阴影半径 81 | hypr_shadow_range=4 82 | ## 活动窗口透明度 83 | hypr_opacity=1.0 84 | ## 不活动窗口透明度 85 | hypr_inopacity=1.0 86 | ## 是否启用模糊 87 | hypr_blur_enable="true" 88 | ## 模糊大小 89 | hypr_blur_size=16 90 | ## 是否启用动画 91 | hypr_anim_enable="true" 92 | ## 是否在移动或者改变大小时启用动画 93 | hypr_anim_resize="false" 94 | ## 是否取消显示随机logo壁纸,false则自定义壁纸失效,使用随机壁纸 95 | hypr_dis_random_logo="true" 96 | ## 是否关闭配置文件更改后自动重新加载,false为自动加载 97 | hypr_dis_autoreload="true" 98 | -------------------------------------------------------------------------------- /hypr/scripts/menu_powermenu: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## Copyright (C) 2023 Ticks 4 | 5 | DIR="$HOME/.config/hypr" 6 | RASI="$DIR/menu/rofi/powermenu.rasi" 7 | CNFR="$DIR/menu/rofi/confirm.rasi" 8 | # Theme Elements 9 | prompt="$(hostname) ($(echo $XDG_SESSION_DESKTOP))" 10 | mesg="Uptime : $(uptime -p | sed -e 's/up //g')" 11 | 12 | # Options 13 | layout=$(cat ${RASI} | grep 'USE_ICON' | cut -d'=' -f2) 14 | if [[ "$layout" == 'NO' ]]; then 15 | option_1="󰌾 Lock" 16 | option_2="󰍃 Logout" 17 | option_3=" Reboot" 18 | option_4="󰐥 Shutdown" 19 | else 20 | option_1="󰌾" 21 | option_2="󰍃" 22 | option_3="" 23 | option_4="󰐥" 24 | fi 25 | cnflayout=$(cat ${CNFR} | grep 'USE_ICON' | cut -d'=' -f2) 26 | if [[ "$cnflayout" == 'NO' ]]; then 27 | yes='󰗡 Yes' 28 | no='󰅙 No' 29 | else 30 | yes='󰗡' 31 | no='󰅙' 32 | fi 33 | 34 | # Rofi CMD 35 | rofi_cmd() { 36 | rofi -dmenu \ 37 | -p "$prompt" \ 38 | -mesg "$mesg" \ 39 | -markup-rows \ 40 | -theme ${RASI} 41 | } 42 | 43 | # Pass variables to rofi dmenu 44 | run_rofi() { 45 | echo -e "$option_1\n$option_2\n$option_3\n$option_4" | rofi_cmd 46 | } 47 | 48 | # Confirmation CMD 49 | confirm_cmd() { 50 | rofi -dmenu \ 51 | -p 'Confirmation' \ 52 | -mesg 'Are you Sure?' \ 53 | -theme ${CNFR} 54 | } 55 | 56 | # Ask for confirmation 57 | confirm_exit() { 58 | echo -e "$yes\n$no" | confirm_cmd 59 | } 60 | 61 | # Confirm and execute 62 | confirm_run() { 63 | selected="$(confirm_exit)" 64 | if [[ "$selected" == "$yes" ]]; then 65 | ${1} && ${2} && ${3} 66 | else 67 | exit 68 | fi 69 | } 70 | 71 | # Execute Command 72 | run_cmd() { 73 | if [[ "$1" == '--opt1' ]]; then 74 | confirm_run 'hyprlock >/dev/null' 75 | elif [[ "$1" == '--opt2' ]]; then 76 | confirm_run 'hyprctl dispatch exit' 77 | elif [[ "$1" == '--opt3' ]]; then 78 | confirm_run 'systemctl reboot' 79 | elif [[ "$1" == '--opt4' ]]; then 80 | confirm_run 'systemctl poweroff' 81 | fi 82 | } 83 | 84 | # Actions 85 | chosen="$(run_rofi)" 86 | case ${chosen} in 87 | $option_1) 88 | run_cmd --opt1 89 | ;; 90 | $option_2) 91 | run_cmd --opt2 92 | ;; 93 | $option_3) 94 | run_cmd --opt3 95 | ;; 96 | $option_4) 97 | run_cmd --opt4 98 | ;; 99 | esac 100 | -------------------------------------------------------------------------------- /hypr/hyprland/autostart.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## Copyright (C) 2024 Ticks 4 | ## 5 | ## Hyprland autostart script 6 | ## 7 | 8 | DIR="${HOME}/.config/hypr" 9 | SCRIPTS="${DIR}/scripts" 10 | 11 | if [[ -f "${DIR}/.current" ]]; then 12 | source ${DIR}/.current 13 | else 14 | source ${DIR}/custom/theme.sh 15 | fi 16 | 17 | if [[ ! "${hypr_lock_timeout}" ]]; then 18 | local hypr_lock_timeout=600 19 | fi 20 | 21 | import_gtk3_theme() { 22 | config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini" 23 | gnome_schema="org.gnome.desktop.interface" 24 | 25 | if [ -f "$config" ]; then 26 | local gtk_theme="$(grep 'gtk-theme-name' "$config" | sed 's/.*\s*=\s*//')" 27 | local icon_theme="$(grep 'gtk-icon-theme-name' "$config" | sed 's/.*\s*=\s*//')" 28 | local cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | sed 's/.*\s*=\s*//')" 29 | local gtk_font="$(grep 'gtk-font-name' "$config" | sed 's/.*\s*=\s*//')" 30 | fi 31 | 32 | gsettings set "$gnome_schema" gtk-theme "$gtk_theme" 33 | gsettings set "$gnome_schema" icon-theme "$icon_theme" 34 | gsettings set "$gnome_schema" cursor-theme "$cursor_theme" 35 | gsettings set "$gnome_schema" font-name "$gtk_font" 36 | gsettings set "$gnome_schema" cursor-size "$cursor_size" 37 | } 38 | 39 | set_xdg_desktop() { 40 | killall -e xdg-desktop-portal-hyprland 41 | killall -e xdg-desktop-portal-wlr 42 | killall xdg-desktop-portal 43 | /usr/lib/xdg-desktop-portal-hyprland & 44 | sleep 1 45 | /usr/lib/xdg-desktop-portal & 46 | } 47 | 48 | lock_manager() { 49 | killall -9 swayidle 50 | swayidle -w \ 51 | timeout ${hypr_lock_timeout} "hyprctl dispatcher dpms off && bash ${SCRIPTS}/hyprlock" & 52 | } 53 | 54 | start_always() { 55 | ## this function will exec always 56 | 57 | ## Set gtk theme 58 | import_gtk3_theme 59 | 60 | ## 权限认证程序 61 | if [[ ! $(pidof xfce-polkit) ]]; then 62 | /usr/lib/xfce-polkit/xfce-polkit & 63 | fi 64 | 65 | ## 壁纸 66 | killall -9 hyprpaper 67 | 68 | if [[ "${hypr_dis_random_logo}" == "true" ]]; then 69 | echo "show the custom wallpaper!" 70 | hyprpaper & 71 | fi 72 | 73 | hyprctl setcursor ${XCURSOR_THEME} ${XCURSOR_SIZE} 74 | 75 | } 76 | 77 | start_once() { 78 | ## this function will exec once 79 | 80 | set_xdg_desktop 81 | 82 | # lock_manager 83 | 84 | echo "" 85 | } 86 | 87 | if [[ "$1" == "always" ]]; then 88 | start_always 89 | exit 0 90 | elif [[ "$1" == "once" ]]; then 91 | start_once 92 | exit 0 93 | else 94 | exit 1 95 | fi 96 | -------------------------------------------------------------------------------- /hypr/bar/waybar/style.css: -------------------------------------------------------------------------------- 1 | @import "color.css"; 2 | 3 | * { 4 | font-family: 'Iosevka Nerd Font', 'Maple Mono SC NF'; 5 | font-size: 16px; 6 | font-style: normal; 7 | color: @onBackground; 8 | border: none; 9 | border-radius: 0px; 10 | min-height: 0px; 11 | } 12 | 13 | window#waybar { 14 | background-color: @background; 15 | color: @onBackground; 16 | box-shadow: 2px 2px @shadow; 17 | } 18 | 19 | tooltip { 20 | background-color: @secondaryContainer; 21 | color: @onSecondaryContainer; 22 | border-radius: 8px; 23 | border: 1px solid @outline; 24 | padding: 10px; 25 | } 26 | 27 | tooltip label { 28 | color: @onSecondaryContainer; 29 | font-size: 16px; 30 | } 31 | 32 | #custom-dot { 33 | font-size: 14px; 34 | color: alpha(@tertiary, 0.8); 35 | padding: 0px 5px; 36 | } 37 | 38 | #custom-dot-alt { 39 | font-size: 14px; 40 | color: alpha(@tertiary, 0.8); 41 | padding: 0px 5px; 42 | } 43 | 44 | #workspaces { 45 | margin: 5px 10px; 46 | padding: 0px 10px; 47 | border-radius: 99px; 48 | font-style: normal; 49 | font-weight: normal; 50 | background-color: @surfaceContainer; 51 | color: @onSurfaceContainer; 52 | } 53 | 54 | #workspaces button { 55 | margin: 5px 0px; 56 | border-radius: 99px; 57 | } 58 | 59 | #workspaces button { 60 | padding: 0px 10px 0px 10px; 61 | border-radius: 99px; 62 | background-color: @surfaceDim; 63 | color: @onSurfaceDim; 64 | } 65 | 66 | #workspaces button:hover { 67 | background-color: @primary; 68 | color: @onPrimary; 69 | } 70 | 71 | #workspaces button.empty { 72 | background-color: transparent; 73 | color: @onSufaceContainer; 74 | } 75 | 76 | #workspaces button.active { 77 | padding: 0px 10px 0px 5px; 78 | background-color: @primary; 79 | color: @onPrimary; 80 | } 81 | 82 | #workspaces button.urgent { 83 | background-color: @error; 84 | color: @onError; 85 | } 86 | 87 | 88 | #cpu, 89 | #clock, 90 | #mpd, 91 | #network, 92 | #backlight, 93 | #pulseaudio, 94 | #battery, 95 | #custom-sysmenu, 96 | #tray{ 97 | padding-left: 15px; 98 | padding-right: 15px; 99 | margin: 5px 10px; 100 | background-color: @surfaceContainer; 101 | border-radius: 99px; 102 | } 103 | 104 | #tray { 105 | padding: 10px 20px; 106 | min-width: 20px; 107 | } 108 | 109 | #custom-logo { 110 | background-color: @background; 111 | color: @onBackground; 112 | margin-left: 20px; 113 | margin-right: 20px; 114 | } 115 | -------------------------------------------------------------------------------- /hypr/menu/rofi/askpass.rasi: -------------------------------------------------------------------------------- 1 | 2 | /*****----- Global Properties -----*****/ 3 | @import "shared/colors.rasi" 4 | @import "shared/fonts.rasi" 5 | 6 | /*****----- Main Window -----*****/ 7 | window { 8 | location: center; 9 | anchor: center; 10 | fullscreen: false; 11 | width: 600px; 12 | x-offset: 0px; 13 | y-offset: 0px; 14 | padding: 20px; 15 | border: 0px solid; 16 | border-radius: 12px; 17 | border-color: @primaryContainer; 18 | background-color: @background; 19 | cursor: "default"; 20 | children: [ "inputbar", "listview" ]; 21 | } 22 | 23 | /*****----- Inputbar -----*****/ 24 | inputbar { 25 | enabled: true; 26 | spacing: 10px; 27 | margin: 0px; 28 | padding: 0px; 29 | border: 0px solid; 30 | border-radius: 0px; 31 | border-color: @primaryContainer; 32 | background-color: transparent; 33 | text-color: @onBackground; 34 | children: [ "textbox-prompt-colon", "prompt", "entry" ]; 35 | } 36 | 37 | dummy { 38 | expand: false; 39 | width: 10px; 40 | background-color: transparent; 41 | } 42 | textbox-prompt-colon { 43 | enabled: true; 44 | expand: false; 45 | str: " "; 46 | padding: 10px 16px; 47 | border-radius: 12px; 48 | background-color: @primaryContainer; 49 | text-color: @onPrimaryContainer; 50 | } 51 | prompt { 52 | enabled: true; 53 | padding: 10px; 54 | border-radius: 12px; 55 | background-color: @primaryContainer; 56 | text-color: @onPrimaryContainer; 57 | } 58 | entry { 59 | enabled: true; 60 | padding: 10px 15px; 61 | border-radius: 12px; 62 | background-color: @surface; 63 | text-color: inherit; 64 | cursor: text; 65 | placeholder: "Input Password ..."; 66 | placeholder-color: inherit; 67 | } 68 | 69 | /*****----- Listview -----*****/ 70 | listview { 71 | enabled: false; 72 | } 73 | -------------------------------------------------------------------------------- /hypr/bar/waybar/modules.json: -------------------------------------------------------------------------------- 1 | { 2 | "hyprland/workspaces": { 3 | "on-click": "activate", 4 | "all-outputs": true, 5 | "active-only": false, 6 | "format": "{icon}", 7 | "format-icons": { 8 | // "1": "", 9 | // "2": "", 10 | // "3": "", 11 | // "4": "", 12 | // "5": "", 13 | // "6": "", 14 | // "7": "", 15 | // "8": "", 16 | "urgent": "", 17 | "active": "", 18 | "default": "󰧞" 19 | }, 20 | "sort-by": "number", 21 | "persistent-workspaces": { 22 | "1": [], 23 | "2": [], 24 | "3": [], 25 | "4": [], 26 | "5": [], 27 | "6": [] 28 | } 29 | }, 30 | "hyprland/window": { 31 | "format": "{title}", 32 | "max-length": 25 33 | }, 34 | "backlight": { 35 | "device": "amdgpu_bl1", 36 | "format": "{icon} {percent}%", 37 | "format-icons": ["", "", "", "", "", "", "", "", ""], 38 | "scroll-step": 5 39 | }, 40 | "battery": { 41 | "bat": "BAT0", 42 | "adapter": "AC0", 43 | "full-at": 99, 44 | "format-time": "{H}:{M}", 45 | "format": "{icon} {capacity}%", 46 | "format-icons": { 47 | "charging": ["󰢜", "󰂆", "󰂇", "󰂈", "󰢝", "󰂉", "󰢞", "󰂊", "󰂋", "󰂅"], 48 | "default": ["", "", "", "", ""] 49 | }, 50 | "format-full": "Charged ", 51 | "interval": 5, 52 | "tooltip": false 53 | }, 54 | "cpu": { 55 | "format": "{icon} {usage}%", 56 | "format-icons": ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"], 57 | "interval": 10 58 | }, 59 | "clock": { 60 | "interval": 60, 61 | "format": " {:%H:%M}", 62 | "tooltip-format": "{:%Y-%m-%d %H:%M}" 63 | }, 64 | "mpd": { 65 | "max-length": 25, 66 | "format": " {title} - {artist}", 67 | "format-stopped": " Stopped", 68 | "format-paused": " Paused", 69 | "on-click": "mpc toggle", 70 | "on-scroll-up": "mpc prev", 71 | "on-scroll-down": "mpc next", 72 | "on-click-right": "~/.config/hypr/scripts/menu_music &" 73 | }, 74 | "network": { 75 | "interval": 5, 76 | "format-icons": ["󰤯", "󰤟", "󰤢", "󰤥", "󰤨"], 77 | "format-wifi": "{icon} {signalStrength}%", 78 | "format-ethernet": "", 79 | "format-disconnected": "󰖪 None", 80 | "tooltip-format": "{essid} : {bandwidthUpBytes} | {bandwidthDownBytes}", 81 | "on-click": "~/.config/hypr/scripts/menu_wifi &" 82 | }, 83 | "pulseaudio": { 84 | "scroll-step": 5, 85 | "format": "{icon} {volume}%", 86 | "tooltip-format": "Volume : {volume}%", 87 | "format-icons": { 88 | "headphone": "", 89 | "phone": "", 90 | "portable": "", 91 | "car": "", 92 | "default": ["󰖀", "󰕾", ""] 93 | }, 94 | "format-muted": "󰝟" 95 | }, 96 | "tray": { 97 | "icon-size": 20, 98 | "spacing": 5 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /hypr/scripts/menu_music: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## Copyright (C) 2023 Ticks 4 | 5 | DIR="$HOME/.config/hypr" 6 | RASI="$DIR/menu/rofi/music.rasi" 7 | 8 | # Theme Elements 9 | status="$(mpc status)" 10 | if [[ -z "$status" ]]; then 11 | prompt='Offline' 12 | mesg="MPD is Offline" 13 | else 14 | prompt="$(mpc -f "%artist%" current)" 15 | mesg="$(mpc -f "%title%" current) :: $(mpc status | grep "#" | awk '{print $3}')" 16 | fi 17 | 18 | # Options 19 | layout=$(cat ${RASI} | grep 'USE_ICON' | cut -d'=' -f2) 20 | if [[ "$layout" == 'NO' ]]; then 21 | if [[ ${status} == *"[playing]"* ]]; then 22 | option_1="󰏦 Pause" 23 | else 24 | option_1=" Play" 25 | fi 26 | option_2=" Stop" 27 | option_3="󰙤 Previous" 28 | option_4="󰙢 Next" 29 | # option_5="󰕇 Repeat" 30 | # option_6=" Random" 31 | else 32 | if [[ ${status} == *"[playing]"* ]]; then 33 | option_1="󰏦" 34 | else 35 | option_1="" 36 | fi 37 | option_2="" 38 | option_3="󰙤" 39 | option_4="󰙢" 40 | # option_5="󰕇" 41 | # option_6="" 42 | fi 43 | 44 | # # Toggle Actions 45 | # active='' 46 | # urgent='' 47 | # # Repeat 48 | # if [[ ${status} == *"repeat: on"* ]]; then 49 | # active="-a 4" 50 | # elif [[ ${status} == *"repeat: off"* ]]; then 51 | # urgent="-u 4" 52 | # else 53 | # option_5="Parsing Error" 54 | # fi 55 | # # Random 56 | # if [[ ${status} == *"random: on"* ]]; then 57 | # [ -n "$active" ] && active+=",5" || active="-a 5" 58 | # elif [[ ${status} == *"random: off"* ]]; then 59 | # [ -n "$urgent" ] && urgent+=",5" || urgent="-u 5" 60 | # else 61 | # option_6="Parsing Error" 62 | # fi 63 | 64 | # Rofi CMD 65 | rofi_cmd() { 66 | rofi -dmenu \ 67 | -p "$prompt" \ 68 | -mesg "$mesg" \ 69 | ${active} ${urgent} \ 70 | -markup-rows \ 71 | -theme ${RASI} 72 | } 73 | 74 | # Pass variables to rofi dmenu 75 | run_rofi() { 76 | # echo -e "$option_1\n$option_2\n$option_3\n$option_4\n$option_5\n$option_6" | rofi_cmd 77 | echo -e "$option_1\n$option_2\n$option_3\n$option_4" | rofi_cmd 78 | } 79 | 80 | # Execute Command 81 | run_cmd() { 82 | if [[ "$1" == '--opt1' ]]; then 83 | mpc -q toggle && kunst --size 60x60 --silent 84 | elif [[ "$1" == '--opt2' ]]; then 85 | mpc -q stop 86 | elif [[ "$1" == '--opt3' ]]; then 87 | mpc -q prev && kunst --size 60x60 --silent 88 | elif [[ "$1" == '--opt4' ]]; then 89 | mpc -q next && kunst --size 60x60 --silent 90 | # elif [[ "$1" == '--opt5' ]]; then 91 | # mpc -q repeat 92 | # elif [[ "$1" == '--opt6' ]]; then 93 | # mpc -q random 94 | fi 95 | } 96 | 97 | # Actions 98 | chosen="$(run_rofi)" 99 | case ${chosen} in 100 | $option_1) 101 | run_cmd --opt1 102 | ;; 103 | $option_2) 104 | run_cmd --opt2 105 | ;; 106 | $option_3) 107 | run_cmd --opt3 108 | ;; 109 | $option_4) 110 | run_cmd --opt4 111 | ;; 112 | # $option_5) 113 | # run_cmd --opt5 114 | # ;; 115 | # $option_6) 116 | # run_cmd --opt6 117 | # ;; 118 | esac 119 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## ArchLinux 自用Hyprland配置 2 | 3 | ### 截图: 4 | 5 | ![img1](./imgs/Screenshot_4.png) 6 | 7 | ![img2](./imgs/Screenshot_5.png) 8 | 9 | ![img3](./imgs/Screenshot_6.png) 10 | 11 | ### 安装要求 12 | 13 | 为避免引入过多的依赖,下面这些软件应该是最基本的要求了。 14 | 15 | - **基础软件**:`hyprland` `xorg-xwayland` `qt5-wayland` `qt6-wayland` `glfw-wayland` 16 | `xsettingsd` ... 17 | 18 | - **壁纸**:`hyprpaper` 19 | 20 | - **状态栏**:`waybar` 21 | 22 | - **启动器**:`rofi-wayland(rofi-lbonn-wayland)` 23 | 24 | - **通知**:`dunst` 25 | 26 | - **剪切板**:`wl-clipboard` `cliphist` 27 | 28 | - **截屏**:`slurp` `grim` `jq` 29 | 30 | - **密码认证**:`xfce-polkit` 31 | 32 | - **取色**:`hyprpicker` 33 | 34 | - **声音**:`pipewire` `pipewire-alsa` `pipewire-audio` `pipewire-pulse` 35 | 36 | - **亮度**:`light` `xbacklight` 37 | 38 | - **录屏**:`obs-studio` `wireplumber` 39 | 40 | - **锁屏**:`hyprlocklock` `hypridle` 41 | 42 | - **终端**:`alacritty` 43 | 44 | - **音乐**:`mpd` `ncmpcpp` `mpc` 45 | 46 | - **网络**:`networkmanager` `iwd` 47 | 48 | - **文本编辑器**:`neovim` `geany` 49 | 50 | - **主题**:`qt5ct` `kvantum` `gsettings-desktop-schemas` 51 | 52 | - **字体**:`Maple Mono SC NF` `Iosevka Nerd Font` 53 | 54 | - **动态取色(已包含,不用下载)**: `md-color` 55 | 56 | ### 安装说明 57 | 58 | 大部分软件都可以在Archlinux官方仓库下载到,字体请使用 yay 安装(Maple字体需要,当然你也可以换成其他带图标字体),其他中文字体可以到下方链接下载: 59 | 60 | Sarasa: https://github.com/be5invis/Sarasa-Gothic 61 | 62 | Nerd Font: https://github.com/ryanoasis/nerd-fonts 63 | 64 | LXGW: https://github.com/lxgw/LxgwBright 65 | 66 | 正式使用前请保证安装好对应字体,字体中包含了很多图标显示。 67 | 68 | ### 安装步骤: 69 | 70 | 1. fork 仓库 71 | 72 | ```bash 73 | git clone --depth=1 https://github.com/ticks-tan/wayland-dotfile 74 | cd hyprland-dotfile 75 | ``` 76 | 77 | 2. 备份原有配置 78 | 79 | ```bash 80 | mv ~/.config/hypr ~/.config/hypr-back 81 | ``` 82 | 83 | 3. 拷贝配置并修改权限 84 | 85 | ```bash 86 | cp -r hypr ~/.config/ 87 | chmod -R u+x ~/.config/hypr/scripts 88 | chmod u+x ~/.config/hypr/hyprland/autostart.sh 89 | ``` 90 | 91 | 4. 启动 hyprland 查看效果 92 | 93 | ```bash 94 | hyprland 95 | ``` 96 | 97 | ### 主题 98 | 99 | 使用脚本可以进行简单的主题配置,主题配置文件在 `hypr/custom/theme.sh` ,内部变量有注释说明,可以定制配色、字体和一些其他选项。 100 | 101 | 最好情况是你可以很好的的使用此配置,修改完文件后使用 `Mod + Shift + T` 进行运用,脚本会自动刷新配置并重新加载 `hyprland` 。当然你也可以自定义更多选项,应用脚本在 `hypr/custom/apply.sh` ,主要都是一些字符串替换,可以自行定制。 102 | 103 | 第一次使用请先进行主题配置,默认主题你可能没有安装! 104 | 105 | 默认配色、GTK主题、光标主题均为 `catppuccin` ,可以到 [此处](https://github.com/catppuccin/catppuccin) 查看关于 `Catppuccin` 所有配色主题 。 106 | 107 | ### 键盘绑定 108 | 109 | 下面是一些主要的按键绑定,具体请查看 `hyprland/bind.conf` 110 | | 键 | 绑定操作 | 111 | | ---| ---| 112 | | Mod + Shift + Q | 退出Hyprland | 113 | | Mod + Return | 普通模式启动终端 | 114 | | Mod + Shift + Return | 启动浮动窗口终端 | 115 | | Mod + Alt + Return | 全屏启动终端 | 116 | | Mod + P | 取色 | 117 | | Print | 区域截图 | 118 | | Alt + Print | 当前显示器截图 | 119 | | Shift + Print | 选择窗口截图 | 120 | | Mod + Shift + S | 区域截图 | 121 | | Mod + A | 应用启动器 | 122 | | Mod + R | 运行程序 | 123 | | Mod + Shift + R | Root运行部分程序 | 124 | | Mod + Shift + X | PowerMenu菜单 | 125 | | Mod + Shift + N | 网络小部件 | 126 | | Mod + Shift + M | 音乐小部件 | 127 | | Mod + Shift + T | 应用主题变更 | 128 | | Mod + C | 关闭应用 | 129 | | Mod + Shift + Space | 切换平铺与浮动 | 130 | | Mod + 鼠标| 移动或调整窗口 | 131 | 132 | ### 其他 133 | 134 | 当前配置部分脚本功能参考自 [Archcraft](https://archcraft.io/) 开源 bspwm 配置,欢迎大家下载 Archcraft 体验。 135 | 136 | 终端小猫咪:[https://github.com/andreasgrafen/pfetch-with-kitties](https://github.com/andreasgrafen/pfetch-with-kitties) 137 | -------------------------------------------------------------------------------- /hypr/scripts/hyprscreenshot: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## Copyright (C) 2023 Ticks 4 | ## 5 | ## Take screenshot script 6 | ## 7 | 8 | time=$(date +%Y-%m-%d-%H-%M-%S) 9 | SAVEDIR="$(xdg-user-dir PICTURES)/Screenshots" 10 | SAVEFILE="${SAVEDIR}/Screenshot_${time}.png" 11 | 12 | send_notify() { 13 | if [[ "$1" == "1" ]]; then 14 | dunstify -u low -h string:x-dunst-stack-tag:obscreenshot "Image saved at ${SAVEFILE}" 15 | else 16 | dunstify -u low -h string:x-dunst-stack-tag:obscreenshot "Image Copied to clipboard" 17 | fi 18 | } 19 | 20 | area_output() { 21 | slurp -or 22 | } 23 | 24 | area_active_output() { 25 | local active_workspace=$(hyprctl -j activeworkspace) 26 | local monitors=$(hyprctl -j monitors) 27 | local current_monitor="$(echo $monitors | jq -r 'first(.[] | select(.activeWorkspace.id == '$(echo $active_workspace | jq -r '.id')'))')" 28 | echo $current_monitor | jq -r '"\(.x),\(.y) \(.width)x\(.height)"' 29 | } 30 | 31 | area_selected_output() { 32 | local monitor=$(hyprctl -j monitors | jq -r '.[] | select(.name == "'$(echo $1)'")') 33 | echo $monitor | jq -r '"\(.x),\(.y) \(.width)x\(.height)"' 34 | } 35 | 36 | area_region() { 37 | slurp -d 38 | } 39 | 40 | area_window() { 41 | local monitors=$(hyprctl -j monitors) 42 | local clients=$(hyprctl -j clients | jq -r '[.[] | select(.workspace.id | contains('$(echo $monitors | jq -r 'map(.activeWorkspace.id) | join(",")')'))]') 43 | local boxes="$(echo $clients | jq -r '.[] | "\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1]) \(.title)"')" 44 | slurp -r <<<"$boxes" 45 | } 46 | 47 | area_active_window() { 48 | local active_window=$(hyprctl -j activewindow) 49 | local box=$(echo $active_window | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"') 50 | echo "$box" 51 | } 52 | 53 | trim_area() { 54 | local geometry="${1}" 55 | local xy_str=$(echo "${geometry}" | cut -d' ' -f1) 56 | local wh_str=$(echo "${geometry}" | cut -d' ' -f2) 57 | local x=$(echo "${xy_str}" | cut -d',' -f1) 58 | local y=$(echo "${xy_str}" | cut -d',' -f2) 59 | local width=$(echo "${wh_str}" | cut -dx -f1) 60 | local height=$(echo "${wh_str}" | cut -dx -f2) 61 | 62 | local max_width=$(hyprctl monitors -j | jq -r '[.[] | (.x + .width)] | max') 63 | local max_height=$(hyprctl monitors -j | jq -r '[.[] | (.y + .height)] | max') 64 | 65 | local cropped_x=$x 66 | local cropped_y=$y 67 | local cropped_width=$width 68 | local cropped_height=$height 69 | 70 | if ((x + width > max_width)); then 71 | cropped_width=$((max_width - x)) 72 | fi 73 | if ((y + height > max_height)); then 74 | cropped_height=$((max_height - y)) 75 | fi 76 | 77 | if ((x < 0)); then 78 | cropped_x=0 79 | cropped_width=$((cropped_width + x)) 80 | fi 81 | if ((y < 0)); then 82 | cropped_y=0 83 | cropped_height=$((cropped_height + y)) 84 | fi 85 | 86 | printf "%s,%s %sx%s\n" \ 87 | "${cropped_x}" "${cropped_y}" \ 88 | "${cropped_width}" "${cropped_height}" 89 | } 90 | 91 | save_area() { 92 | local cropped_geometry=$(trim_area "${1}") 93 | local output="" 94 | 95 | if [ $CLIPBOARD -eq 0 ]; then 96 | mkdir -p "$SAVEDIR" 97 | grim -g "${cropped_geometry}" "$SAVEFILE" 98 | output="$SAVEFILE" 99 | wl-copy <"$output" 100 | send_notify 1 101 | else 102 | wl-copy < <(grim -g "${cropped_geometry}" -) 103 | send_notify 0 104 | fi 105 | } 106 | 107 | begin() { 108 | if [[ "$1" == "--region" ]]; then 109 | local area=$(area_region) 110 | elif [[ "$1" == "--active-window" ]]; then 111 | local area=$(area_active_window) 112 | elif [[ "$1" == "--window" ]]; then 113 | local area=$(area_window) 114 | elif [[ "$1" == "--output" ]]; then 115 | local area=$(area_output) 116 | elif [[ "$1" == "--active-output" ]]; then 117 | local area=$(area_active_output) 118 | elif [[ "$1" == "--select-output" ]]; then 119 | local area=$(area_selected_output) 120 | else 121 | local area=$(area_region) 122 | fi 123 | 124 | save_area "${area}" 125 | } 126 | 127 | CLIPBOARD=0 128 | if [[ "$2" == "--clipboard-only" ]]; then 129 | CLIPBOARD=1 130 | fi 131 | 132 | begin "$1" 133 | -------------------------------------------------------------------------------- /hypr/hyprland.conf: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2023 Ticks 2 | # ______________________________________________________________ # 3 | # _ _ # 4 | # / / / / # 5 | # ---/___ /---------------__----)__----/-----__-----__-----__-/- # 6 | # / / / / / ) / ) / / ) / ) / / # 7 | # _/____/_____(___/____/___/__/______/____(___(__/___/__(___/___ # 8 | # / / # 9 | # (_ / / # 10 | 11 | 12 | # Set default env vars 13 | 14 | $HyprConfDir=~/.config/hypr/hyprland 15 | 16 | # Current theme 17 | 18 | source=$HyprConfDir/color.conf 19 | source=$HyprConfDir/env.conf 20 | source=$HyprConfDir/rule.conf 21 | source=$HyprConfDir/bind.conf 22 | source=$HyprConfDir/exec.conf 23 | 24 | 25 | # Custom 26 | $hypr_border = 2 27 | 28 | $hypr_gap_in = 6 29 | $hypr_gap_out = 16 30 | 31 | $hypr_radius = 8 32 | 33 | $hypr_shadow_enable = false 34 | $hypr_shadow_range = 4 35 | 36 | $hypr_opacity = 1.0 37 | $hypr_inopacity = 1.0 38 | 39 | $hypr_blur_enable = true 40 | $hypr_blur_size = 16 41 | 42 | $hypr_anim_enable = true 43 | $hypr_anim_resize = false 44 | 45 | $hypr_dis_random_logo = true 46 | $hypr_dis_autoreload = true 47 | 48 | 49 | # 50 | # Monitors 51 | # 52 | # See https://wiki.hyprland.org/Configuring/Monitors/ 53 | 54 | # set monitor=name,resolution,position,scale 55 | # monitor=,1920x1080,0x0,1.0 56 | monitor=eDP-1,1920x1080@144,0x0,1.0 57 | 58 | # unscale XWayland 59 | xwayland { 60 | force_zero_scaling = true 61 | } 62 | 63 | # 64 | # Variables 65 | # 66 | # See https://wiki.hyprland.org/Configuring/Variables/ 67 | 68 | 69 | input { 70 | kb_layout = us 71 | # 跟随鼠标获取焦点 72 | follow_mouse = 1 73 | # 鼠标灵敏度 74 | sensitivity = 0.2 75 | 76 | touchpad { 77 | natural_scroll = true 78 | # 轻点触发 79 | tap-to-click = true 80 | scroll_factor = 0.2 81 | } 82 | } 83 | 84 | general { 85 | # See https://wiki.hyprland.org/Configuring/Variables/ 86 | 87 | gaps_in = $hypr_gap_in 88 | gaps_out = $hypr_gap_out 89 | border_size = $hypr_border 90 | col.active_border = 0xff$primary 91 | col.inactive_border = 0xff$surface 92 | 93 | layout = dwindle 94 | } 95 | 96 | decoration { 97 | # See https://wiki.hyprland.org/Configuring/Variables/ 98 | 99 | rounding = $hypr_radius 100 | 101 | active_opacity = $hypr_opacity 102 | inactive_opacity = $hypr_inopacity 103 | 104 | drop_shadow = $hypr_shadow_enable 105 | shadow_range = $hypr_shadow_range 106 | col.shadow = 0xff$color0 107 | 108 | blur { 109 | enabled = $hypr_blur_enable 110 | size = $hypr_blur_size 111 | passes = 3 112 | new_optimizations = true 113 | } 114 | 115 | } 116 | 117 | 118 | animations { 119 | # see https://wiki.hyprland.org/Configuring/Animations/ 120 | 121 | enabled = $hypr_anim_enable 122 | 123 | # 贝塞尔曲线 124 | # see https://easings.net/ 125 | # bezier = easeInBack, 0.36, 0, 0.66, -0.56 126 | bezier = easeOutBack, 0.34, 1.56, 0.64, 1 127 | 128 | animation = windows, 1, 5, easeOutBack 129 | animation = windowsOut, 1, 3, default, popin 80% 130 | animation = border, 1, 7, default 131 | animation = fade, 1, 5, default 132 | animation = workspaces, 1, 5, default 133 | } 134 | 135 | dwindle { 136 | # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ 137 | 138 | pseudotile = true 139 | preserve_split = true 140 | } 141 | 142 | master { 143 | # See https://wiki.hyprland.org/Configuring/Master-Layout/ 144 | 145 | new_is_master = true 146 | } 147 | 148 | gestures { 149 | # See https://wiki.hyprland.org/Configuring/Variables/ 150 | workspace_swipe = false 151 | } 152 | 153 | misc { 154 | # See https://wiki.hyprland.org/Configuring/Variables/ 155 | 156 | disable_autoreload = $hypr_dis_autoreload 157 | disable_hyprland_logo = $hypr_dis_random_logo 158 | animate_manual_resizes = $hypr_anim_resize 159 | mouse_move_enables_dpms = true 160 | key_press_enables_dpms = true 161 | } 162 | 163 | 164 | -------------------------------------------------------------------------------- /hypr/hyprland/bind.conf: -------------------------------------------------------------------------------- 1 | # ________________________________________________________________________________________________ # 2 | # ____ _ _ # 3 | # / ) , / / ,' / # 4 | # ---/__ /-----------__-----__-/--------/_.'-------__--------------------__----)__-----__-/----__- # 5 | # / ) / / ) / / / \ /___) / / | /| / / ) / ) / / (_ ` # 6 | # _/____/____/____/___/__(___/________/____\____(___ __(___/__|/_|/___(___/__/______(___/____(__)_ # 7 | # / # 8 | # (_ / # 9 | 10 | $HyprTool=~/.config/hypr/scripts 11 | $HyprDir=~/.config/hypr 12 | 13 | $mainMod = SUPER 14 | $shiftMod = SUPER_SHIFT 15 | $altMod = SUPER_ALT 16 | $alt = ALT 17 | $shift = SHIFT 18 | 19 | 20 | # Bind fn keywords 21 | binde =, XF86AudioRaiseVolume, exec, $HyprTool/hyprvolume --inc 22 | binde =, XF86AudioLowerVolume, exec, $HyprTool/hyprvolume --dec 23 | binde =, XF86AudioMute, exec, $HyprTool/hyprvolume --toggle 24 | binde =, XF86MonBrightnessUp, exec, $HyprTool/hyprbacklight --inc 25 | binde =, XF86MonBrightnessDown, exec, $HyprTool/hyprbacklight --dec 26 | 27 | # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more 28 | 29 | # Terminute 30 | bind = $mainMod, Return, exec, $HyprTool/hyprterm 31 | bind = $shiftMod, Return, exec, $HyprTool/hyprterm --float 32 | bind = $altMod, Return, exec, $HyprTool/hyprterm --full 33 | 34 | # ScreenShot 35 | bind = , Print, exec, $HyprTool/hyprscreenshot --region 36 | bind = $alt, Print, exec, $HyprTool/hyprscreenshot --active-output 37 | bind = $shift, Print, exec, $HyprTool/hyprscreenshot --window 38 | bind = $shiftMod, S, exec, $HyprTool/hyprscreenshot --region --clipboard-only 39 | 40 | # Color pick 41 | bind = $mainMod, P, exec, $HyprTool/hyprcolorpicker 42 | 43 | # Run applications 44 | bind = $mainMod, A, exec, $HyprTool/menu_launcher 45 | bind = $mainMod, R, exec, $HyprTool/menu_runner 46 | bind = $shiftMod, R, exec, $HyprTool/menu_asroot 47 | 48 | bind = $shiftMod, X, exec, $HyprTool/menu_powermenu 49 | bind = $shiftMod, M, exec, $HyprTool/menu_music 50 | bind = $shiftMod, N, exec, $HyprTool/menu_wifi 51 | bind = $shiftMod, T, exec, $HyprDir/custom/apply.sh 52 | 53 | # bind = $shiftMod, T, exec, $HyprDir/custom/apply.sh 54 | bind = $shiftMod, L, exec, hyprlock 55 | 56 | # Clipbord history 57 | bind = $shiftMod, V, exec, $HyprTool/menu_clipbord 58 | 59 | # Hyprland command 60 | bind = $mainMod, C, killactive, 61 | bind = $shiftMod, Q, exit, 62 | bind = $shiftMod, Space, togglefloating, 63 | bind = $mainMod, B, togglesplit, # dwindle 64 | 65 | # Move focus with mainMod + arrow keys 66 | bind = $mainMod, left, movefocus, l 67 | bind = $mainMod, right, movefocus, r 68 | bind = $mainMod, up, movefocus, u 69 | bind = $mainMod, down, movefocus, d 70 | 71 | bind = $mainMod, H, movefocus, l 72 | bind = $mainMod, L, movefocus, r 73 | bind = $mainMod, J, movefocus, u 74 | bind = $mainMod, K, movefocus, d 75 | 76 | # Switch workspaces with mainMod + [0-9] 77 | bind = $mainMod, 1, workspace, 1 78 | bind = $mainMod, 2, workspace, 2 79 | bind = $mainMod, 3, workspace, 3 80 | bind = $mainMod, 4, workspace, 4 81 | bind = $mainMod, 5, workspace, 5 82 | bind = $mainMod, 6, workspace, 6 83 | bind = $mainMod, 7, workspace, 7 84 | bind = $mainMod, 8, workspace, 8 85 | bind = $mainMod, 9, workspace, 9 86 | bind = $mainMod, 0, workspace, 10 87 | 88 | # Move active window to a workspace with mainMod + SHIFT + [0-9] 89 | bind = $mainMod SHIFT, 1, movetoworkspace, 1 90 | bind = $mainMod SHIFT, 2, movetoworkspace, 2 91 | bind = $mainMod SHIFT, 3, movetoworkspace, 3 92 | bind = $mainMod SHIFT, 4, movetoworkspace, 4 93 | bind = $mainMod SHIFT, 5, movetoworkspace, 5 94 | bind = $mainMod SHIFT, 6, movetoworkspace, 6 95 | bind = $mainMod SHIFT, 7, movetoworkspace, 7 96 | bind = $mainMod SHIFT, 8, movetoworkspace, 8 97 | bind = $mainMod SHIFT, 9, movetoworkspace, 9 98 | bind = $mainMod SHIFT, 0, movetoworkspace, 10 99 | 100 | # Scroll through existing workspaces with mainMod + scroll 101 | bind = $mainMod, mouse_down, workspace, e+1 102 | bind = $mainMod, mouse_up, workspace, e-1 103 | 104 | # Move/resize windows with mainMod + LMB/RMB and dragging 105 | bindm = $mainMod, mouse:272, movewindow 106 | bindm = $mainMod, mouse:273, resizewindow -------------------------------------------------------------------------------- /hypr/menu/rofi/music.rasi: -------------------------------------------------------------------------------- 1 | 2 | /*****----- Configuration -----*****/ 3 | configuration { 4 | show-icons: false; 5 | } 6 | 7 | /*****----- Global Properties -----*****/ 8 | @import "shared/colors.rasi" 9 | @import "shared/fonts.rasi" 10 | 11 | /* 12 | USE_ICON=NO 13 | */ 14 | 15 | /*****----- Main Window -----*****/ 16 | window { 17 | transparency: "real"; 18 | location: center; 19 | anchor: center; 20 | fullscreen: false; 21 | x-offset: 0px; 22 | y-offset: 0px; 23 | margin: 0px; 24 | padding: 0px; 25 | border: 0px solid; 26 | border-radius: 12px; 27 | border-color: @primaryContainer; 28 | cursor: "default"; 29 | background-color: @background; 30 | } 31 | 32 | /*****----- Main Box -----*****/ 33 | mainbox { 34 | enabled: true; 35 | spacing: 10px; 36 | margin: 0px; 37 | padding: 30px; 38 | background-color: transparent; 39 | children: [ "inputbar", "message", "listview" ]; 40 | } 41 | 42 | /*****----- Inputbar -----*****/ 43 | inputbar { 44 | enabled: true; 45 | spacing: 10px; 46 | padding: 0px; 47 | border: 0px; 48 | border-radius: 0px; 49 | border-color: @primaryContainer; 50 | background-color: transparent; 51 | text-color: @onBackground; 52 | children: [ "textbox-prompt-colon", "prompt"]; 53 | } 54 | 55 | textbox-prompt-colon { 56 | enabled: true; 57 | expand: false; 58 | str: " "; 59 | padding: 10px 16px; 60 | border-radius: 12px; 61 | background-color: @primary; 62 | text-color: @onPrimary; 63 | } 64 | prompt { 65 | enabled: true; 66 | padding: 10px; 67 | border-radius: 12px; 68 | background-color: @primaryContainer; 69 | text-color: @onPrimaryContainer; 70 | } 71 | 72 | /*****----- Message -----*****/ 73 | message { 74 | enabled: true; 75 | margin: 0px; 76 | padding: 10px; 77 | border: 0px solid; 78 | border-radius: 12px; 79 | border-color: @primaryContainer; 80 | background-color: @surface; 81 | text-color: @onSurface; 82 | } 83 | textbox { 84 | background-color: inherit; 85 | text-color: inherit; 86 | vertical-align: 0.5; 87 | horizontal-align: 0.0; 88 | } 89 | 90 | /*****----- Listview -----*****/ 91 | listview { 92 | enabled: true; 93 | columns: 6; 94 | lines: 1; 95 | cycle: true; 96 | scrollbar: false; 97 | layout: vertical; 98 | 99 | spacing: 10px; 100 | background-color: transparent; 101 | cursor: "default"; 102 | } 103 | 104 | /*****----- Elements -----*****/ 105 | element { 106 | enabled: true; 107 | padding: 22px 10px; 108 | border: 0px solid; 109 | border-radius: 12px; 110 | border-color: @primaryContainer; 111 | background-color: transparent; 112 | text-color: @onBackground; 113 | cursor: pointer; 114 | } 115 | element-text { 116 | background-color: transparent; 117 | text-color: inherit; 118 | cursor: inherit; 119 | vertical-align: 0.5; 120 | horizontal-align: 0.5; 121 | } 122 | 123 | element normal.normal, 124 | element alternate.normal { 125 | background-color: @surface; 126 | text-color: @onSurface; 127 | } 128 | element normal.urgent, 129 | element alternate.urgent, 130 | element selected.active { 131 | background-color: @error; 132 | text-color: @onError; 133 | } 134 | element normal.active, 135 | element alternate.active, 136 | element selected.urgent { 137 | background-color: @primary; 138 | text-color: @onPrimary; 139 | } 140 | element selected.normal { 141 | background-color: @primaryContainer; 142 | text-color: @onPrimaryContainer; 143 | } 144 | -------------------------------------------------------------------------------- /hypr/menu/rofi/asroot.rasi: -------------------------------------------------------------------------------- 1 | 2 | /*****----- Configuration -----*****/ 3 | configuration { 4 | show-icons: false; 5 | } 6 | 7 | /*****----- Global Properties -----*****/ 8 | @import "shared/colors.rasi" 9 | @import "shared/fonts.rasi" 10 | 11 | /*****----- Main Window -----*****/ 12 | window { 13 | transparency: "real"; 14 | location: center; 15 | anchor: center; 16 | fullscreen: false; 17 | width: 600px; 18 | x-offset: 0px; 19 | y-offset: 0px; 20 | margin: 0px; 21 | padding: 0px; 22 | border: 0px solid; 23 | border-radius: 12px; 24 | border-color: @primaryContainer; 25 | cursor: "default"; 26 | background-color: @background; 27 | } 28 | 29 | /*****----- Main Box -----*****/ 30 | mainbox { 31 | enabled: true; 32 | spacing: 10px; 33 | margin: 0px; 34 | padding: 30px; 35 | background-color: transparent; 36 | children: [ "inputbar", "message", "listview" ]; 37 | } 38 | 39 | /*****----- Inputbar -----*****/ 40 | inputbar { 41 | enabled: true; 42 | spacing: 10px; 43 | padding: 0px; 44 | border: 0px; 45 | border-radius: 0px; 46 | border-color: @primaryContainer; 47 | background-color: transparent; 48 | text-color: @onBackground; 49 | children: [ "textbox-prompt-colon", "prompt"]; 50 | } 51 | 52 | textbox-prompt-colon { 53 | enabled: true; 54 | expand: false; 55 | str: " "; 56 | padding: 10px 16px; 57 | border-radius: 12px; 58 | background-color: @primary; 59 | text-color: @onPrimary; 60 | } 61 | prompt { 62 | enabled: true; 63 | padding: 10px; 64 | border-radius: 12px; 65 | background-color: @primaryContainer; 66 | text-color: @onPrimaryContainer; 67 | } 68 | 69 | /*****----- Message -----*****/ 70 | message { 71 | enabled: true; 72 | margin: 0px; 73 | padding: 10px; 74 | border: 0px solid; 75 | border-radius: 12px; 76 | border-color: @primaryContainer; 77 | background-color: @surface; 78 | text-color: @onSurface; 79 | } 80 | textbox { 81 | background-color: inherit; 82 | text-color: inherit; 83 | vertical-align: 0.5; 84 | horizontal-align: 0.0; 85 | } 86 | 87 | /*****----- Listview -----*****/ 88 | listview { 89 | enabled: true; 90 | columns: 4; 91 | lines: 1; 92 | cycle: true; 93 | scrollbar: false; 94 | layout: vertical; 95 | 96 | spacing: 10px; 97 | background-color: transparent; 98 | cursor: "default"; 99 | } 100 | 101 | /*****----- Elements -----*****/ 102 | element { 103 | enabled: true; 104 | padding: 16px 10px; 105 | border: 0px solid; 106 | border-radius: 12px; 107 | border-color: @primaryContainer; 108 | background-color: transparent; 109 | text-color: @onBackground; 110 | cursor: pointer; 111 | } 112 | element-text { 113 | /*font: "feather 16";*/ 114 | background-color: transparent; 115 | text-color: inherit; 116 | cursor: inherit; 117 | vertical-align: 0.5; 118 | horizontal-align: 0.5; 119 | } 120 | 121 | element normal.normal, 122 | element alternate.normal { 123 | background-color: @surface; 124 | text-color: @onSurface; 125 | } 126 | element normal.urgent, 127 | element alternate.urgent, 128 | element selected.active { 129 | background-color: @error; 130 | text-color: @onError; 131 | } 132 | element normal.active, 133 | element alternate.active, 134 | element selected.urgent { 135 | background-color: @primary; 136 | text-color: @onPrimary; 137 | } 138 | element selected.normal { 139 | background-color: @primaryContainer; 140 | text-color: @onPrimaryContainer; 141 | } 142 | -------------------------------------------------------------------------------- /hypr/menu/rofi/confirm.rasi: -------------------------------------------------------------------------------- 1 | 2 | /*****----- Configuration -----*****/ 3 | configuration { 4 | show-icons: false; 5 | } 6 | 7 | /*****----- Global Properties -----*****/ 8 | @import "shared/colors.rasi" 9 | @import "shared/fonts.rasi" 10 | 11 | /* 12 | USE_ICON=YES 13 | */ 14 | 15 | /*****----- Main Window -----*****/ 16 | window { 17 | transparency: "real"; 18 | location: center; 19 | anchor: center; 20 | fullscreen: false; 21 | width: 300px; 22 | x-offset: 0px; 23 | y-offset: 0px; 24 | margin: 0px; 25 | padding: 0px; 26 | border: 0px solid; 27 | border-radius: 10px; 28 | border-color: @primaryContainer; 29 | cursor: "default"; 30 | background-color: @background; 31 | } 32 | 33 | /*****----- Main Box -----*****/ 34 | mainbox { 35 | enabled: true; 36 | spacing: 10px; 37 | margin: 0px; 38 | padding: 30px; 39 | background-color: transparent; 40 | children: [ "message", "listview" ]; 41 | } 42 | 43 | /*****----- Inputbar -----*****/ 44 | inputbar { 45 | enabled: true; 46 | spacing: 10px; 47 | padding: 0px; 48 | border: 0px; 49 | border-radius: 0px; 50 | border-color: @primaryContainer; 51 | background-color: transparent; 52 | text-color: @onBackground; 53 | children: [ "textbox-prompt-colon", "prompt"]; 54 | } 55 | 56 | textbox-prompt-colon { 57 | enabled: true; 58 | expand: false; 59 | str: ""; 60 | padding: 10px 14px; 61 | border-radius: 100%; 62 | background-color: @primary; 63 | text-color: @onPrimary; 64 | } 65 | prompt { 66 | enabled: true; 67 | padding: 10px; 68 | border-radius: 20px; 69 | background-color: @primaryContainer; 70 | text-color: @onPrimaryContainer; 71 | } 72 | 73 | /*****----- Message -----*****/ 74 | message { 75 | enabled: true; 76 | margin: 0px; 77 | padding: 10px; 78 | border: 0px solid; 79 | border-radius: 8px; 80 | border-color: @primaryContainer; 81 | background-color: @surface; 82 | text-color: @onSurface; 83 | } 84 | textbox { 85 | background-color: inherit; 86 | text-color: inherit; 87 | vertical-align: 0.5; 88 | horizontal-align: 0.5; 89 | } 90 | 91 | /*****----- Listview -----*****/ 92 | listview { 93 | enabled: true; 94 | columns: 2; 95 | lines: 1; 96 | cycle: true; 97 | scrollbar: false; 98 | layout: vertical; 99 | 100 | spacing: 10px; 101 | background-color: transparent; 102 | cursor: "default"; 103 | } 104 | 105 | /*****----- Elements -----*****/ 106 | element { 107 | enabled: true; 108 | padding: 5px 10px; 109 | border: 0px solid; 110 | border-radius: 8px; 111 | border-color: @primaryContainer; 112 | background-color: transparent; 113 | text-color: @onBackground; 114 | cursor: pointer; 115 | } 116 | element-text { 117 | font: "feather 20"; 118 | background-color: transparent; 119 | text-color: inherit; 120 | cursor: inherit; 121 | vertical-align: 0.5; 122 | horizontal-align: 0.5; 123 | } 124 | 125 | element normal.normal, 126 | element alternate.normal { 127 | background-color: @surface; 128 | text-color: @onSurface; 129 | } 130 | element normal.urgent, 131 | element alternate.urgent, 132 | element selected.active { 133 | background-color: @error; 134 | text-color: @onError; 135 | } 136 | element normal.active, 137 | element alternate.active, 138 | element selected.urgent { 139 | background-color: @primary; 140 | text-color: @onPrimary; 141 | } 142 | element selected.normal { 143 | background-color: @primaryContainer; 144 | text-color: @onPrimaryContainer; 145 | } 146 | -------------------------------------------------------------------------------- /hypr/menu/rofi/powermenu.rasi: -------------------------------------------------------------------------------- 1 | 2 | /*****----- Configuration -----*****/ 3 | configuration { 4 | show-icons: false; 5 | } 6 | 7 | /*****----- Global Properties -----*****/ 8 | @import "shared/colors.rasi" 9 | @import "shared/fonts.rasi" 10 | 11 | /* 12 | USE_ICON=NO 13 | */ 14 | 15 | /*****----- Main Window -----*****/ 16 | window { 17 | transparency: "real"; 18 | location: center; 19 | anchor: center; 20 | fullscreen: false; 21 | width: 600px; 22 | x-offset: 0px; 23 | y-offset: 0px; 24 | margin: 0px; 25 | padding: 0px; 26 | border: 0px solid; 27 | border-radius: 12px; 28 | border-color: @primaryContainer; 29 | cursor: "default"; 30 | background-color: @background; 31 | } 32 | 33 | /*****----- Main Box -----*****/ 34 | mainbox { 35 | enabled: true; 36 | spacing: 10px; 37 | margin: 0px; 38 | padding: 30px; 39 | background-color: transparent; 40 | children: [ "inputbar", "message", "listview" ]; 41 | } 42 | 43 | /*****----- Inputbar -----*****/ 44 | inputbar { 45 | enabled: true; 46 | spacing: 10px; 47 | padding: 0px; 48 | border: 0px; 49 | border-radius: 0px; 50 | border-color: @primaryContainer; 51 | background-color: transparent; 52 | text-color: @onBackground; 53 | children: [ "textbox-prompt-colon", "prompt"]; 54 | } 55 | 56 | textbox-prompt-colon { 57 | enabled: true; 58 | expand: false; 59 | str: " "; 60 | padding: 10px 16px; 61 | border-radius: 12px; 62 | background-color: @primary; 63 | text-color: @background; 64 | text-align: center; 65 | } 66 | prompt { 67 | enabled: true; 68 | padding: 10px; 69 | border-radius: 12px; 70 | background-color: @primaryContainer; 71 | text-color: @background; 72 | } 73 | 74 | /*****----- Message -----*****/ 75 | message { 76 | enabled: true; 77 | margin: 0px; 78 | padding: 10px; 79 | border: 0px solid; 80 | border-radius: 12px; 81 | border-color: @primaryContainer; 82 | background-color: @surface; 83 | text-color: @onSurface; 84 | } 85 | textbox { 86 | background-color: inherit; 87 | text-color: inherit; 88 | vertical-align: 0.5; 89 | horizontal-align: 0.0; 90 | } 91 | 92 | /*****----- Listview -----*****/ 93 | listview { 94 | enabled: true; 95 | columns: 6; 96 | lines: 1; 97 | cycle: true; 98 | scrollbar: false; 99 | layout: vertical; 100 | 101 | spacing: 10px; 102 | background-color: transparent; 103 | cursor: "default"; 104 | } 105 | 106 | /*****----- Elements -----*****/ 107 | element { 108 | enabled: true; 109 | padding: 22px 10px; 110 | border: 0px solid; 111 | border-radius: 12px; 112 | border-color: @primaryContainer; 113 | background-color: transparent; 114 | text-color: @onBackground; 115 | cursor: pointer; 116 | } 117 | element-text { 118 | background-color: transparent; 119 | text-color: inherit; 120 | cursor: inherit; 121 | vertical-align: 0.5; 122 | horizontal-align: 0.5; 123 | } 124 | 125 | element normal.normal, 126 | element alternate.normal { 127 | background-color: @surface; 128 | text-color: @onSurface; 129 | } 130 | element normal.urgent, 131 | element alternate.urgent, 132 | element selected.active { 133 | background-color: @error; 134 | text-color: @onError; 135 | } 136 | element normal.active, 137 | element alternate.active, 138 | element selected.urgent { 139 | background-color: @primary; 140 | text-color: @onPrimary; 141 | } 142 | element selected.normal { 143 | background-color: @primaryContainer; 144 | text-color: @onPrimaryContainer; 145 | } 146 | -------------------------------------------------------------------------------- /hypr/menu/rofi/wifi.rasi: -------------------------------------------------------------------------------- 1 | 2 | /*****----- Configuration -----*****/ 3 | configuration { 4 | show-icons: false; 5 | } 6 | 7 | /*****----- Global Properties -----*****/ 8 | @import "shared/colors.rasi" 9 | @import "shared/fonts.rasi" 10 | 11 | /*****----- Main Window -----*****/ 12 | window { 13 | /* properties for window widget */ 14 | transparency: "real"; 15 | location: center; 16 | anchor: center; 17 | fullscreen: false; 18 | height: 490px; 19 | x-offset: 0px; 20 | y-offset: 0px; 21 | 22 | /* properties for all widgets */ 23 | enabled: true; 24 | margin: 0px; 25 | padding: 0px; 26 | border: 0px solid; 27 | border-radius: 12px; 28 | border-color: @primaryContainer; 29 | cursor: "default"; 30 | background-color: @background; 31 | } 32 | 33 | /*****----- Main Box -----*****/ 34 | mainbox { 35 | enabled: true; 36 | spacing: 10px; 37 | margin: 0px; 38 | padding: 20px; 39 | border: 0px solid; 40 | border-radius: 0px 0px 0px 0px; 41 | border-color: @primaryContainer; 42 | background-color: transparent; 43 | children: [ "inputbar", "message", "listview" ]; 44 | } 45 | 46 | /*****----- Inputbar -----*****/ 47 | inputbar { 48 | enabled: true; 49 | spacing: 10px; 50 | margin: 0px; 51 | padding: 0px 10px 0px 5px; 52 | border: 0px solid; 53 | border-radius: 0px; 54 | border-color: @primaryContainer; 55 | background-color: transparent; 56 | text-color: @onBackground; 57 | children: [ "prompt", "entry" ]; 58 | } 59 | 60 | prompt { 61 | enabled: true; 62 | padding: 8px; 63 | border-radius: 12px; 64 | text-align: center; 65 | background-color: @primaryContainer; 66 | text-color: @onPrimaryContainer; 67 | } 68 | 69 | entry { 70 | enabled: true; 71 | padding: 8px 12px; 72 | border-radius: 12px; 73 | background-color: @surface; 74 | text-color: inherit; 75 | cursor: text; 76 | placeholder: "search wifi by name"; 77 | placeholder-color: inherit; 78 | } 79 | 80 | /*****----- Listview -----*****/ 81 | listview { 82 | enabled: true; 83 | columns: 1; 84 | lines: 6; 85 | cycle: true; 86 | dynamic: true; 87 | scrollbar: true; 88 | layout: vertical; 89 | reverse: false; 90 | fixed-height: true; 91 | fixed-columns: true; 92 | 93 | spacing: 5px; 94 | margin: 0px; 95 | padding: 0px; 96 | border: 0px solid; 97 | border-radius: 0px; 98 | border-color: @primaryContainer; 99 | background-color: transparent; 100 | text-color: @onBackground; 101 | cursor: "default"; 102 | } 103 | scrollbar { 104 | handle-width: 5px ; 105 | handle-color: @primaryContainer; 106 | border-radius: 10px; 107 | background-color: @surface; 108 | } 109 | 110 | /*****----- Elements -----*****/ 111 | element { 112 | enabled: true; 113 | spacing: 0px; 114 | margin: 0px; 115 | padding: 8px; 116 | border: 0px solid; 117 | border-radius: 12px; 118 | border-color: @primaryContainer; 119 | background-color: transparent; 120 | text-color: @onBackground; 121 | cursor: pointer; 122 | } 123 | element normal.normal { 124 | background-color: @background; 125 | text-color: @onBackground; 126 | } 127 | element normal.urgent { 128 | background-color: @error; 129 | text-color: @onError; 130 | } 131 | element normal.active { 132 | background-color: @primary; 133 | text-color: @onPrimary; 134 | } 135 | element selected.normal { 136 | background-color: @primaryContainer; 137 | text-color: @onPrimaryContainer; 138 | } 139 | element selected.urgent { 140 | background-color: @error; 141 | text-color: @onError; 142 | } 143 | element selected.active { 144 | background-color: @primary; 145 | text-color: @onPrimary; 146 | } 147 | element alternate.normal { 148 | background-color: @surface; 149 | text-color: @onSurface; 150 | } 151 | element alternate.urgent { 152 | background-color: @error; 153 | text-color: @onError; 154 | } 155 | element alternate.active { 156 | background-color: @primary; 157 | text-color: @onPrimary; 158 | } 159 | element-icon { 160 | background-color: transparent; 161 | text-color: inherit; 162 | size: 20px; 163 | cursor: inherit; 164 | } 165 | element-text { 166 | background-color: transparent; 167 | text-color: inherit; 168 | highlight: inherit; 169 | cursor: inherit; 170 | vertical-align: 0.5; 171 | horizontal-align: 0.0; 172 | } 173 | 174 | /*****----- Message -----*****/ 175 | message { 176 | enabled: true; 177 | margin: 0px; 178 | padding: 8px 10px; 179 | border: 0px solid; 180 | border-radius: 8px; 181 | border-color: @primaryContainer; 182 | background-color: @surface; 183 | text-color: @onBackground; 184 | } 185 | textbox { 186 | border: 0px solid; 187 | border-color: @primaryContainer; 188 | background-color: transparent; 189 | text-color: @onBackground; 190 | vertical-align: 0.5; 191 | horizontal-align: 0.0; 192 | highlight: none; 193 | placeholder-color: @onBackground; 194 | blink: true; 195 | markup: true; 196 | } 197 | error-message { 198 | padding: 15px; 199 | border: 0px solid; 200 | border-radius: 10px; 201 | border-color: @primaryContainer; 202 | background-color: @background; 203 | text-color: @onBackground; 204 | } 205 | -------------------------------------------------------------------------------- /hypr/menu/rofi/clipbord.rasi: -------------------------------------------------------------------------------- 1 | 2 | /*****----- Global Properties -----*****/ 3 | @import "shared/colors.rasi" 4 | @import "shared/fonts.rasi" 5 | 6 | /*****----- Main Window -----*****/ 7 | window { 8 | /* properties for window widget */ 9 | transparency: "real"; 10 | location: center; 11 | anchor: center; 12 | fullscreen: false; 13 | width: 800px; 14 | x-offset: 0px; 15 | y-offset: 0px; 16 | 17 | /* properties for all widgets */ 18 | enabled: true; 19 | margin: 0px; 20 | padding: 0px; 21 | border: 0px solid; 22 | border-radius: 10px; 23 | border-color: @primaryContainer; 24 | cursor: "default"; 25 | background-color: @background; 26 | } 27 | 28 | /*****----- Main Box -----*****/ 29 | mainbox { 30 | enabled: true; 31 | spacing: 10px; 32 | margin: 0px; 33 | padding: 30px; 34 | border: 0px solid; 35 | border-radius: 0px 0px 0px 0px; 36 | border-color: @primaryContainer; 37 | background-color: transparent; 38 | children: [ "inputbar", "message", "listview" ]; 39 | } 40 | 41 | /*****----- Inputbar -----*****/ 42 | inputbar { 43 | enabled: true; 44 | spacing: 10px; 45 | margin: 0px; 46 | padding: 0px; 47 | border: 0px solid; 48 | border-radius: 0px; 49 | border-color: @primaryContainer; 50 | background-color: transparent; 51 | text-color: @onBackground; 52 | children: [ "textbox-prompt-colon", "entry" ]; 53 | } 54 | 55 | prompt { 56 | enabled: true; 57 | background-color: inherit; 58 | text-color: inherit; 59 | } 60 | textbox-prompt-colon { 61 | enabled: true; 62 | padding: 5px 0px; 63 | expand: false; 64 | str: "  "; 65 | background-color: inherit; 66 | text-color: inherit; 67 | } 68 | entry { 69 | enabled: true; 70 | padding: 5px 0px; 71 | background-color: inherit; 72 | text-color: inherit; 73 | cursor: text; 74 | placeholder: "Select Histories..."; 75 | placeholder-color: inherit; 76 | } 77 | num-filtered-rows { 78 | enabled: true; 79 | expand: false; 80 | background-color: inherit; 81 | text-color: inherit; 82 | } 83 | textbox-num-sep { 84 | enabled: true; 85 | expand: false; 86 | str: "/"; 87 | background-color: inherit; 88 | text-color: inherit; 89 | } 90 | num-rows { 91 | enabled: true; 92 | expand: false; 93 | background-color: inherit; 94 | text-color: inherit; 95 | } 96 | case-indicator { 97 | enabled: true; 98 | background-color: inherit; 99 | text-color: inherit; 100 | } 101 | 102 | /*****----- Listview -----*****/ 103 | listview { 104 | enabled: true; 105 | columns: 1; 106 | lines: 6; 107 | cycle: false; 108 | dynamic: true; 109 | scrollbar: false; 110 | layout: vertical; 111 | reverse: false; 112 | fixed-height: true; 113 | fixed-columns: true; 114 | 115 | spacing: 5px; 116 | margin: 0px; 117 | padding: 0px; 118 | border: 0px solid; 119 | border-radius: 0px; 120 | border-color: @primaryContainer; 121 | background-color: transparent; 122 | text-color: @onBackground; 123 | cursor: "default"; 124 | } 125 | scrollbar { 126 | handle-width: 5px ; 127 | handle-color: @surface; 128 | border-radius: 10px; 129 | background-color: @surface; 130 | } 131 | 132 | /*****----- Elements -----*****/ 133 | element { 134 | enabled: true; 135 | spacing: 10px; 136 | margin: 0px; 137 | padding: 6px; 138 | border: 0px solid; 139 | border-radius: 8px; 140 | border-color: @primaryContainer; 141 | background-color: transparent; 142 | text-color: @onBackground; 143 | cursor: pointer; 144 | } 145 | element normal.normal { 146 | background-color: @background; 147 | text-color: @onBackground; 148 | } 149 | element normal.urgent { 150 | background-color: @error; 151 | text-color: @onError; 152 | } 153 | element normal.active { 154 | background-color: @primary; 155 | text-color: @onPrimary; 156 | } 157 | element selected.normal { 158 | background-color: @primaryContainer; 159 | text-color: @onPrimaryContainer; 160 | } 161 | element selected.urgent { 162 | background-color: @error; 163 | text-color: @onError; 164 | } 165 | element selected.active { 166 | background-color: @primary; 167 | text-color: @onPrimary; 168 | } 169 | element alternate.normal { 170 | background-color: @surface; 171 | text-color: @onSurface; 172 | } 173 | element alternate.urgent { 174 | background-color: @error; 175 | text-color: @onError; 176 | } 177 | element alternate.active { 178 | background-color: @primary; 179 | text-color: @onPrimary; 180 | } 181 | element-icon { 182 | background-color: transparent; 183 | text-color: inherit; 184 | size: 24px; 185 | cursor: inherit; 186 | } 187 | element-text { 188 | background-color: transparent; 189 | text-color: inherit; 190 | highlight: inherit; 191 | cursor: inherit; 192 | vertical-align: 0.5; 193 | horizontal-align: 0.0; 194 | } 195 | 196 | /*****----- Mode Switcher -----*****/ 197 | mode-switcher{ 198 | enabled: true; 199 | spacing: 10px; 200 | margin: 0px; 201 | padding: 0px; 202 | border: 0px solid; 203 | border-radius: 0px; 204 | border-color: @primaryContainer; 205 | background-color: transparent; 206 | text-color: @onBackground; 207 | } 208 | button { 209 | padding: 5px 10px; 210 | border: 0px solid; 211 | border-radius: 8px; 212 | border-color: @primary; 213 | background-color: @surface; 214 | text-color: inherit; 215 | cursor: pointer; 216 | } 217 | button selected { 218 | background-color: @primaryContainer; 219 | text-color: @onPrimaryContainer; 220 | } 221 | 222 | /*****----- Message -----*****/ 223 | message { 224 | enabled: true; 225 | margin: 0px; 226 | padding: 8px 10px; 227 | border: 0px solid; 228 | border-radius: 8px; 229 | border-color: @primaryContainer; 230 | background-color: @surface; 231 | text-color: @onSurface; 232 | } 233 | textbox { 234 | border: 0px solid; 235 | border-color: @primaryContainer; 236 | background-color: transparent; 237 | text-color: @onBackground; 238 | vertical-align: 0.5; 239 | horizontal-align: 0.0; 240 | highlight: none; 241 | placeholder-color: @onBackground; 242 | blink: true; 243 | markup: true; 244 | } 245 | error-message { 246 | padding: 15px; 247 | border: 0px solid; 248 | border-radius: 10px; 249 | border-color: @primaryContainer; 250 | background-color: @background; 251 | text-color: @onBackground; 252 | } 253 | -------------------------------------------------------------------------------- /hypr/menu/rofi/runner.rasi: -------------------------------------------------------------------------------- 1 | 2 | /*****----- Configuration -----*****/ 3 | configuration { 4 | modi: "run"; 5 | show-icons: true; 6 | display-drun: ""; 7 | display-run: ""; 8 | display-filebrowser: ""; 9 | display-window: ""; 10 | drun-display-format: "{name}"; 11 | window-format: "{w} · {c} · {t}"; 12 | } 13 | 14 | /*****----- Global Properties -----*****/ 15 | @import "shared/colors.rasi" 16 | @import "shared/fonts.rasi" 17 | 18 | /*****----- Main Window -----*****/ 19 | window { 20 | /* properties for window widget */ 21 | transparency: "real"; 22 | location: center; 23 | anchor: center; 24 | fullscreen: false; 25 | width: 500px; 26 | x-offset: 0px; 27 | y-offset: 0px; 28 | 29 | /* properties for all widgets */ 30 | enabled: true; 31 | margin: 0px; 32 | padding: 0px; 33 | border: 0px solid; 34 | border-radius: 12px; 35 | border-color: @primaryContainer; 36 | cursor: "default"; 37 | background-color: @background; 38 | } 39 | 40 | /*****----- Main Box -----*****/ 41 | mainbox { 42 | enabled: true; 43 | spacing: 10px; 44 | margin: 0px; 45 | padding: 30px; 46 | border: 0px solid; 47 | border-radius: 0px 0px 0px 0px; 48 | border-color: @primaryContainer; 49 | background-color: transparent; 50 | children: [ "inputbar", "message", "listview" ]; 51 | } 52 | 53 | /*****----- Inputbar -----*****/ 54 | inputbar { 55 | enabled: true; 56 | spacing: 10px; 57 | margin: 0px; 58 | padding: 0px; 59 | border: 0px solid; 60 | border-radius: 0px; 61 | border-color: @primaryContainer; 62 | background-color: transparent; 63 | text-color: @onBackground; 64 | children: [ "textbox-prompt-colon", "entry" ]; 65 | } 66 | 67 | prompt { 68 | enabled: true; 69 | background-color: inherit; 70 | text-color: inherit; 71 | } 72 | textbox-prompt-colon { 73 | enabled: true; 74 | padding: 5px 0px; 75 | expand: false; 76 | str: " "; 77 | background-color: inherit; 78 | text-color: inherit; 79 | } 80 | entry { 81 | enabled: true; 82 | padding: 5px 0px; 83 | background-color: inherit; 84 | text-color: inherit; 85 | cursor: text; 86 | placeholder: "Run..."; 87 | placeholder-color: inherit; 88 | } 89 | num-filtered-rows { 90 | enabled: true; 91 | expand: false; 92 | background-color: inherit; 93 | text-color: inherit; 94 | } 95 | textbox-num-sep { 96 | enabled: true; 97 | expand: false; 98 | str: "/"; 99 | background-color: inherit; 100 | text-color: inherit; 101 | } 102 | num-rows { 103 | enabled: true; 104 | expand: false; 105 | background-color: inherit; 106 | text-color: inherit; 107 | } 108 | case-indicator { 109 | enabled: true; 110 | background-color: inherit; 111 | text-color: inherit; 112 | } 113 | 114 | /*****----- Listview -----*****/ 115 | listview { 116 | enabled: true; 117 | columns: 1; 118 | lines: 6; 119 | cycle: true; 120 | dynamic: true; 121 | scrollbar: false; 122 | layout: vertical; 123 | reverse: false; 124 | fixed-height: true; 125 | fixed-columns: true; 126 | 127 | spacing: 5px; 128 | margin: 0px; 129 | padding: 0px; 130 | border: 0px solid; 131 | border-radius: 0px; 132 | border-color: @primaryContainer; 133 | background-color: transparent; 134 | text-color: @onBackground; 135 | cursor: "default"; 136 | } 137 | scrollbar { 138 | handle-width: 5px ; 139 | handle-color: @primaryContainer; 140 | border-radius: 10px; 141 | background-color: @surface; 142 | } 143 | 144 | /*****----- Elements -----*****/ 145 | element { 146 | enabled: true; 147 | spacing: 10px; 148 | margin: 0px; 149 | padding: 6px; 150 | border: 0px solid; 151 | border-radius: 8px; 152 | border-color: @primaryContainer; 153 | background-color: transparent; 154 | text-color: @onBackground; 155 | cursor: pointer; 156 | } 157 | element normal.normal { 158 | background-color: @background; 159 | text-color: @onBackground; 160 | } 161 | element normal.urgent { 162 | background-color: @error; 163 | text-color: @onError; 164 | } 165 | element normal.active { 166 | background-color: @primary; 167 | text-color: @onPrimary; 168 | } 169 | element selected.normal { 170 | background-color: @primaryContainer; 171 | text-color: @onPrimaryContainer; 172 | } 173 | element selected.urgent { 174 | background-color: @error; 175 | text-color: @onError; 176 | } 177 | element selected.active { 178 | background-color: @primary; 179 | text-color: @onPrimary; 180 | } 181 | element alternate.normal { 182 | background-color: @surface; 183 | text-color: @onSurface; 184 | } 185 | element alternate.urgent { 186 | background-color: @error; 187 | text-color: @onError; 188 | } 189 | element alternate.active { 190 | background-color: @primary; 191 | text-color: @onPrimary; 192 | } 193 | element-icon { 194 | background-color: transparent; 195 | text-color: inherit; 196 | size: 24px; 197 | cursor: inherit; 198 | } 199 | element-text { 200 | background-color: transparent; 201 | text-color: inherit; 202 | highlight: inherit; 203 | cursor: inherit; 204 | vertical-align: 0.5; 205 | horizontal-align: 0.0; 206 | } 207 | 208 | /*****----- Mode Switcher -----*****/ 209 | mode-switcher{ 210 | enabled: true; 211 | spacing: 10px; 212 | margin: 0px; 213 | padding: 0px; 214 | border: 0px solid; 215 | border-radius: 0px; 216 | border-color: @primaryContainer; 217 | background-color: transparent; 218 | text-color: @onBackground; 219 | } 220 | button { 221 | padding: 5px 10px; 222 | border: 0px solid; 223 | border-radius: 8px; 224 | border-color: @primaryContainer; 225 | background-color: @surface; 226 | text-color: inherit; 227 | cursor: pointer; 228 | } 229 | button selected { 230 | background-color: @primaryContainer; 231 | text-color: @onPrimaryContainer; 232 | } 233 | 234 | /*****----- Message -----*****/ 235 | message { 236 | enabled: true; 237 | margin: 0px; 238 | padding: 8px 10px; 239 | border: 0px solid; 240 | border-radius: 8px; 241 | border-color: @primaryContainer; 242 | background-color: @surface; 243 | text-color: @onBackground; 244 | } 245 | textbox { 246 | border: 0px solid; 247 | border-color: @primaryContainer; 248 | background-color: transparent; 249 | text-color: @onBackground; 250 | vertical-align: 0.5; 251 | horizontal-align: 0.0; 252 | highlight: none; 253 | placeholder-color: @onBackground; 254 | blink: true; 255 | markup: true; 256 | } 257 | error-message { 258 | padding: 15px; 259 | border: 0px solid; 260 | border-radius: 10px; 261 | border-color: @primaryContainer; 262 | background-color: @background; 263 | text-color: @onBackground; 264 | } 265 | -------------------------------------------------------------------------------- /hypr/menu/rofi/launcher.rasi: -------------------------------------------------------------------------------- 1 | 2 | /*****----- Configuration -----*****/ 3 | configuration { 4 | modi: "drun,run,filebrowser,window"; 5 | show-icons: true; 6 | display-drun: " "; 7 | display-run: " "; 8 | display-filebrowser: " "; 9 | display-window: " "; 10 | drun-display-format: "{name}"; 11 | window-format: "{c} · {t}"; 12 | } 13 | 14 | /*****----- Global Properties -----*****/ 15 | @import "shared/colors.rasi" 16 | @import "shared/fonts.rasi" 17 | 18 | /*****----- Main Window -----*****/ 19 | window { 20 | /* properties for window widget */ 21 | transparency: "real"; 22 | location: center; 23 | anchor: center; 24 | fullscreen: false; 25 | width: 600px; 26 | x-offset: 0px; 27 | y-offset: 0px; 28 | 29 | /* properties for all widgets */ 30 | enabled: true; 31 | margin: 0px; 32 | padding: 0px; 33 | border: 0px solid; 34 | border-radius: 12px; 35 | border-color: @primaryContainer; 36 | cursor: "default"; 37 | background-color: @background; 38 | } 39 | 40 | /*****----- Main Box -----*****/ 41 | mainbox { 42 | enabled: true; 43 | spacing: 10px; 44 | margin: 0px; 45 | padding: 30px; 46 | border: 0px solid; 47 | border-radius: 0px 0px 0px 0px; 48 | border-color: @primaryContainer; 49 | background-color: transparent; 50 | children: [ "inputbar", "message", "listview" ]; 51 | } 52 | 53 | /*****----- Inputbar -----*****/ 54 | inputbar { 55 | enabled: true; 56 | spacing: 10px; 57 | margin: 0px; 58 | padding: 0px; 59 | border: 0px solid; 60 | border-radius: 0px; 61 | border-color: @primaryContainer; 62 | background-color: transparent; 63 | text-color: @onBackground; 64 | children: [ "textbox-prompt-colon", "entry", "mode-switcher" ]; 65 | } 66 | 67 | prompt { 68 | enabled: true; 69 | background-color: inherit; 70 | text-color: inherit; 71 | } 72 | textbox-prompt-colon { 73 | enabled: true; 74 | padding: 8px 0px; 75 | expand: false; 76 | str: " "; 77 | background-color: inherit; 78 | text-color: inherit; 79 | } 80 | entry { 81 | enabled: true; 82 | padding: 8px; 83 | background-color: inherit; 84 | text-color: inherit; 85 | cursor: text; 86 | placeholder: "Search..."; 87 | placeholder-color: inherit; 88 | } 89 | num-filtered-rows { 90 | enabled: true; 91 | expand: false; 92 | background-color: inherit; 93 | text-color: inherit; 94 | } 95 | textbox-num-sep { 96 | enabled: true; 97 | expand: false; 98 | str: "/"; 99 | background-color: inherit; 100 | text-color: inherit; 101 | } 102 | num-rows { 103 | enabled: true; 104 | expand: false; 105 | background-color: inherit; 106 | text-color: inherit; 107 | } 108 | case-indicator { 109 | enabled: true; 110 | background-color: inherit; 111 | text-color: inherit; 112 | } 113 | 114 | /*****----- Listview -----*****/ 115 | listview { 116 | enabled: true; 117 | columns: 1; 118 | lines: 8; 119 | cycle: true; 120 | dynamic: true; 121 | scrollbar: true; 122 | layout: vertical; 123 | reverse: false; 124 | fixed-height: true; 125 | fixed-columns: true; 126 | 127 | spacing: 5px; 128 | margin: 0px; 129 | padding: 0px; 130 | border: 0px solid; 131 | border-radius: 0px; 132 | border-color: @primaryContainer; 133 | background-color: transparent; 134 | text-color: @onBackground; 135 | cursor: "default"; 136 | } 137 | scrollbar { 138 | handle-width: 5px ; 139 | handle-color: @primaryContainer; 140 | border-radius: 10px; 141 | background-color: @surface; 142 | } 143 | 144 | /*****----- Elements -----*****/ 145 | element { 146 | enabled: true; 147 | spacing: 10px; 148 | margin: 0px; 149 | padding: 6px 6px 6px 12px; 150 | border: 0px solid; 151 | border-radius: 8px; 152 | border-color: @primaryContainer; 153 | background-color: transparent; 154 | text-color: @onBackground; 155 | cursor: pointer; 156 | } 157 | element normal.normal { 158 | background-color: @background; 159 | text-color: @onBackground; 160 | } 161 | element normal.urgent { 162 | background-color: @error; 163 | text-color: @onError; 164 | } 165 | element normal.active { 166 | background-color: @primary; 167 | text-color: @onPrimary; 168 | } 169 | element selected.normal { 170 | background-color: @primaryContainer; 171 | text-color: @onPrimaryContainer; 172 | } 173 | element selected.urgent { 174 | background-color: @error; 175 | text-color: @onError; 176 | } 177 | element selected.active { 178 | background-color: @primary; 179 | text-color: @onPrimary; 180 | } 181 | element alternate.normal { 182 | background-color: @surface; 183 | text-color: @onSurface; 184 | } 185 | element alternate.urgent { 186 | background-color: @error; 187 | text-color: @onError; 188 | } 189 | element alternate.active { 190 | background-color: @primary; 191 | text-color: @onError; 192 | } 193 | element-icon { 194 | background-color: transparent; 195 | text-color: inherit; 196 | size: 24px; 197 | cursor: inherit; 198 | } 199 | element-text { 200 | background-color: transparent; 201 | text-color: inherit; 202 | highlight: inherit; 203 | cursor: inherit; 204 | vertical-align: 0.5; 205 | horizontal-align: 0.0; 206 | } 207 | 208 | /*****----- Mode Switcher -----*****/ 209 | mode-switcher{ 210 | enabled: true; 211 | spacing: 10px; 212 | margin: 0px; 213 | padding: 0px; 214 | border: 0px solid; 215 | border-radius: 0px; 216 | border-color: @primaryContainer; 217 | background-color: transparent; 218 | text-color: @onBackground; 219 | } 220 | button { 221 | padding: 8px 16px; 222 | border: 0px solid; 223 | border-radius: 4px; 224 | border-color: @primaryContainer; 225 | background-color: @surface; 226 | text-color: inherit; 227 | text-align: center; 228 | cursor: pointer; 229 | } 230 | button selected { 231 | background-color: @primaryContainer; 232 | text-color: @onPrimaryContainer; 233 | } 234 | 235 | /*****----- Message -----*****/ 236 | message { 237 | enabled: true; 238 | margin: 0px; 239 | padding: 8px 12px; 240 | border: 0px solid; 241 | border-radius: 8px; 242 | border-color: @primaryContainer; 243 | background-color: @surface; 244 | text-color: @onSurface; 245 | } 246 | textbox { 247 | border: 0px solid; 248 | border-color: @primaryContainer; 249 | background-color: transparent; 250 | text-color: @onBackground; 251 | vertical-align: 0.5; 252 | horizontal-align: 0.0; 253 | highlight: none; 254 | placeholder-color: @onBackground; 255 | blink: true; 256 | markup: true; 257 | } 258 | error-message { 259 | padding: 15px; 260 | border: 0px solid; 261 | border-radius: 10px; 262 | border-color: @primaryContainer; 263 | background-color: @background; 264 | text-color: @onBackground; 265 | } 266 | -------------------------------------------------------------------------------- /hypr/custom/apply.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## Copyright (C) 2023 Ticks 4 | 5 | HYPRDIR="${HOME}/.config/hypr" 6 | THEME_DIR="${HYPRDIR}/custom" 7 | 8 | if [[ ! -f "${THEME_DIR}/system.sh" ]]; then 9 | echo "${THEME_DIR}/system.sh not found" 10 | exit 1 11 | fi 12 | if [[ ! -f "${THEME_DIR}/color.sh" ]]; then 13 | echo "${THEME_DIR}/color.sh not found" 14 | exit 1 15 | fi 16 | if [[ ! -f "${THEME_DIR}/theme.sh" ]]; then 17 | echo "${THEME_DIR}/theme.sh not found" 18 | exit 1 19 | fi 20 | 21 | source ${THEME_DIR}/system.sh 22 | source ${THEME_DIR}/color.sh 23 | source ${THEME_DIR}/theme.sh 24 | 25 | PATH_CONF="${HOME}/.config" 26 | PATH_BAR="${HYPRDIR}/bar/waybar" 27 | PATH_TERM="${HYPRDIR}/term/alacritty" 28 | PATH_MENU="${HYPRDIR}/menu/rofi" 29 | PATH_NOTIFY="${HYPRDIR}/notification/dunst" 30 | 31 | wallpaper_path="$(echo ${wallpaper_path} | sed -e "s|^~\(.*\)|${HOME}\1|g")" 32 | 33 | if [[ ! -f "${wallpaper_path}" ]]; then 34 | echo "${wallpaper_path} not found" 35 | auto_color="false" 36 | fi 37 | 38 | get_color_cmd() { 39 | echo "get color from image: ${wallpaper_path} -> ${THEME_DIR}/color.sh" 40 | if [[ "${color_scheme}" == "light" ]]; then 41 | ${HYPRDIR}/scripts/md-color -f "${wallpaper_path}" -o "${THEME_DIR}/color.sh" 42 | else 43 | ${HYPRDIR}/scripts/md-color -f "${wallpaper_path}" -o "${THEME_DIR}/color.sh" --dark 44 | fi 45 | sed -i -E "s|=#(.{6})|=\"\1\"|g" ${THEME_DIR}/color.sh 46 | source ${THEME_DIR}/color.sh 47 | } 48 | 49 | apply_wallpaper() { 50 | sed -i -e "s@preload=.*@preload=${wallpaper_path}@g" ${HYPRDIR}/hyprpaper.conf 51 | sed -i -e "s@\(wallpaper=[^,]*\),.*@\1,${wallpaper_path}@g" ${HYPRDIR}/hyprpaper.conf 52 | } 53 | 54 | apply_bar() { 55 | cat >${PATH_BAR}/color.css <<-EOF 56 | @define-color background #${background}; 57 | @define-color onBackground #${onBackground}; 58 | 59 | @define-color primary #${primary}; 60 | @define-color secondary #${secondary}; 61 | @define-color tertiary #${tertiary}; 62 | @define-color error #${error}; 63 | @define-color primaryContainer #${primaryContainer}; 64 | @define-color secondaryContainer #${secondaryContainer}; 65 | @define-color tertiaryContainer #${tertiaryContainer}; 66 | @define-color errorContainer #${errorContainer}; 67 | @define-color surfaceDim #${surfaceDim}; 68 | @define-color surface #${surface}; 69 | @define-color surfaceBright #${surfaceBright}; 70 | @define-color surfaceContainer #${surfaceContainer}; 71 | @define-color outline #${outline}; 72 | @define-color shadow #${shadow}; 73 | @define-color inversePrimary #${inversePrimary}; 74 | @define-color inverseSurface #${inverseSurface}; 75 | 76 | @define-color onPrimary #${onPrimary}; 77 | @define-color onSecondary #${onSecondary}; 78 | @define-color onTertiary #${onTertiary}; 79 | @define-color onError #${onError}; 80 | @define-color onPrimaryContainer #${onPrimaryContainer}; 81 | @define-color onSecondaryContainer #${onSecondaryContainer}; 82 | @define-color onTertiaryContainer #${onTertiaryContainer}; 83 | @define-color onErrorContainer #${onErrorContainer}; 84 | @define-color onSurface #${onSurface}; 85 | @define-color scrim #${scrim}; 86 | EOF 87 | } 88 | 89 | apply_menu() { 90 | sed -i -e "s@font:.*@font: \"${menu_font}\";@g" ${PATH_MENU}/shared/fonts.rasi 91 | cat >${PATH_MENU}/shared/colors.rasi <<-EOF 92 | * { 93 | background: #${background}; 94 | surface: #${surface}; 95 | onSurface: #${onSurface}; 96 | onBackground: #${onBackground}; 97 | primaryContainer: #${primaryContainer}; 98 | onPrimaryContainer: #${onPrimaryContainer}; 99 | primary: #${primary}; 100 | onPrimary: #${onPrimary}; 101 | error: #${error}; 102 | onError: #${onError}; 103 | } 104 | EOF 105 | } 106 | 107 | apply_terminal() { 108 | sed -i ${PATH_TERM}/fonts.toml \ 109 | -e "s@family=.*@family=\"${term_font}\"@g" \ 110 | -e "s@size=.*@size=${term_font_size}@g" 111 | 112 | cat >${PATH_TERM}/colors.toml <<-_EOF_ 113 | # Default colors 114 | [colors.primary] 115 | background="#${background}" 116 | foreground="#${onBackground}" 117 | dim_foreground="#${onSurface}" 118 | bright_foreground="#${onSurface}" 119 | 120 | # Cursor colors 121 | [colors.cursor] 122 | text="#${background}" 123 | cursor="#${onBackground}" 124 | 125 | [colors.vi_mode_cursor] 126 | text="#${background}" 127 | cursor="#${onBackground}" 128 | 129 | # Search colors 130 | [colors.search] 131 | matches.foreground="#${onSurface}" 132 | matches.background="#${surfaceContainer}" 133 | focused_match.foreground="#${surfaceContainer}" 134 | focused_match.background="#${onSurface}" 135 | 136 | [colors.footer_bar] 137 | foreground="#${onBackground}" 138 | background="#${background}" 139 | 140 | # Selection colors 141 | [colors.selection] 142 | text="#${background}" 143 | background="#${onBackground}" 144 | 145 | # Normal colors 146 | [colors.normal] 147 | black="#11111b" 148 | red="#d20f39" 149 | green="#40a02b" 150 | yellow="#df8e1d" 151 | blue="#1e66f5" 152 | magenta="#8839ef" 153 | cyan="#9ca0b0" 154 | white="#eff1f5" 155 | 156 | # Bright colors 157 | [colors.bright] 158 | black="#11111b" 159 | red="#d20f39" 160 | green="#40a02b" 161 | yellow="#df8e1d" 162 | blue="#1e66f5" 163 | magenta="#8839ef" 164 | cyan="#9ca0b0" 165 | white="#eff1f5" 166 | 167 | # Dim colors 168 | [colors.dim] 169 | black="#11111b" 170 | red="#d20f39" 171 | green="#40a02b" 172 | yellow="#df8e1d" 173 | blue="#1e66f5" 174 | magenta="#8839ef" 175 | cyan="#9ca0b0" 176 | white="#eff1f5" 177 | _EOF_ 178 | } 179 | 180 | apply_gtk() { 181 | local XFILE="${HYPRDIR}/xsettingsd" 182 | local GTK2FILE="${HOME}/.gtkrc-2.0" 183 | local GTK3FILE="${PATH_CONF}/gtk-3.0/settings.ini" 184 | 185 | sed -i -e "s|Net/ThemeName .*|Net/ThemeName \"$gtk_theme\"|g" ${XFILE} 186 | sed -i -e "s|Net/IconThemeName .*|Net/IconThemeName \"$gtk_icon_theme\"|g" ${XFILE} 187 | sed -i -e "s|Gtk/CursorThemeName .*|Gtk/CursorThemeName \"$cursor_theme\"|g" ${XFILE} 188 | 189 | sed -i -e "s|gtk-font-name=.*|gtk-font-name=\"$gtk_font\"|g" ${GTK2FILE} 190 | sed -i -e "s|gtk-theme-name=.*|gtk-theme-name=\"$gtk_theme\"|g" ${GTK2FILE} 191 | sed -i -e "s|gtk-icon-theme-name=.*|gtk-icon-theme-name=\"$gtk_icon_theme\"|g" ${GTK2FILE} 192 | sed -i -e "s|gtk-cursor-theme-name=.*|gtk-cursor-theme-name=\"$cursor_theme\"|g" ${GTK2FILE} 193 | 194 | sed -i -e "s|gtk-font-name=.*|gtk-font-name=$gtk_font|g" ${GTK3FILE} 195 | sed -i -e "s|gtk-theme-name=.*|gtk-theme-name=$gtk_theme|g" ${GTK3FILE} 196 | sed -i -e "s|gtk-icon-theme-name=.*|gtk-icon-theme-name=$gtk_icon_theme|g" ${GTK3FILE} 197 | sed -i -e "s|gtk-cursor-theme-name=.*|gtk-cursor-theme-name=$cursor_theme|g" ${GTK3FILE} 198 | } 199 | 200 | apply_notifyd() { 201 | sed -i ${PATH_NOTIFY}/dunstrc \ 202 | -e "s/width = .*/width = $notify_width/g" \ 203 | -e "s/height = .*/height = $notify_height/g" \ 204 | -e "s/font = .*/font = $notify_font/g" \ 205 | -e "s/frame_width = .*/frame_width = $notify_border/g" 206 | 207 | sed -i '/urgency_low/Q' ${PATH_NOTIFY}/dunstrc 208 | cat >>${PATH_NOTIFY}/dunstrc <<-_EOF_ 209 | [urgency_low] 210 | timeout = 2 211 | background = "#${background}" 212 | foreground = "#${onBackground}" 213 | frame_color = "#${surfaceContainer}" 214 | 215 | [urgency_normal] 216 | timeout = 5 217 | background = "#${background}" 218 | foreground = "#${onBackground}" 219 | frame_color = "#${surfaceContainer}" 220 | 221 | [urgency_critical] 222 | timeout = 0 223 | background = "#${error}" 224 | foreground = "#${onError}" 225 | frame_color = "#${surfaceContainer}" 226 | _EOF_ 227 | } 228 | 229 | apply_wm() { 230 | sed -i ${HYPRDIR}/hyprland.conf \ 231 | -e "s@\$hypr_border[ ]*=.*@\$hypr_border = ${hypr_border}@g" \ 232 | -e "s@\$hypr_gap_in[ ]*=.*@\$hypr_gap_in = ${hypr_gap_in}@g" \ 233 | -e "s@\$hypr_gap_out[ ]*=.*@\$hypr_gap_out = ${hypr_gap_out}@g" \ 234 | -e "s@\$hypr_radius[ ]*=.*@\$hypr_radius = ${hypr_radius}@g" \ 235 | -e "s@\$hypr_shadow_enable[ ]*=.*@\$hypr_shadow_enable = ${hypr_shadow_enable}@g" \ 236 | -e "s@\$hypr_shadow_range[ ]*=.*@\$hypr_shadow_range = ${hypr_shadow_range}@g" \ 237 | -e "s@\$hypr_opacity[ ]*=.*@\$hypr_opacity = ${hypr_opacity}@g" \ 238 | -e "s@\$hypr_inopacity[ ]*=.*@\$hypr_inopacity = ${hypr_inopacity}@g" \ 239 | -e "s@\$hypr_blur_enable[ ]*=.*@\$hypr_blur_enable = ${hypr_blur_enable}@g" \ 240 | -e "s@\$hypr_blur_size[ ]*=.*@\$hypr_blur_size = ${hypr_blur_size}@g" \ 241 | -e "s@\$hypr_anim_enable[ ]*=.*@\$hypr_anim_enable = ${hypr_anim_enable}@g" \ 242 | -e "s@\$hypr_anim_resize[ ]*=.*@\$hypr_anim_resize = ${hypr_anim_resize}@g" \ 243 | -e "s@\$hypr_dis_random_logo[ ]*=.*@\$hypr_dis_random_logo = ${hypr_dis_random_logo}@g" \ 244 | -e "s@\$hypr_dis_autoreload[ ]*=.*@\$hypr_dis_autoreload = ${hypr_dis_autoreload}@g" 245 | 246 | sed -i ${HYPRDIR}/hyprland/env.conf \ 247 | -e "s@env=GDK_SCALE,.*@env=GDK_SCALE,${gtk_scale}@g" \ 248 | -e "s@env=GDK_DPI_SCALE,.*@env=GDK_DPI_SCALE,${gtk_dpi_scale}@g" \ 249 | -e "s@env=GTK_THEME,.*@env=GTK_THEME,${gtk_theme}@g" \ 250 | -e "s@env=XCURSOR_THEME,.*@env=XCURSOR_THEME,${cursor_theme}@g" \ 251 | -e "s@env=XCURSOR_SIZE,.*@env=XCURSOR_SIZE,${cursor_size}@g" \ 252 | -e "s@env=QT_WAYLAND_FORCE_DPI,.*@env=QT_WAYLAND_FORCE_DPI,${qt_wayland_dpi}@g" \ 253 | -e "s@env=HYPRCURSOR_SIZE,.*@env=HYPRCURSOR_SIZE,${cursor_size}@g" \ 254 | -e "s@env=HYPRCURSOR_THEME,.*@env=HYPRCURSOR_THEME,${cursor_theme}@g" 255 | 256 | cat >${HYPRDIR}/hyprland/color.conf <<-_EOF_ 257 | # ___________________________________________________________________________________________________ # 258 | # _ _ # 259 | # / / / / / # 260 | # ---/___ /---------------__----)__----/-----__-----__-----__-/---------__-----__----/-----__----)__- # 261 | # / / / / / ) / ) / / ) / ) / / / ' / ) / / ) / ) # 262 | # _/____/_____(___/____/___/__/______/____(___(__/___/__(___/________(___ __(___/__/____(___/__/_____ # 263 | # / / # 264 | # (_ / / # 265 | 266 | 267 | \$background=${background} 268 | \$onBackground=${onBackground} 269 | 270 | \$primary=${primary} 271 | \$secondary=${secondary} 272 | \$tertiary=${tertiary} 273 | \$error=${error} 274 | \$primaryContainer=${primaryContainer} 275 | \$secondaryContainer=${secondaryContainer} 276 | \$tertiaryContainer=${tertiaryContainer} 277 | \$errorContainer=${errorContainer} 278 | \$surfaceDim=${surfaceDim} 279 | \$surface=${surface} 280 | \$surfaceBright=${surfaceBright} 281 | \$surfaceContainer=${surfaceContainer} 282 | \$outline=${outline} 283 | \$shadow=${shadow} 284 | \$inversePrimary=${inversePrimary} 285 | \$inverseSurface=${inverseSurface} 286 | 287 | \$onPrimary=${onPrimary} 288 | \$onSecondary=${onSecondary} 289 | \$onTertiary=${onTertiary} 290 | \$onError=${onError} 291 | \$onPrimaryContainer=${onPrimaryContainer} 292 | \$onSecondaryContainer=${onSecondaryContainer} 293 | \$onTertiaryContainer=${onTertiaryContainer} 294 | \$onErrorContainer=${onErrorContainer} 295 | \$onSurface=${onSurface} 296 | \$scrim=${scrim} 297 | _EOF_ 298 | hyprctl reload 299 | } 300 | 301 | patch_bar() { 302 | sed -i ${PATH_BAR}/modules.json \ 303 | -e "s|\"device\"[ ]*:[ ]*\".*\"|\"device\": \"${BAR_BK_DEVICE}\"|g" \ 304 | -e "s|\"bat\"[ ]*:[ ]*\".*\"|\"bat\": \"${BAR_BAT}\"|g" \ 305 | -e "s|\"adapter\"[ ]*:[ ]*\".*\"|\"adapter\": \"${BAR_ADAPTER}\"|g" 306 | } 307 | 308 | notify_user() { 309 | dunstify -u normal -h string:x-dunst-stack-tag:applytheme "$1" 310 | } 311 | 312 | confirm_cmd() { 313 | rofi -dmenu \ 314 | -p 'Change your theme' \ 315 | -mesg 'Are you Sure to change your theme ?' \ 316 | -markup-rows \ 317 | -theme ${PATH_MENU}/confirm.rasi 318 | } 319 | 320 | confirm_run() { 321 | yes='󰗡 Yes' 322 | no='󰅙 No' 323 | 324 | selected="$(echo -e "${yes}\n${no}" | confirm_cmd)" 325 | if [[ "${selected}" == "${yes}" ]]; then 326 | if [[ "${auto_color}" == "true" ]]; then 327 | get_color_cmd 328 | fi 329 | apply_wallpaper 330 | apply_bar 331 | patch_bar 332 | apply_menu 333 | apply_terminal 334 | apply_gtk 335 | apply_notifyd 336 | cat ${HYPRDIR}/custom/theme.sh >${HYPRDIR}/.current 337 | apply_wm 338 | notify_user "Theme Changed" 339 | else 340 | notify_user "Theme Not Changed" 341 | fi 342 | } 343 | 344 | 345 | confirm_run 346 | --------------------------------------------------------------------------------