hyprland xdg-portal and displays conf
This commit is contained in:
parent
c882579a90
commit
f08e55abe2
4 changed files with 18 additions and 9 deletions
|
|
@ -7,7 +7,7 @@
|
|||
with lib; let
|
||||
cfg = config.displays;
|
||||
|
||||
renderDisplaysForHyprland = displays: (map displayHyprlandSetting displays);
|
||||
renderDisplaysForHyprland = displays: (map displayHyprlandSetting (builtins.filter (d: d.enable) displays ));
|
||||
|
||||
displayHyprlandSetting = display:
|
||||
specificDisplay display
|
||||
|
|
@ -91,8 +91,10 @@ with lib; let
|
|||
|
||||
displayType = types.submodule {
|
||||
options = {
|
||||
enable = mkEnableOption "enable this display";
|
||||
name = mkOption {
|
||||
description = "name of the display";
|
||||
default = "";
|
||||
};
|
||||
description = mkOption {
|
||||
description = "description of display from hyprctl monitors";
|
||||
|
|
@ -129,9 +131,11 @@ with lib; let
|
|||
options = {
|
||||
start = mkOption {
|
||||
type = types.int;
|
||||
default = 1;
|
||||
};
|
||||
end = mkOption {
|
||||
type = types.int;
|
||||
default = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -33,6 +33,12 @@ in {
|
|||
|
||||
home-manager.users.${user}.imports = [
|
||||
{
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
config.common.default = ["hyprland"];
|
||||
extraPortals = if cfg.hyprland then [ pkgs.xdg-desktop-portal-hyprland ] else if cfg.sway then [ pkgs.xdg-desktop-portal-sway ] else [];
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = mkIf cfg.hyprland {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue