From dd7c1d4aa0869dcbe9b2e81e708afb2264e0ebfb Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sun, 7 Oct 2012 22:14:13 +0200 Subject: .config/awesome/ext.lua --- .config/awesome/ext.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to '.config') diff --git a/.config/awesome/ext.lua b/.config/awesome/ext.lua index d564867..e7bdf00 100644 --- a/.config/awesome/ext.lua +++ b/.config/awesome/ext.lua @@ -65,3 +65,17 @@ function run_or_raise(cmd, properties) end awful.util.spawn(cmd) end + +function prev_client() + awful.client.focus.history.previous() + if client.focus then + client.focus:raise() + end +end + +function next_client() + awful.client.focus.byidx(1) + if client.focus then + client.focus:raise() + end +end -- cgit v1.2.3-54-g00ecf From 02a49112c36e8313f5e73639254936c24db3b9f4 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sun, 7 Oct 2012 22:14:27 +0200 Subject: .config/awesome/rc.lua --- .config/awesome/rc.lua | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to '.config') diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 9ee6889..5d4e481 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -227,11 +227,7 @@ local bind = keychain local sub = keychain.sub globalkeys = awful.util.table.join( bind({ "Control", }, "i", - { sub({ }, "o", - function () - awful.client.focus.byidx(1) - if client.focus then client.focus:raise() end - end), + { sub({ }, "space", ext.next_client), sub({ "Shift", }, "o", function () awful.screen.focus_relative(1) end), sub({ "Shift", }, "1", @@ -245,7 +241,8 @@ globalkeys = awful.util.table.join( sub({ }, "e", oni.ror_editor), sub({ "Shift", }, "e", oni.run_editor), sub({ }, "w", oni.ror_browser), - sub({ "Shift", }, "w", oni.run_browser) }), + sub({ "Shift", }, "w", oni.run_browser), + sub({ "Control", }, "i", ext.prev_client) }), awful.key({ "Control", "Mod1" }, "l", function () awful.util.spawn("i3lock -c 000000") end), awful.key({ modkey, }, "Left", awful.tag.viewprev ), @@ -258,13 +255,6 @@ globalkeys = awful.util.table.join( awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end), awful.key({ modkey, }, "u", awful.client.urgent.jumpto), - awful.key({ modkey, }, "Tab", - function () - awful.client.focus.history.previous() - if client.focus then - client.focus:raise() - end - end), -- Standard program awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), -- cgit v1.2.3-54-g00ecf From c037a4ea8f34f4d83701323da5e73efbd7b3c3db Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Wed, 10 Oct 2012 09:09:44 +0200 Subject: .config/awesome/rc.lua --- .config/awesome/rc.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.config') diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 5d4e481..6132386 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -228,8 +228,10 @@ local sub = keychain.sub globalkeys = awful.util.table.join( bind({ "Control", }, "i", { sub({ }, "space", ext.next_client), - sub({ "Shift", }, "o", + sub({ }, ",", function () awful.screen.focus_relative(1) end), + sub({ }, ".", + function () awful.screen.focus_relative(-1) end), sub({ "Shift", }, "1", function () mypromptbox[mouse.screen]:run() end), sub({ }, "f", function () oni.focus_raise("right") end), -- cgit v1.2.3-54-g00ecf From 1b02e9a398dd4c5c9ff409e17540cb1e1a94b9f9 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Thu, 11 Oct 2012 21:26:24 +0200 Subject: .config/clfswm/clfswmrc --- .config/clfswm/clfswmrc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .config/clfswm/clfswmrc (limited to '.config') diff --git a/.config/clfswm/clfswmrc b/.config/clfswm/clfswmrc new file mode 100644 index 0000000..f69623e --- /dev/null +++ b/.config/clfswm/clfswmrc @@ -0,0 +1,25 @@ +;; -*- mode: lisp; -*- +(in-package :clfswm) + +(defun start-i3lock () + "Run i3lock" + (do-shell "exec i3lock -c 000000")) + +(defun start-i3lock-2 () + "Run i3lock in second mode" + (setf *second-mode-leave-function* 'start-i3lock) + (leave-second-mode)) + +(defun my-bindings () + (define-main-key ("l" :mod-1 :control) 'start-i3lock) + (define-second-key ("l" :mod-1 :control) 'start-i3lock-2)) + +(add-hook *binding-hook* 'my-bindings) + +;; (defun my-init-hook () +;; (add-frame (create-frame :name "The Gimp" :x 0.6 :y 0 :w 0.3 :h 0.2) *root-frame*)) + +;;y (add-hook *init-hook* 'my-init-hook) + +;;(setf *frame-background* "#252a2b") +;;(setf *frame-foreground* "#eeeeec") -- cgit v1.2.3-54-g00ecf From bba50dcde682837c64d2ff4c2c17d520f31b4677 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Thu, 11 Oct 2012 21:26:44 +0200 Subject: .config/cower/config --- .config/cower/config | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .config/cower/config (limited to '.config') diff --git a/.config/cower/config b/.config/cower/config new file mode 100644 index 0000000..6c24291 --- /dev/null +++ b/.config/cower/config @@ -0,0 +1,3 @@ +Color = always +TargetDir = /home/slash/var/aur/ +IgnoreRepo = pegas -- cgit v1.2.3-54-g00ecf From 7047e6f2f3c749c675fa7fe2fbebd241ee72aa24 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Thu, 11 Oct 2012 21:27:17 +0200 Subject: .config/fish/config.fish --- .config/fish/config.fish | 76 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .config/fish/config.fish (limited to '.config') diff --git a/.config/fish/config.fish b/.config/fish/config.fish new file mode 100644 index 0000000..f515917 --- /dev/null +++ b/.config/fish/config.fish @@ -0,0 +1,76 @@ +function fish_prompt -d "Write out the prompt" + set last_status $status + set current_directory (prompt_pwd) + set git_branch (git branch --contains HEAD 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/') + set cnormal (set_color white) + + echo -n $cnormal + + printf '%s%s%s' (set_color magenta) (hostname|cut -d . -f 1) $cnormal + + if test -n "$current_directory" + printf ' %s%s%s' (set_color $fish_color_cwd) $current_directory $cnormal + end + + if test -n "$git_branch" + printf '@%s%s%s' (set_color yellow) $git_branch $cnormal + end + + if test $last_status -eq 0 + printf '%s' (set_color --bold green) + else + printf '%s' (set_color --bold red) + end + + printf '>%s ' (set_color normal) +end + +function grep + /bin/grep --color=always $argv +end + +function less + /bin/less -FXRS $argv +end + +function ls + /bin/ls -F --color=always $argv +end + +function mysql + /usr/bin/mysql --pager $argv +end + +function slrn + set -x NNTPSERVER 'news.gmane.org' + /usr/bin/slrn $argv +end + +function shutdown + dbus-send --system --print-reply \ + --dest="org.freedesktop.ConsoleKit" \ + /org/freedesktop/ConsoleKit/Manager \ + org.freedesktop.ConsoleKit.Manager.Stop +end + +function reboot + dbus-send --system --print-reply \ + --dest="org.freedesktop.ConsoleKit" \ + /org/freedesktop/ConsoleKit/Manager \ + org.freedesktop.ConsoleKit.Manager.Restart +end + +function engage + play -n -c1 synth whitenoise band -n 100 20 band -n 50 20 gain +25 fade h 1 864000 1 +end + +function lscompmod -d "List kernel modules used by hardware" + lspci -mvk | awk '/^Module/ {print $2}' | sort -u +end + +set -x PAGER 'less -FXRS' +set -x BROWSER conkeror +set -x EDITOR 'emacsclient -c -a emacs' +set -x PATH ~/usr/bin $PATH /sbin /usr/sbin /usr/local/emacs/bin/ \ + /usr/local/bin /usr/local/stumpwm/bin /usr/local/scwm/bin \ + /usr/local/clfswm/bin /opt/plan9/bin -- cgit v1.2.3-54-g00ecf From 247f866dc16b64d8d9543f3c3efd7ae036b748dd Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Thu, 11 Oct 2012 21:27:52 +0200 Subject: .config/herbstluftwm/autostart --- .config/herbstluftwm/autostart | 46 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 .config/herbstluftwm/autostart (limited to '.config') diff --git a/.config/herbstluftwm/autostart b/.config/herbstluftwm/autostart new file mode 100755 index 0000000..cf47e86 --- /dev/null +++ b/.config/herbstluftwm/autostart @@ -0,0 +1,46 @@ +#!/bin/zsh + +function hc () { + herbstclient $@ +} + +modkey="Mod4" + +hc keybind $modkey+Ctrl+q quit +hc keybind $modkey+e spawn emacs + +hc set frame_bg_normal_color "#0c191c" +hc set frame_bg_active_color "#000000" +hc set frame_border_width 0 +hc set window_border_width 1 +hc set window_border_normal_color "#15abc3" +hc set window_border_active_color "#e0c625" + +hc set focus_stealing_prevention 0 + +hc set default_frame_layout 2 +hc set_layout max + +hc add default2 +hc remove_monitor 1 +hc move_monitor 0 1920x1080+0+0 +hc add_monitor 1680x1050+1920+0 default2 + +hc pad 0 -5 -5 -5 -5 +hc pad 1 -5 -5 -5 -5 + +hc mousebind $modkey-Button1 move +hc mousebind $modkey-Button2 resize +hc mousebind $modkey-Button3 zoom + +hc unrule -F +hc rule focus=on +hc rule windowtype=_NET_WM_WINDOW_TYPE_DIALOG focus=on pseudotile=on +hc rule class=Xephyr pseudotile=on +hc rule instance=Xine\ Window pseudotile=on + +# xbindkeys + +# ~/.config/herbstluftwm/panel.sh & + +# hc load default "(split horizontal:0.550000:0 (split vertical:0.850000:0 (split horizontal:0.180000:1 (clients max:0) (clients max:0 0x140001a)) (clients max:0)) (clients max:0 0xc00077))" -- cgit v1.2.3-54-g00ecf From 319fb2353d35f22bb67c09780260f0ab6eafc5b1 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Thu, 11 Oct 2012 21:28:01 +0200 Subject: .config/herbstluftwm/panel.sh --- .config/herbstluftwm/panel.sh | 150 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100755 .config/herbstluftwm/panel.sh (limited to '.config') diff --git a/.config/herbstluftwm/panel.sh b/.config/herbstluftwm/panel.sh new file mode 100755 index 0000000..22b46ae --- /dev/null +++ b/.config/herbstluftwm/panel.sh @@ -0,0 +1,150 @@ +#!/bin/bash + +monitor=${1:-0} +monitor2=1 +geometry=( $(herbstclient monitor_rect "$monitor") ) +if [ -z "$geometry" ] ;then + echo "Invalid monitor $monitor" + exit 1 +fi +# geometry has the format: WxH+X+Y +x=${geometry[0]} +width=${geometry[2]} +height=12 +y=0 #$(expr ${geometry[3]} - $height) +tag_width=40 +font="-misc-tamsyn-medium-r-normal-*-14-*-*-*-*-*-iso8859-*" + +selcolor='#24c6e0' +locolor='#657b83' +bgcolor='#002b36' +hicolor="#808080" +urcolor="#e0c625" + +function uniq_linebuffered() { + awk '$0 != l { print ; l=$0 ; fflush(); }' "$@" +} + +function print_tags() { + # draw tags + echo -n "$separator" + for i in "${TAGS[@]}" ; do + if [[ "${TAGS2[@]}" == *"#${i:1}"* ]]; then + echo -n "^bg($selcolor)^fg(#000000) ${i:1} ^fg()^bg()" + elif [[ "${TAGS2[@]}" == *"+${i:1}"* ]]; then + echo -n "^bg($locolor)^fg(#000000) ${i:1} ^fg()^bg()" + else + case ${i:0:1} in + '#') + echo -n "^bg($selcolor)^fg(#000000) ${i:1} ^fg()^bg()" + ;; + '+') + echo -n "^bg($locolor)^fg(#000000) ${i:1} ^fg()^bg()" + ;; + ':') + echo -n "^bg($hicolor)^fg(#000000) ${i:1} ^fg()^bg()" + ;; + '!') + echo -n "^bg($urcolor)^fg(#000000) ${i:1} ^fg()^bg()" + ;; + *) + echo -n "^bg($bgcolor)^fg(#ffffff) ${i:1} ^fg()^bg()" + ;; + esac + fi + echo -n "$separator" + done +} + +function print_mailboxes() { + declare -A mailnames + mailboxes=(ninthfloor gmail aethon ryuslash.org) + mailnames=( + [ninthfloor]="9f" + [gmail]="gm" + [aethon]="aet" + [ryuslash.org]="ryu") + mailtxt="" + for j in "${mailboxes[@]}"; do + mailfile="$HOME/documents/mail/$j/inbox/new/" + mailcnt=$(ls $mailfile | wc -l) + + if [ $mailcnt -gt 0 ]; then + mailsha1=$(echo $j | sha1sum) + mailcolor="#${mailsha1:0:6}" + else + mailcolor=$bgcolor + fi + + mailtxt="$mailtxt${separator}^bg($mailcolor)^fg(#ffffff) ${mailnames[$j]} ^fg()^bg()" + done + mailtxt_only=$(echo -n "$mailtxt" | sed 's.\^[^(]*([^)]*)..g') + let mailtxt_width=$(textwidth "$font" "$mailtxt_only")+10 + echo -n "^p(_RIGHT)^p(-$mailtxt_width)$mailtxt" +} + +function print_services() { + services=(emacs httpd mysqld dunst xbindkeys mpdscribble sshd mpd) + servicetxt="" + for j in "${services[@]}"; do + servicetxt="$servicetxt$separator$(status $j)" + done + servicetxt_only=$(echo -n "$servicetxt" | sed 's.\^[^(]*([^)]*)..g') + let servicetxt_width=($(textwidth "$font" "$servicetxt_only")+7)/2 + + echo -n "^p(_CENTER)^p(-$servicetxt_width)$servicetxt" +} + +function status() +{ + running=$(${1}_running 2>/dev/null || pidof $1) + + if [ -n "$running" ]; then + color="darkgreen" + else + color="darkred" + fi + + echo -n "^bg($color)^fg(#ffffff) $1 ^fg()^bg()" +} + +function emacs_running() +{ + ps ax | awk '{ print $5 " " $6 }' | grep -E "^emacs --daemon" +} + +{ + childpid=$! + herbstclient --idle + kill $childpid +} 2> /dev/null | { + TAGS=( $(herbstclient tag_status $monitor) ) + TAGS2=( $(herbstclient tag_status $monitor2) ) + + separator="^fg($bgcolor)^ro(1x$height)^fg()" + print_tags + print_services + print_mailboxes + + echo + # wait for next event + read line || break + cmd=( $line ) + # find out event origin + case "${cmd[0]}" in + tag*) + TAGS=( $(herbstclient tag_status $monitor) ) + TAGS2=( $(herbstclient tag_status $monitor2) ) + ;; + quit_panel) + exit + ;; + esac + + sleep 1s +} 2> /dev/null | dzen2 -w $width -x $x -y $y -fn "$font" -h $height \ + -ta l -bg "$bgcolor" + +# Local Variables: +# eval: (git-auto-commit-mode 1) +# End: -- cgit v1.2.3-54-g00ecf From 9eb16a0418eaea8d8bb290bae10ab764ef667e4b Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Thu, 11 Oct 2012 21:29:02 +0200 Subject: .config/newsbeuter/config --- .config/newsbeuter/config | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .config/newsbeuter/config (limited to '.config') diff --git a/.config/newsbeuter/config b/.config/newsbeuter/config new file mode 100644 index 0000000..257f150 --- /dev/null +++ b/.config/newsbeuter/config @@ -0,0 +1,27 @@ + +auto-reload yes +reload-threads 3 +reload-time 60 + +browser firefox + +confirm-exit yes + +feedlist-format "%-35t %?d?- %-35d&? %> %u" +articlelist-format "%-4i %f %t" +feedlist-title-format "%N %V %> %u feeds with new articles" +articlelist-title-format "%T" + +max-items 500 + +show-read-feeds no +show-read-articles no + +html-renderer "w3m -dump -T text/HTML -cols 72" + +color listfocus default red +color info default black bold + +highlight article "^(Feed|Title|Author|Link|Date):.*" yellow default bold + +article-sort-order date-desc -- cgit v1.2.3-54-g00ecf