Skip to content

Instantly share code, notes, and snippets.

@przmv
Created April 20, 2020 08:27
Show Gist options
  • Save przmv/32edb680e859cdc540b006a478d89e67 to your computer and use it in GitHub Desktop.
Save przmv/32edb680e859cdc540b006a478d89e67 to your computer and use it in GitHub Desktop.
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
main = do
session <- getEnv "DESKTOP_SESSION"
xmonad $ ( maybe desktopConfig desktop session )
{ modMask = mod4Mask }
desktop "gnome" = gnomeConfig
desktop "kde" = kde4Config
desktop "xfce" = xfceConfig
desktop "xmonad-mate" = mateConfig
desktop _ = desktopConfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment