diff options
| author | Donald Williams <129223418+dwilliam62@users.noreply.github.com> | 2025-12-29 09:41:55 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-29 09:41:55 -0500 |
| commit | 4e8cb959c0fbf0109dbb3d4342d8aaa2e4c1d470 (patch) | |
| tree | 944daf4ad373740460ca66a76e58bae839f54905 /config | |
| parent | 59713a66e3dce8b2c006dc1ce7847b761d759147 (diff) | |
| parent | cafaa576cbe7018f4c3ef3301fde16b807e74190 (diff) | |
Merge branch 'development' into patch-3
Diffstat (limited to 'config')
| -rw-r--r-- | config/hypr/configs/Keybinds.conf | 4 | ||||
| -rw-r--r-- | config/hypr/configs/Startup_Apps.conf | 1 | ||||
| -rwxr-xr-x | config/hypr/scripts/ChangeLayout.sh | 31 | ||||
| -rwxr-xr-x | config/hypr/scripts/Volume.sh | 63 | ||||
| -rwxr-xr-x | config/hypr/scripts/WallustSwww.sh | 3 |
5 files changed, 69 insertions, 33 deletions
diff --git a/config/hypr/configs/Keybinds.conf b/config/hypr/configs/Keybinds.conf index 1ddbc81a..ddc516bc 100644 --- a/config/hypr/configs/Keybinds.conf +++ b/config/hypr/configs/Keybinds.conf @@ -97,6 +97,8 @@ bindd = $mainMod, P, toggle pseudo (dwindle), pseudo, # Works on either layout (Master or Dwindle) bindd = $mainMod, M, set split ratio 0.3, exec, hyprctl dispatch splitratio 0.3 +# layout aware keybinds +exec-once = $scriptsDir/ChangeLayout.sh init # Cycle windows; if floating bring to top @@ -106,6 +108,8 @@ bindd = ALT, tab, bring active to top, bringactivetotop # Special Keys / Hot Keys bindeld = , xf86audioraisevolume, volume up, exec, $scriptsDir/Volume.sh --inc bindeld = , xf86audiolowervolume, volume down, exec, $scriptsDir/Volume.sh --dec +bindeld = ALT, xf86audioraisevolume, volume up precise, exec, $scriptsDir/Volume.sh --inc-precise +bindeld = ALT, xf86audiolowervolume, volume down precise, exec, $scriptsDir/Volume.sh --dec-precise bindld = , xf86AudioMicMute, toggle mic mute, exec, $scriptsDir/Volume.sh --toggle-mic bindld = , xf86audiomute, toggle mute, exec, $scriptsDir/Volume.sh --toggle bindld = , xf86Sleep, sleep, exec, systemctl suspend diff --git a/config/hypr/configs/Startup_Apps.conf b/config/hypr/configs/Startup_Apps.conf index 0cfb6427..27c8d26a 100644 --- a/config/hypr/configs/Startup_Apps.conf +++ b/config/hypr/configs/Startup_Apps.conf @@ -19,7 +19,6 @@ exec-once = swww-daemon --format xrgb ### Startup ### exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP -exec-once = $scriptsDir/KeybindsLayoutInit.sh # Drop Down terminal # See Bug#810 https://github.com/JaKooLit/Hyprland-Dots/issues/810#issuecomment-3351947644 diff --git a/config/hypr/scripts/ChangeLayout.sh b/config/hypr/scripts/ChangeLayout.sh index e2436b79..221f9637 100755 --- a/config/hypr/scripts/ChangeLayout.sh +++ b/config/hypr/scripts/ChangeLayout.sh @@ -6,19 +6,34 @@ notif="$HOME/.config/swaync/images/ja.png" LAYOUT=$(hyprctl -j getoption general:layout | jq '.str' | sed 's/"//g') +# Reverse layout value to reuse toggle logic. So layouts don't get swapped initially. +if [ "$1" = "init" ]; then + if [ "$LAYOUT" = "master" ]; then + LAYOUT="dwindle" + else + LAYOUT="master" + fi +fi + case $LAYOUT in "master") - hyprctl keyword general:layout dwindle - # SUPER+J/K are global and managed by KeybindsLayoutInit.sh; only manage SUPER+O here - hyprctl keyword bind SUPER,O,togglesplit + hyprctl keyword general:layout dwindle + hyprctl keyword unbind SUPER,J + hyprctl keyword unbind SUPER,K + hyprctl keyword bind SUPER,J,cyclenext + hyprctl keyword bind SUPER,K,cyclenext,prev + hyprctl keyword bind SUPER,O,togglesplit notify-send -e -u low -i "$notif" " Dwindle Layout" - ;; + ;; "dwindle") - hyprctl keyword general:layout master - # Drop togglesplit binding on SUPER+O when switching back to master - hyprctl keyword unbind SUPER,O + hyprctl keyword general:layout master + hyprctl keyword unbind SUPER,J + hyprctl keyword unbind SUPER,K + hyprctl keyword unbind SUPER,O + hyprctl keyword bind SUPER,J,layoutmsg,cyclenext + hyprctl keyword bind SUPER,K,layoutmsg,cycleprev notify-send -e -u low -i "$notif" " Master Layout" - ;; + ;; *) ;; esac diff --git a/config/hypr/scripts/Volume.sh b/config/hypr/scripts/Volume.sh index 4c82f543..d870519c 100755 --- a/config/hypr/scripts/Volume.sh +++ b/config/hypr/scripts/Volume.sh @@ -44,7 +44,7 @@ inc_volume() { if [ "$(pamixer --get-mute)" == "true" ]; then toggle_mute else - pamixer -i 5 --allow-boost --set-limit 150 && notify_user + pamixer -i "$1" --allow-boost --set-limit 150 && notify_user fi } @@ -53,7 +53,7 @@ dec_volume() { if [ "$(pamixer --get-mute)" == "true" ]; then toggle_mute else - pamixer -d 5 && notify_user + pamixer -d "$1" && notify_user fi } @@ -120,24 +120,41 @@ dec_mic_volume() { } # Execute accordingly -if [[ "$1" == "--get" ]]; then - get_volume -elif [[ "$1" == "--inc" ]]; then - inc_volume -elif [[ "$1" == "--dec" ]]; then - dec_volume -elif [[ "$1" == "--toggle" ]]; then - toggle_mute -elif [[ "$1" == "--toggle-mic" ]]; then - toggle_mic -elif [[ "$1" == "--get-icon" ]]; then - get_icon -elif [[ "$1" == "--get-mic-icon" ]]; then - get_mic_icon -elif [[ "$1" == "--mic-inc" ]]; then - inc_mic_volume -elif [[ "$1" == "--mic-dec" ]]; then - dec_mic_volume -else - get_volume -fi
\ No newline at end of file +case "$1" in +"--get") + get_volume + ;; +"--inc") + inc_volume 5 + ;; +"--inc-precise") + inc_volume 1 + ;; +"--dec") + dec_volume 5 + ;; +"--dec-precise") + dec_volume 1 + ;; +"--toggle") + toggle_mute + ;; +"--toggle-mic") + toggle_mic + ;; +"--get-icon") + get_icon + ;; +"--get-mic-icon") + get_mic_icon + ;; +"--mic-inc") + inc_mic_volume + ;; +"--mic-dec") + dec_mic_volume + ;; +*) + get_volume + ;; +esac diff --git a/config/hypr/scripts/WallustSwww.sh b/config/hypr/scripts/WallustSwww.sh index 657f41ab..f3da3e35 100755 --- a/config/hypr/scripts/WallustSwww.sh +++ b/config/hypr/scripts/WallustSwww.sh @@ -40,7 +40,8 @@ else if [[ -f "$cache_file" ]]; then # The first non-filter line is the original wallpaper path # wallpaper_path="$(grep -v 'Lanczos3' "$cache_file" | head -n 1)" - wallpaper_path=$(swww query | grep $current_monitor | awk '{print $9}') + # wallpaper_path=$(swww query | grep $current_monitor | awk '{print $9}') + wallpaper_path=$(swww query | sed 's/.*image: //') fi fi |
