REF remove lots of unused deps

This commit is contained in:
Nathan Dwarshuis 2022-12-31 19:47:02 -05:00
parent 4b06ee125b
commit f1ced0c7e8
13 changed files with 24 additions and 54 deletions

View File

@ -11,13 +11,11 @@
-- * A custom Locks plugin from my own forked repo -- * A custom Locks plugin from my own forked repo
module Main (main) where module Main (main) where
import Control.Monad
import Data.Internal.DBus import Data.Internal.DBus
import Data.Internal.Dependency import Data.Internal.Dependency
import Data.List
import Data.Maybe
import RIO hiding (hFlush) import RIO hiding (hFlush)
import qualified RIO.ByteString.Lazy as BL import qualified RIO.ByteString.Lazy as BL
import RIO.List
import RIO.Process import RIO.Process
import qualified RIO.Text as T import qualified RIO.Text as T
import System.Environment import System.Environment

View File

@ -8,11 +8,8 @@
module Main (main) where module Main (main) where
import Control.Monad
import Data.Internal.DBus import Data.Internal.DBus
import Data.Internal.Dependency import Data.Internal.Dependency
import Data.List
import Data.Maybe
import Data.Monoid import Data.Monoid
import Data.Text.IO (hPutStrLn) import Data.Text.IO (hPutStrLn)
import Graphics.X11.Types import Graphics.X11.Types
@ -20,14 +17,15 @@ import Graphics.X11.Xlib.Atom
import Graphics.X11.Xlib.Extras import Graphics.X11.Xlib.Extras
import RIO import RIO
import RIO.Directory import RIO.Directory
import RIO.List
import RIO.Process import RIO.Process
import qualified RIO.Text as T import qualified RIO.Text as T
import System.Environment
import System.Posix.Signals import System.Posix.Signals
import System.Process import System.Process
( getPid ( getPid
, getProcessExitCode , getProcessExitCode
) )
import UnliftIO.Environment
import XMonad import XMonad
import XMonad.Actions.CopyWindow import XMonad.Actions.CopyWindow
import XMonad.Actions.CycleWS import XMonad.Actions.CycleWS

View File

@ -28,13 +28,10 @@ module Data.Internal.DBus
) )
where where
import Control.Monad
import DBus import DBus
import DBus.Client import DBus.Client
import Data.Bifunctor
import qualified Data.Map.Strict as M
import Data.Maybe
import RIO import RIO
import qualified RIO.Map as M
import qualified RIO.Text as T import qualified RIO.Text as T
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@ -99,23 +99,17 @@ module Data.Internal.Dependency
) )
where where
import Control.Monad.IO.Class
import Control.Monad.Identity
import Control.Monad.Reader
import DBus hiding (typeOf) import DBus hiding (typeOf)
import qualified DBus.Introspection as I import qualified DBus.Introspection as I
import Data.Aeson hiding (Error, Result) import Data.Aeson hiding (Error, Result)
import Data.Aeson.Key import Data.Aeson.Key
import Data.Bifunctor
import Data.Either
import Data.Internal.DBus import Data.Internal.DBus
import Data.List
import Data.Maybe
import Data.Yaml import Data.Yaml
import GHC.IO.Exception (ioe_description) import GHC.IO.Exception (ioe_description)
import RIO hiding (bracket, fromString) import RIO hiding (bracket, fromString)
import RIO.Directory import RIO.Directory
import RIO.FilePath import RIO.FilePath
import RIO.List
import RIO.Process hiding (findExecutable) import RIO.Process hiding (findExecutable)
import qualified RIO.Text as T import qualified RIO.Text as T
import System.Posix.Files import System.Posix.Files

View File

@ -22,11 +22,11 @@ import DBus
import Data.Internal.DBus import Data.Internal.DBus
import Data.Internal.Dependency import Data.Internal.Dependency
import Graphics.X11.Types import Graphics.X11.Types
import qualified RIO.Text as T import RIO.Directory
import System.Directory
( XdgDirectory (..) ( XdgDirectory (..)
, getXdgDirectory , getXdgDirectory
) )
import qualified RIO.Text as T
import System.IO import System.IO
import XMonad.Core hiding (spawn) import XMonad.Core hiding (spawn)
import XMonad.Internal.Command.Desktop import XMonad.Internal.Command.Desktop

