mirror of
https://github.com/xmonad/xmonad.git
synced 2025-05-19 08:30:21 -07:00
A few tweaks to --verbose-version
This commit is contained in:
parent
d5aadf2538
commit
eddb445307
12
Main.hs
12
Main.hs
@ -26,6 +26,8 @@ import System.Exit (exitFailure)
|
|||||||
import Paths_xmonad (version)
|
import Paths_xmonad (version)
|
||||||
import Data.Version (showVersion)
|
import Data.Version (showVersion)
|
||||||
|
|
||||||
|
import Graphics.X11.Xinerama (compiledWithXinerama)
|
||||||
|
|
||||||
#ifdef TESTING
|
#ifdef TESTING
|
||||||
import qualified Properties
|
import qualified Properties
|
||||||
#endif
|
#endif
|
||||||
@ -43,13 +45,17 @@ main = do
|
|||||||
["--help"] -> usage
|
["--help"] -> usage
|
||||||
["--recompile"] -> recompile True >>= flip unless exitFailure
|
["--recompile"] -> recompile True >>= flip unless exitFailure
|
||||||
["--restart"] -> sendRestart >> return ()
|
["--restart"] -> sendRestart >> return ()
|
||||||
["--version"] -> putStrLn ("xmonad " ++ showVersion version)
|
["--version"] -> putStrLn $ unwords shortVersion
|
||||||
["--verbose-version"] -> putStrLn ("xmonad " ++ showVersion version ++ " compiled by " ++ compilerName
|
["--verbose-version"] -> putStrLn . unwords $ shortVersion ++ longVersion
|
||||||
++ " " ++ showVersion compilerVersion ++ " for " ++ os ++ "/" ++ arch)
|
|
||||||
#ifdef TESTING
|
#ifdef TESTING
|
||||||
("--run-tests":_) -> Properties.main
|
("--run-tests":_) -> Properties.main
|
||||||
#endif
|
#endif
|
||||||
_ -> fail "unrecognized flags"
|
_ -> fail "unrecognized flags"
|
||||||
|
where
|
||||||
|
shortVersion = ["xmonad", showVersion version]
|
||||||
|
longVersion = [ "compiled by", compilerName, showVersion compilerVersion
|
||||||
|
, "for", arch ++ "-" ++ os
|
||||||
|
, "\nXinerama:", show compiledWithXinerama ]
|
||||||
|
|
||||||
usage :: IO ()
|
usage :: IO ()
|
||||||
usage = do
|
usage = do
|
||||||
|
@ -60,6 +60,9 @@ These flags are:
|
|||||||
--version
|
--version
|
||||||
: Display version of _xmonad_
|
: Display version of _xmonad_
|
||||||
|
|
||||||
|
--verbose-version
|
||||||
|
: Display detailed version of _xmonad_
|
||||||
|
|
||||||
##Default keyboard bindings
|
##Default keyboard bindings
|
||||||
|
|
||||||
___KEYBINDINGS___
|
___KEYBINDINGS___
|
||||||
|
Loading…
x
Reference in New Issue
Block a user