New backup 2024-06-17 10:30:02
This commit is contained in:
parent
982fda6fa4
commit
b75086da9f
4 changed files with 29 additions and 5 deletions
|
@ -31,9 +31,11 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# Brightness Up
|
# Brightness Up
|
||||||
bindsym XF86MonBrightnessUp exec brightnessctl set +5% | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > $WOBSOCK
|
# bindsym XF86MonBrightnessUp exec brightnessctl set +5% | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > $WOBSOCK
|
||||||
|
bindsym XF86MonBrightnessUp exec "$HOME/.config/sway/scripts/brightness.sh up"
|
||||||
# Brightness Down
|
# Brightness Down
|
||||||
bindsym XF86MonBrightnessDown exec brightnessctl set 5%- | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > $WOBSOCK
|
# bindsym XF86MonBrightnessDown exec brightnessctl set 5%- | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > $WOBSOCK
|
||||||
|
bindsym XF86MonBrightnessDown exec "$HOME/.config/sway/scripts/brightness.sh down"
|
||||||
|
|
||||||
# Numlock
|
# Numlock
|
||||||
input * xkb_numlock enabled
|
input * xkb_numlock enabled
|
||||||
|
|
21
de/home/.config/sway/scripts/brightness.sh
Executable file
21
de/home/.config/sway/scripts/brightness.sh
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
operation="${1}"
|
||||||
|
WOBSOCK="$XDG_RUNTIME_DIR/wob.sock"
|
||||||
|
source "${HOME}/.config/de-vars/colors/active/colors.sh"
|
||||||
|
opacity="BF"
|
||||||
|
|
||||||
|
case "$operation" in
|
||||||
|
up)
|
||||||
|
# brightnessctl set +5% | sed -En 's/.*\(([0-9]+)%\).*/\1/p'
|
||||||
|
brighness_change="+5%"
|
||||||
|
;;&
|
||||||
|
down)
|
||||||
|
# brightnessctl set 5%- | sed -En 's/.*\(([0-9]+)%\).*/\1/p'
|
||||||
|
brighness_change="5%-"
|
||||||
|
;;&
|
||||||
|
up|down)
|
||||||
|
light_lvl="$(brightnessctl set ${brighness_change} | sed -En 's/.*\(([0-9]+)%\).*/\1/p')"
|
||||||
|
echo "${light_lvl}" "${de_color_0}${opacity}" "${de_color_1}${opacity}" "${de_color_3}${opacity}" > "$WOBSOCK"
|
||||||
|
;;
|
||||||
|
esac
|
|
@ -3,6 +3,7 @@
|
||||||
operation="${1}"
|
operation="${1}"
|
||||||
WOBSOCK="$XDG_RUNTIME_DIR/wob.sock"
|
WOBSOCK="$XDG_RUNTIME_DIR/wob.sock"
|
||||||
source "${HOME}/.config/de-vars/colors/active/colors.sh"
|
source "${HOME}/.config/de-vars/colors/active/colors.sh"
|
||||||
|
opacity="BF"
|
||||||
|
|
||||||
case "$operation" in
|
case "$operation" in
|
||||||
up)
|
up)
|
||||||
|
@ -13,7 +14,7 @@ case "$operation" in
|
||||||
;;&
|
;;&
|
||||||
up|down)
|
up|down)
|
||||||
vol_lvl="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/[^0-9]//g')"
|
vol_lvl="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/[^0-9]//g')"
|
||||||
echo "${vol_lvl}" "${de_color_1}" "${de_color_9}" "${de_color_2}" > "$WOBSOCK"
|
echo "${vol_lvl}" "${de_color_0}${opacity}" "${de_color_1}${opacity}" "${de_color_2}${opacity}" > "$WOBSOCK"
|
||||||
paplay "$HOME/.config/sway/assets/sounds/volume.ogg"
|
paplay "$HOME/.config/sway/assets/sounds/volume.ogg"
|
||||||
;;
|
;;
|
||||||
mute)
|
mute)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
bar_padding=0
|
bar_padding=0
|
||||||
border_size=5
|
border_size=5
|
||||||
border_offset=0
|
border_offset=0
|
||||||
width=500
|
width=300
|
||||||
height=20
|
height=30
|
||||||
margin=20
|
margin=20
|
||||||
anchor=bottom
|
anchor=bottom
|
||||||
|
|
Loading…
Add table
Reference in a new issue