-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Third party extensions for xmonad with wacky dependencies
--   
--   Various modules for xmonad that cannot be added to xmonad-contrib
--   because of additional dependencies.
@package xmonad-extras
@version 0.17.2


-- | Evaluate haskell expressions at runtime in the running xmonad
--   instance.
module XMonad.Actions.Eval

-- | Evaluates a given expression, but discard the returned value. Provided
--   for more convenient use in keybindings
evalExpression :: EvalConfig -> String -> X ()

-- | Evaluates a given expression whose result type has to be an instance
--   of Show
evalExpressionWithReturn :: EvalConfig -> String -> X String

-- | Configuration structure
data EvalConfig
EvalConfig :: (InterpreterError -> X String) -> [(ModuleName, Maybe String)] -> [String] -> EvalConfig

-- | Function to handle errors
[handleError] :: EvalConfig -> InterpreterError -> X String

-- | Modules to import for interpreting the expression. The pair consists
--   of the module name and an optional qualification of the imported
--   module.
[imports] :: EvalConfig -> [(ModuleName, Maybe String)]

-- | Other source files that should be loaded The definitions of these
--   modules will be visible regardless of whether they are exported.
[modules] :: EvalConfig -> [String]

-- | Defaults for evaluating expressions.
defaultEvalConfig :: EvalConfig


-- | Invert individual window contents via compton/picom compositing
--   manager.
module XMonad.Actions.Invert

-- | Ask compton/picom the inverted status of the specified window
inversionStatus :: Display -> Window -> X Bool

-- | Tell compton/picom to set the inverted status of the specified window
invert :: Display -> Window -> Bool -> X ()


-- | A minimal interface to the "amixer" command-line utility.
module XMonad.Actions.Volume

-- | Toggle mutedness on the default channels. Returns <a>True</a> when
--   this attempts to mute the speakers and <a>False</a> when this attempts
--   to unmute the speakers.
toggleMute :: MonadIO m => m Bool

-- | Raise the volume on the default channels the given number of
--   percentage points. Returns the volume it attempts to set.
raiseVolume :: MonadIO m => Double -> m Double

-- | Lower the volume on the default channels the given number of
--   percentage points. Returns the volume it attempts to set.
lowerVolume :: MonadIO m => Double -> m Double

-- | Get the geometric mean of the volumes on the default channels.
getVolume :: MonadIO m => m Double

-- | Get the mutedness of the default channels. Returns <a>True</a> if any
--   of the channels are muted, and <a>False</a> otherwise.
getMute :: MonadIO m => m Bool

-- | Get both the volume and the mutedness of the default channels.
getVolumeMute :: MonadIO m => m (Double, Bool)

-- | Attempt to set the default channels to a volume given in percentage of
--   maximum.
setVolume :: MonadIO m => Double -> m ()

-- | Attempt to set the muting on the default channels.
setMute :: MonadIO m => Bool -> m ()

-- | Attempt to set both the volume in percent and the muting on the
--   default channels.
setVolumeMute :: MonadIO m => Double -> Bool -> m ()

-- | Apply a function to the volume of the default channels, and return the
--   modified value.
modifyVolume :: MonadIO m => (Double -> Double) -> m Double

-- | Apply a function to the muting on the default channels, and return the
--   modified value.
modifyMute :: MonadIO m => (Bool -> Bool) -> m Bool

-- | Apply a function to both the volume and the muting of the default
--   channels, and return the modified values.
modifyVolumeMute :: MonadIO m => (Double -> Bool -> (Double, Bool)) -> m (Double, Bool)

-- | Channels are what amixer calls "simple controls". The most common ones
--   are "Master", "Wave", and "PCM", so these are included in
--   <a>defaultChannels</a>. It is guaranteed to be safe to pass channel
--   names that don't exist on the default sound device to the *Channels
--   family of functions.
defaultChannels :: [String]
toggleMuteChannels :: MonadIO m => [String] -> m Bool
raiseVolumeChannels :: MonadIO m => [String] -> Double -> m Double
lowerVolumeChannels :: MonadIO m => [String] -> Double -> m Double
getVolumeChannels :: MonadIO m => [String] -> m Double
getMuteChannels :: MonadIO m => [String] -> m Bool
getVolumeMuteChannels :: MonadIO m => [String] -> m (Double, Bool)
setVolumeChannels :: MonadIO m => [String] -> Double -> m ()
setMuteChannels :: MonadIO m => [String] -> Bool -> m ()
setVolumeMuteChannels :: MonadIO m => [String] -> Double -> Bool -> m ()
modifyVolumeChannels :: MonadIO m => [String] -> (Double -> Double) -> m Double
modifyMuteChannels :: MonadIO m => [String] -> (Bool -> Bool) -> m Bool
modifyVolumeMuteChannels :: MonadIO m => [String] -> (Double -> Bool -> (Double, Bool)) -> m (Double, Bool)

