vars1ty / HybridBar

A status bar focused on wlroots Wayland compositors
MIT License
189 stars 9 forks source link

Advanced example config files #19

Closed revuwa closed 1 year ago

revuwa commented 1 year ago

Let's say, I'm more nosy than lazy, (and my grandma has no time, btw). But I can't imaging what functionality the first three widgets (after the username), at the top bar of your screenshot could have, so I just kindly wanted to ask, if you're possibly willing to share that configs as a bit more extended examples?

PS: Completely off-topic, but I just wanted to let you know, that there seems to be a (Wayland targeted and GTK using) Hybridbar, already - if you shouldn't be be aware of it, already; and even if I know that: HybridBar =! Hybridbar ✌️

vars1ty commented 1 year ago

Yeah sure, I'll attach it below. Here's how it's structured:

  1. Username
  2. Hyprland: Current Workspace / Max Workspaces
  3. Hyprland: Currently focused window
  4. Cava
  5. Speaker Volume
  6. Current Time
  7. Custom hot-reload
vars1ty commented 1 year ago

config.json (using Nerd Fonts)

{
    "hybrid": {
        "cava_sed": "s/;//g;s/0/▁ /g;s/1/▂ /g;s/2/▃ /g;s/3/▄ /g;s/4/▅ /g;s/5/▆ /g;s/6/▇ /g;s/7/█/g;",
        "stylesheet": "style.css",
        "cava_framerate": 360,
        "expand_right": false,
        "expand_left": false,
        "update_rate": 69,
        "cava_bars": 7,
        "r": 10,
        "g": 10,
        "b": 10,
        "a": 0.5
    },
    "variables": {
        "@reload": "killall -I hybrid-bar -9 ; hyprctl dispatch exec hybrid-bar ; hyprctl dispatch exec \"HYBRID_CONFIG=config_bottom.json hybrid-bar\"",
        "@get": "jq -r",
        "$+s": "<small>",
        "$-s": "</small>"
    },
    "left-label_username": {
        "text": "  visions",
        "tooltip": "$+sCurrent Username$-s"
    },
    "left-spacing_separator": {
        "spacing_start": 5,
        "spacing_end": 7
    },
    "left-label_current_workspace": {
        "text": " 𧻓 ",
        "command": "hyprctl monitors -j | @get '.[].activeWorkspace.id'",
        "tooltip": "$+sCurrent Hyprland Workspace (0-10)$-s"
    },
    "left-label_max_workspaces": {
        "text": "/10"
    },
    "left-spacing_1": {
        "spacing_start": 5
    },
    "centered-label_active_window": {
        "text": "  ",
        "command": "hyprctl activewindow -j | @get '.title'",
        "tooltip": "$+sCurrently focused window$-s"
    },
    "centered-spacing_2": {
        "spacing_start": 5
    },
    "right-spacing_3": {
        "spacing_start": 5
    },
    "right-box_4": {
        "?": "This exists because spacings didn't work for this use-case.",
        "width": 5
    },
    "right-cava_5": {},
    "right-spacing_separator_vol": {
        "spacing_start": 5,
        "spacing_end": 7
    },
    "right-label_volume": {
        "text": "  ",
        "command": "echo $(pactl get-sink-volume @DEFAULT_SINK@ | rg -o '[0-9]{1,3}%' | head -n 1 | cut -d '%' -f 1)%",
        "tooltip": "$+sVolume percentage (%)$-s"
    },
    "right-spacing_separator": {
        "spacing_start": 5,
        "spacing_end": 7
    },
    "right-label_time": {
        "text": "  ",
        "command": "date +%H:%M",
        "tooltip": "$+sCurrent hour:minute$-s"
    },
    "right-spacing_separator_ending": {
        "spacing_start": 5,
        "spacing_end": 7
    },
    "right-button_reload": {
        "text": "",
        "command": "@reload",
        "tooltip": "$+sReload$-s"
    }
}

style.css

/* Label Color. Config default is white. */
label {
    color:         white;
}

#root {
    border-bottom: 1px solid; 
}

#left {
    border-right: 1px solid;
    border-left: 1px solid;
}

#right {
    border-left: 1px solid;
    border-right: 1px solid;
}

#separator, #separator_ending, #separator_vol {
    background-color: white;
}

/* Button Configuration */
button {
    font-weight:    normal;
    box-shadow:     none;
    margin-bottom: -8px;
    margin-top:    -8px;
    padding-right:  0;
    padding-left:   0;
}

PS: Completely off topic, but I just wanted to let you know, that there seems to be a (Wayland targeted and GTK using) Hybridbar,

Yeah I noticed this after seeing "Hybridbar" listed on GitHub a few weeks ago. Although that project seems dormant

revuwa commented 1 year ago

Wow, thanks a lot for that (very structured) inspirations!

You showed me yours, I'll show you mine 😉 -> configs.zip

Preview: image

Structure (from left to right):

Hope this helps someone 🤞

ghost commented 1 year ago

which font is it?

Wow, thanks a lot for that (very structured) inspirations!

You showed me yours, I'll show you mine 😉 -> configs.zip

Preview: image

Structure (from left to right):

  • [right] Hyprland dynamic workspace number list, with active workspace in square brackets
  • [centered] Hyprland window titles, wich trims static browser names at the end, (e. g.: " - Mozilla Firefox")
  • '# CPU usage (with fixed length of 2 numbers), followed by system temperature (°C) in brackets Button_command: opens htop | Tooltip_command: shows the 10 most active processes
  • ☰ Memory used Tooltip_command: details about memory usage
  • ⛁ Disk used Tooltip_command: details about disk usage
  • ⚟ Volume label (toggles if muted), followed by audio volume
  • ∅ Microphone volume label (toggles if muted), followed by mic volume
  • ⚙ run audio management (pavucontrol in this case)
  • 直 run wifi stats (wavemon in this case), followed by label wich toggles depending on wifi connection status
  • 𧻓 Hyprland workspace count Tooltip_command: active windows count
  • 祥 run calendar (cal), followed by time Tooltip_command: date
  • ⏻ run power menu (wlogout in this case)

Hope this helps someone 🤞

which font ??

revuwa commented 1 year ago

which font ??

Oof, it's been a long time... But I'm pretty sure if was one of them:

ghost commented 1 year ago

Thanks

which font ??

Oof, it's been a long time... But I'm pretty sure if was one of them:

  • Nerd Fonts (FiraCode or DroidSansMono)
  • Noto Fonts

Thanks for the reply, anyways I've left Wayland and shifted to xorg Xmonad my long time fav twm