217 lines
6.3 KiB
Bash
217 lines
6.3 KiB
Bash
# Zgodovina ukazov
|
|
HISTFILE=~/.histfile
|
|
HISTSIZE=1000
|
|
SAVEHIST=10000
|
|
|
|
# Vi zadeve, se mi zdi
|
|
bindkey -v
|
|
export KEYTIMEOUT=1
|
|
zstyle :compinstall filename '/home/g1smo/.zshrc'
|
|
|
|
autoload -Uz compinit
|
|
compinit
|
|
|
|
# Barve
|
|
autoload colors zsh/terminfo
|
|
colors
|
|
|
|
# BARVE!
|
|
export GREP_COLORS='1;32'
|
|
export CLICOLOR=1
|
|
export LSCOLORS=ExFxCxDxBxegedabagacad
|
|
|
|
# PATH additions
|
|
export GOPATH=~/Sredstva/go
|
|
export PATH="/home/g1smo/bin:/home/g1smo/.cargo/bin:$GOPATH/bin:$PATH"
|
|
|
|
# Default term (i3)
|
|
#export TERMINAL="termite"
|
|
export TERMINAL="kitty"
|
|
export TERM="xterm-256color"
|
|
|
|
function man() {
|
|
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") \
|
|
command man "$@"
|
|
}
|
|
function perldoc() { command perldoc -n less "$@" |man -l -; }
|
|
|
|
# Prompt za git
|
|
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%}'
|
|
|
|
# Aliases
|
|
alias ls='ls --color=auto'
|
|
#alias vim='TERM=xterm-256color vim'
|
|
alias vi='vim'
|
|
alias sudo="sudo "
|
|
alias grep="grep --color=auto"
|
|
# Remove not-required-anymore packages
|
|
alias paclean="sudo pacman -R \$(pacman -Qdt | awk '{print \$1}')"
|
|
# List packages by size
|
|
alias pacsize="expac -H M '%m\t%n' | sort -h"
|
|
alias ffon="sudo cp /etc/resolv.conf.ff /etc/resolv.conf"
|
|
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"
|
|
alias sctl="systemctl"
|
|
|
|
# Firefox scaling!
|
|
alias sf="find ~/.mozilla/firefox -name \"prefs.js\" -exec sed -ri 's/(devPixelsPerPx\\\", \\\")[0-9\\.]+/\\11\.00/' {} + ; firefox"
|
|
# regular firefox
|
|
alias ff="find ~/.mozilla/firefox -name \"prefs.js\" -exec sed -ri 's/(devPixelsPerPx\\\", \\\")[0-9\\.]+/\\11\.75/' {} + ; firefox"
|
|
|
|
# Reverse search shortcut
|
|
bindkey '^R' history-incremental-pattern-search-backward
|
|
|
|
|
|
# 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
|
|
alias ll='ls -l'
|
|
alias grep='grep --color=auto'
|
|
alias ls='ls --color -C'
|
|
alias vi='vim'
|
|
alias sudo='sudo env PATH=$PATH '
|
|
alias ag="rg"
|
|
alias less="less -R"
|
|
|
|
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"
|
|
alias sctl="systemctl"
|
|
alias ddrush="ddev exec drush"
|
|
alias dcomposer="ddev exec composer"
|
|
alias offer-files="python3 -m http.server"
|
|
|
|
# X on wayland
|
|
alias wxon="xhost +local:"
|
|
|
|
# Ljudmila
|
|
alias scdev="ssh culture@milci.ljudmila.org"
|
|
alias scnew="ssh culture@zala.ljudmila.org"
|
|
|
|
# Dolzina mp3 fajlov
|
|
alias mp3len="for i in \$(ls *.mp3); do echo \$i; soxi -d \$i; done"
|
|
|
|
# Hiter ping za net preverit
|
|
alias pg="ping 1.1.1.1"
|
|
|
|
# Najvecji fajli
|
|
alias najvecji="find . -printf '%s %p\n'| sort -nr | head -30"
|
|
|
|
# RŠ ssh
|
|
alias srs='f(){ ssh jurijp@$1.radiostudent.local };f'
|
|
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'
|
|
|
|
# Poslusaj snemanje
|
|
alias poslusaj='pactl load-module module-loopback latency_msec=1'
|
|
alias tisina='pactl unload-module module-loopback'
|
|
|
|
# Guix guile things
|
|
#export GUILE_LOAD_PATH=$HOME/.guix-profile/share/guile/site/2.2:$GUILE_LOAD_PATH
|
|
#export GUILE_LOAD_COMPILED_PATH=$HOME/.guix-profile/lib/guile/2.2/site-ccache:$GUILE_LOAD_COMPILED_PATH
|
|
|
|
# Na prostem sajt(i)
|
|
alias nps='cd ~/ljudmila/naprostem/sajt'
|
|
alias np='f(){ ssh root@$1.na-prostem.si };f'
|
|
|
|
# Kill element
|
|
alias kill-element='kill $(ps aux | grep element | awk '\''{print $2;}'\'')'
|
|
alias kill-zoom='pkill zoom'
|
|
|
|
alias nmc='nmcli con up '
|
|
|
|
# OBS fix
|
|
#alias obs="QT_QPA_PLATFORM=xcb obs"
|
|
|
|
# Build deb pkg
|
|
#alias deb-build="dpkg-buildpackage -us -uc"
|
|
alias deb-build="dpkg-buildpackage -b -rfakeroot -us -uc"
|
|
|
|
alias run-gamma="pkill -f gammastep; sleep 3; screen -dm -- gammastep -m wayland -l 46.05108:14.50513"
|
|
|
|
|
|
# Za LXD!
|
|
export PATH="${PATH}:$(go env GOPATH)/bin:/sbin:/usr/sbin"
|
|
export LD_LIBRARY_PATH="$(go env GOPATH)/deps/dqlite/.libs/:$(go env GOPATH)/deps/raft/.libs/:${LD_LIBRARY_PATH}"
|
|
|
|
# JS fix (prevec nov za openssl)
|
|
#export NODE_OPTIONS="--openssl-legacy-provider"
|
|
|
|
# Chrome scaling
|
|
export CHROMIUM_FLAGS="$CHROMIUM_FLAGS \
|
|
--disable-low-res-tiling
|
|
--num-raster-threads=6 \
|
|
--profiler-timing=0 \
|
|
--disable-composited-antialiasing \
|
|
--test-type \
|
|
--show-component-extension-options \
|
|
--ignore-gpu-blacklist \
|
|
--use-gl=egl \
|
|
--ppapi-flash-path=/usr/lib/chromium-browser/pepper/libpepflashplayer.so \
|
|
--ppapi-flash-version=32.0.0.255 \
|
|
--enable-pinch \
|
|
--flag-switches-begin \
|
|
--enable-gpu-rasterization \
|
|
--enable-oop-rasterization \
|
|
--flag-switches-end"
|
|
|
|
# Guix!
|
|
#export GUIX_PROFILE="$HOME/.guix-profile"
|
|
#export GUIX_PROFILE="$HOME/.config/guix/current"
|
|
#export GUIX_PROFILE_FILE="$GUIX_PROFILE/etc/profile"
|
|
#[ -e $GUIX_PROFILE_FILE ] && source $GUIX_PROFILE_FILE
|
|
#export GUIX_PACKAGE_PATH="$HOME/Projects/guix-packages"
|
|
#export GUIX_LOCPATH="$GUIX_PROFILE/lib/locale"
|
|
#export PATH="/home/g1smo/.config/guix/current/bin${PATH:+:}$PATH"
|
|
#export PATH="/home/g1smo/.guix-profile/bin${PATH:+:}$PATH"
|
|
#export SSL_CERT_DIR="$GUIX_PROFILE/etc/ssl/certs"
|
|
#export SSL_CERT_FILE="$SSL_CERT_DIR/ca-certificates.crt"
|
|
#export GIT_SSL_CAINFO="$SSL_CERT_FILE"
|
|
#export CURL_CA_BUNDLE="$SSL_CERT_FILE"
|
|
|
|
# Mozilla webrender
|
|
export MOZ_WEBRENDER=1
|
|
# Wayland native firefox
|
|
#export MOZ_ENABLE_WAYLAND=1
|
|
|
|
# Layout tipkovnice
|
|
export XKB_DEFAULT_LAYOUT=us,si
|
|
export XKB_DEFAULT_OPTIONS=grp:win_space_toggle,compose:caps
|
|
|
|
# Novejsi opengl
|
|
#export PAN_MESA_DEBUG=gl3
|
|
|
|
#export GDK_BACKEND=wayland
|
|
|
|
#export QT_QPA_PLATFORM=wayland
|
|
#export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
|
|
|
alias scdev="ssh culture@milci.ljudmila.org"
|
|
|
|
export GDK_SCALE=1
|
|
export GDK_DPI_SCALE=0.5
|