Sway : Use on/off again.
This commit is contained in:
parent
e310f16479
commit
bd6ee35e49
3
module/sway/bin/monoff
Executable file
3
module/sway/bin/monoff
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
swaymsg 'output "ASUSTek COMPUTER INC ASUS VA24E R2LMTF127165" power off'
|
3
module/sway/bin/monon
Executable file
3
module/sway/bin/monon
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
swaymsg 'output "ASUSTek COMPUTER INC ASUS VA24E R2LMTF127165" power on'
|
|
@ -1,17 +0,0 @@
|
|||
#!/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
|
3
module/sway/bin/vrroff
Executable file
3
module/sway/bin/vrroff
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
swaymsg 'output "Huawei Technologies Co., Inc. ZQE-CBA 0xC080F622" adaptive_sync off'
|
3
module/sway/bin/vrron
Executable file
3
module/sway/bin/vrron
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
swaymsg 'output "Huawei Technologies Co., Inc. ZQE-CBA 0xC080F622" adaptive_sync on'
|
|
@ -1,17 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
IFS=$'\n'
|
||||
monitors=(
|
||||
"Huawei Technologies Co., Inc. ZQE-CBA 0xC080F622"
|
||||
)
|
||||
|
||||
enabled="$(swaymsg -t get_outputs | grep adaptive_sync_status.*enabled)"
|
||||
if [[ "${enabled}" = "" ]]; then
|
||||
action="on"
|
||||
else
|
||||
action="off"
|
||||
fi
|
||||
|
||||
for monitor in ${monitors[@]}; do
|
||||
swaymsg "output \"${monitor}\" adaptive_sync ${action}"
|
||||
done
|
Loading…
Reference in a new issue