summaryrefslogtreecommitdiff
path: root/mpc-notify
diff options
context:
space:
mode:
Diffstat (limited to 'mpc-notify')
-rwxr-xr-xmpc-notify8
1 files changed, 3 insertions, 5 deletions
diff --git a/mpc-notify b/mpc-notify
index f570698..9c74329 100755
--- a/mpc-notify
+++ b/mpc-notify
@@ -27,14 +27,12 @@ preview_width=64
preview_height=64
default_song_icon="media-playback-start"
-# find xdg directories
-xdg_config_home="${XDG_CONFIG_HOME:-$HOME/.config}"
-xdg_user_dirs="${xdg_config_home}/user-dirs.dirs"
-[ -f "$xdg_user_dirs" ] && . "$xdg_user_dirs"
+# find xdg music directory
+. "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" 2>/dev/null || true
xdg_music_dir="${XDG_MUSIC_DIR:-$HOME/Music}"
# find mpc config directory
-mpc_config_dir="$xdg_config_home/mpc"
+mpc_config_dir="${XDG_CONFIG_HOME:-$HOME/.config}/mpc"
[ -d "$mpc_config_dir" ] || mkdir -p "$mpc_config_dir"
# issue an mpc command based on arguments and assemble notification message