From 3bd782b1df541b97d87615f445b08c328c7a32a8 Mon Sep 17 00:00:00 2001 From: notgne2 Date: Thu, 3 Nov 2022 08:16:31 -0700 Subject: [PATCH] more portal dickery --- home-manager/modules/ezpcusr.nix | 8 +------- modules/ezpc.nix | 20 ++++++++++++++------ modules/ezpw.nix | 7 ------- 3 files changed, 15 insertions(+), 20 deletions(-) diff --git a/home-manager/modules/ezpcusr.nix b/home-manager/modules/ezpcusr.nix index ef28d7a..04118e2 100644 --- a/home-manager/modules/ezpcusr.nix +++ b/home-manager/modules/ezpcusr.nix @@ -103,16 +103,10 @@ in { screenshotsPath = mkOption { description = "Path to save screenshots in"; - default = "$HOME/Pictures/Screenshots"; + default = "$HOME/Media/Screenshots"; type = types.str; }; - outputOptions = mkOption { - description = "Additional output options"; - default = {}; - type = types.attrsOf (types.attrsOf types.str); - }; - screensaver = mkOption { description = "ezpcusr screensaver"; default = {}; diff --git a/modules/ezpc.nix b/modules/ezpc.nix index 7f8618f..cbf6dfb 100644 --- a/modules/ezpc.nix +++ b/modules/ezpc.nix @@ -10,11 +10,19 @@ in { options.ezpc.enable = mkEnableOption "Enable ezpc system stuff"; config = mkIf cfg.enable { - xdg.portal.enable = lib.mkDefault true; - xdg.portal.extraPortals = lib.mkDefault (with pkgs; [ - xdg-desktop-portal-wlr - xdg-desktop-portal-gtk - ]); + xdg.portal = { + enable = lib.mkDefault true; + wlr = { + enable = true; + settings = { + screencast = { + max_fps = 30; + chooser_type = "simple"; + chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or"; + }; + }; + }; + }; environment.sessionVariables = { QT_QPA_PLATFORM = "wayland-egl;xcb"; @@ -27,7 +35,7 @@ in { }; environment.loginShellInit = lib.mkAfter '' - [[ "$(tty)" == /dev/tty1 ]] exec sway + [[ "$(tty)" == /dev/tty1 ]] && exec sway ''; i18n.inputMethod = { diff --git a/modules/ezpw.nix b/modules/ezpw.nix index 229740c..831fba5 100644 --- a/modules/ezpw.nix +++ b/modules/ezpw.nix @@ -212,12 +212,5 @@ in { ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]" } ''; - - xdg.portal.enable = lib.mkDefault true; - xdg.portal.extraPortals = lib.mkDefault (with pkgs; [ - xdg-desktop-portal-gnome - xdg-desktop-portal-wlr - xdg-desktop-portal-gtk - ]); }; }