feat(home): Add launcher to default apps module
This commit is contained in:
parent
b5459aa815
commit
fc937102da
4 changed files with 43 additions and 7 deletions
|
@ -28,7 +28,7 @@ in {
|
|||
terminal = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.wezterm;
|
||||
description = "Ther terminal emulator to use.";
|
||||
description = "The terminal emulator to use.";
|
||||
};
|
||||
|
||||
browser = lib.mkOption {
|
||||
|
@ -36,6 +36,28 @@ in {
|
|||
default = pkgs.floorp;
|
||||
description = "The browser to use.";
|
||||
};
|
||||
|
||||
launcher = lib.mkOption {
|
||||
type = lib.types.submodule {
|
||||
options = {
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default =
|
||||
if config.marleyos.wayland.hyprland.enable
|
||||
then pkgs.wofi
|
||||
else pkgs.rofi;
|
||||
description = "The launcher to use.";
|
||||
};
|
||||
command = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "--show drun";
|
||||
description = ''
|
||||
The command appended after the launcher binary to run it.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf (is-linux system) {
|
||||
|
|
|
@ -4,14 +4,12 @@
|
|||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
|
||||
cfg = config.marleyos.programs.rofi;
|
||||
hasXorg = config.xsession.enable;
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.marleyos.programs.rofi.enable = mkEnableOption "rofi";
|
||||
|
||||
config = mkIf (cfg.enable && hasXorg) {
|
||||
|
@ -19,6 +17,11 @@ in
|
|||
rofi
|
||||
];
|
||||
|
||||
marleyos.apps.launcher = {
|
||||
package = pkgs.rofi;
|
||||
command = "--show drun";
|
||||
};
|
||||
|
||||
xdg.configFile."rofi".source = "${inputs.rofi-themes}/files";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
|
@ -10,6 +11,11 @@ in {
|
|||
options.marleyos.programs.wofi.enable = mkEnableOption "wofi";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
marleyos.apps.launcher = {
|
||||
package = pkgs.wofi;
|
||||
command = "--show drun";
|
||||
};
|
||||
|
||||
programs.wofi = {
|
||||
enable = true;
|
||||
};
|
||||
|
|
|
@ -38,7 +38,10 @@ in {
|
|||
}
|
||||
];
|
||||
|
||||
marleyos.programs.wofi.enable = true;
|
||||
marleyos = {
|
||||
programs.wofi.enable = true;
|
||||
services.waybar.enable = true;
|
||||
};
|
||||
|
||||
home.pointerCursor.hyprcursor.enable = true;
|
||||
|
||||
|
@ -109,7 +112,9 @@ in {
|
|||
monitor = lib.attrValues cfg.monitors;
|
||||
|
||||
"$terminal" = lib.getExe config.marleyos.apps.terminal;
|
||||
"$launcher" = "${lib.getExe pkgs.wofi} --show drun";
|
||||
"$launcher" = let
|
||||
inherit (config.marleyos.apps) launcher;
|
||||
in "${lib.getExe launcher.package} ${launcher.command}";
|
||||
"$browser" = lib.getExe config.marleyos.apps.browser;
|
||||
|
||||
exec-once = let
|
||||
|
|
Loading…
Reference in a new issue