shell: update aliases
This commit is contained in:
@@ -26,8 +26,8 @@ __prompt_command() {
|
||||
local EXIT="$?"
|
||||
export PS1="${HOST} ${DIR} ${GIT}${NEWLINE}"
|
||||
|
||||
local red_lambda='\[\033[0;31m\]λ>\[\033[00m\] '
|
||||
local green_lambda='\[\033[0;32m\]λ>\[\033[00m\] '
|
||||
local red_lambda='\[\033[0;31m\]>\[\033[00m\] '
|
||||
local green_lambda='\[\033[0;32m\]>\[\033[00m\] '
|
||||
|
||||
if [ $EXIT != 0 ]
|
||||
then
|
||||
@@ -40,6 +40,8 @@ __prompt_command() {
|
||||
# ============================== vi-Mode
|
||||
set -o vi
|
||||
|
||||
bind -x '"\C-l": clear'
|
||||
|
||||
# ============================== Source other definitions
|
||||
[ -f ~/.shellrc.alias ] && source ~/.shellrc.alias
|
||||
[ -f ~/.shellrc.local ] && source ~/.shellrc.local
|
||||
|
||||
@@ -22,36 +22,38 @@ fi
|
||||
|
||||
# zsh specific
|
||||
if [[ "$SHELL" =~ "zsh$" ]]; then
|
||||
alias -g G='| rg -i'
|
||||
alias -g G='| grep -i'
|
||||
alias -g L='| less'
|
||||
fi
|
||||
|
||||
# alpabetically sorted
|
||||
# system utility
|
||||
alias cdt='mkdir /tmp/$(cat /proc/sys/kernel/random/uuid); cd $_'
|
||||
alias cpu='watch -n.1 "grep \"^[c]pu MHz\" /proc/cpuinfo"'
|
||||
alias fixagent='eval $(tmux show-env -s | grep "^SSH_")'
|
||||
alias truecolor='curl -s https://raw.githubusercontent.com/JohnMorales/dotfiles/master/colors/24-bit-color.sh | bash'
|
||||
alias whatsmyip='curl https://ipinfo.io/ip; echo'
|
||||
|
||||
# really short command abbreviations
|
||||
alias c='clear'
|
||||
alias cb='cargo build'
|
||||
alias cdt='mkdir /tmp/$(cat /proc/sys/kernel/random/uuid); cd $_'
|
||||
alias cp='cp -i'
|
||||
alias cpu='watch -n.1 "grep \"^[c]pu MHz\" /proc/cpuinfo"'
|
||||
alias cr='cargo run'
|
||||
alias d='docker'
|
||||
alias dc='docker compose'
|
||||
alias fixagent='eval $(tmux show-env -s | grep "^SSH_")'
|
||||
alias g='git'
|
||||
alias gg='git grep'
|
||||
alias l='ls -lFh --color'
|
||||
alias la='ls -lAFh --color'
|
||||
alias ll='ls -l --color'
|
||||
alias mktex="latexmk -xelatex -shell-escape"
|
||||
alias h='hx'
|
||||
alias l='eza --icons'
|
||||
alias mv='mv -i'
|
||||
alias nssh='SSH_AUTH_SOCK= ssh'
|
||||
alias o='xdg-open' # to change a mime use: `xdg-mime default APPLICATION HANDLE`
|
||||
alias rm='rm -i'
|
||||
alias t='tmux a || tmux -u'
|
||||
|
||||
# commands with pre-selected flags
|
||||
alias mktex="latexmk -xelatex -shell-escape"
|
||||
alias nssh='SSH_AUTH_SOCK= ssh'
|
||||
alias texmk="latexmk -xelatex -shell-escape"
|
||||
alias texsh='nix-shell ~/.dots/tex.nix'
|
||||
alias truecolor='curl -s https://raw.githubusercontent.com/JohnMorales/dotfiles/master/colors/24-bit-color.sh | bash'
|
||||
alias v='vim'
|
||||
alias whatsmyip='curl https://ipinfo.io/ip; echo'
|
||||
|
||||
# nmcli
|
||||
alias con='nmcli con'
|
||||
@@ -81,7 +83,7 @@ ocr() {
|
||||
ocrmypdf -l ger+eng --output-type pdf $file ${name}.ocr.pdf
|
||||
}
|
||||
|
||||
# deprecated
|
||||
# private laptop acpi magic
|
||||
conservation() {
|
||||
location='/sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode'
|
||||
if [ -z $1 ]; then
|
||||
|
||||
@@ -9,7 +9,7 @@ precmd_vcs_info() { vcs_info }
|
||||
precmd_functions+=( precmd_vcs_info )
|
||||
setopt prompt_subst
|
||||
|
||||
ICON="%(?.%{$fg[green]%}.%{$fg[red]%})λ>"
|
||||
ICON="%(?.%{$fg[green]%}.%{$fg[red]%})>"
|
||||
DIR="%{$fg[blue]%}%~"
|
||||
GIT="%{$fg[red]%}\$vcs_info_msg_0_"
|
||||
HOSTN="%{$fg[yellow]%}%m "
|
||||
|
||||
@@ -48,10 +48,10 @@ bind-key -n 'M-!' select-layout even-horizontal
|
||||
bind-key -n 'M-@' select-layout even-vertical
|
||||
|
||||
# resize panes
|
||||
bind-key -n 'M-Left' resize-pane -L
|
||||
bind-key -n 'M-Right' resize-pane -R
|
||||
bind-key -n 'M-Up' resize-pane -U
|
||||
bind-key -n 'M-Down' resize-pane -D
|
||||
bind-key -n 'M-Left' resize-pane -L 20
|
||||
bind-key -n 'M-Right' resize-pane -R 20
|
||||
bind-key -n 'M-Up' resize-pane -U 20
|
||||
bind-key -n 'M-Down' resize-pane -D 20
|
||||
|
||||
########## General ##########
|
||||
# alias
|
||||
|
||||
Reference in New Issue
Block a user