summaryrefslogtreecommitdiffstats
path: root/src/XMonad/Local/TopicSpace.hs
blob: 17f0e586912b48f18a0be121d19683f8a681cdf8 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
module XMonad.Local.TopicSpace (
      topicConfig
    , topicDirs
    , workspaces
    ) where

import qualified Data.Map as M
import XMonad hiding (workspaces)
import qualified XMonad.Actions.TopicSpace as TS

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

topicDirs :: M.Map WorkspaceId String
topicDirs = M.fromList $
    [ ("dashboard"   , "~")
    , ("xmonad"      , "~/wsp/my/xminad")
    , ("xminad"      , "~/wsp/my/xminad")
    , ("video"       , "~/Documents/movies")
    , ("docs"        , "~/Documents/doc")
    , ("pdf"         , "~/Documents")
    , ("graphics"    , "~")
    , ("gimp"        , "~")
    , ("eclipse"     , "~/workspace")
    , ("yawn"        , "~/wsp/rh/pywbem-yawn")
    , ("openlmi"     , "~/wsp/rh/openlmi-providers")
    , ("cim"         , "/usr/share/mof/cim-current")
    , ("hwdata"      , "~/wsp/rh/hwdata")
    , ("hdparm"      , "~/fedora-scm/hdparm")
    , ("providers"   , "~/wsp/rh/openlmi-providers")
    , ("scripts"     , "~/wsp/rh/openlmi-scripts")
    , ("tools"       , "~/wsp/rh/openlmi-tools")
    , ("rhel"        , "~/rhel-scm")
    , ("fedora"      , "~/fedora-scm")
    , ("docker"      , "~/wsp/rh/docker")
    , ("distribution", "~/wsp/rh/distribution")
    , ("ae"          , "~/wsp/rh/atomic-enterprise")
    , ("aet"         , "~/wsp/rh/atomic-enterprise-training")
    , ("aea"         , "~/wsp/rh/atomic-enterprise-ansible")
    , ("aes"         , "~/wsp/rh/ae-scripts")
    , ("openshift"   , "~/wsp/rh/openshift-origin")
    , ("k8s"         , "~/wsp/rh/kubernetes")
    ] ++ map (\w -> (w, "~"))
    [ "music", "p2p", "gimp", "graphics"
    , "web", "remote", "earth", "bank", "admin", "ebook"
    , "ciV", "scrum", "BG", "witcher", "calendar"]

topicConfig :: TS.TopicConfig
topicConfig = TS.defaultTopicConfig
    { TS.topicDirs = topicDirs
    , TS.topicActions = M.fromList $
        [ ("music", spawn "gmpc")
        , ("mail", spawn "thunderbird")
        , ("web", spawn "firefox")
        , ("firefox", spawn "firefox")
        , ("opera", spawn "opera")
        , ("pdf", spawn "atril")
        , ("chat", spawn "xchat" >> spawn "pidgin")
        , ("admin", spawnShell Nothing >> spawnShell Nothing)
        , ("virt", spawn "virt-manager")
        , ("vbox", spawn "VirtualBox")
        , ("gimp", spawn "gimp")
        , ("eclipse", spawn "eclipse")
        , ("ebook", spawn "calibre")
        , ("video", spawn "vlc")
        , ("xmonad", spawnShell Nothing >> spawnShell Nothing)
        , ("xminad", spawnShell Nothing >> spawnShell Nothing)
        , ("remote", spawnShell Nothing >> spawnShell Nothing)
        , ("devel", spawnShell Nothing >> spawnShell Nothing)
        , ("openlmi",   spawnShell Nothing >> spawnShell Nothing)
        , ("providers", spawnShell Nothing >> spawnShell Nothing)
        , ("cim", spawnShell Nothing >>
              spawnShellIn "/usr/lib/python2.7/site-packages/pywbem" Nothing)
        , ("bank", spawn "google-chrome https://www.mojebanka.cz/InternetBanking/")
        , ("p2p", spawn "deluge-gtk")
        , ("hwdata",
              spawnShell Nothing >>
              spawnShellIn "~/fedora-scm/hwdata" Nothing >>
              spawnShellIn "~/rhel-scm/hwdata" Nothing)
        , ("hdparm", spawnShell Nothing >>
              spawnShellIn "~/fedora-scm/hdparm" Nothing >>
              spawnShellIn "~/rhel-scm/hdparm" Nothing)
        , ("docker",
                spawnShellIn "~/wsp/go/docker" (Just "bash --rcfile .bashrc") >>
                spawnShellIn "~/wsp/go/docker" (Just "bash --rcfile .bashrc") >>
                spawnShellIn "~/wsp/go/docker" (Just "bash --rcfile .bashrc"))
        , ("openshift",
                spawnShellIn "~/wsp/go/openshift" (Just "bash --rcfile .bashrc") >>
                spawnShellIn "~/wsp/go/openshift" (Just "bash --rcfile .bashrc") >>
                spawnShellIn "~/wsp/go/openshift" (Just "bash --rcfile .bashrc"))
        , ("distribution",
                spawnShellIn "~/wsp/go/distribution" (Just "bash --rcfile .bashrc") >>
                spawnShellIn "~/wsp/go/distribution" (Just "bash --rcfile .bashrc") >>
                spawnShellIn "~/wsp/go/distribution" (Just "bash --rcfile .bashrc"))
        , ("k8s",
                spawnShellIn "~/wsp/go/kubernetes" (Just "bash --rcfile .bashrc") >>
                spawnShellIn "~/wsp/go/kubernetes" (Just "bash --rcfile .bashrc") >>
                spawnShellIn "~/wsp/go/kubernetes" (Just "bash --rcfile .bashrc"))
        , ("scripts", spawnShell Nothing >> spawnShell Nothing)
        , ("ciV", spawn "launch-ciV.sh -m -b")
        , ("scrum", spawn "firefox --new-window https://bluejeans.com/3046463974/")
        , ("BG", spawn "steam steam://rungameid/228280" >>
              spawn "firefox http://slovnik.seznam.cz/de-cz/")
        , ("witcher", spawn "wine C:/Program\\ Files\\ (x86)/Steam/Steam.exe steam://rungameid/20900" >>
                spawn "firefox --new-window http://slovnik.seznam.cz/de-cz/")
        , ("calendar", spawn "california")
        ] ++ map (\w -> (w, spawnShell Nothing >> spawnShell Nothing))
        [ "ae", "aet", "aes", "aea" ]
    , TS.defaultTopicAction = const $ return ()
    , TS.defaultTopic = "dashboard"
    }

workspaces :: [WorkspaceId]
workspaces = ["dashboard", "devel"]