aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2018-06-22 13:09:15 +0200
committerneodarz <neodarz@neodarz.net>2018-06-22 13:09:15 +0200
commit34470b213538ae13e9b25d78c49d56e0befba2f2 (patch)
treea6050995cfe0bd8de3511c050c12d6bb209700d4
parent3500cbbc6cd307e52465810a559ed1d7d52360b1 (diff)
downloaddotfiles_ascii-34470b213538ae13e9b25d78c49d56e0befba2f2.tar.xz
dotfiles_ascii-34470b213538ae13e9b25d78c49d56e0befba2f2.zip
Add beautiful scot
Diffstat (limited to '')
-rw-r--r--i3/.config/i3/config5
-rwxr-xr-xscripts/.scripts/dropshadow.sh29
2 files changed, 32 insertions, 2 deletions
diff --git a/i3/.config/i3/config b/i3/.config/i3/config
index 1e22e28..f8c1f73 100644
--- a/i3/.config/i3/config
+++ b/i3/.config/i3/config
@@ -100,8 +100,9 @@ bindsym --release Caps_Lock exec pkill -SIGRTMIN+11 i3blocks
bindsym --release Num_Lock exec pkill -SIGRTMIN+11 i3blocks
# App
-bindsym --release $WinKey+o exec scrot -s ~/screenshots/%b\ %d-%H:%M:%S.png
-bindsym --release $WinKey+i exec scrot ~/screenshots/%b\ %d-%H:%M:%S.png
+bindcode 107 --release exec scrot -s '%Y-%m-%d-%H%M%S_$wx$h.png' -e 'mv $f ~/screenshots/'
+bindsym --release $WinKey+i exec scrot '%Y-%m-%d-%H%M%S_$wx$h.png' -e 'mv $f ~/screenshots/'
+bindsym --release Scroll_Lock exec scrot -sz -e '~/.scripts/dropshadow.sh $f'
bindsym $WinKey+Shift+F1 exec terminator -e ranger
bindsym $WinKey+Shift+F2 exec terminator -e cmus
bindsym $WinKey+Shift+F3 exec terminator -e mm
diff --git a/scripts/.scripts/dropshadow.sh b/scripts/.scripts/dropshadow.sh
new file mode 100755
index 0000000..472cd0e
--- /dev/null
+++ b/scripts/.scripts/dropshadow.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+# NAME: dropshadow.sh
+# VERSION:
+# AUTHOR: (c) 2013 Glutanimate
+# DESCRIPTION: - adds transparent dropshadow to images (e.g. screenshots)
+# - moves them to predefined screenshot folder
+# FEATURES:
+# DEPENDENCIES: imagemagick suite
+#
+# LICENSE: MIT license (http://opensource.org/licenses/MIT)
+#
+# NOTICE: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
+# OR OTHER DEALINGS IN THE SOFTWARE.
+#
+#
+# USAGE: dropshadow.sh <image>
+
+SCREENSHOTFOLDER="$HOME/screenshots"
+
+
+FILE="${1}"
+FILENAME="${FILE##*/}"
+FILEBASE="${FILENAME%.*}"
+
+convert "${FILE}" \( +clone -background black -shadow 80x20+0+15 \) +swap -background transparent -layers merge +repage "$SCREENSHOTFOLDER/${FILEBASE}.png"