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)
|
||||
|
||||
|
@ -121,31 +123,28 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
|
|||
, ((modm, xK_t ), withFocused $ windows . W.sink)
|
||||
|
||||
-- Increment the number of windows in the master area
|
||||
, ((modm , xK_comma ), sendMessage (IncMasterN 1))
|
||||
, ((modm, xK_comma ), sendMessage (IncMasterN 1))
|
||||
|
||||
-- Deincrement the number of windows in the master area
|
||||
, ((modm , xK_semicolon), sendMessage (IncMasterN (-1)))
|
||||
, ((modm, xK_semicolon), sendMessage (IncMasterN (-1)))
|
||||
|
||||
-- toggle the status bar gap (used with avoidStruts from Hooks.ManageDocks)
|
||||
, ((modm , xK_b ), sendMessage ToggleStruts)
|
||||
, ((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)
|
||||
, ((modm, xK_q ), restart "xmonad" True)
|
||||
|
||||
-- GridSelected
|
||||
, ((modm , xK_g), goToSelected defaultGSConfig)
|
||||
-- GridSelected
|
||||
, ((modm, xK_g ), goToSelected defaultGSConfig)
|
||||
|
||||
-- Switch next/previous workspace
|
||||
, ((modm , xK_Right), nextWS)
|
||||
, ((modm , xK_Left), prevWS)
|
||||
, ((modm .|. shiftMask , xK_Right), shiftToNext)
|
||||
, ((modm .|. shiftMask , xK_Left), shiftToPrev)
|
||||
-- Switch next/previous workspace
|
||||
, ((modm, xK_Right ), nextWS)
|
||||
, ((modm, xK_Left ), prevWS)
|
||||
, ((modm .|. shiftMask , xK_Right), shiftToNext)
|
||||
, ((modm .|. shiftMask , xK_Left), shiftToPrev)
|
||||
|
||||
|
||||
]
|
||||
|
@ -209,19 +208,19 @@ myMouseBindings (XConfig {XMonad.modMask = modMask}) = M.fromList $
|
|||
-- which denotes layout choice.
|
||||
--
|
||||
myLayout = spacing 3 $ avoidStruts $
|
||||
tiled ||| Mirror tiled ||| Full ||| Grid ||| simpleFloat
|
||||
where
|
||||
tiled ||| Mirror tiled ||| Full ||| Grid ||| simpleFloat
|
||||
where
|
||||
-- default tiling algorithm partitions the screen into two panes
|
||||
tiled = Tall nmaster delta ratio
|
||||
tiled = Tall nmaster delta ratio
|
||||
|
||||
-- The default number of windows in the master pane
|
||||
nmaster = 1
|
||||
nmaster = 1
|
||||
|
||||
-- Default proportion of screen occupied by master pane
|
||||
ratio = 56/100
|
||||
ratio = 56/100
|
||||
|
||||
-- Percent of screen to increment by when resizing panes
|
||||
delta = 3/100
|
||||
delta = 3/100
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Window rules:
|
||||
|
@ -240,25 +239,28 @@ 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 =? "Gcalctool" --> doFloat
|
||||
, className =? "Daily" --> doF (W.shift "mail")
|
||||
, className =? "Gcalctool" --> doFloat
|
||||
, className =? "VirtualBox" --> doFloat
|
||||
, className =? "Xmessage" --> doFloat
|
||||
, className =? "Gxmessage" --> doFloat
|
||||
, className =? "DialogBox" --> doFloat
|
||||
, resource =? "Download" --> doFloat
|
||||
, resource =? "Browser" --> doFloat
|
||||
, resource =? "Toplevel" --> doFullFloat
|
||||
, resource =? "Dialog" --> doFloat
|
||||
, resource =? "desktop_window" --> doIgnore
|
||||
, resource =? "kdesktop" --> doIgnore ]
|
||||
<+> manageDocks
|
||||
<+> composeOne
|
||||
<+> manageDocks
|
||||
<+> composeOne
|
||||
[ isFullscreen -?> doFullFloat ]
|
||||
|
||||
-- Whether focus follows the mouse pointer.
|
||||
|
@ -281,8 +283,21 @@ myLogHook pipe = dynamicLogWithPP xmobarPP
|
|||
, ppCurrent = xmobarColor "#AE6F38" "" . wrap "[" "]"
|
||||
, ppTitle = xmobarColor "#6B8836" "" . shorten 60
|
||||
}
|
||||
>> ewmhDesktopsLogHook
|
||||
>> setWMName "LG3D"
|
||||
>> 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