adding sxiv and changing screenshot prog
This commit is contained in:
parent
deef4f3192
commit
02e22a7711
6 changed files with 83 additions and 6 deletions
|
@ -1,3 +1,28 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
maim --hidecursor --select | xclip -selection clipboard -target image/png
|
||||
timestamp=$(date +%F-%T)
|
||||
|
||||
picture=$(maim --hidecursor --select /tmp/$timestamp.png)
|
||||
|
||||
declare -a options=(
|
||||
"clipboard"
|
||||
"filesave"
|
||||
"cancel"
|
||||
)
|
||||
|
||||
choice=$(printf '%s\n' "${options[@]}" | rofi -dmenu -p 'Clip or Save')
|
||||
|
||||
if [[ "$choice" == "cancel" ]]; then
|
||||
rm /tmp/$timestamp.png
|
||||
echo "Canceled." && exit 1
|
||||
|
||||
elif [ "$choice" == "clipboard" ]; then
|
||||
xclip -selection clipboard -target image/png -i /tmp/$timestamp.png
|
||||
rm /tmp/$timestamp.png
|
||||
echo 'saved to clipboard'
|
||||
|
||||
elif [ "$choice" == "filesave" ]; then
|
||||
mv /tmp/$timestamp.png ~/Pictures/$timestamp.png
|
||||
echo 'saved to ~/Pictures/'$timestamp'.png'
|
||||
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue