1 @node Getting Started, Primitives, Overview, Top
2 @comment node-name, next, previous, up
3 @chapter Getting Started
6 You must provide some effort in way to make XWEM usable. Configuring
7 XWEM splits to three tasks:
10 * Configuring X:: How to configure X server.
11 * Configuring Emacs:: What you need in ~/.emacs to run XWEM.
12 * Configuring XWEM:: How to configure XWEM.
15 @node Configuring X, Configuring Emacs, Getting Started, Getting Started
16 @comment node-name, next, previous, up
17 @section Configuring X
20 First off all we need to configure keyboard to obtain control over XWEM.
21 XWEM expects that there is Hyper key setuped on your keyboard and that
22 Hyper key acts as modifier(i.e. in X's modifiers list). Hyper key for
23 XWEM is like Meta key for XEmacs. All default commands in XWEM uses
24 Hyper. But it is not necessary to use Hyper key, but recommended. You
25 can control which modifier to use by @code{xwem-hyper-modifier} variable
26 which default value is @code{hyper}.
28 There is two ways to configure Hyper key. One is using XKB X extension
29 and the other(easier) is using xmodmap application. Find a key(keycode)
30 to which you want bind Hyper, using @code{xev}@footnote{xev utility
31 ships with X distribution and used to report X events and its
32 description to user.} utility. Consider it is value 109.
35 $ xmodmap -e "keycode 109 = Hyper_R"
36 $ xmodmap -e "add mod3 = Hyper_R"
39 or add following to your @code{~/.Xmodmap}(or whatever):
46 after that @code{xev} should report that keycode 109 have corresponded
49 Now it is time to modify a little your @code{~/.xinitrc}. Who will be
50 your window manager? Of course your guess about XEmacs is correct. So
51 instead of running for example afterstep or fvwm you need to run XEmacs.
52 Part of your @code{~/.xinitrc} should looks like:
59 You should run @code{xinit}, or @code{startx} with -tcp-listen option,
60 otherwise xlib will not be able to connect to X server.
62 @node Configuring Emacs, Configuring XWEM, Configuring X, Getting Started
63 @comment node-name, next, previous, up
64 @section Configuring Emacs
67 Now we are almost ready to run XWEM. Add something like
69 (add-to-list 'load-path (expand-file-name "/path/to/xwem"))
73 at the end of your @code{~/.emacs}
75 TODO: write how you need to configure emacs, i.e. what to need to add in
78 @node Configuring XWEM, , Configuring Emacs, Getting Started
79 @comment node-name, next, previous, up
80 @section Configuring XWEM
83 You can configure any of XWEM's subroutines using
84 @code{~/.xwem/xwemrc.el} file. It will be evaluated at the top of
85 @var{xwem-init} function.
87 Here is example of what you can do:
90 (setq X-use-queryfont t) ; speeds up things
92 ;; We can recreate emacs frame, so there is no problems in deleting
94 (setq allow-deletion-of-last-visible-frame t)
96 (setq special-display-frame-plist
97 (plist-put special-display-frame-plist 'height 50))
99 (defadvice kill-buffer (before delete-dedicated-frame activate)
100 "Work around dedicated frame problem."
101 (let ((frame (buffer-dedicated-frame
102 (get-buffer (or (ad-get-arg 0) (current-buffer))))))
104 (delete-frame frame))))
107 ;(setq xwem-icons-dir "~/prog/emacs/xwem/icons")
108 (pushnew '([".*freebsd.*" "xterm" "XTerm"] . "mini-daemon.xpm")
110 (pushnew '([".*xwem.*" "emacs" "Emacs"] . "mini-xwem.xpm")
113 ;;; Customize XWEM variables
114 (setq xwem-minibuffer-active-border-color "cyan2"
115 xwem-default-focus-mode 'follow-mouse
116 xwem-edmacro-can-edit-nonmacro t
119 (define-abbrev-table 'xwem-launcher-abbrev-table
120 '(("gterm" "xterm -fg green -hc green4" nil 0)
121 ("gfterm" "xterm -fg green -hc green4 -fn fixed" nil 0)
122 ("aqterm" "xterm -fg aquamarine -hc aquamarine4" nil 0)
123 ("aqfterm" "xterm -fg aqua -hc aqua4 -fn fixed" nil 0)
124 ("gsterm" "xterm -fg darkseagreen1 -hc darkseagreen4" nil 0)
126 "xterm -fg darkseagreen1 -hc darkseagreen4 -fn fixed" nil 0)
127 ("oterm" "xterm -fg OliveDrab1 -hc OliveDrab4" nil 0)
128 ("ofterm" "xterm -fg OliveDrab1 -hc OliveDrab4 -fn fixed" nil 0)
129 ("orterm" "xterm -fg orange -hc orange4" nil 0)
130 ("orfterm" "xterm -fg orange -hc orange4 -fn fixed" nil 0)
133 ;; Add sounds, beeping type
134 (xwem-sound-load-default t)
138 ;; Buqis like client switcher
141 ;; `display-time' like stuff in system tray
142 ;(add-hook 'xwem-after-init-hook 'xwem-time)
144 ;; H-6, H-x /, H-x j bindings
145 (require 'xwem-register)
146 (xwem-register-install-bindings)
148 ;; Nice frame indicator
149 (autoload 'xwem-framei-init "xwem-framei")
150 (add-hook 'xwem-after-init-hook 'xwem-framei-init)
152 ;; Making holer in frames
153 (require 'xwem-holer)
154 (define-key xwem-global-map (xwem-kbd "H-x h") 'xwem-holer-prefix)
157 (require 'xwem-rooter)
158 (xwem-rooter-add-client 'xwem-xclock-onroot "^xclock$")
159 (xwem-rooter-add-client 'xwem-gkrellm-onroot "^gkrellm$")
162 (require 'xwem-worklog)
163 (define-key xwem-global-map (xwem-kbd "H-w") 'xwem-worklog-prefix)
165 ;; Fast frame switcher
166 (defun my-xwem-switch-frame (key)
167 "To be used by H-C-<digit> bindings."
168 (interactive (list (event-key xwem-last-event)))
169 (xwem-frame-switch-nth (- (char-to-int key) 48)))
171 (define-key xwem-global-map (xwem-kbd "H-C-0") 'my-xwem-switch-frame)
172 (define-key xwem-global-map (xwem-kbd "H-C-1") 'my-xwem-switch-frame)
173 (define-key xwem-global-map (xwem-kbd "H-C-2") 'my-xwem-switch-frame)
174 (define-key xwem-global-map (xwem-kbd "H-C-3") 'my-xwem-switch-frame)
175 (define-key xwem-global-map (xwem-kbd "H-C-4") 'my-xwem-switch-frame)
176 (define-key xwem-global-map (xwem-kbd "H-C-5") 'my-xwem-switch-frame)
177 (define-key xwem-global-map (xwem-kbd "H-C-6") 'my-xwem-switch-frame)
178 (define-key xwem-global-map (xwem-kbd "H-C-7") 'my-xwem-switch-frame)
179 (define-key xwem-global-map (xwem-kbd "H-C-8") 'my-xwem-switch-frame)
180 (define-key xwem-global-map (xwem-kbd "H-C-9") 'my-xwem-switch-frame)