如何切换xmonad工作区并在无栏全屏下通知当前工作区的标签或名称?

How to switch xmonad workspace and notify the current workspace's tag or name under full screen without bar?

我按如下方式配置 xmonad 工作区

myWorkspaces = map show [1..20 :: Int]

[((mod4Mask .|. m, k), windows $ f i)
| (i, k) <- zip myWorkspaces ([xK_1 .. xK_9] ++ [xK_0] ++ [xK_F1 .. xK_F10])
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask), (copy, mod3Mask)]
]

并且我想在切换到某个工作区时使用notify-send shell命令显示当前工作区号

那么如何为 greedyView 工作区定义一个函数并显示通知?

ok,我自己解决了问题

[((mod4Mask .|. m, k), workspaceHint f i)
    | (i, k) <- zip myWorkspaces ([xK_1 .. xK_9] ++ [xK_0] ++ [xK_F1 .. xK_F10])
    , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask), (copy, mod3Mask)]
    ]

notifyWSHint :: String -> X()
notifyWSHint index = spawn $ "notify-send -t 500 \"workspace: " ++ index ++ "\""

workspaceHint f i = do
  windows $ f i
  notifyWSHint i