make screenshots save to folder too
This commit is contained in:
parent
797cf3363e
commit
62efd071d1
@ -26,8 +26,8 @@ floating_modifier $mod normal
|
|||||||
bindsym $mod+Shift+r reload
|
bindsym $mod+Shift+r reload
|
||||||
|
|
||||||
# Take screenshot of area and screen respectively
|
# Take screenshot of area and screen respectively
|
||||||
bindsym $mod+Shift+s exec grim -g "$(slurp)" - | wl-copy
|
bindsym $mod+Shift+a exec screenshot area
|
||||||
bindsym $mod+Shift+a exec grim - | wl-copy
|
bindsym $mod+Shift+s exec screenshot
|
||||||
|
|
||||||
# Lock screen
|
# Lock screen
|
||||||
bindsym Alt+Shift+l exec swaylock
|
bindsym Alt+Shift+l exec swaylock
|
||||||
|
21
scripts/bin/screenshot
Executable file
21
scripts/bin/screenshot
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
ss_dir="$(xdg-user-dir PICTURES)/ss"
|
||||||
|
pic_dir="$ss_dir/$(date +%s).png"
|
||||||
|
|
||||||
|
mkdir -p "$ss_dir"
|
||||||
|
|
||||||
|
capture_area() {
|
||||||
|
grim -g "$(slurp)" "$pic_dir" && wl-copy "$pic_dir"
|
||||||
|
}
|
||||||
|
|
||||||
|
capture_screen() {
|
||||||
|
grim "$pic_dir" && wl-copy "$pic_dir"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ "$1" = "area" ]]; then
|
||||||
|
capture_area
|
||||||
|
else
|
||||||
|
capture_screen
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user