diff --git a/home/.config/hypr/hyprland.conf b/home/.config/hypr/hyprland.conf index 7d66088..1aea81f 100644 --- a/home/.config/hypr/hyprland.conf +++ b/home/.config/hypr/hyprland.conf @@ -215,7 +215,7 @@ bind = SUPER, W, killactive, bind = SUPER, F, togglefloating, bind = SUPER, Space, fullscreen, 0 bind = SUPER_SHIFT, Space, fullscreen, 1 -bind = CTRL_SHIFT, Space, fakefullscreen, +bind = CTRL_SHIFT, Space, exec, toggle-fakefullscreen bind = SUPER, P, exec, bash -c "if hyprctl activewindow | grep 'floating: 0'; then hyprctl dispatch togglefloating active; fi; hyprctl dispatch pin active" bind = SUPER_SHIFT, P, pseudo, bind = SUPER_SHIFT, S, togglesplit, diff --git a/home/.local/bin/scripts/gui/hyprland/toggle-fakefullscreen b/home/.local/bin/scripts/gui/hyprland/toggle-fakefullscreen new file mode 100755 index 0000000..a718c99 --- /dev/null +++ b/home/.local/bin/scripts/gui/hyprland/toggle-fakefullscreen @@ -0,0 +1,22 @@ +#!/bin/bash + +#ACTIVE_BORDER_COLOR="0xFF327BD1" +ACTIVE_BORDER_COLOR="0xFFFF6600" +DEFAULT_BORDER_COLOR="0xFFFFA500" + +hyprctl dispatch fakefullscreen "" + +fullscreen_status="$(hyprctl activewindow -j | jq '.fakeFullscreen')" +if [ "$fullscreen_status" = "null" ]; then + echo "Update your hyprland, 'fakeFullscreen' window property not found." + exit 1 +elif [ "$fullscreen_status" = "true" ]; then + window_address="$(hyprctl activewindow -j | jq -r '.address')" + hyprctl setprop "address:$window_address" activebordercolor "$ACTIVE_BORDER_COLOR" lock +elif [ "$fullscreen_status" = "false" ]; 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" + exit 1 +fi