diff --git a/.config/mpd/mpd.conf##template b/.config/mpd/mpd.conf##template index d61a93d..4e57031 100644 --- a/.config/mpd/mpd.conf##template +++ b/.config/mpd/mpd.conf##template @@ -1,5 +1,4 @@ # See man mpd.conf - state_file "~/.local/state/mpd/state" pid_file "~/.local/state/mpd/mpd.pid" db_file "~/.local/state/mpd/mpd.db" @@ -20,3 +19,10 @@ auto_update "yes" restore_paused "yes" follow_outside_symlinks "yes" + + +audio_output { + type "pipewire" + name "Pipewire" + command "paplay -f cd 2>/dev/null" +} diff --git a/.local/bin/scripts/edit-config b/.local/bin/scripts/edit-config index c44605b..cf8457d 100755 --- a/.local/bin/scripts/edit-config +++ b/.local/bin/scripts/edit-config @@ -23,7 +23,7 @@ touch "$conf_cache" sel=$(listconf | fzf -1 -0 --tiebreak=end,length --preview '$(test -r {} || echo "sudo") bat --color=always --style=numbers --line-range :200 {}' --query="$1" --history "$conf_cache_dir/searches") case "$sel" in - ("") exit 1;; + ("") exit 2;; (/etc/sudoers) sudo visudo;; (/etc/fstab) sudoedit "$sel" && sudo findmnt --verify && sudo systemctl daemon-reload;; #systemctl daemon-reload && mount -af -o remount;; @@ -37,4 +37,10 @@ case "$sel" in (/etc/nftables.conf) sudoedit "$sel" && sudo systemctl restart nftables;; (*) edit "$sel";; esac +case "$sel" in + (*\#\#template) yadm alt;; +esac +case "${sel%\#\#*}" in + (*/mpd.conf) systemctl --user restart mpd;; +esac echo "$sel" | cat - "$conf_cache" | head -20 >"$conf_tmp" && mv "$conf_tmp" "$conf_cache"