Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
host=$(grep '^Host' ~/.ssh/config | \
cut -d \ -f 2 | \
dmenu $DMENU_OPTIONS -p 'ssh to:')
exec urxvtcd -title "ssh: $host" -e ssh "$host"
#!/bin/sh
screenshot_root=~/Pictures/screenshot
viewer='xdg-open'
while getopts 'd:n:v' opt; do
case "$opt" in
d) dir="$OPTARG" ;;
n) name="$OPTARG" ;;
v) scrot_execute="$viewer \$f"

How to setup a minimal X11 environment on Debian GNU/Linux

  1. Install the following packages

    • xserver-xorg-core (server)
    • xserver-xorg-video-XXX (video driver, XXX depends on your hardware)
    • xserver-xorg-input-XXX (input device driver, XXX depends on your hardware. evdev works well for most cases)
    • x11-xserver-utils (xmodmap, xrandr)
    • x11-xkb-utils (setxkbmap)
  • x11-utils (xdpyinfo, xev, xkill, xprop, xwininfo)
@ryot4
ryot4 / slock-add-color3.diff
Created September 9, 2014 06:10
A patch which adds COLOR3 to slock (http://tools.suckless.org/slock/)
diff --git a/config.mk b/config.mk
index 8cc3f68..941e265 100644
--- a/config.mk
+++ b/config.mk
@@ -14,7 +14,7 @@ INCS = -I. -I/usr/include -I${X11INC}
LIBS = -L/usr/lib -lc -lcrypt -L${X11LIB} -lX11 -lXext
# flags
-CPPFLAGS = -DVERSION=\"${VERSION}\" -DHAVE_SHADOW_H -DCOLOR1=\"black\" -DCOLOR2=\"\#005577\"
+CPPFLAGS = -DVERSION=\"${VERSION}\" -DHAVE_SHADOW_H -DCOLOR1=\"black\" -DCOLOR2=\"\#005577\" -DCOLOR3=\"\#333333\"