From 989a6215c82364d90a4d74da131852c2fa7e7830 Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Mon, 18 Dec 2023 19:13:52 +0100 Subject: [PATCH] Various fixes --- .aliases | 4 ++++ .vimrc | 4 +++- .zshrc | 12 ++++++------ 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.aliases b/.aliases index 6155689..b0e2d17 100644 --- a/.aliases +++ b/.aliases @@ -3,3 +3,7 @@ alias ap='ansible-playbook' alias yey='yay -Syu --noconfirm' # Avoid losing stuff alias rm='rmtrash' +# cp is rsync +alias cp='cpv' +# ls sorted by modification time +alias lt='ls -lath' diff --git a/.vimrc b/.vimrc index 96f9688..56682a1 100644 --- a/.vimrc +++ b/.vimrc @@ -1,4 +1,6 @@ vmap :`>amx`my'xk$v'y!xclip -selection cu map :set pasteik:.!xclip -oJxkJx:set nopaste " Reopen the last edited position in files -au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif +au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif +syntax on +filetype on diff --git a/.zshrc b/.zshrc index d8cfddc..9fd0571 100644 --- a/.zshrc +++ b/.zshrc @@ -24,8 +24,6 @@ HISTFILE=~/.zsh_history HISTSIZE=10000 SAVEHIST=10000 -[[ -s /home/.autojump/etc/profile.d/autojump.sh ]] && source /home/.autojump/etc/profile.d/autojump.sh -autoload -U compinit && compinit -u # 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/ # Example format: plugins=(rails git textmate ruby lighthouse) @@ -64,21 +62,21 @@ zstyle ':completion:*:*:docker-*:*' option-stacking yes # Load ZSH source $ZSH/oh-my-zsh.sh +# Use Catppuccin prompt theme made for Oh My Posh, in zsh +eval "$(oh-my-posh init zsh --config https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/quick-term.omp.json)" + # Preferred editor for local and remote sessions export EDITOR=vim # Do not print user@hostname if user is myself DEFAULT_USER=`whoami` -# Aliases -alias cp="cpv" -alias lt='ls -lath' - # To use when .cfg contains a bare git repo. # See this https://developer.atlassian.com/blog/2016/02/best-way-to-store-dotfiles-git-bare-repo/ alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME' config config --local status.showUntrackedFiles no +# Use GPG key for SSH authentication unset SSH_AGENT_PID if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" @@ -86,10 +84,12 @@ fi export GPG_TTY="$(tty)" gpg-connect-agent updatestartuptty /bye >/dev/null +# Source aliases if [ -f ~/.aliases ]; then . ~/.aliases fi +# Source environment variables if [ -f ~/.env ]; then . ~/.env fi