summaryrefslogtreecommitdiff
path: root/modules/home-manager/personal/gui/x/i3/startup.nix
blob: 9baf388383026ae27931533be1c64416c2231e83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{ config, lib, pkgs, ... }:

{
  xsession.windowManager.i3.config.startup = let
    autostart = { command, always ? false, notification ? false }: {
      inherit command always notification;
    };
    autostartIf = cond: args: lib.optional cond (autostart args);
  in [
    (autostart { command = "rfkill block bluetooth"; })
    (autostart { command = "keepassxc"; })
  ]
  ++ autostartIf config.programs.thunderbird.enable { command = "thunderbird"; }
  ++ autostartIf config.personal.profiles.social { command = "signal-desktop"; }
  # ++ autostartIf config.services.redshift.enable {
  #   command = "systemctl --user start redshift";
  # }
  ++ autostartIf (config.personal.home.wallpaper != null) {
    command = "${pkgs.feh}/bin/feh --bg-scale ${config.personal.home.wallpaper}";
  }
  # ++ autostartIf config.services.xidlehook.enable {
  #   command = "systemctl --user start xidlehook.service";
  # }
  ;
}