me like nix
1// -*- mode: jsonc -*-
2{
3 // "layer": "top", // Waybar at top layer
4 // "position": "bottom", // Waybar position (top|bottom|left|right)
5 "height": 8, // Waybar height (to be removed for auto height)
6 // "width": 1280, // Waybar width
7 "spacing": 0, // Gaps between modules (4px)
8 // Choose the order of the modules
9 "modules-left": [
10 "sway/workspaces",
11 "sway/mode",
12 "sway/scratchpad",
13 "custom/media"
14 ],
15 "modules-center": [
16 "sway/window"
17 ],
18 "modules-right": [
19 "mpd",
20 // "idle_inhibitor",
21 "pulseaudio",
22 "network",
23 "power-profiles-daemon",
24 "cpu",
25 "memory",
26 "temperature",
27 "backlight",
28 // "keyboard-state",
29 "sway/language",
30 "battery",
31 "battery#bat2",
32 "clock",
33 "tray",
34 "custom/power"
35 ],
36 // Modules configuration
37 // "sway/workspaces": {
38 // "disable-scroll": true,
39 // "all-outputs": true,
40 // "warp-on-scroll": false,
41 // "format": "{name}: {icon}",
42 // "format-icons": {
43 // "1": "",
44 // "2": "",
45 // "3": "",
46 // "4": "",
47 // "5": "",
48 // "urgent": "",
49 // "focused": "",
50 // "default": ""
51 // }
52 // },
53 "keyboard-state": {
54 "numlock": true,
55 "capslock": true,
56 "format": "{name} {icon}",
57 "format-icons": {
58 "locked": " ",
59 "unlocked": " "
60 }
61 },
62 "sway/mode": {
63 "format": "<span style=\"italic\">{}</span>"
64 },
65 "sway/scratchpad": {
66 "format": "{icon} {count}",
67 "show-empty": false,
68 "format-icons": ["", ""],
69 "tooltip": true,
70 "tooltip-format": "{app}: {title}"
71 },
72 "mpd": {
73 "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ",
74 "format-disconnected": "Disconnected ",
75 "format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ",
76 "unknown-tag": "N/A",
77 "interval": 5,
78 "consume-icons": {
79 "on": " "
80 },
81 "random-icons": {
82 "off": "<span color=\"#f53c3c\"></span> ",
83 "on": " "
84 },
85 "repeat-icons": {
86 "on": " "
87 },
88 "single-icons": {
89 "on": "1 "
90 },
91 "state-icons": {
92 "paused": "",
93 "playing": ""
94 },
95 "tooltip-format": "MPD (connected)",
96 "tooltip-format-disconnected": "MPD (disconnected)"
97 },
98 "idle_inhibitor": {
99 "format": "{icon}",
100 "format-icons": {
101 "activated": "",
102 "deactivated": ""
103 }
104 },
105 "tray": {
106 // "icon-size": 21,
107 "spacing": 10,
108 // "icons": {
109 // "blueman": "bluetooth",
110 // "TelegramDesktop": "$HOME/.local/share/icons/hicolor/16x16/apps/telegram.png"
111 // }
112 },
113 "clock": {
114 // "timezone": "America/New_York",
115 "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
116 "format-alt": "{:%Y-%m-%d}"
117 },
118 "cpu": {
119 "format": "{usage}% ",
120 "tooltip": false
121 },
122 "memory": {
123 "format": "{}% "
124 },
125 "temperature": {
126 // "thermal-zone": 2,
127 // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
128 "critical-threshold": 80,
129 // "format-critical": "{temperatureC}°C {icon}",
130 "format": "{temperatureC}°C {icon}",
131 "format-icons": ["", "", ""]
132 },
133 "backlight": {
134 // "device": "acpi_video1",
135 "format": "{percent}% {icon}",
136 "format-icons": ["", "", "", "", "", "", "", "", ""]
137 },
138 "battery": {
139 "states": {
140 // "good": 95,
141 "warning": 30,
142 "critical": 15
143 },
144 "format": "{capacity}% {icon}",
145 "format-full": "{capacity}% {icon}",
146 "format-charging": "{capacity}% ",
147 "format-plugged": "{capacity}% ",
148 "format-alt": "{time} {icon}",
149 // "format-good": "", // An empty format will hide the module
150 // "format-full": "",
151 "format-icons": ["", "", "", "", ""]
152 },
153 "battery#bat2": {
154 "bat": "BAT2"
155 },
156 "power-profiles-daemon": {
157 "format": "{icon}",
158 "tooltip-format": "Power profile: {profile}\nDriver: {driver}",
159 "tooltip": true,
160 "format-icons": {
161 "default": "",
162 "performance": "",
163 "balanced": " ",
164 "power-saver": " "
165 }
166 },
167 "network": {
168 // "interface": "wlp2*", // (Optional) To force the use of this interface
169 "format-wifi": "{essid} ({signalStrength}%) ",
170 "format-ethernet": "{ipaddr}/{cidr} ",
171 "tooltip-format": "{ifname} via {gwaddr} ",
172 "format-linked": "{ifname} (No IP) ",
173 "format-disconnected": "Disconnected ⚠",
174 "format-alt": "{ifname}: {ipaddr}/{cidr}"
175 },
176 "pulseaudio": {
177 // "scroll-step": 1, // %, can be a float
178 "format": "{volume}% {icon} {format_source}",
179 "format-bluetooth": "{volume}% {icon} {format_source}",
180 "format-bluetooth-muted": " {icon} {format_source}",
181 "format-muted": " {format_source}",
182 "format-source": "{volume}% ",
183 "format-source-muted": " ",
184 "format-icons": {
185 "headphone": "",
186 "hands-free": "",
187 "headset": "",
188 "phone": "",
189 "portable": "",
190 "car": "",
191 "default": ["", " ", " "]
192 },
193 "on-click": "pavucontrol"
194 },
195 "custom/media": {
196 "format": "{icon} {text}",
197 "return-type": "json",
198 "max-length": 40,
199 "format-icons": {
200 "spotify": " ",
201 "default": "🎜 "
202 },
203 "escape": true,
204 "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder
205 // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
206 },
207 "custom/power": {
208 "format" : "⏻ ",
209 "tooltip": false,
210 "menu": "on-click",
211 "menu-file": "$HOME/.config/waybar/power_menu.xml", // Menu file in resources folder
212 "menu-actions": {
213 "shutdown": "shutdown",
214 "reboot": "reboot",
215 "suspend": "systemctl suspend",
216 "hibernate": "systemctl hibernate"
217 }
218 }
219}