Configuració de ZSH
This commit is contained in:
@@ -9,19 +9,7 @@ alias dotfiles='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
|
||||
alias gs='git status'
|
||||
alias gd='git diff'
|
||||
alias gdom='git diff origin/master'
|
||||
alias gdomns='git diff origin/master --name-status'
|
||||
alias ga='git add'
|
||||
alias gall='git add --all'
|
||||
alias gc='git commit'
|
||||
alias gcm='git commit -m'
|
||||
alias gcam='git commit -am'
|
||||
alias gco='git checkout'
|
||||
alias gcob='git checkout -b'
|
||||
alias gm='git merge'
|
||||
alias gmom='git merge origin/master'
|
||||
alias gstash='git stash'
|
||||
alias gsl='git stash list'
|
||||
alias gsp='git stash pop'
|
||||
alias gg='git lgb'
|
||||
alias gpull='git pull'
|
||||
alias gpush='git push'
|
||||
|
||||
@@ -8,42 +8,6 @@ alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
. ~/.config/fish/aliases.fish
|
||||
|
||||
#########################
|
||||
# FUNCTIONS #
|
||||
#########################
|
||||
# Manage AWS credentials
|
||||
function aws-credentials
|
||||
if test -d ~/.aws
|
||||
rm ~/.aws;
|
||||
end
|
||||
ln -s .aws.$argv .aws
|
||||
end
|
||||
|
||||
# Activate venv
|
||||
function venv
|
||||
if type -q deactivate
|
||||
deactivate;
|
||||
end
|
||||
. ~/venv/$argv/bin/activate.fish
|
||||
end
|
||||
|
||||
# Go to vilynx repo folder and activate venv
|
||||
function repo
|
||||
if test -d ~/vilynx/repos/$argv
|
||||
cd ~/vilynx/repos/$argv;
|
||||
venv $argv
|
||||
else
|
||||
echo "Could'nt find repo $argv"
|
||||
end
|
||||
end
|
||||
|
||||
# Clear postgresql cache
|
||||
function clear_psql_cache
|
||||
sudo service postgresql stop
|
||||
echo 3 | sudo tee /proc/sys/vm/drop_caches
|
||||
sudo service postgresql start
|
||||
end
|
||||
|
||||
# Install "minimal" python packages
|
||||
function setup-python
|
||||
pip install autopep8 flake8 isort ipython pdbpp pip-tools pynvim
|
||||
|
||||
@@ -34,7 +34,7 @@ new_float normal
|
||||
floating_modifier $mod
|
||||
|
||||
# start a terminal
|
||||
set $terminal alacritty -e fish
|
||||
set $terminal alacritty -e zsh
|
||||
set $browser brave
|
||||
bindsym $mod+Return exec $terminal
|
||||
bindsym $mod+Shift+Return exec cool-retro-term
|
||||
|
||||
38
.zshrc
Normal file
38
.zshrc
Normal file
@@ -0,0 +1,38 @@
|
||||
# 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
|
||||
|
||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||
|
||||
# oh-my-zsh
|
||||
export ZSH="/home/marc/.config/oh-my-zsh"
|
||||
plugins=(git
|
||||
zsh-autosuggestions
|
||||
zsh-syntax-highlighting
|
||||
zsh-history-substring-search
|
||||
zsh-completions)
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# Variables
|
||||
## Path
|
||||
export PATH=/home/marc/.emacs.d/bin:$PATH
|
||||
export PATH=/home/marc/.local/bin:$PATH
|
||||
|
||||
# Aliases
|
||||
alias dotfiles='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
|
||||
alias ll='ls -al'
|
||||
|
||||
## git
|
||||
alias gs='git status'
|
||||
alias gd='git diff'
|
||||
alias gdom='git diff origin/master'
|
||||
alias gc='git commit'
|
||||
alias gm='git merge'
|
||||
alias gpull='git pull'
|
||||
alias gpush='git push'
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
Reference in New Issue
Block a user