even BETTER screenshotting
This commit is contained in:
parent
290b006209
commit
e52bd4c9b7
1 changed files with 22 additions and 1 deletions
|
@ -76,8 +76,29 @@ in {
|
||||||
"SUPER, Super_L, exec, ${lib.getExe pkgs.nwg-drawer}"
|
"SUPER, Super_L, exec, ${lib.getExe pkgs.nwg-drawer}"
|
||||||
];
|
];
|
||||||
bind = let
|
bind = let
|
||||||
|
# screenshotScript = pkgs.writeScript "screenshot" ''
|
||||||
|
# ${lib.getExe pkgs.grimblast} --freeze --notify copy area
|
||||||
|
# '';
|
||||||
screenshotScript = pkgs.writeScript "screenshot" ''
|
screenshotScript = pkgs.writeScript "screenshot" ''
|
||||||
${lib.getExe pkgs.grimblast} --freeze --notify copy area
|
temp_file=$(mktemp)
|
||||||
|
trap 'rm -f "$temp_file"' EXIT
|
||||||
|
|
||||||
|
${lib.getExe pkgs.grimblast} --freeze save area - > "$temp_file" || exit 1
|
||||||
|
|
||||||
|
cat "$temp_file" | ${lib.getExe pkgs.wl-clipboard-x11} -selection clipboard -t image/png
|
||||||
|
|
||||||
|
action=$(${pkgs.libnotify}/bin/notify-send "Screenshot Captured" \
|
||||||
|
--app-name="Screenshot" \
|
||||||
|
--urgency=normal \
|
||||||
|
--action="default=Edit Image" \
|
||||||
|
--icon "$temp_file" \
|
||||||
|
"Click to open in Swappy")
|
||||||
|
|
||||||
|
case "$action" in
|
||||||
|
default)
|
||||||
|
${lib.getExe pkgs.swappy} -f "$temp_file"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
'';
|
'';
|
||||||
in [
|
in [
|
||||||
"$mod, R, exec, ${lib.getExe pkgs.rofi-wayland} -show run"
|
"$mod, R, exec, ${lib.getExe pkgs.rofi-wayland} -show run"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue