config/yadm/bootstrap: add templating system

This commit is contained in:
xeruf 2022-08-28 22:51:35 +02:00
parent 81e6c78d60
commit 3d04e42811
2 changed files with 37 additions and 4 deletions

View File

@ -0,0 +1,24 @@
[application]
paths\mySoundfonts=/home/janek/data/4-media/multimedia/soundfonts
paths\myExtensions=/home/janek/data/4-media/multimedia/MuseScore3/Extensions
paths\myImages=/home/janek/data/4-media/multimedia/MuseScore3/Images
paths\myPlugins=/home/janek/data/4-media/multimedia/MuseScore3/Plugins
paths\myScores=/home/janek/data/4-media/multimedia/MuseScore3/Scores
paths\myStyles=/home/janek/data/4-media/multimedia/MuseScore3/Styles
paths\myTemplates=/home/janek/data/4-media/multimedia/MuseScore3/Templates
startup\firstStart=false
workspace=Basic
[import]
compatibility\apply_edwin_style=true
compatibility\apply_leland_style=true
compatibility\do_not_ask_me_again=true
compatibility\reset_element_positions=true
[selectInstrument]
selectedGenre=Common
[ui]
application\globalStyle=@Variant(\0\0\0\x7f\0\0\0 Ms::MuseScorePreferredStyleType\0\0\0\0\x1)
application\language=system
application\startup\showTours=false

View File

@ -31,10 +31,19 @@ test -d "/etc/yadm" || sy clone
SECTION "Software" SECTION "Software"
doomuser="$XDG_CONFIG_HOME/doom/user.el" template() {
test -d "$(dirname "$doomuser")" && local dir=$(dirname "$1")
! test -f "$doomuser" && local file=${1/.template}
cp -v "$(dirname "$doomuser")/user.template.el" "$doomuser" test -d "$dir" && ! test -f "$file" &&
cp -iv "$1" "$file"
}
template "$XDG_CONFIG_HOME/doom/user.template.el"
template "$XDG_CONFIG_HOME/MuseScore/MuseScore3.template.ini"
if command -v nvim >/dev/null 2>&1; then
echo "Updating NeoVim Plugins"
nvim '+PlugClean!' '+PlugUpgrade' '+PlugUpdate' '+qall'
fi
link() { link() {
test -e "$2" -o -h "$2" || $($HOME/.local/bin/scripts/checkaccess -w "$2" || echo sudo) ln -sv "$@" test -e "$2" -o -h "$2" || $($HOME/.local/bin/scripts/checkaccess -w "$2" || echo sudo) ln -sv "$@"