You are not logged in.

#1 2025-12-17 00:03:29

WayfarerCodes
Member
Registered: 2025-05-30
Posts: 9

[SOLVED] Can I set an env. variable only for a specific compositor?

I'm in the process of transitioning from KDE to Niri and I'm using qt6ct for theming purposes. I'm not very experienced with environment variables, but I've got it working by setting the QT_QPA_PLATFORMTHEME to qt6ct in /etc/environment. Nothing else I've tried has actually set the theme, but I'd like it to work such that it will be set on Niri but not if I'm using KDE instead since it breaks KDE's own theming.

Last edited by WayfarerCodes (2025-12-18 16:21:29)

Offline

#2 2025-12-17 01:35:29

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,075

Re: [SOLVED] Can I set an env. variable only for a specific compositor?

Not in /etc/environment, but by using the environment variable mechanism of the compositor in question: https://github.com/YaLTeR/niri/wiki/Con … nvironment

Offline

#3 2025-12-18 16:19:36

WayfarerCodes
Member
Registered: 2025-05-30
Posts: 9

Re: [SOLVED] Can I set an env. variable only for a specific compositor?

I just tried setting the variable that way and it seems to be working. Thanks for pointing that mechanism out. I'll mark the issue as solved.

Offline

Board footer

Powered by FluxBB