#!/bin/sh flag=$XDG_RUNTIME_DIR/.sway_fullscreen_flag-$XDG_SEAT # fullscreen -> normal if [ -f $flag ]; then polybar-msg cmd show rm $flag # normal -> fullscreen else polybar-msg cmd hide touch $flag fi swaymsg fullscreen