-- | Default options for displaying the volume.
defaultOSDOpts :: Bool -> String

-- | Helper function to output current volume via osd_cat. (Needs the
--   osd_cat executable). The second parameter is passed True when the
--   speakers are muted and should return the options to pass to osd_cat.
osdCat :: MonadIO m => Double -> (Bool -> String) -> m ()


-- | A hook that remembers per-window keyboard layouts and switches them on
--   focus changes.
module XMonad.Hooks.PerWindowKbdLayout
perWindowKbdLayout :: Event -> X All
instance GHC.Show.Show XMonad.Hooks.PerWindowKbdLayout.LayoutStorage
instance GHC.Read.Read XMonad.Hooks.PerWindowKbdLayout.LayoutStorage
instance XMonad.Core.ExtensionClass XMonad.Hooks.PerWindowKbdLayout.LayoutStorage
instance Foreign.Storable.Storable XMonad.Hooks.PerWindowKbdLayout.XkbStateRec


-- | A prompt for evaluating Haskell expressions (in the context of the
--   running xmonad instance).
module XMonad.Prompt.Eval

-- | A prompt that evaluates the entered Haskell expression, whose type has
--   to be an instance of Show.
evalPrompt :: EvalConfig -> XPConfig -> X ()

-- | The same as <a>evalPrompt</a>, but lets the user supply a function to
--   be executed on the returned string, which is produced by applying show
--   to the executed expression. (This is a crude solution, but the
--   returned type has to be monomorphic)
evalPromptWithOutput :: EvalConfig -> XPConfig -> (String -> X ()) -> X ()

-- | A nice default to have the result of an expression displayed by dzen,
--   if it's interesting (i.e. not () or an empty string). The first
--   parameter specifies the display time in microseconds, the second
--   parameter allows to pass additional options to dzen.
showWithDzen :: Int -> [String] -> String -> X ()
instance XMonad.Prompt.XPrompt XMonad.Prompt.Eval.EvalPrompt


-- | This module lets the user select songs and have MPD add/play them by
--   filtering them by user-supplied criteria(E.g. ask for an artist, then
--   for the album..)
module XMonad.Prompt.MPD

-- | Lets the user filter out non-matching songs. For example, if given
--   [Artist, Album] as third argument, this will prompt the user for an
--   artist(with tab-completion), then for an album by that artist and then
--   returns the songs from that album.
findMatching :: RunMPD -> XPConfig -> [Metadata] -> X [Song]

-- | Lets the user filter out non-matching songs. For example, if given
--   [Artist, Album] as third argument, this will prompt the user for an
--   artist(with tab-completion), then for an album by that artist and then
--   returns the songs from that album.
findMatchingWith :: (String -> String -> Bool) -> RunMPD -> XPConfig -> [Metadata] -> X [Song]

-- | Add all selected songs to the playlist if they are not in it.
addMatching :: RunMPD -> XPConfig -> [Metadata] -> X [Int]

-- | Add all selected songs to the playlist if they are not in it.
addMatchingWith :: (String -> String -> Bool) -> RunMPD -> XPConfig -> [Metadata] -> X [Int]

-- | Add matching songs and play the first one.
addAndPlay :: RunMPD -> XPConfig -> [Metadata] -> X ()

-- | Add matching songs and play the first one.
addAndPlayWith :: (String -> String -> Bool) -> RunMPD -> XPConfig -> [Metadata] -> X ()

-- | Load an existing playlist and play it.
loadPlaylist :: RunMPD -> XPConfig -> X ()

