<commit_before>import XMonad
import XMonad.Config.Gnome
import XMonad.Hooks.ManageDocks
import XMonad.Layout.IM
import XMonad.Layout.PerWorkspace
import XMonad.Layout.Reflect

myWorkspaces = ["1:code", "2:web"] ++ map show [3..6] ++ ["7:video"] ++ ["8:music"] ++ ["9:gimp"]

myManageHook = composeAll
  [ className =? "Gimp" --> doShift "9:gimp"
  , className =? "Banshee Media Player" --> doShift "8:music"
  , className =? "Movie Player" --> doShift "7:video" ]

main = xmonad gnomeConfig
  { workspaces = myWorkspaces
  , manageHook = manageDocks <+> myManageHook
  , layoutHook = onWorkspace "9:gimp" gimp $ layoutHook gnomeConfig
  , terminal   = "xterm"
  }
  where
    gimp = withIM (0.18) (Role "gimp-toolbox") $
           reflectHoriz $
           withIM (0.22) (Role "gimp-dock") Full<commit_msg>XMonad: more workspaces, use function keys<commit_after>import XMonad
import XMonad.Config.Gnome
import XMonad.Hooks.ManageDocks
import XMonad.Layout.IM
import XMonad.Layout.PerWorkspace
import XMonad.Layout.Reflect
import XMonad.Util.EZConfig
import qualified XMonad.StackSet as W

myWorkspaces = ["1:code", "2:web"] ++ map show [3..8] ++ ["9:game","a:gimp","b:chat","c:media"]

myManageHook = composeAll
  [ className =? "Gimp" --> doShift "a:gimp"
  , className =? "Empathy" --> doShift "b:chat"
  , title     =? "Contact List" --> doShift "b:chat"
  , className =? "Rhythmbox" --> doShift "c:media"
  , className =? "Banshee Media Player" --> doShift "c:media"
  , className =? "Movie Player" --> doShift "c:media" ]

-- http://www.haskell.org/haskellwiki/Xmonad/General_xmonad.hs_config_tips#Binding_Workspaces_on_Function_Keys
myKeys = [ (otherModMasks ++ "M-" ++ key, action tag)
         | (tag, key) <- zip myWorkspaces (map (\x -> "<F" ++ show x ++ ">") [1..12])
         , (otherModMasks, action) <- [ ("", windows . W.greedyView) -- or W.view
                                      , ("S-", windows . W.shift)]
         ]

main = xmonad $ gnomeConfig
  { workspaces = myWorkspaces
  , manageHook = manageDocks <+> myManageHook
  , layoutHook = onWorkspace "a:gimp" gimp $ layoutHook gnomeConfig
  , terminal   = "xterm"
  } `additionalKeysP` myKeys
  where
    gimp = withIM (0.18) (Role "gimp-toolbox") $
           reflectHoriz $
           withIM (0.22) (Role "gimp-dock") Full
{'fraction_non_alphanumeric': 0.15839860748476936, 'fraction_numerical': 0.013489991296779809, 'mean_word_length': 3.3874045801526718, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1952002', 'n_tokens_mistral': 865, 'n_tokens_neox': 826, 'n_words': 182}