Add toggle-fake-fullscreen script

This commit is contained in:
ItsDrike 2024-06-21 16:13:23 +02:00
parent 036b1a9064
commit 3cb701b042
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
5 changed files with 40 additions and 1 deletions

View file

@ -0,0 +1,22 @@
#!/usr/bin/env 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