niri: add startup commands
Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
parent
1879223bfe
commit
0716de4245
1 changed files with 16 additions and 1 deletions
|
@ -5,8 +5,12 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
|
_1password = "${config.programs._1password-gui.package}/bin/1password";
|
||||||
|
audio = config.home-manager.users.${config.custom.username}.home.file.".local/bin/audio".source;
|
||||||
niri = "${config.programs.niri.package}/bin/niri";
|
niri = "${config.programs.niri.package}/bin/niri";
|
||||||
|
rm = "${pkgs.coreutils}/bin/rm";
|
||||||
sway-audio-idle-inhibit = "${pkgs.sway-audio-idle-inhibit}/bin/sway-audio-idle-inhibit";
|
sway-audio-idle-inhibit = "${pkgs.sway-audio-idle-inhibit}/bin/sway-audio-idle-inhibit";
|
||||||
|
wallpaper = "${config.home-manager.users.${config.custom.username}.home.file.".local/bin/wallpaper".source}";
|
||||||
|
|
||||||
cfg = config.custom.desktops.niri.misc;
|
cfg = config.custom.desktops.niri.misc;
|
||||||
in {
|
in {
|
||||||
|
@ -19,8 +23,19 @@ in {
|
||||||
programs.niri.settings = {
|
programs.niri.settings = {
|
||||||
# https://github.com/YaLTeR/niri/wiki/Configuration:-Miscellaneous
|
# https://github.com/YaLTeR/niri/wiki/Configuration:-Miscellaneous
|
||||||
|
|
||||||
spawn-at-startup = [
|
# https://github.com/YaLTeR/niri/wiki/Configuration:-Miscellaneous#spawn-at-startup
|
||||||
|
# https://github.com/YaLTeR/niri/wiki/Configuration:-Key-Bindings#actions
|
||||||
|
spawn-at-startup = let
|
||||||
|
home = config.home-manager.users.${config.custom.username}.home.homeDirectory;
|
||||||
|
in
|
||||||
|
[
|
||||||
|
{command = [_1password "--silent"];} # Launch password manager in background
|
||||||
|
{command = [audio "--init"];} # Enforce audio profile state
|
||||||
|
{command = [rm "${home}/.cache/walker/clipboard.gob"];} # Clear clipboard history
|
||||||
{command = [sway-audio-idle-inhibit];} # Inhibit while audio is playing
|
{command = [sway-audio-idle-inhibit];} # Inhibit while audio is playing
|
||||||
|
]
|
||||||
|
++ optionals config.custom.wallpaper [
|
||||||
|
{command = [wallpaper];}
|
||||||
];
|
];
|
||||||
|
|
||||||
# HACK: Inherit home-manager environment variables in lieu of upstream fix
|
# HACK: Inherit home-manager environment variables in lieu of upstream fix
|
||||||
|
|
Loading…
Add table
Reference in a new issue