From 5b28cf7d2b6511e175bfb9abb7580f5e89481bcb Mon Sep 17 00:00:00 2001 From: boredpasta Date: Mon, 17 Jul 2023 16:22:13 +0300 Subject: mpc-notify: directly source user-dirs.dirs to silence SC1090 --- mpc-notify | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'mpc-notify') 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 -- cgit v1.2.3