Open MacBook screenshots in annotated Loupe
This commit is contained in:
parent
35959ae819
commit
0251764327
3 changed files with 4 additions and 8 deletions
|
|
@ -10,6 +10,7 @@
|
||||||
proton-vpn
|
proton-vpn
|
||||||
onlyoffice-desktopeditors
|
onlyoffice-desktopeditors
|
||||||
cmatrix
|
cmatrix
|
||||||
|
inputs.loupe.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.settings.max-jobs = 0;
|
nix.settings.max-jobs = 0;
|
||||||
|
|
|
||||||
|
|
@ -523,15 +523,10 @@ in
|
||||||
-- Screenshots — Shift+Super+S matches GNOME binding
|
-- Screenshots — Shift+Super+S matches GNOME binding
|
||||||
-- Pin/unpin quickshell's focus grab around the region select so an
|
-- 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).
|
-- open menu survives slurp's input grab (no-ops if qs isn't up).
|
||||||
${if isMacbook then ''
|
-- Save temporary PNGs so the notification can reopen
|
||||||
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
|
|
||||||
-- the exact screenshot in Loupe, while hyprshot still copies it.
|
-- 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(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"))
|
hl.bind("Print", hl.dsp.exec_cmd("${screenshotWithLoupe} output"))
|
||||||
''}
|
|
||||||
|
|
||||||
-- Settings shortcut — Super+I matches GNOME binding
|
-- Settings shortcut — Super+I matches GNOME binding
|
||||||
hl.bind(mod .. " + I", hl.dsp.exec_cmd("pavucontrol"))
|
hl.bind(mod .. " + I", hl.dsp.exec_cmd("pavucontrol"))
|
||||||
|
|
|
||||||
|
|
@ -887,7 +887,7 @@ in
|
||||||
readonly property string xdgOpen: "${pkgs.xdg-utils}/bin/xdg-open"
|
readonly property string xdgOpen: "${pkgs.xdg-utils}/bin/xdg-open"
|
||||||
readonly property string screenRec: "${screenRecScript}"
|
readonly property string screenRec: "${screenRecScript}"
|
||||||
readonly property string slurpRegion: "${slurpRegionScript}"
|
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}"
|
readonly property string themeApply: "${themeApply}"
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
@ -3428,7 +3428,7 @@ in
|
||||||
}
|
}
|
||||||
|
|
||||||
// Glyph to fill the preview slot when there is no image to put
|
// 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.
|
// avoid holding full-screen preview textures in the bar.
|
||||||
function notifPreviewIcon(notif) {
|
function notifPreviewIcon(notif) {
|
||||||
if (!notif) return "";
|
if (!notif) return "";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue