summaryrefslogtreecommitdiff
path: root/modules/10-i3/install.sh
diff options
context:
space:
mode:
authorGalen Guyer <galen@galenguyer.com>2022-12-07 13:49:41 -0500
committerGalen Guyer <galen@galenguyer.com>2022-12-07 13:49:41 -0500
commit33e99935b0c4477f87aac470411056cb20b42a7f (patch)
tree5281d0dfc4817e50e563489c10663526f19dc306 /modules/10-i3/install.sh
parent84806a9cbdc26ac05036bbdc901364789c7380cd (diff)
Update i3 config
Diffstat (limited to 'modules/10-i3/install.sh')
-rw-r--r--modules/10-i3/install.sh20
1 files changed, 15 insertions, 5 deletions
diff --git a/modules/10-i3/install.sh b/modules/10-i3/install.sh
index dfb4501..17bc534 100644
--- a/modules/10-i3/install.sh
+++ b/modules/10-i3/install.sh
@@ -30,15 +30,25 @@ function preinstall() {
function install() {
# 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"
+ if ! [[ -f "$_scriptdir/.firstrun" ]]; then
+ if [[ -d "$HOME/.config/i3" ]] && ! [[ -d "$HOME/.config/i3.bak" ]]; then
+ log verbose "making backup of i3"
+ cp -r "$HOME/.config/i3" "$HOME/.config/i3.bak"
+ fi
+ if [[ -d "$HOME/.config/i3status" ]] && ! [[ -d "$HOME/.config/i3status.bak" ]]; then
+ log verbose "making backup of i3status"
+ cp -r "$HOME/.config/i3status" "$HOME/.config/i3status.bak"
+ fi
touch "$_scriptdir/.firstrun"
fi
log info "linking i3 config"
- mkdir -p "$HOME/.config/i3"
- ln -sf "$_scriptdir/config" "$HOME/.config/i3/config"
+ rm -rf "$HOME/.config/i3"
+ ln -sf "$_scriptdir/i3" "$HOME/.config/i3"
+
+ log info "linking i3status config"
+ rm -rf "$HOME/.config/i3status"
+ ln -sf "$_scriptdir/i3status/" "$HOME/.config/i3status"
log info "linking xinitrc"
ln -sf "$_scriptdir/xinitrc" "$HOME/.xinitrc"