Toqozz / wired-notify

Lightweight notification daemon with highly customizable layout blocks, written in Rust.
MIT License
552 stars 27 forks source link

Show off your Wired config here! #63

Open Toqozz opened 2 years ago

Toqozz commented 2 years ago

It's about time we had something like this.

Uploading your wired.ron file alongside a screenshot is encouraged but not mandatory.

Note: you can format your config like the following to make the code block collapsible:

<details><summary>Config</summary>

```rust
<!-- your config here -->


---

Here's the default Wired config -- pretty simple!:

![image](https://user-images.githubusercontent.com/6947819/163705847-95a47753-7594-4921-a8de-d13127b1f20c.png)

<details><summary>Config</summary>

```rust
    layout_blocks: [
        // Layout 1, when an image is present.
        (
            name: "root",
            parent: "",
            hook: Hook(parent_anchor: TL, self_anchor: TL),
            offset: Vec2(x: 7.0, y: 7.0),
            //render_criteria: [HintImage],
            // https://github.com/Toqozz/wired-notify/wiki/NotificationBlock
            params: NotificationBlock((
                monitor: 0,
                border_width: 3.0,
                border_rounding: 3.0,
                //background_color: Color(r: 0.15686, g: 0.15686, b: 0.15686, a: 1.0),
                background_color: Color(hex: "#282828"),
                border_color: Color(hex: "#ebdbb2"),
                border_color_low: Color(hex: "#282828"),
                border_color_critical: Color(hex: "#fb4934"),
                border_color_paused: Color(hex: "#fabd2f"),

                gap: Vec2(x: 0.0, y: 8.0),
                notification_hook: Hook(parent_anchor: BL, self_anchor: TL),
            )),
        ),

        (
            name: "image",
            parent: "root",
            hook: Hook(parent_anchor: TL, self_anchor: TL),
            offset: Vec2(x: 0.0, y: 0.0),
            // https://github.com/Toqozz/wired-notify/wiki/ImageBlock
            params: ImageBlock((
                image_type: Hint,
                // We actually want 4px padding, but the border is 3px.
                padding: Padding(left: 7.0, right: 0.0, top: 7.0, bottom: 7.0),
                rounding: 3.0,
                scale_width: 48,
                scale_height: 48,
                filter_mode: Lanczos3,
            )),
        ),

        (
            name: "summary",
            parent: "image",
            hook: Hook(parent_anchor: MR, self_anchor: BL),
            offset: Vec2(x: 0.0, y: 0.0),
            // https://github.com/Toqozz/wired-notify/wiki/TextBlock
            params: TextBlock((
                text: "%s",
                font: "Arial Bold 11",
                ellipsize: Middle,
                color: Color(hex: "#ebdbb2"),
                color_hovered: Color(hex: "#fbf1c7"),
                padding: Padding(left: 7.0, right: 7.0, top: 7.0, bottom: 0.0),
                dimensions: (width: (min: 50, max: 150), height: (min: 0, max: 0)),
            )),
        ),

        (
            name: "body",
            parent: "summary",
            hook: Hook(parent_anchor: BL, self_anchor: TL),
            offset: Vec2(x: 0.0, y: -3.0),
            // https://github.com/Toqozz/wired-notify/wiki/ScrollingTextBlock
            params: ScrollingTextBlock((
                text: "%b",
                font: "Arial 11",
                color: Color(hex: "#ebdbb2"),
                color_hovered: Color(hex: "#fbf1c7"),
                padding: Padding(left: 7.0, right: 7.0, top: 3.0, bottom: 7.0),
                width: (min: 150, max: 250),
                scroll_speed: 0.1,
                lhs_dist: 35.0,
                rhs_dist: 35.0,
                scroll_t: 1.0,
            )),
        ),
    ],

lukelex commented 2 years ago

image

