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

@ -1,29 +1,29 @@
# Recommended location for database
db_file "~/.config/mpd/database"
db_file "~/.config/mpd/database"
# Logs to systemd journal
log_file "syslog"
log_file "syslog"
# The music directory is by default the XDG directory, uncomment to amend and choose a different directory
music_directory "~/music"
music_directory "~/music"
# Uncomment to refresh the database whenever files in the music_directory are changed
auto_update "yes"
auto_update "yes"
# Uncomment to enable the functionalities
playlist_directory "~/.config/mpd/playlists"
pid_file "~/.config/mpd/pid"
#state_file "~/.config/mpd/state"
sticker_file "~/.config/mpd/sticker.sql"
playlist_directory "~/.config/mpd/playlists"
pid_file "~/.config/mpd/pid"
#state_file "~/.config/mpd/state"
sticker_file "~/.config/mpd/sticker.sql"
audio_output {
type "pulse"
name "pulse audio"
type "pulse"
name "pulse audio"
}
audio_output {
type "fifo"
name "my_fifo"
path "/tmp/mpd.fifo"
format "44100:16:2"
type "fifo"
name "my_fifo"
path "/tmp/mpd.fifo"
format "44100:16:2"
}

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