dot

packages and services management
Log | Files | Refs | README

commit d3bb0b48dbcdac0699f2c2be75ff534ecde99650
parent 04512d1f5c066c2406fc807dcee53a40203e1359
Author: Josuah Demangeon <josuah.demangeon@gandi.net>
Date:   Tue, 23 May 2017 07:34:26 +0200

this is gonna clash!

Diffstat:
M.config/git/config | 2+-
Mbin/color | 2+-
Abin/ii-filter | 55+++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dbin/ii-filter-1 | 61-------------------------------------------------------------
Dbin/ii-filter-2 | 57---------------------------------------------------------
Dbin/ii-filter-3 | 54------------------------------------------------------
Mbin/io-irc | 2+-
Mbin/io-search | 11++++-------
Mbuild/dwm/config.h | 6+++---
Abuild/wily/url | 1+
Murl | 2+-
11 files changed, 67 insertions(+), 186 deletions(-)

diff --git a/.config/git/config b/.config/git/config @@ -1,3 +1,3 @@ [user] - email = mail@josuah.net + email = josuah.demangeon@gandi.net name = Josuah Demangeon diff --git a/bin/color b/bin/color @@ -5,7 +5,7 @@ bg=`hexdump /dev/urandom | sed q | cut -c 9-12,14-15` case "$1" in ( 0 ) xsetroot -bitmap "$ETC/tile.xbm" -bg '#000000' -fg '#000000' ;; -( 1 ) xsetroot -bitmap "$ETC/tile.xbm" -bg '#000000' -fg '#555555' ;; +( 1 ) xsetroot -bitmap "$ETC/tile.xbm" -bg '#ffffff' -fg '#ffffff' ;; ( 2 ) xsetroot -bitmap "$ETC/tile.xbm" -bg '#001133' -fg '#ffeecc' ;; ( 3 ) xsetroot -bitmap "$ETC/tile.xbm" -bg '#220033' -fg '#00aa99' ;; ( 4 ) xsetroot -bitmap "$ETC/tile.xbm" -bg '#443322' -fg '#ffffff' ;; diff --git a/bin/ii-filter b/bin/ii-filter @@ -0,0 +1,55 @@ +# http://tools.suckless.org/ii + +awk ' + +BEGIN { + WIDTH = 80 - 17; +} + +{ + last = date; + date = $1; +} + +last != date { + printf("\n----------------------------------"); + printf(" %s ", date); + printf("----------------------------------\n") +} + +{ + + if ($3 ~ "<.*>" || $3 ~ "-!-") { + sub("<", "", $3); + sub(">", "", $3); + + if (nick != $3) { + printf("\n"); + printf("%s %10s ", $2, $3); + nick = $3; + } else { + printf("%s %10s ", $2, ""); + } + + sub("[^ ]* [^ ]* [^ ]* ", ""); + + } else { + printf("%s %10s ", $2, ""); + sub("[^ ]* [^ ]* ", ""); + } + + sub("^\001ACTION ", "~~ "); + sub("\001$", " ~~"); + + for (offset = 0; length($0) > 0; offset = 18) { + row = substr($0, 1, WIDTH); + + if (length(row) >= WIDTH) + sub(" [^ ]*$", "", row); + + $0 = substr($0, length(row) + 1); + sub(" *", ""); + + printf("%" offset "s%s\n", "", row); + } +}' diff --git a/bin/ii-filter-1 b/bin/ii-filter-1 @@ -1,61 +0,0 @@ -busybox awk ' - -BEGIN { - NICK_COL = 14; - TEXT_COL = 80 - NICK_COL - length(" "); -} - -/^$/ { - next; -} - -/==> .* <==/ { - sub("/out <==", ""); - sub("==> ", ""); - - print("\n" $0); - - next; -} - -{ - sub(/[0-9]*-[0-9]*-[0-9]* /, ""); - - date = $0; - sub(/ .*/, "", date); - sub(/^[^ ]* /, "", $0 ); - - if (match($0, /^[-=<#*@+]/)) { - nick = $0; - sub(/ .*/, "", nick); - sub(/^[^ ]* /, "", $0 ); - sub(/</, "", nick); - sub(/>/, "", nick); - } else { - nick = "-!-"; - } - - if (nick != lastnick) - printf("%-" NICK_COL "s|\n", date); - - printf("%" NICK_COL "s| ", - (nick != lastnick && nick != "-!-") ? nick : ""); - - for (first = 1; length($0) >= TEXT_COL; first = 0) { - line = substr($0, 1, TEXT_COL); - sub(/ [^ ]*$/, "", line); - $0 = substr($0, length(line) + 1); - - if (!first) - printf("%" NICK_COL "s| ", ""); - - print(line); - } - - if (!first) - printf("%" NICK_COL "s| ", ""); - - print($0); - - lastnick = nick; -}' "$@" diff --git a/bin/ii-filter-2 b/bin/ii-filter-2 @@ -1,57 +0,0 @@ -sed -r ' - - -# Remove date - -s/[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2} // - - -# Chat events - -s/^-!- (.*)\(([^)]*)\) has joined .*/<\1>\x1b[0;1;32m>\x1b[0m \x1b[37m\2\x1b[0m/ -s/^-!- (.*)\(([^)]*)\) has left .*/<\1>\x1b[0;1;31m<\x1b[0m \x1b[37m\2\x1b[0m/ -s/^-!- (.*) changed mode\/.* -> (.*)/<\1>\x1b[0;1;34m=\x1b[0m \2\x1b[0m/ -s/^-!- (.*) changed nick to (.*)/<\1>\x1b[0;1;36m=\x1b[0m \x1b[1m\1\x1b[0m -> \x1b[1m\2\x1b[0m/ -s/^(.*) Nickname is already in use./<\1>\x1b[0;1;31m!\x1b[0m \x1b[37;1m\1\x1b[37m already in use\x1b[0m/ -s/^(.*) Erroneous Nickname/<\1>\x1b[0;1;31m!\x1b[0m \x1b[37m\1\x1b[37m wrong nickname\x1b[0m/ -s/^\+(.*)/ \x1b[0;1;33m+\x1b[0m \1/ -s/^-!- (.*)/ \x1b[0m│\x1b[1;33m \1\x1b[0m/ -s/^\*\*\* (.*)/ \x1b[0m│ \x1b[37m\1\x1b[0m/ - - -# Infos - -s/^-!- (.*)/ \x1b[0m│ \x1b[37m\1\x1b[0m/ - - -# Motd - -s/^- (.*)/\x1b[0m │ \x1b[37m\1\x1b[0m/ -s/End of \/MOTD command./\x1b[0m └───────────────┬──────────────────────────────────┤ MOTD/ - - -# Names - -s/ End of \/NAMES list\./\n\x1b[0m──────────────────┬──────────────────────────────────┤ NAMES/ - - -# Right alignment - -/<[^>]*>/ { - :x - s/^([^>]{0,16}>.*)$/ \1/g - tx -} - - -# Nicks - -s/( *)<([^>]*)> .ACTION (.*)/\x1b[0m\1 \x1b[1m\2\x1b[0m ┊ \x1b[35m\3\x1b[0m/ -s/( *)<([^>]*)> ([^ :]*): /\x1b[0m\1 \x1b[1m\2\x1b[0m ┊ \x1b[1;36m\3:\x1b[0m / -s/( *)<([^>]*)> /\x1b[0m\1 \x1b[1m\2\x1b[0m ┊ / - - -# Clean remaining < .* > - -s/^( *)<([^>]*)>/\x1b[0m\1 \x1b[1m\2\x1b[0m / -' diff --git a/bin/ii-filter-3 b/bin/ii-filter-3 @@ -1,54 +0,0 @@ -# http://tools.suckless.org/ii - -awk ' - -BEGIN { - WIDTH = 80 - 17; -} - -{ - last = date; - date = $1; -} - -date != last { - printf("----------------------------------"); - printf(" %s ", date); - printf("----------------------------------\n") -} - -{ - if ($3 ~ "<.*>" || $3 ~ "-!-") { - sub("<", "", $3); - sub(">", "", $3); - - if (nick != $3) { - printf("\n"); - printf("%s %10s ", $2, $3); - nick = $3; - } else { - printf("%s %10s ", $2, ""); - } - - sub("[^ ]* [^ ]* [^ ]* ", ""); - - } else { - printf("%s %10s ", $2, ""); - sub("[^ ]* [^ ]* ", ""); - } - - sub("^\001ACTION ", "~~ "); - sub("\001$", " ~~"); - - for (offset = 0; length($0) > 0; offset = 18) { - row = substr($0, 1, WIDTH); - - if (length(row) >= WIDTH) - sub(" [^ ]*$", "", row); - - $0 = substr($0, length(row) + 1); - sub(" *", ""); - - printf("%" offset "s%s\n", "", row); - } -}' diff --git a/bin/io-irc b/bin/io-irc @@ -2,7 +2,7 @@ [ -d "$1" ] || exit 1 -tail -n 40 -f "$1/out" | ii-filter-3 & +tail -n 40 -f "$1/out" | ii-filter & while IFS='' read -r line do diff --git a/bin/io-search b/bin/io-search @@ -1,12 +1,9 @@ # interactively search a string in all code of a directory -output=` - find "$1" -type f ! -path '*/.git/*' | - xargs -n 1 awk ' - FNR == 1 { printf("# %s\n", FILENAME); } - { printf("%7s\t%s\n", FNR, $0); } - ' -` +output=`find "$1" -type f ! -path '*/.git/*' | sort | xargs -n 1 awk ' + FNR == 1 { printf("# %s\n", FILENAME); } + { printf("%7s\t%s\n", FNR, $0); } +'` number=. diff --git a/build/dwm/config.h b/build/dwm/config.h @@ -5,13 +5,13 @@ static const char *fonts[] = { "monospace:pixelsize=13", }; static const char dmenufont[] = "monospace:pixelsize=13"; -static const char normbordercolor[] = "#777777"; +static const char normbordercolor[] = "#000000"; static const char normbgcolor[] = "#000000"; static const char normfgcolor[] = "#ffffff"; -static const char selbordercolor[] = "#ffffff"; +static const char selbordercolor[] = "#000000"; static const char selbgcolor[] = "#ffffff"; static const char selfgcolor[] = "#000000"; -static const unsigned int borderpx = 1; /* border pixel of windows */ +static const unsigned int borderpx = 10; /* border pixel of windows */ static const unsigned int gappx = 10; /* gap pixel between windows */ static const unsigned int snap = 32; /* snap pixel */ static const int showbar = 1; /* 0 means no bar */ diff --git a/build/wily/url b/build/wily/url @@ -0,0 +1 @@ +https://github.com/knusbaum/wily/archive/master.tar.gz diff --git a/url b/url @@ -2,7 +2,7 @@ irc://irc.freenode.net:6697 irc://irc.oftc.net:6697 irc://unix.chat:6697 irc://irc.cyberia.is:6697 -irc://irc.scalix.gandi.net +irc://irc.scalix.gandi.net:6667 gopher://bitreich.org gopher://z3bra.org gopher://r-36.net