automapaper?
This commit is contained in:
parent
77d730d177
commit
ad2cafa469
3 changed files with 74 additions and 60 deletions
|
|
@ -120,6 +120,7 @@ layout {
|
||||||
// which may be more convenient to use.
|
// which may be more convenient to use.
|
||||||
// See the binds section below for more spawn examples.
|
// See the binds section below for more spawn examples.
|
||||||
// spawn-at-startup "alacritty" "-e" "fish"
|
// spawn-at-startup "alacritty" "-e" "fish"
|
||||||
|
@automapaper@
|
||||||
|
|
||||||
// Uncomment this line to ask the clients to omit their client-side decorations if possible.
|
// Uncomment this line to ask the clients to omit their client-side decorations if possible.
|
||||||
// If the client will specifically ask for CSD, the request will be honored.
|
// If the client will specifically ask for CSD, the request will be honored.
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,11 @@
|
||||||
scale = "1";
|
scale = "1";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
extraConfig = {
|
extraConfig =
|
||||||
|
let
|
||||||
|
hconfig = config.home-manager.users.noa;
|
||||||
|
in
|
||||||
|
{
|
||||||
xdg.configFile =
|
xdg.configFile =
|
||||||
let
|
let
|
||||||
wpkgs = inputs.self.packages.${pkgs.system};
|
wpkgs = inputs.self.packages.${pkgs.system};
|
||||||
|
|
@ -105,6 +109,12 @@
|
||||||
wofilaunch = "${wpkgs.wofi-launch}/bin/wofi-launch";
|
wofilaunch = "${wpkgs.wofi-launch}/bin/wofi-launch";
|
||||||
wofipower = "${wpkgs.wofi-power}/bin/wofi-power";
|
wofipower = "${wpkgs.wofi-power}/bin/wofi-power";
|
||||||
swaylock = "${pkgs.swaylock}/bin/swaylock";
|
swaylock = "${pkgs.swaylock}/bin/swaylock";
|
||||||
|
automapaper = lib.strings.concatMapStringsSep "\n" (
|
||||||
|
command:
|
||||||
|
(
|
||||||
|
''spawn-at-startup "${(lib.strings.concatStringsSep ''" "'' (lib.strings.splitString " " command))}"''
|
||||||
|
)
|
||||||
|
) hconfig.modules.automapaper.startStrings;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,9 @@ in
|
||||||
options.modules.automapaper = {
|
options.modules.automapaper = {
|
||||||
enable = lib.mkEnableOption "enable automapaper";
|
enable = lib.mkEnableOption "enable automapaper";
|
||||||
hyprland = lib.mkEnableOption "enable hyprland exec-once integration";
|
hyprland = lib.mkEnableOption "enable hyprland exec-once integration";
|
||||||
|
startStrings = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
};
|
||||||
default-configuration = {
|
default-configuration = {
|
||||||
init = lib.mkOption {
|
init = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
|
|
@ -142,8 +145,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config =
|
||||||
wayland.windowManager.hyprland.settings.exec-once =
|
|
||||||
let
|
let
|
||||||
mkDisplayConfig =
|
mkDisplayConfig =
|
||||||
conf:
|
conf:
|
||||||
|
|
@ -181,10 +183,11 @@ in
|
||||||
frames_per_tick = def.frames_per_tick;
|
frames_per_tick = def.frames_per_tick;
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
lib.mkIf cfg.hyprland (
|
lib.mkIf cfg.enable rec {
|
||||||
builtins.map (
|
modules.automapaper.startStrings = builtins.map (
|
||||||
conf: "${inputs.automapaper.packages.${pkgs.system}.default}/bin/automapaper -C ${confFile conf}"
|
conf: "${inputs.automapaper.packages.${pkgs.system}.default}/bin/automapaper -C ${confFile conf}"
|
||||||
) config.modules.hyprland.displays
|
) config.modules.hyprland.displays;
|
||||||
);
|
|
||||||
|
wayland.windowManager.hyprland.settings.exec-once = lib.mkIf cfg.hyprland modules.automapaper.startStrings;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue