dotfiles/.local/share/scripts/monitor.sh

21 lines
493 B
Bash
Raw Normal View History

2023-11-08 22:58:55 +00:00
#!/bin/sh
2024-02-22 13:39:09 +00:00
if [ -f /usr/bin/envycontrol ]; then
gpu_mode=$(/usr/bin/envycontrol -q)
if [ "$gpu_mode" = "nvidia" ]; then
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
xrandr --output HDMI-0 --above eDP-1-1
xrandr --output HDMI-0 --primary
else
2024-09-16 17:00:06 +01:00
if [[ -n $(xrandr --listactivemonitors | grep HDMI-1-0) ]]; then
xrandr --output eDP-1 --off --output HDMI-1-0 --auto
else
xrandr --auto
fi
2024-02-22 13:39:09 +00:00
fi
2023-11-08 22:58:55 +00:00
fi
2024-02-08 11:23:23 +00:00
pkill picom
picom -b