aboutsummaryrefslogtreecommitdiff
path: root/extras/HOME
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2022-01-10 11:38:33 -0700
committerJosh Rahm <joshuarahm@gmail.com>2022-10-09 12:19:45 -0600
commit4acf25fc6f3b2ad5c1a18600efb11ff65115990e (patch)
tree10fe27d353a7f0abc63b609bfb32494d67403e8c /extras/HOME
parentbcd2d0e2fe33cd9b316707fb3be146c20c0b221a (diff)
downloadrde-4acf25fc6f3b2ad5c1a18600efb11ff65115990e.tar.gz
rde-4acf25fc6f3b2ad5c1a18600efb11ff65115990e.tar.bz2
rde-4acf25fc6f3b2ad5c1a18600efb11ff65115990e.zip
For the work laptop, fix it so that picom does not run with multiple monitors (it slows things down way too much)
Diffstat (limited to 'extras/HOME')
-rwxr-xr-xextras/HOME/.xmonad/startup9
1 files changed, 7 insertions, 2 deletions
diff --git a/extras/HOME/.xmonad/startup b/extras/HOME/.xmonad/startup
index 31e510b..5656e09 100755
--- a/extras/HOME/.xmonad/startup
+++ b/extras/HOME/.xmonad/startup
@@ -15,8 +15,13 @@ hostname_rahm1() {
xinput set-prop "TPPS/2 Elan TrackPoint" "Coordinate Transformation Matrix" 3 0 0 0 3 0 0 0 1
xinput set-prop "SYNA8004:00 06CB:CD8B Touchpad" "Coordinate Transformation Matrix" 3 0 0 0 3 0 0 0 1
- if [ -z "$(ps aux | grep compton | grep -v grep)" ] ; then
- __GL_SYNC_TO_VBLANK=1 nohup compton --backend=glx &>/dev/null &
+ n_displays=$(xrandr | grep '\<connected\>' | wc -l)
+ if [[ "$n_displays" -le "2" ]] ; then
+ if [ -z "$(ps aux | grep compton | grep -v grep)" ] ; then
+ __GL_SYNC_TO_VBLANK=1 nohup picom --backend=glx &>/dev/null &
+ fi
+ else
+ killall picom
fi
feh --bg-scale "$HOME/wp.jpg"