Skip to content

Instantly share code, notes, and snippets.

@kersny
Created August 23, 2013 00:20
Show Gist options
  • Save kersny/6314283 to your computer and use it in GitHub Desktop.
Save kersny/6314283 to your computer and use it in GitHub Desktop.
Some random system config stuff
general {
colors = true
interval = 5
output_format = "i3bar"
}
order += "ethernet eth0"
order += "load"
order += "time"
ethernet eth0 {
# if you use %speed, i3status requires root privileges
format_up = "E: %ip (%speed)"
format_down = "E: down"
}
time {
format = "%Y-%m-%d %I:%M:%S"
}
load {
format = "%1min"
}
set-option -g prefix C-a
# tmux vim integration
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
# preferred split commands
bind v split-window -h
bind s split-window -v
#mouse
setw -g mode-mouse on
setw -g mouse-select-pane on
# resize
bind -n M-h resize-pane -L 1
bind -n M-k resize-pane -U 1
bind -n M-j resize-pane -D 1
bind -n M-l resize-pane -R 1
# renumber windows when you delete and such
setw -g renumber on
# escape time, so that escape doesn't suck
set -s escape-time 0
unbind ]
bind-key -tvi-copy Enter copy-pipe "DISPLAY=:0 parcellite"
# powerline
set-option -g status-utf8 on
source '~/.local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf'
" Standard config stuff
set nocompatible
filetype off
set number
set ruler
syntax on
" file location resuming
set viminfo='10,\"100,:20,%,n~/.viminfo
function! ResCur()
if line("'\"") <= line("$")
normal! g`"
return 1
endif
endfunction
augroup resCur
autocmd!
autocmd BufWinEnter * call ResCur()
augroup END
" Vundle
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
" tmux split integration
Bundle 'christoomey/vim-tmux-navigator'
" Command-T, for finding & opening files
Bundle 'git://git.wincent.com/command-t.git'
" ir_black theme
Bundle 'wesgibbs/vim-irblack'
filetype plugin indent on
" Theming
set t_Co=256
set background=dark
colorscheme ir_black
" Easily swap line numbers on/off, for copy/pasting
function! SwapNum()
if &number==1 set nonumber
else set number
endif
endfunction
map <Leader>n :call SwapNum()<CR>
" set the "unnamed" (default) clipboard to the system clipboard
set clipboard=unnamedplus
" 1337 mode
inoremap <Up> <NOP>
inoremap <Down> <NOP>
inoremap <Left> <NOP>
inoremap <Right> <NOP>
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>
# i3 config file (v4)
# general
set $mod Mod4
hide_edge_borders both
new_window none
# font for window titles. ISO 10646 = Unicode
font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# starting
bindsym $mod+Return exec urxvt -fade 0
bindsym $mod+Space exec dmenu_run
bindsym $mod+c exec ~/.local/bin/chrome
bindsym Control+Shift+L exec i3lock -c 000000
# killing
bindsym $mod+Shift+Q kill
# focusing
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# moving
bindsym $mod+Shift+H move left
bindsym $mod+Shift+J move down
bindsym $mod+Shift+K move up
bindsym $mod+Shift+L move right
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
# move focused container to workspace
bindsym $mod+Shift+exclam move workspace 1
bindsym $mod+Shift+at move workspace 2
bindsym $mod+Shift+numbersign move workspace 3
bindsym $mod+Shift+dollar move workspace 4
bindsym $mod+Shift+percent move workspace 5
bindsym $mod+Shift+asciicircum move workspace 6
bindsym $mod+Shift+ampersand move workspace 7
bindsym $mod+Shift+asterisk move workspace 8
bindsym $mod+Shift+parenleft move workspace 9
bindsym $mod+Shift+parenright move workspace 10
# reload the configuration file
bindsym $mod+Shift+C reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+R restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+E exit
# resize window (you can also use the mouse for that)
mode "resize" {
bindsym h resize shrink left 10 px or 10 ppt
bindsym Shift+H resize grow left 10 px or 10 ppt
bindsym j resize shrink down 10 px or 10 ppt
bindsym Shift+J resize grow down 10 px or 10 ppt
bindsym k resize shrink up 10 px or 10 ppt
bindsym Shift+K resize grow up 10 px or 10 ppt
bindsym l resize shrink right 10 px or 10 ppt
bindsym Shift+L resize grow right 10 px or 10 ppt
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
bar {
status_command i3status
mode dock
position bottom
output DVI-I-1
}
# unused, may be nice to enable in the future
# split in horizontal orientation
# bindsym $mod+h split h
# split in vertical orientation
# bindsym $mod+v split v
# change focus between tiling / floating windows
# bindsym $mod+space focus mode_toggle
# focus the parent container
# bindsym $mod+a focus parent
# focus the child container
# bindcode $mod+d focus child
# change container layout (stacked, tabbed, default)
# bindsym $mod+s layout stacking
# bindsym $mod+w layout tabbed
# bindsym $mod+e layout default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment