From 4eb937c5d57018ba4f020f6ce9e0557d6a5e34ee Mon Sep 17 00:00:00 2001 From: Andre Ramnitz Date: Thu, 26 Sep 2024 00:38:54 +0200 Subject: [PATCH] hypr: clean-up keybinds, improve readability hypr: re-arrange workspace rules, update binds --- .../hypr/fragments/hypr-keybinds.conf | 147 +++++++++++------- .../hypr/fragments/hypr-workspacerules.conf | 11 +- config/dot-config/hypr/hyprland.conf | 42 ++--- config/dot-config/hypr/hyprlock.conf | 29 +++- 4 files changed, 141 insertions(+), 88 deletions(-) diff --git a/config/dot-config/hypr/fragments/hypr-keybinds.conf b/config/dot-config/hypr/fragments/hypr-keybinds.conf index a3a5a183..df964572 100644 --- a/config/dot-config/hypr/fragments/hypr-keybinds.conf +++ b/config/dot-config/hypr/fragments/hypr-keybinds.conf @@ -1,20 +1,16 @@ -# See https://wiki.hyprland.org/Configuring/Keywords/ for more +# begin +# ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── $suremod = SUPER ALT CTRL $mainmod = SUPER -# binds that don't want to get fat-fingered -bind = $suremod, M, exit, -bind = $suremod, F, fullscreen,0 -bind = $suremod, Return, exec, konsole # backup terminal app -bind = $suremod, D, denywindowfromgroup, toggle -bind = ALT SHIFT, F12, exec, ~/.config/hypr/scripts/gamemode.sh - -# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more +# mainmod shortcuts +# ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── bind = $mainmod, Return, exec, footclient bind = $mainmod Shift, Q, killactive, bind = $mainmod Shift, Return, exec, footclient -w 1280x800 -a popup bind = $mainmod, P, exec, footclient -w 640x400 -a popup -H hyprpicker #color Pipette -bind = $mainmod, E, exec, dolphin +bind = $mainmod, D, exec, dolphin +bind = $mainmod, E, exec, footclient -a lf lfrun bind = $mainmod, F, fullscreen,1 bind = $mainmod, V, exec, killall fuzzel || cliphist list | fuzzel -d --config="$HOME"/.config/fuzzel/fuzzel-centered.ini | cliphist decode | wl-copy bind = $mainmod Shift, V, togglefloating @@ -26,12 +22,43 @@ bind = $mainmod, S, swapsplit, # dwindle bind = $mainmod SHIFT, S, layoutmsg, preselect d # dwindle bind = $mainmod, G, togglegroup bind = $mainmod SHIFT, G, lockactivegroup, toggle -bind = ALT, TAB, focuscurrentorlast bind = $mainmod, TAB, exec, ~/.config/hypr/scripts/windowswitch-rg.sh bind = $mainmod, grave, exec, ~/.config/hypr/scripts/RofiEmoji.sh bind = $mainmod, plus, layoutmsg, hy3:makegroup v bind = $mainmod, minus, layoutmsg, hy3:makegroup h +bind = $mainmod SHIFT, D, denywindowfromgroup, toggle + +# scratchpad +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 + +# 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 + +# 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 + + +# movement +# ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── # Move focus with mainMod + arrow keys bind = $mainmod, left, movefocus, l bind = $mainmod, right, movefocus, r @@ -42,40 +69,33 @@ 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, left, movewindoworgroup, l -bind = $mainmod SHIFT, right, movewindoworgroup, r -bind = $mainmod SHIFT, up, movewindoworgroup, u -bind = $mainmod SHIFT, down, movewindoworgroup, d -bind = $mainmod SHIFT, H, movewindoworgroup, l -bind = $mainmod SHIFT, L, movewindoworgroup, r -bind = $mainmod SHIFT, K, movewindoworgroup, u -bind = $mainmod SHIFT, J, movewindoworgroup, d - -# Move windows into groups -bind = $mainmod ALT, left, moveintogroup, l -bind = $mainmod ALT, right, moveintogroup, r -bind = $mainmod ALT, up, moveintogroup, u -bind = $mainmod ALT, down, moveintogroup, d -bind = $mainmod ALT, H, moveintogroup, l -bind = $mainmod ALT, L, moveintogroup, r -bind = $mainmod ALT, K, moveintogroup, u -bind = $mainmod ALT, J, moveintogroup, d - -# Move windows out of groups -bind = $mainmod SHIFT ALT, left, moveoutofgroup, l -bind = $mainmod SHIFT ALT, right, moveoutofgroup, r -bind = $mainmod SHIFT ALT, up, moveoutofgroup, u -bind = $mainmod SHIFT ALT, down, moveoutofgroup, d -bind = $mainmod SHIFT ALT, H, moveoutofgroup, l -bind = $mainmod SHIFT ALT, L, moveoutofgroup, r -bind = $mainmod SHIFT ALT, K, moveoutofgroup, u -bind = $mainmod SHIFT ALT, J, moveoutofgroup, d - -# Switch through group windows +bind = $mainmod CTRL, left, movewindoworgroup, l +bind = $mainmod CTRL, right, movewindoworgroup, r +bind = $mainmod CTRL, up, movewindoworgroup, u +bind = $mainmod CTRL, down, movewindoworgroup, d +bind = $mainmod CTRL, H, movewindoworgroup, l +bind = $mainmod CTRL, L, movewindoworgroup, r +bind = $mainmod CTRL, K, movewindoworgroup, u +bind = $mainmod CTRL, J, movewindoworgroup, d + +# move through group windows bind = $mainmod, O, changegroupactive, f bind = $mainmod, U, changegroupactive, b + +# workspaces +# ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── # Switch workspaces with mainMod + [0-9] bind = $mainmod, 1, workspace, 1 bind = $mainmod, 2, workspace, 2 @@ -104,24 +124,35 @@ bind = $mainmod SHIFT, 0, movetoworkspacesilent, 10 bind = $mainmod, mouse_down, workspace, e+1 bind = $mainmod, mouse_up, workspace, e-1 -# Move/resize windows with mainMod + LMB/RMB and dragging -bindm = $mainmod, mouse:272, movewindow -bindm = $mainmod, mouse:273, resizewindow -# 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 +# submaps +# ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +bind = ALT SHIFT, R, submap, resize +# will switch to a submap called resize -# printscr -bind = $mainmod, Print, exec, grim -g "$(slurp)" - | swappy -f - -bind = $suremod, Print, exec, grim "$HOME/Bilder/scrot-"$(date +"%Y%m%d--%H%M%S")"" +# will start a submap called "resize" +submap = resize -# 'scratchpad -bind = $mainmod, I, togglespecialworkspace, overlay -bind = $mainmod SHIFT, I, movetoworkspacesilent, special:overlay +# 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 + +# use reset to go back to the global submap +bind = , catchall, submap, reset + +# will reset the submap, which will return to the global submap +submap = reset + + +# mouse binds +# ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +# Move/resize windows with mainMod + LMB/RMB and dragging +bindm = $mainmod, mouse:272, movewindow +bindm = $mainmod, mouse:273, resizewindow diff --git a/config/dot-config/hypr/fragments/hypr-workspacerules.conf b/config/dot-config/hypr/fragments/hypr-workspacerules.conf index b2f98e64..4e4db8e0 100644 --- a/config/dot-config/hypr/fragments/hypr-workspacerules.conf +++ b/config/dot-config/hypr/fragments/hypr-workspacerules.conf @@ -1,6 +1,9 @@ # workspace rules -workspace = 1, on-created-empty:[pseudo] qutebrowser -workspace = 2, on-created-empty:[pseudo] footclient -a ncmpcpp ncmpcpp -workspace = 2, gapsout:80 +workspace = 1, on-created-empty: qutebrowser +workspace = 2, on-created-empty:footclient -a lf lfrun +workspace = 2, gapsout:160 +workspace = 2, gapsin:4 +workspace = 4, on-created-empty:footclient -a ncmpcpp ncmpcpp +workspace = 4, gapsout:200 workspace = 6, on-created-empty:[float] steam - +workspace = special:overlay, on-created-empty: keepassxc diff --git a/config/dot-config/hypr/hyprland.conf b/config/dot-config/hypr/hyprland.conf index 0aaf0a02..826e8d77 100644 --- a/config/dot-config/hypr/hyprland.conf +++ b/config/dot-config/hypr/hyprland.conf @@ -75,12 +75,12 @@ input { general { # See https://wiki.hyprland.org/Configuring/Variables/ for more border_size = 3 - gaps_in = 10 - gaps_out = 20 - col.active_border = $base0C $base04 - col.inactive_border = $base02 $base03 90deg - # col.nogroup_border_active = $base0D $base04 40deg - # col.nogroup_border = $base04 $base0D 40deg + gaps_in = 16 + gaps_out = 32 + col.active_border = 0xff$base0C + col.inactive_border = 0x33$base0C 0x44$base0C 135deg + col.nogroup_border_active = 0xff$base08 + col.nogroup_border = 0x33$base08 0x44$base08 135deg layout = dwindle @@ -109,15 +109,17 @@ decoration { blur { enabled = true size = 2 - passes = 2 + passes = 1 vibrancy = 0.1696 + ignore_opacity = true } drop_shadow = true - shadow_range = 14 + shadow_range = 15 rounding = 8 shadow_render_power = 2 - col.shadow = $base02 + col.shadow = 0xCC$base00 + col.shadow_inactive = 0xAA$base00 dim_special = 0.3 dim_inactive = true dim_strength = 0.2 @@ -177,22 +179,22 @@ device { group { merge_groups_on_drag = 0 insert_after_current = 0 - col.border_active = $base0A $base04 90deg - col.border_inactive = $base0A $base02 270deg - col.border_locked_active = $base0B $base04 90deg - col.border_locked_inactive = $base0B $base02 270deg + col.border_active = 0xff$base0A 0xff$base04 90deg + col.border_inactive = 0xff$base0A 0xff$base02 270deg + col.border_locked_active = 0xff$base0B 0xff$base04 90deg + col.border_locked_inactive = 0xff$base0B 0xff$base02 270deg groupbar { enabled = 0 height = 22 font_family = Iosevka Nerd Font Propo font_size = 12 - text_color = $base00 + text_color = 0xff$base00 gradients = true scrolling = false - col.active = $base0D - col.inactive = $base04 - col.locked_active = $base0B - col.locked_inactive = $base04 + col.active = 0xff$base0D + col.inactive = 0xff$base04 + col.locked_active = 0xff$base0B + col.locked_inactive = 0xff$base04 } } @@ -201,8 +203,8 @@ plugin { bar_text_font = Iosevka Nerd Font Propo bar_text_size = 12 bar_height = 24 - bar_color = $base0C - col.text = $base00 + bar_color = 0xff$base0C + col.text = 0xff$base00 bar_part_of_window = true bar_precedence_over_border = true # hyprbars-button = color, size, icon, on-click diff --git a/config/dot-config/hypr/hyprlock.conf b/config/dot-config/hypr/hyprlock.conf index 1d2b0776..a964bcc3 100644 --- a/config/dot-config/hypr/hyprlock.conf +++ b/config/dot-config/hypr/hyprlock.conf @@ -1,6 +1,8 @@ +source=./base16-colors.conf + background { monitor = - # path = '/home/andy/Bilder/Wallpapers/5120x1440 aerjl345234.webp' # supports png, jpg, webp (no animations, though) + path = /home/andy/Bilder/Wallpapers/5120x1440-aerjl345234.webp # supports png, jpg, webp (no animations, though) color = rgba(25, 20, 20, 1.0) # all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations @@ -13,6 +15,21 @@ background { vibrancy_darkness = 0.0 } +image { + path = /home/andy/Bilder/avatar.jpg + size = 150 + rounding = -1 # negative values mean circle + border_size = 4 + border_color = $base05 + rotate = 0 + reload_time = -1 # seconds between reloading, 0 to reload with SIGUSR2 + reload_cmd = # command to get new path. if empty, old path will be used. don't run "follow" commands like tail -F + + position = 0, 200 + halign = center + valign = center +} + input-field { monitor = size = 300, 50 @@ -21,16 +38,16 @@ input-field { dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0 dots_center = false dots_rounding = -1 # -1 default circle, -2 follow input-field rounding - outer_color = rgb(151515) - inner_color = rgb(200, 200, 200) - font_color = rgb(10, 10, 10) + outer_color = $base05 + inner_color = $base00 + font_color = $base05 fade_on_empty = true fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered. placeholder_text = $PROMPT # Text rendered in the input box when it's empty. hide_input = false rounding = -1 # -1 means complete rounding (circle/oval) - check_color = rgb(204, 136, 34) - fail_color = rgb(204, 34, 34) # if authentication failed, changes outer_color and fail message color + check_color = $base0A + fail_color = $base08 # if authentication failed, changes outer_color and fail message color fail_text = $FAIL ($ATTEMPTS) # can be set to empty fail_transition = 300 # transition time in ms between normal outer_color and fail_color capslock_color = -1 -- 2.51.2