REF move removable module to dbus section
This commit is contained in:
parent
8282cf05cc
commit
7010d4a723
|
@ -50,12 +50,12 @@ import XMonad.Internal.Command.Power
|
|||
import XMonad.Internal.Concurrent.ACPIEvent
|
||||
import XMonad.Internal.Concurrent.ClientMessage
|
||||
import XMonad.Internal.Concurrent.DynamicWorkspaces
|
||||
import XMonad.Internal.Concurrent.Removable
|
||||
import XMonad.Internal.DBus.Brightness.ClevoKeyboard
|
||||
import XMonad.Internal.DBus.Brightness.Common
|
||||
import XMonad.Internal.DBus.Brightness.IntelBacklight
|
||||
import XMonad.Internal.DBus.Control
|
||||
import XMonad.Internal.DBus.Screensaver
|
||||
import XMonad.Internal.DBus.Removable
|
||||
import XMonad.Internal.Dependency
|
||||
import XMonad.Internal.Process
|
||||
import XMonad.Internal.Shell
|
||||
|
@ -79,7 +79,8 @@ main = do
|
|||
sesClient <- startXMonadService
|
||||
sysClient <- getDBusClient True
|
||||
(h, p) <- spawnPipe "xmobar"
|
||||
mapM_ (executeFeatureWith_ forkIO_) [runPowermon, runRemovableMon sysClient]
|
||||
executeFeature_ $ runRemovableMon sysClient
|
||||
executeFeatureWith_ forkIO_ runPowermon
|
||||
forkIO_ $ runWorkspaceMon allDWs
|
||||
let ts = ThreadState
|
||||
{ tsSessionClient = sesClient
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
-- Currently, its only purpose is to play Super Mario sounds when a drive is
|
||||
-- inserted or removed. Why? Because I can.
|
||||
|
||||
module XMonad.Internal.Concurrent.Removable (runRemovableMon) where
|
||||
module XMonad.Internal.DBus.Removable (runRemovableMon) where
|
||||
|
||||
import Control.Monad
|
||||
|
||||
|
@ -74,10 +74,10 @@ playSoundMaybe p b = when b $ playSound p
|
|||
-- enable the udisks2 service at boot; however this is not default behavior.
|
||||
listenDevices :: Client -> IO ()
|
||||
listenDevices client = do
|
||||
void $ addMatch' memAdded driveInsertedSound addedHasDrive
|
||||
void $ addMatch' memRemoved driveRemovedSound removedHasDrive
|
||||
addMatch' memAdded driveInsertedSound addedHasDrive
|
||||
addMatch' memRemoved driveRemovedSound removedHasDrive
|
||||
where
|
||||
addMatch' m p f = addMatch client ruleUdisks { matchMember = Just m }
|
||||
addMatch' m p f = void $ addMatch client ruleUdisks { matchMember = Just m }
|
||||
$ playSoundMaybe p . f . signalBody
|
||||
|
||||
runRemovableMon :: Maybe Client -> FeatureIO
|
|
@ -8,7 +8,6 @@ library
|
|||
exposed-modules: XMonad.Internal.Concurrent.ClientMessage
|
||||
, XMonad.Internal.Concurrent.ACPIEvent
|
||||
, XMonad.Internal.Concurrent.DynamicWorkspaces
|
||||
, XMonad.Internal.Concurrent.Removable
|
||||
, XMonad.Internal.Theme
|
||||
, XMonad.Internal.Notify
|
||||
, XMonad.Internal.Shell
|
||||
|
@ -23,6 +22,7 @@ library
|
|||
, XMonad.Internal.DBus.Brightness.Common
|
||||
, XMonad.Internal.DBus.Control
|
||||
, XMonad.Internal.DBus.Screensaver
|
||||
, XMonad.Internal.DBus.Removable
|
||||
, XMonad.Internal.Process
|
||||
, Xmobar.Plugins.Common
|
||||
, Xmobar.Plugins.BacklightCommon
|
||||
|
|
Loading…
Reference in New Issue