Manage symlinks with rcm

This commit is contained in:
id101010
2018-09-24 14:32:50 +02:00
parent 6891d81373
commit 56ab081d64
15 changed files with 514 additions and 398 deletions

54
i3/util/volnotid.sh Executable file
View File

@@ -0,0 +1,54 @@
#!/bin/bash
##########################################
# _ _ _ _ #
# | | | | (_) | | #
# __ _____ | |_ __ ___ | |_ _ __| | #
# \ \ / / _ \| | '_ \ / _ \| __| |/ _` | #
# \ V / (_) | | | | | (_) | |_| | (_| | #
# \_/ \___/|_|_| |_|\___/ \__|_|\__,_| #
# #
##########################################
#
# This script uses volnoti, which can be installed from git or
# from the arch aur.
#
# yaourt -S volnoti
#
VOLUME=$(amixer get Master | grep Mono: | sed 's|[^[]*\[\([0-9]*\).*|\1|')
VALUE=1%
MUTE=0
case "$1" in
"up")
# Increase Volume
[[ "$VOLUME" -eq 100 ]] && VALUE=0
amixer -q sset Master $VALUE+ unmute && killall -SIGUSR1 i3status
MUTE=0
;;
"down")
# Decrease Volume
amixer -q sset Master $VALUE- unmute && killall -SIGUSR1 i3status
MUTE=0
# If the Volume is already 0, then mute
if [ "$VOLUME" == "0" ]; then
MUTE=1
amixer -q sset Master toggle && killall -SIGUSR1 i3status
fi
;;
"mute")
# Mute
amixer -q sset Master toggle && killall -SIGUSR1 i3status
MUTE=1
;;
esac
VOLUME=$(amixer get Master | grep Mono: | sed 's|[^[]*\[\([0-9]*\).*|\1|')
if [ "$MUTE" == "0" ]; then
volnoti-show $VOLUME
else
volnoti-show -m $VOLUME
fi