diff --git a/man/xmonad.1 b/man/xmonad.1 index 428cdb1..db14a54 100644 --- a/man/xmonad.1 +++ b/man/xmonad.1 @@ -1,10 +1,10 @@ -.TH xmonad 1 "5 July 2018" xmonad-0.13 "xmonad manual".\" Automatically generated by Pandoc 2.2.1 +.\" Automatically generated by Pandoc 2.2.1 .\" -.TH "" "" "" "" "" +.TH "XMONAD" "1" "20 August 2018" "Tiling Window Manager" "" .hy .SH Name .PP -xmonad \- a tiling window manager +xmonad \- Tiling Window Manager .SH Description .PP \f[I]xmonad\f[] is a minimalist tiling window manager for X, written in @@ -41,7 +41,7 @@ A benefit of this is that the code is simple to understand, and easy to modify. .SH Usage .PP -\f[I]xmonad\f[] places each window into a "workspace". +\f[I]xmonad\f[] places each window into a \[lq]workspace\[rq]. Each workspace can have any number of windows, which you can cycle though with mod\-j and mod\-k. Windows are either displayed full screen, tiled horizontally, or tiled @@ -66,84 +66,190 @@ and visible workspaces are swapped. .PP xmonad has several flags which you may pass to the executable. These flags are: +.TP +.B \[en]recompile +Recompiles your configuration in \f[I]~/.xmonad/xmonad.hs\f[] +.RS +.RE +.TP +.B \[en]restart +Causes the currently running \f[I]xmonad\f[] process to restart +.RS +.RE +.TP +.B \[en]replace +Replace the current window manager with xmonad +.RS +.RE +.TP +.B \[en]version +Display version of \f[I]xmonad\f[] +.RS +.RE +.TP +.B \[en]verbose\-version +Display detailed version of \f[I]xmonad\f[] +.RS +.RE .PP -\-\-recompile : Recompiles your configuration in -\f[I]~/.xmonad/xmonad.hs\f[] -.PP -\-\-restart : Causes the currently running \f[I]xmonad\f[] process to -restart -.PP -\-\-replace : Replace the current window manager with xmonad -.PP -\-\-version : Display version of \f[I]xmonad\f[] -.PP -\-\-verbose\-version : Display detailed version of \f[I]xmonad\f[] -.SS Default keyboard bindings -.PP -mod\-shift\-return : Launch terminal -.PP -mod\-p : Launch dmenu -.PP -mod\-shift\-p : Launch gmrun -.PP -mod\-shift\-c : Close the focused window -.PP -mod\-space : Rotate through the available layout algorithms -.PP -mod\-shift\-space : Reset the layouts on the current workspace to -default -.PP -mod\-n : Resize viewed windows to the correct size -.PP -mod\-tab : Move focus to the next window -.PP -mod\-shift\-tab : Move focus to the previous window -.PP -mod\-j : Move focus to the next window -.PP -mod\-k : Move focus to the previous window -.PP -mod\-m : Move focus to the master window -.PP -mod\-return : Swap the focused window and the master window -.PP -mod\-shift\-j : Swap the focused window with the next window -.PP -mod\-shift\-k : Swap the focused window with the previous window -.PP -mod\-h : Shrink the master area -.PP -mod\-l : Expand the master area -.PP -mod\-t : Push window back into tiling -.PP -mod\-comma : Increment the number of windows in the master area -.PP -mod\-period : Deincrement the number of windows in the master area -.PP -mod\-shift\-q : Quit xmonad -.PP -mod\-q : Restart xmonad -.PP -mod\-shift\-slash : Run xmessage with a summary of the default -keybindings (useful for beginners) -.PP -mod\-question : Run xmessage with a summary of the default keybindings -(useful for beginners) -.PP -mod\-[1..9] : Switch to workspace N -.PP -mod\-shift\-[1..9] : Move client to workspace N -.PP -mod\-{w,e,r} : Switch to physical/Xinerama screens 1, 2, or 3 -.PP -mod\-shift\-{w,e,r} : Move client to screen 1, 2, or 3 -.PP -mod\-button1 : Set the window to floating mode and move by dragging -.PP -mod\-button2 : Raise the window to the top of the stack -.PP -mod\-button3 : Set the window to floating mode and resize by dragging +##Default keyboard bindings +.TP +.B mod\-shift\-return +Launch terminal +.RS +.RE +.TP +.B mod\-p +Launch dmenu +.RS +.RE +.TP +.B mod\-shift\-p +Launch gmrun +.RS +.RE +.TP +.B mod\-shift\-c +Close the focused window +.RS +.RE +.TP +.B mod\-space +Rotate through the available layout algorithms +.RS +.RE +.TP +.B mod\-shift\-space +Reset the layouts on the current workspace to default +.RS +.RE +.TP +.B mod\-n +Resize viewed windows to the correct size +.RS +.RE +.TP +.B mod\-tab +Move focus to the next window +.RS +.RE +.TP +.B mod\-shift\-tab +Move focus to the previous window +.RS +.RE +.TP +.B mod\-j +Move focus to the next window +.RS +.RE +.TP +.B mod\-k +Move focus to the previous window +.RS +.RE +.TP +.B mod\-m +Move focus to the master window +.RS +.RE +.TP +.B mod\-return +Swap the focused window and the master window +.RS +.RE +.TP +.B mod\-shift\-j +Swap the focused window with the next window +.RS +.RE +.TP +.B mod\-shift\-k +Swap the focused window with the previous window +.RS +.RE +.TP +.B mod\-h +Shrink the master area +.RS +.RE +.TP +.B mod\-l +Expand the master area +.RS +.RE +.TP +.B mod\-t +Push window back into tiling +.RS +.RE +.TP +.B mod\-comma +Increment the number of windows in the master area +.RS +.RE +.TP +.B mod\-period +Deincrement the number of windows in the master area +.RS +.RE +.TP +.B mod\-shift\-q +Quit xmonad +.RS +.RE +.TP +.B mod\-q +Restart xmonad +.RS +.RE +.TP +.B mod\-shift\-slash +Run xmessage with a summary of the default keybindings (useful for +beginners) +.RS +.RE +.TP +.B mod\-question +Run xmessage with a summary of the default keybindings (useful for +beginners) +.RS +.RE +.TP +.B mod\-[1..9] +Switch to workspace N +.RS +.RE +.TP +.B mod\-shift\-[1..9] +Move client to workspace N +.RS +.RE +.TP +.B mod\-{w,e,r} +Switch to physical/Xinerama screens 1, 2, or 3 +.RS +.RE +.TP +.B mod\-shift\-{w,e,r} +Move client to screen 1, 2, or 3 +.RS +.RE +.TP +.B mod\-button1 +Set the window to floating mode and move by dragging +.RS +.RE +.TP +.B mod\-button2 +Raise the window to the top of the stack +.RS +.RE +.TP +.B mod\-button3 +Set the window to floating mode and resize by dragging +.RS +.RE .SH Examples .PP To use xmonad as your window manager add to your \f[I]~/.xinitrc\f[] @@ -159,19 +265,25 @@ mod\-q. .PP You can find many extensions to the core feature set in the xmonad\- contrib package, available through your package manager or from -[xmonad.org]. +xmonad.org (http://xmonad.org). .SS Modular Configuration .PP As of \f[I]xmonad\-0.9\f[], any additional Haskell modules may be placed -in \f[I]~/.xmonad/lib/\f[] are available in GHC\[aq]s searchpath. +in \f[I]~/.xmonad/lib/\f[] are available in GHC's searchpath. Hierarchical modules are supported: for example, the file \f[I]~/.xmonad/lib/XMonad/Stack/MyAdditions.hs\f[] could contain: -.PP -\f[C]haskell\ module\ XMonad.Stack.MyAdditions\ (function1)\ where\ \ \ function1\ =\ error\ "function1:\ Not\ implemented\ yet!"\f[] +.IP +.nf +\f[C] +module\ XMonad.Stack.MyAdditions\ (function1)\ where +\ \ function1\ =\ error\ "function1:\ Not\ implemented\ yet!" +\f[] +.fi .PP Your xmonad.hs may then import XMonad.Stack.MyAdditions as if that module was contained within xmonad or xmonad\-contrib. .SH Bugs .PP Probably. -If you find any, please report them to the [bugtracker] +If you find any, please report them to the +bugtracker (https://github.com/xmonad/xmonad/issues) diff --git a/man/xmonad.1.html b/man/xmonad.1.html index 895a4ce..da69214 100644 --- a/man/xmonad.1.html +++ b/man/xmonad.1.html @@ -4,96 +4,241 @@ - Untitled + + + XMONAD(1) Tiling Window Manager + -

xmonad-0.13

Section: xmonad manual (1)
Updated: 5 July 2018


+
+

XMONAD(1) Tiling Window Manager

+

+

20 August 2018

+
-

Name

-

xmonad - a tiling window manager

-

Description

+

Name

+

xmonad - Tiling Window Manager

+

Description

xmonad is a minimalist tiling window manager for X, written in Haskell. Windows are managed using automatic layout algorithms, which can be dynamically reconfigured. At any time windows are arranged so as to maximize the use of screen real estate. All features of the window manager are accessible purely from the keyboard: a mouse is entirely optional. xmonad is configured in Haskell, and custom layout algorithms may be implemented by the user in config files. A principle of xmonad is predictability: the user should know in advance precisely the window arrangement that will result from any action.

By default, xmonad provides three layout algorithms: tall, wide and fullscreen. In tall or wide mode, windows are tiled and arranged to prevent overlap and maximize screen use. Sets of windows are grouped together on virtual screens, and each screen retains its own layout, which may be reconfigured dynamically. Multiple physical monitors are supported via Xinerama, allowing simultaneous display of a number of screens.

By utilizing the expressivity of a modern functional language with a rich static type system, xmonad provides a complete, featureful window manager in less than 1200 lines of code, with an emphasis on correctness and robustness. Internal properties of the window manager are checked using a combination of static guarantees provided by the type system, and type-based automated testing. A benefit of this is that the code is simple to understand, and easy to modify.

-

Usage

-

xmonad places each window into a "workspace". Each workspace can have any number of windows, which you can cycle though with mod-j and mod-k. Windows are either displayed full screen, tiled horizontally, or tiled vertically. You can toggle the layout mode with mod-space, which will cycle through the available modes.

+

Usage

+

xmonad places each window into a “workspace”. Each workspace can have any number of windows, which you can cycle though with mod-j and mod-k. Windows are either displayed full screen, tiled horizontally, or tiled vertically. You can toggle the layout mode with mod-space, which will cycle through the available modes.

You can switch to workspace N with mod-N. For example, to switch to workspace 5, you would press mod-5. Similarly, you can move the current window to another workspace with mod-shift-N.

When running with multiple monitors (Xinerama), each screen has exactly 1 workspace visible. mod-{w,e,r} switch the focus between screens, while shift-mod-{w,e,r} move the current window to that screen. When xmonad starts, workspace 1 is on screen 1, workspace 2 is on screen 2, etc. When switching workspaces to one that is already visible, the current and visible workspaces are swapped.

-

Flags

+

Flags

xmonad has several flags which you may pass to the executable. These flags are:

-

--recompile : Recompiles your configuration in ~/.xmonad/xmonad.hs

-

--restart : Causes the currently running xmonad process to restart

-

--replace : Replace the current window manager with xmonad

-

--version : Display version of xmonad

-

--verbose-version : Display detailed version of xmonad

-

Default keyboard bindings

-

mod-shift-return : Launch terminal

-

mod-p : Launch dmenu

-

mod-shift-p : Launch gmrun

-

mod-shift-c : Close the focused window

-

mod-space : Rotate through the available layout algorithms

-

mod-shift-space : Reset the layouts on the current workspace to default

-

mod-n : Resize viewed windows to the correct size

-

mod-tab : Move focus to the next window

-

mod-shift-tab : Move focus to the previous window

-

mod-j : Move focus to the next window

-

mod-k : Move focus to the previous window

-

mod-m : Move focus to the master window

-

mod-return : Swap the focused window and the master window

-

mod-shift-j : Swap the focused window with the next window

-

mod-shift-k : Swap the focused window with the previous window

-

mod-h : Shrink the master area

-

mod-l : Expand the master area

-

mod-t : Push window back into tiling

-

mod-comma : Increment the number of windows in the master area

-

mod-period : Deincrement the number of windows in the master area

-

mod-shift-q : Quit xmonad

-

mod-q : Restart xmonad

-

mod-shift-slash : Run xmessage with a summary of the default keybindings (useful for beginners)

-

mod-question : Run xmessage with a summary of the default keybindings (useful for beginners)

-

mod-[1..9] : Switch to workspace N

-

mod-shift-[1..9] : Move client to workspace N

-

mod-{w,e,r} : Switch to physical/Xinerama screens 1, 2, or 3

-

mod-shift-{w,e,r} : Move client to screen 1, 2, or 3

-

