diff options
Diffstat (limited to '.zsh')
-rw-r--r-- | .zsh/aliases (renamed from .zsh/zsh-aliases) | 11 | ||||
-rw-r--r-- | .zsh/functions (renamed from .zsh/zsh-functions) | 16 | ||||
-rw-r--r-- | .zsh/plugins (renamed from .zsh/zsh-plugins) | 4 | ||||
-rw-r--r-- | .zsh/tmp (renamed from .zsh/zsh-tmp) | 2 | ||||
-rw-r--r-- | .zsh/zshrc | 36 |
5 files changed, 18 insertions, 51 deletions
diff --git a/.zsh/zsh-aliases b/.zsh/aliases index 9d2dbe6..28cd4dd 100644 --- a/.zsh/zsh-aliases +++ b/.zsh/aliases @@ -1,3 +1,5 @@ +#!/bin/zsh + # Apps for filetypes alias -s vim=$EDITOR alias -s cpp=$EDITOR @@ -20,23 +22,18 @@ alias ur='cd ~/Dropbox/phd/reports' alias a='vifm' alias c='clear' alias ca='printf "\ec"' -alias commit='git commit -a -m' alias g='git' -alias install='sudo apt-get install' alias m='mutt' alias mail='offlineimap -u quiet &' alias mc='make clean' alias mca='make clean-all' alias n='nvim' alias ns="$EDITOR -S Session.vim" -alias pull='git pull origin master' -alias push='git push origin master' alias pushs='git push --recurse-submodules=check' -alias update='sudo apt-get update' -alias upgrade='sudo apt-get upgrade' alias v='vim' alias x='sh ~/.xmodmap' -alias youtube=mpsyt +alias youtube='mpsyt' +alias notes='vim ~/dotfiles/.notes/Notes' # Configuration alias em="$EDITOR ~/.mutt/muttrc" diff --git a/.zsh/zsh-functions b/.zsh/functions index f9f387d..557d1af 100644 --- a/.zsh/zsh-functions +++ b/.zsh/functions @@ -1,24 +1,18 @@ +#!/bin/zsh + function colo { # Change colors for current session - $HOME/.bin/recolor.sh < ~/.Xresources/Xresources.$1 + $HOME/.bin/recolor.sh < ~/.Xresources/$1 # Load Xresources file for future sessions - xrdb ~/.Xresources/Xresources.$1 + xrdb ~/.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" ~/dotfiles/zshrc -} - -z() { - if [[ -z "$*" ]]; then - cd "$(_z -l 2>&1 | fzf-tmux +s --tac | sed 's/^[0-9,.]* *//')" - else - _z "$@" - fi + sed -i --follow-symlinks "s/^export COLORSCHEME=.*$/export COLORSCHEME=$1/g" ~/.zsh/tmp } fshow() { diff --git a/.zsh/zsh-plugins b/.zsh/plugins index 26b5726..b519e4b 100644 --- a/.zsh/zsh-plugins +++ b/.zsh/plugins @@ -1,3 +1,5 @@ +#! /bin/zsh + # Load zgen source "/home/urbain/.zgen/zgen.zsh" @@ -38,7 +40,7 @@ if ! zgen saved; then zgen save fi -# Plugin configuration +# Plugins configuration # Autosuggestion { @@ -1 +1,3 @@ +#!/bin/zsh + export COLORSCHEME=light @@ -1,11 +1,7 @@ -ZSH_PLUGINS="$HOME/.zsh/zsh-plugins" -ZSH_ALIASES="$HOME/.zsh/zsh-aliases" -ZSH_TMP="$HOME/.zsh/zsh-tmp" - -# Source configurations -source $ZSH_PLUGINS -source $ZSH_ALIASES -source $ZSH_TMP +source "$HOME/.zsh/plugins" +source "$HOME/.zsh/functions" +source "$HOME/.zsh/aliases" +source "$HOME/.zsh/tmp" # Custom key bindings for built-in widgets bindkey -a 'k' history-beginning-search-backward @@ -20,30 +16,6 @@ export PATH="$PATH:/home/urbain/.local/bin" # Editor export EDITOR=/usr/bin/nvim -fshow() { - git log --graph --color=always \ - --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" | - fzf --ansi --no-sort --reverse --tiebreak=index --toggle-sort=\` \ - --bind 'ctrl-m:execute: - echo {} | grep -o "[a-f0-9]\{7\}" | - xargs -I % sh -c "git show --color=always % | less -R"' -} - -function colo { - -# Change colors for current session -$HOME/.bin/recolor.sh < ~/.Xresources/Xresources.$1 - -# Load Xresources file for future sessions -xrdb ~/.Xresources/Xresources.$1 - -# Change environment variable -export COLORSCHEME=light - -# Change default environment variable for future sessions -sed -i --follow-symlinks "s/^export COLORSCHEME=.*$/export COLORSCHEME=$1/g" ~/dotfiles/zshrc -} - # Fix tmux colors if [[ -n ${TMUX} && -n ${commands[tmux]} ]];then case $(tmux showenv TERM 2>/dev/null) in |