Config ```rust ( max_notifications: 5, timeout: 4000, poll_interval: 16, // 16ms ~= 60hz / 7ms ~= 144hz. history_length: 20, replacing_enabled: true, replacing_resets_timeout: true, min_window_width: 300, min_window_height: 100, debug: false, debug_color: Color(r: 0.0, g: 1.0, b: 0.0, a: 1.0), debug_color_alt: Color(r: 1.0, g: 0.0, b: 0.0, a: 1.0), layout_blocks: [ ( name: "app_root", parent: "", hook: Hook(parent_anchor: MM, self_anchor: MM), offset: Vec2(x: 0, y: 0), render_criteria: [AppImage], params: NotificationBlock(( monitor: 0, border_width: 0, border_rounding: 8, background_color: Color(hex: "#F5F5F5"), border_color: Color(hex: "#00000000"), border_color_low: Color(hex: "#00000000"), border_color_critical: Color(hex: "#FF0000"), border_color_paused: Color(hex: "#00000000"), gap: Vec2(x: 0.0, y: 8.0), notification_hook: Hook(parent_anchor: BM, self_anchor: TM), )), ), ( name: "app_notification", parent: "app_root", hook: Hook(parent_anchor: TM, self_anchor: TM), offset: Vec2(x: 0, y: 0), params: ImageBlock(( image_type: App, padding: Padding(left: 40, right: 40, top: 40, bottom: 8), rounding: 4.0, scale_width: 152, scale_height: 152, filter_mode: Lanczos3, )), ), ( name: "app_summary", parent: "app_notification", hook: Hook(parent_anchor: BM, self_anchor: TM), offset: Vec2(x: 0, y: 12), params: TextBlock(( text: "%s", font: "Arial Bold 16", ellipsize: End, color: Color(hex: "#000000"), padding: Padding(left: 0, right: 0, top: 0, bottom: 0), dimensions: (width: (min: -1, max: 185), height: (min: 0, max: 0)), )), ), ( name: "app_body", parent: "app_summary", hook: Hook(parent_anchor: BM, self_anchor: TM), offset: Vec2(x: 0, y: 0), params: TextBlock(( text: "%b", font: "Arial Bold 16", ellipsize: End, color: Color(hex: "#000000"), padding: Padding(left: 0, right: 0, top: 0, bottom: 24), dimensions: (width: (min: -1, max: 250), height: (min: 0, max: 0)), )), ), ( name: "app_progress", parent: "app_notification", hook: Hook(parent_anchor: BM, self_anchor: TM), offset: Vec2(x: 0, y: 50), render_criteria: [Progress], params: ProgressBlock(( padding: Padding(left: 0, right: 0, top: 0, bottom: 32), border_width: 2, border_rounding: 2, border_color: Color(hex: "#000000"), fill_rounding: 1, background_color: Color(hex: "#00000000"), fill_color: Color(hex: "#000000"), width: -1.0, height: 30.0, )), ), ( name: "status_root", parent: "", hook: Hook(parent_anchor: TM, self_anchor: TM), offset: Vec2(x: 0.0, y: 60), // render_anti_criteria: [AppImage], render_criteria: [HintImage], params: NotificationBlock(( monitor: 0, border_width: 0, border_rounding: 8, background_color: Color(hex: "#F5F5F5"), border_color: Color(hex: "#00000000"), border_color_low: Color(hex: "#00000000"), border_color_critical: Color(hex: "#FF0000"), border_color_paused: Color(hex: "#00000000"), gap: Vec2(x: 0.0, y: 8.0), notification_hook: Hook(parent_anchor: BM, self_anchor: TM), )), ), ( name: "status_notification", parent: "status_root", hook: Hook(parent_anchor: TL, self_anchor: TL), offset: Vec2(x: 0, y: 0), params: TextBlock(( text: "%s", font: "Arial Bold 16", ellipsize: End, color: Color(hex: "#000000"), padding: Padding(left: 8, right: 8, top: 8, bottom: 8), dimensions: (width: (min: 400, max: 400), height: (min: 84, max: 0)), )), ), ( name: "status_body", parent: "status_notification", hook: Hook(parent_anchor: ML, self_anchor: TL), offset: Vec2(x: 0, y: -24), params: TextBlock(( text: "%b", font: "Arial 14", ellipsize: End, color: Color(hex: "#000000"), padding: Padding(left: 8, right: 8, top: 8, bottom: 8), dimensions: (width: (min: 400, max: 400), height: (min: 0, max: 84)), )), ), ( name: "status_image", parent: "status_notification", hook: Hook(parent_anchor: TL, self_anchor: TR), offset: Vec2(x: 0, y: 0), params: ImageBlock(( image_type: Hint, padding: Padding(left: 8, right: 0, top: 8, bottom: 8), rounding: 4.0, scale_width: 84, scale_height: 84, filter_mode: Lanczos3, )), ), ], // https://github.com/Toqozz/wired-notify/wiki/Shortcuts shortcuts: ShortcutsConfig ( notification_interact: 1, notification_close: 2, notification_action1: 3, ), ) ```
TornaxO7 commented 2 years ago

