dotfiles/.config/zsh/functions/gen_i3sway_config

12 lines
341 B
Bash
Executable File

#!/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