1 {-# LANGUAGE GHC2024 #-}
2 {-# OPTIONS_GHC -Wall #-}
3 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
5 import qualified Data.Char as Char
6 import Data.List as List
9 import qualified Data.Map as Map
10 import Control.Arrow (first)
12 -- import XMonad.Actions.DwmPromote
13 -- import XMonad.Actions.Warp
14 -- import XMonad.Layout.Maximize
15 -- import XMonad.Layout.Monitor
16 -- import XMonad.Layout.ResizableTile
17 -- import XMonad.Layout.TabBarDecoration
18 -- import XMonad.Util.EZConfig
19 -- import XMonad.Util.EZConfig(additionalKeys)
20 -- import XMonad.Util.WorkspaceCompare
21 import XMonad hiding ((|||))
22 import XMonad.Actions.CopyWindow
23 import XMonad.Actions.CycleWS
24 import XMonad.Actions.SwapWorkspaces
25 import XMonad.Actions.UpdatePointer
26 import XMonad.Config.Azerty
27 import XMonad.Hooks.DynamicLog
28 import XMonad.Hooks.EwmhDesktops
29 import XMonad.Hooks.ManageDocks
30 import XMonad.Hooks.ManageHelpers
31 import XMonad.Hooks.RefocusLast
32 import XMonad.Hooks.Rescreen
33 import XMonad.Hooks.SetWMName
34 import XMonad.Hooks.StatusBar
35 import XMonad.Hooks.UrgencyHook
36 import XMonad.Layout.Columns
37 import XMonad.Layout.Fullscreen
38 import XMonad.Layout.Grid
39 import XMonad.Layout.LayoutCombinators
40 import XMonad.Layout.Magnifier
41 import XMonad.Layout.MultiToggle
42 import XMonad.Layout.MultiToggle.Instances
43 import XMonad.Layout.NoBorders
44 import XMonad.Layout.ResizableTile
45 import XMonad.Layout.Spiral
46 import XMonad.Layout.Tabbed
47 import XMonad.Layout.ThreeColumns
48 import XMonad.Layout.WindowNavigation
49 import XMonad.ManageHook
50 import XMonad.Operations (unGrab)
52 import XMonad.Prompt.FuzzyMatch
53 import XMonad.Prompt.Pass
54 import XMonad.Prompt.Window
55 import XMonad.Util.NamedScratchpad
56 import XMonad.Util.SpawnOnce
57 import qualified XMonad.StackSet as W
60 withUrgencyHook NoUrgencyHook $
61 -- dzenUrgencyHook { args = ["-bg", "darkgreen", "-xs", "1"] } $
62 --addAfterRescreenHook myAfterRescreenHook $
63 addRandrChangeHook (spawnExec "autorandr --change") $
64 dynamicSBs barSpawner $
66 setEwmhActivateHook doAskUrgent $
71 , focusFollowsMouse = True
72 , focusedBorderColor = "#00b10b"
73 , handleEventHook = handleEventHook def
74 , keys = \conf@XConfig{XMonad.modMask} ->
76 let xK_XF86Backward = 0x1008ff26
77 xK_XF86Forward = 0x1008ff27 in
80 ((modMask, xK_Return), spawnExec $ XMonad.terminal conf)
82 , ((modMask, xK_Menu), spawnCommand)
83 , ((modMask, xK_space), spawnCommand)
84 -- Browse the filesystem
85 , ((modMask, xK_BackSpace), spawnExec "systemd-run --user --unit=app-org.rofi.caja@$RANDOM -p CollectMode=inactive-or-failed caja")
88 , ((0, xK_Pause), unGrab >> spawnExec "loginctl lock-session \"$XDG_SESSION_ID\"")
89 , ((modMask, xK_Delete), unGrab >> spawnExec "loginctl lock-session \"$XDG_SESSION_ID\"")
91 -- Take a full screenshot
92 , ((0, xK_Print), spawn "mkdir -p ~/Images/screenshots && scrot --quality 42 ~/Images/screenshots/'%Y-%m-%d_%H-%M-%S.png' && caja ~/Images/screenshots")
93 -- Take a selective screenshot
94 , ((modMask, xK_Print), spawn "select-screenshot")
97 , ((0, 0x1008FF12), spawnExec "pactl -- set-sink-mute @DEFAULT_SINK@ toggle") -- XF88AudioMute
98 , ((0, 0x1008FF11), spawnExec "pactl -- set-sink-volume @DEFAULT_SINK@ -5%") -- XF86AudioLowerVolume
99 , ((0, 0x1008FF13), spawnExec "pactl -- set-sink-volume @DEFAULT_SINK@ +5%") -- XF86AudioRaiseVolume
101 -- , ((0, 0x1008FF16), spawnExec "")
103 -- , ((0, 0x1008FF14), spawnExec "")
105 -- , ((0, 0x1008FF17), spawnExec "")
107 -- , ((0, 0x1008FF2C), spawnExec "eject -T")
109 -- Close focused window.
110 , ((modMask, xK_Escape), kill)
113 , ((modMask, xK_c), spawnExec "clipster --select --primary")
115 -- Temporarily maximize a window
116 , ((modMask, xK_f), sendMessage $ XMonad.Layout.MultiToggle.Toggle FULL)
117 -- , ((modMask, xK_f), withFocused (sendMessage . maximizeRestore))
119 -- Cycle through the available layout algorithms
120 , ((modMask, 0x13bd), sendMessage NextLayout) -- oe (²)
121 , ((modMask, xK_ampersand), sendMessage $ JumpToLayout "ResizableTall") -- & (1)
122 , ((modMask, xK_eacute), sendMessage $ JumpToLayout "Mirror ResizableTall") -- é (2)
123 , ((modMask, xK_quotedbl), sendMessage $ JumpToLayout "Tabbed Simplest") -- ' (3)
124 , ((modMask, xK_apostrophe), sendMessage $ JumpToLayout "Magnifier Grid") -- " (4)
125 , ((modMask, xK_parenleft), sendMessage $ JumpToLayout "Spiral") -- ( (5)
126 , ((modMask, xK_minus), sendMessage $ JumpToLayout "Full") -- - (6)
127 , ((modMask, xK_egrave), sendMessage $ JumpToLayout "ThreeCol") -- è (7)
128 , ((modMask, xK_underscore), sendMessage $ JumpToLayout "Columns") -- _ (8)
130 -- Reset the layouts on the current workspace to default
131 -- , ((modMask .|. shiftMask, xK_space), setLayout $ XMonad.layoutHook conf)
133 -- Resize viewed windows to the correct size.
134 , ((modMask, xK_n), refresh)
136 -- Move focus to the master window
137 , ((modMask .|. shiftMask, xK_exclam), windows W.focusMaster)
138 -- Swap the focused window and the master window
139 , ((modMask, xK_exclam), windows W.swapMaster)
141 -- Swap the focused window with the next window.
142 --, ((modMask, xK_o), windows W.swapDown >> windows W.focusMaster)
143 -- Swap the focused window with the previous window.
144 , ((modMask, xK_m), windows W.swapUp >> windows W.focusMaster)
147 , ((modMask, xK_h), sendMessage $ Go L)
148 , ((modMask, xK_m), sendMessage $ Go R)
149 --, ((modMask, xK_i), sendMessage $ Go U)
150 --, ((modMask, xK_k), sendMessage $ Go D)
151 , ((modMask, xK_i), windows W.focusUp)
152 , ((modMask, xK_k), windows W.focusDown)
153 , ((modMask, xK_j), prevWS)
154 , ((modMask, xK_l), nextWS)
155 , ((modMask, xK_Left), windows W.focusUp)
156 , ((modMask, xK_Right), windows W.focusDown)
157 --, ((modMask, xK_Left), onGroup W.focusUp')
158 --, ((modMask, xK_Right), onGroup W.focusDown')
159 , ((modMask, xK_Up), sendMessage $ Go U)
160 , ((modMask, xK_Down), sendMessage $ Go D)
163 , ((modMask .|. shiftMask, xK_h), sendMessage MoveLeft)
164 , ((modMask .|. shiftMask, xK_m), sendMessage MoveRight)
165 , ((modMask .|. controlMask, xK_h), sendMessage MoveLeft)
166 , ((modMask .|. controlMask, xK_m), sendMessage MoveRight)
167 , ((modMask .|. controlMask, xK_i), sendMessage MoveUp)
168 , ((modMask .|. controlMask, xK_k), sendMessage MoveDown)
169 , ((modMask .|. controlMask, xK_j), shiftToPrev >> prevWS)
170 , ((modMask .|. controlMask, xK_l), shiftToNext >> nextWS)
173 , ((modMask .|. shiftMask, xK_l), sendMessage HorizontalExpand)
174 , ((modMask .|. shiftMask, xK_j), sendMessage HorizontalShrink)
175 , ((modMask .|. shiftMask, xK_i), sendMessage VerticalExpand)
176 , ((modMask .|. shiftMask, xK_k), sendMessage VerticalShrink)
178 -- Push window back into tiling.
179 , ((modMask, xK_t), withFocused $ windows . W.sink)
181 -- Change the number of windows in the master area
182 , ((modMask, xK_Up), sendMessage $ IncMasterN 1)
183 , ((modMask, xK_Down), sendMessage $ IncMasterN (-1))
185 -- Toggle the status bar gap.
186 , ((modMask, xK_b), sendMessage ToggleStruts)
189 , ((modMask .|. shiftMask, xK_End), io exitSuccess)
191 , ((modMask, xK_End), restart "xmonad" True)
193 , ((modMask, xK_p), passPrompt promptConfig)
194 , ((modMask .|. controlMask, xK_p), passGeneratePrompt promptConfig)
195 , ((modMask .|. controlMask .|. shiftMask, xK_p), passRemovePrompt promptConfig)
196 , ((modMask, xK_Tab), windowMultiPrompt promptConfig [(Goto, allWindows), (Goto, wsWindows)])
198 -- Workspace management
199 -- XF86Back: Switch to previous workspace
200 , ((0, xK_XF86Backward), prevWS)
201 , ((modMask, xK_Page_Up), prevWS)
202 -- Switch to next workspace
203 , ((0, xK_XF86Forward), nextWS)
204 , ((modMask, xK_Page_Down), nextWS)
205 -- XF86Back: Move the current client to the previous workspace and go there
206 , ((modMask, xK_XF86Backward), shiftToPrev >> prevWS)
207 -- Move the current client to the next workspace and go there
208 , ((modMask, xK_XF86Forward), shiftToNext >> nextWS)
209 -- Switch to previous workspace
210 -- Switch to next workspace
212 -- Move the current client to the previous workspace
213 , ((0 .|. shiftMask , xK_XF86Backward), shiftToPrev )
214 -- Move the current client to the next workspace
215 , ((0 .|. shiftMask , xK_XF86Forward), shiftToNext )
218 -- Toggle copying window on all workspaces (sticky window)
219 , ((modMask, xK_s), do
220 copies <- wsContainingCopies -- NOTE: consider only hidden workspaces
222 [] -> windows copyToAll
223 _ -> killAllOtherCopies
226 -- Resize the master area
227 --, ((modMask, xK_Left), sendMessage Shrink)
228 --, ((modMask, xK_Right), sendMessage Expand)
229 -- Resize windows in ResizableTall mode
230 --, ((modMask .|. shiftMask, xK_Left), sendMessage MirrorShrink)
231 --, ((modMask .|. shiftMask, xK_Right), sendMessage MirrorExpand)
234 -- Dynamic scratchpads
236 [ [ ((modMask .|. altMask .|. controlMask, key), withFocused $ toggleDynamicNSP name)
237 , ((modMask .|. altMask, key), dynamicNSPAction name)
239 | (key, chr) <- zip [xK_a..] ['a'..'z']
245 -- Note: those keybindings override dynamic scratchpads above
246 [ ((modMask .|. altMask, xK_b), namedScratchpadAction scratchpads "btop")
247 , ((modMask .|. altMask, xK_c), namedScratchpadAction scratchpads "中文")
248 , ((modMask .|. altMask, xK_e), namedScratchpadAction scratchpads "english")
249 , ((modMask .|. altMask, xK_h), namedScratchpadAction scratchpads "htop")
250 , ((modMask .|. altMask, xK_m), namedScratchpadAction scratchpads "matrix")
251 , ((modMask .|. altMask, xK_n), namedScratchpadAction scratchpads "notes")
252 , ((modMask .|. altMask, xK_o), namedScratchpadAction scratchpads "concerns")
253 , ((modMask .|. altMask, xK_s), namedScratchpadAction scratchpads "signal")
254 , ((modMask .|. altMask, xK_space), namedScratchpadAction scratchpads "terminal")
255 , ((modMask .|. altMask, xK_Return), namedScratchpadAction scratchpads "terminal")
256 , ((modMask .|. altMask, xK_BackSpace), resetFocusedNSP)
259 -- mod-[F1..F9], Switch to workspace N
260 -- mod-shift-[F1..F9], Move client to workspace N
261 [ ((m .|. modMask, k), windows $ f i)
262 | (i, k) <- zip (workspaces conf) [xK_F1 ..] ++
263 zip (workspaces conf) [xK_1 ..]
264 , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]
266 {- NOTE: with Xinerama
267 [((m .|. modMask, k), windows $ onCurrentScreen f i)
268 | (i, k) <- zip (workspaces' conf) [xK_F1 ..]
269 , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)] ]
272 -- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
273 -- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
274 [ ((m .|. modMask, key), screenWorkspace sc >>= flip whenJust (windows . f))
275 | (key, sc) <- zip [xK_w, xK_e, xK_r] [0 ..]
276 , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]
279 -- mod-shift-[F1..F9], Swap workspace with workspace N
280 -- mod-shift-[1..9], Swap workspace with workspace N
281 [ ((modMask .|. controlMask, k), windows $ swapWithCurrent i)
282 | (i, k) <- zip (workspaces conf) [xK_F1 ..] ++
283 zip (workspaces conf) [xK_1 ..]
285 {- NOTE: with Xinerama
286 [((modMask .|. controlMask, k), windows $ onCurrentScreen swapWithCurrent i)
287 | (i, k) <- zip (workspaces' conf) [xK_F1 ..] ]
289 , layoutHook = smartBorders $
290 mkToggle (NOBORDERS ?? FULL ?? EOT) $ -- enable temporarily maximizing a window
291 avoidStruts $ -- prevents windows from overlapping dock windows
292 let tall = ResizableTall 1 (1%200) (8%13) [] in
294 -- addTabs shrinkText tabBar (subLayout [] Simplest (Columns 1 []))
296 ||| tabbed shrinkText tabConfig
299 ||| magnifiercz (13%10) Grid
301 ||| noBorders (fullscreenFull Full)
302 ||| ThreeColMid 1 (1%200) (1%2)
303 -- ||| Tall 1 (3/100) (1/2)
304 , manageHook = composeAll
305 -- [ , isFullscreen --> (doF W.focusDown <+> doFullFloat)
306 [ isFullscreen --> doFullFloat
308 , manageDocks -- NOTE: do not tile dock windows
309 , namedScratchpadManageHook scratchpads
310 , resource =? "desktop_window" --> doIgnore
311 , className =? "Gimp" --> doFloat
312 , resource =? "gpicview" --> doSink
313 , className =? "mpv" --> doFloat
314 , className =? "ultrastardx" --> doSink
315 --, className =? "MPlayer" --> doShift "3:media" -- <+> doFloat
316 --, className =? "vlc" --> doShift "3:media"
317 , className =? "trayer" --> doIgnore
320 , mouseBindings = \XConfig{XMonad.modMask} ->
323 -- mod-button1, Set the window to floating mode and move by dragging
324 ((modMask, button1), floatMoveNoexclusive)
326 -- mod-button2, Raise the window to the top of the stack
327 , ((modMask, button2), \w -> focus w >> windows W.swapMaster)
329 -- mod-button3, Set the window to floating mode and resize by dragging
330 , ((modMask, button3), resizeNoexclusive)
332 , ((modMask, button4), \_ -> windows W.focusUp)
333 , ((modMask, button5), \_ -> windows W.focusDown)
335 -- Cycle through workspaces
336 , ((controlMask .|. modMask, button5), nextNonEmptyWS)
337 , ((controlMask .|. modMask, button4), prevNonEmptyWS)
339 , normalBorderColor = "#7C7C7C"
342 <+> addExclusives exclusiveScratchpads
343 <+> spawnExec "wmname XMonad"
344 <+> spawnExec "xrdb -all .Xresources"
345 <+> spawn "sleep 1 && xmodmap .Xmodmap"
346 <+> spawnExec "xset r rate 250 25"
347 <+> spawnExec "xinput --set-button-map 'Logitech USB Receiver Mouse' 1 2 3 4 5 6 7 2"
348 <+> spawnExec "xset b off"
349 <+> spawnExec "xhost local:root"
350 <+> spawnExec "setxkbmap -option keypad:pointerkeys"
351 -- Useful for programs launched by rofi
352 <+> spawnExec (unwords [ "systemctl --user import-environment"
353 , "DBUS_SESSION_BUS_ADDRESS"
354 , "GDK_PIXBUF_MODULE_FILE"
355 , "GIO_EXTRA_MODULES"
363 , "LD_LIBRARY_PATH" -- For sane and pipewire
365 , "NIX_PROFILES" -- fcitx5 does not work without it…
366 , "PASSWORD_STORE_DIR"
368 , "QTWEBKIT_PLUGIN_PATH"
376 -- <+> spawnOnce "exec arbtt-capture -r 60"
377 -- <+> spawnOnce "exec parcellite"
378 -- <+> spawnOnce "exec xautolock"
379 -- <+> spawnOnce "exec redshift-gtk -l -45.7800:1.9700 -t 6500:3700"
380 <+> spawnOnce "exec nm-applet"
381 , terminal = "$TERMINAL"
382 , workspaces = {- withScreens nScreens $ -}
383 {-["1:work","2:web","3:media"] ++-}
384 map show [1::Int .. 9]
386 -- updatePointer (Relative 0.5 0.5)
388 nsHideOnFocusLoss scratchpads
389 updatePointer (0.5, 0.5) (0, 0)
393 { activeBorderColor = "#7C7C7C"
394 , activeColor = "#000000"
395 , activeTextColor = "#00FF00"
396 , inactiveBorderColor = "#7C7C7C"
397 , inactiveColor = "#000000"
398 , inactiveTextColor = "#EEEEEE"
399 , fontName = "Hack 7"
402 spawnCommand = spawnExec "rofi -show run -no-disable-history -run-command \"bash -c 'systemd-run --user --unit=app-org.rofi.\\$(systemd-escape \\\"{cmd}\\\")@\\$RANDOM -p CollectMode=inactive-or-failed {cmd}'\""
404 barSpawner :: ScreenId -> X StatusBarConfig
405 barSpawner 0 = pure $ topXmobar <> traySB
406 --barSpawner 1 = pure $ xmobar1
407 barSpawner _ = pure $ topXmobar -- nothing on the rest of the screens
409 -- Display properties of the root window:
410 -- xprop -display $DISPLAY -root
411 topXmobar = statusBarPropTo "_XMONAD_XMOBAR0" "xmobar -x 0 ~/.config/xmonad/xmobar0.hs" (pure topPP)
415 { ppCurrent = xmobarColor "black" "#CCCCCC"
416 , ppHidden = xmobarColor "#CCCCCC" "black"
417 , ppHiddenNoWindows = xmobarColor "#606060" "black"
418 , ppLayout = \s -> xmobarColor "black" "#606060" $
421 "ResizableTall" -> " | "
422 "Mirror ResizableTall" -> " - "
423 "Tabbed Simplest" -> " + "
424 "Magnifier Grid" -> " ~ "
430 , ppTitle = xmobarColor "white" "black" . shorten 50
431 , ppUrgent = xmobarColor "yellow" "black"
435 traySB :: StatusBarConfig
442 , "--distancefrom top,right"
446 , "--monitor primary"
449 , "--transparent true"
450 , "--widthtype request"
456 nextNonEmptyWS _ = moveTo Next (WSIs ((not .) <$> isWindowSpaceVisible))
457 prevNonEmptyWS _ = moveTo Prev (WSIs ((not .) <$> isWindowSpaceVisible))
459 isWindowSpaceVisible :: X (WindowSpace -> Bool)
460 isWindowSpaceVisible = do
461 vs <- gets (map (W.tag . W.workspace) . W.visible . windowset)
462 return (\w -> W.tag w `elem` vs)
464 spawnExec s = spawn $ List.unwords $ [ "exec" ] <> systemdCat <> [ s ]
465 systemdCat = [ "systemd-cat" , "--priority=info", "--stderr-priority=warning", "--level-prefix=false" , "--" ]
467 promptConfig :: XPConfig
469 { font = "xft:monospace-"<>show fontSize
473 , fgHLight = "#000000"
474 , borderColor = "darkgreen"
475 , promptBorderWidth = 1
476 , promptKeymap = promptKeyMap
477 , position = CenteredAt { xpCenterY = 0.3, xpWidth = 0.5 }
478 , height = fontSize + 11
482 , autoComplete = Nothing -- Just 500000 -- nanoseconds
483 , showCompletionOnTab = False
484 , completionKey = (0, xK_Down)
485 , prevCompletionKey = (0, xK_Up)
486 , searchPredicate = fuzzyMatch -- isPrefixOf
488 , defaultPrompter = const ""
489 , alwaysHighlight = True
490 , maxComplRows = Just 10
491 , maxComplColumns = Just 1
492 , changeModeKey = xK_twosuperior
497 promptKeyMap :: Map.Map (KeyMask,KeySym) (XP ())
498 promptKeyMap = Map.fromList $
499 List.map (first $ (,) controlMask) -- control + <key>
500 [ (xK_z, killBefore) -- kill line backwards
501 , (xK_k, killAfter) -- kill line forwards
502 , (xK_u, killBefore) -- kill line backwards
503 , (xK_a, startOfLine) -- move to the beginning of the line
504 , (xK_e, endOfLine) -- move to the end of the line
505 , (xK_m, deleteString Next) -- delete a character foward
506 , (xK_b, moveCursor Prev) -- move cursor forward
507 , (xK_f, moveCursor Next) -- move cursor backward
508 , (xK_BackSpace, killWord Prev) -- kill the previous word
509 , (xK_y, pasteString) -- paste a string
510 , (xK_g, quit) -- quit out of prompt
511 , (xK_bracketleft, quit)
514 List.map (first $ (,) altMask) -- meta key + <key>
515 [ (xK_BackSpace, killWord Prev) -- kill the prev word
516 , (xK_f, moveWord Next) -- move a word forward
517 , (xK_b, moveWord Prev) -- move a word backward
518 , (xK_d, killWord Next) -- kill the next word
519 , (xK_n, moveHistory W.focusUp') -- move up through history
520 , (xK_p, moveHistory W.focusDown') -- move down through history
523 List.map (first $ (,) 0) -- <key>
524 [ (xK_Return, setSuccess True >> setDone True)
525 , (xK_KP_Enter, setSuccess True >> setDone True)
526 , (xK_BackSpace, deleteString Prev)
527 , (xK_Delete, deleteString Next)
528 , (xK_Left, moveCursor Prev)
529 , (xK_Right, moveCursor Next)
530 , (xK_Home, startOfLine)
531 , (xK_End, endOfLine)
532 , (xK_Down, moveHistory W.focusUp')
533 , (xK_Up, moveHistory W.focusDown')
540 -- HowTo(develop): use xprop to see window properties to query them
542 [ NS { name = "btop", cmd = "$TERMINAL --title=btop -e btop", query = title =? "btop", hook }
543 , NS { name = "concerns", cmd = "$TERMINAL --title=concerns -e sh -c 'cd $HOME/work/sourcephile && vi Concerns.md'", query = title =? "concerns", hook }
544 , NS { name = "english", cmd = "$TERMINAL --title=english -e sh -c 'cd $HOME/files/notes/english && vi vocabulary.org'", query = title =? "english", hook }
545 , NS { name = "htop", cmd = "$TERMINAL --title=htop -e htop", query = title =? "htop", hook }
546 , NS { name = "matrix", cmd = "element-desktop", query = className =? "Element", hook }
547 , NS { name = "signal", cmd = "signal-desktop", query = className =? "Signal", hook }
548 , NS { name = "notes", cmd = "$TERMINAL --title=notes -e sh -c 'cd $HOME/files/notes && vi notes.md'", query = title =? "notes", hook }
549 , NS { name = "terminal", cmd = "$TERMINAL --title=scratch-term", query = title =? "scratch-term", hook }
550 , NS { name = "中文", cmd = "$TERMINAL --title=中文 -e sh -c 'cd $HOME/files/notes/中文 && vi Vocabulary.hs'", query = title =? "中文", hook }
552 where hook = customFloating (W.RationalRect (1/2) (0) (1/2) (1))
554 exclusiveScratchpads = [ [ name | NS{name} <- scratchpads ] ]