revamp compat

This commit is contained in:
2025-09-28 22:08:05 +00:00
parent 6bf779a68e
commit 3398c6b4ef
12 changed files with 83 additions and 311 deletions

View File

@@ -8,6 +8,7 @@ set -e
cd "$(dirname "$(readlink -f -- "$0")")"
umask 002
[[ "$(id -u)" == "0" ]] && echo "ERROR: wrong user" >&1 && exit 1
export IS_COMPAT=0
########## init config #########
if [[ ! -f ~/.config/workspace.conf ]]; then
@@ -48,7 +49,7 @@ mkdir -p "${USER_DIRS[@]}"
########## scripts #############
cp -rf bin/* ~/.local/bin
LN_EXCLUDE_DIRS=(i3blocks bemenu sway)
LN_EXCLUDE_DIRS=(i3blocks bemenu sway workspace-compat)
ln_exclude_dirs_cmp=" ${LN_EXCLUDE_DIRS[*]} "
for sdir in bin/*; do
@@ -64,7 +65,6 @@ done
################################
########### config #############
export IS_COMPAT=0
gomplate --input-dir config \
--output-map "$HOME/.config/{{ .in | strings.ReplaceAll \".tmpl\" \"\" }}" \
--exclude-processing "!*.tmpl" \
@@ -83,6 +83,17 @@ mkdir -p ~/.gnupg && ln -sf ~/.config/gnupg/gpg-agent.conf ~/.gnupg
cp -rf data/* ~/.local/share
###############################
########### compat ############
export IS_COMPAT=1
gomplate --file bin/workspace-compat/profile.tmpl \
-t vimrc=config/vim/vimrc \
-t inputrc=config/readline/inputrc \
-t lesskey=config/less/lesskey \
-t wssh=bin/wssh \
--out ~/.local/bin/workspace-compat/profile
export IS_COMPAT=0
###############################
swaymsg reload || true
echo ok