From eeb963dd3757f3c76902042cc5a56ba9d04b0fb1 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 9 Jun 2025 23:15:12 +0800 Subject: hypr: use hyprscroller --- dot-config/hypr/binds.conf | 55 +++++++++++++++++++++++++++---------------- dot-config/hypr/hyprland.conf | 11 ++++++--- dot-config/hypr/rules.conf | 3 +++ 3 files changed, 46 insertions(+), 23 deletions(-) diff --git a/dot-config/hypr/binds.conf b/dot-config/hypr/binds.conf index 9398a745..6f18b355 100644 --- a/dot-config/hypr/binds.conf +++ b/dot-config/hypr/binds.conf @@ -93,7 +93,7 @@ bind = ,XF86MonBrightnessDown, execr, $HOME/scripts/sysutil.sh brightness --dec bind = $mod, d, execr, hyprctl dispatch movetoworkspacesilent special:minimized; pkill -RTMIN+5 waybar bind = $mod, i, togglespecialworkspace, minimized bind = $mod, i, execr, hyprctl dispatch movetoworkspace +0; pkill -RTMIN+5 waybar -bind = $mod, q, killactive +binde = $mod, q, killactive bind = $mod shift, q, execr, kill -9 $(hyprctl activewindow | grep pid | tail -1 | awk '{print$2}') bind = ctrl alt, escape, execr, hyprctl kill bind = ctrl $mod shift, r, execr, hyprctl reload @@ -104,6 +104,7 @@ bind = $mod alt, b, execr, killall wallust $bgChanger; $bgChangerBin # bind = ctrl, up, hyprexpo:expo, on # bind = ctrl, down, hyprexpo:expo, off # bind = ctrl $mod alt, up, overview:open +bind = ctrl $mod alt, up, scroller:jump # bind = ctrl $mod alt, down, overview:close # bind = alt, tab, execr, hyprswitch gui # bind = alt, grave, execr, hyprswitch gui --reverse @@ -118,10 +119,10 @@ binde = $mod shift, h, movewindow, l binde = $mod shift, l, movewindow, r binde = $mod shift, k, movewindow, u binde = $mod shift, j, movewindow, d -# binde = $mod shift, h, movewindow, l -# binde = $mod shift, l, movewindow, r -# binde = $mod shift, k, movewindow, u -# binde = $mod shift, j, movewindow, d +# binde = $mod shift, h, scroller:movewindow, l +# binde = $mod shift, l, scroller:movewindow, r +# binde = $mod shift, k, scroller:movewindow, u +# binde = $mod shift, j, scroller:movewindow, d # binde = ctrl shift, left, resizeactive, -20 0 # binde = ctrl shift, left, moveactive, 20 0 # binde = ctrl shift, right, resizeactive, -20 0 @@ -134,12 +135,22 @@ binde = $mod shift, j, movewindow, d # binde = ctrl $mod, up, resizeactive, 0 20 # binde = ctrl $mod, up, moveactive, 0 -20 # binde = ctrl $mod, down, resizeactive, 0 20 -binde = ctrl $mod alt, space, setfloating, 1 -binde = ctrl $mod alt, space, centerwindow, 1 -binde = shift alt, left, moveactive, -20 0 -binde = shift alt, right, moveactive, 20 0 -binde = shift alt, up, moveactive, 0 -20 -binde = shift alt, down, moveactive, 0 20 +# binde = ctrl $mod alt, space, setfloating, 1 +# binde = ctrl $mod alt, space, centerwindow, 1 +binde = ctrl $mod alt, space, scroller:setsize, one +# binde = shift alt, left, moveactive, -20 0 +# binde = shift alt, right, moveactive, 20 0 +# binde = shift alt, up, moveactive, 0 -20 +# binde = shift alt, down, moveactive, 0 20 +binde = ctrl $mod shift, h, scroller:movewindow, l +binde = ctrl $mod shift, h, scroller:setsize, onehalf +binde = ctrl $mod shift, h, scroller:movewindow, r +binde = ctrl $mod shift, h, scroller:movefocus, l +binde = ctrl $mod shift, h, scroller:movefocus, r +binde = ctrl $mod shift, l, scroller:setsize, onehalf + +bind = $mod, home, scroller:movefocus, begin +bind = $mod, end, scroller:movefocus, end # zoom # bind = $mod, equal, execr, /bin/bash -c "hyprctl keyword cursor:zoom_factor $(($(hyprctl getoption cursor:zoom_factor | awk '/float/ {print $2}')+0.1))" @@ -156,17 +167,17 @@ bind = $mod shift, m, togglesplit, # dwindle bind = $mod, s, pin # Move focus with mainMod + arrow keys -binde = $mod, h, movefocus, l -binde = $mod, l, movefocus, r -binde = $mod, k, movefocus, u -binde = $mod, j, movefocus, d +binde = $mod, h, scroller:movefocus, l +binde = $mod, l, scroller:movefocus, r +binde = $mod, k, scroller:movefocus, u +binde = $mod, j, scroller:movefocus, d bind = ctrl $mod, k, focuswindow, floating bind = ctrl $mod, j, focuswindow, tiled # vim binds -# binde = $mod, h, movefocus, l -# binde = $mod, l, movefocus, r -# binde = $mod, k, movefocus, u -# binde = $mod, j, movefocus, d +# binde = $mod, h, scroller:movefocus, l +# binde = $mod, l, scroller:movefocus, r +# binde = $mod, k, scroller:movefocus, u +# binde = $mod, j, scroller:movefocus, d # Switch workspaces with mainMod + [0-9] bind = $mod, 1, workspace, 1 @@ -199,7 +210,11 @@ bind = $mod SHIFT, 0, movetoworkspacesilent, 10 # Move/resize windows with mainMod + LMB/RMB and dragging bindm = $mod, mouse:272, movewindow -bindm = $mod, mouse:273, resizewindow +bindm = $mod, mouse:273, resizewindow 0 + +bind = $mod, mouse_up, scroller:movefocus, r +bind = $mod, mouse_down, scroller:movefocus, l +# bindm = $mod, mouse_down, resizewindow 0 # bind = $mod, mouse:272, pin # bindri = $mod, mouse:272, pin, disable diff --git a/dot-config/hypr/hyprland.conf b/dot-config/hypr/hyprland.conf index 318c2418..7e5e1322 100644 --- a/dot-config/hypr/hyprland.conf +++ b/dot-config/hypr/hyprland.conf @@ -15,7 +15,7 @@ monitor=,highres@highrr,auto,auto#,bitdepth,10 $term = kitty $termLaunch = $term -1 $termfloat = [float; size 40% 40%; workspace +0] $term -$editor = lvim +$editor = nvim # $browser = thorium-browser $browser = zen-browser $fileManager = thunar @@ -48,7 +48,7 @@ $waylandarg = --enable-features=WaylandWindowDecorations,UseOzonePlatform,WebRTC general { gaps_in = 3 gaps_out = 7 - # float_gaps_out = 7 + float_gaps = -1 border_size = 3 # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors @@ -67,7 +67,7 @@ general { # Please see https://wiki.hyprland.org/Configuring/Tearing before you turn this on allow_tearing = true - layout = dwindle + layout = scroller snap { enabled = true respect_gaps = true @@ -287,6 +287,11 @@ plugin { } # shaperule = clientside, none } + scroller { + column_default_width = onehalf + focus_edge_ms = 100 + only_window_one = true + } chromakey_background = $background # hy3 { # # disable gaps when only one window is onscreen diff --git a/dot-config/hypr/rules.conf b/dot-config/hypr/rules.conf index 5610db58..26c59683 100644 --- a/dot-config/hypr/rules.conf +++ b/dot-config/hypr/rules.conf @@ -160,6 +160,8 @@ windowrule = tag +time-sensitive, class:^(polkit-gnome-authentication-agent-1|hy windowrule = tag +popup, title:^(Open File|Open|Select a File|Choose wallpaper|Open Folder|Save As|Save File|Open Files|File Operation Progress|Library|File Upload|.*- Properties|Enter name of file to save to.*)$ windowrule = tag +popup, class:^(xdg-desktop-portal.*|.*.portal..*)$ windowrule = tag +popup, class:^thunar$, title:^Rename.* +windowrule = tag +popup, class:^zenity$, title:^Protontricks$ +windowrule = tag +popup, class:^zen$, title:^Extension:.* windowrule = dimaround, tag:time-sensitive @@ -273,6 +275,7 @@ permission = /usr/bin/wf-recorder, screencopy, allow permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow permission = /var/cache/hyprpm/system/dynamic-cursors/dynamic-cursors.so, plugin, allow +permission = /var/cache/hyprpm/system/hyprscroller/hyprscroller.so, plugin, allow permission = ^wooting-wooting-two-he-\(arm\)$, keyboard, allow permission = ^power-button$, keyboard, allow -- cgit v1.2.3