|
3 | 3 | config, |
4 | 4 | ... |
5 | 5 | }: { |
6 | | - home.packages = with pkgs; [ |
7 | | - playerctl |
8 | | - ]; |
9 | 6 | programs.waybar = { |
10 | 7 | enable = true; |
11 | 8 | systemd = { |
|
14 | 11 | }; |
15 | 12 | settings = [ |
16 | 13 | { |
17 | | - "layer" = "top"; |
18 | | - "position" = "left"; |
19 | | - "reload_style_on_change" = true; |
20 | | - "modules-left" = [ |
21 | | - "group/top" |
22 | | - "idle_inhibitor" |
23 | | - "group/audio" |
24 | | - "pulseaudio#mic" |
25 | | - ]; |
26 | | - "modules-center" = [ |
| 14 | + layer = "top"; |
| 15 | + position = "left"; |
| 16 | + reload_style_on_change = true; |
| 17 | + modules-left = [ |
27 | 18 | "niri/workspaces" |
28 | 19 | ]; |
29 | | - "modules-right" = [ |
| 20 | + modules-center = [ |
| 21 | + "pulseaudio#mic" |
| 22 | + ]; |
| 23 | + modules-right = [ |
| 24 | + "group/audio" |
30 | 25 | "systemd-failed-units" |
31 | 26 | "tray" |
32 | 27 | "battery" |
33 | | - "clock" |
| 28 | + "idle_inhibitor" |
| 29 | + "group/bottom" |
34 | 30 | ]; |
35 | | - "battery" = { |
36 | | - "rotate" = 90; |
37 | | - "format" = ""; |
38 | | - "format-discharging" = "{icon} {capacity}% ({time})"; |
39 | | - "format-full" = ""; |
40 | | - "format-icons" = [ |
| 31 | + battery = { |
| 32 | + rotate = 90; |
| 33 | + format = ""; |
| 34 | + format-discharging = "{icon} {capacity}% ({time})"; |
| 35 | + format-full = ""; |
| 36 | + format-icons = [ |
41 | 37 | "" |
42 | 38 | "" |
43 | 39 | "" |
44 | 40 | "" |
45 | 41 | "" |
46 | 42 | ]; |
47 | | - "format-time" = "{H}h {m}m"; |
48 | | - "interval" = 10; |
49 | | - "states" = { |
50 | | - "critical" = 10; |
51 | | - "full" = 95; |
52 | | - "warning" = 30; |
| 43 | + format-time = "{H}h {m}m"; |
| 44 | + interval = 10; |
| 45 | + states = { |
| 46 | + critical = 10; |
| 47 | + full = 95; |
| 48 | + warning = 30; |
53 | 49 | }; |
54 | | - "tooltip" = true; |
| 50 | + tooltip = true; |
55 | 51 | }; |
56 | | - "clock" = { |
57 | | - "actions" = { |
58 | | - "on-click-right" = "mode"; |
59 | | - "on-scroll-down" = "shift_up"; |
60 | | - "on-scroll-up" = "shift_down"; |
| 52 | + clock = { |
| 53 | + actions = { |
| 54 | + # on-click-right = "mode"; |
| 55 | + # on-scroll-down = "shift_up"; |
| 56 | + # on-scroll-up = "shift_down"; |
61 | 57 | }; |
62 | | - "calendar" = { |
63 | | - "format" = { |
64 | | - "days" = "<span color='#dcd7ba'>{}</span>"; |
65 | | - "months" = "<span color='#dcd7ba'>{}</span>"; |
66 | | - "today" = "<span color='#c34043'><b>{}</b></span>"; |
67 | | - "weekdays" = "<span color='#dcd7ba'>{}</span>"; |
68 | | - "weeks" = "<span color='#727169'>W{}</span>"; |
| 58 | + calendar = { |
| 59 | + format = { |
| 60 | + days = "<span color='#dcd7ba'>{}</span>"; |
| 61 | + months = "<span color='#dcd7ba'>{}</span>"; |
| 62 | + today = "<span color='#c34043'><b>{}</b></span>"; |
| 63 | + weekdays = "<span color='#dcd7ba'>{}</span>"; |
| 64 | + weeks = "<span color='#727169'>W{}</span>"; |
69 | 65 | }; |
70 | | - "mode" = "month"; |
71 | | - "mode-mon-col" = 3; |
72 | | - "on-scroll" = 1; |
73 | | - "weeks-pos" = "left"; |
| 66 | + mode = "year"; |
| 67 | + mode-mon-col = 3; |
| 68 | + weeks-pos = "left"; |
74 | 69 | }; |
75 | | - "format" = "{:%H\n%M\n%S}"; |
76 | | - "interval" = 1; |
77 | | - "tooltip-format" = "<tt>{calendar}</tt>"; |
| 70 | + format = "{:%H\n%M\n%S}"; |
| 71 | + interval = 1; |
| 72 | + tooltip-format = "<tt>{calendar}</tt>"; |
78 | 73 | }; |
79 | | - "cpu" = { |
80 | | - "rotate" = 90; |
81 | | - "format" = " {usage}%"; |
82 | | - "interval" = 5; |
83 | | - "states" = { |
84 | | - "critical" = 90; |
85 | | - "warning" = 70; |
| 74 | + cpu = { |
| 75 | + rotate = 90; |
| 76 | + format = " {usage}%"; |
| 77 | + interval = 5; |
| 78 | + states = { |
| 79 | + critical = 90; |
| 80 | + warning = 70; |
86 | 81 | }; |
87 | 82 | }; |
88 | 83 | "custom/wincount" = { |
89 | | - "exec" = pkgs.writeScript "./wincount.sh" '' |
| 84 | + exec = pkgs.writeScript "./wincount.sh" '' |
90 | 85 | #!/bin/sh |
91 | 86 |
|
92 | 87 | idfocused="$(niri msg -j workspaces | jq ".[] | select(.is_focused == true ) | .id")" |
|
105 | 100 | esac |
106 | 101 | done |
107 | 102 | ''; |
108 | | - "on-scroll-down" = "niri msg action focus-column-right-or-first"; |
109 | | - "on-scroll-up" = "niri msg action focus-column-left-or-last"; |
| 103 | + on-scroll-down = "niri msg action focus-column-right-or-first"; |
| 104 | + on-scroll-up = "niri msg action focus-column-left-or-last"; |
110 | 105 | }; |
111 | | - "disk" = { |
112 | | - "rotate" = 90; |
113 | | - "format" = " {percentage_used}%"; |
114 | | - "interval" = 60; |
115 | | - "path" = "/nix"; |
| 106 | + disk = { |
| 107 | + rotate = 90; |
| 108 | + format = " {percentage_used}%"; |
| 109 | + interval = 60; |
| 110 | + path = "/nix"; |
116 | 111 | }; |
117 | | - "idle_inhibitor" = { |
118 | | - "format" = "{icon}"; |
119 | | - "format-icons" = { |
120 | | - "activated" = ""; |
121 | | - "deactivated" = ""; |
| 112 | + idle_inhibitor = { |
| 113 | + format = "{icon}"; |
| 114 | + format-icons = { |
| 115 | + activated = ""; |
| 116 | + deactivated = ""; |
122 | 117 | }; |
123 | 118 | }; |
124 | 119 | "group/audio" = { |
125 | | - "orientation" = "inherit"; |
126 | | - "drawer" = { |
127 | | - "children-class" = "in-group"; |
| 120 | + orientation = "inherit"; |
| 121 | + drawer = { |
| 122 | + children-class = "in-group"; |
| 123 | + transition-left-to-right = false; |
128 | 124 | }; |
129 | | - "modules" = [ |
| 125 | + modules = [ |
130 | 126 | "pulseaudio" |
131 | 127 | "pulseaudio/slider" |
132 | 128 | ]; |
133 | 129 | }; |
134 | | - "group/top" = { |
135 | | - "orientation" = "inherit"; |
136 | | - "drawer" = { |
137 | | - "click-to-reveal" = true; |
138 | | - "children-class" = "in-group"; |
| 130 | + "group/bottom" = { |
| 131 | + orientation = "inherit"; |
| 132 | + drawer = { |
| 133 | + click-to-reveal = true; |
| 134 | + transition-left-to-right = false; |
| 135 | + children-class = "in-group"; |
139 | 136 | }; |
140 | | - "modules" = [ |
141 | | - "custom/wincount" |
| 137 | + modules = [ |
| 138 | + "clock" |
142 | 139 | "cpu" |
143 | 140 | "memory" |
144 | 141 | "disk" |
145 | 142 | ]; |
146 | 143 | }; |
147 | | - "memory" = { |
148 | | - "rotate" = 90; |
149 | | - "format" = " {percentage}%"; |
150 | | - "interval" = 5; |
151 | | - "states" = { |
152 | | - "critical" = 90; |
153 | | - "warning" = 85; |
| 144 | + memory = { |
| 145 | + rotate = 90; |
| 146 | + format = " {percentage}%"; |
| 147 | + interval = 5; |
| 148 | + states = { |
| 149 | + critical = 90; |
| 150 | + warning = 85; |
154 | 151 | }; |
155 | 152 | }; |
156 | 153 | "niri/window" = { |
157 | | - "rotate" = 90; |
158 | | - "format" = "{}"; |
159 | | - "on-scroll-down" = "niri msg action focus-column-right"; |
160 | | - "on-scroll-up" = "niri msg action focus-column-left"; |
161 | | - "separate-outputs" = true; |
| 154 | + rotate = 90; |
| 155 | + format = "{}"; |
| 156 | + on-scroll-down = "niri msg action focus-column-right"; |
| 157 | + on-scroll-up = "niri msg action focus-column-left"; |
| 158 | + separate-outputs = true; |
162 | 159 | }; |
163 | 160 | "niri/workspaces" = { |
164 | | - "format" = "<span weight='1000'>{icon}</span>"; |
165 | | - "format-icons" = { |
166 | | - "active" = ""; # |
167 | | - "default" = ""; # |
| 161 | + format = "<span weight='1000'>{icon}</span>"; |
| 162 | + format-icons = { |
| 163 | + active = ""; # |
| 164 | + default = ""; # |
168 | 165 | }; |
169 | | - "on-scroll-down" = "niri msg action focus-workspace-down"; |
170 | | - "on-scroll-up" = "niri msg action focus-workspace-up"; |
171 | | - "on-update" = "niri msg -j workspaces | jq -r '.[]|select(.name!=null)|select(.active_window_id==null)|select(.is_active==false).name' | xargs -I{} niri msg action unset-workspace-name {}"; |
| 166 | + on-scroll-down = "niri msg action focus-workspace-down"; |
| 167 | + on-scroll-up = "niri msg action focus-workspace-up"; |
| 168 | + on-update = "niri msg -j workspaces | jq -r '.[]|select(.name!=null)|select(.active_window_id==null)|select(.is_active==false).name' | xargs -I{} niri msg action unset-workspace-name {}"; |
172 | 169 | }; |
173 | | - "pulseaudio" = { |
174 | | - "format" = "{icon}"; |
175 | | - "format-bluetooth" = "{icon}\n "; |
176 | | - "format-icons" = { |
177 | | - "default" = ""; |
178 | | - "speaker" = ""; |
179 | | - "speaker-muted" = ""; |
| 170 | + pulseaudio = { |
| 171 | + format = "{icon}"; |
| 172 | + format-bluetooth = "{icon}\n "; |
| 173 | + format-icons = { |
| 174 | + default = ""; |
| 175 | + speaker = ""; |
| 176 | + speaker-muted = ""; |
180 | 177 | }; |
181 | | - "format-muted" = "{icon}"; |
182 | | - "format-bluetooth-muted" = "{icon}\n "; |
183 | | - "format-source" = ""; |
184 | | - "format-source-muted" = ""; |
185 | | - "on-click" = "${pkgs.pavucontrol}/bin/pavucontrol"; |
186 | | - "on-click-middle" = "${pkgs.pulseaudio}/bin/pactl set-default-sink $(${pkgs.pulseaudio}/bin/pactl list sinks short | ${pkgs.gnugrep}/bin/grep -v $(${pkgs.pulseaudio}/bin/pactl get-default-sink) | ${pkgs.coreutils}/bin/cut -f 1 | ${pkgs.coreutils}/bin/head -1)"; |
| 178 | + format-muted = "{icon}"; |
| 179 | + format-bluetooth-muted = "{icon}\n "; |
| 180 | + format-source = ""; |
| 181 | + format-source-muted = ""; |
| 182 | + on-click = "${pkgs.pavucontrol}/bin/pavucontrol"; |
| 183 | + on-click-middle = "${pkgs.pulseaudio}/bin/pactl set-default-sink $(${pkgs.pulseaudio}/bin/pactl list sinks short | ${pkgs.gnugrep}/bin/grep -v $(${pkgs.pulseaudio}/bin/pactl get-default-sink) | ${pkgs.coreutils}/bin/cut -f 1 | ${pkgs.coreutils}/bin/head -1)"; |
187 | 184 | }; |
188 | 185 | "pulseaudio#mic" = { |
189 | | - "format" = "{format_source}"; |
190 | | - "format-source" = ""; |
191 | | - "format-source-muted" = ""; |
192 | | - "tooltip" = false; |
193 | | - "on-click" = "bash -c '${pkgs.swayosd}/bin/swayosd-client --input-volume=mute-toggle && pkill -SIGRTMIN+4 waybar'"; |
| 186 | + format = "{format_source}"; |
| 187 | + format-source = ""; |
| 188 | + format-source-muted = ""; |
| 189 | + tooltip = false; |
| 190 | + on-click = "bash -c '${pkgs.swayosd}/bin/swayosd-client --input-volume=mute-toggle && pkill -SIGRTMIN+4 waybar'"; |
194 | 191 | }; |
195 | 192 | "pulseaudio/slider" = { |
196 | | - "orientation" = "vertical"; |
| 193 | + orientation = "vertical"; |
197 | 194 | }; |
198 | | - "systemd-failed-units" = { |
199 | | - "hide-on-ok" = true; |
200 | | - "format" = ""; |
201 | | - "system" = true; |
202 | | - "user" = true; |
| 195 | + systemd-failed-units = { |
| 196 | + hide-on-ok = true; |
| 197 | + format = ""; |
| 198 | + system = true; |
| 199 | + user = true; |
203 | 200 | }; |
204 | 201 | } |
205 | 202 | ]; |
|
233 | 230 |
|
234 | 231 | /* workspaces */ |
235 | 232 | #workspaces { |
236 | | - padding: 3em 0em; |
| 233 | + padding: 0em 0em 12em 0em; |
237 | 234 | } |
238 | 235 | #workspaces button { |
239 | 236 | color: inherit; /* needed for some reason */ |
|
292 | 289 | color: #${config.colors.background}; |
293 | 290 | background-color: #${config.colors.red}; |
294 | 291 | } |
| 292 | +
|
295 | 293 | #systemd-failed-units { |
296 | 294 | color: #${config.colors.red}; |
297 | 295 | } |
|
0 commit comments