summaryrefslogtreecommitdiff
path: root/zsh/.zsh
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2016-04-19 15:24:25 +0100
committerUrbain Vaes <urbain@vaes.uk>2016-04-19 15:24:25 +0100
commite146e947c52ac4adbe426b3f893faff1e46ed5f8 (patch)
tree1605bf4eb78cc619988c92632f3cee2a56143fd5 /zsh/.zsh
parent83bd503208d45fa837348441196dd07223b13e3e (diff)
Use GNU stow for dotfiles management
Diffstat (limited to 'zsh/.zsh')
-rw-r--r--zsh/.zsh/.gitignore2
-rw-r--r--zsh/.zsh/alias32
-rw-r--r--zsh/.zsh/functions16
-rw-r--r--zsh/.zsh/plugins52
4 files changed, 102 insertions, 0 deletions
diff --git a/zsh/.zsh/.gitignore b/zsh/.zsh/.gitignore
new file mode 100644
index 0000000..8ca273a
--- /dev/null
+++ b/zsh/.zsh/.gitignore
@@ -0,0 +1,2 @@
+tmp
+zgen
diff --git a/zsh/.zsh/alias b/zsh/.zsh/alias
new file mode 100644
index 0000000..7da7fb5
--- /dev/null
+++ b/zsh/.zsh/alias
@@ -0,0 +1,32 @@
+#!/bin/zsh
+
+# Commands
+alias c='clear'
+alias ca='printf "\ec"'
+alias cdd='cd ~/dotfiles'
+
+# Shortcut to files
+alias notes='vim ~/dotfiles/.notes'
+alias el='nvim ~/dotfiles/ledger/perso.ledger'
+
+# Programs
+alias a='vifm . .'
+alias ff='FreeFem++'
+alias g='git'
+alias l='ledger'
+alias m='cd ~/.mutt/attachments && mutt && cd -'
+alias e='nvim'
+alias n='nvim'
+alias ns='nvim -S Session.vim'
+alias v='vim'
+alias vs="vim -S Session.vim"
+
+# Build
+alias mc='make clean'
+alias mca='make clean-all'
+
+# Tmux
+alias son="tmux set -g status on"
+alias soff="tmux set -g status off"
+
+unalias ag
diff --git a/zsh/.zsh/functions b/zsh/.zsh/functions
new file mode 100644
index 0000000..7c2b49a
--- /dev/null
+++ b/zsh/.zsh/functions
@@ -0,0 +1,16 @@
+#!/bin/zsh
+
+function colo {
+
+ # Change colors for current session
+ $HOME/bin/recolor < ~/.Xresources/$1
+
+ # Load Xresources file for future sessions
+ xrdb -I$HOME ~/.Xresources/$1
+
+ # Change environment variable
+ export COLORSCHEME=$1
+
+ # Change default environment variable for future sessions
+ sed -i --follow-symlinks "s/^export COLORSCHEME=.*$/export COLORSCHEME=$1/g" ~/.zsh/tmp
+}
diff --git a/zsh/.zsh/plugins b/zsh/.zsh/plugins
new file mode 100644
index 0000000..1016b88
--- /dev/null
+++ b/zsh/.zsh/plugins
@@ -0,0 +1,52 @@
+#! /bin/zsh
+
+# Load zgen
+source "$HOME/.zsh/zgen/zgen.zsh"
+
+# Load plugins
+if ! zgen saved; then
+
+ echo "Creating a zgen save"
+
+ # Load oh-my-zsh framework
+ zgen oh-my-zsh
+
+ # Oh-my-zsh plugins
+ zgen oh-my-zsh plugins/git
+ zgen oh-my-zsh plugins/vi-mode
+ zgen oh-my-zsh plugins/archlinux
+ zgen oh-my-zsh plugins/ubuntu
+ zgen oh-my-zsh plugins/tmux
+ zgen oh-my-zsh plugins/themes
+
+ # zsh-users plugins
+ zgen load zsh-users/zsh-completions src
+ zgen load zsh-users/zsh-syntax-highlighting
+
+ # Appearance
+ zgen oh-my-zsh themes/eastwood
+
+ # Navigation plugins
+ zgen load uvaes/fzf-marks
+
+ # Other plugins
+ zgen load rupa/z
+ zgen load supercrabtree/k
+ zgen load djui/alias-tips
+ zgen load tarruda/zsh-autosuggestions
+ zgen load joel-porquet/zsh-dircolors-solarized
+
+ # Save all to init script
+ zgen save
+fi
+
+# Plugins configuration
+
+# Autosuggestion
+{
+ ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=6'
+ bindkey '^y' autosuggest-accept
+}
+
+# Z
+export _Z_EXCLUDE_DIRS=("$HOME/sshfs", "$HOME/nfs")