-[submodule "base/.vim/pack/todo.txt/start/todo.txt-vim"]
+[submodule "todo.txt-vim"]
path = base/.vim/pack/todo.txt/start/todo.txt-vim
url = https://github.com/freitass/todo.txt-vim
-[submodule "base/.vim/pack/surround.vim/start/vim-surround"]
+[submodule "vim-surround"]
path = base/.vim/pack/surround.vim/start/vim-surround
url = https://github.com/tpope/vim-surround
-[submodule "base/.vim/pack/commentary.vim/start/vim-commentary"]
+[submodule "vim-commentary"]
path = base/.vim/pack/commentary.vim/start/vim-commentary
url = https://github.com/tpope/vim-commentary
-[submodule "base/.vim/pack/speeddating.vim/start/vim-speeddating"]
+[submodule "vim-speeddating"]
path = base/.vim/pack/speeddating.vim/start/vim-speeddating
url = https://github.com/tpope/vim-speeddating
-[submodule "base/.vim/pack/repeat.vim/start/vim-repeat"]
+[submodule "vim-repeat"]
path = base/.vim/pack/repeat.vim/start/vim-repeat
url = https://github.com/tpope/vim-repeat
-[submodule "urxvt-ext/urxvt-font-size"]
+[submodule "urxvt-font-size"]
path = urxvt-ext/urxvt-font-size
url = https://github.com/majutsushi/urxvt-font-size
+[submodule "paper-icon-theme"]
+ path = xorg/icons/paper-icon-theme
+ url = https://github.com/snwh/paper-icon-theme
! fonts
-*font: -windows-dina-medium-r-normal--10-80-96-96-c-70-\
-microsoft-cp1252
+*font: -windows-dina-medium-r-*-*-13-80-*-*-*-*-*
*faceName: Dina
*faceSize: 8
Xft.antialias: true
Xft.rgba: none
! theming
-Xcursor.theme: Paper
+Xcursor.theme: Paper-Mono-Dark
! colors
! http://ethanschoonover.com/solarized
! URxvt
-URxvt.termName: rxvt-unicode-256color
+URxvt.termName: rxvt-256color
URxvt.perl-ext:
URxvt.perl-ext-common: searchable-scrollback,confirm-paste,matcher,font-size
URxvt.print-pipe: cat > "$HOME/urxvt-$(date +'%Y-%m-%d-%H%M%S')"
! bg terminal 1
-TermBg1.termName: rxvt-unicode-256color
+TermBg1.termName: rxvt-256color
TermBg1.perl-ext:
TermBg1.perl-ext-common:
TermBg1.blurRadius: 2x4
! bg terminal 2
-TermBg2.termName: rxvt-unicode-256color
+TermBg2.termName: rxvt-256color
TermBg2.perl-ext:
TermBg2.perl-ext-common:
-Subproject commit 296d99b353261191adb7a356ee3fefbce8e6096b
+Subproject commit 54e5676988e6eeaa05b41730b6b056026ad0ef13
xset m 1/1 0 &
xset s off
xset dpms 0 0 600
+xset +fp ${XDG_DATA_HOME:-~/share}/fonts/Dina/
+xset fp rehash
# root terminal
urxvt -name TermBg1 -override-redirect -geometry x5+0--1 \
-e tail -F /var/log/messages &
-xdotool search --limit 1 --sync --classname TermBg1 windowsize -usehints 100% 6
+xdotool search --limit 1 --sync --classname TermBg1 windowsize --usehints 100% 6
# tray icons
#"$HOME/src/phwmon/phwmon.py" --mem --mem_percent --net --io --bg \#0000 &
fi
# try to wait for session to start
-(sleep 0.1 && tint2) &
+#(sleep 0.1 && tint2) &
+#(sleep 0.1 && yabar -c "$HOME/etc/yabar/yabar.conf") &
#x220t
(sleep 0.1 && [ -x "$HOME/bin/acpi_ac" ] && \
"$HOME/bin/acpi_ac" "0x0`sysctl -n hw.acpi.acline`") &
+### path
+# typeset -U makes every array entry unique
+# /usr/{pkg,local,games} are unix/bsdisms
+typeset -U path
+path=({~/,/,/usr/}sbin {~/,/,/usr/}bin /usr/pkg/{s,}bin /usr/X11R{7,6}/bin
+ /usr/local/{s,}bin /usr/games $path)
+
+### posix
export EDITOR=vim
+export PAGER=less
+export GREP_OPTIONS=--color=auto
+export LANG="en_US.UTF-8"
+export LC_CTYPE="$LANG"
+
+### xdg
export XDG_CONFIG_HOME=~/etc
-export XDG_CONFIG_DIRS=~/.config:/etc/xdg
+export XDG_CONFIG_DIRS=~/.config:/usr/pkg/etc/xdg:/usr/local/etc/xdg:/etc/xdg
export XDG_DATA_HOME=~/share
-export XDG_DATA_DIRS=~/.local/share:/usr/local/share/:/usr/share/
+export XDG_DATA_DIRS=~/.local/share/:/usr/pkg/share/:/usr/local/share/:/usr/share/
export XDG_CACHE_HOME=~/tmp
+### applications
export DVTM_TERM=rxvt-unicode
-export CLICOLOR=
-export LS_COLORS='di=34:ln=35:so=32:pi=33:ex=31:bd=46;34:cd=43;34:su=41;30:sg=46;30:tw=42;30:ow=43;30'
-export GREP_OPTIONS=--color=auto
-
export PYTHONSTARTUP=~/.pythonrc
+### freebsd
+if [[ "$OSTYPE" = "freebsd" ]]; then
+ export CLICOLOR=
+ export LS_COLORS='di=34:ln=35:so=32:pi=33:ex=31:bd=46;34:cd=43;34:su=41;30:sg=46;30:tw=42;30:ow=43;30'
+fi
+
+### load site-specific
if [[ -f ~/.zshenv.local ]]; then
source ~/.zshenv.local
fi
setopt autocd extendedglob
unsetopt beep
-### path
-# typeset -U makes every array entry unique; /usr/{pkg,local} are bsdisms
-typeset -U path
-path=({~/,/,/usr/}sbin {~/,/,/usr/}bin /usr/pkg/{s,}bin /usr/X11R{7,6}/bin
- /usr/local/{s,}bin $path)
-
### history
setopt appendhistory
HISTFILE=~/.histfile
## be paranoid
alias cp='cp -ip'
alias mv='mv -i'
-if [[ "$OSTYPE" = "freebsd" ]] {
+if [[ "$OSTYPE" =~ '^freebsd' ]] {
# don't confirm if only a few files are deleted
alias rm='rm -I'
} else {
### prompt
setopt prompt_subst
-local f
-if [[ "$TERM" = "wsvt25" ]] {
+local f=
+if [[ "$OSTYPE" = "netbsd" && ( "$TERM" = "wsvt25" || "$TERM" =~ '^vt' ) ]] {
# fix for wscons
f="%F{white}"
} else {
unset f
### hooks
-local _exectime
+local _exectime=
function precmd {
# change terminal title
print -Pn "\e]2;%(1j,%j,)%#${SSH_CLIENT+$USER@$HOST:}%~\e\\"
l
}
-### freebsd-specific
-if [[ "$OSTYPE" = "freebsd" ]] {
- ## vt binds
- bindkey "^[[H" beginning-of-line #Home
- bindkey -a "^[[H" beginning-of-line
- bindkey "^[[F" end-of-line #End
- bindkey -a "^[[F" end-of-line
+### system-specific configs and aliases
+case "$OSTYPE"; in
+ freebsd*)
+ ## vt binds
+ bindkey "^[[H" beginning-of-line #Home
+ bindkey -a "^[[H" beginning-of-line
+ bindkey "^[[F" end-of-line #End
+ bindkey -a "^[[F" end-of-line
- ## oss sound source
- function s { sysctl hw.snd.default_unit${1:+\=$1} }
+ ## sound
+ function s { sysctl hw.snd.default_unit${1:+\=$1} }
+ alias vol mixer
- ## install port dependencies from pkg (like pkgsrc `bmake bin-install')
- function portpkg {
- case "$1" {
- build|run)
- sudo pkg install -AU $(make ${1}-depends-list |
- sed 's_/usr/ports/_ _' | tr -d '\n')
- ;;
- *) echo "Usage: \`portpkg <build|run>' in a port directory"
- return 1;;
+ ## install port dependencies from pkg (like pkgsrc `bmake bin-install')
+ #XXX: should probably use package-depends where possible, breaks when
+ # port name is different to package name
+ # (eg. graphics/sdl20 == sdl2, devel/glib20 == glib2, etc)
+ function portpkg {
+ case "$1" {
+ build|run)
+ sudo pkg install -AU $(make ${1}-depends-list |
+ sed 's_/usr/ports/_ _' | tr -d '\n')
+ ;;
+ *) echo "Usage: \`portpkg <build|run>' in a port directory"
+ return 1;;
+ }
+ };;
+ netbsd)
+ ## sound
+ function s {
+ if [[ -z "$1" ]] {
+ ll /dev/mixer /dev/sound /dev/audio
+ return
+ }
+ for x in mixer sound audio; do
+ ln -sf /dev/$x"$1" /dev/$x
+ done
}
- }
-}
+ function vol {
+ if [[ -z "$1" ]] {
+ for x in $(mixerctl -a | grep 'outputs\.master'); do
+ echo $x
+ done
+ return
+ }
+ mixerctl -w outputs.master"$2"="$1"
+ };;
+esac
# The following lines were added by compinstall
zstyle ':completion:*' auto-description 'specify: %d'
#!/bin/sh
-exec /usr/local/bin/dmenu -fn 'Dina-10' -nb \#110800 -nf \#93a1a1 -sb \#aa5500 -sf \#eee8d5 "$@"
+exec `which -a dmenu | grep -iv ~ | head -1` -fn 'Dina-10' -nb \#110800 -nf \#93a1a1 -sb \#aa5500 -sf \#eee8d5 "$@"
--- /dev/null
+#!/bin/sh
+first=true
+i3subscribe mode | while read -r x; do
+ if $first; then
+ first=false
+ x=default #XXX: i3 does not expose method to get mode, assume
+ fi
+ x=${x#mode:}
+ [ "$1" = "hide-default" -a "$x" = "default" ] && echo || echo "$x"
+done
--- /dev/null
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+use Text::Template 'fill_in_string';
+use AnyEvent::I3;
+use v5.10;
+
+my $i3 = i3();
+$i3->connect->recv or die "Error connecting to i3";
+
+my ($ev, $str) = @ARGV;
+if (not defined $str) {
+ die "Error: Too few arguments\n" .
+ "Usage: $0 workspace|output|mode|window|barconfig_update|binding format_string\n" .
+ "Example: $0 window 'The window title is {\$name}'"
+}
+
+$i3->subscribe({
+ $ev => sub {
+ # XXX: there has to be a better way to do this
+ my ($msg) = @_;
+ # XXX: not escaped
+ say Text::Template::fill_in_string($str, HASH=>$msg->{'container'});
+ }
+})->recv;
+
+AE::cv->recv;
+
+# vim: et:ts=4:sts=4:sw=4
}
}
})->recv->{success}) {
- say "Successfully subscribed to $ev-event";
+ say "Successfully subscribed to $ev event";
}
}
my $nextArg = shift;
if(!$nextArg) {
- say "Subscribe to i3-events";
+ say "Subscribe to i3 events";
say "Usage: $0 workspace|output|mode|window|barconfig_update|binding [dump]";
say "Example: $0 workspace dump window binding dump";
exit 1;
[out]" \
-map "[out]" -vframes 1 "$img"
# pause dunst
-killall -USR1 dunst
+pkill -USR1 dunst
i3lock -nefi "$img"
rm "$img"
-killall -USR2 dunst
+pkill -USR2 dunst
#!/bin/sh
-killall redshift > /dev/null 2>&1
+pkill redshift > /dev/null 2>&1
redshift -m randr -x
#!/bin/sh
-killall redshift > /dev/null 2>&1
+pkill redshift > /dev/null 2>&1
redshift -l manual:lat=38.95171:lon=-92.33407 -m randr -t 6600:4000 -r &
+++ /dev/null
-#!/bin/sh
-first=true
-i3subscribe mode | while read -r x; do
- if $first; then
- first=false
- continue
- fi
- x=${x#mode:}
- case $x in
- default) echo;;
- *) echo $x;;
- esac
-done
--- /dev/null
+#!/bin/sh
+i3-mode | while read -r x; do
+ [ "$x" != "default" ] && echo "!Ybg0x268bd2Y!$x" || echo "$x"
+done
# create preferred folder structure
cd ~
-mkdir -p bin etc share .urxvt/ext > /dev/null 2>&1
-mkdir -m 700 var/tmp var/tmp/vim > /dev/null 2>&1
+mkdir -p bin etc share .urxvt/ext .icons .themes > /dev/null 2>&1
+mkdir -pm 700 var/tmp var/tmp/vim > /dev/null 2>&1
cd -
# accomodate multiple userlands
fex='-perm -ugo=x'
lnargs=-sfnv
if [ -z "$OSTYPE" ]; then
- OSTYPE=`uname -o | tr '[:upper:]' '[:lower:]'`
+ OSTYPE=`uname -s | tr '[:upper:]' '[:lower:]'`
fi
case "$OSTYPE" in
# TODO: make links safer for systems without -Fw
find "$PWD/urxvt-ext" -type f $fex -mindepth 1 -maxdepth 2 | while read -r x; do
l "$HOME/.urxvt/ext/`basename $x`"
done
+find "$PWD/xorg" -type d -mindepth 3 -maxdepth 3 | while read -r x; do
+ l "$HOME/.icons/`basename $x`"
+done
+#TODO: theme
cd ~
if [ "$OSTYPE" = "freebsd" ]; then
- touch .hushlogin
-
# FreeBSD tries `_secure_path' on `.login_conf' before reading the
# database, so it needs to be compiled and unlinked for it to actually
# take effect.
rm .login_conf.db
cap_mkdb .login_conf
-
fi
unlink .login_conf
# run .zprofile to set up tmp
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
-font pango:Dina, DejaVu Sans Mono, monospace 7
+font pango:Dina 7
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
set $urgent #ff4444 #dc322f #000000 #4466ff #ff4444
set $blue #4466ff #268bd2 #fdf6e3 #264db2 #4466ff
-#bar {
-# position top
-# tray_output primary
-# status_command i3status
-# separator_symbol "|"
-#
-# colors {
-# background #110800
-# statusline #93a1a1
-# separator #268bd2
-#
-# # class border backgr. text
-# focused_workspace $focused
-# active_workspace $inactive
-# inactive_workspace $inactive
-# urgent_workspace $urgent
-# binding_mode $blue
-# }
-#}
+bar {
+ position top
+ output LVDS1
+ tray_output primary
+ status_command i3status
+ separator_symbol "|"
+
+ colors {
+ background #110800
+ statusline #93a1a1
+ separator #268bd2
+
+ # class border backgr. text
+ focused_workspace $focused
+ active_workspace $inactive
+ inactive_workspace $inactive
+ urgent_workspace $urgent
+ binding_mode $blue
+ }
+}
# colors
# class border backgr. text indicator child_border
#-------------------------------------
# Executor 1
execp = new
-execp_command = ~/bin/tint2-i3mode
+execp_command = ~/bin/i3-mode
execp_interval = 0
execp_has_icon = 0
execp_cache_icon = 0
--- /dev/null
+Subproject commit d2476a6274cd4a690d344de94984f481ca7783cc