diff --git a/.aliases b/.aliases index bd12838..4f15de7 100755 --- a/.aliases +++ b/.aliases @@ -12,4 +12,5 @@ alias di='docker images' alias dip="docker inspect -f '{{ .NetworkSettings.IPAddress }}'" # call with or ID alias dih="docker inspect -f '{{ .Config.Hostname }}'" # call with or ID alias dstats="docker stats "'$(sudo docker ps -aq)' # shows stats thingy for all containers - +alias drmsc="docker ps -a | grep Exited | awk '{print nil}' | xargs docker rm" # removes stopped containers +alias drmdi="docker rmi "'$(docker images -q -f dangling=true)' # removes non-tagged images diff --git a/.dockerfunc b/.dockerfunc index 671c03a..1343a38 100755 --- a/.dockerfunc +++ b/.dockerfunc @@ -53,10 +53,10 @@ android-studio() { -v $CURRENT_DIR:/workspace \ -v $CURRENT_DIR/.docker-dev/.studio-home:/home/developer/.AndroidStudio1.2 \ -v $CURRENT_DIR/.docker-dev/.android/avd:/home/developer/.android/avd \ - fschl/astudio:latest \ + fschl/android-studio:latest \ /bin/studio -# exit 0; + #exit 0; } bro() { @@ -119,11 +119,11 @@ gimp() { del_stopped gimp docker run -d \ - -v /etc/localtime:/etc/localtime:ro \ - -v /tmp/.X11-unix:/tmp/.X11-unix \ - -e DISPLAY=unix$DISPLAY \ - -v $HOME/Pictures:/root/Pictures \ - --name gimp \ + -v /etc/localtime:/etc/localtime:ro \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e DISPLAY=unix$DISPLAY \ + -v $HOME/Pictures:/root/Pictures \ + --name gimp \ fschl/gimp } @@ -223,15 +223,15 @@ rstudio(){ # -e QT_DEVICE_PIXEL_RATIO \ docker run -d \ - -v /etc/localtime:/etc/localtime:ro \ - -v /tmp/.X11-unix:/tmp/.X11-unix \ - -v $HOME/fastly-logs:/root/fastly-logs \ - -v /dev/shm:/dev/shm \ - -p 8787 \ - -e DISPLAY=unix$DISPLAY \ - --device /dev/dri \ - --name rstudio \ - rocker/rstudio + -v /etc/localtime:/etc/localtime:ro \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -v $HOME/fastly-logs:/root/fastly-logs \ + -v /dev/shm:/dev/shm \ + -p 8787 \ + -e DISPLAY=unix$DISPLAY \ + --device /dev/dri \ + --name rstudio \ + rocker/rstudio } skype() { @@ -274,15 +274,15 @@ transmission() { del_stopped transmission docker run -d \ - -v /etc/localtime:/etc/localtime:ro \ - -v $HOME/Downloads:/transmission/download \ - -v $HOME/.transmission:/transmission/config \ - -p 9091:9091 \ - -p 51413:51413 \ - -p 51413:51413/udp \ - --name transmission \ - fschl/transmission - } + -v /etc/localtime:/etc/localtime:ro \ + -v $HOME/Downloads:/transmission/download \ + -v $HOME/.transmission:/transmission/config \ + -p 9091:9091 \ + -p 51413:51413 \ + -p 51413:51413/udp \ + --name transmission \ + fschl/transmission +} vlc() { del_stopped vlc diff --git a/.i3/config b/.i3/config index 6a4172b..00b1c40 100755 --- a/.i3/config +++ b/.i3/config @@ -39,7 +39,7 @@ bindsym $mod+d exec dmenu_run # installed. # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop -bindsym Ctrl+Shift+l exec i3lock -c 222222 +bindsym Ctrl+Shift+l exec fancy-i3lock # change focus bindsym $mod+j focus left @@ -89,7 +89,7 @@ bindsym $mod+a focus parent # float some applications for_window [class="Tor Browser"] floating enable - + # switch to workspace bindsym $mod+1 workspace 1 bindsym $mod+2 workspace 2 @@ -137,9 +137,9 @@ mode "resize" { # Pressing up will shrink the window’s height. # Pressing down will grow the window’s height. bindsym j resize shrink width 10 px or 10 ppt - bindsym k resize grow height 10 px or 10 ppt - bindsym l resize shrink height 10 px or 10 ppt - bindsym odiaeresis resize grow width 10 px or 10 ppt + bindsym i resize grow height 10 px or 10 ppt + bindsym k resize shrink height 10 px or 10 ppt + bindsym l resize grow width 10 px or 10 ppt # same bindings, but for the arrow keys bindsym Left resize shrink width 10 px or 10 ppt @@ -178,7 +178,7 @@ assign [class="^Eclipse$"] 3 assign [class="^Icedove$"] 4 # startup programs -exec --no-startup-id xrandr --output VGA1 --auto exec --no-startup-id xrandr --output LVDS1 --left-of VGA1 --auto -exec --no-startup-id i3-msg 'exec iceweasel; rename workspace 1 to "1: web"' -exec --no-startup-id i3-msg 'exec emacs24; rename workspace 2 to "2: emacs"; workspace 2' +exec --no-startup-id xrandr --output VGA1 --auto +exec --no-startup-id i3-msg 'exec iceweasel;' +exec --no-startup-id i3-msg 'workspace 2; exec emacs24' diff --git a/Makefile b/Makefile index 725b219..8afa4ff 100755 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .PHONY: all default dotfiles install -all: dotfiles +all: bin dotfiles default: install @@ -13,5 +13,12 @@ dotfiles: ln -sfn $$file $(HOME)/$$f; \ done +bins: +# add aliases for things in bin + for file in $(shell find $(CURDIR)/bin -type f -not -name ".*.swp"); do \ + f=$$(basename $$file); \ + sudo ln -sf $$file /usr/local/bin/$$f; \ + done + bootstrap: sh ./install.sh diff --git a/bin/fancy-i3lock b/bin/fancy-i3lock new file mode 100755 index 0000000..4fbf64f --- /dev/null +++ b/bin/fancy-i3lock @@ -0,0 +1,39 @@ +#!/bin/bash +############################################################################## +# fancy-i3lock +# ----------- +# Based on the awesome sauce of https://github.com/meskarune/i3lock-fancy +# This just uses imagemagick in a container... +# because reasons... +# +# Dependencies: docker, i3lock, scrot + +# :authors: Jess Frazelle, @jfrazelle +# :date: 8 June 2015 +# :version: 0.0.1 +############################################################################## +set -e + +# subshell this shiz +( +IMAGE=/tmp/i3lock.png + +# All options are here: http://www.imagemagick.org/Usage/blur/#blur_args +# BLURTYPE="0x5" # 7.52s +# BLURTYPE="0x2" # 4.39s + BLURTYPE="5x3" # 3.80s +# BLURTYPE="2x8" # 2.90s +# BLURTYPE="2x3" # 2.92s + +scrot $IMAGE + +docker run --rm \ + -v $IMAGE:$IMAGE \ + -v $HOME/Pictures/lock.png:/root/lock.png \ + fschl/imagemagick \ + sh -c "convert $IMAGE -brightness-contrast -30x10 -level 0%,100%,0.6 -blur $BLURTYPE -gravity center - | composite -gravity center /root/lock.png - $IMAGE" + +i3lock -i $IMAGE + +rm $IMAGE +)