- ls sorts dirs first
- add gitd

render.py:
- group memory and swap stats with sysload instead of storage
This commit is contained in:
Martinez 2015-12-26 17:44:23 +01:00
parent f8351e033d
commit 92538adfaa
2 changed files with 9 additions and 3 deletions

View file

@ -2,8 +2,8 @@
bindkey -e # editor jako emacs bindkey -e # editor jako emacs
bindkey ' ' magic-space # mezerník rozbaluje odkazy na historii bindkey ' ' magic-space # mezerník rozbaluje odkazy na historii
alias ls="ls -F --color" # BAREVNÉ soubory alias ls="ls -F --color --group-directories-first"
alias l="ls -hl" # bez ll nemá smysl žít alias l="ls -hl"
alias ll="l -a" alias ll="l -a"
alias grep="grep -a --color=auto" alias grep="grep -a --color=auto"
alias pull_website="wget --no-parent --recursive --page-requisites --convert-links --html-extension --no-clobber" 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 gitc="git commit"
alias gitp="git push" alias gitp="git push"
alias gitl="git log" 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 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 Yvid="youtube-dl --no-check-certificate"
alias Yall="youtube-dl -o \"%(autonumber)s-%(title)s.%(ext)s\"" alias Yall="youtube-dl -o \"%(autonumber)s-%(title)s.%(ext)s\""

View file

@ -421,7 +421,7 @@ class StatsPart(Part):
self.fragments.append(style_reset()) self.fragments.append(style_reset())
# tasks # tasks
self.fragments.append("%d | " %(sysload.tasks_total)) self.fragments.append("%d " %(sysload.tasks_total))
# memory (and swap, if used) # memory (and swap, if used)
mem_total = 0 mem_total = 0
@ -459,6 +459,7 @@ class StatsPart(Part):
# mountpoints # mountpoints
names = [] names = []
first_mountpoint = True
with open("/proc/self/mounts") as f: with open("/proc/self/mounts") as f:
for line in f: for line in f:
@ -495,6 +496,10 @@ class StatsPart(Part):
stor_total = stat.f_blocks * stat.f_bsize stor_total = stat.f_blocks * stat.f_bsize
stor_free = stat.f_bavail * 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(short_name)
self.fragments.append(style_bold()) self.fragments.append(style_bold())
self.fragments.append(style_color(settings.get_space_color(stor_free, stor_total))) self.fragments.append(style_color(settings.get_space_color(stor_free, stor_total)))