image

Nothing special.

Config:

``` ( max_notifications: 0, timeout: 10000, poll_interval: 32, replace_enabled: false, replacing_resets_timeout: true, closing_enabled: true, history_length: 10, focus_follows: Mouse, print_to_file: None, min_windows_width: 100, min_window_height: 10, layout_blocks: [ ( name: "root", parent: "", hook: Hook(parent_anchor: TR, self_anchor: TR), offset: Vec2(x: -7.0, y: 7.0), params: NotificationBlock(( monitor: 0, border_width: 3.0, border_rounding: 3.0, //background_color: Color(r: 0.15686, g: 0.15686, b: 0.15686, a: 1.0), background_color: Color(hex: "#EDE9D8"), border_color: Color(hex: "#887588"), border_color_low: Color(hex: "#82937D"), border_color_critical: Color(hex: "#D1866B"), border_color_paused: Color(hex: "#B2A8A7"), gap: Vec2(x: 0.0, y: 8.0), notification_hook: Hook(parent_anchor: BR, self_anchor: TR), )), ), ( name: "image", parent: "root", hook: Hook(parent_anchor: TL, self_anchor: TL), offset: Vec2(x: 0.0, y: 0.0), // https://github.com/Toqozz/wired-notify/wiki/ImageBlock params: ImageBlock(( image_type: Hint, // We actually want 4px padding, but the border is 3px. padding: Padding(left: 7.0, right: 0.0, top: 7.0, bottom: 7.0), rounding: 1.0, scale_width: 100, scale_height: 100, filter_mode: Lanczos3, )), ), ( name: "summary", parent: "image", hook: Hook(parent_anchor: TR, self_anchor: TL), offset: Vec2(x: 0.0, y: 0.0), // https://github.com/Toqozz/wired-notify/wiki/TextBlock params: TextBlock(( text: "%s", font: "Liberation Sans Bold 15", ellipsize: Middle, color: Color(hex: "#9AB9C0"), color_hovered: Color(hex: "#00A7FF"), padding: Padding(left: 7.0, right: 7.0, top: 7.0, bottom: 0.0), dimensions: (width: (min: 300, max: 300), height: (min: 0, max: 0)), )), ), ( name: "body", parent: "summary", hook: Hook(parent_anchor: BL, self_anchor: LM), offset: Vec2(x: 0.0, y: 20.0), // https://github.com/Toqozz/wired-notify/wiki/ScrollingTextBlock params: ScrollingTextBlock(( text: "%b", font: "Liberation Sans Bold 13", color: Color(hex: "#9AB9C0"), color_hovered: Color(hex: "#00A7FF"), padding: Padding(left: 7.0, right: 7.0, top: 3.0, bottom: 7.0), width: (min: 0, max: 300), scroll_speed: 0.25, lhs_dist: 35.0, rhs_dist: 35.0, scroll_t: 1.0, )), ), //( // name: "progress", // parent: "body", // hook: Hook(parent_anchor: BL, self_anchor: LM), // offset: Vec2(x: 0.0, y: 3.0), // params: ProgressBlock(( // padding: Padding(left: 7.0, right: 7.0, top: 7.0, bottom: 7.0), // border_width: 3.0, // border_rounding: 5.0, // fill_rounding: 3.0, // border_color: Color(hex: "#D7CE9B"), // background_color: Color(hex: "#DFD1B8"), // fill_color: Color(hex: "#B1C9B1"), // width: -1.0, // height: -1.0, // )), //), ], shortcuts: ShortcutsConfig ( notification_interact: 1, notification_close: 2, // notification_closeall: 99, notification_pause: 3, //notification_action1: 3, // notification_action2: 99, // notification_action3: 99, // notification_action4: 99, ), ) ```
GoldsteinE commented 1 year ago

(Color of volume bar is muted because volume is muted)

image

Config: ```ron ( max_notifications: 10, timeout: 20000, poll_interval: 16, shortcuts: ( notification_interact: 2, notification_close: 1, notification_closeall: 3, ), history_length: 100, replacing_resets_timeout: true, min_window_width: 768, layout_blocks: [ ( name: "root", parent: "", hook: (parent_anchor: TR, self_anchor: TR), offset: (x: -48, y: 48), params: NotificationBlock(( monitor: 0, border_width: 3.0, border_rounding: 0.0, gap: (x: 0.0, y: 24.0), background_color: (hex: "#1D1F21"), border_color: (hex: "#66D9EF"), border_color_low: (hex: "#403D3D"), border_color_critical: (hex: "#661512"), notification_hook: (parent_anchor: BL, self_anchor: TL), )), ), ( name: "image", parent: "summary", hook: (parent_anchor: TL, self_anchor: TR), offset: (x: 0, y: 0), render_criteria: [ HintImage ], params: ImageBlock(( image_type: Hint, padding: (left: 0.0, right: 24.0, top: 24.0, bottom: 24.0), rounding: 0.0, scale_width: 144, scale_height: 144, filter_mode: Lanczos3, )), ), ( name: "summary", parent: "root", offset: (x: 0, y: 0), hook: (parent_anchor: TR, self_anchor: TR), params: TextBlock(( text: "%s", padding: (left: 18.0, right: 18.0, top: 18.0, bottom: 12.0), font: "Dejavu Sans 36", color: Color(hex: "#f8f8f2"), dimensions: ( width: (min: 768, max: 768), height: (min: 0, max: 300), ), dimensions_image_hint: ( width: (min: 600, max: 600), height: (min: 0, max: 300), ), )), ), ( name: "body", parent: "summary", offset: (x: 0, y: 0), hook: (parent_anchor: BL, self_anchor: TL), render_criteria: [ Body ], render_anti_criteria: [ AppName("progress") ], params: ScrollingTextBlock(( text: "%b", padding: (left: 18.0, right: 18.0, top: 0.0, bottom: 24.0), font: "DejaVu Sans 36", color: (hex: "#f8f8f2"), scroll_speed: 0.1, lhs_dist: 24.0, rhs_dist: 24.0, scroll_t: 1.0, width: (min: 768, max: 768), width_image_hint: (min: 544, max: 544), )), ), ( name: "progress", parent: "body", offset: (x: 0, y: 0), hook: (parent_anchor: BL, self_anchor: TL), render_criteria: [ Progress ], render_anti_criteria: [ Body ], params: ProgressBlock(( padding: (left: 18.0, right: 18.0, top: 15.0, bottom: 42.0), border_width: 0.0, border_rounding: 0.0, fill_rounding: 0.0, border_color: (hex: "#1D1F21"), background_color: (hex: "#403D3D"), fill_color: (hex: "#66D9EF"), width: 705.0, height: 24.0, )), ), ( name: "progress_muted", parent: "body", offset: (x: 0, y: 0), hook: (parent_anchor: BL, self_anchor: TL), render_criteria: [ And([Progress, Body]) ], params: ProgressBlock(( padding: (left: 18.0, right: 18.0, top: 15.0, bottom: 42.0), border_width: 0.0, border_rounding: 0.0, fill_rounding: 0.0, border_color: (hex: "#1D1F21"), background_color: (hex: "#403D3D"), fill_color: (hex: "#64888F"), width: 705.0, height: 24.0, )), ), ], ) ```
Fixed config for last Wired version ```ron ( max_notifications: 10, timeout: 20000, poll_interval: 16, shortcuts: ( notification_interact: 2, notification_close: 1, notification_closeall: 3, ), history_length: 100, replacing_resets_timeout: true, min_window_width: 768, layout_blocks: [ ( name: "root", parent: "", hook: (parent_anchor: TR, self_anchor: TR), offset: (x: -48, y: 48), params: NotificationBlock(( monitor: 0, border_width: 3.0, border_rounding: 0.0, gap: (x: 0.0, y: 24.0), background_color: (hex: "#1D1F21"), border_color: (hex: "#66D9EF"), border_color_low: (hex: "#403D3D"), border_color_critical: (hex: "#661512"), notification_hook: (parent_anchor: BL, self_anchor: TL), )), ), ( name: "summary", parent: "root", offset: (x: 0, y: 0), hook: (parent_anchor: TR, self_anchor: TR), params: TextBlock(( text: "%s", padding: (left: 48.0, right: 18.0, top: 28.0, bottom: 24.0), font: "Dejavu Sans 36", color: Color(hex: "#f8f8f2"), dimensions: ( width: (min: 768, max: 768), height: (min: 0, max: 300), ), dimensions_image_hint: ( width: (min: 600, max: 600), height: (min: 0, max: 300), ), )), ), ( name: "image", parent: "summary", hook: (parent_anchor: TL, self_anchor: TR), offset: (x: 0, y: 0), render_criteria: [ HintImage ], params: ImageBlock(( image_type: Hint, padding: (left: 28, right: -24.0, top: 24.0, bottom: 24.0), rounding: 0.0, scale_width: 144, scale_height: 144, filter_mode: Lanczos3, )), ), ( name: "body", parent: "summary", offset: (x: 0, y: 0), hook: (parent_anchor: BL, self_anchor: TL), render_criteria: [ Body ], render_anti_criteria: [ AppName("progress") ], params: ScrollingTextBlock(( text: "%b", padding: (left: 48.0, right: 18.0, top: -12.0, bottom: 30.0), font: "DejaVu Sans 36", color: (hex: "#f8f8f2"), scroll_speed: 0.1, lhs_dist: 24.0, rhs_dist: 24.0, scroll_t: 1.0, width: (min: 768, max: 768), width_image_hint: (min: 580, max: 580), )), ), ( name: "progress", parent: "body", offset: (x: 0, y: 0), hook: (parent_anchor: BL, self_anchor: TL), render_criteria: [ Progress ], render_anti_criteria: [ Body ], params: ProgressBlock(( padding: (left: 48.0, right: 12.0, top: 15.0, bottom: 42.0), border_width: 0.0, border_rounding: 0.0, fill_rounding: 0.0, border_color: (hex: "#1D1F21"), background_color: (hex: "#403D3D"), fill_color: (hex: "#66D9EF"), width: 735.0, height: 24.0, )), ), ( name: "progress_muted", parent: "body", offset: (x: 0, y: 0), hook: (parent_anchor: BL, self_anchor: TL), render_criteria: [ And([Progress, Body]) ], params: ProgressBlock(( padding: (left: 18.0, right: 18.0, top: 15.0, bottom: 42.0), border_width: 0.0, border_rounding: 0.0, fill_rounding: 0.0, border_color: (hex: "#1D1F21"), background_color: (hex: "#403D3D"), fill_color: (hex: "#64888F"), width: 705.0, height: 24.0, )), ), ], ) ```
Script ```sh #!/bin/sh notify_volume() { if [ "$(pamixer --get-mute)" = "true" ]; then notify-send -a progress -t 1000 -h 'string:wired-tag:volume' -h "int:value:$(pamixer --get-volume)" 'Volume' 'muted' else notify-send -a progress -t 1000 -h 'string:wired-tag:volume' -h "int:value:$(pamixer --get-volume)" 'Volume' fi } notify_brightness() { notify-send -a progress -t 1000 -h 'string:wired-tag:brightness' -h "int:value:$target" 'Brightness' } notify_track() { # wait for mpris to update sleep 0.4 art_url="$(playerctl metadata -f '{{mpris:artUrl}}' | sed 's/file:\/\///')" if [ -z "$art_url" ]; then notify-send -h 'string:wired-tag:player' -t 10000 'Player' "$(playerctl metadata -f '{{artist}} — {{title}}')" else notify-send -h 'string:wired-tag:player' -t 10000 -h "string:image-path:$art_url" 'Player' "$(playerctl metadata -f '{{artist}} — {{title}}')" fi } case "$1" in up) pamixer -i 5 notify_volume ;; down) pamixer -d 5 notify_volume ;; mutetoggle) pamixer --toggle-mute notify_volume ;; light_up) curr="$(printf '%.*f\n' 0 "$(light)")" target="$(( curr + 5 ))" light -S "$target" notify_brightness ;; light_down) curr="$(printf '%.*f\n' 0 "$(light)")" target="$(( curr - 5 ))" light -S "$target" notify_brightness ;; play_pause) playerctl play-pause notify_track ;; next) playerctl next notify_track ;; previous) playerctl previous notify_track ;; esac ```
Haxeil commented 1 year ago

