Compare commits
2 Commits
02752226b0
...
9526077d0f
Author | SHA1 | Date | |
---|---|---|---|
|
9526077d0f | ||
|
74a932cc1a |
@ -1,9 +1,9 @@
|
|||||||
bind R source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded..."
|
bind R source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded..."
|
||||||
bind C new-window nu
|
bind P command-prompt -p 'save history to filename:' -I '~/Documents/log.txt' 'capture-pane -S - ; save-buffer %1 ; delete-buffer'
|
||||||
|
bind-key -n M-Right next-window
|
||||||
|
bind-key -n M-Left previous-window
|
||||||
|
|
||||||
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
|
set-option -g history-limit 10000
|
||||||
|
|
||||||
set-option -g history-limit 3000
|
|
||||||
|
|
||||||
set -g base-index 1
|
set -g base-index 1
|
||||||
set -g mouse on
|
set -g mouse on
|
||||||
@ -29,7 +29,14 @@ set -g automatic-rename-format '#{b:pane_current_path} #{b:pane_current_command}
|
|||||||
set -g window-status-format '#I:#{b:pane_current_path}'
|
set -g window-status-format '#I:#{b:pane_current_path}'
|
||||||
set -g window-status-current-format '#I:#[bg=white]#{pane_current_command}'
|
set -g window-status-current-format '#I:#[bg=white]#{pane_current_command}'
|
||||||
|
|
||||||
set -g default-terminal screen-256color
|
set -g default-terminal "tmux-256color"
|
||||||
|
set -g terminal-overrides ",alacritty*:Tc"
|
||||||
|
|
||||||
# Apply Tc
|
set -g @thumbs-command 'echo "${THUMB}" | tr -d "\n" | xclip -sel clip'
|
||||||
set-option -ga terminal-overrides ",screen-256color:Tc"
|
set -g @thumbs-alphabet dvorak
|
||||||
|
set -g @thumbs-unique true
|
||||||
|
set -g @thumbs-regexp-1 '<([^@< ]+@[^@> ]+)>| ([^ @<]+@[^ >]+) ' # Match emails
|
||||||
|
set -g @thumbs-disable-1 ipv6
|
||||||
|
set -g @thumbs-disable-2 number
|
||||||
|
set -g @thumbs-disable-3 markdown_url
|
||||||
|
run-shell ~/.config/tmux/tmux-thumbs.tmux
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
autoload -Uz zmv
|
autoload -Uz zmv
|
||||||
autoload -Uz add-zsh-hook
|
autoload -Uz add-zsh-hook
|
||||||
autoload -Uz compinit
|
autoload -Uz compinit
|
||||||
|
autoload -U colors && colors
|
||||||
compinit -d "$XDG_CACHE_HOME/zcompdump"
|
compinit -d "$XDG_CACHE_HOME/zcompdump"
|
||||||
|
|
||||||
zstyle ':completion:*' menu select
|
zstyle ':completion:*' menu select
|
||||||
@ -35,50 +36,83 @@ bindkey "\e[2~" paste-clipboard
|
|||||||
# variables and aliases #
|
# variables and aliases #
|
||||||
#########################
|
#########################
|
||||||
|
|
||||||
#export PS1="%n@%m:%~> "
|
RPROMPT="%{$fg[green]%}%~%{$reset_color%}%"
|
||||||
|
PS1='%B%(?..[%?] )%b%n@%U%m%u> '
|
||||||
|
if (($+IN_NIX_SHELL)); then
|
||||||
|
PS1="($IN_NIX_SHELL) $PS1"
|
||||||
|
fi
|
||||||
|
check_nix_run() {
|
||||||
|
local path_copy
|
||||||
|
local -a bins
|
||||||
|
bins=()
|
||||||
|
path_copy="$PATH"
|
||||||
|
while [[ "$path_copy" =~ '\/nix\/store\/[^/]{33}([^/]+)\/[^:]+:?' ]]; do
|
||||||
|
bins+="$match[1]"
|
||||||
|
path_copy="${path_copy:$MEND}"
|
||||||
|
done
|
||||||
|
if [[ "${#bins[@]}" > 0 ]]; then
|
||||||
|
old_ps1="$PS1"
|
||||||
|
PS1="($bins[@]) $PS1"
|
||||||
|
in_nix_run=1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
check_nix_run
|
||||||
|
hide_nix_run() {
|
||||||
|
PS1="$old_ps1"
|
||||||
|
}
|
||||||
export LANG=de_DE.utf8
|
export LANG=de_DE.utf8
|
||||||
export LC_CTYPE=C.utf8
|
export LC_CTYPE=C.utf8
|
||||||
|
export EXA_COLORS='*.opus=38;5;248:*.ogg=38;5;248'
|
||||||
export TIME_STYLE=long-iso
|
export TIME_STYLE=long-iso
|
||||||
export NPM_PACKAGES="${HOME}/.local/share/npm"
|
export NPM_PACKAGES="${HOME}/.local/share/npm"
|
||||||
export PATH="$HOME/.local/bin/git-fuzzy/bin:$HOME/.local/bin:$HOME/.cache/cargo/bin:$PATH:$HOME/.local/share/npm/bin"
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
export EDITOR=vim
|
export EDITOR=vim
|
||||||
|
|
||||||
alias ski="sk --ansi -c 'rg --color=always --line-number \"{}\"'"
|
alias ski="sk --ansi -c 'rg --color=always --line-number \"{}\"'"
|
||||||
|
alias ls="exa"
|
||||||
alias ls-partitions="lsblk"
|
alias ls-partitions="lsblk"
|
||||||
alias ls-network="sudo ss -lntup"
|
alias ls-network="sudo ss -lntup"
|
||||||
alias lh="ls -trhgGN --color=always | tr -s ' ' | cut -d' ' -f4-"
|
alias lh="ls -trhgGN --color=always | tr -s ' ' | cut -d' ' -f4-"
|
||||||
alias gitdots="git --git-dir=./.local/share/dotfiles --work-tree=$HOME"
|
alias gitdots="git --git-dir=$HOME/.local/share/dotfiles --work-tree=$HOME"
|
||||||
alias heroku=/opt/heroku/bin/heroku
|
alias heroku=/opt/heroku/bin/heroku
|
||||||
alias tectonic="tectonic -w https://ttassets.z13.web.core.windows.net/tlextras-2020.0r0.tar"
|
alias tectonic="tectonic -w https://ttassets.z13.web.core.windows.net/tlextras-2020.0r0.tar"
|
||||||
alias nix-build-env="nix-shell -I nixpkgs=/home/arne/nixpkgs -p binutils pkg-config gnumake cmake gcc llvm llvmPackages.libclang llvmPackages.clang clang qt515.qmake glibc libgit2 ocl-icd openssl bzip2 libsass sqlite ncurses5 alsaLib xorg.libX11 manpages --run"
|
alias nix-build-env="nix-shell -I nixpkgs=/home/arne/nixpkgs -p binutils pkg-config gnumake cmake llvm llvmPackages.libclang llvmPackages.clang clang glibc libgit2 ocl-icd bzip2 libsass sqlite ncurses5 alsaLib xorg.libX11 manpages"
|
||||||
alias nix-shell="nix-shell -I nixpkgs=/home/arne/nixpkgs"
|
alias nix-shell="nix-shell -I nixpkgs=/home/arne/nixpkgs"
|
||||||
|
alias nix-zshell="nix-shell --run zsh"
|
||||||
alias add="git fuzzy status"
|
alias add="git fuzzy status"
|
||||||
alias rga-pdf='rga --rga-adapters=poppler'
|
alias rga-pdf='rga --rga-adapters=poppler'
|
||||||
alias java-jacoco='java -javaagent:$HOME/.cache/m2/repository/org/jacoco/org.jacoco.agent/0.8.6/org.jacoco.agent-0.8.6-runtime.jar=port=36320,destfile=jacoco-it.exec,output=tcpserver'
|
alias java-jacoco='java -javaagent:$HOME/.cache/m2/repository/org/jacoco/org.jacoco.agent/0.8.6/org.jacoco.agent-0.8.6-runtime.jar=port=36320,destfile=jacoco-it.exec,output=tcpserver'
|
||||||
|
|
||||||
export GIT_ASKPASS='/run/current-system/sw/bin/ksshaskpass'
|
export GIT_ASKPASS='/run/current-system/sw/bin/ksshaskpass'
|
||||||
export AFL_DIR=/nix/store/1gcd7pcpp5bqkqy94y9py14w7bl6ps5y-afl-2.57b/bin/
|
export NIX_PATH='nixpkgs=/home/arne/nixpkgs:nixos-config=/etc/nixos/configuration.nix'
|
||||||
|
|
||||||
|
nix-run() {
|
||||||
|
ARGS=("$@")
|
||||||
|
nix run -I nixpkgs=/home/arne/nixpkgs ${ARGS[@]/#/nixpkgs.} -c zsh
|
||||||
|
}
|
||||||
|
|
||||||
|
#############
|
||||||
|
# utilities #
|
||||||
|
#############
|
||||||
|
#eval "$(navi widget zsh)"
|
||||||
|
|
||||||
#############
|
#############
|
||||||
# XDG fixes #
|
# XDG fixes #
|
||||||
#############
|
#############
|
||||||
|
|
||||||
export XDG_CONFIG_HOME="$HOME/.config"
|
#export XDG_CONFIG_HOME="$HOME/.config"
|
||||||
export XDG_DATA_HOME="$HOME/.local/share"
|
#export XDG_DATA_HOME="$HOME/.local/share"
|
||||||
export XDG_CACHE_HOME="$HOME/.cache"
|
#export XDG_CACHE_HOME="$HOME/.cache"
|
||||||
export CARGO_HOME="$XDG_CACHE_HOME/cargo"
|
export CARGO_HOME="$XDG_CACHE_HOME/cargo"
|
||||||
export RUSTUP_HOME="$XDG_CACHE_HOME/rustup"
|
export RUSTUP_HOME="$HOME/.local/rustup"
|
||||||
export CARGO_TARGET_DIR="$CARGO_HOME/target"
|
export CARGO_TARGET_DIR="$CARGO_HOME/target"
|
||||||
export MATHEMATICA_USERBASE="$XDG_CACHE_HOME/mathematica"
|
|
||||||
export SQLITE_HISTORY="$XDG_DATA_HOME/sqlite_history"
|
export SQLITE_HISTORY="$XDG_DATA_HOME/sqlite_history"
|
||||||
export WINEPREFIX="$XDG_CACHE_HOME/wine"
|
export WINEPREFIX="$XDG_CACHE_HOME/wine"
|
||||||
export VIMINIT="set nocp | source ${XDG_CONFIG_HOME:-$HOME/.config}/vim/vimrc"
|
export VIMINIT="set nocp | source ${XDG_CONFIG_HOME:-$HOME/.config}/vim/vimrc"
|
||||||
alias mvn="env HOME=$XDG_CACHE_HOME mvn --global-settings /home/arne/.config/maven/settings.xml -Dmaven.repo.local=$XDG_CACHE_HOME/m2/repository -Duser.home=$XDG_CACHE_HOME"
|
alias mvn="env HOME=$XDG_CACHE_HOME mvn --global-settings /home/arne/.config/maven/settings.xml -Dmaven.repo.local=$XDG_CACHE_HOME/m2/repository -Duser.home=$XDG_CACHE_HOME"
|
||||||
alias idle="HOME=/home/arne/.config idle3.8"
|
alias idle="HOME=/home/arne/.config idle3.9"
|
||||||
alias xscreensaver="HOME=$XDG_CONFIG_HOME xscreensaver"
|
alias xscreensaver="HOME=$XDG_CONFIG_HOME xscreensaver"
|
||||||
alias xscreensaver-demo="HOME=$XDG_CONFIG_HOME xscreensaver-demo"
|
alias xscreensaver-demo="HOME=$XDG_CONFIG_HOME xscreensaver-demo"
|
||||||
alias codium="HOME=$XDG_CACHE_HOME codium"
|
|
||||||
alias bitcoin-qt="HOME=$XDG_DATA_HOME bitcoin-qt"
|
|
||||||
|
|
||||||
#################
|
#################
|
||||||
# history setup #
|
# history setup #
|
||||||
@ -97,9 +131,24 @@ histdb-fzf-widget() {
|
|||||||
|
|
||||||
return $ret
|
return $ret
|
||||||
}
|
}
|
||||||
|
files-fzf-widget() {
|
||||||
|
local selected
|
||||||
|
setopt localoptions noglobsubst noposixbuiltins pipefail 2> /dev/null
|
||||||
|
[ -d .git ] && echo .git || git rev-parse --git-dir > /dev/null 2>&1
|
||||||
|
if [ ! $? -eq 0 ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
selected=( $(git ls-files --exclude-standard | fzf --tac --preview 'bat --color=always --style=numbers --line-range=:50 {}') )
|
||||||
|
LBUFFER=$selected
|
||||||
|
zle redisplay
|
||||||
|
typeset -f zle-line-init >/dev/null && zle zle-line-init
|
||||||
|
return $ret
|
||||||
|
}
|
||||||
|
|
||||||
zle -N histdb-fzf-widget
|
zle -N histdb-fzf-widget
|
||||||
|
zle -N files-fzf-widget
|
||||||
bindkey '^R' histdb-fzf-widget
|
bindkey '^R' histdb-fzf-widget
|
||||||
|
bindkey '^T' files-fzf-widget
|
||||||
|
|
||||||
# disable default histfile
|
# disable default histfile
|
||||||
HISTFILE=
|
HISTFILE=
|
||||||
@ -120,6 +169,7 @@ function git_github()
|
|||||||
{
|
{
|
||||||
git config user.name FliegendeWurst
|
git config user.name FliegendeWurst
|
||||||
git config user.email '2012gdwu+github@posteo.de'
|
git config user.email '2012gdwu+github@posteo.de'
|
||||||
|
git config core.sshCommand "env SSH_ASKPASS=/run/current-system/sw/bin/ksshaskpass ssh -i ~/.ssh/github_id_ed25519 -F /dev/null"
|
||||||
}
|
}
|
||||||
|
|
||||||
function git_github_ak()
|
function git_github_ak()
|
||||||
@ -141,9 +191,11 @@ function git_gitlab_ak()
|
|||||||
git config --replace user.name Arne\ Keller
|
git config --replace user.name Arne\ Keller
|
||||||
git config user.email arne.keller@posteo.de
|
git config user.email arne.keller@posteo.de
|
||||||
git config commit.gpgsign false
|
git config commit.gpgsign false
|
||||||
|
git config core.sshCommand "env SSH_ASKPASS=/run/current-system/sw/bin/ksshaskpass ssh -i ~/.ssh/gitlab_ak -F /dev/null"
|
||||||
}
|
}
|
||||||
function git_kit()
|
function git_kit()
|
||||||
{
|
{
|
||||||
git config --replace user.name Arne\ Keller
|
git config --replace user.name Arne\ Keller
|
||||||
git config --replace user.email arne.keller@student.kit.edu
|
git config --replace user.email arne.keller@student.kit.edu
|
||||||
|
git config core.sshCommand "env SSH_ASKPASS=/run/current-system/sw/bin/ksshaskpass ssh -i ~/.ssh/id_newkey2021 -F /dev/null"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user