[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howtos:window_managers:xmonad_tiling_window_manager [2012/10/26 23:37 (UTC)] – typo markushhowtos:window_managers:xmonad_tiling_window_manager [2012/12/20 03:16 (UTC)] (current) – [Sources] added author tag mfillpot
Line 1: Line 1:
 <!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> <!-- Add your text below. We strongly advise to start with a Headline (see button bar above). -->
-====Xmonad as a Windowmanager for Slackware====+=====Xmonad as a Windowmanager for Slackware=====
  
-Xmonad is a tiling windowmanager, for information about tiling windowmanagers please read this wiki: [[http://en.wikipedia.org/wiki/Tiling_window_manager|wikipedia]]+Xmonad is a tiling [[slackware:window_manager|window manager]]. For information about tiling window managers please read this wiki: [[http://en.wikipedia.org/wiki/Tiling_window_manager|wikipedia]]
  
-For Xmonad read here [[http://xmonad.org/|xmonad.org]]+For Xmonad read [[http://xmonad.org/|here]]
  
-===Required packages=== +===== Required packages ===== 
-Xmonad is not included in Slackware by default, but available via slackbuilds.org. Xmonad is written in Haskell and therefore some packages of the Haskell-series are required in order to build Xmonad.  +Xmonad is not included in Slackware by default, but available via [[http://slackbuilds.org/desktop/xmonad/|SlackBuilds.org]]. Xmonad is written in Haskell and therefore some packages of the Haskell series are required in order to build Xmonad.  
-Here the packages in the correct order:+Here are the packages in the correct build order:
   -ghc (the glasgow-haskell-compiler)   -ghc (the glasgow-haskell-compiler)
   -haskell-syb   -haskell-syb
Line 23: Line 23:
   -haskell-text   -haskell-text
   -haskell-parsec   -haskell-parsec
-  -xmobar  +  -xmobar   (provides a statusbar) 
-would also recommend to install dwm and trayer (note that trayer is not yet available via slackbuilds.org, but I'm considering to write a slackbuild-script).+have additionally installed [[http://slackbuilds.org/desktop/dmenu/|dmenu]] which is integrated into the statusbar and starts programs (like gmrun). I have also installed ''trayer'' which provides a systray in the statusbar. Unfortunately ''trayer'' is only available as an rpm-package. I wanted to write a SlackBuild script for it, but the sources are incomplete. Another tray is [[http://slackbuilds.org/desktop/stalonetray/|stalonetray]] which is available via SlackBuilds.org.
  
-===Configuration of Xmonad=== +===== Configuration of Xmonad ===== 
-After building and installing the above packages you can configure Xmonad +After building and installing the above packages you can configure Xmonad. One remarkable feature of xmonad as well as xmobar is that it is not only written in the functional language Haskell, but also the configuration is a Haskell file. This makes it a bit difficult to understand the configuration files if one doesn't know Haskell. Well, I once tried to learn Haskell but (yet) without success. 
-==.xinitrc== + 
-the following sections of my .xinitrc configure dbus, the mousepointer and trayer, then xmonad is started +At first one has to configure ''.xinitrc'' in order to start Xmonad correctly when changing from runlevel 3 to 4. 
-<code>+ 
 +==== .xinitrc ==== 
 +the following sections of my ''.xinitrc'' configure ''dbus'', the mouse pointer and ''trayer'', then xmonad is started 
 +<code bash>
 # Use dbus-launch if installed. # Use dbus-launch if installed.
 if test x"$DBUS_SESSION_BUS_ADDRESS" = x""; then if test x"$DBUS_SESSION_BUS_ADDRESS" = x""; then
Line 46: Line 49:
 </code> </code>
  
-==Configuring xmobar== +==== .xmobarrc ==== 
-xmobar displays useful information, in my case in the top-part of the desktop. Here an example for the file .xmobarrc +xmobar is a statusbar and displays useful information, in my case in the top part of the desktop. Below is an example of my ''.xmobarrc'': 
-<code>+<code haskell>
 Config { font = "-misc-fixed-bold-R-normal-*-13-*-*-*-*-*-*-*" Config { font = "-misc-fixed-bold-R-normal-*-13-*-*-*-*-*-*-*"
     , bgColor = "#1074EA"     , bgColor = "#1074EA"
Line 64: Line 67:
           , Run Memory ["-t","Mem: <usedratio>%"] 10           , Run Memory ["-t","Mem: <usedratio>%"] 10
           , Run Swap [] 10           , Run Swap [] 10
-          , Run Date "%a %d. %B %H:%M Uhr" "LC_TIME=date" 10+          , Run Date "%a %d. %B %H:%M Uhr" "LC_TIME=de_DE date" 10
           , Run StdinReader           , Run StdinReader
           ]           ]
Line 72: Line 75:
     }     }
 </code> </code>
-for an explanation please read the manuals.+The first lines configure the font, foreground/background-colors and the position on the screen. The rest configures the information which should be shown in xmobar, battery-state, CPU-load, CPU-frequency, Memory-usage and Swap-usage, the date. Note that ''LC_TIME=de_DE date'' forces the date command to use the language defined in ''LC_TIME'' (German in my case).
  
-==xmonad.hs== +For further explanation please read the manuals.
-Here as an example my ~/.xmonad/xmonad.hs file +
-<code>+
  
 +==== xmonad.hs ====
 +Here is an example of my ''~/.xmonad/xmonad.hs'' file
 +<code haskell>
 import XMonad import XMonad
 import XMonad.Hooks.DynamicLog import XMonad.Hooks.DynamicLog
Line 104: Line 108:
     ] ]     ] ]
 </code> </code>
-Please read the documentation for xmonad.hs, this is only an example (which works well for me).+Please read the documentation for ''xmonad.hs''. This is only an example (which works well for me)
 + 
 +===== Additional Hints ===== 
 +One can reload the configurations for xmobar and/or xmonad after changes with <key>MOD</key>+<key>'q'</key> without leaving X. This is very useful. 
 + 
 +When using a tiling window manager one experiences that some applications behave unusual. In my ''xmonad.hs'' file above you see ''Vlc'' and ''Gimp'' in the list of programs which should float. In order to find out the so called ''Classname'' of the application (through which the application can be detected by the window manager) there is a script in the xmonad-contrib package. You can find it in ''/usr/share/doc/xmonad-contrib-0.10/scripts/'' directory.
  
-===Additional Hints=== 
-When using a tiling windowmanager one experiences that some applications behave unusual. In my above xmonad.hs you see Vlc and Gimp in the List of programs which should float. In order to find out the so called "Classname" of the application (through which the application can be detected by the windowmanager, there is a script in the xmonad-contrib package. You can find it in ''/usr/share/doc/xmonad-contrib-0.10/scripts/'' directory. 
 ====== Sources ====== ====== Sources ======
 <!-- If you are copying information from another source, then specify that source --> <!-- If you are copying information from another source, then specify that source -->
 <!-- * Original source: [[http://some.website.org/some/page.html]] --> <!-- * Original source: [[http://some.website.org/some/page.html]] -->
 <!-- Authors are allowed to give credit to themselves! --> <!-- Authors are allowed to give credit to themselves! -->
-* Originally written by [[wiki:user:markush]]+  * Originally written by [[wiki:user:markush|Markus Hutmacher]]
 <!-- * Contributions by [[wiki:user:yyy | User Y]] --> <!-- * Contributions by [[wiki:user:yyy | User Y]] -->
  
 <!-- Please do not modify anything below, except adding new tags.--> <!-- Please do not modify anything below, except adding new tags.-->
 <!-- You must remove the tag-word "template" below before saving your new page --> <!-- You must remove the tag-word "template" below before saving your new page -->
-{{tag>howtos windowmanager tiling-windowmanager haskell xmonad}}+{{tag>howtos windowmanager tiling-windowmanager haskell xmonad author_markush }}
 howtos:window_managers:xmonad_tiling_window_manager ()