chore(sway): update config
This commit is contained in:
parent
d15fe0104c
commit
e17cd72683
@ -172,7 +172,7 @@ bindsym $mod+b splith
|
|||||||
bindsym $mod+v splitv
|
bindsym $mod+v splitv
|
||||||
|
|
||||||
# Switch the current container between different layout styles
|
# Switch the current container between different layout styles
|
||||||
bindsym $mod+s layout stacking
|
# bindsym $mod+s layout stacking
|
||||||
bindsym $mod+w layout tabbed
|
bindsym $mod+w layout tabbed
|
||||||
bindsym $mod+e layout toggle split
|
bindsym $mod+e layout toggle split
|
||||||
|
|
||||||
@ -188,15 +188,12 @@ bindsym $mod+d focus mode_toggle
|
|||||||
# Move focus to the parent container
|
# Move focus to the parent container
|
||||||
bindsym $mod+a focus parent
|
bindsym $mod+a focus parent
|
||||||
|
|
||||||
# bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
|
bindsym --locked XF86MonBrightnessDown exec "$HOME/.config/sway/scripts/screen-brightness-control.sh --decrement"
|
||||||
# bindsym XF86MonBrightnessUp exec brightnessctl set 5%+
|
bindsym --locked XF86MonBrightnessUp exec "$HOME/.config/sway/scripts/screen-brightness-control.sh --increment"
|
||||||
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%- | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > $WOBSOCK
|
|
||||||
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+ | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > $WOBSOCK
|
|
||||||
|
|
||||||
# bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
|
|
||||||
# bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
|
|
||||||
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% && pactl get-sink-volume @DEFAULT_SINK@ | head -n 1 | awk '{print substr($5, 1, length($5)-1)}' > $WOBSOCK
|
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% && pactl get-sink-volume @DEFAULT_SINK@ | head -n 1 | awk '{print substr($5, 1, length($5)-1)}' > $WOBSOCK
|
||||||
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% && pactl get-sink-volume @DEFAULT_SINK@ | head -n 1 | awk '{print substr($5, 1, length($5)-1)}' > $WOBSOCK
|
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% && pactl get-sink-volume @DEFAULT_SINK@ | head -n 1 | awk '{print substr($5, 1, length($5)-1)}' > $WOBSOCK
|
||||||
|
|
||||||
bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||||
bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||||
|
|
||||||
|
@ -11,4 +11,4 @@ main() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
main
|
main $@
|
45
.config/sway/scripts/screen-brightness-control.sh
Executable file
45
.config/sway/scripts/screen-brightness-control.sh
Executable file
@ -0,0 +1,45 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
increment() {
|
||||||
|
brightnessctl set 5%+
|
||||||
|
}
|
||||||
|
|
||||||
|
decrement() {
|
||||||
|
local current_value=$(brightnessctl get)
|
||||||
|
|
||||||
|
if [[ "$current_value" == "4" ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$current_value" == "6000" ]]; then
|
||||||
|
brightnessctl set 4
|
||||||
|
else
|
||||||
|
brightnessctl set 5%-
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
local WOBSOCK="$XDG_RUNTIME_DIR/wob.sock"
|
||||||
|
|
||||||
|
if [[ -z "$1" ]]; then
|
||||||
|
echo "Provide --increment or --decrement"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
"--increment")
|
||||||
|
increment
|
||||||
|
;;
|
||||||
|
"--decrement")
|
||||||
|
decrement
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Invalid option, use only --increment or --decrement"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
brightnessctl info | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > $WOBSOCK
|
||||||
|
}
|
||||||
|
|
||||||
|
main $@
|
Loading…
x
Reference in New Issue
Block a user