summaryrefslogtreecommitdiff
path: root/home/config/i3/startup.nix
blob: cdad53c63f179094f9a69bb711cb3d15f77ac5f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ config, pkgs, ... }:

let background-image = config.home.wallpaper;
in {
  xsession.windowManager.i3.config.startup = let
    autostart = { command, always ? false, notification ? false }: {
      inherit command always notification;
    };
  in (lib.optional config.services.redshift.enable
    (autostart { command = "systemctl --user start redshift"; }))
++ (lib.optional (background-image != null) (autostart {
    command = "${pkgs.feh}/bin/feh --bg-scale ${background-image}";
  })) ++ (lib.optional config.services.xidlehook.enable
    (autostart { command = "systemctl --user xidlehook.service"; }))
  ++ (lib.optional config.services.emacs.enable
    (autostart { command = "systemctl --user start emacs.service"; })) ++ [
      # Launch frequently used apps
      (autostart { command = "thunderbird"; })
      (autostart { command = "signal-desktop"; })
      (autostart { command = ''i3-msg "workspace 10; exec keepassxc"''; })
    ];
}