cf8 avatar cf8 committed b738f64

scratchpad added

Comments (0)

Files changed (1)

 {-# OPTIONS_GHC -cpp #-}
 
--- Imports --
+-- imports
 import XMonad hiding ( (|||) )
 import Graphics.X11.ExtraTypes.XF86
 import qualified XMonad.StackSet as W
 import qualified Data.Map as M
 import System.Exit
 import Data.List
+
+-- utils
 import XMonad.Util.Run
+import XMonad.Util.Scratchpad
 
 -- actions
 import XMonad.Actions.CycleWS
 -------------------------------------------------------------------------------
 -- Window Management --
 
-manageHook' = mainManageHook <+> manageFullScreen <+> manageDocks
+manageHook' = mainManageHook <+> manageFullScreen <+> manageDocks <+> manageScratchPad
     where
         -- the main managehook
         mainManageHook = composeAll $ concat
         myFiles   = ["Pcmanfm","Nautilus","Lanikai", "Thunderbird"]
         myWorks   = ["Gvim"]
 
--------------------------------------------------------------------------------
--- Colors and Font --
+-- scratchpad
+manageScratchPad :: ManageHook
+manageScratchPad = scratchpadManageHook (W.RationalRect l t w h)
+   where
+       h = 0.40
+       w = 1
+       t = 0
+       l = 0
+
+-- colors and font
 
 myFont = "-*-terminus-medium-*-*-*-12-*-*-*-*-*-*-u"
 
 nBorderColor = "#aaaaaa"
 aBorderColor = "#262626"
 
-customPP = defaultPP { ppCurrent = xmobarColor aFgColor aBgColor
-                     , ppHidden = xmobarColor oFgColor oBgColor . xmobarStrip
-                     , ppHiddenNoWindows = xmobarColor nFgColor nBgColor
-                     , ppUrgent = xmobarColor uFgColor uBgColor
-                     , ppLayout = xmobarColor nBgColor nBgColor
-                     , ppTitle = xmobarColor nBgColor nBgColor
-                     , ppSep = xmobarColor nFgColor nBgColor "  "
-                     , ppWsSep = "  "
-                     }
+customPP = defaultPP 
+ { ppCurrent = xmobarColor aFgColor aBgColor
+ , ppHidden = xmobarColor oFgColor oBgColor . xmobarStrip . noScratchPad
+ , ppHiddenNoWindows = xmobarColor nFgColor nBgColor . noScratchPad
+ , ppUrgent = xmobarColor uFgColor uBgColor
+ , ppLayout = xmobarColor nBgColor nBgColor
+ , ppTitle = xmobarColor nBgColor nBgColor
+ , ppSep = xmobarColor nFgColor nBgColor "  "
+ , ppWsSep = "  "
+ }
+ where 
+   noScratchPad ws = if ws == "NSP" then "" else ws
 
 -- urgent notification
 {- urgentConfig = UrgencyConfig { suppressWhen = Focused } -}
 	, ((0                    , xK_Scroll_Lock ), spawn "sflock") 
 	, ((0                    , xK_Print ), spawn "~/bin/screenshot.sh") 
 
+	-- scratchpad 
+	, ((modMask, xK_i), scratchpadSpawnActionCustom "urxvt -name scratchpad -e ~/bin/scratchpad")
+
 	-- volume and mpd
 	, ((0, xF86XK_AudioLowerVolume),        spawn "~/bin/vol down")
 	, ((0, xF86XK_AudioRaiseVolume),        spawn "~/bin/vol up")
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.