4 set --local AUTOJUMP_PATH $XDG_CONFIG_HOME/fish/functions/autojump.fish
5 if test -e $AUTOJUMP_PATH
15 echo -n "["(date "+%H:%M")"] "
22 echo -n (basename $PWD)
25 printf '%s ' (__fish_git_prompt)
33 echo -e (uname -ro | awk '{print " \\\\e[1mOS: \\\\e[0;32m"$0"\\\\e[0m"}')
34 echo -e (uptime -p | sed 's/^up //' | awk '{print " \\\\e[1mUptime: \\\\e[0;32m"$0"\\\\e[0m"}')
35 echo -e (uname -n | awk '{print " \\\\e[1mHostname: \\\\e[0;32m"$0"\\\\e[0m"}')
36 echo -e " \\e[1mDisk usage:\\e[0m"
39 df -l -h | grep -E 'dev/(xvda|sd|mapper)' | \
40 awk '{printf "\\\\t%s\\\\t%4s / %4s %s\\\\n\n", $6, $3, $2, $5}' | \
41 sed -e 's/^\(.*\([8][5-9]\|[9][0-9]\)%.*\)$/\\\\e[0;31m\1\\\\e[0m/' -e 's/^\(.*\([7][5-9]\|[8][0-4]\)%.*\)$/\\\\e[0;33m\1\\\\e[0m/' | \
46 echo -e " \\e[1mNetwork:\\e[0m"
48 # http://tdt.rocks/linux_network_interface_naming.html
50 ip addr show up scope global | \
51 grep -E ': <|inet' | \
53 -e 's/^[[:digit:]]\+: //' \
55 -e 's/.*inet[[:digit:]]* //' \
57 awk 'BEGIN {i=""} /\.|:/ {print i" "$0"\\\n"; next} // {i = $0}' | \
60 # public addresses are underlined for visibility \
61 sed 's/ \([^ ]\+\)$/ \\\e[4m\1/' | \
62 # private addresses are not \
63 sed 's/m\(\(10\.\|172\.\(1[6-9]\|2[0-9]\|3[01]\)\|192\.168\.\).*\)/m\\\e[24m\1/' | \
64 # unknown interfaces are cyan \
65 sed 's/^\( *[^ ]\+\)/\\\e[36m\1/' | \
66 # ethernet interfaces are normal \
67 sed 's/\(\(en\|em\|eth\)[^ ]* .*\)/\\\e[39m\1/' | \
68 # wireless interfaces are purple \
69 sed 's/\(wl[^ ]* .*\)/\\\e[35m\1/' | \
70 # wwan interfaces are yellow \
71 sed 's/\(ww[^ ]* .*\).*/\\\e[33m\1/' | \
72 sed 's/$/\\\e[0m/' | \
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list