Files
.dotfiles/.local/bin/xfullscreen-toggle
Quinn 519455fac7 start using GNU stow
add more configurations to the dotfiles directory
2025-05-30 15:34:13 +02:00

15 lines
335 B
Bash
Executable File

#!/bin/sh
WIN=$(xdotool getwindowfocus)
STATE=$(xprop -id "$WIN" _NET_WM_STATE)
# check if fullscreen is present in the state
if echo "$STATE" | grep -q '_NET_WM_STATE_FULLSCREEN'; then
wmctrl -ir "$WIN" -b remove,fullscreen
exit $?
else
# If not fullscreen, add it
wmctrl -ir "$WIN" -b add,fullscreen
exit $?
fi