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

29 lines
1.2 KiB
Bash
Executable File

#!/usr/bin/env bash
# shellcheck disable=SC1090,SC1091
# load system xinit scripts
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in "/etc/X11/xinit/xinitrc.d"/?*.sh; do
source "$f"
done
unset f
fi
#xrandr --setprovideroutputsource modesetting NVIDIA-G0 & # set NVIDIA as primary GPU
xrandr --output=eDP-1 --mode=1920x1080 --rotate=normal --pos=0x0 --auto --primary
xrandr --output=HDMI-1 --mode=1920x1080 --rotate=left --pos=-1080x-960 --auto
xrandr --dpi 96
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
setxkbmap us -variant altgr-intl -option '' # load the correct keymap which actually has 3rd level shift
[[ -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
[[ -x /usr/bin/picom ]] && /usr/bin/picom -b # start picom as a background service
exec /usr/bin/i3 # start the graphical environment (replaces shell)