From 776523cf1e1426788590e561fb8622a7874fc2b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2EFernando=20S=C3=A1nchez?= Date: Thu, 20 Jun 2013 17:13:39 +0200 Subject: [PATCH] Better support for i3 --- bin | 2 +- i3/config | 50 ++++++++++++++++++++++++++++++++++++++++---------- i3/conky.sh | 4 ++++ i3/conkyrc | 26 ++++++++++++++++++++++++++ vimrc | 4 ++-- 5 files changed, 73 insertions(+), 13 deletions(-) create mode 100755 i3/conky.sh create mode 100644 i3/conkyrc diff --git a/bin b/bin index c334393..405a3e1 160000 --- a/bin +++ b/bin @@ -1 +1 @@ -Subproject commit c3343937deb2a65d8cda90c41219c9883ae3da1d +Subproject commit 405a3e196bcabeb9a49abddea0ffbea7c44f850a diff --git a/i3/config b/i3/config index f6406ba..71e8570 100644 --- a/i3/config +++ b/i3/config @@ -20,13 +20,13 @@ font xft:Deja Vu Sans 8 floating_modifier $mod #/exec # start a terminal -bindsym $mod+Return exec i3-one-instance urxvt +bindsym $mod+Return exec i3-one-tmux # start lock bindsym Control+Mod1+l exec i3lock bindsym Control+Mod1+w exec i3-one-instance google-chrome -bindsym Control+Mod1+g exec gvim +bindsym Control+Mod1+g exec i3-one-instance gvim bindsym Control+Mod1+f exec pcmanfm # Spotify @@ -38,7 +38,12 @@ bindsym XF86AudioPrev exec spotify-remote.py -a previous bindsym $mod+q kill # start dmenu (a program launcher) -bindsym Mod1+F2 exec dmenu_run +#bindsym Mod1+F2 exec dmenu_run +bindsym Mod1+F2 exec dmenu_run -fn "-*-cure-medium-*-*-*-11-*-*-*-*-*-*-*" -nb "#101010" -nf "#5f5f5f" -sb "#191919" -sf "#b72f62" -b + +# Arandr magic +bindsym Mod1+F5 exec dual-monitor +bindsym Mod1+F6 exec single-monitor # change focus bindsym $mod+h focus left @@ -154,21 +159,46 @@ 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 +#} + bar { - status_command i3status + mode dock + position top + workspace_buttons yes + status_command ~/.i3/conky.sh + colors { + background #101010 + statusline #101010 + focused_workspace #101010 #586e75 #fdf6e3 + active_workspace #101010 #101010 #cb4b16 + inactive_workspace #101010 #101010 #93a1a1 + urgent_workspace #fdf6e3 #dc322f + } } - # 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 +client.focused #4c7899 #101010 #93a1a1 #2e9ef4 +client.focused_inactive #4c7899 #101010 #93a1a1 #484e50 +client.unfocused #333333 #101010 #93a1a1 #292d2e +client.urgent #2f343a #101010 #93a1a1 #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 +assign [class="^Gvim$"] 3: Edit +assign [class="^Evince$"] 4: Viewer +assign [class="^Spotify$"] 6: Music +assign [class="^Audacious$"] 6: Music workspace "1: Term" output DP1 workspace "2: Web" output DP1 -workspace 3 output eDP1 +workspace "3: Edit" output DP1 +workspace "4: Viewer" output eDP1 +workspace "5: Files" output eDP1 +workspace "6: Music" output eDP1 +workspace "7: Misc Big" output DP1 +workspace "8: Misc Small" output eDP1 + +exec --no-startup-id nm-applet diff --git a/i3/conky.sh b/i3/conky.sh new file mode 100755 index 0000000..2bb0daa --- /dev/null +++ b/i3/conky.sh @@ -0,0 +1,4 @@ +#!/bin/sh +echo "{\"version\":1}" +echo "[[] ," +conky -c ~/.i3/conkyrc diff --git a/i3/conkyrc b/i3/conkyrc new file mode 100644 index 0000000..21e7416 --- /dev/null +++ b/i3/conkyrc @@ -0,0 +1,26 @@ +out_to_x no +own_window no +out_to_console yes +background no +max_text_width 0 +# Update interval in seconds +update_interval 2.0 +total_run_times 0 +override_utf8_locale yes + +TEXT + +# [{ "full_text" : "MPD" , "color" : "\#b58900" } , +# { "full_text" : "${if_mpd_playing}${mpd_smart 50} ${mpd_elapsed}/${mpd_length}${else}${mpd_status}${endif}" , "color" :"\#93a1a1" } , + [ + { "full_text" : "HD" , "color" : "\#b58900" } , + { "full_text" : "home: ${fs_free /home}/${fs_size /home} root: ${fs_free /}/${fs_size /}" , "color" :"\#93a1a1" } , + { "full_text" : "Ram" , "color" : "\#b58900" } , + { "full_text" : "${mem}" , "color" :"\#93a1a1" }, + { "full_text" : "Wifi" , "color" : "\#b58900" } , + { "full_text" : "${wireless_essid wlan0}(${wireless_link_qual wlan0}/${wireless_link_qual_max wlan0})" , "color" :"\#93a1a1" } , + { "full_text" : "Bat" , "color" : "\#b58900" } , + { "full_text" : "${battery BAT0}" , "color" : + ${if_match ${battery_percent BAT0}<20}"\#b95670"${else}"\#5f5f5f"${endif} } , + { "full_text" : "Date" , "color" : "\#b58900" } , + { "full_text" : "${time %b %d %Y %I:%M%P}", "color" :"\#93a1a1" }] , diff --git a/vimrc b/vimrc index e068add..b142eda 100644 --- a/vimrc +++ b/vimrc @@ -83,7 +83,7 @@ imap :w "Custom maps noremap n :NERDTreeToggle noremap t :TagbarToggle -noremap f :CtrlPBuffer +noremap f :CtrlP "Omni set completeopt=longest,menuone @@ -154,7 +154,7 @@ command DiffOrig let g:diffline = line('.') | vert new | set bt=nofile | r # | 0 nnoremap do :DiffOrig nnoremap dc :q:diffoff:exe "norm! ".g:diffline."G" -let g:ctrlp_cmd = 'CtrlPBuffer' +let g:ctrlp_cmd = 'CtrlPMRU' set guifont=DejaVu\ Sans\ Mono