From 4736a539b9d7a39a68c36edee520a604c025f3f8 Mon Sep 17 00:00:00 2001 From: vorboyvo Date: Mon, 3 Nov 2025 16:11:09 -0500 Subject: [PATCH] Added new screenshot for full screenshot. Added xdg-desktop-portal-wlr for screen sharing. --- snippets/sway.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/snippets/sway.nix b/snippets/sway.nix index d2685fc..95e47bd 100644 --- a/snippets/sway.nix +++ b/snippets/sway.nix @@ -51,6 +51,8 @@ in { in lib.mkOptionDefault ({ # Screenshot keybinds "Print" = "exec grim - | wl-copy && wl-paste > ${screenshotPath}"; # Take screenshot of whole screen, save it, and copy it to clipboard + "${mod}+Ctrl+Shift+s" = + "exec grim - | wl-copy && wl-paste > ${screenshotPath}"; # Take screenshot of whole screen, save it, and copy it to clipboard "Shift+Print" = '' exec swaymsg -t get_tree | ${pkgs.lib.getExe pkgs.jq} -r '.. | select(.focused?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | grim -g - | wl-copy && wl-paste > ${screenshotPath}''; # Take screenshot of current window, save it, and copy it to clipboard "Ctrl+Print" = @@ -166,8 +168,14 @@ in { [ swaybg bemenu j4-dmenu-desktop swaysome ] ++ [ brightnessctl grim slurp wl-clipboard wdisplays ] ++ [ playerctl ] ++ + [ xdg-desktop-portal-wlr ] ++ []; + home.sessionVariables = { + XDG_CURRENT_DESKTOP = "sway"; + MOZ_ENABLE_WAYLAND = 1; + }; + services.playerctld = { enable = true; }; @@ -185,4 +193,9 @@ in { }; }; + # xdg.portal = { + # enable = true; + # extraPortals = with pkgs; [ xdg-desktop-portal-wlr ]; + # }; + }