Created
July 16, 2020 20:49
-
-
Save przmv/8063663bda8b3e90607477f7410a38e5 to your computer and use it in GitHub Desktop.
My XMonad + LXQt config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# OPTIONS_GHC -fno-warn-missing-signatures #-} | |
module XMonad.Config.LXQt ( | |
-- * Usage | |
-- $usage | |
lxqtConfig, | |
desktopLayoutModifiers | |
) where | |
import XMonad | |
import XMonad.Config.Desktop | |
import qualified Data.Map as M | |
lxqtConfig = desktopConfig | |
{ terminal = "qterminal" | |
, keys = lxqtKeys <+> keys desktopConfig } | |
lxqtKeys (XConfig {modMask = modm}) = M.fromList $ | |
[ ((modm, xK_p), spawn "lxqt-runner") | |
, ((modm .|. shiftMask, xK_q), spawn "lxqt-leave") | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.Posix.Env (getEnv) | |
import Data.Maybe (maybe) | |
import XMonad | |
import XMonad.Config.Desktop | |
import XMonad.Config.Gnome | |
import XMonad.Config.Kde | |
import XMonad.Config.Mate | |
import XMonad.Config.Xfce | |
import XMonad.Config.LXQt | |
import XMonad.Hooks.ManageHelpers | |
import XMonad.Layout.Fullscreen | |
import XMonad.Layout.NoBorders | |
import XMonad.Layout.Spacing | |
main = do | |
session <- getEnv "DESKTOP_SESSION" | |
let myDesktopConfig = maybe desktopConfig desktop session | |
xmonad $ myDesktopConfig { | |
modMask = mod4Mask, | |
startupHook = composeAll [ | |
startupHook myDesktopConfig, | |
setFullscreenSupported | |
], | |
manageHook = composeAll [ | |
manageHook myDesktopConfig, | |
isFullscreen --> doFullFloat, | |
isDialog --> doCenterFloat, | |
transience' | |
], | |
handleEventHook = composeAll [ | |
handleEventHook myDesktopConfig, | |
fullscreenEventHook | |
], | |
layoutHook = | |
fullscreenFull $ | |
desktopLayoutModifiers $ | |
spacingRaw False (Border 16 0 0 16) True (Border 0 16 16 0) True $ | |
layoutHook myDesktopConfig, | |
focusFollowsMouse = False, | |
clickJustFocuses = False | |
} | |
desktop "gnome" = gnomeConfig | |
desktop "kde" = kde4Config | |
desktop "xfce" = xfceConfig | |
desktop "xmonad-mate" = mateConfig | |
desktop "/usr/share/xsessions/lxqt" = lxqtConfig { | |
normalBorderColor = "#22252e", | |
focusedBorderColor = "#5294e2" | |
} | |
desktop _ = desktopConfig | |
setFullscreenSupported :: X () | |
setFullscreenSupported = withDisplay $ \dpy -> do | |
r <- asks theRoot | |
a <- getAtom "_NET_SUPPORTED" | |
c <- getAtom "ATOM" | |
supp <- mapM getAtom ["_NET_WM_STATE_HIDDEN" | |
,"_NET_WM_STATE_FULLSCREEN" -- XXX Copy-pasted to add this line | |
,"_NET_NUMBER_OF_DESKTOPS" | |
,"_NET_CLIENT_LIST" | |
,"_NET_CLIENT_LIST_STACKING" | |
,"_NET_CURRENT_DESKTOP" | |
,"_NET_DESKTOP_NAMES" | |
,"_NET_ACTIVE_WINDOW" | |
,"_NET_WM_DESKTOP" | |
,"_NET_WM_STRUT" | |
] | |
io $ changeProperty32 dpy r a c propModeReplace (fmap fromIntegral supp) | |
-- setWMName "xmonad" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment