Topic: My Xmonad Adventures

as this forum section is not just for openbox anymore,

i thought i'd start a thread for what is once again, my favorite window manager...  Xmonad.


my story.
so i'm only a couple days back in to using xmonad, and thanks to my previous experience with it, my xmonad.hs config file is already looking pretty robust and useful.

i want to keep the default xmonad controls (nearly... i change the mod key to the tux/win/super key), and incorporate a load of my keyboard shortcuts i've been using in openbox.   there are areas where i have to move my shortcuts though, as q, w, e, r, t, h, j, k, and l, are all taken up.
{edit, realised it's easier to start from scratch and do it manually, working around the key conflicts, than my previous notion)

i have been fidling with more advanced frankenstein-ery, and even managed to cause a couple of epic crashes.   which rather than annoy me, impressed me.  XD  i dont recall achieving that in xmonad before. lol.

anyways, here's my current stable xmonad.hs

(-edit, it's not a perfectly working xmonad.hs... i still need to get the managehook added to the "main = do")

import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO

-- created with help of: http://www.haskell.org/haskellwiki/Xmonad/Config_archive/John_Goerzen%27s_Configuration
-- use "xmonad --recompile" to check it's syntactically correct if making changes (better than just modQ)
    -- list of key codes http://haskell.org/haskellwiki/Xmonad/Key_codes
    -- may also prove useful for some keys and commands http://hackage.haskell.org/packages/archive/X11/1.4.5/doc/html/Graphics-X11-Types.html
        -- may want to encorporate: http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Actions-GridSelect.html
myManageHook = composeAll
    [ className =? "Gimp"      --> doFloat
    , className =? "pidgin"    --> doFloat
    , className =? "skype"     --> doFloat
    , className =? "vlc"       --> doFloat
    , className =? "tilda"     --> doFloat
    , className =? "Vncviewer" --> doFloat
    ]

main = do
    xmonad $ defaultConfig
        { modMask = mod4Mask     -- Rebind Mod to the Windows key
        } `additionalKeys`
        [ ((mod4Mask, xK_F2), spawn "gmrun")
        , ((mod4Mask, xK_F3), spawn "~/.config/dmenu/dmenu-bind.sh")
        , ((mod4Mask, xK_F4), spawn "kill")
        , ((mod4Mask, xK_F5), spawn "xfce4-appfinder")
        , ((mod4Mask, xK_F6), spawn "xkill")
        , ((mod4Mask, xK_a), spawn "audacity")
        , ((mod4Mask, xK_b), spawn "firefox")
        , ((mod4Mask .|. mod1Mask, xK_b), spawn "seamonkey")
        , ((mod4Mask, xK_c), spawn "pidgin & skype")
        , ((mod4Mask, xK_d), spawn "gedit")
        , ((mod4Mask .|. controlMask, xK_d), spawn "gksudo gedit")
        , ((mod4Mask, xK_f), spawn "pcmanfm")
        , ((mod4Mask .|. controlMask, xK_f), spawn "gksudo pcmanfm")
        , ((mod4Mask .|. shiftMask, xK_f), spawn "searchmonkey")
        , ((mod4Mask, xK_g), spawn "gimp")
        , ((mod4Mask, xK_m), spawn "vlc")
        , ((mod4Mask .|. mod1Mask .|. controlMask, xK_o), spawn "gedit")
        , ((mod4Mask, xK_m), spawn "vlc")
        , ((mod4Mask, xK_m), spawn "vlc")
        , ((mod4Mask, xK_x), spawn "gedit ~/.xmonad/xmonad.hs")
        , ((0, xK_Print), spawn "scrot '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/images/screenshots/ & gpicview ~/images/screenshots/$f'")
        ]

and perhaps i'll return shortly with an update... or maybe there are other xmonad users on crunchbang who'll chime in with their 2 cents too.  ^_^

Last edited by Digit (2010-10-17 13:57:18)

educate yourself so you may educate others.DeNoob&UnBloat PCs!
the only free webhosting i use.
say "NO!" to a chemical lobotomy in your food
flattr me, thnx

Re: My Xmonad Adventures

woohoo!
now have tint2 and xmonad playing nice together.
includes a toggle for tint2 visibility!  wink

import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import XMonad.Hooks.EwmhDesktops
import XMonad.Config.Desktop
import System.IO

-- initially created with help of: http://www.haskell.org/haskellwiki/Xmonad/Config_archive/John_Goerzen%27s_Configuration
-- use "xmonad --recompile" to check it's syntactically correct if making changes (better than just modQ)
    -- list of key codes http://haskell.org/haskellwiki/Xmonad/Key_codes
    -- may also prove useful for some keys and commands http://hackage.haskell.org/packages/archive/X11/1.4.5/doc/html/Graphics-X11-Types.html
        -- may want to encorporate: http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Actions-GridSelect.html
myManageHook = composeAll
    [ className =? "Gimp"      --> doFloat
    , className =? "pidgin"    --> doFloat
    , className =? "skype"     --> doFloat
    , className =? "vlc"       --> doFloat
    , className =? "tilda"     --> doFloat
    , className =? "Vncviewer" --> doFloat
    ]

main = do
    xmproc <- spawnPipe "/usr/bin/tint2 /home/digit/.config/tint2/tint2rc"
    xmonad $ ewmh desktopConfig
        { manageHook = manageDocks <+> myManageHook -- make sure to include myManageHook definition from above
                        <+> manageHook desktopConfig
        , layoutHook = avoidStruts  $  layoutHook defaultConfig
        , modMask = mod4Mask     -- Rebind Mod to the Windows key
        } `additionalKeys`
        [ ((mod4Mask, xK_F2), spawn "gmrun")
        , ((mod4Mask .|. controlMask .|. mod1Mask, xK_F2), spawn "gedit ~/.gmrunrc")
        , ((mod4Mask, xK_F3), spawn "~/.config/dmenu/dmenu-bind.sh")
        , ((mod4Mask .|. controlMask .|. mod1Mask, xK_F3), spawn "gedit ~/.config/dmenu/dmenu-bind.sh") -- edit dmenu
        , ((mod4Mask, xK_F4), spawn "close")
        , ((mod4Mask, xK_F5), spawn "xfce4-appfinder")
        , ((mod4Mask, xK_F6), spawn "xkill")
        , ((mod4Mask, xK_a), spawn "audacity")
        , ((mod4Mask, xK_b), spawn "firefox")
        , ((mod4Mask .|. mod1Mask, xK_b), spawn "seamonkey")
        , ((mod4Mask, xK_c), spawn "pidgin & skype")
        , ((mod4Mask, xK_d), spawn "gedit")
        , ((mod4Mask .|. controlMask, xK_d), spawn "gksudo gedit")
        , ((mod4Mask, xK_f), spawn "pcmanfm")
        , ((mod4Mask .|. controlMask, xK_f), spawn "gksudo pcmanfm")
        , ((mod4Mask .|. shiftMask, xK_f), spawn "searchmonkey")
        , ((mod4Mask, xK_g), spawn "gimp")
        , ((mod4Mask, xK_m), spawn "vlc")
        , ((mod4Mask, xK_n), sendMessage ToggleStruts) -- toggle panel visability.
        , ((mod4Mask .|. controlMask .|. mod1Mask, xK_n), spawn "gedit ~/.config/tint2/tint2rc") -- edit panel config
        , ((mod4Mask .|. mod1Mask, xK_n), spawn "pkill tint2 && tint2") -- restart panel.
        , ((mod4Mask .|. shiftMask, xK_p), spawn "gksudo gparted")
        , ((mod4Mask, xK_p), spawn "gksudo synaptic")
        , ((mod4Mask, xK_q), spawn "xmonad --restart")
        , ((mod4Mask .|. controlMask .|. mod1Mask, xK_x), spawn "gedit ~/.xmonad/xmonad.hs") -- edit xmonad config
        , ((0, xK_Print), spawn "scrot '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/images/screenshots/ &amp; gpicview ~/images/screenshots/$f'")
        ]

also pasted here:
http://hpaste.org/40729/xmonadhs_in_progress4

there are a few more shortcut additions and adaptation since my last update here too.

i'm no haskell pro, quite the noob actually, and so i make no gauruntees about the clean perfection of my code.   ... but it does seem to confer all functionality i saught.


i'm keen on the idea now of making a couple other configs....

one which far more accurately mimics the crunchbang controls, rather than my current haphazard adding in as much i can without changing default xmonad controls

and one which is entirely geared for artists... i.e. built for one hand on the keyboard and one on the mouse, as most graphics (image manipulation, vector, 3d) applications seem to hold as the standard hand positions.

educate yourself so you may educate others.DeNoob&UnBloat PCs!
the only free webhosting i use.
say "NO!" to a chemical lobotomy in your food
flattr me, thnx

Re: My Xmonad Adventures

Hey, happy to see other people use this fantastic WM!
I switched to Xmonad quite naturally, I got a 20" screen in July, and it's so big that I lost tremendous time resizing my windows, sending them to other desktops etc in Openbox. So I asked myself if it wasn't perhaps better to switch to a tilling wm…found Xmonad and never looked back to other wms! big_smile
I've been using it on Lucid Lynx and it's great. I won't share my xmonad.hs though, it's optimized for french bépo keyboards, I don't think it will interest a lot of people lol

Last edited by cbrunos (2010-12-12 16:39:57)

Xmonad is the best way to get things done, fast.
My french linux blog: http://cbrunos.wordpress.com

Re: My Xmonad Adventures

I'm so glad to find other people using xmonad
I made the switch today, but I'm loving it so far, but I have a few questions I'd like to ask you:
1) where do i have to put the commands I want to have executed at startup? I'm on a laptop and tap-click, network and sound are kind of a big deal, but I can't seem to find the config file to do that. Currently I'm just manually running a script i made, but i'd like to automate it.
2) I'm looking for a program that, when I press a keybind, shows a popup window with the tray icons, sort of like a floating systray. It would rock! In the meantime, I think I'll mod my tint config and use digit's keybind to hide/show it.
3) Can i arrange my windows in any way I like or I'm stuck with what the algorithms think is best? Don't get me wrong, I'm loving this WM, but I see myself in the near future trying to rearrange my tiled windows.
thanks for any replies

Re: My Xmonad Adventures

1. If you get rid of GDM, you could just use ~/.xinitrc to start all your apps.

2. If you just want a systray, take a look at stalonetray and trayer.

Note: ** Please read before posting **

BTW if you wish to contact me, send me an e-mail instead of a PM.

Re: My Xmonad Adventures

1) Check the statuphook section from you xmonad.hs file:

myStartupHook = do
      spawn "kupfer"
      spawn "trayer  --tint 0x4A4A4A --SetDockType true --SetPartialStrut true --edge top --align right --widthtype pixel --width 205 --heighttype pixel --height 6 --distance -1 --transparent true --alpha 0"
      spawn "bluetooth-applet"
      spawn "gtk-redshift -l 48.5:7.7"
      spawn "conky"

This will launch kupfer, trayer, conky, etc at startup.

2) You could use trayer, look at how I did in the startup hook.

3) There are a lot of different layouts. If you want to resize your windows and move them around, right click on them while holding your MOD key to resize, and left click while still holding your MOD key to move them around.

Last edited by cbrunos (2011-01-28 09:29:10)

Xmonad is the best way to get things done, fast.
My french linux blog: http://cbrunos.wordpress.com

Re: My Xmonad Adventures

Thanks a lot!  I managed to put my little startup script in there, not sure how, I'll have to check.
I'll take a look at trayer and stalonetrayer (love the name) and see wich fits my needs better

Re: My Xmonad Adventures

Glad I could help. Oh and by the way, I think i remember I couldn't get stalonetray to work with Xmonad, it would always get tiled. That's why I use trayer.

Xmonad is the best way to get things done, fast.
My french linux blog: http://cbrunos.wordpress.com

Re: My Xmonad Adventures

Just started using #! a week ago, and wanted to say thanks for inspiring me to marry it with XMonad, which (let's be honest with ourselves, here) is the sexiest window manager of all time. Here's what I've got as an xmonad.hs, which was built off of your work

import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import XMonad.Hooks.EwmhDesktops
import XMonad.Config.Desktop
import System.IO

-- initially created with help of: http://www.haskell.org/haskellwiki/Xmonad/Config_archive/John_Goerzen%27s_Configuration

myManageHook = composeAll $
    map (\name -> className =? name --> doFloat) ["Gimp","skype","Do"]

main = do
    mapM spawnPipe [ "/usr/bin/tint2 /home/cbeans/.config/tint2/tint2rc"
                   , "xbindkeys"
                   , "xscreensaver"
                   , "parcellite"
                   , "synclient HorizTwoFingerScroll=1"
                   , "/home/cbeans/.dropbox-dist/dropboxd"
                   , "nm-applet"
                   , "bluetooth-applet"
                   , "xfce4-power-manager"
                   , "xfce4-volumed"
                   , "gnome-do"
                   , "guake"
                   , "feh --bg-center /home/cbeans/images/wallpapers/shared/crunchbang-logo-minimal.png"
                   ]

    xmonad $ ewmh desktopConfig
        { manageHook = manageDocks <+> myManageHook
                        <+> manageHook desktopConfig
        , layoutHook = avoidStruts  $  layoutHook defaultConfig
        , normalBorderColor = "grey"
        , modMask = mod4Mask
        , workspaces = ["α", "β", "γ", "δ", "ε", "ζ", "η", "θ", "ι" ]
        }

