Skip to content

Commit

Permalink
document function
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsumoto-ren committed Feb 18, 2024
1 parent 739a5b0 commit 6630653
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions impd
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,10 @@ grep_mpd_dir() {
}

choose_mpd_dir() {
# Try to find the user's music directory.
# If "music_dir" is set in the config file, it takes precedence.
# Otherwise, the directory is set to the value from mpd's config.
# Different fallbacks are tried in other cases.
local dir
for dir in "$music_dir" "$(grep_mpd_dir)" "$(xdg-user-dir MUSIC)" ~/Music ~/music; do
dir=${dir/\~/$HOME}
Expand Down

0 comments on commit 6630653

Please sign in to comment.