Sway : Use toggles for vrr and monitor.
This commit is contained in:
parent
07eaa788ec
commit
e310f16479
|
@ -44,10 +44,8 @@
|
|||
variables = {
|
||||
FOOT_CONFIG = ./foot/Foot.ini;
|
||||
SWAY_CONFIG = ./sway/module;
|
||||
PATH = [ "/etc/swaybin" ];
|
||||
};
|
||||
etc.swaybin.source = ./sway/bin;
|
||||
extraInit = ''
|
||||
export PATH="/etc/swaybin:$PATH"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
swaymsg 'output "ASUSTek COMPUTER INC ASUS VA24E R2LMTF127165" power off'
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
swaymsg 'output "ASUSTek COMPUTER INC ASUS VA24E R2LMTF127165" power on'
|
17
module/sway/bin/montoggle
Executable file
17
module/sway/bin/montoggle
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/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
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
swaymsg 'output "Huawei Technologies Co., Inc. ZQE-CBA 0xC080F622" adaptive_sync off'
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
swaymsg 'output "Huawei Technologies Co., Inc. ZQE-CBA 0xC080F622" adaptive_sync on'
|
17
module/sway/bin/vrrtoggle
Executable file
17
module/sway/bin/vrrtoggle
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/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
|
|
@ -21,14 +21,8 @@ bindsym $mod+Shift+c reload
|
|||
bindsym $mod+Shift+z exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
|
||||
|
||||
# Show last notification.
|
||||
bindsym $mod+m exec makoctl restore
|
||||
bindsym $mod+shift+m exec makoctl dismiss --all
|
||||
|
||||
# Bluetooth.
|
||||
bindsym $mod+b exec 'blueman-manager'
|
||||
|
||||
# NetworkManager.
|
||||
bindsym $mod+n exec 'nm-connection-editor'
|
||||
bindsym $mod+n exec makoctl restore
|
||||
bindsym $mod+shift+n exec makoctl dismiss --all
|
||||
|
||||
# Brightness
|
||||
bindsym XF86MonBrightnessDown exec light -U 10
|
||||
|
@ -38,6 +32,3 @@ bindsym XF86MonBrightnessUp exec light -A 10
|
|||
bindsym XF86AudioRaiseVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ +1%'
|
||||
bindsym XF86AudioLowerVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ -1%'
|
||||
bindsym XF86AudioMute exec 'pactl set-sink-mute @DEFAULT_SINK@ toggle'
|
||||
|
||||
# Open sound control. # NOTE: Get id with `swaymsg -t get_tree`.
|
||||
bindsym $mod+p exec 'pavucontrol'
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# Sway has a "scratchpad", which is a bag of holding for windows.
|
||||
# You can send windows there and get them back later.
|
||||
# NOTE: Get id with `swaymsg -t get_tree`.
|
||||
|
||||
# Move the currently focused window to the scratchpad
|
||||
bindsym $mod+shift+return move scratchpad
|
||||
|
|
|
@ -4,3 +4,6 @@ background-color=#282828
|
|||
text-color=#ffffff
|
||||
border-color=#000000
|
||||
default-timeout=5000
|
||||
width=480
|
||||
height=120
|
||||
margin=16
|
||||
|
|
Loading…
Reference in a new issue