diff --git a/setup/config.zsh b/setup/config.zsh index 12a2937..93cfbba 100644 --- a/setup/config.zsh +++ b/setup/config.zsh @@ -6,7 +6,9 @@ function SETUP__CONFIG() { CONFIG__ZSH || return 2 CONFIG__VIM || return 3 - SCWRYPTS generate i3 config || return 4 + CONFIG__SYSTEM || return 4 + + SCWRYPTS generate i3 config || return 5 SUCCESS 'finished application configuration' } @@ -14,8 +16,8 @@ function SETUP__CONFIG() { ##################################################################### CONFIG__ZSH() { - CONFIG__ENV zsh || return 1 - CONFIG__RC zsh || return 2 + #CONFIG__ENV zsh || return 1 + #CONFIG__RC zsh || return 2 CONFIG__SET_DEFAULT_SHELL || return 3 } @@ -43,6 +45,46 @@ CONFIG__VIM() { ##################################################################### +CONFIG__SYSTEM() { + STATUS "configuring system applications" + local \ + SYSTEM_APPLICATION \ + SOURCE_DIR SOURCE_CONFIG \ + SYSTEM_DIR SYSTEM_CONFIG \ + ; + + for SOURCE_DIR in $(find "$DOTWRYN_PATH/config/system/" -mindepth 1 -maxdepth 1 -type d) + do + SYSTEM_APPLICATION="$(echo "$SOURCE_DIR" | sed 's|.*/||')" + + case $SYSTEM_APPLICATION in + ( ssh | sshd ) + SYSTEM_DIR=/etc/ssh/${SYSTEM_APPLICATION}_config.d + ;; + ( * ) + SYSTEM_DIR='' + ;; + esac + + [ "$SYSTEM_DIR" ] && sudo [ -d "$SYSTEM_DIR" ] \ + || continue + + for SOURCE_CONFIG in $(find "$SOURCE_DIR" -mindepth 1 -maxdepth 1 -type f) + do + SYSTEM_CONFIG="$SYSTEM_DIR/$(basename -- "$SOURCE_CONFIG")" + + sudo [ -f "$SYSTEM_CONFIG" ] && { + echo "detected existing config '$SYSTEM_CONFIG'; skipping" + continue + } + + sudo ln -s "$SOURCE_CONFIG" "$SYSTEM_CONFIG" + done + done +} + +##################################################################### + CONFIG__ENV() { local DEFAULT_CONFIG="$DOTWRYN_PATH/config/dotwryn.env.$1" local LOCAL_CONFIG="$HOME/.config/wryn/env.$1" diff --git a/setup/os-dependencies/arch.txt b/setup/os-dependencies/arch.txt index e4ffde2..bda5cbe 100644 --- a/setup/os-dependencies/arch.txt +++ b/setup/os-dependencies/arch.txt @@ -22,7 +22,6 @@ jdk-openjdk jq lolcat lxappearance -monaspace-font mono ncurses neofetch @@ -32,6 +31,7 @@ npm ntp obs-studio openssh +otf-monaspace pam-fprint-grosshack picom playerctl diff --git a/setup/run b/setup/run index 712cf64..bf002f6 100755 --- a/setup/run +++ b/setup/run @@ -36,4 +36,4 @@ INFO "installation complete: $(date)" 2>> "$LOGFILE" yN 'keep logfile?' \ || { rm "$LOGFILE" || ERROR "unable to remove '$LOGFILE'" } -SUCCESS "\n.wryn setup complete; have a nice day :)\n" +SUCCESS "\n.wryn setup complete; have a nice day :)\n "