Files
.dotfiles/.xinitrc
2025-05-30 15:34:12 +02:00

25 lines
894 B
Bash
Executable File

#!/bin/bash
# load system xinit scripts
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in "/etc/X11/xinit/xinitrc.d"/?*.sh; do
[ -x "$f" ] && . "$f"
done
unset f
fi
xrandr --setprovideroutputsource modesetting NVIDIA-G0 & # set NVIDIA as primary GPU
xrandr --auto #
xrandr --dpi 96 # set dpi
nvidia-settings -l # apply nvidia-settings
export __GL_YIELD="USLEEP" # fix for awful diagonal screen tear
numlockx on # ensure numlock is on before setting keymap
[[ -f "/etc/xprofile" ]] && source "/etc/xprofile" # load the system-wide xprofile
[[ -f "$HOME/.xprofile" ]] && source "$HOME/xprofile" # load the local xprofile configuration
[[ -f "$HOME/.Xmodmap" ]] && xmodmap "$HOME/.Xmodmap" # load local keymap
# start the graphical environment (replaces shell)
exec /usr/bin/cinnamon-session