From bd6ee35e498cf27e50a23939e9974ec7ff29aafd Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Fri, 29 Mar 2024 06:58:54 +0300 Subject: [PATCH] Sway : Use on/off again. --- module/sway/bin/monoff | 3 +++ module/sway/bin/monon | 3 +++ module/sway/bin/montoggle | 17 ----------------- module/sway/bin/vrroff | 3 +++ module/sway/bin/vrron | 3 +++ module/sway/bin/vrrtoggle | 17 ----------------- 6 files changed, 12 insertions(+), 34 deletions(-) create mode 100755 module/sway/bin/monoff create mode 100755 module/sway/bin/monon delete mode 100755 module/sway/bin/montoggle create mode 100755 module/sway/bin/vrroff create mode 100755 module/sway/bin/vrron delete mode 100755 module/sway/bin/vrrtoggle diff --git a/module/sway/bin/monoff b/module/sway/bin/monoff new file mode 100755 index 0000000..3fab0f5 --- /dev/null +++ b/module/sway/bin/monoff @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +swaymsg 'output "ASUSTek COMPUTER INC ASUS VA24E R2LMTF127165" power off' diff --git a/module/sway/bin/monon b/module/sway/bin/monon new file mode 100755 index 0000000..53bbe88 --- /dev/null +++ b/module/sway/bin/monon @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +swaymsg 'output "ASUSTek COMPUTER INC ASUS VA24E R2LMTF127165" power on' diff --git a/module/sway/bin/montoggle b/module/sway/bin/montoggle deleted file mode 100755 index 7c902ef..0000000 --- a/module/sway/bin/montoggle +++ /dev/null @@ -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 diff --git a/module/sway/bin/vrroff b/module/sway/bin/vrroff new file mode 100755 index 0000000..475f9f4 --- /dev/null +++ b/module/sway/bin/vrroff @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +swaymsg 'output "Huawei Technologies Co., Inc. ZQE-CBA 0xC080F622" adaptive_sync off' diff --git a/module/sway/bin/vrron b/module/sway/bin/vrron new file mode 100755 index 0000000..dca0bda --- /dev/null +++ b/module/sway/bin/vrron @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +swaymsg 'output "Huawei Technologies Co., Inc. ZQE-CBA 0xC080F622" adaptive_sync on' diff --git a/module/sway/bin/vrrtoggle b/module/sway/bin/vrrtoggle deleted file mode 100755 index 6c6bcf2..0000000 --- a/module/sway/bin/vrrtoggle +++ /dev/null @@ -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