mod-button1 : Set the window to floating mode and move by dragging

-

mod-button2 : Raise the window to the top of the stack

-

mod-button3 : Set the window to floating mode and resize by dragging

-

Examples

+
+
–recompile
+
Recompiles your configuration in ~/.xmonad/xmonad.hs +
+
–restart
+
Causes the currently running xmonad process to restart +
+
–replace
+
Replace the current window manager with xmonad +
+
–version
+
Display version of xmonad +
+
–verbose-version
+
Display detailed version of xmonad +
+
+

##Default keyboard bindings

+
+
mod-shift-return
+
Launch terminal +
+
mod-p
+
Launch dmenu +
+
mod-shift-p
+
Launch gmrun +
+
mod-shift-c
+
Close the focused window +
+
mod-space
+
Rotate through the available layout algorithms +
+
mod-shift-space
+
Reset the layouts on the current workspace to default +
+
mod-n
+
Resize viewed windows to the correct size +
+
mod-tab
+
Move focus to the next window +
+
mod-shift-tab
+
Move focus to the previous window +
+
mod-j
+
Move focus to the next window +
+
mod-k
+
Move focus to the previous window +
+
mod-m
+
Move focus to the master window +
+
mod-return
+
Swap the focused window and the master window +
+
mod-shift-j
+
Swap the focused window with the next window +
+
mod-shift-k
+
Swap the focused window with the previous window +
+
mod-h
+
Shrink the master area +
+
mod-l
+
Expand the master area +
+
mod-t
+
Push window back into tiling +
+
mod-comma
+
Increment the number of windows in the master area +
+
mod-period
+
Deincrement the number of windows in the master area +
+
mod-shift-q
+
Quit xmonad +
+
mod-q
+
Restart xmonad +
+
mod-shift-slash
+
Run xmessage with a summary of the default keybindings (useful for beginners) +
+
mod-question
+
Run xmessage with a summary of the default keybindings (useful for beginners) +
+
mod-[1..9]
+
Switch to workspace N +
+
mod-shift-[1..9]
+
Move client to workspace N +
+
mod-{w,e,r}
+
Switch to physical/Xinerama screens 1, 2, or 3 +
+
mod-shift-{w,e,r}
+
Move client to screen 1, 2, or 3 +
+
mod-button1
+
Set the window to floating mode and move by dragging +
+
mod-button2
+
Raise the window to the top of the stack +
+
mod-button3
+
Set the window to floating mode and resize by dragging +
+
+

Examples

To use xmonad as your window manager add to your ~/.xinitrc file:

exec xmonad

-

Customization

+

Customization

xmonad is customized in ~/.xmonad/xmonad.hs, and then restarted with mod-q.

-

You can find many extensions to the core feature set in the xmonad- contrib package, available through your package manager or from [xmonad.org].

-

Modular Configuration

-

As of xmonad-0.9, any additional Haskell modules may be placed in ~/.xmonad/lib/ are available in GHC's searchpath. Hierarchical modules are supported: for example, the file ~/.xmonad/lib/XMonad/Stack/MyAdditions.hs could contain:

-

haskell module XMonad.Stack.MyAdditions (function1) where function1 = error "function1: Not implemented yet!"

+

You can find many extensions to the core feature set in the xmonad- contrib package, available through your package manager or from xmonad.org.

+

Modular Configuration

+

As of xmonad-0.9, any additional Haskell modules may be placed in ~/.xmonad/lib/ are available in GHC’s searchpath. Hierarchical modules are supported: for example, the file ~/.xmonad/lib/XMonad/Stack/MyAdditions.hs could contain:

+
module XMonad.Stack.MyAdditions (function1) where
+  function1 = error "function1: Not implemented yet!"

Your xmonad.hs may then import XMonad.Stack.MyAdditions as if that module was contained within xmonad or xmonad-contrib.

-

Bugs

-

Probably. If you find any, please report them to the [bugtracker]

+

Bugs

+

Probably. If you find any, please report them to the bugtracker

