diff options
Diffstat (limited to 'modules/20-alacritty/install.sh')
-rw-r--r-- | modules/20-alacritty/install.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/modules/20-alacritty/install.sh b/modules/20-alacritty/install.sh new file mode 100644 index 0000000..0cb7f22 --- /dev/null +++ b/modules/20-alacritty/install.sh @@ -0,0 +1,29 @@ +_script="$(realpath ${BASH_SOURCE[0]})" +_scriptname="$(basename $_script)" +_scriptdir="$(dirname $_script)" +_modulename="$(basename $_scriptdir)" +DOT_MODULE_NAME="i3" + +function preinstall() { + if ! [[ -x "$(command -v alacritty)" ]]; then + PACKAGES+=("alacritty") + fi +} + +function install() { + return + + # backup old file if it exists and we haven't backed it up before + if [[ -f "$HOME/.config/i3/config" ]] && ! [[ -f "$HOME/.config/i3/config.bak" ]] && ! [[ -f "$_scriptdir/.firstrun" ]]; then + log verbose "making backup" + cp "$HOME/.config/i3/config" "$HOME/.config/i3/config.bak" + touch "$_scriptdir/.firstrun" + fi + + log info "linking i3 config" + mkdir -p "$HOME/.config/i3" + ln -f "$_scriptdir/config" "$HOME/.config/i3/config" + + log info "linking xinitrc" + ln -f "$_scriptdir/xinitrc" "$HOME/.xinitrc" +} |