@GoldsteinE where do you put the script ?

GoldsteinE commented 1 year ago

@Haxeil It doesn’t really matter, you just need to run it when you want to change volume/brightness/send command to media player. In my case it’s in ~/.local/bin and mapped to keyboard shortcuts:

{XF86AudioRaiseVolume,XF86AudioLowerVolume,XF86AudioMute,XF86AudioPlay,XF86AudioPrev,XF86AudioNext,XF86MonBrightnessDown,XF86MonBrightnessUp}
    ~/.local/bin/vctl {up,down,mutetoggle,play_pause,previous,next,light_down,light_up}

super + {Up,Left,Right}
    ~/.local/bin/vctl {play_pause,previous,next}
welcoMattic commented 1 year ago

@lukelex how did you do to display volume icon?

lukelex commented 1 year ago

@lukelex how did you do to display volume icon?

I use Font Awesome but you can use your font pack of choice.

notify-send -a System \
                -i "$YOUR_ICON_PACK_PATH/volume.svg" \
                -h string:wired-tag:system \
                -h int:value:69 \
                "Volume"

https://github.com/lukelex/dotfiles/blob/master/linux/scripts/audio

faynopi commented 1 year ago

image

Colors are based on Catppuccin color scheme. You can find my config here :)

welcoMattic commented 1 year ago

@Itsnexn thanks for sharing! Can you also share the test cases you use to display notifications on your screenshot? Thanks

faynopi commented 1 year ago

@welcoMattic Yes of course. I don't usually keep scripts like this. However, rewriting it wasn't that difficult :^)

here you go:

Script ```shell notify-send.py "Notification" "Normal urgency" notify-send.py -u low "Notification" "Low urgency" notify-send.py -u critical "Notification" "Critical urgency" notify-send.py -i /usr/share/icons/breeze-dark/status/22/audio-volume-high.svg \ "Notification" "Appimage / Hintimage" notify-send.py "Progress" \ -i /usr/share/icons/breeze-dark/status/22/audio-volume-high.svg \ --hint int:value:90 notify-send.py "Yes or no?" \ -i /usr/share/icons/breeze-dark/status/22/audio-volume-high.svg \ --action Cancel:cancel OK:ok Idk:idk & notify-send.py "Yes or no?" --action Idk:idk Cancel:cancel OK:ok & ```

the tool I use to send notifications is notify-send.py. and I also used this icon pack as an example.

lucasknook commented 11 months ago

@faynopi do you still have the dotfiles for the wired-notify config? I like the way it looks very much and would love to use it on my machine

oddlama commented 9 months ago

My configuration, compatible with any base16 colorscheme.

image

Notification positions were rearranged for better visibility. All notifications appear in the top right corner, except for the brightness and volume indicator which show in the middle of the monitor and replace each other.

The colors and details are all baked in, since there is no variable support in wired. If you are familiar with nix, you can use my nix configuration for wired if you want to customize it more easily (supports base16 colors via stylix and a scaling factor).

nonetrix commented 4 months ago

image

Colors are based on Catppuccin color scheme. You can find my config here :)

I like your config, but it's 404 now I want to use it. Seems like pretty much what I was planning

ArchWand commented 1 month ago

I have created a simple mockup of Faynopi's config, for future readers. However, it is extremely feature-lacking; it's difficult to make it more useful without adding a ton of blocks; this is due to the limitation of a static parent. Thus, to do more complicated things, you would have to use render_criteria and duplicate a bunch of blocks. While I prefer the aesthetic of Catppuccin, oddlama's config both looks more functional and is also catppuccin compatible, so I will not be working on it further.

