nice cbeans. 
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 9menu.
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/ & gpicview ~/images/screenshots/$f'")
, ((mod1Mask, xK_Print), spawn "scrot -d 3 '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/images/screenshots/ & 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
--