This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} | |
module Cached | |
( Cached | |
, cached | |
) where | |
import XMonad | |
import qualified XMonad.StackSet as W | |
import Data.Maybe (fromMaybe) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TypeApplications #-} | |
import Control.Applicative (ZipList(..)) | |
import Data.Monoid (Ap(..)) | |
import Data.Maybe (fromMaybe) | |
import Data.Foldable (traverse_) | |
every :: Int -> String -> Ap ZipList (Maybe String) | |
every m s = (Ap . ZipList) (cycle $ Just s : replicate (m - 1) Nothing) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XMonad | |
import qualified XMonad.StackSet as W | |
import Graphics.X11.Xlib.Window (raiseWindow) | |
import XMonad.Hooks.EwmhDesktops (ewmh) | |
import Data.Monoid (All(..)) | |
import qualified Data.Map.Strict as M | |
-- | Separate out propertyNotifyHook from the logHook. | |
propertyNotifyHook :: X () -> Event -> X All |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XMonad | |
import XMonad.Actions.PerWorkspaceKeys | |
import qualified Data.Map.Strict as M | |
-- | Given config dependent bindings per workspace, produce regular xmonad | |
-- bindings via @bindOn@. Use like e.g. | |
-- | |
-- > main = xmonad $ def { keys = perWkspKeys myKeyBinds <+> keys def } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE LambdaCase #-} | |
-------------------------------------------------------------------------------- | |
-- | | |
-- Module : XMonad.Util.Grab | |
-- Description : TODO | |
-- Copyright : (c) 2018 L. S. Leary -- TODO this is kinda wrong... | |
-- License : BSD3-style (see LICENSE) | |
-- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XMonad | |
import XMonad.Util.Types | |
import qualified XMonad.StackSet as W | |
import qualified Data.Map.Strict as M | |
import Control.Monad (when) | |
-- | Shift a @RationalRect@ to an edge of the screen. | |
toScreenEdge :: Direction2D -> W.RationalRect -> W.RationalRect |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TypeOperators, PatternSynonyms, ExplicitNamespaces #-} | |
{-# LANGUAGE LambdaCase, BlockArguments #-} | |
module Select | |
( type (-?)(Fun, Const, Lazy, unLazy), ($?) | |
, Selective(..) | |
, select, branch, whenS, ifS, whileS, fromMaybeS | |
, (<||>), (<&&>), anyS, allS | |
, Monad(..) | |
) where |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE BlockArguments #-} | |
module Y where | |
newtype Y a = Y { ($$) :: Y a -> a } | |
{-# NOINLINE y #-} | |
y :: (a -> a) -> Y a | |
y f = Y \x -> f (x $$ x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE StandaloneDeriving, DeriveFunctor, GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE LambdaCase #-} | |
-------------------------------------------------------------------------------- | |
-- Module : XMonad.Actions.ConditionalBindings | |
-- Description : A framework for producing conditional key bindings. | |
-- Copyright : (c) 2018 L. S. Leary | |
-- License : BSD3-style (see LICENSE) | |
-- | |
-- Maintainer : L. S. Leary |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ThenRefocusAfter where | |
import XMonad | |
import XMonad.Hooks.RefocusLast (refocusWhen) | |
import XMonad.Util.NamedScratchpad | |
(NamedScratchpads, query, namedScratchpadAction) | |
import qualified XMonad.StackSet as W | |
thenRefocusAfter :: Query Bool -> X a -> X a | |
p `thenRefocusAfter` act = do |
OlderNewer