Config ( // Maximum number of notifications to show at any one time. // A value of 0 means that there is no limit. max_notifications: 0, // The default timeout, in miliseconds, for notifications that don't have an initial timeout set. // 1000ms = 1s. timeout: 10000, // How should we handle `expire_timeout` values of zero? // `UseDefault`: use `timeout`. // `NeverExpire`: show this notification forever. // The latter is technically correct according to the notification spec: https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html zero_timeout_behavior: NeverExpire, // `poll_interval` decides decides how often (in milliseconds) Wired checks events, // draws notifications (if necessary) -- the update loop while any notification is present. // Note that when no notifications are present, Wired polls at `idle_poll_interval` instead. // 16ms ~= 60hz / 7ms ~= 144hz. poll_interval: 16, // The interval at which wired updates when no notifications/windows are present. //idle_poll_interval: 500, // Wired will pause notifications if you are idle (no mouse or keyboard input) for longer than // `idle_threshold` seconds. // Note that notifications will not be automatically unpaused on wake, and will need to be manually // cleared, unless `unpause_on_input` is set to true. // Also note that no distinction is made between manually paused and idle paused notifications. // If `idle_threshold` is not specified, the behavior will be disabled entirely. //idle_threshold: 3600, // Notifications will spawn paused, and have to be manually unpaused or cleared by the user, // unless `unpause_on_input` is also set. //notifications_spawn_paused: false, // Unpause notifications when we receive any input after being idle for longer than 1 second. // Note that no distinction is made between manually paused notifications and idle paused/spawned notifications. //unpause_on_input: false, // Enable/disable replacement functionality. // If this is disabled, replacement requests will just send a new notification. // E.g., with replacing_enabled: true, Pidgin will only show the latest message from each contact, // instead of sending a new one for each message. // Default: true //replacing_enabled: true, // Whether a notification should reset its timeout when it is replaced. // No effect if replacing_enabled is set to false. // Default: false //replacing_resets_timeout: false, // Some apps/programs close notifications on their own by sending a request to dbus. // Sometimes this is not desired. // Default: true //closing_enabled: true, // How many notifications are kept in history. // Each notification is roughly 256 bytes (excluding buffers!), so there's some math to do here. // Default: 100 //history_length: 100, // When a `NotificationBlock` has monitorr: -1 (i.e. should follow active monitor), then what input // should we use to determine the active monitor? // Options: Mouse, Window // Default: Mouse //focus_follows: Mouse, // Enable printing notification data to a file. // Useful for scripting purposes. // The data is written as JSON. // Default: None //print_to_file: "/tmp/wired.log", // Minimum window width and height. This is used to create the base rect that the notification // grows within. // The notification window will never be smaller than this. // A value of 1 means that the window will generally always resize with notification, unless // you have a 1x1 pixel notification... // Generally, you shouldn't need to set this. min_window_width: 325, //min_window_height: 1, // Trim whitespace in received notification text, since some clients like to send whitespace, which we usually don't actually want. //trim_whitespace: true, // Enable/disable debug rendering. debug: false, debug_color: Color(r: 0.0, g: 1.0, b: 0.0, a: 1.0), // Primary color for debug rectangles. debug_color_alt: Color(r: 1.0, g: 0.0, b: 0.0, a: 1.0), // Secondary color for debug rectangles. layout_blocks: [ // Layout 1, when an image is present. ( name: "root", parent: "", hook: Hook(parent_anchor: TR, self_anchor: TR), offset: Vec2(x: -15, y: 15), //render_criteria: [HintImage], // https://github.com/Toqozz/wired-notify/wiki/NotificationBlock params: NotificationBlock(( monitor: 0, border_width: 2.0, border_rounding: 0.0, background_color: Color(hex: "#11111b"), border_color: Color(hex: "#cba6f7"), border_color_low: Color(hex: "#89b4fa"), border_color_critical: Color(hex: "#f38ba8"), border_color_paused: Color(hex: "#f9e2af"), gap: Vec2(x: 0.0, y: 10), notification_hook: Hook(parent_anchor: BR, self_anchor: TR), )), ), ( name: "image", parent: "root", hook: Hook(parent_anchor: ML, self_anchor: ML), offset: Vec2(x: 0.0, y: 0.0), // https://github.com/Toqozz/wired-notify/wiki/ImageBlock params: ImageBlock(( image_type: HintThenApp, padding: Padding(left: 13.0, right: 6.0, top: 0.0, bottom: 10.0), rounding: 3.0, scale_width: 48, scale_height: 48, filter_mode: Lanczos3, )), ), ( name: "summary", parent: "image", hook: Hook(parent_anchor: MR, self_anchor: BL), offset: Vec2(x: 0.0, y: 0.0), // https://github.com/Toqozz/wired-notify/wiki/TextBlock params: TextBlock(( text: "%s", font: "JetBrains Mono 11", color: Color(hex: "#ffffff"), padding: Padding(left: 12.0, right: 11.0, top: 12.0, bottom: 12.0), dimensions: (width: (min: 50, max: 250), height: (min: 0, max: 0)), )), ), ( name: "body", parent: "summary", hook: Hook(parent_anchor: BL, self_anchor: TL), offset: Vec2(x: 0.0, y: 0.0), render_criteria: [Body], // https://github.com/Toqozz/wired-notify/wiki/ScrollingTextBlock params: ScrollingTextBlock(( text: "%b", font: "JetBrains Mono 10", color: Color(hex: "#a6adc8"), padding: Padding(left: 11.0, right: 11.0, top: 0.0, bottom: 11.0), width: (min: 150, max: 300), scroll_speed: 0.1, lhs_dist: 35.0, rhs_dist: 35.0, scroll_t: 1.0, )), ), ( name: "progress", parent: "summary", hook: Hook(parent_anchor: BL, self_anchor: TL), offset: Vec2(x: 0.0, y: -3.0), render_criteria: [Progress], // https://github.com/Toqozz/wired-notify/wiki/ProgressBlock params: ProgressBlock(( padding: Padding(left: 12.0, right: 11.0, top: 6.0, bottom: 11.0), border_width: 2.0, border_rounding: 5.0, fill_rounding: 5.0, border_color: Color(hex: "#313244"), background_color: Color(hex: "#1e1e2e"), fill_color: Color(hex: "#cba6f7"), width: 230, height: 15, )), ), ( name: "button_0", parent: "summary", hook: Hook(parent_anchor: BL, self_anchor: TL), offset: Vec2(x: 12.0, y: 0.0), render_criteria: [ActionOther(0)], // https://github.com/Toqozz/wired-notify/wiki/ButtonBlock params: ButtonBlock(( padding: Padding(left: 8.0, right: 11.0, top: 6.0, bottom: 5.0), action: OtherAction(0), text: "%a", font: "JetBrains Mono 9", border_width: 2.0, border_rounding: 0.0, text_color: Color(hex: "#a6adc8"), border_color: Color(hex: "#313244"), background_color: Color(hex: "#1e1e2e"), dimensions: (width: (min: 0, max: 150), height: (min: 0, max: 0)), )), ), ( name: "button_1", parent: "button_0", hook: Hook(parent_anchor: TR, self_anchor: TL), offset: Vec2(x: 12.0, y: 0.0), render_criteria: [ActionOther(1)], // https://github.com/Toqozz/wired-notify/wiki/ButtonBlock params: ButtonBlock(( padding: Padding(left: 8.0, right: 11.0, top: 6.0, bottom: 5.0), action: OtherAction(1), text: "%a", font: "JetBrains Mono 9", border_width: 2.0, border_rounding: 0.0, text_color: Color(hex: "#a6adc8"), border_color: Color(hex: "#313244"), background_color: Color(hex: "#1e1e2e"), dimensions: (width: (min: 0, max: 150), height: (min: 0, max: 0)), )), ), ( name: "button_2", parent: "button_1", hook: Hook(parent_anchor: TR, self_anchor: TL), offset: Vec2(x: 12.0, y: 0.0), render_criteria: [ActionOther(2)], // https://github.com/Toqozz/wired-notify/wiki/ButtonBlock params: ButtonBlock(( padding: Padding(left: 8.0, right: 11.0, top: 6.0, bottom: 5.0), action: OtherAction(2), text: "%a", font: "JetBrains Mono 9", border_width: 2.0, border_rounding: 0.0, text_color: Color(hex: "#a6adc8"), border_color: Color(hex: "#313244"), background_color: Color(hex: "#1e1e2e"), dimensions: (width: (min: 0, max: 150), height: (min: 0, max: 0)), )), ), ( name: "button_3", parent: "button_2", hook: Hook(parent_anchor: TR, self_anchor: TL), offset: Vec2(x: 12.0, y: 0.0), render_criteria: [ActionOther(3)], // https://github.com/Toqozz/wired-notify/wiki/ButtonBlock params: ButtonBlock(( padding: Padding(left: 8.0, right: 11.0, top: 6.0, bottom: 5.0), action: OtherAction(3), text: "%a", font: "JetBrains Mono 9", border_width: 2.0, border_rounding: 0.0, text_color: Color(hex: "#a6adc8"), border_color: Color(hex: "#313244"), background_color: Color(hex: "#1e1e2e"), dimensions: (width: (min: 0, max: 150), height: (min: 0, max: 0)), )), ), ( name: "padding", parent: "button_0", hook: Hook(parent_anchor: BR, self_anchor: TL), offset: Vec2(x: 0.0, y: 0.0), render_criteria: [ActionOther(0)], // https://github.com/Toqozz/wired-notify/wiki/ScrollingTextBlock params: TextBlock(( text: "", font: "JetBrains Mono 1", color: Color(hex: "#ffffff"), padding: Padding(left: 12.0, right: 0.0, top: 12.0, bottom: 0.0), dimensions: (width: (min: 0, max: 0), height: (min: 0, max: 0)), )), ), ], // https://github.com/Toqozz/wired-notify/wiki/Shortcuts shortcuts: ShortcutsConfig ( notification_interact: 1, notification_close: 2, // notification_closeall: 99, // notification_pause: 99, notification_action1: 3, // notification_action2: 99, // notification_action3: 99, // notification_action4: 99, ), )