diff --git a/man/xmonad.1.markdown b/man/xmonad.1.markdown index 22564ab..2c11c7b 100644 --- a/man/xmonad.1.markdown +++ b/man/xmonad.1.markdown @@ -1,7 +1,12 @@ -#Name -xmonad - a tiling window manager +% XMONAD(1) Tiling Window Manager +% +% 20 August 2018 -#Description +# Name + +xmonad - Tiling Window Manager + +# Description _xmonad_ is a minimalist tiling window manager for X, written in Haskell. Windows are managed using automatic layout algorithms, which can be @@ -28,7 +33,7 @@ combination of static guarantees provided by the type system, and type-based automated testing. A benefit of this is that the code is simple to understand, and easy to modify. -#Usage +# Usage _xmonad_ places each window into a "workspace". Each workspace can have any number of windows, which you can cycle though with mod-j and mod-k. @@ -47,7 +52,8 @@ starts, workspace 1 is on screen 1, workspace 2 is on screen 2, etc. When switching workspaces to one that is already visible, the current and visible workspaces are swapped. -##Flags +## Flags + xmonad has several flags which you may pass to the executable. These flags are: @@ -70,12 +76,13 @@ These flags are: ___KEYBINDINGS___ -#Examples +# Examples + To use xmonad as your window manager add to your _~/.xinitrc_ file: > exec xmonad -#Customization +# Customization xmonad is customized in ~/.xmonad/xmonad.hs, and then restarted with mod-q. @@ -83,7 +90,7 @@ You can find many extensions to the core feature set in the xmonad- contrib package, available through your package manager or from [xmonad.org]. -##Modular Configuration +## Modular Configuration As of _xmonad-0.9_, any additional Haskell modules may be placed in _~/.xmonad/lib/_ are available in GHC's searchpath. Hierarchical modules are supported: for example, the file @@ -97,7 +104,7 @@ module XMonad.Stack.MyAdditions (function1) where Your xmonad.hs may then import XMonad.Stack.MyAdditions as if that module was contained within xmonad or xmonad-contrib. -#Bugs +# Bugs Probably. If you find any, please report them to the [bugtracker] [xmonad.org]: http://xmonad.org diff --git a/util/GenerateManpage.hs b/util/GenerateManpage.hs index 7361c2d..905df16 100644 --- a/util/GenerateManpage.hs +++ b/util/GenerateManpage.hs @@ -1,84 +1,30 @@ {-# LANGUAGE FlexibleContexts #-} + +-- Generates a in-memory version of "man/xmonad.1.markdown" that has the list +-- of known key-bindings is inserted automatically from "Config.hs". That +-- document is then rendered with Pandoc as "man/xmonad.1" and +-- "man/xmonad.1.html". +-- -- Unlike the rest of xmonad, this file is released under the GNU General -- Public License version 2 or later. --- --- Generates man/xmonad.1 from man/xmonad.1.in by filling the list of --- keybindings with values scraped from Config.hs --- --- Uses cabal to grab the xmonad version from xmonad.cabal --- --- Uses pandoc to convert the "xmonad.1.markdown" to "xmonad.1" --- --- Format for the docstrings in Config.hs takes the following form: --- --- -- mod-x %! Frob the whatsit --- --- "Frob the whatsit" will be used as the description for keybinding "mod-x" --- --- If the keybinding name is omitted, it will try to guess from the rest of the --- line. For example: --- --- [ ((modMask .|. shiftMask, xK_Return), spawn "xterm") -- %! Launch an xterm --- --- Here, mod-shift-return will be used as the keybinding name. import Control.Monad -import Control.Applicative -import Text.Regex.Posix +import Control.Monad.IO.Class (liftIO) import Data.Char import Data.List -import Control.Monad.IO.Class (liftIO) import qualified Data.Text as T import qualified Data.Text.IO as TIO +import Text.Pandoc +import Text.Regex.Posix -import Distribution.PackageDescription.Parse -import Distribution.Verbosity -import Distribution.Package -import Distribution.PackageDescription -import Text.PrettyPrint.HughesPJ -import Distribution.Text - -import Text.Pandoc -- works with 2.1 - -releaseDate = "5 July 2018" - -trim :: String -> String -trim = reverse . dropWhile isSpace . reverse . dropWhile isSpace - -guessKeys line = concat $ intersperse "-" (modifiers ++ [map toLower key]) - where modifiers = map (!!1) (line =~ "(mod|shift|control)Mask") - (_, _, _, [key]) = line =~ "xK_([_[:alnum:]]+)" :: (String, String, String, [String]) - -binding :: [String] -> (String, String) -binding [ _, bindingLine, "", desc ] = (guessKeys bindingLine, desc) -binding [ _, _, keyCombo, desc ] = (keyCombo, desc) - -allBindings :: String -> [(String, String)] -allBindings xs = map (binding . map trim) (xs =~ "(.*)--(.*)%!(.*)") - --- FIXME: What escaping should we be doing on these strings? -markdownDefn :: (String, String) -> String -markdownDefn (key, desc) = key ++ "\n: " ++ desc - -replace :: Eq a => a -> a -> [a] -> [a] -replace x y = map (\a -> if a == x then y else a) - --- rawSystem "pandoc" ["--read=markdown","--write=man","man/xmonad.1.markdown"] - +main :: IO () main = do - releaseName <- (show . disp . package . packageDescription) - `liftM`readPackageDescription normal "xmonad.cabal" - keybindings <- (intercalate "\n\n" . map markdownDefn . allBindings) - `liftM` readFile "./src/XMonad/Config.hs" - - let manHeader = T.pack . - unwords - $ [".TH xmonad 1","\""++releaseDate++"\"",releaseName,"\"xmonad manual\""] + keybindings <- guessBindings markdownSource <- readFile "./man/xmonad.1.markdown" runIOorExplode $ do - parsed <- readMarkdown def + parsed <- readMarkdown (def { readerStandalone = True, readerExtensions = pandocExtensions }) . T.pack . unlines . replace "___KEYBINDINGS___" keybindings @@ -87,18 +33,56 @@ main = do manTemplate <- getDefaultTemplate "man" manBody <- writeMan def { writerTemplate = Just manTemplate } parsed - liftIO $ TIO.writeFile "./man/xmonad.1" $ T.append manHeader manBody + liftIO $ TIO.writeFile "./man/xmonad.1" $ manBody liftIO $ putStrLn "Documentation created: man/xmonad.1" htmltemplate <- getDefaultTemplate "html" htmlBody <- writeHtml5String def - { writerVariables = - [("include-before" - ,"

