43 lines
1.9 KiB
Bash
Executable File
43 lines
1.9 KiB
Bash
Executable File
#!/bin/zsh
|
|
|
|
sym_link() {
|
|
[[ ! -e "$1" ]] && echo "skipping link, target does not exist: $1" && return
|
|
[[ -h "$2" ]] && rm $2
|
|
[[ -f "$2" || -d "$2" ]] && rm -rf $2
|
|
ln -s $1 $2
|
|
}
|
|
|
|
echo "---- configuring themes ----------------"
|
|
source src_files/.config/zsh/.zshenv
|
|
|
|
# bring in the theme-files from Omarchy which i want to use
|
|
omarchy_themes=(`find src_files/imports/themes-omarchy-* -mindepth 1 -maxdepth 1 -type d`)
|
|
for dir in $omarchy_themes; do
|
|
target_theme_dir="$DIR_THEME_SETTINGS/$(basename $dir)"
|
|
[[ ! -d "$target_theme_dir/wallpaper" ]] && mkdir -p "$target_theme_dir/wallpaper"
|
|
dir_theme_files=(`find $dir -mindepth 1 -maxdepth 1 -type f`)
|
|
[[ -d "$dir/backgrounds" ]] && cp -RPp $dir/backgrounds/* $target_theme_dir/wallpaper/
|
|
for f in $dir_theme_files; do cp -RPp $f $target_theme_dir/; done
|
|
done
|
|
|
|
# rename imported chromium.theme files
|
|
chromium_filenames=(`find $DIR_THEME_SETTINGS -mindepth 2 -maxdepth 2 -name "chromium.theme"`)
|
|
for f in $chromium_filenames; do mv $f $(dirname $f)/brave.theme; done
|
|
|
|
# copy over custom neovim themes
|
|
nvim_themes_dir=$XDG_CONFIG_HOME/nvim/themes
|
|
[[ ! -d "$nvim_themes_dir/pina/colors" ]] && mkdir -p "$nvim_themes_dir/pina/colors"
|
|
cp -p src_files/imports/themes-omarchy-extra/pina/pina.nvim/colors/pina.vim $nvim_themes_dir/pina/colors/
|
|
|
|
# set links for theme-switching
|
|
default_theme="tokyodark"
|
|
sym_link $DIR_THEME_SETTINGS/$default_theme $DIR_THEME_SETTINGS/.current-theme
|
|
sym_link $DIR_THEME_SETTINGS/.current-theme/kitty.conf $XDG_CONFIG_HOME/kitty/theme.conf
|
|
sym_link $DIR_THEME_SETTINGS/.current-theme/tmux.conf $XDG_CONFIG_HOME/tmux/theme.conf
|
|
sym_link $DIR_THEME_SETTINGS/.current-theme/neovim.lua $XDG_CONFIG_HOME/nvim/current-theme
|
|
# TODO: finish theme work, set needed links per theme-set script
|
|
|
|
# once everything is in place, run theme-set with the default_theme
|
|
$DIR_SCRIPTS/theme-set $default_theme
|
|
|