summaryrefslogtreecommitdiff
path: root/waybar/config.jsonc
blob: 4c55e55f6aa2a8dc9c95404b70fa1805a0fd6933 (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
72
73
{
    "layer": "top",
    "position": "top",
    "height": 30,
    "spacing": 4,
    "modules-left": [
        "niri/workspaces"
    ],
    "modules-center": [
        "clock",
        "custom/media",
        "custom/layout"
    ],
    "modules-right": [
        "pulseaudio",
        "memory",
        "custom/power",
        "tray"
    ],

    "niri/workspaces": {
        "format": "{idx}/10",
        "disable-scroll": true
    },

    "clock": {
        "format": "[{:%H:%M}]"
    },

    "custom/media": {
        "format": "▶ {}",
        "max-length": 40,
        "interval": 2,
        "exec": "playerctl metadata --format '{{ artist }} - {{ title }}' 2>/dev/null",
        "on-click": "playerctl play-pause"
    },

    "custom/layout": {
        "format": "[{}]",
        "interval": 0,
        "exec": "niri msg -j keyboard-layouts | jq -r 'if .current_idx == 0 then \"En\" elif .current_idx == 1 then \"Ru\" else .names[.current_idx] end'; niri msg event-stream | while read -r line; do if echo \"$line\" | grep -q 'Keyboard layouts changed'; then niri msg -j keyboard-layouts | jq -r 'if .current_idx == 0 then \"En\" elif .current_idx == 1 then \"Ru\" else .names[.current_idx] end'; fi; done"
    },

    "tray": {
        "spacing": 10
    },

    "pulseaudio": {
        "format": "VOL {icon} {volume}%",
        "format-muted": "VOL [x_x   ] 00%",
        "format-icons": [
            "[>       ]",
            "[=>      ]",
            "[==>     ]",
            "[===>    ]",
            "[====>   ]",
            "[=====>  ]",
            "[======> ]",
            "[=======>]"
        ],
        "on-click": "pavucontrol"
    },

    "memory": {
        "interval": 5,
        "format": "RAM [{percentage:02}%]"
    },

    "custom/power": {
        "format": "[ SYS ]",
        "on-click": "wlogout -b 2"
    }
}