|
@@ -1,46 +1,35 @@
|
|
|
-import System.Posix.Env (getEnv)
|
|
|
-import Data.Maybe (maybe)
|
|
|
-import Control.Monad(when, liftM)
|
|
|
-
|
|
|
import XMonad
|
|
|
-import XMonad.Config.Desktop
|
|
|
-import XMonad.Hooks.DynamicLog
|
|
|
-import XMonad.Hooks.ManageDocks
|
|
|
+import XMonad.Hooks.DynamicLog(dynamicLogWithPP
|
|
|
+ , xmobarPP
|
|
|
+ , ppOutput
|
|
|
+ , ppLayout
|
|
|
+ , ppTitle)
|
|
|
+import XMonad.Hooks.ManageDocks(docks, docksEventHook, manageDocks, avoidStruts)
|
|
|
import XMonad.Util.Run(spawnPipe, hPutStrLn, runProcessWithInput)
|
|
|
|
|
|
|
|
|
import XMonad.Layout.Spacing(smartSpacing)
|
|
|
-import XMonad.Layout.Tabbed
|
|
|
-import XMonad.Layout.NoBorders
|
|
|
-import XMonad.Layout.IndependentScreens
|
|
|
+import XMonad.Layout.Tabbed(simpleTabbed)
|
|
|
+import XMonad.Layout.NoBorders(withBorder, smartBorders)
|
|
|
+import XMonad.Layout.IndependentScreens(countScreens)
|
|
|
|
|
|
|
|
|
import Data.Map(fromList)
|
|
|
-import XMonad.Prompt
|
|
|
-import XMonad.Prompt.XMonad
|
|
|
-import XMonad.Prompt.ConfirmPrompt
|
|
|
-import System.Exit(ExitCode(ExitSuccess), exitWith)
|
|
|
-import XMonad.Util.EZConfig(additionalKeys, removeKeys)
|
|
|
-import XMonad.Util.Dmenu
|
|
|
-
|
|
|
|
|
|
-import Graphics.X11.ExtraTypes.XF86
|
|
|
+import XMonad.Util.EZConfig(removeKeys)
|
|
|
|
|
|
+
|
|
|
import Data.List(elemIndex, foldl1')
|
|
|
+
|
|
|
import qualified XMonad.StackSet as W
|
|
|
import qualified Data.Map as M
|
|
|
|
|
|
|
|
|
-import XMonad.Config.Kde
|
|
|
+import XMonad.Config.Kde(kde4Config, desktopLayoutModifiers)
|
|
|
|
|
|
-import XMonad.Hooks.EwmhDesktops
|
|
|
+import XMonad.Hooks.EwmhDesktops(ewmh, fullscreenEventHook)
|
|
|
|
|
|
myModMask = mod4Mask
|
|
|
myTerminal = "konsole"
|
|
|
|
|
|
|
|
|
-myBar = "xmobar"
|
|
|
-
|
|
|
|
|
|
myPP = xmobarPP { ppTitle = \_ -> ""
|
|
|
, ppLayout = \_ -> ""}
|
|
@@ -68,76 +57,11 @@ main = do
|
|
|
, startupHook = startup startupList
|
|
|
, handleEventHook = handleEventHook kde4Config <+> fullscreenEventHook <+> docksEventHook
|
|
|
, modMask = mod4Mask
|
|
|
- , keys = \c -> mySetKeys c `M.union` keys kde4Config c
|
|
|
- }
|
|
|
+ , keys = \c -> myKeys c `M.union` keys kde4Config c
|
|
|
+ }
|
|
|
`removeKeys` myRemoveKeys
|
|
|
|
|
|
-xmonadStartupList =
|
|
|
- [ "feh --bg-scale ~/Owncloud/Backgrounds/Xmbindings.png"
|
|
|
-
|
|
|
- , "pasystray"
|
|
|
- , "xfce4-clipman"
|
|
|
- , "xbacklight -set 12"
|
|
|
- , "compton"
|
|
|
- , "xscreensaver -nosplash"
|
|
|
- ]
|
|
|
-
|
|
|
-mySetKeys conf@(XConfig {XMonad.modMask = myModMask}) =
|
|
|
-
|
|
|
- M.fromList $ myKeys
|
|
|
- where
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- myKeys =
|
|
|
+myKeys conf@(XConfig {XMonad.modMask = myModMask}) = M.fromList $
|
|
|
[
|
|
|
|
|
|
((myModMask, xK_x),
|
|
@@ -274,6 +198,7 @@ startupList :: [String]
|
|
|
startupList =
|
|
|
[ "compton"
|
|
|
, "nextcloud"
|
|
|
+
|
|
|
, "sleep 5 && for i in `xdotool search --all --name xmobar`; do xdotool windowraise $i; done"
|
|
|
]
|
|
|
|
|
@@ -282,6 +207,7 @@ startup l = do
|
|
|
foldl1' (>>) $ map (spawn . ifNotRunning) l
|
|
|
|
|
|
|
|
|
+
|
|
|
ifNotRunning :: String -> String
|
|
|
ifNotRunning s = "if [ `pgrep -c " ++ (basename s) ++ "` == 0 ]; then " ++ s ++ "; fi"
|
|
|
|