diff --git a/dotfiles/.config/hypr/core/env.lua b/dotfiles/.config/hypr/core/env.lua index a22c2e7..e33efd3 100644 --- a/dotfiles/.config/hypr/core/env.lua +++ b/dotfiles/.config/hypr/core/env.lua @@ -19,8 +19,7 @@ hl.env("XDG_SESSION_TYPE", "wayland") -- QT Variables hl.env("QT_AUTO_SCREEN_SCALE_FACTOR", "1") hl.env("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1") -hl.env("QT_QPA_PLATFORMTHEME", "qt5ct") -hl.env("QT_QPA_PLATFORMTHEME", "qt6ct") +hl.env("QT_QPA_PLATFORMTHEME", "qt6ct") -- qt6ct also styles Qt5 apps that read it; qt5ct.conf is kept in sync -- hyprland-qt-support hl.env("QT_QUICK_CONTROLS_STYLE", "org.hyprland.style") @@ -49,13 +48,17 @@ hl.env("MOZ_ENABLE_WAYLAND", "1") hl.env("ELECTRON_OZONE_PLATFORM_HINT", "auto") -- auto selects Wayland if possible, X11 otherwise -- NVIDIA --- This is from the Hyprland wiki. Uncomment below if an nvidia GPU is detected. -- See hyprland wiki https://wiki.hyprland.org/Nvidia/#environment-variables - -hl.env("LIBVA_DRIVER_NAME", "nvidia") -hl.env("__GLX_VENDOR_LIBRARY_NAME", "nvidia") -hl.env("NVD_BACKEND", "direct") -hl.env("GSK_RENDERER", "ngl") +-- Only when the NVIDIA kernel driver is loaded, so the same config works on the +-- laptop (forcing LIBVA_DRIVER_NAME=nvidia there breaks VA-API video decoding). +local nvidia = io.open("/proc/driver/nvidia/version") +if nvidia then + nvidia:close() + hl.env("LIBVA_DRIVER_NAME", "nvidia") + hl.env("__GLX_VENDOR_LIBRARY_NAME", "nvidia") + hl.env("NVD_BACKEND", "direct") + hl.env("GSK_RENDERER", "ngl") +end -- additional ENV's for nvidia. Caution, activate with care -- hl.env("GBM_BACKEND", "nvidia-drm")