diff options
| author | aristote <quentin.aristote@irif.fr> | 2024-09-20 17:27:26 +0200 |
|---|---|---|
| committer | aristote <quentin.aristote@irif.fr> | 2024-09-20 18:27:41 +0200 |
| commit | 54fae2503696022991274bcc0911ce92ca44d309 (patch) | |
| tree | 6b64dea6d42c6aeadd99463b442e152c7a751181 /modules/home-manager/personal/gui/x/i3 | |
| parent | 4c9fc01204db2396e8842d85631bfd9afec6223c (diff) | |
home: work: add zulip
Diffstat (limited to 'modules/home-manager/personal/gui/x/i3')
| -rw-r--r-- | modules/home-manager/personal/gui/x/i3/default.nix | 76 | ||||
| -rw-r--r-- | modules/home-manager/personal/gui/x/i3/startup.nix | 3 |
2 files changed, 50 insertions, 29 deletions
diff --git a/modules/home-manager/personal/gui/x/i3/default.nix b/modules/home-manager/personal/gui/x/i3/default.nix index 443606d..17019cb 100644 --- a/modules/home-manager/personal/gui/x/i3/default.nix +++ b/modules/home-manager/personal/gui/x/i3/default.nix @@ -1,14 +1,20 @@ -{ config, lib, pkgs, ... }@extraArgs: - -let cfg = config.personal.x.i3; +{ + config, + lib, + pkgs, + ... +} @ extraArgs: let + cfg = config.personal.x.i3; in { - imports = [ ./bar ./keybindings.nix ./startup.nix ]; + imports = [./bar ./keybindings.nix ./startup.nix]; options.personal.x.i3 = { - enable = lib.mkEnableOption "i3" // { - default = - extraArgs.osConfig.services.xserver.windowManager.i3.enable or false; - }; + enable = + lib.mkEnableOption "i3" + // { + default = + extraArgs.osConfig.services.xserver.windowManager.i3.enable or false; + }; }; config = lib.mkIf cfg.enable { @@ -17,26 +23,36 @@ in { package = lib.mkDefault pkgs.i3-gaps; config = { - assigns = lib.optionalAttrs (config.personal.profiles.multimedia - && (extraArgs.osConfig.programs.steam.enable or true)) { + assigns = + lib.optionalAttrs (config.personal.profiles.multimedia + && (extraArgs.osConfig.programs.steam.enable or true)) { "8: multimedia" = [ - { class = "^Steam$"; } - { title = "Netflix"; } - { title = "MUBI"; } - { title = "Deezer"; } + {class = "^Steam$";} + {title = "Netflix";} + {title = "MUBI";} + {title = "Deezer";} ]; - } // lib.optionalAttrs config.personal.profiles.social { - "9: social" = [ { class = "^Mail$"; } { class = "^thunderbird$"; } ] + } + // lib.optionalAttrs config.personal.profiles.social { + "9: social" = + [{class = "^Mail$";} {class = "^thunderbird$";}] ++ lib.optionals config.personal.identities.personal [ - { class = "^signal$"; } - { class = "^Signal$"; } - { title = "^Signal"; } + {class = "^signal$";} + {class = "^Signal$";} + {title = "^Signal";} + ] + ++ lib.optionals config.personal.identities.work [ + {class = "^zulip";} + {class = "^Zulip";} ]; - } // { - "10: passwords" = [{ - # matches <some db>.kbdx [Locked] - KeePassXC - title = ".*\\.kbdx \\[Locked\\] - KeePassXC$"; - }]; + } + // { + "10: passwords" = [ + { + # matches <some db>.kbdx [Locked] - KeePassXC + title = ".*\\.kbdx \\[Locked\\] - KeePassXC$"; + } + ]; }; workspaceAutoBackAndForth = lib.mkDefault true; @@ -47,11 +63,13 @@ in { }; floating = { titlebar = lib.mkDefault false; - border = lib.mkDefault (if config.services.picom.enable - && config.services.picom.shadow then - 0 - else - lib.mkOptionDefault); + border = lib.mkDefault ( + if + config.services.picom.enable + && config.services.picom.shadow + then 0 + else lib.mkOptionDefault + ); }; gaps = { inner = lib.mkDefault 15; diff --git a/modules/home-manager/personal/gui/x/i3/startup.nix b/modules/home-manager/personal/gui/x/i3/startup.nix index dc52fb0..1afe2cb 100644 --- a/modules/home-manager/personal/gui/x/i3/startup.nix +++ b/modules/home-manager/personal/gui/x/i3/startup.nix @@ -21,5 +21,8 @@ ++ autostartIf (config.personal.profiles.social && config.personal.identities.personal) { command = "signal-desktop"; + } + ++ autostartIf config.personal.identities.work { + command = "zulip"; }; } |
