Browse Source

stupid flanders

main
Michael Pappe 6 months ago
parent
commit
aface9bb42
  1. 2
      .config/gtk-3.0/settings.ini
  2. 13
      .config/kitty/kitty.conf
  3. 3
      .config/nvim/init.vim
  4. 2
      .config/xsettingsd/xsettingsd.conf
  5. 1668
      .config/zsh/.p10k.zsh
  6. 15
      .config/zsh/.zprofile
  7. 63
      .config/zsh/.zshenv
  8. 71
      .config/zsh/.zshrc
  9. 97
      .config/zsh/50_aliases.zsh
  10. 32
      .config/zsh/90_alias.zsh
  11. 634
      .config/zsh/90_settings.zsh
  12. 3
      .config/zsh/91_nnn.zsh
  13. 15
      .config/zsh/antibody.txt
  14. 2
      .gtkrc-2.0
  15. 3
      .xprofile
  16. 23
      .zshrc

2
.config/gtk-3.0/settings.ini

@ -7,7 +7,7 @@ gtk-decoration-layout=icon:menu
gtk-enable-animations=true
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-font-name=FiraCode Nerd Font, 10
gtk-font-name=Comfortaa 9
gtk-icon-theme-name=oomox-numix-gdp
gtk-icon-sizes="panel-menu=16,16:panel=16,16:gtk-menu=16,16:gtk-large-toolbar=16,16:gtk-small-toolbar=16,16:gtk-button=16,16"
gtk-menu-images=0

13
.config/kitty/kitty.conf

@ -925,6 +925,19 @@ map kitty_mod+l next_layout
#: map ctrl+alt+s goto_layout stack
#: Similarly, to switch back to the previous layout::
map F5 launch --location=hsplit
map F6 launch --location=vsplit
map F7 layout_action rotate
map shift+up move_window up
map shift+left move_window left
map shift+right move_window right
map shift+down move_window down
map ctrl+left neighboring_window left
map ctrl+right neighboring_window right
map ctrl+up neighboring_window up
map ctrl+down neighboring_window down
#: map ctrl+alt+p last_used_layout
#: }}}

3
.config/nvim/init.vim

@ -42,6 +42,7 @@ let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#buffer_nr_show = 1
let base16colorspace=256 " Access colors present in 256 colorspace
let g:nnn#layout = { 'window': { 'width': 0.9, 'height': 0.6, 'highlight': 'Debug' } }
let g:bufferline_echo = 0
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
@ -61,8 +62,8 @@ Plug 'dag/vim-fish'
Plug 'voldikss/vim-floaterm'
Plug 'ryanoasis/vim-devicons'
Plug 'baskerville/vim-sxhkdrc'
Plug 'terminalnode/sway-vim-syntax'
Plug 'mboughaba/i3config.vim'
Plug 'mcchrish/nnn.vim'
call plug#end()
colorscheme base16-onedark

2
.config/xsettingsd/xsettingsd.conf

@ -6,5 +6,5 @@ Net/IconThemeName "oomox-numix-gdp"
Gtk/ToolbarStyle 3
Gtk/MenuImages 0
Gtk/ButtonImages 0
Gtk/FontName "FiraCode Nerd Font, 10"
Gtk/FontName "Comfortaa 10"
Net/ThemeName "numix-gdp"

1668
.config/zsh/.p10k.zsh
File diff suppressed because it is too large
View File

15
.config/zsh/.zprofile

@ -1,15 +0,0 @@
#!/usr/bin/env zsh
[[ "$TTY" == /dev/tty* ]] || return 0
export $(systemctl --user show-environment)
export GPG_TTY="$TTY"
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh"
systemctl --user import-environment GPG_TTY SSH_AUTH_SOCK
if [[ -z $DISPLAY && "$TTY" == "/dev/tty1" ]]; then
systemd-cat -t sway sway
systemctl --user stop sway-session.target
systemctl --user unset-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
fi

63
.config/zsh/.zshenv

@ -1,63 +0,0 @@
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
#
if [[ "$(/usr/bin/lsb_release -i)" == *"Debian" ]]; then
export PATH=$PATH:/sbin/:/usr/sbin
fi
if [[ -d $HOME/.local/bin && ":$PATH:" != *":$HOME/.local/bin:"* ]]; then
export PATH=$HOME/.local/bin:$PATH
fi
if [[ $UID -eq 0 ]]; then
export PATH=/root/bin:$PATH
fi
if [[ -d /usr/lib/ruby/gems/2.7.0/bin && ":$PATH:" != *":/usr/lib/ruby/gems/2.7.0/bin:"* ]]; then
export PATH=/usr/lib/ruby/gems/2.7.0/bin:$PATH
fi
if [[ -d $HOME/.emacs.d/bin ]]; then
export PATH=$HOME/.emacs.d/bin:$PATH
fi
if [[ -f /etc/profile.d/flatpak.sh ]]; then
source /etc/profile.d/flatpak.sh
fi
export LANG=en_US.UTF-8
export TZ=Europe/Berlin
export PAGER=less
export MANWIDTH=80
export TERMINAL=kitty
export EDITOR=nvim
export VISUAL=$EDITOR
export BROWSER=firefox
export PERLDOC_PAGER=less
export PERLDOC="-MPod::Text::Color::Delight"
export LESSCHARSET="UTF-8"
export LESSOPEN='|/usr/bin/lesspipe.sh %s 2>&-'
export LESS='-j10 -i -n -w -M -R -P%t?f%f \
:stdin .?pb%pb\%:?lbLine %lb:?bbByte %bb:-...'
export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking
export LESS_TERMCAP_md=$'\E[01;38;5;74m' # begin bold
export LESS_TERMCAP_me=$'\E[0m' # end mode
export LESS_TERMCAP_se=$'\E[0m' # end standout-mode
export LESS_TERMCAP_so=$'\E[38;5;11m' # begin standout-mode - info box
export LESS_TERMCAP_ue=$'\E[0m' # end underline
export LESS_TERMCAP_us=$'\E[04;38;5;146m' # begin underline
export XDG_RUNTIME_DIR=/run/user/$(id -u)
export XDG_CONFIG_HOME=$HOME/.config
export XDG_CACHE_HOME=$HOME/.cache
export XDG_DATA_HOME=$HOME/.local/share
export XDG_DATA_DIRS=/usr/share:/usr/local/share
export XDG_CONFIG_DIRS=/etc/xdg
export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0
export OOO_FORCE_DESKTOP=gnome
export QT_QPA_PLATFORMTHEME=qt5ct
export _JAVA_AWT_WM_NONREPARENTING=1
export MOZ_X11_EGL=1

71
.config/zsh/.zshrc

@ -1,71 +0,0 @@
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.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
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et foldmethod=marker
# -------------------------------------------------------------------------------------------------
#
if [ -f ~/.zinit/bin/zmodules/Src/zdharma/zplugin.so ]; then
module_path+=( "/home/nokogiri/.zinit/bin/zmodules/Src" )
zmodload zdharma/zplugin
fi
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
gpgconf --launch gpg-agent
source $HOME/.zinit/bin/zinit.zsh
if [ -f /usr/share/doc/pkgfile/command-not-found.zsh ]; then
source /usr/share/doc/pkgfile/command-not-found.zsh
fi
zinit wait lucid light-mode for \
atinit"zicompinit; zicdreplay" \
zdharma/fast-syntax-highlighting \
atload"_zsh_autosuggest_start" \
zsh-users/zsh-autosuggestions \
blockf atpull'zinit creinstall -q .' \
zsh-users/zsh-completions
#zinit ice pick"async.zsh" src"typewritten.zsh"
#zinit light reobin/typewritten
zinit ice depth=1; zinit light romkatv/powerlevel10k
# Adapted from https://github.com/holman/dotfiles/
typeset -U config_files
config_files=($ZDOTDIR/*.zsh)
# load config files
for file in ${config_files}
do
source $file
done
#zinit light chriskempson/base16-shell
#if [ $TERM != "linux " ]; then
# base16_onedark
#fi
unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi
export GPG_TTY=$(tty)
gpg-connect-agent updatestartuptty /bye >/dev/null
#zinit wait lucid atload"zicompinit; zicdreplay" blockf for \
# zsh-users/zsh-completions
#TYPEWRITTEN_PROMPT_LAYOUT="pure"
#TYPEWRITTEN_SYMBOL="$"
# To customize prompt, run `p10k configure` or edit ~/.config/zsh/.p10k.zsh.
[[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh
if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
exec sway_run.sh
fi

97
.config/zsh/50_aliases.zsh

@ -1,97 +0,0 @@
# Aliases {{{
# better ask before we lose data
alias rm='rm -Iv'
alias cp='cp -iv'
alias mv='mv -iv'
# I don't like bytes
alias dum='du -kh --max-depth=2'
alias dus='du -skh'
alias du='du -kh'
alias df="df -Th"
# function to make ls look nice is below
#alias ll='ls -l'
#alias la='ls -a'
#alias lla='ls -la'
#alias lld='ls -ld'
alias ll='exa -l '
alias la='exa -a '
alias lla='exa -la '
alias lld='exa -lD '
# well I got used to that name ;)
alias aurball='mkaurball -f'
#alias sudo="sudo " #Sudo wont recognize aliases without this
alias s='sudo '
alias mtr='mtr -t'
alias wcl='wc -l'
alias mdstat='cat /proc/mdstat'
alias keymap='setxkbmap de -variant nodeadkeys'
alias hexdump='hexdump -C'
alias grep='grep --color'
alias dmesg='dmesg -T'
alias vp='PAGER=vimpager'
if type nvim &>/dev/null && [[ -e "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/init.vim" ]] ; then
alias v='nvim'
elif type vim &>/dev/null; then
alias v='vim'
fi
alias l='less'
alias rf='readlink -f'
alias sc='screen'
alias scw='screen -X eval "chdir $PWD"'
alias g='git'
alias tiga='tig --all'
alias xc="xclip"
alias xcp="xclip -o | fb"
alias xcpe="xclip -o | vipe | ifne fb"
alias nsl='nslookup'
alias rscp='rsync --partial --progress'
alias scp='scp -o ControlPath=none'
alias mkdir='nocorrect mkdir'
alias wget='nocorrect noglob wget'
alias p='pacman'
alias sd='systemctl --no-pager'
alias b='busybox'
alias su='su -'
# too long to remember
alias asciidoc_full='asciidoc -a icons -a toc -a linkcss -a quirks!'
alias nossh='ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
alias noscp='scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
alias sshpw="ssh -S none -o PubkeyAuthentication=no"
alias nosshpw="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -S none -o PubkeyAuthentication=no"
alias ssh-copy-id="ssh-copy-id -o ControlPath=none"
alias nosshfs='sshfs -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
alias callgrind='valgrind --tool=callgrind'
alias vgfull='valgrind --leak-check=full --show-reachable=yes'
alias is="iostat -Nyxm 2"
alias md='mysqldump --quick --create-options --disable-keys --add-locks --add-drop-table --lock-tables --complete-insert --skip-extended-insert'
# other random aliases
alias='pkill -9'
alias nocomment='egrep -v "^\s*(#|$)"'
alias wgetc="wget --content-disposition"
# global aliases work EVERYWHERE
# e.g. dmesg eg foo
# show last 50 lines of dmesg
alias -g eg='| egrep --color'
# }}}
# vim: set ft=zsh

32
.config/zsh/90_alias.zsh

@ -0,0 +1,32 @@
#!/usr/bin/env zsh
alias e="$EDITOR"
alias cip="ip -color -brief"
alias mkdir='mkdir -p '
alias sudo='sudo -E'
alias o='xdg-open '
p() { ping "${1:-10.200.200.1}" }
#systemctl
alias sys='systemctl'
alias sysu='systemctl --user'
alias status='sys status'
alias statusu='sysu status'
alias start='sys start'
alias startu='sysu start'
alias stop='sys stop'
alias stopu='sysu stop'
alias restart='sys restart'
alias restartu='sysu restart'
alias enable='sys enable'
alias enableu='sysu enable'
alias disable='sys disable'
alias disableu='sysu disable'
alias reload='sys daemon-reload'
alias reloadu='sysu daemon-reload'
alias timers='sys list-timers'
alias timersu='sysu list-timers'

634
.config/zsh/90_settings.zsh

@ -1,634 +0,0 @@
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et foldmethod=marker
# -------------------------------------------------------------------------------------------------
# Exports {{{
# TODO: move these to file and load in .xinitrc?
# XDG directories
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
# Work around pssh hanging due to multiplexer not closing stdin
export PSSH_OPTIONS='ControlPersist=no'
# }}}
# Colors {{{
#use these in functions/shell scripts
export NC='\e[0m'
export white='\e[0;30m'
export WHITE='\e[1;30m'
export red='\e[0;31m'
export RED='\e[1;31m'
export green='\e[0;32m'
export GREEN='\e[1;32m'
export yellow='\e[0;33m'
export YELLOW='\e[1;33m'
export blue='\e[0;34m'
export BLUE='\e[1;34m'
export magenta='\e[0;35m'
export MAGENTA='\e[1;35m'
export cyan='\e[0;36m'
export CYAN='\e[1;36m'
export black='\e[0;37m'
export BLACK='\e[1;37m'
# these are for use in PROMPT
p_nc=$'%{\e[0m%}'
p_white=$'%{\e[0;30m%}'
p_WHITE=$'%{\e[1;30m%}'
p_red=$'%{\e[0;31m%}'
p_RED=$'%{\e[1;31m%}'
p_green=$'%{\e[0;32m%}'
p_GREEN=$'%{\e[1;32m%}'
p_yellow=$'%{\e[0;33m%}'
p_YELLOW=$'%{\e[1;33m%}'
p_blue=$'%{\e[0;34m%}'
p_BLUE=$'%{\e[1;34m%}'
p_magenta=$'%{\e[0;35m%}'
p_MAGENTA=$'%{\e[1;35m%}'
p_cyan=$'%{\e[0;36m%}'
p_CYAN=$'%{\e[1;36m%}'
p_black=$'%{\e[0;37m%}'
p_white=$'%{\e[1;37m%}'
# colors in framebuffer!
#if [[ $TERM = "linux" ]]; then
# ${HOME}/.local/bin/parse_xdefaults
# clear #for background artifacting
#fi
# some better colors for ls
eval "`dircolors ~/.dir_colors`"
# }}}
# Keybindings {{{
bindkey -e
bindkey '\e[1~' beginning-of-line
bindkey '\e[4~' end-of-line
bindkey '\e[3~' delete-char
bindkey '\e[2~' overwrite-mode
bindkey "^[[7~" beginning-of-line # Pos1
bindkey "^[[8~" end-of-line # End
bindkey "${terminfo[khome]}" beginning-of-line
bindkey "${terminfo[kend]}" end-of-line
bindkey '\e[H' beginning-of-line
bindkey '\e[F' end-of-line
bindkey "^[[A" history-beginning-search-backward
bindkey "^[[B" history-beginning-search-forward
bindkey "^[OA" up-line-or-history
bindkey "^[OB" down-line-or-history
#bindkey "^[[A" up-line-or-history
#bindkey "^[[B" down-line-or-history
# HOWTO make your own:
# bindkey '<crtl+v key>' action
# for some actions run `bindkey`
# "cd......" ;)
_rationalise-dot() {
if [[ $LBUFFER = "cd "* ]]; then
if [[ $LBUFFER = *.. ]]; then
LBUFFER+=/..
else
LBUFFER+=.
fi
else
LBUFFER+=.
fi
}
zle -N _rationalise-dot
bindkey . _rationalise-dot
# add edit command line feature ("alt-e")
autoload edit-command-line
zle -N edit-command-line
bindkey '\ee' edit-command-line
# source: http://github.com/xfire/dotfiles/blob/master/.zsh/abbrev_expansion
# power completion / abbreviation expansion / buffer expansion
# see http://zshwiki.org/home/examples/zleiab for details
# less risky than the global aliases but powerful as well
# just type the abbreviation key and afterwards ',' to expand it
typeset -Ag abbreviations
abbreviations=(
# 'M' '| most'
'dn' '&>/dev/null '
'dn1' '1>/dev/null '
'dn2' '2>/dev/null '
# 'NULL' '>/dev/null 2>&1'
'21' '2>&1 '
'l' '| less'
'll' '|& less'
'g' '| grep '
'gi' '| grep -i '
'eg' '| egrep '
'h' '| head '
'hh' '|& head '
't' '| tail '
'tt' '|& tail '
'wc' '| wc'
# 'wcb' '| wc -c'
# 'wcc' '| wc -m'
# 'wcw' '| wc -w'
'wcl' '| wc -l'
's' '| sort'
'su' '| sort -u'
'sl' '| sort | less'
'a' '| awk '
# 'A1' "| awk '{print \$1}'"
# 'A2' "| awk '{print \$2}'"
# 'A3' "| awk '{print \$3}'"
# 'A4' "| awk '{print \$4}'"
# 'A5' "| awk '{print \$5}'"
# 'A6' "| awk '{print \$6}'"
# 'A7' "| awk '{print \$7}'"
# 'A8' "| awk '{print \$8}'"
# 'A9' "| awk '{print \$9}'"
# 'CA' "|& cat -A"
'v' '|& vim -'
'x' '| xargs'
'xx' '|& xargs'
'hide' "echo -en '\033]50;nil2\007'"
'tiny' 'echo -en "\033]50;-misc-fixed-medium-r-normal-*-*-80-*-*-c-*-iso8859-15\007"'
'small' 'echo -en "\033]50;6x10\007"'
'medium' 'echo -en "\033]50;-misc-fixed-medium-r-normal--13-120-75-75-c-80-iso8859-15\007"'
'default' 'echo -e "\033]50;-misc-fixed-medium-r-normal-*-*-140-*-*-c-*-iso8859-15\007"'
'large' 'echo -en "\033]50;-misc-fixed-medium-r-normal-*-*-150-*-*-c-*-iso8859-15\007"'
'huge' 'echo -en "\033]50;-misc-fixed-medium-r-normal-*-*-210-*-*-c-*-iso8859-15\007"'
'smartfont' 'echo -en "\033]50;-artwiz-smoothansi-*-*-*-*-*-*-*-*-*-*-*-*\007"'
'semifont' 'echo -en "\033]50;-misc-fixed-medium-r-semicondensed-*-*-120-*-*-*-*-iso8859-15\007"'
'da' 'du -sch '
'j' 'jobs -l '
'co' "./configure && make && sudo make install"
'ch' "./configure --help"
'rw-' 'chmod 600 '
'600' 'chmod u+rw-x,g-rwx,o-rwx '
'rwx' 'chmod u+rwx '
'700' 'chmod u+rwx,g-rwx,o-rwx '
'r--' 'chmod u+r-wx,g-rwx,o-rwx '
'644' 'chmod u+rw-x,g+r-wx,o+r-wx\n # 4=r,2=w,1=x '
'755' 'chmod u+rwx,g+r-w+x,o+r-w+x '
'cx' 'chmod +x '
'de' 'export DISPLAY=:0.0'
'd' 'DISPLAY=:0.0'
)
globalias() {
local MATCH
LBUFFER=${LBUFFER%%(#m)[_a-zA-Z0-9]#}
LBUFFER+=${abbreviations[$MATCH]:-$MATCH,,}
}
zle -N globalias
bindkey ",," globalias
FZF_TMUX_HEIGHT='95%'
#FZF_DEFAULT_OPTS='
# --color fg:#D8DEE9,bg:#2E3440,hl:#A3BE8C,fg+:#D8DEE9,bg+:#434C5E,hl+:#A3BE8C
#
# --color pointer:#BF616A,info:#4C566A,spinner:#4C566A,header:#4C566A,prompt:#81A1C1,marker:#EBCB8B
#'
# Source: https://github.com/junegunn/fzf/blob/master/shell/key-bindings.zsh
__fzf_use_tmux__() {
[ -n "$TMUX_PANE" ] && [ "${FZF_TMUX:-0}" != 0 ] && [ ${LINES:-40} -gt 15 ]
}
__fzfcmd() {
__fzf_use_tmux__ &&
echo "fzf-tmux -d${FZF_TMUX_HEIGHT:-95%}" || echo "fzf"
}
# CTRL-R - Paste the selected command from history into the command line
# Changed to work with my personal history fetcher
fzf-history-widget() {
local selected num
setopt localoptions noglobsubst noposixbuiltins pipefail 2> /dev/null
selected=( $(cat-history-notime |
FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-95%} $FZF_DEFAULT_OPTS --tiebreak=index --bind=ctrl-r:toggle-sort $FZF_CTRL_R_OPTS --query=${(qqq)LBUFFER} +m" $(__fzfcmd)) )
local ret=$?
if [ -n "$selected" ]; then
zle kill-buffer
BUFFER="$selected"
fi
zle redisplay
typeset -f zle-line-init >/dev/null && zle zle-line-init
return $ret
}
zle -N fzf-history-widget
bindkey '^R' fzf-history-widget
__fsel() {
local cmd="${FZF_CTRL_T_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
-o -type f -print \
-o -type d -print \
-o -type l -print 2> /dev/null | cut -b3-"}"
setopt localoptions pipefail 2> /dev/null
eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_CTRL_T_OPTS" $(__fzfcmd) -m "$@" | while read item; do
echo -n "${(q)item} "
done
local ret=$?
echo
return $ret
}
fzf-file-widget() {
LBUFFER="${LBUFFER}$(__fsel)"
local ret=$?
zle reset-prompt
return $ret
}
zle -N fzf-file-widget
bindkey '^T' fzf-file-widget
# }}}
# Terminal title {{{
# also found somewhere
#prompt_eof_setup() {
# preexec() is run after you press enter on your command but before the command is run.
# preexec() {
# define screen/terminal title with the current command (http://aperiodic.net/phil/prompt/)
# case $TERM in
# rxvt-*)
# printf '\33]2;%s\007' $1
# ;;
# screen*)
# local CMD=${1[(wr)^(*=*|sudo|ssh|exec|-*)]}
# printf '\ek%s\e\\' $CMD;;
# esac
## }
#}
#prompt_eof_setup "$@"
# }}}
function set-title-precmd() {
printf "\e]2;%s\a" "${PWD/#$HOME/~}"
}
function set-title-preexec() {
printf "\e]2;%s\a" "$1"
}
autoload -Uz add-zsh-hook
add-zsh-hook precmd set-title-precmd
add-zsh-hook preexec set-title-preexec
## Spelling prompt
SPROMPT='zsh: correct '%R' to '%r' ? ([Y]es/[N]o/[E]dit/[A]bort) '
# }}}
# Functions {{{
suv() {
nvim "sudo:$1"
}
# add current time to a file
mbk() {
mv -b "${1}" "$(echo $1 | sed -r "s/(.*)(\.|$)(.*)/\1_`date +%Y-%m-%d_%H%M%S`\2\3/")"
}
# easily make backups
bk() {
rsync -phaxPHAX "${1}" "$(echo $1 | sed -r "s/(.*)(\.|$)(.*)/\1_`date +%Y-%m-%d_%H%M%S`\2\3/")"
}
# idea by Gigamo http://bbs.archlinux.org/viewtopic.php?pid=478094#p478094
ls () {
/bin/ls -rhbtF --color=auto "$@" #&&
}
password() {
if [[ -z $1 ]]; then
count=8
else
count="$1"
fi
echo $(< /dev/urandom tr -dc A-Za-z0-9 | head -c$count)
}
# from the grml zshrc iirc
hglob() {
echo -e "
/ directories
. plain files
@ symbolic links
= sockets
p named pipes (FIFOs)
* executable plain files (0100)
% device files (character or block special)
%b block special files
%c character special files
r owner-readable files (0400)
w owner-writable files (0200)
x owner-executable files (0100)
A group-readable files (0040)
I group-writable files (0020)
E group-executable files (0010)
R world-readable files (0004)
W world-writable files (0002)
X world-executable files (0001)
s setuid files (04000)
S setgid files (02000)
t files with the sticky bit (01000)
print *(m-1) # Dateien, die vor bis zu einem Tag modifiziert wurden.
print *(a1) # Dateien, auf die vor einem Tag zugegriffen wurde.
print *(@) # Nur Links
print *(Lk+50) # Dateien die ueber 50 Kilobytes grosz sind
print *(Lk-50) # Dateien die kleiner als 50 Kilobytes sind
print **/*.c # Alle *.c - Dateien unterhalb von \$PWD
print **/*.c~file.c # Alle *.c - Dateien, aber nicht 'file.c'
print (foo|bar).* # Alle Dateien mit 'foo' und / oder 'bar' am Anfang
print *~*.* # Nur Dateien ohne '.' in Namen
chmod 644 *(.^x) # make all non-executable files publically readable
print -l *(.c|.h) # Nur Dateien mit dem Suffix '.c' und / oder '.h'
print **/*(g:users:) # Alle Dateien/Verzeichnisse der Gruppe >users<
echo /proc/*/cwd(:h:t:s/self//) # Analog zu >ps ax | awk '{print $1}'<"
}
# swaps 2 files
swap() {
if [[ -z $1 ]] || [[ -z $2 ]] || [[ $1 = "-h" ]]; then
echo -e "${blue}Usage:$NC swap <file> <file>";
echo -e "Swaps files";
return 1
fi
if [[ -f $1 ]] && [[ -f $2 ]]; then
local TMPFILE=tmp.$$
mv "$1" $TMPFILE
mv "$2" "$1"
mv $TMPFILE "$2"
else
echo -e "${RED}Error:$NC One or more files don't exist"
return 1
fi
}
cget() {
curl -fJOL --compressed "$@"
}
cat-history() {
local histfiles=($(ls -t1 "$HISTORYDIRECTORY"/*))
cat "${histfiles[@]}"
}
cat-history-notime() {
cat-history "$@" | sed 's/^: [0-9]\+:0;//'
}
hgrep() {
cat-history | mpgrep "$@" | less
}
# }}}
# History {{{
HISTORYDIRECTORY=~/.config/zsh/history
HISTFILE="$HISTORYDIRECTORY/histfile"
HISTSIZE=10000
SAVEHIST=10000000
setopt BANG_HIST # Treat the '!' character specially during expansion.
setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format.
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
setopt SHARE_HISTORY # Share history between all sessions.
setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history.
setopt HIST_IGNORE_DUPS # Don't record an entry that was just recorded again.
setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate.
setopt HIST_FIND_NO_DUPS # Do not display a line previously found.
setopt HIST_IGNORE_SPACE # Don't record an entry starting with a space.
setopt HIST_SAVE_NO_DUPS # Don't write duplicate entries in the history file.
setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording entry.
setopt HIST_VERIFY # Don't execute immediately upon history expansion.
setopt HIST_BEEP # Beep when accessing nonexistent history.
mkdir -p "$HISTORYDIRECTORY"
# }}}
# Other ZSH options {{{
autoload -U colors
colors
autoload -U zmv
# .. -> cd ../
setopt autocd
# cd /etc/**/foo/blub searches ;)
setopt extendedglob
# push cds to directory stack
setopt auto_pushd
# don't push something twice
setopt pushd_ignore_dups
# don't kill jobs when exiting shell
setopt no_hup
# and don't warn
setopt no_check_jobs
# show us when some command didn't exit with 0
#setopt print_exit_value
# makepkg -g > PKGBUILD
# zsh: file exists: PKGBUILD
#
# work saved ;)
setopt no_clobber
setopt inc_append_history
setopt no_bg_nice
setopt share_history
#setopt bang_hist
setopt extended_history
#setopt hist_reduce_blanks
setopt hist_ignore_space
setopt hist_find_no_dups
setopt hist_ignore_dups
setopt nohistverify
#setopt prompt_subst
#setopt hist_fcntl_lock
setopt always_to_end
unsetopt auto_remove_slash
# show the output of time if commands takes longer than n secs (only user+system)
REPORTTIME=5
# allow comments in interactive shells
setopt interactivecomments
# ignore lines starting with a space
setopt hist_ignore_space
# }}}
# Completion stuff {{{
#unsetopt correct_all
#
#function _7slash {
# if [[ $words[CURRENT] = 7(#b)(*)(#e) ]]
# then
# compadd -U -X 'Correct leading 7 to /' -f /$match[1]
# fi
#}
#
#zstyle :compinstall filename '$HOME/.config/zsh/.zshrc'
#
## performance tweaks
#zstyle ':completion:*' use-cache on
#zstyle ':completion:*' cache-path $HOME/.config/zsh/cache
#zstyle ':completion:*' use-perl on
#
## completion colours
#zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
#
#zstyle ':completion:*' completer _complete _match _approximate _7slash
#zstyle ':completion:*:match:*' original only
#
## allow more mistypes if longer command
##zstyle -e ':completion:*:approximate:*' \
## max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3))numeric)'
#
## ignore completion for commands we don't have
#zstyle ':completion:*:functions' ignored-patterns '_*'
#
## get rid of .class and .o files for vim
#zstyle ':completion:*:vim:*' ignored-patterns '*.(class|o)'
#
## show menu when tabbing
#zstyle ':completion:*' menu yes select
#
## better completion for kill
#zstyle ':completion:*:*:kill:*' command 'ps --forest -u$USER -o pid,%cpu,tty,cputime,cmd'
#
## Provide more processes in completion of programs like killall:
#zstyle ':completion:*:processes-names' command 'ps c -u ${USER} -o command | uniq'
#compdef pkill=killall
#
## bugged with zsh 4.3.10 for whatever reason
#zstyle ':completion:*' file-sort time
##zstyle ':completion:*' file-sort name
#
## Ignore same file on rm
#zstyle ':completion:*:(rm|kill|diff):*' ignore-line yes
#zstyle ':completion:*:rm:*' file-patterns '*:all-files'
#
#zstyle ':completion:*:wine:*' file-patterns '*.(exe|EXE):exe'
#
## don't complete usernames (the come from localhost!)
#zstyle ':completion:*:(ssh|scp):*' users
#
#compdef sshrc=ssh
#
## complete ssh hostnames
#[[ -r ~/.ssh/known_hosts ]] && _ssh_hosts=(${${${${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[\|]*}%%\ *}%%,*}%%:*}#\[}%\]}) || _ssh_hosts=()
#[[ -r ~/.ssh/known_hosts_work ]] && _ssh_hosts+=(${${${${${${${(f)"$(sed -r 's#_(rsa|ed25519|ecdsa|dsa),#,#;' <$HOME/.ssh/known_hosts_work)"}:#[\|]*}%%\ *}%%,*}%%:*}#\[}%\]}) || true
#[[ -r ~/.ssh/config ]] && _ssh_config_hosts=($(sed -rn 's/host\s+(.+)/\1/ip' "$HOME/.ssh/config" | grep -v "\*" )) || _ssh_config_hosts=()
#hosts=(
# $HOST
# "$_ssh_hosts[@]"
# $_ssh_config_hosts[@]
# localhost
# )
#zstyle ':completion:*:hosts' hosts $hosts
#
## automagic url quoter
#autoload -U url-quote-magic
#zle -N self-insert url-quote-magic
#
## e.g. ls foo//bar -> ls foo/bar
#zstyle ':completion:*' squeeze-slashes true
#
## if in foo/bar don't show bar when cd ../<TAB>
#zstyle ':completion:*:cd:*' ignore-parents parent pwd
#
## Prevent lost+found directory from being completed
#zstyle ':completion:*:cd:*' ignored-patterns '(*/)#lost+found'
#
## ignore case when completing
#zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
#
## make some stuff look better
## from: http://ft.bewatermyfriend.org/comp/zsh/zshrc.d/compsys.html
#zstyle ':completion:*:descriptions' format "- %{${fg[yellow]}%}%d%{${reset_color}%} -"
#zstyle ':completion:*:messages' format "- %{${fg[cyan]}%}%d%{${reset_color}%} -"
#zstyle ':completion:*:corrections' format "- %{${fg[yellow]}%}%d%{${reset_color}%} - (%{${fg[cyan]}%}errors %e%{${reset_color}%})"
##zstyle ':completion:*:default' \
## select-prompt \
## "%{${fg[yellow]}%}Match %{${fg_bold[cyan]}%}%m%{${fg_no_bold[yellow]}%} Line %{${fg_bold[cyan]}%}%l%{${fg_no_bold[red]}%} %p%{${reset_color}%}"
##zstyle ':completion:*:default' \
## list-prompt \
## "%{${fg[yellow]}%}Line %{${fg_bold[cyan]}%}%l%{${fg_no_bold[yellow]}%} Continue?%{${reset_color}%}"
#zstyle ':completion:*:warnings' \
# format \
# "- %{${fg_no_bold[red]}%}no match%{${reset_color}%} - %{${fg_no_bold[yellow]}%}%d%{${reset_color}%}"
#zstyle ':completion:*' group-name ''
#
## manual pages are sorted into sections
## from: http://ft.bewatermyfriend.org/comp/zsh/zshrc.d/compsys.html
#zstyle ':completion:*:manuals' separate-sections true
#zstyle ':completion:*:manuals.(^1*)' insert-sections true
#
#### highlight the original input.
# zstyle ':completion:*:original' \
# list-colors "=*=$color[red];$color[bold]"
#
#### highlight words like 'esac' or 'end'
# zstyle ':completion:*:reserved-words' \
# list-colors "=*=$color[red]"
#
#### colorize hostname completion
# zstyle ':completion:*:*:*:*:hosts' \
# list-colors "=*=$color[cyan];$color[bg-black]"
#
#### colorize username completion
# zstyle ':completion:*:*:*:*:users' \
# list-colors "=*=$color[red];$color[bg-black]"
#
#### colorize processlist for 'kill'
# zstyle ':completion:*:*:kill:*:processes' \
# list-colors "=(#b) #([0-9]#) #([^ ]#)*=$color[none]=$color[yellow]=$color[green]"
#
## complete my little rc function (archlinux startscripts)
#function _rc () {
# case $CURRENT in
# 2) compadd $(find /etc/rc.d/ -maxdepth 1 -type f -executable -printf '%f ');;
# 3) compadd $(/etc/rc.d/$words[2] 2> /dev/null | grep -i usage | sed 's/.*{\(.*\)}/\1/; s/|/ /g');;
# esac
#}
#compdef _rc rc
#
## easier way to use sshfs ;)
#function _ssh-mount () {
# compadd $(cat ${HOME}/bin/ssh-mount.sh | egrep "Servers:.*" | sed "s#echo \-e \"\${green}Servers\:\$NC##g; s#\"\;##g; s#,##g")
#}
#compdef _ssh-mount ssh-mount.sh
#
#function _wake () {
# compadd $(wake)
#}
#compdef _wake wake
#
#function _cd_pkg() {
# compadd $(expac -S %e)
#}
#compdef _cd_pkg cd-pkg
# }}}
# {{{ Other stuff that doesn't fit anywhere else
eval `thefuck --alias`
umask 0022
# }}}
# {{{ tmux on ssh
#if [[ -z $TMUX ]] && [[ -n $SSH_TTY ]]; then
# exec tmux new-session -A -s $(hostname -s)
#fi
# }}}
# vim: set ft=zsh:

