mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-03-31 00:17:46 +02:00
scripts: cleaned up scripts and refined volume script
This commit is contained in:
parent
b14a6f31cb
commit
a51b50849f
@ -62,9 +62,9 @@ super + F12
|
|||||||
prompt "Reboot computer?" "sudo -A reboot now"
|
prompt "Reboot computer?" "sudo -A reboot now"
|
||||||
|
|
||||||
XF86AudioMute
|
XF86AudioMute
|
||||||
lmc m && pkill -RTMIN+4 $STATUSBAR
|
sound_toggle && pkill -RTMIN+4 $STATUSBAR
|
||||||
XF86AudioMicMute
|
XF86AudioMicMute
|
||||||
pactl set-source-mute 1 toggle && pkill -RTMIN+4 $STATUSBAR
|
mic_toggle && pkill -RTMIN+4 $STATUSBAR
|
||||||
XF86AudioLowerVolume
|
XF86AudioLowerVolume
|
||||||
lmc down 5 && pkill -RTMIN+4 $STATUSBAR
|
lmc down 5 && pkill -RTMIN+4 $STATUSBAR
|
||||||
XF86AudioRaiseVolume
|
XF86AudioRaiseVolume
|
||||||
|
@ -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
|
|
@ -1,15 +1,21 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
[ "$(pulsemixer --get-mute)" = "1" ] && printf "\\n" && exit
|
|
||||||
|
|
||||||
vol=$(pulsemixer --get-volume | awk '{print $1}')
|
vol=$(pulsemixer --get-volume | awk '{print $1}')
|
||||||
|
|
||||||
if [ "$vol" -gt "70" ]; then
|
if [ "$vol" -eq "0" ]; then
|
||||||
icon=""
|
icon=""
|
||||||
elif [ "$vol" -lt "30" ]; then
|
elif [ "$vol" -gt "70" ]; then
|
||||||
icon=""
|
icon=""
|
||||||
else
|
else
|
||||||
icon=""
|
icon=""
|
||||||
fi
|
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"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user