add some xrandr checks for nvidia-related stuff, and change dbus run command

This commit is contained in:
frosty 2024-09-09 22:02:04 -04:00
parent 4a51e02919
commit 4711ad2416

View file

@ -1,33 +1,23 @@
#!/bin/sh #!/bin/sh
xrandr --setprovideroutputsource modesetting NVIDIA-0 if $(xrandr --listproviders | grep 'NVIDIA'); then
xrandr --auto xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --dpi 96 xrandr --auto
xrandr \ xrandr --dpi 96
--output eDP-1 --off \ xrandr \
--output HDMI-2 --primary --mode 1280x1024 --pos 0x0 --rate 75 --output eDP-1 --off \
--output HDMI-2 --primary --mode 1280x1024 --pos 0x0 --rate 75
export __NV_PRIME_RENDER_OFFLOAD=1 export __NV_PRIME_RENDER_OFFLOAD=1
export __GLX_VENDOR_LIBRARY_NAME="nvidia" export __GLX_VENDOR_LIBRARY_NAME="nvidia"
fi
[ -f "$XDG_DATA_HOME/wallpaper" ] && xwallpaper --zoom "$XDG_DATA_HOME/wallpaper" & [ -f "$XDG_DATA_HOME/wallpaper" ] && xwallpaper --zoom "$XDG_DATA_HOME/wallpaper" &
xrdb -merge "$HOME/.Xresources" xrdb -merge "$HOME/.Xresources"
pipewire & runsvdir "$SVDIR" &
pipewire-pulse &
wireplumber &
dunst &
picom &
udiskie &
mpd --no-daemon &
modbot -x & modbot -x &
while :; do while :; do
if command -v dbus-launch >/dev/null; then dbus-launch --sh-syntax --exit-with-session dwm
dbus-launch --sh-syntax --exit-with-session dwm
elif command -v dbus-run-session >/dev/null; then
dbus-run-session dwm
fi
done done