lmc readded

This commit is contained in:
Luke Smith 2020-03-22 09:41:50 -04:00
parent 248b6dd3d2
commit 1dc42a4f86
No known key found for this signature in database
GPG key ID: 4C50B54A911F6252
2 changed files with 39 additions and 12 deletions

View file

@ -146,7 +146,7 @@ bindsym $mod+n exec $term -e newsboat && pkill -RTMIN+6 i3blocks
bindsym $mod+Shift+n floating toggle; sticky toggle; exec --no-startup-id hover right
bindsym $mod+m exec --no-startup-id $term -e ncmpcpp
bindsym $mod+Shift+m exec --no-startup-id amixer sset Master toggle && pkill -RTMIN+10 i3blocks
bindsym $mod+Shift+m exec --no-startup-id lmc toggle
# #---Workspace Bindings---# #
bindsym $mod+Home workspace $ws1
@ -247,10 +247,10 @@ bindsym $mod+Ctrl+Right move workspace to output right
# #---Media Keys---# #
# Volume keys
bindsym $mod+plus exec --no-startup-id amixer sset Master 5%+ && pkill -RTMIN+10 i3blocks
bindsym $mod+Shift+plus exec --no-startup-id amixer sset Master 15%+ && pkill -RTMIN+10 i3blocks
bindsym $mod+minus exec --no-startup-id amixer sset Master 5%- && pkill -RTMIN+10 i3blocks
bindsym $mod+Shift+minus exec --no-startup-id amixer sset Master 15%- && pkill -RTMIN+10 i3blocks
bindsym $mod+plus exec --no-startup-id lmc up
bindsym $mod+Shift+plus exec --no-startup-id lmc up 15
bindsym $mod+minus exec --no-startup-id lmc down
bindsym $mod+Shift+minus exec --no-startup-id lmc down 15
bindsym $mod+less exec --no-startup-id mpc prev
bindsym $mod+Shift+less exec --no-startup-id mpc seek 0%
bindsym $mod+greater exec --no-startup-id mpc next
@ -271,13 +271,13 @@ bindsym $mod+Delete exec $stoprec
bindsym XF86Launch1 exec --no-startup-id xset dpms force off
# #---Extra XF86 Keys---# #
bindsym XF86AudioMute exec --no-startup-id amixer sset Master toggle && pkill -RTMIN+10 i3blocks
bindsym XF86AudioLowerVolume exec --no-startup-id amixer sset Master 5%- && pkill -RTMIN+10 i3blocks
bindsym Shift+XF86AudioLowerVolume exec --no-startup-id amixer sset Master 10%- && pkill -RTMIN+10 i3blocks
bindsym Control+XF86AudioLowerVolume exec --no-startup-id amixer sset Master 1%- && pkill -RTMIN+10 i3blocks
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer sset Master 5%+ && pkill -RTMIN+10 i3blocks
bindsym Shift+XF86AudioRaiseVolume exec --no-startup-id amixer sset Master 10%+ && pkill -RTMIN+10 i3blocks
bindsym Control+XF86AudioRaiseVolume exec --no-startup-id amixer sset Master 1%+ && pkill -RTMIN+10 i3blocks
bindsym XF86AudioMute exec --no-startup-id lmc toggle
bindsym XF86AudioLowerVolume exec --no-startup-id lmc down
bindsym Shift+XF86AudioLowerVolume exec --no-startup-id lmc down 10
bindsym Control+XF86AudioLowerVolume exec --no-startup-id lmc down 1
bindsym XF86AudioRaiseVolume exec --no-startup-id lmc up
bindsym Shift+XF86AudioRaiseVolume exec --no-startup-id lmc up 10
bindsym Control+XF86AudioRaiseVolume exec --no-startup-id lmc up 1
bindsym XF86PowerOff exec --no-startup-id prompt "Shutdown computer?" "$shutdown"
##bindsym XF86Copy exec
##bindsym XF86Open exec

27
.local/bin/lmc Executable file
View file

@ -0,0 +1,27 @@
#!/bin/sh
NUM="${2:-5}"
# Uncomment the following line to use Pulseaudio.
# PULSE=true
if [ "$PULSE" ]; then
toggle() { pulsemixer --toggle-mute ;}
mute() { pulsemixer --mute ;}
up() { pulsemixer --change-volume +"$NUM" ;}
down() { pulsemixer --change-volume -"$NUM" ;}
else
toggle() { amixer sset Master toggle ;}
mute() { amixer sset Master mute ;}
up() { amixer sset Master "$NUM"%+ ;}
down() { amixer sset Master "$NUM"%- ;}
fi
case "$1" in
toggle) toggle ;;
mute) mute ;;
up) up ;;
down) down ;;
esac >/dev/null
pkill -RTMIN+10 "${STATUSBAR:?}" &