diff --git a/editors/nvim/config/spell/en.utf-8.add b/editors/nvim/config/spell/en.utf-8.add index 3ca18f4..30a024f 100644 --- a/editors/nvim/config/spell/en.utf-8.add +++ b/editors/nvim/config/spell/en.utf-8.add @@ -8,3 +8,5 @@ S983 Airpods swiffer postlab +TypeScript +ADTs diff --git a/editors/nvim/config/spell/en.utf-8.add.spl b/editors/nvim/config/spell/en.utf-8.add.spl index b8c134e..9181211 100644 Binary files a/editors/nvim/config/spell/en.utf-8.add.spl and b/editors/nvim/config/spell/en.utf-8.add.spl differ diff --git a/install-profile b/install-profile index 1cb823f..21107c7 100755 --- a/install-profile +++ b/install-profile @@ -14,18 +14,40 @@ DOTBOT_BIN="bin/dotbot" BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +declare -a CONFIGS + +parse_configs() { + # parses configs in file $1 and returns array of config names + + while IFS= read -r config; do + + if [[ -z "$config" || "$config" =~ ^# ]] ; then + # skip comments and empty lines + continue + elif [[ "$config" =~ ^profile/ ]] ; then + # allows for profile inclusion + profile=$(echo "$config" | sed 's/^profile\///') + parse_configs "$profile" + else + CONFIGS+=("$config") + fi + done < "${META_DIR}/${PROFILES_DIR}/$1" +} + cd "${BASE_DIR}" git -C "${BASE_DIR}" submodule sync --quiet --recursive git submodule update --init --recursive "${BASE_DIR}" -while IFS= read -r config; do - CONFIGS+=" ${config}" -done < "${META_DIR}/${PROFILES_DIR}/$1" +# parse initial profile +parse_configs "$1" + +# cleanup at the end +CONFIGS+=("clean") shift -for config in ${CONFIGS} ${@}; do +for config in "${CONFIGS[@]}"; do echo -e "\nConfigure $config" # create temporary file configFile="$(mktemp)" diff --git a/meta/base.yaml b/meta/base.yaml index b23c281..cd3036f 100644 --- a/meta/base.yaml +++ b/meta/base.yaml @@ -2,14 +2,3 @@ link: create: true relink: true - shell: - stdin: true - stdout: true - stderr: true - -- clean: - ~/: - ~/.config: - ~/.config/systemd/user: - ~/.local/bin: - ~/.local/share: diff --git a/meta/configs/clean.yaml b/meta/configs/clean.yaml new file mode 100644 index 0000000..6de6c44 --- /dev/null +++ b/meta/configs/clean.yaml @@ -0,0 +1,8 @@ +- clean: + ~/: + ~/.config: + recursive: true + ~/.local/share: + recursive: true + ~/.local/bin: + diff --git a/meta/configs/i3.desktop.yaml b/meta/configs/i3.desktop.yaml index 73aa8fc..ee7ec33 100644 --- a/meta/configs/i3.desktop.yaml +++ b/meta/configs/i3.desktop.yaml @@ -1,10 +1,6 @@ - shell: - [cd src/i3lock-blur && make install, Building i3lock] -- clean: - ~/.config/i3: - ~/.local/share/wallpapers: - - link: ~/.config/i3/config: gui/i3/desktop.conf ~/.local/bin/wallpaper.sh: bin/wallpaper.sh diff --git a/meta/configs/oh-my-zsh.yaml b/meta/configs/oh-my-zsh.yaml index 5a4b176..d9965ca 100644 --- a/meta/configs/oh-my-zsh.yaml +++ b/meta/configs/oh-my-zsh.yaml @@ -2,9 +2,4 @@ - [bin/oh-my-zsh-check.sh] - link: - ~/.oh-my-zsh/custom/plugins/: - path: shells/oh-my-zsh/custom/plugins/** - glob: true - ~/.oh-my-zsh/custom/themes/: - path: shells/oh-my-zsh/custom/themes/** - glob: true + ~/.local/share/oh-my-zsh: shells/oh-my-zsh diff --git a/meta/profiles/apple b/meta/profiles/apple index e2030e0..617d327 100644 --- a/meta/profiles/apple +++ b/meta/profiles/apple @@ -5,3 +5,4 @@ oh-my-zsh fzf scripts calcurse +clean diff --git a/meta/profiles/arch b/meta/profiles/arch new file mode 100644 index 0000000..cb3bd80 --- /dev/null +++ b/meta/profiles/arch @@ -0,0 +1,15 @@ +arch.base +arch.i3 +arch.picom +arch.polybar +nvim +zsh +oh-my-zsh +fzf +tmux.sparse +tmuxp +polybar +picom +rofi +lf +scripts diff --git a/meta/profiles/desktop b/meta/profiles/desktop new file mode 100644 index 0000000..4b061cd --- /dev/null +++ b/meta/profiles/desktop @@ -0,0 +1,9 @@ +# include base arch profile +profile/arch + +# desktop specific +st.desktop +i3.desktop +calcurse +seafile +passwords diff --git a/meta/profiles/arch.desktop b/meta/profiles/legacy/legacy.arch.desktop similarity index 96% rename from meta/profiles/arch.desktop rename to meta/profiles/legacy/legacy.arch.desktop index c754370..706944c 100644 --- a/meta/profiles/arch.desktop +++ b/meta/profiles/legacy/legacy.arch.desktop @@ -18,3 +18,4 @@ scripts calcurse seafile passwords +clean diff --git a/meta/profiles/arch.thinkpad b/meta/profiles/legacy/legacy.arch.thinkpad similarity index 96% rename from meta/profiles/arch.thinkpad rename to meta/profiles/legacy/legacy.arch.thinkpad index 70705d3..c35adfa 100644 --- a/meta/profiles/arch.thinkpad +++ b/meta/profiles/legacy/legacy.arch.thinkpad @@ -16,3 +16,4 @@ scripts calcurse seafile passwords +clean diff --git a/meta/profiles/arch.work b/meta/profiles/legacy/legacy.arch.work similarity index 95% rename from meta/profiles/arch.work rename to meta/profiles/legacy/legacy.arch.work index 6a7cb73..feab46f 100644 --- a/meta/profiles/arch.work +++ b/meta/profiles/legacy/legacy.arch.work @@ -15,3 +15,4 @@ rofi lf scripts timetracker +clean diff --git a/meta/profiles/thinkpad b/meta/profiles/thinkpad new file mode 100644 index 0000000..9c96800 --- /dev/null +++ b/meta/profiles/thinkpad @@ -0,0 +1,6 @@ +profile/arch +st.thinkpad +i3.thinkpad +calcurse +seafile +passwords diff --git a/meta/profiles/work b/meta/profiles/work new file mode 100644 index 0000000..632149d --- /dev/null +++ b/meta/profiles/work @@ -0,0 +1,4 @@ +profile/arch +st.work +i3.work +timetracker diff --git a/meta/profiles/wsl b/meta/profiles/wsl index 71acf74..e0bf67d 100644 --- a/meta/profiles/wsl +++ b/meta/profiles/wsl @@ -5,3 +5,4 @@ oh-my-zsh fzf scripts calcurse +clean diff --git a/shells/zsh/zshrc b/shells/zsh/zshrc index bac36ea..0c488a1 100644 --- a/shells/zsh/zshrc +++ b/shells/zsh/zshrc @@ -86,7 +86,7 @@ ZSH_THEME="powerlevel10k/powerlevel10k" # HIST_STAMPS="mm/dd/yyyy" # Would you like to use another custom folder than $ZSH/custom? -# ZSH_CUSTOM=/path/to/new-custom-folder +ZSH_CUSTOM=$HOME/.local/share/oh-my-zsh/custom # Which plugins would you like to load? # Standard plugins can be found in $ZSH/plugins/ @@ -117,16 +117,8 @@ source $ZSH/oh-my-zsh.sh # Compilation flags # export ARCHFLAGS="-arch x86_64" -# Set personal aliases, overriding those provided by oh-my-zsh libs, -# plugins, and themes. Aliases can be placed here, though oh-my-zsh -# users are encouraged to define aliases within the ZSH_CUSTOM folder. -# For a full list of active aliases, run `alias`. -# -# Example aliases -# alias zshconfig="mate ~/.zshrc" -# alias ohmyzsh="mate ~/.oh-my-zsh" # -# switching to vimrc +# switching to neovim alias vim="nvim" # helpful aliasis alias ifconfig="/sbin/ifconfig"