2020-05-09 13:43:39 +02:00
|
|
|
parse_git_branch() {
|
2020-11-23 00:43:02 +01:00
|
|
|
command=$(git symbolic-ref --short HEAD 2> /dev/null)
|
|
|
|
[ -z $command ] && echo -e "$ " || echo -e "$(git symbolic-ref --short HEAD 2> /dev/null) $ "
|
2020-05-09 13:43:39 +02:00
|
|
|
}
|
|
|
|
|
2020-09-27 00:39:03 +02:00
|
|
|
gbranch() {
|
|
|
|
echo -e "$(git branch "$@")"
|
|
|
|
}
|
|
|
|
|
2020-05-09 13:43:39 +02:00
|
|
|
[ -f /etc/gentoo-release ] && export ZSH="/usr/share/zsh/site-contrib/oh-my-zsh"
|
|
|
|
[ -f /etc/centos-release ] && export ZSH="$HOME/.oh-my-zsh"
|
2020-05-21 09:50:09 +02:00
|
|
|
[ -f /etc/debian_version ] && export ZSH="$HOME/.oh-my-zsh"
|
2020-05-09 13:43:39 +02:00
|
|
|
|
|
|
|
HISTFILE=$HOME/.history_zsh
|
|
|
|
HISTSIZE=10000
|
|
|
|
SAVEHIST=10000000
|
|
|
|
autoload -U colors && colors
|
|
|
|
setopt PROMPT_SUBST
|
2020-11-23 00:43:02 +01:00
|
|
|
PS1='%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m %{$fg_bold[blue]%}%(!.%1~.%~) $(parse_git_branch)%{$reset_color%}'
|
|
|
|
#PS1='%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%m %{$fg[magenta]%}%~%{$fg[red]%} $(parse_git_branch)]%{$reset_color%}$%b '
|
2020-05-09 13:43:39 +02:00
|
|
|
plugins=(rake ruby vagrant knife knife_ssh kitchen )
|
|
|
|
|
|
|
|
ZSH_DISABLE_COMPFIX=true
|
|
|
|
source $ZSH/oh-my-zsh.sh
|
2021-01-16 18:14:25 +01:00
|
|
|
source $HOME/.password
|
2020-05-09 13:43:39 +02:00
|
|
|
source $HOME/Linux/configs/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh &>> /dev/null
|
|
|
|
source $HOME/Linux/configs/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh &>> /dev/null
|
2021-01-07 18:48:15 +01:00
|
|
|
source $HOME/.plannaplan &>> /dev/null
|
2020-05-09 13:43:39 +02:00
|
|
|
[ ! -d $HOME/.config/fzf ] && git clone https://github.com/junegunn/fzf.git $HOME/.config/fzf
|
|
|
|
[ -f $HOME/.config/fzf/shell/key-bindings.zsh ] && source $HOME/.config/fzf/shell/key-bindings.zsh
|
2020-05-18 09:31:35 +02:00
|
|
|
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
2020-09-09 23:00:20 +02:00
|
|
|
FPATH=/usr/local/share/zsh/site-functions:$FPATH
|
2020-10-14 00:35:04 +02:00
|
|
|
|
2020-11-23 00:43:02 +01:00
|
|
|
#xset b off &>> /dev/null
|
|
|
|
#set bell-style none &>> /dev/null
|
|
|
|
#setxkbmap pl &>> /dev/null
|
2020-05-09 13:43:39 +02:00
|
|
|
|
2020-07-15 09:18:08 +02:00
|
|
|
export GPG_TTY=$(tty)
|
2020-05-09 13:43:39 +02:00
|
|
|
export TERM=xterm-256color
|
|
|
|
export SHELL=/bin/bash
|
|
|
|
export GTK_IM_MODULE=ibus
|
|
|
|
export XMODIFIERS=@im=ibus
|
|
|
|
export QT_IM_MODULE=ibus
|
|
|
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
2020-09-09 23:00:20 +02:00
|
|
|
export CCACHE_DIR="/usr/ccache"
|
2020-05-09 13:43:39 +02:00
|
|
|
export LC_ALL="en_US.UTF-8"
|
|
|
|
export LANG=en_US.UTF-8
|
|
|
|
export LC_ALL=en_US.UTF-8
|
2020-11-07 20:26:35 +01:00
|
|
|
export BROWSER=/home/yorune/.local/bin/browser-x
|
2020-05-09 13:43:39 +02:00
|
|
|
export FZF_DEFAULT_OPTS='--height 40% --layout=reverse'
|
2020-09-09 23:00:20 +02:00
|
|
|
export EIX_LIMIT_COMPACT=0
|
2020-05-09 13:43:39 +02:00
|
|
|
export TERMINAL="st"
|
|
|
|
export QT_SCALE_FACTOR=1.5
|
2021-01-13 00:27:38 +01:00
|
|
|
export VISUAL='vim'
|
2021-01-12 22:31:36 +01:00
|
|
|
export EDITOR='vim'
|
2020-05-09 13:43:39 +02:00
|
|
|
alias svm="sudo vim /etc/portage/make.conf"
|
|
|
|
alias svr="sudo vim /etc/portage/repos.conf"
|
|
|
|
alias svp="sudo vim /etc/portage/package.use"
|
2020-10-14 00:35:04 +02:00
|
|
|
alias sva="sudo vim /etc/portage/package.accept_keywords"
|
2020-05-09 13:43:39 +02:00
|
|
|
alias emerge="sudo emerge"
|
|
|
|
alias channel-check='sudo iwlist wlan0 scan | egrep -i "essid|frequency"'
|
|
|
|
alias grep="grep --color=always"
|
|
|
|
alias egrep="egrep --color=always"
|
|
|
|
alias ls='ls -h --color=auto'
|
|
|
|
alias ll='ls -lha'
|
|
|
|
alias myip="curl ipinfo.io/ip"
|
|
|
|
alias logi="journalctl -f"
|
|
|
|
alias pl="setxkbmap pl"
|
|
|
|
alias graphic-card="glxinfo|egrep 'OpenGL vendor|OpenGL renderer'"
|
|
|
|
alias mylaptop-components="inxi -Fxz"
|
|
|
|
alias r="ranger"
|
|
|
|
alias v="vim"
|
|
|
|
alias feh="feh --scale-down"
|
|
|
|
alias changefont="figlet"
|
|
|
|
alias gmaster="git checkout master"
|
2020-05-09 14:13:00 +02:00
|
|
|
alias gcommit="git commit --author='Marcin Woźniak <y0rune@aol.com>' -s"
|
2020-12-22 18:00:38 +01:00
|
|
|
alias gcommitw="git commit --author='Marcin Woźniak <marcin.wozniak@wundermanthompson.com>'"
|
2020-10-01 18:46:51 +02:00
|
|
|
alias gdel="git push origin --delete"
|
2020-05-09 13:43:39 +02:00
|
|
|
alias gadd="git add"
|
|
|
|
alias gpush="git push"
|
|
|
|
alias gpull="git pull"
|
2020-11-05 23:58:06 +01:00
|
|
|
alias gstatus="git status -s"
|
|
|
|
alias gst="git status -s"
|
2020-11-10 00:26:41 +01:00
|
|
|
alias gdiff="git diff"
|
|
|
|
alias gnew="git checkout -b"
|
2020-10-01 18:46:51 +02:00
|
|
|
alias glog="git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --branches"
|
2020-09-09 23:00:20 +02:00
|
|
|
alias gfg="git checkout master && git fetch upstream && git pull upstream master"
|
2020-05-09 13:43:39 +02:00
|
|
|
alias cal="cal -3"
|
2020-11-10 00:26:41 +01:00
|
|
|
alias code="vscodium-bin"
|
2020-05-09 13:43:39 +02:00
|
|
|
alias vpn="sudo /root/.local/bin/protonvpn c -f"
|
|
|
|
alias vpnch="sudo /root/.local/bin/protonvpn c --cc CH"
|
|
|
|
alias vpnd="sudo /root/.local/bin/protonvpn d"
|
2020-07-15 09:18:08 +02:00
|
|
|
alias tv="~/MEGA/tv/tv.sh"
|
2020-07-30 15:44:43 +02:00
|
|
|
alias newswork="newsboat --url=$HOME/.config/newsboat/urlswork"
|
2021-02-09 11:39:54 +01:00
|
|
|
alias vim="vim -p"
|
2020-08-04 16:09:39 +02:00
|
|
|
alias denpl="trans en:pl"
|
|
|
|
alias dplen="trans pl:en"
|
2020-08-29 16:40:44 +02:00
|
|
|
alias notes="vim $HOME/git/notes/index.md"
|
2020-12-25 23:23:36 +01:00
|
|
|
alias mpv="mpv --vo=x11 --hwdec=no --ytdl-raw-options="yes-playlist=" --ytdl-format='bestvideo[ext=mp4][height<=?1080]+bestaudio[ext=m4a]' --no-resume-playback"
|
2020-05-09 13:43:39 +02:00
|
|
|
|
|
|
|
# Cleaning-up
|
|
|
|
export PATH=$HOME/.local/bin:$PATH
|