https://wiki.archlinux.org/api.php?action=feedcontributions&user=Andrew.antle&feedformat=atomArchWiki - User contributions [en]2024-03-29T05:18:49ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=User:Andrew.antle&diff=76323User:Andrew.antle2009-09-23T20:52:55Z<p>Andrew.antle: Added links</p>
<hr />
<div>Interests:<br />
<br />
* asciidoc<br />
* [[conky]]<br />
* [[dmenu]]<br />
* [[dwm]]<br />
* [[Haskell_package_guidelines|haskell]]<br />
* latex<br />
* [[lighttpd]]<br />
* mashpodder<br />
* [[mutt]]<br />
* newsbeuter<br />
* [http://suckless.org suckless]<br />
* surf<br />
* [http://www.uzbl.org uzbl]<br />
* [[vim]]<br />
* vimperator<br />
* [[xmonad]]</div>Andrew.antlehttps://wiki.archlinux.org/index.php?title=User:Andrew.antle&diff=76210User:Andrew.antle2009-09-19T21:36:33Z<p>Andrew.antle: Initial import</p>
<hr />
<div>Interests:<br />
<br />
* asciidoc<br />
* conky<br />
* dmenu<br />
* dwm<br />
* haskell<br />
* latex<br />
* lighttpd<br />
* mashpodder<br />
* mutt<br />
* newsbeuter<br />
* suckless<br />
* surf<br />
* uzbl<br />
* vim<br />
* vimperator<br />
* xmonad</div>Andrew.antlehttps://wiki.archlinux.org/index.php?title=Xmonad&diff=76209Xmonad2009-09-19T20:59:02Z<p>Andrew.antle: /* Complementary Applications */ Updated 'dmenu' link to 'tools.suckless.org/dmenu'</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|Xmonad}}<br />
{{i18n_entry|Türkçe|Xmonad (Türkçe)}}<br />
{{i18n_links_end}}<br />
== Introduction ==<br />
<br />
[http://xmonad.org/ xmonad] is a tiling window manager for X. Windows are arranged automatically to tile the screen without gaps or overlap, maximizing screen use. Window manager features are accessible from the keyboard: a mouse is optional. <br />
<br />
xmonad is written, configured and extensible in [http://haskell.org/ Haskell]. Custom layout algorithms, key bindings and other extensions may be written by the user in config files. <br />
<br />
Layouts are applied dynamically, and different layouts may be used on each workspace. [[Xinerama]] is fully supported, allowing windows to be tiled on several physical screens.<br />
<br />
For more information, please visit the xmonad website: http://xmonad.org/<br />
<br />
== Installation ==<br />
<br />
xmonad is currently available in the community repo. A build for the current development snapshot (darcs) is in the [http://aur.archlinux.org/ aur]. The following instructions are for xmonad-darcs, the development snapshot.<br />
<br />
=== Development Version (xmonad-darcs) ===<br />
<br />
The xmonad-darcs development version can be installed from the AUR, with some additional dependencies in [community]. Install them in the following order:<br />
<br />
* [http://aur.archlinux.org/packages.php?ID=12483 xmonad-darcs] - the core window manager<br />
* [http://aur.archlinux.org/packages.php?ID=13652 xmonad-contrib-darcs] - contributed extensions providing custom layouts, configurations, etc.<br />
<br />
== Configuration ==<br />
<br />
=== Starting xmonad ===<br />
To start xmonad automatically, simply add the command '''exec xmonad''' to your startup script (e.g. ~/.xinitrc). GDM and KDM users can create a new session file and then select xmonad from the appropriate Session menu.<br />
<br />
''Note:'' by default, xmonad does not set an X cursor, therefore the "cross" cursor is usually displayed which can be confusing for new users (thinking that xmonad has not launched correctly). To set the expected left-pointer, add the following to your startup file (e.g. ~/.xinitrc):<br />
<br />
xsetroot -cursor_name left_ptr<br />
<br />
Example .xinitrc :<br />
# set the cursor<br />
xsetroot -cursor_name left_ptr<br />
# start XMonad<br />
exec ck-launch-session xmonad<br />
<br />
=== Configuring xmonad ===<br />
<br />
Xmonad users can modify, override or extend the default settings with the ~/.xmonad/xmonad.hs configuration file. Recompiling is done on the fly, with the Mod+q shortcut.<br />
<br />
If you find you do not have a directory at ~/.xmonad, run xmonad --recompile to create it. <br />
<br />
The "default config" for xmonad is quite usuable and it is achieved by simply running without an xmonad.hs entirely. Therefore, even after you run --recompile you will most likely not have an ~/.xmonad/xmonad.hs file. If you would like to start tweaking things, simply create the file and edit it as described below. <br />
<br />
Because the xmonad configuration file is written in Haskell, non-programmers may have a difficult time adjusting settings. For detailed HOWTO's and example configs, we refer you to the following resources:<br />
<br />
* [http://haskell.org/haskellwiki/Xmonad xmonad wiki]<br />
* [http://haskell.org/haskellwiki/Xmonad/Config_archive xmonad config archive]<br />
* [http://haskell.org/haskellwiki/Xmonad/Frequently_asked_questions xmonad FAQ]<br />
<br />
The best approach is to only place your changes and customizations in ~/.xmonad/xmonad.hs and write it such that any unset parameters are picked up from the built-in defaultConfig. <br />
<br />
This is achieved by writing an xmonad.hs like this:<br />
<br />
import XMonad<br />
<br />
main = do<br />
xmonad $ defaultConfig<br />
{ terminal = "urxvt"<br />
, modMask = mod4Mask<br />
, borderWidth = 3<br />
}<br />
<br />
This simply overrides the default terminal and borderwidth while leaving all other settings as their defaults (inherited from the function defaultConfig).<br />
<br />
As things get more complicated, it can be handy to call configuration options by function name inside the main function, and define these separately in their own sections of your xmonad.hs. This makes large customizations like your layout and manage hooks easier to visualize and maintain.<br />
<br />
The above simple xmonad.hs could have been written like this:<br />
<br />
import XMonad<br />
<br />
main = do<br />
xmonad $ defaultConfig<br />
{ terminal = myTerminal<br />
, modMask = myModMask<br />
, borderWidth = myBorderWidth<br />
}<br />
<br />
-- yes, these are functions; just very simple ones<br />
-- that accept no input and return static values<br />
myTerminal = "urxvt"<br />
myModMask = mod4Mask -- Win key or Super_L<br />
myBorderWidth = 3<br />
<br />
Also, functional order does not matter, you could have declared myTerminal and myBorderWidth above or below its use main. However, any import lines need to come first.<br />
<br />
=== Exiting xmonad ===<br />
To end the current xmonad session, press Mod+SHIFT+q (Mod being ALT by default).<br />
<br />
== Tips & Tricks ==<br />
=== Complementary Applications ===<br />
There are number of complementary utilities that work well with Xmonad. The most common of these include:<br />
<br />
* [http://tools.suckless.org/dmenu dmenu]<br />
* [[Xmobar]]<br />
* [[Dzen]] <br />
* [[Conky]] and [http://aur.archlinux.org/packages.php?ID=11884 conky-cli]<br />
* Unclutter - an small utility to hide the mouse pointer ( pacman -S unclutter and at 'unclutter&' to .xinitrc )<br />
<br />
=== Making room for conky or tray apps ===<br />
Wrap your layouts with avoidStruts from XMonad.Hooks.ManageDocks for automatic dock/panel/trayer spacing:<br />
<br />
import XMonad<br />
import XMonad.Hooks.ManageDocks<br />
<br />
main = do<br />
xmonad $ defaultConfig<br />
{ ...<br />
, layoutHook = avoidStruts $ Tall ||| Wide ||| Full<br />
, manageHook = manageHook defaultConfig <+> manageDocks<br />
, ...<br />
}<br />
<br />
If you ever want to toggle the gaps, this action can be added to your key bindings:<br />
,((modMask x, xK_b ), sendMessage ToggleStruts)<br />
<br />
=== Using [[xmobar]] with xmonad ===<br />
[[Xmobar]] is a light and minimalistic text based bar, designed to work with xmonad.<br><br />
To use xmobar with xmonad, you will need two packages in addition to the xmonad package, these are xmonad-contrib from [community] and xmobar or [http://aur.archlinux.org/packages.php?ID=13627 xmobar-darcs from aur].<br />
<br />
Here we will start xmobar from within xmonad, which reloads xmobar whenever you reload xmonad.<br />
<br />
Open up <tt>~/.xmonad/xmonad.hs</tt> in your favorite editor, and choose one of the two following options:<br />
<br />
===== Option 1. Quick, less flexible, different in darcs =====<br />
Note: there is also a <tt>dzen</tt> which you can substitute for <tt>xmobar</tt> in either case.<br />
<br />
Common imports:<br />
<br />
import XMonad<br />
import XMonad.Hooks.DynamicLog<br />
<br />
The xmobar action starts xmobar and returns a modified config that includes all the options described in the [[Xmonad#Option 2. More Configurable]] choice.<br />
<br />
-- main for darcs (>0.8.1)<br />
main = xmonad =<< xmobar myConfig<br />
myConfig = defaultConfig { modMask = mod4Mask, -- or any other configurations here ... }<br />
<br />
-- main for (<=0.8.1)<br />
main = xmobar (xmonad . modifyConfig)<br />
modifyConfig x = x { modMask = mod4Mask, ...}<br />
<br />
===== Option 2. More Configurable =====<br />
Threading the Handle manually also <b>requires you to:</b> [[Xmonad#Making room for conky or tray apps]]. With this method you have access to xmobarPP, so you could change the formatting (ex. change colors or field separators).<br />
<br />
First, we need to import three modules, IO, the DynamicLog and the Run utility. The logger is used to format and print various information about xmonad, like the workspaces, the title of the current window, the current layout and more. The two others are neede to run xmobar with a pipe, and to print the output of the logger to it.<br />
import IO<br />
import XMonad<br />
import XMonad.Hooks.DynamicLog<br />
import XMonad.Util.Run<br />
<br />
Now, on to the main function. There are several loggers you can use and you can also create your own. In this example, we will use xmobarPP, for details read the documentation on [http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Hooks-DynamicLog.html XMonad.Hooks.DynamicLog].<br><br />
The important thing here, is that we have to overide the ppOutput, else it will just print to stdout.<br />
main = do<br />
xmobar <- spawnPipe "xmobar" -- spawns xmobar and returns a handle<br />
xmonad $ defaultConfig <br />
{ ...<br />
, logHook = dynamicLogWithPP $ xmobarPP { ppOutput = hPutStrLn xmobar } -- print the output of xmobarPP to the handle<br />
, ...<br />
}<br />
<br />
====== Verify XMobar Config ======<br />
<br />
The template and default xmobarrcs contains this.<br />
<br />
At last, open up <tt>~/.xmobarrc</tt> and make sure you got StdinReader in the template and run the plugin. E.g.<br />
Config { ...<br />
, commands = [ Run StdinReader .... ] <br />
...<br />
, template = " %StdinReader% ... "<br />
}<br />
Now, all you should have to do is either to start, or restart xmonad.<br />
<br />
=== Example Configurations ===<br />
Below are some example configurations from fellow Xmonad users. Feel free to add links to your own.<br />
* MrElendig :: Simple configuration, with xmobar :: [http://arch.har-ikkje.net/configs/home/dot.xmonad/xmonad.hs xmonad.hs], [http://arch.har-ikkje.net/configs/home/dot.xmobarrc .xmobarrc], [http://arch.har-ikkje.net/gfx/ss/2008-11-15-161451_1680x1050_scrot.png screenshot].<br />
* hsa2 :: Simple configuration, with xmobar :: [http://www.difuzyon.net/linked/configs/xmonad.hs xmonad.hs], [http://www.difuzyon.net/linked/configs/dot.xmobarrc .xmobarrc].<br />
* jelly :: Configuration with prompt, different layouts, twinview with xmobar :: [http://github.com/jelly/dotfiles/tree/master/.xmonad/xmonad.hs xmonad.hs], [http://github.com/jelly/dotfiles/tree/master/.xmobarrc .xmonbarrc]<br />
* vogt :: Check adamvo's config, and others in the [http://haskell.org/haskellwiki/Xmonad/Config_archive xmonad config archive]<br />
* brisbin33 :: always changing (xmonad-darcs req'd), status bar[s], imLayout, very readable :: [http://pbrisbin:8080/dotfiles/xmonad.hs config] [http://pbrisbin.com:8080/desktops.html screenshots]<br />
<br />
== Troubleshooting ==<br />
=== GDM can't find Xmonad ===<br />
You can force GDM to launch xmonad by creating the file xmonad.desktop in the /usr/share/xsession directory and add the contents:<br />
<br />
[Desktop Entry]<br />
Encoding=UTF-8<br />
Name=xmonad<br />
Comment=This session starts xmonad<br />
Exec=/usr/bin/xmonad<br />
Type=Application<br />
<br />
Now xmonad will show in your GDM session menu. Thanks to [http://santanuchatterjee.blogspot.com/2009/03/making-xmonad-to-show-up-in-gdm-session.html Santanu Chatterjee] for the hint.<br />
<br />
=== xmonad-i386-linux missing ===<br />
Xmonad should automatically create the xmonad-i386-linux file (in $HOME/.xmonad/). If this it not the case you can grab a cool looking config file from the [http://haskell.org/haskellwiki/Xmonad/Config_archive xmonad wiki] or create your [http://haskell.org/haskellwiki/Xmonad/Config_archive/John_Goerzen's_Configuration own]. Put the .hs and all others files in .xmonad/ and run the command from the folder:<br />
<br />
xmonad --recompile<br />
<br />
Now you should see the file.<br />
<br />
== Other Resources ==<br />
[http://xmonad.org/ xmonad] -- The official xmonad website<br />
<br />
[http://haskell.org/haskellwiki/Xmonad/Config_archive/Template_xmonad.hs_%280.8%29 xmonad.hs] -- Original xmonad.hs<br />
<br />
[http://xmonad.org/tour.html xmonad: a guided tour]<br />
<br />
[[dzen]] -- A general purpose messaging and notification program<br />
<br />
[[dmenu]] -- A dynamic X menu for the quick launching of programs<br />
<br />
[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]</div>Andrew.antle