+++ /dev/null
-#!/bin/bash
-set -e
-f=$(scrot -s -e 'echo $f')
-curl -s \
- -u "ftp@martlubbers.net:$(pass ftp.martlubbers.net/ftp@martlubbers.net)"\
- -T $f ftp://martlubbers.net/public_html/scr/$f
-echo http://martlubbers.net/scr/$f | xclip
-rm -v $f
-notify-send http://martlubbers.net/scr/$f
set $mod Mod4
# lock the screen after 10 minutes
-exec xautolock -locker 'sudo -K; echo RELOADAGENT | gpg-connect-agent; i3lock -c ccff00'
+exec xautolock -locker 'echo RELOADAGENT | gpg-connect-agent; i3lock'
# set a background
-exec convert -size 1600x900 plasma:fractal -modulate 20,100,10 png:- | display -window root
-# set the backlight
-exec xbacklight -set 50
+exec ~/.local/bin/bg
# set the network switcher
exec netctltray
+# Toggle music playback
bindsym Pause exec mpc toggle
+# Printscreen current window
+bindsym Shift+Print exec ~/.local/bin/scr window
+# Printscreen
bindsym Print exec ~/.local/bin/scr
-
# lock the screen
bindsym $mod+l exec xautolock -locknow
-
# put a password in the clipboard
bindsym $mod+p exec ~/.local/bin/passmenu
--- /dev/null
+#!/bin/bash
+xbacklight -set 50 || true
+convert -size "$(xrandr | grep -Po "(?<=connected )\\d+x\\d+")" \
+ plasma:fractal -modulate 20,100,10 png:- | display -window root
--- /dev/null
+#!/bin/bash
+[[ "$#" -eq 0 ]] && WINDOW=root || WINDOW="$(xdotool getwindowfocus -f)"
+URL="$(date +%F_%H-%M-%S).png"
+import -window "$WINDOW" -quality 90 png:- | curl -s\
+ -u "ftp@martlubbers.net:$(pass ftp.martlubbers.net/ftp@martlubbers.net)"\
+ -T- "ftp://martlubbers.net/public_html/scr/$URL"
+echo "http://martlubbers.net/scr/$URL" | pee \
+ "xclip -selection clipboard" "xclip"\
+ "xargs -I{} notify-send {}"