fixed oh-my-zsh with proper custom directory and modified install script to allow for profile linking to clean up the arch base:
This commit is contained in:
parent
7c18316e4f
commit
a721f2b1ec
@ -8,3 +8,5 @@ S983
|
|||||||
Airpods
|
Airpods
|
||||||
swiffer
|
swiffer
|
||||||
postlab
|
postlab
|
||||||
|
TypeScript
|
||||||
|
ADTs
|
||||||
|
Binary file not shown.
@ -14,18 +14,40 @@ DOTBOT_BIN="bin/dotbot"
|
|||||||
|
|
||||||
BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
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}"
|
cd "${BASE_DIR}"
|
||||||
git -C "${BASE_DIR}" submodule sync --quiet --recursive
|
git -C "${BASE_DIR}" submodule sync --quiet --recursive
|
||||||
git submodule update --init --recursive "${BASE_DIR}"
|
git submodule update --init --recursive "${BASE_DIR}"
|
||||||
|
|
||||||
while IFS= read -r config; do
|
# parse initial profile
|
||||||
CONFIGS+=" ${config}"
|
parse_configs "$1"
|
||||||
done < "${META_DIR}/${PROFILES_DIR}/$1"
|
|
||||||
|
# cleanup at the end
|
||||||
|
CONFIGS+=("clean")
|
||||||
|
|
||||||
shift
|
shift
|
||||||
|
|
||||||
for config in ${CONFIGS} ${@}; do
|
for config in "${CONFIGS[@]}"; do
|
||||||
echo -e "\nConfigure $config"
|
echo -e "\nConfigure $config"
|
||||||
# create temporary file
|
# create temporary file
|
||||||
configFile="$(mktemp)"
|
configFile="$(mktemp)"
|
||||||
|
@ -2,14 +2,3 @@
|
|||||||
link:
|
link:
|
||||||
create: true
|
create: true
|
||||||
relink: true
|
relink: true
|
||||||
shell:
|
|
||||||
stdin: true
|
|
||||||
stdout: true
|
|
||||||
stderr: true
|
|
||||||
|
|
||||||
- clean:
|
|
||||||
~/:
|
|
||||||
~/.config:
|
|
||||||
~/.config/systemd/user:
|
|
||||||
~/.local/bin:
|
|
||||||
~/.local/share:
|
|
||||||
|
8
meta/configs/clean.yaml
Normal file
8
meta/configs/clean.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
- clean:
|
||||||
|
~/:
|
||||||
|
~/.config:
|
||||||
|
recursive: true
|
||||||
|
~/.local/share:
|
||||||
|
recursive: true
|
||||||
|
~/.local/bin:
|
||||||
|
|
@ -1,10 +1,6 @@
|
|||||||
- shell:
|
- shell:
|
||||||
- [cd src/i3lock-blur && make install, Building i3lock]
|
- [cd src/i3lock-blur && make install, Building i3lock]
|
||||||
|
|
||||||
- clean:
|
|
||||||
~/.config/i3:
|
|
||||||
~/.local/share/wallpapers:
|
|
||||||
|
|
||||||
- link:
|
- link:
|
||||||
~/.config/i3/config: gui/i3/desktop.conf
|
~/.config/i3/config: gui/i3/desktop.conf
|
||||||
~/.local/bin/wallpaper.sh: bin/wallpaper.sh
|
~/.local/bin/wallpaper.sh: bin/wallpaper.sh
|
||||||
|
@ -2,9 +2,4 @@
|
|||||||
- [bin/oh-my-zsh-check.sh]
|
- [bin/oh-my-zsh-check.sh]
|
||||||
|
|
||||||
- link:
|
- link:
|
||||||
~/.oh-my-zsh/custom/plugins/:
|
~/.local/share/oh-my-zsh: shells/oh-my-zsh
|
||||||
path: shells/oh-my-zsh/custom/plugins/**
|
|
||||||
glob: true
|
|
||||||
~/.oh-my-zsh/custom/themes/:
|
|
||||||
path: shells/oh-my-zsh/custom/themes/**
|
|
||||||
glob: true
|
|
||||||
|
@ -5,3 +5,4 @@ oh-my-zsh
|
|||||||
fzf
|
fzf
|
||||||
scripts
|
scripts
|
||||||
calcurse
|
calcurse
|
||||||
|
clean
|
||||||
|
15
meta/profiles/arch
Normal file
15
meta/profiles/arch
Normal file
@ -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
|
9
meta/profiles/desktop
Normal file
9
meta/profiles/desktop
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# include base arch profile
|
||||||
|
profile/arch
|
||||||
|
|
||||||
|
# desktop specific
|
||||||
|
st.desktop
|
||||||
|
i3.desktop
|
||||||
|
calcurse
|
||||||
|
seafile
|
||||||
|
passwords
|
@ -18,3 +18,4 @@ scripts
|
|||||||
calcurse
|
calcurse
|
||||||
seafile
|
seafile
|
||||||
passwords
|
passwords
|
||||||
|
clean
|
@ -16,3 +16,4 @@ scripts
|
|||||||
calcurse
|
calcurse
|
||||||
seafile
|
seafile
|
||||||
passwords
|
passwords
|
||||||
|
clean
|
@ -15,3 +15,4 @@ rofi
|
|||||||
lf
|
lf
|
||||||
scripts
|
scripts
|
||||||
timetracker
|
timetracker
|
||||||
|
clean
|
6
meta/profiles/thinkpad
Normal file
6
meta/profiles/thinkpad
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
profile/arch
|
||||||
|
st.thinkpad
|
||||||
|
i3.thinkpad
|
||||||
|
calcurse
|
||||||
|
seafile
|
||||||
|
passwords
|
4
meta/profiles/work
Normal file
4
meta/profiles/work
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
profile/arch
|
||||||
|
st.work
|
||||||
|
i3.work
|
||||||
|
timetracker
|
@ -5,3 +5,4 @@ oh-my-zsh
|
|||||||
fzf
|
fzf
|
||||||
scripts
|
scripts
|
||||||
calcurse
|
calcurse
|
||||||
|
clean
|
||||||
|
@ -86,7 +86,7 @@ ZSH_THEME="powerlevel10k/powerlevel10k"
|
|||||||
# HIST_STAMPS="mm/dd/yyyy"
|
# HIST_STAMPS="mm/dd/yyyy"
|
||||||
|
|
||||||
# Would you like to use another custom folder than $ZSH/custom?
|
# 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?
|
# Which plugins would you like to load?
|
||||||
# Standard plugins can be found in $ZSH/plugins/
|
# Standard plugins can be found in $ZSH/plugins/
|
||||||
@ -117,16 +117,8 @@ source $ZSH/oh-my-zsh.sh
|
|||||||
# Compilation flags
|
# Compilation flags
|
||||||
# export ARCHFLAGS="-arch x86_64"
|
# 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"
|
alias vim="nvim"
|
||||||
# helpful aliasis
|
# helpful aliasis
|
||||||
alias ifconfig="/sbin/ifconfig"
|
alias ifconfig="/sbin/ifconfig"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user