X.C.Mate: logout, shutdown options (#475)

* New logout options

Factor out Mate logout action and add a shutdown action which the user can bind additionally or in its place.

* Add documentation

* Update CHANGES.md
This commit is contained in:
brandon s allbery kf8nh 2021-03-11 16:29:50 -05:00 committed by GitHub
parent ebf9561d76
commit 2e2d344d92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View File

@ -140,6 +140,12 @@
### Bug Fixes and Minor Changes
* `XMonad.Config.Mate`
- Split out the logout dialog and add a shutdown dialog. The default behavior
remains the same but there are now `mateLogout` and `mateShutdown` actions
available.
* `XMonad.Actions.DynamicProjects`
- The `changeProjectDirPrompt` function respects the `complCaseSensitivity` field

View File

@ -21,6 +21,8 @@ module XMonad.Config.Mate (
mateConfig,
mateRun,
mateRegister,
mateLogout,
mateShutdown,
desktopLayoutModifiers
) where
@ -49,7 +51,7 @@ mateConfig = desktopConfig
mateKeys (XConfig {modMask = modm}) = M.fromList $
[ ((modm, xK_p), mateRun)
, ((modm .|. shiftMask, xK_q), spawn "mate-session-save --logout-dialog") ]
, ((modm .|. shiftMask, xK_q), mateLogout) ]
-- | Launch the "Run Application" dialog. mate-panel must be running for this
-- to work.
@ -86,3 +88,12 @@ mateRegister = io $ do
,"org.mate.SessionManager.RegisterClient"
,"string:xmonad"
,"string:"++sessionId]
-- | Display MATE logout dialog. This is the default mod-q action.
mateLogout :: MonadIO m => m ()
mateLogout = spawn "mate-session-save --logout-dialog"
-- | Display MATE shutdown dialog. You can override mod-q to invoke this, or bind it
-- to another key if you prefer.
mateShutdown :: MonadIO m => m ()
mateShutdown = spawn "mate-session-save --shutdown-dialog"