zsh: add function to generate i3/sway configs
This commit is contained in:
parent
901fa8f33f
commit
5986988c0c
11
.config/zsh/functions/gen_i3sway_config
Executable file
11
.config/zsh/functions/gen_i3sway_config
Executable 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
|
Loading…
Reference in New Issue
Block a user