fixed oh-my-zsh with proper custom directory and modified install script to allow for profile linking to clean up the arch base:

nvim
spinach 2 years ago
parent 7c18316e4f
commit a721f2b1ec

@ -8,3 +8,5 @@ S983
Airpods
swiffer
postlab
TypeScript
ADTs

@ -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)"

@ -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:

@ -0,0 +1,8 @@
- clean:
~/:
~/.config:
recursive: true
~/.local/share:
recursive: true
~/.local/bin:

@ -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

@ -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

@ -5,3 +5,4 @@ oh-my-zsh
fzf
scripts
calcurse
clean

@ -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

@ -0,0 +1,9 @@
# include base arch profile
profile/arch
# desktop specific
st.desktop
i3.desktop
calcurse
seafile
passwords

@ -0,0 +1,6 @@
profile/arch
st.thinkpad
i3.thinkpad
calcurse
seafile
passwords

@ -0,0 +1,4 @@
profile/arch
st.work
i3.work
timetracker

@ -5,3 +5,4 @@ oh-my-zsh
fzf
scripts
calcurse
clean

@ -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"

Loading…
Cancel
Save