ADD isync service shortcuts

This commit is contained in:
Nathan Dwarshuis 2021-02-04 21:46:04 -05:00
parent 51757eebf8
commit 0eda7a2949
2 changed files with 16 additions and 0 deletions

View File

@ -479,6 +479,8 @@ mkKeys ts c =
-- M-<F1> reserved for showing the keymap
, ("M-<F2>", "restart xmonad", runCleanup ts >> runRestart)
, ("M-<F3>", "recompile xmonad", runRecompile)
, ("M-<F7>", "start Isync Service", runStartISyncService)
, ("M-C-<F7>", "start Isync Timer", runStartISyncTimer)
, ("M-<F8>", "select autorandr profile", runAutorandrMenu)
, ("M-<F9>", "toggle ethernet", runToggleEthernet)
, ("M-<F10>", "toggle bluetooth", runToggleBluetooth)

View File

@ -28,6 +28,8 @@ module XMonad.Internal.Command.Desktop
, runScreenCapture
, runDesktopCapture
, runCaptureBrowser
, runStartISyncTimer
, runStartISyncService
) where
import Control.Monad (void)
@ -137,6 +139,18 @@ runToggleEthernet = spawn
#!>> fmtCmd "nmcli" ["device", "$a", ethernetIface]
#!&& fmtNotifyCmd defNoteInfo { body = Just $ Text "ethernet \"$a\"ed" }
runStartISyncTimer :: X ()
runStartISyncTimer = spawn
$ "systemctl --user start mbsync.timer"
#!&& fmtNotifyCmd defNoteInfo { body = Just $ Text "Isync timer started" }
#!|| fmtNotifyCmd defNoteError { body = Just $ Text "Isync timer failed to start" }
runStartISyncService :: X ()
runStartISyncService = spawn
$ "systemctl --user start mbsync.service"
#!&& fmtNotifyCmd defNoteInfo { body = Just $ Text "Isync completed" }
#!|| fmtNotifyCmd defNoteError { body = Just $ Text "Isync failed" }
--------------------------------------------------------------------------------
-- | Configuration commands