interval=once
[volume]
-command=~/scripts/volume.sh | ~/scripts/i3b-formatter.sh -r
+command=~/scripts/sound/volume.sh | ~/scripts/i3b-formatter.sh -r
+signal=10
interval=once
min_width=xxx100%
# Basic binds
super + Return
- $TERMINAL -e /bin/bash --rcfile ~/.bash_profile
+ $TERMINAL -e /bin/bash --rcfile ~/.bash_profile
super + m
- $TERMINAL -e ncmpcpp
+ $TERMINAL -e ncmpcpp
super + shift + f
- $TERMINAL -e ranger
+ $TERMINAL -e ranger
super + shift + t
- $TERMINAL -e htop
+ $TERMINAL -e htop
super + c
- "${TERMINAL}" -e calc
+ "${TERMINAL}" -e calc
super + shift + n
- nohup "${TERMINAL}" -e sh -c 'neofetch;read' >/dev/null &
+ nohup "${TERMINAL}" -e sh -c 'neofetch;read' >/dev/null &
super + Print
- import jpg:- | xclip -selection clipboard -t image/jpeg
+ import jpg:- | xclip -selection clipboard -t image/jpeg
super + t
- ${SCRIPTS}/shutdown.sh
+ ${SCRIPTS}/shutdown.sh
super + d
- ${SCRIPTS}/dmenu-run.sh
+ ${SCRIPTS}/dmenu-run.sh
super + e
- ${SCRIPTS}/dmenu-unicode.sh
+ ${SCRIPTS}/dmenu-unicode.sh
super + shift + m
- ${SCRIPTS}/dmenumount.sh
+ ${SCRIPTS}/dmenumount.sh
super + shift + x
- ${SCRIPTS}/screen-locker.sh
+ ${SCRIPTS}/screen-locker.sh
super + shift + p
${SCRIPTS}/dmenu-pass.sh
+# Sound
+super + F10
+ vc toggle
+super + F12
+ vc up
+super + F11
+ vc down
+super + shift + F12
+ vc up 20
+super + shift + F11
+ vc down 20
+
super + alt + l
- pkill -SIGUSR1 sxhkd
+ pkill -SIGUSR1 sxhkd
shift + ctrl + k
- pkill -SIGRTMIN+5 i3blocks
+ pkill -SIGRTMIN+5 i3blocks
--- /dev/null
+#!/bin/sh
+
+set -e
+#set -x
+
+NUM="${2:-5}"
+
+PULSE=true
+
+if [[ ${PULSE} = true ]]; 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 i3blocks
+
--- /dev/null
+#!/bin/bash
+
+sink=$( pactl list short sinks | sed -e 's,^\([0-9][0-9]*\)[^0-9].*,\1,' | tail -n 1 )
+
+case ${BLOCK_BUTTON} in
+ 2)
+ nohup "${TERMINAL}" -e "${EDITOR}" "$0" >/dev/null &
+ ;;
+ 3)
+ pactl set-sink-mute $sink toggle
+ ;;
+ 4)
+ pactl set-sink-volume $sink +5%
+ ;;
+ 5)
+ pactl set-sink-volume $sink -5%
+ ;;
+esac
+
+muted=$( awk '/muted/ {print $2}' <(pacmd list-sinks | grep '^[[:space:]]muted:' | head -n $(( $sink + 1 )) | tail -n 1 ) )
+
+if [ "$muted" = "yes" ]; then
+ icon=""
+ printf "%s\n" "$icon"
+else
+ vol=$( pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( $sink + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' )
+ if [ "$vol" -gt 60 ]; then
+ icon=""
+ elif [[ "$vol" -le 60 && "$vol" -gt 30 ]]; then
+ icon=""
+ else
+ icon=""
+ fi
+
+ printf "%s %s%%\n" "$icon" "$vol"
+fi
+++ /dev/null
-#!/bin/bash
-
-sink=$( pactl list short sinks | sed -e 's,^\([0-9][0-9]*\)[^0-9].*,\1,' | tail -n 1 )
-
-case ${BLOCK_BUTTON} in
- 2)
- nohup "${TERMINAL}" -e "${EDITOR}" "$0" >/dev/null &
- ;;
- 3)
- pactl set-sink-mute $sink toggle
- ;;
- 4)
- pactl set-sink-volume $sink +5%
- ;;
- 5)
- pactl set-sink-volume $sink -5%
- ;;
-esac
-
-muted=$( awk '/muted/ {print $2}' <(pacmd list-sinks | grep '^[[:space:]]muted:' | head -n $(( $sink + 1 )) | tail -n 1 ) )
-
-if [ "$muted" = "yes" ]; then
- icon=""
- printf "%s\n" "$icon"
-else
- vol=$( pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( $sink + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' )
- if [ "$vol" -gt 60 ]; then
- icon=""
- elif [[ "$vol" -le 60 && "$vol" -gt 30 ]]; then
- icon=""
- else
- icon=""
- fi
-
- printf "%s %s%%\n" "$icon" "$vol"
-fi