1{
2 pkgs,
3 inputs,
4 currentSystem,
5 ...
6}:
7let
8 custom = {
9 font = "Maple Mono";
10 font_size = "18px";
11 font_weight = "bold";
12 text_color = "#FBF1C7";
13 background_0 = "#1D2021";
14 background_1 = "#282828";
15 border_color = "#928374";
16 red = "#CC241D";
17 green = "#98971A";
18 yellow = "#FABD2F";
19 blue = "#458588";
20 magenta = "#B16286";
21 cyan = "#689D6A";
22 orange = "#D65D0E";
23 opacity = "1";
24 indicator_height = "2px";
25 };
26in
27{
28 programs.waybar.settings.mainBar = with custom; {
29 position = "top";
30 layer = "bottom";
31 height = 28;
32 margin-top = 0;
33 margin-bottom = 0;
34 margin-left = 0;
35 margin-right = 0;
36 modules-left = [
37 "custom/launcher"
38 "hyprland/workspaces"
39 ];
40 modules-center = [ "clock" ];
41 modules-right = [
42 "cpu"
43 "memory"
44 "pulseaudio"
45 "network"
46 "hyprland/language"
47 "tray"
48 "custom/notification"
49 "custom/power-menu"
50 ];
51 clock = {
52 calendar = {
53 format = {
54 today = "<span color='#98971A'><b>{}</b></span>";
55 };
56 };
57 format = " {:%H:%M}";
58 tooltip = "true";
59 tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
60 format-alt = " {:%d/%m}";
61 };
62 "hyprland/workspaces" = {
63 active-only = false;
64 disable-scroll = true;
65 format = "{icon}";
66 on-click = "activate";
67 format-icons = {
68 sort-by-number = true;
69 };
70 persistent-workspaces = {
71 "1" = [ ];
72 "2" = [ ];
73 "3" = [ ];
74 "4" = [ ];
75 "5" = [ ];
76 };
77 };
78 cpu = {
79 format = "<span foreground='${green}'> </span> {usage}%";
80 format-alt = "<span foreground='${green}'> </span> {avg_frequency} GHz";
81 interval = 2;
82 on-click-right = "${pkgs.hyprland}/bin/hyprctl dispatch exec '[float; center; size 950 650] ${pkgs.ghostty}/bin/ghostty --font-size=14 -e btop'";
83 };
84 memory = {
85 format = "<span foreground='${cyan}'>󰟜 </span>{}%";
86 format-alt = "<span foreground='${cyan}'>󰟜 </span>{used} GiB"; # 
87 interval = 2;
88 on-click-right = "${pkgs.hyprland}/bin/hyprctl dispatch exec '[float; center; size 950 650] ${pkgs.ghostty}/bin/ghostty --font-size=14 -e btop'";
89 };
90 disk = {
91 # path = "/";
92 format = "<span foreground='${orange}'>󰋊 </span>{percentage_used}%";
93 interval = 60;
94 on-click-right = "${pkgs.hyprland}/bin/hyprctl dispatch exec '[float; center; size 950 650] ${pkgs.ghostty}/bin/ghostty --font-size=14 -e btop'";
95 };
96 network = {
97 format-wifi = "<span foreground='${magenta}'> </span> {signalStrength}%";
98 format-ethernet = "<span foreground='${magenta}'>󰀂 </span>";
99 tooltip-format = "Connected to {essid} {ifname} via {gwaddr}";
100 format-linked = "{ifname} (No IP)";
101 format-disconnected = "<span foreground='${magenta}'>󰖪 </span>";
102 };
103 tray = {
104 icon-size = 20;
105 spacing = 8;
106 };
107 pulseaudio = {
108 format = "{icon} {volume}%";
109 format-muted = "<span foreground='${blue}'> </span> {volume}%";
110 format-icons = {
111 default = [ "<span foreground='${blue}'> </span>" ];
112 };
113 scroll-step = 2;
114 on-click = "${pkgs.pamixer}/bin/pamixer -t";
115 on-click-right = "${pkgs.pavucontrol}/bin/pavucontrol";
116 };
117 # battery = {
118 # format = "<span foreground='${yellow}'>{icon}</span> {capacity}%";
119 # format-icons = [
120 # " "
121 # " "
122 # " "
123 # " "
124 # " "
125 # ];
126 # format-charging = "<span foreground='${yellow}'> </span>{capacity}%";
127 # format-full = "<span foreground='${yellow}'> </span>{capacity}%";
128 # format-warning = "<span foreground='${yellow}'> </span>{capacity}%";
129 # interval = 5;
130 # states = {
131 # warning = 20;
132 # };
133 # format-time = "{H}h{M}m";
134 # tooltip = true;
135 # tooltip-format = "{time}";
136 # };
137 "hyprland/language" = {
138 tooltip = true;
139 tooltip-format = "Keyboard layout";
140 format = "<span foreground='#FABD2F'> </span> {}";
141 format-fr = "FR";
142 format-en = "US";
143 on-click = "${pkgs.hyprland}/bin/hyprctl switchxkblayout at-translated-set-2-keyboard next";
144 };
145 "custom/launcher" = {
146 format = "";
147 on-click = "random-wallpaper";
148 on-click-right = "${pkgs.vicinae}/bin/vicinae vicinae://toggle";
149 tooltip = "true";
150 tooltip-format = "Random Wallpaper";
151 };
152 "custom/notification" = {
153 tooltip = true;
154 tooltip-format = "Notifications";
155 format = "{icon}";
156 format-icons = {
157 notification = "<span foreground='red'><sup></sup></span>";
158 none = "";
159 dnd-notification = "<span foreground='red'><sup></sup></span>";
160 dnd-none = "";
161 inhibited-notification = "<span foreground='red'><sup></sup></span>";
162 inhibited-none = "";
163 dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>";
164 dnd-inhibited-none = "";
165 };
166 return-type = "json";
167 exec-if = "which swaync-client";
168 exec = "${pkgs.swaynotificationcenter}/bin/swaync-client -swb";
169 on-click = "${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw";
170 on-click-right = "${pkgs.swaynotificationcenter}/bin/swaync-client -d -sw";
171 escape = true;
172 };
173 "custom/power-menu" = {
174 tooltip = true;
175 tooltip-format = "Power menu";
176 format = "<span foreground='${red}'> </span>";
177 on-click = "power-menu";
178 };
179 };
180
181}