2020-05-08 05:10:34 +02:00
|
|
|
# Zgodovina ukazov
|
2016-12-17 01:22:06 +01:00
|
|
|
HISTFILE=~/.histfile
|
|
|
|
HISTSIZE=1000
|
|
|
|
SAVEHIST=10000
|
2020-05-08 05:10:34 +02:00
|
|
|
|
|
|
|
# Vi zadeve, se mi zdi
|
2016-12-17 01:22:06 +01:00
|
|
|
bindkey -v
|
|
|
|
export KEYTIMEOUT=1
|
|
|
|
zstyle :compinstall filename '/home/g1smo/.zshrc'
|
|
|
|
|
|
|
|
autoload -Uz compinit
|
|
|
|
compinit
|
|
|
|
|
2020-05-08 05:10:34 +02:00
|
|
|
# Barve
|
2016-12-17 01:22:06 +01:00
|
|
|
autoload colors zsh/terminfo
|
|
|
|
colors
|
2020-01-11 00:47:01 +01:00
|
|
|
|
2020-05-08 05:10:34 +02:00
|
|
|
# BARVE!
|
|
|
|
export GREP_COLOR='1;32'
|
|
|
|
export CLICOLOR=1
|
|
|
|
export LSCOLORS=ExFxCxDxBxegedabagacad
|
2016-12-17 01:22:06 +01:00
|
|
|
|
2020-05-08 05:10:34 +02:00
|
|
|
function _colorman() {
|
|
|
|
env \
|
|
|
|
LESS_TERMCAP_mb=$(printf "\e[1;35m") \
|
|
|
|
LESS_TERMCAP_md=$(printf "\e[1;34m") \
|
|
|
|
LESS_TERMCAP_me=$(printf "\e[0m") \
|
|
|
|
LESS_TERMCAP_se=$(printf "\e[0m") \
|
|
|
|
LESS_TERMCAP_so=$(printf "\e[7;40m") \
|
|
|
|
LESS_TERMCAP_ue=$(printf "\e[0m") \
|
|
|
|
LESS_TERMCAP_us=$(printf "\e[1;33m") \
|
|
|
|
"$@"
|
|
|
|
}
|
|
|
|
function man() { _colorman man "$@"; }
|
|
|
|
function perldoc() { command perldoc -n less "$@" |man -l -; }
|
2016-12-17 01:22:06 +01:00
|
|
|
|
2020-05-08 05:10:34 +02:00
|
|
|
# Prompt za git
|
2016-12-17 01:22:06 +01:00
|
|
|
autoload -U promptinit
|
|
|
|
promptinit
|
|
|
|
autoload -Uz vcs_info
|
|
|
|
|
|
|
|
zstyle ':vcs_info:*' check-for-changes true
|
|
|
|
zstyle ':vcs_info:*' enable git svn hg
|
|
|
|
zstyle ':vcs_info:*' formats '(%b) '
|
|
|
|
precmd () {
|
|
|
|
vcs_info
|
|
|
|
}
|
|
|
|
|
|
|
|
setopt prompt_subst
|
|
|
|
PROMPT='%n@%m %1~ %{$fg[green]%}${vcs_info_msg_0_}%{$fg[blue]%}» %{$reset_color%}'
|
|
|
|
|
2020-01-11 00:47:01 +01:00
|
|
|
# Reverse search shortcut
|
|
|
|
bindkey '^R' history-incremental-pattern-search-backward
|
|
|
|
|
2020-05-08 05:10:34 +02:00
|
|
|
|
|
|
|
# Splosno barvanje zadev
|
|
|
|
[[ -s "/etc/grc.zsh" ]] && source /etc/grc.zsh
|
|
|
|
|
|
|
|
# CCCAMP 2019 fahrplan
|
|
|
|
#camp() {
|
|
|
|
# curl -s https://fahrplan.events.ccc.de/camp/2019/Fahrplan/schedule.json \
|
|
|
|
# | jq -r '.schedule.conference.days | .[] | select(.date=="'$(date +%F)'") | .rooms | .[] | .[] | select(.date|strptime("%Y-%m-%dT%H:%M:%S%z") > now) | "\(.start) \(.duration)|\(.room)|\(.title)"' \
|
|
|
|
# | sort -V | column -t -s'|'
|
|
|
|
#}
|
|
|
|
|
|
|
|
# Aliasi
|
2016-12-17 01:22:06 +01:00
|
|
|
alias ls='ls --color=auto'
|
|
|
|
alias vi='vim'
|
|
|
|
alias sudo="sudo "
|
|
|
|
alias grep="grep --color=auto"
|
2020-05-08 05:10:34 +02:00
|
|
|
|
2020-09-01 00:54:56 +02:00
|
|
|
# Kitty terminal ssh fix
|
|
|
|
alias ssh="kitty +kitten ssh"
|
2020-05-08 05:10:34 +02:00
|
|
|
|
2016-12-17 01:22:06 +01:00
|
|
|
alias gitclean="git fetch -p && for branch in \$(git branch -vv | grep ': gone]' | gawk '{print \$1}'); do git branch -D \$branch; echo 'deleted \$branch'; done"
|
2018-03-23 05:12:23 +01:00
|
|
|
alias sctl="systemctl"
|
2020-01-11 00:47:01 +01:00
|
|
|
alias ddrush="ddev exec drush"
|
|
|
|
alias dcomposer="ddev exec composer"
|
2020-05-08 05:10:34 +02:00
|
|
|
alias offer-files="python3 -m http.server"
|
2016-12-17 01:41:34 +01:00
|
|
|
|
2017-07-22 03:07:05 +02:00
|
|
|
# X on wayland
|
|
|
|
alias wxon="xhost +local:"
|
2017-05-03 03:54:47 +02:00
|
|
|
|
|
|
|
# RŠ aliasi
|
|
|
|
alias omnom="ssh root@debeli"
|
2016-12-17 01:22:06 +01:00
|
|
|
|
2020-01-11 00:47:01 +01:00
|
|
|
# Ljudmila
|
|
|
|
alias scdev="ssh culture@milci.ljudmila.org"
|
|
|
|
|
2017-10-13 03:37:11 +02:00
|
|
|
# Dolzina mp3 fajlov
|
|
|
|
alias mp3len="for i in \$(ls *.mp3); do echo \$i; soxi -d \$i; done"
|
|
|
|
|
|
|
|
# Hiter ping za net preverit
|
2020-01-11 00:47:01 +01:00
|
|
|
alias pg="ping 1.1.1.1"
|
2017-10-13 03:37:11 +02:00
|
|
|
|
2018-09-23 16:22:22 +02:00
|
|
|
# Najvecji fajli
|
|
|
|
alias najvecji="find . -printf '%s %p\n'| sort -nr | head -30"
|
|
|
|
|
2020-05-08 05:10:34 +02:00
|
|
|
# RŠ ssh
|
|
|
|
alias srs='f(){ ssh jurijp@$1.radiostudent.local };f'
|
2020-09-01 00:54:56 +02:00
|
|
|
alias srr='f(){ ssh root@$1.radiostudent.local };f'
|
|
|
|
alias rss='f(){ ssh jurijp@$1.radiostudent.si };f'
|
|
|
|
alias rsr='f(){ ssh root@$1.radiostudent.si };f'
|
2020-01-11 00:47:01 +01:00
|
|
|
|
2020-05-08 05:10:34 +02:00
|
|
|
# Poslusaj snemanje
|
|
|
|
alias poslusaj='pactl load-module module-loopback latency_msec=1'
|
|
|
|
alias tisina='pactl unload-module module-loopback'
|
2020-09-01 00:54:56 +02:00
|
|
|
|
|
|
|
# Firefox webrender
|
|
|
|
export MOZ_WEBRENDER=1
|
|
|
|
|
|
|
|
# Wayland pls!
|
|
|
|
export KITTY_ENABLE_WAYLAND=1
|
|
|
|
export MOZ_ENABLE_WAYLAND=1
|
|
|
|
export XDG_SESSION_TYPE=wayland
|
|
|
|
# Zadeva zgoraj bi moral bit replacement
|
|
|
|
#export QT_QPA_PLATFORM=wayland
|
|
|
|
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
|
|
|
export QT_WAYLAND_FORCE_DPI=physical
|
|
|
|
|
|
|
|
# Tole bojda ni dobra ideja (pravi wiki!)
|
|
|
|
#export GDK_BACKEND=wayland
|
|
|
|
|
|
|
|
#export TERM=xterm-24bits
|
2020-10-27 21:06:46 +01:00
|
|
|
#export TERM=rxvt-256color
|
|
|
|
export EDITOR=vim
|
|
|
|
|
|
|
|
export PATH="~/.local/bin:~/.cargo/bin:$PATH"
|
|
|
|
|