-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscreeny
More file actions
25 lines (20 loc) · 788 Bytes
/
Copy pathscreeny
File metadata and controls
25 lines (20 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
# A simple script to take screenshoot using scrot
# Then add date to the file name
# Then open the result instantly using default image viewer
# Need xdg-utils, mostly preinstalled
# Cheers! Addy
mkdir -p ~/Pictures
# 'screeny -f' to take a screenshot for current focused window only
if [[ $1 = "-f" ]]; then
scrot 'Cheese_%y.%m.%-d_%H.%M.%S.png' --focused --border \
-e 'mv $f ~/Pictures; xdg-open ~/Pictures/$f'
# 'screeny -s' to take a screenshot with selection by dragging a rectangle
elif [[ $1 = "-s" ]]; then
scrot 'Cheese_%y.%m.%-d_%H.%M.%S.png' --select \
-e 'mv $f ~/Pictures; xdg-open ~/Pictures/$f'
# 'screeny' only to take a screenshoot normally
else
scrot 'Cheese_%y.%m.%-d_%H.%M.%S.png' \
-e 'mv $f ~/Pictures; xdg-open ~/Pictures/$f'
fi