From: Andre Ramnitz Date: Wed, 23 Apr 2025 23:04:42 +0000 (+0200) Subject: hypr: clean-up and reformat config, better keybinds X-Git-Url: https://git.ramnitz.eu/?a=commitdiff_plain;h=cae6fe5f032a370043a92b366a3d17478299fcfe;p=dotfiles.git hypr: clean-up and reformat config, better keybinds --- diff --git a/dot-config/hypr/fragments/keybinds.conf b/dot-config/hypr/fragments/keybinds.conf index b5230a20..54e36bdf 100644 --- a/dot-config/hypr/fragments/keybinds.conf +++ b/dot-config/hypr/fragments/keybinds.conf @@ -3,173 +3,174 @@ $suremod = SUPER ALT CTRL $mainmod = SUPER + # mainmod shortcuts # ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── -bind = $mainmod, Return, exec, foot -bind = $mainmod Shift, Q, killactive, -bind = $mainmod Shift, Return, exec, foot -w 1280x800 -a popup -bind = $mainmod, P, exec, foot -w 640x400 -a popup -H hyprpicker #color Pipette -bind = $mainmod, D, exec, dolphin -bind = $mainmod, E, exec, foot -a lf lfrun -bind = $mainmod, F, fullscreen,1 -bind = $mainmod Shift, F, fullscreen,0 -bind = $mainmod Shift, V, exec, killall fuzzel || cliphist list | fuzzel -d --config="$HOME"/.config/fuzzel/fuzzel-centered.ini | cliphist decode | wl-copy -bind = $mainmod, V, togglefloating -bind = $mainmod, R, exec, killall fuzzel || fuzzel -bind = $mainmod Shift, R, exec, killall fuzzel || fuzzel --config="$HOME"/.config/fuzzel/fuzzel-centered.ini -# bind = $mainmod Shift, R, exec, killall rofi || rofi -show run # rofi installed for keepassxc-browser script -bind = $mainmod, A, pseudo, # dwindle, A for Artificial -bind = $mainmod, B, layoutmsg, preselect d # dwindle -bind = $mainmod, S, togglesplit, # dwindle -bind = $mainmod Shift, S, swapsplit, # dwindle -bind = $mainmod SHIFT, S, layoutmsg, preselect d # dwindle -bind = $mainmod, G, togglegroup -bind = $mainmod SHIFT, G, lockactivegroup, toggle -bind = $mainmod CTRL, G, denywindowfromgroup, toggle -bind = $mainmod, W, exec, $HOME/.local/bin/wb hide -bind = $mainmod SHIFT, W, exec, $HOME/.local/bin/wb reload -bind = $mainmod, TAB, exec, ~/.config/hypr/scripts/windowswitch-rg.sh -bind = $mainmod, grave, exec, ~/.config/hypr/scripts/RofiEmoji.sh -bind = $mainmod SHIFT, D, denywindowfromgroup, toggle +bind = $mainmod, Return, exec, foot +bind = $mainmod Shift, Q, killactive, +bind = $mainmod Shift, Return, exec, foot -w 1280x800 -a popup +bind = $mainmod, P, exec, foot -w 640x400 -a popup -H hyprpicker #color Pipette +bind = $mainmod, D, exec, killall fuzzel || fuzzel +bind = $mainmod Shift, D, exec, killall fuzzel || fuzzel --config="$HOME"/.config/fuzzel/fuzzel-centered.ini +bind = $mainmod, E, exec, foot -a lf lfrun +bind = $mainmod SHIFT, E, exec, dolphin +bind = $mainmod, F, fullscreen,1 +bind = $mainmod Shift, F, fullscreen,0 +bind = $mainmod, V, togglefloating +bind = $mainmod Shift, V, exec, killall fuzzel || cliphist list | fuzzel -d --config="$HOME"/.config/fuzzel/fuzzel-centered.ini | cliphist decode | wl-copy +# bind = $mainmod Shift, R, exec, killall rofi || rofi -show run # rofi installed for keepassxc-browser script +bind = $mainmod, A, pseudo, # dwindle, A for Artificial +bind = $mainmod, B, layoutmsg, preselect d # dwindle +bind = $mainmod, S, togglesplit, # dwindle +bind = $mainmod Shift, S, swapsplit, # dwindle +bind = $mainmod, G, togglegroup +bind = $mainmod SHIFT, G, lockactivegroup, toggle +bind = $mainmod CTRL, G, denywindowfromgroup, toggle +bind = $mainmod ALT, G, moveoutofgroup, active +bind = $mainmod, W, exec, $HOME/.local/bin/wb hide +bind = $mainmod SHIFT, W, exec, $HOME/.local/bin/wb reload +bind = $mainmod, TAB, exec, ~/.config/hypr/scripts/windowswitch-rg.sh +bind = $mainmod, grave, exec, ~/.config/hypr/scripts/RofiEmoji.sh # scratchpad -bind = $mainmod, I, togglespecialworkspace, overlay -bind = $mainmod SHIFT, I, movetoworkspace, special:overlay +bind = $mainmod, I, togglespecialworkspace, overlay +bind = $mainmod SHIFT, I, movetoworkspace, special:overlay # suremod keys (prevent fat-fingering 'em by accident) # ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── -bind = $suremod, M, exit, -bind = $suremod, F, fullscreen,0 -bind = $suremod, Return, exec, konsole # backup terminal app -bind = $suremod, G, exec, ~/.config/hypr/scripts/gamemode.sh +bind = $suremod, M, exit, +bind = $suremod, Return, exec, konsole # backup terminal app +bind = $suremod, G, exec, ~/.config/hypr/scripts/gamemode.sh # misc keys (mostly redundant, but some habits die hard) # ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── -bind = ALT, TAB, focuscurrentorlast -bind = ALT SHIFT, F12, exec, ~/.config/hypr/scripts/gamemode.sh -bind = $mainmod, Print, exec, ~/.config/hypr/scripts/grimblast-sshot-output -bind = $mainmod SHIFT, Print, exec, ~/.config/hypr/scripts/grimblast-sshot-area +bind = ALT, TAB, focuscurrentorlast +bind = ALT SHIFT, F12, exec, ~/.config/hypr/scripts/gamemode.sh +bind = $mainmod, Print, exec, hyprshot -m output -m active -o /home/andy/Bilder/Screenshots +bind = $mainmod SHIFT, Print, exec, hyprshot -m window -m active -o /home/andy/Bilder/Screenshots +bind = $mainmod CTRL, Print, exec, hyprshot -z -m region -o /home/andy/Bilder/Screenshots # media keys -bindl = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -bindl = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -bindl = , XF86AudioMute, exec, ~/.config/hypr/scripts/muteorunmute.sh -bindl = , XF86AudioPlay, exec, playerctl play-pause -bindl = , XF86AudioNext, exec, playerctl next -bindl = , XF86AudioPrev, exec, playerctl previous -bindl = , XF86audiostop, exec, playerctl stop +bindl = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ +bindl = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- +bindl = , XF86AudioMute, exec, ~/.config/hypr/scripts/muteorunmute.sh +bindl = , XF86AudioPlay, exec, playerctl play-pause +bindl = , XF86AudioNext, exec, playerctl next +bindl = , XF86AudioPrev, exec, playerctl previous +bindl = , XF86audiostop, exec, playerctl stop # movement # ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── # Move focus with mainMod + arrow keys -bind = $mainmod, left, movefocus, l -bind = $mainmod, right, movefocus, r -bind = $mainmod, up, movefocus, u -bind = $mainmod, down, movefocus, d -bind = $mainmod, H, movefocus, l -bind = $mainmod, L, movefocus, r -bind = $mainmod, K, movefocus, u -bind = $mainmod, J, movefocus, d - -# move without affecting groups -bind = $mainmod SHIFT, left, movewindow, l -bind = $mainmod SHIFT, right, movewindow, r -bind = $mainmod SHIFT, up, movewindow, u -bind = $mainmod SHIFT, down, movewindow, d -bind = $mainmod SHIFT, H, movewindow, l -bind = $mainmod SHIFT, L, movewindow, r -bind = $mainmod SHIFT, K, movewindow, u -bind = $mainmod SHIFT, J, movewindow, d - -# Move windows or groups with mainMod + Shift + arrow keys -bind = $mainmod SHIFT CTRL, left, movewindoworgroup, l -bind = $mainmod SHIFT CTRL, right, movewindoworgroup, r -bind = $mainmod SHIFT CTRL, up, movewindoworgroup, u -bind = $mainmod SHIFT CTRL, down, movewindoworgroup, d -bind = $mainmod SHIFT CTRL, H, movewindoworgroup, l -bind = $mainmod SHIFT CTRL, L, movewindoworgroup, r -bind = $mainmod SHIFT CTRL, K, movewindoworgroup, u -bind = $mainmod SHIFT CTRL, J, movewindoworgroup, d - -# move without affecting groups -bind = $mainmod ALT, left, layoutmsg, preselect l -bind = $mainmod ALT, right, layoutmsg, preselect r -bind = $mainmod ALT, up, layoutmsg, preselect u -bind = $mainmod ALT, down, layoutmsg, preselect d -bind = $mainmod ALT, H, layoutmsg, preselect l -bind = $mainmod ALT, L, layoutmsg, preselect r -bind = $mainmod ALT, K, layoutmsg, preselect u -bind = $mainmod ALT, J, layoutmsg, preselect d +bind = $mainmod, left, movefocus, l +bind = $mainmod, right, movefocus, r +bind = $mainmod, up, movefocus, u +bind = $mainmod, down, movefocus, d +bind = $mainmod, H, movefocus, l +bind = $mainmod, L, movefocus, r +bind = $mainmod, K, movefocus, u +bind = $mainmod, J, movefocus, d + +# move windows or entire groups +bind = $mainmod SHIFT, left, movewindow, l +bind = $mainmod SHIFT, right, movewindow, r +bind = $mainmod SHIFT, up, movewindow, u +bind = $mainmod SHIFT, down, movewindow, d +bind = $mainmod SHIFT, H, movewindow, l +bind = $mainmod SHIFT, L, movewindow, r +bind = $mainmod SHIFT, K, movewindow, u +bind = $mainmod SHIFT, J, movewindow, d + +# Move windows into or out of groups with $suremod +bind = $suremod, left, movewindoworgroup, l +bind = $suremod, right, movewindoworgroup, r +bind = $suremod, up, movewindoworgroup, u +bind = $suremod, down, movewindoworgroup, d +bind = $suremod, H, movewindoworgroup, l +bind = $suremod, L, movewindoworgroup, r +bind = $suremod, K, movewindoworgroup, u +bind = $suremod, J, movewindoworgroup, d + +# preselect direction for new windows +bind = $mainmod CTRL, left, layoutmsg, preselect l +bind = $mainmod CTRL, right, layoutmsg, preselect r +bind = $mainmod CTRL, up, layoutmsg, preselect u +bind = $mainmod CTRL, down, layoutmsg, preselect d +bind = $mainmod CTRL, H, layoutmsg, preselect l +bind = $mainmod CTRL, L, layoutmsg, preselect r +bind = $mainmod CTRL, K, layoutmsg, preselect u +bind = $mainmod CTRL, J, layoutmsg, preselect d # move through group windows -bind = $mainmod, O, changegroupactive, f -bind = $mainmod, U, changegroupactive, b -bind = $suremod, O, changegroupactive, f -bind = $suremod, U, changegroupactive, b +bind = $mainmod, O, changegroupactive, f +bind = $mainmod, U, changegroupactive, b +bind = $mainmod SHIFT, O, movegroupwindow, f +bind = $mainmod SHIFT, U, movegroupwindow, b + # workspaces # ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── # Switch workspaces with mainMod + [0-9] -bind = $mainmod, 1, workspace, 1 -bind = $mainmod, 2, workspace, 2 -bind = $mainmod, 3, workspace, 3 -bind = $mainmod, 4, workspace, 4 -bind = $mainmod, 5, workspace, 5 -bind = $mainmod, 6, workspace, 6 -bind = $mainmod, 7, workspace, 7 -bind = $mainmod, 8, workspace, 8 -bind = $mainmod, 9, workspace, 9 -bind = $mainmod, 0, workspace, 10 +bind = $mainmod, 1, workspace, 1 +bind = $mainmod, 2, workspace, 2 +bind = $mainmod, 3, workspace, 3 +bind = $mainmod, 4, workspace, 4 +bind = $mainmod, 5, workspace, 5 +bind = $mainmod, 6, workspace, 6 +bind = $mainmod, 7, workspace, 7 +bind = $mainmod, 8, workspace, 8 +bind = $mainmod, 9, workspace, 9 +bind = $mainmod, 0, workspace, 10 # Move active window to a workspace with mainMod + SHIFT + [0-9] -bind = $mainmod SHIFT, 1, movetoworkspace, 1 -bind = $mainmod SHIFT, 2, movetoworkspace, 2 -bind = $mainmod SHIFT, 3, movetoworkspace, 3 -bind = $mainmod SHIFT, 4, movetoworkspace, 4 -bind = $mainmod SHIFT, 5, movetoworkspace, 5 -bind = $mainmod SHIFT, 6, movetoworkspace, 6 -bind = $mainmod SHIFT, 7, movetoworkspace, 7 -bind = $mainmod SHIFT, 8, movetoworkspace, 8 -bind = $mainmod SHIFT, 9, movetoworkspace, 9 -bind = $mainmod SHIFT, 0, movetoworkspace, 10 +bind = $mainmod SHIFT, 1, movetoworkspace, 1 +bind = $mainmod SHIFT, 2, movetoworkspace, 2 +bind = $mainmod SHIFT, 3, movetoworkspace, 3 +bind = $mainmod SHIFT, 4, movetoworkspace, 4 +bind = $mainmod SHIFT, 5, movetoworkspace, 5 +bind = $mainmod SHIFT, 6, movetoworkspace, 6 +bind = $mainmod SHIFT, 7, movetoworkspace, 7 +bind = $mainmod SHIFT, 8, movetoworkspace, 8 +bind = $mainmod SHIFT, 9, movetoworkspace, 9 +bind = $mainmod SHIFT, 0, movetoworkspace, 10 # Move active window in the background to a workspace with mainMod + CRTL + [0-9] -bind = $mainmod CTRL, 1, movetoworkspacesilent, 1 -bind = $mainmod CTRL, 2, movetoworkspacesilent, 2 -bind = $mainmod CTRL, 3, movetoworkspacesilent, 3 -bind = $mainmod CTRL, 4, movetoworkspacesilent, 4 -bind = $mainmod CTRL, 5, movetoworkspacesilent, 5 -bind = $mainmod CTRL, 6, movetoworkspacesilent, 6 -bind = $mainmod CTRL, 7, movetoworkspacesilent, 7 -bind = $mainmod CTRL, 8, movetoworkspacesilent, 8 -bind = $mainmod CTRL, 9, movetoworkspacesilent, 9 -bind = $mainmod CTRL, 0, movetoworkspacesilent, 10 +bind = $mainmod CTRL, 1, movetoworkspacesilent, 1 +bind = $mainmod CTRL, 2, movetoworkspacesilent, 2 +bind = $mainmod CTRL, 3, movetoworkspacesilent, 3 +bind = $mainmod CTRL, 4, movetoworkspacesilent, 4 +bind = $mainmod CTRL, 5, movetoworkspacesilent, 5 +bind = $mainmod CTRL, 6, movetoworkspacesilent, 6 +bind = $mainmod CTRL, 7, movetoworkspacesilent, 7 +bind = $mainmod CTRL, 8, movetoworkspacesilent, 8 +bind = $mainmod CTRL, 9, movetoworkspacesilent, 9 +bind = $mainmod CTRL, 0, movetoworkspacesilent, 10 # Scroll through existing workspaces with mainMod + scroll -bind = $mainmod, mouse_down, workspace, e+1 -bind = $mainmod, mouse_up, workspace, e-1 +bind = $mainmod, mouse_down, workspace, e+1 +bind = $mainmod, mouse_up, workspace, e-1 # submaps # ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── -bind = ALT SHIFT, R, submap, resize # will switch to a submap called resize +bind = $mainmod, R, submap, resize # will start a submap called "resize" submap = resize # sets repeatable binds for resizing the active window -binde = , right, resizeactive, 10 0 -binde = , left, resizeactive, -10 0 -binde = , up, resizeactive, 0 -10 -binde = , down, resizeactive, 0 10 -binde = , l, resizeactive, 10 0 -binde = , h, resizeactive, -10 0 -binde = , k, resizeactive, 0 -10 -binde = , j, resizeactive, 0 10 +binde = , right, resizeactive, 10 0 +binde = , left, resizeactive, -10 0 +binde = , up, resizeactive, 0 -10 +binde = , down, resizeactive, 0 10 +binde = , l, resizeactive, 10 0 +binde = , h, resizeactive, -10 0 +binde = , k, resizeactive, 0 -10 +binde = , j, resizeactive, 0 10 # use reset to go back to the global submap bind = , catchall, submap, reset @@ -181,6 +182,9 @@ submap = reset # mouse binds # ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── # Move/resize windows with mainMod + LMB/RMB and dragging -bindm = $mainmod, mouse:272, movewindow -bindm = $mainmod, mouse:273, resizewindow - +bindm = $mainmod, mouse:272, movewindow +bindm = $mainmod, mouse:273, resizewindow +bind = $mainmod, mouse_up, workspace, m-1 +bind = $mainmod, mouse_down, workspace, m+1 +bind = $mainmod, mouse_left, workspace, r-1 +bind = $mainmod, mouse_right, workspace, r+1 diff --git a/dot-config/hypr/hyprland.conf b/dot-config/hypr/hyprland.conf index 76adb9c6..a4291d23 100644 --- a/dot-config/hypr/hyprland.conf +++ b/dot-config/hypr/hyprland.conf @@ -56,6 +56,7 @@ env = XCURSOR_SIZE,40 exec-once = ~/.config/hypr/scripts/startup.sh exec-once = hypridle exec-once = hyprpm enable hyprbars +exec-once = hyprpaper # Source a file (multi-file configs) # source = ~/.config/hypr/myColors.conf @@ -197,14 +198,14 @@ group { indicator_height = 0 priority = 3 font_size = 16 - text_color = 0xFF$base01 + text_color = 0xFF$base00 stacked = false gradients = true scrolling = false col.locked_active = 0xEE$base0D - col.locked_inactive = 0xEE$base02 + col.locked_inactive = 0x88$base0D col.active = 0xEE$base0A - col.inactive = 0xEE$base02 + col.inactive = 0x88$base0A rounding = 1 gradient_rounding = 5 gradient_round_only_edges = true @@ -225,6 +226,12 @@ plugin { hyprbars-button = 0xaa$base08, 20, 󰖭, hyprctl dispatch killactive hyprbars-button = 0xaa$base0A, 20, 󰁌, hyprctl dispatch fullscreen 1 } + hyprexpo { + columns = 3 + gap_size = 5 + bg_col = 0xEE$base00 + workspace_method = center current + } } source=./fragments/animations.conf diff --git a/dot-config/hypr/hyprpaper.conf b/dot-config/hypr/hyprpaper.conf index 71790a02..ee5f281e 100644 --- a/dot-config/hypr/hyprpaper.conf +++ b/dot-config/hypr/hyprpaper.conf @@ -1,13 +1,9 @@ -preload = ~/Bilder/Wallpapers-Selection/1.jpg -preload = ~/Bilder/Wallpapers-Selection/2.jpg -preload = ~/Bilder/Wallpapers-Selection/3.jpeg -preload = ~/Bilder/Wallpapers-Selection/4.webp -preload = ~/Bilder/Wallpapers-Selection/5.jpg -preload = ~/Bilder/Wallpapers-Selection/6.jpg -preload = ~/Bilder/Wallpapers-Selection/a.jpg -preload = ~/Bilder/Wallpapers-Selection/b.jpg -preload = ~/Bilder/Wallpapers-Selection/c.jpg -preload = ~/Bilder/Wallpapers-Selection/d.jpg +preload = ~/Bilder/Wallpapers-simple/AtariTimes.png +preload = ~/Bilder/Wallpapers-simple/atmosphere.png +preload = ~/Bilder/Wallpapers-simple/WP.jpg +preload = ~/Bilder/Wallpapers-simple/cubechaos2.png +preload = ~/Bilder/Wallpapers-simple/mario.jpg +wallpaper = , ~/Bilder/Wallpapers-simple/cubechaos2.png ipc = on splash = 0 diff --git a/dot-config/hypr/scripts/startup.sh b/dot-config/hypr/scripts/startup.sh index 86bad11c..3e9d2219 100755 --- a/dot-config/hypr/scripts/startup.sh +++ b/dot-config/hypr/scripts/startup.sh @@ -5,7 +5,7 @@ logger '============================' logger 'HYPRLAND MAIN STARTUP BEGIN' # shellcheck disable=SC2155,SC2046 -# test ! -d "$XDG_RUNTIME_DIR" && export XDG_RUNTIME_DIR=$(mktemp -d /tmp/$(id -u)-runtime-dir.XXX) && logger 'xdg-runtime dir set NOW' +test ! -d "$XDG_RUNTIME_DIR" && export XDG_RUNTIME_DIR=$(mktemp -d /tmp/$(id -u)-runtime-dir.XXX) && logger 'xdg-runtime dir set NOW' # test ! "$DBUS_SESSION_BUS_ADDRESS" && dbus-daemon --session --address=unix:path="$XDG_RUNTIME_DIR"/bus && logger 'dbus session daemon started' dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP @@ -59,23 +59,15 @@ logger 'waybar started' pidof swaync && pkill swaync || swaync > /dev/null 2>&1 & pidof openrgb && pkill openrgb || openrgb -p default --startminimized & -pidof udiskie && pkill udiskie || udiskie --no-automount --no-notify --tray & -pidof corectrl && pkill corectrl || corectrl --minimize-systray > /dev/null 2>&1 & +pidof kwalletd6 && ~/.config/hypr/scripts/keepassxc.sh > /dev/null 2>&1 & -if pidof kwalletd6; then - ~/.config/hypr/scripts/keepassxc.sh -fi - -! pidof swww-daemon && nohup /usr/bin/swww-daemon > /dev/null 2>&1 -sleep 0.5 && ~/.local/bin/rndwallpaper swww +# ! pidof swww-daemon && nohup /usr/bin/swww-daemon > /dev/null 2>&1 +# sleep 0.5 && ~/.local/bin/rndwallpaper swww pidof wl-paste && pkill wl-paste || true wl-paste --type text --watch cliphist store & wl-paste --type image --watch cliphist store & -pkill -f '/usr/lib/python-exec/python3.12/python /home/andy/.config/hypr/scripts/gammarelay-auto-temp.py' -sleep 1 && /home/andy/.config/hypr/scripts/gammarelay-auto-temp.py > /dev/null 2>&1 & - logger 'HYPRLAND MAIN STARTUP END' logger '============================'