diff --git a/.config/i3/config b/.config/i3/config index fe2d3d3..d9b317d 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -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 diff --git a/.local/bin/lmc b/.local/bin/lmc new file mode 100755 index 0000000..bbe99a5 --- /dev/null +++ b/.local/bin/lmc @@ -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:?}" &