blob: 4aaaf9482f1f98ff7e2442a037b6f4edfd5c8c78 (
plain) (
blame)
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
|
-- |
-- Module : XMonad.Custom.Scratchpads
-- Description : Scratchpads configuration
-- Copyright : (c) Azat Bahawi 2018-2022
-- SPDX-License-Identifier : GPL-3.0-or-later
-- Maintainer : azat@bahawi.net
-- Stability : experimental
-- Portability : non-portable
--
module XMonad.Custom.Scratchpads
( scratchpads
) where
import XMonad.Core
import XMonad.Custom.Misc as C
import XMonad.ManageHook
import qualified XMonad.StackSet as S
import XMonad.Util.NamedScratchpad
spawnTerminalWith :: String -> String -> String
spawnTerminalWith t c = term applications ++ " -title " ++ t ++ " -e " ++ c
floatingNSP :: ManageHook
floatingNSP = customFloating $ S.RationalRect x y w h
where
x = (1 - w) / 2
y = (1 - h) / 2
w = 1 / 2
h = 1 / 2.5
scratchpads :: [NamedScratchpad]
scratchpads =
[ NS "console"
(spawnTerminalWith "NSPConsole" "~/.xmonad/scripts/nsp-console.sh")
(title =? "NSPConsole")
floatingNSP
]
|