zshrc:
- ls sorts dirs first - add gitd render.py: - group memory and swap stats with sysload instead of storage
This commit is contained in:
parent
f8351e033d
commit
92538adfaa
2 changed files with 9 additions and 3 deletions
|
@ -2,8 +2,8 @@
|
|||
bindkey -e # editor jako emacs
|
||||
bindkey ' ' magic-space # mezerník rozbaluje odkazy na historii
|
||||
|
||||
alias ls="ls -F --color" # BAREVNÉ soubory
|
||||
alias l="ls -hl" # bez ll nemá smysl žít
|
||||
alias ls="ls -F --color --group-directories-first"
|
||||
alias l="ls -hl"
|
||||
alias ll="l -a"
|
||||
alias grep="grep -a --color=auto"
|
||||
alias pull_website="wget --no-parent --recursive --page-requisites --convert-links --html-extension --no-clobber"
|
||||
|
@ -17,6 +17,7 @@ alias gita="git add"
|
|||
alias gitc="git commit"
|
||||
alias gitp="git push"
|
||||
alias gitl="git log"
|
||||
alias gitd="git diff --word-diff"
|
||||
alias http-dir="echo "Serving $CWD on 0.0.0.0:55555"; /usr/sbin/thttpd -D -d . -p 55555 -l -"
|
||||
alias Yvid="youtube-dl --no-check-certificate"
|
||||
alias Yall="youtube-dl -o \"%(autonumber)s-%(title)s.%(ext)s\""
|
||||
|
|
|
@ -421,7 +421,7 @@ class StatsPart(Part):
|
|||
self.fragments.append(style_reset())
|
||||
|
||||
# tasks
|
||||
self.fragments.append("%d | " %(sysload.tasks_total))
|
||||
self.fragments.append("%d " %(sysload.tasks_total))
|
||||
|
||||
# memory (and swap, if used)
|
||||
mem_total = 0
|
||||
|
@ -459,6 +459,7 @@ class StatsPart(Part):
|
|||
|
||||
# mountpoints
|
||||
names = []
|
||||
first_mountpoint = True
|
||||
|
||||
with open("/proc/self/mounts") as f:
|
||||
for line in f:
|
||||
|
@ -495,6 +496,10 @@ class StatsPart(Part):
|
|||
stor_total = stat.f_blocks * stat.f_bsize
|
||||
stor_free = stat.f_bavail * stat.f_bsize
|
||||
|
||||
if first_mountpoint:
|
||||
self.fragments.append(" |")
|
||||
first_mountpoint = False
|
||||
|
||||
self.fragments.append(short_name)
|
||||
self.fragments.append(style_bold())
|
||||
self.fragments.append(style_color(settings.get_space_color(stor_free, stor_total)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue