my dotz
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add simple volume modification toolset

+50
+4
.config/sway/config
··· 170 170 bindsym $mod+b splith 171 171 bindsym $mod+v splitv 172 172 173 + # volume control, obviously 174 + bindsym $mod+XF86AudioLowerVolume exec vol down 10 175 + bindsym $mod+XF86AudioRaiseVolume exec vol up 10 176 + 173 177 # Switch the current container between different layout styles 174 178 # bindsym $mod+s layout stacking 175 179 # bindsym $mod+w layout tabbed
+46
bin/vol
··· 1 + #!/bin/sh -e 2 + # 3 + # simple pulse wrapper for controlling 4 + # audio stuff i care about 5 + 6 + get_current_volume_percent() { 7 + percent="$(pactl get-sink-volume @DEFAULT_SINK@ | awk '/Volume/ {print $5}')" 8 + strip_perc="$(printf "%s" "$percent" | cut -d '%' -f 1)" 9 + printf "%s" "$strip_perc" 10 + } 11 + 12 + notify_current_volume() { 13 + vol="$(get_current_volume_percent)" 14 + if [ "$vol" -gt 100 ]; then 15 + # prevent volumes of >100% for the 16 + # good of all ears 17 + pactl set-sink-volume @DEFAULT_SINK@ 100% 18 + notify-send '๐Ÿ”ˆ vol' --hint=int:value:100 -t 800 19 + elif [ "$vol" -lt 0 ]; then 20 + # prevent volumes of <0% for the 21 + # good of all ... dog... whateij fiwjoefj 22 + pactl set-sink-volume @DEFAULT_SINK@ 0% 23 + notify-send '๐Ÿ”ˆ vol' --hint=int:value:0 -t 800 24 + else 25 + notify-send '๐Ÿ”ˆ vol' --hint=int:value:"$vol" -t 800 26 + fi 27 + } 28 + 29 + case "$1" in 30 + ls|list) pactl list short sinks ;; 31 + set) pactl set-default-sink "$2" ;; 32 + [0-9]*) 33 + pactl set-sink-volume @DEFAULT_SINK@ "$1"% 34 + notify_current_volume 35 + ;; 36 + up) 37 + # expect $2 = % to increase 38 + pactl set-sink-volume @DEFAULT_SINK@ +"$2"% 39 + notify_current_volume 40 + ;; 41 + down) 42 + pactl set-sink-volume @DEFAULT_SINK@ -"$2"% 43 + notify_current_volume 44 + ;; 45 + *) ;; 46 + esac