[bugfix] mpv configuration file linking

This commit is contained in:
Klesh Wong 2020-09-20 23:29:01 +08:00
parent d5a1991a00
commit 08aaa33064
4 changed files with 16 additions and 6 deletions

4
env.sh
View File

@ -35,10 +35,10 @@ lnsf () {
local SYMLNK=$2
[ -z "$TARGET" ] && echo "$1 not exists" && return -1
local SYMDIR=$(dirname $SYMLNK)
if [ -n "$SYMDIR" ] && [ -L $SYMDIR ]; then
if [[ -n $SYMDIR && -L $SYMDIR ]]; then
rm -rf $SYMDIR
mkdir -p $SYMDIR
fi
mkdir -p $SYMDIR
[ ! -L $SYMLNK ] && rm -rf $SYMLNK
ln -sf $TARGET $SYMLNK
}

8
optim/ls-vscode-cache.fish Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env fish
set VSCP ~/.config/Code\ -\ OSS/User/workspaceStorage
echo $VSCP
for dir in (ls $VSCP)
echo (du -h -d 0 $VSCP/$dir) (jq '.folder // .configuration.external' $VSCP/$dir/workspace.json -r)
end | sort -hr

View File

@ -34,7 +34,7 @@ db_file "~/.mpd/database"
# The special value "syslog" makes MPD use the local syslog daemon. This
# setting defaults to logging to syslog.
#
log_file "~/.mpd/log"
log_file "/dev/null"
#
# This setting sets the location of the file which stores the process ID
# for use of mpd --kill and some init scripts. This setting is disabled by

View File

@ -15,9 +15,11 @@ case "$PM" in
esac
# symlink configuration
lnsf $DIR/config/mpd $XDG_CONFIG_HOME/mpd
lnsf $DIR/config/ncmpcpp $XDG_CONFIG_HOME/ncmpcpp
lnsf $DIR/config/mpv $XDG_CONFIG_HOME/mpv
lnsf $DIR/config/mpd/mpd.conf $XDG_CONFIG_HOME/mpd/mpd.conf
lnsf $DIR/config/mpv/mpv.conf $XDG_CONFIG_HOME/mpv/mpv.conf
lnsf $DIR/config/mpv/scripts/organize.lua $XDG_CONFIG_HOME/mpv/scripts/organize.lua
lnsf $DIR/config/ncmpcpp/bindings $XDG_CONFIG_HOME/ncmpcpp/bindings
lnsf $DIR/config/ncmpcpp/config $XDG_CONFIG_HOME/ncmpcpp/config
# enable for current user
systemctl --user enable mpd