config.json
1 |
|
2 |
// After the opening parentheses, you enter the Waybar "general config", which |
3 |
// configures the overall bar itself. |
4 |
// After that, you can give the name of a specific module, and open parentheses |
5 |
// for that as well, which configures for that module specifically. |
6 |
|
7 |
// NOTE: If I happen to get a weird feeling for music in the future, there are |
8 |
// some fine things available for MPD. |
9 |
|
10 |
{ |
11 |
"layer": "top", // Waybar at top layer |
12 |
"position": "left", // Waybar position (top|bottom|left|right) |
13 |
//"height": 30, // Waybar height (to be removed for auto height) |
14 |
"width": 63, // Waybar width |
15 |
// Choose the order of the modules |
16 |
"modules-left": ["sway/workspaces", "sway/mode"], |
17 |
"modules-center": ["sway/window"], |
18 |
//"modules-right": ["mpd", "idle_inhibitor", "pulseaudio", "network", "cpu", "memory", "temperature", "backlight", "battery", "battery#bat2", "clock", "tray"], |
19 |
//"modules-right": ["pulseaudio#output", "pulseaudio#input", "cpu", "network", |
20 |
"modules-right": ["pulseaudio#output", "pulseaudio#input", "cpu", |
21 |
"memory", "temperature", "backlight", "battery", "battery#bat2", "clock#day", "clock#date", "clock#time", "tray"], |
22 |
// Modules configuration |
23 |
// NOTE: To maintain order; configure the modules in the same order as they |
24 |
// appear in the bar itself (i.e. modules-left -> modules-center -> |
25 |
// modules-right), so this stays tidy and maitainable. |
26 |
|
27 |
"sway/workspaces": { |
28 |
"disable-scroll-wraparound": true, |
29 |
"all-outputs": true, |
30 |
"format": "{name} {icon}", |
31 |
"format-icons": { |
32 |
"1": "", |
33 |
"2": "", |
34 |
"3": "", |
35 |
"4": "", |
36 |
"5": "", |
37 |
"urgent": "", |
38 |
"focused": "", |
39 |
"default": "" |
40 |
} |
41 |
}, |
42 |
"sway/mode": { // Sway/mode is for things like when resizing |
43 |
"format": "<span style=\"italic\">{}</span>" |
44 |
}, |
45 |
|
46 |
"sway/window": { |
47 |
"rotate": 90 |
48 |
}, |
49 |
"pulseaudio#output": { |
50 |
"format": "{volume}% {icon}", |
51 |
"format-bluetooth": "{volume}% {icon} {format_source}", |
52 |
"format-muted": "", |
53 |
"format-icons": { |
54 |
"headphones": "", |
55 |
"handsfree": "", |
56 |
"headset": "", |
57 |
"phone": "", |
58 |
"portable": "", |
59 |
"car": "", |
60 |
"speaker": "", |
61 |
// The speaker icons don't show up... |
62 |
//"" |
63 |
//"speaker": ["", "", ""], |
64 |
"hdmi": "H", |
65 |
"hifi": "F", |
66 |
"default": "S" //["", "", ""] |
67 |
}, |
68 |
"on-click": "pavucontrol", |
69 |
"tooltip": false |
70 |
}, |
71 |
|
72 |
"pulseaudio#input": { |
73 |
"format": "{format_source}", |
74 |
"format-source": "{volume}% ", |
75 |
"format-source-muted": "{volume}% ", |
76 |
"on-click": "pavucontrol", |
77 |
"tooltip": false |
78 |
}, |
79 |
|
80 |
"cpu": { |
81 |
"format": "{usage}% ", |
82 |
"tooltip": false |
83 |
}, |
84 |
"memory": { |
85 |
"format": "{}% " |
86 |
}, |
87 |
"temperature": { |
88 |
// "thermal-zone": 2, |
89 |
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", |
90 |
"critical-threshold": 80, |
91 |
// "format-critical": "{temperatureC}°C {icon}", |
92 |
"format": "{temperatureC}°C {icon}", |
93 |
"format-icons": ["", "", ""] |
94 |
}, |
95 |
"backlight": { |
96 |
// "device": "acpi_video1", |
97 |
"format": "{percent}% {icon}", |
98 |
"format-icons": ["", ""] |
99 |
}, |
100 |
"battery": { |
101 |
"states": { |
102 |
// "good": 95, |
103 |
"warning": 30, |
104 |
"critical": 15 |
105 |
}, |
106 |
"format": "{capacity}% {icon}", |
107 |
"format-charging": "{capacity}% ", |
108 |
"format-plugged": "{capacity}% ", |
109 |
"format-alt": "{time} {icon}", |
110 |
// "format-good": "", // An empty format will hide the module |
111 |
// "format-full": "", |
112 |
"format-icons": ["", "", "", "", ""] |
113 |
}, |
114 |
"battery#bat2": { |
115 |
"bat": "BAT2" |
116 |
}, |
117 |
//"network": { |
118 |
//// "interface": "wlp2*", // (Optional) To force the use of this interface |
119 |
//// The ESSID or IFname aren't shown because it's too long |
120 |
//"format-wifi": "{signalStrength}% ", |
121 |
//"format-ethernet": "{bandwidthDownBits} ", |
122 |
//"format-linked": "{bandwidthDownBits} ", |
123 |
//"format-disconnected": " ", |
124 |
//"format": "{bandwidthDownBits}", |
125 |
//"tooltip": false |
126 |
//}, |
127 |
// The reason I'm using three clocks next to each other, is because if I use |
128 |
// %n in the format, the text doesn't align to the center anymore, which |
129 |
// looks ugly. And since I can't set text-align in the CSS, this is the |
130 |
// hack I came up with. |
131 |
"clock#day": { |
132 |
"tooltip": false, |
133 |
"interval": 3600, |
134 |
//"format": "{:%A <br /> %d/%m <br /> %H:%M}", |
135 |
//"format": "{:%a %n %d/%m %n %H:%M}" |
136 |
"format": "{:%a}" |
137 |
//"format": "{:%A}" // Did this previously but Wednesday was too long |
138 |
//"max-length": 50 |
139 |
//"format-alt": "{:%Y-%m-%d}" |
140 |
}, |
141 |
"clock#date": { |
142 |
"tooltip": false, |
143 |
"interval": 3600, |
144 |
"format": "{:%d %h}" |
145 |
}, |
146 |
"clock#time": { |
147 |
"tooltip": false, |
148 |
"interval": 1, |
149 |
//"format": "{:%H:%M}" |
150 |
"format": "{:%H:%M:%S}" |
151 |
}, |
152 |
"tray": { |
153 |
// "icon-size": 21, |
154 |
"spacing": 10 |
155 |
} |
156 |
} |
157 |