diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 8bf497a..307822d 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -62,9 +62,9 @@ super + F12 prompt "Reboot computer?" "sudo -A reboot now" XF86AudioMute - lmc m && pkill -RTMIN+4 $STATUSBAR + sound_toggle && pkill -RTMIN+4 $STATUSBAR XF86AudioMicMute - pactl set-source-mute 1 toggle && pkill -RTMIN+4 $STATUSBAR + mic_toggle && pkill -RTMIN+4 $STATUSBAR XF86AudioLowerVolume lmc down 5 && pkill -RTMIN+4 $STATUSBAR XF86AudioRaiseVolume diff --git a/.local/bin/tools/dwm/lmc b/.local/bin/tools/audio/lmc similarity index 100% rename from .local/bin/tools/dwm/lmc rename to .local/bin/tools/audio/lmc diff --git a/.local/bin/tools/dwm/startpagesearch b/.local/bin/tools/dwm/startpagesearch deleted file mode 100755 index 984f3ba..0000000 --- a/.local/bin/tools/dwm/startpagesearch +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -# Gives a dmenu prompt to search Startpage. -# Without input, will open Startpage.com. -# URLs will be directly handed to the browser. -# Anything else, it search it. -# original by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice - - -pgrep -x dmenu && exit - -choice=$(echo "Startpage" | dmenu -i -p "Search Startpage:") || exit 1 - -if [ "$choice" = "Startpage" ]; then - $BROWSER "https://startpage.com" -else - if echo "$choice" | grep "^(http:\/\/|https:\/\/)?[a-zA-Z0-9]+\.[a-zA-Z]+(/)?.*$"; then - $BROWSER "$choice" - else - $BROWSER "https://startpage.com/do/search/?q=$choice" - fi -fi diff --git a/.local/bin/tools/statusbar/volume b/.local/bin/tools/statusbar/volume index 7e07875..00c553f 100755 --- a/.local/bin/tools/statusbar/volume +++ b/.local/bin/tools/statusbar/volume @@ -1,15 +1,21 @@ #!/bin/sh -[ "$(pulsemixer --get-mute)" = "1" ] && printf "\\n" && exit - vol=$(pulsemixer --get-volume | awk '{print $1}') -if [ "$vol" -gt "70" ]; then - icon="" -elif [ "$vol" -lt "30" ]; then - icon="" +if [ "$vol" -eq "0" ]; then + icon="" +elif [ "$vol" -gt "70" ]; then + icon="" else icon="" fi -printf "%s %s\\n" "$vol" "$icon" +[ "$(pulsemixer --get-mute)" = "1" ] && icon="" && vol="M" + +if amixer get Capture | tail -2 | grep -q '\[on\]'; then + mic="" +else + mic="" +fi + +printf "%s %s %s\\n" "$vol" "$icon" "$mic" diff --git a/.local/bin/tools/dwm/touchpad_toggle b/.local/bin/tools/touchpad_toggle similarity index 100% rename from .local/bin/tools/dwm/touchpad_toggle rename to .local/bin/tools/touchpad_toggle