This repository has been archived by the owner on Sep 30, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
682d26f
commit 7670d1a
Showing
4 changed files
with
90 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Maintainer: Bernhard Landauer <oberon@manjaro.org> | ||
|
||
pkgname=i3-scrot | ||
pkgver=1.0 | ||
pkgrel=1 | ||
pkgdesc="simple screenshot script using scrot" | ||
arch=('any') | ||
url="https://forum.manjaro.org/index.php?topic=31977.msg261964#msg261964" | ||
license=('GPL') | ||
depends=('libnotify' | ||
'scrot' | ||
'xdg-user-dirs') | ||
source=('i3-scrot') | ||
md5sums=('b6710609e1c14bd190bd049069ceb64e') | ||
|
||
package() { | ||
install -Dm755 "$srcdir/$pkgname" "$pkgdir/usr/bin/$pkgname" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#!/bin/sh | ||
# /usr/bin/i3-scrot | ||
# | ||
# simple screenshot-script using scrot for manjaro-i3 by oberon@manjaro.org | ||
|
||
_conf=$HOME/.config/i3-scrot.conf | ||
|
||
if ! [ -f $_conf ]; then | ||
echo "scrot_dir=$(xdg-user-dir PICTURES)" > $_conf | ||
fi | ||
|
||
source $_conf | ||
|
||
if ! [ -d $scrot_dir ]; then | ||
mkdir -p $scrot_dir | ||
fi | ||
|
||
case "$1" in | ||
--desk|-d|$NULL) | ||
cd $scrot_dir | ||
scrot && | ||
sleep 1 && | ||
notify-send "screenshot has been saved in $scrot_dir" | ||
;; | ||
--window|-w) | ||
cd $scrot_dir | ||
scrot -u && | ||
sleep 1 && | ||
notify-send "screenshot has been saved in $scrot_dir" | ||
;; | ||
--select|-s) | ||
cd $scrot_dir | ||
notify-send 'select an area for the screenshot' & | ||
scrot -s && | ||
sleep 1 && notify-send "screenshot has been saved in $scrot_dir" | ||
;; | ||
--help|-h) | ||
echo " | ||
available options: | ||
-d | --desk full screen | ||
-w | --window active window | ||
-s | --select selection | ||
-h | --help display this information | ||
Default option is 'full screen'. | ||
The file destination can be set in ${_conf}. | ||
Default is $scrot_dir | ||
" | ||
;; | ||
*) | ||
echo " | ||
== ! i3-scrot: missing or wrong argument ! == | ||
available options: | ||
-d | --desk full screen | ||
-w | --window active window | ||
-s | --select selection | ||
-h | --help display this information | ||
Default option is 'full screen'. | ||
The file destination can be set in ${_conf}. | ||
Default is $scrot_dir | ||
" | ||
|
||
exit 2 | ||
esac | ||
|
||
exit 0 |
This file was deleted.
Oops, something went wrong.