Add rofi support and startup hooks to xmonad
This commit is contained in:
parent
baee1db612
commit
0a1b86b32b
@ -4,14 +4,24 @@ import XMonad
|
||||
import XMonad.Actions.WindowBringer
|
||||
import XMonad.Config()
|
||||
import XMonad.Hooks.DynamicLog
|
||||
import XMonad.Hooks.ManageDocks
|
||||
import XMonad.Util.CustomKeys
|
||||
import XMonad.Hooks.EwmhDesktops
|
||||
import XMonad.Util.Run(spawnPipe)
|
||||
import qualified Data.Map as M
|
||||
|
||||
startup :: X()
|
||||
startup = do
|
||||
spawn "stalonetray"
|
||||
spawn "xscreensaver -no-splash"
|
||||
spawn "feh --bg-scale /usr/share/backgrounds/gnome/Blinds.jpg"
|
||||
spawn "copyq"
|
||||
|
||||
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
xmproc <- spawnPipe "xmobar"
|
||||
xmonad defaultConfig
|
||||
xmonad $ ewmh defaultConfig
|
||||
{ modMask = mod4Mask -- Use Super instead of Alt
|
||||
, keys = customKeys delkeys inskeys
|
||||
, terminal = "urxvt"
|
||||
@ -19,13 +29,17 @@ main = do
|
||||
{ ppOutput = hPutStrLn xmproc
|
||||
, ppTitle = xmobarColor "green" "" . shorten 50
|
||||
}
|
||||
, handleEventHook =
|
||||
handleEventHook defaultConfig <+> fullscreenEventHook
|
||||
, startupHook = startup
|
||||
}
|
||||
where
|
||||
delkeys :: XConfig l -> [(KeyMask, KeySym)]
|
||||
delkeys _ = [ ]
|
||||
|
||||
inskeys :: XConfig l -> [((KeyMask, KeySym), X ())]
|
||||
inskeys conf =
|
||||
[ ((mod4Mask, xK_g), gotoMenu)
|
||||
, ((modM4ask, xK_b), bringMenu)
|
||||
inskeys conf@XConfig {XMonad.modMask = modm} =
|
||||
[ ((modm, xK_p), spawn "rofi -show drun")
|
||||
, ((modm, xK_g), spawn "rofi -show window")
|
||||
, ((modm, xK_b), spawn "rofi -show run")
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user