View File

@ -43,11 +43,11 @@ import DBus
import Data.Internal.DBus import Data.Internal.DBus
import Data.Internal.Dependency import Data.Internal.Dependency
import RIO import RIO
import RIO.Directory
import RIO.FilePath import RIO.FilePath
import qualified RIO.Process as P import qualified RIO.Process as P
import qualified RIO.Text as T import qualified RIO.Text as T
import System.Posix.User import System.Posix.User
import UnliftIO.Directory
import UnliftIO.Environment import UnliftIO.Environment
import XMonad.Actions.Volume import XMonad.Actions.Volume
import XMonad.Core hiding (spawn) import XMonad.Core hiding (spawn)
@ -376,5 +376,5 @@ runCaptureBrowser = sometimesIO_
"feh" "feh"
(Only_ $ sysExe [Package Official "feh"] myImageBrowser) (Only_ $ sysExe [Package Official "feh"] myImageBrowser)
$ do $ do
dir <- io getCaptureDir dir <- getCaptureDir
spawnCmd myImageBrowser [T.pack dir] spawnCmd myImageBrowser [T.pack dir]

View File

@ -29,11 +29,11 @@ where
import Data.Internal.Dependency import Data.Internal.Dependency
import Graphics.X11.Types import Graphics.X11.Types
import RIO import RIO
import RIO.Directory
import RIO.FilePath import RIO.FilePath
import qualified RIO.Map as M import qualified RIO.Map as M
import qualified RIO.Process as P import qualified RIO.Process as P
import qualified RIO.Text as T import qualified RIO.Text as T
import UnliftIO.Directory
import XMonad.Core hiding (spawn) import XMonad.Core hiding (spawn)
import XMonad.Internal.Shell import XMonad.Internal.Shell
import qualified XMonad.Internal.Theme as XT import qualified XMonad.Internal.Theme as XT

View File

@ -34,12 +34,6 @@ module XMonad.Internal.Concurrent.DynamicWorkspaces
) )
where where
-- import Control.Concurrent
import Control.Monad
import Control.Monad.Reader
import Data.List (deleteBy, find)
import qualified Data.Map as M
import Data.Maybe
import Graphics.X11.Types import Graphics.X11.Types
import Graphics.X11.Xlib.Atom import Graphics.X11.Xlib.Atom
import Graphics.X11.Xlib.Display import Graphics.X11.Xlib.Display
@ -51,6 +45,8 @@ import RIO hiding
( Display ( Display
, display , display
) )
import RIO.List (deleteBy, find)
import qualified RIO.Map as M
import qualified RIO.Set as S import qualified RIO.Set as S
import System.Process import System.Process
import XMonad.Actions.DynamicWorkspaces import XMonad.Actions.DynamicWorkspaces

View File

@ -8,12 +8,12 @@
module XMonad.Internal.DBus.Removable (runRemovableMon) where module XMonad.Internal.DBus.Removable (runRemovableMon) where
import Control.Monad
import DBus import DBus
import DBus.Client import DBus.Client
import Data.Internal.DBus import Data.Internal.DBus
import Data.Internal.Dependency import Data.Internal.Dependency
import Data.Map.Strict (Map, member) import RIO
import qualified RIO.Map as M
import XMonad.Core (io) import XMonad.Core (io)
import XMonad.Internal.Command.Desktop import XMonad.Internal.Command.Desktop
@ -61,7 +61,7 @@ addedHasDrive :: [Variant] -> Bool
addedHasDrive [_, a] = addedHasDrive [_, a] =
maybe maybe
False False
(member driveFlag) (M.member driveFlag)
(fromVariant a :: Maybe (Map String (Map String Variant))) (fromVariant a :: Maybe (Map String (Map String Variant)))
addedHasDrive _ = False addedHasDrive _ = False

View File

