https://wiki.archlinux.org/api.php?action=feedcontributions&user=Theomachos&feedformat=atomArchWiki - User contributions [en]2024-03-29T15:45:12ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Stumpwm&diff=253286Stumpwm2013-04-07T20:29:47Z<p>Theomachos: /* With Quicklisp (recommended) */</p>
<hr />
<div>[[Category:Tiling WMs]]<br />
StumpWM is a tiling, full-screen window manager written entirely in<br />
Common Lisp. The successor to the cult classic [[Ratpoison]] window<br />
manager ("GNU Screen to the power of X"), StumpWM adds all the<br />
flexibility and hackability of common lisp, allowing the user to make<br />
modifications to the source of the window manager even while it is<br />
running.<br />
<br />
From the [http://www.nongnu.org/stumpwm/ StumpWM homepage]:<br />
<br />
:''If you're tired of flipping through themes like channel-surfing, and going from one perfect-except-for-just-one-thing window manager to another even-more-broken-in-some-other-way then perhaps Stumpwm can help.''<br />
:''Stumpwm attempts to be customizable yet visually minimal. There are no window decorations, no icons, and no buttons. It does have various hooks to attach your personal customizations, and variables to tweak.''<br />
<br />
Want to see it in action? A StumpWM user created<br />
a [http://www.archive.org/details/TheStumpWMExperience video].<br />
<br />
== Installation ==<br />
<br />
=== With SBCL (recommended, will run faster) ===<br />
<br />
==== With Quicklisp (recommended) ====<br />
<br />
{{Box RED|WARNING:|Only use root to install SBCL and, if you want to, run "make install".}}<br />
<br />
# Install SBCL<br />
#* {{Ic|pacman -S sbcl}}<br />
# Get Quicklisp at [http://beta.quicklisp.org the Quicklisp website]<br />
#* {{Ic|curl -O http://beta.quicklisp.org/quicklisp.lisp}}<br />
# Load Quicklisp with SBCL<br />
#* {{Ic|sbcl --load quicklisp.lisp}}<br />
# Install Quicklisp<br />
#* {{Ic|(quicklisp-quickstart:install)}} or {{Ic|(quicklisp-quickstart:install :path "path/of/your/choice")}}<br />
# Add it to your SBCL init file<br />
#* {{Ic|(ql:add-to-init-file)}}<br />
# Check for updates of Quicklisp (not needed if you have just downloaded it)<br />
#* {{Ic|(ql:update-client)}}<br />
# Check for updates on Quicklisp<br />
#* {{Ic|(ql:update-all-dists)}}<br />
# Install CLX and CL-PPCRE<br />
#* {{Ic|(ql:quickload "clx")}}<br />
#* {{Ic|(ql:quickload "cl-ppcre")}}<br />
# Quit SBCL with (quit)<br />
# Get the git version of StumpWM<br />
#* {{Ic|git clone git://github.com/sabetts/stumpwm.git}}<br />
# Get into the stumpwm folder and start compiling<br />
#* {{Ic|cd stumpwm && ./autogen.sh && ./configure && make}}<br />
#* You can optionally run "make install" as root.<br />
# Put the StumpWM binary path into your .xinit and have fun! :)<br />
<br />
''Optional: Install slime/swank for nonstop real-time hacking'':<br />
# Install swank server<br />
#* {{Ic|(ql:quickload "swank")}}<br />
# Install slime-helper<br />
#* {{Ic|(ql:quickload "quicklisp-slime-helper")}}<br />
# Paste the following into your dot-emacs<br />
#* {{Ic|(load (expand-file-name "/path/to/slime-helper.el"))}}<br />
#* {{Ic|(setq inferior-lisp-program "sbcl")}}<br />
# Now put the following into your .stumpwmrc or just eval during your stumpwm-session<br />
#* {{Ic|(require 'swank)}}<br />
#* {{Ic|(swank:create-server)}}<br />
# Connect Emacs/Slime to your stumpwm-session using<br />
#* {{Ic| M-x slime-connect}}<br />
<br />
==== With AUR ====<br />
# Install SBCL<br />
#* {{Ic|pacman -S sbcl}}<br />
# Install [https://aur.archlinux.org/packages.php?do_Details=1&ID=12084&O=0&L=0&C=0&K=clx&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd clx] from AUR.<br />
#* If you really do not want to use a PKGBUILD here, you can also use asdf-install to install clx.<br />
# Install [https://aur.archlinux.org/packages.php?do_Details=1&ID=14549&O=0&L=0&C=0&K=cl-ppcre&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd cl-ppcre]<br />
#* Again, this can be installed with asdf-install if you really do not like PKGBUILDs.<br />
# Install git<br />
#* {{Ic|pacman -S git}}<br />
# Install [https://aur.archlinux.org/packages.php?ID=12996 stumpwm] from AUR.<br />
#* Alternately, you can check it out directly from the git repo., as described on the [ homepage]. Read the directions and check the StumpWM wiki for compilation instructions.<br />
<br />
=== With Clisp ===<br />
<br />
# Get and create these packages from AUR in the following order making sure to have makepkg install dependencies first (makepkg -s):<br />
#* [https://aur.archlinux.org/packages.php?ID=15188 clisp-new-clx]<br />
#* [https://aur.archlinux.org/packages.php?ID=18800 cl-asdf]<br />
#* [https://aur.archlinux.org/packages.php?ID=14549 cl-ppcre]. To get this to install, I had to comment out the dependency line in the PKGBUILD.<br />
#* [https://aur.archlinux.org/packages.php?ID=12996 stumpwm-git]. Alternatively, download the latest version from the web site and follow the install instructions. The executable can stay in your home directory tree.<br />
# Make sure to install each one (sudo pacman -U name.pkg.tar.gz) before installing the next.<br />
# See the [[Makepkg]] article for details on downloading and installing from AUR (compiling/creating package and installing).<br />
<br />
Also, look at [https://bbs.archlinux.org/viewtopic.php?pid=543537#p543537 this post] if you run into troubles.<br />
<br />
== Documentation and Support ==<br />
<br />
If you installed StumpWM by hand or still have the source lying<br />
around, there is a TeXInfo manual.<br />
<br />
There is also a [http://stumpwm.svkt.org/cgi-bin/wiki.pl wiki], an IRC channel<br />
(#stumpwm) on Freenode, and a mailing list. For more information, of<br />
course, see [http://www.nongnu.org/stumpwm/ the project's website].<br />
<br />
== Tweaking ==<br />
<br />
See the wiki for a variety of useful tweaks for your .stumpwmrc.<br />
<br />
If you are an emacs user, you will find an emacs minor mode for editing<br />
StumpWM files (and interfacing with the program {{Ic|stumpish}}, but<br />
more on that below) in the contrib/ directory of the StumpWM source.<br />
If you are using clisp, this file can also be found in<br />
{{Ic|/usr/share/stumpwm/}}.<br />
<br />
{{Ic|stumpish}} is the STUMP window manager Interactive SHell. It is<br />
a program that allows the user to interact with StumpWM while it is<br />
running, from the comfort of a terminal (or using the emacs mode). It<br />
can be found in the contrib/ directory of the StumpWM source. If you<br />
use clisp, this file can also be found in {{Ic|/usr/bin/}}.<br />
<br />
== Troubleshooting ==<br />
If you cannot start stumpwm and get<br />
debugger invoked on a SB-INT:SIMPLE-PARSE-ERROR in thread<br />
#:<br />
no non-whitespace characters in string "".<br />
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.<br />
(no restarts: If you did not do this on purpose, please report it as a bug.)<br />
(PARSE-INTEGER "" :START 0 :END NIL :RADIX 10 :JUNK-ALLOWED NIL)<br />
<br />
In the REPL,It can be solved by delete the .Xauthority in your home diretory.<br />
You can refer it at[https://github.com/sabetts/stumpwm/issues/1 Issue on github]</div>Theomachoshttps://wiki.archlinux.org/index.php?title=Emacs&diff=214321Emacs2012-07-23T20:58:49Z<p>Theomachos: /* Resources */</p>
<hr />
<div>[[Category:Text editors]]<br />
[[sr:Emacs]]<br />
{{Article summary start|Summary}}<br />
{{Article summary text|Tutorial on acquiring and using the Emacs text editor.}}<br />
{{Article summary end}}<br />
<br />
[[Wikipedia:Emacs|Emacs]] is the extensible, customizable, self-documenting real-time display editor. At the core of Emacs lies an [[Wikipedia:Emacs Lisp|Emacs Lisp]] interpreter, the language in which the majority of Emacs' built-in functionality and extensions are implemented. GTK is the default X toolkit used as of GNU Emacs 22, though it functions equally well within a CLI environment. The text-editing capabilities of Emacs are often compared to that of [[vim]].<br />
<br />
== Installation ==<br />
Emacs comes in several variants (sometimes referred to as ''emacsen''). The most common of these is [http://www.gnu.org/software/emacs/ GNU Emacs].<br />
<br />
[[pacman|Install]] {{Pkg|emacs}}, available in the [[Official Repositories]].<br />
<br />
Another common variant is {{Pkg|xemacs}}.<br />
<br />
== Quick Start ==<br />
Although Emacs is complex, it will not take long to begin to understand the benefits which the level of customization and extensibility bring. Furthermore, the comprehensive variety of extensions already available allows it to be transformed into a powerful environment for almost any form of text-editing.<br />
<br />
Emacs has an excellent built-in tutorial which can be accessed by clicking the first link on the splash screen; by selecting ''Help->Emacs Tutorial'' from the menu or by pressing 'F1' followed by 't'. This page is designed to be an additional resource for getting started with Emacs.<br />
<br />
Emacs also includes a set of reference cards, useful for beginners and experts alike, see {{ic|/usr/share/emacs/<version>/etc/refcards/}} (substitute <version> for your version of emacs).<br />
<br />
===Running Emacs===<br />
====Normal way====<br />
To start Emacs run:<br />
<br />
$ emacs<br />
<br />
or, to use it from the console:<br />
<br />
$ emacs -nw<br />
<br />
A file name can also be provided to open that file immediately:<br />
<br />
$ emacs filename.txt<br />
<br />
====As a daemon====<br />
Emacs can take some time to start since it has to load the .emacs file each time. Since version 23, Emacs is capable to run as a daemon to which users can connect. To run Emacs as a daemon:<br />
<br />
$ emacs --daemon<br />
<br />
You are likely to start the daemon at startup time and to connect a window to the daemon. Besides, it is possible to connect ''both'' graphical and console clients to the daemon at the same time and make the GUI to start quickly.<br />
<br />
If you want to connect to the daemon simply use the folowing command (note that it will start a graphical client if called in a graphical environment or a console client if called in a console like a tty):<br />
<br />
$ emacsclient<br />
<br />
If you still want a console client no matter you are in a graphical environment then use:<br />
<br />
$ emacsclient -t<br />
<br />
Furthermore, you can add the {{ic|-a ""}} parameter.<br />
Now, the first time you call the command, it will start emacs as a daemon, so that it remains running in background to improve startup time for future calls (and to remember buffers as well).<br />
<br />
In the end, you could use the following alias:<br />
<br />
$ alias emacs='emacsclient -t -a ""'<br />
<br />
<br />
----<br />
<br />
<br />
With xfce, if you want to tell it to use emacsclient -c instead of emacs %f when opening a new file, you can change your /usr/share/applications/emacs.desktop and change the line<br />
<br />
$ Exec=emacs %f<br />
<br />
To<br />
<br />
$ Exec=emacsclient -c<br />
<br />
This way, a client will be called each time you open up a file and so be very fast!<br />
<br />
===Basic terminology and convention===<br />
Emacs uses some terminology and conventions which may seem unusual at first and will be introduced where appropriate. However, there is some terminology which should be introduced before-hand, as it is fundamental to working with Emacs.<br />
<br />
The one piece of terminology which must be introduced early is the concept of ''buffers''. A buffer is a representation of data within Emacs. For example, when a file is opened in Emacs, that file is read from disk and its contents stored in a buffer, which allows it to be edited and saved back to disk later. Buffers are not limited to text, and can also contain images and widgets. Work is in progress to allow buffers to even display applications! Another way to think of it: data available on disk is referred to as a 'file', whereas data available in Emacs is referred to as a 'buffer'.<br />
<br />
The convention for key sequences in Emacs may be unfamiliar. Namely:<br />
<br />
'''C-x''' refers to Control-x<br />
<br />
'''M-x''' refers to Meta-x<br />
<br />
{{Note|'Meta' corresponds to the Alt key in most cases. Alternatively, the Esc key can be used.}}<br />
<br />
For example, to exit Emacs use the following key sequence: '''C-x C-c'''. This can be read as "Hold Control and press 'x'. Release. Hold Control and press 'c'." Although Emacs provides a menu bar, it is recommended practise to focus on learning the key sequences. This guide will refer to keybindings with the convention used in Emacs from now on.<br />
<br />
===Movement===<br />
Cursor movement is very similar to other graphical editors. The mouse and arrow keys can be used to change the position of the cursor (referred to as ''point'' in Emacs). The standard movement commands performed by the arrow keys also have more accessible bindings in Emacs. To move forward one character, use '''C-f''' and to move one character backward, '''C-b'''. '''C-n''' and '''C-p''' can be used to move to the next and previous lines, respectively. Again, it is generally recommended to use these key-sequences in preference to the mouse and/or arrow keys.<br />
<br />
As might be expected, Emacs provides more advanced movement commands, including moving by word and sentence. '''M-f''' moves forward one word and '''M-b''' will move point one word backward. Similarly, '''M-e''' moves point one sentence forward and '''M-a''' one sentence backward.<br />
<br />
Until now, all of the movement commands introduced have been relative to point. '''M-<''' can be used to move point to the beginning of the buffer, with its counterpart, '''M->''', moving to the end of the buffer. To move point to a specific line number, use '''M-g g'''. '''M-g g''' will prompt for the desired line number. Also, to move to the start or end of the current line, use '''C-a''' or '''C-e''', respectively.<br />
<br />
{{Note|Keybindings for these commands, or indeed any command, may differ ''slightly'' depending on which modes are currently active. However, it is unusual for the replacement command not to provide equivalent functionality. See [[Emacs#Modes|Modes]] for more information.}}<br />
<br />
===Files and buffers===<br />
Emacs provides a series of commands to act upon files, the most common of which will be detailed here. '''C-x C-f''' is used to open a file (this command is called 'find-file' in Emacs). Should the file specified not exist, Emacs will open an empty buffer. Saving a buffer will create the file with the buffer's contents. '''C-x C-s''' can be used to save a buffer. To save a buffer with a different filename, use '''C-x C-w''' (this is a mnemonic for the command 'write-file'), which will prompt for the new filename before writing it to disk. It is also possible to ensure all buffers are saved with '''C-x s''', which, should a buffer be modified since its last save, a prompt will be displayed asking which action to take.<br />
<br />
{{Note|'''C-x C-f''' does not read the file from disk again if a buffer corresponding to the file is still opened. To re-read the file from disk, kill the buffer ('''C-x k''') prior to '''C-x C-f''' or use '''M-x revert-buffer'''.}}<br />
<br />
Many interactive commands such as "find-file" or "write-file" prompt for input in the bottom-most line of the Emacs window. This line is referred to as the ''minibuffer''. The minibuffer supports many basic editing commands as well as tab-completion similar to that which is available in many *nix shells. '''<TAB>''' can be pressed twice in succession to display a list of completions, and if desired, the mouse can be also be used to select a completion from that list. Completion in the minibuffer is available for many forms of input including commands and filenames.<br />
<br />
The minibuffer also provides a history feature. The previous items entered for a command can be recalled using the '''Up Arrow''' or '''C-p'''.<br />
<br />
To exit the minibuffer at any time, press '''C-g'''.<br />
<br />
After opening several files, a way to switch between them is needed. Opening a file corresponding to a buffer already available in Emacs, will cause Emacs to switch to that buffer. But this is not the most effective way. Emacs provides '''C-x b''', which prompts for the new buffer to be displayed (tab-completion is available here). By entering the name of a buffer which does not exist, a new buffer with that name will be created.<br />
<br />
{{Note|To switch to the previous buffer use '''C-x b <RET>''', as the previous buffer is the default.}}<br />
<br />
A list of all open buffers can be displayed using '''C-x C-b'''. Should a buffer no longer be required, it can be removed with '''C-x k'''.<br />
<br />
===Editing===<br />
Many editing commands exist within Emacs. Perhaps the most important command which has not yet been introduced is 'undo', which can be performed via '''C-_''' or '''C-/'''. Movement commands generally also have a corresponding delete command. For example, '''M-<backspace>''' can be used to delete a word backwards, and '''M-d''' to delete a word forwards. To delete to the end of the line, or the end of the sentence, use '''C-k''' or '''M-k''', respectively.<br />
<br />
It is a rule-of-thumb that no line be allowed to exceed 80 characters. This aids readability, especially in cases where the line wraps at the edge of a window. Automatically inserting (or removing) line separator(s) is known as ''filling'' in Emacs. A paragraph can be filled using '''M-q'''.<br />
<br />
Characters and words can be transposed using '''C-t''' and '''M-t''', respectively. For example: <code>Hello World!</code> → <code>World! Hello</code><br />
<br />
The case of words is also readily adjustable. '''M-l''' downcases a word from point (<code>HELLO</code> → <code>hello</code>); '''M-u''' upcases a word from point (<code>hello</code> → <code>HELLO</code>) and '''M-c''' capitalizes the first character of a word from point while downcasing the remainder (<code>hElLo</code> → <code>Hello</code>).<br />
<br />
===Killing, yanking and regions===<br />
A region is a section of text between two positions. One of those positions is referred to as ''mark'', and the other is point. '''C-<SPC>''' is used to set the position of mark, after which point can be moved to create a region. Within GNU Emacs 23.1 onwards, this region is visible by default. There are a number of commands which act upon regions, among the most commonly used are ''killing'' commands.<br />
<br />
In Emacs, cut and paste are referred to as ''kill'' and ''yank'', respectively. Many commands which delete more than one character (including many of those in the above section, such as '''C-k''' and '''M-d''') actually cut the text and append it to what is known as the ''kill-ring''. The kill-ring is simply a list of killed text. The kill-ring stores up to the last 60 kills by default. Successive kills are concatenated and stored at the head of the list.<br />
<br />
'''C-w''' and '''M-w''' can be used to kill and copy a region, respectively.<br />
<br />
To insert killed text into a buffer (known as 'yanking'), use '''C-y'''. '''C-y''' can be used multiple times in succession to yank text repeatedly. As mentioned, previous kills are stored in a list, however '''C-y''' only retrieves the first of them. The earlier kills can be accessed via '''M-y'''. This will remove the text inserted by 'yank' initially, replacing it with the text killed earlier. '''M-y''' must be used immediately following '''C-y''' and can be used in many times succession to cycle through the kill-ring.<br />
<br />
===Search and replace===<br />
Searching for a string is common practise in text-editing. This can be performed using '''C-s''' (to search forward) or '''C-r''' (to search backward). These commands prompt for the string for which to search. Searching is performed incrementally, and so it will match the next (or previous) occurrence as you type. To move to the next or previous match, press '''C-s''' or '''C-r''' again, respectively. Once a match has been found, '''<RET>''' can be used to end the search. Alternatively, should you wish to return to the location you initiated the search, use '''C-g'''.<br />
<br />
Once a search is completed (i.e., was not aborted with '''C-g''' or similar), the string which was searched for will be the default for any following search. To make use of this, press '''C-s C-s''' or '''C-r C-r''' to search forward or backward again, respectively.<br />
<br />
Regular Expression searches behave identically to the searching described above except for the command to initiate the search. Use '''C-M-s''' or '''C-M-r''' to initiate a regexp search forward or backward, respectively. Once a Regular Expression search has commenced, '''C-s''' and '''C-r''' can be used to search forward or backward, just as with string searches.<br />
<br />
In addition to searching, it is also possible to perform string and regular expression replacement (via '''M-%''' and '''C-M-%''', respectively). Prompts are provided for both the initial and replacement text, and then another prompt for the action to perform on the highlighted match. Although many options are available (the full list is available by pressing '''?'''), the most commonly used are '''y''', to perform replacement, '''n''', to skip this match, and '''!''' to replace this, and all following matches.<br />
<br />
===Indentation and prefix arguments===<br />
Indentation is usually performed with either '''<TAB>''', to indent a single line, or with '''C-M-\''', to indent a region.<br />
<br />
Exactly how text is indented usually depends on the ''major-mode'' which is active. Major-modes often define indentation styles specialising in indenting a certain type of text. (See [[Emacs#Modes|Modes]] for more information.)<br />
<br />
In some cases, a suitable major-mode may not exist for a file type, in which case, manual indentation may be necessary. Create a region (see [[Emacs#Killing, yanking and regions|Killing, yanking and regions]]) then perform indentation with '''C-u <n> C-x <TAB>''' (where '<n>' is the number of columns which the text within the region should be indented). For example:<br />
<br />
Increase the region's indentation by four columns:<br />
<br />
C-u 4 C-x <TAB><br />
<br />
Decrease the region's indentation by two columns.<br />
<br />
C-u -2 C-x <TAB><br />
<br />
{{Note|The trick behind this is '''C-u''', which corresponds to the 'universal-argument' command. Providing a 'universal-argument' is a way to provide more information to a command (this information is referred to as a 'prefix argument'). In this case, we provided the amount of indentation desired to the command invoked by '''C-x <TAB>'''. Without providing an argument, '''C-x <TAB>''' will only increase indentation by 1 column.}}<br />
<br />
===Windows and frames===<br />
Emacs is designed for convenient editing of many files at a time. This is achieved by dividing the Emacs interface into three levels. Namely, buffers, which have already been introduced, as well as ''windows'' and ''frames''.<br />
<br />
A ''window'' is a viewport used for displaying a buffer. A window can display only one buffer at a time, however one buffer can be displayed in many windows. Beneath each window exists a ''mode-line'', which displays information for that buffer.<br />
<br />
A ''frame'' is an Emacs "window" (in standard terminology. i.e., 'window' in the sense of the modern desktop paradigm) which contains a title bar, menu bar and one or more 'windows' (in Emacs terminology. i.e., the above definition of 'window').<br />
<br />
From now on the definition of these terms as they exist in Emacs will be used.<br />
<br />
To split the window vertically or horizontally, use '''C-x 2''' or '''C-x 3''', respectively. This has the effect of creating another window in the current frame. To cycle between multiple windows, use '''C-x o'''.<br />
<br />
The opposite of splitting a window, is deleting it. To delete the current window, use '''C-x 0''' and '''C-x 1''' to delete all windows except the current.<br />
<br />
As with windows, it is also possible to create and delete frames. '''C-x 5 2''' creates a frame. With '''C-x 5 0''' to delete the current frame and '''C-x 5 1''' to delete all except the current frame.<br />
<br />
{{Note|These commands do not affect buffers. For example, deleting a window does not kill the buffer it displays.}}<br />
<br />
===Getting help===<br />
Emacs is self-documenting by design. As such, a great deal of information is available to determine the name of a specific command or its keybinding, for example. The following is a listing of some of the most helpful of these:<br />
<br />
'''C-h t''' Start the Emacs tutorial<br />
<br />
'''C-h b''' List all active keybindings<br />
<br />
'''C-h k''' Find which command a key is bound to<br />
<br />
'''C-h w''' Find which key(s) a command is bound to<br />
<br />
'''C-h a''' Find a command matching a description<br />
<br />
'''C-h m''' Display information regarding the currently active modes<br />
<br />
'''C-h f''' Describe the given function<br />
<br />
===Modes===<br />
An Emacs mode is an extension written in Emacs Lisp that controls the behaviour of the buffer it is attached to. Usually it provides indentation, syntax highlighting and keybindings for editing that form of text. Sophisticated modes can turn Emacs into a full-fledged IDE (Integrated Development Environment). Emacs will generally use a file's extension to determine which mode should be loaded.<br />
<br />
Useful modes for editing shell scripts are sh-mode, line-number-mode and column-number-mode. They can be used in parallel and are invoked by:<br />
<br />
'''M-x sh-mode <RET>'''<br />
<br />
'''M-x column-number-mode <RET>'''<br />
<br />
line-number-mode is enabled by default, though, it can be toggled on/off by issuing the command again:<br />
<br />
'''M-x line-number-mode <RET>'''<br />
<br />
sh-mode is a ''major-mode''. Major-modes adjust Emacs, and often also provide a specialised set of commands, for editing a particular type of text. Only one major-mode can be active in each buffer. In addition to syntax highlighting, and indentation support, sh-mode defines several commands to help write shell scripts. The following shows a few of those commands:<br />
<br />
'''C-c (''' Insert a function definition<br />
<br />
'''C-c C-f''' Insert a 'for' loop<br />
<br />
'''C-c TAB''' Insert an 'if' statement<br />
<br />
'''C-c C-w''' Insert a 'while' loop<br />
<br />
'''C-c C-l''' Insert an indexed loop from 1 to n<br />
<br />
'line-number-mode' and 'column-number-mode', are ''minor-modes''. Minor-modes can be used to extend a major-mode and any number of minor-modes can be enabled at once.<br />
<br />
==Tips and tricks==<br />
While the previous sections has given an overview of the basic editing commands available, it has not given an indication of the possibilities of Emacs. This section will cover some more advanced techniques and functionality.<br />
<br />
===TRAMP===<br />
TRAMP (Transparent Remote Access, Multiple Protocols) is an extension which, as its name suggests, provides transparent access to remote files across a number of protocols. When prompted for a filename, entering a specific form will invoke TRAMP. Some examples:<br />
<br />
To prompt for the root password before opening /etc/hosts with root permissions:<br />
<br />
C-x C-f /su::/etc/hosts<br />
<br />
To connect to 'myhost' as 'myuser' via SSH and open the file ~/example.txt:<br />
<br />
C-x C-f /ssh:myuser@myhost:~/example.txt<br />
<br />
The path for TRAMP is typically of the form '/[protocol]:[[user@]host]:<file>'. TRAMP supports much more than the examples above might indicate. For more information refer to the TRAMP info manual, which is distributed with Emacs.<br />
<br />
===Keyboard macros and registers===<br />
This section will provide a practical demonstration of the use of a couple of more powerful editing features. Namely, ''keyboard macros'' and ''registers''.<br />
<br />
The aim will be to produce a listing of a series of characters and their corresponding position in this list. While it is possible to format each of them by hand, this would be slow and error-prone. Alternatively, some of Emacs' more powerful editing functionality could be leveraged. Before describing a solution, some details behind the techniques which will be used follow.<br />
<br />
The first feature which will be introduced is ''registers''. Registers are used to store and retrieve a variety of data types ranging from numbers to window configurations. Each register is given a name of a single character: this character is used to access the register.<br />
<br />
The other which will be demonstrated is ''keyboard macros''. A keyboard macro stores a sequence of commands so they can be easily repeated later. These changes will now be performed step-by-step.<br />
<br />
Starting with a buffer containing our set of characters:<br />
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz<br />
<br />
Prepare a register by invoking the `number-to-register' command ('''C-x r n''') then storing the number '0' in register 'k':<br />
<br />
C-x r n k<br />
<br />
With point at the beginning of the buffer, start a keyboard macro ('''C-x (''') and begin to format the characters:<br />
<br />
C-x ( C-f M-4 .<br />
<br />
Insert ('''C-x r i''') and increment ('''C-x r +''') the register 'k'. The prefix argument ('''C-u''') is used to leave point positioned after the inserted text:<br />
<br />
C-u C-x r i k C-x r + k<br />
<br />
Complete the formatting by inserting a newline. Emacs can then repeat that process, beginning from the point where we started defining the keyboard macro, for the rest of the characters. '''C-x e''' completes then invokes the keyboard macro. The prefix argument, '''M-0''', causes the macro to repeat until it comes across an error. In this case it aborts once it reaches the end of the buffer.<br />
<br />
<RET> M-0 C-x e<br />
<br />
The result:<br />
<br />
A....0<br />
B....1<br />
C....2<br />
[...]<br />
x....49<br />
y....50<br />
z....51<br />
<br />
===Regular expressions===<br />
From the Emacs Manual: "A regular expression, or ''regexp'' for short, is a pattern that denotes a (possibly infinite) set of strings." This section will not go into any detail regarding regular expressions themselves (as there is simply too much to cover). It will however provide a quick demonstration of their power. See [http://www.gnu.org/software/emacs/manual/html_node/elisp/Regular-Expressions.html#Regular-Expressions Regular Expressions] section in the Emacs Manual for further reading.<br />
<br />
Given the same scenario presented above: A list of characters which are to be formatted to represent their respective position in the list. (see [[Emacs#Keyboard macros and registers|Keyboard macros and registers]]). Again, starting with a buffer containing.<br />
<br />
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz<br />
<br />
At the beginning of the buffer, use '''C-M-%''' (if the key-sequence is difficult to perform, it may be more comfortable to use '''M-x query-replace-regexp'''). At the prompt:<br />
\(.\)<br />
which simply matches one character. Then, when prompted for the replacement:<br />
\1....\#^J<br />
{{Note|'^J' represents where a newline should be placed, it should not be entered into the prompt. The newline must instead be inserted literally using '''C-q C-j'''.}}<br />
The replacement expression reads: "Insert the matched text between the first set of parentheses (in this case, a single character), followed by 4 periods then insert an automatically incremented number followed by a newline.<br />
<br />
Finally, press '''!''' to apply this across the entire buffer. All of the formatting that was performed in the previous section was performed with a single regexp replacement.<br />
<br />
===Customization===<br />
Emacs can configured by editing '~/.emacs' or using '''M-x customize'''. This section will focus on editing ~/.emacs by hand, and provide some example customizations to demonstrate commonly-configured aspects of Emacs. The customize command provides a simple interface to make adjustments, though it may become restricting as you grow more familiar with Emacs.<br />
<br />
All of the examples here can be performed while Emacs is running. To evaluate the expression within Emacs, use:<br />
<br />
'''C-M-x''' with point anywhere within the expression.<br />
<br />
or<br />
<br />
'''C-x C-e''' with point following the last ')'<br />
<br />
For some users, typing 'yes' and 'no' in prompts can quickly become tiring. To instead use the 'y' and 'n' keys at these prompts:<br />
<br />
(defalias 'yes-or-no-p 'y-or-n-p)<br />
<br />
To stop the cursor blinking, use:<br />
<br />
(blink-cursor-mode -1)<br />
<br />
Similarly, to enable column-number-mode, as discussed in the previous section:<br />
<br />
(column-number-mode 1)<br />
<br />
The similarities between the previous two commands are not a coincidence: blink-cursor-mode and column-number-mode are both minor-modes. As a rule, minor-modes can be enabled given positive argument or disabled with a negative argument. Should the argument be omitted, the minor-mode will be toggled on/off.<br />
<br />
Here are some more examples of minor-modes. The following will disable the scroll bars, menu-bar and tool-bar, respectively.<br />
<br />
(scroll-bar-mode -1)<br />
(menu-bar-mode -1)<br />
(tool-bar-mode -1)<br />
<br />
The variable, 'auto-mode-alist', can be modified to change the major-mode used by default for certain file names. The following example will make the default major-mode for '.tut' and '.req' files 'text-mode'.<br />
<br />
(setq auto-mode-alist<br />
(append<br />
'(("\\.tut$" . text-mode)<br />
("\\.req$" . text-mode))<br />
auto-mode-alist))<br />
<br />
Settings can also be applied on a per-mode basis. A common method for this is to add a function to a ''hook''. For example, to force indentation to use spaces instead of tabs, but only in text-mode:<br />
<br />
(add-hook 'text-mode-hook (lambda () (setq indent-tabs-mode nil)))<br />
<br />
Similarly, to only use spaces for indentation everywhere:<br />
<br />
(setq-default indent-tabs-mode nil)<br />
<br />
Keybindings can be adjusted in two ways. The first of which is 'define-key'. 'define-key' creates a keybinding for a command but only in one mode. The example below will make '''F8''' delete any whitespace from the end of each line of a 'text-mode' buffer:<br />
<br />
(define-key text-mode-map (kbd "<f8>") 'delete-trailing-whitespace)<br />
<br />
The other method is 'global-set-key'. This is used to bind a key to a command everywhere. To bind 'query-replace-regexp' ('''C-M-%''') to '<f7>'.<br />
<br />
(global-set-key (kbd "<f7>") 'query-replace-regexp)<br />
<br />
Binding a command to an alternate key does not replace any existing bindings. Which is to say, 'query-replace-regexp' would be bound to both '''F7''' and '''C-M-%''' after the above example.<br />
<br />
Almost anything within Emacs can be configured. Browsing through the [http://emacswiki.org/ Emacs Wiki] should give a solid place to start.<br />
<br />
=== Extensions ===<br />
<br />
While Emacs includes hundreds of modes, libraries and other extensions, there are many more available to further Emacs' capabilities. The majority of these come with instructions detailing any changes needed to be made to ~/.emacs. These instructions are generally found in the comment block at the beginning of an elisp source file, or in a README (or similar) should the extension consist of multiple source files.<br />
<br />
A number of popular extensions are available as packages in the 'community' repository, and more still are available via the [[AUR]]. The name of such packages have a 'emacs-' prefix (for example, emacs-lua-mode). In many cases, the changes which need to be made to ~/.emacs are shown during the installation of the package.<br />
<br />
Should instructions describing how to activate a specific extension not be available in the aforementioned location(s), check for a corresponding page in the [http://emacswiki.org/ Emacs Wiki], which will almost certainly provide an example configuration. The Emacs Wiki is also an excellent resource for discovering even more extensions.<br />
<br />
You can also use the [http://tromey.com/elpa/ Emacs Lisp Package Archive (ELPA)] to automatically install packages. See the website for instructions. ELPA is included with Emacs 24 (the newest version of Emacs); it is an accepted part of the Emacs ecosystem.<br />
<br />
== Troubleshooting ==<br />
<br />
===Colored output issues===<br />
By default, the Emacs shell will show raw escape sequences used to print colors. In other words, it will display strange symbols in place of the desired colored output.<br />
<br />
Including the following into {{ic|~/.emacs}} amends the problem:<br />
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)<br />
<br />
===Menus appear empty===<br />
A bug exists in GNU Emacs 23.1 (using the GTK toolkit) which may cause some menus to appear empty. This appears to be fixed in Emacs' CVS trunk. The corresponding [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=550541 Debian bug report] contains a workaround.<br />
<br />
=== Problems displaying characters in X Windows ===<br />
If when you start emacs in X windows all the characters in the main window are white boxes with black borders (the ones you see if you try to view characters for which you do not have the correct font installed), you need to install {{pkg|xorg-fonts-75dpi}} and/or {{pkg|xorg-fonts-100dpi}} and restart X windows.<br />
<br />
=== Slow startup ===<br />
Slow startup times are often caused by one of two things.<br />
<br />
To determine which it might be, run Emacs with:<br />
<br />
$ emacs -q<br />
<br />
If Emacs still starts slowly, refer to [[Emacs#Incorrect network configuration|Incorrect network configuration]]. If not, it is almost certainly a [[Emacs#Init file loads slowly|problem in your .emacs]].<br />
<br />
====Incorrect network configuration====<br />
<br />
Mistakes, particularly in /etc/hosts, will often result in a 5+ second delay when starting Emacs. Refer to '[[Configuring_network#Set_the_hostname|set the hostname]]' in the network configuration guide for information.<br />
<br />
====Init file loads slowly====<br />
<br />
A simple way to search for the cause is to comment-out (i.e., prefix lines with ';') suspect sections of your ~/.emacs (or ~/.emacs.d/init.el) then start Emacs again to see if there's any change. Keep in mind use of "require" and "load" can slow the startup down, especially when used with larger extensions. They should, as a rule, only be used when their target is either: needed once Emacs starts or provides little more than "autoloads" for an extension. Otherwise, use the 'autoload function directly. For example, instead of:<br />
<br />
(require 'anything)<br />
<br />
you might use:<br />
<br />
(autoload 'anything "anything" "Select anything" t)<br />
<br />
=== Cannot open load file: ... ===<br />
<br />
The most common cause of this error is the 'load-path' variable not including the path to the directory within which the extension is located. To solve this, add the appropriate path to the list to be searched prior to attempting to load the extension:<br />
<br />
(add-to-list 'load-path "/path/to/directory/")<br />
<br />
When attempting to use packages for extensions and Emacs has been configured with a prefix other than '/usr', the load-path will need to be updated. Place the following in ~/.emacs prior to the instructions provided by the package:<br />
<br />
(add-to-list 'load-path "/usr/share/emacs/site-lisp")<br />
<br />
If compiling Emacs by hand, keep in mind that the default prefix is '/usr/local'.<br />
<br />
== Alternatives ==<br />
<br />
There are numerous implementations of Emacs. GNU/Emacs is probably the most popular. <br><br />
Lighter Emacs compatibile alternatives can be found in Arch repositories or in [https://aur.archlinux.org/ AUR].<br />
<br />
=== mg ===<br />
<br />
mg (originally called MicroGnuEmacs) is lightweight implementation of Emacs written in C.<br />
<br />
<br />
It's possible to install mg right away from {{ic|community}}<br />
# pacman -S mg<br />
or download source from official [http://homepage.boetes.org/software/mg/ page].<br />
<br />
=== zile ===<br />
<br />
According to the offical web [https://www.gnu.org/software/zile/ page] "GNU Zile is a lightweight Emacs clone. Zile is short for Zile Is Lossy Emacs. Zile has been written to be as similar as possible to Emacs; every Emacs user should feel at home.".<br />
<br />
<br />
zile can be found in {{ic|extra}}<br />
<br />
# pacman -S zile<br />
<br />
the latest taballs can be found in official GNU [http://ftp.sh.cvut.cz/MIRRORS/gnu/pub/gnu/zile/ mirrors].<br />
<br />
=== uemacs ===<br />
<br />
uemacs is "Micro-emacs version customized by Linus Torvalds".<br />
It can be found in [https://aur.archlinux.org/ AUR] as [https://aur.archlinux.org/packages.php?ID=31502 uemacs].<br />
<br />
<br />
== Resources ==<br />
* [http://www.gnu.org/software/emacs/ GNU Emacs home page]<br />
* [http://www.gnu.org/software/emacs/manual/emacs.html GNU Emacs Manual]<br />
* [http://www.emacswiki.org/cgi-bin/wiki/ Emacs Wiki]<br />
* [http://wikemacs.org WikEmacs - a more readable, but less complete Emacs Wiki]<br />
* [http://www2.lib.uchicago.edu/keith/tcl-course/emacs-tutorial.html Useful introduction to Emacs and its shortcuts]<br />
* [http://www.dina.kvl.dk/~abraham/religion/ The Church of Emacs]</div>Theomachoshttps://wiki.archlinux.org/index.php?title=Stumpwm&diff=200685Stumpwm2012-05-07T22:39:02Z<p>Theomachos: </p>
<hr />
<div>[[Category:Tiling WMs]]<br />
<br />
== Introduction ==<br />
<br />
StumpWM is a tiling, full-screen window manager written entirely in<br />
Common Lisp. The successor to the cult classic [[Ratpoison]] window<br />
manager ("GNU Screen to the power of X"), StumpWM adds all the<br />
flexibility and hackability of common lisp, allowing the user to make<br />
modifications to the source of the window manager even while it's<br />
running.<br />
<br />
From the [http://www.nongnu.org/stumpwm/ StumpWM homepage]:<br />
<br />
If you're tired of flipping through themes like channel-surfing, and<br />
going from one perfect-except-for-just-one-thing window manager to<br />
another even-more-broken-in-some-other-way then perhaps Stumpwm can<br />
help.<br />
<br />
Stumpwm attempts to be customizable yet visually minimal. There are<br />
no window decorations, no icons, and no buttons. It does have various<br />
hooks to attach your personal customizations, and variables to tweak.<br />
<br />
Want to see it in action? A StumpWM user created<br />
a [http://www.archive.org/details/TheStumpWMExperience video].<br />
<br />
== Installation ==<br />
<br />
==== With SBCL (recommended, will run faster) ====<br />
<br />
===== With Quicklisp (recommended) =====<br />
<br />
{{Box RED|WARNING:|Only use root to install SBCL and, if you want to, run "make install".}}<br />
<br />
# Install SBCL<br />
#* {{Ic|pacman -S sbcl}}<br />
# Get Quicklisp at [http://beta.quicklisp.org the Quicklisp website]<br />
#* {{Ic|curl -O http://beta.quicklisp.org/quicklisp.lisp}}<br />
# Load Quicklisp with SBCL<br />
#* {{Ic|sbcl --load quicklisp.lisp}}<br />
# Install Quicklisp<br />
#* {{Ic|(quicklisp-quickstart:install)}} or {{Ic|(quicklisp-quickstart:install :path "path/of/your/choice")}}<br />
# Add it to your SBCL init file<br />
#* {{Ic|(ql:add-to-init-file)}}<br />
# Check for updates of Quicklisp (not needed if you've just downloaded it)<br />
#* {{Ic|(ql:update-client)}}<br />
# Check for updates on Quicklisp<br />
#* {{Ic|(ql:update-all-dists)}}<br />
# Install CLX and CL-PPCRE<br />
#* {{Ic|(ql:quickload "clx")}}<br />
#* {{Ic|(ql:quickload "cl-ppcre")}}<br />
# Quit SBCL with (quit)<br />
# Get the git version of StumpWM<br />
#* {{Ic|git clone git://git.savannah.nongnu.org/stumpwm.git}}<br />
# Get into the stumpwm folder and start compiling<br />
#* {{Ic|cd stumpwm && ./autogen.sh && ./configure && make}}<br />
#* You can optionally run "make install" as root.<br />
# Put the StumpWM binary path into your .xinit and have fun! :)<br />
<br />
''Optional: Install slime/swank for nonstop real-time hacking'':<br />
# Install swank server<br />
#* {{Ic|(ql:quickload "swank")}}<br />
# Install slime-helper<br />
#* {{Ic|(ql:quickload "quicklisp-slime-helper")}}<br />
# Paste the following into your dot-emacs<br />
#* {{Ic|(load (expand-file-name "/path/to/slime-helper.el"))}}<br />
#* {{Ic|(setq inferior-lisp-program "sbcl")}}<br />
# Now put the following into your .stumpwmrc or just eval during your stumpwm-session<br />
#* {{Ic|(require 'swank)}}<br />
#* {{Ic|(swank:create-server)}}<br />
# Connect Emacs/Slime to your stumpwm-session using<br />
#* {{Ic| M-x slime-connect}}<br />
<br />
===== With AUR =====<br />
# Install SBCL<br />
#* {{Ic|pacman -S sbcl}}<br />
# Install [https://aur.archlinux.org/packages.php?do_Details=1&ID=12084&O=0&L=0&C=0&K=clx&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd clx] from AUR.<br />
#* If you really do not want to use a PKGBUILD here, you can also use asdf-install to install clx.<br />
# Install [https://aur.archlinux.org/packages.php?do_Details=1&ID=14549&O=0&L=0&C=0&K=cl-ppcre&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd cl-ppcre]<br />
#* Again, this can be installed with asdf-install if you really do not like PKGBUILDs.<br />
# Install git<br />
#* {{Ic|pacman -S git}}<br />
# Install [https://aur.archlinux.org/packages.php?ID=12996 stumpwm] from AUR.<br />
#* Alternately, you can check it out directly from the git repo., as described on the [ homepage]. Read the directions and check the StumpWM wiki for compilation instructions.<br />
<br />
==== With Clisp ====<br />
<br />
# Get and create these packages from AUR in the following order making sure to have makepkg install dependencies first (makepkg -s):<br />
#* [https://aur.archlinux.org/packages.php?ID=15188 clisp-new-clx]<br />
#* [https://aur.archlinux.org/packages.php?ID=18800 cl-asdf]<br />
#* [https://aur.archlinux.org/packages.php?ID=14549 cl-ppcre]. To get this to install, I had to comment out the dependency line in the PKGBUILD.<br />
#* [https://aur.archlinux.org/packages.php?ID=12996 stumpwm-git]. Alternatively, download the latest version from the web site and follow the install instructions. The executable can stay in your home directory tree.<br />
# Make sure to install each one (sudo pacman -U name.pkg.tar.gz) before installing the next.<br />
# See the [[Makepkg]] article for details on downloading and installing from AUR (compiling/creating package and installing).<br />
<br />
Also, look at [http://bbs.archlinux.org/viewtopic.php?pid=543537#p543537 this post] if you run into troubles.<br />
<br />
== Documentation and Support ==<br />
<br />
If you installed StumpWM by hand or still have the source lying<br />
around, there's a TeXInfo manual.<br />
<br />
There's also a [http://stumpwm.svkt.org/cgi-bin/wiki.pl wiki], an IRC channel<br />
(#stumpwm) on Freenode, and a mailing list. For more information, of<br />
course, see [http://www.nongnu.org/stumpwm/ the project's website].<br />
<br />
== Tweaking ==<br />
<br />
See the wiki for a variety of useful tweaks for your .stumpwmrc.<br />
<br />
If you're an emacs user, you'll find an emacs minor mode for editing<br />
StumpWM files (and interfacing with the program {{Ic|stumpish}}, but<br />
more on that below) in the contrib/ directory of the StumpWM source.<br />
If you're using clisp, this file can also be found in<br />
{{Ic|/usr/share/stumpwm/}}.<br />
<br />
{{Ic|stumpish}} is the STUMP window manager Interactive SHell. It's<br />
a program that allows the user to interact with StumpWM while it's<br />
running, from the comfort of a terminal (or using the emacs mode). It<br />
can be found in the contrib/ directory of the StumpWM source. If you<br />
use clisp, this file can also be found in {{Ic|/usr/bin/}}.<br />
<br />
<h4>Happy hacking!</h4></div>Theomachoshttps://wiki.archlinux.org/index.php?title=Stumpwm&diff=151451Stumpwm2011-08-11T15:05:22Z<p>Theomachos: /* With Quicklisp (recommended) */</p>
<hr />
<div>[[Category:Tiling WMs (English)]]<br />
<br />
== Introduction ==<br />
<br />
StumpWM is a tiling, full-screen window manager written entirely in<br />
Common Lisp. The successor to the cult classic [[Ratpoison]] window<br />
manager ("GNU Screen to the power of X"), StumpWM adds all the<br />
flexibility and hackability of common lisp, allowing the user to make<br />
modifications to the source of the window manager even while it's<br />
running.<br />
<br />
From the [http://www.nongnu.org/stumpwm/ StumpWM homepage]:<br />
<br />
If you're tired of flipping through themes like channel-surfing, and<br />
going from one perfect-except-for-just-one-thing window manager to<br />
another even-more-broken-in-some-other-way then perhaps Stumpwm can<br />
help.<br />
<br />
Stumpwm attempts to be customizable yet visually minimal. There are<br />
no window decorations, no icons, and no buttons. It does have various<br />
hooks to attach your personal customizations, and variables to tweak.<br />
<br />
Want to see it in action? A StumpWM user created<br />
a [http://www.archive.org/details/TheStumpWMExperience video].<br />
<br />
== Installation ==<br />
<br />
==== With SBCL (recommended, will run faster) ====<br />
<br />
===== With Quicklisp (recommended) =====<br />
<br />
{{Box RED|WARNING:|Only use root to install SBCL and, if you want to, run "make install".}}<br />
<br />
# Install SBCL<br />
#* <tt>pacman -S sbcl</tt><br />
# Get Quicklisp at [http://beta.quicklisp.org the Quicklisp website]<br />
#* <tt>curl -O http://beta.quicklisp.org/quicklisp.lisp</tt><br />
# Load Quicklisp with SBCL<br />
#* <tt>sbcl --load quicklisp.lisp</tt><br />
# Install Quicklisp<br />
#* <tt>(quicklisp-quickstart:install)</tt><br />
# Add it to your SBCL init file<br />
#* <tt>(ql:add-to-init-file)</tt><br />
# Check for updates of Quicklisp (not needed if you've just downloaded it)<br />
#* <tt>(ql:update-client)</tt><br />
# Check for updates on Quicklisp<br />
#* <tt>(ql:update-all-dists)</tt><br />
# Install CLX and CL-PPCRE<br />
#* <tt>(ql:quickload "clx")</tt><br />
#* <tt>(ql:quickload "cl-ppcre")</tt><br />
# Quit SBCL with (quit)<br />
# Get the git version of StumpWM<br />
#* <tt>git clone git://git.savannah.nongnu.org/stumpwm.git</tt><br />
# Get into the stumpwm folder and start compiling<br />
#* <tt>cd stumpwm && ./autogen.sh && ./configure && make</tt><br />
#* You can optionally run "make install" as root.<br />
# Put the StumpWM binary path into your .xinit and have fun! :)<br />
<br />
''Optional: Install slime/swank for nonstop real-time hacking'':<br />
# Install swank server<br />
#* <tt>(ql:quickload "swank")</tt><br />
# Install slime-helper<br />
#* <tt>(ql:quickload "quicklisp-slime-helper")</tt><br />
# Paste the following into your dot-emacs<br />
#* <tt>(load (expand-file-name "/path/to/slime-helper.el"))</tt><br />
#* <tt>(setq inferior-lisp-program "sbcl")</tt><br />
# Now put the following into your .stumpwmrc or just eval during your stumpwm-session<br />
#* <tt>(require 'swank)</tt><br />
#* <tt>(swank:create-server)</tt><br />
# Connect Emacs/Slime to your stumpwm-session using<br />
#* <tt> M-x slime-connect</tt><br />
<br />
===== With AUR =====<br />
# Install SBCL<br />
#* <tt>pacman -S sbcl</tt><br />
# Install [http://aur.archlinux.org/packages.php?do_Details=1&ID=12084&O=0&L=0&C=0&K=clx&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd clx] from AUR.<br />
#* If you really don't want to use a PKGBUILD here, you can also use asdf-install to install clx.<br />
# Install [http://aur.archlinux.org/packages.php?do_Details=1&ID=14549&O=0&L=0&C=0&K=cl-ppcre&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd cl-ppcre]<br />
#* Again, this can be installed with asdf-install if you really don't like PKGBUILDs.<br />
# Install git<br />
#* <tt>pacman -S git</tt><br />
# Install [http://aur.archlinux.org/packages.php?ID=12996 stumpwm] from AUR.<br />
#* Alternately, you can check it out directly from the git repo., as described on the [ homepage]. Read the directions and check the StumpWM wiki for compilation instructions.<br />
<br />
==== With Clisp ====<br />
<br />
# Get and create these packages from AUR in the following order making sure to have makepkg install dependencies first (makepkg -s):<br />
#* [http://aur.archlinux.org/packages.php?ID=15188 clisp-new-clx]<br />
#* [http://aur.archlinux.org/packages.php?ID=18800 cl-asdf]<br />
#* [http://aur.archlinux.org/packages.php?ID=14549 cl-ppcre]. To get this to install, I had to comment out the dependency line in the PKGBUILD.<br />
#* [http://aur.archlinux.org/packages.php?ID=12996 stumpwm-git]. Alternatively, download the latest version from the web site and follow the install instructions. The executable can stay in your home directory tree.<br />
# Make sure to install each one (sudo pacman -U name.pkg.tar.gz) before installing the next.<br />
# See the [[Makepkg]] article for details on downloading and installing from AUR (compiling/creating package and installing).<br />
<br />
Also, look at [http://bbs.archlinux.org/viewtopic.php?pid=543537#p543537 this post] if you run into troubles.<br />
<br />
== Documentation and Support ==<br />
<br />
If you installed StumpWM by hand or still have the source lying<br />
around, there's a TeXInfo manual.<br />
<br />
There's also a [http://stumpwm.svkt.org/cgi-bin/wiki.pl wiki], an IRC channel<br />
(#stumpwm) on Freenode, and a mailing list. For more information, of<br />
course, see [http://www.nongnu.org/stumpwm/ the project's website].<br />
<br />
== Tweaking ==<br />
<br />
See the wiki for a variety of useful tweaks for your .stumpwmrc.<br />
<br />
If you're an emacs user, you'll find an emacs minor mode for editing<br />
StumpWM files (and interfacing with the program <tt>stumpish</tt>, but<br />
more on that below) in the contrib/ directory of the StumpWM source.<br />
If you're using clisp, this file can also be found in<br />
<tt>/usr/share/stumpwm/</tt>.<br />
<br />
<tt>stumpish</tt> is the STUMP window manager Interactive SHell. It's<br />
a program that allows the user to interact with StumpWM while it's<br />
running, from the comfort of a terminal (or using the emacs mode). It<br />
can be found in the contrib/ directory of the StumpWM source. If you<br />
use clisp, this file can also be found in <tt>/usr/bin/</tt>.<br />
<br />
<h4>Happy hacking!</h4></div>Theomachoshttps://wiki.archlinux.org/index.php?title=Stumpwm&diff=151450Stumpwm2011-08-11T15:04:55Z<p>Theomachos: /* With Quicklisp (recommended) */</p>
<hr />
<div>[[Category:Tiling WMs (English)]]<br />
<br />
== Introduction ==<br />
<br />
StumpWM is a tiling, full-screen window manager written entirely in<br />
Common Lisp. The successor to the cult classic [[Ratpoison]] window<br />
manager ("GNU Screen to the power of X"), StumpWM adds all the<br />
flexibility and hackability of common lisp, allowing the user to make<br />
modifications to the source of the window manager even while it's<br />
running.<br />
<br />
From the [http://www.nongnu.org/stumpwm/ StumpWM homepage]:<br />
<br />
If you're tired of flipping through themes like channel-surfing, and<br />
going from one perfect-except-for-just-one-thing window manager to<br />
another even-more-broken-in-some-other-way then perhaps Stumpwm can<br />
help.<br />
<br />
Stumpwm attempts to be customizable yet visually minimal. There are<br />
no window decorations, no icons, and no buttons. It does have various<br />
hooks to attach your personal customizations, and variables to tweak.<br />
<br />
Want to see it in action? A StumpWM user created<br />
a [http://www.archive.org/details/TheStumpWMExperience video].<br />
<br />
== Installation ==<br />
<br />
==== With SBCL (recommended, will run faster) ====<br />
<br />
===== With Quicklisp (recommended) =====<br />
<br />
{{Box RED|WARNING:|Only use root to install SBCL and, if you want to, run "make install".}}<br />
<br />
# Install SBCL<br />
#* <tt>pacman -S sbcl</tt><br />
# Get Quicklisp at [http://beta.quicklisp.org the Quicklisp website]<br />
#* <tt>curl -O http://beta.quicklisp.org/quicklisp.lisp</tt><br />
# Load Quicklisp with SBCL<br />
#* <tt>sbcl --load quicklisp.lisp</tt><br />
# Install Quicklisp<br />
#* <tt>(quicklisp-quickstart:install)</tt><br />
# Add it to your SBCL init file<br />
#* <tt>(ql:add-to-init-file)</tt><br />
# Check for updates of Quicklisp (not needed if you've just downloaded it)<br />
#* <tt>(ql:update-client)</tt><br />
# Check for updates on Quicklisp<br />
#* <tt>(ql:update-all-dists)</tt><br />
# Install CLX and CL-PPCRE<br />
#* <tt>(ql:quickload "clx")</tt><br />
#* <tt>(ql:quickload "cl-ppcre")</tt><br />
# Quit SBCL with (quit)<br />
# Get the git version of StumpWM<br />
#* <tt>git clone git://git.savannah.nongnu.org/stumpwm.git</tt><br />
# Get into the stumpwm folder and start compiling<br />
#* <tt>cd stumpwm && ./autogen.sh && ./configure && make</tt><br />
#* You can optionally run "make install" as root.<br />
# Put the StumpWM binary path into your .xinit and have fun! :)<br />
<br />
'''Optional: Install slime/swank for nonstop real-time hacking''':<br />
# Install swank server<br />
#* <tt>(ql:quickload "swank")</tt><br />
# Install slime-helper<br />
#* <tt>(ql:quickload "quicklisp-slime-helper")</tt><br />
# Paste the following into your dot-emacs<br />
#* <tt>(load (expand-file-name "/path/to/slime-helper.el"))</tt><br />
#* <tt>(setq inferior-lisp-program "sbcl")</tt><br />
# Now put the following into your .stumpwmrc or just eval during your stumpwm-session<br />
#* <tt>(require 'swank)</tt><br />
#* <tt>(swank:create-server)</tt><br />
# Connect Emacs/Slime to your stumpwm-session using<br />
#* <tt> M-x slime-connect</tt><br />
<br />
===== With AUR =====<br />
# Install SBCL<br />
#* <tt>pacman -S sbcl</tt><br />
# Install [http://aur.archlinux.org/packages.php?do_Details=1&ID=12084&O=0&L=0&C=0&K=clx&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd clx] from AUR.<br />
#* If you really don't want to use a PKGBUILD here, you can also use asdf-install to install clx.<br />
# Install [http://aur.archlinux.org/packages.php?do_Details=1&ID=14549&O=0&L=0&C=0&K=cl-ppcre&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd cl-ppcre]<br />
#* Again, this can be installed with asdf-install if you really don't like PKGBUILDs.<br />
# Install git<br />
#* <tt>pacman -S git</tt><br />
# Install [http://aur.archlinux.org/packages.php?ID=12996 stumpwm] from AUR.<br />
#* Alternately, you can check it out directly from the git repo., as described on the [ homepage]. Read the directions and check the StumpWM wiki for compilation instructions.<br />
<br />
==== With Clisp ====<br />
<br />
# Get and create these packages from AUR in the following order making sure to have makepkg install dependencies first (makepkg -s):<br />
#* [http://aur.archlinux.org/packages.php?ID=15188 clisp-new-clx]<br />
#* [http://aur.archlinux.org/packages.php?ID=18800 cl-asdf]<br />
#* [http://aur.archlinux.org/packages.php?ID=14549 cl-ppcre]. To get this to install, I had to comment out the dependency line in the PKGBUILD.<br />
#* [http://aur.archlinux.org/packages.php?ID=12996 stumpwm-git]. Alternatively, download the latest version from the web site and follow the install instructions. The executable can stay in your home directory tree.<br />
# Make sure to install each one (sudo pacman -U name.pkg.tar.gz) before installing the next.<br />
# See the [[Makepkg]] article for details on downloading and installing from AUR (compiling/creating package and installing).<br />
<br />
Also, look at [http://bbs.archlinux.org/viewtopic.php?pid=543537#p543537 this post] if you run into troubles.<br />
<br />
== Documentation and Support ==<br />
<br />
If you installed StumpWM by hand or still have the source lying<br />
around, there's a TeXInfo manual.<br />
<br />
There's also a [http://stumpwm.svkt.org/cgi-bin/wiki.pl wiki], an IRC channel<br />
(#stumpwm) on Freenode, and a mailing list. For more information, of<br />
course, see [http://www.nongnu.org/stumpwm/ the project's website].<br />
<br />
== Tweaking ==<br />
<br />
See the wiki for a variety of useful tweaks for your .stumpwmrc.<br />
<br />
If you're an emacs user, you'll find an emacs minor mode for editing<br />
StumpWM files (and interfacing with the program <tt>stumpish</tt>, but<br />
more on that below) in the contrib/ directory of the StumpWM source.<br />
If you're using clisp, this file can also be found in<br />
<tt>/usr/share/stumpwm/</tt>.<br />
<br />
<tt>stumpish</tt> is the STUMP window manager Interactive SHell. It's<br />
a program that allows the user to interact with StumpWM while it's<br />
running, from the comfort of a terminal (or using the emacs mode). It<br />
can be found in the contrib/ directory of the StumpWM source. If you<br />
use clisp, this file can also be found in <tt>/usr/bin/</tt>.<br />
<br />
<h4>Happy hacking!</h4></div>Theomachoshttps://wiki.archlinux.org/index.php?title=Stumpwm&diff=37134Stumpwm2008-02-14T15:14:52Z<p>Theomachos: /* With Clisp */</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
<br />
==Introduction==<br />
<br />
StumpWM is a tiling (some people say "full-screen") Windowmanager written entirely in Common Lisp.<br />
The concept is based on its predecessor [[Ratpoison]] which behaves like a GNU/Screen for X.<br />
As a main difference StumpWM provides a REPL (Read-Evaluate-Print-Loop) which makes it your personal hacking-playground. <br />
<br />
From the [http://www.nongnu.org/stumpwm/ StumpWM-Homepage] :<br />
<br />
''If you're tired of flipping through themes like channel-surfing, and going from one perfect-except-for-just-one-thing window manager to another even-more-broken-in-some-other-way then perhaps Stumpwm can help.<br />
<br />
''Stumpwm attempts to be customizable yet visually minimal. There are no window decorations, no icons, and no buttons. It does have various hooks to attach your personal customizations, and variables to tweak.<br />
<br />
Seeing is believing: [http://www.archive.org/details/TheStumpWMExperience TheStumpWMExperience] (Better download the full ogg ! Flash is BAD quality !)<br />
<br />
==Installation==<br />
<br />
====With SBCL====<br />
'''1. install SBCL'''<br />
<br />
pacman -S sbcl<br />
<br />
'''2. install clx 0.7.3-1 from [http://aur.archlinux.org/packages.php?do_Details=1&ID=12084&O=0&L=0&C=0&K=clx&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR]'''<br />
<br />
'''A better way without PKGBUILD: Fire up SBCL and type<br />
(require 'asdf)<br />
(require 'asdf-install)<br />
(asdf-install:install 'clx)<br />
<br />
<br />
'''3. install cl-ppcre 1.3.2-1 from [http://aur.archlinux.org/packages.php?do_Details=1&ID=14549&O=0&L=0&C=0&K=cl-ppcre&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR]'''<br />
<br />
'''Also better: In SBCL type<br />
(require 'asdf)<br />
(require 'asdf-install)<br />
(asdf-install:install 'cl-ppcre) <br />
<br />
'''4. install Git'''<br />
<br />
pacman -S git<br />
<br />
'''5. get StumpWM from its git repository''' <br />
<br />
git clone git://git.savannah.nongnu.org/stumpwm.git<br />
<br />
Cd to your stumpwm-dir and run<br />
<br />
autoconf<br />
./configure && make<br />
<br />
This method has two advantages over the AUR-Package:<br />
<br />
1. You can edit the code and contribute to StumpWM's development.<br />
<br />
2. You can simply update your StumpWM by running<br />
<br />
git pull<br />
<br />
in the stumpwm-dir.<br />
<br />
'''6. Start Stumpwm'''<br />
<br />
StumpWM now provides a much simpler startup-method:<br />
Just add<br />
<br />
<path/to/stumpwm>/stumpwm<br />
<br />
to your .xinitrc.<br />
<br />
====With Clisp====<br />
<br />
Use the clisp-new-clx PKGBUILD from [http://aur.archlinux.org/packages.php?do_Details=1&ID=15188 AUR].<br />
<br />
Dowload and unpack cl-ppcre from [http://weitz.de/cl-ppcre/ http://weitz.de/cl-ppcre/]. (You don't have to install anything !)<br />
<br />
Configure Stumpwm with:<br />
<br />
./configure --with-lisp=clisp --with-ppcre=<PATH/TO/PPCRE><br />
then <br />
make<br />
<br />
==Usage==<br />
<br />
StumpWM comes with a very good manual<br />
<br />
<path/to/stumpwm>stumpwm.texi<br />
<br />
to answer most of your questions.<br />
There's also a wiki at [http://stumpwm.antidesktop.net/ http://stumpwm.antidesktop.net/]<br />
<br />
<br />
==Tweaking==<br />
<br />
Here are just some extras for your $HOME/.stumpwmrc.<br />
<br />
You can find other code snippets at the wiki or at [http://paste.lisp.org/list/stumpwm?0 http://paste.lisp.org/list/stumpwm?0].<br />
<br />
====SLIME (only SBCL so far - clisp + slime = buggy)====<br />
<br />
A good way to hack StumpWM is Emacs + SLIME. [http://common-lisp.net/project/slime/ SLIME] is the Superior Lisp Interaction Mode for Emacs.<br />
You will get all the completion- and text-editing-power of Emacs for your StumpWM, IF....and only IF...you manage to run Slime.<br />
It's easy, but of all the googled solutions, only 2-3% would work....<br />
<br />
So here is a working solution:<br />
*Get SLIME and extract the archive wherever you want.<br />
*add the following lines to your ''.stumpwmrc<br />
(load "<path/to/slime>/swank-loader.lisp")<br />
(swank:create-server :dont-close t)<br />
*add the following lines to your ''.emacs<br />
(add-to-list 'load-path "<path/to/slime>") ; your SLIME directory<br />
(setq inferior-lisp-program "/usr/bin/sbcl") ; your Lisp system<br />
(require 'slime)<br />
(slime-setup)<br />
<br />
Now you can connect to your StumpWM-Session from within emacs by typing: "M-x slime-connect"<br />
For new SLIMErs: You have to enter (in-package stumpwm) before you can interact with the WM.<br />
<br />
====Scratchpad====<br />
<br />
ION3-users may miss the scratchpad-functionality. The solution is to define a new Group and access it with a key (thanks to male):<br />
<br />
(defvar *scratchpad-group* '()<br />
"Group of the scratchpad.")<br />
<br />
(define-stumpwm-command "scratchpad" ()<br />
(unless *scratchpad-group*<br />
;; Add the (hidden) scratchpad group and give it the special number 0<br />
(setf *scratchpad-group* (add-group (current-screen) "Scratchpad")<br />
(group-number *scratchpad-group*) 0))<br />
(if (eq (current-group) *scratchpad-group*)<br />
(switch-to-group (second (screen-groups (current-screen))))<br />
(switch-to-group *scratchpad-group*))) <br />
<br />
(define-key *root-map* (kbd "M-SPC") "scratchpad")<br />
<br />
<br />
====Window Placement Rules====<br />
<br />
This is something that's not very well documented. You will find an example in the ''sample-stumpwmrc.lisp'' in your stumpwm-dir.<br />
<br />
First you have to "draw" you layout. This means that you have to create all the groups you want StumpWM to put your apps into.<br />
Then you have to run the command<br />
<br />
dump-desktop .foo<br />
<br />
in StumpWM's command prompt.<br />
<br />
You can restore your layout with<br />
<br />
restore .foo<br />
<br />
Now add the following line to your ''.stumpwmrc<br />
<br />
(run-commands "restore .foo")<br />
<br />
This restores your window configuration every time you boot up StumpWM, which is necessary for the placement rules to apply.<br />
<br />
Now you can add something like<br />
<br />
(define-frame-preference "Scratchpad"<br />
;; frame raise lock (lock AND raise == jumpto)<br />
(0 nil t :class "Emacs"))<br />
<br />
to your ''.stumpwmrc.<br />
Emacs will now be opened in your Scratchpad-Group.<br />
The "nil" makes sure that this is done in the background.<br />
<br />
<br />
====Stumpish====<br />
<br />
Another undocumented gimmick is stumpish, the STUMPwm Interactive SHell.<br />
You can find it in the contrib-directory of your stumpwm-dir.<br />
<br />
This way your shell can interact with Stumpwm.<br />
<br />
==Last Words==<br />
Have a nice time - and share your hacks and tweaks :)<br />
<br />
Talk to StumpWM-Users and -Developers on '''#stumpwm''' at '''irc.freenode.net'''.<br />
If you need help or don't understand my bad English, contact me: ''Theomachos'' on '''irc.freenode.net'''.</div>Theomachoshttps://wiki.archlinux.org/index.php?title=Stumpwm&diff=37133Stumpwm2008-02-14T14:57:47Z<p>Theomachos: </p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
<br />
==Introduction==<br />
<br />
StumpWM is a tiling (some people say "full-screen") Windowmanager written entirely in Common Lisp.<br />
The concept is based on its predecessor [[Ratpoison]] which behaves like a GNU/Screen for X.<br />
As a main difference StumpWM provides a REPL (Read-Evaluate-Print-Loop) which makes it your personal hacking-playground. <br />
<br />
From the [http://www.nongnu.org/stumpwm/ StumpWM-Homepage] :<br />
<br />
''If you're tired of flipping through themes like channel-surfing, and going from one perfect-except-for-just-one-thing window manager to another even-more-broken-in-some-other-way then perhaps Stumpwm can help.<br />
<br />
''Stumpwm attempts to be customizable yet visually minimal. There are no window decorations, no icons, and no buttons. It does have various hooks to attach your personal customizations, and variables to tweak.<br />
<br />
Seeing is believing: [http://www.archive.org/details/TheStumpWMExperience TheStumpWMExperience] (Better download the full ogg ! Flash is BAD quality !)<br />
<br />
==Installation==<br />
<br />
====With SBCL====<br />
'''1. install SBCL'''<br />
<br />
pacman -S sbcl<br />
<br />
'''2. install clx 0.7.3-1 from [http://aur.archlinux.org/packages.php?do_Details=1&ID=12084&O=0&L=0&C=0&K=clx&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR]'''<br />
<br />
'''A better way without PKGBUILD: Fire up SBCL and type<br />
(require 'asdf)<br />
(require 'asdf-install)<br />
(asdf-install:install 'clx)<br />
<br />
<br />
'''3. install cl-ppcre 1.3.2-1 from [http://aur.archlinux.org/packages.php?do_Details=1&ID=14549&O=0&L=0&C=0&K=cl-ppcre&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR]'''<br />
<br />
'''Also better: In SBCL type<br />
(require 'asdf)<br />
(require 'asdf-install)<br />
(asdf-install:install 'cl-ppcre) <br />
<br />
'''4. install Git'''<br />
<br />
pacman -S git<br />
<br />
'''5. get StumpWM from its git repository''' <br />
<br />
git clone git://git.savannah.nongnu.org/stumpwm.git<br />
<br />
Cd to your stumpwm-dir and run<br />
<br />
autoconf<br />
./configure && make<br />
<br />
This method has two advantages over the AUR-Package:<br />
<br />
1. You can edit the code and contribute to StumpWM's development.<br />
<br />
2. You can simply update your StumpWM by running<br />
<br />
git pull<br />
<br />
in the stumpwm-dir.<br />
<br />
'''6. Start Stumpwm'''<br />
<br />
StumpWM now provides a much simpler startup-method:<br />
Just add<br />
<br />
<path/to/stumpwm>/stumpwm<br />
<br />
to your .xinitrc.<br />
<br />
====With Clisp====<br />
<br />
Use the clisp-new-clx PKGBUILD from [http://aur.archlinux.org/packages.php?do_Details=1&ID=15188 AUR].<br />
<br />
Dowload and unpack cl-ppcre from [http://weitz.de/cl-ppcre/ http://weitz.de/cl-ppcre/].<br />
<br />
Configure Stumpwm with:<br />
<br />
./configure --with-lisp=clisp --with-ppcre=<PATH/TO/PPCRE><br />
then <br />
make<br />
<br />
==Usage==<br />
<br />
StumpWM comes with a very good manual<br />
<br />
<path/to/stumpwm>stumpwm.texi<br />
<br />
to answer most of your questions.<br />
There's also a wiki at [http://stumpwm.antidesktop.net/ http://stumpwm.antidesktop.net/]<br />
<br />
<br />
==Tweaking==<br />
<br />
Here are just some extras for your $HOME/.stumpwmrc.<br />
<br />
You can find other code snippets at the wiki or at [http://paste.lisp.org/list/stumpwm?0 http://paste.lisp.org/list/stumpwm?0].<br />
<br />
====SLIME (only SBCL so far - clisp + slime = buggy)====<br />
<br />
A good way to hack StumpWM is Emacs + SLIME. [http://common-lisp.net/project/slime/ SLIME] is the Superior Lisp Interaction Mode for Emacs.<br />
You will get all the completion- and text-editing-power of Emacs for your StumpWM, IF....and only IF...you manage to run Slime.<br />
It's easy, but of all the googled solutions, only 2-3% would work....<br />
<br />
So here is a working solution:<br />
*Get SLIME and extract the archive wherever you want.<br />
*add the following lines to your ''.stumpwmrc<br />
(load "<path/to/slime>/swank-loader.lisp")<br />
(swank:create-server :dont-close t)<br />
*add the following lines to your ''.emacs<br />
(add-to-list 'load-path "<path/to/slime>") ; your SLIME directory<br />
(setq inferior-lisp-program "/usr/bin/sbcl") ; your Lisp system<br />
(require 'slime)<br />
(slime-setup)<br />
<br />
Now you can connect to your StumpWM-Session from within emacs by typing: "M-x slime-connect"<br />
For new SLIMErs: You have to enter (in-package stumpwm) before you can interact with the WM.<br />
<br />
====Scratchpad====<br />
<br />
ION3-users may miss the scratchpad-functionality. The solution is to define a new Group and access it with a key (thanks to male):<br />
<br />
(defvar *scratchpad-group* '()<br />
"Group of the scratchpad.")<br />
<br />
(define-stumpwm-command "scratchpad" ()<br />
(unless *scratchpad-group*<br />
;; Add the (hidden) scratchpad group and give it the special number 0<br />
(setf *scratchpad-group* (add-group (current-screen) "Scratchpad")<br />
(group-number *scratchpad-group*) 0))<br />
(if (eq (current-group) *scratchpad-group*)<br />
(switch-to-group (second (screen-groups (current-screen))))<br />
(switch-to-group *scratchpad-group*))) <br />
<br />
(define-key *root-map* (kbd "M-SPC") "scratchpad")<br />
<br />
<br />
====Window Placement Rules====<br />
<br />
This is something that's not very well documented. You will find an example in the ''sample-stumpwmrc.lisp'' in your stumpwm-dir.<br />
<br />
First you have to "draw" you layout. This means that you have to create all the groups you want StumpWM to put your apps into.<br />
Then you have to run the command<br />
<br />
dump-desktop .foo<br />
<br />
in StumpWM's command prompt.<br />
<br />
You can restore your layout with<br />
<br />
restore .foo<br />
<br />
Now add the following line to your ''.stumpwmrc<br />
<br />
(run-commands "restore .foo")<br />
<br />
This restores your window configuration every time you boot up StumpWM, which is necessary for the placement rules to apply.<br />
<br />
Now you can add something like<br />
<br />
(define-frame-preference "Scratchpad"<br />
;; frame raise lock (lock AND raise == jumpto)<br />
(0 nil t :class "Emacs"))<br />
<br />
to your ''.stumpwmrc.<br />
Emacs will now be opened in your Scratchpad-Group.<br />
The "nil" makes sure that this is done in the background.<br />
<br />
<br />
====Stumpish====<br />
<br />
Another undocumented gimmick is stumpish, the STUMPwm Interactive SHell.<br />
You can find it in the contrib-directory of your stumpwm-dir.<br />
<br />
This way your shell can interact with Stumpwm.<br />
<br />
==Last Words==<br />
Have a nice time - and share your hacks and tweaks :)<br />
<br />
Talk to StumpWM-Users and -Developers on '''#stumpwm''' at '''irc.freenode.net'''.<br />
If you need help or don't understand my bad English, contact me: ''Theomachos'' on '''irc.freenode.net'''.</div>Theomachoshttps://wiki.archlinux.org/index.php?title=Stumpwm&diff=37132Stumpwm2008-02-14T14:47:31Z<p>Theomachos: /* With SBCL */</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
<br />
==Introduction==<br />
<br />
StumpWM is a tiling (some people say "full-screen") Windowmanager written entirely in Common Lisp.<br />
The concept is based on its predecessor [[Ratpoison]] which behaves like a GNU/Screen for X.<br />
As a main difference StumpWM provides a REPL (Read-Evaluate-Print-Loop) which makes it your personal hacking-playground. <br />
<br />
From the [http://www.nongnu.org/stumpwm/ StumpWM-Homepage] :<br />
<br />
''If you're tired of flipping through themes like channel-surfing, and going from one perfect-except-for-just-one-thing window manager to another even-more-broken-in-some-other-way then perhaps Stumpwm can help.<br />
<br />
''Stumpwm attempts to be customizable yet visually minimal. There are no window decorations, no icons, and no buttons. It does have various hooks to attach your personal customizations, and variables to tweak.<br />
<br />
Seeing is believing: [http://www.archive.org/details/TheStumpWMExperience TheStumpWMExperience] (Better download the full ogg ! Flash is BAD quality !)<br />
<br />
==Installation==<br />
<br />
====With SBCL====<br />
'''1. install SBCL'''<br />
<br />
pacman -S sbcl<br />
<br />
'''2. install clx 0.7.3-1 from [http://aur.archlinux.org/packages.php?do_Details=1&ID=12084&O=0&L=0&C=0&K=clx&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR]'''<br />
<br />
'''A better way without PKGBUILD: Fire up SBCL and type<br />
(require 'asdf)<br />
(require 'asdf-install)<br />
(asdf-install:install 'clx)<br />
<br />
<br />
'''3. install cl-ppcre 1.3.2-1 from [http://aur.archlinux.org/packages.php?do_Details=1&ID=14549&O=0&L=0&C=0&K=cl-ppcre&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR]'''<br />
<br />
'''Also better: In SBCL type<br />
(require 'asdf)<br />
(require 'asdf-install)<br />
(asdf-install:install 'cl-ppcre) <br />
<br />
'''4. install Git'''<br />
<br />
pacman -S git<br />
<br />
'''5. get StumpWM from its git repository''' <br />
<br />
git clone git://git.savannah.nongnu.org/stumpwm.git<br />
<br />
Cd to your stumpwm-dir and run<br />
<br />
autoconf<br />
./configure && make<br />
<br />
This method has two advantages over the AUR-Package:<br />
<br />
1. You can edit the code and contribute to StumpWM's development.<br />
<br />
2. You can simply update your StumpWM by running<br />
<br />
git pull<br />
<br />
in the stumpwm-dir.<br />
<br />
'''6. Start Stumpwm'''<br />
<br />
StumpWM now provides a much simpler startup-method:<br />
Just add<br />
<br />
<path/to/stumpwm>/stumpwm<br />
<br />
to your .xinitrc.<br />
<br />
====With Clisp (preferred)====<br />
<br />
Coming Soon<br />
<br />
==Usage==<br />
<br />
StumpWM comes with a very good manual<br />
<br />
<path/to/stumpwm>stumpwm.texi<br />
<br />
to answer most of your questions.<br />
There's also a wiki at [http://stumpwm.antidesktop.net/ http://stumpwm.antidesktop.net/]<br />
<br />
<br />
==Tweaking==<br />
<br />
Here are just some extras for your $HOME/.stumpwmrc.<br />
<br />
You can find other code snippets at the wiki or at [http://paste.lisp.org/list/stumpwm?0 http://paste.lisp.org/list/stumpwm?0].<br />
<br />
====SLIME====<br />
<br />
A good way to hack StumpWM is Emacs + SLIME. [http://common-lisp.net/project/slime/ SLIME] is the Superior Lisp Interaction Mode for Emacs.<br />
You will get all the completion- and text-editing-power of Emacs for your StumpWM, IF....and only IF...you manage to run Slime.<br />
It's easy, but of all the googled solutions, only 2-3% would work....<br />
<br />
So here is a working solution:<br />
*Get SLIME and extract the archive wherever you want.<br />
*add the following lines to your ''.stumpwmrc<br />
(load "<path/to/slime>/swank-loader.lisp")<br />
(swank:create-server :dont-close t)<br />
*add the following lines to your ''.emacs<br />
(add-to-list 'load-path "<path/to/slime>") ; your SLIME directory<br />
(setq inferior-lisp-program "/usr/bin/sbcl") ; your Lisp system<br />
(require 'slime)<br />
(slime-setup)<br />
<br />
Now you can connect to your StumpWM-Session from within emacs by typing: "M-x slime-connect"<br />
For new SLIMErs: You have to enter (in-package stumpwm) before you can interact with the WM.<br />
<br />
====Scratchpad====<br />
<br />
ION3-users may miss the scratchpad-functionality. The solution is to define a new Group and access it with a key (thanks to male):<br />
<br />
(defvar *scratchpad-group* '()<br />
"Group of the scratchpad.")<br />
<br />
(define-stumpwm-command "scratchpad" ()<br />
(unless *scratchpad-group*<br />
;; Add the (hidden) scratchpad group and give it the special number 0<br />
(setf *scratchpad-group* (add-group (current-screen) "Scratchpad")<br />
(group-number *scratchpad-group*) 0))<br />
(if (eq (current-group) *scratchpad-group*)<br />
(switch-to-group (second (screen-groups (current-screen))))<br />
(switch-to-group *scratchpad-group*))) <br />
<br />
(define-key *root-map* (kbd "M-SPC") "scratchpad")<br />
<br />
<br />
====Window Placement Rules====<br />
<br />
This is something that's not very well documented. You will find an example in the ''sample-stumpwmrc.lisp'' in your stumpwm-dir.<br />
<br />
First you have to "draw" you layout. This means that you have to create all the groups you want StumpWM to put your apps into.<br />
Then you have to run the command<br />
<br />
dump-desktop .foo<br />
<br />
in StumpWM's command prompt.<br />
<br />
You can restore your layout with<br />
<br />
restore .foo<br />
<br />
Now add the following line to your ''.stumpwmrc<br />
<br />
(run-commands "restore .foo")<br />
<br />
This restores your window configuration every time you boot up StumpWM, which is necessary for the placement rules to apply.<br />
<br />
Now you can add something like<br />
<br />
(define-frame-preference "Scratchpad"<br />
;; frame raise lock (lock AND raise == jumpto)<br />
(0 nil t :class "Emacs"))<br />
<br />
to your ''.stumpwmrc.<br />
Emacs will now be opened in your Scratchpad-Group.<br />
The "nil" makes sure that this is done in the background.<br />
<br />
<br />
====Stumpish====<br />
<br />
Another undocumented gimmick is stumpish, the STUMPwm Interactive SHell.<br />
You can find it in the contrib-directory of your stumpwm-dir.<br />
<br />
This way your shell can interact with Stumpwm.<br />
<br />
==Last Words==<br />
Have a nice time - and share your hacks and tweaks :)<br />
<br />
Talk to StumpWM-Users and -Developers on '''#stumpwm''' at '''irc.freenode.net'''.<br />
If you need help or don't understand my bad English, contact me: ''Theomachos'' on '''irc.freenode.net'''.</div>Theomachoshttps://wiki.archlinux.org/index.php?title=Stumpwm&diff=37074Stumpwm2008-02-13T17:03:15Z<p>Theomachos: /* Installation */</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
<br />
==Introduction==<br />
<br />
StumpWM is a tiling (some people say "full-screen") Windowmanager written entirely in Common Lisp.<br />
The concept is based on its predecessor [[Ratpoison]] which behaves like a GNU/Screen for X.<br />
As a main difference StumpWM provides a REPL (Read-Evaluate-Print-Loop) which makes it your personal hacking-playground. <br />
<br />
From the [http://www.nongnu.org/stumpwm/ StumpWM-Homepage] :<br />
<br />
''If you're tired of flipping through themes like channel-surfing, and going from one perfect-except-for-just-one-thing window manager to another even-more-broken-in-some-other-way then perhaps Stumpwm can help.<br />
<br />
''Stumpwm attempts to be customizable yet visually minimal. There are no window decorations, no icons, and no buttons. It does have various hooks to attach your personal customizations, and variables to tweak.<br />
<br />
Seeing is believing: [http://www.archive.org/details/TheStumpWMExperience TheStumpWMExperience] (Better download the full ogg ! Flash is BAD quality !)<br />
<br />
==Installation==<br />
<br />
====With SBCL====<br />
'''1. install SBCL'''<br />
<br />
pacman -S sbcl<br />
<br />
'''2. install clx 0.7.3-1 from [http://aur.archlinux.org/packages.php?do_Details=1&ID=12084&O=0&L=0&C=0&K=clx&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR]'''<br />
<br />
'''3. install cl-ppcre 1.3.2-1 from [http://aur.archlinux.org/packages.php?do_Details=1&ID=14549&O=0&L=0&C=0&K=cl-ppcre&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR]'''<br />
<br />
'''4. install Git'''<br />
<br />
pacman -S git<br />
<br />
'''5. get StumpWM from its git repository''' <br />
<br />
git clone git://git.savannah.nongnu.org/stumpwm.git<br />
<br />
Cd to your stumpwm-dir and run<br />
<br />
autoconf<br />
./configure && make<br />
<br />
This method has two advantages over the AUR-Package:<br />
<br />
1. You can edit the code and contribute to StumpWM's development.<br />
<br />
2. You can simply update your StumpWM by running<br />
<br />
git pull<br />
<br />
in the stumpwm-dir.<br />
<br />
'''6. Start Stumpwm'''<br />
<br />
StumpWM now provides a much simpler startup-method:<br />
Just add<br />
<br />
<path/to/stumpwm>/stumpwm<br />
<br />
to your .xinitrc.<br />
<br />
<br />
====With Clisp (preferred)====<br />
<br />
Coming Soon<br />
<br />
==Usage==<br />
<br />
StumpWM comes with a very good manual<br />
<br />
<path/to/stumpwm>stumpwm.texi<br />
<br />
to answer most of your questions.<br />
There's also a wiki at [http://stumpwm.antidesktop.net/ http://stumpwm.antidesktop.net/]<br />
<br />
<br />
==Tweaking==<br />
<br />
Here are just some extras for your $HOME/.stumpwmrc.<br />
<br />
You can find other code snippets at the wiki or at [http://paste.lisp.org/list/stumpwm?0 http://paste.lisp.org/list/stumpwm?0].<br />
<br />
====SLIME====<br />
<br />
A good way to hack StumpWM is Emacs + SLIME. [http://common-lisp.net/project/slime/ SLIME] is the Superior Lisp Interaction Mode for Emacs.<br />
You will get all the completion- and text-editing-power of Emacs for your StumpWM, IF....and only IF...you manage to run Slime.<br />
It's easy, but of all the googled solutions, only 2-3% would work....<br />
<br />
So here is a working solution:<br />
*Get SLIME and extract the archive wherever you want.<br />
*add the following lines to your ''.stumpwmrc<br />
(load "<path/to/slime>/swank-loader.lisp")<br />
(swank:create-server :dont-close t)<br />
*add the following lines to your ''.emacs<br />
(add-to-list 'load-path "<path/to/slime>") ; your SLIME directory<br />
(setq inferior-lisp-program "/usr/bin/sbcl") ; your Lisp system<br />
(require 'slime)<br />
(slime-setup)<br />
<br />
Now you can connect to your StumpWM-Session from within emacs by typing: "M-x slime-connect"<br />
For new SLIMErs: You have to enter (in-package stumpwm) before you can interact with the WM.<br />
<br />
====Scratchpad====<br />
<br />
ION3-users may miss the scratchpad-functionality. The solution is to define a new Group and access it with a key (thanks to male):<br />
<br />
(defvar *scratchpad-group* '()<br />
"Group of the scratchpad.")<br />
<br />
(define-stumpwm-command "scratchpad" ()<br />
(unless *scratchpad-group*<br />
;; Add the (hidden) scratchpad group and give it the special number 0<br />
(setf *scratchpad-group* (add-group (current-screen) "Scratchpad")<br />
(group-number *scratchpad-group*) 0))<br />
(if (eq (current-group) *scratchpad-group*)<br />
(switch-to-group (second (screen-groups (current-screen))))<br />
(switch-to-group *scratchpad-group*))) <br />
<br />
(define-key *root-map* (kbd "M-SPC") "scratchpad")<br />
<br />
<br />
====Window Placement Rules====<br />
<br />
This is something that's not very well documented. You will find an example in the ''sample-stumpwmrc.lisp'' in your stumpwm-dir.<br />
<br />
First you have to "draw" you layout. This means that you have to create all the groups you want StumpWM to put your apps into.<br />
Then you have to run the command<br />
<br />
dump-desktop .foo<br />
<br />
in StumpWM's command prompt.<br />
<br />
You can restore your layout with<br />
<br />
restore .foo<br />
<br />
Now add the following line to your ''.stumpwmrc<br />
<br />
(run-commands "restore .foo")<br />
<br />
This restores your window configuration every time you boot up StumpWM, which is necessary for the placement rules to apply.<br />
<br />
Now you can add something like<br />
<br />
(define-frame-preference "Scratchpad"<br />
;; frame raise lock (lock AND raise == jumpto)<br />
(0 nil t :class "Emacs"))<br />
<br />
to your ''.stumpwmrc.<br />
Emacs will now be opened in your Scratchpad-Group.<br />
The "nil" makes sure that this is done in the background.<br />
<br />
<br />
====Stumpish====<br />
<br />
Another undocumented gimmick is stumpish, the STUMPwm Interactive SHell.<br />
You can find it in the contrib-directory of your stumpwm-dir.<br />
<br />
This way your shell can interact with Stumpwm.<br />
<br />
==Last Words==<br />
Have a nice time - and share your hacks and tweaks :)<br />
<br />
Talk to StumpWM-Users and -Developers on '''#stumpwm''' at '''irc.freenode.net'''.<br />
If you need help or don't understand my bad English, contact me: ''Theomachos'' on '''irc.freenode.net'''.</div>Theomachoshttps://wiki.archlinux.org/index.php?title=Stumpwm&diff=35389Stumpwm2008-01-22T12:45:49Z<p>Theomachos: /* Tweaking */</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
<br />
==Introduction==<br />
<br />
StumpWM is a tiling (some people say "full-screen") Windowmanager written entirely in Common Lisp.<br />
The concept is based on its predecessor [[Ratpoison]] which behaves like a GNU/Screen for X.<br />
As a main difference StumpWM provides a REPL (Read-Evaluate-Print-Loop) which makes it your personal hacking-playground. <br />
<br />
From the [http://www.nongnu.org/stumpwm/ StumpWM-Homepage] :<br />
<br />
''If you're tired of flipping through themes like channel-surfing, and going from one perfect-except-for-just-one-thing window manager to another even-more-broken-in-some-other-way then perhaps Stumpwm can help.<br />
<br />
''Stumpwm attempts to be customizable yet visually minimal. There are no window decorations, no icons, and no buttons. It does have various hooks to attach your personal customizations, and variables to tweak.<br />
<br />
Seeing is believing: [http://www.archive.org/details/TheStumpWMExperience TheStumpWMExperience] (Better download the full ogg ! Flash is BAD quality !)<br />
<br />
==Installation==<br />
<br />
'''1. install SBCL'''<br />
<br />
pacman -S sbcl<br />
<br />
'''2. install clx 0.7.3-1 from [http://aur.archlinux.org/packages.php?do_Details=1&ID=12084&O=0&L=0&C=0&K=clx&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR]'''<br />
<br />
'''3. install cl-ppcre 1.3.2-1 from [http://aur.archlinux.org/packages.php?do_Details=1&ID=14549&O=0&L=0&C=0&K=cl-ppcre&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR]'''<br />
<br />
'''4. install Git'''<br />
<br />
pacman -S git<br />
<br />
'''5. get StumpWM from its git repository''' <br />
<br />
git clone git://git.savannah.nongnu.org/stumpwm.git<br />
<br />
Cd to your stumpwm-dir and run<br />
<br />
autoconf<br />
./configure && make<br />
<br />
This method has two advantages over the AUR-Package:<br />
<br />
1. You can edit the code and contribute to StumpWM's development.<br />
<br />
2. You can simply update your StumpWM by running<br />
<br />
git pull<br />
<br />
in the stumpwm-dir.<br />
<br />
'''6. Start Stumpwm'''<br />
<br />
StumpWM now provides a much simpler startup-method:<br />
Just add<br />
<br />
<path/to/stumpwm>/stumpwm<br />
<br />
to your .xinitrc.<br />
<br />
<br />
==Usage==<br />
<br />
StumpWM comes with a very good manual<br />
<br />
<path/to/stumpwm>stumpwm.texi<br />
<br />
to answer most of your questions.<br />
There's also a wiki at [http://stumpwm.antidesktop.net/ http://stumpwm.antidesktop.net/]<br />
<br />
<br />
==Tweaking==<br />
<br />
Here are just some extras for your $HOME/.stumpwmrc.<br />
<br />
You can find other code snippets at the wiki or at [http://paste.lisp.org/list/stumpwm?0 http://paste.lisp.org/list/stumpwm?0].<br />
<br />
====SLIME====<br />
<br />
A good way to hack StumpWM is Emacs + SLIME. [http://common-lisp.net/project/slime/ SLIME] is the Superior Lisp Interaction Mode for Emacs.<br />
You will get all the completion- and text-editing-power of Emacs for your StumpWM, IF....and only IF...you manage to run Slime.<br />
It's easy, but of all the googled solutions, only 2-3% would work....<br />
<br />
So here is a working solution:<br />
*Get SLIME and extract the archive wherever you want.<br />
*add the following lines to your ''.stumpwmrc<br />
(load "<path/to/slime>/swank-loader.lisp")<br />
(swank:create-server :dont-close t)<br />
*add the following lines to your ''.emacs<br />
(add-to-list 'load-path "<path/to/slime>") ; your SLIME directory<br />
(setq inferior-lisp-program "/usr/bin/sbcl") ; your Lisp system<br />
(require 'slime)<br />
(slime-setup)<br />
<br />
Now you can connect to your StumpWM-Session from within emacs by typing: "M-x slime-connect"<br />
For new SLIMErs: You have to enter (in-package stumpwm) before you can interact with the WM.<br />
<br />
====Scratchpad====<br />
<br />
ION3-users may miss the scratchpad-functionality. The solution is to define a new Group and access it with a key (thanks to male):<br />
<br />
(defvar *scratchpad-group* '()<br />
"Group of the scratchpad.")<br />
<br />
(define-stumpwm-command "scratchpad" ()<br />
(unless *scratchpad-group*<br />
;; Add the (hidden) scratchpad group and give it the special number 0<br />
(setf *scratchpad-group* (add-group (current-screen) "Scratchpad")<br />
(group-number *scratchpad-group*) 0))<br />
(if (eq (current-group) *scratchpad-group*)<br />
(switch-to-group (second (screen-groups (current-screen))))<br />
(switch-to-group *scratchpad-group*))) <br />
<br />
(define-key *root-map* (kbd "M-SPC") "scratchpad")<br />
<br />
<br />
====Window Placement Rules====<br />
<br />
This is something that's not very well documented. You will find an example in the ''sample-stumpwmrc.lisp'' in your stumpwm-dir.<br />
<br />
First you have to "draw" you layout. This means that you have to create all the groups you want StumpWM to put your apps into.<br />
Then you have to run the command<br />
<br />
dump-desktop .foo<br />
<br />
in StumpWM's command prompt.<br />
<br />
You can restore your layout with<br />
<br />
restore .foo<br />
<br />
Now add the following line to your ''.stumpwmrc<br />
<br />
(run-commands "restore .foo")<br />
<br />
This restores your window configuration every time you boot up StumpWM, which is necessary for the placement rules to apply.<br />
<br />
Now you can add something like<br />
<br />
(define-frame-preference "Scratchpad"<br />
;; frame raise lock (lock AND raise == jumpto)<br />
(0 nil t :class "Emacs"))<br />
<br />
to your ''.stumpwmrc.<br />
Emacs will now be opened in your Scratchpad-Group.<br />
The "nil" makes sure that this is done in the background.<br />
<br />
<br />
====Stumpish====<br />
<br />
Another undocumented gimmick is stumpish, the STUMPwm Interactive SHell.<br />
You can find it in the contrib-directory of your stumpwm-dir.<br />
<br />
This way your shell can interact with Stumpwm.<br />
<br />
==Last Words==<br />
Have a nice time - and share your hacks and tweaks :)<br />
<br />
Talk to StumpWM-Users and -Developers on '''#stumpwm''' at '''irc.freenode.net'''.<br />
If you need help or don't understand my bad English, contact me: ''Theomachos'' on '''irc.freenode.net'''.</div>Theomachoshttps://wiki.archlinux.org/index.php?title=StumpWM&diff=34981StumpWM2008-01-13T10:26:28Z<p>Theomachos: StumpWM moved to Stumpwm</p>
<hr />
<div>#REDIRECT [[Stumpwm]]</div>Theomachoshttps://wiki.archlinux.org/index.php?title=Stumpwm&diff=34980Stumpwm2008-01-13T10:26:28Z<p>Theomachos: StumpWM moved to Stumpwm</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
<br />
==Introduction==<br />
<br />
StumpWM is a tiling (some people say "full-screen") Windowmanager written entirely in Common Lisp.<br />
The concept is based on its predecessor [[Ratpoison]] which behaves like a GNU/Screen for X.<br />
As a main difference StumpWM provides a REPL (Read-Evaluate-Print-Loop) which makes it your personal hacking-playground. <br />
<br />
From the [http://www.nongnu.org/stumpwm/ StumpWM-Homepage] :<br />
<br />
''If you're tired of flipping through themes like channel-surfing, and going from one perfect-except-for-just-one-thing window manager to another even-more-broken-in-some-other-way then perhaps Stumpwm can help.<br />
<br />
''Stumpwm attempts to be customizable yet visually minimal. There are no window decorations, no icons, and no buttons. It does have various hooks to attach your personal customizations, and variables to tweak.<br />
<br />
Seeing is believing: [http://www.archive.org/details/TheStumpWMExperience TheStumpWMExperience] (Better download the full ogg ! Flash is BAD quality !)<br />
<br />
==Installation==<br />
<br />
'''1. install SBCL'''<br />
<br />
pacman -S sbcl<br />
<br />
'''2. install clx 0.7.3-1 from [http://aur.archlinux.org/packages.php?do_Details=1&ID=12084&O=0&L=0&C=0&K=clx&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR]'''<br />
<br />
'''3. install cl-ppcre 1.3.2-1 from [http://aur.archlinux.org/packages.php?do_Details=1&ID=14549&O=0&L=0&C=0&K=cl-ppcre&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR]'''<br />
<br />
'''4. install Git'''<br />
<br />
pacman -S git<br />
<br />
'''5. get StumpWM from its git repository''' <br />
<br />
git clone git://git.savannah.nongnu.org/stumpwm.git<br />
<br />
Cd to your stumpwm-dir and run<br />
<br />
autoconf<br />
./configure && make<br />
<br />
This method has two advantages over the AUR-Package:<br />
<br />
1. You can edit the code and contribute to StumpWM's development.<br />
<br />
2. You can simply update your StumpWM by running<br />
<br />
git pull<br />
<br />
in the stumpwm-dir.<br />
<br />
'''6. Start Stumpwm'''<br />
<br />
StumpWM now provides a much simpler startup-method:<br />
Just add<br />
<br />
<path/to/stumpwm>/stumpwm<br />
<br />
to your .xinitrc.<br />
<br />
<br />
==Usage==<br />
<br />
StumpWM comes with a very good manual<br />
<br />
<path/to/stumpwm>stumpwm.texi<br />
<br />
to answer most of your questions.<br />
There's also a wiki at [http://stumpwm.antidesktop.net/ http://stumpwm.antidesktop.net/]<br />
<br />
<br />
==Tweaking==<br />
<br />
Here are just some extras for your $HOME/.stumpwmrc.<br />
<br />
You can find other code snippets at the wiki or at [http://paste.lisp.org/list/stumpwm?0 http://paste.lisp.org/list/stumpwm?0].<br />
<br />
====SLIME====<br />
<br />
A good way to hack StumpWM is Emacs + SLIME. [http://common-lisp.net/project/slime/ SLIME] is the Superior Lisp Interaction Mode for Emacs.<br />
You will get all the completion- and text-editing-power of Emacs for your StumpWM, IF....and only IF...you manage to run Slime.<br />
It's easy, but of all the googled solutions, only 2-3% would work....<br />
<br />
So here is a working solution:<br />
*Get SLIME and extract the archive wherever you want.<br />
*add the following lines to your ''.stumpwmrc<br />
(load "<path/to/slime>/swank-loader.lisp")<br />
(swank:create-server :dont-close t)<br />
*add the following lines to your ''.emacs<br />
(add-to-list 'load-path "<path/to/slime>") ; your SLIME directory<br />
(setq inferior-lisp-program "/usr/bin/sbcl") ; your Lisp system<br />
(require 'slime)<br />
(slime-setup)<br />
<br />
Now you can connect to your StumpWM-Session from within emacs by typing: "M-x slime-connect"<br />
For new SLIMErs: You have to enter (in-package stumpwm) before you can interact with the WM.<br />
<br />
====Scratchpad====<br />
<br />
ION3-users may miss the scratchpad-functionality. The solution is to define a new Group and access it with a key (thanks to male):<br />
<br />
(defvar *scratchpad-group* '()<br />
"Group of the scratchpad.")<br />
<br />
(define-stumpwm-command "scratchpad" ()<br />
(unless *scratchpad-group*<br />
;; Add the (hidden) scratchpad group and give it the special number 0<br />
(setf *scratchpad-group* (add-group (current-screen) "Scratchpad")<br />
(group-number *scratchpad-group*) 0))<br />
(if (eq (current-group) *scratchpad-group*)<br />
(switch-to-group (second (screen-groups (current-screen))))<br />
(switch-to-group *scratchpad-group*))) <br />
<br />
(define-key *root-map* (kbd "M-SPC") "scratchpad")<br />
<br />
<br />
====Window Placement Rules====<br />
<br />
This is something that's not very well documented. You will find an example in the ''sample-stumpwmrc.lisp'' in your stumpwm-dir.<br />
<br />
First you have to "draw" you layout. This means that you have to create all the groups you want StumpWM to put your apps into.<br />
Then you have to run the command<br />
<br />
dump-desktop .foo<br />
<br />
in StumpWM's command prompt.<br />
<br />
You can restore your layout with<br />
<br />
restore .foo<br />
<br />
Now add the following line to your ''.stumpwmrc<br />
<br />
(run-commands "restore .foo")<br />
<br />
This restores your window configuration every time you boot up StumpWM, which is necessary for the placement rules to apply.<br />
<br />
Now you can add something like<br />
<br />
(define-frame-preference "Scratchpad"<br />
;; frame raise lock (lock AND raise == jumpto)<br />
(0 nil t :class "Emacs"))<br />
<br />
to your ''.stumpwmrc.<br />
Emacs will now be opened in your Scratchpad-Group.<br />
The "nil" makes sure that this is done in the background.<br />
<br />
<br />
==Last Words==<br />
Have a nice time - and share your hacks and tweaks :)<br />
<br />
Talk to StumpWM-Users and -Developers on '''#stumpwm''' at '''irc.freenode.net'''.<br />
If you need help or don't understand my bad English, contact me: ''Theomachos'' on '''irc.freenode.net'''.</div>Theomachoshttps://wiki.archlinux.org/index.php?title=Stumpwm&diff=34961Stumpwm2008-01-12T16:12:37Z<p>Theomachos: </p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
<br />
==Introduction==<br />
<br />
StumpWM is a tiling (some people say "full-screen") Windowmanager written entirely in Common Lisp.<br />
The concept is based on its predecessor [[Ratpoison]] which behaves like a GNU/Screen for X.<br />
As a main difference StumpWM provides a REPL (Read-Evaluate-Print-Loop) which makes it your personal hacking-playground. <br />
<br />
From the [http://www.nongnu.org/stumpwm/ StumpWM-Homepage] :<br />
<br />
''If you're tired of flipping through themes like channel-surfing, and going from one perfect-except-for-just-one-thing window manager to another even-more-broken-in-some-other-way then perhaps Stumpwm can help.<br />
<br />
''Stumpwm attempts to be customizable yet visually minimal. There are no window decorations, no icons, and no buttons. It does have various hooks to attach your personal customizations, and variables to tweak.<br />
<br />
Seeing is believing: [http://www.archive.org/details/TheStumpWMExperience TheStumpWMExperience] (Better download the full ogg ! Flash is BAD quality !)<br />
<br />
==Installation==<br />
<br />
'''1. install SBCL'''<br />
<br />
pacman -S sbcl<br />
<br />
'''2. install clx 0.7.3-1 from [http://aur.archlinux.org/packages.php?do_Details=1&ID=12084&O=0&L=0&C=0&K=clx&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR]'''<br />
<br />
'''3. install cl-ppcre 1.3.2-1 from [http://aur.archlinux.org/packages.php?do_Details=1&ID=14549&O=0&L=0&C=0&K=cl-ppcre&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR]'''<br />
<br />
'''4. install Git'''<br />
<br />
pacman -S git<br />
<br />
'''5. get StumpWM from its git repository''' <br />
<br />
git clone git://git.savannah.nongnu.org/stumpwm.git<br />
<br />
Cd to your stumpwm-dir and run<br />
<br />
autoconf<br />
./configure && make<br />
<br />
This method has two advantages over the AUR-Package:<br />
<br />
1. You can edit the code and contribute to StumpWM's development.<br />
<br />
2. You can simply update your StumpWM by running<br />
<br />
git pull<br />
<br />
in the stumpwm-dir.<br />
<br />
'''6. Start Stumpwm'''<br />
<br />
StumpWM now provides a much simpler startup-method:<br />
Just add<br />
<br />
<path/to/stumpwm>/stumpwm<br />
<br />
to your .xinitrc.<br />
<br />
<br />
==Usage==<br />
<br />
StumpWM comes with a very good manual<br />
<br />
<path/to/stumpwm>stumpwm.texi<br />
<br />
to answer most of your questions.<br />
There's also a wiki at [http://stumpwm.antidesktop.net/ http://stumpwm.antidesktop.net/]<br />
<br />
<br />
==Tweaking==<br />
<br />
Here are just some extras for your $HOME/.stumpwmrc.<br />
<br />
You can find other code snippets at the wiki or at [http://paste.lisp.org/list/stumpwm?0 http://paste.lisp.org/list/stumpwm?0].<br />
<br />
====SLIME====<br />
<br />
A good way to hack StumpWM is Emacs + SLIME. [http://common-lisp.net/project/slime/ SLIME] is the Superior Lisp Interaction Mode for Emacs.<br />
You will get all the completion- and text-editing-power of Emacs for your StumpWM, IF....and only IF...you manage to run Slime.<br />
It's easy, but of all the googled solutions, only 2-3% would work....<br />
<br />
So here is a working solution:<br />
*Get SLIME and extract the archive wherever you want.<br />
*add the following lines to your ''.stumpwmrc<br />
(load "<path/to/slime>/swank-loader.lisp")<br />
(swank:create-server :dont-close t)<br />
*add the following lines to your ''.emacs<br />
(add-to-list 'load-path "<path/to/slime>") ; your SLIME directory<br />
(setq inferior-lisp-program "/usr/bin/sbcl") ; your Lisp system<br />
(require 'slime)<br />
(slime-setup)<br />
<br />
Now you can connect to your StumpWM-Session from within emacs by typing: "M-x slime-connect"<br />
For new SLIMErs: You have to enter (in-package stumpwm) before you can interact with the WM.<br />
<br />
====Scratchpad====<br />
<br />
ION3-users may miss the scratchpad-functionality. The solution is to define a new Group and access it with a key (thanks to male):<br />
<br />
(defvar *scratchpad-group* '()<br />
"Group of the scratchpad.")<br />
<br />
(define-stumpwm-command "scratchpad" ()<br />
(unless *scratchpad-group*<br />
;; Add the (hidden) scratchpad group and give it the special number 0<br />
(setf *scratchpad-group* (add-group (current-screen) "Scratchpad")<br />
(group-number *scratchpad-group*) 0))<br />
(if (eq (current-group) *scratchpad-group*)<br />
(switch-to-group (second (screen-groups (current-screen))))<br />
(switch-to-group *scratchpad-group*))) <br />
<br />
(define-key *root-map* (kbd "M-SPC") "scratchpad")<br />
<br />
<br />
====Window Placement Rules====<br />
<br />
This is something that's not very well documented. You will find an example in the ''sample-stumpwmrc.lisp'' in your stumpwm-dir.<br />
<br />
First you have to "draw" you layout. This means that you have to create all the groups you want StumpWM to put your apps into.<br />
Then you have to run the command<br />
<br />
dump-desktop .foo<br />
<br />
in StumpWM's command prompt.<br />
<br />
You can restore your layout with<br />
<br />
restore .foo<br />
<br />
Now add the following line to your ''.stumpwmrc<br />
<br />
(run-commands "restore .foo")<br />
<br />
This restores your window configuration every time you boot up StumpWM, which is necessary for the placement rules to apply.<br />
<br />
Now you can add something like<br />
<br />
(define-frame-preference "Scratchpad"<br />
;; frame raise lock (lock AND raise == jumpto)<br />
(0 nil t :class "Emacs"))<br />
<br />
to your ''.stumpwmrc.<br />
Emacs will now be opened in your Scratchpad-Group.<br />
The "nil" makes sure that this is done in the background.<br />
<br />
<br />
==Last Words==<br />
Have a nice time - and share your hacks and tweaks :)<br />
<br />
Talk to StumpWM-Users and -Developers on '''#stumpwm''' at '''irc.freenode.net'''.<br />
If you need help or don't understand my bad English, contact me: ''Theomachos'' on '''irc.freenode.net'''.</div>Theomachoshttps://wiki.archlinux.org/index.php?title=Stumpwm&diff=34960Stumpwm2008-01-12T16:11:30Z<p>Theomachos: New page: Category:Desktop environments (English) Category:HOWTOs (English) ==Introduction== StumpWM is a tiling (some people say "full-screen") Windowmanager written entirely in Common L...</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
<br />
==Introduction==<br />
<br />
StumpWM is a tiling (some people say "full-screen") Windowmanager written entirely in Common Lisp.<br />
The concept is based on its predecessor [[Ratpoison]] which behaves like a GNU/Screen for X.<br />
As a main difference StumpWM provides a REPL (Read-Evaluate-Print-Loop) which makes it your personal hacking-playground. <br />
<br />
From the [http://www.nongnu.org/stumpwm/ StumpWM-Homepage] :<br />
<br />
''If you're tired of flipping through themes like channel-surfing, and going from one perfect-except-for-just-one-thing window manager to another even-more-broken-in-some-other-way then perhaps Stumpwm can help.<br />
<br />
''Stumpwm attempts to be customizable yet visually minimal. There are no window decorations, no icons, and no buttons. It does have various hooks to attach your personal customizations, and variables to tweak.<br />
<br />
Seeing is believing: [http://www.archive.org/details/TheStumpWMExperience TheStumpWMExperience] (Better download the full ogg ! Flash is BAD quality !)<br />
<br />
==Installation==<br />
<br />
'''1. install SBCL'''<br />
<br />
pacman -S sbcl<br />
<br />
'''2. install clx 0.7.3-1 from [http://aur.archlinux.org/packages.php?do_Details=1&ID=12084&O=0&L=0&C=0&K=clx&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR]'''<br />
<br />
'''3. install cl-ppcre 1.3.2-1 from [http://aur.archlinux.org/packages.php?do_Details=1&ID=14549&O=0&L=0&C=0&K=cl-ppcre&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR]'''<br />
<br />
'''4. install Git (minimal pairs are nice... :) )'''<br />
<br />
pacman -S git<br />
<br />
'''5. get StumpWM from its git repository''' <br />
<br />
git clone git://git.savannah.nongnu.org/stumpwm.git<br />
<br />
Cd to your stumpwm-dir and run<br />
<br />
autoconf<br />
./configure && make<br />
<br />
This method has two advantages over the AUR-Package:<br />
<br />
1. You can edit the code and contribute to StumpWM's development.<br />
<br />
2. You can simply update your StumpWM by running<br />
<br />
git pull<br />
<br />
in the stumpwm-dir.<br />
<br />
'''6. Start Stumpwm'''<br />
<br />
StumpWM now provides a much simpler startup-method:<br />
Just add<br />
<br />
<path/to/stumpwm>/stumpwm<br />
<br />
to your .xinitrc.<br />
<br />
<br />
==Usage==<br />
<br />
StumpWM comes with a very good manual<br />
<br />
<path/to/stumpwm>stumpwm.texi<br />
<br />
to answer most of your questions.<br />
There's also a wiki at [http://stumpwm.antidesktop.net/ http://stumpwm.antidesktop.net/]<br />
<br />
<br />
==Tweaking==<br />
<br />
Here are just some extras for your $HOME/.stumpwmrc.<br />
<br />
You can find other code snippets at the wiki or at [http://paste.lisp.org/list/stumpwm?0 http://paste.lisp.org/list/stumpwm?0].<br />
<br />
====SLIME====<br />
<br />
A good way to hack StumpWM is Emacs + SLIME. [http://common-lisp.net/project/slime/ SLIME] is the Superior Lisp Interaction Mode for Emacs.<br />
You will get all the completion- and text-editing-power of Emacs for your StumpWM, IF....and only IF...you manage to run Slime.<br />
It's easy, but of all the googled solutions, only 2-3% would work....<br />
<br />
So here is a working solution:<br />
*Get SLIME and extract the archive wherever you want.<br />
*add the following lines to your ''.stumpwmrc<br />
(load "<path/to/slime>/swank-loader.lisp")<br />
(swank:create-server :dont-close t)<br />
*add the following lines to your ''.emacs<br />
(add-to-list 'load-path "<path/to/slime>") ; your SLIME directory<br />
(setq inferior-lisp-program "/usr/bin/sbcl") ; your Lisp system<br />
(require 'slime)<br />
(slime-setup)<br />
<br />
Now you can connect to your StumpWM-Session from within emacs by typing: "M-x slime-connect"<br />
For new SLIMErs: You have to enter (in-package stumpwm) before you can interact with the WM.<br />
<br />
====Scratchpad====<br />
<br />
ION3-users may miss the scratchpad-functionality. The solution is to define a new Group and access it with a key (thanks to male):<br />
<br />
(defvar *scratchpad-group* '()<br />
"Group of the scratchpad.")<br />
<br />
(define-stumpwm-command "scratchpad" ()<br />
(unless *scratchpad-group*<br />
;; Add the (hidden) scratchpad group and give it the special number 0<br />
(setf *scratchpad-group* (add-group (current-screen) "Scratchpad")<br />
(group-number *scratchpad-group*) 0))<br />
(if (eq (current-group) *scratchpad-group*)<br />
(switch-to-group (second (screen-groups (current-screen))))<br />
(switch-to-group *scratchpad-group*))) <br />
<br />
(define-key *root-map* (kbd "M-SPC") "scratchpad")<br />
<br />
<br />
====Window Placement Rules====<br />
<br />
This is something that's not very well documented. You will find an example in the ''sample-stumpwmrc.lisp'' in your stumpwm-dir.<br />
<br />
First you have to "draw" you layout. This means that you have to create all the groups you want StumpWM to put your apps into.<br />
Then you have to run the command<br />
<br />
dump-desktop .foo<br />
<br />
in StumpWM's command prompt.<br />
<br />
You can restore your layout with<br />
<br />
restore .foo<br />
<br />
Now add the following line to your ''.stumpwmrc<br />
<br />
(run-commands "restore .foo")<br />
<br />
This restores your window configuration every time you boot up StumpWM, which is necessary for the placement rules to apply.<br />
<br />
Now you can add something like<br />
<br />
(define-frame-preference "Scratchpad"<br />
;; frame raise lock (lock AND raise == jumpto)<br />
(0 nil t :class "Emacs"))<br />
<br />
to your ''.stumpwmrc.<br />
Emacs will now be opened in your Scratchpad-Group.<br />
The "nil" makes sure that this is done in the background.<br />
<br />
<br />
==Last Words==<br />
Have a nice time - and share your hacks and tweaks :)<br />
<br />
Talk to StumpWM-Users and -Developers on '''#stumpwm''' at '''irc.freenode.net'''.<br />
If you need help or don't understand my bad English, contact me: ''Theomachos'' on '''irc.freenode.net'''.</div>Theomachos