dotfiles/templates/bin/jdisplays

10 lines
184 B
Bash
Executable file

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