From 02517643275441312f14490dd7f76ce4e533a06b Mon Sep 17 00:00:00 2001 From: rope Date: Sat, 19 Sep 2026 09:15:23 +0100 Subject: [PATCH] Open MacBook screenshots in annotated Loupe --- hosts/FredOS-Macbook.nix | 1 + settings/hyprland.nix | 7 +------ settings/quickshell.nix | 4 ++-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/hosts/FredOS-Macbook.nix b/hosts/FredOS-Macbook.nix index 0c69300..64f6f47 100644 --- a/hosts/FredOS-Macbook.nix +++ b/hosts/FredOS-Macbook.nix @@ -10,6 +10,7 @@ proton-vpn onlyoffice-desktopeditors cmatrix + inputs.loupe.packages.${pkgs.stdenv.hostPlatform.system}.default ]; nix.settings.max-jobs = 0; diff --git a/settings/hyprland.nix b/settings/hyprland.nix index cccef68..2920943 100644 --- a/settings/hyprland.nix +++ b/settings/hyprland.nix @@ -523,15 +523,10 @@ in -- Screenshots — Shift+Super+S matches GNOME binding -- Pin/unpin quickshell's focus grab around the region select so an -- open menu survives slurp's input grab (no-ops if qs isn't up). - ${if isMacbook then '' - hl.bind(mod .. " + SHIFT + S", hl.dsp.exec_cmd("sh -c 'qs ipc call screenshot pin; hyprshot -m region --clipboard-only; qs ipc call screenshot unpin'")) - hl.bind("Print", hl.dsp.exec_cmd("hyprshot -m output --clipboard-only")) - '' else '' - -- On gaming, save temporary PNGs so the notification can reopen + -- Save temporary PNGs so the notification can reopen -- the exact screenshot in Loupe, while hyprshot still copies it. hl.bind(mod .. " + SHIFT + S", hl.dsp.exec_cmd("sh -c 'qs ipc call screenshot pin; ${screenshotWithLoupe} region; qs ipc call screenshot unpin'")) hl.bind("Print", hl.dsp.exec_cmd("${screenshotWithLoupe} output")) - ''} -- Settings shortcut — Super+I matches GNOME binding hl.bind(mod .. " + I", hl.dsp.exec_cmd("pavucontrol")) diff --git a/settings/quickshell.nix b/settings/quickshell.nix index f949828..d0dc7aa 100644 --- a/settings/quickshell.nix +++ b/settings/quickshell.nix @@ -887,7 +887,7 @@ in readonly property string xdgOpen: "${pkgs.xdg-utils}/bin/xdg-open" readonly property string screenRec: "${screenRecScript}" readonly property string slurpRegion: "${slurpRegionScript}" - readonly property string loupe: "${if isMacbook then "" else "${inputs.loupe.packages.${pkgs.stdenv.hostPlatform.system}.default}/bin/loupe"}" + readonly property string loupe: "${inputs.loupe.packages.${pkgs.stdenv.hostPlatform.system}.default}/bin/loupe" readonly property string themeApply: "${themeApply}" } ''; @@ -3428,7 +3428,7 @@ in } // Glyph to fill the preview slot when there is no image to put - // there. Gaming screenshots stay on disk for opening in Loupe; + // there. Screenshots stay on disk for opening in Loupe; // avoid holding full-screen preview textures in the bar. function notifPreviewIcon(notif) { if (!notif) return "";