From dba8cace15f417f2ccf4ecc7f1022c36435c51c1 Mon Sep 17 00:00:00 2001 From: Joseph Bryan Date: Thu, 8 Sep 2016 20:57:05 -0400 Subject: [PATCH] adds ++ta-belt, refactors ++se-belt --- lib/drum.hoon | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/lib/drum.hoon b/lib/drum.hoon index 03b39b819..20f4eb4d2 100644 --- a/lib/drum.hoon +++ b/lib/drum.hoon @@ -305,29 +305,18 @@ ++ se-belt :: handle input |= bet/dill-belt ^+ +> - ?: ?=($rez -.bet) - +>(edg (dec p.bet)) - ?: ?=($yow -.bet) - ~& [%no-yow -.bet] - +> + ?: ?=({?($hey $rez $yow) *} bet) :: target-agnostic + ?- bet + {$hey *} +>(mir [0 ~]) :: refresh + {$rez *} +>(edg (dec p.bet)) :: resize window + {$yow *} ~&([%no-yow -.bet] +>) + == =+ gul=se-agon - =+ tur=?~(gul ~ (~(get by fug) u.gul)) + =+ tur=?~(gul ~ (~(get by fug) u.gul)) :: XX se-aint ?: |(?=($~ gul) ?=($~ tur) ?=($~ u.tur)) (se-blit %bel ~) - =+ taz=~(. ta [& u.gul] u.u.tur) - =. blt.taz [q.blt.taz `bet] =< ta-abet - ?- -.bet - $aro (ta-aro:taz p.bet) - $bac ta-bac:taz - $cru (ta-cru:taz p.bet q.bet) - $ctl (ta-ctl:taz p.bet) - $del ta-del:taz - $hey taz(mir [0 ~]) - $met (ta-met:taz p.bet) - $ret ta-ret:taz - $txt (ta-txt:taz p.bet) - == + (ta-belt:(se-tame u.gul) bet) :: ++ se-born :: new server |= wel/well @@ -496,7 +485,24 @@ == :: ++ ta-bel :: beep - .(+> (se-blit %bel ~), q.blt ~) + .(+> (se-blit %bel ~), q.blt ~) :: forget belt + :: + ++ ta-belt :: handle input + |= bet/dill-belt + ^+ +> + ?< ?=({?($hey $rez $yow) *} bet) :: target-specific + =. blt [q.blt `bet] :: remember belt + ?- bet + {$aro *} (ta-aro p.bet) + {$bac *} ta-bac + {$cru *} (ta-cru p.bet q.bet) + {$ctl *} (ta-ctl p.bet) + {$del *} ta-del + {$met *} (ta-met p.bet) + {$ret *} ta-ret + {$txt *} (ta-txt p.bet) + == + :: ++ ta-cat :: mass insert |= {pos/@ud txt/(list @c)} ^- sole-edit