"++releaseName++"

"++ - "

Section: xmonad manual (1)
"++ - "Updated: "++releaseDate++"

"++ - "
")] - , writerTemplate = Just htmltemplate - , writerTableOfContents = True } parsed + { writerTemplate = Just htmltemplate + , writerTableOfContents = True } + parsed liftIO $ TIO.writeFile "./man/xmonad.1.html" htmlBody liftIO $ putStrLn "Documentation created: man/xmonad.1.html" + +-- | The format for the docstrings in "Config.hs" takes the following form: +-- +-- @ +-- -- mod-x %! Frob the whatsit +-- @ +-- +-- "Frob the whatsit" will be used as the description for keybinding "mod-x".-- +-- If the name of the key binding is omitted, the function tries to guess it +-- from the rest of the line. For example: +-- +-- @ +-- [ ((modMask .|. shiftMask, xK_Return), spawn "xterm") -- %! Launch an xterm +-- @ +-- +-- Here, "mod-shift-return" will be used as the key binding name. + +guessBindings :: IO String +guessBindings = do + buf <- readFile "./src/XMonad/Config.hs" + return (intercalate "\n\n" (map markdownDefn (allBindings buf))) + +allBindings :: String -> [(String, String)] +allBindings xs = map (binding . map trim) (xs =~ "(.*)--(.*)%!(.*)") + +binding :: [String] -> (String, String) +binding [ _, bindingLine, "", desc ] = (guessKeys bindingLine, desc) +binding [ _, _, keyCombo, desc ] = (keyCombo, desc) + +guessKeys :: String -> String +guessKeys line = concat $ intersperse "-" (modifiers ++ [map toLower key]) + where modifiers = map (!!1) (line =~ "(mod|shift|control)Mask") + (_, _, _, [key]) = line =~ "xK_([_[:alnum:]]+)" :: (String, String, String, [String]) + +-- FIXME: What escaping should we be doing on these strings? +markdownDefn :: (String, String) -> String +markdownDefn (key, desc) = key ++ "\n: " ++ desc + +replace :: Eq a => a -> a -> [a] -> [a] +replace x y = map (\a -> if a == x then y else a) + +trim :: String -> String +trim = reverse . dropWhile isSpace . reverse . dropWhile isSpace diff --git a/xmonad.cabal b/xmonad.cabal index caf2da7..ac949d2 100644 --- a/xmonad.cabal +++ b/xmonad.cabal @@ -98,9 +98,7 @@ executable generatemanpage hs-source-dirs: util if flag(generatemanpage) build-depends: base, - Cabal == 2.0.*, pandoc >= 2, - pretty, regex-posix, text else