11{
22 lib ,
33 config ,
4+ pkgs ,
5+ inputs ,
46 options ,
57 ...
68} : let
79 username = config . conf . username ;
10+ base16 = pkgs . callPackage inputs . base16 . lib { } ;
11+ scheme = base16 . mkSchemeAttrs config . stylix . base16Scheme ;
812in {
913 options . mods = {
1014 hyprland . ironbar = {
2226 Use preconfigured ironbar config.
2327 '' ;
2428 } ;
29+ modules = lib . mkOption {
30+ default = [ ] ;
31+ example = [
32+ {
33+ type = "upower" ;
34+ class = "memory-usage" ;
35+ }
36+ ] ;
37+ type = with lib . types ; listOf attrs ;
38+ description = ''
39+ Adds modules to ironbar. See https://github.com/JakeStanger/ironbar/wiki/ for more information.
40+ '' ;
41+ } ;
2542 customConfig = lib . mkOption {
2643 default = { } ;
2744 example = { } ;
6178 style =
6279 if config . mods . hyprland . ironbar . useDefaultCss
6380 then
81+ /*
82+ css
83+ */
6484 ''
6585 @import url("/home/${ username } /.config/gtk-3.0/gtk.css");
6686
6787 * {
68- color: #71bbe6 ;
88+ color: #${ scheme . base0D } ;
6989 padding: 0px;
7090 margin: 0px;
7191 }
7797 .workspaces {
7898 margin: 2px 0px 0px 5px;
7999 border-radius: 10px;
80- /* background-color: #2b2c3b; */
81- background-color: #1E1E2E;
100+ background-color: #${ scheme . base00 } ;
82101 padding: 2px 5px 2px 5px;
83102 }
84103
@@ -91,16 +110,16 @@ in {
91110 }
92111
93112 .workspaces .item:hover {
94- background-color: #3e4152 ;
113+ background-color: #${ scheme . base02 } ;
95114 }
96115
97116 .workspaces .item.focused {
98- background-color: #3e4152 ;
117+ background-color: #${ scheme . base02 } ;
99118 }
100119
101120 .audio-box {
102121 padding: 2em;
103- background-color: #1E1E2E ;
122+ background-color: #${ scheme . base00 } ;
104123 border-radius: 5px;
105124 }
106125
@@ -121,18 +140,16 @@ in {
121140 }
122141
123142 .focused {
124- /* margin: 2px 0px 0px 0px; */
125143 padding: 0px 5px 0px 5px;
126- /* background-color: 1a1b26; */
127- background-color: #1E1E2E;
144+ background-color: #${ scheme . base00 } ;
128145 font-size: 17px;
129146 border-radius: 10px;
130147 }
131148
132149 #bar #end {
133150 margin: 0px 5px 0px 0px;
134151 padding: 0px 5px 0px 5px;
135- background-color: #1E1E2E ;
152+ background-color: #${ scheme . base00 } ;
136153 border-radius: 10px;
137154 }
138155
141158 margin: 0em 3px;
142159 border-radius: 100%;
143160 font-size: 13px;
144- background-color: #1E1E2E ;
161+ background-color: #${ scheme . base00 } ;
145162 }
146163
147164 .popup-button-box {
@@ -151,19 +168,19 @@ in {
151168 .clock {
152169 padding: 0px 5px 0px 5px;
153170 font-size: 17px;
154- background-color: #1E1E2E ;
171+ background-color: #${ scheme . base00 } ;
155172 }
156173
157174 .clock:hover {
158- background-color: #3e4152 ;
175+ background-color: #${ scheme . base02 } ;
159176 }
160177
161178 .custom button {
162- background-color: #1E1E2E ;
179+ background-color: #${ scheme . base00 } ;
163180 }
164181
165182 .custom button:hover {
166- background-color: #3e4152 ;
183+ background-color: #${ scheme . base02 } ;
167184 }
168185
169186 .memory-usage {
@@ -172,11 +189,11 @@ in {
172189 }
173190
174191 .memory-usage:hover {
175- background-color: #3e4152 ;
192+ background-color: #${ scheme . base02 } ;
176193 }
177194
178195 .popup-clock {
179- background-color: #1E1E2E ;
196+ background-color: #${ scheme . base00 } ;
180197 border-radius: 5px;
181198 padding: 2px 8px 10px 8px;
182199 }
192209 }
193210
194211 .popup-clock .calendar:selected {
195- background-color: #3e4152 ;
212+ background-color: #${ scheme . base02 } ;
196213 }
197214 ''
198215 + config . mods . hyprland . ironbar . customCss
@@ -206,11 +223,11 @@ in {
206223 then
207224 {
208225 end =
209- config . conf . ironbar . modules
226+ config . mods . hyprland . ironbar . modules
210227 ++ [
211228 {
212229 type = "sys_info" ;
213- format = [ " {memory_percent}" ] ;
230+ format = [ " {memory_percent}" ] ;
214231 interval . memory = 30 ;
215232 class = "memory-usage" ;
216233 }
0 commit comments