forked from DoTheEvo/ansible-arch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.myownrc
42 lines (32 loc) · 1.44 KB
/
.myownrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# ----------------------------------------------------------------------------
# BASIC ENVIRONMENTAL VARIABLES ---------------------------------------------
export EDITOR=nvim
export VISUAL=nvim
# ----------------------------------------------------------------------------
# ALIASES -------------------------------------------------------------------
# show numerical permissions of content of the current directory
alias statt='stat -c "%A %a %n" *'
# ip command with colors
alias ip='ip --color=auto'
# ----------------------------------------------------------------------------
# NNN FILE MANAGER ----------------------------------------------------------
# n runs nnn as root but keeps users environmental variables
# it also shows hidden files
alias n='sudo -E nnn -H'
# enable trash; different colors for tabs; bookmarks
export NNN_TRASH=1
export NNN_COLORS='2136'
export NNN_BMS='e:/etc;u:~;'
# shell opened from nnn using ! hotkey has indication of depth
[ -n "$NNNLVL" ] && PS1="N$NNNLVL $PS1"
# ----------------------------------------------------------------------------
# ZSH CUSTOM HOTKEYS ---------------------------------------------------------
# ctr+f prepends sudo on current line
add_sudo (){
BUFFER="sudo $BUFFER"
zle -w end-of-line
}
zle -N add_sudo
bindkey "^f" add_sudo
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------