summaryrefslogtreecommitdiffstats
path: root/src/XMonad/Local/NamedScratchpad.hs
blob: 0fbd9f5370347fadaa3c563651746887c21f909c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
module XMonad.Local.NamedScratchpad (namedScratchpads) where

import Data.String.Utils (startswith)
import XMonad.ManageHook
import qualified XMonad.StackSet as W
import XMonad.Util.NamedScratchpad

-- local modules **************************************************************
import XMonad.Local.Config

namedScratchpads :: [NamedScratchpad]
namedScratchpads =
        [ NS "htop" (terminal ++ " -t htop -e htop") (title =? "htop")
            cTopFloat
        , NS "stardict" "qstardict" (className =? "Qstardict") cFloating
        , NS "notes" "gvim --role notes ~/notes.txt" (role =? "notes")
            cFloating
        , NS "charmap" "charmap" (className =? "Gucharmap") cFloating
        , NS "alarm" "alarm-clock-applet"
             (className =? "Alarm-clock-applet") cFloating
        , NS "calculator" (terminal ++ " -e python --title PCalculator")
                           (title =? "PCalculator") cFloating
        , NS "volctl" "mate-volume-control" (className =? "Mate-volume-control") cFloating
        , NS "guake" (terminal ++ " --window-with-profile=Guake-normal --tab-with-profile=Guake-root")
             (className =? "Mate-terminal" <&&> (startsWith title "Guake")) cBottomFloat 
        ]
    where
        role = stringProperty "WM_WINDOW_ROLE"
        cFloating = customFloating $ W.RationalRect (1/3) (1/9) (1/3) (1/3)
        cTopFloat = customFloating $ W.RationalRect (1/5) (1/32) (3/5) (1/2)
        cBottomFloat = customFloating $ W.RationalRect (1/5) (6/11) (3/5) (4/11)
        startsWith q x = fmap (startswith x) q