Added prompts and cleanup
This commit is contained in:
parent
2cf4fd4bab
commit
839a47fa58
1 changed files with 105 additions and 90 deletions
|
@ -1,14 +1,6 @@
|
|||
--
|
||||
-- xmonad example config file.
|
||||
--
|
||||
-- A template showing all available configuration hooks,
|
||||
-- and how to override the defaults in your own xmonad.hs conf file.
|
||||
--
|
||||
-- Normally, you'd only override those defaults you care about.
|
||||
--
|
||||
|
||||
import XMonad
|
||||
import System.Exit
|
||||
import Data.List
|
||||
import XMonad.Hooks.DynamicLog
|
||||
import XMonad.Hooks.ManageDocks
|
||||
import XMonad.Util.Run(spawnPipe)
|
||||
|
@ -28,6 +20,10 @@ import XMonad.Hooks.SetWMName
|
|||
import qualified XMonad.StackSet as W
|
||||
import qualified Data.Map as M
|
||||
|
||||
import XMonad.Prompt
|
||||
import XMonad.Prompt.Man
|
||||
import XMonad.Prompt.Shell
|
||||
|
||||
-- The preferred terminal program, which is used in a binding below and by
|
||||
-- certain contrib modules.
|
||||
--
|
||||
|
@ -78,6 +74,12 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
|
|||
-- launch xmenud
|
||||
, ((modm, xK_x ), spawn "xmenud")
|
||||
|
||||
-- shell Prompt
|
||||
, ((modm .|. shiftMask, xK_x ), shellPrompt myXPConfig)
|
||||
|
||||
-- man Prompt
|
||||
, ((modm, xK_F1 ), manPrompt myXPConfig)
|
||||
|
||||
-- close focused window
|
||||
, ((modm .|. shiftMask, xK_c ), kill)
|
||||
|
||||
|
@ -130,10 +132,7 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
|
|||
, ((modm, xK_b ), sendMessage ToggleStruts)
|
||||
|
||||
-- Quit xmonad
|
||||
--, ((modm .|. shiftMask, xK_q ), io (exitWith ExitSuccess))
|
||||
--, ((modm .|. shiftMask, xK_q ), spawn "gxmessage -center -buttons No:1,Yes:0 -default Yes -timeout 60 Do you really want to close Xmonad session ? && pkill xmonad")
|
||||
, ((modm .|. shiftMask, xK_q ), spawn "/home/cgirard/shutdown.sh")
|
||||
--, ((modm .|. shiftMask, xK_q ), spawn "gnome-session-save --gui --shutdown-dialog")
|
||||
|
||||
-- Restart xmonad
|
||||
, ((modm, xK_q ), restart "xmonad" True)
|
||||
|
@ -240,13 +239,15 @@ myLayout = spacing 3 $ avoidStruts $
|
|||
--
|
||||
myManageHook = composeAll
|
||||
[ className =? "MPlayer" --> doFloat
|
||||
-- , className =? "Gimp" --> doFloat
|
||||
, className =? "Pidgin" --> doF (W.shift "irc")
|
||||
, className =? "Xchat" --> doF (W.shift "irc")
|
||||
, title =? "weechat 0.3.6" --> doF (W.shift "irc")
|
||||
--, fmap ("Oracle" `isPrefixOf`) title --> doF (W.shift "irc")
|
||||
, className =? "Thunderbird" --> doF (W.shift "mail")
|
||||
, className =? "Lanikai" --> doF (W.shift "mail")
|
||||
, className =? "Shredder" --> doF (W.shift "mail")
|
||||
, className =? "Miramar" --> doF (W.shift "mail")
|
||||
, className =? "Daily" --> doF (W.shift "mail")
|
||||
, className =? "Gcalctool" --> doFloat
|
||||
, className =? "VirtualBox" --> doFloat
|
||||
, className =? "Xmessage" --> doFloat
|
||||
|
@ -254,6 +255,7 @@ myManageHook = composeAll
|
|||
, className =? "DialogBox" --> doFloat
|
||||
, resource =? "Download" --> doFloat
|
||||
, resource =? "Browser" --> doFloat
|
||||
, resource =? "Toplevel" --> doFullFloat
|
||||
, resource =? "Dialog" --> doFloat
|
||||
, resource =? "desktop_window" --> doIgnore
|
||||
, resource =? "kdesktop" --> doIgnore ]
|
||||
|
@ -284,6 +286,19 @@ myLogHook pipe = dynamicLogWithPP xmobarPP
|
|||
>> ewmhDesktopsLogHook
|
||||
>> setWMName "LG3D"
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Prompts
|
||||
--
|
||||
myXPConfig = defaultXPConfig
|
||||
--{
|
||||
-- font = "-*-terminus-*-*-*-*-12-*-*-*-*-*-*-u"
|
||||
-- ,fgColor = "#00FFFF"
|
||||
-- , bgColor = "#000000"
|
||||
-- , bgHLight = "#000000"
|
||||
-- , fgHLight = "#FF0000"
|
||||
-- , position = Top
|
||||
--}
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Startup hook
|
||||
|
||||
|
|
Loading…
Reference in a new issue