diff options
| author | krolyxon <krolyxon@tutanota.com> | 2026-01-13 20:44:06 +0530 |
|---|---|---|
| committer | krolyxon <krolyxon@tutanota.com> | 2026-01-13 20:44:06 +0530 |
| commit | 650f52140fd531b242b4ce942f8e57079fc295e1 (patch) | |
| tree | 5563bfbb2bad46e7d4cc9a38fc762afd51957cb9 /.config/shell | |
| parent | 15264a6db2a2f5f019af989b69d7e0a80625bdca (diff) | |
make nvidia environment variables conditional
Diffstat (limited to '.config/shell')
| -rw-r--r-- | .config/shell/profile | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/.config/shell/profile b/.config/shell/profile index c168882..e8da8f9 100644 --- a/.config/shell/profile +++ b/.config/shell/profile @@ -53,6 +53,18 @@ export PATH="$PATH:$XDG_DATA_HOME/cargo/bin" export MPD_HOST="localhost" export MPD_PORT="6600" + +# Force NVIDIA as primary GPU, if envycontrol mode is set to nvidia +MODE=$(envycontrol -q) +if [[ $MODE = "nvidia" ]]; then + export __NV_PRIME_RENDER_OFFLOAD=1 + export __GLX_VENDOR_LIBRARY_NAME=nvidia + export __VK_LAYER_NV_optimus=NVIDIA_only + export GBM_BACKEND=nvidia-drm + export WLR_NO_HARDWARE_CURSORS=1 + export LIBVA_DRIVER_NAME=nvidia +fi + # Mpd daemon start [ ! -s ~/.config/mpd/pid ] && mpd |
