mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 22:50:39 +00:00
i3: add notification option to startup submodule
Fixes https://github.com/rycee/home-manager/issues/129.
This commit is contained in:
parent
4ccf43d753
commit
1946343d5b
2 changed files with 29 additions and 4 deletions
|
@ -448,6 +448,20 @@ in
|
|||
A new program module is available: 'programs.neovim'.
|
||||
'';
|
||||
}
|
||||
{
|
||||
time = "2017-11-14T19:56:49+00:00";
|
||||
condition = with config.xsession.windowManager; (
|
||||
i3.enable && i3.config != null && i3.config.startup != []
|
||||
);
|
||||
message = ''
|
||||
A new 'notification' option was added to
|
||||
xsession.windowManager.i3.startup submodule.
|
||||
|
||||
Startup commands are now executed with the startup-notification
|
||||
support enabled by default. Please, set 'notification' to false
|
||||
where --no-startup-id option is necessary.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -20,6 +20,15 @@ let
|
|||
description = "Whether to run command on each i3 restart.";
|
||||
};
|
||||
|
||||
notification = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to enable startup-notification support for the command.
|
||||
See <option>--no-startup-id</option> option description in the i3 user guide.
|
||||
'';
|
||||
};
|
||||
|
||||
workspace = mkOption {
|
||||
type = types.nullOr types.string;
|
||||
default = null;
|
||||
|
@ -388,8 +397,8 @@ let
|
|||
'';
|
||||
example = literalExample ''
|
||||
[
|
||||
{ command = "systemctl --user restart polybar"; always = true; }
|
||||
{ command = "dropbox start"; }
|
||||
{ command = "systemctl --user restart polybar"; always = true; notification = false; }
|
||||
{ command = "dropbox start"; notification = false; }
|
||||
{ command = "firefox"; workspace = "1: web"; }
|
||||
];
|
||||
'';
|
||||
|
@ -479,8 +488,10 @@ let
|
|||
|
||||
floatingCriteriaStr = criteria: "for_window ${criteriaStr criteria} floating enable";
|
||||
|
||||
startupEntryStr = { command, always, workspace, ... }: ''
|
||||
${if always then "exec_always" else "exec"} --no-startup-id ${
|
||||
startupEntryStr = { command, always, notification, workspace, ... }: ''
|
||||
${if always then "exec_always" else "exec"} ${
|
||||
if (notification && workspace == null) then "" else "--no-startup-id"
|
||||
} ${
|
||||
if (workspace == null) then
|
||||
command
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue