1
0
Fork 0

zsh: add function to generate i3/sway configs

This commit is contained in:
tastytea 2024-01-04 16:32:29 +01:00
parent 901fa8f33f
commit 5986988c0c
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
#!/usr/bin/env zsh
# generates config for i3 and sway by combining the common and local configs
setopt LOCAL_OPTIONS ERR_RETURN NO_UNSET PIPE_FAIL
for wm in i3 sway; do
local dir=${HOME}/.config/${wm}
[[ -f ${dir}/config.local ]] || touch ${dir}/config.local
\cat ${dir}/config.common ${dir}/config.local > ${dir}/config
done