better scratch mangement

This commit is contained in:
Felix Van der Jeugt 2015-07-01 21:59:38 +02:00
parent bc62235f26
commit 67c432934e

View File

@ -18,6 +18,7 @@
import XMonad import XMonad
import XMonad.Hooks.DynamicLog import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageHelpers
import XMonad.Layout.NoBorders import XMonad.Layout.NoBorders
import XMonad.Layout.Grid import XMonad.Layout.Grid
import XMonad.Util.NamedScratchpad import XMonad.Util.NamedScratchpad
@ -26,6 +27,7 @@ import Graphics.X11.ExtraTypes.XF86
import Data.Monoid import Data.Monoid
import System.Exit import System.Exit
import qualified XMonad.StackSet as W import qualified XMonad.StackSet as W
import qualified Data.Map as M import qualified Data.Map as M
@ -94,7 +96,7 @@ myModMask = mod4Mask
-- > workspaces = ["web", "irc", "code" ] ++ map show [4..9] -- > workspaces = ["web", "irc", "code" ] ++ map show [4..9]
-- --
myWorkspaces :: [[Char]] myWorkspaces :: [[Char]]
myWorkspaces = (:) "NSP" $ map show ([1..9]::[Int]) myWorkspaces = map show ([1..9]::[Int]) ++ ["NSP"]
-- Border colors for unfocused and focused windows, respectively. -- Border colors for unfocused and focused windows, respectively.
-- --
@ -112,7 +114,9 @@ myScratchPads =
, interm "newsbeuter" , interm "newsbeuter"
] ]
where where
interm prog = NS prog (runInTerminal prog prog) (appName =? prog) defaultFloating placement = doRectFloat $ W.RationalRect 0.05 0.05 0.9 0.9 -- x, y, w, h
interm prog = NS prog (runInTerminal prog prog) (appName =? prog) placement
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- Key bindings. Add, modify or remove key bindings here. -- Key bindings. Add, modify or remove key bindings here.
@ -216,7 +220,7 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
-- mod-shift-[1..9], Move client to workspace N -- mod-shift-[1..9], Move client to workspace N
-- --
[((m .|. modm, k), windows $ f i) [((m .|. modm, k), windows $ f i)
| (i, k) <- zip (XMonad.workspaces conf) [xK_0 .. xK_9] | (i, k) <- zip (XMonad.workspaces conf) $ [xK_1 .. xK_9] ++ [xK_0]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]] , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
++ ++
@ -394,7 +398,7 @@ defaults = defaultConfig {
-- hooks, layouts -- hooks, layouts
layoutHook = myLayoutHook, layoutHook = myLayoutHook,
manageHook = myManageHook, manageHook = namedScratchpadManageHook myScratchPads <+> myManageHook,
handleEventHook = myEventHook, handleEventHook = myEventHook,
logHook = myLogHook, logHook = myLogHook,
startupHook = myStartupHook startupHook = myStartupHook