cleaned the docs

This commit is contained in:
2025-12-31 03:40:20 +01:00
parent a392bdc1fc
commit 3f4e519009
251 changed files with 3 additions and 19423 deletions

View File

@@ -1,6 +0,0 @@
<img width="1920" height="54" alt="image" src="https://github.com/user-attachments/assets/0098d61b-02c5-49c0-903d-06647f81b438" />
<img width="1920" height="54" alt="image" src="https://github.com/user-attachments/assets/71926331-8284-44bb-95c8-64791d415fed" />
Link to my dotfiles for waybar
[Waybar dotfiles](https://github.com/0x00ctrl/Arch-Hyprland-Dotfiles-Laptop/tree/6ab65ec4fa98161006019538470872484adb784c/waybar)

View File

@@ -1,39 +0,0 @@
This page contains a list, in chronological order, of third-party custom modules:
* [Next calendar events](https://gist.github.com/bjesus/178a9bd3453470d74803945dbbf9ed40) (using [khal](https://github.com/pimutils/khal))
* [Chromecast currently playing](https://gist.github.com/bjesus/beb8f9d9542841f568492707bdec4783) (using [catt](https://github.com/skorokithakis/catt/))
* [Weather with detailed forecast](https://github.com/bjesus/wttrbar) (using [wttr.in](https://github.com/chubin/wttr.in))
* [Another Weather module](https://gist.github.com/Surendrajat/ff3876fd2166dd86fb71180f4e9342d7) (using [weather.com](https://weather.com))
* [External screen brightness](https://gist.github.com/nicodebo/297c1e134256ea24abf02a485ce41420) (using [ddcutil](https://github.com/rockowitz/ddcutil))
* [Another external screen brightness](https://gist.github.com/Ar7eniyan/42567870ad2ce47143ffeb41754b4484) (using ddcutil too)
* [Screen brightness without external scripts](https://gist.github.com/MyrikLD/4467d4dae3f0911cd5094b8440cbf418) (still ddcutil)
* [Reminders](https://gist.github.com/nicodebo/181f5135af9585e6f2c0fd05533b8004) (using [remind](https://www.roaringpenguin.com/wiki/index.php/Remind))
* [WireGuard](https://github.com/HarHarLinks/wireguard-rofi-waybar) (using NetworkManager/nmcli)
* [GPU usage monitor](https://www.reddit.com/r/swaywm/comments/ncjpfz/how_to_add_gpu_usage_to_waybar/) (using data from `/sys/class/hwmon/`)
* [UPower](https://github.com/thuck/supower) (Customizable energy/battery information using UPower dbus (battery, bluetooth, line-power etc))
* [Sway WM adaptive sync toggle](https://github.com/vkraven/swankybar) (using Sway IPC)
* [Pacman updates](https://github.com/coffebar/waybar-module-pacman-updates)
* [Pacman and AUR updates](https://github.com/L11R/wmaestralaybar-updates)
* [Notifications for Arch Linux package updates](https://bbs.archlinux.org/viewtopic.php?id=279522) (*EOL*)
* [RI - Rest your Eyes and Self](https://bbs.archlinux.org/viewtopic.php?id=290491)
* raffaem's [waybar-mediaplayer](https://github.com/raffaem/waybar-mediaplayer) (mediaplayer with progress bar, album art, tooltip, synced lyrics and notifications)
* raffaem's [waybar-stopwatch](https://github.com/raffaem/waybar-stopwatch)
* raffaem's [waybar-screenrecorder](https://github.com/raffaem/waybar-screenrecorder)
* ponas-niekas's [waybar-timer](https://github.com/ponas-niekas/waybar-timer)
* jbirnick's [waybar-timer](https://github.com/jbirnick/waybar-timer) (interactive)
* [Todoist](https://github.com/jbirnick/waybar-todoist)
* [waybar-hyprland-lidswitch](https://github.com/raffaem/waybar-hyprland-lidswitch)
* [waybar-swayidle](https://github.com/raffaem/waybar-swayidle)
* [waybar-crypto](https://github.com/chadsr/waybar-crypto) (cryptocurrency ticker)
* [waybar-wise-fx-rate](https://github.com/rlopzc/waybar-wise-fx-rate) (wise fx rate)
* [APT updates](https://github.com/J-Carder/waybar-apt-updates)
* [NixOS updates](https://github.com/guttermonk/waybar-nixos-updates)
* [DNF (Fedora) updates](https://github.com/furkun/waybar-dnf-updates/)
* [Active services](https://github.com/Heyian/waybar-active-services) (show if a service is running, like a backup)
* [Athan Api](https://gist.github.com/bonnjalal/726aac5cf8ebc78a551b1bec3a9121c9) (using [alathan api](http://api.aladhan.com))
* mt190502's [Pomodoro Timer](https://github.com/mt190502/pomobar) (aka Pomobar)
* [wlsunset toggle](https://github.com/CyrilSLi/linux-scripts) (uses ip-api.com for location)
* MaidLucy's [Pipewire filter chain plugin toggle](https://github.com/MaidLucy/waybar-custom-module-eq-switch) (using pw-cli)
* [erffy](https://github.com/erffy)'s [Waybar module collection](https://github.com/erffy/zig-waybar-contrib) (written in Zig)
* egnrse's [show mode of active window on hyprland](https://gist.github.com/egnrse/a3d9b1f301c0bbc6c1c433fb6dc6b7d2)
* limichian's [pomobar-rs](https://github.com/liminchian/pomobar-rs) (written in Rust)

View File

@@ -1,3 +0,0 @@
dots: https://github.com/Anik200/dotfiles/blob/super-waybar/README.md
![image](https://github.com/user-attachments/assets/811c1d5f-0fb9-43b9-9f2c-76d874480cdf)
![image](https://github.com/user-attachments/assets/366afd64-9881-4dce-94b6-4853155a1633)

View File

@@ -1,3 +0,0 @@
<img width="1600" height="58" alt="AriAesamaWaybar" src="https://github.com/user-attachments/assets/433e20f5-ed39-4f79-a225-6023edf8d5a5" />
<img width="1600" height="900" alt="captura-2025-11-26-130639" src="https://github.com/user-attachments/assets/eb718114-3ce1-4f8d-93c6-8cdc424aa8ab" />

View File

@@ -1,28 +0,0 @@
# Arkboi's WayBARS
for hyprland
Style 1
![image](https://github.com/user-attachments/assets/1c7119ac-c852-4bd9-878d-6c3c22c4f115)
Style 1 Nord
![image](https://github.com/user-attachments/assets/271e35ac-436c-4246-b04d-bac1abe118c7)
Style 2
![image](https://github.com/user-attachments/assets/be37d60a-b5c1-4a1c-9db3-50c7fd57eb5f)
Style 2 Nord
![image](https://github.com/user-attachments/assets/e1dfa366-bc59-449a-9b61-a3f0fd3700b4)
Style 3
![image](https://github.com/user-attachments/assets/28f0c429-2ce5-41e8-b634-e93638952024)
Style 3 Nord
![image](https://github.com/user-attachments/assets/4fb7ddb4-baa0-4dc7-889c-45c8eb14bb41)
Style 4
![image](https://github.com/user-attachments/assets/6d857061-8b7f-4bf4-a535-1b77a6cbad11)
Style 4 Nord
![image](https://github.com/user-attachments/assets/174f0442-205c-45a7-9c51-eeb53a78fd5d)
Style 5 Bottom
![image](https://github.com/user-attachments/assets/33395778-39b6-47d1-a628-4dd444b3c324)
Style 5 Nord Bottom
![image](https://github.com/user-attachments/assets/368ab0de-47ec-42f8-915c-e375c1b2ef45)
[Dotfiles](https://github.com/arkboix/dotfiles)
[Dotfiles Install Script](https://github.com/arkboix/arch-hyprland)

View File

@@ -1,9 +0,0 @@
![screenshot_20250601_0408](https://github.com/user-attachments/assets/ce829644-05aa-4151-b0c0-5d2bee278179)
Dotfile will be available at :
[mhdwork](https://github.com/MHD-GDev)

View File

@@ -1,304 +0,0 @@
## Config file
The configuration uses the JSONC file format and is named `config` or `config.jsonc`.
Valid directories for this file are:
- `$XDG_CONFIG_HOME/waybar/`
- `~/.config/waybar/`
- `~/waybar/`
- `/etc/xdg/waybar/`
- `SYSCONFDIR/xdg/waybar` (if `SYSCONFDIR` set at the build time differs from `/etc`, e.g. `/usr/local/etc` on BSD systems)
A good starting point is the [default config](https://github.com/Alexays/Waybar/blob/master/resources/config.jsonc).
Also a minimal example config can be found on the [bottom of this page](#minimal-config).
All valid options for the modules are listed on the [modules page](https://github.com/Alexays/Waybar/wiki/Modules).
## Bar Config
| option | typeof | default | description |
| ---------------- | ------- | -------------| ----------- |
| `layer` | string | `bottom` | Decide if the bar is displayed in front (`top`) of the windows or behind (`bottom`) them. |
| `output` | string|array | Specifies on which screen this bar will be displayed. |
| `position` | string | `top` | Bar position, can be `top`,`bottom`,`left`,`right`. |
| `height` | integer | | Height to be used by the bar if possible, leave blank for a dynamic value. |
| `width` | integer | | Width to be used by the bar if possible, leave blank for a dynamic value. |
| `modules-left` | array | | Modules that will be displayed on the left. |
| `modules-center` | array | | Modules that will be displayed in the center. |
| `modules-right` | array | | Modules that will be displayed on the right. |
| `margin` | string | | Margins value using the css format without units. |
| `margin-<top\|left\|bottom\|right>` | integer | | Margins value without units. |
| `spacing` | integer | `4` | Size of gaps in between of the different modules. |
| `name` | string | | Optional name added as a CSS class, for styling multiple waybars. |
| `mode` | string | | Selects one of the preconfigured display modes. This is an equivalent of the [`sway-bar(5)`](https://github.com/swaywm/sway/blob/master/sway/sway-bar.5.scd) `mode` command and supports the same values: `dock`, `hide`, `invisible`, `overlay`.<br />Note: `hide` and `invisible` modes may be not as useful without Sway IPC. |
| `start_hidden` | bool | `false` | Option to start the bar hidden.
| `modifier-reset` | string | `press` | Defines the timing of modifier key to reset the bar visibility. To reset the visibility of the bar with the press of the modifier key use `press`. Use `release` to reset the visibility upon the release of the modifier key and only if no other action happened while the key was pressed. This prevents hiding the bar when the modifier is used to switch a workspace, change binding mode or start a keybinding.
| `exclusive` | bool | `true` | Option to request an exclusive zone from the compositor. Disable this to allow drawing application windows underneath or on top of the bar.<br/>Disabled by default for `overlay` layer. |
| `fixed-center` | bool | `true` | Prefer fixed center position for the `modules-center` block. The center block will stay in the middle of the bar whenever possible. It can still be pushed around if other blocks need more space.<br/>When false, the center block is centered in the space between the left and right block. |
| `passthrough` | bool | `false` | Option to pass any pointer events to the window under the bar.<br/>Intended to be used with either `top` or `overlay` layers and without exclusive zone.<br/>Enabled by default for `overlay` layer. |
| `ipc` | bool | `false` | Option to subscribe to the Sway IPC bar configuration and visibility events and control waybar with `swaymsg bar` commands.<br />Requires `bar_id` value from sway configuration to be either passed with the `-b` commandline argument or specified with the `id` option.<br />See [#1244](https://github.com/Alexays/Waybar/pull/1244) for the documentation and configuration examples. |
| `id` | string| | `bar_id` for the Sway IPC. Use this if you need to override the value passed with the `-b bar_id` commandline argument for the specific bar instance. |
| `include` | array | | Paths to additional configuration files.<br/>Each file can contain a single object with any of the bar configuration options. In case of duplicate options, the first defined value takes precedence, i.e. including file -> first included file -> etc. Nested includes are permitted, but make sure to avoid circular imports.<br/>For a multi-bar config, the `include` directive affects only current bar configuration object. |
| `reload_style_on_change` | bool | `false` | Option to enable reloading the css style if a modification is detected on the style sheet file or any imported css files. |
| `on-sigusr1` | string | `toggle` | Action that is performed when receiving SIGUSR1 kill signal. Possible values: `show`, `hide`, `toggle`, `reload`, `noop`. |
| `on-sigusr2` | string | `reload` | Action that is performed when receiving SIGUSR2 kill signal. Possible values: `show`, `hide`, `toggle`, `reload`, `noop`. |
## Module Config
It's suggested not to have multiple configurations for the same mouse button.
For example: `on-click`, `on-double-click`, `on-triple-click` are defined. When triple click is triggered the module will execute commands for `on-click`, `on-double-click`, `on-triple-click` sequentially because of Gdk provide such events.
| option | typeof | default | description |
| ---------------- | ------- | -------------| ----------- |
|`on-update` |string | | Command to execute when the module gets updated|
|`on-click` |string | | Command to execute when you left click on the module|
|`on-click-release` |string | | Command to execute when you release left button on module|
|`on-double-click` |string | | Command to execute when you double left click on the module|
|`on-triple-click` |string | | Command to execute when you triple left click on the module|
|`on-click-middle` |string | | Command to execute when you middle click on the module using mousewheel|
|`on-click-middle-release` |string | | Command to execute when you release mousewheel button on the module|
|`on-double-click-middle` |string | | Command to execute when you double middle click on the module using mousewheel|
|`on-triple-click-middle` |string | | Command to execute when you triple middle click on the module using mousewheel|
|`on-click-right` |string | | Command to execute when you right click on the module|
|`on-click-right-release` |string | | Command to execute when you release right button on the module|
|`on-double-click-right` |string | | Command to execute when you double right click on the module|
|`on-triple-click-right` |string | | Command to execute when you triple right click on the module|
|`on-click-backward` |string | | Command to execute when you click on the module using mouse backward button|
|`on-click-backward-release` |string | | Command to execute when you release mouse backward button on the module|
|`on-double-click-backward` |string | | Command to execute when you double click on the module using mouse backward button|
|`on-triple-click-backward` |string | | Command to execute when you triple click on the module using mouse backward button|
|`on-click-forward` |string | | Command to execute when you click on the module using mouse forward button|
|`on-click-forward-release` |string | | Command to execute when you release mouse forward button on the module using|
|`on-double-click-forward` |string | | Command to execute when you double click on the module using mouse forward button|
|`on-triple-click-forward` |string | | Command to execute when you triple click on the module using mouse forward button|
|`on-scroll-up` |string | | Command to execute when you scroll up on the module with the mouse wheel|
|`on-scroll-down` |string | | Command to execute when you scroll down on the module with the mouse wheel|
|`on-scroll-left` |string | | Command to execute when you tilt the mouse wheel left on the module|
|`on-scroll-right` |string | | Command to execute when you tilt the mouse wheel right on the module|
## Module actions config
It is possible to specify module actions (if the module supports them) under the "actions" block. Supported actions are described at the module definition pages.
Example:
```json
"clock": {
"actions": {"on-click-right": "mode",
"on-scroll-up": "shift_up",
"on-scroll-down": "shift_down"
}
}
```
## Module format
You can use [PangoMarkupFormat](https://docs.gtk.org/Pango/pango_markup.html#pango-markup).
e.g.
```jsonc
"format": "<span style=\"italic\">{}</span>"
```
If you use a unicode in the module format, you might encounter a scenario where Waybar displays information in the wrong direction. It's a unicode specification. Some of the ligatures can have "right-to-left" associated directional property. See [Bidi algorithm basics](https://www.w3.org/International/articles/inline-bidi-markup/uba-basics).
```jsonc
"format": "{icon} {capacity}%",
"format-icons": ["ﱉ","ﱊ","ﱌ","ﱍ","ﱋ"]
```
It can be handled by the using special attributes. In the example {icon} is wrapped by the left-to-right property.
```jsonc
"format": "&#x202b;{icon}&#x202c; {capacity}%",
"format-icons": ["ﱉ","ﱊ","ﱌ","ﱍ","ﱋ"]
```
## Multiple instances of a module
If you want to have a second instance of a module, you can suffix it by a '#' and a custom name.
For example if you want a second battery module, you can add `"battery#bat2"` to your modules.
To configure the newly added module, you then also add a module configuration with the same name.
This could then look something like this *(this is an incomplete example)*:
```jsonc
"modules-right": ["battery", "battery#bat2"],
"battery": {
"bat": "BAT1"
},
"battery#bat2": {
"bat": "BAT2"
}
```
To style in ``style.css`` use :
```css
battery.bat2 {
border-bottom: 2px solid #FFFFFF;
}
```
## Minimal config
A minimal `config` file could look like this:
```jsonc
{
"layer": "top",
"modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["sway/window"],
"modules-right": ["battery", "clock"],
"sway/window": {
"max-length": 50
},
"battery": {
"format": "{capacity}% {icon}",
"format-icons": ["", "", "", "", ""]
},
"clock": {
"format-alt": "{:%a, %d. %b %H:%M}"
}
}
```
## Multi output config
### Limit a configuration to some outputs
```jsonc
{
"layer": "top",
"output": "eDP-1",
"modules-left": ["sway/workspaces", "sway/mode"],
//...
}
```
```jsonc
{
"layer": "top",
"output": ["eDP-1", "VGA"],
"modules-left": ["sway/workspaces", "sway/mode"],
//...
}
```
### Configuration of multiple outputs
Don't specify an output to create multiple bars on the same screen
```jsonc
[{
"layer": "top",
"output": "eDP-1",
"modules-left": ["sway/workspaces", "sway/mode"],
//...
}, {
"layer": "top",
"output": "VGA",
"modules-right": ["clock"],
//...
}]
```
You can also exclude specific output(s) by using exclamation mark, for example:
```jsonc
[{
"layer": "top",
"output": "eDP-1",
"modules-left": ["sway/workspaces", "sway/mode"],
//...
}, {
"layer": "top",
"output": "!eDP-1",
"modules-right": ["clock"],
//...
}]
```
This will show the first bar on eDP-1, and the second bar on every output except eDP-1
### Rotating modules
When positioning Waybar on the left or right side of the screen, sometimes it's useful to be able to rotate the contents of a module so the text runs vertically. This can be done using the "rotate" property of the module. Example:
```jsonc
{
"clock": {
"rotate": 90
}
}
```
Valid options for the "rotate" property are: 0, 90, 180 and 270.
### Share options for multiple bars
You probably want to share the same formatting and properties for repeated modules across bars. Put the shared configuration in another file, say, `default-modules.json`:
```jsonc
{
"clock": {
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format": "{:%F %T}",
"format-alt": "{:%F %T}",
"interval": 1
},
}
```
and just import it from `config`:
```jsonc
[{
"layer": "top",
"position": "bottom",
"output": ["DP-1"],
"include": [
"~/.config/waybar/default-modules.json",
],
"modules-right": [
"clock",
"temperature",
]
},
{
"layer": "top",
"position": "bottom",
"output": ["HDMI-1"],
"include": [
"~/.config/waybar/default-modules.json",
],
"modules-right": [
"clock",
],
"clock": {
"on-click": "do_something",
}
},
]
```
As you can see, you can add custom properties on top of the defaults. Local options get appended to the defaults. They override the default ones, if they already exist.
## Styling Multiple Bars
Using the "name" field, you can call it from the style.css file, like this:
(config file)
```css
{
"name": "bar1"
// desired settings
}
```
(config2 file)
```css
{
"name": "bar2"
// desired settings
}
```
In your style.css, you may want to call like this:
```css
.bar1 {
font-family: Arimo Nerd Font;
font-size: 16px;
}
.bar2 {
font-family: Roboto;
font-size: 16px;
}
```
If your bars share the same modules, you can specify like this:
```css
window.bar1#waybar {
background-color: rgba(10, 9, 10, 0.87);
}
window.bar2#waybar {
background-color: transparent;
}
```

View File

@@ -1,4 +0,0 @@
![WAYBAR by saatvik333](https://github.com/user-attachments/assets/e669acd5-1193-4326-b635-ce3364437f04)
[Wallusty Waybar](https://github.com/saatvik333/niri-dotfiles/tree/feat/vertical-waybar/waybar)

View File

@@ -1,6 +0,0 @@
<img width="1920" height="20" alt="waybar-1" src="https://github.com/user-attachments/assets/a22c5158-0211-425a-956b-166a3886a00a" />
<img width="1920" height="20" alt="waybar-2" src="https://github.com/user-attachments/assets/956cef22-c857-459b-9573-267ab850173c" />
<img width="1920" height="20" alt="waybar-3" src="https://github.com/user-attachments/assets/bd274d4f-fedf-4caf-9fe4-7a717183100a" />
<img width="1920" height="20" alt="waybar-4" src="https://github.com/user-attachments/assets/0f1697a0-f731-43c2-8bc9-34fb446c09d0" />
[Dotfiles](https://github.com/ErfanRasti/dotfiles/tree/main/waybar/.config/waybar)

View File

@@ -1,516 +0,0 @@
Post your example configurations!!
Screenshots on wayland can be taken with [grim](https://github.com/emersion/grim) in combination with [slurp](https://github.com/emersion/slurp) to select a screen area.
---
## Sunny's simple waybar
Normal view:
![preview](https://github.com/user-attachments/assets/042370a4-291c-4184-8f34-8470dee165b0)
Expanded view:
![preview](https://github.com/user-attachments/assets/b2b5f4ea-0918-4896-aa5d-af3ee3b9bb9d)
System info on hovering on module:
![preview](https://github.com/user-attachments/assets/57d39e3c-7dc3-4599-8771-b81d580c8f25)
Desktop:
![preview](https://github.com/user-attachments/assets/7d722a94-8797-4c57-a279-4850181ddb13)
[configuration and style here](https://git.gay/sunworms/nixos-files/src/branch/main/users/sunny/desktop/waybar)
---
<div align="center">
## 🤖 mechabar
A mecha-themed, modular Waybar configuration.
| ![Mechabar](https://github.com/user-attachments/assets/fcfa79b9-4302-4dfc-bee8-d5d529a2fa64) |
| :------------------------------------------------------------------------------------------: |
<details>
<summary><b>Themes</b></summary>
<ins><b>Catppuccin:</b></ins>
| Mocha (default) |
| :--------------------------------------------------------------------------------------------------: |
| ![Catppuccin Mocha](https://github.com/user-attachments/assets/fcfa79b9-4302-4dfc-bee8-d5d529a2fa64) |
| Macchiato |
| :------------------------------------------------------------------------------------------------------: |
| ![Catppuccin Macchiato](https://github.com/user-attachments/assets/ba571bba-38ba-4224-a594-1226627ad9ea) |
| Frappe |
| :---------------------------------------------------------------------------------------------------: |
| ![Catppuccin Frappe](https://github.com/user-attachments/assets/5f9d32a8-c78c-4ab3-bf37-f23eed804b4c) |
| Latte |
| :--------------------------------------------------------------------------------------------------: |
| ![Catppuccin Latte](https://github.com/user-attachments/assets/0c4f1a18-2726-4b13-854d-63e22ae4e4b2) |
</details>
https://github.com/sejjy/mechabar
</div>
---
## 🔷 Cool Blue Waybar by MBestKing 🔷
![preview](https://github.com/user-attachments/assets/224f63f9-8db4-44a5-9bd1-4fb0b481fc4f)
</br>
![preview](https://github.com/user-attachments/assets/45a9ee41-d69d-49b3-b9d5-c7a8295938ee)
</br>
[🖹 Configuration 🖹](https://github.com/MBestKing/dotfiles.git)
---
## 🎨 Beautiful Waybar Theme
*Modern, minimalist status bar for Hyprland*
#### 📊 Waybar Status Bar
![Waybar Preview](https://github.com/Zilero232/arch-install-kit/blob/master/assets/screenshots/waybar_preview.png)
---
#### 🖥️ Full Desktop View
![Hyprland Desktop](https://github.com/Zilero232/arch-install-kit/blob/master/assets/screenshots/hyrpland_preview.png)
**Features:**
- 🌙 Clean dark aesthetic with Catppuccin colors
- 📊 Real-time system monitoring
- 🎵 Media controls integration
- ⚡ Lightweight and responsive
[📁 Configuration & Dotfiles](https://github.com/Zilero232/arch-install-kit)
---
## A simple WaybarTheme
![preview](https://github.com/soaddevgit/WaybarTheme/blob/main/preview.png)
![preview](https://github.com/soaddevgit/WaybarTheme/blob/main/preview2.png)
[Config and Style files](https://github.com/soaddevgit/WaybarTheme)
## simple waybar with pomodoro timer to get started
![preview](https://raw.githubusercontent.com/Prateek7071/dotfiles/main/asset/example1.png)
[Configuration , Style and Wallpapers](https://github.com/Prateek7071/dotfiles)
## macOS 15 Sequoia Configuration:
A sleek Waybar configuration inspired by macOS 15 Sequoia design language
[![preview](https://raw.githubusercontent.com/kamlendras/waybar-macos-sequoia/refs/heads/main/preview/preview.png)](https://github.com/kamlendras/waybar-macos-sequoia)
Top Bar
[![top-preview](https://raw.githubusercontent.com/kamlendras/waybar-macos-sequoia/refs/heads/main/preview/top_preview.png)](https://github.com/kamlendras/waybar-macos-sequoia)
Bottom Bar
[![bottom-preview](https://raw.githubusercontent.com/kamlendras/waybar-macos-sequoia/refs/heads/main/preview/bottom_preview.png)](https://github.com/kamlendras/waybar-macos-sequoia)
**Waybar macOS Sequoia** brings macOS 15's sleek design to Linux, featuring dynamic light/dark themes, Mission Control-inspired workspaces, and Sonoma-style system indicators. Optimized for Wayland compositors (Hyprland/Sway), it blends Apple's aesthetics with Waybar's flexibility for macOS enthusiasts on Linux.
[Configuration , Style and Wallpapers](https://github.com/kamlendras/waybar-macos-sequoia)
## newempeor221's Configuration:
![preview](https://github.com/newemperor221/hyprland-dotfiles/blob/main/assets/style1_4.png)
![preview1](https://github.com/newemperor221/hyprland-dotfiles/blob/main/assets/style2_2.png)
[Config and Style](https://github.com/newemperor221/hyprland-dotfiles)
## Kian's minimalistic configuration:
![2025-05-14-104724_hyprshot](https://github.com/user-attachments/assets/7c21167a-c2e9-4fb8-8aa7-8ad2c9ba2a1b)
[config](https://github.com/cowboycodr/dotfiles/tree/master/.config/waybar)
## Whiteshadow's Configuration:
![2025-01-04-145834_hyprshot](https://github.com/user-attachments/assets/7268adfe-a9c2-4a31-aa64-ae5d5d3891f5)
![2025-01-04-145822_hyprshot](https://github.com/user-attachments/assets/6bd7f98e-1d4a-4c82-92ba-c74a63bbb908)
![2025-01-04-145806_hyprshot](https://github.com/user-attachments/assets/e3e87cf1-9435-42b0-883c-029b50744011)
![2025-01-04-145742_hyprshot](https://github.com/user-attachments/assets/45cab057-3bde-462c-97b9-c3c65c98e399)
![2025-01-04-150103_hyprshot](https://github.com/user-attachments/assets/1d51032d-9a1e-4098-9c5f-791e77ee8818)
[Dots](https://github.com/elifouts/Dotfiles)
## frankydoll's win10-like configuration:
<a href="https://raw.githubusercontent.com/TheFrankyDoll/win10-style-waybar/main/preview.png"><img src="https://raw.githubusercontent.com/TheFrankyDoll/win10-style-waybar/main/preview.png"/></a>
[Config, Style and some tips](https://github.com/TheFrankyDoll/win10-style-waybar)
## Arkboi's configuration
Used in Sway:
![image](https://github.com/user-attachments/assets/57d7096a-2155-47fc-82b2-68947504dbed)
Colors: Everforest Dark
Changing colorscheme is very easy, in the style.css file I have a section with define-color for everforest dark, with variable names 'black, red' etc. Change the color codes in that section to whatever colorscheme you prefer.
Using on hyprland is **Not Recommended nor appreciated**, But if you want to make sure to replace sway/workspaces with hyprland/workspaces and focused with active.
[Config and style](https://github.com/arkboix/sway/tree/main/files/.config/waybar)
<br>
[Sway Config](https://github.com/arkboix/sway/)
## kamlendras's configuration:
<a href="https://raw.githubusercontent.com/kamlendras/waybar-macos-sequoia/259ecb4b5a65a52ece0708fb4c65db4f57268329/asset.png"><img src="https://raw.githubusercontent.com/kamlendras/waybar-macos-sequoia/259ecb4b5a65a52ece0708fb4c65db4f57268329/asset.png"/></a>
[Config and Style](https://github.com/kamlendras/waybar-macos-sequoia/tree/259ecb4b5a65a52ece0708fb4c65db4f57268329)
## sephid86's configuration:
<a href="https://github.com/sephid86/fulleaf/blob/master/skel/.config/waybar/ss.png"><img src="https://github.com/sephid86/fulleaf/blob/master/skel/.config/waybar/ss.png"/></a>
[Config and Style](https://github.com/sephid86/fulleaf/tree/master/skel/.config/waybar)
## cjbassi's configuration:
<a href="https://i.imgur.com/Qbj43Uz.png"><img src="https://i.imgur.com/Qbj43Uz.png" title="source: imgur.com" /></a>
[Config and Style](https://github.com/cjbassi/config/tree/master/.config/waybar)
## Robinhuett's configuration:
<a href="https://i.imgur.com/XiE76Cn.png"><img src="https://i.imgur.com/XiE76Cn.png" title="source: imgur.com" /></a>
[Config, Style and Modules](https://github.com/Robinhuett/dotfiles/tree/master/.config/waybar)
## genofire's configuration:
![Screenshot](https://user-images.githubusercontent.com/6905586/66072105-ae8cfe00-e554-11e9-92fc-cef8e2c40842.png)
[Config, Style and Modules](https://gist.github.com/genofire/07234e810fcd16f9077710d4303f9a9e)
## Toger's configuration:
![2019-11-19-013302_grim](https://user-images.githubusercontent.com/16718859/69105747-290dd080-0a64-11ea-9acf-59225e7d3438.png)
[Config, Style and Modules](https://gist.github.com/toger5/3a509d9a9d7ebba1e02205b00449ccff)
## Egosummiki's configuration:
![Screenshot](https://i.imgur.com/yzGHjbn.png)
[Config, Style and Modules](https://github.com/Egosummiki/dotfiles/tree/master/waybar)
## Mohammad's configuration:
![https://github.com/mhdzli/dotfiles/blob/master/screenshots/waybar-01.png?raw=true](https://github.com/mhdzli/dotfiles/blob/master/screenshots/waybar-01.png?raw=true)
The new one:
![https://raw.githubusercontent.com/mhdzli/dotfiles/refs/heads/master/screenshots/waybar-02.png](https://raw.githubusercontent.com/mhdzli/dotfiles/refs/heads/master/screenshots/waybar-02.png)
[Config and style](https://github.com/mhdzli/dotfiles/tree/home/.config/waybar) on hyprland.
## robertjk's configuration
![screenshot](https://i.ibb.co/y0jxzTT/20200308-20h09m18s-grim.png)
Clean looking bar with colors matching the default Sway colors.
- [waybar/config](https://github.com/robertjk/dotfiles/blob/253b86442dae4d07d872e8b963fa33b5f8819594/.config/waybar/config)
- [waybar/style.css](https://github.com/robertjk/dotfiles/blob/253b86442dae4d07d872e8b963fa33b5f8819594/.config/waybar/style.css)
### Fonts required
Configuration uses [Cantarell](https://www.fontsquirrel.com/fonts/Cantarell) font, or [Noto Sans](https://www.fontsquirrel.com/fonts/noto-sans) as a second alternative. Then [Font Awesome](https://fontawesome.com/) is used for the icons to be displayed. You should have those installed for the default styles to work properly.
### Sway configuration
To match the font of the bar add `font pango:Cantarell 14px` to `sway/config` file.
## mxkrsv's configuration
![screenshot](https://i.imgur.com/bytBpFD.png)
Initially based on robertjk's configuration.
The icons are from Awesome 5, the font is JetBrains Mono.
Changing colorscheme is trivial thankfully to `@define-color`.
[Source](https://github.com/mxkrsv/dotfiles-old/tree/master/.config/waybar)
## abdus' configuration:
<a href="https://i.imgur.com/CeYaCFj.png"><img src="https://i.imgur.com/CeYaCFj.png" /></a>
([Config](https://github.com/abdus/dotfiles/blob/master/waybar/conf.d/config.material) and [Styles](https://github.com/abdus/dotfiles/blob/master/waybar/styles.d/style.material.css)). Required fonts are [IBM Plex Mono](https://fonts.google.com/specimen/IBM+Plex+Mono?query=IBM+plex) and [FontAwesome 5](https://fontawesome.com/download).
## oscarcp's configuration:
<a href="https://i.imgur.com/VzmAiZ8.png"><img src="https://i.imgur.com/VzmAiZ8.png" /></a>
[Configuration and style](https://git.sr.ht/~oscarcp/ghostfiles/tree/master/waybar)
<a href="https://i.imgur.com/jfgabe3.png"><img src="https://i.imgur.com/jfgabe3.png" /></a>
## Joe's configuration:
<a href="https://gitlab.com/jbauernberger/covid_status/-/raw/master/waybar_screenshot.png"><img src="https://gitlab.com/jbauernberger/covid_status/-/raw/master/waybar_screenshot.png" title="source: gitlab.com" /></a>
[Config and Style](https://gitlab.com/jbauernberger/dotfiles/-/tree/master/.config/waybar)
[Waybar Covid19 Status Indicator Module](https://gitlab.com/jbauernberger/covid_status/)
## qoheniac's configuration
<a href="https://raw.githubusercontent.com/qoheniac/config/main/waybar/screenshot.png"><img src="https://raw.githubusercontent.com/qoheniac/config/main/waybar/screenshot.png"/></a>
[Configuration and style](https://github.com/qoheniac/config/tree/main/waybar)
## dpgraham4401's configuration
<a href="https://i.imgur.com/POc09yf.png"><img src="https://i.imgur.com/POc09yf.png"/></a>
Simple blue [Config and Styling](https://github.com/dpgraham4401/.dotfiles/tree/fedora/sway/.config/waybar) with swaynag power button
## DerAnsari's Configuration
**GruvBoxy**
![screenshot-2025-08-22-221309](https://github.com/user-attachments/assets/19fba46b-e392-40b7-b1b8-446b1cdb677f)
Here's the [config](https://github.com/DerAnsari/hyprland-dots/tree/main/waybar) should be straightforward to understand, enjoy!
## pipshag's configuration
**Nord-like**
<a href="https://raw.githubusercontent.com/Pipshag/dotfiles_nord/master/screenshot.png"><img src="https://raw.githubusercontent.com/Pipshag/dotfiles_nord/master/screenshot.png"></a>
Based on Nord colors, trying to achieve a [simple interface with easy access](https://github.com/Pipshag/dotfiles_nord). Includes script to show current CPU governor as an icon and another to monitor GPU and display GPU information.
**Kittes (vertical)**
![image](https://github.com/user-attachments/assets/e56813cf-3e98-4864-ba3a-b737e2e38a2a)
[kitties](https://github.com/Pipshag/dotfiles_kitties/), *rotated image* for better fit
## tim3dman's waybar
[![](https://github.com/tim3dman/.dotfiles/blob/main/Screenshots/screenshot_2021-11-15_22-25-02_641878534.png)](https://github.com/tim3dman/.dotfiles/blob/main/Screenshots/screenshot_2021-11-15_22-25-02_641878534.png)
[waybar config, style.css and color.css](https://github.com/tim3dman/.dotfiles/tree/main/.config/waybar)
## chaibronz' waybar config
![](https://github.com/chaibronz/waybar_conf/blob/main/waybar_swaydwm.png)
<a> dwm style bar w/ sway colors </a> <br>
[config and style](https://github.com/chaibronz/waybar_conf)
## DN-debug's waybar config
<a> used in Peux OS Sway: </a> <br>
<a> design1 </a> <br>
![](https://github.com/DN-debug/waybar-examples/blob/main/screenshot/swayPost.png)
<a> design2 </a> <br>
![](https://github.com/DN-debug/waybar-examples/blob/main/screenshot/sway2.png)
<a> design3 </a> <br>
![](https://github.com/DN-debug/waybar-examples/blob/main/screenshot/swbar.png)
<a> used in Peux OS Wayfire: </a> <br>
<a> design1 </a> <br>
![](https://github.com/DN-debug/waybar-examples/blob/main/screenshot/wayfire_easyL.png)
<a> design2 </a> <br>
![](https://github.com/DN-debug/waybar-examples/blob/main/screenshot/wayfire2.png)
<a> used in Peux OS River: </a> <br>
![](https://github.com/DN-debug/waybar-examples/blob/main/screenshot/postRiver.png)
[config and style](https://github.com/DN-debug/waybar-examples)
## theCode-Breaker's configuration
![](https://raw.githubusercontent.com/theCode-Breaker/riverwm/main/screenshots/waybar.png)
[Config and Style](https://github.com/theCode-Breaker/riverwm/tree/main/waybar/river)
## lgaboury's configuration
![2022-08-08T18:26:52,227829187-05:00](https://user-images.githubusercontent.com/50297059/183531572-cc998bc9-52cc-4842-879b-16488b853b41.png)
[Install script and configuration](https://github.com/lgaboury/Sway-Waybar-Install-Script)
## Archttila's Catppuccin Mocha configuration:
![waybar](https://github.com/hajosattila/dotfiles/blob/main/waybar.png)
[Config](https://github.com/hajosattila/dotfiles/blob/main/config.jsonc), [CSS](https://github.com/hajosattila/dotfiles/blob/main/style.css), [wittr script](https://github.com/hajosattila/dotfiles/blob/main/wittr.sh), and [Wallpaper](https://github.com/hajosattila/dotfiles/blob/main/wallpaper.png). Required fonts are [JetBrains Mono](https://github.com/JetBrains/JetBrainsMono). Screenshot [link](https://github.com/hajosattila/dotfiles/blob/main/desktop.png)
## bwc9876's configuration:
Top Bar
![Top Bar](https://github.com/Alexays/Waybar/assets/25644444/0bf15abc-9953-437d-a6fa-62a7003fbad2)
Bottom Bar
![Bottom Bar](https://github.com/Alexays/Waybar/assets/25644444/f9c48a62-42c6-44a8-8c5f-cb30e04f391e)
[Waybar Folder](https://github.com/Bwc9876/nix-conf/tree/main/res/waybar)
## autom4il:
![Top bar](https://github.com/autom4il/dotfiles/blob/main/hyprland/waybar/waybar.png)
The style.css is still messy, there are some leftovers that I need to remove. Quite happy, the last bar wasn't that appealing.
---
The icon theme used for the taskbar is [Candy Icons](https://github.com/EliverLara/candy-icons).
Requires a [nerd font](https://www.nerdfonts.com/#home) to render all the icons.
Also requires KDE Connect for the custom-kdeconnect module.
## mechakotik's configuration
![Top bar](https://github.com/Alexays/Waybar/assets/43793572/8c012962-66c2-4c7e-a8d7-f95f490a457d)
Uses Breeze Dark colors. The font is Mononoki Nerd Font.
[Config and Style](https://github.com/mechakotik/dots/tree/25533a7216fa173fa5f9df384bd031d45f1712f4/.config/waybar)
![Top bar](https://github.com/user-attachments/assets/cd9d466c-e8c8-4bde-b257-e764d3948d46)
Newer, cleaner version. Has custom module to display power profile without power-profiles-daemon required. Uses JetBrainsMono Nerd Font.
[Config and Style](https://github.com/mechakotik/dots/tree/main/.config/waybar)
## waybar-minimal config
A minimal kickstart configration for waybar.
![waybarBaronly](https://github.com/Alexays/Waybar/assets/78788195/0283faec-bfdb-4408-812d-da2f6b9e387b)
[waybar-minimal](https://github.com/ashish-kus/waybar-minimal/)
## OriginCode's configuration
With [Gruvbox Dark](https://github.com/morhetz/gruvbox) color palette.
![Waybar](https://github.com/OriginCode/dotfiles/blob/0093b62068c36f1ca89deb1514b6b2e0c6c3b1a9/waybar.png)
[Config and Style](https://github.com/OriginCode/dotfiles/tree/0093b62068c36f1ca89deb1514b6b2e0c6c3b1a9/waybar/.config/waybar)
## goecho's configuration
A sleek, modern Waybar configuration for Fedora, focusing on simplicity and essential information display.
![Waybar](https://raw.githubusercontent.com/goecho/goecho-waybar/main/preview.png)
[Config and Style](https://github.com/goecho/goecho-waybar/tree/main/waybar)
## d00m1k's configuration
Simple blue waybar
![image](https://github.com/user-attachments/assets/af9fc48d-de25-4def-a3bd-113db2f62f3f)
[Config and Style](https://github.com/d00m1k/SimpleBlueColorWaybar)
## niksingh710's vertical bar at Right Side with tooltips
| Bar | Bar <br> (Hindi) | Update Tool Tip |
|-----|----------------------------------|-----------------|
|![Pasted image (3)](https://github.com/Alexays/Waybar/assets/78788195/6cae654e-fd1d-4a25-858f-35155e9ae849) | ![image](https://github.com/Alexays/Waybar/assets/60490474/7f85f2df-2040-4dfc-90f0-f6fa55cbaaaf) | ![image](https://github.com/Alexays/Waybar/assets/60490474/094b9dfc-8b54-46be-a89e-5e8ebd04a803) |
<b> Checkout the config at:</b> [gdots](https://github.com/niksingh710/gdots)
## Anik's super waybar
![image](https://github.com/user-attachments/assets/5ba1a8a3-b4ea-45f8-994b-6bdb9257c314)
![image](https://github.com/user-attachments/assets/d87bcbc8-7a6c-4bce-a05d-024006a46c47)
dots: https://github.com/Anik200/dotfiles/blob/super-waybar/README.md
## Abhinaya's Configuration
<a href="https://github.com/user-attachments/assets/104c697d-eaf8-4f58-aa2e-db6af168729e"><img src="https://github.com/user-attachments/assets/104c697d-eaf8-4f58-aa2e-db6af168729e"/></a>
[**Config and Style**](https://github.com/abhinaya-aryal/.config/tree/main/waybar)
## EviLuci's waybar
Top Bar
<img alt="topbar" src="https://github.com/user-attachments/assets/2cc64aa5-07ba-413e-affd-46385c35701d" />
Bottom Bar
<img alt="bottombar" src="https://github.com/user-attachments/assets/fad0ce71-0bf1-4e99-b385-a55bd70178b5" />
[Config and Style](https://github.com/EviLuci/dotfiles/tree/main/.config/waybar)
## DIvan2000's waybar
![preview](https://git.divan2000.su/attachments/0cf13ea8-0f0b-4941-a473-fe1d2a682227)
[Config and style](https://git.divan2000.su/DIvan2000/waybar-dotfiles)
## rocketmike12's waybar
![waybar](https://raw.githubusercontent.com/rocketmike12/.dotfiles/refs/heads/main/.resources/waybar.png)
[Config and Style](https://github.com/rocketmike12/.dotfiles/tree/main/waybar/.config/waybar)
## saibhargav's Waybar
![preview](https://gitlab.com/saibhargav/arch-hyprland-custom0/-/raw/main/waybar/waybar.png)
[configs](https://gitlab.com/saibhargav/arch-hyprland-custom0.git)
## cxOrz's waybar
![waybar](https://github.com/user-attachments/assets/eb9cc7ca-612c-4fc4-bc33-7be5ca4c90f6)
[Config and Style](https://github.com/cxOrz/dotfiles-hyprland/tree/main/waybar)
## notscripter's Configuration:
![preview](https://github.com/user-attachments/assets/deb6b10d-9342-422f-a505-cabb88bd7ff7)
[config](https://gitlab.com/notscripter/dotfiles/-/tree/main/waybar?ref_type=heads)
## // Mocha-Power
![](https://raw.githubusercontent.com/Jan-Aarela/dotfiles/refs/heads/main/images/waybar.png)
- Catppuccin mocha colors.
- Border blinks repeatedly red when battery is low and blinks red once when discharging.
- And blinks twice cyan when full and once when charging.
[config.jsonc](https://github.com/Jan-Aarela/dotfiles/blob/main/hypr/themes/Mocha-Power/waybar.jsonc)
/ [style.css](https://github.com/Jan-Aarela/dotfiles/blob/main/hypr/themes/Mocha-Power/waybar.css)
## TollerNamen's Configuration
![image](https://github.com/user-attachments/assets/99c2a729-042a-4e55-99b7-d9472c2e7c4d)
[dotfiles](https://github.com/TollerNamen/dotfiles/) (look at v2.1)
/ [config.jsonc](https://github.com/TollerNamen/dotfiles/blob/092ff63fc43124eaa8a7fa91411fdda8b1276e94/v2_1/config/waybar/config.jsonc)
/ [style.css](https://github.com/TollerNamen/dotfiles/blob/092ff63fc43124eaa8a7fa91411fdda8b1276e94/v2_1/config/waybar/style.css)
## ori's defaulted theme waybar
![image](https://github.com/user-attachments/assets/d4ca2682-98ef-40e0-93f6-c01b7cf1b72b)
[dotfiles](https://github.com/Senior-Ori/dotfiles/blob/bdf1e48d472ed276965acc6ed1d7a7892bed1eb5/waybar/) / [config.jsonc](https://github.com/Senior-Ori/dotfiles/blob/bdf1e48d472ed276965acc6ed1d7a7892bed1eb5/waybar/config.jsonc) / [style.css](https://github.com/Senior-Ori/dotfiles/blob/bdf1e48d472ed276965acc6ed1d7a7892bed1eb5/waybar/style.css) / [scripts/now-playing.sh](https://github.com/Senior-Ori/dotfiles/blob/bdf1e48d472ed276965acc6ed1d7a7892bed1eb5/waybar/scripts/now-playing.sh)
(this should be a good starting point for hyprland users).
## Dynamic Wallust powered waybar
![WAYBAR by saatvik333](https://github.com/user-attachments/assets/ae600850-c057-40d7-9b7e-65f53056745f)
[Wallusty Waybar](https://github.com/saatvik333/niri-dotfiles/tree/feat/vertical-waybar/waybar)
## Harsh's waybar and wofi config with countdown and todo-lists (a good starting point for ricing)
* [config and styles here](https://github.com/Harsh-bin/waybar-config)
<img width="222" height="229" alt="todo-2" src="https://github.com/user-attachments/assets/a84eb7b2-d276-4d02-ad8c-920eb70000a5" />
<img width="437" height="229" alt="countdown-2" src="https://github.com/user-attachments/assets/437f9d56-3b55-451c-a47d-666985348845" />
**Hover effects and animation video**
https://github.com/user-attachments/assets/a5669307-f10f-4f5d-b627-59969db78f1a
**some styles with matching wofi theme**
![preview](https://github.com/user-attachments/assets/dd6c80e7-148b-4f2a-a8a7-00aa2ba4014e)
![preview](https://github.com/user-attachments/assets/af6f9d43-011e-48a3-b504-dfbf5b07ba59)
![preview](https://github.com/user-attachments/assets/8e34cf5f-bebd-4b7b-b619-1a60e9c418e4)
![preview](https://github.com/user-attachments/assets/baa695bc-0e4f-4031-99a9-b3fa44381cc9)
![preview](https://github.com/user-attachments/assets/438c24bb-019e-41b1-8a79-eb1238c8cc1a)
![preview](https://github.com/user-attachments/assets/bb734167-c711-4c94-a7eb-a7f62649f275)
[config and styles here](https://github.com/Harsh-bin/waybar-config)
## Sudhir's minimal Gruvbox Waybar (Vertical for Niri)
https://github.com/user-attachments/assets/dc2c2f92-f0b0-46b3-808f-c13c84500eaa
<img width="1366" height="40" alt="Screenshot from 2025-11-13 18-55-53" src="https://github.com/user-attachments/assets/8bb61a91-03d0-41e1-aa01-226270d6dfb5" />
Both versions can be found in the dotfiles - <br/>
[Horizontal](https://github.com/Sudhboi/niri-rice-dotfiles/tree/main/.config/waybar_old_2)<br/>
[Vertical](https://github.com/Sudhboi/niri-rice-dotfiles/tree/main/.config/waybar)<br/>
Colour Themes can be changed super easily in the vertical waybar.
## Lynndroid21's ghastly status bar!~
### Top Bar
<img width="2559" height="57" alt="topbar2025-12-25_14-11" src="https://github.com/user-attachments/assets/acd9eb14-f1a9-4cb4-9330-e435bb932cf3" />
### Left and Right Bars
<img width="66" height="1377" alt="leftbar2025-12-25_14-12" src="https://github.com/user-attachments/assets/09fce51f-e80c-4a3d-9cb3-c2ec0b693c58" />
<img width="70" height="1386" alt="rightbar2025-12-25_14-12" src="https://github.com/user-attachments/assets/d6182ae9-53f7-496f-b453-5344dc98ab33" />
Dotfiles: [Niri](https://github.com/Lynndroid21/Niri21) [MangoWC](https://github.com/Lynndroid21/Mango21) [Sway](https://github.com/Lynndroid21/Sway21)

View File

@@ -1,136 +0,0 @@
- [How do I add multiple instances of a module?](#how-do-i-add-multiple-instances-of-a-module)
- [The Workspace-Buttons have a strange hover effect](#the-workspace-buttons-have-a-strange-hover-effect)
- [How can I generate a debug build?](#how-can-i-generate-a-debug-build)
- [The icons from the default configuration aren't rendered](#the-icons-from-the-default-configuration-arent-rendered)
- [How do I display text?](#how-do-i-display-text)
- [How can I prevent modules from changing size?](#how-can-i-prevent-modules-from-changing-size-aka-fixed-width-modules-and-monospace-fonts)
- [How to use with Sway?](#how-to-use-with-sway)
- [How can I temporarily hide the bars?](#how-can-I-temporarily-hide-the-bars)
- [How can I reload the configuration without restarting waybar?](#how-can-I-reload-the-configuration-without-restarting-waybar)
- [Workspace buttons are too wide with some GTK themes](#workspace-buttons-are-too-wide-with-some-gtk-themes)
- [My Slider doesn't show/looks small/doesn't work properly](#slider-looks-small)
***
## How do I add multiple instances of a module?
Have a look here: [Multiple instances of a module](https://github.com/Alexays/Waybar/wiki/Configuration#multiple-instances-of-a-module)
## The Workspace-Buttons have a strange hover effect
It's not a bug, the original issue [#60](https://github.com/Alexays/Waybar/issues/60).
But if you don't like the effect you can disable it by adding the following snippet to your `style.css`:
```css
#workspaces button:hover {
box-shadow: inherit;
text-shadow: inherit;
}
```
Additionally, to remove all hover effects from workspaces, add the following in addition to the above:
```css
#workspaces button:hover {
background: <original-color>;
border: <original-color>;
padding: 0 3px;
}
```
## How can I generate a debug build?
A debug build can be helpfull when fixing bugs, because it generates a backtrace with debugging symbols.
This can be done with:
```sh
make build-debug
```
## The icons from the default configuration aren't rendered
You need to install `otf-font-awesome`. See here on how to install the [Font Awesome OTF package](https://github.com/Alexays/Waybar/wiki/Installation#how-to-use-with-sway).
## How do I display text?
Create a [Custom](./Module:-Custom) module with the `format` field specified with your text.
## How can I prevent modules from changing size? (aka. fixed-width modules, and monospace fonts)
First make sure to set a monospace font:
```css
* {
font-family: monospace;
}
```
Then change the module format so that it stays at a fixed width. Waybar uses [fmt](https://github.com/fmtlib/fmt) for formatting so the following syntax is an example of how to set the CPU percentage to be at least 2 characters wide:
```jsonc
"format": "{usage:2}%"
```
The fmt library has two issues. First it provides no way to set the _maximum_ length of a field, only the _minimum_ length. So expect width changes when the text becomes longer than the minimum width. This can be partially worked around with the `max-length`parameter. See https://github.com/Alexays/Waybar/issues/486.
The second issue concerns floating point numbers. Waybar comes with a custom formatter that enforces a fixed width for them (network bandwidth, disk usage, etc). You need to specify either `>`, `<`, or `=` as format modifier. This will align the number as requested and make it fixed width. See https://github.com/Alexays/Waybar/pull/472 for details, examples and limitations.
A last but painful issue arises with pango/cairo font rendering for custom glyphs (Font Awesome icons, most probably). Cairo keeps the font used for the last non-whitespace character to render the next whitespaces. This means that the two next lines, despite containing the same number of characters, will not render with the same width.
```
 10 spaces
 2 leading spaces
```
You can either move all your icons at the end of the module, so that they have no following spaces to alter, or use pango-specific markup around all the icons, like this: `<span font=\"Font Awesome 5 Free\"></span>`. This forces cairo to return to the default font when leaving the `<span>` and avoids using spaces of the wrong kind. You may experience improvements as https://gitlab.gnome.org/GNOME/pango/-/issues/249 seems to work against that.
## How to use with Sway?
You can use Waybar by defining in your Sway config file:
```
bar {
swaybar_command waybar
}
```
or at the end of your sway config file
```
exec waybar
```
## How can I temporarily hide the bars?
You can toggle the visibility of the bars with:
```sh
killall -SIGUSR1 waybar
```
## How can I reload the configuration without restarting waybar?
***Only works on waybar after version v0.9.5***
```sh
killall -SIGUSR2 waybar
```
## Workspace buttons are too wide with some GTK themes
![](https://user-images.githubusercontent.com/27376783/47964799-26019700-e03f-11e8-8b0f-1dd4862b6241.png)
In certain GTK themes, the button.text-button.flat element's min-width property is assigned a large value. You can override it in waybar's `style.css`
```css
#workspaces button {
min-width: 20px;
}
```
<a name="slider-looks-small"></a>
## My Slider doesn't show/looks small/doesn't work properly
Like all widgets in GTK, its width and height is determined in CSS. However, in a surprising turn, it's ever more important that you style your slider widget, otherwise its width and height will be *close to* 0, and it won't work properly when dragging around. It's worth noting that only the `trough` CSS Node actually requires any minimum height or width.
Try this if you're experiencing issues with sliders:
```css
#pulseaudio-slider trough, #backlight-slider trough {
min-height: 10px;
min-width: 80px;
}
```

View File

@@ -1,17 +0,0 @@
Welcome to the Waybar wiki!
First of all, **Waybar needs to run under wayland!**
## New to Waybar?
- [Installation](https://github.com/Alexays/Waybar/wiki/Installation)
- [FAQ](https://github.com/Alexays/Waybar/wiki/FAQ)
## Seeking help?
- [Configuration](https://github.com/Alexays/Waybar/wiki/Configuration)
- [Styling](https://github.com/Alexays/Waybar/wiki/Styling)
## Looking to contribute?
- [Writing Modules](./Writing-Modules)

View File

@@ -1,117 +0,0 @@
Which Distro are you using?
- [Alpine](#alpine)
- [Arch](#arch)
- [Fedora](#fedora)
- [Fedora Silverblue](#fedora-silverblue)
- [FreeBSD](#freebsd)
- [Gentoo](#gentoo)
- [openSUSE](#opensuse)
- [NixOS](#nixos)
- [Ubuntu and Debian](#ubuntu-and-debian)
- [Void](#void)
- [Other](#other)
## Alpine
Since Alpine v3.11, you can install the [`waybar` package](https://pkgs.alpinelinux.org/packages?name=waybar&branch=edge&repo=&arch=&maintainer=) from the `community` repository. As a superuser, type:
```sh
apk add waybar
```
## Arch
On Arch, you can simply install [waybar](https://www.archlinux.org/packages/extra/x86_64/waybar/) from extra. You can also install [waybar-git](https://aur.archlinux.org/packages/waybar-git/) from the AUR.
Another option is to use [Omarchy](https://github.com/basecamp/omarchy) an opinionated Arch-based distribution that already ships with a preconfigured Waybar and Hyprland setup. This approach can save time if you prefer to start with ready-made defaults instead of manually configuring Waybar from scratch.
## Fedora
On Fedora, Waybar is also in the official repositories. Install with `dnf install waybar`.
### Fedora Silverblue
Fedora Silverblue uses an immutable ostree-based filesystem, meaning ordinarily you would not install packages directly. There are three main approaches to installing Waybar.
#### Package layering (easiest)
You can install Waybar from the official repositories, using [package layering](https://docs.fedoraproject.org/en-US/fedora-silverblue/getting-started/#package-layering) with:
```sh
rpm-ostree install waybar
```
This functions similarly to packages installed with `dnf` and requires a reboot to take effect. `rpm-ostree update` will work as normal.
#### Flatpak
[Flatpak](https://flatpak.org/) is the usual approach to installing software on Silverblue. There are no official Flatpak packages for Waybar at this time.
#### Customised ostree image
A customised ostree image could be prepared already including Waybar. You can do this by modifying [workstation-ostree-config](https://pagure.io/workstation-ostree-config). Guidance is available [here](https://discussion.fedoraproject.org/t/minimal-or-custom-silverblue-ostree-images/1574).
## Gentoo
On Gentoo, the package is in the official repositories. Install with `emerge -a waybar`. Note that all versions are currently unstable, so you will have to accept keywords for it.
## FreeBSD
You may also need to run `pkg install pavucontrol` for volume control if not yet installed.
```sh
pkg install waybar
```
## openSUSE
On openSUSE, Waybar is in the official repositories. Install with `zypper in waybar`. See [devel project](https://build.opensuse.org/package/show/X11:Wayland/waybar).
## NixOS
On NixOS, you can try out Waybar with: `nix-shell -p waybar`, then run `waybar` once you are inside the shell. This will launch a default waybar immediately and imperatively.
You can persistently add it to your configuration with [NixOS](https://search.nixos.org/options?channel=unstable&query=waybar) or [Home-Manager](https://home-manager-options.extranix.com/?query=waybar) options.
NOTE: they may sound similar, but are entirely different scopes and those options cannot be mixed together. Use NixOS options only in system configs and Home-Manage ones only in home configs. You can add your home config to your system config, see Home-Manager documentation for more information on this.
In NixOS:
```nix
programs.waybar.enable = true;
```
This will install the bar, to which you can configure as you would on any other distribution via classic dotfiles.
Home-Manager allows for more declarative configuration of waybar itself in your configuration. Check the options for the most up-to-date information on how to accomplish this.
## Ubuntu and Debian
On Ubuntu, since version 20.04 LTS ("Focal Fossa"), Waybar is available as `waybar` in `universe`. Install with `apt-get install waybar`. See the [Ubuntu Packages page](https://packages.ubuntu.com/search?keywords=waybar&searchon=names&suite=all&section=all).
The required fonts have been available as packages since 22.04 LTS ("Jammy Jellyfish"), use `apt-get install fonts-font-awesome fonts-fork-awesome`.
The same packages are available in Debian since 1.2.0 ("bookworm").
## Void
On Void, the package is available as `Waybar`. Install with `xbps-install -S Waybar`.
## Other
To build and install Waybar just run:
```sh
git clone https://github.com/Alexays/Waybar && cd Waybar && sudo make install
```
-----
## How to use with Sway?
First, ensure you have the `otf-font-awesome` package installed. These are free fonts provided by Fonts Awesome and commonly used in Waybar configurations. You can also download the OTF fonts package from [this link](https://fontawesome.com/how-to-use/on-the-desktop/setup/getting-started).
You can use Waybar by defining in your Sway config file:
```
bar swaybar_command waybar
```
or at the end of your sway config file
```
exec waybar
```

View File

@@ -1,6 +0,0 @@
<img width="2559" height="39" alt="2025-10-14_09-33" src="https://github.com/user-attachments/assets/2fe24db6-8502-405a-b171-095ee2424c67" />
- Not affected by GTK_THEME.
- The bar height is fixed and can be easily adjusted (I personally prefer a smaller height).
[config](https://github.com/JohanChane/dotfiles/tree/waybar_example/.config/waybar)

View File

@@ -1,70 +0,0 @@
The `backlight/slider` module displays and controls the current brightness of the default or preferred device.
The brightness can be controlled by dragging the slider across the bar, or clicking on a specific position.
## CONFIGURATION
| option | typeof | default | description |
| --- | --- | --- | --- |
| `min` | int | 0 | The minimum value the slider should display and set. |
| `max` | int | 100 | The maximum value the slider should display and set. |
| `orientation` | string | `horizontal` | The orientation of the slider. Can be either `horizontal` or `vertical`. |
| `device` | string | | The name of the preferred device to control. If left empty, a device will be chosen automatically. |
> [!NOTE]
> As well as the JSON configuration, the slider modules are special in the sense that they **require** styling to work. Read more about it [here](https://github.com/Alexays/Waybar/wiki/FAQ#slider-looks-small). The TL;DR is that you **need** to set `min-width` and/or `min-height` (depending on whether your slider is vertical or not) for it to display correctly. That's a GTK detail, not an issue with Waybar.
## EXAMPLES
```json
"modules-right": [
"backlight/slider",
],
"backlight/slider": {
"min": 0,
"max": 100,
"orientation": "horizontal",
"device": "intel_backlight"
}
```
## STYLE
The slider is a component with multiple CSS Nodes, of which the following are exposed:
- **#backlight-slider**:
Controls the style of the box *around* the slider and bar.
- **#backlight-slider slider**:
Controls the style of the slider handle.
- **#backlight-slider trough**:
Controls the style of the part of the bar that has not been filled.
- **#backlight-slider highlight**:
Controls the style of the part of the bar that has been filled.
### STYLE EXAMPLE
```css
#backlight-slider slider {
min-height: 0px;
min-width: 0px;
opacity: 0;
background-image: none;
border: none;
box-shadow: none;
background: none;
}
#backlight-slider trough {
min-height: 10px;
min-width: 80px;
border-radius: 5px;
background: black;
}
#backlight-slider highlight {
min-width: 10px;
border-radius: 5px;
background: red;
}
```

View File

@@ -1,51 +0,0 @@
The `backlight` module displays the current backlight level.
### Config
Addressed by `backlight`
| option | typeof | default | description |
| ---------------------------- | ------- | ------------ | ----------- |
| `interval` | integer | 2 | The polling interval (in seconds) for the backlight level. |
| `format` | string | `{percent}%` | The format, how information should be displayed. On `{}` data gets inserted. |
| `format-icons` | array | | Based on the current screen brightness, the corresponding icon gets selected.<br>The order is *low* to *high*.<br> |
| `max-length` | integer | | The maximum length in characters the module should display. |
| `rotate` | integer | | Positive value to rotate the text label. |
| `states` | array | | A number of backlight states which get activated on certain brightness levels.<br>See [States](https://github.com/Alexays/Waybar/wiki/States) |
| `on-click` | string | | Command to execute when clicking on the module. |
| `on-click-middle` | string | | Command to execute when you middle click on the module using the mousewheel. |
| `on-click-right` | string | | Command to execute when you right click on the module. |
| `on-scroll-up` | string | | Command to execute when scrolling up on the module. This replaces the default behaviour of brightness control. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module. This replaces the default behaviour of brightness control. |
| `smooth-scrolling-threshold` | double | | Threshold to be used when scrolling. |
| `reverse-scrolling` | bool | false | Option to reverse the scroll direction for devices other than a mouse (touchpad, trackpad, etc) |
| `reverse-mouse-scrolling` | bool | false | Option to reverse the scroll direction for mice |
| `scroll-step` | float | 1.0 | The speed in which to change the brightness when scrolling. |
| `tooltip` | bool | `true` | Option to disable tooltip on hover. |
| `tooltip-format` | string | | Text to be displayed in the tooltip |
#### Format replacements:
| string | replacement |
| ------------ | ----------- |
| `{percent}` | Screen brightness as a percentage |
| `{icon}` | Icon, as defined in `format-icons`. |
#### Example:
```jsonc
"backlight": {
"device": "intel_backlight",
"format": "{percent}% {icon}",
"format-icons": ["", ""]
}
```
### Style
- `#backlight`
### See also
* [External screen brightness](https://gist.github.com/nicodebo/297c1e134256ea24abf02a485ce41420) (using [ddcutil](https://github.com/rockowitz/ddcutil))
* [Another external screen brightness](https://gist.github.com/Ar7eniyan/42567870ad2ce47143ffeb41754b4484) (using ddcutil too)
* [Screen brightness without external scripts](https://gist.github.com/MyrikLD/4467d4dae3f0911cd5094b8440cbf418) (still ddcutil) Note: Can close Monitor **O**n**S**creen**D**isplay each set interval (e.g.: AOC 27G2G8)
* [Screen brightness with simple bash script](https://gist.github.com/negoro26/c59167fb4c08da46c4e08e1fdcd7aeb1) (with ddcutil too)

View File

@@ -1,111 +0,0 @@
The `battery` module displays the current capacity and state (eg. charging) of your battery.
### Config
Addressed by `battery`
| option | typeof | default | description |
| ---------------- | ------- | ------------- | ----------- |
| `bat` | string | | The battery to monitor, as in `/sys/class/power_supply/` instead of auto detect. |
| `adapter` | string | | The adapter to monitor, as in `/sys/class/power_supply/` instead of auto detect. |
| `design-capacity` | bool | `false` | Option to enable the use of the design capacity instead of the actual maximal capacity. Thus, even full, the battery may be at less than 100%. |
| `full-at` | integer | | Define the max percentage of the battery, useful for an old battery, e.g. 96 |
| `interval` | integer | 60 | The polling interval (in seconds) for the battery status. |
| `states` | array/object | | A number of battery states which get activated on certain capacity levels.<br>See [States](https://github.com/Alexays/Waybar/wiki/States) |
| `format` | string | `{capacity}%` | The format, how the information should be displayed. |
| `format-time` | string | `{H} h {M} min` | The format of the estimate of time until full or empty. Use `{m}` for zero-padded minutes. |
| `format-icons` | array/object | | Based on the current capacity, the corresponding icon gets selected.<br>The order is *low* to *high*.<br>Or by the state if it is an object. |
| `max-length` | integer | | The maximum length (in characters) the module should display. |
| `rotate` | integer | | Positive value to rotate the text label. |
| `on-click` | string | | Command to execute when clicking the module. |
| `on-click-middle` | string | | Command to execute when you middle click on the module using the mousewheel. |
| `on-click-right` | string | | Command to execute when you right click on the module. |
| `on-scroll-up` | string | | Command to execute when scrolling up on the module. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module. |
| `smooth-scrolling-threshold`| double | | Threshold to be used when scrolling. |
| `tooltip` | bool | `true` | Option to enable tooltip on hover. |
| `tooltip-format` | string | `{timeTo}` | The tooltip format. |
| `weighted-average` | bool | `false` | For devices with multiple batteries, an option to display the percentage as an average weighted by the size of the batteries, rather than a simple average of their percentage levels |
| `bat-compatibility` | bool | `false` | Option to enable battery compatibility if not detected. |
#### Format replacements:
| string | replacement |
| ------------ | ----------- |
| `{capacity}` | Capacity in percentage |
| `{power}` | Power draw in watts |
| `{icon}` | Icon, as defined in `format-icons`. |
| `{time}` | Estimate of time until full or empty. Note that this is based on the power draw at the last refresh time, not an average. |
| `{cycles}` | The amount of charge cycles the highest-capacity battery has seen *(Linux only)* |
<!--
| `{health}` | A percentage representing the highest-capacity battery's current maximum charge relative to it's design capacity *(Linux only)* |
-->
<a name="module-battery-config-format-custom"></a>
#### Custom Formats:
The `battery` module allows to define custom formats based on up to two factors. The best fitting format will be selected.
| format | description |
| ------------------------- | ----------- |
| `format-<state>` | With [states](#module-battery-config-states), a custom format can be set depending on the capacity of your battery. |
| `format-<status>` | With the status, a custom format can be set depending on the status in `/sys/class/power_supply/<bat>/status` (in lowercase). |
| `format-<status>-<state>` | You can also set a custom format depending on both values. |
<a name="module-battery-config-tooltip-format-custom"></a>
#### Custom Tooltip Formats:
The tooltip format can be changed similarly to the label format. The best fitting from `tooltip-format`, `tooltip-format-<state>`, `tooltip-format-<status>` and `tooltip-format-<status>-<state>` will be used (using the same logic as `format-*`). Valid tooltip format replacements are as follows:
| string | replacement |
| ------------ | ----------- |
| `{capacity}` | Capacity in percentage |
| `{power}` | Power draw in watts |
| `{time}` | Estimate of time until full or empty. Note that this is based on the power draw at the last refresh time, not an average. |
| `{timeTo}` | Either an estimate of time until full or empty, or "Full", "Plugged" or "Empty" depending on the current battery status |
| `{cycles}` | The amount of charge cycles the highest-capacity battery has seen *(Linux only)* |
| `{health}` | A percentage representing the highest-capacity battery's current maximum charge relative to it's design capacity *(Linux only)* |
<a name="module-battery-config-states"></a>
#### States:
- Every entry (*state*) consists of a `<name>` (typeof: `string`) and a `<value>` (typeof: `integer`).
- The state can be addressed as a CSS class in the `style.css`. The name of the CSS class is the `<name>` of the state.
Each class gets activated when the current capacity is equal or below the configured `<value>`.
- Also each state can have its own `format`.
Those can be configured via `format-<name>`.
Or if you want to differentiate a bit more even as `format-<status>-<state>`. For more information see [custom formats](#module-battery-config-format-custom).
#### Example:
```jsonc
"battery": {
"bat": "BAT2",
"interval": 60,
"states": {
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon}",
"format-icons": ["", "", "", "", ""],
"max-length": 25
}
```
### Style
- `#battery`
- `#battery.<status>`
- `<status>` is the value of `/sys/class/power_supply/<bat>/status` in lowercase.
- `#battery.<state>`
- `<state>` can be defined in the `config`. For more information see [`states`](#module-battery-config-states)
- `#battery.<status>.<state>`
- Combination of both `<status>` and `<state>`.
The following classes can apply styles to _the entire Waybar_:
- `window#waybar.battery-<state>`
- `<state>` can be defined in the `config`, as previously mentioned.

View File

@@ -1,104 +0,0 @@
The `bluetooth` module displays information about a bluetooth controller and its connections.
### Config
Addressed by `bluetooth`
| option | typeof | default | description |
| ----------------- | ------- | ------------------- | ----------- |
| `controller` | string | | Use the controller with the defined alias. Otherwise a random controller is used. Recommended to define when there is more than 1 controller available to the system. |
| `format-device-preference` | array | | A ranking of bluetooth devices, addressed by their alias. The order is from `first displayed` to `last displayed`. If this config option is not defined or none of the devices in the list are connected, it will fall back to showing the last connected device. |
| `format` | string | ` {status}` | The format, how information should be displayed. This format is used when other formats aren't specified.
| `format-disabled` | string | | This format is used when the displayed controller is disabled. |
| `format-off` | string | | This format is used when the displayed controller is turned off. |
| `format-on` | string | | This format is used when the displayed controller is turned on with no devices connected. |
| `format-connected` | string | | This format is used when the displayed controller is connected to at least 1 device. |
| `format-no-controller` | string | | This format is used when no Bluetooth controller is available. |
| `rotate` | integer | | Positive value to rotate the text label. |
| `max-length` | integer | | The maximum length in characters the module should display. |
| `min-length` | integer | | The minimum length in characters the module should take up. |
| `align` | float | | The alignment of the text, where 0 is left-aligned and 1 is right-aligned. If the module is rotated, it will follow the flow of the text. |
| `on-click` | string | | Command to execute when clicking on the module. |
| `on-click-middle` | string | | Command to execute when you middle click on the module using mousewheel. |
| `on-click-right` | string | | Command to execute when you right click on the module. |
| `on-scroll-up` | string | | Command to execute when scrolling up on the module. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module. |
| `smooth-scrolling-threshold` | double | | Threshold to be used when scrolling. |
| `tooltip` | bool | `true` | Option to disable tooltip on hover. |
| `tooltip-format` | string | | The format, how information should be displayed in the tooltip. This format is used when other formats aren't specified. |
| `tooltip-format-disabled` | string | | This format is used when the displayed controller is disabled. |
| `tooltip-format-off` | string | | This format is used when the displayed controller is turned off. |
| `tooltip-format-on` | string | | This format is used when the displayed controller is turned on with no devices connected. |
| `tooltip-format-connected` | string | | This format is used when the displayed controller is connected to at least 1 device. |
| `tooltip-format-enumerate-connected` | string | | This format is used to define how each connected device should be displayed within the `device_enumerate` format replacement in the tooltip menu. |
#### Format replacements:
| string | replacement |
| ----------------------| ----------- |
| `{status}` | Status of the bluetooth device. |
| `{num_connections}` | Number of connections the displayed controller has. |
| `{controller_address}` | Address of the displayed controller. |
| `{controller_address_type}` | Address type of the displayed controller. |
| `{controller_alias}` | Alias of the displayed controller. |
| `{device_address}` | Address of the displayed device. |
| `{device_address_type}` | Address type of the displayed device. |
| `{device_alias}` | Alias of the displayed device. |
| `{device_enumerate}` | Show a list of all connected devices, each on a seperate line. Define the format of each device with the `tooltip-format-enumerate-connected` and/or `tooltip-format-enumerate-connected-battery` config options. Can only be used in the tooltip related format options. |
#### Experimental battery percentage feature:
At the time of writing, the experimental features of BlueZ need to be turned on, for the battery percentage options listed below to work.
##### Experimental format replacements
| string | replacement |
| ----------------------| ----------- |
| `{device_battery_percentage}` | Battery percentage of the displayed device if available. Use only in the config options defined below. |
##### Experimental configuration
| option | typeof | default | description |
| ----------------- | ------- | ------------------- | ----------- |
| `format-connected-battery` | string | | This format is used when the displayed device provides its battery percentage. |
| `tooltip-format-connected-battery` | string | | This format is used when the displayed device provides its battery percentage. |
| `tooltip-format-enumerate-connected-battery` | string | | This format is used to define how each connected device with a battery should be displayed within the `device_enumerate` format replacement option. When this config option is not defined, it will fall back on the `tooltip-format-enumerate-connected` config option. |
#### Examples:
```jsonc
"bluetooth": {
// "controller": "controller1", // specify the alias of the controller if there are more than 1 on the system
"format": " {status}",
"format-disabled": "", // an empty format will hide the module
"format-connected": " {num_connections} connected",
"tooltip-format": "{controller_alias}\t{controller_address}",
"tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{device_enumerate}",
"tooltip-format-enumerate-connected": "{device_alias}\t{device_address}"
}
```
```jsonc
"bluetooth": {
"format": " {status}",
"format-connected": " {device_alias}",
"format-connected-battery": " {device_alias} {device_battery_percentage}%",
// "format-device-preference": [ "device1", "device2" ], // preference list deciding the displayed device
"tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected",
"tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}",
"tooltip-format-enumerate-connected": "{device_alias}\t{device_address}",
"tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%"
}
```
### Style
- `#bluetooth`
- `#bluetooth.disabled`
- `#bluetooth.off`
- `#bluetooth.on`
- `#bluetooth.connected`
- `#bluetooth.discoverable`
- `#bluetooth.discovering`
- `#bluetooth.pairable`
- `#bluetooth.no-controller`

View File

@@ -1,51 +0,0 @@
The `cffi` module gives full control of a GTK widget to a third-party dynamic library, to create more complex modules using different programming languages.
### Config
Addressed by `cffi/<name>`
| option | typeof | default | description |
|---------------|--------|---------|----------------------------------------------------------------|
| `module_path` | string | | The path to the dynamic library to load to control the widget. |
Some additional configuration may be required depending on the cffi dynamic library being used.
### Style
The classes and IDs are managed by the cffi dynamic library.
#### Examples:
##### C example:
`~/.config/waybar/config`
```jsonc
"cffi/c_example": {
"module_path": ".config/waybar/cffi/wb_cffi_example.so"
}
```
#### Developing new CFFI modules
CFFI modules require a handful of functions and constants to be defined with C linkage. The method to achieve this depends on the programming language being used (search for FFI / Foreign Function Interface).
An example written in C can be found in [resources/custom_modules/cffi_example/](https://github.com/Alexays/Waybar/tree/master/resources/custom_modules/cffi_example/)
The list of symbols to define can be found in [resources/custom_modules/cffi_example/waybar_cffi_module.h](https://github.com/Alexays/Waybar/tree/master/resources/custom_modules/cffi_example/waybar_cffi_module.h)
##### Known CFFI modules
- [waylyrics](https://github.com/PandeCode/waylyrics) - Module to display sync lyrics current line of in spotify.
- [libwaybar_cffi_lyrics](https://github.com/switchToLinux/libwaybar_cffi_lyrics) , 一个歌词显示插件,支持 musicfox 和支持mpris协议的播放器。
If you develop your own module, please add it here.
##### Known CFFI language bindings
- [Rust](https://crates.io/crates/waybar-cffi)

View File

@@ -1,86 +0,0 @@
The `cpu` module displays the current cpu utilization.
### Config
Addressed by `cpu`
| option | typeof | default | description |
| ---------------- | ------- | ------- | ----------- |
| `interval` | integer | 10 | The polling interval (in seconds) for CPU info. |
| `format` | string | `{usage}%` | The format, how information should be displayed. Data in `{}` gets inserted (see below). |
| `max-length` | integer | | The maximum length in characters the module should display. |
| `rotate` | integer | | Positive value to rotate the text label. |
| `states` | array | | A number of cpu usage states which get activated on certain usage levels.<br>See [States](https://github.com/Alexays/Waybar/wiki/States) |
| `on-click` | string | | Command to execute when clicking on the module. |
| `on-click-middle` | string | | Command to execute when you middle click on the module using mousewheel. |
| `on-click-right` | string | | Command to execute when you right click on the module. |
| `on-scroll-up` | string | | Command to execute when scrolling up on the module. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module. |
| `smooth-scrolling-threshold` | double | | Threshold to be used when scrolling. |
| `tooltip` | bool | `true` | Option to enable tooltip on hover. |
#### Format replacements:
| string | replacement |
| ------------------ | ----------- |
| `{load}` | The 1 minute cpu load average. |
| `{usage}` | Current cpu usage (% view). |
| `{usageN}` | _Nth_ cpu core usage (% view). |
| `{icon}` | Current cpu usage (icon view). |
| `{iconN}` | _Nth_ cpu core usage (icon view). |
| `{avg_frequency}` | Current cpu average frequency (based on all cores) in GHz. |
| `{max_frequency}` | Current cpu max frequency (based on the core with the highest frequency) in GHz. |
| `{min_frequency}` | Current cpu min frequency (based on the core with the lowest frequency) in GHz. |
#### Examples:
```jsonc
"cpu": {
"interval": 10,
"format": "{}% ",
"max-length": 10
}
```
```jsonc
"cpu": {
"format": "{icon0} {icon1} {icon2} {icon3} {icon4} {icon5} {icon6} {icon7}",
"format-icons": ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"],
},
```
Using [PangoMarkupFormat](https://github.com/Alexays/Waybar/wiki/Configuration#module-format):
```jsonc
"cpu": {
"interval": 1,
"format": "{icon0}{icon1}{icon2}{icon3}{icon4}{icon5}{icon6}{icon7}",
"format-icons": [
"<span color='#69ff94'>▁</span>", // green
"<span color='#2aa9ff'>▂</span>", // blue
"<span color='#f8f8f2'>▃</span>", // white
"<span color='#f8f8f2'>▄</span>", // white
"<span color='#ffffa5'>▅</span>", // yellow
"<span color='#ffffa5'>▆</span>", // yellow
"<span color='#ff9977'>▇</span>", // orange
"<span color='#dd532e'>█</span>" // red
]
}
```
```jsonc
"cpu": {
"format": "{icon0}{icon1}{icon2}{icon3}{icon4}{icon5}{icon6}{icon7}",
"format-icons": [
"🁣", "🁤", "🁥", "🁦", "🁧", "🁨", "🁩",
"🁪", "🁫", "🁬", "🁭", "🁮", "🁯", "🁰",
"🁱", "🁲", "🁳", "🁴", "🁵", "🁶", "🁷",
"🁸", "🁹", "🁺", "🁻", "🁼", "🁽", "🁾",
"🁿", "🂀", "🂁", "🂂", "🂃", "🂄", "🂅",
"🂆", "🂇", "🂈", "🂉", "🂊", "🂋", "🂌",
"🂍", "🂎", "🂏", "🂐", "🂑", "🂒", "🂓", "🁢"
],
},
```
### Style
- `#cpu`

View File

@@ -1,123 +0,0 @@
The `cava` module for [karlstav/cava](https://github.com/karlstav/cava)
The Waybar cava module supports two different frontends starting from the 0.15.0 release. The frontend that will be used is managed by the `method` parameter in the [output] section of the cava configuration file.
### Config
Addressed by `cava`. Repeats and refers to the original [cava configuration](https://github.com/karlstav/cava#configuration). For any unclear option please check original cava documentation
| option | typeof | default | description |
| ---------------- | ------- | ------------- | ----------- |
| `cava_config` | string | | Path where cava configuration file is placed to |
| `method` [output] | string | | Manages which frontend Waybar cava module should use. Values: raw, sdl_glsl |
| `framerate` | integer | 30 | Frames per second. Is used as a replacement for `interval` |
| `autosens` | integer | 1 | Will attempt to decrease sensitivity if the bars peak |
| `sensitivity` | integer | 100 | Manual sensitivity in %. If autosens is enabled, this will only be the initial value. 200 means double height. Accepts only non-negative values |
| `bars` | integer | 12 | The number of bars |
| `lower_cutoff_freq` | long integer | 50 | Lower cutoff frequencies for lowest bars the bandwidth of the visualizer |
| `higher_cutoff_freq` | long integer | 10000 | Higher cutoff frequencies for highest bars the bandwidth of the visualizer |
| `sleep_timer` | integer | 5 | Seconds with no input before cava main thread goes to sleep mode |
| `hide_on_silence` | bool | false | Hides the widget if no input is present (after `sleep_timer` elapsed) |
| `format_silent` | string | | Widget's text after sleep_timer elapsed (`hide_on_silence` has to be false) |
| `method` [input] | string | pulse | Audio capturing method. Possible methods are: pipewire, pulse, alsa, fifo, sndio or shmem |
| `source` | string | auto | See cava configuration |
| `sample_rate` | long integer | 44100 | See cava configuration |
| `sample_bits` | integer | 16 | See cava configuration |
| `stereo` | bool | true | Visual channels |
| `reverse` | bool | false | Displays frequencies the other way around |
| `bar_delimiter` | integer | 0 | Each bar is separated by a delimiter. Use decimal value in ascii table(i.e. 59 = ";"). 0 means no delimiter |
| `monstercat` | bool | false | Disables or enables the so-called "Monstercat smoothing" with of without "waves" |
| `waves` | bool | false | Disables or enables the so-called "Monstercat smoothing" with of without "waves" |
| `noise_reduction` | integer | 77 | The raw visualization is very noisy, this factor adjusts the integral and gravity filters to keep the signal smooth. 100 will be very slow and smooth, 0 will be fast but noisy |
| `input_delay` | integer | 2 | Sets the delay before fetching audio source thread start working. On author machine Waybar starts much faster then pipewire audio server, and without a little delay cava module fails due to pipewire is not ready |
| `ascii_max_range` | integer | 7 | Impossible to set directly. The value is dictated by the number of icons in the array `format-icons`|
| `data_format` | string | asci | Raw data format. Can be 'binary' or 'ascii' |
| `raw_target` | string | /dev/stdout | Raw output target. A fifo will be created if target does not exist |
| `menu` | string | | Action that popups the menu |
| `menu-file` | string | | Location of the menu descriptor file. There need to be an element of type GtkMenu with id `menu` |
| `menu-actions` | array | | The actions corresponding to the buttons of the menu |
| `bar_spacing` | integer | | Bars' space between bars in number of characters |
| `bar_width` | integer | | Bars' width between bars in number of characters |
| `bar_height` | integer | | Useless. bar_height is only used for output in "noritake" format |
| `background` | string | | GLSL actual. Support hex code colors only. Must be within '' |
| `foreground` | string | | GLSL actual. Support hex code colors only. Must be within '' |
| `gradient` | integer | 0 | GLSL actual. Gradient mode(0/1 - on/off) |
| `gradient_count` | integer | 0 | GLSL actual. The count of colors for the gradient |
| `gradient_color_N` | string | | GLSL actual. N - the number of the gradient color between 1 and 8. Only hex defined colors are supported. Must be within '' |
| `sdl_width` | integer | | GLSL actual. Manages the width of the waybar cava GLSL frontend module |
| `sdl_height` | integer | | GLSL actual. Manages the height of the waybar cava GLSL frontend module |
| `continuous_rendering` | integer | 0 | GLSL actual. Keep rendering even if no audio. Recommended to set to 1 |
***
Configuration can be provided as:
1. The only cava configuration file which is provided through `cava_config`. The rest configuration can be skipped
2. Without cava configuration file. In such case cava should be configured through provided list of the configuration option
3. Mix. When provided both And cava configuration file And configuration options. In such case waybar applies configuration file first then overrides particular options by the provided list of configuration options
### Actions
| string | action |
| ---------------- | ------- |
| `mode` | Switch main cava thread and fetching audio source thread from/to pause/resume |
### Additional dependencies
```
iniparser
fftw3
epoxy(for GLSL frontend)
```
### Solving issues
* on start Waybar throws an exception "error while loading shared libraries: libcava.so: cannot open shared object file: No such file or directory".
- It might happen when libcava for some reason hasn't been registered in the system. `sudo ldconfig` should help
- Waybar with cava dependency is installed into /usr/local. In order to solve issue here:
1. Drop local cava library. `sudo rm -rfv /usr/local/include/cava`, `sudo rm -rfv /usr/local/lib64/pkgconfig/cava.pc`, `sudo rm -rfv /usr/local/lib64/libcava.so`
1. Setup prefix where waybar should be installed. `meson configure build -Dprefix="/usr"`
1. Do build waybar. `make`
1. Install waybar into the system. `sudo meson install -C build`
* waybar is starting but cava module doesn't react on the music.
- In such case for at first need to make sure usual cava application is working as well
- If so, need to comment all configuration options. Uncomment `cava_config` and provide the path to the working cava config
- You might set too huge or too small `input_delay`. Try to setup to 4 seconds, restart waybar and check again 4 seconds past. Usual even on weak machines it should be enough
- You might accidentally switched action `mode` to pause mode
### Raising issues
For clear understanding: this module is a cava API's consumer. So for any bugs related to cava engine you should contact to [Cava upstream](https://github.com/karlstav/cava) with the one Exception. Cava upstream doesn't provide cava as a shared library. For that this module author made a fork [libcava](https://github.com/LukashonakV/cava). So the order is 1) cava upstream 2)libcava upstream.
In case when cava releases new version and you're wanna get it, in such case it should be raised an issue to [libcava](https://github.com/LukashonakV/cava) with title [Bump]x.x.x where x.x.x is cava release version.
### Example:
```jsonc
"cava": {
// "cava_config": "$XDG_CONFIG_HOME/cava/cava.conf",
"framerate": 30,
"autosens": 1,
"sensitivity": 100,
"bars": 14,
"lower_cutoff_freq": 50,
"higher_cutoff_freq": 10000,
"hide_on_silence": false,
// "format_silent": "quiet",
"method": "pulse",
"source": "auto",
"stereo": true,
"reverse": false,
"bar_delimiter": 0,
"monstercat": false,
"waves": false,
"noise_reduction": 0.77,
"input_delay": 2,
"format-icons": ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█" ],
"actions": {
"on-click-right": "mode"
}
},
```
https://user-images.githubusercontent.com/23121044/232342152-640171fc-8977-462d-ac0d-0f8fd7c69774.mp4
### Style
- `#cava`
- `#cava.silent` Applied after no sound has been detected for sleep_timer seconds
- `#cava.updated` Applied when a new frame is shown

View File

@@ -1,99 +0,0 @@
The Cava GLSL frontend delegates the visualization of incoming audio data to the GPU via OpenGL.
There are some mandatory dependencies that need to be satisfied in order for Cava GLSL to be built and function properly:
1. epoxy library must be installed on the system
2. Vertex and fragment shaders from the original project must be used. They should be downloaded, and the file paths must be configured correctly in the Waybar Cava configuration:
1. [cava shaders](https://github.com/karlstav/cava/tree/master/output/shaders)
2. [libcava shaders](https://github.com/LukashonakV/cava/tree/master/output/shaders)
3. It is highly recommended to have a separate cava configuration for the Waybar Cava GLSL module and to use this as the `cava_config` in the Waybar configuration.
4. It is common for cava configurations to be placed in the `XDG_CONFIG_HOME` directory, including shaders as well. Consider keeping them in the `$XDG_CONFIG_HOME/cava/shaders` folder.
Key configuration options:
1. `bars`. The more values the parameter has, the more interesting the visualization becomes.
2. `method` in output section must be set to `sdl_glsl`
3. `sdl_width` and `sdl_height` manage the size of the module. Adjust them according to your needs.
4. Shaders for sdl_glsl, located in $HOME/.config/cava/shaders. Example:
`vertex_shader = pass_through.vert
fragment_shader = spectrogram.frag`
5. Set `continuous_rendering` to 1 to enable smooth rendering; set it to 0 otherwise. It is recommended to keep it set to 1.
6. `background`, `foreground`, and `gradient_color_N` (where N is a number between 1 and 8) must be defined using hex code
#### Example 1
1. waybar module config
```jsonc
"cava": {
"cava_config": "$XDG_CONFIG_HOME/cava/waybar_cava#1.conf",
"input_delay": 2,
"actions": {
"on-click-right": "mode"
}
},
```
2. cava config for waybar ->
[waybar_cava#1.conf.tar.gz](https://github.com/user-attachments/files/24260316/waybar_cava.1.conf.tar.gz)
https://github.com/user-attachments/assets/52ddd326-e254-4571-b1e9-72b19e57f0c7
#### Example 2
1. waybar module config
```jsonc
"cava": {
"cava_config": "$XDG_CONFIG_HOME/cava/waybar_cava#2.conf",
"input_delay": 2,
"actions": {
"on-click-right": "mode"
}
},
```
2. cava config for waybar ->
[waybar_cava#2.conf.tar.gz](https://github.com/user-attachments/files/24260344/waybar_cava.2.conf.tar.gz)
https://github.com/user-attachments/assets/ee7a7b7e-2e02-4190-92d8-b9fd72414950
#### Example 3
1. waybar module config
```jsonc
"cava": {
"cava_config": "$XDG_CONFIG_HOME/cava/waybar_cava#3.conf",
"input_delay": 2,
"actions": {
"on-click-right": "mode"
}
},
```
2. cava config for waybar ->
[waybar_cava#3.conf.tar.gz](https://github.com/user-attachments/files/24260349/waybar_cava.3.conf.tar.gz)
https://github.com/user-attachments/assets/303f5444-e4a0-43ac-83b3-5471b65edf3c
#### Example 4
1. waybar module config
```jsonc
"cava": {
"cava_config": "$XDG_CONFIG_HOME/cava/waybar_cava#4.conf",
"input_delay": 2,
"actions": {
"on-click-right": "mode"
}
},
```
2. cava config for waybar ->
[waybar_cava#4.conf.tar.gz](https://github.com/user-attachments/files/24260354/waybar_cava.4.conf.tar.gz)
https://github.com/user-attachments/assets/9a9d3e3a-ddc6-4f32-b386-736a7e6059b8
#### Example 5
1. waybar module config
```jsonc
"cava": {
"cava_config": "$XDG_CONFIG_HOME/cava/waybar_cava#5.conf",
"input_delay": 2,
"actions": {
"on-click-right": "mode"
}
},
```
2. cava config for waybar ->
[waybar_cava#5.conf.tar.gz](https://github.com/user-attachments/files/24260359/waybar_cava.5.conf.tar.gz)
https://github.com/user-attachments/assets/ef4fcddc-47a6-4651-87c4-96907eb99f5c

View File

@@ -1,203 +0,0 @@
The cava raw frontend uses ASCII characters to visualize incoming audio data. Each ASCII symbol position corresponds to the value of the audio power pulse.
Under the hood:
1. Incoming audio power pulse list is : 12684
2. See [format-icons](https://github.com/Alexays/Waybar/wiki/Module:-Cava#example).Configured array of ASCII codes is: ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█" ]
So raw cava frontend will give: ▁▂▆█▄
### Example
#### waybar config:
```jsonc
"cava": {
"cava_config": "$XDG_CONFIG_HOME/cava/waybar_raw.conf",
"input_delay": 2,
"format-icons" : ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█" ],
"actions": {
"on-click-right": "mode"
}
},
````
#### cava config for waybar
```ini
## Configuration file for CAVA.
# Remove the ; to change parameters.
[general]
# Smoothing mode. Can be 'normal', 'scientific' or 'waves'. DEPRECATED as of 0.6.0
# Accepts only non-negative values.
# 'autosens' will attempt to decrease sensitivity if the bars peak. 1 = on, 0 = off
# new as of 0.6.0 autosens of low values (dynamic range)
# 'overshoot' allows bars to overshoot (in % of terminal height) without initiating autosens. DEPRECATED as of 0.6.0
# Manual sensitivity in %. If autosens is enabled, this will only be the initial value.
# 200 means double height. Accepts only non-negative values.
# The number of bars (0-512). 0 sets it to auto (fill up console).
# Bars' width and space between bars in number of characters.
bars = 12
# bar_height is only used for output in "noritake" format
# For SDL width and space between bars is in pixels, defaults are:
# sdl_glsl have these default values, they are only used to calculate max number of bars.
# Lower and higher cutoff frequencies for lowest and highest bars
# the bandwidth of the visualizer.
# Note: there is a minimum total bandwidth of 43Mhz x number of bars.
# Cava will automatically increase the higher cutoff if a too low band is specified.
# Seconds with no input before cava goes to sleep mode. Cava will not perform FFT or drawing and
# only check for input once per second. Cava will wake up once input is detected. 0 = disable.
sleep_timer = 5
[input]
# Audio capturing method. Possible methods are: 'fifo', 'portaudio', 'pipewire', 'alsa', 'pulse', 'sndio', 'oss', 'jack' or 'shmem'
# Defaults to 'oss', 'pipewire', 'sndio', 'jack', 'pulse', 'alsa', 'portaudio' or 'fifo', in that order, dependent on what support cava was built with.
# On Mac it defaults to 'portaudio' or 'fifo'
# On windows this is automatic and no input settings are needed.
#
# All input methods uses the same config variable 'source'
# to define where it should get the audio.
#
# For pulseaudio and pipewire 'source' will be the source. Default: 'auto', which uses the monitor source of the default sink
# (all pulseaudio sinks(outputs) have 'monitor' sources(inputs) associated with them).
#
# For pipewire 'source' will be the object name or object.serial of the device to capture from.
# Both input and output devices are supported.
#
# For alsa 'source' will be the capture device.
# For fifo 'source' will be the path to fifo-file.
# For shmem 'source' will be /squeezelite-AA:BB:CC:DD:EE:FF where 'AA:BB:CC:DD:EE:FF' will be squeezelite's MAC address
#
# For sndio 'source' will be a raw recording audio descriptor or a monitoring sub-device, e.g. 'rsnd/2' or 'snd/1'. Default: 'default'.
# README.md contains further information on how to setup CAVA for sndio.
#
# For oss 'source' will be the path to a audio device, e.g. '/dev/dsp2'. Default: '/dev/dsp', i.e. the default audio device.
# README.md contains further information on how to setup CAVA for OSS on FreeBSD.
#
# For jack 'source' will be the name of the JACK server to connect to, e.g. 'foobar'. Default: 'default'.
# README.md contains further information on how to setup CAVA for JACK.
#
# The options 'sample_rate', 'sample_bits', 'channels' and 'autoconnect' can be configured for some input methods:
# sample_rate: fifo, pipewire, sndio, oss
# sample_bits: fifo, pipewire, sndio, oss
# channels: sndio, oss, jack
# autoconnect: jack
# Other methods ignore these settings.
#
# For 'sndio' and 'oss' they are only preferred values, i.e. if the values are not supported
# by the chosen audio device, the device will use other supported values instead.
# Example: 48000, 32 and 2, but the device only supports 44100, 16 and 1, then it
# will use 44100, 16 and 1.
#
[output]
# Output method. Can be 'ncurses', 'noncurses', 'raw', 'noritake', 'sdl'
# or 'sdl_glsl'.
# 'noncurses' (default) uses a buffer and cursor movements to only print
# changes from frame to frame in the terminal. Uses less resources and is less
# prone to tearing (vsync issues) than 'ncurses'.
#
# 'raw' is an 8 or 16 bit (configurable via the 'bit_format' option) data
# stream of the bar heights that can be used to send to other applications.
# 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above.
#
# 'noritake' outputs a bitmap in the format expected by a Noritake VFD display
# in graphic mode. It only support the 3000 series graphical VFDs for now.
#
# 'sdl' uses the Simple DirectMedia Layer to render in a graphical context.
# 'sdl_glsl' uses SDL to create an OpenGL context. Write your own shaders or
# use one of the predefined ones.
method = raw
# Orientation of the visualization. Can be 'bottom', 'top', 'left', 'right' or
# 'horizontal'. Default is 'bottom'. 'left and 'right' are only supported on sdl
# and ncruses output. 'horizontal' (bars go up and down from center) is only supported
# on noncurses output.
# Note: many fonts have weird or missing glyphs for characters used in orientations
# other than 'bottom', which can make output not look right.
# Visual channels. Can be 'stereo' or 'mono'.
# 'stereo' mirrors both channels with low frequencies in center.
# 'mono' outputs left to right lowest to highest frequencies.
# 'mono_option' set mono to either take input from 'left', 'right' or 'average'.
# set 'reverse' to 1 to display frequencies the other way around.
# Raw output target. A fifo will be created if target does not exist.
raw_target = /dev/stdout
# Raw data format. Can be 'binary' or 'ascii'.
data_format = ascii
# Binary bit format, can be '8bit' (0-255) or '16bit' (0-65530).
# Ascii max value. In 'ascii' mode range will run from 0 to value specified here
# Ascii delimiters. In ascii format each bar and frame is separated by a delimiters.
# Use decimal value in ascii table (i.e. 59 = ';' and 10 = '\n' (line feed)).
bar_delimiter = 0
# sdl window size and position. -1,-1 is centered.
# set label on bars on the x-axis. Can be 'frequency' or 'none'. Default: 'none'
# 'frequency' displays the lower cut off frequency of the bar above.
# Only supported on ncurses and noncurses output.
# enable synchronized sync. 1 = on, 0 = off
# removes flickering in alacritty terminal emulator.
# defaults to off since the behaviour in other terminal emulators is unknown
# Shaders for sdl_glsl, located in $HOME/.config/cava/shaders
; for glsl output mode, keep rendering even if no audio
# disable console blank (screen saver) in tty
# (Not supported on FreeBSD)
# show a flat bar at the bottom of the screen when idle, 1 = on, 0 = off
# show waveform instead of frequency spectrum, 1 = on, 0 = off
[color]
# Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow.
# Or defined by hex code '#xxxxxx' (hex code must be within ''). User defined colors requires
# a terminal that can change color definitions such as Gnome-terminal or rxvt.
# default is to keep current terminal color
# SDL and sdl_glsl only support hex code colors, these are the default:
# Gradient mode, only hex defined colors are supported,
# background must also be defined in hex or remain commented out. 1 = on, 0 = off.
# You can define as many as 8 different colors. They range from bottom to top of screen
[smoothing]
# Disables or enables the so-called "Monstercat smoothing" with or without "waves". Set to 0 to disable.
# Noise reduction, int 0 - 100. default 77
# the raw visualization is very noisy, this factor adjusts the integral and gravity filters to keep the signal smooth
# 100 will be very slow and smooth, 0 will be fast but noisy.
[eq]
# This one is tricky. You can have as much keys as you want.
# Remember to uncomment more than one key! More keys = more precision.
# Look at readme.md on github for further explanations and examples.
```
#### presentation
https://github.com/user-attachments/assets/d6678827-9d1a-43b0-b5c8-062d4a45a118

View File

@@ -1,175 +0,0 @@
The `clock` module displays the current date and time.
**Note:** There are two `clock` implementations:
1. `clock`: Fully consistent with what is written below. This is enabled if either one of the following build time conditions is met:
> 1. C++20 with __cpp_concepts >= 201907 (gcc >=13)
> 2. [date.h](https://github.com/HowardHinnant/date) is installed
2. `simpleclock`: Provides only date time functionality. That's it. Conditions for using: False the first point.
### Config
Addressed by `clock`
| option | typeof | default | description |
| ---------------- | ------- | ---------- | ----------- |
| `interval` | integer | 60 | The interval in which the information gets polled. |
| `format` | string | `{:%H:%M}` | The format, how the date and time should be displayed. See format options [here](https://fmt.dev/latest/syntax/#chrono-format-specifications). |
| `format-alt` | string | | On click, toggle to alternative format |
| `timezone` | string | | The timezone to display the time in, e.g. America/New_York. See [Wikipedia's unofficial list of timezones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). |
| `timezones` | list of strings | | A list of timezones (as in `timezone`) to use for time display, changed using the scroll wheel. Do not specify `timezone` option when `timezones` is specified. |
| `locale` | string | | A locale to be used to display the time. Intended to render times in custom timezones with the proper language and format. |
| `max-length` | integer | | The maximum length in character the module should display. |
| `rotate` | integer | | Positive value to rotate the text label. |
| `on-click` | string | | Command to execute when clicked on the module. |
| `on-click-middle` | string | | Command to execute when you middle clicked on the module using mousewheel. |
| `on-click-right` | string | | Command to execute when you right clicked on the module. |
| `on-scroll-up` | string | | Command to execute when scrolling up on the module. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module. |
| `smooth-scrolling-threshold` | double | | Threshold to be used when scrolling. |
| `tooltip` | bool | true | Option to enable tooltip on hover |
| `tooltip-format` | string | same as format | Tooltip on hover. Can also show a list of clocks in other timezones. See below the example using the property `tz_list`. |
Addressed by `clock: calendar`
| option | typeof | default | description |
| ---------------- | ------- | ---------- | ----------- |
| `mode` | string | month | Calendar view mode. Possible values: year\|month|
| `mode-mon-col` | integer | 3 | Relevant for `mode=year`. Count of months per row|
| `weeks-pos` | string | | The position where week numbers should be displayed. Disabled when is empty. Possible values: left\|right|
| `on-scroll` | integer | 1 | Value to scroll months/years forward/backward. Can be negative. Is configured under `on-scroll` option|
Addressed by `clock: calendar: format`
| option | typeof | default | description |
| ---------------- | ------- | ---------- | ----------- |
| `months` | string | | Format is applied to months header(January, February,...etc.) |
| `days` | string | | Format is applied to days |
| `weeks` | string | `{:%U}` | Format is applied to week numbers. When weekday format is not provided then is used default format: '{:%W}' when week starts with Monday, '{:%U}' otherwise |
| `weekdays` | string | | Format is applied to weeks header(Su,Mo,...etc.) |
| `today` | string | `<b><u>{}</u></b>` | Format is applied to Today |
### Actions
| string | action |
| ---------------- | ------- |
| `mode` | Switch calendar mode between year/month |
| `tz_up` | Switch to the next provided time zone |
| `tz_down` | Switch to the previous provided time zone |
| `shift_up` | Switch to the next calendar month/year |
| `shift_down` | Switch to the previous calendar month/year |
| `shift_reset` | Switch to current calendar month/year |
#### Example:
1. General
```jsonc
"clock": {
"interval": 60,
"format": "{:%H:%M}",
"max-length": 25
}
```
2. Calendar
```jsonc
"clock": {
"format": "{:%H:%M}  ",
"format-alt": "{:%A, %B %d, %Y (%R)}  ",
"tooltip-format": "<tt><small>{calendar}</small></tt>",
"calendar": {
"mode" : "year",
"mode-mon-col" : 3,
"weeks-pos" : "right",
"on-scroll" : 1,
"format": {
"months": "<span color='#ffead3'><b>{}</b></span>",
"days": "<span color='#ecc6d9'><b>{}</b></span>",
"weeks": "<span color='#99ffdd'><b>W{}</b></span>",
"weekdays": "<span color='#ffcc66'><b>{}</b></span>",
"today": "<span color='#ff6699'><b><u>{}</u></b></span>"
}
},
"actions": {
"on-click-right": "mode",
"on-scroll-up": "tz_up",
"on-scroll-down": "tz_down",
"on-scroll-up": "shift_up",
"on-scroll-down": "shift_down"
}
},
```
![calendar](https://github.com/Alexays/Waybar/assets/6098822/e5c38984-6b3c-43ef-8cac-05122a078d58)
3. Full date on hover
```jsonc
"clock": {
"interval": 60,
"tooltip": true,
"format": "{:%H.%M}",
"tooltip-format": "{:%Y-%m-%d}",
}
```
4. Show in the clock tooltip a list of clocks from other timezones
```json
"clock": {
"format": "{:%H:%M:%S (%Z)}",
"tooltip-format": "{tz_list}",
"timezones": [
"Etc/UTC",
"America/New_York",
"America/Montevideo",
"America/Los_Angeles",
"Asia/Tokyo"
]
}
```
### Style
- `#clock`
#### Displaying seconds causes other modules to shift/be nudged side to side
This is a common issue with proportional fonts; the width of numeric glyphs varies wildly. If your font supports it, you may add `font-feature-settings: "tnum";` to your `#clock` style, or wherever you set font styling for the whole bar. A supported font will then use fixed-width numbers.
### Troubleshooting
If clock module is disabled at startup with `locale::facet::_S_create_c_locale name not valid` error message try one of the followings:
* check if `LC_TIME` is set properly (glibc)
* set locale to `C` in the config file (musl)
If using `clock` instead of `simpleclock`, the locale will default to `C` regardless of the locale settings. To override this behavior you have to perpend `L` to the formatting string. For example, `{:%a %m %d}` becomes `{:L%a %m %d}`.
The `locale` option must be set for {calendar} to use the correct start-of-week, regardless of system locale.
#### Calendar in Chinese. Alignment
In order to have aligned Chinese calendar there are some useful recommendations:
1. Use "WenQuanYi Zen Hei Mono" which is provided in most Linux distributions
2. Try different font sizes and find best for you. size = 9pt should be fine
3. In case when "WenQuanYi Zen Hei Mono" font is used disable monospace font pango tag
Example of working config
```json
"clock": {
"format": "{:%H:%M}  ",
"format-alt": "{:L%A, %B %d, %Y (%R)}  ",
"tooltip-format": "\n<span size='9pt' font='WenQuanYi Zen Hei Mono'>{calendar}</span>",
"calendar": {
"mode" : "year",
"mode-mon-col" : 3,
"weeks-pos" : "right",
"on-scroll" : 1,
"format": {
"months": "<span color='#ffead3'><b>{}</b></span>",
"days": "<span color='#ecc6d9'><b>{}</b></span>",
"weeks": "<span color='#99ffdd'><b>W{}</b></span>",
"weekdays": "<span color='#ffcc66'><b>{}</b></span>",
"today": "<span color='#ff6699'><b><u>{}</u></b></span>"
}
},
"actions": {
"on-click-right": "mode",
"on-click-forward": "tz_up",
"on-click-backward": "tz_down",
"on-scroll-up": "shift_up",
"on-scroll-down": "shift_down"
}
},
```
![calendar-chinese](https://github.com/Alexays/Waybar/assets/6098822/aa537991-3ea2-4c45-9bc6-12c1adf9663e)

View File

@@ -1,112 +0,0 @@
The `custom` module displays either the output of a script or static text. To display static text, specify only the `format` field.
### Config
Addressed by `custom/<name>`
| option | typeof | default | description |
| ---------------- | ------- | ------- | ----------- |
| `exec` | string | | | The path to the script, which should be executed. |
| `exec-if` | string | | The path to a script, which determines if the script in `exec` should be executed.<br>`exec` will be executed if the exit code of `exec-if` equals 0. |
| `exec-on-event` | bool | `true` | If an event command is set (e.g. `on-click` or `on-scroll-up`) then re-execute the script. There are no guarantees that `exec` is executed after the `on-*` event commands finished. See https://github.com/Alexays/Waybar/pull/1784 for a possible patch. |
| `hide-empty-text`| bool | `false` | (Post-0.10.3 option) Disables the module when output is empty, but format might contain additional static content. |
| `return-type` | string | | See [`return-type`](#module-custom-config-return-type) |
| `interval` | integer | | The interval (in seconds) in which the information gets polled.<br>Use `once` if you want to execute the module only on startup. You can update it manually with a signal. If no `interval` is defined, it is assumed that the out script loops it self. |
| `restart-interval` | integer | | The restart interval (in seconds).<br>Can't be used with the *interval* option, so only with continuous scripts.<br>Once the script exit, it'll be re-executed after the *restart-interval*. |
| `signal` | integer | | The signal number used to update the module. The number is valid between 1 and N, where `SIGRTMIN+N` = `SIGRTMAX`. |
| `format` | string | `{}` | The format, how information should be displayed. On `{}` data gets inserted. |
| `format-icons` | array/object/string | | If the type is an array, then based on the set percentage, the corresponding icon gets selected (*low* to *high*).<br>If the type is an object, then the icon will be selected according to `alt` string from the output.<br>If the type is a string, it will be pasted as is.<br>**NOTE**: Arrays can be nested into objects. Icons will be selected first according to `alt` then percentage. |
| `rotate` | integer | | Positive value to rotate the text label. |
| `max-length` | integer | | The maximum length in character the module should display. |
| `on-click` | string | | Command to execute when clicked on the module. |
| `on-click-middle` | string | | Command to execute when you middle clicked on the module using mousewheel. |
| `on-click-right` | string | | Command to execute when you right clicked on the module. |
| `on-scroll-up` | string | | Command to execute when scrolling up on the module. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module. |
| `smooth-scrolling-threshold` | double | | Threshold to be used when scrolling. |
| `tooltip` | bool | `true` | Option to enable tooltip on hover. |
| `tooltip-format` | string | | The format of the tooltip. |
| `escape` | bool | `false` | Option to enable escaping of script output |
<a name="module-custom-config-return-type"></a>
#### Return-Type:
- When `return-type` is set to `json`, Waybar expects the `exec`-script to output its data in JSON format.
This should look like this: `{"text": "$text", "alt": "$alt", "tooltip": "$tooltip", "class": "$class", "percentage": $percentage }`. This means the output should also be on a single line. This can be achieved by piping the output of your script through `jq --unbuffered --compact-output`. The `class` parameter also accepts an array of strings.
- If you want to have multiline tooltips, use `\r` in your script
- If using PowerShell for scripting, use the standard newline operator "\`n" in double quotes; `\r` and `\n` will not work.
- If nothing or an invalid option is specified Waybar expects i3blocks style output, where values are `newline` separated.
This should look like this: `$text\n$tooltip\n$class`
`class` is a CSS class, to apply different styles in `style.css`
#### Continuous script:
The `exec` script may be continuous (i.e. contain some kind of infinite loop). The display will be updated for each new line of data on stdout (following the chosen [`return-type`](#module-custom-config-return-type)).
The `interval` option does not work with continuous script (no need to call it several times… as it will continuously run). However you might want to set the `restart-interval` to start again the script if it stops after some time.
Be warned that some technologies use a buffer for their output. If your module displays nothing even if your script is working as expected, the output might be hold temporarily in a buffer. Look for the correct way to flush the output buffer for your language of choice.
For example, in ruby you can do the following thing:
```ruby
loop do
puts { text: 'My module text', class: 'class', }.to_json
$stdout.flush
sleep 5
end
```
#### Format replacements:
| string | replacement |
| ------------------ | ----------- |
| `{}` | Output of the script. |
| `{percentage}` | Percentage which can be set via a json return-type. |
| `{icon}` | An icon from 'format-icons' according to percentage. |
| `{text}` | The text which can be set via a json return-type. |
| `{alt}` | The alt which can be set via a json return-type. |
The `{}` placeholder is special: it automatically displays the text output from your script.
However, `{}` cannot be combined with other placeholders like `{icon}` in the format string — using both together will not work as expected.
For example, if you want to display both an icon from `format-icons` and some text, you should use `{icon}` and `{text}` explicitly:
```json
"custom/media": {
"exec": "/path/to/your/awesome/script",
"format": "{icon} {text}",
"format-icons": {
"spotify": "",
"default": "🎵"
}
}
```
In this example:
- `{icon}` shows an icon based on the "alt" field returned by your awesome script
- `{text}` shows the value of the "text" field from your scripts JSON output
### Tooltip Format
`tooltip-format` can receive any of the above format replacements.
If the output of the custom script specifies a value in the `tooltip` field, this is the default. Otherwise, it is `{}`.
### Style
- `#custom-<name>`
- `#custom-<name>.<class>`
- `<class>` can be set by the script. For more information see [`return-type`](#module-custom-config-return-type)
### Troubleshooting
#### Self-looping module don't show up
If your module is self-looping, and it doesn't even show up in the bar, check that:
1. Its configuration does __not__ include an `interval` parameter
2. Output to stdout is not buffered (see [#2358](https://github.com/Alexays/Waybar/discussions/2358))
#### Custom json class not displayed
If you have a json class in your custom script that is not displayed by styles.css, the json with more variables must be displayed first (see [#3234](https://github.com/Alexays/Waybar/issues/3234))

View File

@@ -1,587 +0,0 @@
This page contains brief examples, with code provided here directly, of custom modules:
#### CPU History:
Shows a CPU graph like this:
<img width="227" height="17" alt="2025-07-23-172546_hyprshot" src="https://github.com/user-attachments/assets/e6b6cd88-5f83-45d7-b559-a285155bd291" />
Full usage example in my dotfiles: https://github.com/cargodog/dot-config/tree/master/waybar
`~/.config/waybar/config`
```jsonc
"custom/cpuhistory": {
"exec": "~/.config/waybar/scripts/cpu_history.py -d 60",
"format": "<span color='#FFA500'>  </span>{}",
"interval": 1,
"return-type": "json",
"on-click": "~/.config/waybar/scripts/cpu_history.py toggle"
},
```
* Requires python 3 and the python psutil package
* Set `-d` to set the number of bars in the graph
* For example, setting `"interval": 1` and `-d 60` means the graph will show the last 60 seconds of CPU usage
* `on-click` action toggles between graph view and single measurement
`~/.config/waybar/config/scripts/cpu_history.py`
```python
#!/usr/bin/env python3
"""CPU Usage Graph Monitor - Displays a unicode graph of CPU usage history using Braille characters."""
import json
import os
import sys
import psutil
import argparse
from pathlib import Path
# Configuration
CACHE_DIR = Path(os.environ.get('XDG_CACHE_HOME', Path.home() / '.cache'))
HISTORY_FILE = CACHE_DIR / 'cpu_usage_history.json'
DEFAULT_HISTORY_DEPTH = 40
# Braille patterns for vertical bar graphs
BRAILLE_PATTERNS = {
(0, 0): '', (1, 0): '', (2, 0): '', (3, 0): '', (4, 0): '',
(0, 1): '', (1, 1): '', (2, 1): '', (3, 1): '', (4, 1): '',
(0, 2): '', (1, 2): '', (2, 2): '', (3, 2): '', (4, 2): '',
(0, 3): '', (1, 3): '', (2, 3): '', (3, 3): '', (4, 3): '',
(0, 4): '', (1, 4): '', (2, 4): '', (3, 4): '', (4, 4): '',
}
def get_braille_char(left_val, right_val):
"""Convert two percentage values (0-100) to a single Braille character."""
# Convert percentages to levels (1-4), minimum 1 to always show at least one dot
left_level = max(1, min(int(left_val * 4 / 100), 4))
right_level = max(1, min(int(right_val * 4 / 100), 4))
return BRAILLE_PATTERNS.get((left_level, right_level), '')
def load_data():
"""Load data from cache file."""
try:
with open(HISTORY_FILE, 'r') as f:
data = json.load(f)
# Handle legacy format
if isinstance(data, list):
return {"history": data, "show_graph": True}
return data
except (FileNotFoundError, json.JSONDecodeError):
return {"history": [], "show_graph": True}
def save_data(data):
"""Save data to cache file."""
CACHE_DIR.mkdir(parents=True, exist_ok=True)
with open(HISTORY_FILE, 'w') as f:
json.dump(data, f)
def main():
parser = argparse.ArgumentParser(description='CPU Usage Graph Monitor with Braille display')
parser.add_argument('command', nargs='?', help='Command: toggle')
parser.add_argument('-d', '--depth', type=int, default=DEFAULT_HISTORY_DEPTH,
help=f'History depth (default: {DEFAULT_HISTORY_DEPTH})')
args = parser.parse_args()
# Ensure even depth for Braille pairs
history_depth = args.depth + (args.depth % 2)
data = load_data()
# Handle toggle command
if args.command == "toggle":
data["show_graph"] = not data.get("show_graph", True)
save_data(data)
return
# Get CPU usage
per_core = psutil.cpu_percent(interval=0.1, percpu=True)
current_usage = sum(per_core) / len(per_core)
# Update history
history = data["history"]
history.append(current_usage)
# Keep only needed history
if len(history) > history_depth:
history = history[-history_depth:]
# Generate output
if data.get("show_graph", True):
# Pad with zeros if needed
padded = [0.0] * (history_depth - len(history)) + history
# Build graph
graph = ''.join(
get_braille_char(
padded[i],
padded[i + 1] if i + 1 < history_depth else 0.0
)
for i in range(0, history_depth, 2)
)
text = f"[{graph}]"
else:
text = f"{current_usage:.1f}%"
# Save and output
data["history"] = history
save_data(data)
# Build color-coded tooltip
tooltip_lines = []
for i, usage in enumerate(per_core):
if usage >= 80:
color = "#ff6b6b" # Red for high load
elif usage >= 60:
color = "#feca57" # Yellow for medium-high load
elif usage >= 40:
color = "#48dbfb" # Cyan for medium load
else:
color = "#1dd1a1" # Green for low load
tooltip_lines.append(f'<span color="{color}">Core {i}: {usage:5.1f}%</span>')
# Output for waybar
print(json.dumps({
"text": text,
"tooltip": '\n'.join(tooltip_lines),
"class": "cpu-history"
}))
if __name__ == "__main__":
main()
```
#### dunst:
`~/.config/waybar/config`
```jsonc
"custom/dunst": {
"exec": "~/.config/waybar/scripts/dunst.sh",
"on-click": "dunstctl set-paused toggle",
"restart-interval": 1,
}
```
`~/.config/waybar/scripts/dunst.sh`
```bash
#!/usr/bin/env bash
COUNT=$(dunstctl count waiting)
ENABLED=
DISABLED=
if [ $COUNT != 0 ]; then DISABLED="$COUNT"; fi
if dunstctl is-paused | grep -q "false" ; then echo $ENABLED; else echo $DISABLED; fi
```
Or if you want a version that reacts to dbus events instead:
```bash
#!/usr/bin/env bash
set -euo pipefail
readonly ENABLED=' '
readonly DISABLED=' '
dbus-monitor path='/org/freedesktop/Notifications',interface='org.freedesktop.DBus.Properties',member='PropertiesChanged' --profile |
while read -r _; do
PAUSED="$(dunstctl is-paused)"
if [ "$PAUSED" == 'false' ]; then
CLASS="enabled"
TEXT="$ENABLED"
else
CLASS="disabled"
TEXT="$DISABLED"
COUNT="$(dunstctl count waiting)"
if [ "$COUNT" != '0' ]; then
TEXT="$DISABLED ($COUNT)"
fi
fi
printf '{"text": "%s", "class": "%s"}\n' "$TEXT" "$CLASS"
done
```
#### NVIDIA GPU (with nvidia-smi)
```jsonc
"custom/nvidia": {
"exec": "nvidia-smi --query-gpu=utilization.gpu,temperature.gpu --format=csv,nounits,noheader | sed 's/\\([0-9]\\+\\), \\([0-9]\\+\\)/\\1% 🌡️\\2°C/g'",
"format": "{} 🖥️",
"interval": 2
}
```
#### Generic MediaPlayer:
Supports vlc, mpv, RhythmBox, web browsers, cmus, mpd, spotify and others.
```jsonc
"custom/media": {
"format": "{icon} {}",
"escape": true,
"return-type": "json",
"max-length": 40,
"on-click": "playerctl play-pause",
"on-click-right": "playerctl stop",
"smooth-scrolling-threshold": 10, // This value was tested using a trackpad, it should be lowered if using a mouse.
"on-scroll-up": "playerctl next",
"on-scroll-down": "playerctl previous",
"exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null", // Script in resources/custom_modules folder
}
```
#### Spotify:
```jsonc
"custom/spotify": {
"format": "{icon} {}",
"escape": true,
"return-type": "json",
"max-length": 40,
"interval": 30, // Remove this if your script is endless and write in loop
"on-click": "playerctl -p spotify play-pause",
"on-click-right": "killall spotify",
"smooth-scrolling-threshold": 10, // This value was tested using a trackpad, it should be lowered if using a mouse.
"on-scroll-up" : "playerctl -p spotify next",
"on-scroll-down" : "playerctl -p spotify previous",
"exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null", // Script in resources/custom_modules folder
"exec-if": "pgrep spotify"
}
```
#### mpd:
```jsonc
"custom/mpd": {
"format": "♪ {}",
//"max-length": 15,
"interval": 10,
"exec": "mpc current",
"exec-if": "pgrep mpd",
"on-click": "mpc toggle",
"on-click-right": "sonata"
}
```
#### cmus:
```jsonc
"custom/cmus": {
"format": "♪ {}",
//"max-length": 15,
"interval": 10,
"exec": "cmus-remote -C \"format_print '%a - %t'\"", // artist - title
"exec-if": "pgrep cmus",
"on-click": "cmus-remote -u", //toggle pause
"escape": true //handle markup entities
}
```
#### MPRIS controller
```jsonc
"custom/media": {
"format": "{icon}{}",
"return-type": "json",
"format-icons": {
"Playing": " ",
"Paused": " ",
},
"max-length":70,
"exec": "playerctl -a metadata --format '{\"text\": \"{{playerName}}: {{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F",
"on-click": "playerctl play-pause",
}
```
#### Pipewire:
Uses Wireplumber
`~/.config/waybar/config`
```jsonc
"custom/pipewire": {
"tooltip": false,
"max-length": 6,
"exec": "$HOME/.config/waybar/scripts/pipewire.sh",
"on-click": "pavucontrol",
"on-click-right": "qpwgraph"
}
```
`~/.config/waybar/scripts/pipewire.sh`
```bash
#!/bin/bash
set -e
# https://blog.dhampir.no/content/sleeping-without-a-subprocess-in-bash-and-how-to-sleep-forever
snore() {
local IFS
[[ -n "${_snore_fd:-}" ]] || exec {_snore_fd}<> <(:)
read -r ${1:+-t "$1"} -u $_snore_fd || :
}
DELAY=0.2
while snore $DELAY; do
WP_OUTPUT=$(wpctl get-volume @DEFAULT_AUDIO_SINK@)
if [[ $WP_OUTPUT =~ ^Volume:[[:blank:]]([0-9]+)\.([0-9]{2})([[:blank:]].MUTED.)?$ ]]; then
if [[ -n ${BASH_REMATCH[3]} ]]; then
printf "MUTE\n"
else
VOLUME=$((10#${BASH_REMATCH[1]}${BASH_REMATCH[2]}))
ICON=(
""
""
""
)
if [[ $VOLUME -gt 50 ]]; then
printf "%s" "${ICON[0]} "
elif [[ $VOLUME -gt 25 ]]; then
printf "%s" "${ICON[1]} "
elif [[ $VOLUME -ge 0 ]]; then
printf "%s" "${ICON[2]} "
fi
printf "$VOLUME%%\n"
fi
fi
done
exit 0
```
#### Pacman
```jsonc
"custom/pacman": {
"format": "{} ",
"interval": "once",
"exec": "pacman_packages",
"on-click": "update-system",
"signal": 8
}
//alternate
"custom/pacman": {
"format": "{} ",
"interval": 3600, // every hour
"exec": "checkupdates | wc -l", // # of updates
"exec-if": "exit 0", // always run; consider advanced run conditions
"on-click": "termite -e 'sudo pacman -Syu'; pkill -SIGRTMIN+8 waybar", // update system
"signal": 8
}
```
You can use the signal and update the number of available packages with `pkill -RTMIN+8 waybar`.
#### XBPS
Show available updates for void linux.
`~/.config/waybar/config`
```jsonc
"custom/xbps": {
"format": "{} ",
"return-type": "json",
"tooltip": true,
"interval": "3600",
"exec": "~/.config/waybar/custom/xbps-updates.sh"
},
```
`~/.config/waybar/custom/xbps-updates.sh`
```bash
#!/bin/bash
pkgs=$(xbps-install -nuM | awk '{print $1}')
pkg_count=$(echo $pkgs | wc -w)
pkg_list=$(echo $pkgs | sed 's/ /\\r/g')
echo "{\"text\":\"$pkg_count\", \"tooltip\":\"$pkg_list\"}"
```
#### DeaDBeeF
```jsonc
"custom/deadbeef": {
"format": " {}",
"max-length": 50,
"interval": 10,
"exec": "deadbeef --nowplaying-tf '{\"text\": \"%title%\", \"tooltip\":\"%artist% - %title%\",\"class\":\"$if(%isplaying%,playing,not-playing)\"}'",
"return-type": "json",
"exec-if": "pgrep deadbeef",
"on-click": "deadbeef --toggle-pause"
}
```
#### VPN indicator
(the indicator is quite silly and only checks whether a tunnel exists or not)
```jsonc
"custom/vpn": {
"format": "VPN ",
"exec": "echo '{\"class\": \"connected\"}'",
"exec-if": "test -d /proc/sys/net/ipv4/conf/tun0",
"return-type": "json",
"interval": 5
}
```
#### Github notifications
```jsonc
"custom/github": {
"format": "{} ",
"return-type": "json",
"interval": 60,
"exec": "$HOME/.config/waybar/github.sh",
"on-click": "xdg-open https://github.com/notifications"
}
```
1. Make sure [`jq`](https://stedolan.github.io/jq/) is installed.
2. Create `notifications.token`, a personal access token, with `notifications` in scope at https://github.com/settings/tokens.
3. Create `github.sh` with the contents below, replacing `username` with your own.
```bash
#!/bin/bash
token=`cat ${HOME}/.config/github/notifications.token`
count=`curl -u username:${token} https://api.github.com/notifications | jq '. | length'`
if [[ "$count" != "0" ]]; then
echo '{"text":'$count',"tooltip":"$tooltip","class":"$class"}'
fi
```
#### Weather
Replace `Berlin+Germany` with your own city.
`~/.config/waybar/config`
```jsonc
"custom/weather": {
"exec": "${HOME}/.config/waybar/scripts/get_weather.sh Berlin+Germany",
"return-type": "json",
"format": "{}",
"tooltip": true,
"interval": 3600
}
```
`~/.config/waybar/scripts/get_weather.sh`
```bash
#!/usr/bin/env bash
for i in {1..5}
do
text=$(curl -s "https://wttr.in/$1?format=1")
if [[ $? == 0 ]]
then
text=$(echo "$text" | sed -E "s/\s+/ /g")
tooltip=$(curl -s "https://wttr.in/$1?format=4")
if [[ $? == 0 ]]
then
tooltip=$(echo "$tooltip" | sed -E "s/\s+/ /g")
echo "{\"text\":\"$text\", \"tooltip\":\"$tooltip\"}"
exit
fi
fi
sleep 2
done
echo "{\"text\":\"error\", \"tooltip\":\"error\"}"
```
#### Sway Scratchpad Indicator:
Requires [`jq`](https://stedolan.github.io/jq/)
Get all the scratchpad nodes. Shows the count as module text and the window class/app_id, id, and name on hover, and doesn't display anything if there are no nodes in the scratchpad.
```jsonc
"custom/scratchpad-indicator": {
"interval": 3,
"return-type": "json",
"exec": "swaymsg -t get_tree | jq --unbuffered --compact-output '(recurse(.nodes[]) | select(.name == \"__i3_scratch\") | .focus) as $scratch_ids | [.. | (.nodes? + .floating_nodes?) // empty | .[] | select(.id |IN($scratch_ids[]))] as $scratch_nodes | if ($scratch_nodes|length) > 0 then { text: \"\\($scratch_nodes | length)\", tooltip: $scratch_nodes | map(\"\\(.app_id // .window_properties.class) (\\(.id)): \\(.name)\") | join(\"\\n\") } else empty end'",
"format": "{} 🗗",
"on-click": "exec swaymsg 'scratchpad show'",
"on-click-right": "exec swaymsg 'move scratchpad'"
}
```
A simpler version, that only shows the number of windows when there is at least one (hidden when there are 0). Shows no additional info on hover.
```jsonc
"custom/scratchpad_indicator": {
"interval": 3,
"exec": "swaymsg -t get_tree | jq 'recurse(.nodes[]) | first(select(.name==\"__i3_scratch\")) | .floating_nodes | length | select(. >= 1)'",
"format": "{} ",
"on-click": "swaymsg 'scratchpad show'",
"on-click-right": "swaymsg 'move scratchpad'"
}
```
#### Sway output scaling toggle
```jsonc
"custom/output-scale": {
"format": "{icon} {}",
"return-type": "json",
"format-icons": { // These are FontAwesome 4 icons. Update them as needed.
"scale": " \uf0b2",
"noscale": "\uf066"
},
"exec-on-event": true,
"interval": "once",
"exec": "( swaymsg -r -t get_outputs | jq '.[0].scale' | xargs test 1 == ) && echo '{\"alt\": \"noscale\"}' || echo '{\"alt\":\"scale\"}'",
"exec-if": "sleep 0.1", // Give enough time for `sway output` command changes to propagate so we can read them in the next `exec`
"on-click": "( swaymsg -r -t get_outputs | jq '.[0].scale' | xargs test 1 = ) && swaymsg output DP-1 scale 1.4 || swaymsg output DP-1 scale 1"
}
```
1. Change the desired scaling parameter in `on-click` configuration.
2. Update the correct output from `DP-1` to the one you have.
3. Change the index `[0]` in `exec` and `on-click` if you have more than one output, and need to adjust non-zero output.
#### Display current Pulseaudio sink and cycle between sinks on click
```jsonc
"custom/pulseaudio-cycle": {
"return-type": "json",
"exec-on-event": true,
"interval": "5s",
"exec" "pactl --format=json list sinks | jq -cM --unbuffered \"map(select(.name == \\\"$(pactl get-default-sink)\\\"))[0].properties | [.\\\"media.name\\\",.\\\"alsa.name\\\",.\\\"node.nick\\\",.\\\"alsa.long_card_name\\\"] | map(select(length>0))[0] | {text:.}\"",
"exec-if": "sleep 0.1", // Give enough time for `pactl get-default-sink` to update
"on-click": "pactl --format=json list sinks short | jq -cM --unbuffered \"[.[].name] | .[((index(\\\"$(pactl get-default-sink)\\\")+1)%length)]\" | xargs pactl set-default-sink"
}
```
#### Calendar with CalDAV integration
Requires [plann](https://github.com/tobixen/plann)
```
#!/usr/bin/env bash
PLANN=$HOME/.pyenv/versions/plann/bin/plann
printf '{"text":"'
printf "󰸘 $(date +'%m-%d (%a)') "
printf "󰅐 $(date +'%H:%M')"
printf '",'
printf '"tooltip":"%s"' "$($PLANN --caldav-url CALDAV_URL --caldav-username CALDAV_USER --caldav-password CALDAV_PASSWORD --calendar-name 'CALDAV_CALENDAR_NAME' agenda | head --lines -1 | sed 's/$/\\n/' | tr -d '\n' | head --bytes -2)"
printf '}'
```
Remove `--calendar-name` option to displays the last events across all calendars.
#### Measure power draw (of PC for example) on Tuya Smart power plug over Zigbee2MQTT
Requires [mosquitto](https://github.com/eclipse/mosquitto) and [jq](https://github.com/jqlang/jq)
```
"custom/tuya": {
"format": "{}w",
"exec": "mosquitto_sub -h YOUR_HOST -t 'zigbee2mqtt/YOUR_SMART_DEV' | jq '.power' --unbuffered",
"exec-if": "exit 0",
"restart-interval": 60,
"escape": true,
}
```
#### Simple VRR/Adaptive sync toggle for sway
```
"custom/adaptive-sync" : {
"format": " VRR{} ",
"exec-on-event": true,
"interval": "once",
"exec": "swaymsg -r -t get_outputs | jq '.[0].adaptive_sync_status'",
"on-click": "swaymsg output DP-2 adaptive_sync on",
"on-click-right": "swaymsg output DP-2 adaptive_sync off"
}
```

View File

@@ -1,92 +0,0 @@
Some modules support a `menu`, which allows to have a popup menu when a defined click is done over the module.
### Config
A module that implements a `menu` needs 3 properties defined in its config :
| option | typeof | default | description |
| ---------------- | ------- | ------------- | ----------- |
| `menu` | string | | Action that popups the menu. i.e: `on-click`|
| `menu-file` | string | | Location of the menu descriptor file. There need to be an element of type GtkMenu with id menu.|
| `menu-actions` | array | | The actions corresponding to the buttons of the menu. The identifiers of each actions needs to exists as an id in the 'menu-file' for it to be linked properly. |
#### menu-file
The menu-file is an `.xml` file representing a GtkBuilder. Documentation for it can be found here :
https://docs.gtk.org/gtk4/class.Builder.html
Here, it needs to have an element of type GtkMenu with id "menu". Each actions in menu-actions are linked to elements in the menu-file file by the id of the elements.
#### Example:
Module config:
```jsonc
"custom/power": {
"format" : "⏻ ",
"tooltip": false,
"menu": "on-click",
"menu-file": "~/.config/waybar/power_menu.xml",
"menu-actions": {
"shutdown": "shutdown",
"reboot": "reboot",
"suspend": "systemctl suspend",
"hibernate": "systemctl hibernate",
},
},
```
~/.config/waybar/power_menu.xml:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkMenu" id="menu">
<child>
<object class="GtkMenuItem" id="suspend">
<property name="label">Suspend</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="hibernate">
<property name="label">Hibernate</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="shutdown">
<property name="label">Shutdown</property>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="delimiter1" />
</child>
<child>
<object class="GtkMenuItem" id="reboot">
<property name="label">Reboot</property>
</object>
</child>
</object>
</interface>
```
### Style
- `menu` Style for the menu
- `menuitem` Style for items in the menu
#### Example:
```css
menu {
border-radius: 15px;
background: #161320;
color: #B5E8E0;
}
menuitem {
border-radius: 15px;
}
```

View File

@@ -1,53 +0,0 @@
This page contains a list, in chronological order, of third-party custom modules:
* [Next calendar events](https://gist.github.com/bjesus/178a9bd3453470d74803945dbbf9ed40) (using [khal](https://github.com/pimutils/khal))
* [Chromecast currently playing](https://gist.github.com/bjesus/beb8f9d9542841f568492707bdec4783) (using [catt](https://github.com/skorokithakis/catt/))
* [Weather with detailed forecast](https://github.com/bjesus/wttrbar) (using [wttr.in](https://github.com/chubin/wttr.in))
* [Another Weather module](https://gist.github.com/Surendrajat/ff3876fd2166dd86fb71180f4e9342d7) (using [weather.com](https://weather.com))
* [External screen brightness](https://gist.github.com/nicodebo/297c1e134256ea24abf02a485ce41420) (using [ddcutil](https://github.com/rockowitz/ddcutil))
* [Another external screen brightness](https://gist.github.com/Ar7eniyan/42567870ad2ce47143ffeb41754b4484) (using ddcutil too)
* [Screen brightness without external scripts](https://gist.github.com/MyrikLD/4467d4dae3f0911cd5094b8440cbf418) (still ddcutil)
* [Reminders](https://gist.github.com/nicodebo/181f5135af9585e6f2c0fd05533b8004) (using [remind](https://www.roaringpenguin.com/wiki/index.php/Remind))
* [WireGuard](https://github.com/HarHarLinks/wireguard-rofi-waybar) (using NetworkManager/nmcli)
* [GPU usage monitor](https://www.reddit.com/r/swaywm/comments/ncjpfz/how_to_add_gpu_usage_to_waybar/) (using data from `/sys/class/hwmon/`)
* [UPower](https://github.com/thuck/supower) (Customizable energy/battery information using UPower dbus (battery, bluetooth, line-power etc))
* [Sway WM adaptive sync toggle](https://github.com/vkraven/swankybar) (using Sway IPC)
* [Pacman updates](https://github.com/coffebar/waybar-module-pacman-updates)
* [Notifications for Void Linux package updates](https://codeberg.org/dogknowsnx/dotfiles/wiki/Notifications-for-Void-Linux-package-updates-%28waybar-module%29)
* [RI - Rest your Eyes and Self](https://codeberg.org/dogknowsnx/dotfiles/wiki/RI+-+Rest+your+Eyes+and+Self+%28waybar+module%29.-)
* [waybar-mediaplayer](https://github.com/GabriWar/waybar-mediaplayer) (mediaplayer with progress bar, album art, tooltip, synced lyrics and notifications)
* raffaem's [waybar-stopwatch](https://github.com/raffaem/waybar-stopwatch)
* raffaem's [waybar-screenrecorder](https://github.com/raffaem/waybar-screenrecorder)
* ponas-niekas's [waybar-timer](https://github.com/ponas-niekas/waybar-timer)
* jbirnick's [waybar-timer](https://github.com/jbirnick/waybar-timer) (interactive)
* [Todoist](https://github.com/jbirnick/waybar-todoist)
* [waybar-hyprland-lidswitch](https://github.com/raffaem/waybar-hyprland-lidswitch)
* [waybar-swayidle](https://github.com/raffaem/waybar-swayidle)
* [waybar-crypto](https://github.com/chadsr/waybar-crypto) (cryptocurrency ticker)
* [waybar-wise-fx-rate](https://github.com/rlopzc/waybar-wise-fx-rate) (wise fx rate)
* [APT updates](https://github.com/J-Carder/waybar-apt-updates)
* [NixOS updates](https://github.com/guttermonk/waybar-nixos-updates)
* [DNF (Fedora) updates](https://github.com/furkun/waybar-dnf-updates/)
* [Active services](https://github.com/Heyian/waybar-active-services) (show if a service is running, like a backup)
* [Athan Api](https://gist.github.com/bonnjalal/726aac5cf8ebc78a551b1bec3a9121c9) (using [alathan api](http://api.aladhan.com))
* mt190502's [Pomodoro Timer](https://github.com/mt190502/pomobar) (aka Pomobar)
* [wlsunset toggle](https://github.com/CyrilSLi/linux-scripts) (uses ip-api.com for location)
* MaidLucy's [Pipewire filter chain plugin toggle](https://github.com/MaidLucy/waybar-custom-module-eq-switch) (using pw-cli)
* [erffy](https://github.com/erffy)'s [Waybar module collection](https://github.com/erffy/zig-waybar-contrib) (written in Zig)
* egnrse's [show mode of active window on hyprland](https://gist.github.com/egnrse/a3d9b1f301c0bbc6c1c433fb6dc6b7d2)
* limichian's [pomobar-rs](https://github.com/liminchian/pomobar-rs) (written in Rust)
* [waybar-crypto](https://github.com/shapeshed/waybar-crypto)
* [yubilock](https://github.com/guttermonk/yubilock) (lock your screen when your Yubikey is disconnected)
* [waybar-alsa](https://github.com/zen2/waybar-alsa/) full alsa control for waybar [bash]
* [waybar-privacy-dots](https://github.com/alibaghernejad/waybar-privacy-dots) (A privacy-first module for your status bar.)
* [gdanko](https://github.com/gdanko)'s [Waybar module collection](https://github.com/gdanko/waybar)
* [waybar-weather](https://github.com/wneessen/waybar-weather) - Open-Meteo module that automatically retrieves your geo location using geoclue (single binary written in Go)
* [waybar-upower](https://github.com/stefano-m/lua-waybar-upower) (Battery monitor without polling using UPower, DBus and Lua)
* [waybar-connman](https://github.com/stefano-m/lua-waybar-connman) (Network monitor without polling using Connman, DBus and Lua)
* [waybar-todo-lists](https://github.com/Harsh-bin/waybar-todo-lists) (Bash script, customizable todo list manager with tooltip, click action etc..)
* [waybar-countdown](https://github.com/Harsh-bin/waybar-countdown) (Bash script that provides countdowns (for days)`set your target dates`. scroll action to show different target date on bar.)
<img width="222" height="229" alt="todo-2" src="https://github.com/user-attachments/assets/af3e3533-cf40-4ad2-8ebe-a34f6c586ca2" />
<img width="437" height="229" alt="countdown-2" src="https://github.com/user-attachments/assets/6d149023-ac57-4735-b626-58796e73c2e2" />
* [waybar-claude-code](https://github.com/hxreborn/waybar-claude-code) (Claude Code usage stats: requests, tokens, cost, using `ccusage`. Written in Go)

View File

@@ -1,55 +0,0 @@
The `disk` module tracks the usage of filesystems and partitions.
### Config
Addressed by `disk`
| option | typeof | default | description |
| ---------------- | ------- | ------- | ----------- |
| `interval` | integer | 30 | The interval in which the information gets polled. |
| `format` | string | `{percentage_free}%` | The format, how information should be displayed. |
| `max-length` | integer | | The maximum length in character the module should display. |
| `states` | array | | A number of disk utilization states which get activated on certain percentage thresholds (percentage_used).<br>See [States](https://github.com/Alexays/Waybar/wiki/States) |
| `on-click` | string | | Command to execute when clicked on the module. |
| `on-click-middle` | string | | Command to execute when you middle clicked on the module using mousewheel. |
| `on-click-right` | string | | Command to execute when you right clicked on the module. |
| `on-scroll-up` | string | | Command to execute when scrolling up on the module. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module. |
| `path` | string | `/` | Mount point of the filesystem to monitor. |
| `smooth-scrolling-threshold` | double | | Threshold to be used when scrolling. |
| `tooltip` | bool | `true` | Option to enable tooltip on hover. |
| `tooltip-format` | string | `{used} used out of {total} on {path} ({percentage_used}%)` | Format of the text to display in the tooltip |
| `unit` | string | B | Used to specify unit for specific_total, specific_used, and specific_free. Accepts B, kB, kiB, MB, MiB, GB, GiB, TB, TiB. Defaults to Bytes. |
#### Format replacements:
| string | replacement |
| -------------- | ----------- |
| `{percentage_free}` | Percentage of available space. |
| `{percentage_used}` | Percentage of disk space already in use. |
| `{total}` | Amount of disk space. Will dynamically change display unit depending on amount of space. |
| `{used}` | Amount of used disk space. Will dynamically change display unit depending on amount of space.|
| `{free}` | Amount of free disk space. Will dynamically change display unit depending on amount of space.|
| `{specific_total}` | Amount of disk space always displayed in a specific unit. Defaults to bytes.|
| `{specific_used}` | Amount of used disk space always displayed in a specific unit. Defaults to bytes. |
| `{specific_free}` | Amount of free disk space always displayed in a specific unit. Defaults to bytes. |
#### Examples:
```jsonc
"disk": {
"interval": 30,
"format": "Only {percentage_free}% remaining on {path}",
"path": "/"
}
"disk": {
"interval": 30,
"format": "{specific_free:0.2f} GB out of {specific_total:0.2f} GB available. Alternatively {free} out of {total} available",
"unit": "GB"
// 0.25 GB out of 2000.00 GB available. Alternatively 241.3MiB out of 1.9TiB available.
}
```
### Style
- `#disk`

View File

@@ -1,85 +0,0 @@
- [Tags](#tags)
- [Window](#window)
IMPORTANT: Using these modules requires patching dwl with the [IPC](https://codeberg.org/dwl/dwl-patches/wiki/ipc) patch.
***
## Tags
The `tags` module displays the current tag state of [dwl](https://codeberg.org/dwl/dwl).
### Config
Addressed by `dwl/tags`
| option | typeof | default | description |
| ---------------- | ------- | ------- | ----------- |
| `num-tags` | integer | `9` | The number of tags that configured in dwl. (Must match!).
| `tag-labels` | array | | The label to display for each tag.
| `disable-click` | bool | `false` | If set to false, you can left click to set focused tag. Right click to toggle tag focus. If set to true this behavior is disabled.
### Style
- `#tags button`
- `#tags button.occupied`
- `#tags button.focused`
- `#tags button.urgent`
Note that occupied/focused/urgent status may overlap. That is, a tag may be both occupied and focused at the same time.
## Window
Addressed by *dwl/window*
| option | typeof | default | description |
| ---------------- | ------- | ------- | ----------- |
| `format` | string | `{title}` | The format, how information should be displayed. |
| `rotate` | integer | | Positive value to rotate the text label. |
| `max-length` | integer | | The maximum length in character the module should display. |
| `on-click` | string | | Command to execute when clicked on the module. |
| `on-click-right` | string | | Command to execute when you right clicked on the module. |
| `on-scroll-up` | string | | Command to execute when scrolling up on the module. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module. |
| `smooth-scrolling-threshold` | double | | Threshold to be used when scrolling. |
| `tooltip` | bool | `true` | Option to disable tooltip on hover. |
| `rewrite` | object | `{}` | Rules to rewrite the module format output. See **rewrite rules**. |
| `icon` | bool | `false` | Option to disable application icon. |
| `icon-size` | integer | `24` | Set the size of application icon. |
#### Format Replacements:
| string | replacement |
| ---------- | --------------------------------- |
| `{title}` | The title of the focused window. |
| `{app_id}` | The app_id of the focused window. |
| `{layout}` | The layout of the focused window. ||
`title`: The title of the focused window.
`app_id`: The app_id of the focused window.
`layout`: The layout of the focused window.
#### Rewrite Rules:
`rewrite` is an object where keys are regular expressions and values are rewrite rules if the expression matches. Rules may contain references to captures of the expression.
Regular expression and replacement follow [ECMAScript rules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Cheatsheet) ([formal definition](https://tc39.es/ecma262/#sec-regexp-regular-expression-objects)).
An expression must match fully to trigger the replacement; if no expression matches, the format output is left unchanged.
Invalid expressions (e.g., mismatched parentheses) are ignored.
#### Example 1:
```jsonc
"dwl/window": {
"format": "{title}",
"max-length": 50,
"rewrite": {
"(.*) - Mozilla Firefox": "🌎 $1",
"(.*) - vim": " $1",
"(.*) - zsh": " [$1]"
}
}
```

View File

@@ -1,53 +0,0 @@
### Config
Module for [FeralInteractive/gamemode](https://github.com/FeralInteractive/gamemode).
Addressed by `gamemode`
| option | typeof | default | description |
| ------------------ | ------- | ------------------------ | ----------- |
| `format` | string | `{glyph}` | The text format. |
| `format-alt` | string | `{glyph} {count}` | The text format when toggled. |
| `tooltip` | bool | `true` | Option to disable tooltip on hover. |
| `tooltip-format` | string | `Games running: {count}` | The text format of the tooltip. |
| `hide-not-running` | bool | `true` | Defines the spacing between the tooltip window edge and the tooltip content. |
| `use-icon` | bool | `true` | Defines if the module should display a GTK icon instead of the specified glyph. |
| `glyph` | string | `` | The string icon to display. Only visible if use-icon is set to false. |
| `icon-name` | string | `input-gaming-symbolic` | The GTK icon to display. Only visible if use-icon is set to true. |
| `icon-size` | integer | `20` | Defines the size of the icons. |
| `icon-spacing` | integer | `4` | Defines the spacing between the icon and the text. |
#### Format replacements:
| string | replacement |
| --------- | ----------- |
| `{glyph}` | The string icon glyph to use instead. |
| `{count}` | The amount of games running with gamemode optimizations. |
#### Tooltip format replacements:
| string | replacement |
| --------- | ----------- |
| `{count}` | The amount of games running with gamemode optimizations. |
#### Example:
```jsonc
"gamemode": {
"format": "{glyph}",
"format-alt": "{glyph} {count}",
"glyph": "",
"hide-not-running": true,
"use-icon": true,
"icon-name": "input-gaming-symbolic",
"icon-spacing": 4,
"icon-size": 20,
"tooltip": true,
"tooltip-format": "Games running: {count}"
}
```
### Style
- `#gamemode`
- `#gamemode.running`

View File

@@ -1,99 +0,0 @@
Module groups allow stacking modules in the direction orthogonal to the bar direction. When the bar is positioned on the top or bottom of the screen, modules in a group are stacked vertically. Likewise, when positioned on the left or right, modules in a group are stacked horizontally.
### Config
Adressed by `group/<name>`
| option | typeof | default | description |
| ---------------- | ------- | ------- | ----------- |
| `orientation` | string |`"orthogonal"`| Sets the orientation of the group. Valid options are: `"horizontal"`, `"vertical"`, `"inherit"`, and `"orthogonal"`. |
|`modules`|array||List of modules to include in the group.|
|`drawer`|object||If left empty, the drawer is disabled. Otherwise, it's enabled and some additional configuration is made available. See [drawer](#drawer) for more info.
<a name="drawer"></a>
### Drawer
The drawer configuration makes the group show only the first module by default, hiding the rest until the mouse hovers over the group. Check the GIF to see an example of its interactivity.
<img src="https://github.com/Alexays/Waybar/assets/25804378/66139544-b075-4b49-85fb-ebba6dcf0556" height="200">
<details>
<summary>Config used in GIF</summary>
```jsonc
"group/group-power": {
"orientation": "inherit",
"drawer": {
"transition-duration": 500,
"children-class": "not-power",
"transition-left-to-right": false,
},
"modules": [
"custom/power", // First element is the "group leader" and won't ever be hidden
"custom/quit",
"custom/lock",
"custom/reboot",
]
},
"custom/quit": {
"format": "󰗼",
"tooltip": false,
"on-click": "hyprctl dispatch exit"
},
"custom/lock": {
"format": "󰍁",
"tooltip": false,
"on-click": "swaylock"
},
"custom/reboot": {
"format": "󰜉",
"tooltip": false,
"on-click": "reboot"
},
"custom/power": {
"format": "",
"tooltip": false,
"on-click": "shutdown now"
}
```
</details>
When the drawer is enabled, the first module of the group is chosen as the "group leader", while the rest of the elements are the "drawer children". The "group leader" is always shown and will reveal the "drawer children" when hovered over.
#### Drawer Config
| option | typeof | default | description |
| --- | --- | --- | --- |
| `transition-duration` | int | 500 | The duration of the transition, in milliseconds. |
| `transition-left-to-right` | bool | `true` | Whether the transition goes from left-to-right or right-to-left. If the group is vertical, then this configuration is read as "top-to-bottom". |
| `children-class` | string | `"drawer-child"` | The CSS class to add to the children of the drawer, excluding the "group leader". Its purpose is simply to help with styling. |
|`click-to-reveal`|bool|false|Allows to reveal the hidden modules by clicking rather than mouse over.|
### Styling
To style a group use group's ID.
### Example
```
{
"modules-right": ["group/hardware", "clock"],
"group/hardware": {
"orientation": "vertical",
"modules": [
"cpu",
"memory",
"battery"
]
},
...
}
```
```
#hardware {
background-color: #333333;
}
```

View File

@@ -1,575 +0,0 @@
- [Workspaces](#workspaces)
- [Window](#window)
- [Window Count](#window-count)
- [Language](#language)
- [Submap](#submap)
***
## Workspaces
The `workspaces` module displays the currently used workspaces in hyprland compositor.
### Configuration
Addressed by `hyprland/workspaces`
| option | typeof | default | description |
| ------------------ | ------- | ------- | ----------- |
| `active-only` | bool | `false` | If set to true only active workspace will be shown on bar. Unless a workspace is persistent, visible, or special. Otherwise all workspace groups are shown.|
| `hide-active` | bool | `false` | If set to true, the active workspace will be hidden. Unless a workspace is persistent or special |
| `all-outputs` | bool | `false` | If set to false workspaces group will be shown only in assigned output. Otherwise all workspace groups are shown.|
| `format` | string | `{id}` | The format, how information should be displayed.|
| `format-icons` | object | | Based on the workspace name and state, the corresponding icon gets selected.<br>See [`Icons`](#module-hyprland-configuration-icons)|
| `persistent-workspaces` | object | | Lists workspaces that should always be shown, even when nonexistent.<br>See[`Persistent workspaces`](#persistent-workspaces) |
| `workspace-taskbar` | object | | Show per-workspace taskbars with app icons (similar to `wlr/taskbar`) instead of text representations.<br>See[`Workspace taskbars`](#workspace-taskbars) |
| `persistent-only` | bool | `false` | If set to true only persistent workspaces will be shown on bar |
| `show-special` | bool | `false` | If set to true, will display special workspaces alongside regular workspaces|
| `special-visible-only` | bool | `false` | If this and show-special are to true, special workspaces will be shown only if visible.|
| `sort-by` | string | `DEFAULT` | How to sort workspaces |
| `window-rewrite` | object (see [example](#module-hyprland-window-rewrite-example)) | empty | An object of regexes to match against window classes (and/or titles, [see below](#module-hyprland-window-rewrite) and map to a new representation. Mapping `firefox`` `, for example.
| `window-rewrite-default` | string | `?` | The default representation to be used when a window does not match any rules configured in `window-rewrite`.
| `format-window-separator` | string | `<space>` | The string used to separate window representations from eachother.
| `move-to-monitor` | bool | `false` | If set to true, open the workspace on the current monitor when clicking on a workspace button. Otherwise, the workspace will open on the monitor where it was previously assigned. Analog to using `focusworkspaceoncurrentmonitor` dispatcher instead of `workspace` in Hyprland.
| `ignore-workspaces` | array | empty | An array of regexes to match against workspace names. If there's a match, the workspace will be ignored and won't be shown in your bar.
| `on-scroll-up` | string | | Command to execute when scrolling up on the module. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module. |
#### Format replacements:
| string | replacement |
|--------|-------------|
| `{icon}` | Icon, as defined in *format-icons*. |
| `{name}` | Name of workspace assigned by compositor. |
| `{windows}` | All windows representations (ex. window icons) as configured by the user, separated by whichever separator the user configured. |
<a name="module-hyprland-window-rewrite"></a>
#### Window Rewrite Rules
The rules are regexes that may match against class, title, or both in order to fine tune window representation. In order to understand them, let's break the possible rules in 4 categories:
| How it appears in config | Category |
| --- | --- |
| `something` | Vague |
| `class<something>` | Class-only |
| `title<something>` | Title-only |
| `class<something1> title<something2>` | Hybrid |
When a user's config only contains "vague" rules, they will be used to match against windows **classes**. This is both for backwards compatibility and performance reasons: this feature originally supported only classes, since they *usually* don't change during a program's lifetime. When the title config was introduced, matching previously existing rules to both classes and titles wound cause a whole lot of "wrong" matches, so it's disabled by default. Additionally, matching against the title requires listening to window title changes via Hyprland's IPC, which is not necessary when not in use.
When the config contains **at least one** "title-only" or "hybrid" rewrite rule, then all of the "vague" rules will match against **both class and title**. Though confusing at first, this is in place to allow users to define vague rules, where it doesn't matter whether the class or title matched.
Examples that use all 4 categories are available [below](#module-hyprland-window-rewrite-example).
<a name="module-hyprland-configuration-icons"></a>
#### Icons:
Additional to workspace name matching, the following `format-icons` can be set.
| port name | note |
| ------------ | ---- |
| `active` | Will be shown when workspace is active |
| `default` | Will be shown when no string matches is found. |
| `empty` | Will be shown on active empty workspaces |
| `persistent` | Will be shown on non-active persistent workspaces |
| `special` | Will be shown on non-active special workspaces |
| `urgent` | Will be shown on non-active urgent workspaces |
#### Sort:
How to sort workspaces.
| name | note |
| ------------ | ---- |
| `default` | Default hyprland/workspaces sorting algorithm with custom prioritization |
| `id` | Sort workspaces by id |
| `name` | Sort workspaces by name |
| `number` | Sort workspaces by number |
| `special-centered` | Default sorting with special workspaces in the center |
<a name="module-hyprland-window-rewrite-example"></a>
#### Window Rewrite Example
```jsonc
"hyprland/workspaces": {
"format": "<sub>{icon}</sub>\n{windows}",
"format-window-separator": "\n",
"window-rewrite-default": "",
"window-rewrite": {
"title<.*youtube.*>": "", // Windows whose titles contain "youtube"
"class<firefox>": "", // Windows whose classes are "firefox"
"class<firefox> title<.*github.*>": "", // Windows whose class is "firefox" and title contains "github". Note that "class" always comes first.
"foot": "", // Windows that contain "foot" in either class or title. For optimization reasons, it will only match against a title if at least one other window explicitly matches against a title.
"code": "󰨞",
},
...
}
```
<details>
<summary>Screenshot</summary>
![](https://user-images.githubusercontent.com/25804378/270065881-acef7b73-e528-4648-82c1-ba70ea9f7804.png)
</details>
#### Persistent workspaces:
Each entry of `persistent-workspace` names a workspace that should always be shown. Associated with that value is a list of outputs indicating *where* the workspace should be shown, an empty list denoting all outputs
> [!WARNING]
> You have to explicitly set `workspace = <num>, monitor:<monitor>, persistent:true` in your Hyprland config in order to actually work<br>
> Here's an example of how it should set
> ```py
> # ... parts of config
> workspace = 1, monitor:eDP-1, persistent:true
> workspace = 2, monitor:eDP-1, persistent:true
> workspace = 3, monitor:eDP-1, persistent:true
> workspace = 4, monitor:eDP-1, persistent:true
> # ... another parts of config
> ```
```jsonc
"hyprland/workspaces": {
"persistent-workspaces": {
"*": 5, // 5 workspaces by default on every monitor
"HDMI-A-1": 3 // but only three on HDMI-A-1
}
}
```
```jsonc
"hyprland/workspaces": {
"persistent-workspaces": {
"1": [
"DP-3" // workspace 1 shown on DP-3
],
"2": [
"DP-1" // workspace 2 shown on DP-1
],
"3": [
"DP-1" // workspace 3 shown on DP-1
],
}
}
```
```jsonc
"hyprland/workspaces": {
"persistent-workspaces": {
"DP-3": [ 1 ], // workspace 1 shown on DP-3
"DP-1": [ 2, 3 ], // workspaces 2 and 3 shown on DP-1
}
}
```
#### Persistent workspaces example
```jsonc
"hyprland/workspaces": {
"format": "{name}: {icon}",
"format-icons": {
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
"active": "",
"default": ""
},
"persistent-workspaces": {
"*": 5, // 5 workspaces by default on every monitor
"HDMI-A-1": 3 // but only three on HDMI-A-1
}
}
```
#### Workspace taskbars:
Starting with Waybar 0.14, you can make `hyprland/workspaces` behave like `wlr/taskbar` where the window icons are grouped by workspace.
```jsonc
"hyprland/workspaces": {
"workspace-taskbar": {
// Enable the workspace taskbar. Default: false
"enable": true,
// If true, the active/focused window will have an 'active' class. Could cause higher CPU usage due to more frequent redraws. Default: false
"update-active-window": true,
// Format of the windows in the taskbar. Default: "{icon}". Allowed variables: {icon}, {title}
"format": "{icon} {title:.20}",
// Icon size in pixels. Default: 16
"icon-size": 16,
// Either the name of an installed icon theme or an array of themes (ordered by priority). If not set, the default icon theme is used.
"icon-theme": "some_icon_theme",
// Orientation of the taskbar ("horizontal" or "vertical"). Default: "horizontal".
"orientation": "horizontal",
// List of regexes. A window will NOT be shown if its window class or title match one or more items. Default: []
"ignore-list": [ "code", "Firefox - .*" ],
// Command to run when a window is clicked. Default: "" (switch to the workspace as usual). Allowed variables: {address}, {button}
"on-click-window": "/some/arbitrary/script {address} {button}"
}
}
```
If `workspace-taskbar.enable` is set to `false` (or undefined), the other fields in the `workspace-taskbar` object are ignored. If it is set to `true`, the following fields are ignored: `window-rewrite`, `window-rewrite-default`.
You can use the `on-click-window` config to set the command that will be executed when a specific window is clicked. For example: `hyprctl dispatch focuswindow address:{address}`.
- The pattern `{address}` will be replaced with the Hyprland address of the clicked window.
- The pattern `{button}` will be replaced with the pressed button number. See [GdkEventButton.button](https://api.gtkd.org/gdk.c.types.GdkEventButton.button.html).
#### Workspace Taskbars example:
![Workspace taskbars example](https://github.com/user-attachments/assets/c5387d8b-6612-442a-83af-2a0d881fa6db)
```jsonc
"hyprland/workspaces": {
"format": "{icon}: {windows}",
"format-window-separator": "",
"workspace-taskbar": {
"enable": true,
"update-active-window": true,
"format": "{icon} {title:.22}",
"icon-size": 18,
"on-click-window": "${SCRIPTS}/focus-window.sh {address} {button}"
}
},
```
<details>
<summary>See CSS</summary>
```css
#workspaces button {
font-family: "Cantarell";
font-weight: bold;
background-color: transparent;
color: #ffffff;
box-shadow: none;
text-shadow: none;
padding: 0px;
border-radius: 0;
padding-left: 5px;
padding-right: 2px;
}
#workspaces .workspace-label {
padding-left: 3px;
border-top: 1px solid transparent;
}
#workspaces .taskbar-window {
border-top: 1px solid transparent;
font-weight: normal;
padding-left: 5px;
padding-right: 5px;
}
#workspaces button.visible .taskbar-window,
#workspaces button.visible .workspace-label {
border-color: white;
}
#workspaces .taskbar-window.active {
background-color: rgba(255, 255, 255, 0.15);
}
#workspaces .taskbar-window image {
margin-top: 1px;
}
#workspaces button.urgent {
background-color: @urgent-color;
}
```
</details>
<details>
<summary>See focus-window.sh</summary>
```sh
#!/bin/sh
address=$1
# https://api.gtkd.org/gdk.c.types.GdkEventButton.button.html
button=$2
if [ $button -eq 1 ]; then
# Left click: focus window
hyprctl keyword cursor:no_warps true
hyprctl dispatch focuswindow address:$address
hyprctl keyword cursor:no_warps false
elif [ $button -eq 2 ]; then
# Middle click: close window
hyprctl dispatch closewindow address:$address
fi
```
</details>
### Style
- *#workspaces*
- *#workspaces button*
- *#workspaces button.active*
- *#workspaces button.empty*
- *#workspaces button.persistent*
- *#workspaces button.special*
- *#workspaces button.visible*
- *#workspaces button.urgent*
- *#workspaces button.hosting-monitor*
- Gets applied if workspace-monitor == waybar-monitor
- *#workspaces .workspace-label*
- *#workspaces .taskbar-window*
- Only if `workspace-taskbar.enable` is `true`
- *#workspaces .taskbar-window.active*
- Gets applied if the window is focused
- Only if `workspace-taskbar.enable` and `workspace-taskbar.update-active-window` are `true`
#### The way the CSS is evaluated you need to order it in order of importance with last taking precedent.
#### Example:
This order makes it so that my priority of styling is special cases override the norm. If you wanted to include persistent in here, I'd throw it in before empty, personally.
![image](https://github.com/Alexays/Waybar/assets/1778670/6421e9ce-50be-4086-8045-688338d5fbe7)
Active Monitor:
Green icon for active workspace.
![image](https://github.com/Alexays/Waybar/assets/1778670/48c58198-aae4-42ac-802a-33b1e3db5e33)
Inactive Monitor:
Blue icon for visible but not active.
***
## Window
The `window` module displays the title of the currently focused window of [Hyprland](https://github.com/hyprwm/Hyprland), the Wayland compositor.
### Configuration
Addressed by `hyprland/window`
| option | typeof | default | description |
| ------------------ | ------- | ------- | ----------- |
| `format` | string | `{title}` | The format, how information should be displayed. On `{}` the current window title is displayed.|
| `max-length` | integer | | The maximum length in character the module should display. |
| `rewrite` | object | `{}` | Rules to rewrite the module format output. The rules are identical to [those for `sway/window`](https://github.com/Alexays/Waybar/wiki/Module:-Sway#rewrite-rules). |
| `separate-outputs` | bool | `false` | Show the active window of the monitor the bar belongs to, instead of the focused window. |
| `icon` | bool | `false` | Option to disable application icon.|
| `icon-size` | integer | `24` | Set the size of application icon.|
#### Format Replacements:
See the output of "hyprctl clients" for examples
| string | replacement |
| ---------------- | ---------------------------------------- |
| `{class}` | The current class of the focused window. |
| `{initialClass}` | The initial class of the focused window. |
| `{initialTitle}` | The initial title of the focused window. |
| `{title}` | The current title of the focused window. |
#### Example:
```json
"hyprland/window": {
"format": "👉 {}",
"rewrite": {
"(.*) — Mozilla Firefox": "🌎 $1",
"(.*) - fish": "> [$1]"
},
"separate-outputs": true
}
```
### Style
- `#window`
The following classes can apply styles to *the entire Waybar* (see [the Sway module's page](https://github.com/Alexays/Waybar/wiki/Module:-Sway#style-1) for more info):
- `window#waybar.empty` When no windows are in the workspace
- `window#waybar.solo` When one tiled window is visible in the workspace (floating windows may be present)
- `window#waybar.<app_id>` Where `<app_id>` is the class (e.g. `chromium`) of the solo tiled window in the workspace (use *hyprctl clients* to see classes)
- `window#waybar.floating` When there are only floating windows visible in the workspace
- `window#waybar.fullscreen` When there is a fullscreen window in the workspace; useful with Hyprland's `fullscreen, 1` mode
- `window#waybar.swallowing` When there are hidden windows in the workspace; usually occurs due to window swallowing
#### Example:
This will change the color of the entire bar when either Chromium or kitty occupy the screen.
```css
#window {
border-radius: 20px;
padding-left: 10px;
padding-right: 10px;
}
window#waybar.kitty {
background-color: #111111;
color: #ffffff;
}
window#waybar.chromium {
background-color: #eeeeee;
color: #000000;
}
/* make window module transparent when no windows present */
window#waybar.empty #window {
background-color: transparent;
}
```
***
## Window Count
The `windowcount` module displays the number of windows in the current [Hyprland](https://github.com/hyprwm/Hyprland) workspace.
### Configuration
Addressed by `hyprland/windowcount`.
| option | typeof | default | description |
| ------------------- | ------ | ------- | ----------------------------------------------------------------------------------------------------------- |
| `format` | string | `{}` | The format for how information should be displayed. On {}, the current workspace window count is displayed. |
| `format-empty` | string | | Override the format when the workspace contains no windows. |
| `format-windowed` | string | | Override the format when the workspace contains no fullscreen windows. |
| `format-fullscreen` | string | | Override the format when the workspace contains a fullscreen window. |
| `separate-outputs` | bool | `true` | Show the active workspace window count of the monitor the bar belongs to, instead of the focused workspace. |
#### Example:
```jsonc
"hyprland/windowcount": {
"format": "[{}]",
"format-empty": "[X]",
"format-windowed": "[T]",
// "format-fullscreen": "[{}]",
"separate-outputs": true
}
```
### Style
- `#windowcount`
- `window#waybar.empty #windowcount` When no windows are in the workspace
- `window#waybar.fullscreen #windowcount` When there is a fullscreen window in the workspace; useful with Hyprland's fullscreen, 1 mode
#### Example:
```css
/* Adding margin and padding */
#windowcount {
margin-left: 0px;
padding: 0px 5px;
}
/* Different background when empty */
window#waybar.empty #windowcount {
background: darkred;
}
/* Hide the windowcount module when not in windowed mode (i.e. not fullscreen) */
window#waybar:not(.fullscreen) #windowcount {
opacity: 0;
}
```
***
## Language
The `language` module displays the currently selected keyboard language (layout) for [Hyprland](https://github.com/hyprwm/Hyprland), the Wayland compositor.
### Configuration
Addressed by `hyprland/language`
| option | typeof | default | description |
| ---------------- | ------- | ------- | ----------- |
| `format` | string | `{}` | The format, how information should be displayed. On `{}` the current layout's full name is displayed.|
| `format-<lang>` | string | | Provide an alternative name to display per language where <lang> is the language of your choosing. Can be passed multiple times with multiple languages as shown by the example below.|
| `keyboard-name` | string | | Which keyboard to use, from the output of `hyprctl devices`. You should use the option that begins with "at-translated-set..."|
#### Example:
```json
"hyprland/language": {
"format": "Lang: {}",
"format-en": "AMERICA, HELL YEAH!",
"format-en-colemak_dh": "AMERICA (Colemak-DH), HELL YEAH",
"format-tr": "As bayrakları",
"keyboard-name": "at-translated-set-2-keyboard"
}
```
### Style
- *#language*
#### Example:
```css
#language {
border-radius: 20px;
padding-left: 10px;
padding-right: 10px;
}
```
***
## Submap
The `submap` module displays the currently active submap similar to *sway/mode* for [Hyprland](https://github.com/hyprwm/Hyprland), the Wayland compositor.
### Configuration
Addressed by `hyprland/submap`
| option | typeof | default | description |
| ---------------- | ------- | ------- | ----------- |
| `format` | string | `{}` | The format, how information should be displayed. On {} the currently active submap is displayed. |
| `max-length` | integer | | The maximum length in character the module should display. |
| `on-click` | string | | Command to execute when clicked on the module. |
| `on-click-middle` | string | | Command to execute when you middle clicked on the module using mousewheel. |
| `on-click-right` | string | | Command to execute when you right clicked on the module. |
| `on-scroll-up` | string | | Command to execute when scrolling up on the module. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module. |
| `rotate` | integer | | Positive value to rotate the text label. |
| `smooth-scrolling-threshold` | double | | Threshold to be used when scrolling. |
| `tooltip` | bool | `true` | Option to enable tooltip on hover. |
| `always-on` | bool | `false` | Option to display the widget even when there's no active submap. |
| `default-submap` | string | `Default` | Option to display the widget even when there's no active submap. |
#### Example:
```json
"hyprland/submap": {
"format": "✌️ {}",
"max-length": 8,
"tooltip": false
}
```
### Style
- *#submap*
- *#submap.\<name\>*

View File

@@ -1,47 +0,0 @@
The `idle_inhibitor` module can inhibit idle behavior such as screen blanking, locking, and screensaving, also known as "presentation mode".
### Config
Addressed by `idle_inhibitor`
| option | typeof | default | description |
| ---------------- | ------- | ------------- | ----------- |
| `format` | string | `{status}` | The format, how the state should be displayed. |
| `format-icons` | array | | Based on the current state, the corresponding icon gets selected. |
| `rotate` | integer | | Positive value to rotate the text label. |
| `max-length` | integer | | The maximum length in character the module should display. |
| `on-click` | string | | Command to execute when clicked on the module. A click also toggles the state |
| `on-click-middle` | string | | Command to execute when you middle clicked on the module using mousewheel. |
| `on-click-right` | string | | Command to execute when you right clicked on the module. |
| `on-scroll-up` | string | | Command to execute when scrolling up on the module. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module. |
| `smooth-scrolling-threshold` | double | | Threshold to be used when scrolling. |
| `tooltip` | bool | `true` | Option to enable tooltip on hover. |
| `tooltip-format-activated` | string | `{status}` | This format is used when the inhibit is activated. |
| `tooltip-format-deactivated` | string | `{status}` | This format is used when the inhibit is deactivated. |
| `start-activated` | bool | `false` | Whether the inhibit should be activated when starting waybar. |
| `timeout` | double | `0` | Time in minutes to automatically deactivate. |
#### Format replacements:
| string | replacement |
| ------------ | ----------- |
| `{status}` | status (`activated` or `deactivated`) |
| `{icon}` | Icon, as defined in `format-icons`. |
#### Example:
```jsonc
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
}
```
### Style
- `#idle_inhibitor`
- `#idle_inhibitor.<status>`
- `<status>` is one of the `{status}` format replacement. For more information see [Format replacements](#format-replacements)

View File

@@ -1,67 +0,0 @@
The `image` module displays an image from a path.
### Config
Addressed by `image`
| option | typeof | default | description |
| ---------------- | ------- | ------- | ----------- |
| `path` | string | | The absolute path to the image |
| `exec` | string | | The path to the script, which should return image path file. It will only execute if the path is not set |
| `size` | integer | | The width/height to render the image |
| `interval` | integer | | The interval (in seconds) in which the information gets polled |
| `signal` | integer | | The signal number used to update the module. The number is valid between 1 and N, where `SIGRTMIN+N` = `SIGRTMAX`. |
| `on-click` | string | | Command to execute when clicked on the module. |
| `on-click-middle` | string | | Command to execute when you middle clicked on the module using mousewheel. |
| `on-click-right` | string | | Command to execute when you right clicked on the module. |
| `on-update` | string | | Command to execute when the module is updated. |
| `on-scroll-up` | string | | Command to execute when scrolling up on the module. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module. |
| `smooth-scrolling-threshold` | double | | Threshold to be used when scrolling. |
| `tooltip` | bool | `true` | Option to enable tooltip on hover. |
#### Script Output
Similar to the **custom** module, output values of the script is **newline** separated.
The following is the output format:
```
$path\n$tooltip
```
#### Examples:
```
"image#album-art": {
"path": "/tmp/mpd_art",
"size": 32,
"interval": 5,
"on-click": "mpc toggle"
}
```
#### Example with exec
```
"image/album-art": {
"exec":"~/.config/waybar/custom/spotify/album_art.sh",
"size": 32,
"interval": 30,
}
```
#### Script album_art.sh
```
#!/bin/bash
album_art=$(playerctl -p spotify metadata mpris:artUrl)
if [[ -z $album_art ]]
then
# spotify is dead, we should die too.
exit
fi
curl -s "${album_art}" --output "/tmp/cover.jpeg"
echo "/tmp/cover.jpeg"
```
### Style
- `#image`
- `#image.empty`

View File

@@ -1,54 +0,0 @@
The `jack` module displays the current state of the [JACK](https://jackaudio.org/) server. Supports both [JACK2](https://github.com/jackaudio/jack2) and [PipeWire](https://pipewire.org/) implementations of the JACK API.
NOTE: PipeWire users are advised to upgrade to v0.3.57 at minimum; earlier versions without [this bugfix](https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/d7da581b9c9f1783a599cd95edd0bd5a5a5b4f05) cause the Waybar client to hang indefinitely if the server shuts down while the Waybar module is running.
### Config
Addressed by `jack`
| option | typeof | default | description |
| ---------------- | ------- | -------------| ----------- |
| `format` | string | `{load}%` | The format, how information should be displayed. This format is used when other formats aren't specified. |
| `format-connected` | string | | This format is used when the module is connected to the JACK server. |
| `format-disconnected` | string | | This format is used when the module is not connected to the JACK server. |
| `format-xrun` | string | | This format is used for one polling interval, when the JACK server reports an xrun. |
| `realtime` | bool | `true` | Option to drop real-time privileges for the JACK client opened by Waybar. |
| `tooltip` | bool | `true` | Option to disable tooltip on hover. |
| `tooltip-format` | string | `{bufsize}/{samplerate} {latency}ms` | The format of information displayed in the tooltip. |
| `interval` | integer | `1` | The interval in which the information gets polled. |
| `rotate` | integer | | Positive value to rotate the text label. |
| `max-length` | integer | | The maximum length in character the module should display. |
| `min-length` | integer | | The minimum length in characters the module should take up. |
| `align` | float | | The alignment of the text, where 0 is left-aligned and 1 is right-aligned. If the module is rotated, it will follow the flow of the text. |
| `on-click` | string | | Command to execute when clicked on the module. |
| `on-click-middle` | string | | Command to execute when middle-clicked on the module using mousewheel. |
| `on-click-right` | string | | Command to execute when you right clicked on the module. |
| `on-update` | string | | Command to execute when the module is updated. |
#### Format replacements:
| string | replacement |
| ---------------| ----------- |
| `{load}` | The current CPU load estimated by JACK. |
| `{bufsize}` | The size of the JACK buffer. |
| `{samplerate}` | The samplerate at which the JACK server is running. |
| `{latency}` | The duration, in ms, of the current buffer size. |
| `{xruns}` | The number of xruns reported by the JACK server since starting Waybar. |
#### Examples:
```jsonc
"jack": {
"format": "DSP {}%",
"format-xrun": "{xruns} xruns",
"format-disconnected": "DSP off",
"realtime": true
}
```
### Style
- `#jack`
- `#jack.connected`
- `#jack.disconnected`
- `#jack.xrun`

View File

@@ -1,63 +0,0 @@
The `keyboard-state` module displays the state of number lock, caps lock, and scroll lock.
You must be a member of the input group to use this module (run `usermod -a -G input [username]` as root, then reboot).
### Config
Addressed by `keyboard-state`
| option | typeof | default | description |
|----------------|---------------|--------------------------------------------------|-------------|
| `interval` | integer | `1` | Deprecated, this module uses event loop now, the interval has no effect. <br> The interval, in seconds, to poll the keyboard state. |
| `format` | string/object | `"{name} {icon}"` | The format, how information should be displayed. If a string, the same format is used for all keyboard states. If an object, the fields "numlock", "capslock", and "scrolllock" each specify the format for the corresponding state. Any unspecified states use the default format. |
| `format-icons` | object | `{"locked": "locked", "unlocked": "unlocked"}` | Based on the keyboard state, the corresponding icon gets selected. The same set of icons is used for number, caps, and scroll lock, but the icon is selected from the set independently for each. See `icons`. |
| `numlock` | bool | `false` | Display the number lock state. |
| `capslock` | bool | `false` | Display the caps lock state. |
| `scrolllock` | bool | `false` | Display the scroll lock state. |
| `device-path` | string | chooses first valid input device | Which libevdev input device to show the state of. Libevdev devices can be found in /dev/input. The device should support number lock, caps lock, and scroll lock events. |
| `binding-keys` | array | [58, 69, 70] | Customize the key to trigger this module, the key number can be find in `/usr/include/linux/input-event-codes.h` or running `sudo libinput debug-events --show-keycodes`. |
### Format replacements
| string | replacement |
|----------|-------------------------------------|
| `{name}` | Caps, Num, or Scroll. |
| `{icon}` | Icon, as defined in `format-icons`. |
### Name replacements example
```
"keyboard-state": {
"numlock": true,
"capslock": true,
"format": {
"numlock": "N {icon}",
"capslock": "C {icon}"
},
"format-icons": {
"locked": "",
"unlocked": ""
}
}
```
### Icons
The following format-icons can be set.
| string | note |
|----------|--------------------------------------------------------------------------|
| locked | Will be shown when the keyboard state is locked. Default "locked". |
| unlocked | Will be shown when the keyboard state is not locked. Default "unlocked". |
### Example
```
"keyboard-state": {
"numlock": true,
"capslock": true,
"format": "{name} {icon}",
"format-icons": {
"locked": "",
"unlocked": ""
}
}
```
### Style
- `#keyboard-state`
- `#keyboard-state label`
- `#keyboard-state label.locked`

View File

@@ -1,39 +0,0 @@
The `sway/language` module displays the current keyboard layout in Sway.
# Config
| option | typeof | default | description |
|--------|:------:|:-------:|-------------|
| `format` | string | `{}` | The format, how layout should be displayed. |
| `on-click` | string | | Command to execute when clicked on the module. |
| `on-click-middle` | string | | Command to execute when you middle clicked on the module using mousewheel. |
| `on-click-right` | string | | Command to execute when you right clicked on the module. |
| `tooltip-format` | string | `{}` | The format, how layout should be displayed in tooltip. |
| `tooltip` | bool | `true` | Option to disable tooltip on hover. |
## Format replacements:
| string | replacement |
|--------|-------------|
| `{}` | The same as `{short}`. |
| `{short}` | Short name of layout (e.g. "us"). |
| `{shortDescription}` | Short description of layout (e.g. "en"). |
| `{long}` | Long name of layout (e.g. "English (Dvorak)"). |
| `{variant}` | Variant of layout (e.g. "dvorak"). |
| `{flag}` | Flag of the country. |
## Example:
```jsonc
"sway/language": {
"format": "{}",
"on-click": "swaymsg input type:keyboard xkb_switch_layout next",
},
"sway/language": {
"format": "{short} {variant}",
}
```
# Style
- `#language`
- `#language.<short>`

View File

@@ -1,48 +0,0 @@
The `load` module displays the current CPU load.
### Config
Addressed by `load`
| option | typeof | default | description |
| ---------------- | ------- | ------- | ----------- |
| `interval` | integer | 10 | The interval in which the information gets polled. |
| `format` | string | `{}` | The format, how information should be displayed. |
| `max-length` | integer | | The maximum length in character the module should display. |
| `rotate` | integer | | Positive value to rotate the text label. |
| `on-click` | string | | Command to execute when clicked on the module. |
| `on-click-middle` | string | | Command to execute when you middle clicked on the module using mousewheel. |
| `on-click-right` | string | | Command to execute when you right clicked on the module. |
| `on-scroll-up` | string | | Command to execute when scrolling up on the module. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module. |
| `smooth-scrolling-threshold` | double | | Threshold to be used when scrolling. |
| `tooltip` | bool | `true` | Option to enable tooltip on hover. |
#### Format replacements:
| string | replacement |
| ------------------ | ----------- |
| `{}` | Equivalent to `load1` |
| `{load1}` | Current CPU load average over the last minute |
| `{load5}` | Current CPU load average over the last 5 minutes |
| `{load15}` | Current CPU load average over the last 15 minutes |
#### Examples:
```jsonc
"load": {
"interval": 10,
"format": "load: {load1}",
"max-length": 10
}
```
```jsonc
"load": {
"interval": 1,
"format": "load: {load1} {load5} {load15}"
}
```
### Style
- `#load`

View File

@@ -1,113 +0,0 @@
The `mpd` module displays information about a running "Music Player Daemon" instance. Note that waybar must be compiled with mpd support in order to use this module.
### Config
Addressed by `mpd`
| option | typeof | default | description |
| ----------------------------- | ------- | ------------------------------ | ----------- |
| `server` | string | | The network address or Unix socket path of the MPD server. If empty, connect to the default host (`MPD_HOST`). |
| `port` | integer | | The port MPD listens to. If empty, use the default port (`MPD_PORT`). |
| `password` | string | | The password required to connect to the MPD server. If empty, no password is required or sent to MPD. |
| `interval` | integer | 10 | The interval in which the connection to the MPD server is retried. |
| `timeout` | integer | 30 | The timeout for the connection. Change this if your MPD server has a low `connection_timeout` setting. |
| `unknown-tag` | string | "N/A" | The text to display when a tag is not present in the current song, but used in `format` |
| `format` | string | "{album} - {artist} - {title}" | Information displayed when a song is playing or paused |
| `format-stopped` | string | "stopped" | Information displayed when the player is stopped. |
| `format-paused` | string | | This format is used when a song is paused. |
| `format-disconnected` | string | "disconnected" | Information displayed when the MPD server can't be reached. |
| `tooltip` | bool | true | Option to enable tooltip on hover. |
| `tooltip-format` | string | "MPD (connected)" | Tooltip information displayed when connected to MPD. |
| `tooltip-format-disconnected` | string | "MPD (disconnected)" | Tooltip information displayed when the MPD server can't be reached. |
| `artist-len` | integer | | The maximum length to show of the Artist tag. If empty, no limit. |
| `album-len` | integer | | The maximum length to show of the Album tag. If empty, no limit. |
| `album-artist-len` | integer | | The maximum length to show of the Album Artist tag. If empty, no limit. |
| `title-len` | integer | | The maximum length to show of the Title tag. If empty, no limit. |
| `rotate` | integer | | Positive value to rotate the text label. |
| `max-length` | integer | | The maximum length in character the module should display. |
| `on-click` | string | | Command to execute when clicked on the module. |
| `on-click-middle` | string | | Command to execute when you middle clicked on the module using mousewheel. |
| `on-click-right` | string | | Command to execute when you right clicked on the module. |
| `on-scroll-up` | string | | Command to execute when scrolling up on the module. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module. |
| `smooth-scrolling-threshold` | double | | Threshold to be used when scrolling. |
| `state-icons` | object | {} | Icon to show depending on the play/pause state of the player (`{ "playing": "...", "paused": "..." }`) |
| `consume-icons` | object | {} | Icon to show depending on the "consume" option (`{ "on": "...", "off": "..." }`) |
| `random-icons` | object | {} | Icon to show depending on the "random" option (`{ "on": "...", "off": "..." }`) |
| `repeat-icons` | object | {} | Icon to show depending on the "repeat" option (`{ "on": "...", "off": "..." }`) |
| `single-icons` | object | {} | Icon to show depending on the "single" option (`{ "on": "...", "off": "..." }`) |
### Format replacements
#### When playing/paused:
| string | replacement |
| ------------------ | ----------- |
| `{artist}` | The artist of the current song |
| `{albumArtist}` | The artist of the current album |
| `{album}` | The album of the current song |
| `{title}` | The title of the current song |
| `{filename}` | The filename of the current song (with extension) |
| `{date}` | The date of the current song |
| `{volume}` | The current volume in percent |
| `{elapsedTime}` | The current position of the current song. To format as a date/time (see example configuration) |
| `{totalTime}` | The length of the current song. To format as a date/time (see example configuration) |
| `{songPosition}` | The position of the song in current queue. |
| `{queueLength}` | The length of the current queue. |
| `{stateIcon}` | The icon corresponding the playing or paused status of the player (see `state-icons` option) |
| `{consumeIcon}` | The icon corresponding the "consume" option (see `consume-icons` option) |
| `{randomIcon}` | The icon corresponding the "random" option (see `random-icons` option) |
| `{repeatIcon}` | The icon corresponding the "repeat" option (see `repeat-icons` option) |
| `{singleIcon}` | The icon corresponding the "single" option (see `single-icons` option) |
#### When stopped:
| string | replacement |
| ------------------ | ----------- |
| `{consumeIcon}` | The icon corresponding the "consume" option (see `consume-icons` option) |
| `{randomIcon}` | The icon corresponding the "random" option (see `random-icons` option) |
| `{repeatIcon}` | The icon corresponding the "repeat" option (see `repeat-icons` option) |
| `{singleIcon}` | The icon corresponding the "single" option (see `single-icons` option) |
#### When disconnected:
Currently, no format replacements when disconnected.
### Example
```jsonc
"mpd": {
"format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ",
"format-disconnected": "Disconnected ",
"format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ",
"interval": 10,
"consume-icons": {
"on": " " // Icon shows only when "consume" is on
},
"random-icons": {
"off": "<span color=\"#f53c3c\"></span> ", // Icon grayed out when "random" is off
"on": " "
},
"repeat-icons": {
"on": " "
},
"single-icons": {
"on": "1 "
},
"state-icons": {
"paused": "",
"playing": ""
},
"tooltip-format": "MPD (connected)",
"tooltip-format-disconnected": "MPD (disconnected)"
}
```
### Style
- `#mpd`
- `#mpd.disconnected`
- `#mpd.stopped`
- `#mpd.playing`
- `#mpd.paused`

View File

@@ -1,66 +0,0 @@
The `mpris` module displays currently playing media via `libplayerctl`.
### Config
| option | typeof | default | description |
| ----------------------------- | ------- | ------------------------------ | ----------- |
| `player` | string | playerctld | Name of the MPRIS player to attach to. Using the default value always follows the currenly active player. |
| `ignored-players` | array[string] | | Ignore updates of the listed players, when using playerctld. |
| `interval` | integer | | Refresh MPRIS information on a timer.
| `format` | string | `{player} ({status}) {dynamic}` | The text format.
| `format-[status]` | string | | The status-specific text format.
| `tooltip-format` | string | | Format of the default tooltip.
| `tooltip-format-[status]` | string | | Format of the tooltip when `[status]` is one of `playing`, `paused`, or `stopped`.
| `enable-tooltip-len-limits` | bool | `false` | This needs to be set to true for {dynamic} and hour truncations to work in tooltips. |
| `on-click` | string | play-pause | Overwrite default action toggles.
| `on-click-middle` | string | previous track | Overwrite default action toggles.
| `on-click-right` | string | next track | Overwrite default action toggles.
| `player-icons` | map[string]string | | Allows setting `{player-icon}` based on player-name property.
| `status-icons` | map[string]string | | Allows setting `{status-icon}` based on player status (`playing`, `paused`, `stopped`).
| `dynamic-order` | list[string] | `["title", "artist", "album", "position", "length"]` | Choose the order of items in `{dynamic}`, separated by `{dynamic-separator}`. If `position` and `length` are present and adjacent (in order), they will appear in the format `<small>[{position}/{length}]</small>`.
| `[format]-len` | integer | `-1` | Where `[format]` is the name of a format segment, this is the maximum length allowed for that replacement. If the length of the replacement is greater than this value, it will be truncated with the `ellipsis` character/string added to the end.
| `ellipsis` | string/char | `…` | The character to append to the end of a truncated format replacement.
| `dynamic-len` | integer | `-1` | If the total length of `{dynamic}` is greater than this value, start removing segments according to `dynamic-importance-order` to make the string fit within this defined limit.
| `dynamic-separator` | string | ` - ` | The separator to use between segments of `dynamic-order`
| `dynamic-importance-order` | list[string] | `["title", "artist", "album", "position", "length"]` | Choose which format replacements to omit if the string would be longer than `dynamic-len`. Format replacement names that appear first are considered higher priority, any that come towards the end are the most likely to be removed.
| `rotate` | integer | | Positive value to rotate the text label. |
### Format replacements
#### When playing/paused:
| string | replacement |
| ------------------ | ----------- |
| `{player}` | The name of the current media player |
| `{status}` | The current status (`playing`, `paused`, `stopped`) |
| `{artist}` | The artist of the current track |
| `{album}` | The album title of the current track |
| `{title}` | The title of the current track |
| `{length}` | Length of the track, formatted as HH:MM:SS |
| `{position}` | Current playback position in the track, formatted as HH:MM:SS |
| `{dynamic}` | Use `{artist}`, `{album}`, `{title}` and `{length}`, automatically omit empty values |
| `{player_icon}` | Chooses an icon from `player-icons` based on `{player}` |
| `{status_icon}` | Chooses an icon from `status-icons` based on `{status}` |
### Example
```jsonc
"mpris": {
"format": "DEFAULT: {player_icon} {dynamic}",
"format-paused": "DEFAULT: {status_icon} <i>{dynamic}</i>",
"player-icons": {
"default": "▶",
"mpv": "🎵"
},
"status-icons": {
"paused": "⏸"
},
// "ignored-players": ["firefox"]
}
```
### Style
- `#mpris`
- `#mpris.${status}`
- `#mpris.${player}`

View File

@@ -1,55 +0,0 @@
The `memory` module displays the current **RAM** and **swap** utilization.
### Config
Addressed by `memory`
| option | typeof | default | description |
| ---------------- | ------- | ------- | ----------- |
| `interval` | integer | 30 | The interval in which the information gets polled. |
| `format` | string | `{percentage}%` | The format, how information should be displayed. |
| `rotate` | integer | | Positive value to rotate the text label. |
| `states` | array | | A number of memory utilization states which get activated on certain percentage thresholds.<br>See [States](https://github.com/Alexays/Waybar/wiki/States) |
| `max-length` | integer | | The maximum length in character the module should display. |
| `on-click` | string | | Command to execute when clicked on the module. |
| `on-click-middle` | string | | Command to execute when you middle clicked on the module using mousewheel. |
| `on-click-right` | string | | Command to execute when you right clicked on the module. |
| `on-scroll-up` | string | | Command to execute when scrolling up on the module. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module. |
| `smooth-scrolling-threshold` | double | | Threshold to be used when scrolling. |
| `tooltip` | bool | `true` | Option to enable tooltip on hover. |
| `tooltip-format` | string | `{used:0.1f}GiB used` | Format of the text to display in the tooltip |
#### Format replacements:
| string | replacement |
| -------------- | ----------- |
| `{percentage}` | Percentage of memory in use. |
| `{swapPercentage}` | Percentage of swap in use. |
| `{total}` | Amount of total memory in GiB. |
| `{swapTotal}` | Amount of total swap in GiB. |
| `{used}` | Amount of used memory in GiB. |
| `{swapUsed}` | Amount of used swap in GiB. |
| `{avail}` | Amount of available memory in GiB. |
| `{swapAvail}` | Amount of available swap in GiB. |
#### Examples:
```jsonc
"memory": {
"interval": 30,
"format": "{}% ",
"max-length": 10
}
```
Formatted memory values:
```jsonc
"memory": {
"interval": 30,
"format": "{used:0.1f}G/{total:0.1f}G "
}
```
### Style
- `#memory`

View File

@@ -1,85 +0,0 @@
The `network` module displays information about the current network connections.
### Config
Addressed by `network`
| option | typeof | default | description |
| --------------------- | ------- | ---------- | ----------- |
| `interface` | string | | Use the defined interface instead of auto detection.<br>Accept wildcard. |
| `interval` | integer | 60 | The interval in which the network information gets polled (e.g. signal strength). |
| `family` | string | `ipv4` | The address family that is used for the format replacement {ipaddr} and to determine if a network connection is present. Set it to ipv4_6 to display both. |
| `format` | string | `{ifname}` | The format, how information should be displayed.<br>This format is used when other formats aren't specified. |
| `format-ethernet` | string | | This format is used when a ethernet interface is displayed. |
| `format-wifi` | string | | This format is used when a wireless interface is displayed. |
| `format-linked` | string | | This format is used when a linked interface with no ip address is displayed. |
| `format-disconnected` | string | | This format is used when the displayed interface is disconnected. |
| `format-disabled` | string | | This format is used when the displayed interface is disabled. |
| `format-alt` | string | | On click, toggle to alternative format |
| `format-icons` | array/object | | Based on the current capacity, the corresponding icon gets selected.<br>The order is *low* to *high*.<br>Or by the state if it is an object. |
| `rotate` | integer | | Positive value to rotate the text label. |
| `max-length` | integer | | The maximum length in character the module should display. |
| `on-click` | string | | Command to execute when clicked on the module. |
| `on-click-middle` | string | | Command to execute when you middle clicked on the module using mousewheel. |
| `on-click-right` | string | | Command to execute when you right clicked on the module. |
| `on-scroll-up` | string | | Command to execute when scrolling up on the module. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module. |
| `smooth-scrolling-threshold` | double | | Threshold to be used when scrolling. |
| `tooltip` | bool | `true` | Option to enable tooltip on hover. |
| `tooltip-format` | string | | The format, how information should be displayed in the tooltip.<br>This format is used when other formats aren't specified. |
| `tooltip-format-ethernet` | string | | This format is used when a ethernet interface is displayed. |
| `tooltip-format-wifi` | string | | This format is used when a wireless interface is displayed. |
| `tooltip-format-disconnected` | string | | This format is used when the displayed interface is disconnected. |
| `tooltip-format-disabled` | string | | This format is used when the displayed interface is disabled. |
#### Format replacements:
| string | replacement |
| ----------------------| ----------- |
| `{ifname}` | Name of the network interface. |
| `{ipaddr}` | The first IP of the interface. |
| `{gwaddr}` | The default gateway for the interface. |
| `{netmask}` | The subnetmask corresponding to the IP(V4). |
| `{netmask6}` | The subnetmask corresponding to the IP(V6). |
| `{cidr}` | The subnetmask corresponding to the IP(V4) in CIDR notation. |
| `{cidr6}` | The subnetmask corresponding to the IP(V6) in CIDR notation. |
| `{essid}` | Name (SSID) of the wireless network. |
| `{signalStrength}` | Signal strength of the wireless network. |
| `{signaldBm}` | Signal strength of the wireless network in dBm. |
| `{frequency}` | Frequency of the wireless network in GHz. |
| `{bandwidthUpBits}` | Instant up speed in bits/seconds. |
| `{bandwidthDownBits}` | Instant down speed in bits/seconds. |
| `{bandwidthTotalBits}` | Instant total speed in bits/seconds. |
| `{bandwidthUpOctets}` | Instant up speed in octets/seconds. |
| `{bandwidthDownOctets}` | Instant down speed in octets/seconds. |
| `{bandwidthTotalOctets}` | Instant total speed in octets/seconds. |
| `{bandwidthUpBytes}` | Instant up speed in bytes/seconds. |
| `{bandwidthDownBytes}`| Instant down speed in bytes/seconds.|
| `{bandwidthTotalBytes}`| Instant total speed in bytes/seconds.|
| `{icon}` | Icon, as defined in `format-icons`. |
#### Example:
```jsonc
"network": {
"interface": "wlp2s0",
"format": "{ifname}",
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "{ipaddr}/{cidr} 󰊗",
"format-disconnected": "", //An empty format will hide the module.
"tooltip-format": "{ifname} via {gwaddr} 󰊗",
"tooltip-format-wifi": "{essid} ({signalStrength}%) ",
"tooltip-format-ethernet": "{ifname} ",
"tooltip-format-disconnected": "Disconnected",
"max-length": 50
}
```
### Style
- `#network`
- `#network.disabled`
- `#network.disconnected`
- `#network.linked`
- `#network.ethernet`
- `#network.wifi`

View File

@@ -1,192 +0,0 @@
These modules require niri >= 0.1.9.
- [Workspaces](#workspaces)
- [Window](#window)
- [Language](#language)
***
## Workspaces
The `workspaces` module displays the currently used workspaces in niri.
### Configuration
Addressed by `niri/workspaces`
| option | typeof | default | description |
| ------------------ | ------- | ------- | ----------- |
| `all-outputs` | bool | `false` | If set to false, workspaces will only be shown on the output they are on. If set to true all workspaces will be shown on every output.|
| `format` | string | `{value}` | The format, how information should be displayed.|
| `format-icons` | object | | Based on the workspace name and state, the corresponding icon gets selected.<br>See [`Icons`](#module-niri-configuration-icons)|
| `disable-click` | bool | `false` | If set to false, you can click to change workspace. If set to true this behaviour is disabled. |
| `disable-markup` | bool | `false` | If set to true, button label will escape pango markup. |
| `current-only` | bool | `false` | If set to true, only the active or focused workspace will be shown. |
| `on-update` | string | | Command to execute when the module is updated. |
#### Format replacements:
| string | replacement |
|--------|-------------|
| `{value}` | Name of the workspace, or index for unnamed workspaces, as defined by niri. |
| `{name}` | Name of the workspace for named workspaces. |
| `{icon}` | Icon, as defined in *format-icons*. |
| `{index}` | Index of the workspace on its output. |
| `{output}` | Output where the workspace is located. |
<a name="module-niri-configuration-icons"></a>
#### Icons:
Additional to workspace name matching, the following `format-icons` can be set.
| port name | note |
| ------------ | ---- |
| `default` | Will be shown when no string matches are found. |
| `focused` | Will be shown when the workspace is focused. |
| `active` | Will be shown when the workspace is active on its output. |
#### Example:
```jsonc
"niri/workspaces": {
"format": "{icon}",
"format-icons": {
// Named workspaces
// (you need to configure them in niri)
"browser": "",
"discord": "",
"chat": "<b></b>",
// Icons by state
"active": "",
"default": ""
}
}
```
### Style
- `#workspaces`
- `#workspaces button`
- `#workspaces button.focused` The single focused workspace.
- `#workspaces button.active` The workspace is active (visible) on its output.
- `#workspaces button.empty` The workspace is empty.
- `#workspaces button.current_output` The workspace is from the same output as the bar that it is displayed on.
- `#workspaces button#niri-workspace-<name>` Workspaces named this, or index for unnamed workspaces.
#### The way the CSS is evaluated you need to order it in order of importance with last taking precedent.
***
## Window
The `window` module displays the title of the currently focused window in niri.
### Configuration
Addressed by `niri/window`
| option | typeof | default | description |
| ------------------ | ------- | ------- | ----------- |
| `format` | string | `{title}` | The format, how information should be displayed. On `{}` the current window title is displayed.|
| `rewrite` | object | `{}` | Rules to rewrite the module format output. The rules are identical to [those for `sway/window`](https://github.com/Alexays/Waybar/wiki/Module:-Sway#rewrite-rules). |
| `separate-outputs` | bool | `false` | Show the active window of the monitor the bar belongs to, instead of the focused window. |
| `icon` | bool | `false` | Option to disable application icon.|
| `icon-size` | integer | `24` | Set the size of application icon.|
#### Format Replacements:
See the output of `niri msg windows` for examples.
| string | replacement |
| ---------------- | ---------------------------------------- |
| `{title}` | The current title of the focused window. |
| `{app_id}` | The current app ID of the focused window.|
#### Example:
```json
"niri/window": {
"format": "{}",
"rewrite": {
"(.*) - Mozilla Firefox": "🌎 $1",
"(.*) - zsh": "> [$1]"
}
}
```
### Style
- `#window`
The following classes can apply styles to *the entire Waybar* (see [the Sway module's page](https://github.com/Alexays/Waybar/wiki/Module:-Sway#style-1) for more info):
- `window#waybar.empty` When no windows are in the workspace
- `window#waybar.solo` When one tiled window is visible in the workspace (floating windows may be present)
- `window#waybar.<app_id>` Where `<app_id>` is the app ID (e.g. `neovide`) of the only window on the workspace (use `niri msg windows` to see app IDs).
#### Example:
This will change the color of the entire bar when either Alacritty or Chromium occupy the screen.
```css
#window {
border-radius: 20px;
padding-left: 10px;
padding-right: 10px;
}
window#waybar.Alacritty {
background-color: #111111;
color: #ffffff;
}
window#waybar.chromium-browser {
background-color: #eeeeee;
color: #000000;
}
/* make window module transparent when no windows present */
window#waybar.empty #window {
background-color: transparent;
}
```
***
## Language
The `language` module displays the currently selected keyboard language (layout) in niri.
### Configuration
Addressed by `niri/language`
| option | typeof | default | description |
| ---------------- | ------- | ------- | ----------- |
| `format` | string | `{}` | The format, how information should be displayed. On `{}` the current layout's full name is displayed.|
| `format-<lang>` | string | | Provide an alternative name to display per language where <lang> is the language of your choosing. Can be passed multiple times with multiple languages as shown by the example below.|
#### Example:
```json
"niri/language": {
"format": "Lang: {long}",
"format-en": "AMERICA, HELL YEAH!",
"format-tr": "As bayrakları"
}
```
### Style
- *#language*
#### Example:
```css
#language {
border-radius: 20px;
padding-left: 10px;
padding-right: 10px;
}
```

View File

@@ -1,60 +0,0 @@
The `power-profiles-daemon` module displays the active [power-profiles-daemon](https://gitlab.freedesktop.org/upower/power-profiles-daemon) profile and cycles through the available profiles on click.
# Configuration
| option | typeof | default | description |
| ------ | ------ | ------- | ----------- |
| format | string | {icon} | Message displayed on the bar. `{icon}` and `{profile}` are respectively substituted with the icon representing the active profile and its full name. |
| tooltip-format | string | Power profile: {profile}\\nDriver: {driver} | Messaged displayed in the module tooltip. `{icon}` and `{profile}` are respectively substituted with the icon representing the active profile and its full name. |
| tooltip | bool | true | Display the tooltip. |
| format-icons | object | See default value in the example below. | Icons used to represent the various power-profile. **Note**: the default configuration uses the font-awesome icons. You may want to override it if you don't have this font installed on your system. |
## Format Replacements
The following format replacements can be used to customize the message displayed on the bar and in the tooltip.
| string | replacement |
| ------ | ----------- |
| profile | Active profile full name |
| icon | Fontawesome icon representing the active profile |
# Configuration Examples
Compact display (default config):
```
"power-profiles-daemon": {
"format": "{icon}",
"tooltip-format": "Power profile: {profile}\nDriver: {driver}",
"tooltip": true,
"format-icons": {
"default": "",
"performance": "",
"balanced": "",
"power-saver": ""
}
}
```
Display the full profile name:
```
"power-profiles-daemon": {
"format": "{icon} {profile}",
"tooltip-format": "Power profile: {profile}\nDriver: {driver}",
"tooltip": true,
"format-icons": {
"default": "",
"performance": "",
"balanced": "",
"power-saver": ""
}
}
```
### Style
- `#power-profiles-daemon`
- `#power-profiles-daemon.performance`
- `#power-profiles-daemon.balanced`
- `#power-profiles-daemon.power-saver`

View File

@@ -1,76 +0,0 @@
### Config
The privacy module displays if any application is capturing audio, sharing the screen or playing audio.
Addressed by `privacy`
| option | typeof | default | description |
| --------------------- | ---------------- | ------------------------------------------------- | ----------- |
| `icon-spacing` | integer | `4` | The spacing between each privacy icon. |
| `icon-size` | integer | `20` | The size of each privacy icon. |
| `transition-duration` | integer | `250` | The reveal and hide transition duration |
| `modules` | array of objects | `[{"type": "screenshare"}, {"type": "audio-in"}]` | Which privacy modules to monitor. See *Modules Configuration* for more information. |
| `expand` | bool | `false` | Enables this module to consume all left over space dynamically. |
| `ignore-monitor` | bool | `true` | Ignore streams with *stream.monitor* property. |
| `ignore` | array of objects | `[]` | Additional streams to be ignored. See *Ignore Configuration* for more information.|
#### Modules Configuration:
| option | typeof | default | description |
| ------------------- | ------- | ------------------------------------------------ | ----------- |
| `type` | string | Can be `screenshare`, `audio-in`, or `audio-out` | Specifies which module to use and configure. |
| `tooltip` | bool | `true` | Option to disable tooltip on hover. |
| `tooltip-icon-size` | integer | `24` | The size of each icon in the tooltip. |
#### Ignore Configuration
| option | typeof |
| ------------------- | ------- |
| `type` | string |
| `name` | string |
#### Example:
```jsonc
"privacy": {
"icon-spacing": 4,
"icon-size": 18,
"transition-duration": 250,
"modules": [
{
"type": "screenshare",
"tooltip": true,
"tooltip-icon-size": 24
},
{
"type": "audio-out",
"tooltip": true,
"tooltip-icon-size": 24
},
{
"type": "audio-in",
"tooltip": true,
"tooltip-icon-size": 24
}
],
"ignore-monitor": true,
"ignore": [
{
"type": "audio-in",
"name": "cava"
},
{
"type": "screenshare",
"name": "obs"
}
]
},
```
### Style
- *#privacy*
- *#privacy-item*
- *#privacy-item.screenshare*
- *#privacy-item.audio-in*
- *#privacy-item.audio-out*

View File

@@ -1,71 +0,0 @@
The `pulseaudio/slider` module displays and controls the current volume of the default sink or source as a bar.
The volume can be controlled by dragging the slider across the bar, or clicking on a specific position.
## CONFIGURATION
| option | typeof | default | description |
| --- | --- | --- | --- |
| `min` | int | 0 | The minimum volume value the slider should display and set. |
| `max` | int | 100 | The maximum volume value the slider should display and set. |
| `orientation` | string | `horizontal` | The orientation of the slider. Can be either `horizontal` or `vertical`. |
> [!NOTE]
> As well as the JSON configuration, the slider modules are special in the sense that they **require** styling to work. Read more about it [here](https://github.com/Alexays/Waybar/wiki/FAQ#slider-looks-small). The TL;DR is that you **need** to set `min-width` and/or `min-height` (depending on whether your slider is vertical or not) for it to display correctly. That's a GTK detail, not an issue with Waybar.
## EXAMPLES
```json
"modules-right": [
"pulseaudio/slider",
],
"pulseaudio/slider": {
"min": 0,
"max": 100,
"orientation": "horizontal"
}
```
## STYLE
The slider is a component with multiple CSS Nodes, of which the following are exposed:
- **#pulseaudio-slider**:
Controls the style of the box *around* the slider and bar.
- **#pulseaudio-slider slider**:
Controls the style of the slider handle.
- **#pulseaudio-slider trough**:
Controls the style of the part of the bar that has not been filled.
- **#pulseaudio-slider highlight**:
Controls the style of the part of the bar that has been filled.
### STYLE EXAMPLE
```css
#pulseaudio-slider {
padding: 0;
margin: 0;
}
#pulseaudio-slider slider {
min-height: 0px;
min-width: 0px;
opacity: 0;
background-image: none;
border: none;
box-shadow: none;
}
#pulseaudio-slider trough {
min-height: 10px;
min-width: 80px;
border-radius: 5px;
background: black;
}
#pulseaudio-slider highlight {
min-width: 10px;
border-radius: 5px;
background: green;
}
```

View File

@@ -1,99 +0,0 @@
The `pulseaudio` module displays the current volume reported by PulseAudio.
Additionally you can control the volume by scrolling *up* or *down* while the cursor is over the module.
### Config
| option | typeof | default | description |
| ------------------ | ------- | ----------- | ----------- |
| `format` | string | `{volume}%` | The format, how information should be displayed.<br>This format is used when other formats aren't specified. |
| `format-bluetooth` | string | | This format is used when using bluetooth speakers. |
| `format-muted` | string | | This format is used when the sound is muted. |
| `format-source` | string | `{volume}%` | This format used for the source. |
| `format-source-muted` | string | | This format is used when the source is muted. |
| `format-icons` | array | | Based on the current port-name and volume, the corresponding icon gets selected.<br>The order is *low* to *high*. See [`Icons`](#module-pulseaudio-config-icons) |
| `rotate` | integer | | Positive value to rotate the text label. |
| `states` | array | | A number of volume states which get activated on certain volume levels.<br>See [States](https://github.com/Alexays/Waybar/wiki/States) |
| `max-length` | integer | | The maximum length in character the module should display. |
| `scroll-step` | float | 1.0 | The speed in which to change the volume when scrolling. |
| `on-click` | string | | Command to execute when clicked on the module. |
| `on-click-middle` | string | | Command to execute when you middle clicked on the module using mousewheel. |
| `on-click-right` | string | | Command to execute when you right clicked on the module. |
| `on-scroll-up` | string | | Command to execute when scrolling up on the module.<br>This replaces the default behaviour of volume control. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module.<br>This replaces the default behaviour of volume control. |
| `smooth-scrolling-threshold` | double | | Threshold to be used when scrolling. |
| `tooltip` | bool | `true` | Option to enable tooltip on hover. |
| `tooltip-format`| string | `{desc}` | Tooltip on hover. |
| `max-volume` | integer | 100 | The maximum volume that can be set, in percentage. |
| `ignored-sinks` | array | | List of sinks to ignore, by description.<br>Use `pactl list sinks` to find the correct description. |
| `reverse-scrolling` | bool | false | Option to reverse the scroll direction for devices other than a mouse (touchpad, trackpad, etc) |
| `reverse-mouse-scrolling` | bool | false | Option to reverse the scroll direction for mice |
#### Format replacements:
| string | replacement |
| ---------- | ----------- |
| `{volume}` | Volume in percentage |
| `{icon}` | Icon, as defined in `format-icons`. |
| `{format_source}` | Source format, `format-source`, `format-source-muted`. |
| `{desc}` | Pulseaudio port's description, for bluetooth it'll be the device name. |
<a name="module-pulseaudio-config-icons"></a>
#### Icons:
The following strings for *format-icons* are supported.
| string | note |
| ------------------- | ----- |
| `[the device name]` | Looks something like `alsa_output.pci-0000_00_1f.3.3.analog-stereo`.<br>You can use a PulseAudio frontend to find this such as `pacmd list-sinks` or `pamixer --list-sinks` |
If they are found in the current PulseAudio port name, the corresponding icons will be selected.
| string | note |
| ------------ | ---- |
| `default` | Will be shown, when no other port is found. |
| `headphone` | `headphones` until 0.9.0 |
| `speaker` | |
| `hdmi` | |
| `headset` | |
| `hands-free` | `handsfree` until 0.9.0 |
| `portable` | |
| `car` | |
| `hifi` | |
| `phone` | |
Additionally, suffixing a device name or port with `-muted` will cause the icon to be selected when the corresponding audio device is muted. This applies to `default` as well.
#### Example:
```jsonc
"pulseaudio": {
"format": "{volume}% {icon}",
"format-bluetooth": "{volume}% {icon}",
"format-muted": "",
"format-icons": {
"alsa_output.pci-0000_00_1f.3.analog-stereo": "",
"alsa_output.pci-0000_00_1f.3.analog-stereo-muted": "",
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"phone-muted": "",
"portable": "",
"car": "",
"default": ["", ""]
},
"scroll-step": 1,
"on-click": "pavucontrol",
"ignored-sinks": ["Easy Effects Sink"]
}
```
### Style
- `#pulseaudio`
- `#pulseaudio.bluetooth`
- `#pulseaudio.muted`
- `#pulseaudio.source-muted`

View File

@@ -1,155 +0,0 @@
- [Mode](#mode)
- [Tags](#tags)
- [Window](#window)
- [Layout](#layout)
***
## Mode
The `mode` module displays current mapping mode of [river](https://github.com/ifreund/river).
### Config
Addressed by `river/mode`
| option | typeof | default | description |
| ---------------- | ------- | ------- | ----------- |
| `format` | string | `{}` | The format, how information should be displayed. On `{}` data gets inserted. |
| `rotate` | integer | | Positive value to rotate the text label. |
| `max-length` | integer | | The maximum length in character the module should display. |
| `on-click` | string | | Command to execute when clicked on the module. |
| `on-click-right` | string | | Command to execute when you right clicked on the module. |
| `on-scroll-up` | string | | Command to execute when scrolling up on the module. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module. |
| `smooth-scrolling-threshold` | double | | Threshold to be used when scrolling. |
#### Example:
```json
"river/mode": {
"format": "mode: {}"
}
```
### Style
- `#mode`
- `#mode.<mode>`
***
## Tags
The `tags` module displays the current tag state of [river](https://github.com/ifreund/river).
### Config
Addressed by `river/tags`
| option | typeof | default | description |
| ---------------- | ------- | ------- | ----------- |
| `num-tags` | integer | `9` | The number of tags that should be displayed. Max 32.
| `tag-labels` | array | | The label to display for each tag.
| `disable-click` | bool | `false` | If set to false, you can left click to set focused tag. Right click to toggle tag focus. If set to true this behaviour is disabled.
| `set-tags` | array | | The tags to set when left clicking on the corresponding label.
| `toggle-tags` | array | | The tags to toggle when right clicking on the corresponding label.
| `hide-vacant` | bool | `false` | If set to true, empty tags that are not enabled will be hidden
#### Example:
This enables 5 tags and to support sticky tag (tag 32) set-tags is set with the 32 bit true so it will always be selected.
```json
"river/tags": {
"num-tags": 5,
"set-tags": [
2147483649,
2147483650,
2147483652,
2147483656,
2147483664
]
}
```
### Style
- `#tags button`
- `#tags button.occupied`
- `#tags button.focused`
- `#tags button.urgent`
Note that occupied/focused/urgent status may overlap. That is, a tag may be
both occupied and focused at the same time.
***
## Window
The `window` module displays the title of the currently focused window of [river](https://github.com/ifreund/river).
### Config
Addressed by `river/window`
| option | typeof | default | description |
| ---------------- | ------- | ------- | ----------- |
| `format` | string | `{}` | The format, how information should be displayed. On `{}` data gets inserted. |
| `rotate` | integer | | Positive value to rotate the text label. |
| `max-length` | integer | | The maximum length in character the module should display. |
| `on-click` | string | | Command to execute when clicked on the module. |
| `on-click-right` | string | | Command to execute when you right clicked on the module. |
| `on-scroll-up` | string | | Command to execute when scrolling up on the module. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module. |
| `smooth-scrolling-threshold` | double | | Threshold to be used when scrolling. |
| `tooltip` | bool | `true` | Option to disable tooltip on hover. |
#### Example:
```json
"river/window": {
"format": "{}"
}
```
### Style
- `#window`
- `#window.focused`
The `.focused` class is applied when the same output as the bar's is focused. This can be used to create an output focus indicator.
***
## Layout
The `layout` module displays the current [river](https://github.com/ifreund/river) layout as defined by the layout generator.
### Config
Addressed by `river/layout`
| option | typeof | default | description |
| ----------------- | ------- | ------- | ----------- |
| `format` | string | `{}` | The format, how information should be displayed. On {} data gets inserted. |
| `rotate` | integer | | Positive value to rotate the text label. |
| `max-length` | integer | | The maximum length in character the module should display. |
| `min-length` | integer | | The minimum length in characters the module should accept. |
| `align` | integer | | The alignment of the text, where 0 is left-aligned and 1 is right-aligned. If the module is rotated, it will follow the flow of the text. |
| `on-click` | string | | Command to execute when clicked on the module. |
| `on-click-middle` | string | | Command to execute when middle-clicked on the module using mousewheel. |
| `on-click-right` | string | | Command to execute when you right-click on the module. |
#### Example:
```json
"river/layout": {
"format": "{}",
"min-length": 4,
"align": "right"
}
```
### Style
- `#layout`
- `#layout.focused` Applied when the output this module's bar belongs to is focused.
- `#layout.<layout>` Style for a specific named layout

View File

@@ -1,42 +0,0 @@
The `sndio` module displays the current volume reported by sndio.
Additionally, you can control the volume by scrolling *up* or *down* while the cursor is over the module, and clicking on the module toggles mute.
### Configuration
| option | typeof | default | description |
| ------------------ | ------- | ----------- | ----------- |
| `format` | string | `{volume}%` | The format for how information should be displayed. |
| `format-bluetooth` | string | | This format is used when using bluetooth speakers. |
| `rotate` | integer | 0 | Positive value to rotate the text label. |
| `max-length` | integer | | The maximum length in character the module should display. |
| `scroll-step` | integer | 5 | The speed in which to change the volume when scrolling. |
| `on-click` | string | | Command to execute when clicked on the module.<br>This replaces the default behaviour of toggling mute. |
| `on-click-middle` | string | | Command to execute when you middle clicked on the module using mousewheel. |
| `on-click-right` | string | | Command to execute when you right clicked on the module. |
| `on-scroll-up` | string | | Command to execute when scrolling up on the module.<br>This replaces the default beaviour of volume control. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module.<br>This replaces the default beaviour of volume control. |
| `on-update` | string | | Command to execute when the module is updated. |
| `smooth-scrolling-threshold` | double | | Threshold to be used when scrolling. |
| `tooltip` | bool | `true` | Option to enable tooltip on hover. |
#### Format replacements:
| string | replacement |
| ---------- | ----------- |
| `{volume}` | Volume in percentage. |
| `{raw_volume}` | Volume as reported by sndio. |
#### Example:
```jsonc
"sndio": {
"format": "{raw_value} 🎜",
"scroll-step": 3
}
```
### Style
- `#sndio`
- `#sndio.muted`

View File

@@ -1,346 +0,0 @@
- [Mode](#mode)
- [Window](#window)
- [Workspaces](#workspaces)
- [Scratchpad](#scratchpad)
- [Language](#language)
***
## Mode
The `mode` module displays the current binding mode of [sway](https://swaywm.org/).
### Config
Addressed by `sway/mode`
| option | typeof | default | description |
| ---------------- | ------- | ------- | ----------- |
| `format` | string | `{}` | The format, how information should be displayed. On `{}` data gets inserted. |
| `rotate` | integer | | Positive value to rotate the text label. |
| `max-length` | integer | | The maximum length in character the module should display. |
| `on-click` | string | | Command to execute when clicked on the module. |
| `on-click-middle` | string | | Command to execute when you middle clicked on the module using mousewheel. |
| `on-click-right` | string | | Command to execute when you right clicked on the module. |
| `on-scroll-up` | string | | Command to execute when scrolling up on the module. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module. |
| `smooth-scrolling-threshold` | double | | Threshold to be used when scrolling. |
| `tooltip` | bool | `true` | Option to enable tooltip on hover. |
#### Example:
```jsonc
"sway/mode": {
"format": " {}",
"max-length": 50
}
```
### Style
- `#mode`
## Window
The `window` module displays the title of the currently focused window in [sway](https://swaywm.org/).
### Config
Addressed by `sway/window`
| option | typeof | default | description |
| ---------------- | ------- | ------- | ----------- |
| `format` | string | `{title}` | The format, how information should be displayed. |
| `rotate` | integer | | Positive value to rotate the text label. |
| `max-length` | integer | | The maximum length in character the module should display. |
| `on-click` | string | | Command to execute when clicked on the module. |
| `on-click-right` | string | | Command to execute when you right clicked on the module. |
| `on-scroll-up` | string | | Command to execute when scrolling up on the module. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module. |
| `smooth-scrolling-threshold` | double | | Threshold to be used when scrolling. |
| `tooltip` | bool | `true` | Option to disable tooltip on hover. |
| `rewrite` | object | `{}` | Rules to rewrite the module format output. See **rewrite rules**. |
| `all-outputs` | bool | `false` | If set to false, displays only title of the window on the same output as bar |
| `offscreen-css` | bool | `false` | Only effective when all-outputs is true. Adds style according to present windows on unfocused outputs instead of showing the focused window and style. |
| `offscreen-css-text` | bool | | Only effective when both all-outputs and offscreen-css are true. On screens currently not focused, show the given text along with that workspaces styles. |
| `icon` | bool | `false` | Option to disable application icon. |
| `icon-size` | integer | `24` | Set the size of application icon. |
#### Format Replacements:
| string | replacement |
| ---------- | --------------------------------- |
| `{title}` | The title of the focused window. |
| `{app_id}` | The app_id of the focused window. |
| `{shell}` | The shell of the focused window. It's 'xwayland' when the window is running through xwayland, otherwise it's 'xdg-shell'. |
#### Rewrite Rules:
`rewrite` is an object where keys are regular expressions and values are rewrite rules if the expression matches. Rules may contain references to captures of the expression.
Regular expression and replacement follow [ECMAScript rules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Cheatsheet) ([formal definition](https://tc39.es/ecma262/#sec-regexp-regular-expression-objects)).
An expression must match fully to trigger the replacement; if no expression matches, the format output is left unchanged.
Invalid expressions (e.g., mismatched parentheses) are ignored.
#### Example 1:
```jsonc
"sway/window": {
"format": "{title}",
"max-length": 50,
"rewrite": {
"(.*) - Mozilla Firefox": "🌎 $1",
"(.*) - vim": " $1",
"(.*) - zsh": " [$1]"
}
}
```
#### Example 2:
```jsonc
"sway/window": {
"format": "{}",
"max-length": 50,
"all-outputs" : true,
"offscreen-css" : true,
"offscreen-css-text": "(inactive)",
"rewrite": {
"(.*) - Mozilla Firefox": " $1",
"(.*) - fish": "> [$1]"
},
}
```
### Style
- `#window`
- `window#waybar.empty` When no windows are in the workspace, or screen is not focused and `offscreen-css` option is not set
- `window#waybar.solo` When one tiled window is in the workspace
- `window#waybar.floating` When there are only floating windows in the workspace
- `window#waybar.stacked` When there is more than one window in the workspace and the workspace layout is stacked
- `window#waybar.tabbed` When there is more than one window in the workspace and the workspace layout is tabbed
- `window#waybar.tiled` When there is more than one window in the workspace and the workspace layout is splith or splitv
- `window#waybar.<app_id>` Where `app_id` is the app_id or `instance` name like (`chromium`) of the only window in the workspace
Please note that the window module applies the additional css classes listed above to the whole waybar rather than the module widgets. The whole waybar is an element with the name "window" and the id "waybar", whereas the window module itself is an element with the name "box" and the id "window". So in most instances, you probably want to apply formatting to `window#waybar.<stylename> #window`. For better insight regarding css hierarchy, consider [GTK_DEBUG](https://github.com/Alexays/Waybar/wiki/Styling#interactive-styling).
Also, switching layouts does not change the style unless the focus is changed. At this point, sway does not provide events for layout switching and the module does not poll.
#### Example
```css
window#waybar {
background-color: #990000;
}
window#waybar.empty {
background-color: transparent;
}
window#waybar.empty #window {
padding: 0px;
margin: 0px;
border: 0px;
/* background-color: rgba(66,66,66,0.5); */ /* transparent */
background-color: transparent;
}
window#waybar.solo #window {
padding-left: 5px;
padding-right: 5px;
color: #eee8d5; /* base2 */
background-color: #073642; /*base02*/
}
window#waybar.floating #window {
padding-left: 5px;
padding-right: 5px;
color: #eee8d5; /* base2 */
background-color: #b58900; /*yellow*/
}
window#waybar.tiled #window {
padding-left: 5px;
padding-right: 5px;
color: #eee8d5; /* base2 */
background-color: #cb4b16; /* orange */
}
window#waybar.stacked #window {
padding-left: 5px;
padding-right: 5px;
color: #eee8d5; /* base2 */
background: #2aa196; /*cyan*/
}
window#waybar.tabbed #window {
padding-left: 5px;
padding-right: 5px;
color: #eee8d5; /* base2 */
background: #859900; /*green*/
}
window#waybar.code {
background-color: #007ACC;
}
```
## Workspaces
The `workspaces` module displays the currently used workspaces in [sway](https://swaywm.org/).
### Config
Addressed by `sway/workspaces`
| option | typeof | default | description |
| ---------------- | ------- | -------- | ----------- |
| `all-outputs` | bool | `false` | If set to `false`, workspaces will only be shown on the output they are on.<br>If set to `true` all workspaces will be shown on every output. |
| `format` | string | `{name}` | The format, how information should be displayed. |
| `format-icons` | array | | Based on the workspace name and state, the corresponding icon gets selected.<br>See [`Icons`](#module-workspaces-config-icons) |
| `disable-scroll` | bool | `false` | If set to `false`, you can scroll to cycle through workspaces.<br>If set to `true` this behaviour is disabled. |
| `disable-click` | bool | `false` | If set to `false`, you can click to change workspace.<br>If set to `true` this behaviour is disabled. |
| `smooth-scrolling-threshold` | double | | Threshold to be used when scrolling. |
| `disable-scroll-wraparound` | bool | `false` | If set to `false`, scrolling on the workspace indicator will wrap around to the first workspace when reading the end, and vice versa.<br>If set to `true` this behavior is disabled. |
| `enable-bar-scroll` | bool | `false` | If set to `false`, you can't scroll to cycle throughout workspaces from the entire bar.<br>If set to `true` this behaviour is enabled. |
| `disable-markup` | bool | `false` | If set to `true`, button label will escape pango markup. |
| `current-only` | bool | `false` | If set to `true`. Only focused workspaces will be shown. |
| `persistent-workspaces` | json (see below) | empty | Lists workspaces that should always be shown, even when non existant |
| `numeric-first` | bool | `false` | If set to `true`, workspaces with a name that starts with a number are displayed in front of workspaces that do not start with a number. |
| `disable-auto-back-and-forth` | bool | `false` | Whether to disable `workspace_auto_back_and_forth` when clicking on workspaces. If this is set to `true`, clicking on a workspace you are already on won't do anything, even if `workspace_auto_back_and_forth` is enabled in the Sway configuration. |
| `warp-on-scroll` | bool | `true` | If set to `false`, waybar will ephemerally disable mouse_warping (see `man 5 sway`) while using the scroll wheel to switch workspaces |
| `window-rewrite` | object | `{}` | Regex rules to map window class to an icon or preferred method of representation for a workspace's window. |
| `window-rewrite-default` | `string` | `?` | The default method of representation for a workspace's window. This will be used for windows whose classes do not match any of the rules in `window-rewrite` |
| `format-window-separator` | `string` | ` ` | The separator to be used between windows in a workspace. |
#### Format replacements:
| string | replacement |
| --------- | ----------- |
| `{value}` | Name of the workspace, as defined by sway |
| `{name}` | Number stripped from workspace value at colon e.g. "13:NAME" |
| `{icon}` | Icon, as defined in `format-icons`. |
| `{index}` | Index of the workspace |
| `{output}` | Output where the workspace is located. |
| `{windows}` | Result from window-rewrite |
<a name="module-workspaces-config-icons"></a>
#### Icons:
Additional to workspace name matching, the following `format-icons` can be set.
| port name | note |
| -------------------- | ---- |
| `default` | Will be shown, when no string matches is found. |
| `urgent` | Will be shown, when workspace is flagged as urgent|
| `focused` | Will be shown, when workspace is focused |
| `persistent` | Will be shown, when workspace is persistent one. |
If you don't want these additional icons to override your matched workspace icon for some workspaces, then you can list such workspaces in the
`high-priority-named` list (like `"high-priority-named": ["1", "2", "3"]`)
#### Persistent workspaces:
each entry of `persistent_workspace` names a workspace that should always be shown. Associated with that value is a list of outputs indicating *where* the workspace should be shown, an empty list denoting all outputs
```jsonc
"sway/workspaces": {
"persistent-workspaces": {
"3": [], // Always show a workspace with name '3', on all outputs if it does not exists
"4": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists
"5": ["eDP-1", "DP-2"] // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists
}
}
```
n.b.: the list of outputs can be obtained from command line using `swaymsg -t get_outputs`
#### Example:
```jsonc
"sway/workspaces": {
"disable-scroll": true,
"all-outputs": true,
"format": "{name}: {icon}",
"format-icons": {
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
"urgent": "",
"focused": "",
"default": "",
"high-priority-named": ["1", "2"]
}
}
```
```jsonc
"sway/workspaces": {
"format": "<span size='larger'>{name}</span> {windows}",
"format-window-separator": " | ",
"window-rewrite-default": "{name}",
"window-format": "<span color='#e0e0e0'>{name}</span>",
"window-rewrite": {
"class<firefox> title<.*chat.gig.tech.*>": "",
"class<kitty>": "",
}
}
```
### Style
- `#workspaces button`
- `#workspaces button.visible`
- `#workspaces button.focused`
- `#workspaces button.urgent`
- `#workspaces button.persistent`
- `#workspaces button.empty`
- `#workspaces button.current_output`
- `#workspaces button#sway-workspace-${name}`
## Scratchpad
The `scratchpad` module displays the scratchpad status in Sway.
### Configuration
Addressed by `sway/scratchpad`
| option | typeof | default | description |
| ---------------- | ------ | ------- | ----------- |
| `format` | string | `{icon} {count}` | The format, how information should be displayed. |
| `show-empty` | bool | `false`| Option to show module when scratchpad is empty. |
| `format-icons` | array/object | | Based on the current scratchpad window counts, the corresponding icon gets selected. |
| `tooltip` | bool | `true` | Option to disable tooltip on hover. |
| `tooltip-format` | string | `{app}: {title}` | The format, how information in the tooltip should be displayed. |
| `menu` | string | | Action that popups the menu. |
| `menu-file` | string | | Location of the menu descriptor file. There need to be an element of type GtkMenu with id `menu` |
| `menu-actions` | array | | The actions corresponding to the buttons of the menu. |
#### Format Replacements
| string | replacement |
| --------- | ----------- |
| `{icon}` | Icon, as defined in `format-icons`. |
| `{count}` | Number of windows in the scratchpad. |
| `{app}` | Name of the application in the scratchpad. |
| `{title}` | Title of the application in the scratchpad. |
#### Example
```json
"sway/scratchpad": {
"format": "{icon} {count}",
"show-empty": false,
"format-icons": ["", ""],
"tooltip": true,
"tooltip-format": "{app}: {title}"
}
```
### Style
- `#scratchpad`
- `#scratchpad.empty`
## Language
[sway/language](https://github.com/Alexays/Waybar/wiki/Module:-Language)

View File

@@ -1,40 +0,0 @@
The `systemd-failed-units` module monitors and displays the number of failed systemd units.
### Config
Addressed by `systemd-failed-units`
| option | typeof | default | description |
| ----------------- | ------- | ------------------- | ----------- |
| `format` | string | `{nr_failed} failed` | The format, how information should be displayed. This format is used when other formats aren't specified. |
| `format-ok` | string | | This format is used when there is no failing units. |
| `user` | bool | `true` | Option to count user systemd units. |
| `system` | bool | `true` | Option to count systemwide (PID=1) systemd units. |
| `hide-on-ok` | bool | `true` | Option to hide this module when there is no failing units. |
#### Format replacements
| string | replacement |
| ----------------------| ----------- |
| `{nr_failed_system}` | Number of failed units from systemwide (PID=1) systemd. |
| `{nr_failed_user}` | Number of failed units from user systemd. |
| `{nr_failed}` | Number of total failed units. |
#### Examples:
```jsonc
"systemd-failed-units": {
"hide-on-ok": false, // Do not hide if there is zero failed units.
"format": "✗ {nr_failed}",
"format-ok": "✓",
"system": true, // Monitor failed systemwide units.
"user": false // Ignore failed user units.
}
```
### Style
- `#systemd-failed-units`
- `#systemd-failed-units.ok`
- `#systemd-failed-units.degraded`

View File

@@ -1,85 +0,0 @@
The `wlr/taskbar` module can be used to add a taskbar based on the foreign-toplevel-manager protocol. For this module to work, you need a wayland compositor that implements the protocol.
# Config
| option | typeof | default | description |
|--------|:------:|:-------:|-------------|
| `all-outputs` | bool | `false` | If set to `false` only applications on waybar's current output will be shown. Otherwise all applications will be shown. |
| `format` | string | `{icon}` | The format, how information should be displayed for applications. |
| `icon-theme` | string | | The name of the icon-theme that should be used. If omitted, the system default will be used. |
| `icon-size` | int | `16` | The size in pixels for the icon. |
| `markup` | bool | `false` | If set to `true` pango markup will be allowed in format/tooltip_format. |
| `tooltip` | bool | `true` | If set to `false` no tooltip will be shown. |
| `tooltip-format` | string | `{title}` | The format, how information in the tooltip should be displayed for applications. |
| `active-first` | bool | `false` | If set to true, always reorder the tasks in the taskbar so that the currently active one is first. Otherwise don't reorder. |
| `sort-by-app-id` | bool | `false` | If set to true, group tasks by their app_id. Cannot be used with activefirst. |
| `on-click` | string | | The action which should be triggered when clicking on the applications button in the taskbar with the left mouse button. |
| `on-click-middle` | string | | The action which should be triggered when clicking on the applications button in the taskbar with the middle mouse button. |
| `on-click-right` | string | | The action which should be triggered when clicking on the applications button in the taskbar with the right mouse button. |
| `on-update` | string | | Command to execute when the module is updated. |
| `ignore-list` | array[string] | | List of app_id/titles to be invisible. |
| `app_ids-mapping` | object | | Dictionary of app_id to be replaced with. |
| `rewrite` | object | | Rules to rewrite the module format output. See **rewrite rules**. |
## Format replacements:
| string | replacement |
|--------|-------------|
| `{icon}` | The icon of the application. |
| `{title}` | The title of the application. |
| `{name}` | The name of the application. |
| `{app_id}` | The `app_id` of the application. |
| `{state}` | The state (minimized, maximized, active, fullscreen) of the application. |
| `{short_state}` | The state represented as one character (minimized == m, maximized == M, active == A, fullscreen == F) of the application. |
Note: Like all format replacements in waybar, `{title:.15}` places a length limit of 15 bytes on the replaced `title` string. This may result in invalid text if a multi-byte character is present or (if `markup` is true) if the text includes values that must be escaped in XML.
## Actions:
| string | action |
|--------|--------|
| `activate` | Bring the application into foreground. |
| `minimize` | Toggle application's minimized state. |
| `minimize-raise` | Bring the application into foreground or toggle its minimized state. |
| `maximize` | Toggle application's maximized state. |
| `fullscreen` | Toggle application's fullscreen state. |
| `close` | Close the application. |
## Rewrite Rules:
`rewrite` is an object where keys are regular expressions and values are rewrite rules if the expression matches. Rules may contain references to captures of the expression.
Regular expression and replacement follow [ECMAScript rules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Cheatsheet) ([formal definition](https://tc39.es/ecma262/#sec-regexp-regular-expression-objects)).
An expression must match fully to trigger the replacement; if no expression matches, the format output is left unchanged.
Invalid expressions (e.g., mismatched parentheses) are ignored.
## Example:
```jsonc
"wlr/taskbar": {
"format": "{icon}",
"icon-size": 14,
"icon-theme": "Numix-Circle",
"tooltip-format": "{title}",
"on-click": "activate",
"on-click-middle": "close",
"ignore-list": [
"Alacritty"
],
"app_ids-mapping": {
"firefoxdeveloperedition": "firefox-developer-edition"
},
"rewrite": {
"Firefox Web Browser": "Firefox",
"Foot Server": "Terminal"
".*(steam_app_[0-9]+).*": "Game"
}
}
```
# Style
- `#taskbar`
- `#taskbar button`
- `#taskbar button.active`
- `#taskbar button.minimized`
- `#taskbar button.maximized`
- `#taskbar button.fullscreen`
- `#taskbar.empty`

View File

@@ -1,73 +0,0 @@
The `temperature` module displays the current temperature from a thermal zone.
### Config
Addressed by `temperature`
| option | typeof | default | description |
| ---------------- | ------- | ------------- | ----------- |
| `thermal-zone` | integer | | The thermal zone, as in `/sys/class/thermal/`. |
| `hwmon-path` | string/array | | The temperature path to use, e.g. `/sys/class/hwmon/hwmon2/temp1_input` instead of one in `/sys/class/thermal/`. |
| `hwmon-path-abs` | string/array | | The path of the hwmon-directory of the device, e.g. `/sys/devices/pci0000:00/0000:00:18.3/hwmon`. (Note that the subdirectory `hwmon/hwmon#`, where `#` is a number, is not part of the path!) Has to be used together with `input-filename`. |
| `input-filename` | string | | The temperature filename of your `hwmon-path-abs`, e.g. `temp1_input` |
| `warning-threshold` | integer | | The threshold before it is considered warning (Celsius). |
| `critical-threshold` | integer | | The threshold before it is considered critical (Celsius). |
| `interval` | integer | 10 | The interval in which the information gets polled. |
| `format-critical` | string | | The format to use when temperature is considered critical |
| `format` | string | `{temperatureC}°C` | The format (Celsius/Farenheit) in which the temperature should be displayed. |
| `format-icons` | array | | Based on the current temperature (Celsius) and `critical-threshold` if available, the corresponding icon gets selected.<br>The order is *low* to *high*. |
| `rotate` | integer | | Positive value to rotate the text label. |
| `max-length` | integer | | The maximum length in characters the module should display. |
| `on-click` | string | | Command to execute when you clicked on the module. |
| `on-click-middle` | string | | Command to execute when you middle clicked on the module using mousewheel. |
| `on-click-right` | string | | Command to execute when you right clicked on the module. |
| `on-scroll-up` | string | | Command to execute when scrolling up on the module. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module. |
| `smooth-scrolling-threshold` | double | | Threshold to be used when scrolling. |
| `tooltip` | bool | `true` | Option to enable tooltip on hover. |
| `tooltip-format` | string | `{temperatureC}°C` | The format for the tooltip
#### Format replacements:
| string | replacement |
| ------------ | ----------- |
| `{temperatureC}` | Temperature in Celsius. |
| `{temperatureF}` | Temperature in Fahrenheit. |
| `{temperatureK}` | Temperature in Kelvin. |
| `{icon}` | Icon, as defined in `format-icons`. |
#### Example:
```jsonc
"temperature": {
// "thermal-zone": 2,
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
// "critical-threshold": 80,
// "format-critical": "{temperatureC}°C ",
"format": "{temperatureC}°C "
}
```
### Style
- `#temperature`
- `#temperature.warning`
- `#temperature.critical`
### Debugging
#### Finding your thermal zone
To list all the zone types, run
```bash
for i in /sys/class/thermal/thermal_zone*; do echo "$i: $(<$i/type)"; done
```
#### Finding hwmon path
If you don't have a thermal zone, another option is to use `sensors` to find preferred temperature source, then run
```bash
for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done
```
to find path to desired file. Then include it in `hwmon-path` variable.

View File

@@ -1,43 +0,0 @@
:warning: **`tray` is still in beta. There may be bugs. Breaking changes may occur.**
### Config
Addressed by `tray`
| option | typeof | default | description |
| ----------- | ------- | ------- | ----------- |
| `icon-size` | integer | | Defines the size of the tray icons. |
| `show-passive-items` | bool | `false` | Defines visibility of the tray icons with `Passive` status. |
| `smooth-scrolling-threshold` | double | | Threshold to be used when scrolling. |
| `spacing` | integer | | Defines the spacing between the tray icons. |
| `reverse-direction` | bool | `false` | Defines if new app icons should be added in a reverse order. |
| `icons` | object | `{}` | Override icon mapping for tray icons. |
### Icons
Each entry of `icons` must be `app_name`/`app_id` : `icon_name`/`image_path` mapping. `icon_name` can be a globally identified icon.
For now, it only works with actual image files, not font-based icons. It might not work for some electron apps (https://github.com/electron/electron/issues/40936).
#### Example:
```jsonc
"tray": {
"icon-size": 21,
"spacing": 10,
"icons": {
"blueman": "bluetooth",
"TelegramDesktop": "$HOME/.local/share/icons/hicolor/16x16/apps/telegram.png"
}
}
```
### Style
- `#tray`
- `#tray menu` for the context menu
- `#tray > .passive` for icons with status `Passive`
- `#tray > .active` for icons with status `Active`
- `#tray > .needs-attention` for icons with status `NeedsAttention`

View File

@@ -1,64 +0,0 @@
### Config
Addressed by `upower`
| option | typeof | default | description |
| ----------------- | ------- | ------------------- | ----------- |
| `native-path` | string | | The battery to monitor. Refer to the [Upower native-path](https://upower.freedesktop.org/docs/UpDevice.html#UpDevice--native-path). Can be obtained using `upower --dump`|
| `icon-size` | integer | 20 | Defines the size of the icons. |
| `format` | string | {percentage} | The text format. |
| `format-alt` | string | {percentage} {time} | The text format when toggled. |
| `hide-if-empty` | bool | true | Defines visibility of the module if no devices can be found. |
| `on-click` | string | | Command to execute when clicked on the module. |
| `tooltip` | bool | true | Option to disable tooltip on hover. |
| `tooltip-spacing` | integer | 4 | Defines the spacing between the tooltip device name and device battery status. |
| `tooltip-padding` | integer | 4 | Defines the spacing between the tooltip window edge and the tooltip content. |
| `show-icon` | bool | true | Option to disable battery icon. |
#### Format replacements:
| string | replacement |
| ----------------------| ----------- |
| `{percentage}` | The battery capacity in percentage. |
| `{time}` | An estimated time either until empty or until fully charged depending on the charging state. |
#### Example:
```jsonc
"upower": {
"icon-size": 20,
"hide-if-empty": true,
"tooltip": true,
"tooltip-spacing": 20
}
"upower": {
"native-path": "/org/bluez/hci0/dev_D4_AE_41_38_D0_EF",
"icon-size": 20,
"hide-if-empty": true,
"tooltip": true,
"tooltip-spacing": 20
}
"upower": {
"native-path": "battery_sony_controller_battery_d0o27o88o32ofcoee",
"icon-size": 20,
"hide-if-empty": true,
"tooltip": true,
"tooltip-spacing": 20
}
"upower": {
"show-icon": false,
"hide-if-empty": true,
"tooltip": true,
"tooltip-spacing": 20
}
```
### Style
- `#upower`
- `#upower.charging`
- `#upower.discharging`
- `#upower.unknown-status`

View File

@@ -1,41 +0,0 @@
The `user` module displays the current user name with avatar and system uptime.
### Config
Addressed by `user`
| option | typeof | default | description |
| --------------------- | ------- | -------------------------- | ---------------------------------------------------- |
| `interval` | integer | 60 | The interval in which the information gets polled. |
| `format` | string | `{user} {work_H}:{work_M}` | The format, how the information should be displayed. |
| `avatar` | string | `$HOME/.face` | Path to custom image |
| `height` | integer | 30 | Avatar height |
| `width` | integer | 30 | Avatar width |
| `icon` | bool | false | Option to enable avatar icon |
| `open-on-click` | bool | true | Option to enable path opening |
| `open-path` | string | `$HOME` | folder path |
#### Format replacements:
| string | replacement |
| ----------------------| ----------- |
| `{up_H}` | System startup time |
| `{up_M}` | System startup minute |
| `{up_d}` | System startup day |
| `{up_m}` | System startup month |
| `{up_Y}` | System startup year |
| `{work_H}` | System uptime hours by day |
| `{work_M}` | System uptime minutes |
| `{work_S}` | System uptime seconds |
| `{work_d}` | System startup days |
| `{user}` | Username |
#### Example:
```jsonc
"user": {
"format": "{user} (up {work_d} days ↑)",
"interval": 60,
"height": 30,
"width": 30,
"icon": true,
}
```

View File

@@ -1,98 +0,0 @@
The `wireplumber` module displays the current volume reported by WirePlumber.
Additionally you can control the volume by scrolling *up* or *down* while the cursor is over the module.
### Config
| option | typeof | default | description |
| ------------------ | ------- | ----------- | ----------- |
| `format` | string | `{volume}%` | The format, how information should be displayed.<br>This format is used when other formats aren't specified. |
| `format-muted` | string | | This format is used when the sound is muted. |
| `format-source` | string | `{volume}%` | This format used for the source. |
| `format-source-muted` | string | | This format is used when the source is muted. |
| `format-icons` | array | | Based on the current volume, the corresponding icon gets selected.<br>The order is *low* to *high*. |
| `rotate` | integer | | Positive value to rotate the text label. |
| `states` | array | | A number of volume states which get activated on certain volume levels.<br>See [States](https://github.com/Alexays/Waybar/wiki/States) |
| `max-length` | integer | | The maximum length in character the module should display. |
| `scroll-step` | float | 1.0 | The speed in which to change the volume when scrolling. |
| `on-click` | string | | Command to execute when clicked on the module. |
| `on-click-middle` | string | | Command to execute when you middle clicked on the module using mousewheel. |
| `on-click-right` | string | | Command to execute when you right clicked on the module. |
| `on-scroll-up` | string | | Command to execute when scrolling up on the module.<br>This replaces the default beaviour of volume control. |
| `on-scroll-down` | string | | Command to execute when scrolling down on the module.<br>This replaces the default beaviour of volume control. |
| `tooltip` | bool | `true` | Option to enable tooltip on hover. |
| `tooltip-format`| string | `{node_name}` | Tooltip on hover. |
| `max-volume` | float | 100.0 | The maximum volume that can be set, in percentage. |
| `reverse-scrolling` | bool | false | Option to reverse the scroll direction for devices other than a mouse (touchpad, trackpad, etc) |
| `reverse-mouse-scrolling` | bool | false | Option to reverse the scroll direction for mice |
| `node-type`| string | `Audio/Sink` | The type of node. Can be `Audio/Sink` or `Audio/Source`. |
| `only-physical`| bool | false | Option to follow the links to the first physical output node if the default output is virtual (has no device.id). |
#### Format replacements:
| string | replacement |
| ---------- | ----------- |
| `{volume}` | Volume in percentage |
| `{icon}` | Icon, as defined in `format-icons`. |
| `{node_name}` | The node's nickname (WirePlumber's `node.nick` property) |
| `{format_source}` | Source format, `format-source`, `format-source-muted`. |
| `{source_volume}` | Source volume in percentage |
| `{source_desc}` | Source description (node.nick or node.description) |
#### Example:
```jsonc
"wireplumber": {
"format": "{volume}%",
"format-muted": "",
"on-click": "helvum",
"max-volume": 150,
"scroll-step": 0.2
}
```
With icon support:
```jsonc
"wireplumber": {
"format": "{volume}% {icon}",
"format-muted": "",
"on-click": "helvum",
"format-icons": ["", "", ""]
}
```
For source (microphone etc) nodes:
```jsonc
"wireplumber#source": {
"node-type": "Audio/Source",
"format": "{volume}% 󰍬",
"format-muted": "󰍭",
"on-click-right": "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle",
"scroll-step": 5,
},
```
With combined sink and source information:
```jsonc
"wireplumber": {
"format": "{volume}% {icon} {format_source}",
"format-muted": " {format_source}",
"format-source": "{source_volume}% ",
"format-source-muted": " ",
"format-icons": {
"default": ["", ""]
},
"on-click": "helvum"
}
```
### Style
- `#wireplumber`
- `#wireplumber.muted`
- `#wireplumber.sink-muted`
- `#wireplumber.source-muted`

View File

@@ -1,118 +0,0 @@
The `workspaces` module displays the current active workspaces in your Wayland compositor.
Note: To use this module, your compositor has to implement the `ext-workspace-v1` Wayland protocol.
Waybar needs to be built with `-Dexperimental=true` for `ext/workspaces` to be available (see [#1766](https://github.com/Alexays/Waybar/issues/1766)).
# Config
| option | typeof | default | description |
|--------|:------:|:-------:|-------------|
| `format` | string | `{name}` | The format, how information should be displayed. |
| `format-icons` | array | | Based on the workspace name and state, the corresponding icon gets selected.<br>See [`Icons`](#module-workspaces-config-icons) |
| `sort-by-name` | bool | `true` | Should workspaces be sorted by name. |
| `sort-by-coordinates` | bool | `true` | Should workspaces be sorted by coordinates. Note that if both *sort-by-name* and *sort-by-coordinates* are true sort by name will be first. If both are false - sort by id will be performed. |
| `sort-by-number` | bool | `false` | If set to true, workspace names will be sorted numerically. Takes presedence over any other sort-by option. |
| `all-outputs` | bool | `false` | If set to false workspaces group will be shown only in assigned output. Otherwise all workspace groups are shown. |
| `active-only` | bool | `false` | If set to true only active or urgent workspaces will be shown. |
| `persistent-workspaces` | json (see below) | empty | Lists workspaces that should always be shown, even when non existant. Doesn't work when *all-outputs* is true or on `ext/workspaces` |
| `on-click` | Actions (see below) | | Can be used to activate or close workspaces when clicked on |
## Format replacements:
| string | replacement |
|--------|-------------|
| `{name}` | Name of workspace assigned by compositor. |
| `{icon}` | Icon, as defined in *format-icons*. |
<a name="module-workspaces-config-icons"></a>
#### Icons:
Additional to workspace name matching, the following `format-icons` can be set.
| port name | note |
| ------------ | ---- |
| `default` | Will be shown, when no string matches is found. |
| `urgent` | Will be shown, when workspace is flagged as urgent. |
| `active` | Will be shown, when workspace is active |
## Actions:
| string | action |
|--------|--------|
| `activate` | Switch to workspace. |
| `close` | Close the workspace. |
## Persistent workspaces:
Each entry of `persistent-workspace` names a workspace that should always be shown. Associated with that value is a list of outputs indicating *where* the workspace should be shown, an empty list denoting all outputs
```jsonc
"ext/workspaces": {
"persistent-workspaces": {
"3": [], // Always show a workspace with name '3', on all outputs if it does not exists
"4": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists
"5": ["eDP-1", "DP-2"] // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists
}
}
```
n.b.: This currently doesn't work if `all-outputs` is true.
## Example for [Sway](./Module:-Sway):
```jsonc
"sway/workspaces": {
"format": "{icon}",
"on-click": "activate",
"format-icons": {
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
"urgent": "",
"active": "",
"default": ""
},
"sort-by-number": true
}
```
## Example for [Hyprland](https://github.com/Alexays/Waybar/wiki/Module:-Hyprland#workspaces):
```jsonc
"hyprland/workspaces": {
"format": "{icon}",
"on-click": "activate",
"format-icons": {
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
"urgent": "",
"active": "",
"default": ""
},
"sort-by-number": true
}
```
- See the [full documentation here](https://github.com/Alexays/Waybar/wiki/Module:-Hyprland#workspaces).
## Example for Labwc:
```jsonc
"ext/workspaces": {
"format": "{name}",
"sort-by-number": true,
"on-click": "activate",
},
```
# Style
Note: Sway uses a different set of classes. Please see the [Sway](./Module:-Sway) module page.
- *#workspaces*
- *#workspaces button*
- *#workspaces button.active*
- *#workspaces button.visible*
- *#workspaces button.urgent*
- *#workspaces button.empty*
- *#workspaces button.persistent*
- *#workspaces button.hidden*

View File

@@ -1 +0,0 @@
There aren't any valid CSS classes here yet. Click [here](https://github.com/Alexays/Waybar/wiki/Styling) to go to the Styling page.

View File

@@ -1,3 +0,0 @@
![image](https://github.com/user-attachments/assets/104c697d-eaf8-4f58-aa2e-db6af168729e)
[Config with Styles](https://github.com/abhinaya-aryal/.config/tree/main/waybar)

View File

@@ -1,36 +0,0 @@
## Overview:
- Some modules support 'states' which allows percentage values to be used as styling triggers to apply a class when the value matches the declared state value.
#### States:
- Every entry (*state*) consists of a `<name>` (typeof: `string`) and a `<value>` (typeof: `integer`).
- The `<value>` determines the percentage value above which a state is applied, except for the battery and pulseaudio modules, for which it is activated *below* the given value.
- The state can be addressed as a CSS class in the `style.css`. The name of the CSS class is the `<name>` of the state.
- Also each state can have its own `format`.
Those can be configured via `format-<name>`.
Or if you want to differentiate a bit more even as `format-<status>-<state>`. For more information see [custom formats](https://github.com/Alexays/Waybar/wiki/Module:-Battery#module-battery-config-format-custom).
#### Example:
```
"battery": {
"bat": "BAT2",
"interval": 60,
"states": {
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon}",
"format-icons": ["", "", "", "", ""],
"max-length": 25
}
```
### Styling States
- `#battery.<state>`
- `<state>` can be defined in the `config`. For more information see [`states`](https://github.com/Alexays/Waybar/wiki/Module:-Battery#module-battery-config-states)
#### Example:
- `#battery.warning: { background: orange; }`
- `#battery.critical: { background: red; }`

View File

@@ -1,265 +0,0 @@
## Style file
Styling is done using the CSS file format and with a file named `style.css`. You can also use `style-light.css` and `style-dark.css` respectively to follow the system theme.
Valid directories for this file are:
- `~/.config/waybar/`
- `~/waybar/`
- `/etc/xdg/waybar/`
A good starting point is the [default style](https://github.com/Alexays/Waybar/blob/master/resources/style.css).
If you want some ideas:
- https://www.reddit.com/r/unixporn/comments/9y9w0r/sway_first_rice_on_my_super_old_macbook_air/
- https://www.reddit.com/r/unixporn/comments/a2c9kl/sway_in_the_wild/
- https://www.reddit.com/r/unixporn/comments/a7nv6h/sway_getting_ready_for_production/
- https://www.reddit.com/r/unixporn/comments/ac2pez/swaywaybarsway_with_kitty_awesome/
- https://www.reddit.com/r/unixporn/comments/bmtfgd/sway_been_a_while/
- https://www.reddit.com/r/unixporn/comments/crkjqm/sway_space_gruvbox/
- https://www.reddit.com/r/unixporn/comments/crmfhl/swayrepost_due_to_a_privacy_issue_arch_linux_sway/
- https://www.reddit.com/r/unixporn/comments/crzi3k/sway_my_setup_with_sway_and_waybar_incl_blood/
- https://www.reddit.com/r/unixporn/comments/ct8gho/sway_not_gnome_shell/
- https://www.reddit.com/r/unixporn/comments/cu0j26/sway_refined_green_99_xorg_free/
- https://www.reddit.com/r/unixporn/comments/cyevtf/sway_my_new_rice/
- https://www.reddit.com/r/unixporn/comments/cydh34/sway_update_base16dracula/
- https://www.reddit.com/r/unixporn/comments/cz5vmp/sway_solarized_light_desktop/
- https://www.reddit.com/r/unixporn/comments/d0fuc1/sway_mario_plays_the_blues/
- https://www.reddit.com/r/unixporn/comments/d0lxbf/sway_symbolic_links_save_lives_pywal_mako/
- https://www.reddit.com/r/unixporn/comments/1i9ft2h/sway_my_very_first_rice_on_asahi_linux/
Also a minimal example style can be found on the [bottom of this page](#minimal-style).
All valid CSS classes for the modules are listed on the [modules page](https://github.com/Alexays/Waybar/wiki/Modules).
## Bar styling
The main waybar window can be styled with the following:
- `window#waybar`
- `window#waybar.hidden`
- `window#waybar.<name>`
- `<name>` is set to the value of the _optional_ `name` configuration property. If not set, this class is not available. For more information see [Bar Config](https://github.com/Alexays/Waybar/wiki/Configuration#bar-config)
- `window#waybar.<position>`
- `<position>` is set to the value of the `position` configuration property. For more information see [Bar Config](https://github.com/Alexays/Waybar/wiki/Configuration#bar-config)
### Module Group Styling
Each module group can be styled individually with the following:
- `.modules-left`
- `.modules-center`
- `.modules-right`
### Generic module style
A style with the `.module` selector would affect all the modules. In practice, you may prefer to use more specific `label.module` and `box.module` selectors.
```css
label.module {
padding: 0 10px;
box-shadow: inset 0 -3px;
}
box.module button:hover {
box-shadow: inset 0 -3px #ffffff;
}
```
You need to remember about [selector specificity](https://www.w3.org/TR/selectors-3/#specificity) when overriding the style for a specific module:
```css
/*
* Show border for all simple text modules when the bar is in a top or bottom position.
* a=1 b=2 c=2 -> specificity = 122
*/
window#waybar.top label.module {
box-shadow: inset 0 -3px;
}
window#waybar.bottom label.module {
box-shadow: inset 0 3px;
}
/*
* But hide the border for sway/window (need to include `window#waybar` to increase specificity)
* a=2 b=0 c=1 -> specificity = 201
*/
window#waybar #window {
box-shadow: none;
}
```
## Per-output styling
The main waybar windows carry a class tag with the name of the output this window is shown on. This can be used to apply different styles depending on the output. E.g.,
```css
* { font-size: 13px; }
window.eDP-1 * { font-size: 10px; }
```
will set the default font size of all elements to 13px unless overridden later on, but apply a base font size of 10px to all elements on the eDP-1 output (typically, the laptop screen). Note that only the top-level window container has the output assigned in the class tags, not each individual object.
## Interactive styling
GTK is used to apply styles and works with [a limited subset of CSS](https://docs.gtk.org/gtk3/css-properties.html).
You can use `env GTK_DEBUG=interactive waybar` to inspect objects and find their CSS classes, experiment with live CSS styles, and lookup the current value of CSS properties.
![Interactive CSS Editor](https://user-images.githubusercontent.com/1028741/60634665-a1525d00-9e07-11e9-8fcc-2ebb9d18b431.png)
See https://developer.gnome.org/documentation/tools/inspector.html for more information.
## Viewing the widget tree
Like the GTK inspector above, Waybar itself can also tell you what GTK widgets with what classes are available for styling (since [#927](https://github.com/Alexays/Waybar/pull/927)). To get this information, simply run Waybar with debug logging enabled: `waybar -l debug`. Each enabled bar's widget tree will be separately logged to the console. Example:
```
[2020-11-30 12:38:51.141] [debug] GTK widget tree:
window#waybar.background.bottom.eDP-1.:dir(ltr)
decoration:dir(ltr)
box.horizontal:dir(ltr)
box.horizontal.modules-left:dir(ltr)
widget:dir(ltr)
box#workspaces.horizontal:dir(ltr)
widget:dir(ltr)
label#mode:dir(ltr)
widget:dir(ltr)
box#window.horizontal.module:dir(ltr)
image:dir(ltr)
label:dir(ltr)
box.horizontal.modules-center:dir(ltr)
box.horizontal.modules-right:dir(ltr)
widget:dir(ltr)
box#tray.horizontal:dir(ltr)
widget:dir(ltr)
label#idle_inhibitor:dir(ltr)
widget:dir(ltr)
label#pulseaudio:dir(ltr)
widget:dir(ltr)
label#network:dir(ltr)
widget:dir(ltr)
label#cpu:dir(ltr)
widget:dir(ltr)
label#memory:dir(ltr)
widget:dir(ltr)
label#temperature:dir(ltr)
widget:dir(ltr)
label#backlight:dir(ltr)
widget:dir(ltr)
label#battery:dir(ltr)
widget:dir(ltr)
label#clock:dir(ltr)
```
## Minimal style
A minimal `style.css` file could look like this:
```css
* {
border: none;
border-radius: 0;
font-family: Roboto, Helvetica, Arial, sans-serif;
font-size: 13px;
min-height: 0;
}
window#waybar {
background: rgba(43, 48, 59, 0.5);
border-bottom: 3px solid rgba(100, 114, 125, 0.5);
color: white;
}
tooltip {
background: rgba(43, 48, 59, 0.5);
border: 1px solid rgba(100, 114, 125, 0.5);
}
tooltip label {
color: white;
}
#workspaces button {
padding: 0 5px;
background: transparent;
color: white;
border-bottom: 3px solid transparent;
}
#workspaces button.focused {
background: #64727D;
border-bottom: 3px solid white;
}
#mode, #clock, #battery {
padding: 0 10px;
}
#mode {
background: #64727D;
border-bottom: 3px solid white;
}
#clock {
background-color: #64727D;
}
#battery {
background-color: #ffffff;
color: black;
}
#battery.charging {
color: white;
background-color: #26A65B;
}
@keyframes blink {
to {
background-color: #ffffff;
color: black;
}
}
#battery.warning:not(.charging) {
background: #f53c3c;
color: white;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: steps(12);
animation-iteration-count: infinite;
animation-direction: alternate;
}
```
## Reduce CPU usage in animation
Animations using the CSS properties `animation-*` may lead to high CPU usage. This does not depend on Waybar, rather on the CSS engine that will render the element everytime it changes state.
`animation-timing-function` can be used with `steps()` instead of `linear` to reduce CPU usage. Like this:
```
animation-timing-function: steps(12);
```
The higher the value of `steps()`, the smoother the animation will be, but also CPU usage will increase. Alternatively decrease the frequency of state changes by increasing their duration. Like this:
```
animation-duration: 3.0s;
```
## Making Waybar follow the Gtk theme
Gtk CSS has some global theme variables, and by using these instead of hardcoded values, Waybar will automatically follow your Gtk theme. An example:
```css
window#waybar {
font-family: inherit;
background: @theme_base_color;
border-bottom: 1px solid @unfocused_borders;
color: @theme_text_color;
}
```
The Gtk theme variables can be further refined by using the `shade`, `mix`, and/or `alpha` modifiers. For example, if you want to make the bar 25 % lighter and 10 % transparent, you can style the background like this:
```css
window#waybar {
background: shade(alpha(@borders, 0.9), 1.25);
}
```
For a list of valid Gtk theme variables, check out [Gnome's stylesheet on Gitlab](https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gtk/theme/Adwaita/_colors-public.scss).

View File

@@ -1 +0,0 @@
Yes, that's it

View File

@@ -1 +0,0 @@
## # ###

View File

@@ -1 +0,0 @@
![250809-091208](https://raw.githubusercontent.com/berthosefin/dots/main/previews/2025-08-09-091208_hyprshot.png)

View File

@@ -1,25 +0,0 @@
Here is a list of known working tray applets.
### NetworkManager
NetworkManager is a program for providing detection and configuration for systems to automatically connect to networks. NetworkManager's functionality can be useful for both wireless and wired networks. For wireless networks, NetworkManager prefers known wireless networks and has the ability to switch to the most reliable network. NetworkManager-aware applications can switch from online and offline mode. NetworkManager also prefers wired connections over wireless ones, has support for modem connections and certain types of VPN.
To use this applet install networkmanager, enable `systemctl enable NetworkManager.service`, and add this to your sway config
```shell
exec --no-startup-id 'nm-applet --indicator'
```
### Blueman
Blueman is a full featured Bluetooth manager written in GTK.
To use this applet enable the [bluetooth daemon](https://wiki.archlinux.org/index.php/Bluetooth), install blueman, and add this to your sway config.
```shell
exec --no-startup-id 'blueman-applet'
```
### Electron Apps
Apps like slack, telegram, [caprine](https://github.com/sindresorhus/caprine), and discord should just work.

View File

@@ -1,26 +0,0 @@
# Writing Modules
A Waybar module is usually a class derived from the `waybar::ALabel` class,
which is itself derived from `waybar::AModule`. Modules can also be derived
directly from `waybar::AModule`.
Module source files should go in `src/modules/`, while their headers should be
in `include/modules/`. The source file should be added to `src_files` in
`meson.build` according the appropriate feature flag, which should be listed in
`meson_options.txt`. The module instantiation should be added in
`src/factory.cpp`, while the module's header should be included in
`include/factory.hpp`.
A basic module will write text into its `label_` member (inherited from
`ALabel`) using its `set_markup()` method. You will usually want to have some
way of changing the text in said label to respond to external events, which can
be achieved by defining `ALabel`'s virtual `auto update() -> void` method for
your class. This function will be called whenever the `emit()` method for the
`dp` member (inherited from `AModule`) is called. The `update()` method should
also call the `update()` method from its parent class: `ALabel::update();`.
The simplest way of reacting to external events is by creating a polling module.
This can be done by initializing `ALabel` with some value for the `interval`
parameter and adding an `util::Sleeper_Thread` variable to your class, which
requires including the `util/sleeper_thread.hpp` header. The sleeper thread
should then be configured similarly to how it's done in `src/modules/clock.cpp`.

View File

@@ -1,53 +0,0 @@
- [Home](./Home)
- [Installation](./Installation)
- [Configuration](./Configuration)
- [Styling](./Styling)
- [Examples](./Examples)
- [FAQ](./FAQ)
- Modules:
- [Backlight/Slider](./Module:-Backlight-Slider)
- [Backlight](./Module:-Backlight)
- [Battery](./Module:-Battery)
- [Bluetooth](./Module:-Bluetooth)
- [CPU](./Module:-CPU)
- [Cava](./Module:-Cava)
- [Frontend: raw](./Module:-Cava:-Raw)
- [Frontend: GLSL](./Module:-Cava:-GLSL)
- [CFFI](./Module:-CFFI)
- [Clock](./Module:-Clock)
- [Custom](./Module:-Custom)
- [Examples](./Module:-Custom:-Examples)
- [Third-party](./Module:-Custom:-Third-party)
- [Menu Popup Config](./Module:-Custom:-Menu)
- [DWL](./Module:-Dwl)
- [Disk](./Module:-Disk)
- [Gamemode](./Module:-Gamemode)
- [Group](./Module:-Group)
- [Hyprland](./Module:-Hyprland)
- [Idle Inhibitor](./Module:-Idle-Inhibitor)
- [Image](./Module:-Image)
- [JACK](./Module:-JACK)
- [Keyboard State](./Module:-Keyboard-State)
- [Language](./Module:-Language)
- [Load](./Module:-Load)
- [MPD](./Module:-MPD)
- [MPRIS](./Module:-MPRIS)
- [Memory](./Module:-Memory)
- [Network](./Module:-Network)
- [Niri](./Module:-Niri)
- [Power Profiles Daemon](./Module:-PowerProfilesDaemon)
- [Privacy](./Module:-Privacy)
- [PulseAudio/Slider](./Module:-PulseAudio-Slider)
- [PulseAudio](./Module:-PulseAudio)
- [River](./Module:-River)
- [Sndio](./Module:-Sndio)
- [Sway](./Module:-Sway)
- [Systemd failed units](./Module:-Systemd-failed-units)
- [Taskbar](./Module:-Taskbar)
- [Temperature](./Module:-Temperature)
- [Tray](./Module:-Tray)
- [UPower](./Module:-UPower)
- [User](./Module:-User)
- [WirePlumber](./Module:-WirePlumber)
- [Workspaces](./Module:-Workspaces)
- [Writing Modules](./Writing-Modules)

View File

@@ -1,2 +0,0 @@
![2025-05-12-233008_hyprshot](https://github.com/user-attachments/assets/71794639-8053-4428-ab3c-16fc74e1437b)
[config and styles](https://github.com/ApachaiZ/dotfiles/tree/main/waybar/.config/waybar)

View File

@@ -1,5 +0,0 @@
### Minimalistic blue waybar
![image](https://github.com/user-attachments/assets/83250b20-a715-42eb-bc63-6bed06694167)
[Config files](https://github.com/d00m1k/SimpleBlueColorWaybar)

View File

@@ -1 +0,0 @@
ref: refs/heads/master

View File

@@ -1,11 +0,0 @@
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = https://github.com/Alexays/Waybar.wiki.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master

View File

@@ -1 +0,0 @@
Unnamed repository; edit this file 'description' to name the repository.

View File

@@ -1,15 +0,0 @@
#!/bin/sh
#
# An example hook script to check the commit log message taken by
# applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit. The hook is
# allowed to edit the commit message file.
#
# To enable this hook, rename this file to "applypatch-msg".
. git-sh-setup
commitmsg="$(git rev-parse --git-path hooks/commit-msg)"
test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"}
:

View File

@@ -1,24 +0,0 @@
#!/bin/sh
#
# An example hook script to check the commit log message.
# Called by "git commit" with one argument, the name of the file
# that has the commit message. The hook should exit with non-zero
# status after issuing an appropriate message if it wants to stop the
# commit. The hook is allowed to edit the commit message file.
#
# To enable this hook, rename this file to "commit-msg".
# Uncomment the below to add a Signed-off-by line to the message.
# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
# hook is more suited to it.
#
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
# This example catches duplicate Signed-off-by lines.
test "" = "$(grep '^Signed-off-by: ' "$1" |
sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
echo >&2 Duplicate Signed-off-by lines.
exit 1
}

View File

@@ -1,174 +0,0 @@
#!/usr/bin/perl
use strict;
use warnings;
use IPC::Open2;
# An example hook script to integrate Watchman
# (https://facebook.github.io/watchman/) with git to speed up detecting
# new and modified files.
#
# The hook is passed a version (currently 2) and last update token
# formatted as a string and outputs to stdout a new update token and
# all files that have been modified since the update token. Paths must
# be relative to the root of the working tree and separated by a single NUL.
#
# To enable this hook, rename this file to "query-watchman" and set
# 'git config core.fsmonitor .git/hooks/query-watchman'
#
my ($version, $last_update_token) = @ARGV;
# Uncomment for debugging
# print STDERR "$0 $version $last_update_token\n";
# Check the hook interface version
if ($version ne 2) {
die "Unsupported query-fsmonitor hook version '$version'.\n" .
"Falling back to scanning...\n";
}
my $git_work_tree = get_working_dir();
my $retry = 1;
my $json_pkg;
eval {
require JSON::XS;
$json_pkg = "JSON::XS";
1;
} or do {
require JSON::PP;
$json_pkg = "JSON::PP";
};
launch_watchman();
sub launch_watchman {
my $o = watchman_query();
if (is_work_tree_watched($o)) {
output_result($o->{clock}, @{$o->{files}});
}
}
sub output_result {
my ($clockid, @files) = @_;
# Uncomment for debugging watchman output
# open (my $fh, ">", ".git/watchman-output.out");
# binmode $fh, ":utf8";
# print $fh "$clockid\n@files\n";
# close $fh;
binmode STDOUT, ":utf8";
print $clockid;
print "\0";
local $, = "\0";
print @files;
}
sub watchman_clock {
my $response = qx/watchman clock "$git_work_tree"/;
die "Failed to get clock id on '$git_work_tree'.\n" .
"Falling back to scanning...\n" if $? != 0;
return $json_pkg->new->utf8->decode($response);
}
sub watchman_query {
my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty')
or die "open2() failed: $!\n" .
"Falling back to scanning...\n";
# In the query expression below we're asking for names of files that
# changed since $last_update_token but not from the .git folder.
#
# To accomplish this, we're using the "since" generator to use the
# recency index to select candidate nodes and "fields" to limit the
# output to file names only. Then we're using the "expression" term to
# further constrain the results.
my $last_update_line = "";
if (substr($last_update_token, 0, 1) eq "c") {
$last_update_token = "\"$last_update_token\"";
$last_update_line = qq[\n"since": $last_update_token,];
}
my $query = <<" END";
["query", "$git_work_tree", {$last_update_line
"fields": ["name"],
"expression": ["not", ["dirname", ".git"]]
}]
END
# Uncomment for debugging the watchman query
# open (my $fh, ">", ".git/watchman-query.json");
# print $fh $query;
# close $fh;
print CHLD_IN $query;
close CHLD_IN;
my $response = do {local $/; <CHLD_OUT>};
# Uncomment for debugging the watch response
# open ($fh, ">", ".git/watchman-response.json");
# print $fh $response;
# close $fh;
die "Watchman: command returned no output.\n" .
"Falling back to scanning...\n" if $response eq "";
die "Watchman: command returned invalid output: $response\n" .
"Falling back to scanning...\n" unless $response =~ /^\{/;
return $json_pkg->new->utf8->decode($response);
}
sub is_work_tree_watched {
my ($output) = @_;
my $error = $output->{error};
if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) {
$retry--;
my $response = qx/watchman watch "$git_work_tree"/;
die "Failed to make watchman watch '$git_work_tree'.\n" .
"Falling back to scanning...\n" if $? != 0;
$output = $json_pkg->new->utf8->decode($response);
$error = $output->{error};
die "Watchman: $error.\n" .
"Falling back to scanning...\n" if $error;
# Uncomment for debugging watchman output
# open (my $fh, ">", ".git/watchman-output.out");
# close $fh;
# Watchman will always return all files on the first query so
# return the fast "everything is dirty" flag to git and do the
# Watchman query just to get it over with now so we won't pay
# the cost in git to look up each individual file.
my $o = watchman_clock();
$error = $output->{error};
die "Watchman: $error.\n" .
"Falling back to scanning...\n" if $error;
output_result($o->{clock}, ("/"));
$last_update_token = $o->{clock};
eval { launch_watchman() };
return 0;
}
die "Watchman: $error.\n" .
"Falling back to scanning...\n" if $error;
return 1;
}
sub get_working_dir {
my $working_dir;
if ($^O =~ 'msys' || $^O =~ 'cygwin') {
$working_dir = Win32::GetCwd();
$working_dir =~ tr/\\/\//;
} else {
require Cwd;
$working_dir = Cwd::cwd();
}
return $working_dir;
}

View File

@@ -1,8 +0,0 @@
#!/bin/sh
#
# An example hook script to prepare a packed repository for use over
# dumb transports.
#
# To enable this hook, rename this file to "post-update".
exec git update-server-info

View File

@@ -1,14 +0,0 @@
#!/bin/sh
#
# An example hook script to verify what is about to be committed
# by applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-applypatch".
. git-sh-setup
precommit="$(git rev-parse --git-path hooks/pre-commit)"
test -x "$precommit" && exec "$precommit" ${1+"$@"}
:

View File

@@ -1,49 +0,0 @@
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=$(git hash-object -t tree /dev/null)
fi
# If you want to allow non-ASCII filenames set this variable to true.
allownonascii=$(git config --type=bool hooks.allownonascii)
# Redirect output to stderr.
exec 1>&2
# Cross platform projects tend to avoid non-ASCII filenames; prevent
# them from being added to the repository. We exploit the fact that the
# printable range starts at the space character and ends with tilde.
if [ "$allownonascii" != "true" ] &&
# Note that the use of brackets around a tr range is ok here, (it's
# even required, for portability to Solaris 10's /usr/bin/tr), since
# the square bracket bytes happen to fall in the designated range.
test $(git diff-index --cached --name-only --diff-filter=A -z $against |
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
then
cat <<\EOF
Error: Attempt to add a non-ASCII file name.
This can cause problems if you want to work with people on other platforms.
To be portable it is advisable to rename the file.
If you know what you are doing you can disable this check using:
git config hooks.allownonascii true
EOF
exit 1
fi
# If there are whitespace errors, print the offending file names and fail.
exec git diff-index --check --cached $against --

View File

@@ -1,13 +0,0 @@
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git merge" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message to
# stderr if it wants to stop the merge commit.
#
# To enable this hook, rename this file to "pre-merge-commit".
. git-sh-setup
test -x "$GIT_DIR/hooks/pre-commit" &&
exec "$GIT_DIR/hooks/pre-commit"
:

View File

@@ -1,53 +0,0 @@
#!/bin/sh
# An example hook script to verify what is about to be pushed. Called by "git
# push" after it has checked the remote status, but before anything has been
# pushed. If this script exits with a non-zero status nothing will be pushed.
#
# This hook is called with the following parameters:
#
# $1 -- Name of the remote to which the push is being done
# $2 -- URL to which the push is being done
#
# If pushing without using a named remote those arguments will be equal.
#
# Information about the commits which are being pushed is supplied as lines to
# the standard input in the form:
#
# <local ref> <local oid> <remote ref> <remote oid>
#
# This sample shows how to prevent push of commits where the log message starts
# with "WIP" (work in progress).
remote="$1"
url="$2"
zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
while read local_ref local_oid remote_ref remote_oid
do
if test "$local_oid" = "$zero"
then
# Handle delete
:
else
if test "$remote_oid" = "$zero"
then
# New branch, examine all commits
range="$local_oid"
else
# Update to existing branch, examine new commits
range="$remote_oid..$local_oid"
fi
# Check for WIP commit
commit=$(git rev-list -n 1 --grep '^WIP' "$range")
if test -n "$commit"
then
echo >&2 "Found WIP commit in $local_ref, not pushing"
exit 1
fi
fi
done
exit 0

View File

@@ -1,169 +0,0 @@
#!/bin/sh
#
# Copyright (c) 2006, 2008 Junio C Hamano
#
# The "pre-rebase" hook is run just before "git rebase" starts doing
# its job, and can prevent the command from running by exiting with
# non-zero status.
#
# The hook is called with the following parameters:
#
# $1 -- the upstream the series was forked from.
# $2 -- the branch being rebased (or empty when rebasing the current branch).
#
# This sample shows how to prevent topic branches that are already
# merged to 'next' branch from getting rebased, because allowing it
# would result in rebasing already published history.
publish=next
basebranch="$1"
if test "$#" = 2
then
topic="refs/heads/$2"
else
topic=`git symbolic-ref HEAD` ||
exit 0 ;# we do not interrupt rebasing detached HEAD
fi
case "$topic" in
refs/heads/??/*)
;;
*)
exit 0 ;# we do not interrupt others.
;;
esac
# Now we are dealing with a topic branch being rebased
# on top of master. Is it OK to rebase it?
# Does the topic really exist?
git show-ref -q "$topic" || {
echo >&2 "No such branch $topic"
exit 1
}
# Is topic fully merged to master?
not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
if test -z "$not_in_master"
then
echo >&2 "$topic is fully merged to master; better remove it."
exit 1 ;# we could allow it, but there is no point.
fi
# Is topic ever merged to next? If so you should not be rebasing it.
only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
only_next_2=`git rev-list ^master ${publish} | sort`
if test "$only_next_1" = "$only_next_2"
then
not_in_topic=`git rev-list "^$topic" master`
if test -z "$not_in_topic"
then
echo >&2 "$topic is already up to date with master"
exit 1 ;# we could allow it, but there is no point.
else
exit 0
fi
else
not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
/usr/bin/perl -e '
my $topic = $ARGV[0];
my $msg = "* $topic has commits already merged to public branch:\n";
my (%not_in_next) = map {
/^([0-9a-f]+) /;
($1 => 1);
} split(/\n/, $ARGV[1]);
for my $elem (map {
/^([0-9a-f]+) (.*)$/;
[$1 => $2];
} split(/\n/, $ARGV[2])) {
if (!exists $not_in_next{$elem->[0]}) {
if ($msg) {
print STDERR $msg;
undef $msg;
}
print STDERR " $elem->[1]\n";
}
}
' "$topic" "$not_in_next" "$not_in_master"
exit 1
fi
<<\DOC_END
This sample hook safeguards topic branches that have been
published from being rewound.
The workflow assumed here is:
* Once a topic branch forks from "master", "master" is never
merged into it again (either directly or indirectly).
* Once a topic branch is fully cooked and merged into "master",
it is deleted. If you need to build on top of it to correct
earlier mistakes, a new topic branch is created by forking at
the tip of the "master". This is not strictly necessary, but
it makes it easier to keep your history simple.
* Whenever you need to test or publish your changes to topic
branches, merge them into "next" branch.
The script, being an example, hardcodes the publish branch name
to be "next", but it is trivial to make it configurable via
$GIT_DIR/config mechanism.
With this workflow, you would want to know:
(1) ... if a topic branch has ever been merged to "next". Young
topic branches can have stupid mistakes you would rather
clean up before publishing, and things that have not been
merged into other branches can be easily rebased without
affecting other people. But once it is published, you would
not want to rewind it.
(2) ... if a topic branch has been fully merged to "master".
Then you can delete it. More importantly, you should not
build on top of it -- other people may already want to
change things related to the topic as patches against your
"master", so if you need further changes, it is better to
fork the topic (perhaps with the same name) afresh from the
tip of "master".
Let's look at this example:
o---o---o---o---o---o---o---o---o---o "next"
/ / / /
/ a---a---b A / /
/ / / /
/ / c---c---c---c B /
/ / / \ /
/ / / b---b C \ /
/ / / / \ /
---o---o---o---o---o---o---o---o---o---o---o "master"
A, B and C are topic branches.
* A has one fix since it was merged up to "next".
* B has finished. It has been fully merged up to "master" and "next",
and is ready to be deleted.
* C has not merged to "next" at all.
We would want to allow C to be rebased, refuse A, and encourage
B to be deleted.
To compute (1):
git rev-list ^master ^topic next
git rev-list ^master next
if these match, topic has not merged in next at all.
To compute (2):
git rev-list master..topic
if this is empty, it is fully merged to "master".
DOC_END

View File

@@ -1,24 +0,0 @@
#!/bin/sh
#
# An example hook script to make use of push options.
# The example simply echoes all push options that start with 'echoback='
# and rejects all pushes when the "reject" push option is used.
#
# To enable this hook, rename this file to "pre-receive".
if test -n "$GIT_PUSH_OPTION_COUNT"
then
i=0
while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"
do
eval "value=\$GIT_PUSH_OPTION_$i"
case "$value" in
echoback=*)
echo "echo from the pre-receive-hook: ${value#*=}" >&2
;;
reject)
exit 1
esac
i=$((i + 1))
done
fi

View File

@@ -1,42 +0,0 @@
#!/bin/sh
#
# An example hook script to prepare the commit log message.
# Called by "git commit" with the name of the file that has the
# commit message, followed by the description of the commit
# message's source. The hook's purpose is to edit the commit
# message file. If the hook fails with a non-zero status,
# the commit is aborted.
#
# To enable this hook, rename this file to "prepare-commit-msg".
# This hook includes three examples. The first one removes the
# "# Please enter the commit message..." help message.
#
# The second includes the output of "git diff --name-status -r"
# into the message, just before the "git status" output. It is
# commented because it doesn't cope with --amend or with squashed
# commits.
#
# The third example adds a Signed-off-by line to the message, that can
# still be edited. This is rarely a good idea.
COMMIT_MSG_FILE=$1
COMMIT_SOURCE=$2
SHA1=$3
/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE"
# case "$COMMIT_SOURCE,$SHA1" in
# ,|template,)
# /usr/bin/perl -i.bak -pe '
# print "\n" . `git diff --cached --name-status -r`
# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;;
# *) ;;
# esac
# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE"
# if test -z "$COMMIT_SOURCE"
# then
# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE"
# fi

View File

@@ -1,78 +0,0 @@
#!/bin/sh
# An example hook script to update a checked-out tree on a git push.
#
# This hook is invoked by git-receive-pack(1) when it reacts to git
# push and updates reference(s) in its repository, and when the push
# tries to update the branch that is currently checked out and the
# receive.denyCurrentBranch configuration variable is set to
# updateInstead.
#
# By default, such a push is refused if the working tree and the index
# of the remote repository has any difference from the currently
# checked out commit; when both the working tree and the index match
# the current commit, they are updated to match the newly pushed tip
# of the branch. This hook is to be used to override the default
# behaviour; however the code below reimplements the default behaviour
# as a starting point for convenient modification.
#
# The hook receives the commit with which the tip of the current
# branch is going to be updated:
commit=$1
# It can exit with a non-zero status to refuse the push (when it does
# so, it must not modify the index or the working tree).
die () {
echo >&2 "$*"
exit 1
}
# Or it can make any necessary changes to the working tree and to the
# index to bring them to the desired state when the tip of the current
# branch is updated to the new commit, and exit with a zero status.
#
# For example, the hook can simply run git read-tree -u -m HEAD "$1"
# in order to emulate git fetch that is run in the reverse direction
# with git push, as the two-tree form of git read-tree -u -m is
# essentially the same as git switch or git checkout that switches
# branches while keeping the local changes in the working tree that do
# not interfere with the difference between the branches.
# The below is a more-or-less exact translation to shell of the C code
# for the default behaviour for git's push-to-checkout hook defined in
# the push_to_deploy() function in builtin/receive-pack.c.
#
# Note that the hook will be executed from the repository directory,
# not from the working tree, so if you want to perform operations on
# the working tree, you will have to adapt your code accordingly, e.g.
# by adding "cd .." or using relative paths.
if ! git update-index -q --ignore-submodules --refresh
then
die "Up-to-date check failed"
fi
if ! git diff-files --quiet --ignore-submodules --
then
die "Working directory has unstaged changes"
fi
# This is a rough translation of:
#
# head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX
if git cat-file -e HEAD 2>/dev/null
then
head=HEAD
else
head=$(git hash-object -t tree --stdin </dev/null)
fi
if ! git diff-index --quiet --cached --ignore-submodules $head --
then
die "Working directory has staged changes"
fi
if ! git read-tree -u -m "$commit"
then
die "Could not update working tree to new HEAD"
fi

View File

@@ -1,77 +0,0 @@
#!/bin/sh
# An example hook script to validate a patch (and/or patch series) before
# sending it via email.
#
# The hook should exit with non-zero status after issuing an appropriate
# message if it wants to prevent the email(s) from being sent.
#
# To enable this hook, rename this file to "sendemail-validate".
#
# By default, it will only check that the patch(es) can be applied on top of
# the default upstream branch without conflicts in a secondary worktree. After
# validation (successful or not) of the last patch of a series, the worktree
# will be deleted.
#
# The following config variables can be set to change the default remote and
# remote ref that are used to apply the patches against:
#
# sendemail.validateRemote (default: origin)
# sendemail.validateRemoteRef (default: HEAD)
#
# Replace the TODO placeholders with appropriate checks according to your
# needs.
validate_cover_letter () {
file="$1"
# TODO: Replace with appropriate checks (e.g. spell checking).
true
}
validate_patch () {
file="$1"
# Ensure that the patch applies without conflicts.
git am -3 "$file" || return
# TODO: Replace with appropriate checks for this patch
# (e.g. checkpatch.pl).
true
}
validate_series () {
# TODO: Replace with appropriate checks for the whole series
# (e.g. quick build, coding style checks, etc.).
true
}
# main -------------------------------------------------------------------------
if test "$GIT_SENDEMAIL_FILE_COUNTER" = 1
then
remote=$(git config --default origin --get sendemail.validateRemote) &&
ref=$(git config --default HEAD --get sendemail.validateRemoteRef) &&
worktree=$(mktemp --tmpdir -d sendemail-validate.XXXXXXX) &&
git worktree add -fd --checkout "$worktree" "refs/remotes/$remote/$ref" &&
git config --replace-all sendemail.validateWorktree "$worktree"
else
worktree=$(git config --get sendemail.validateWorktree)
fi || {
echo "sendemail-validate: error: failed to prepare worktree" >&2
exit 1
}
unset GIT_DIR GIT_WORK_TREE
cd "$worktree" &&
if grep -q "^diff --git " "$1"
then
validate_patch "$1"
else
validate_cover_letter "$1"
fi &&
if test "$GIT_SENDEMAIL_FILE_COUNTER" = "$GIT_SENDEMAIL_FILE_TOTAL"
then
git config --unset-all sendemail.validateWorktree &&
trap 'git worktree remove -ff "$worktree"' EXIT &&
validate_series
fi

View File

@@ -1,128 +0,0 @@
#!/bin/sh
#
# An example hook script to block unannotated tags from entering.
# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
#
# To enable this hook, rename this file to "update".
#
# Config
# ------
# hooks.allowunannotated
# This boolean sets whether unannotated tags will be allowed into the
# repository. By default they won't be.
# hooks.allowdeletetag
# This boolean sets whether deleting tags will be allowed in the
# repository. By default they won't be.
# hooks.allowmodifytag
# This boolean sets whether a tag may be modified after creation. By default
# it won't be.
# hooks.allowdeletebranch
# This boolean sets whether deleting branches will be allowed in the
# repository. By default they won't be.
# hooks.denycreatebranch
# This boolean sets whether remotely creating branches will be denied
# in the repository. By default this is allowed.
#
# --- Command line
refname="$1"
oldrev="$2"
newrev="$3"
# --- Safety check
if [ -z "$GIT_DIR" ]; then
echo "Don't run this script from the command line." >&2
echo " (if you want, you could supply GIT_DIR then run" >&2
echo " $0 <ref> <oldrev> <newrev>)" >&2
exit 1
fi
if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
echo "usage: $0 <ref> <oldrev> <newrev>" >&2
exit 1
fi
# --- Config
allowunannotated=$(git config --type=bool hooks.allowunannotated)
allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch)
denycreatebranch=$(git config --type=bool hooks.denycreatebranch)
allowdeletetag=$(git config --type=bool hooks.allowdeletetag)
allowmodifytag=$(git config --type=bool hooks.allowmodifytag)
# check for no description
projectdesc=$(sed -e '1q' "$GIT_DIR/description")
case "$projectdesc" in
"Unnamed repository"* | "")
echo "*** Project description file hasn't been set" >&2
exit 1
;;
esac
# --- Check types
# if $newrev is 0000...0000, it's a commit to delete a ref.
zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
if [ "$newrev" = "$zero" ]; then
newrev_type=delete
else
newrev_type=$(git cat-file -t $newrev)
fi
case "$refname","$newrev_type" in
refs/tags/*,commit)
# un-annotated tag
short_refname=${refname##refs/tags/}
if [ "$allowunannotated" != "true" ]; then
echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
exit 1
fi
;;
refs/tags/*,delete)
# delete tag
if [ "$allowdeletetag" != "true" ]; then
echo "*** Deleting a tag is not allowed in this repository" >&2
exit 1
fi
;;
refs/tags/*,tag)
# annotated tag
if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
then
echo "*** Tag '$refname' already exists." >&2
echo "*** Modifying a tag is not allowed in this repository." >&2
exit 1
fi
;;
refs/heads/*,commit)
# branch
if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
echo "*** Creating a branch is not allowed in this repository" >&2
exit 1
fi
;;
refs/heads/*,delete)
# delete branch
if [ "$allowdeletebranch" != "true" ]; then
echo "*** Deleting a branch is not allowed in this repository" >&2
exit 1
fi
;;
refs/remotes/*,commit)
# tracking branch
;;
refs/remotes/*,delete)
# delete tracking branch
if [ "$allowdeletebranch" != "true" ]; then
echo "*** Deleting a tracking branch is not allowed in this repository" >&2
exit 1
fi
;;
*)
# Anything else (is there anything else?)
echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
exit 1
;;
esac
# --- Finished
exit 0

View File

@@ -1,6 +0,0 @@
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~

View File

@@ -1 +0,0 @@
0000000000000000000000000000000000000000 ed4debace66ba7eabf02289e5c052c1260e5243f s0wlz (Matthias Puchstein) <matthias@puchstein.lu> 1766869604 +0100 clone: from https://github.com/Alexays/Waybar.wiki.git

View File

@@ -1 +0,0 @@
0000000000000000000000000000000000000000 ed4debace66ba7eabf02289e5c052c1260e5243f s0wlz (Matthias Puchstein) <matthias@puchstein.lu> 1766869604 +0100 clone: from https://github.com/Alexays/Waybar.wiki.git

View File

@@ -1 +0,0 @@
0000000000000000000000000000000000000000 ed4debace66ba7eabf02289e5c052c1260e5243f s0wlz (Matthias Puchstein) <matthias@puchstein.lu> 1766869604 +0100 clone: from https://github.com/Alexays/Waybar.wiki.git

View File

@@ -1,2 +0,0 @@
# pack-refs with: peeled fully-peeled sorted
ed4debace66ba7eabf02289e5c052c1260e5243f refs/remotes/origin/master

View File

@@ -1 +0,0 @@
ed4debace66ba7eabf02289e5c052c1260e5243f

View File

@@ -1 +0,0 @@
ref: refs/remotes/origin/master

Some files were not shown because too many files have changed in this diff Show More