summaryrefslogtreecommitdiff
path: root/.config/waybar/config.jsonc
blob: 66654ce36dc137120fbd81cd8b651b00bb350b36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
    "layer": "top", // Waybar at top layer
    "position": "top", // Waybar position (top|bottom|left|right)
    // "width": 1280, // Waybar width
    // Choose the order of the modules
    "modules-left": ["sway/workspaces"],
    "modules-center": ["custom/music"],
    "modules-right": ["wireplumber", "backlight", "battery", "clock", "tray", "custom/lock", "custom/power"],
    "sway/workspaces": {
         "disable-scroll": true,
         "sort-by-name": true,
         "format": " {icon} ",
         "format-icons": {
             "default": " ",
         },
     },
    "tray": {
        "icon-size": 21,
        "spacing": 10
    },
    "custom/music": {
        "format": "  {}",
        "escape": true,
        "interval": 5,
        "tooltip": false,
        "exec": "playerctl metadata --format='{{ title }} | {{ artist }}'",
        "on-click": "playerctl play-pause",
        "max-length": 50
    },
    "clock": {
        "timezone": "Europe/London",
        "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
        "format-alt": " {:%d/%m/%Y}",
        "format": "  {:%H:%M}"
    },
    "backlight": {
        "device": "intel_backlight",
        "format": "{icon}",
        "format-icons": ["", "", "", "", "", "", "", "", ""]
    },
    "battery": {
        "states": {
            "warning": 30,
            "critical": 15
        },
        "format": "{icon} {capacity}%",
        "format-charging": "󰂄 {capacity}%",
        "format-plugged": "󰂄 {capacity}%",
        "format-alt": "{icon} {capacity}%",
        "format-icons": ["", "", "", "", ""]
    },
    "wireplumber": {
        // "scroll-step": 1, // %, can be a float
        "format": "{icon} {volume}%",
        "format-muted": "",
        "format-icons": {
            "default": ["", "", " "]
        },
        "on-click": "pavucontrol"
    },
    "custom/lock": {
        "tooltip": false,
        "on-click": "sh -c '(sleep 0.5s; swaylock --grace 0)' & disown",
        "format": "",
    },
    "custom/power": {
        "tooltip": false,
        "on-click": "swaymsg exit &",
        "format": "⏻ "
    }
}