Skip to content

SHELL – ZSH , Powerlevel9k, Tmux, Vim , CCZE

SHELL : ZSH – Powerlevel9k – TMUX – CCZE – VIM

apt-get install zsh tmux ccze vim

# Zsh
chsh -s /bin/zsh
/bin/zsh

# Powerlevel9k
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k

# Tmux 
git clone https://github.com/jimeh/tmux-themepack.git ~/.tmux-themepack 
source-file "${HOME}/.tmux-themepack/powerline/block/green.tmuxtheme" 
#.zshrc
ZSH_THEME="powerlevel9k/powerlevel9k"

##############
# Mes Aliases #
###############

# Apt-get
alias maj='sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade'
alias up='sudo apt-get update'
alias install='sudo apt-get install'
alias autoremove='sudo apt-get autoremove'
alias autoclean='sudo apt-get autoclean'
alias cache='sudo apt-cache search'

# Moves
alias cddl="cd ~/Téléchargements"
alias cl='clear'
alias ll='ls -la'

# Network
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"

# Archives
alias ntar="tar -cf"
alias gz="tar -zcvf"
alias bz="tar -jcvf"
alias zp="zip"
alias ugz="tar -zxf"
alias ubz="tar -jxf"
alias utar="tar -xf"
alias uzp="unzip"
alias ltar="tar -tf"
alias lbz="tar -jtf"
alias lgz="tar -ztf"
alias lzp="unzip -l"
alias llz="tar --lzma -tf"
alias ulz="tar --lzma -xf"
alias lz="tar --lzma -cvf"

#logs
alias syslog="tail -f /var/log/syslog | ccze -A"

# Files search
## fichiers modifiés dans les 48h
alias modifies="find . -mtime -1 -print | more"
# .tmux.conf
#
# By yishan
#

# theme
source-file "${HOME}/.tmux-themepack/powerline/block/blue.tmuxtheme"

#shell
set-option -g default-shell /usr/bin/zsh

#Set 256-colour terminal
set -g default-terminal "screen-256color"

# Number of lines held in window history
set -g history-limit 1000

# Change the prefix key to C-a
set -g prefix C-a
unbind C-b
bind C-a send-prefix

# Mouse
set -g mouse on

# Reload Conf
unbind r
bind r source-file ~/.tmux.conf; display "Reloaded"

# Some extra key bindings to select higher numbered windows
bind F1 selectw -t:10
bind F2 selectw -t:11
bind F3 selectw -t:12
bind F4 selectw -t:13
bind F5 selectw -t:14
bind F6 selectw -t:15
bind F7 selectw -t:16
bind F8 selectw -t:17
bind F9 selectw -t:18
bind F10 selectw -t:19

# Set window notifications
setw -g monitor-activity on
set -g visual-activity on

# Automatically set window title
setw -g automatic-rename on

# Mode-keys style for copy mode
setw -g mode-keys vi

# Navigation entre les fenêtres avec ctrl + flêches 
bind-key -n C-right next
bind-key -n C-left prev
# .vimrc

"always show statusline
set laststatus=2

" Use 256 colours (Use this setting only if your terminal supports 256
" colours)
set t_Co=256
" UTF8
set encoding=utf-8
" Désactive la compatibilité avec vi
set nocompatible
" Utilisation de la souris dans le terminal
set mouse=a
" Adapte les couleurs pour un fond noir 
set background=dark 
" Active la coloration syntaxique 
syntax on
" Affiche les numéros de lignes 
set number
" Affiche le mode d'édition 
set showmode
" Affiche les commandes incomplète 
set showcmd
" Affiche la position du curseur 
set ruler
" Ignore la casse lors de recherche
set ignorecase