From d33afe18c6a80ae84b189f623215c0c07fa7cf26 Mon Sep 17 00:00:00 2001 From: = Date: Sat, 11 Apr 2020 17:27:46 +0100 Subject: [PATCH] only compute hostname once --- bspwmrc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bspwmrc b/bspwmrc index 1e3685a..beac03a 100755 --- a/bspwmrc +++ b/bspwmrc @@ -1,14 +1,15 @@ #! /bin/sh if pgrep sxhkd ; then pkill sxhkd; fi +_hostname="$(hostname)" -if [ "$(hostname)" = Patricia ] ; then +if [ "$_hostname" = Patricia ] ; then # aoc bspc monitor HDMI-0 -d I II III IV V VI VII VIII IX X # the other one bspc monitor DVI-0 -d 001 010 011 100 x101 sxhkd -c ~/.config/sxhkd/sxhkdrc ~/.config/sxhkd/sxhkdrc.bspwm ~/.config/sxhkd/sxhkdrc.bspwm.patricia & -elif [ "$(hostname)" = Pamela ] ; then +elif [ "$_hostname" = Pamela ] ; then # AOC bspc monitor HDMI-1-1 -d I II III IV V VI VII VIII IX X # samsung