From 779a0e8e9c481f14c42dda1a0cefcd2d91e8797b Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Sat, 24 Nov 2007 15:09:18 +0100 Subject: Arossato: some changes. I now use Magnifier among my layouts darcs-hash:20071124140918-32816-ee3074fd391a7b1e848214bdc023063412fef7d6.gz --- XMonad/Config/Arossato.hs | 98 ++++++++++++++++++++++++++--------------------- 1 file changed, 54 insertions(+), 44 deletions(-) (limited to 'XMonad/Config/Arossato.hs') diff --git a/XMonad/Config/Arossato.hs b/XMonad/Config/Arossato.hs index fbd31b2..3c6d66d 100644 --- a/XMonad/Config/Arossato.hs +++ b/XMonad/Config/Arossato.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -fno-warn-missing-signatures #-} +{-# OPTIONS_GHC -fglasgow-exts -fno-warn-missing-signatures #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Config.Arossato @@ -13,7 +13,7 @@ -- ------------------------------------------------------------------------ -module XMonad.Config.Arossato +module XMonad.Config.Arossato ( -- * Usage -- $usage arossatoConfig @@ -25,12 +25,14 @@ import Graphics.X11.Xlib import XMonad import XMonad.Layouts +import XMonad.ManageHook import XMonad.Operations import qualified XMonad.StackSet as W import XMonad.Actions.CycleWS import XMonad.Hooks.DynamicLog import XMonad.Layout.Accordion +import XMonad.Layout.Magnifier import XMonad.Layout.NoBorders import XMonad.Layout.Tabbed import XMonad.Prompt @@ -39,15 +41,15 @@ import XMonad.Prompt.Ssh import XMonad.Prompt.Window import XMonad.Prompt.XMonad --- $usage +-- $usage -- The simplest way to use this configuration module is to use an -- @~\/.xmonad\/xmonad.hs@ like this: -- -- > module Main (main) where --- > +-- > -- > import XMonad -- > import XMonad.Config.Arossato (arossatoConfig) --- > +-- > -- > main :: IO () -- > main = xmonad arossatoConfig -- @@ -58,7 +60,7 @@ import XMonad.Prompt.XMonad -- -- 1. Change the module name from -- --- > module XMonad.Config.Arossato +-- > module XMonad.Config.Arossato -- > ( -- * Usage -- > -- $usage -- > arossatoConfig @@ -79,7 +81,7 @@ import XMonad.Prompt.XMonad -- Ion3 clean style. arossatoTabbedConfig :: TConf arossatoTabbedConfig = - defaultTConf { activeColor = "#8a999e" + defaultTConf { activeColor = "#8a999e" , inactiveColor = "#545d75" , activeBorderColor = "white" , inactiveBorderColor = "grey" @@ -89,64 +91,72 @@ arossatoTabbedConfig = } arossatoConfig = defaultConfig - { workspaces = ["1", "2"] ++ - ["dev","mail","web"] ++ - map show [6 .. 9 :: Int] - , logHook = dynamicLogWithPP myPP + { workspaces = ["home","var","dev","mail","web","doc"] ++ + map show [7 .. 9 :: Int] + , logHook = dynamicLogXmobar + , manageHook = newManageHook , layoutHook = noBorders mytab ||| + magnifier tiled ||| noBorders Full ||| - tiled ||| - Mirror tiled ||| + tiled ||| + Mirror tiled ||| Accordion - , terminal = "urxvt -fg white -bg black +sb" + , terminal = "urxvt +sb" , normalBorderColor = "white" , focusedBorderColor = "black" , keys = newKeys , defaultGaps = [(15,0,0,0)] } - where + where -- layouts mytab = tabbed shrinkText arossatoTabbedConfig - tiled = Tall 1 0.03 0.5 - - -- the logHook pretty-printer - myPP = defaultPP { ppCurrent = xmobarColor "yellow" "" . wrap "[" "]" - , ppTitle = xmobarColor "green" "" . shorten 80 - } + tiled = Tall 1 (3/100) (1/2) + + -- manageHook + myManageHook = composeAll [ resource =? "realplay.bin" --> doFloat + , resource =? "win" --> doF (W.shift "doc") -- xpdf + , resource =? "firefox-bin" --> doF (W.shift "web") + ] + newManageHook = myManageHook <+> manageHook defaultConfig -- key bindings stuff defKeys = keys defaultConfig delKeys x = foldr M.delete (defKeys x) (toRemove x) newKeys x = foldr (uncurry M.insert) (delKeys x) (toAdd x) -- remove some of the default key bindings - toRemove x = - [ (modMask x , xK_j ) - , (modMask x , xK_k ) - , (modMask x , xK_p ) - , (modMask x .|. shiftMask, xK_p ) - , (modMask x .|. shiftMask, xK_q ) - , (modMask x , xK_q ) + toRemove x = + [ (modMask x , xK_j) + , (modMask x , xK_k) + , (modMask x , xK_p) + , (modMask x .|. shiftMask, xK_p) + , (modMask x .|. shiftMask, xK_q) + , (modMask x , xK_q) ] ++ -- I want modMask .|. shiftMask 1-9 to be free! [(shiftMask .|. modMask x, k) | k <- [xK_1 .. xK_9]] -- These are my personal key bindings - toAdd x = - [ ((modMask x , xK_F12 ), xmonadPrompt defaultXPConfig ) - , ((modMask x , xK_F3 ), shellPrompt defaultXPConfig ) - , ((modMask x , xK_F4 ), sshPrompt defaultXPConfig ) - , ((modMask x , xK_F5 ), windowPromptGoto defaultXPConfig ) - , ((modMask x .|. shiftMask, xK_F5 ), windowPromptBring defaultXPConfig ) - , ((modMask x , xK_comma ), prevWS ) - , ((modMask x , xK_period), nextWS ) - , ((modMask x , xK_Right ), windows W.focusDown ) - , ((modMask x , xK_Left ), windows W.focusUp ) + toAdd x = + [ ((modMask x , xK_F12 ), xmonadPrompt defaultXPConfig ) + , ((modMask x , xK_F3 ), shellPrompt defaultXPConfig ) + , ((modMask x , xK_F4 ), sshPrompt defaultXPConfig ) + , ((modMask x , xK_F5 ), windowPromptGoto defaultXPConfig ) + , ((modMask x , xK_F6 ), windowPromptBring defaultXPConfig ) + , ((modMask x , xK_comma ), prevWS ) + , ((modMask x , xK_period), nextWS ) + , ((modMask x , xK_Right ), windows W.focusDown ) + , ((modMask x , xK_Left ), windows W.focusUp ) -- other stuff: launch some useful utilities - , ((modMask x , xK_F2 ), spawn "urxvt -fg white -bg black +sb") - , ((modMask x .|. shiftMask, xK_F4 ), spawn "~/bin/dict.sh" ) - , ((modMask x .|. shiftMask, xK_F5 ), spawn "~/bin/urlOpen.sh" ) - , ((modMask x , xK_c ), kill ) - , ((modMask x .|. shiftMask, xK_comma ), sendMessage (IncMasterN 1 ) ) - , ((modMask x .|. shiftMask, xK_period), sendMessage (IncMasterN (-1)) ) + , ((modMask x , xK_F2 ), spawn "urxvt -fg white -bg black +sb" ) + , ((modMask x .|. shiftMask, xK_F4 ), spawn "~/bin/dict.sh" ) + , ((modMask x .|. shiftMask, xK_F5 ), spawn "~/bin/urlOpen.sh" ) + , ((modMask x , xK_c ), kill ) + , ((modMask x .|. shiftMask, xK_comma ), sendMessage (IncMasterN 1 ) ) + , ((modMask x .|. shiftMask, xK_period), sendMessage (IncMasterN (-1)) ) + -- commands fo the Magnifier layout + , ((modMask x .|. controlMask , xK_plus ), sendMessage MagnifyMore) + , ((modMask x .|. controlMask , xK_minus), sendMessage MagnifyLess) + , ((modMask x .|. controlMask , xK_o ), sendMessage ToggleOff ) + , ((modMask x .|. controlMask .|. shiftMask, xK_o ), sendMessage ToggleOn ) ] ++ -- Use modMask .|. shiftMask .|. controlMask 1-9 instead [( (m .|. modMask x, k), windows $ f i) -- cgit v1.2.3