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.
This commit is contained in:
Tobias Witek 2018-05-23 16:54:56 +02:00
parent 7bbf9bf409
commit 99f693e950
2 changed files with 14 additions and 7 deletions

View file

@ -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"

View file

@ -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