18 lines
308 B
Plaintext
18 lines
308 B
Plaintext
|
#!/usr/bin/env bash
|
||
|
|
||
|
IFS=$'\n'
|
||
|
monitors=(
|
||
|
"ASUSTek COMPUTER INC ASUS VA24E R2LMTF127165"
|
||
|
)
|
||
|
|
||
|
disabled="$(swaymsg -t get_outputs | grep power.*false)"
|
||
|
if [[ "${disabled}" = "" ]]; then
|
||
|
action="off"
|
||
|
else
|
||
|
action="on"
|
||
|
fi
|
||
|
|
||
|
for monitor in ${monitors[@]}; do
|
||
|
swaymsg "output \"${monitor}\" power ${action}"
|
||
|
done
|