You are not logged in.

#1 2026-06-02 06:36:16

Enrico1989
Member
Registered: 2018-07-05
Posts: 318

[SOLVED] How to get pavucontrol in dark mode?

I've never ever solved the audio issue on this system, so everytime I suspend the system (or even everytime I move to a different VT where I haven't logged in yet), something is messed up, and when I wake the system up (or go back to the VT where I have X running), I have to make the dance described at the first link.

Doing that in the evening with pavucontrol opening in light mode is a pain to my eyes.

How do I make it use dark mode? I've tried turning my ~/.bash_profile from

#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
[[ ! $DISPLAY && ( $XDG_VTNR == 1 || $XDG_VTNR == 2 ) ]] && exec startx || true

to

#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
export QT_QPA_PLATFORMTHEME=qt6ct
[[ ! $DISPLAY && ( $XDG_VTNR == 1 || $XDG_VTNR == 2 ) ]] && exec startx || true

but this doesn't work (*).

Maybe what's left for me to do is to run the commands

gsettings set org.gnome.desktop.interface color-scheme prefer-dark
gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark

as suggested at https://www.reddit.com/r/archlinux/comm … dark_mode/ ?

Haven't tried that yet because I wanted to make sure on this forum I'm not messing things up more than I might have already done.

---

(*) Despite I do see a change in the appearance of the apps run via qt5ct and qt6ct from light to dark mode. By the way, without that line in .bash_profile, both apps show a warning at the top saying that "The application is not correctly configured", and if I ask for information, the message "The QT_QPA_PLATFORMTHEME environment variable is not set (required values: qt5ct or qt6ct).", which is the reason why I tried with exporting that variable to one of those values in the .bash_profile file.

Last edited by Enrico1989 (2026-06-02 20:14:48)

Offline

#2 2026-06-02 06:57:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,725

Re: [SOLVED] How to get pavucontrol in dark mode?

pavucontrol uses gtk4, anything Qt won't help you much
https://wiki.archlinux.org/title/GTK#Themes
Afaiu libadwaita only will respond to the GTK_THEME environment (and only support adwaita in the light or dark variant)

Have you considered scripting the workaround using amixer or pactl?

Offline

#3 2026-06-02 07:35:04

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,676

Re: [SOLVED] How to get pavucontrol in dark mode?

Offline

#4 2026-06-02 08:32:11

Enrico1989
Member
Registered: 2018-07-05
Posts: 318

Re: [SOLVED] How to get pavucontrol in dark mode?

seth wrote:

pavucontrol uses gtk4, anything Qt won't help you much
https://wiki.archlinux.org/title/GTK#Themes
Afaiu libadwaita only will respond to the GTK_THEME environment (and only support adwaita in the light or dark variant)

Adding

export GTK_THEME=Adwaita:dark

to my ~/.bash_profile seems to work.

But is this the file I'm supposed to put that line in? I suppose the answer is "yes, because bash is your login shell"?

seth wrote:

Have you considered scripting the workaround using amixer or pactl?

You mean for fixing the audio issue I alluded to?

Offline

#5 2026-06-02 13:59:17

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,725

Re: [SOLVED] How to get pavucontrol in dark mode?

You mean for fixing the audio issue I alluded to?

Yes.

But is this the file I'm supposed to put that line in?

No. I mean, you can, but that relies on details of the session startup process.
https://wiki.archlinux.org/title/Environment_variables

Offline

#6 2026-06-02 17:03:02

Enrico1989
Member
Registered: 2018-07-05
Posts: 318

Re: [SOLVED] How to get pavucontrol in dark mode?

Here's what I have:

$ awk -F: '/enrico/ { print $NF }' /etc/passwd
/bin/bash
$ cat .bash_profile 
#
# ~/.bash_profile
#

[[ -f ~/.bashrc ]] && . ~/.bashrc

[[ ! $DISPLAY && ( $XDG_VTNR == 1 || $XDG_VTNR == 2 ) ]] && exec startx || true

so if I understand the link you suggested, §2.2.1.2 applies to me, so I have to add this line

export GTK_THEME=Adwaita:dark
export QT_QPA_PLATFORMTHEME=qt6ct # anything bad at adding this too?

to ~/.xinitrc, is it so?

Offline

#7 2026-06-02 19:27:46

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,725

Re: [SOLVED] How to get pavucontrol in dark mode?

You can.
There's actually no single correct answer to this, it's just important to understand that exporting variables in a specific shell (bash) does not guarantee that they're gonna be available in another shell (your desktop)
However, in this case the bash environment would obviously also inherited by startx, xinit and everything you're starting there.


Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#8 2026-06-02 20:08:40

Enrico1989
Member
Registered: 2018-07-05
Posts: 318

Re: [SOLVED] How to get pavucontrol in dark mode?

One last question, and I'm asking because I've noticed that my editor assign filetype "sh" to .bash_profile, but "conf" to .xinitrc: is .xinitrc not a shell script?

It is just a shell script according to https://wiki.archlinux.org/title/Xinit#Configuration:

will look for ~/.xinitrc to run as a shell script to start up client programs.

Last edited by Enrico1989 (2026-06-02 20:10:27)

Offline

#9 2026-06-02 20:17:31

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,725

Re: [SOLVED] How to get pavucontrol in dark mode?

You need a better editor wink

Adding a shebang #!/bin/sh to the xinitrc might help here.

Offline

Board footer

Powered by FluxBB