14 lines
196 B
Bash
Executable file
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
|