diff --git a/bin/xmonad.hs b/bin/xmonad.hs index 5be5af3..56089b4 100644 --- a/bin/xmonad.hs +++ b/bin/xmonad.hs @@ -479,6 +479,8 @@ mkKeys ts c = -- M- reserved for showing the keymap , ("M-", "restart xmonad", runCleanup ts >> runRestart) , ("M-", "recompile xmonad", runRecompile) + , ("M-", "start Isync Service", runStartISyncService) + , ("M-C-", "start Isync Timer", runStartISyncTimer) , ("M-", "select autorandr profile", runAutorandrMenu) , ("M-", "toggle ethernet", runToggleEthernet) , ("M-", "toggle bluetooth", runToggleBluetooth) diff --git a/lib/XMonad/Internal/Command/Desktop.hs b/lib/XMonad/Internal/Command/Desktop.hs index 6a4a42d..b590b5a 100644 --- a/lib/XMonad/Internal/Command/Desktop.hs +++ b/lib/XMonad/Internal/Command/Desktop.hs @@ -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