As you can see, I've made it so that you can add new processes spawned at startup, or change which programs xmonad should ignore by simply editing the respective lists that get mapped over. Instead of using xmonad to manage hotkeys, I opted to deal with all of that inside of xbindkeys. I also have hella applets getting spawned to populate the systray at startup, and get wireless etc. up and running. Also got feh setting up a sexy crunchbang background, and I've set the workspace names to Greek letters because they're cooler than numbers. Conky works too, but I haven't been using it. I'm curious how you managed other startup programs though; I never got xinit loading?

Anyway, hope all this crap is useful to someone out there.

Re: My Xmonad Adventures

nice cbeans. smile

tho... doesnt that mean that all those apps start again when you restart xmonad?  i had that issue with my tint2 being started from my xmonad config.  (not a big issue, given i just need to alt-f6+click it, to xkill it.)

i like the xbindkeys idea.

kinda reminds me a little of my idea to use a stand alone menu app (not dependant on any one wm).  ...not that i've got anything particularly useful set up yet... just havnt gotten around to developing my idea further, but i use 9menusmile  it's a really nice little app. i had been tinkering around to see if i could get it autopopulated.
...never really implemented it yet tho.  thought it at least worth a mention.

my workstation's current config has bloated up as i've been trying out various new layouts... so many layouts, and only using a cycle-through-layouts.... this isnt quite as useful any more.  ... i really should have bit the bullet n gone n sussed out integrating layout combo / combinators by now.  but just so i can have a laugh at this looking back from some time in the future once i get it cleaned up, here it is:

import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import XMonad.Hooks.EwmhDesktops
import XMonad.Config.Desktop
import XMonad.Actions.CycleWS
import XMonad.Layout.MouseResizableTile --and shrink/expand slave layout
import XMonad.Layout.Tabbed -- handy for uzbl
import XMonad.Layout.NoBorders
import XMonad.Layout.Grid
import XMonad.Layout.Combo
--import XMonad.Layout.LayoutCombinators hiding --( (|||) )
--import XMonad.Layout.Spiral
import XMonad.Layout.IM
import XMonad.Layout.Mosaic
import XMonad.Layout.MosaicAlt
import qualified Data.Map as M
import XMonad.Layout.ThreeColumns
import Data.Ratio ((%))
import System.IO

-- initially created with help of: http://www.haskell.org/haskellwiki/Xmonad/Config_archive/John_Goerzen%27s_Configuration
-- use "xmonad --recompile" to check it's syntactically correct if making changes (better than just modQ)
    -- list of key codes http://haskell.org/haskellwiki/Xmonad/Key_codes
    -- may also prove useful for some keys and commands http://hackage.haskell.org/packages/archive/X11/1.4.5/doc/html/Graphics-X11-Types.html
    -- many useful tips and tricks https://bbs.archlinux.org/viewtopic.php?id=40636
    -- 0.9 contrib, v.handy list of extensions http://xmonad.org/xmonad-docs/xmonad-contrib/index.html


-- also used 
-- no border fullscreen. http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-NoBorders.html
-- http://hackage.haskell.org/packages/archive/xmonad-contrib/0.8/doc/html/XMonad-Doc-Extending#Editing_mouse_bindings.html
-- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-MouseResizableTile.html
---- still need to learn how to change the size of the border gap between tiles now that a 6pixel gap has been adeed.  :/


-- yet to be implimented:
--  resizing floating windows from any corner
-- http://hackage.haskell.org/packages/archive/xmonad-contrib/0.8/doc/html/XMonad-Actions-FlexibleResize.html
--
-- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Actions-FlexibleResize.html
-- wanna get a collumnular wmii-like layout
-- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-LayoutCombinators.html
-- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-Combo.html 
-- split frame, to add subsequent window from stack, so that frame contains two frames, split on the opposite axis to normal in that pane.  thus http://ompldr.org/vNmJmag/nextthingiwantinxmonad.gif  -- i should probably expand on that, to illustrate hoe the stack numbering cycles down seamlessly into splits, and out again to continue into rest of stack... so as in that image grey is 1, red 2, green 3, blue 4 and yellow 5, and a new window (6) created would add bellow the split frame, squidging the rest up...   i'll get around to getting this sorted out in this config at some point.  it's the next major thing it needs.  ^_^   of course it will have a split and desplit hotkeys too.  

-- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-LayoutScreens.html or perhaps even http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Actions-CopyWindow.html or even simply http://lambda-haskell.galois.com/haskellwiki/Xmonad/General_xmonad.hs_config_tips#Ignoring_a_client_.28or_having_it_sticky.29
-- for a simpler more noobfriendly potential in window navigation: http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-WindowNavigation.html
-- MAKE NEWLY MADE FLOATING DIALOGUE WINDOWS BE ON TOP, ABOVE ALL OTHER FLOATING WINDOWS!   GURR!
-- double click border between windows to revert to "ratio" ("    ratio   = 1/2" --default).
-- resizeable grid?
-- config switcher for multi mode use... including, the long dessired (and procrastinated on) one handed xmonad config!   fully mouse controlled! it can be done... go find that thing that lets you map keys to mouse buttons, so u can have the modkey be the forward side mouse button.  how cool would that be!
-- normalBorderColor :: 
-- focusedBorderColor :: 

-- add another toggle-able mode, where xcompmgr is integrated with the stack / recancy (recentcy?) of a window's focus.  trailing in some algorythmic increments, so focused windo with most opaque, down to least opaque, at whatever the algoyrhm determins is apropriate for how many windows are present, likely down to 50% minimum or something.
-- -- configurable to even kill windows that are not looked at for so long (/so many new window creations), to kill at certain transparency, or limit max number of apps open... this is like doing for closing windows, what tiling window management did for moving and arranging windows for visibility, it automates it.  -- could likely also add ignoreAutoKill to prevent certain apps from being killed.


-- may want to encorporate:
-- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Actions-GridSelect.html

-- DEFAULT TEMPATE :   http://haskell.org/haskellwiki/Xmonad/Config_archive/Template_xmonad.hs_%280.9%29
        
myManageHook = composeAll
    [ className =? "Gimp"      --> doFloat
--    , className =? "Gimp"      --> doIgnore
--    , className =? "pidgin"    --> doFloat
--    , className =? "Pidgin"    --> doFloat
--    , className =? "Skype"     --> doFloat
--    , className =? "skype"     --> doFloat
--    , className =? "vlc"       --> doFloat
--    , className =? "Vlc"       --> doFloat
--    , className =? "tilda"     --> doFloat
    , className =? "Tilda"     --> doFloat
    , className =? "Vncviewer" --> doFloat
    , className =? "gpicview" --> doFloat
    , className =? "Gpicview" --> doFloat
    , className =? "BetterPrivacy" --> doFloat
--    , className =? "file-roller"     --> doFloat
--    , className =? "File-roller"     --> doFloat
    , className =? "Extract"     --> doFloat
    ]

