From: Mart Lubbers Date: Fri, 8 Jan 2016 13:01:01 +0000 (+0100) Subject: update with binaries for bg and screenshot X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=115bb77f3b3c1ff8f4fdeb3a792a64d2aa8b9d80;p=dotfiles.git update with binaries for bg and screenshot --- diff --git a/misc_binaries/.local/bin/scr b/misc_binaries/.local/bin/scr deleted file mode 100755 index 0ebc22b..0000000 --- a/misc_binaries/.local/bin/scr +++ /dev/null @@ -1,9 +0,0 @@ -#!/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 diff --git a/x/.config/i3/config b/x/.config/i3/config index ed731a8..c25afcb 100644 --- a/x/.config/i3/config +++ b/x/.config/i3/config @@ -12,20 +12,20 @@ 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 diff --git a/x/.local/bin/bg b/x/.local/bin/bg new file mode 100755 index 0000000..08dbe89 --- /dev/null +++ b/x/.local/bin/bg @@ -0,0 +1,4 @@ +#!/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 diff --git a/x/.local/bin/scr b/x/.local/bin/scr new file mode 100755 index 0000000..85bca85 --- /dev/null +++ b/x/.local/bin/scr @@ -0,0 +1,9 @@ +#!/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 {}"