Kwybars
Configuration

Config Switching

Use a stable active config path with kwybarsctl switch-config.

kwybarsctl switch-config is useful when you want multiple presets but only one active file that the running daemon or overlay watches.

Why Use It

Instead of restarting with a different config every time, point the daemon at a stable file:

~/.config/kwybars/current.toml

Then switch which preset that active path points to.

Manual Workflow

Start the daemon with the stable active path:

kwybars-daemon --config ~/.config/kwybars/current.toml

Then switch presets:

kwybarsctl switch-config --active ~/.config/kwybars/current.toml ~/.config/kwybars/custom/001_line_bottom.toml
kwybarsctl switch-config --active ~/.config/kwybars/current.toml ~/.config/kwybars/custom/002_line_top.toml

This works only when the running daemon is watching the same active file passed to --active.

If the daemon was started without --config, it watches the default path instead:

~/.config/kwybars/config.toml

systemd --user

If you want the packaged user service to use the same stable active config path, add a user override:

systemctl --user edit kwybars-daemon.service

Use:

[Service]
ExecStart=
ExecStart=/usr/bin/env kwybars-daemon --config %h/.config/kwybars/current.toml

Then reload and restart the service:

systemctl --user daemon-reload
systemctl --user restart kwybars-daemon.service

After that, switching presets works as expected:

kwybarsctl switch-config --active ~/.config/kwybars/current.toml ~/.config/kwybars/custom/001_line_bottom.toml
kwybarsctl switch-config --active ~/.config/kwybars/current.toml ~/.config/kwybars/custom/002_line_top.toml

Wallpaper Overlay Hooks

If you use a wallpaper tool that can run a hook after selecting a wallpaper, point it at kwybarsctl image-overlay match:

kwybarsctl image-overlay match --config ~/.config/kwybars/current.toml --overlay-dir ~/.config/kwybars/overlays "$wallpaper"

For a wallpaper named forest.jpg, Kwybars looks for forest.png, forest.webp, forest.jpg, then forest.jpeg in the overlay directory. The command updates [image_overlay] in the active config, and the running overlay reloads through the normal config watcher.

Example Hook Script

Create a small wrapper that changes the wallpaper first, then matches the overlay:

#!/usr/bin/env bash
set -euo pipefail

wallpaper="$1"
active_config="${KWYBARS_CONFIG:-$HOME/.config/kwybars/config.toml}"
overlay_dir="$HOME/.config/kwybars/overlays"

awww img "$wallpaper"
kwybarsctl image-overlay match --config "$active_config" --overlay-dir "$overlay_dir" "$wallpaper"

If you keep a stable preset symlink at ~/.config/kwybars/current.toml, set active_config to that path instead:

active_config="$HOME/.config/kwybars/current.toml"

For hyprpaper, call Kwybars after hyprctl hyprpaper wallpaper:

monitor="DP-1"
wallpaper="$HOME/Pictures/wallpapers/forest.jpg"

hyprctl hyprpaper wallpaper "$monitor,$wallpaper"
kwybarsctl image-overlay match --config ~/.config/kwybars/current.toml --overlay-dir ~/.config/kwybars/overlays "$wallpaper"

Important Notes

  • use %h inside the systemd unit, not ~
  • the daemon must watch the same stable file that kwybarsctl switch-config --active ... updates
  • the default packaged unit starts kwybars-daemon without --config, so by default it watches ~/.config/kwybars/config.toml, not current.toml

On this page