Skip to content

Theming

The theme is configurable through ~/.config/marble/theme.json.

Default options for reference:

ts
import { opt, mkOptions } from "../lib/option"

export default mkOptions("theme", {
    dark: {
        primary: opt("#51a4e7"),
        error: opt("#e55f86"),
        success: opt("#00D787"),
        bg: opt("#171717"),
        fg: opt("#eeeeee"),
        widget: opt("#eeeeee"),
        border: opt("#eeeeee"),
    },

    light: {
        primary: opt("#426ede"),
        error: opt("#b13558"),
        success: opt("#009e49"),
        bg: opt("#fffffa"),
        fg: opt("#080808"),
        widget: opt("#080808"),
        border: opt("#080808"),
    },

    blur: opt(1),
    scheme: opt<"dark" | "light">("dark"),
    widget: {
        opacity: opt(94),
    },
    border: {
        width: opt(1),
        opacity: opt(96),
    },

    shadows: opt(true),
    padding: opt(9),
    spacing: opt(9),
    radius: opt(9),
    font: opt("Ubuntu Nerd Font 14"),

    hyprland: {
        enable: opt(false),
        inactiveBorder: {
            dark: opt("#282828"),
            light: opt("#181818"),
        },
        gapsMultiplier: opt(2.2),
    },

    swww: {
        enable: opt(false),
        args: opt("--transition-type fade"),
    },

    tmux: {
        enable: opt(false),
        cmd: opt("tmux set @main_accent \"{hex}\""),
    },

    gsettings: {
        enable: opt(true),
    },
})

Icons

The ~/.config/marble/icons directory is added to the search path at startup.

When you see

txt
no icon "some-icon-name", fallback: "image-missing-symbolic"

You can substitute the some-icon-name in ~/.config/marble/substitutes.json.

json
{
    "some-icon-name": "the-icon-you-want-as-substitution",
    "transmission-gtk": "transmission",
    "org.wezfurlong.wezterm-symbolic": "terminal-symbolic",
    "audio-headset-bluetooth-symbolic": "audio-headphones-symbolic",
    "audio-card-analog-usb-symbolic": "audio-speakers-symbolic",
    "audio-card-analog-pci-symbolic": "audio-card-symbolic",
    "audio-card-analog-symbolic": "audio-card-symbolic",
}

INFO

When adding new icons and substitutions the shell has to be restarted.

Colors

Any css color is valid, but integrations such as Hyprland and tmux only work with hex colors. You can set dark and light colors and switch between them using the scheme option.

Integrations

Some programs have integrations with the theming API.

Hyprland

The primary color will be set as the activeBorder color.

Swww

Following the Gtk desktop portal, when enabled it will set the background to ~/.config/background and whenever that file changes it will be set again.

Tmux

Whenever the scheme or primary color changes cmd will be called replacing {hex} with the color.