-- | Load an existing playlist and play it.
loadPlaylistWith :: (String -> String -> Bool) -> RunMPD -> XPConfig -> X ()

-- | Add songs which match all of the given words with regard to any of the
--   metadata.
addAndPlayAny :: RunMPD -> XPConfig -> [Metadata] -> X ()

-- | Pick a song from the current playlist.
pickPlayListItem :: RunMPD -> XPConfig -> X ()

-- | Allows the user to supply a custom way to connect to MPD (e.g.
--   partially applied withMPDEx).
type RunMPD = forall a. MPD a -> IO (Response a)

-- | Determine playlist position of the song and add it, if it isn't
--   present.
findOrAdd :: Song -> MPD Int
instance XMonad.Prompt.XPrompt XMonad.Prompt.MPD.MPDPrompt


-- | Module to control the brightness of the screen in linux environments
--   
--   <ul>
--   <li><i><tt>Requirements</tt></i> This module assumes that the
--   following files
--   exists:<ul><li><b>/sys/class/backlight/intel_backlight/max_brightness</b></li><li><b>/sys/class/backlight/intel_backlight/brightness</b></li></ul>Also,
--   brightness should be updatable by changing the content of
--   <b>/sys/class/backlight/intel_backlight/brightness</b>.</li>
--   <li><i><tt>Permissions</tt></i> To use this module, the owner of the
--   <b>xmonad</b> process will need to have permission to write to
--   <b>/sys/class/backlight/intel_backlight/brightness</b>. To achieve
--   this, you can:<ul><li>Create a group with your user and root and give
--   permissions to this group to write to the file. I usually follow these
--   steps:<ul><li>Create a group named xmonad</li></ul><pre>$ sudo
--   groupadd xmonad</pre><ul><li>Add user root and your user name to the
--   group xmonad.</li></ul><pre>$ sudo usermod -a -G xmonad root $ sudo
--   usermod -a -G xmonad sibi</pre><ul><li>The files under <b>/sys</b> are
--   virtual. It's a RAM based filesystem through which you can access
--   kernel data structures. The permission you give there won't persist
--   after reboot. One of the way for persisting is creating a <a>systemd
--   script</a>:</li></ul><pre>$ cat /etc/systemd/system/brightness.service
--   [Unit] Description=Set brightness writable to everybody
--   Before=nodered.service [Service] Type=oneshot User=root
--   ExecStart=/bin/bash -c "chgrp -R -H xmonad
--   /sys/class/backlight/intel_backlight &amp;&amp; chmod g+w
--   /sys/class/backlight/intel_backlight/brightness" [Install]
--   WantedBy=multi-user.target $ sudo systemctl enable brightness.service
--   $ sudo systemctl start brightness.service $ sudo systemctl status
--   brightness.service</pre></li></ul></li>
--   </ul>
--   
--   <ul>
--   <li>Allow anyone to write the file through 646 permissions:
--   <b>-rw-r--rw-</b>;</li>
--   </ul>
module XMonad.Util.Brightness

-- | Update brightness by +100
increase :: X ()

-- | Update brightness by -100
decrease :: X ()

-- | Perform all needed IO to update screen brightness
change :: (Int -> Int) -> IO (Either () ())

-- | Change brightness to a particular level
setBrightness :: Int -> X ()


-- | Similar to XMonad.Util.WindowProperties, but uses posix regular
--   expressions matching instead of exact match.
module XMonad.Util.WindowPropertiesRE

-- | A wrapper for X.U.WindowProperties.Property. Checks using regular
--   expression.
data PropertyRE
RE :: Property -> PropertyRE

-- | Regular expressions matching for ManageHooks
(~?) :: Functor f => f String -> String -> f Bool

-- | Similar to XMonad.Util.WindowProperties.propertyToQuery, but uses
--   regexp match instead of exact match
propertyToQueryRE :: Property -> Query Bool

-- | Does given window have this property?
hasPropertyRE :: PropertyRE -> Window -> X Bool
instance GHC.Read.Read XMonad.Util.WindowPropertiesRE.PropertyRE
instance GHC.Show.Show XMonad.Util.WindowPropertiesRE.PropertyRE
instance XMonad.Layout.LayoutBuilder.Predicate XMonad.Util.WindowPropertiesRE.PropertyRE Graphics.X11.Types.Window