main = do
    xmproc <- spawnPipe "/usr/bin/tint2 /home/digit/.config/tint2/tint2rc"
    xmonad $ ewmh desktopConfig
        { manageHook = manageDocks <+> myManageHook -- make sure to include myManageHook definition from above
                        <+> manageHook desktopConfig
        , layoutHook = avoidStruts  $  layoutHook defaultConfig { layoutHook = myLayout } --see "myLayout" bellow
        , startupHook = spawn "starterscripts"
        , modMask = mod4Mask     -- Rebind Mod to the Windows key, consider xK_asciitilde perhaps?
        } `additionalKeys`
        [ ((0, xK_Menu), spawn "8menu")
        , ((mod4Mask, xK_F2), spawn "gmrun")
        , ((mod4Mask .|. shiftMask, xK_F2), spawn "gedit ~/.gmrunrc")
--        , ((mod4Mask, xK_F3), spawn "~/.config/dmenu/dmenu-bind.sh") --dmenu normal
        , ((mod4Mask, xK_F3), spawn "fdmenu") -- script with just "dmenu_path && ~/.config/dmenu/dmenu-bind.sh"
        , ((mod1Mask, xK_F3), spawn "~/.config/dmenu/dmenu-bindv.sh") -- vertical patch dmenu
        , ((mod4Mask .|. shiftMask, xK_F3), spawn "gedit ~/.config/dmenu/dmenu-bind.sh") -- edit dmenu
        , ((mod1Mask .|. shiftMask, xK_F3), spawn "gedit ~/.config/dmenu/dmenu-bindv.sh") -- edit dmenu vertical
        , ((mod4Mask, xK_F4), kill) -- close focused window
--        , ((mod1Mask, xK_F4), kill) -- oldskool close focused window
        , ((mod4Mask, xK_F5), spawn "xfce4-appfinder")
        , ((mod4Mask, xK_F6), spawn "xkill")
        , ((mod4Mask, xK_a), spawn "audacity")
--        , ((mod4Mask, xK_b), spawn "icecat")
        , ((mod4Mask, xK_b), spawn "uzbl-browser")
        , ((mod4Mask .|. mod1Mask, xK_b), spawn "seamonkey")
        , ((mod4Mask .|. controlMask .|. mod1Mask, xK_b), spawn "firefox-bin")
        , ((mod4Mask, xK_c), spawn "pidgin & skype")
        , ((mod4Mask, xK_d), spawn "gedit")
        , ((mod4Mask .|. controlMask, xK_d), spawn "gksudo gedit")
        , ((mod4Mask, xK_f), spawn "pcmanfm")
        , ((mod4Mask .|. controlMask, xK_f), spawn "gksudo pcmanfm")
        , ((mod4Mask .|. shiftMask, xK_f), spawn "searchmonkey")
        , ((mod4Mask .|. shiftMask .|. mod1Mask, xK_f), spawn "catfish")
        , ((mod4Mask, xK_g), spawn "gimp")
        , ((mod4Mask, xK_i), spawn "inkscape")
        , ((mod4Mask .|. controlMask .|. mod1Mask, xK_l), spawn "lxappearance") -- change gtk theme n stuff
        , ((mod4Mask, xK_m), spawn "vlc")
        , ((mod4Mask .|. mod1Mask, xK_m), spawn "deadbeef")
        , ((mod4Mask .|. controlMask .|. mod1Mask, xK_m), spawn "gedit ~/.config/openbox/menu.xml") -- edit openbox menu
        , ((mod4Mask, xK_n), sendMessage ToggleStruts) -- toggle panel visability.
        , ((mod4Mask .|. mod1Mask, xK_n), spawn "pkill tint2 && tint2") -- restart panel.
        , ((mod4Mask .|. controlMask .|. mod1Mask, xK_n), spawn "gedit ~/.config/tint2/tint2rc") -- edit panel config
        , ((mod4Mask, xK_o), spawn "openbox --replace") -- switch to openbox
        , ((mod4Mask .|. controlMask .|. mod1Mask, xK_o), spawn "gedit ~/.config/openbox/rc.xml") -- edit openbox config
        , ((mod4Mask .|. mod1Mask, xK_p), spawn "gksudo gparted")
        , ((mod4Mask, xK_p), spawn "gksudo gtkpacman")
--        , ((mod4Mask, xK_q), spawn "xmonad --restart")
        , ((mod4Mask, xK_q), kill) -- neo school close focused window
        , ((mod4Mask .|. mod1Mask, xK_t), spawn "tilda") -- launch tilda
--        , ((mod4Mask, xK_u), sendMessage ToggleStruts U) -- toggle panel visability.
        , ((mod4Mask .|. controlMask .|. mod1Mask, xK_x), spawn "gedit ~/.config/uzbl/config") -- edit uzbl main config
        , ((mod4Mask, xK_v), spawn "VirtualBox")
        , ((mod4Mask, xK_x), spawn "xmonad --recompile") -- recompile xmonad
        , ((mod4Mask .|. mod1Mask, xK_x), spawn "xmonad --restart") -- restart xmonad
        , ((mod4Mask .|. controlMask .|. mod1Mask, xK_x), spawn "gedit ~/.xmonad/xmonad.hs") -- edit xmonad config
        , ((mod4Mask, xK_y), spawn "conky")
        , ((mod4Mask .|. mod1Mask, xK_y), spawn "pkill conky && conky") --restart conky
        , ((mod4Mask .|. controlMask .|. mod1Mask, xK_y), spawn "gedit ~/.conkyrc") --edit conky
        , ((0, xK_Print), spawn "scrot '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/images/screenshots/ &amp; gpicview ~/images/screenshots/$f'")
        , ((mod1Mask, xK_Print), spawn "scrot -d 3 '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/images/screenshots/ &amp; gpicview ~/images/screenshots/$f'")
-- Digit's more window management keybinds
--        , ((modMask,               next),   nextWS)
--        , ((modMask,               prev),   prevWS)
        , ((mod4Mask, xK_Left), prevWS)
        , ((mod4Mask, xK_Right), nextWS)
--        , ((mod4Mask .|. mod1Mask, xK_Left), prevWS)
--        , ((mod4Mask .|. mod1Mask, xK_Right), nextWS)
--        , ((mod1Mask .|. controlMask .|. shiftMask, xK_Left), shiftToPrev)
--        , ((mod1Mask .|. controlMask .|. shiftMask, xK_Right), shiftToNext)
        , ((mod4Mask .|. shiftMask, xK_Left), shiftToPrev)
        , ((mod4Mask .|. shiftMask, xK_Right), shiftToNext)
-- 
        , ((mod4Mask .|. mod1Mask, xK_j), sendMessage ShrinkSlave) -- %! Shrink a slave area 
        , ((mod4Mask .|. mod1Mask, xK_k), sendMessage ExpandSlave) -- %! Expand a slave area
--        , ((mod4Mask .|. shiftMask, xK_h), sendMessage ShrinkSlave) -- %! Shrink a slave area 
--        , ((mod4Mask .|. shiftMask, xK_l), sendMessage ExpandSlave) -- %! Expand a slave area
-- Digit's layout.mosaic window management keybinds
        , ((mod4Mask .|. mod1Mask, xK_h), sendMessage Taller)
        , ((mod4Mask .|. mod1Mask, xK_l), sendMessage Wider)

        , ((mod4Mask .|. mod1Mask, xK_o), sendMessage Reset)
-- Digit's layout.mosaicalt window management keybinds
        , ((mod4Mask .|. shiftMask, xK_a), withFocused (sendMessage . expandWindowAlt))
        , ((mod4Mask .|. shiftMask, xK_z), withFocused (sendMessage . shrinkWindowAlt))
        , ((mod4Mask .|. shiftMask, xK_s), withFocused (sendMessage . tallWindowAlt))
        , ((mod4Mask .|. shiftMask, xK_d), withFocused (sendMessage . wideWindowAlt))
        , ((mod4Mask .|. controlMask, xK_space), sendMessage resetAlt)

-- Digit's Keybindings for window transparency
        , ((mod4Mask .|. mod1Mask, xK_1), spawn "transset-df 0.1")
        , ((mod4Mask .|. mod1Mask, xK_2), spawn "transset-df 0.2")
        , ((mod4Mask .|. mod1Mask, xK_3), spawn "transset-df 0.3")
        , ((mod4Mask .|. mod1Mask, xK_4), spawn "transset-df 0.4")
        , ((mod4Mask .|. mod1Mask, xK_5), spawn "transset-df 0.5")
        , ((mod4Mask .|. mod1Mask, xK_6), spawn "transset-df 0.6")
        , ((mod4Mask .|. mod1Mask, xK_7), spawn "transset-df 0.7")
        , ((mod4Mask .|. mod1Mask, xK_8), spawn "transset-df 0.8")
        , ((mod4Mask .|. mod1Mask, xK_9), spawn "transset-df 0.9")
        , ((mod4Mask .|. mod1Mask, xK_0), spawn "transset-df 1.0")
--        , ((mod4Mask .|. mod1Mask, xK_-), spawn "COMPOFF")
--        , ((mod4Mask .|. mod1Mask, xK_+), spawn "COMPON")
        , ((mod4Mask .|. mod1Mask, xK_minus), spawn "COMP -q") --smarter way to quit xcompmg
        , ((mod4Mask .|. mod1Mask, xK_equal), spawn "COMP -s") --smarter way to start xcompmg
--        , ((mod4Mask .|. mod1Mask, xK_asciitilde), spawn "xcompmgr -n -I-.015 -O-.03 -D9 -t-0 -l-0 &") --simpler way to start xcompmgr
        , ((mod4Mask .|. mod1Mask, xK_agrave), spawn "xCOMP") --simpler way to start xcompmgr, with a script containing the above simple way.
--        , ((mod4Mask .|. mod1Mask, xK_asciitilde), spawn "xCOMP") --simpler way to start xcompmgr, with a script containing the above simple way.
--        , ((mod4Mask .|. mod1Mask, xK_asciitilde), spawn "xCOMP") --simpler way to start xcompmgr, with a script containing the above simple way.
        ]

