Advertisement
Guest User

Digit's Nice Minimal Tabular Boonad V1.0rc2(dev029)

a guest
Dec 5th, 2012
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Welcome to Digit's Nice Minimal Tabular Boonad
  2. -- takes some cues from clfswm and i3
  3. -- Digit can usually be found in #witchlinux or #crunchbang on irc.freenode.net
  4. -- GNU GPL, yo!
  5. import XMonad  hiding ( (|||) )
  6. import XMonad.Layout.LayoutCombinators -- hiding ( (|||) )
  7. import XMonad.Util.EZConfig -- allows all kinds, like automated emacs submaps
  8. import XMonad.Actions.Submap -- allows emacs-like keys
  9. import XMonad.Layout.Tabbed -- obvious integral for the TubularBoonad
  10. import XMonad.Layout.Grid -- yus
  11. import XMonad.Layout.OneBig -- yus
  12. import qualified XMonad.StackSet as W -- does something important i'm sure.
  13. import XMonad.Actions.CycleWS -- gets around
  14. import XMonad.Layout.NoBorders -- prettier when fullscreen
  15. import XMonad.Layout.MultiToggle -- allows fullscreen toggle, without Full layout
  16. import XMonad.Layout.MultiToggle.Instances --
  17. import XMonad.Actions.DynamicWorkspaces -- hrmm, is this where withNthWorkspace came from... curious.
  18. import XMonad.Actions.CopyWindow(copy) --this too?
  19. --sublayoutstuff http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-SubLayouts.html
  20. import XMonad.Layout.SubLayouts -- oh this makes it oh so sexy.
  21. import XMonad.Layout.WindowNavigation -- hrmm
  22. import XMonad.Layout.BoringWindows -- not so boring, proves handy.  make it so.
  23.  
  24. main = xmonad $ defaultConfig
  25.      { modMask = mod4Mask -- use tux instead of alt, which is M1(/mod1)
  26.      , terminal = "xterm"
  27.      , normalBorderColor  = "#487855" --487855 mk1 of "inteligent green"
  28.      , focusedBorderColor = "#ff6900"
  29.      , keys = djtemacsKeys
  30.      , layoutHook = djtslayoutHook
  31.      , workspaces = djtWorktops              
  32.      } -- `additionalKeysP` djtemacsKeys
  33.  
  34. djtslayoutHook = smartBorders $ windowNavigation $ subTabbed $ boringWindows $
  35.                  mkToggle (NOBORDERS ?? FULL ?? EOT) (Grid ||| OneBig (3/4) (3/4))
  36.                  
  37. djtWorktops  = ["1","2","3","4","5","6","7","8","9"]
  38.  
  39. djtemacsKeys = \c -> mkKeymap c $
  40.      [ ("M-S-<Return>", spawn $ terminal c) --but why bother with yeahconsole ;)
  41.      , ("M-x o", spawn "xteddy")  -- type mod+x then w to pop up 'woohoo!'
  42.      , ("M-<F11>", sendMessage $ Toggle FULL) --fullscreen toggle.  yus.
  43.      , ("M-<F4>", kill) --close a window
  44.      , ("M-<F6>", spawn "xkill") -- no, srsly, close it!
  45.      , ("M-q", spawn "xmonad --recompile && xmonad --restart") --try config changes
  46. --     , ("M-S-q", io (exitWith ExitSuccess)) --meh, dont need, myt slip n press.    
  47. --     , ("M-n", spawn "dmenu-bind.sh")  
  48.      , ("M-<F2>", spawn "~/.config/dmenu/dmenu-bind.sh")      
  49.      , ("M-<F3>", spawn "gmrun")    
  50. --     , ("<Menu>", spawn "8menu")
  51. --     , ("M-<Menu>", spawn "dmenu-bind.sh")
  52.      , ("M-<Space>", sendMessage NextLayout)
  53.        
  54.        --gamer controls w,s,a,d.  also suited for other ~one hand on keyboard, one hand on mouse~ type applications, suchas gimp or blender or audacity, etc.
  55.        --some conventional focus changing keybinds are still here, but de-emphasised, as focus would nominally be changed with mouse using this setup
  56.      , ("M-w", windows W.focusUp) --artistgamer
  57.      , ("M-s", windows W.focusDown) --artistgamer
  58.      , ("M-S-C-s", sendMessage $ pullGroup D) --sublayout --artistgamer
  59.      , ("M-C-a", sendMessage $ pullGroup L) --sublayout --artistgamer
  60.      , ("M-C-d", sendMessage $ pullGroup R) --sublayout --artistgamer
  61.      , ("M-C-w", sendMessage $ pullGroup U) --sublayout --artistgamer
  62.      , ("M-C-s", sendMessage $ pullGroup D) --sublayout --artistgamer
  63.      , ("M-C-e", withFocused (sendMessage . UnMerge)) --sublayout --artistgamer
  64.      , ("M-C-S-e", withFocused (sendMessage . MergeAll)) --sublayout --artstgamer
  65.      , ("M-z", prevWS) --artstgamer
  66.      , ("M-x", nextWS) --artstgamer
  67.      , ("S-M-z", shiftToPrev) --artstgamer
  68.      , ("S-M-x", shiftToNext) --artstgamer
  69.      , ("S-M-w", windows W.swapUp) --artstgamer
  70.      , ("S-M-s", windows W.swapDown) --artstgamer
  71.      , ("M-C-e", withFocused (sendMessage . UnMerge)) --sublayout --artistgamer
  72.      , ("M-<space>", sendMessage NextLayout) --toggle between grid and onebig
  73.      , ("M-<Tab>", windows W.focusDown) -- focus next window --or use mouse
  74.      , ("M-S-<Tab>", windows W.focusUp  ) -- focus previous window --or use mouse
  75.      , ("M-e", windows W.swapMaster) -- move focused window to master pane
  76.      , ("M-t", withFocused $ windows . W.sink) -- re-tile floated window
  77. --     , ("M-C-<Period>", onGroup W.focusUp') --sublayout --not sure wtf anymore
  78. --     , ("M-C-<Comma>", onGroup W.focusDown') --sublayout --not sure wtf anymore
  79.        -- and the boring windows:, ((modm, xK_j), focusDown) -- wtf to implement?
  80.        -- and the boring windows:, ((modm, xK_k), focusUp) -- wtf to implement?
  81. --     , ("M-S-<space>", setLayout $ XMonad.layoutHook conf) --rly need dat?
  82.      ]
  83.      ++
  84.      -- (2012-09-29 15:14:37) dr_bs:
  85.      zip (map (\x -> fst x++[snd x]) ((zip (repeat "M-") (['1'..'9'])))) (map (withNthWorkspace W.greedyView) [0..])
  86.  
  87.      ++
  88.      -- so i extrapolate from dr_bs's above, and from
  89.      -- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Actions-DynamicWorkspaces.html
  90.      zip (map (\x -> fst x++[snd x]) ((zip (repeat "M-S-") (['1'..'9'])))) (map (withNthWorkspace W.shift) [0..])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement