增加通知图标; 快捷键增加多媒体按键的绑定
|
@ -66,6 +66,20 @@ shift + super + space
|
|||
shift + super + backslash
|
||||
bspc desktop -l {monocle,tiled}
|
||||
|
||||
|
||||
# 音量调节
|
||||
XF86Audio{RaiseVolume,LowerVolume}
|
||||
~/.local/bin/scripts/volume.sh {up, down}
|
||||
|
||||
# 静音/取消静音
|
||||
XF86AudioMute
|
||||
~/.local/bin/scripts/volume.sh mute
|
||||
|
||||
|
||||
# 音乐控制
|
||||
XF86Audio{Next,Prev,Play,Stop}
|
||||
mpc {next,prev,toggle,stop}
|
||||
|
||||
# --------------- end --------------------
|
||||
|
||||
|
||||
|
@ -89,6 +103,14 @@ ctrl + alt + shift + a
|
|||
shift + Print
|
||||
flameshot screen -d 2000
|
||||
|
||||
# 浏览器快捷键
|
||||
XF86HomePage
|
||||
x-www-browser
|
||||
|
||||
# 计算器
|
||||
XF86Calculator
|
||||
gnome-calculator
|
||||
|
||||
# --------------- end --------------------
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,70 @@
|
|||
#!/bin/bash
|
||||
|
||||
ICONS=~/.local/share/dunst
|
||||
|
||||
if [[ ! -x $(which pulsemixer) ]]; then
|
||||
echo -e "\e[1;31merror\e[m: pulsemixer is not installed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
notify() {
|
||||
get_icon
|
||||
if [[ $is_mute == 1 ]]; then
|
||||
dunstify -a Volume -i $icon -u low "Volume mute!"
|
||||
else
|
||||
dunstify -a Volume -i $icon -u low -h int:value:$curr_volume "currtent volume: ${curr_volume}%"
|
||||
fi
|
||||
}
|
||||
|
||||
get_volume() {
|
||||
echo $(pulsemixer --get-volume | cut -d' ' -f1)
|
||||
}
|
||||
|
||||
get_icon() {
|
||||
curr_volume=$(get_volume)
|
||||
is_mute=$(pulsemixer --get-mute)
|
||||
if [[ $is_mute == 1 || "$curr_volume" -eq "0" ]]; then
|
||||
icon="${ICONS}/volume-mute.png"
|
||||
curr_volume=0
|
||||
elif [[ "$curr_volume" -le "35" ]]; then
|
||||
icon="${ICONS}/volume-low.png"
|
||||
elif [[ "$curr_volume" -le "70" ]]; then
|
||||
icon="${ICONS}/volume-mid.png"
|
||||
else
|
||||
icon="${ICONS}/volume-high.png"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
volume_up() {
|
||||
[[ $(pulsemixer --get-mute) == 1 ]] && pulsemixer --unmute
|
||||
pulsemixer --max-volume 100 --change-volume +5
|
||||
notify
|
||||
}
|
||||
|
||||
|
||||
volume_down() {
|
||||
[[ $(pulsemixer --get-mute) == 1 ]] && pulsemixer --unmute
|
||||
pulsemixer --max-volume 100 --change-volume -5
|
||||
notify
|
||||
}
|
||||
|
||||
toggle_mute() {
|
||||
pulsemixer --toggle-mute
|
||||
notify
|
||||
}
|
||||
|
||||
|
||||
case "$1" in
|
||||
"up")
|
||||
volume_up
|
||||
;;
|
||||
"down")
|
||||
volume_down
|
||||
;;
|
||||
"mute")
|
||||
toggle_mute
|
||||
;;
|
||||
*)
|
||||
get_volume
|
||||
esac
|
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 9.8 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 19 KiB |