dot

packages and services management
Log | Files | Refs | README

commit 7d4244c52143d3c6cbc3475d22f1c64c20a15fcd
parent ecdd463111b3152b0496401e7a9d559cee9e6db2
Author: sshbio <jd@ssh.bio>
Date:   Sat,  2 Jul 2016 22:50:18 +0200

Added thop source

Diffstat:
A.config/htop/htoprc | 26++++++++++++++++++++++++++
M.mailrc | 2+-
M.profile | 2+-
Mbin/irc | 37++++++++++++++++++++++---------------
Mdoc/feeds/urls | 2++
Msrc/dvtm/config.h | 12+++++++++++-
Asrc/htop/build.sh | 10++++++++++
7 files changed, 73 insertions(+), 18 deletions(-)

diff --git a/.config/htop/htoprc b/.config/htop/htoprc @@ -0,0 +1,26 @@ +# Beware! This file is rewritten by htop when settings are changed in the interface. +# The parser is also very primitive, and not human-friendly. +fields=0 48 18 46 47 49 1 +sort_key=18 +sort_direction=-1 +hide_threads=0 +hide_kernel_threads=1 +hide_userland_threads=0 +shadow_other_users=1 +show_thread_names=0 +show_program_path=1 +highlight_base_name=1 +highlight_megabytes=1 +highlight_threads=1 +tree_view=0 +header_margin=1 +detailed_cpu_time=0 +cpu_count_from_zero=0 +update_process_names=0 +account_guest_in_cpu_meter=0 +color_scheme=0 +delay=15 +left_meters=AllCPUs2 CPU Memory Swap +left_meter_modes=3 1 1 1 +right_meters=Clock Blank Tasks LoadAverage Battery +right_meter_modes=4 2 2 2 1 diff --git a/.mailrc b/.mailrc @@ -86,7 +86,7 @@ set markanswered set mime-counter-evidence # A nice prompt for ISO 6429/ECMA-48 terminals. -set prompt="\033[1m\?\$ \@>\033[0m " +#set prompt="\033[1m\?\$ \@>\033[0m " # Automatically quote the text of the message that is responded to. set quote diff --git a/.profile b/.profile @@ -16,7 +16,7 @@ export EDITOR='vis' export ALTERNATE_EDITOR='vi' export DVTM_EDITOR="$EDITOR" export VISUAL="$EDITOR" -export PAGER='less' +export PAGER='busybox less' export BROWSER='retawq' #=== PATHS === diff --git a/bin/irc b/bin/irc @@ -10,7 +10,7 @@ NICK="${NICK-$USER}" PASS="${PASS-}" FULLNAME='With netcat and a script as client' IRC_DIR="$HOME/var/irc" -FORMAT_STRING='%-18s%14s %s' +FORMAT_STRING='%-17s%11s %s' #===[ SERVER INTERACTION ]====================================================== # @@ -46,7 +46,7 @@ open_connection() tail -f "$in" | nc "$server" 6667 >> "$out" & keepalive "$server" & - tail -f "$IRC_DIR/$server/out" | output "$server" & + tail -n 0 -f "$IRC_DIR/$server/out" | output "$server" & write "NICK $NICK" "$server" write "USER pipe +i * :$FULLNAME" "$server" @@ -59,7 +59,7 @@ keepalive() { local server="$1" - tail -f "$IRC_DIR/$server/out" | while read message + tail -n 0 -f "$IRC_DIR/$server/out" | while read message do case "$message" in PING*) write "PONG${message#PING}" "$server" ;; @@ -107,7 +107,8 @@ parse_input() ' ') tail -n 1000 "$IRC_DIR/$(get_server)/out" \ | output "$(get_server)" 1 | less ;; *) - key="$(printf '%s' "$key" | tr -cd '\40-\176')" + key="$(printf '%s' "$key" \ + | tr -cd '\40-\176\002\037')" printf '%s' "$key" >> "$input" ;; esac @@ -178,7 +179,10 @@ display_input() printf '\r\033[K\033[7m%s %s \033[0m %s' \ "$(get_server)" \ "$(get_channel)" \ - "$(get_input)" + "$(get_input | sed -r ' + s/([^]*)/\1/g + s/([^]*)/\1/g + ')" } # @@ -195,16 +199,19 @@ output() do local nick="$(printf '%s' "$message" \ | sed -rn 's/^:([^! ]+)![^!]+$/\1/ p')" - local msg="$(printf '%s' "$message" | sed -r 's/^:[^ ]* // - s/JOIN/>/ - s/QUIT/</ - s/PRIVMSG/|/ - s/NOTICE/!/ - s/NICK/=/ - s/PART/~/ - s/ERROR/X/ - s/PING/ / - s/MODE/+/ + local msg="$(printf '%s' "$message" | sed -r ' + s/^:[^ ]* // + s/JOIN/>/ + s/QUIT/</ + s/PRIVMSG/|/ + s/NOTICE/!/ + s/NICK/=/ + s/PART/~/ + s/ERROR/X/ + s/PING/ / + s/MODE/+/ + s/([^]*)/\1/g + s/([^]*)/\1/g ')" [ -z "$no_disp" ] && printf '\r\033[K' diff --git a/doc/feeds/urls b/doc/feeds/urls @@ -2,3 +2,4 @@ http://andrewgelman.com/feed #http://www.homolog.us/blogs/feed http://feeds.feedburner.com/OmicsOmics +http://hisham.hm/?x=feed:rss2&category=1+ \ No newline at end of file diff --git a/src/dvtm/config.h b/src/dvtm/config.h @@ -62,7 +62,17 @@ static Color colors[] = { /* scroll back buffer size in lines */ #define SCROLL_HISTORY 2000 -const char tags[][10] = { "1 term","2 edit", "3 view", "4 mail", "5 chat", "6 medi", "7 stat", "8 remt", }; +const char tags[][10] = { + "1 term", + "2 repl", + "3 edit" + "3 view", + "4 mail", + "5 chat", + "6 medi", + "7 stat", + "8 remt", +}; #include "tile.c" #include "bstack.c" diff --git a/src/htop/build.sh b/src/htop/build.sh @@ -0,0 +1,10 @@ +# Pretty system monitor +tar=http://hisham.hm/htop/releases/2.0.1/htop-2.0.1.tar.gz + +build() +{ + ./configure --disable-unicode --prefix="$PREFIX" + + make + make install clean +}