Plank dock theme switch DARK/LIGHT system mode

hey everyone.
I was wondering, how can I switch Plank Dock's theme, following system light/dark mode.
I googled it and found out I can just write a script.
can anyone help me through it?

I don't think it support this kind of switch, maybe you can try Plank reloaded but you need to completely uninstall plank

1 Like

Hm, I took a look at Elementary OS 7.1, there the Plank dock has an automatic light mode/dark mode switcher, so it should be possible to setup this.

2 Likes

yeah everything is possible but Elementary OS use a fork of plank and they adapt it for them, but you can try to find how they did with decompile they files...

1 Like

Does Your System run in Wayland or X11? You can check that with the Terminal Command echo $XDG_SESSION_TYPE

I’m not familiar with scripts, so I can’t help you with that.
However, here’s what does work:
Install the gnome shell extension manager

sudo apt install gnome-shell-extension-manager

Open it and go to the tab browse and search the gnome extension
“Night theme switcher”.

Install it, then go to the settings (cog wheal) at tab "installed" in the extension manager.
There you'll find a tab "commands".
Enter the commands to set a custom plank theme for sunrise (choose a light theme) and sunset (choose a dark theme). Replace the themes 'Arc-Light' and 'Arc' with a theme you have installed. You can see the names of the themes when you run in terminal plank --preferences (or press ctrl+right mouse when your cursor is hovered over plank dock)
e.g.
sunrise:

gsettings set net.launchpad.plank.dock.settings:/net/launchpad/plank/docks/dock1/ theme 'Arc-Light'

sunset:

gsettings set net.launchpad.plank.dock.settings:/net/launchpad/plank/docks/dock1/ theme 'Arc'

You need two Plank themes, one light one and a dark one. Plank Reloaded includes some, but not with the narrow bar. You could use 'Matte' and 'Matte-Light' which is included into plank reloaded. The normal Plank package doesn´t contain a theme in light and dark.
I downloaded some additional Plank themes for my test, but they are a bit old. I'll search for better ones later. (GitHub - mrbvrz/plank-themes: 🚀 These are just collection of plank themes I collect when using elementary-os · GitHub).

Then I copied them to ~/.local/share/plank/themes.

That are screenshots with the Matte/Matte-Light Plank theme:

At Zorin appearance select the day/light switcher and the times you like. Set the same times in the gnome extension Night Theme Switcher.

3 Likes

Really good tip, it does the job really well :wink:
you should make a independent topic for that, I'm sure it could help some

1 Like

Plank hasn't been developed or maintained for years, so it won't work in Wayland. and with Gnome 50 xorg has been cutted. So with the next release of Zorin plank won't work.

1 Like

there is Plank Reloaded but for sure it stay for X11, and I'm not sure Zorin will follow Gnome 50 and wayland only, this is not the good way in my opinion because Wayland is really a mess and not finished

Until now, it seems as you can use Plank with XWayland. I made this test with plank reloaded which is still maintained.

1 Like

The latest Wayland is not a mess. It may be on zorin 17 as it doesn't use the latest.

I will never use wayland because it doesn't offer real windows management, they made 5 years to find how to place a window in the right place on a desktop after a suspend so I doubt they can manage correctly window placement like you can do with X11

Sounds like you're going to switch Distro and DE, if you not already had.

it may happens, but for now i will stay on Zorin 18.1 till 2029 :wink:

By the way for those who still using Plank, check my thread on Solus OS, called "Fun with Planks": Fun with Plank - Solus Forum

2 Likes

If you have a dark theme for the plank dock but not a light theme (as e.g. the 'Default' theme in Plank Reloaded), you can also copy the dock.theme file at /usr/share/plank/themes/Default and rename it to Default-Light and then change the values in the four lines at Plank Theme which define the color. You need root right to do this. That is my first trial:
Bildschirmfoto vom 2026-05-03 09-29-19

Bildschirmfoto vom 2026-05-03 09-28-40

2 Likes

@Nourpon Do you know where the script or service is located that switches the theme at sunrise/sunset or at specific times (setup in Zorin appearance)? I'd like to see if I can add the gsettings commands for Plank there.

it's a binary so you can't touch it.
to attach Plank's 'gsettings' to the theme change, no need to modify the daemon. The right approach is a GSettings listener:

bash

# Script in  autostart
#!/bin/bash
gsettings monitor com.zorin.desktop.auto-theme night-theme | while read -r line; do
    # Récupère le thème actif du moment
    current=$(gsettings get org.gnome.desktop.interface gtk-theme | tr -d "'")
    if echo "$current" | grep -qi "dark"; then
        gsettings set net.launchpad.plank.dock.settings:/net/launchpad/plank/docks/dock1/ theme 'Transparent'
    else
        gsettings set net.launchpad.plank.dock.settings:/net/launchpad/plank/docks/dock1/ theme 'Default'
    fi
done

Adapt Plank theme names according to what is installed ('plank --list-themes'). It's clean, non-intrusive, and tracks change in real time. :+1:

2 Likes

Where shall this script be saved and under which filename? Does it need to be executable?

any file name and any place and yes it has to be executable, you will just have to call it from autostart app like this for example

1 Like