From 99f693e95003c5b5f0381ca3ed8a647178288e0e Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Wed, 23 May 2018 16:54:56 +0200 Subject: [PATCH] Update paths to Arch Linux load-i3-bars.sh and toggle-display.sh are little-used helper scripts that probably nobody except me uses. Since I switched to Arch, update path information to reflect the Arch setup. --- bin/load-i3-bars.sh | 18 +++++++++++------- bin/toggle-display.sh | 3 +++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/bin/load-i3-bars.sh b/bin/load-i3-bars.sh index cbe0e95..6292f75 100755 --- a/bin/load-i3-bars.sh +++ b/bin/load-i3-bars.sh @@ -1,9 +1,13 @@ #!/usr/bin/env bash -if [ ! -f ~/.i3/config.template ]; then - cp ~/.i3/config ~/.i3/config.template +if [ ! -f ~/.config/i3/config.template ]; then + cp ~/.config/i3/config ~/.config/i3/config.template else - cp ~/.i3/config.template ~/.i3/config + cp ~/.config/i3/config.template ~/.config/i3/config +fi + +if [ -f ~/.config/i3/config.template.private ]; then + cat ~/.config/i3/config.template.private >> ~/.config/i3/config fi screens=$(xrandr -q|grep ' connected'| grep -P '\d+x\d+' |cut -d' ' -f1) @@ -14,11 +18,11 @@ while read -r line; do screen=$(echo $line | cut -d' ' -f1) others=$(echo $screens|tr ' ' '\n'|grep -v $screen|tr '\n' '-'|sed 's/.$//') - if [ -f ~/.i3/config.$screen-$others ]; then - cat ~/.i3/config.$screen-$others >> ~/.i3/config + if [ -f ~/.config/i3/config.$screen-$others ]; then + cat ~/.config/i3/config.$screen-$others >> ~/.config/i3/config else - if [ -f ~/.i3/config.$screen ]; then - cat ~/.i3/config.$screen >> ~/.i3/config + if [ -f ~/.config/i3/config.$screen ]; then + cat ~/.config/i3/config.$screen >> ~/.config/i3/config fi fi done <<< "$screens" diff --git a/bin/toggle-display.sh b/bin/toggle-display.sh index bd13a29..18a0b71 100755 --- a/bin/toggle-display.sh +++ b/bin/toggle-display.sh @@ -8,5 +8,8 @@ xrandr "$@" if [ -f $i3bar_update ]; then sleep 1 + if [ -f ~/.config/i3/images/background.png ]; then + feh --bg-fill ~/.config/i3/images/background.png + fi $i3bar_update fi