mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 03:20:21 -07:00
Miscellaneous spell-checking
This commit is contained in:
parent
9498388041
commit
6302d0b0b9
@ -64,7 +64,7 @@ copy n = copy'
|
|||||||
insertUp' a s = modify (Just $ Stack a [] [])
|
insertUp' a s = modify (Just $ Stack a [] [])
|
||||||
(\(Stack t l r) -> Just $ Stack a (L.delete a l) (L.delete a (t:r))) s
|
(\(Stack t l r) -> Just $ Stack a (L.delete a l) (L.delete a (t:r))) s
|
||||||
|
|
||||||
-- | Remove the focussed window from this workspace. If it's present in no
|
-- | Remove the focused window from this workspace. If it's present in no
|
||||||
-- other workspace, then kill it instead. If we do kill it, we'll get a
|
-- other workspace, then kill it instead. If we do kill it, we'll get a
|
||||||
-- delete notify back from X.
|
-- delete notify back from X.
|
||||||
--
|
--
|
||||||
|
@ -53,7 +53,7 @@ import Graphics.X11.Xlib.Extras
|
|||||||
-- keysResizeWindow (-10, -10) (0, 1) shrinks the window in direction of the bottom-left corner
|
-- keysResizeWindow (-10, -10) (0, 1) shrinks the window in direction of the bottom-left corner
|
||||||
--
|
--
|
||||||
-- keysAbsResizeWindow (dx, dy) (ax, ay) changes the width by dx and the height by dy leaving the screen
|
-- keysAbsResizeWindow (dx, dy) (ax, ay) changes the width by dx and the height by dy leaving the screen
|
||||||
-- absolut point (ax, ay) fixed
|
-- absolute point (ax, ay) fixed
|
||||||
--
|
--
|
||||||
-- examples on a 1024x768 screen: keysAbsResizeWindow (10, 10) (0, 0) enlarge the window and if it is not in the top-left corner it will also be moved away
|
-- examples on a 1024x768 screen: keysAbsResizeWindow (10, 10) (0, 0) enlarge the window and if it is not in the top-left corner it will also be moved away
|
||||||
--
|
--
|
||||||
|
@ -59,7 +59,7 @@ import XMonad hiding (workspaces)
|
|||||||
-- > , ((modWinMask .|. shiftMask, xK_g ), tagPrompt defaultXPConfig (\s -> withTaggedGlobalP s shiftHere))
|
-- > , ((modWinMask .|. shiftMask, xK_g ), tagPrompt defaultXPConfig (\s -> withTaggedGlobalP s shiftHere))
|
||||||
-- > , ((modWinMask .|. controlMask, xK_g), tagPrompt defaultXPConfig (\s -> focusUpTaggedGlobal s))
|
-- > , ((modWinMask .|. controlMask, xK_g), tagPrompt defaultXPConfig (\s -> focusUpTaggedGlobal s))
|
||||||
--
|
--
|
||||||
-- NOTE: Tags are saved as space seperated string and split with 'unwords' thus
|
-- NOTE: Tags are saved as space separated string and split with 'unwords' thus
|
||||||
-- if you add a tag "a b" the window will have the tags "a" and "b" but not "a b".
|
-- if you add a tag "a b" the window will have the tags "a" and "b" but not "a b".
|
||||||
|
|
||||||
-- %import XMonad.Actions.TagWindows
|
-- %import XMonad.Actions.TagWindows
|
||||||
|
@ -79,7 +79,7 @@ makeSimpleDzenConfig = do
|
|||||||
--
|
--
|
||||||
-- > main = dzen xmonad
|
-- > main = dzen xmonad
|
||||||
--
|
--
|
||||||
-- The intent is that the avove config file should provide a nice status
|
-- The intent is that the above config file should provide a nice status
|
||||||
-- bar with minimal effort.
|
-- bar with minimal effort.
|
||||||
--
|
--
|
||||||
dzen :: (XConfig (Choose Tall (Choose (Mirror Tall) Full)) -> IO ()) -> IO ()
|
dzen :: (XConfig (Choose Tall (Choose (Mirror Tall) Full)) -> IO ()) -> IO ()
|
||||||
@ -192,7 +192,7 @@ dzenColor fg bg = wrap (fg1++bg1) (fg2++bg2)
|
|||||||
(bg1,bg2) | null bg = ("","")
|
(bg1,bg2) | null bg = ("","")
|
||||||
| otherwise = ("^bg(" ++ bg ++ ")","^bg()")
|
| otherwise = ("^bg(" ++ bg ++ ")","^bg()")
|
||||||
|
|
||||||
-- | Escape any dzen metacharaters.
|
-- | Escape any dzen metacharacters.
|
||||||
dzenEscape :: String -> String
|
dzenEscape :: String -> String
|
||||||
dzenEscape = concatMap (\x -> if x == '^' then "^^" else [x])
|
dzenEscape = concatMap (\x -> if x == '^' then "^^" else [x])
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ import Foreign.C.Types (CLong)
|
|||||||
import Data.Maybe (catMaybes)
|
import Data.Maybe (catMaybes)
|
||||||
|
|
||||||
-- $usage
|
-- $usage
|
||||||
-- Add the imports to your configuration file and add the mangeHook:
|
-- Add the imports to your configuration file and add the manageHook:
|
||||||
--
|
--
|
||||||
-- > import XMonad.Hooks.ManageDocks
|
-- > import XMonad.Hooks.ManageDocks
|
||||||
--
|
--
|
||||||
|
@ -55,11 +55,11 @@ import qualified XMonad.StackSet as W ( differentiate )
|
|||||||
|
|
||||||
-- These bindings will move a window into the sublayout that is
|
-- These bindings will move a window into the sublayout that is
|
||||||
-- up/down/left/right of its current position. Note that there is some
|
-- up/down/left/right of its current position. Note that there is some
|
||||||
-- weirdness in combineTwo, in that the mod-tab focus order is not very
|
-- weirdness in combineTwo, in that the mod-tab focus order is not very closely
|
||||||
-- closely related to the layout order. This is because we're forced to
|
-- related to the layout order. This is because we're forced to keep track of
|
||||||
-- keep track of the window positions sparately, and this is ugly. If you
|
-- the window positions separately, and this is ugly. If you don't like this,
|
||||||
-- don't like this, lobby for hierarchical stacks in core xmonad or go
|
-- lobby for hierarchical stacks in core xmonad or go reim:lement the core of
|
||||||
-- reimelement the core of xmonad yourself.
|
-- xmonad yourself.
|
||||||
|
|
||||||
-- %import XMonad.Layout.Combo
|
-- %import XMonad.Layout.Combo
|
||||||
-- %layout , combineTwo (TwoPane 0.03 0.5) (tabbed shrinkText defaultTConf) (tabbed shrinkText defaultTConf)
|
-- %layout , combineTwo (TwoPane 0.03 0.5) (tabbed shrinkText defaultTConf) (tabbed shrinkText defaultTConf)
|
||||||
|
@ -159,7 +159,7 @@ data EOT = EOT deriving (Read, Show)
|
|||||||
data HCons a b = HCons a b deriving (Read, Show)
|
data HCons a b = HCons a b deriving (Read, Show)
|
||||||
|
|
||||||
infixr 0 ??
|
infixr 0 ??
|
||||||
-- | Prepend an element to a heterogenuous list. Used to build transformer
|
-- | Prepend an element to a heterogeneous list. Used to build transformer
|
||||||
-- tables for 'mkToggle'.
|
-- tables for 'mkToggle'.
|
||||||
(??) :: (HList b w) => a -> b -> HCons a b
|
(??) :: (HList b w) => a -> b -> HCons a b
|
||||||
(??) = HCons
|
(??) = HCons
|
||||||
|
@ -90,10 +90,10 @@ data XPState =
|
|||||||
|
|
||||||
data XPConfig =
|
data XPConfig =
|
||||||
XPC { font :: String -- ^ Font
|
XPC { font :: String -- ^ Font
|
||||||
, bgColor :: String -- ^ Backgroud color
|
, bgColor :: String -- ^ Background color
|
||||||
, fgColor :: String -- ^ Font color
|
, fgColor :: String -- ^ Font color
|
||||||
, fgHLight :: String -- ^ Font color of a highlighted completion entry
|
, fgHLight :: String -- ^ Font color of a highlighted completion entry
|
||||||
, bgHLight :: String -- ^ Backgroud color of a highlighted completion entry
|
, bgHLight :: String -- ^ Background color of a highlighted completion entry
|
||||||
, borderColor :: String -- ^ Border color
|
, borderColor :: String -- ^ Border color
|
||||||
, promptBorderWidth :: Dimension -- ^ Border width
|
, promptBorderWidth :: Dimension -- ^ Border width
|
||||||
, position :: XPPosition -- ^ Position: 'Top' or 'Bottom'
|
, position :: XPPosition -- ^ Position: 'Top' or 'Bottom'
|
||||||
@ -336,7 +336,7 @@ startOfLine :: XP ()
|
|||||||
startOfLine =
|
startOfLine =
|
||||||
modify $ \s -> s { offset = 0 }
|
modify $ \s -> s { offset = 0 }
|
||||||
|
|
||||||
-- | Flush the command string and reset the offest
|
-- | Flush the command string and reset the offset
|
||||||
flushString :: XP ()
|
flushString :: XP ()
|
||||||
flushString = do
|
flushString = do
|
||||||
modify $ \s -> s { command = "", offset = 0}
|
modify $ \s -> s { command = "", offset = 0}
|
||||||
@ -438,7 +438,7 @@ printPrompt drw = do
|
|||||||
let (gc,(c,(d,fs))) = (gcon &&& config &&& dpy &&& fontS) st
|
let (gc,(c,(d,fs))) = (gcon &&& config &&& dpy &&& fontS) st
|
||||||
(prt,(com,off)) = (show . xptype &&& command &&& offset) st
|
(prt,(com,off)) = (show . xptype &&& command &&& offset) st
|
||||||
str = prt ++ com
|
str = prt ++ com
|
||||||
-- scompose the string in 3 part: till the cursor, the cursor and the rest
|
-- compose the string in 3 parts: till the cursor, the cursor and the rest
|
||||||
(f,p,ss) = if off >= length com
|
(f,p,ss) = if off >= length com
|
||||||
then (str, " ","") -- add a space: it will be our cursor ;-)
|
then (str, " ","") -- add a space: it will be our cursor ;-)
|
||||||
else let (a,b) = (splitAt off com)
|
else let (a,b) = (splitAt off com)
|
||||||
|
@ -42,7 +42,7 @@ additionalKeys conf keysList =
|
|||||||
conf { keys = \cnf -> M.union (M.fromList keysList) (keys conf cnf) }
|
conf { keys = \cnf -> M.union (M.fromList keysList) (keys conf cnf) }
|
||||||
|
|
||||||
-- |
|
-- |
|
||||||
-- Remove standard keybidings you're not using. Example use:
|
-- Remove standard keybindings you're not using. Example use:
|
||||||
--
|
--
|
||||||
-- > main = xmonad $ defaultConfig { terminal = "urxvt" }
|
-- > main = xmonad $ defaultConfig { terminal = "urxvt" }
|
||||||
-- > `removeKeys` [(mod1Mask .|. shiftMask, n) | n <- [xK_1 .. xK_9]]
|
-- > `removeKeys` [(mod1Mask .|. shiftMask, n) | n <- [xK_1 .. xK_9]]
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
--
|
--
|
||||||
-- This modules provides several commands to run an external process.
|
-- This modules provides several commands to run an external process.
|
||||||
-- It is composed of functions formerly defined in "XMonad.Util.Dmenu" (by
|
-- It is composed of functions formerly defined in "XMonad.Util.Dmenu" (by
|
||||||
-- Spencer Jannsen), "XMonad.Util.Dzen" (by glasser\@mit.edu) and
|
-- Spencer Janssen), "XMonad.Util.Dzen" (by glasser\@mit.edu) and
|
||||||
-- XMonad.Util.RunInXTerm (by Andrea Rossato).
|
-- XMonad.Util.RunInXTerm (by Andrea Rossato).
|
||||||
--
|
--
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
|
@ -107,7 +107,7 @@ paintAndWrite w fs wh ht bw bc borc ffc fbc al str = do
|
|||||||
paintWindow' w (Rectangle x y wh ht) bw bc borc ms
|
paintWindow' w (Rectangle x y wh ht) bw bc borc ms
|
||||||
where ms = Just (fs,ffc,fbc,str)
|
where ms = Just (fs,ffc,fbc,str)
|
||||||
|
|
||||||
-- This stuf is not exported
|
-- This stuff is not exported
|
||||||
|
|
||||||
paintWindow' :: Window -> Rectangle -> Dimension -> String -> String -> Maybe (XMonadFont,String,String,String) -> X ()
|
paintWindow' :: Window -> Rectangle -> Dimension -> String -> String -> Maybe (XMonadFont,String,String,String) -> X ()
|
||||||
paintWindow' win (Rectangle x y wh ht) bw color b_color str = do
|
paintWindow' win (Rectangle x y wh ht) bw color b_color str = do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user