From 4acf25fc6f3b2ad5c1a18600efb11ff65115990e Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Mon, 10 Jan 2022 11:38:33 -0700 Subject: For the work laptop, fix it so that picom does not run with multiple monitors (it slows things down way too much) --- extras/HOME/.xmonad/startup | 9 +++++++-- 1 file 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 '\' | 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" -- cgit