18 lines
335 B
Plaintext
18 lines
335 B
Plaintext
|
#!/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
|