From 70e97b366fa4193f74121fc994da7976dda7ec1a Mon Sep 17 00:00:00 2001 From: Kacper Donat Date: Fri, 3 Aug 2018 12:33:10 +0200 Subject: [PATCH] zsh config update --- .Xdefaults | 8 ++++---- .zshrc | 18 +++++++++++++++--- install.sh | 9 +++++++++ 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/.Xdefaults b/.Xdefaults index 0a8d3bc..8c03257 100644 --- a/.Xdefaults +++ b/.Xdefaults @@ -1,5 +1,5 @@ urxvt*font: xft:Fira Code Medium:size=8 -urxvt*termName: xterm +urxvt*termName: rxvt-unicode urxvt*foreground: #d5d5d5 urxvt*scrollBar: false urxvt*perl-lib: /usr/lib/urxvt/perl/ @@ -9,7 +9,7 @@ urxvt*matcher.button: 1 urxvt*letterSpace: -1 urxvt*internalBorder: 6 urxvt*fading: 40 -urxvt*fadeColor: [40]#000000 +urxvt*fadeColor: [50]#000000 Xft*dpi: 102 Xft*antialias: true @@ -17,7 +17,7 @@ Xft.rgba: none Xft*hinting: hintfull urxvt*depth: 32 -urxvt*background: [80]#000000 +urxvt*background: [90]#000000 URxvt*color0: #222222 URxvt*color1: #9e1828 @@ -34,4 +34,4 @@ URxvt*color11: #fff796 URxvt*color12: #4186be URxvt*color13: #cf9ebe URxvt*color14: #71bebe -URxvt*color15: #ffffff +URxvt*color15: #d5d5d5 diff --git a/.zshrc b/.zshrc index ca3788f..4dd55ce 100644 --- a/.zshrc +++ b/.zshrc @@ -7,7 +7,7 @@ # Set name of the theme to load. Optionally, if you set this to "random" # it'll load a random theme each time that oh-my-zsh is loaded. # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes -ZSH_THEME="robbyrussell" +ZSH_THEME="lambda-gitster" # Uncomment the following line to use case-sensitive completion. # CASE_SENSITIVE="true" @@ -51,7 +51,7 @@ ZSH_THEME="robbyrussell" # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. -plugins=(git zsh-syntax-highlighting symfony2) +plugins=(git zsh-syntax-highlighting zsh-autosuggestions symfony2) source $ZSH/oh-my-zsh.sh @@ -87,4 +87,16 @@ unsetopt share_history # alias ohmyzsh="mate ~/.oh-my-zsh" # too much vim... -:w () { exit; } +:q () { exit; } + +function ranger-cd { + tempfile="$(mktemp -t tmp.XXXXXX)" + ranger --choosedir="$tempfile" "${@:-$(pwd)}" + test -f "$tempfile" && + if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then + cd -- "$(cat "$tempfile")" + fi + rm -f -- "$tempfile" +} + +bindkey -s '^O' 'ranger-cd\n' diff --git a/install.sh b/install.sh index 0e7ac8a..32641e6 100755 --- a/install.sh +++ b/install.sh @@ -8,6 +8,15 @@ curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ # install oh-my-zsh sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" +# install zsh plugins +git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions +git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting + +mkdir -p ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes + +git clone https://github.com/ergenekonyigit/lambda-gitster.git +cp lambda-gitster/*.zsh-theme ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes + # symlinks ln -s $DIR/.vimrc ~/.vimrc ln -s $DIR/.ideavimrc ~/.ideavimrc