taro-ctl: delete socket file before starting server; taro-ls: add keybinds for switching mailboxes
This commit is contained in:
parent
74c6862163
commit
a25d225fa5
2 changed files with 32 additions and 2 deletions
|
@ -72,7 +72,6 @@ module Taro
|
|||
Process.run(
|
||||
command: UXN_EMU,
|
||||
args: [ "-s", "1", "taro-ls" ],
|
||||
shell: true,
|
||||
chdir: TARO_LIB,
|
||||
input: @stdin_r,
|
||||
output: @stdout_w,
|
||||
|
@ -266,6 +265,8 @@ module Taro
|
|||
end
|
||||
|
||||
taro = Taro::TaroCtl.new
|
||||
|
||||
File.delete?("#{TARO_LIB}/taro.sock")
|
||||
srv = UNIXServer.new("#{TARO_LIB}/taro.sock")
|
||||
|
||||
spawn do
|
||||
|
|
31
taro-ls.tal
31
taro-ls.tal
|
@ -328,7 +328,7 @@ JMP2r
|
|||
send_reader
|
||||
&no_reader
|
||||
DUP #09 NEQ ,&no_tab JCN
|
||||
( check shift or not - prev mailbox if so, otherwise next )
|
||||
change_mbox_by_key
|
||||
&no_tab
|
||||
&check_btns
|
||||
POP
|
||||
|
@ -339,6 +339,35 @@ JMP2r
|
|||
&no_down
|
||||
BRK
|
||||
|
||||
@change_mbox_by_key ( -> )
|
||||
.Controller/button DEI #04 AND ,&back JCN
|
||||
( fwd )
|
||||
.mboxes/select_index LDZ2 INC2 .mboxes/len LDZ2 NEQ2 ,&can_go_fwd JCN
|
||||
( jump to first )
|
||||
#0000 .mboxes/select_index STZ2
|
||||
#0000 .mboxes/top STZ2
|
||||
,&end JMP
|
||||
&can_go_fwd
|
||||
.mboxes/select_index LDZ2 INC2 .mboxes/select_index STZ2
|
||||
.mboxes/select_index LDZ2 #00 .mboxes/height LDZ .mboxes/top LDZ2 ADD2 LTH2 ,&no_scroll_down JCN
|
||||
.mboxes/top LDZ2 INC2 .mboxes/top STZ2
|
||||
&no_scroll_down ,&end JMP
|
||||
&back
|
||||
.mboxes/select_index LDZ2 #0000 NEQ2 ,&can_go_back JCN
|
||||
.mboxes/len LDZ2 #0001 SUB2 .mboxes/select_index STZ2
|
||||
.mboxes/len LDZ2 #00 .mboxes/height LDZ SUB2 .mboxes/top STZ2
|
||||
,&end JMP
|
||||
&can_go_back
|
||||
.mboxes/select_index LDZ2 #0001 SUB2 .mboxes/select_index STZ2
|
||||
.mboxes/select_index LDZ2 INC2 .mboxes/top LDZ2 GTH2 ,&no_scroll_up JCN
|
||||
.mboxes/top LDZ2 #0001 SUB2 .mboxes/top STZ2
|
||||
&no_scroll_up ,&end JMP
|
||||
&end
|
||||
.mboxes mbox_select_handler
|
||||
#01 .refresh/mboxes STZ
|
||||
#01 .refresh/list STZ
|
||||
JMP2r
|
||||
|
||||
@handle_textbox ( -> )
|
||||
|
||||
.Controller/key DEI DUP #00 EQU ,&no_key JCN
|
||||
|
|
Loading…
Reference in a new issue