--myLayout
myLayout = ThreeCol 1 (2/100) (1/2) ||| ThreeColMid 1 (2/100) (7/11) ||| mosaic 2 [3,2] ||| MosaicAlt M.empty ||| withIM (1%7) (Role "buddy_list") Grid ||| mouseResizableTile ||| mouseResizableTileMirrored ||| withIM (1%7) (Role "buddy_list") simpleTabbed ||| noBorders Full
-- add in -- ||| spiral (1/7) ||| --with layout.spiral of course.
  where
    -- default tiling algorithm partitions the screen into two panes
--    tiled   = Tall nmaster delta ratio --need to figure out how to correctly impliment this line, if i want to adjust the nmaster, ratio and delta....  and i do very much want to adjust the delta.  .. but its not essential, now that i have mouse resize
 
    -- The default number of windows in the master pane
    nmaster = 1
 
    -- Default proportion of screen occupied by master pane
    ratio   = 1/2
 
    -- Percent of screen to increment by when resizing panes
    delta   = 2/100
-- 

Last edited by Digit (2011-10-24 12:33:21)

educate yourself so you may educate others.DeNoob&UnBloat PCs!
the only free webhosting i use.
say "NO!" to a chemical lobotomy in your food
flattr me, thnx

Re: My Xmonad Adventures

I went to install this just to give it a try, and apt-get is telling me that all together the install size will be about 430MB. hmm

