130 lines
3.5 KiB
Plaintext
130 lines
3.5 KiB
Plaintext
USING: help ;
|
|
|
|
ARTICLE: "factory" "Factory"
|
|
|
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
{ $emphasis "\"This chapter is not primarily for window manager writers, "
|
|
"as these are a rare breed.\"" }
|
|
|
|
"From the O'Reilly Xlib Programming Manual by Adrian Nye"
|
|
|
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
! { $heading "Dependencies" }
|
|
!
|
|
! "Before using Factory, load "
|
|
! { $module-link "libs/process" }
|
|
! " and "
|
|
! { $module-link "libs/vocabs" }
|
|
! " into your image and save."
|
|
! $terpri
|
|
! "From the shell:"
|
|
!
|
|
! { $code "$ ./f -e='\"libs/process\" require save 0 exit'"
|
|
! "$ ./f -e='\"libs/vocabs\" require save 0 exit'" }
|
|
!
|
|
! "If you rebuild Factor often, it is a better idea to load those "
|
|
! "vocabularies from your factor-boot-rc. Putting these lines in there "
|
|
! "will do the trick:"
|
|
!
|
|
! { $code
|
|
! "REQUIRES: libs/process"
|
|
! " libs/vocabs ;"
|
|
! }
|
|
|
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
{ $heading "Trying out Factory with Xephyr" }
|
|
|
|
{ $code "$ Xephyr -host-cursor :1 &"
|
|
"$ DISPLAY=:1 xterm &" }
|
|
|
|
"Enter this into the xterm inside Xephyr:"
|
|
|
|
{ $code "./f -shell=tty -e='\"apps/factory\" run-module'" }
|
|
|
|
"Another way to try out Factory is to login using a failsafe session "
|
|
"and then launch Factory from the terminal provided."
|
|
|
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
{ $heading ".xsession example" }
|
|
|
|
"If you want to take the plunge and use Factory as your window "
|
|
"manager, here's an example .xsession file you can use."
|
|
|
|
{ $code
|
|
"#!/bin/sh"
|
|
""
|
|
"gnome-settings-daemon &"
|
|
"gnome-power-manager"
|
|
"emacs &"
|
|
""
|
|
"cd /scratch/repos/Factor"
|
|
""
|
|
"screen -d -m"
|
|
"screen -X screen ./f -shell=tty -e='\"apps/factory\" run-module'"
|
|
""
|
|
"xlogo"
|
|
}
|
|
|
|
"The purpose of running xlogo at the end is to keep the xsession "
|
|
"script from exiting. Usually you can just run the window manager on "
|
|
"the last line but in this case screen takes Factory into the "
|
|
"background. To end the X session, close the xlogo window."
|
|
|
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
{ $heading "Connect to Factory" }
|
|
|
|
{ $code "$ telnet localhost 9001" }
|
|
|
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
{ $heading "Recovering from a crash" }
|
|
|
|
"Factory crashed and you need to interact with the FEP:"
|
|
|
|
{ $code "$ screen -r" }
|
|
|
|
"Exit the FEP with the 'x' key. "
|
|
|
|
"Detatch from screen (C-a d). "
|
|
|
|
"Start Factory in the detached screen:"
|
|
|
|
{ $code
|
|
"$ cd /scratch/repos/Factor"
|
|
""
|
|
"$ screen -X screen ./f -shell=tty -e='USE: factory f start-factory'"
|
|
}
|
|
|
|
"It's possible that Factory crashed but the listener is still active and Factor is not in FEP mode. In this case you can just just restart the event loop at the Factor prompt:"
|
|
|
|
{ $code "[ start-event-loop ] in-thread" }
|
|
|
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
{ $heading "The default key bindings" }
|
|
|
|
{ $table { "Key" "Action" }
|
|
{ "F12" "Menu" }
|
|
{ "CTRL-ALT-LEFT" "Previous workspace" }
|
|
{ "CTRL-ALT-RIGHT" "Next workspace" } }
|
|
|
|
"Drag with mouse-1 in a frame to move a window. "
|
|
|
|
"Drag with mouse-3 in a frame to resize a window by specifying the "
|
|
"lower right hand corner."
|
|
|
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
{ $heading "Customization" }
|
|
|
|
"Copy " { $snippet "libs/wm/factory-rc" } " to "
|
|
{ $snippet "~/.factory-rc" } " and edit it to your liking."
|
|
|
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
; |