From d4219d9d1847969d90af0ddb312e35144c037352 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Mon, 23 Sep 2024 21:37:34 +0200 Subject: [PATCH] Update fullscreen keybinds (use the new fullscreenstate) --- .../graphical/wms/hyprland/config/keybinds.nix | 6 ++++-- .../toggle-fake-fullscreen/toggle-fake-fullscreen.sh | 10 +++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/home/programs/graphical/wms/hyprland/config/keybinds.nix b/home/programs/graphical/wms/hyprland/config/keybinds.nix index e1f632e..af94159 100644 --- a/home/programs/graphical/wms/hyprland/config/keybinds.nix +++ b/home/programs/graphical/wms/hyprland/config/keybinds.nix @@ -24,8 +24,10 @@ in { # "SUPER, W, killactive," "SUPER, F, togglefloating," - "SUPER, Space, fullscreen, 0" - "SUPER_SHIFT, Space, fullscreen, 1" # maximize + "SUPER, Space, fullscreen, 0" # regular fullscreen + "SUPER_SHIFT, Space, fullscreen, 1" # maximize without client fullscreen + "SUPER_CTRL, Space, fullscreenstate, 2, 0" # fullscreen without client knowing + "SUPER_CTRL_SHIFT, Space, fullscreenstate, 1, 2" # maximize with client being full-screen "CTRL_SHIFT, Space, exec, toggle-fake-fullscreen" # fake fullscreen + custom border "SUPER_SHIFT, S, layoutmsg, togglesplit" diff --git a/home/programs/graphical/wms/hyprland/packages/toggle-fake-fullscreen/toggle-fake-fullscreen.sh b/home/programs/graphical/wms/hyprland/packages/toggle-fake-fullscreen/toggle-fake-fullscreen.sh index 69f2666..5e102ae 100644 --- a/home/programs/graphical/wms/hyprland/packages/toggle-fake-fullscreen/toggle-fake-fullscreen.sh +++ b/home/programs/graphical/wms/hyprland/packages/toggle-fake-fullscreen/toggle-fake-fullscreen.sh @@ -4,19 +4,19 @@ ACTIVE_BORDER_COLOR="0xFFFF6600" DEFAULT_BORDER_COLOR="0xFFFFA500" -hyprctl dispatch fakefullscreen "" +hyprctl dispatch fullscreenstate -1 2 -fullscreen_status="$(hyprctl activewindow -j | jq '.fakeFullscreen')" +fullscreen_status="$(hyprctl activewindow -j | jq '.fullscreenClient')" if [ "$fullscreen_status" = "null" ]; then echo "Update your hyprland, 'fakeFullscreen' window property not found." exit 1 -elif [ "$fullscreen_status" = "true" ]; then +elif [ "$fullscreen_status" = "2" ]; then window_address="$(hyprctl activewindow -j | jq -r '.address')" hyprctl setprop "address:$window_address" activebordercolor "$ACTIVE_BORDER_COLOR" lock -elif [ "$fullscreen_status" = "false" ]; then +elif [ "$fullscreen_status" = "0" ]; then window_address="$(hyprctl activewindow -j | jq -r '.address')" hyprctl setprop "address:$window_address" activebordercolor "$DEFAULT_BORDER_COLOR" else - echo "Unexpected output from 'fakeFullscreen' window property: $fullscreen_status" + echo "Unexpected output from 'fullscreenClient' window property: $fullscreen_status" exit 1 fi