From 3eac1701cac4e90a28c07cafe090ccf571d95724 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 8 Jan 2024 10:29:15 +0800 Subject: [PATCH] sway keybinds --- .config/sway/conf.d/custom.d/outputs | 23 +++++++++++------------ .config/sway/conf.d/keybinds | 2 +- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.config/sway/conf.d/custom.d/outputs b/.config/sway/conf.d/custom.d/outputs index c19143f..bcdf3e1 100644 --- a/.config/sway/conf.d/custom.d/outputs +++ b/.config/sway/conf.d/custom.d/outputs @@ -1,11 +1,19 @@ output * adaptive_sync on # 75hz monitor -output 'Lectron Company Ltd LECOO M2412HL GG30A137' mode 2560x1440@74.968Hz -output 'Lectron Company Ltd LECOO M2412HL GG30A137' subpixel rgb +output 'Lectron Company Ltd LECOO M2412HL GG30A137' mode 2560x1440@75Hz output 'Lectron Company Ltd LECOO M2412HL GG30A137' pos 0 500 +output 'Lectron Company Ltd LECOO M2412HL GG30A137' subpixel rgb # output 'Lectron Company Ltd LECOO M2412HL GG30A137' max_render_time 5 -output 'Lectron Company Ltd LECOO M2412HL GG30A137' render_bit_depth 10 + +# lab screen +output "XMI Redmi 27 NU 3948622WH08F4" mode --custom 3840x2160@35.000Hz +output "XMI Redmi 27 NU 3948622WH08F4" scale 1.5 +output "XMI Redmi 27 NU 3948622WH08F4" transform 90 +output "XMI Redmi 27 NU 3948622WH08F4" pos 2560 0 +output "XMI Redmi 27 NU 3948622WH08F4" subpixel rgb +output "XMI Redmi 27 NU 3948622WH08F4" max_render_time 3 +output "XMI Redmi 27 NU 3948622WH08F4" render_bit_depth 10 # laptop screen output 'Thermotrex Corporation TL160ADMP03-0 Unknown' subpixel rgb @@ -18,12 +26,3 @@ output 'Thermotrex Corporation TL160ADMP03-0 Unknown' mode 2560x1600@60.000Hz # TV at home output 'Unknown HUAWEI INC 0x00000000' mode 3840x2160@60.000Hz output 'Unknown HUAWEI INC 0x00000000' scale 2 - -# lab screen -output "XMI Redmi 27 NU 3948622WH08F4" mode --custom 2560x1440@75.000Hz -output "XMI Redmi 27 NU 3948622WH08F4" transform 90 -output "XMI Redmi 27 NU 3948622WH08F4" pos 2560 0 -output "XMI Redmi 27 NU 3948622WH08F4" subpixel rgb -# output "XMI Redmi 27 NU 3948622WH08F4" max_render_time off -# output "XMI Redmi 27 NU 3948622WH08F4" scale 1.5 -output "XMI Redmi 27 NU 3948622WH08F4" render_bit_depth 10 diff --git a/.config/sway/conf.d/keybinds b/.config/sway/conf.d/keybinds index 0d651bf..5dbb2d1 100644 --- a/.config/sway/conf.d/keybinds +++ b/.config/sway/conf.d/keybinds @@ -36,7 +36,7 @@ bindsym --whole-window $mod+button9 workspace next # bind fn keys bindsym XF86AudioMicMute exec amixer set Capture toggle exec mkfifo $SWAYSOCK.wob && tail -f $SWAYSOCK.wob | wob -bindsym XF86AudioRaiseVolume exec wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 2% && pactl get-sink-volume @DEFAULT_SINK@ | head -n 1| awk '{print substr($5, 1, length($5)-1)}' > $SWAYSOCK.wob +bindsym XF86AudioRaiseVolume exec wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 2%+ && pactl get-sink-volume @DEFAULT_SINK@ | head -n 1| awk '{print substr($5, 1, length($5)-1)}' > $SWAYSOCK.wob bindsym XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%- && pactl get-sink-volume @DEFAULT_SINK@ | head -n 1 | awk '{print substr($5, 1, length($5)-1)}' > $SWAYSOCK.wob bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle && ~/.config/sway/scripts/getmute.sh > $SWAYSOCK.wob bindsym XF86MonBrightnessUp exec light -A 5 && light -G | cut -d'.' -f1 > $SWAYSOCK.wob