dotfiles/templates/bin/jdisplays
2025-07-29 10:56:55 -05:00

14 lines
196 B
Bash
Executable file

#!/bin/sh
case "$1" in
0|off) onoff=off ;;
1|on) onoff=on ;;
*) exit 1 ;;
esac
if [ -e "$NIRI_SOCKET" ]
then
niri msg action power-$onoff-monitors
else
wlopm --$onoff '*'
fi