niri: render with Nvidia dGPU when iGPU is enabled

This commit is contained in:
2025-10-14 23:58:39 +02:00
parent 611b944062
commit c19bb194a4
6 changed files with 23 additions and 4 deletions

View File

@@ -27,3 +27,14 @@ else
export HYPR_AQ_DRM_DEVICES=/dev/dri/card0
fi
for file in $HOME/.config/niri/config.kdl $HOME/.config/niri/config.kdl.template; do
[ -f "$file" ] || continue
if [ -n "$NVIDIA_DRI_PATH" ]; then
sed -i "s|render-drm-device \"/dev/dri/card[0-9]*\"|render-drm-device \"$NVIDIA_DRI_PATH\"|" "$file"
elif [ -n "$Intel_DRI_PATH" ]; then
sed -i "s|render-drm-device \"/dev/dri/card[0-9]*\"|render-drm-device \"$Intel_DRI_PATH\"|" "$file"
else
sed -i "s|render-drm-device \"/dev/dri/card[0-9]*\"|render-drm-device \"/dev/dri/card0\"|" "$file"
fi
done

View File

@@ -69,9 +69,9 @@ This feature is only enabled in Niri. Swww also manages wallpapers of the Hyprla
## Wallpaper & Colortheme
[A small utility](https://github.com/Uynide/Wallpaper_Chooser) from myself, which implements a Image Carousel with Qt Widgets, is used to select a wallpaper from the collection. Once selected, [a script](https://github.com/Uyanide/dotfiles/blob/main/.scripts/change-colortheme) will pick the most suitable primary color (so-called flavor) for the wallpaper from the Catppuccin Mocha palette. Many applications that can be configured with a colortheme will adhere the result (including most Qt6 apps via Kvantum and GTK3&4 apps via nwg-look).
[A small utility](https://github.com/Uyanide/Wallpaper_Chooser) from myself, which implements an Image Carousel with Qt Widgets, is used to select a wallpaper from the collection. Once selected, [a script](https://github.com/Uyanide/dotfiles/blob/main/.scripts/change-colortheme) will pick the most suitable primary color (so-called flavor) for the wallpaper from the Catppuccin Mocha palette. Many applications that can be configured with a colortheme will adhere the result (including most Qt6 apps via Kvantum and GTK3&4 apps via nwg-look).
As for the wallpaper collection, see [backgrounds repo for personal use](https://github.com/Uyanide/backgrounds).
As for my wallpaper collection, see [backgrounds repo for personal use](https://github.com/Uyanide/backgrounds).
## Rofi

View File

@@ -256,6 +256,10 @@ cursor {
hide-when-typing
}
debug {
render-drm-device "/dev/dri/card0"
}
screenshot-path "~/Pictures/Screenshots/.niri_screenshot.png"
// gestures {

View File

@@ -256,6 +256,10 @@ cursor {
hide-when-typing
}
debug {
render-drm-device "/dev/dri/card0"
}
screenshot-path "~/Pictures/Screenshots/.niri_screenshot.png"
// gestures {

View File

@@ -2,7 +2,7 @@
"location": "Munich",
"notifications": {
"doNotDisturb": false,
"lastSeenTs": 1760464428000
"lastSeenTs": 1760477228000
},
"primaryColor": "#89b4fa",
"showLyricsBar": false

View File

@@ -9,7 +9,7 @@ MonitorItem {
fillColor: Colors.yellow
critical: SystemStatService.cpuTemp > 80
value: Math.round(SystemStatService.cpuTemp)
maxValue: 120
maxValue: 100
textSuffix: "°C"
onClicked: {
if (action.running) {