From c46c1490464d928e22cf238d1049f1825e3f6ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Fernando=20S=C3=A1nchez?= Date: Thu, 26 Jun 2014 18:07:56 +0200 Subject: [PATCH] Long time no see --- Xresources | 173 +++++++++++++++++++++++++++++++++++---------- bashrc | 3 +- bin/dual-monitor | 1 - bin/monitors | 23 ++++++ bin/passmenu | 11 +++ bin/single-monitor | 1 - i3/config | 28 +++++--- profile | 2 +- pythonrc.py | 9 +-- vimrc | 15 +++- xinitrc | 1 + zshrc | 2 +- 12 files changed, 209 insertions(+), 60 deletions(-) delete mode 120000 bin/dual-monitor create mode 100755 bin/monitors create mode 100755 bin/passmenu delete mode 120000 bin/single-monitor diff --git a/Xresources b/Xresources index bb8ee5a..b81d016 100644 --- a/Xresources +++ b/Xresources @@ -29,8 +29,8 @@ URxvt.lineSpace: 0 ! 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:style=bold +URxvt*font: xft:DejaVu\ Sans\ Mono:pixelsize=14 +URxvt*boldFont: xft:DejaVu\ Sans\ Mono:pixelsize=14:style=bold ! Fix font space URxvt*letterSpace: -2 @@ -43,6 +43,10 @@ URxvt.scrollBar: false URxvt.perl-ext-common: default,matcher,clipboard URxvt.matcher.button: 1 URxvt.url-launcher: google-chrome + +URxvt.keysym.M-c: perl:clipboard:copy +URxvt.keysym.M-v: perl:clipboard:paste + ! Cursor URxvt.cursorBlink: true @@ -54,48 +58,48 @@ URxvt.pointerBlank: true !!!Source http://github.com/altercation/solarized -*background: #002b36 -*foreground: #657b83 -!!*fading: 40 -*fadeColor: #002b36 -*cursorColor: #93a1a1 -*pointerColorBackground: #586e75 -*pointerColorForeground: #93a1a1 +!*background: #002b36 +!*foreground: #657b83 +!!!*fading: 40 +!*fadeColor: #002b36 +!*cursorColor: #93a1a1 +!*pointerColorBackground: #586e75 +!*pointerColorForeground: #93a1a1 -!! black dark/light -*color0: #073642 -*color8: #002b36 +!!! black dark/light +!*color0: #073642 +!*color8: #002b36 -!! red dark/light -*color1: #dc322f -*color9: #cb4b16 +!!! red dark/light +!*color1: #dc322f +!*color9: #cb4b16 -!! green dark/light -*color2: #859900 -*color10: #586e75 +!!! green dark/light +!*color2: #859900 +!*color10: #586e75 -!! yellow dark/light -*color3: #b58900 -*color11: #657b83 +!!! yellow dark/light +!*color3: #b58900 +!*color11: #657b83 -!! blue dark/light -*color4: #268bd2 -*color12: #839496 +!!! blue dark/light +!*color4: #268bd2 +!*color12: #839496 -!! magenta dark/light -*color5: #d33682 -*color13: #6c71c4 +!!! magenta dark/light +!*color5: #d33682 +!*color13: #6c71c4 -!! cyan dark/light -*color6: #2aa198 -*color14: #93a1a1 +!!! cyan dark/light +!*color6: #2aa198 +!*color14: #93a1a1 -!! white dark/light -*color7: #eee8d5 -*color15: #fdf6e3 +!!! white dark/light +!*color7: #eee8d5 +!*color15: #fdf6e3 -!! Base16 Default -!! Scheme: Chris Kempson (http://chriskempson.com) +!!! Base16 Default +!!! Scheme: Chris Kempson (http://chriskempson.com) !#define base00 #151515 !#define base01 #202020 @@ -134,8 +138,8 @@ URxvt.pointerBlank: true !*.color14: base0F !*.color15: base07 -!! Base16 Tomorrow -!! Scheme: Chris Kempson (http://chriskempson.com) +!!! Base16 Tomorrow +!!! Scheme: Chris Kempson (http://chriskempson.com) !#define base00 #1d1f21 !#define base01 #282a2e @@ -174,7 +178,7 @@ URxvt.pointerBlank: true !*.color14: base0F !*.color15: base07 -! Tomorrow-Night +!!! Tomorrow-Night !*foreground: #c5c8c6 !*background: #1d1f21 !*cursorColor: #aeafad @@ -194,3 +198,96 @@ URxvt.pointerBlank: true !*color13: #b294bb !*color14: #8abeb7 !*color15: #ecebec + +! Solarized color scheme for the X Window System +! +! http://ethanschoonover.com/solarized + + +!! Common + +!#define S_yellow #b58900 +!#define S_orange #cb4b16 +!#define S_red #dc322f +!#define S_magenta #d33682 +!#define S_violet #6c71c4 +!#define S_blue #268bd2 +!#define S_cyan #2aa198 +!#define S_green #859900 + + +!! Dark + +!#define S_base03 #002b36 +!#define S_base02 #073642 +!#define S_base01 #586e75 +!#define S_base00 #657b83 +!#define S_base0 #839496 +!#define S_base1 #93a1a1 +!#define S_base2 #eee8d5 +!#define S_base3 #fdf6e3 + + +! Light + +! #define S_base03 #fdf6e3 +! #define S_base02 #eee8d5 +! #define S_base01 #93a1a1 +! #define S_base00 #839496 +! #define S_base0 #657b83 +! #define S_base1 #586e75 +! #define S_base2 #073642 +! #define S_base3 #002b36 + + +! To only apply colors to your terminal, for example, prefix +! the color assignment statement with its name. Example: +! +!URxvt*background: S_base03 + +!*background: S_base03 +!*foreground: S_base0 +!*fading: 40 +!*fadeColor: S_base03 +!*cursorColor: S_base1 +!*pointerColorBackground: S_base01 +!*pointerColorForeground: S_base1 + +!*color0: S_base02 +!*color1: S_red +!*color2: S_green +!*color3: S_yellow +!*color4: S_blue +!*color5: S_magenta +!*color6: S_cyan +!*color7: S_base2 +!*color9: S_orange +!*color8: S_base03 +!*color10: S_base01 +!*color11: S_base00 +!*color12: S_base0 +!*color13: S_violet +!*color14: S_base1 +!*color15: S_base3 + +! Molokai theme +*background: #101010 +*foreground: #d0d0d0 +*cursorColor: #d0d0d0 +*color0: #101010 +*color1: #960050 +*color2: #66aa11 +*color3: #c47f2c +*color4: #30309b +*color5: #7e40a5 +*color6: #3579a8 +*color7: #9999aa +*color8: #303030 +*color9: #ff0090 +*color10: #80ff00 +*color11: #ffba68 +*color12: #5f5fee +*color13: #bb88dd +*color14: #4eb4fa +*color15: #d0d0d0 +! diff --git a/bashrc b/bashrc index e029aa7..732810a 100644 --- a/bashrc +++ b/bashrc @@ -97,7 +97,7 @@ esac if $TERM_IS_COLOR && ( dircolors --help && ls --color ) &> /dev/null; then # For some reason, the unixs machines need me to use $HOME instead of ~ # List files from highest priority to lowest. As soon as the loop finds one that works, it will exit. - export PROMPT_COMMAND='PS1="\\[\033[1;\`if [[ \$? = "0" ]]; then echo "32m\\]"; else echo "31m\\]"; fi\`☠ \\[\033[0m\]$PS0"' + export PROMPT_COMMAND='PS1="\\[\033[1;\`if [[ \$? = "0" ]]; then echo "32m\\]"; else echo "31m\\]"; fi\`☠ \\[\033[0m\]$PS0"' for POSSIBLE_DIR_COLORS in "$HOME/.dir_colors" "/etc/DIR_COLORS"; do [[ -f "$POSSIBLE_DIR_COLORS" ]] && [[ -r "$POSSIBLE_DIR_COLORS" ]] && eval `dircolors -b "$POSSIBLE_DIR_COLORS"` && break done @@ -179,3 +179,4 @@ PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting ### Added by the Heroku Toolbelt export PATH="$PATH:/usr/local/heroku/bin" +export MSF_DATABASE_CONFIG=/usr/local/share/metasploit-framework/database.yml diff --git a/bin/dual-monitor b/bin/dual-monitor deleted file mode 120000 index 0029e18..0000000 --- a/bin/dual-monitor +++ /dev/null @@ -1 +0,0 @@ -dual-monitor.sputnik \ No newline at end of file diff --git a/bin/monitors b/bin/monitors new file mode 100755 index 0000000..0b185e0 --- /dev/null +++ b/bin/monitors @@ -0,0 +1,23 @@ +#!/bin/sh +case $1 in + "single") + #xrandr --auto --output eDP1 --primary --output DP1 --off + ~/.screenlayout/gsi-single.sh + xrandr --output HDMI1 --off --output DVI-1 --off --output DP1 --off --output eDP1 --mode 1920x1080 --pos 0x0 --rotate normal --output VGA1 --off + ;; + "dual") + case $2 in + "home") + xrandr --output DP1 --off --output VIRTUAL1 --off --output eDP1 --mode 1920x1080 --pos 0x1080 --rotate normal --output HDMI1 --mode 1920x1080 --pos 0x0 --rotate normal --output VGA1 --off + ;; + *) + #xrandr --auto --output eDP1 --primary --right-of DP1 + xrandr --output VIRTUAL1 --off --output DP1 --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI1 --off --output eDP1 --mode 1920x1080 --pos 0x1080 --rotate normal --output VGA1 --off + xrandr --output "DVI-1-0" --off + ;; + esac + ;; +esac +if [ `command -v nitrogen` ]; then + nitrogen --restore +fi diff --git a/bin/passmenu b/bin/passmenu new file mode 100755 index 0000000..88e3877 --- /dev/null +++ b/bin/passmenu @@ -0,0 +1,11 @@ +#!/bin/bash + +shopt -s nullglob globstar + +password_files=( ~/.password-store/**/*.gpg ) +password_files=( "${password_files[@]##*/.password-store/}" ) +password_files=( "${password_files[@]%.gpg}" ) + +password=$(printf '%s\n' "${password_files[@]}" | dmenu "$@") + +pass -c "$password" diff --git a/bin/single-monitor b/bin/single-monitor deleted file mode 120000 index 0b0e919..0000000 --- a/bin/single-monitor +++ /dev/null @@ -1 +0,0 @@ -single-monitor.sputnik \ No newline at end of file diff --git a/i3/config b/i3/config index ee2a2f5..e5a9a63 100644 --- a/i3/config +++ b/i3/config @@ -20,7 +20,8 @@ font xft:Deja Vu Sans 8 floating_modifier $mod #/exec # start a terminal -bindsym $mod+Return exec i3-one-tmux +#bindsym $mod+Return exec i3-one-tmux +bindsym $mod+Return [instance="tmux"] scratchpad show bindsym Control+Mod1+t exec urxvt # start lock @@ -53,11 +54,14 @@ bindsym $mod+q kill 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 -bindsym Mod1+F7 exec i3-secondary-to-primary +bindsym Mod1+F5 exec monitors single +bindsym Mod1+F6 exec monitors dual +bindsym Mod1+F7 exec monitors dual home +bindsym Mod1+F8 exec i3-secondary-to-primary # Move to displays +bindsym $mod+Mod1+j move workspace to output down +bindsym $mod+Mod1+k move workspace to output up bindsym $mod+Mod1+l move workspace to output right bindsym $mod+Mod1+h move workspace to output left @@ -153,6 +157,8 @@ bindsym $mod+Shift+R restart bindsym $mod+Shift+E exec exit_i3.sh bindsym $mod+Mod1+s exec gksudo pm-suspend +bindsym $mod+Shift+p exec passmenu + # resize window (you can also use the mouse for that) mode "resize" { # These bindings trigger as soon as you enter the resize mode @@ -213,13 +219,13 @@ for_window [class="^Google-chrome$"] border none assign [class="Google-chrome" window_role="browser"] 2: Web for_window [class="^Firefox$"] border none assign [class="Firefox" window_role="browser"] 2: Web +for_window [class="Xfce4-notifyd"] floating enable; border none; focus mode_toggle for_window [class="^URxvt$"] border 1px -assign [title="^tmux$"] 1: Term -assign [class="^Gvim$"] 3: Edit -assign [class="^Evince$"] 4: Viewer +for_window [title="^tmux$"] move to scratchpad; +#assign [class="^Gvim$"] 3: Edit +#assign [class="^Evince$"] 4: Viewer assign [class="^Spotify$"] 6: Music assign [class="^Audacious$"] 6: Music -assign [class="^Audacious$"] 6: Music assign [class="^Xchat$"] 7: Chat workspace "1: Term" output DP1 @@ -239,7 +245,7 @@ exec --no-startup-id clipit exec --no-startup-id syndaemon -i 0.5 -d exec --no-startup-id synapse -s exec xautolock -time 10 -locker 'i3lock -t -c 000000 -i ~/Pictures/Wallpapers/Game\ Over\ Hacker.png' & -exec urxvt -e tmux attach +exec urxvt -name tmux -e tmux attach #set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown #mode "$mode_system" { @@ -255,5 +261,5 @@ exec urxvt -e tmux attach #bindsym Escape mode "default" #} #bindsym $mod+Pause mode "$mode_system" -exec --no-startup-id feh --bg-scale Pictures/Wallpapers/little_big_planet.jpg -exec --no-startup-id compton -b --config ~/.compton.conf +exec --no-startup-id nitrogen --restore & +#exec --no-startup-id compton -b --config ~/.compton.conf diff --git a/profile b/profile index b43552d..ff74414 100644 --- a/profile +++ b/profile @@ -22,5 +22,5 @@ if [ -d "$HOME/.bin" ] ; then fi if [ -f $HOME/.Xmodmap ]; then - /usr/bin/xmodmap $HOME/.Xmodmap + /usr/bin/xmodmap $HOME/.Xmodmap 2>/dev/null & fi diff --git a/pythonrc.py b/pythonrc.py index 24b1a68..6663ff9 100644 --- a/pythonrc.py +++ b/pythonrc.py @@ -128,9 +128,10 @@ class EditableBufferInteractiveConsole(InteractiveConsole): # clean up namespace del sys -c = EditableBufferInteractiveConsole(locals=locals()) -c.interact(banner=WELCOME) +if __name__ == "__main__": + c = EditableBufferInteractiveConsole(locals=locals()) + c.interact(banner=WELCOME) # Exit the Python shell on exiting the InteractiveConsole -import sys -sys.exit() + import sys + sys.exit() diff --git a/vimrc b/vimrc index 873697d..64aea45 100644 --- a/vimrc +++ b/vimrc @@ -43,7 +43,9 @@ Bundle "vim-scripts/ShowMarks" Bundle "atweiden/vim-dragvisuals" Bundle "tomasr/molokai" Bundle "elzr/vim-json" -Bundle "balkian/vim-rdf" +Bundle 'Rykka/riv.vim' +Bundle "niklasl/vim-rdf" + filetype plugin indent on " required! @@ -149,7 +151,8 @@ set sessionoptions+=resize,winpos " Color and shit set t_Co=256 set background=dark -colo solarized +"colo solarized +colo molokai "hi SpellBad ctermfg=Red "Statusline @@ -287,3 +290,11 @@ nnoremap < :exe "vertical resize " . (winwidth(0) * 2/3) if has('unnamedplus') set clipboard=unnamed,unnamedplus endif + +set cursorline + +set guioptions-=m "remove menu bar +set guioptions-=T "remove toolbar +set guioptions-=r "remove right-hand scroll bar +set guioptions-=L "remove left-hand scroll bar + diff --git a/xinitrc b/xinitrc index d8f4f73..3fc56b3 100755 --- a/xinitrc +++ b/xinitrc @@ -1,4 +1,5 @@ #!/bin/sh [ -f /etc/xprofile ] && source /etc/xprofile [ -f ~/.xprofile ] && source ~/.xprofile +#[ -f ~/.Xresources ] && xrdb ~/.Xresources #caps:swapescape diff --git a/zshrc b/zshrc index 9d0b5d3..2881db5 100644 --- a/zshrc +++ b/zshrc @@ -37,7 +37,7 @@ export UPDATE_ZSH_DAYS=13 # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) -plugins=(git colored-man virtualenvwrapper cp python wd systemadmin) +plugins=(git colored-man virtualenvwrapper cp python wd systemadmin pass) source $ZSH/oh-my-zsh.sh