Added irc.ui.load; now "irc.ui" run works
parent
416f002220
commit
36e74f29c0
|
@ -0,0 +1,9 @@
|
||||||
|
! Default system ircui-rc file
|
||||||
|
! Copy into .ircui-rc in your home directory and then change username and such
|
||||||
|
! To find your home directory, type "home ." into a Factor listener
|
||||||
|
|
||||||
|
USING: irc.client irc.ui ;
|
||||||
|
|
||||||
|
"irc.freenode.org" 8001 "factor-irc" f ! server port nick password
|
||||||
|
{ "#concatenative" "#terrorisland" } ! all the channels you want to autojoin
|
||||||
|
server-open
|
|
@ -0,0 +1,16 @@
|
||||||
|
! Copyright (C) 2008 William Schlieper
|
||||||
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
|
|
||||||
|
USING: kernel io.files parser editors sequences ;
|
||||||
|
|
||||||
|
IN: irc.ui.load
|
||||||
|
|
||||||
|
: file-or ( path path -- path ) over exists? ? ;
|
||||||
|
|
||||||
|
: personal-ui-rc ( -- path ) home ".ircui-rc" append-path ;
|
||||||
|
|
||||||
|
: system-ui-rc ( -- path ) "extra/irc/ui/ircui-rc" resource-path ;
|
||||||
|
|
||||||
|
: ircui-rc ( -- path ) personal-ui-rc system-ui-rc file-or ;
|
||||||
|
|
||||||
|
: run-ircui ( -- ) ircui-rc run-file ;
|
|
@ -6,9 +6,9 @@ USING: accessors kernel threads combinators concurrency.mailboxes
|
||||||
ui ui.gadgets ui.gadgets.panes ui.gadgets.editors
|
ui ui.gadgets ui.gadgets.panes ui.gadgets.editors
|
||||||
ui.gadgets.scrollers ui.commands ui.gadgets.frames ui.gestures
|
ui.gadgets.scrollers ui.commands ui.gadgets.frames ui.gestures
|
||||||
ui.gadgets.tabs ui.gadgets.grids
|
ui.gadgets.tabs ui.gadgets.grids
|
||||||
io io.styles namespaces irc.client irc.client.private
|
io io.styles namespaces calendar calendar.format
|
||||||
irc.messages irc.messages.private irc.ui.commandparser
|
irc.client irc.client.private irc.messages irc.messages.private
|
||||||
calendar calendar.format ;
|
irc.ui.commandparser irc.ui.load ;
|
||||||
|
|
||||||
IN: irc.ui
|
IN: irc.ui
|
||||||
|
|
||||||
|
@ -145,6 +145,10 @@ M: irc-page ungraft*
|
||||||
[ listeners>> +server-listener+ swap at <irc-pane> <scroller>
|
[ listeners>> +server-listener+ swap at <irc-pane> <scroller>
|
||||||
"Server" associate <tabbed> >>tabs ] bi ;
|
"Server" associate <tabbed> >>tabs ] bi ;
|
||||||
|
|
||||||
: freenode-connect ( -- ui-window )
|
: server-open ( server port nick password channels -- )
|
||||||
"irc.freenode.org" 8001 "factor-irc" f
|
[ <irc-profile> ui-connect [ irc-window ] keep ] dip
|
||||||
<irc-profile> ui-connect [ irc-window ] keep ;
|
[ over join-channel ] each ;
|
||||||
|
|
||||||
|
: main-run ( -- ) run-ircui ;
|
||||||
|
|
||||||
|
MAIN: main-run
|
||||||
|
|
Loading…
Reference in New Issue