dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
modules/desktop/gnome/_settings/extensions.nix (18828B)
1{files ? null, ...}: {
2 config,
3 lib,
4 pkgs,
5 osConfig ? null,
6 ...
7}:
8lib.mkIf (osConfig != null) (
9 let
10 inherit
11 (builtins)
12 filter
13 genList
14 hasAttr
15 map
16 toString
17 ;
18
19 inherit
20 (lib)
21 foldr
22 getExe
23 hm
24 listToAttrs
25 mkForce
26 nameValuePair
27 optionals
28 recursiveUpdate
29 ;
30
31 inherit (osConfig.lib.stylix) colors;
32
33 # Shell Extensions
34 extensions = with pkgs.gnomeExtensions // hm.gvariant; (
35 [
36 {package = appindicator;}
37 {package = arrange-windows;}
38 {package = disconnect-wifi;}
39 {package = display-configuration-switcher;}
40 {package = gsconnect;}
41 {package = guillotine;}
42 {package = hide-minimized;}
43 {package = media-progress;}
44 {package = night-light-slider-updated;}
45 {package = notification-counter;}
46 {package = removable-drive-menu;}
47 {package = screenshot-window-sizer;}
48 {package = unmess;}
49 {package = window-state-manager;}
50 {
51 package = workspace-indicator;
52 disable = true;
53 }
54 {
55 package = gpu-supergfxctl-switch;
56 disable = !osConfig.services.supergfxd.enable;
57 }
58 {
59 package = solaar-extension;
60 disable = !osConfig.hardware.logitech.wireless.enableGraphical;
61 }
62 {
63 package = syncthing-indicator;
64 name = "syncthing";
65 disable = !config.services.syncthing.enable;
66 settings.auto-start = false;
67 }
68 {
69 package = top-bar-organizer;
70 settings = {
71 center-box-order = ["dateMenu"];
72 left-box-order = [
73 "activities"
74 "arrange-menu"
75 "tilingshell@ferrarodomenico.com"
76 "guillotine"
77 "guillotine@fopdoodle.net"
78 "appMenu"
79 ];
80
81 right-box-order = [
82 "emoji-copy@felipeftn"
83 "a11y"
84 "aggregateMenu"
85 "drive-menu"
86 "copyous@boerdereinar.dev"
87 "vitalsMenu"
88 "dwellClick"
89 "color-picker@tuberry"
90 "gamemodeshellextension@trsnaqe.com"
91 "lockkeys"
92 "keyboard"
93 "screenSharing"
94 "screenRecording"
95 "quickSettings"
96 ];
97 };
98 }
99 {package = app-name-indicator;}
100 {
101 package = status-area-horizontal-spacing;
102 settings.hpadding = 4;
103 }
104 {
105 package = autohide-battery;
106 settings.hide-on = 80;
107 }
108 {
109 package = color-picker;
110 settings.enable-format = true;
111 }
112 {
113 package = focus-follows-workspace;
114 settings.move-cursor = true;
115 }
116 {
117 package = fullscreen-avoider;
118 settings = {
119 move-hot-corners = true;
120 move-notifications = true;
121 };
122 }
123 {
124 package = gamemode-shell-extension;
125 name = "gamemodeshellextension";
126 settings.show-icon-only-when-active = true;
127 }
128 {
129 package = lock-keys;
130 name = "lockkeys";
131 settings.always-show-icon = false;
132 }
133 {
134 package = user-themes;
135 name = "user-theme";
136 settings.name = mkForce "custom";
137 }
138 {
139 package = bluetooth-battery-meter;
140 name = "Bluetooth-Battery-Meter";
141 settings = {
142 disable-level-in-icon = true;
143 enable-battery-indicator-text = false;
144 enable-battery-level-icon = false;
145 enable-battery-level-text = false;
146 enable-multi-indicator-mode = false;
147 enable-sony-device = true;
148 enable-upower-level-icon = true;
149 hide-bluetooth-indicator = 0;
150 indicator-type = 1;
151 level-indicator-color = 0;
152 level-indicator-type = 0;
153 popup-in-quick-settings = false;
154 swap-icon-text = false;
155 };
156 }
157 {
158 package = brightness-control-using-ddcutil;
159 disable = true;
160 settings = {
161 button-location = 1;
162 ddcutil-binary-path = getExe pkgs.ddcutil;
163 hide-system-indicator = true;
164 increase-brightness-shortcut = ["<Shift>XF86MonBrightnessUp"];
165 decrease-brightness-shortcut = ["<Shift>XF86MonBrightnessDown"];
166 };
167 }
168 {
169 package = caffeine;
170 settings = {
171 indicator-position = 0;
172 nightlight-control = "never";
173 show-indicator = "always";
174 show-notifications = false;
175 inhibit-apps = [
176 "startcenter.desktop"
177 "virt-manager.desktop"
178 ];
179 };
180 }
181 {
182 package = copyous;
183 settings = {
184 auto-hide-search = false;
185 clipboard-orientation = "horizontal";
186 clipboard-position-horizontal = "fill";
187 clipboard-position-vertical = "bottom";
188 clipboard-history = "keep-all";
189 clipboard-size = 700;
190 disable-hljs-dialog = false;
191 header-controls-visibility = "visible-on-hover";
192 history-length = 250;
193 open-clipboard-dialog-shortcut = ["<Super>v"];
194 show-at-cursor = false;
195 show-at-pointer = false;
196 show-indicator = true;
197 toggle-incognito-mode-shortcut = ["<Control><Super>v"];
198 wiggle-indicator = true;
199 };
200 }
201 {
202 package = coverflow-alt-tab;
203 name = "coverflowalttab";
204 settings = {
205 hide-panel = false;
206 highlight-mouse-over = false;
207 icon-style = "Classic";
208 position = "Bottom";
209 raise-mouse-over = true;
210 switch-per-monitor = true;
211 switcher-looping-method = "Flip Stack";
212 switcher-style = "Coverflow";
213 };
214 }
215 {
216 package = emoji-copy;
217 settings = {
218 active-keybind = true;
219 always-show = false;
220 emoji-keybind = ["<Super><Shift>e"];
221 paste-on-select = true;
222 };
223 }
224 {
225 package = focus-changer;
226 settings = {
227 focus-down = ["<Super>s"];
228 focus-left = ["<Super>a"];
229 focus-right = ["<Super>d"];
230 focus-up = ["<Super>w"];
231 };
232 }
233 {
234 package = notification-configurator;
235 settings = {
236 notification-position = "center";
237 block-list = "[]";
238 app-themes = ''
239 {"poweralertd":{"appNameColor":[0.9647058844566345,0.3803921639919281,0.3176470696926117,1],"timeColor":[0.6,0.6,0.607843137,1],"backgroundColor":[0.329411765,0.329411765,0.352941176,1],"titleColor":[0.992156863,0.992156863,0.992156863,1],"bodyColor":[0.992156863,0.992156863,0.992156863,1],"appNameFontSize":18,"timeFontSize":14,"titleFontSize":14,"bodyFontSize":18}}
240 '';
241 };
242 }
243 {
244 package = shortcuts;
245 settings = {
246 maxcolumns = 3;
247 shortcuts-file = files.gnome.shortcuts;
248 shortcuts-toggle-overview = ["<Super>slash"];
249 show-icon = false;
250 use-custom-shortcuts = true;
251 use-transparency = true;
252 visibility = 55;
253 };
254 }
255 {
256 package = tiling-shell;
257 name = "tilingshell";
258 settings = {
259 enable-blur-selected-tilepreview = false;
260 enable-blur-snap-assistant = false;
261 enable-snap-assist = false;
262 enable-tiling-system = true;
263 enable-tiling-system-windows-suggestions = true;
264 enable-window-border = false;
265 override-window-menu = true;
266 restore-window-original-size = true;
267 tiling-system-activation-key = ["0"];
268 top-edge-maximize = true;
269 window-border-width = mkUint32 2;
270 inner-gaps = mkUint32 5;
271 outer-gaps = mkUint32 5;
272 move-window-down = ["<Shift><Super>s"];
273 move-window-left = ["<Shift><Super>a"];
274 move-window-right = ["<Shift><Super>d"];
275 move-window-up = ["<Shift><Super>w"];
276 };
277 }
278 {
279 package = user-avatar-in-quick-settings;
280 name = "quick-settings-avatar";
281 settings = {
282 avatar-position = 1;
283 avatar-realname = false;
284 avatar-size = 56;
285 };
286 }
287 {
288 package = vitals;
289 settings = {
290 hot-sensors = ["_default_icon_"];
291 show-battery = true;
292 show-storage = false;
293 show-gpu = true;
294 include-static-gpu-info = false;
295 };
296 }
297 {
298 package = window-gestures;
299 name = "windowgestures";
300 settings = {
301 fn-fullscreen = true;
302 fn-maximized-snap = true;
303 fn-move = true;
304 fn-move-snap = true;
305 fn-resize = true;
306 pinch-enable = true;
307 pinch3-in = 0;
308 pinch3-out = 0;
309 pinch4-in = 14;
310 pinch4-out = 3;
311 swipe3-down = 1;
312 swipe4-updown = 22;
313 taphold-move = true;
314 three-finger = false;
315 use-active-window = true;
316 };
317 }
318 {
319 package = workspace-switcher-manager;
320 settings = {
321 active-show-win-title = false;
322 active-show-ws-name = true;
323 inactive-show-ws-name = true;
324 modifiers-hide-popup = true;
325 monitor = 0;
326 popup-mode = 0;
327 popup-opacity = 100;
328 vertical = 5;
329 ws-ignore-last = false;
330 ws-wraparound = true;
331 };
332 }
333 {
334 package = wsp-windows-search-provider;
335 name = "windows-search-provider";
336 settings = {
337 custom-prefixes = "`";
338 results-order = 1;
339 search-commands = false;
340 search-method = 1;
341 };
342 }
343 {
344 package = ddterm;
345 path = "com/github/amezin/ddterm";
346 settings =
347 {
348 ddterm-activate-hotkey = ["<Super>space"];
349 hide-window-on-esc = true;
350 panel-icon-type = "none";
351 shortcut-find = ["<Control>f"];
352 shortcut-page-close = ["<Control>w"];
353 shortcut-win-new-tab = ["<Control>t"];
354 show-animation = "ease-in-sine";
355 show-animation-duration = 0.2;
356 hide-animation = "ease-out-sine";
357 hide-animation-duration = 0.1;
358 window-skip-taskbar = false;
359 }
360 // (listToAttrs (
361 genList (
362 n: let
363 num = toString (n + 1);
364 in
365 nameValuePair "shortcut-switch-to-tab-${num}" ["<Control>${num}"]
366 )
367 9
368 ));
369 }
370 {
371 package = vertical-workspaces;
372 settings = {
373 aaa-loading-profile = true;
374 always-activate-selected-window = true;
375 animation-speed-factor = 100;
376 app-display-module = true;
377 app-favorites-module = true;
378 app-folder-order = 1;
379 app-folder-remove-button = 0;
380 app-grid-active-preview = false;
381 app-grid-animation = 4;
382 app-grid-bg-blur-sigma = 40;
383 app-grid-columns = 0;
384 app-grid-content = 2;
385 app-grid-folder-center = true;
386 app-grid-folder-columns = 0;
387 app-grid-folder-icon-grid = 2;
388 app-grid-folder-icon-size = -1;
389 app-grid-folder-rows = 0;
390 app-grid-icon-size = -1;
391 app-grid-incomplete-pages = false;
392 app-grid-names = 0;
393 app-grid-order = 1;
394 app-grid-page-width-scale = 80;
395 app-grid-performance = true;
396 app-grid-remember-page = true;
397 app-grid-rows = 0;
398 app-grid-spacing = 12;
399 center-app-grid = true;
400 center-dash-to-ws = false;
401 center-search = true;
402 close-ws-button-mode = 2;
403 dash-bg-color = 0;
404 dash-bg-gs3-style = false;
405 dash-bg-opacity = 50;
406 dash-bg-radius = 0;
407 dash-icon-scroll = 1;
408 dash-isolate-workspaces = true;
409 dash-max-icon-size = 64;
410 dash-module = true;
411 dash-position = 2;
412 dash-position-adjust = 0;
413 dash-show-extensions-icon = 0;
414 dash-show-recent-files-icon = 0;
415 dash-show-windows-before-activation = 3;
416 enable-page-shortcuts = false;
417 favorites-notify = 1;
418 highlighting-style = 1;
419 hot-corner-action = 1;
420 hot-corner-fullscreen = false;
421 hot-corner-position = 1;
422 hot-corner-ripples = true;
423 layout-module = true;
424 message-tray-module = true;
425 new-window-focus-fix = false;
426 new-window-monitor-fix = false;
427 notification-position = 1;
428 osd-position = 2;
429 osd-window-module = true;
430 overlay-key-module = true;
431 overlay-key-primary = 1;
432 overlay-key-secondary = 1;
433 overview-bg-blur-sigma = 50;
434 overview-bg-brightness = 50;
435 overview-esc-behavior = 1;
436 overview-mode = 0;
437 panel-module = true;
438 panel-overview-style = 1;
439 panel-position = 0;
440 panel-visibility = 0;
441 recent-files-search-provider-module = false;
442 running-dot-style = 1;
443 search-bg-brightness = 30;
444 search-controller-module = true;
445 search-fuzzy = true;
446 search-icon-size = 96;
447 search-max-results-rows = 5;
448 search-module = true;
449 search-view-animation = 1;
450 search-width-scale = 105;
451 search-windows-icon-scroll = 1;
452 search-windows-order = 1;
453 sec-wst-position-adjust = 0;
454 secondary-ws-preview-scale = 100;
455 secondary-ws-preview-shift = false;
456 secondary-ws-thumbnail-scale = 5;
457 secondary-ws-thumbnails-position = 2;
458 show-app-icon-position = 0;
459 show-bg-in-overview = true;
460 show-search-entry = false;
461 show-ws-preview-bg = false;
462 show-ws-switcher-bg = false;
463 show-wst-labels = 1;
464 show-wst-labels-on-hover = true;
465 smooth-blur-transitions = true;
466 startup-state = 2;
467 swipe-tracker-module = true;
468 win-attention-handler-module = true;
469 win-preview-icon-size = 1;
470 win-preview-mid-mouse-btn-action = 1;
471 win-preview-sec-mouse-btn-action = 0;
472 win-preview-show-close-button = true;
473 win-title-position = 0;
474 window-attention-mode = 0;
475 window-icon-click-action = 1;
476 window-manager-module = true;
477 window-preview-module = true;
478 workspace-animation = 1;
479 workspace-animation-module = true;
480 workspace-module = true;
481 workspace-switcher-animation = 1;
482 workspace-switcher-popup-module = true;
483 ws-max-spacing = 350;
484 ws-preview-bg-radius = 30;
485 ws-preview-scale = 100;
486 ws-sw-popup-h-position = 50;
487 ws-sw-popup-mode = 0;
488 ws-sw-popup-v-position = 50;
489 ws-switcher-ignore-last = false;
490 ws-switcher-mode = 0;
491 ws-switcher-wraparound = false;
492 ws-thumbnail-scale = 10;
493 ws-thumbnail-scale-appgrid = 20;
494 ws-thumbnails-full = false;
495 ws-thumbnails-position = 5;
496 wst-position-adjust = 0;
497 };
498 }
499 ]
500 ++ optionals osConfig.gui.fancy [
501 {
502 package = rounded-window-corners-reborn;
503 settings = {
504 skip-libadwaita-app = false;
505 skip-libhandy-app = false;
506 border-width = -1;
507 border-color = with colors;
508 mkTuple [
509 (mkDouble base0D-dec-r)
510 (mkDouble base0D-dec-g)
511 (mkDouble base0D-dec-b)
512 1.0
513 ];
514 global-rounded-corner-settings = "{'padding': <{'left': 1, 'right': 1, 'top': 1, 'bottom': 1}>, 'keepRoundedCorners': <{'maximized': true, 'fullscreen': false}>, 'borderRadius': <uint32 12>, 'smoothing': <0.0>, 'enabled': <true>}";
515 blacklist = ["com.github.amezin.ddterm"];
516 };
517 }
518 {
519 package = panel-corners;
520 settings.panel-corners = true;
521 }
522 {
523 package = transparent-window-moving;
524 settings.window-opacity = 200;
525 }
526 ]
527 );
528 in {
529 dconf.settings =
530 {
531 "org/gnome/shell" = let
532 list = enabled:
533 map (ext: ext.package.extensionUuid) (
534 filter (ext:
535 if enabled
536 then (!(ext.disable or false))
537 else (ext.disable or false))
538 extensions
539 );
540 in {
541 disable-user-extensions = false;
542 disable-extension-version-validation = true;
543 disabled-extensions = list false;
544 enabled-extensions = list true;
545 };
546 }
547 // foldr recursiveUpdate {} (
548 map (
549 ext:
550 if (hasAttr "settings" ext)
551 then
552 (
553 if (hasAttr "path" ext)
554 then {"${ext.path}" = ext.settings;}
555 else if (hasAttr "name" ext)
556 then {"org/gnome/shell/extensions/${ext.name}" = ext.settings;}
557 else {"org/gnome/shell/extensions/${ext.package.extensionPortalSlug}" = ext.settings;}
558 )
559 else {}
560 )
561 extensions
562 );
563
564 home = {
565 packages = [pkgs.dconf2nix] ++ builtins.map (ext: ext.package) extensions;
566 file.".config/guillotine.json".source = files.gnome.menu; # Action Menu
567 persist.directories = [
568 ".local/share/gnome-shell/extensions"
569
570 # Clipboard
571 ".cache/copyous@boerdereinar.dev"
572 ".config/copyous@boerdereinar.dev"
573 ".local/share/copyous@boerdereinar.dev"
574 ];
575 };
576 }
577)