From 5934f9164b9618ec91d614a23ad9bf8a19530cf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2EFernando=20S=C3=A1nchez?= Date: Mon, 17 Jun 2013 10:33:28 +0200 Subject: [PATCH] Added i3 --- .gitignore | 1 + Xresources_old | 38 ++++++++++ Xresources_solarized | 96 +++++++++++++++++++++++++ bin | 2 +- i3/config | 164 +++++++++++++++++++++++++++++++++++++++++++ i3/config.bak | 155 ++++++++++++++++++++++++++++++++++++++++ oh-my-zsh | 2 +- vim/ftplugin/tex.vim | 1 + vimrc | 5 +- zshrc | 5 +- 10 files changed, 465 insertions(+), 4 deletions(-) create mode 100644 Xresources_old create mode 100644 Xresources_solarized create mode 100644 i3/config create mode 100644 i3/config.bak diff --git a/.gitignore b/.gitignore index 8d98f9d..04d3364 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .* +vim/Session.vim diff --git a/Xresources_old b/Xresources_old new file mode 100644 index 0000000..1ac4968 --- /dev/null +++ b/Xresources_old @@ -0,0 +1,38 @@ +URxvt*termName:screen-256color +URxvt*loginShell:true +URxvt.iconFile: /usr/share/icons/HighContrast/scalable/apps/utilities-terminal.svg +URxvt.scrollBar: false +URxvt.scrollstyle: rxvt +URxvt*scrollTtyOutput: false +URxvt*scrollWithBuffer: true +URxvt*scrollTtyKeypress: true +URxvt.depth: 32 +URxvt.saveLines: 50000 + +URxvt.font: xft:DejaVu Sans Mono:size=10 +Xft.antialias: rgba +Xft.hinting: true +Xft.hintstyle: hintslight +Xft.rgba: rgb +Xft.dpi: 96 +URxvt.letterSpace: -2 + + +URxvt.foreground: #FFFFFF +URxvt.background: #111111 +URxvt.color0: #2E3436 +URxvt.color1: #CC0000 +URxvt.color2: #4E9A06 +URxvt.color3: #C4A000 +URxvt.color4: #3465A4 +URxvt.color5: #75507B +URxvt.color6: #06989A +URxvt.color7: #D3D7CF +URxvt.color8: #555753 +URxvt.color9: #EF2929 +URxvt.color10: #8AE234 +URxvt.color11: #FCE94F +URxvt.color12: #729FCF +URxvt.color13: #AD7FA8 +URxvt.color14: #34E2E2 +URxvt.color15: #EEEEEC diff --git a/Xresources_solarized b/Xresources_solarized new file mode 100644 index 0000000..6cac00b --- /dev/null +++ b/Xresources_solarized @@ -0,0 +1,96 @@ +!------------------------------------------------------------------------------- +! Xft settings +!------------------------------------------------------------------------------- + +Xft.dpi: 96 +Xft.antialias: false +Xft.rgba: rgb +Xft.hinting: true +Xft.hintstyle: hintslight + +!------------------------------------------------------------------------------- +! URxvt settings +! Colours lifted from Solarized (http://ethanschoonover.com/solarized) +! More info at: +! http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.1.pod +!------------------------------------------------------------------------------- + +URxvt.depth: 32 +URxvt.geometry: 90x30 +URxvt.transparent: false +URxvt.fading: 0 +! URxvt.urgentOnBell: true +! URxvt.visualBell: true +URxvt.loginShell: true +URxvt.saveLines: 50 +URxvt.internalBorder: 3 +URxvt.lineSpace: 0 +URxvt.letterSpace: -2 + +! Fonts +URxvt.allow_bold: true +/* URxvt.font: -*-terminus-medium-r-normal-*-12-120-72-72-c-60-iso8859-1 */ +URxvt*font: xft:DejaVu Sans Mono:pixelsize=14 +URxvt*boldFont: xft:DejaVu Sans Mono:pixelsize=14 + +! Fix font space +URxvt*letterSpace: -1 + +! Scrollbar +URxvt.scrollStyle: rxvt +URxvt.scrollBar: false + +! Perl extensions +URxvt.perl-ext-common: default,matcher +URxvt.matcher.button: 1 +URxvt.urlLauncher: google-chrome + +! Cursor +URxvt.cursorBlink: true +URxvt.cursorColor: #657b83 +URxvt.cursorUnderline: false + +! Pointer +URxvt.pointerBlank: true + +!!Source http://github.com/altercation/solarized + +*background: #002b36 +*foreground: #657b83 +!!*fading: 40 +*fadeColor: #002b36 +*cursorColor: #93a1a1 +*pointerColorBackground: #586e75 +*pointerColorForeground: #93a1a1 + +!! black dark/light +*color0: #073642 +*color8: #002b36 + +!! red dark/light +*color1: #dc322f +*color9: #cb4b16 + +!! green dark/light +*color2: #859900 +*color10: #586e75 + +!! yellow dark/light +*color3: #b58900 +*color11: #657b83 + +!! blue dark/light +*color4: #268bd2 +*color12: #839496 + +!! magenta dark/light +*color5: #d33682 +*color13: #6c71c4 + +!! cyan dark/light +*color6: #2aa198 +*color14: #93a1a1 + +!! white dark/light +*color7: #eee8d5 +*color15: #fdf6e3 diff --git a/bin b/bin index 8937afd..068f9e0 160000 --- a/bin +++ b/bin @@ -1 +1 @@ -Subproject commit 8937afdf4e5a770a1b598f374198963d96968d27 +Subproject commit 068f9e013a6470af445bb444a3bc07551f9943fb diff --git a/i3/config b/i3/config new file mode 100644 index 0000000..e37ad3e --- /dev/null +++ b/i3/config @@ -0,0 +1,164 @@ +# This file has been auto-generated by i3-config-wizard(1). +# +# It will not be overwritten, so edit it as you like. +# +# Should you change your keyboard layout somewhen, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see http://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod4 + +# font for window titles. ISO 10646 = Unicode +# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 +font xft:Deja Vu Sans 8 + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod +#/exec +# start a terminal +bindsym $mod+Return exec /home/jfernando/.bin/i3-one-instance urxvt # $HOME/.bin/one-instance urxvt + +# start lock +bindsym Control+Mod1+l exec i3lock + +bindsym Control+Mod1+w exec google-chrome +bindsym Control+Mod1+g exec gvim +bindsym Control+Mod1+f exec pcmanfm + +# kill focused window +bindsym $mod+q kill + +# start dmenu (a program launcher) +bindsym Mod1+F2 exec dmenu_run + +# change focus +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+H move left +bindsym $mod+Shift+J move down +bindsym $mod+Shift+K move up +bindsym $mod+Shift+L move right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# split in horizontal orientation +bindsym $mod+g split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen + +# change container layout (stacked, tabbed, default) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout default + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# 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 +bindsym $mod+d focus child + +# switch to workspace +bindsym $mod+1 workspace number 1 +bindsym $mod+2 workspace number 2 +bindsym $mod+3 workspace number 3 +bindsym $mod+4 workspace number 4 +bindsym $mod+5 workspace number 5 +bindsym $mod+6 workspace number 6 +bindsym $mod+7 workspace number 7 +bindsym $mod+8 workspace number 8 +bindsym $mod+9 workspace number 9 +bindsym $mod+0 workspace number 10 +bindsym $mod+Control+h workspace prev +bindsym $mod+Control+l workspace next + +# move focused container to workspace +bindsym $mod+Shift+exclam move container to workspace number 1 +bindsym $mod+Shift+at move container to workspace number 2 +bindsym $mod+Shift+numbersign move container to workspace number 3 +bindsym $mod+Shift+dollar move container to workspace number 4 +bindsym $mod+Shift+percent move container to workspace number 5 +bindsym $mod+Shift+asciicircum move container to workspace number 6 +bindsym $mod+Shift+ampersand move container to workspace number 7 +bindsym $mod+Shift+asterisk move container to workspace number 8 +bindsym $mod+Shift+parenleft move container to workspace number 9 +bindsym $mod+Shift+parenright move container to workspace number 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" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym h resize shrink width 10 px or 10 ppt + bindsym j resize grow height 10 px or 10 ppt + bindsym k resize shrink height 10 px or 10 ppt + bindsym l resize grow width 10 px or 10 ppt + + # same bindings, but for the arrow keys + bindsym 113 resize shrink width 10 px or 10 ppt + bindsym 116 resize grow height 10 px or 10 ppt + bindsym 111 resize shrink height 10 px or 10 ppt + bindsym 114 resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym $mod+r mode "resize" + +bindsym $mod+n exec i3-input -F 'rename workspace to %s' -P 'New name: ' + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +bar { + status_command i3status +} + +# class border backgr. text indicator +client.focused #4c7899 #93a1a1 #002b36 #2e9ef4 +client.focused_inactive #4c7899 #002b36 #93a1a1 #484e50 +client.unfocused #333333 #222222 #888888 #292d2e +client.urgent #2f343a #900000 #ffffff #900000 + +for_window [class="^Google-chrome$"] border none +assign [class="Google-chrome" window_role="browser"] 2 Web +for_window [class="^URxvt$"] border 1px +assign [class="^URxvt$"] 1 Term diff --git a/i3/config.bak b/i3/config.bak new file mode 100644 index 0000000..03d8a1c --- /dev/null +++ b/i3/config.bak @@ -0,0 +1,155 @@ +# This file has been auto-generated by i3-config-wizard(1). +# +# It will not be overwritten, so edit it as you like. +# +# Should you change your keyboard layout somewhen, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see http://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod4 + +# font for window titles. ISO 10646 = Unicode +# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 +font xft:Deja Vu Sans Mono 10 + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod +/exec +# start a terminal +bindsym $mod+Return exec i3-sensible-terminal + +# start lock +bindsym Control+Mod1+l exec i3lock + +bindsym Control+Mod1+w exec google-chrome +bindsym Control+Mod1+g exec gvim +bindsym Control+Mod1+f exec thunar + +# kill focused window +bindsym $mod+Shift+Q kill + +# start dmenu (a program launcher) +bindsym $mod+d exec dmenu_run + +# change focus +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+H move left +bindsym $mod+Shift+J move down +bindsym $mod+Shift+K move up +bindsym $mod+Shift+L move right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# split in horizontal orientation +bindsym $mod+g split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen + +# change container layout (stacked, tabbed, default) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout default + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# 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 + +# 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 container to workspace 1 +bindsym $mod+Shift+at move container to workspace 2 +bindsym $mod+Shift+numbersign move container to workspace 3 +bindsym $mod+Shift+dollar move container to workspace 4 +bindsym $mod+Shift+percent move container to workspace 5 +bindsym $mod+Shift+asciicircum move container to workspace 6 +bindsym $mod+Shift+ampersand move container to workspace 7 +bindsym $mod+Shift+asterisk move container to workspace 8 +bindsym $mod+Shift+parenleft move container to workspace 9 +bindsym $mod+Shift+parenright move container to 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" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym h resize shrink width 10 px or 10 ppt + bindsym j resize grow height 10 px or 10 ppt + bindsym k resize shrink height 10 px or 10 ppt + bindsym l resize grow width 10 px or 10 ppt + + # same bindings, but for the arrow keys + bindsym 113 resize shrink width 10 px or 10 ppt + bindsym 116 resize grow height 10 px or 10 ppt + bindsym 111 resize shrink height 10 px or 10 ppt + bindsym 114 resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym $mod+r mode "resize" + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +bar { + status_command i3status +} + +# class border backgr. text indicator +client.focused #4c7899 #285577 #ffffff #2e9ef4 +client.focused_inactive #333333 #5f676a #ffffff #484e50 +client.unfocused #333333 #222222 #888888 #292d2e +client.urgent #2f343a #900000 #ffffff #900000 diff --git a/oh-my-zsh b/oh-my-zsh index 9de171c..e85128f 160000 --- a/oh-my-zsh +++ b/oh-my-zsh @@ -1 +1 @@ -Subproject commit 9de171c0217bf9a50b9a091d56a13cf27b1fbb82 +Subproject commit e85128f2b8e82abd8483b24fb7c90bb41abd5e69 diff --git a/vim/ftplugin/tex.vim b/vim/ftplugin/tex.vim index 2f9af3a..6e16b32 100644 --- a/vim/ftplugin/tex.vim +++ b/vim/ftplugin/tex.vim @@ -15,6 +15,7 @@ let g:LatexBox_latexmk_options="-pvc" let g:Tex_CompileRule_pdf = 'pdflatex --synctex=1 -interaction=nonstopmode $*' let g:LatexBox_output_type="pdf" let g:LatexBox_viewer="evince" +let g:LatexBox_Folding=1 let tlist_tex_settings = 'latex;l:labels;s:sections;t:subsections;u:subsubsections' diff --git a/vimrc b/vimrc index e3a994d..e068add 100644 --- a/vimrc +++ b/vimrc @@ -13,6 +13,7 @@ Bundle "LaTeX-Box-Team/LaTeX-Box" Bundle "tpope/vim-repeat" Bundle "tpope/vim-unimpaired" Bundle "tpope/vim-fugitive" +Bundle "tpope/vim-surround.git" Bundle "scrooloose/nerdtree" Bundle "scrooloose/nerdcommenter" Bundle "scrooloose/syntastic" @@ -75,7 +76,7 @@ noremap \ , " noremap ,cc :silent s/^/=escape(b:comment_leader,'\/')/:nohlsearch " noremap ,cu :silent s/^\V=escape(b:comment_leader,'\/')//e:nohlsearch " -imap "+gP +imap "+gp noremap :w imap :w @@ -115,6 +116,8 @@ nmap Sq :mksession! ~/.vim/Session.vim:qa! nmap SQ :mksession! ~/.vim/Session.vim:wqa nmap SO :so ~/.vim/Session.vim +set sessionoptions+=resize,winpos + "autocmd VimEnter * call RestoreSession() "Make tabs and buffers work better diff --git a/zshrc b/zshrc index 771c7c4..df44eaf 100644 --- a/zshrc +++ b/zshrc @@ -1,4 +1,4 @@ -export PATH=$PATH:$HOME/.bin/ +export PATH=$PATH:$HOME/.bin/:$HOME/.bin/i3-wm-scripts # Only update the path if not running interactively [ -z "$PS1" ] && return @@ -50,3 +50,6 @@ export PYTHONSTARTUP ### Added by the Heroku Toolbelt export PATH="$PATH:/usr/local/heroku/bin" + +### Get RVM to work with zsh +[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"