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 XMonad
|
||||||
import System.Exit
|
import System.Exit
|
||||||
|
import Data.List
|
||||||
import XMonad.Hooks.DynamicLog
|
import XMonad.Hooks.DynamicLog
|
||||||
import XMonad.Hooks.ManageDocks
|
import XMonad.Hooks.ManageDocks
|
||||||
import XMonad.Util.Run(spawnPipe)
|
import XMonad.Util.Run(spawnPipe)
|
||||||
|
@ -28,6 +20,10 @@ import XMonad.Hooks.SetWMName
|
||||||
import qualified XMonad.StackSet as W
|
import qualified XMonad.StackSet as W
|
||||||
import qualified Data.Map as M
|
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
|
-- The preferred terminal program, which is used in a binding below and by
|
||||||
-- certain contrib modules.
|
-- certain contrib modules.
|
||||||
--
|
--
|
||||||
|
@ -78,6 +74,12 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
|
||||||
-- launch xmenud
|
-- launch xmenud
|
||||||
, ((modm, xK_x ), spawn "xmenud")
|
, ((modm, xK_x ), spawn "xmenud")
|
||||||
|
|
||||||
|
-- shell Prompt
|
||||||
|
, ((modm .|. shiftMask, xK_x ), shellPrompt myXPConfig)
|
||||||
|
|
||||||
|
-- man Prompt
|
||||||
|
, ((modm, xK_F1 ), manPrompt myXPConfig)
|
||||||
|
|
||||||
-- close focused window
|
-- close focused window
|
||||||
, ((modm .|. shiftMask, xK_c ), kill)
|
, ((modm .|. shiftMask, xK_c ), kill)
|
||||||
|
|
||||||
|
@ -121,29 +123,26 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
|
||||||
, ((modm, xK_t ), withFocused $ windows . W.sink)
|
, ((modm, xK_t ), withFocused $ windows . W.sink)
|
||||||
|
|
||||||
-- Increment the number of windows in the master area
|
-- 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
|
-- 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)
|
-- toggle the status bar gap (used with avoidStruts from Hooks.ManageDocks)
|
||||||
, ((modm , xK_b ), sendMessage ToggleStruts)
|
, ((modm, xK_b ), sendMessage ToggleStruts)
|
||||||
|
|
||||||
-- Quit xmonad
|
-- 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 "/home/cgirard/shutdown.sh")
|
||||||
--, ((modm .|. shiftMask, xK_q ), spawn "gnome-session-save --gui --shutdown-dialog")
|
|
||||||
|
|
||||||
-- Restart xmonad
|
-- Restart xmonad
|
||||||
, ((modm , xK_q ), restart "xmonad" True)
|
, ((modm, xK_q ), restart "xmonad" True)
|
||||||
|
|
||||||
-- GridSelected
|
-- GridSelected
|
||||||
, ((modm , xK_g), goToSelected defaultGSConfig)
|
, ((modm, xK_g ), goToSelected defaultGSConfig)
|
||||||
|
|
||||||
-- Switch next/previous workspace
|
-- Switch next/previous workspace
|
||||||
, ((modm , xK_Right), nextWS)
|
, ((modm, xK_Right ), nextWS)
|
||||||
, ((modm , xK_Left), prevWS)
|
, ((modm, xK_Left ), prevWS)
|
||||||
, ((modm .|. shiftMask , xK_Right), shiftToNext)
|
, ((modm .|. shiftMask , xK_Right), shiftToNext)
|
||||||
, ((modm .|. shiftMask , xK_Left), shiftToPrev)
|
, ((modm .|. shiftMask , xK_Left), shiftToPrev)
|
||||||
|
|
||||||
|
@ -240,13 +239,15 @@ myLayout = spacing 3 $ avoidStruts $
|
||||||
--
|
--
|
||||||
myManageHook = composeAll
|
myManageHook = composeAll
|
||||||
[ className =? "MPlayer" --> doFloat
|
[ className =? "MPlayer" --> doFloat
|
||||||
-- , className =? "Gimp" --> doFloat
|
|
||||||
, className =? "Pidgin" --> doF (W.shift "irc")
|
, className =? "Pidgin" --> doF (W.shift "irc")
|
||||||
, className =? "Xchat" --> 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 =? "Thunderbird" --> doF (W.shift "mail")
|
||||||
, className =? "Lanikai" --> doF (W.shift "mail")
|
, className =? "Lanikai" --> doF (W.shift "mail")
|
||||||
, className =? "Shredder" --> doF (W.shift "mail")
|
, className =? "Shredder" --> doF (W.shift "mail")
|
||||||
, className =? "Miramar" --> doF (W.shift "mail")
|
, className =? "Miramar" --> doF (W.shift "mail")
|
||||||
|
, className =? "Daily" --> doF (W.shift "mail")
|
||||||
, className =? "Gcalctool" --> doFloat
|
, className =? "Gcalctool" --> doFloat
|
||||||
, className =? "VirtualBox" --> doFloat
|
, className =? "VirtualBox" --> doFloat
|
||||||
, className =? "Xmessage" --> doFloat
|
, className =? "Xmessage" --> doFloat
|
||||||
|
@ -254,6 +255,7 @@ myManageHook = composeAll
|
||||||
, className =? "DialogBox" --> doFloat
|
, className =? "DialogBox" --> doFloat
|
||||||
, resource =? "Download" --> doFloat
|
, resource =? "Download" --> doFloat
|
||||||
, resource =? "Browser" --> doFloat
|
, resource =? "Browser" --> doFloat
|
||||||
|
, resource =? "Toplevel" --> doFullFloat
|
||||||
, resource =? "Dialog" --> doFloat
|
, resource =? "Dialog" --> doFloat
|
||||||
, resource =? "desktop_window" --> doIgnore
|
, resource =? "desktop_window" --> doIgnore
|
||||||
, resource =? "kdesktop" --> doIgnore ]
|
, resource =? "kdesktop" --> doIgnore ]
|
||||||
|
@ -284,6 +286,19 @@ myLogHook pipe = dynamicLogWithPP xmobarPP
|
||||||
>> ewmhDesktopsLogHook
|
>> ewmhDesktopsLogHook
|
||||||
>> setWMName "LG3D"
|
>> setWMName "LG3D"
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Prompts
|
||||||
|
--
|
||||||
|
myXPConfig = defaultXPConfig
|
||||||
|
--{
|
||||||
|
-- font = "-*-terminus-*-*-*-*-12-*-*-*-*-*-*-u"
|
||||||
|
-- ,fgColor = "#00FFFF"
|
||||||
|
-- , bgColor = "#000000"
|
||||||
|
-- , bgHLight = "#000000"
|
||||||
|
-- , fgHLight = "#FF0000"
|
||||||
|
-- , position = Top
|
||||||
|
--}
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Startup hook
|
-- Startup hook
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue