only compute hostname once

This commit is contained in:
= 2020-04-11 17:27:46 +01:00
parent b8789cf0c1
commit d33afe18c6
1 changed files with 3 additions and 2 deletions

View File

@ -1,14 +1,15 @@
#! /bin/sh #! /bin/sh
if pgrep sxhkd ; then pkill sxhkd; fi if pgrep sxhkd ; then pkill sxhkd; fi
_hostname="$(hostname)"
if [ "$(hostname)" = Patricia ] ; then if [ "$_hostname" = Patricia ] ; then
# aoc # aoc
bspc monitor HDMI-0 -d I II III IV V VI VII VIII IX X bspc monitor HDMI-0 -d I II III IV V VI VII VIII IX X
# the other one # the other one
bspc monitor DVI-0 -d 001 010 011 100 x101 bspc monitor DVI-0 -d 001 010 011 100 x101
sxhkd -c ~/.config/sxhkd/sxhkdrc ~/.config/sxhkd/sxhkdrc.bspwm ~/.config/sxhkd/sxhkdrc.bspwm.patricia & sxhkd -c ~/.config/sxhkd/sxhkdrc ~/.config/sxhkd/sxhkdrc.bspwm ~/.config/sxhkd/sxhkdrc.bspwm.patricia &
elif [ "$(hostname)" = Pamela ] ; then elif [ "$_hostname" = Pamela ] ; then
# AOC # AOC
bspc monitor HDMI-1-1 -d I II III IV V VI VII VIII IX X bspc monitor HDMI-1-1 -d I II III IV V VI VII VIII IX X
# samsung # samsung