Difference between revisions of "Xmonad/General xmonad.hs config tips"

From HaskellWiki
Jump to: navigation, search
m (Xmonad/General xmonad.hs config tipps moved to Xmonad/General xmonad.hs config tips)
(sp)
Line 1: Line 1:
This site is for general tipps for configuring xmonad.hs, for example "How to make window ''X'' float by default" and others. If you can't find what you're searching for, you may want to look at the [[Xmonad/Config_archive|Config archive]].
+
This site is for general tips for configuring xmonad.hs, for example "How to make window ''X'' float by default" and others. If you can't find what you're searching for, you may want to look at the [[Xmonad/Config_archive|Config archive]].
   
Please add what you found usefull in your xmonad.hs and course improving existing tipps or adding alternatives is highly appreciated!
+
Please add what you found useful in your xmonad.hs and course improving existing tips or adding alternatives is highly appreciated!
   
 
== Making window float by default, or send it to specific workspace ==
 
== Making window float by default, or send it to specific workspace ==

Revision as of 22:22, 3 December 2007

This site is for general tips for configuring xmonad.hs, for example "How to make window X float by default" and others. If you can't find what you're searching for, you may want to look at the Config archive.

Please add what you found useful in your xmonad.hs and course improving existing tips or adding alternatives is highly appreciated!

Making window float by default, or send it to specific workspace

This example sends Firefox to workspace "web" by default, makes Gajim float and sends it to webspace "jabber" and Xmessage is floating by default, too.

  main = xmonad $ defaultConfig
  {
  ....
  , manageHook    = manageHook defaultConfig <+> myManageHook
  ...
  }
  myManageHook :: ManageHook
  myManageHook = composeAll . concat $
      [ [ className =? c --> doFloat | c <- myFloats ]
      , [ className =? "Firefox-bin" --> doF (W.shift "web" ) ]
      , [ className =? "Gajim.py" --> doF (W.shift "jabber" ) ] ]
      where myFloats = ["Gajim.py", "Xmessage"]

Adding your own keybindings

This adds Mod-x keybinding for running xlock.

  main = xmonad $ defaultConfig
  {
  ....
  , keys          = \c -> mykeys c `M.union` keys defaultConfig c }
  ....
  }
  where
      mykeys (XConfig {modMask = modm}) = M.fromList $
           [ ((modm , xK_x), spawn "xlock") ]