diff options
| author | Josh Rahm <rahm@google.com> | 2022-01-10 11:38:33 -0700 |
|---|---|---|
| committer | Josh Rahm <rahm@google.com> | 2022-01-10 11:38:33 -0700 |
| commit | 7ead6ec18df2b8d45d977540ccfbd698e2ddce94 (patch) | |
| tree | 96b3dda2842ec779697e66943025d0b509dcdba5 | |
| parent | c64b0a5eb6de97da0d7bb9f744b61e88291bb062 (diff) | |
| download | rde-7ead6ec18df2b8d45d977540ccfbd698e2ddce94.tar.gz rde-7ead6ec18df2b8d45d977540ccfbd698e2ddce94.tar.bz2 rde-7ead6ec18df2b8d45d977540ccfbd698e2ddce94.zip | |
For the work laptop, fix it so that picom does not run with multiple monitors (it slows things down way too much)
| -rwxr-xr-x | extras/HOME/.xmonad/startup | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/extras/HOME/.xmonad/startup b/extras/HOME/.xmonad/startup index 07b164d..78603c7 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" |