bspwm: Only disable power saving on virtual machines

Now physical machines still get power saving, and virtual machines don't
since power saving is automatically handled by the host.
This commit is contained in:
Donovan Glover 2022-07-29 11:06:01 -04:00
parent 750fb7a2ba
commit 93e55359ed
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -54,8 +54,12 @@ else
wal -o ~/.config/wal/done.sh --theme base16-tomorrow-night wal -o ~/.config/wal/done.sh --theme base16-tomorrow-night
fi fi
# Never blank the screen (disable power saving) # Never blank the screen if it's a virtual machine (disable power saving)
VIRTUAL="$(systemd-detect-virt)"
if [[ "$VIRTUAL" != "none" ]]; then
xset s off -dpms xset s off -dpms
fi
# Start picom (prevents screen tearing) # Start picom (prevents screen tearing)
picom -b picom -b