From c276032599e78be1748b1ac110fc0f2aadc9eb41 Mon Sep 17 00:00:00 2001 From: xyz Date: Wed, 30 Mar 2022 02:37:19 -0700 Subject: .xinitrc, config for use x11 with nvidia gpu only --- home/xyz/.xinitrc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'home/xyz/.xinitrc') diff --git a/home/xyz/.xinitrc b/home/xyz/.xinitrc index 97bbe93d..957cdbdc 100644 --- a/home/xyz/.xinitrc +++ b/home/xyz/.xinitrc @@ -41,20 +41,26 @@ fi #clipmenud & fcitx5 -d redshift & -sbar & # udiskie recommanded to auto start here in .xinitrc, see: # https://github.com/coldfix/udiskie/issues/93 # https://github.com/coldfix/udiskie/issues/226 udiskie & -# xorg-server 21.1.1-2 set correct dpi for my computer, but I choose to take the blue pill -# Attention, don't use & at the end otherwise dwm status bar won't have proper dpi. -# xorg-server 21.1.1-3 "fixed" it, so no need now -#xrandr --dpi 96 # default fastest windows 10 keyboard repeat delay and rate # without editing registry, using filter key, or other third party program # see http://stereopsis.com/keyrepeat/ xset r rate 250 30 # https://dianne.skoll.ca/wiki/Remind_FAQ#How_can_I_generate_popup_windows_to_warn_me_of_timed_reminders.3F rem -z -k'notify-send -u critical "reminder" %s &' & +if [ "$(envycontrol --status)" = 'Current graphics mode is: nvidia' ]; then + # my testing shows this seems no need? + xrandr --setprovideroutputsource modesetting NVIDIA-0 + xrandr --auto + # xorg-server 21.1.1-2 set correct dpi for my computer, but I choose to take the blue pill + # Attention, don't use & at the end otherwise dwm status bar won't have proper dpi. + # xorg-server 21.1.1-3 "fixed" it, so no need now + # but nvidia driver need it now + xrandr --dpi 96 +fi +sbar & alacritty & exec dwm -- cgit v1.2.3-70-g09d2