From 60656734f1f182ef4ff86d4f39cf014ff4053dfb Mon Sep 17 00:00:00 2001 From: Michael Housh Date: Fri, 26 Sep 2025 16:21:49 -0400 Subject: [PATCH] feat: Hyprland updates, install package updates, new close all windows script --- hypr/hyprland.conf | 10 +++++----- hypr/keybinds.conf | 3 ++- hypr/monitors.conf | 2 +- hypr/windows.conf | 6 +++--- scripts/arch/close-all-windows | 5 +++++ scripts/arch/window-toggle-floating | 15 +++++++++------ scripts/install-pkg-arch.sh | 6 ++++-- scripts/setup-dirs.sh | 2 +- waybar/style.css | 13 ++++++------- 9 files changed, 36 insertions(+), 26 deletions(-) create mode 100755 scripts/arch/close-all-windows diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index fae8500..a79bc4c 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -38,10 +38,10 @@ source = ~/.config/hypr/autostart.conf # https://wiki.hyprland.org/Configuring/Variables/#general general { - gaps_in = 3 + gaps_in = 5 gaps_out = 0, 5, 5, 5 - border_size = 1 + border_size = 2 # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg @@ -53,7 +53,7 @@ general { # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on allow_tearing = false - layout = master # dwindle or master + layout = dwindle # dwindle or master } # https://wiki.hyprland.org/Configuring/Variables/#decoration @@ -117,9 +117,9 @@ dwindle { pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + SHIFT + P in the keybinds section below preserve_split = true # You probably want this force_split = 2 # always split to the right or bottom - split_width_multiplier = 1.25 + #split_width_multiplier = 1.25 use_active_for_splits = false - default_split_ratio = 1.25 + #default_split_ratio = 1.25 split_bias = 0 } diff --git a/hypr/keybinds.conf b/hypr/keybinds.conf index 67c670d..6e4eaf8 100644 --- a/hypr/keybinds.conf +++ b/hypr/keybinds.conf @@ -47,7 +47,7 @@ bind = $mainMod, N, exec, $terminal -e nvim bind = $mainMod, P, exec, $pwa "https://pass.proton.me" bind = $mainMod SHIFT, P, pseudo, # dwindle bind = $mainMod, Y, exec, $pwa "https://youtube.com" -bind = $mainMod, V, exec, kitty --class clipse -e clipse +bind = $mainMod, V, exec, $terminal --class=com.ghostty.clipse -e clipse bind = $mainMod, W, killactive, bind = $mainMod SHIFT, R, exec, ~/.local/bin/waybar-restart @@ -62,6 +62,7 @@ bind = $mainMod SHIFT ALT, 4, exec, hyprshot -m region -o ~/Pictures bind = $mainMod SHIFT ALT, 3, exec, hyprshot -m window -o ~/Pictures bind = CTRL, F, exec, ~/.local/bin/window-toggle-floating +#bind = CTRL, F, togglefloating, # Move focus with mainMod + arrow keys bind = $mainMod, H, movefocus, l diff --git a/hypr/monitors.conf b/hypr/monitors.conf index 556cdaf..4180552 100644 --- a/hypr/monitors.conf +++ b/hypr/monitors.conf @@ -5,6 +5,6 @@ # See https://wiki.hyprland.org/Configuring/Monitors/ monitor= ,preferred,auto,auto #monitor = HDMI-A-1, preferred, 0x0, auto -monitor = HDMI-A-1, preferred, 0x0, 1.66667 +#monitor = HDMI-A-1, preferred, 0x0, 1.66667 diff --git a/hypr/windows.conf b/hypr/windows.conf index ae8fa7c..e8c4c0b 100644 --- a/hypr/windows.conf +++ b/hypr/windows.conf @@ -10,9 +10,9 @@ windowrule = float, class:^(blueberry.py)$ # Clipboard history tui in floating window. -windowrule = float, class:(clipse) -windowrule = size 622 652, class:(clipse) -windowrule = stayfocused, class:(clipse) +windowrule = float, class:.*clipse.* +windowrule = size 622 652, class:.*clipse.* +windowrule = stayfocused, class:.*clipse.* windowrule = float,class:^(float)$ diff --git a/scripts/arch/close-all-windows b/scripts/arch/close-all-windows new file mode 100755 index 0000000..8e64b99 --- /dev/null +++ b/scripts/arch/close-all-windows @@ -0,0 +1,5 @@ +#!/bin/bash + +hyprctl clients -j | \ + jq '.[] | .address' | \ + xargs -I{} hyprctl dispatch closewindow address:{} diff --git a/scripts/arch/window-toggle-floating b/scripts/arch/window-toggle-floating index b4bad06..1a5f35c 100755 --- a/scripts/arch/window-toggle-floating +++ b/scripts/arch/window-toggle-floating @@ -4,7 +4,7 @@ # The percentage of the screen size for the floating window. WIDTH_PERCENT=80 -HEIGHT_PERCENT=80 +HEIGHT_PERCENT=40 floating=$(hyprctl activewindow -j | jq '.floating') @@ -14,11 +14,14 @@ else monitor=$(hyprctl monitors -j | jq '.[] | select(.focused == true)') mw=$(echo "$monitor" | jq '.width') mh=$(echo "$monitor" | jq '.height') + ms=$(echo "$monitor" | jq '.scale') - neww=$((mw * $WIDTH_PERCENT / 100)) - newh=$((mh * $HEIGHT_PERCENT / 100)) + echo "scale: $ms" - hyprctl dispatch togglefloating \ - && hyprctl dispatch resizeactive exact $neww $newh \ - && hyprctl dispatch centerwindow + neww=$(echo "scale=6; (($mw / $ms) * $WIDTH_PERCENT / 100)" | bc) + newh=$(echo "scale=6; (($mh / $ms) * $HEIGHT_PERCENT / 100)" | bc) + + hyprctl dispatch togglefloating && + hyprctl dispatch resizeactive exact $neww $newh && + hyprctl dispatch centerwindow fi diff --git a/scripts/install-pkg-arch.sh b/scripts/install-pkg-arch.sh index 8e341c2..22042f7 100755 --- a/scripts/install-pkg-arch.sh +++ b/scripts/install-pkg-arch.sh @@ -16,6 +16,7 @@ yay -S --noconfirm --needed \ asahi-desktop-meta \ base-devel \ bat \ + bc \ btop \ catppuccin-gtk-theme-mocha \ eza \ @@ -28,6 +29,8 @@ yay -S --noconfirm --needed \ hyrpidle \ hyprlock \ neovim \ + nodejs \ + npm \ nwg-look \ pcsc-controls \ starship \ @@ -55,8 +58,7 @@ yay -S --noconfirm \ yay -S --noconfirm walker \ elephant \ elephant-calc \ - elephant-symbols \ - elephant-websearch + elephant-symbols # Bluetooth management yay -S --noconfirm blueberry-wayland diff --git a/scripts/setup-dirs.sh b/scripts/setup-dirs.sh index 0744bd0..1a40dc3 100755 --- a/scripts/setup-dirs.sh +++ b/scripts/setup-dirs.sh @@ -5,4 +5,4 @@ mkdir -p ~/.local/share/clipse/tmp_files touch ~/.local/share/clipse/clipboard_history.json chmod 600 ~/.local/share/clipse/clipboard_history.json - +mkdir ~/Pictures diff --git a/waybar/style.css b/waybar/style.css index 0d2b0dd..8e75aa1 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -11,9 +11,7 @@ font-family: JetbrainsMono Nerd Font; font-size: 15px; min-height: 0; - padding-right: 2px; - padding-left: 2px; - padding-bottom: 0px; + margin: 0px; } #waybar { @@ -23,16 +21,16 @@ } #workspaces { - border-radius: 10px; background: @background; - margin-right: 5px; - margin-left: 1rem; + border-radius: 10px; + margin-top: 5px; + margin-bottom: 5px; + margin-left: 0.4rem; } #workspaces button { color: @foreground; border-radius: 5px; - padding: 0.4rem; } #workspaces button.active { @@ -123,6 +121,7 @@ #custom-lock { border-radius: 10px; color: @yellow; + margin-right: 0.4rem; } #custom-power {