3
.config/zsh/91_nnn.zsh

@ -1,3 +0,0 @@
export NNN_FIFO=/tmp/nnn.fifo
export NNN_SSHFS="sshfs -o allow_other,default_permissions,uid=1000,gid=1000,auto_cache,idmap=user,cache_timeout=115200,attr_timeout=115200,entry_timeout=1200,Ciphers=chacha20-poly1305@openssh.com,reconnect,ServerAliveInterval=15,ServerAliveCountMax=3"
export NNN_TRASH=1

15
.config/zsh/antibody.txt

@ -1,15 +0,0 @@
caarlos0/ports kind:path
mafredri/zsh-async
rupa/z
zsh-users/zsh-autosuggestions
# comments are supported like this
zsh-users/zsh-completions
chriskempson/base16-shell
sindresorhus/pure
zsh-users/zsh-syntax-highlighting
zsh-users/zsh-history-substring-search
fnune/base16-fzf path:bash/base16-tomorrow-night.config kind:zsh
#zdharma/zinit kind:clone

2
.gtkrc-2.0

@ -4,7 +4,7 @@
include "/home/nokogiri/.gtkrc-2.0.mine"
gtk-theme-name="numix-gdp"
gtk-icon-theme-name="oomox-numix-gdp"
gtk-font-name="FiraCode Nerd Font, 10"
gtk-font-name="Comfortaa 10"
gtk-cursor-theme-name="Vimix-Black-dark"
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_ICONS

3
.xprofile

@ -5,3 +5,6 @@ export _JAVA_AWT_WM_NONREPARENTING=1
export MOZ_X11_EGL=1
export MOZ_WEBRENDER=1
export MOZ_USE_XINPUT2=1
dbus-update-activation-environment --systemd --all
export $(systemctl --user show-environment)

23
.zshrc

@ -100,18 +100,14 @@ setopt no_auto_menu # require an extra TAB press to open the completion menu
export LANG=en_US.UTF-8
export TZ=Europe/Berlin
export PAGER=less
export MANWIDTH=80
export PAGER=nvimpager
export MANWIDTH=120
export TERMINAL=kitty
export EDITOR=nvim
export VISUAL=$EDITOR
export BROWSER=firefox
export PERLDOC_PAGER=less
export PERLDOC="-MPod::Text::Color::Delight"
export LESSCHARSET="UTF-8"
export LESSOPEN='|/usr/bin/lesspipe.sh %s 2>&-'
export LESS='-j10 -i -n -w -M -R -P%t?f%f \
:stdin .?pb%pb\%:?lbLine %lb:?bbByte %bb:-...'
export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking
export LESS_TERMCAP_md=$'\E[01;38;5;74m' # begin bold
export LESS_TERMCAP_me=$'\E[0m' # end mode
@ -119,10 +115,13 @@ export LESS_TERMCAP_se=$'\E[0m' # end standout-mode
export LESS_TERMCAP_so=$'\E[38;5;11m' # begin standout-mode - info box
export LESS_TERMCAP_ue=$'\E[0m' # end underline
export LESS_TERMCAP_us=$'\E[04;38;5;146m' # begin underline
export XDG_RUNTIME_DIR=/run/user/$(id -u)
export XDG_CONFIG_HOME=$HOME/.config
export XDG_CACHE_HOME=$HOME/.cache
export XDG_DATA_HOME=$HOME/.local/share
export XDG_DATA_DIRS=/usr/share:/usr/local/share
export XDG_CONFIG_DIRS=/etc/xdg
#dbus-update-activation-environment --systemd --all
typeset -U config_files
config_files=($HOME/.config/zsh/*.zsh)
# load config files
for file in ${config_files}
do
source $file
done
Loading…
Cancel
Save