diff options
| -rw-r--r-- | src/Rahm/Desktop/Common.hs | 18 | ||||
| -rw-r--r-- | src/Rahm/Desktop/DMenu.hs | 9 | ||||
| -rw-r--r-- | src/Rahm/Desktop/Hash.hs | 2 | ||||
| -rw-r--r-- | src/Rahm/Desktop/History.hs | 17 | ||||
| -rw-r--r-- | src/Rahm/Desktop/Keys/Wml.hs | 58 | ||||
| -rw-r--r-- | src/Rahm/Desktop/Layout/ConsistentMosaic.hs | 8 | ||||
| -rw-r--r-- | src/Rahm/Desktop/Layout/Redescribe.hs | 6 | ||||
| -rw-r--r-- | src/Rahm/Desktop/Layout/ReinterpretMessage.hs | 6 | ||||
| -rw-r--r-- | src/Rahm/Desktop/Logger.hs | 8 | ||||
| -rw-r--r-- | src/Rahm/Desktop/PassMenu.hs | 8 | ||||
| -rw-r--r-- | src/Rahm/Desktop/RebindKeys.hs | 15 | ||||
| -rw-r--r-- | src/Rahm/Desktop/Theater.hs | 11 | ||||
| -rw-r--r-- | src/Rahm/Desktop/Workspaces.hs | 19 |
13 files changed, 136 insertions, 49 deletions
diff --git a/src/Rahm/Desktop/Common.hs b/src/Rahm/Desktop/Common.hs index e04b277..730a216 100644 --- a/src/Rahm/Desktop/Common.hs +++ b/src/Rahm/Desktop/Common.hs @@ -1,4 +1,20 @@ -module Rahm.Desktop.Common where +module Rahm.Desktop.Common + ( focusLocation, + masterWindow, + windowsInWorkspace, + getString, + askWindowId, + windowJump, + withBorderColor, + withBorderWidth, + gotoWorkspace, + moveLocationToWorkspace, + getCurrentWorkspace, + getCurrentLocation, + runMaybeT_, + Location (..), + ) +where import Control.Monad (forM_, void, when) import Control.Monad.Trans.Maybe (MaybeT (..)) diff --git a/src/Rahm/Desktop/DMenu.hs b/src/Rahm/Desktop/DMenu.hs index cd72de4..a5856e9 100644 --- a/src/Rahm/Desktop/DMenu.hs +++ b/src/Rahm/Desktop/DMenu.hs @@ -1,4 +1,11 @@ -module Rahm.Desktop.DMenu where +module Rahm.Desktop.DMenu + ( menuCommand, + menuCommandString, + runDMenu, + runDMenuPrompt, + runDMenuPromptWithMap, + ) +where import Control.Monad (void) import Data.List (intercalate) diff --git a/src/Rahm/Desktop/Hash.hs b/src/Rahm/Desktop/Hash.hs index ec7a56d..89a62fd 100644 --- a/src/Rahm/Desktop/Hash.hs +++ b/src/Rahm/Desktop/Hash.hs @@ -1,6 +1,6 @@ {-# LANGUAGE OverloadedStrings #-} -module Rahm.Desktop.Hash where +module Rahm.Desktop.Hash (quickHash) where import qualified Crypto.Hash.SHA1 as SHA1 (hash) import qualified Data.ByteString as BS (unpack) diff --git a/src/Rahm/Desktop/History.hs b/src/Rahm/Desktop/History.hs index ab79352..fedf3d2 100644 --- a/src/Rahm/Desktop/History.hs +++ b/src/Rahm/Desktop/History.hs @@ -1,4 +1,19 @@ -module Rahm.Desktop.History where +module Rahm.Desktop.History + ( zipperDbgPrint, + pushZipper, + getZipper, + zipperBack, + zipperForward, + pastHistory, + getMostRecentLocationInHistory, + historyBack, + historyForward, + lastLocation, + nextLocation, + jumpToLastLocation, + historyHook, + ) +where import Data.Default (Default (..)) import Data.Foldable (toList) diff --git a/src/Rahm/Desktop/Keys/Wml.hs b/src/Rahm/Desktop/Keys/Wml.hs index 02ea94e..34bbdff 100644 --- a/src/Rahm/Desktop/Keys/Wml.hs +++ b/src/Rahm/Desktop/Keys/Wml.hs @@ -12,7 +12,30 @@ -- &z!~@,,^ // The window tagged with z and The last window on the screen third from the left -- @@s // All the windows that share a workspace with the window tagged s -- \%@s // All windows except those on workspace 's' -module Rahm.Desktop.Keys.Wml where +module Rahm.Desktop.Keys.Wml + ( readWorkspaceMacro, + readWindowsetMacro, + readNextWorkspace, + readNextLocationSet, + moveLocationToWorkspace, + moveLocationToWorkspaceFn, + gotoWorkspaceFn, + readMacroString, + justWorkspace, + justWorkspaceWithPreferredWindow, + blackHoleWorkspace, + alternateWorkspace, + floatWorkspace, + joinMaybe, + feedKeys, + feedKeysT, + workspaceForKeysT, + workspaceForKeys, + locationSetForKeysT, + locationSetForKeys, + readNextWorkspaceName, + ) +where import Control.Monad (forM_, join, when) import Control.Monad.Trans.Class (MonadTrans (lift)) @@ -111,38 +134,7 @@ import XMonad ) import XMonad.Prompt.ConfirmPrompt (confirmPrompt) import qualified XMonad.Util.ExtensibleState as XS (get, modify) -import Prelude - ( Applicative, - Eq ((==)), - Foldable (elem, null), - Fractional ((/)), - Functor (fmap), - Maybe (..), - Monad (return), - MonadFail (fail), - Num ((-)), - Read, - Show (show), - String, - Traversable (mapM), - break, - concatMap, - filter, - flip, - id, - map, - mapM_, - not, - reverse, - snd, - tail, - ($), - (++), - (.), - (<$>), - (=<<), - (||), - ) +import Prelude hiding (head, last) type KeyString = [(KeyMask, KeySym, String)] diff --git a/src/Rahm/Desktop/Layout/ConsistentMosaic.hs b/src/Rahm/Desktop/Layout/ConsistentMosaic.hs index 52406d6..c513530 100644 --- a/src/Rahm/Desktop/Layout/ConsistentMosaic.hs +++ b/src/Rahm/Desktop/Layout/ConsistentMosaic.hs @@ -2,7 +2,13 @@ -- consistent experience where instead of the windows being the ones it works -- on, it instead works on the window places so things like window swapping -- still work as expected. -module Rahm.Desktop.Layout.ConsistentMosaic where +module Rahm.Desktop.Layout.ConsistentMosaic + ( doAlt, + expandPositionAlt, + shrinkPositionAlt, + MosaicWrap(..) + ) +where import qualified Data.Map as Map (fromList, lookup) import Data.Maybe (mapMaybe) diff --git a/src/Rahm/Desktop/Layout/Redescribe.hs b/src/Rahm/Desktop/Layout/Redescribe.hs index e65fd69..ca041c3 100644 --- a/src/Rahm/Desktop/Layout/Redescribe.hs +++ b/src/Rahm/Desktop/Layout/Redescribe.hs @@ -1,7 +1,11 @@ -- Module to enable redescribing layouts. Unlike LayoutModifiers though, this -- class is aware of the underlying type as it may need to access some internals -- to generate the new description. -module Rahm.Desktop.Layout.Redescribe where +module Rahm.Desktop.Layout.Redescribe + ( Describer (..), + Redescribe (..), + ) +where import qualified Rahm.Desktop.StackSet as W ( Workspace (Workspace), diff --git a/src/Rahm/Desktop/Layout/ReinterpretMessage.hs b/src/Rahm/Desktop/Layout/ReinterpretMessage.hs index fc3c447..3d77bef 100644 --- a/src/Rahm/Desktop/Layout/ReinterpretMessage.hs +++ b/src/Rahm/Desktop/Layout/ReinterpretMessage.hs @@ -1,4 +1,8 @@ -module Rahm.Desktop.Layout.ReinterpretMessage where +module Rahm.Desktop.Layout.ReinterpretMessage + ( DoReinterpret (..), + ReinterpretMessage (..), + ) +where import Data.Proxy (Proxy (..)) import XMonad (SomeMessage, X) diff --git a/src/Rahm/Desktop/Logger.hs b/src/Rahm/Desktop/Logger.hs index 228ef49..593f820 100644 --- a/src/Rahm/Desktop/Logger.hs +++ b/src/Rahm/Desktop/Logger.hs @@ -1,4 +1,10 @@ -module Rahm.Desktop.Logger where +module Rahm.Desktop.Logger + ( getLogLevel, + setLogLevel, + logs, + LogLevel (..), + ) +where import Control.Monad (forM_, join, when) import Data.Time.LocalTime (getZonedTime) diff --git a/src/Rahm/Desktop/PassMenu.hs b/src/Rahm/Desktop/PassMenu.hs index 9c346cf..42ecdff 100644 --- a/src/Rahm/Desktop/PassMenu.hs +++ b/src/Rahm/Desktop/PassMenu.hs @@ -1,8 +1,8 @@ -module Rahm.Desktop.PassMenu where +module Rahm.Desktop.PassMenu (runPassMenu) where -import Control.Monad ( void ) -import XMonad ( X ) -import XMonad.Util.Run ( safeSpawn ) +import Control.Monad (void) +import XMonad (X) +import XMonad.Util.Run (safeSpawn) runPassMenu :: X () runPassMenu = diff --git a/src/Rahm/Desktop/RebindKeys.hs b/src/Rahm/Desktop/RebindKeys.hs index be3eff6..25162ba 100644 --- a/src/Rahm/Desktop/RebindKeys.hs +++ b/src/Rahm/Desktop/RebindKeys.hs @@ -1,7 +1,18 @@ -- Module for intercepting key presses not explicity mapped in the key bindings. -- This uses some deep magic with grabKey and windows and everything else, but -- it makes window-specific key bindings awesome! -module Rahm.Desktop.RebindKeys where +module Rahm.Desktop.RebindKeys + ( remapHook, + getKeyCodesForKeysym, + doGrab, + disableKey, + remapKey, + sendKeyQ, + sendKey, + rebindKey, + WindowHook (..), + ) +where import Control.Monad (forM, forM_) import Control.Monad.Trans.Class (lift) @@ -117,7 +128,7 @@ remapKey keyFrom action = do XS.modify $ \(RemapState keyMap) -> RemapState $ - Map.insert (window, keyFrom) action keyMap + Map.insert (window, keyFrom) action keyMap -- sendKey, but as a query. sendKeyQ :: (KeyMask, KeySym) -> Query () diff --git a/src/Rahm/Desktop/Theater.hs b/src/Rahm/Desktop/Theater.hs index 7634607..59928a2 100644 --- a/src/Rahm/Desktop/Theater.hs +++ b/src/Rahm/Desktop/Theater.hs @@ -1,4 +1,13 @@ -module Rahm.Desktop.Theater where +module Rahm.Desktop.Theater + ( getCurrentTheaterName, + getTheaters, + saveTheater, + saveCurrentTheater, + restoreTheater, + isStackSetEmpty, + updateStateWithWindows, + ) +where -- A "Theater" is the state of a stackset. One can save the current stackset as -- a "theater" and then restore it later. If new windows were added, those new diff --git a/src/Rahm/Desktop/Workspaces.hs b/src/Rahm/Desktop/Workspaces.hs index 95d2297..cd8ab84 100644 --- a/src/Rahm/Desktop/Workspaces.hs +++ b/src/Rahm/Desktop/Workspaces.hs @@ -1,5 +1,22 @@ -- Common ways to select workspaces -module Rahm.Desktop.Workspaces where +module Rahm.Desktop.Workspaces + ( getPopulatedWorkspaces, + next, + prev, + lastWorkspaceId, + firstWorkspaceId, + windowsInCurrentWorkspace, + getHorizontallyOrderedScreens, + accompaningWorkspace, + adjacentWorkspaceNotVisible, + adjacentWorkspace, + viewAdjacent, + adjacentScreen, + withScreen, + workspaceWithWindow, + WorkspaceState (..), + ) +where import Control.Arrow (Arrow ((&&&))) import Data.Char (isUpper, toLower, toUpper) |