Add emojis to screenshot script and '--force' arg
This commit is contained in:
parent
f7b4643be6
commit
7f1dc193c2
@ -29,6 +29,8 @@ super + g
|
|||||||
#~~~~~~~~~
|
#~~~~~~~~~
|
||||||
Print
|
Print
|
||||||
screenshot
|
screenshot
|
||||||
|
shift + Print
|
||||||
|
screenshot --force
|
||||||
super + m
|
super + m
|
||||||
rofi-mpd -a
|
rofi-mpd -a
|
||||||
super + x
|
super + x
|
||||||
@ -36,7 +38,7 @@ super + x
|
|||||||
super + z
|
super + z
|
||||||
powermenu
|
powermenu
|
||||||
super + u
|
super + u
|
||||||
updater
|
update
|
||||||
super + n
|
super + n
|
||||||
rofi-todo -f $HOME/doc/notes/notes.json
|
rofi-todo -f $HOME/doc/notes/notes.json
|
||||||
super + e
|
super + e
|
||||||
|
@ -1,23 +1,29 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
m() { rofi -dmenu -i -l "$@"; }
|
m() { rofi -dmenu -width 200 -i -l "$@"; }
|
||||||
|
|
||||||
type="$(printf "Screen\nArea\n" | m 2 -p 'What do you want to screenshot?')"
|
|
||||||
[ ! "$type" ] && exit
|
|
||||||
save="$(printf "No\nYes" | m 2 -p 'Do you want to copy to clipboard?')"
|
|
||||||
[ ! "$save" ] && exit
|
|
||||||
time="$(printf "0.7\n5\n10\n15" | m 3 -p 'How many seconds you want to wait?')"
|
|
||||||
[ ! "$time" ] && exit
|
|
||||||
|
|
||||||
[ "$type" = "Area" ] && type="-s -u" || type=""
|
|
||||||
|
|
||||||
mkdir -p ~/pix/Screenshots
|
mkdir -p ~/pix/Screenshots
|
||||||
sleep "$time"
|
|
||||||
screen_path=~/pix/Screenshots/$(date +%G-%m-%d_%s).png
|
screen_path=~/pix/Screenshots/$(date +%G-%m-%d_%s).png
|
||||||
|
|
||||||
maim $type "$screen_path" &&
|
screenshot() {
|
||||||
notify-send -u low -t 1400 -i "$screen_path" "Screenshot created!"
|
maim $type "$screen_path" &&
|
||||||
|
notify-send -u low -t 1400 -i "$screen_path" "Screenshot created!"
|
||||||
|
}
|
||||||
|
|
||||||
[ "$save" = "Yes" ] &&
|
[ "$1" = "--force" ] && { screenshot && exit; }
|
||||||
|
|
||||||
|
type="$(printf " Screen\n Area\n" | m 2 -p 'Screenshoter')"
|
||||||
|
[ ! "$type" ] && exit
|
||||||
|
save="$(printf " No\n Yes" | m 2 -p 'Copy?')"
|
||||||
|
[ ! "$save" ] && exit
|
||||||
|
time="$(printf "0.7\n5\n10\n15" | m 3 -p 'Delay')"
|
||||||
|
[ ! "$time" ] && exit
|
||||||
|
|
||||||
|
[ "$type" = " Area" ] && type="-s -u" || type=""
|
||||||
|
|
||||||
|
sleep "$time"
|
||||||
|
screenshot
|
||||||
|
|
||||||
|
[ "$save" = " Yes" ] &&
|
||||||
xclip -sel clip /dev/null; sleep 0.5
|
xclip -sel clip /dev/null; sleep 0.5
|
||||||
xclip -selection clipboard -t image/png "$screen_path" || exit
|
xclip -selection clipboard -t image/png "$screen_path" || exit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user