From 88cca793682986a969638d17d58e601ed85aa383 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Sat, 15 Nov 2025 13:16:46 +1100 Subject: [PATCH] feat: Update hypr configs --- .config/hypr/hyprland.conf | 27 ++++---- .config/hypr/keybinds.conf | 61 ++++--------------- .../plugins/split-monitor-workspaces.conf | 31 ++++++++++ .config/hypr/plugins/virtual-desktops.conf | 44 +++++++++++++ .config/hypr/scripts/exec-once.sh | 4 +- .config/hypr/scripts/stats.sh | 12 +--- .config/hypr/windowrules.conf | 45 ++++++-------- 7 files changed, 121 insertions(+), 103 deletions(-) create mode 100644 .config/hypr/plugins/split-monitor-workspaces.conf create mode 100644 .config/hypr/plugins/virtual-desktops.conf diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 0976b62..9014e28 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -22,6 +22,14 @@ source = ~/.config/hypr/start-exec.conf source = ~/.config/hypr/windowrules.conf source = ~/.config/hypr/before-exit.conf source = ~/.config/hypr/keybinds.conf + +# Plugins +# hyprlang noerror true +source = ~/.config/hypr/plugins/split-monitor-workspaces.conf + +# hyprlang noerror false + + env = HYPRSHOT_DIR,/home/$USER/Pictures/Screenshots env = XDG_MENU_PREFIX,arch- @@ -134,11 +142,8 @@ master { gestures { # See https://wiki.hyprland.org/Configuring/Guestures/ for more - - # hyprlang noerror true - gesture = 3, right, dispatcher, prevdesk - gesture = 3, left, dispatcher, nextdesk - # hyprlang noerror false + gesture = 3, horizontal, workspace + gesture = 3, vertical, special, terminal } cursor { @@ -149,7 +154,7 @@ misc { # See https://wiki.hyprland.org/Configuring/Variables/ for more disable_splash_rendering = 1 disable_hyprland_logo = 1 - focus_on_activate = 0 # This breaks vdesks + focus_on_activate = 1 # This breaks vdesks anr_missed_pings = 10 } ecosystem { @@ -157,15 +162,7 @@ ecosystem { } # hyprlang noerror true -plugin { - virtual-desktops { - names = 1:Coding, 2:Internet, 3:3,4:4, 5:Social - cycleworkspaces = 0 - rememberlayout = none - notifyinit = 0 - verbose_logging = 0 - } -} + plugin { hyprexpo { columns = 3 diff --git a/.config/hypr/keybinds.conf b/.config/hypr/keybinds.conf index 2dc9447..663fbc8 100644 --- a/.config/hypr/keybinds.conf +++ b/.config/hypr/keybinds.conf @@ -4,13 +4,9 @@ $fileManager = dolphin $menu = pgrep -x tofi-drun && pkill -x tofi-drun || tofi-drun --drun-launch=true > ~/.logs/tofi-drun.log 2>&1 & $clipboard = /home/nathan/.local/bin/clipse $StartWallpaperTimer = systemctl --user start wallpaper.timer && WallRizz -r -n -d ~/.config/backgrounds - - - -# See https://wiki.hyprland.org/Configuring/Keywords/ for more $mainMod = SUPER -# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more + bind = CTRL ALT, T, exec, $terminal bind = $mainMod, Q, killactive, bind = $mainMod, F, togglefloating, @@ -18,14 +14,17 @@ bind = $mainMod, space, exec, $menu bind = ALT, SPACE, exec, ~/.config/hypr/scripts/search-windows.sh bind = $mainMod, L, exec, ~/.config/hypr/scripts/lock.sh bind = $mainMod, H, exec, alacritty --class float -e ~/.config/hypr/scripts/help.py +bind = CTRL ALT, DELETE, exec, hyprpanel t powermenu #bind = $mainMod, V, exec, [float] alacritty --class clipse -e /home/nathan/.local/bin/clipse bind = $mainMod, V, exec, [float] kitty --class float-80 -e $clipboard -# bind = $mainMod, P, pseudo, # dwindle -bind = $mainMod, J, togglesplit, +# Layout +bind = $mainMod, J, togglesplit, # Split direction +bind = $mainMod, code:35, togglesplit, # Split direction +bind = $mainMod SHIFT, J,swapsplit # Swap master and secondary in dwindle # Move focus with mainMod + arrow keys bind = $mainMod, left, movefocus, l @@ -33,59 +32,22 @@ bind = $mainMod, right, movefocus, r bind = $mainMod, up, movefocus, u bind = $mainMod, down, movefocus, d -# Switch workspaces with mainMod + [0-9] -# bind = $mainMod ALT, 1, workspace, 1 -# bind = $mainMod ALT, 2, workspace, 2 -# bind = $mainMod ALT, 3, workspace, 3 -# bind = $mainMod ALT, 4, workspace, 4 -# bind = $mainMod ALT, 5, workspace, 5 -# bind = $mainMod ALT, 6, workspace, 6 -# bind = $mainMod ALT, 7, workspace, 7 -# bind = $mainMod ALT, 8, workspace, 8 -# bind = $mainMod ALT, 9, workspace, 9 -# bind = $mainMod ALT, 0, workspace, 10 - -# hyprlang noerror true -bind = $mainMod, 1, vdesk, 1 -bind = $mainMod, 2, vdesk, 2 -bind = $mainMod, 3, vdesk, 3 -bind = $mainMod, 4, vdesk, 4 -bind = $mainMod, 5, vdesk, 5 -bind = $mainMod, 6, vdesk, 6 -bind = $mainMod, 7, vdesk, 7 -bind = $mainMod, 8, vdesk, 8 -bind = $mainMod, 9, vdesk, 9 -bind = $mainMod, 0, vdesk, 10 - -# Move active window to a workspace with mainMod + SHIFT + [0-9] -bind = $mainMod SHIFT, 1, movetodesk, 1 -bind = $mainMod SHIFT, 2, movetodesk, 2 -bind = $mainMod SHIFT, 3, movetodesk, 3 -bind = $mainMod SHIFT, 4, movetodesk, 4 -bind = $mainMod SHIFT, 5, movetodesk, 5 -bind = $mainMod SHIFT, 6, movetodesk, 6 -bind = $mainMod SHIFT, 7, movetodesk, 7 -bind = $mainMod SHIFT, 8, movetodesk, 8 -bind = $mainMod SHIFT, 9, movetodesk, 9 -bind = $mainMod SHIFT, 0, movetodesk, 10 - -# Example special workspace (scratchpad) +# Dedicated special workspace for terminal bind = $mainMod, S, togglespecialworkspace, terminal bind = $mainMod CTRL, S, movetoworkspace, special:terminal +bind = CTRL ALT, TAB, togglespecialworkspace, terminal +# Screenshots bind = $mainMod SHIFT, S, exec, hyprshot -m region bind = $mainMod CTRL SHIFT, S, exec, hyprshot -m window -m active -# hyprlang noerror true - - # Used to use overview:toggle, but that resises the windows # bind = $mainMod, TAB, overview:toggle # bind = CTRL ALT, TAB, overview:toggle +# hyprlang noerror true + bind = $mainMod, TAB, hyprexpo:expo, toggle -bind = ALT, TAB, lastdesk -bind = CTRL ALT, TAB, togglespecialworkspace, terminal # hyprlang noerror false @@ -155,7 +117,6 @@ bind = , 3, togglespecialworkspace, alternate bind = , 3, submap, reset - bind = , T, exec, hyprctl notify 5 2000 0 "Select text to copy to clipboard..." bind = , T, exec, ~/.config/OCR4Linux/OCR4Linux.sh --lang eng -r bind = , T, submap, reset diff --git a/.config/hypr/plugins/split-monitor-workspaces.conf b/.config/hypr/plugins/split-monitor-workspaces.conf new file mode 100644 index 0000000..dc718da --- /dev/null +++ b/.config/hypr/plugins/split-monitor-workspaces.conf @@ -0,0 +1,31 @@ +# https://github.com/Duckonaut/split-monitor-workspaces + +bind = $mainMod, 1, split-workspace, 1 +bind = $mainMod, 2, split-workspace, 2 +bind = $mainMod, 3, split-workspace, 3 +bind = $mainMod, 4, split-workspace, 4 +bind = $mainMod, 5, split-workspace, 5 +bind = $mainMod, 6, split-workspace, 6 +bind = $mainMod, 7, split-workspace, 7 +bind = $mainMod, 8, split-workspace, 8 +bind = $mainMod, 9, split-workspace, 9 +bind = $mainMod, 0, split-workspace, 10 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = $mainMod SHIFT, 1, split-movetoworkspace, 1 +bind = $mainMod SHIFT, 2, split-movetoworkspace, 2 +bind = $mainMod SHIFT, 3, split-movetoworkspace, 3 +bind = $mainMod SHIFT, 4, split-movetoworkspace, 4 +bind = $mainMod SHIFT, 5, split-movetoworkspace, 5 +bind = $mainMod SHIFT, 6, split-movetoworkspace, 6 +bind = $mainMod SHIFT, 7, split-movetoworkspace, 7 +bind = $mainMod SHIFT, 8, split-movetoworkspace, 8 +bind = $mainMod SHIFT, 9, split-movetoworkspace, 9 +bind = $mainMod SHIFT, 0, split-movetoworkspace, 10 + +bind = ALT, TAB, lastdesk + +# Window rules for sticky apps +windowrule = workspace 5, class:vesktop +windowrule = workspace 5, class:org.telegram.desktop +windowrule = workspace 5, class:Slack diff --git a/.config/hypr/plugins/virtual-desktops.conf b/.config/hypr/plugins/virtual-desktops.conf new file mode 100644 index 0000000..82a033c --- /dev/null +++ b/.config/hypr/plugins/virtual-desktops.conf @@ -0,0 +1,44 @@ +# https://github.com/levnikmyskin/hyprland-virtual-desktops + +bind = $mainMod, 1, vdesk, 1 +bind = $mainMod, 2, vdesk, 2 +bind = $mainMod, 3, vdesk, 3 +bind = $mainMod, 4, vdesk, 4 +bind = $mainMod, 5, vdesk, 5 +bind = $mainMod, 6, vdesk, 6 +bind = $mainMod, 7, vdesk, 7 +bind = $mainMod, 8, vdesk, 8 +bind = $mainMod, 9, vdesk, 9 +bind = $mainMod, 0, vdesk, 10 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = $mainMod SHIFT, 1, movetodesk, 1 +bind = $mainMod SHIFT, 2, movetodesk, 2 +bind = $mainMod SHIFT, 3, movetodesk, 3 +bind = $mainMod SHIFT, 4, movetodesk, 4 +bind = $mainMod SHIFT, 5, movetodesk, 5 +bind = $mainMod SHIFT, 6, movetodesk, 6 +bind = $mainMod SHIFT, 7, movetodesk, 7 +bind = $mainMod SHIFT, 8, movetodesk, 8 +bind = $mainMod SHIFT, 9, movetodesk, 9 +bind = $mainMod SHIFT, 0, movetodesk, 10 + +bind = ALT, TAB, lastdesk + +stickyrule = class:discord,5 +stickyrule = class:vesktop,5 +stickyrule = class:org.telegram.desktop,5 +stickyrule = class:Slack,5 + +gesture = 3, right, dispatcher, prevdesk +gesture = 3, left, dispatcher, nextdesk + +plugin { + virtual-desktops { + names = 1:Coding, 2:Internet, 3:3,4:4, 5:Social + cycleworkspaces = 0 + rememberlayout = none + notifyinit = 0 + verbose_logging = 0 + } +} \ No newline at end of file diff --git a/.config/hypr/scripts/exec-once.sh b/.config/hypr/scripts/exec-once.sh index d554afc..a6016b9 100755 --- a/.config/hypr/scripts/exec-once.sh +++ b/.config/hypr/scripts/exec-once.sh @@ -11,10 +11,12 @@ nextcloud & # discord --start-minimized & Using vesktop now sleep 2 -vesktop --start-minimized & +vesktop --ozone-platform-hint=auto --start-minimized & kdeconnect-indicator & WallRizz -r -n -d ~/.config/backgrounds +walker --gapplication-service & + # Misc /home/nathan/scripts/mute.sh diff --git a/.config/hypr/scripts/stats.sh b/.config/hypr/scripts/stats.sh index 3a3f69b..28d9b01 100755 --- a/.config/hypr/scripts/stats.sh +++ b/.config/hypr/scripts/stats.sh @@ -80,15 +80,7 @@ else fi # Get WIFI SSID if connected -WIFI_SSID="" -if command -v nmcli >/dev/null 2>&1; then - WIFI_SSID=$(nmcli -t -f active,ssid dev wifi | grep '^yes:' | cut -d: -f2) -fi -if [ -n "$WIFI_SSID" ]; then - echo " SSID: ${WIFI_SSID} (${INTERNET_STATUS})" -else - echo " Internet: ${INTERNET_STATUS}" -fi +echo " Internet: ${INTERNET_STATUS}" # Get network info for each active interface for IFACE in $(ls /sys/class/net/ | grep -E '^(en|wl|wg|tailscale|tun)'); do @@ -108,4 +100,4 @@ for IFACE in $(ls /sys/class/net/ | grep -E '^(en|wl|wg|tailscale|tun)'); do fi done -curl https://wttr.in/Canberra\?format\="%l:+%t+UV:+%u" \ No newline at end of file +# curl https://wttr.in/Canberra\?format\="%l:+%t+UV:+%u" \ No newline at end of file diff --git a/.config/hypr/windowrules.conf b/.config/hypr/windowrules.conf index d6f6235..2ef24ba 100644 --- a/.config/hypr/windowrules.conf +++ b/.config/hypr/windowrules.conf @@ -1,4 +1,4 @@ -# hyprlang noerror true + # Default floating rules to stop windows being too large or small windowrulev2 = size <80% <80%,floating:1 @@ -28,24 +28,17 @@ windowrulev2 = move onscreen cursor,class:^(brave-)(.*)(-.*)$ windowrulev2 = move onscreen cursor -50% 0,class:^(com.nextcloud.desktopclient.nextcloud)$ windowrulev2 = float,class:^(com.nextcloud.desktopclient.nextcloud)$ -windowrulev2 = size 800px, 500px,class:^(com.nextcloud.desktopclient.nextcloud)$ - -# # Start windows -stickyrule = class:discord,5 -stickyrule = class:vesktop,5 -stickyrule = class:org.telegram.desktop,5 -stickyrule = class:Slack,5 - +windowrule = size 800 500,class:^(com.nextcloud.desktopclient.nextcloud)$ workspace = special:gromit, gapsin:0, gapsout:0, shadow:0, on-created-empty: gromit-mpx -a windowrule = noblur, class:^(Gromit-mpx)$ -windowrule = opacity 1 override, 1 override, class:^(Gromit-mpx)$ +windowrule = opacity 1 override 1 override, class:^(Gromit-mpx)$ windowrule = noshadow, class:^(Gromit-mpx)$ windowrule = size 100% 100%, class:^(Gromit-mpx)$ # Floating broken windows -windowrule = opacity 1 override 1 override class:^(xdg-desktop-portal-gtk)$ +windowrule = opacity 1 override 1 override, class:^(xdg-desktop-portal-gtk)$ windowrule = stayfocused, class:^(xdg-desktop-portal-gtk)$ windowrule = stayfocused, class:^(soffice)$ windowrule = stayfocused, class:^(virt-manager)$, title:^$ @@ -60,23 +53,21 @@ windowrulev2 = stayfocused, class:^(Sparrow)$, title:^$, xwayland:1 # No Opacity windowrules -windowrule = opacity 1 override 1 override class:brave-browser -windowrule = opacity 1 override 1 override class:mpv -windowrule = opacity 1 override 1 override class:virt-manager -windowrule = opacity 1 override 1 override class:^(Bootstrap Studio)$ -windowrule = opacity 1 override 1 override class:^(Minecraft)(.*)$ -windowrule = opacity 1 override 1 override class:^(gimp)$ -windowrule = opacity 1 override 1 override class:^(com.obsproject.Studio)$ -windowrule = opacity 1 override 1 override class:^$ +windowrule = opacity 1 override 1 override, class:^(brave-browser)$ +windowrule = opacity 1 override 1 override, class:^(mpv)$ +windowrule = opacity 1 override 1 override, class:^(virt-manager)$ +windowrule = opacity 1 override 1 override, class:^(Bootstrap Studio)$ +windowrule = opacity 1 override 1 override, class:^(Minecraft)(.*)$ +windowrule = opacity 1 override 1 override, class:^(gimp)$ +windowrule = opacity 1 override 1 override, class:^(com.obsproject.Studio)$ +windowrule = opacity 1 override 1 override, class:^$ # Disable opacity for Alacritty (as it already has a transparent background) -windowrule = opacity 1 override 0.75 override class:^(Alacritty)$ +windowrule = opacity 1 override 0.75 override, class:^(Alacritty)$ workspace = special:terminal, on-created-empty: alacritty -# hyprlang noerror false - # Tags for opacity windowrule = opacity 0.1 override 0.1 override, tag:opacity:0.1 windowrule = opacity 0.2 override 0.2 override, tag:opacity:0.2 @@ -91,15 +82,15 @@ windowrule = opacity 1 override 1 override, tag:opacity:1 # freeRDP - Remote Desktop Protocol Client -windowrulev2 = float, xclass:xfreerdp +windowrule = float, class:^(xfreerdp)$ # match by X11 WM_CLASS you set in xfreerdp -windowrulev2 = float, xclass:Autodesk Fusion -windowrulev2 = center, xclass:Autodesk Fusion +windowrule = float, class:^(Autodesk Fusion)$ +windowrule = center, class:^(Autodesk Fusion)$ # prevent tiling / auto-fullscreen for these windows #windowrulev2 = disableautotile, xclass:Autodesk Fusion -windowrule = float, xclass:Autodesk Fusion +windowrule = float, class:^(Autodesk Fusion)$ # optionally force borderless (if you prefer) -windowrulev2 = noborder, xclass:Autodesk Fusion +windowrule = noborder, class:^(Autodesk Fusion)$