Merge branch 'dev' into gentoo

cleanup mpd config
set custom lyrics path for ncmpcpp
add alias to upgrade pip
only notify low battery on BAT0
This commit is contained in:
David JULIEN 2021-09-23 23:32:58 +02:00
commit 121d454e19
No known key found for this signature in database
GPG Key ID: 4B388E8BD9D47382
4 changed files with 19 additions and 18 deletions

View File

@ -19,3 +19,4 @@ alias swytch@site='ssh swytch@davidjulien.xyz'
alias dotfiles='/usr/bin/git --git-dir=$DOTFILES --work-tree=$HOME'
alias abcde='abcde -c $XDG_CONFIG_HOME/abcde/config'
alias abook='abook --config $XDG_CONFIG_HOME/abook/abookrc --datafile "$XDG_DATA_HOME"/abook/addressbook'
alias pip-upgrade="pip freeze --user | cut -d'=' -f1 | xargs -n1 pip install -U"

View File

@ -19,7 +19,7 @@
## MPD clients (eg. ncmpc) also use that location.
##
#
#lyrics_directory = ~/.lyrics
lyrics_directory = ~/music/.lyrics
#
##### connection settings #####
#

View File

@ -25,8 +25,8 @@ notify() { \
fi
[ 300 -gt $delta ] && return;
echo $now > $XDG_CONFIG_HOME/batteryupdate
case "$total" in
[2-3][0-9]) notify-send -u "normal" "Battery is running low ($capacity%)" "Please plug your computer to a power source" ;;
case "$capacity" in
2[0-9]) notify-send -u "normal" "Battery is running low ($capacity%)" "Please plug your computer to a power source" ;;
*) notify-send -u "critical" "Battery is dangerously low ($capacity%)" "Please plug your computer to a power source - <b>NOW!</b>" ;;
esac
}
@ -52,7 +52,7 @@ do
[2-3][0-9]) status="" ;;
*) status="" ;;
esac
[ 40 -gt $total ] && notify;
[ "BAT0" = $slot ] && [ 30 -gt $capacity ] && notify;
fi
printf " %s:%s (%0.2d%%) " "$slot" "$status" "$capacity";
fi