@ -39,16 +39,14 @@ module Xmobar.Plugins.Bluetooth
) )
where where
import Control.Monad
import DBus import DBus
import DBus.Client import DBus.Client
import Data.Internal.DBus import Data.Internal.DBus
import Data.Internal.Dependency import Data.Internal.Dependency
import Data.List
import Data.List.Split
import qualified Data.Map as M
import Data.Maybe
import RIO import RIO
import RIO.FilePath
import RIO.List
import qualified RIO.Map as M
import qualified RIO.Text as T import qualified RIO.Text as T
import XMonad.Internal.DBus.Common import XMonad.Internal.DBus.Common
import Xmobar import Xmobar
@ -159,12 +157,12 @@ findDevices :: ObjectPath -> ObjectTree -> [ObjectPath]
findDevices adapter = filter (adaptorHasDevice adapter) . M.keys findDevices adapter = filter (adaptorHasDevice adapter) . M.keys
adaptorHasDevice :: ObjectPath -> ObjectPath -> Bool adaptorHasDevice :: ObjectPath -> ObjectPath -> Bool
adaptorHasDevice adaptor device = case splitPath device of adaptorHasDevice adaptor device = case splitPathNoRoot device of
[org, bluez, hciX, _] -> splitPath adaptor == [org, bluez, hciX] [org, bluez, hciX, _] -> splitPathNoRoot adaptor == [org, bluez, hciX]
_ -> False _ -> False
splitPath :: ObjectPath -> [T.Text] splitPathNoRoot :: ObjectPath -> [FilePath]
splitPath = fmap T.pack . splitOn "/" . dropWhile (== '/') . formatObjectPath splitPathNoRoot = dropWhile (== "/") . splitDirectories . formatObjectPath
getBtObjectTree :: MonadUnliftIO m => SysClient -> m ObjectTree getBtObjectTree :: MonadUnliftIO m => SysClient -> m ObjectTree
getBtObjectTree sys = callGetManagedObjects sys btBus btOMPath getBtObjectTree sys = callGetManagedObjects sys btBus btOMPath

View File

@ -15,7 +15,6 @@ where
import DBus import DBus
import Data.Internal.DBus import Data.Internal.DBus
import Data.Internal.Dependency import Data.Internal.Dependency
import Data.Word
import RIO import RIO
import qualified RIO.Text as T import qualified RIO.Text as T
import XMonad.Internal.Command.Desktop import XMonad.Internal.Command.Desktop

View File

@ -17,10 +17,9 @@ where
import DBus import DBus
import Data.Internal.DBus import Data.Internal.DBus
import Data.Internal.Dependency import Data.Internal.Dependency
import qualified Data.Map as M
import Data.Maybe
import qualified Data.Set as S
import RIO import RIO
import qualified RIO.Map as M
import qualified RIO.Set as S
import qualified RIO.Text as T import qualified RIO.Text as T
import XMonad.Internal.Command.Desktop import XMonad.Internal.Command.Desktop
import XMonad.Internal.DBus.Common import XMonad.Internal.DBus.Common

View File

@ -19,27 +19,18 @@ dependencies:
- base - base
- bytestring >= 0.10.8.2 - bytestring >= 0.10.8.2
- colour >= 2.3.5 - colour >= 2.3.5
- containers >= 0.6.0.1
- dbus >= 1.2.7 - dbus >= 1.2.7
- fdo-notify - fdo-notify
- io-streams >= 1.5.1.0
- mtl >= 2.2.2
- unix >= 2.7.2.2 - unix >= 2.7.2.2
- tcp-streams >= 1.0.1.1
- text >= 1.2.3.1 - text >= 1.2.3.1
- directory >= 1.3.3.0
- process >= 1.6.5.0 - process >= 1.6.5.0
- split >= 0.2.3.4
- xmobar - xmobar
- xmonad-extras >= 0.15.2 - xmonad-extras >= 0.15.2
- xmonad >= 0.13 - xmonad >= 0.13
- xmonad-contrib >= 0.13 - xmonad-contrib >= 0.13
- aeson >= 2.0.3.0 - aeson >= 2.0.3.0
- yaml >=0.11.8.0 - yaml >=0.11.8.0
- unordered-containers >= 0.2.16.0
- hashable >= 1.3.5.0
- xml >= 1.3.14 - xml >= 1.3.14
- lifted-base >= 0.2.3.12
- utf8-string >= 1.0.2 - utf8-string >= 1.0.2
- typed-process >= 0.2.8.0 - typed-process >= 0.2.8.0
- network >= 3.1.2.7 - network >= 3.1.2.7