diff --git a/desktop/bin/kami b/desktop/bin/kami deleted file mode 100755 index 9b1b728..0000000 Binary files a/desktop/bin/kami and /dev/null differ diff --git a/desktop/bin/picom-jonaburg b/desktop/bin/picom-jonaburg deleted file mode 100755 index 68dc2f3..0000000 Binary files a/desktop/bin/picom-jonaburg and /dev/null differ diff --git a/desktop/bin/picom-pijulius b/desktop/bin/picom-pijulius deleted file mode 100755 index e92d650..0000000 Binary files a/desktop/bin/picom-pijulius and /dev/null differ diff --git a/desktop/bin/print-fullscreen b/desktop/bin/print-fullscreen index 278d65b..d6ae6c9 100755 --- a/desktop/bin/print-fullscreen +++ b/desktop/bin/print-fullscreen @@ -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 diff --git a/desktop/bin/print-select b/desktop/bin/print-select index 34604e7..822ca68 100755 --- a/desktop/bin/print-select +++ b/desktop/bin/print-select @@ -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 diff --git a/desktop/bin/print-tmp b/desktop/bin/print-tmp new file mode 100755 index 0000000..ff7ef56 --- /dev/null +++ b/desktop/bin/print-tmp @@ -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 diff --git a/desktop/bin/print-window.sh b/desktop/bin/print-window.sh new file mode 100755 index 0000000..14cecb9 --- /dev/null +++ b/desktop/bin/print-window.sh @@ -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 diff --git a/desktop/bin/readme.md b/desktop/bin/readme.md new file mode 100644 index 0000000..94aee53 --- /dev/null +++ b/desktop/bin/readme.md @@ -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