custom: add top-level desktop option
Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
parent
0ec4890572
commit
d9bade7500
3 changed files with 15 additions and 16 deletions
|
@ -36,6 +36,13 @@ in {
|
|||
rounding = mkOption {default = 15;};
|
||||
|
||||
### Misc
|
||||
desktop = mkOption {
|
||||
default =
|
||||
if config.custom.full
|
||||
then "niri"
|
||||
else "gnome";
|
||||
};
|
||||
|
||||
lockscreen = mkOption {default = "hyprlock";};
|
||||
wallpaper = mkOption {default = false;};
|
||||
|
||||
|
|
|
@ -8,22 +8,15 @@ with lib; let
|
|||
in {
|
||||
options.custom.desktops = {
|
||||
enable = mkOption {default = config.custom.minimal;};
|
||||
|
||||
desktop = mkOption {
|
||||
default =
|
||||
if config.custom.full
|
||||
then "niri"
|
||||
else "gnome";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
custom.desktops = {
|
||||
gnome.enable = cfg.desktop == "gnome";
|
||||
hyprland.enable = cfg.desktop == "hyprland";
|
||||
kde.enable = cfg.desktop == "kde";
|
||||
niri.enable = cfg.desktop == "niri";
|
||||
sway.enable = cfg.desktop == "sway";
|
||||
gnome.enable = config.custom.desktop == "gnome";
|
||||
hyprland.enable = config.custom.desktop == "hyprland";
|
||||
kde.enable = config.custom.desktop == "kde";
|
||||
niri.enable = config.custom.desktop == "niri";
|
||||
sway.enable = config.custom.desktop == "sway";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -40,7 +40,6 @@ with lib; let
|
|||
in {
|
||||
options.custom.programs.waybar = {
|
||||
enable = mkOption {default = false;};
|
||||
desktop = mkOption {default = config.custom.desktops.desktop;};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -98,12 +97,12 @@ in {
|
|||
smooth-scrolling-threshold = 2;
|
||||
|
||||
on-scroll-down =
|
||||
if cfg.desktop == "niri"
|
||||
if config.custom.desktop == "niri"
|
||||
then "${niri} msg action focus-workspace-down"
|
||||
else "";
|
||||
|
||||
on-scroll-up =
|
||||
if cfg.desktop == "niri"
|
||||
if config.custom.desktop == "niri"
|
||||
then "${niri} msg action focus-workspace-up"
|
||||
else "";
|
||||
};
|
||||
|
@ -302,7 +301,7 @@ in {
|
|||
#// on-click = "";
|
||||
|
||||
on-click-middle =
|
||||
if cfg.desktop == "niri"
|
||||
if config.custom.desktop == "niri"
|
||||
then ''${niri} msg action close-window --id "$(${niri} msg -j windows | ${jq} '.[] | select(.app_id == "YouTube Music").id')"''
|
||||
else "";
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue