add: new hyprland keybinding for saving screenshots
This commit is contained in:
parent
539429e421
commit
9910a2fddb
|
@ -155,6 +155,9 @@ in {
|
||||||
"$mod Shift, 8, hy3:movetoworkspace, 8"
|
"$mod Shift, 8, hy3:movetoworkspace, 8"
|
||||||
"$mod Shift, 9, hy3:movetoworkspace, 9"
|
"$mod Shift, 9, hy3:movetoworkspace, 9"
|
||||||
"$mod Shift, 0, hy3:movetoworkspace, 10"
|
"$mod Shift, 0, hy3:movetoworkspace, 10"
|
||||||
|
|
||||||
|
# Screenshot
|
||||||
|
"$mod, P, exec, ${scripts}/screenshot-save"
|
||||||
];
|
];
|
||||||
|
|
||||||
bindn = [
|
bindn = [
|
||||||
|
|
10
home-manager/wayland/scripts/screenshot-save
Executable file
10
home-manager/wayland/scripts/screenshot-save
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
if test $(wl-paste -l) = "image/png"; then
|
||||||
|
name=$(date '+%Y-%m-%d_%H-%M-%S').png
|
||||||
|
wl-paste -t "image/png" > ~/Pictures/"$name"
|
||||||
|
notify-send "Image stored at $name" \
|
||||||
|
-a grim -c screenshot -u low -t 3000
|
||||||
|
else
|
||||||
|
notify-send "No image in clipboard" \
|
||||||
|
-a grim -c screenshot -u low -t 3000
|
||||||
|
fi
|
Loading…
Reference in a new issue