46338ddc962a

Moar.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Thu, 01 Mar 2012 19:36:33 -0500
parents 82103e5992b3
children aeaa7391939e
branches/tags (none)
files .pentadactylrc .zshrc bin/rdio-current-track-tmux keymando/keymandorc.rb tmux/tmux.conf vim/.vimrc

Changes

--- a/.pentadactylrc	Tue Feb 28 14:11:18 2012 -0500
+++ b/.pentadactylrc	Thu Mar 01 19:36:33 2012 -0500
@@ -30,9 +30,9 @@
 nnoremap "'" go
 nnoremap '"' gn
 
-" Switch tabs with J and K
-nnoremap J :tn<CR>
-nnoremap K :tp<CR>
+" Switch tabs with parens
+nnoremap ) :tn<CR>
+nnoremap ( :tp<CR>
 
 " Finally I can overwrite the stupid fucking Firebug toggling correctly.
 " nnoremap <c-f> <f12>
--- a/.zshrc	Tue Feb 28 14:11:18 2012 -0500
+++ b/.zshrc	Thu Mar 01 19:36:33 2012 -0500
@@ -20,6 +20,8 @@
 alias c='clear'
 alias bp='bpython'
 
+export DISABLE_AUTO_TITLE="true"
+
 # Environment variables ------------------------------------------------------
 export EDITOR='vim'
 export PATH="$HOME/.gem/ruby/1.8/bin:${PATH}"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/rdio-current-track-tmux	Thu Mar 01 19:36:33 2012 -0500
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+RDIO_TRACK=$(osascript <<EOF
+if appIsRunning("Rdio") then
+    tell app "Rdio" to get the name of the current track
+end if
+
+on appIsRunning(appName)
+    tell app "System Events" to (name of processes) contains appName
+end appIsRunning
+EOF)
+
+if test "x$RDIO_TRACK" != "x"; then
+RDIO_ARTIST=$(osascript <<EOF
+if appIsRunning("Rdio") then
+    tell app "Rdio" to get the artist of the current track
+end if
+
+on appIsRunning(appName)
+    tell app "System Events" to (name of processes) contains appName
+end appIsRunning
+EOF)
+
+    echo '#[fg=colour137,bg=colour234]⮂#[bg=colour137,fg=colour16,bold] ♫' $RDIO_TRACK '#[nobold]-#[bold]' $RDIO_ARTIST '#[fg=colour254,bg=colour137,nobold]'
+fi
--- a/keymando/keymandorc.rb	Tue Feb 28 14:11:18 2012 -0500
+++ b/keymando/keymandorc.rb	Thu Mar 01 19:36:33 2012 -0500
@@ -18,18 +18,11 @@
 
 map "<Ctrl-Shift-M>" do
     activate('iDvtm')
-    send('<Ctrl-f>')
-    send('3')
+    send('<Ctrl-f>2')
 end
 map "<Ctrl-Shift-I>" do
     activate('iDvtm')
-    send('<Ctrl-f>')
-    send('2')
-end
-map "<Ctrl-Shift-N>" do
-    activate('iDvtm')
-    send('<Ctrl-f>')
-    send('1')
+    send('<Ctrl-f>1')
 end
 
 # Leader ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tmux/tmux.conf	Thu Mar 01 19:36:33 2012 -0500
@@ -0,0 +1,98 @@
+# Use something easier to type as the prefix.
+set -g prefix C-f
+unbind C-b
+bind C-f send-prefix
+
+# Relax!
+set -sg escape-time 0
+set -sg repeat-time 600
+
+# This is hilariously absurd.  How many nerds use tmux on OS X every day and
+# it's still fundamentally broken?
+set -g default-command "dammit-tmux -l zsh"
+
+# Less stretching to get to the first item.
+set -g base-index 1
+setw -g pane-base-index 1
+
+# Reload the config.
+bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
+
+# Saner splitting.
+bind v split-window -h
+bind s split-window -v
+bind S choose-session
+
+# Pane movement
+bind h select-pane -L
+bind j select-pane -D
+bind k select-pane -U
+bind l select-pane -R
+
+# DVTM style pane selection
+bind 1 select-pane -t 1
+bind 2 select-pane -t 2
+bind 3 select-pane -t 3
+bind 4 select-pane -t 4
+bind 5 select-pane -t 5
+bind 6 select-pane -t 6
+bind 7 select-pane -t 7
+bind 8 select-pane -t 8
+bind 9 select-pane -t 9
+
+# Pane resizing
+bind -r C-h resize-pane -L 5
+bind -r C-j resize-pane -D 5
+bind -r C-k resize-pane -U 5
+bind -r C-l resize-pane -R 5
+
+# Window movement
+# Only really makes sense if you have your parens bound to shifts like me.
+bind -r ( select-window -t :-
+bind -r ) select-window -t :+
+
+# 256 colors please
+set -g default-terminal "screen-256color"
+
+# Bad Wolf
+set -g status-fg white
+set -g status-bg colour234
+set -g window-status-activity-attr bold
+set -g pane-border-fg colour245
+set -g pane-active-border-fg colour39
+set -g message-fg colour16
+set -g message-bg colour221
+set -g message-attr bold
+
+# Custom status bar
+# Powerline symbols: ⮂ ⮃ ⮀ ⮁ ⭤
+set -g status-left-length 32
+set -g status-right-length 150
+set -g status-interval 5
+
+set -g status-left '#[fg=colour16,bg=colour254,bold] #S #[fg=colour254,bg=colour238,nobold]⮀#[fg=colour15,bg=colour238,bold] #(ls ~/.mail/steve-stevelosh.com/INBOX/cur  ~/.mail/steve-stevelosh.com/INBOX/new | wc -l | tr -d " ") #[fg=colour238,bg=colour234,nobold]⮀'
+
+set -g status-right '#[fg=colour245]⮃ %R ⮃ %d %b #[fg=colour254,bg=colour234,nobold]#(rdio-current-track-tmux)⮂#[fg=colour16,bg=colour254,bold] #h '
+
+set -g window-status-format "#[fg=white,bg=colour234] #I #W "
+set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=colour16,bg=colour39,noreverse,bold] #I ⮁ #W #[fg=colour39,bg=colour234,nobold]⮀"
+
+# Activity
+setw -g monitor-activity on
+set -g visual-activity off
+
+# Stop it, tmux.
+setw -g automatic-rename off
+
+# Better name management
+bind c new-window \; command-prompt "rename-window '%%'"
+bind C new-window
+bind , command-prompt "rename-window '%%'"
+
+# Copy mode
+setw -g mode-keys vi
+bind [ copy-mode
+unbind p
+bind p paste-buffer
+bind -t vi-copy v begin-selection
+bind -t vi-copy y copy-selection
--- a/vim/.vimrc	Tue Feb 28 14:11:18 2012 -0500
+++ b/vim/.vimrc	Thu Mar 01 19:36:33 2012 -0500
@@ -39,9 +39,7 @@
 set splitbelow
 set splitright
 set fillchars=diff:⣿,vert:│
-set ttimeout
 set notimeout
-set nottimeout
 set autowrite
 set shiftround
 set autoread
@@ -49,6 +47,12 @@
 set linebreak
 set dictionary=/usr/share/dict/words
 
+" Time out on key codes but not mappings.
+" Basically this makes terminal Vim work sanely.
+set notimeout
+set ttimeout
+set ttimeoutlen=10
+
 " Make Vim able to edit crontab files again.
 set backupskip=/tmp/*,/private/tmp/*"
 
@@ -750,6 +754,10 @@
 " Stop it, hash key.
 inoremap # X<BS>#
 
+" Kill window
+nnoremap <c-c> :q<cr>
+inoremap <c-c> <esc>:q<cr>
+
 " For some reason ctags refuses to ignore Python variables, so I'll just hack
 " the tags file with sed and strip them out myself.
 "
@@ -770,7 +778,7 @@
 vnoremap <leader>UG :w !gist -p \| pbcopy<cr>
 
 " Change case
-nnoremap <C-u> gUiw
+nnoremap U gUiw
 inoremap <C-u> <esc>gUiwea
 
 " Emacs bindings in command line mode
@@ -1065,9 +1073,9 @@
 " Powerline {{{
 
 let g:Powerline_symbols = 'fancy'
-let g:Powerline_cache_enabled = 0
+" let g:Powerline_cache_enabled = 0
 " let g:Powerline_theme = 'derp'
-let g:Powerline_colorscheme = 'badwolf'
+" let g:Powerline_colorscheme = 'badwolf'
 
 " }}}
 " Python-Mode {{{