Is it just me or did everyone else encounter this install size? Seems incredibly large to me for a tiling WM. I think I remember my Awesome install wasn't close to being that large and that WM is basically a desktop.

Re: My Xmonad Adventures

yeah, that's haskell n other gubbins that take up so much space.

xmonad itself is ridiculously tiny (comparable to dwm).

debian's way of pulling in loads, makes sure you get everything you need, but that also means it's gonna be big.

i remember when i installed it on crunchbang last, i wanted a load of other stuff too, and it ended up over a gig!

i'm pretty sure i've always managed to keep it waaaaay smaller than even that 430 in gentoo.

educate yourself so you may educate others.DeNoob&UnBloat PCs!
the only free webhosting i use.
say "NO!" to a chemical lobotomy in your food
flattr me, thnx

Re: My Xmonad Adventures

h8uthemost wrote:

Is it just me or did everyone else encounter this install size? Seems incredibly large to me for a tiling WM. I think I remember my Awesome install wasn't close to being that large and that WM is basically a desktop.

It needs to import all the Haskell libraries, which is kinda like importing a whole new OS.

Re: My Xmonad Adventures

if the haskell deps are too much for you, there's always scrotwm.

but then, you're missing out on the real awesome potential of xmonad. 

it is said that xmonad is not just a window manager, but a library from which to construct your own wm.

though if you dont care about configurability, maybe even scrotwm is too configurable for you, and you might as well go with dwm.


[edit, lol, sorry... did that sound snippy?]  XD

Last edited by Digit (2011-10-24 23:33:57)

educate yourself so you may educate others.DeNoob&UnBloat PCs!
the only free webhosting i use.
say "NO!" to a chemical lobotomy in your food
flattr me, thnx

Re: My Xmonad Adventures

Digit wrote:

it is said that xmonad is not just a window manager, but a library from which to construct your own wm.

Your own world! Where you don't understand anybody!

Re: My Xmonad Adventures

I've already been using Scrotwm. In fact it's pretty much became my default wm. But I've been reading up Xmonad and it sounds pretty interesting. I was just wondering if I was alone in this huge download size for a tiling wm. I thought that was crazy. But it sounds like it's the norm.

I'll give it a try and see how it goes. I've been looking for something along the lines of Scrotwm but with a native status tray. And judging from the posts above you can use tint2 with this tiler, so xmonad may be just what I've been looking for.

Re: My Xmonad Adventures

el_koraco wrote:
Digit wrote:

it is said that xmonad is not just a window manager, but a library from which to construct your own wm.

Your own world! Where you don't understand anybody!

Australia?

Point & Squirt

Re: My Xmonad Adventures

EDIT: Nevermind

Last edited by h8uthemost (2011-10-25 19:31:22)

Re: My Xmonad Adventures

Just installed CrunchBang on an old laptop yesterday.  I'm running xmonad under gnome & xcfe4 on other machines, so it's great to see other people here running it on #!.

One thing I'm curious about.  Are most of you running xmonad under xcfe4, or are you going "full monty", i.e. pure xmonad?

Re: My Xmonad Adventures

In trying to keep my xmonad environment capable with other CrunchBang WMs, here's what I came up with.

1. 

sudo cp -p /usr/bin/startxfce4 /usr/local/bin/startxmonad

2.  Edit /usr/local/bin/startxmonad and replace all occurrences of 'xfce4' with 'xmonad'.

sudo sed -i 's/xfce4/xmonad/g' /usr/local/bin/startxmonad

3.  Edit /usr/share/xsessions/xmonad.desktop and replace 'xmonad' in Exec:

    < Exec=xmonad
    > Exec=/usr/local/bin/startxmonad

4. 

mkdir ~/.config/xmonad ; touch ~/.config/xmonad/xinitrc ; chmod a+x ~/.config/xmonad/xinitrc

5.  My skeletal ~/.config/xmonad/xinitrc contains:

xmonad
exit 0

Then season to taste.  If xinitrc is missing, then your xmonad configuration obviously won't boot, but now it's easier to put in xmonad autostart.sh stuff distinguished from other startup sessions.

Anybody have better hack?

Last edited by rubic (2011-11-08 02:14:12)

Re: My Xmonad Adventures

ack, yeah, thats kinda ugly.

idk what you rly need in terms of "keep my xmonad environment capable with other CrunchBang WMs".  normally i just install it, and it's good to go by selecting it from the session list on the login screen.

even when forgoing a login manager, only xmonad in xinitrc is all i'd need to do.

educate yourself so you may educate others.DeNoob&UnBloat PCs!
the only free webhosting i use.
say "NO!" to a chemical lobotomy in your food
flattr me, thnx