summaryrefslogtreecommitdiff
path: root/desktop/xmonad
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2018-03-05 10:50:17 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2018-03-05 10:50:17 +0000
commit1bb5d7b54762e4dea282d3532ae51089f1c2777a (patch)
tree493ed74fa404aeb347ba34f316e25f4850f9d130 /desktop/xmonad
parentb2c5ce28676c9c989ef509b1af7fe3c1e69a70e5 (diff)
downloadresources-1bb5d7b54762e4dea282d3532ae51089f1c2777a.tar.bz2
xmonad tweaks and so on for stretch
Diffstat (limited to 'desktop/xmonad')
-rw-r--r--desktop/xmonad/xmonad.hs61
1 files changed, 32 insertions, 29 deletions
diff --git a/desktop/xmonad/xmonad.hs b/desktop/xmonad/xmonad.hs
index dc0124b..74dc9b0 100644
--- a/desktop/xmonad/xmonad.hs
+++ b/desktop/xmonad/xmonad.hs
@@ -1,28 +1,30 @@
{-# LANGUAGE DeriveDataTypeable #-}
import XMonad
+import qualified XMonad.Config
import XMonad.Config.Gnome
import XMonad.Actions.DynamicWorkspaces
import XMonad.Prompt
import XMonad.Prompt.Shell
import XMonad.Prompt.XMonad
import XMonad.Util.Run
+import qualified XMonad.Layout
import qualified XMonad.Util.EZConfig as EZ
import qualified XMonad.StackSet as W
import XMonad.Actions.CycleWS
-import DBus.Client
import qualified XMonad.Actions.DynamicWorkspaceOrder as DO
-import System.Taffybar.XMonadLog ( dbusLogWithPP, taffybarDefaultPP )
-import XMonad.Hooks.DynamicLog
import XMonad.Hooks.EwmhDesktops
+import System.Taffybar.Hooks.PagerHints (pagerHints)
+import XMonad.Layout.Grid
import XMonad.Layout.Minimize
import XMonad.Layout.NoBorders
+import XMonad.Layout.PerWorkspace
import XMonad.Layout.MultiToggle
import XMonad.Layout.MultiToggle.Instances
import XMonad.Actions.WindowGo
import Control.Monad (liftM2)
-import XMonad.Hooks.FadeInactive
import XMonad.Hooks.ManageHelpers
+import XMonad.Hooks.ManageDocks (avoidStruts)
import XMonad.Util.ExtensibleState as XS
import XMonad.Layout.IndependentScreens (countScreens)
import XMonad.Hooks.SetWMName
@@ -50,18 +52,14 @@ launchOrRaiseEmail = do
myManageHook =
composeAll [ title =? "OfflineIMAP" --> doShift "mail"
, title =? "Mutt" --> viewShift "mail"
+ , className =? "Steam" --> doFloat
+ , className =? "steam" --> doFullFloat
, isFullscreen --> doFullFloat
]
where
viewShift = doF . liftM2 (.) W.greedyView W.shift
-myLogHook client pp =
- ((logHook gnomeConfig) >>
- dbusLogWithPP client pp >>
- fadeInactiveLogHook fadeAmount)
- where fadeAmount = 0.8
-
data ScreenTracker = ScreenTracker { stScreenCount :: Int }
deriving (Typeable, Read, Show)
@@ -91,36 +89,41 @@ myEventHandler h e@(ConfigureEvent {ev_window = w}) =
(whenX (isRoot w) myScreenChangeHook) >> h e
myEventHandler h e = h e
+myPromptConfig :: XPConfig
+myPromptConfig = def { font = "xft:Inconsolata Medium-8"
+ , height = 40
+ }
+
+mainLayout = layoutHook XMonad.Config.def
+
+myLayoutHook = smartBorders . minimize . mkToggle (single FULL) $ perWS
+ where
+ perWS = onWorkspace "mail" (avoidStruts XMonad.Layout.Full) $
+ onWorkspace "vms" (avoidStruts griddy) $
+ (layoutHook gnomeConfig)
+ griddy = Grid ||| mainLayout
+
main :: IO ()
main = do
- client <- connectSession
- let pp = taffybarDefaultPP { ppSort = DO.getSortByOrder }
- xmonad $ gnomeConfig
+ xmonad $ ewmh $ pagerHints $ gnomeConfig
{ modMask = mod4Mask
- , logHook = myLogHook client pp >> setWMName "LG3D"
, manageHook = myManageHook <+> manageHook gnomeConfig
, workspaces = defaultWorkSpaces
, handleEventHook = myEventHandler fullscreenEventHook
- , layoutHook = id
- . smartBorders
- . minimize
- . mkToggle (single FULL)
- $ (layoutHook gnomeConfig)
+ , layoutHook = myLayoutHook
, startupHook = startupHook gnomeConfig >> setWMName "LG3D"
+ , focusedBorderColor = "#FFA500"
} `EZ.additionalKeysP`
[ -- General keys
("M-x", spawn "mate-terminal")
, ("M-M1-C-m", launchOrRaiseEmail)
- , ("M1-<F2>", shellPrompt defaultXPConfig)
+ , ("M-M1-C-d", safeSpawn "mate-control-center" ["display"])
+ , ("M1-<F2>", shellPrompt myPromptConfig)
-- Screens, Workspaces and Windows
, ("M1-C-<Left>", DO.moveTo Prev HiddenWS)
, ("M1-C-<Right>", DO.moveTo Next HiddenWS)
, ("<XF86Back>", DO.moveTo Prev HiddenWS)
, ("<XF86Forward>", DO.moveTo Next HiddenWS)
--- , ("M1-<Left>", DO.moveTo Prev HiddenWS)
--- , ("M1-<Right>", DO.moveTo Next HiddenWS)
- , ("M-C-<Right>", DO.swapWith Next NonEmptyWS)
- , ("M-C-<Left>", DO.swapWith Prev NonEmptyWS)
, ("M1-C-S-<Left>", DO.shiftTo Prev HiddenWS >> DO.moveTo Prev HiddenWS)
, ("M1-C-S-<Right>", DO.shiftTo Next HiddenWS >> DO.moveTo Next HiddenWS)
, ("M1-C-<Up>", prevScreen)
@@ -129,21 +132,21 @@ main = do
, ("M1-C-S-<Down>", shiftNextScreen >> nextScreen)
, ("M-<Tab>", windows W.focusDown)
, ("M-S-<Tab>", windows W.focusUp)
- , ("M1-C-<Space>", safeSpawn "/home/dsilvers/bin/middle-scroll" ["toggle"] )
, ("M1-<F4>", kill)
, ("M-<F11>", sendMessage $ Toggle FULL)
, ("M-S-t", withFocused $ windows . W.sink)
, ("M-z", withFocused minimizeWindow)
, ("M-S-z", sendMessage RestoreNextMinimizedWin)
-- Workspace management
- , ("M-t", addWorkspacePrompt defaultXPConfig)
- , ("M-r", renameWorkspace defaultXPConfig)
+ , ("M-t", addWorkspacePrompt myPromptConfig)
+ , ("M-r", renameWorkspace myPromptConfig)
, ("M-w", removeEmptyWorkspace)
, ("M-C-M1-<Left>", DO.swapWith Prev HiddenWS)
, ("M-C-M1-<Right>", DO.swapWith Next HiddenWS)
-- Management keys
- , ("M-<F12>", xmonadPrompt defaultXPConfig)
+ , ("M-<F12>", xmonadPrompt myPromptConfig)
, ("M-S-r", spawn "if type xmonad; then xmonad --recompile && xmonad --restart; else xmessage xmonad not in \\$PATH: \"$PATH\"; fi")
+ , ("M-C-M1-s", spawn "/home/dsilvers/bin/dmenu_shutdown")
]
`EZ.additionalKeys` extraKeyMappings mod4Mask
@@ -152,6 +155,6 @@ defaultWorkSpaces = ["mail", "irc", "www", "emacs", "term"]
extraKeyMappings :: ButtonMask -> [((ButtonMask, KeySym), X ())]
extraKeyMappings modm =
- [ ((modm, xK_Menu), spawn "/home/dsilvers/bin/dmenu_shutdown")
+ [ ((modm, xK_Menu), spawn "/home/danielsilverstone/bin/dmenu_shutdown")
]