dot

packages and services management
Log | Files | Refs | README

commit 30d348cb7709b872bba57dda9488ab0b2813f649
parent a2c909d4ac99023d1ff85b0b6d26b9ffc55da470
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sat, 16 Dec 2017 10:38:19 +0100

plan9 from user space

Diffstat:
Abin/acme | 3+++
Dbin/clear | 2--
Dbin/ifconfig | 3---
Mbin/irc | 49++++---------------------------------------------
Mbin/l | 2+-
Rbin/paste -> bin/pst | 0
Dbin/s | 2--
Rdot/mblaze/profile -> dot/config/mblaze/profile | 0
Ddot/exrc | 3---
Ddot/mg | 2--
Mdot/profile | 11++++++-----
Ddot/torrc | 0
Mpack/dwm/build | 4++--
Mpack/dwm/config.h | 5+++--
Dpack/dwm/dwm-bottomstack-6.1.diff | 101-------------------------------------------------------------------------------
Apack/plan9/build | 1+
Apack/plan9/git | 1+
17 files changed, 21 insertions(+), 168 deletions(-)

diff --git a/bin/acme b/bin/acme @@ -0,0 +1,3 @@ +#!/bin/sh + +exec "$PLAN9/bin/acme" -f "$PLAN9/font/pelm/unicode.9.font" diff --git a/bin/clear b/bin/clear @@ -1,2 +0,0 @@ -#!/bin/sh -printf '\033[H\033[2J' diff --git a/bin/ifconfig b/bin/ifconfig @@ -1,3 +0,0 @@ -#!/bin/sh - -true diff --git a/bin/irc b/bin/irc @@ -1,48 +1,6 @@ #!/bin/sh -# Simple tiny ii client using eel(1) for formatting and iomenu(1) for selection. +# Simple tiny ii client using eel(1) for formatting the logs. -IRCPATH=$HOME/var/irc -INPUT=$HOME/.cache/ii-client +tail -fn50 "$1/out" | eel & -[ $# -eq 0 ] && exec "$0" "$(find "$IRCPATH" -type d | iomenu)" -clear - -tail -fn50 "$1/out" | eel | while IFS= read -r line -do printf '\r\033[K%s\n> %s' "$line" "$(cat "$INPUT")" -done & pid=$! - -trap 'tty sane' EXIT - -stty -icanon -echo -while - printf '\r\033[K> %s' "$(cat "$INPUT")" - key=$(printf %03o "'$(dd bs=1 count=1 2>/dev/null)") -do - case $key in - (000) # Enter - printf '%s\n' "$(cat "$INPUT")" > "$1/in" - printf '' > "$INPUT" - ;; - (014) # Ctrl + L - tail -n 1000 "$1/out"| eel | less - ;; - (016) # Ctrl + N - pkill -fx "tail -fn50 $1/out" - exec "$0" "$(find "$IRCPATH" -type d | iomenu)" - ;; - (025) # Ctrl + U - printf '' > "$INPUT" - ;; - (027) # Ctrl + W - printf %s "$(sed 's/[^ ]* *$//' "$INPUT")" > "$INPUT" - ;; - (177) # Backspace - printf %s "$(sed 's/.$//' "$INPUT")" > "$INPUT" - ;; - (*) - if [ "$key" -ge 41 ] && [ "$key" -lt 177 ] || [ "$key" -eq 40 ] - then printf "\\$key" >> "$INPUT" - fi - ;; - esac -done +[ -p "$1/in" ] && cat > "$1/in"+ \ No newline at end of file diff --git a/bin/l b/bin/l @@ -1,4 +1,4 @@ #!/bin/sh pwd -ls -Alp "$@" +ls -Alp "$@" | column diff --git a/bin/paste b/bin/pst diff --git a/bin/s b/bin/s @@ -1,2 +0,0 @@ -#!/bin/sh -git status -s --branch diff --git a/dot/mblaze/profile b/dot/config/mblaze/profile diff --git a/dot/exrc b/dot/exrc @@ -1,3 +0,0 @@ -set ruler -map g 1G -map q :q diff --git a/dot/mg b/dot/mg @@ -1,2 +0,0 @@ -backup-to-home-directory -column-number-mode diff --git a/dot/profile b/dot/profile @@ -2,17 +2,17 @@ export NAME="Josuah Demangeon" export TZ="Europe/Paris" export NICK="josuah" export EMAIL="mail@josuah.net" -export MAILTO="$MAIL" +export MAILTO="$EMAIL" export EDITOR="edit" VISUAL="edit" -export PAGER="less" MANPAGER="less" +export PAGER="tee" MANPAGER="ul" -export ENV="$HOME/.bashrc" export MAIL="$HOME/var/mail/mbox" export MAILDIR="$HOME/var/mail" -export PATH="$HOME/etc/bin:$HOME/.local/bin:$PATH" +export PLAN9="$HOME/.local/src/plan9" +export PATH="$HOME/etc/bin:$HOME/.local/bin:$PATH:$PLAN9/bin" export MANPATH="$HOME/etc/man:/usr/share/man:/usr/local/man" -export MANPATH="$HOME/.local/share/man:$MANPATH" +export MANPATH="$HOME/.local/share/man:$MANPATH:$PLAN9/man" export C_INCLUDE_PATH="$HOME/.local/include" export LIBRARY_PATH="$HOME/.local/lib:/usr/local/lib/inotify" export LD_LIBRARY_PATH="$HOME/.local/lib:/usr/local/lib/inotify" @@ -26,6 +26,7 @@ export LC_NUMERIC=en_US.UTF-8 export LC_TIME=en_US.UTF-8 export ABDUCO_SOCKET_DIR="$HOME/.cache" +export MBLAZE="$HOME/.config/mblaze" export LESS="-~R" export LESSHISTFILE=- diff --git a/dot/torrc b/dot/torrc diff --git a/pack/dwm/build b/pack/dwm/build @@ -1,3 +1,3 @@ -patch -p1 < "$PKG/dwm-bottomstack-6.1.diff" -cp -f "$PKG/config.h" "$SRC/config.h" +cp -f "$PKG/config.h" "$SRC/config.h" +cp -f "$PKG/config.mk" "$SRC/config.mk" make PREFIX="$OPT" install diff --git a/pack/dwm/config.h b/pack/dwm/config.h @@ -19,7 +19,7 @@ static const char *colors[][3] = { }; /* tagging */ -static const char *tags[] = { "1", "2", "3", "4:web", "5:graph" }; +static const char *tags[] = { "1:acme", "2", "3", "4:web", "5:graph" }; static const Rule rules[] = { /* xprop(1): @@ -27,7 +27,8 @@ static const Rule rules[] = { * WM_NAME(STRING) = title */ /* class instance title tags mask isfloating monitor */ - { "Chromium", NULL, NULL, 1 << 3, 0, -1 }, + { "acme", NULL, NULL, 1 << 0, 0, -1 }, + { "Chrome", NULL, NULL, 1 << 3, 0, -1 }, { "Iceweasel", NULL, NULL, 1 << 3, 0, -1 }, { "Firefox", NULL, NULL, 1 << 3, 0, -1 }, { "Surf", NULL, NULL, 1 << 3, 0, -1 }, diff --git a/pack/dwm/dwm-bottomstack-6.1.diff b/pack/dwm/dwm-bottomstack-6.1.diff @@ -1,101 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index 7054c06..554f1db 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -39,6 +39,8 @@ static const Layout layouts[] = { - { "[]=", tile }, /* first entry is default */ - { "><>", NULL }, /* no layout function means floating behavior */ - { "[M]", monocle }, -+ { "TTT", bstack }, -+ { "===", bstackhoriz }, - }; - - /* key definitions */ -@@ -74,6 +76,8 @@ static Key keys[] = { - { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, - { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, - { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, -+ { MODKEY, XK_u, setlayout, {.v = &layouts[3]} }, -+ { MODKEY, XK_o, setlayout, {.v = &layouts[4]} }, - { MODKEY, XK_space, setlayout, {0} }, - { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, - { MODKEY, XK_0, view, {.ui = ~0 } }, -diff --git a/dwm.c b/dwm.c -index 0362114..c313b5e 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -233,6 +233,8 @@ static int xerror(Display *dpy, XErrorEvent *ee); - static int xerrordummy(Display *dpy, XErrorEvent *ee); - static int xerrorstart(Display *dpy, XErrorEvent *ee); - static void zoom(const Arg *arg); -+static void bstack(Monitor *m); -+static void bstackhoriz(Monitor *m); - - /* variables */ - static const char broken[] = "broken"; -@@ -2139,3 +2141,65 @@ main(int argc, char *argv[]) - XCloseDisplay(dpy); - return EXIT_SUCCESS; - } -+ -+static void -+bstack(Monitor *m) { -+ int w, h, mh, mx, tx, ty, tw; -+ unsigned int i, n; -+ Client *c; -+ -+ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); -+ if (n == 0) -+ return; -+ if (n > m->nmaster) { -+ mh = m->nmaster ? m->mfact * m->wh : 0; -+ tw = m->ww / (n - m->nmaster); -+ ty = m->wy + mh; -+ } else { -+ mh = m->wh; -+ tw = m->ww; -+ ty = m->wy; -+ } -+ for (i = mx = 0, tx = m->wx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) { -+ if (i < m->nmaster) { -+ w = (m->ww - mx) / (MIN(n, m->nmaster) - i); -+ resize(c, m->wx + mx, m->wy, w - (2 * c->bw), mh - (2 * c->bw), 0); -+ mx += WIDTH(c); -+ } else { -+ h = m->wh - mh; -+ resize(c, tx, ty, tw - (2 * c->bw), h - (2 * c->bw), 0); -+ if (tw != m->ww) -+ tx += WIDTH(c); -+ } -+ } -+} -+ -+static void -+bstackhoriz(Monitor *m) { -+ int w, mh, mx, tx, ty, th; -+ unsigned int i, n; -+ Client *c; -+ -+ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); -+ if (n == 0) -+ return; -+ if (n > m->nmaster) { -+ mh = m->nmaster ? m->mfact * m->wh : 0; -+ th = (m->wh - mh) / (n - m->nmaster); -+ ty = m->wy + mh; -+ } else { -+ th = mh = m->wh; -+ ty = m->wy; -+ } -+ for (i = mx = 0, tx = m->wx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) { -+ if (i < m->nmaster) { -+ w = (m->ww - mx) / (MIN(n, m->nmaster) - i); -+ resize(c, m->wx + mx, m->wy, w - (2 * c->bw), mh - (2 * c->bw), 0); -+ mx += WIDTH(c); -+ } else { -+ resize(c, tx, ty, m->ww - (2 * c->bw), th - (2 * c->bw), 0); -+ if (th != m->wh) -+ ty += HEIGHT(c); -+ } -+ } -+} diff --git a/pack/plan9/build b/pack/plan9/build @@ -0,0 +1 @@ +./INSTALL diff --git a/pack/plan9/git b/pack/plan9/git @@ -0,0 +1 @@ +git://github.com/9fans/plan9port.git