Omarchy theme switching
I have several Linux distributions running, on my laptop I use Omarchy and on my desktop I have NixOS. I love the hyprland configuration of omarchy and how it works beautifully straight out of the box.
One thing I use, however, is automatic theme switching. When there is plenty of light during the day I like to use a white theme. At night, I like to use a dark theme. Most Desktop Environments have some way to configure this switch to happen automatically. On Omarchy it turns out to be trivial to implement as well.
First, we need a package that triggers a change based on time and location. The most simple package is darkman, a simple script that will trigger a change based on where you are. You can either hardcode the location in a configuration or use geoclue for it. I chose to do some hardcoding in the config as the times that I am not in my timezone with my laptop are very limited.
The configuration lives in /home/user/.config/darkman/config.yaml:
lat: 52.3
lng: 4.8
usegeoclue: false
portal: false
It will then look at /home/user/.local/share/darkman and execute every script in that directory with a paramter of light or dark. A small bash script toggles between the two themes.
#!/usr/bin/env bash
case "$1" in
dark) omarchy-theme-set vantablack ;;
light) omarchy-theme-set white ;;
default) exit 1 ;;
esac
Do not forget to make the script executable.
To enable the service use systemd. I would enable it as --user, that way you separate out your services from the system services.
systemctl --user enable --now darkman.service
It is easy to check if everything works by calling status on the service.
~ ❯ systemctl status --user darkman
● darkman.service - Framework for dark-mode and light-mode transitions.
Loaded: loaded (/usr/lib/systemd/user/darkman.service; enabled; preset: enabled)
Active: active (running) since Fri 2026-04-24 12:32:14 CEST; 4s ago
Invocation: 5a923b9f1e3341d987ac4c32a344be07
Docs: man:darkman(1)
Main PID: 44124 (darkman)
Tasks: 16 (limit: 18743)
Memory: 12.3M (peak: 69.2M)
CPU: 1.165s
CGroup: /user.slice/user-1000.slice/user@1000.service/background.slice/darkman.service
└─44124 /usr/bin/darkman run
Apr 24 12:32:14 mini darkman[44124]: 12:32:14 INF Running without XDG portal
Apr 24 12:32:14 mini darkman[44124]: 12:32:14 INF Not using geoclue; using static location
Apr 24 12:32:14 mini darkman[44124]: 12:32:14 INF Sundown comes first; so it's day time
Apr 24 12:32:14 mini darkman[44124]: 12:32:14 INF Wanted mode is mode=light
Apr 24 12:32:14 mini darkman[44124]: 12:32:14 INF No transition necessary
Apr 24 12:32:14 mini darkman[44124]: 12:32:14 INF Next sunrise time=2026-04-25T06:22:38.364+02:00
Apr 24 12:32:14 mini darkman[44124]: 12:32:14 INF Next sundown time=2026-04-24T20:54:17.853+02:00
Apr 24 12:32:14 mini darkman[44124]: 12:32:14 INF Will set an alarm for sundown
Apr 24 12:32:14 mini darkman[44124]: 12:32:14 INF Setting timer seconds=30123 nanoseconds=202749121
Apr 24 12:32:15 mini darkman[44124]: 12:32:15 INF Script exited OK name=omarchy



