Files
.dotfiles/.local/bin/xfullscreen-toggle
Quinn 9ece4e28de move xdg directories to the default location.
a lot of applications seem to hardcode this location, so it's better to
have something default, or default-adjasoned.
2025-11-19 10:08:24 +01:00

15 lines
339 B
Bash
Executable File

#!/usr/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