update screenshot scripts
This commit is contained in:
parent
8d498ab87a
commit
0d70ad2a7b
BIN
desktop/bin/kami
BIN
desktop/bin/kami
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,4 +1,13 @@
|
||||
#!/bin/bash
|
||||
name="$HOME/pics/screenshots/screenshot-$(date -Iseconds | cut -d '+' -f1).png"
|
||||
if [[ $XDG_SESSION_TYPE == "x11" ]]; then
|
||||
maim -u -n -l -c 0.157,0.333,0.466,0.4 $name
|
||||
xclip -selection clipboard -t image/png $name
|
||||
fi
|
||||
|
||||
jabuxa="$HOME/Pictures/screenshots/screenshot-$(date -Iseconds | cut -d '+' -f1).png" && maim -u -n -l -c 0.157,0.333,0.466,0.4 "$jabuxa" && xclip -selection clipboard -t image/png "$jabuxa"
|
||||
|
||||
if [[ $XDG_SESSION_TYPE == "wayland" ]]; then
|
||||
grim $name
|
||||
wl-copy < $name
|
||||
fi
|
||||
|
||||
|
@ -1,4 +1,13 @@
|
||||
#!/bin/bash
|
||||
name="$HOME/pics/screenshots/screenshot-$(date -Iseconds | cut -d '+' -f1).png"
|
||||
if [[ $XDG_SESSION_TYPE == "x11" ]]; then
|
||||
maim -u -s $name
|
||||
xclip -selection clipboard -t image/png $name
|
||||
fi
|
||||
|
||||
jabuxa="$HOME/Pictures/screenshots/screenshot-$(date -Iseconds | cut -d '+' -f1).png" && maim -u -s -n -l -c 0.157,0.333,0.466,0.4 "$jabuxa" && xclip -selection clipboard -t image/png "$jabuxa"
|
||||
if [[ $XDG_SESSION_TYPE == "wayland" ]]; then
|
||||
grim -g "$(slurp)" $name
|
||||
xclip -selection clipboard -t image/png $name
|
||||
wl-copy < $name
|
||||
fi
|
||||
|
||||
|
11
desktop/bin/print-tmp
Executable file
11
desktop/bin/print-tmp
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
tmp="$HOME/tmp/tmp.png"
|
||||
if [[ $XDG_SESSION_TYPE == "x11" ]]; then
|
||||
maim -u -s "$tmp"
|
||||
curl -F'file=@'"${tmp}" https://0x0.st | xclip -sel clip
|
||||
fi
|
||||
|
||||
if [[ $XDG_SESSION_TYPE == "wayland" ]]; then
|
||||
grim -g "$(slurp)" $tmp
|
||||
curl -F'file=@'"${tmp}" https://0x0.st | wl-copy
|
||||
fi
|
9
desktop/bin/print-window.sh
Executable file
9
desktop/bin/print-window.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
if [[ $XDG_SESSION_TYPE == "x11" ]]; then
|
||||
maim -i $(xdotool getactivewindow) | xclip -sel clip -t image/png
|
||||
fi
|
||||
if [[ $XDG_SESSION_TYPE == "wayland" ]]; then
|
||||
grim -g "$(swaymsg -t get_tree | jq -j '.. | select(.type?) | select(.focused).rect | "\(.x),\(.y) \(.width)x\(.height)"')" ~/tmp/jabuxas.png
|
||||
xclip -sel clip ~/tmp/jabuxas.png
|
||||
wl-copy < ~/tmp/jabuxas.png
|
||||
fi
|
4
desktop/bin/readme.md
Normal file
4
desktop/bin/readme.md
Normal file
@ -0,0 +1,4 @@
|
||||
## Dependencies
|
||||
for a x11 session, you only need xclip, xdotool and maim
|
||||
|
||||
for a wayland session, i made these on sway, so, depends on swaymsg, slurp, grim and wl-clipboard
|
Loading…
Reference in New Issue
Block a user