tweaking
This commit is contained in:
parent
d12c9090c0
commit
4d3e3ba078
6 changed files with 79 additions and 70 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -31,3 +31,6 @@
|
||||||
[submodule "prive"]
|
[submodule "prive"]
|
||||||
path = dotfiles_private
|
path = dotfiles_private
|
||||||
url = git@git.deuxfleurs.fr:adrien/dotfiles_private.git
|
url = git@git.deuxfleurs.fr:adrien/dotfiles_private.git
|
||||||
|
[submodule "tmux/plugins/tmux-fzf"]
|
||||||
|
path = tmux/plugins/tmux-fzf
|
||||||
|
url = https://git::@github.com/sainnhe/tmux-fzf
|
||||||
|
|
|
@ -105,7 +105,7 @@ function installDependencies {
|
||||||
# Dependencies
|
# Dependencies
|
||||||
sudo apt update > /dev/null 2>&1
|
sudo apt update > /dev/null 2>&1
|
||||||
sudo apt install -y apt-transport-https curl zsh tmux autojump \
|
sudo apt install -y apt-transport-https curl zsh tmux autojump \
|
||||||
fonts-firacode fonts-powerline > /dev/null 2>&1
|
fonts-firacode fonts-powerline fzf vim > /dev/null 2>&1
|
||||||
|
|
||||||
# Install Sublime Text
|
# Install Sublime Text
|
||||||
if [[ ${SUBLIME} -eq 1 ]]; then
|
if [[ ${SUBLIME} -eq 1 ]]; then
|
||||||
|
@ -126,8 +126,9 @@ function installDependencies {
|
||||||
# Install powerlevel9k theme in Oh-My-Zsh
|
# Install powerlevel9k theme in Oh-My-Zsh
|
||||||
if [ ! -d "${HOME}/.oh-my-zsh/custom/themes/powerlevel9k" ]; then
|
if [ ! -d "${HOME}/.oh-my-zsh/custom/themes/powerlevel9k" ]; then
|
||||||
echo Installing Powerlevel9k theme...
|
echo Installing Powerlevel9k theme...
|
||||||
git clone https://github.com/bhilburn/powerlevel9k.git \
|
# git clone https://github.com/bhilburn/powerlevel9k.git \
|
||||||
${HOME}/.oh-my-zsh/custom/themes/powerlevel9k > /dev/null 2>&1
|
# ${HOME}/.oh-my-zsh/custom/themes/powerlevel9k > /dev/null 2>&1
|
||||||
|
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
78
tmux.conf
78
tmux.conf
|
@ -1,9 +1,9 @@
|
||||||
# KEY BINDINGS
|
# KEY BINDINGS
|
||||||
# Adrien Luxey
|
# Adrien Luxey
|
||||||
|
|
||||||
###########################
|
#######################
|
||||||
### Packages management ###
|
# Packages management #
|
||||||
###########################
|
#######################
|
||||||
|
|
||||||
# Tmux Package Manager
|
# Tmux Package Manager
|
||||||
# Prefix + I => Install plugins (after adding them to tmux.conf)
|
# Prefix + I => Install plugins (after adding them to tmux.conf)
|
||||||
|
@ -15,7 +15,7 @@ set -g @plugin 'tmux-plugins/tpm'
|
||||||
#set -g @plugin 'odedlaz/tmux-onedark-theme'
|
#set -g @plugin 'odedlaz/tmux-onedark-theme'
|
||||||
# Tmux-Themepack (feat Powerline)
|
# Tmux-Themepack (feat Powerline)
|
||||||
set -g @plugin 'jimeh/tmux-themepack'
|
set -g @plugin 'jimeh/tmux-themepack'
|
||||||
set -g @themepack 'powerline/default/blue'
|
set -g @themepack 'powerline/default/blues'
|
||||||
|
|
||||||
# Save and restore Tmux sessions
|
# Save and restore Tmux sessions
|
||||||
# Prefix + Ctrl-s => Save current session
|
# Prefix + Ctrl-s => Save current session
|
||||||
|
@ -37,48 +37,40 @@ set -g @continuum-save-interval '15' # save time in minutes
|
||||||
# Y => Put (copy a selection then paste it to cmd)
|
# Y => Put (copy a selection then paste it to cmd)
|
||||||
set -g @plugin 'tmux-plugins/tmux-yank'
|
set -g @plugin 'tmux-plugins/tmux-yank'
|
||||||
|
|
||||||
# There seems to be cool things to make Vim and Tmux play well together too
|
# Manage sessions, windows etc. with fzf
|
||||||
|
set -g @plugin 'sainnhe/tmux-fzf'
|
||||||
|
|
||||||
|
|
||||||
#######################
|
###########
|
||||||
### Adrien's stuff ###
|
# Theming #
|
||||||
#######################
|
###########
|
||||||
|
|
||||||
|
# Make tmux display true colors
|
||||||
|
set -g default-terminal "screen-256color"
|
||||||
|
#set -g default-terminal "xterm-256color"
|
||||||
|
#set -ga terminal-overrides ",*256col*:Tc"
|
||||||
|
|
||||||
|
########
|
||||||
|
# Misc #
|
||||||
|
########
|
||||||
|
|
||||||
# Set the display duration of message (in ms)
|
# Set the display duration of message (in ms)
|
||||||
set-option -g display-time 2000
|
set-option -g display-time 4000
|
||||||
|
|
||||||
# Make tmux display true colors )
|
|
||||||
set -g default-terminal "xterm-256color"
|
|
||||||
set -ga terminal-overrides ",*256col*:Tc"
|
|
||||||
|
|
||||||
# Remember my path when splitting windows
|
# Remember my path when splitting windows
|
||||||
bind % split-window -h -c '#{pane_current_path}' # Split panes horizontally
|
bind % split-window -h -c '#{pane_current_path}' # Split panes horizontally
|
||||||
bind '"' split-window -v -c '#{pane_current_path}' # Split panes vertically
|
bind '"' split-window -v -c '#{pane_current_path}' # Split panes vertically
|
||||||
|
|
||||||
# A big-ass history
|
# A big-ass history
|
||||||
set -g history-limit 10000
|
set -g history-limit 50000
|
||||||
|
|
||||||
# Fast key repetition with escape-time 0
|
# Fast key repetition with escape-time 0
|
||||||
set -g escape-time 0
|
set -g escape-time 0
|
||||||
|
|
||||||
#####################################################
|
######################
|
||||||
# Simple nested tmux sessions (e.g. remote and local)
|
# Vim Tmux Navigator #
|
||||||
# F10 toggles tmux listening for keystrokes, allowing to switch betwen remote and local
|
######################
|
||||||
# https://www.freecodecamp.org/news/tmux-in-practice-local-and-nested-remote-tmux-sessions-4f7ba5db8795/
|
|
||||||
bind -T root F10 \
|
|
||||||
set prefix None \;\
|
|
||||||
set key-table off \;\
|
|
||||||
display-message "Discarding keystrokes."\;\
|
|
||||||
if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\
|
|
||||||
refresh-client -S
|
|
||||||
bind -T off F10 \
|
|
||||||
set -u prefix \;\
|
|
||||||
set -u key-table \;\
|
|
||||||
display-message "Listening to keystrokes."\;\
|
|
||||||
refresh-client -S
|
|
||||||
#####################################################
|
|
||||||
|
|
||||||
# Vim Tmux Navigator
|
|
||||||
# Smart pane switching with awareness of Vim splits.
|
# Smart pane switching with awareness of Vim splits.
|
||||||
# See: https://github.com/christoomey/vim-tmux-navigator
|
# See: https://github.com/christoomey/vim-tmux-navigator
|
||||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
||||||
|
@ -102,9 +94,27 @@ bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
|
||||||
# Notes :
|
# Notes :
|
||||||
# prefix ~ --> show-messages (see previous messages)
|
# prefix ~ --> show-messages (see previous messages)
|
||||||
|
|
||||||
#####################
|
###################
|
||||||
### Alex's stuff ###
|
# Nested sessions #
|
||||||
#####################
|
###################
|
||||||
|
|
||||||
|
# F10 toggles tmux listening for keystrokes, allowing to switch betwen remote and local
|
||||||
|
# https://www.freecodecamp.org/news/tmux-in-practice-local-and-nested-remote-tmux-sessions-4f7ba5db8795/
|
||||||
|
bind -T root F10 \
|
||||||
|
set prefix None \;\
|
||||||
|
set key-table off \;\
|
||||||
|
display-message "Discarding keystrokes."\;\
|
||||||
|
if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\
|
||||||
|
refresh-client -S
|
||||||
|
bind -T off F10 \
|
||||||
|
set -u prefix \;\
|
||||||
|
set -u key-table \;\
|
||||||
|
display-message "Listening to keystrokes."\;\
|
||||||
|
refresh-client -S
|
||||||
|
|
||||||
|
################
|
||||||
|
# Alex's stuff #
|
||||||
|
################
|
||||||
|
|
||||||
setw -g mode-keys vi
|
setw -g mode-keys vi
|
||||||
|
|
||||||
|
|
1
tmux/plugins/tmux-fzf
Submodule
1
tmux/plugins/tmux-fzf
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit d62b6865c0e7c956ad1f0396823a6f34cf7452a7
|
24
vimrc
24
vimrc
|
@ -33,7 +33,10 @@ filetype plugin indent on " required
|
||||||
" Navigation "
|
" Navigation "
|
||||||
""""""""""""""
|
""""""""""""""
|
||||||
|
|
||||||
" Jump to line: 30G to move to line 30
|
" Jump beginning/end of file: gg/G
|
||||||
|
" Jump to line 30: 30G
|
||||||
|
" Jump 50% up/down: Ctrl-d/Ctrl-u
|
||||||
|
" Jump prev/next word: b/w
|
||||||
|
|
||||||
" From https://stackoverflow.com/questions/33245317/vim-and-azerty-keyboards
|
" From https://stackoverflow.com/questions/33245317/vim-and-azerty-keyboards
|
||||||
" 1. Move to the end of the line
|
" 1. Move to the end of the line
|
||||||
|
@ -61,6 +64,15 @@ set scrolloff=12
|
||||||
" auto-reload tmux conf when updated
|
" auto-reload tmux conf when updated
|
||||||
autocmd bufwritepost ~/dotfiles/.tmux.conf execute ':!tmux source-file %'
|
autocmd bufwritepost ~/dotfiles/.tmux.conf execute ':!tmux source-file %'
|
||||||
|
|
||||||
|
"""""""""""
|
||||||
|
" Theming "
|
||||||
|
"""""""""""
|
||||||
|
|
||||||
|
syntax enable
|
||||||
|
set background=dark
|
||||||
|
colorscheme blues
|
||||||
|
"let g:airline_theme='minimalist' " The airline theme
|
||||||
|
let g:airline_powerline_fonts=1 " Make airline use powerline fonts (pretty arrows)
|
||||||
|
|
||||||
""""""""
|
""""""""
|
||||||
" Misc "
|
" Misc "
|
||||||
|
@ -69,13 +81,6 @@ autocmd bufwritepost ~/dotfiles/.tmux.conf execute ':!tmux source-file %'
|
||||||
" Allow saving of files as sudo when I forgot to start vim using sudo.
|
" Allow saving of files as sudo when I forgot to start vim using sudo.
|
||||||
cmap w!! w !sudo tee > /dev/null %
|
cmap w!! w !sudo tee > /dev/null %
|
||||||
|
|
||||||
" Styling
|
|
||||||
syntax enable
|
|
||||||
set background=dark
|
|
||||||
colorscheme blues
|
|
||||||
let g:airline_theme='minimalist' " The airline theme
|
|
||||||
let g:airline_powerline_fonts=1 " Make airline use powerline fonts (pretty arrows)
|
|
||||||
|
|
||||||
" Do not create swap files
|
" Do not create swap files
|
||||||
set nobackup
|
set nobackup
|
||||||
set noswapfile
|
set noswapfile
|
||||||
|
@ -104,8 +109,6 @@ augroup END
|
||||||
" ----------------------------------------- "
|
" ----------------------------------------- "
|
||||||
|
|
||||||
au BufNewFile,BufRead *.vim setlocal noet ts=4 sw=4 sts=4
|
au BufNewFile,BufRead *.vim setlocal noet ts=4 sw=4 sts=4
|
||||||
au BufNewFile,BufRead *.txt setlocal noet ts=4 sw=4
|
|
||||||
"#au BufNewFile,BufRead *.md setlocal spell noet ts=4 sw=4
|
|
||||||
au BufNewFile,BufRead *.md setlocal nospell noet ts=4 sw=4
|
au BufNewFile,BufRead *.md setlocal nospell noet ts=4 sw=4
|
||||||
au BufNewFile,BufRead *.yml,*.yaml setlocal expandtab ts=2 sw=2
|
au BufNewFile,BufRead *.yml,*.yaml setlocal expandtab ts=2 sw=2
|
||||||
au BufNewFile,BufRead *.cpp setlocal expandtab ts=2 sw=2
|
au BufNewFile,BufRead *.cpp setlocal expandtab ts=2 sw=2
|
||||||
|
@ -128,6 +131,7 @@ au BufNewFile,BufRead *.go setlocal noet ts=4 sw=4 sts=4
|
||||||
autocmd BufNewFile,BufReadPost *.scala setl shiftwidth=2 expandtab
|
autocmd BufNewFile,BufReadPost *.scala setl shiftwidth=2 expandtab
|
||||||
|
|
||||||
" Markdown Settings
|
" Markdown Settings
|
||||||
|
au BufNewFile,BufRead *.txt setlocal noet ts=4 sw=4
|
||||||
autocmd BufNewFile,BufReadPost *.md setl ts=4 sw=4 sts=4 expandtab
|
autocmd BufNewFile,BufReadPost *.md setl ts=4 sw=4 sts=4 expandtab
|
||||||
|
|
||||||
" lua settings
|
" lua settings
|
||||||
|
|
36
zshrc
36
zshrc
|
@ -1,3 +1,10 @@
|
||||||
|
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||||
|
# Initialization code that may require console input (password prompts, [y/n]
|
||||||
|
# confirmations, etc.) must go above this block; everything else may go below.
|
||||||
|
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||||
|
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||||
|
fi
|
||||||
|
|
||||||
# If you come from bash you might have to change your $PATH.
|
# If you come from bash you might have to change your $PATH.
|
||||||
# export PATH=$HOME/bin:/usr/local/bin:$PATH
|
# export PATH=$HOME/bin:/usr/local/bin:$PATH
|
||||||
|
|
||||||
|
@ -10,31 +17,21 @@ export ZSH=$HOME/.oh-my-zsh
|
||||||
#ZSH_THEME="random"
|
#ZSH_THEME="random"
|
||||||
#ZSH_THEME="avit"
|
#ZSH_THEME="avit"
|
||||||
#ZSH_THEME="half-life"
|
#ZSH_THEME="half-life"
|
||||||
ZSH_THEME="agnoster"
|
#ZSH_THEME="agnoster"
|
||||||
|
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||||
|
DEFAULT_USER=adrien
|
||||||
|
|
||||||
# Uncomment the following line to use case-sensitive completion.
|
# Uncomment the following line to use case-sensitive completion.
|
||||||
CASE_SENSITIVE="false"
|
CASE_SENSITIVE="false"
|
||||||
|
|
||||||
# Uncomment the following line to use hyphen-insensitive completion. Case
|
|
||||||
# sensitive completion must be off. _ and - will be interchangeable.
|
|
||||||
# HYPHEN_INSENSITIVE="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to disable bi-weekly auto-update checks.
|
# Uncomment the following line to disable bi-weekly auto-update checks.
|
||||||
# DISABLE_AUTO_UPDATE="true"
|
# DISABLE_AUTO_UPDATE="true"
|
||||||
|
|
||||||
# Uncomment the following line to change how often to auto-update (in days).
|
# Uncomment the following line to change how often to auto-update (in days).
|
||||||
|
export UPDATE_ZSH_DAYS=13
|
||||||
# export UPDATE_ZSH_DAYS=13
|
|
||||||
|
|
||||||
# Uncomment the following line to disable colors in ls.
|
|
||||||
# DISABLE_LS_COLORS="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to disable auto-setting terminal title.
|
# Uncomment the following line to disable auto-setting terminal title.
|
||||||
# DISABLE_AUTO_TITLE="true"
|
# DISABLE_AUTO_TITLE="true"
|
||||||
|
|
||||||
# Uncomment the following line to enable command auto-correction.
|
|
||||||
# ENABLE_CORRECTION="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||||
# COMPLETION_WAITING_DOTS="true"
|
# COMPLETION_WAITING_DOTS="true"
|
||||||
|
|
||||||
|
@ -43,14 +40,6 @@ CASE_SENSITIVE="false"
|
||||||
# much, much faster.
|
# much, much faster.
|
||||||
DISABLE_UNTRACKED_FILES_DIRTY="true"
|
DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||||
|
|
||||||
# Uncomment the following line if you want to change the command execution time
|
|
||||||
# stamp shown in the history command output.
|
|
||||||
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
|
||||||
# HIST_STAMPS="mm/dd/yyyy"
|
|
||||||
|
|
||||||
# Would you like to use another custom folder than $ZSH/custom?
|
|
||||||
# ZSH_CUSTOM=/path/to/new-custom-folder
|
|
||||||
|
|
||||||
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
# 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/
|
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
||||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||||
|
@ -91,4 +80,5 @@ if [ -f ~/.zshrc.local ]; then
|
||||||
. ~/.zshrc.local
|
. ~/.zshrc.local
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||||
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||||
|
|
Loading…
Reference in a new issue