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.Actions.WindowBringer
|
||||||
import XMonad.Config()
|
import XMonad.Config()
|
||||||
import XMonad.Hooks.DynamicLog
|
import XMonad.Hooks.DynamicLog
|
||||||
import XMonad.Hooks.ManageDocks
|
|
||||||
import XMonad.Util.CustomKeys
|
import XMonad.Util.CustomKeys
|
||||||
|
import XMonad.Hooks.EwmhDesktops
|
||||||
import XMonad.Util.Run(spawnPipe)
|
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 :: IO ()
|
||||||
main = do
|
main = do
|
||||||
xmproc <- spawnPipe "xmobar"
|
xmproc <- spawnPipe "xmobar"
|
||||||
xmonad defaultConfig
|
xmonad $ ewmh defaultConfig
|
||||||
{ modMask = mod4Mask -- Use Super instead of Alt
|
{ modMask = mod4Mask -- Use Super instead of Alt
|
||||||
, keys = customKeys delkeys inskeys
|
, keys = customKeys delkeys inskeys
|
||||||
, terminal = "urxvt"
|
, terminal = "urxvt"
|
||||||
@ -19,13 +29,17 @@ main = do
|
|||||||
{ ppOutput = hPutStrLn xmproc
|
{ ppOutput = hPutStrLn xmproc
|
||||||
, ppTitle = xmobarColor "green" "" . shorten 50
|
, ppTitle = xmobarColor "green" "" . shorten 50
|
||||||
}
|
}
|
||||||
|
, handleEventHook =
|
||||||
|
handleEventHook defaultConfig <+> fullscreenEventHook
|
||||||
|
, startupHook = startup
|
||||||
}
|
}
|
||||||
where
|
where
|
||||||
delkeys :: XConfig l -> [(KeyMask, KeySym)]
|
delkeys :: XConfig l -> [(KeyMask, KeySym)]
|
||||||
delkeys _ = [ ]
|
delkeys _ = [ ]
|
||||||
|
|
||||||
inskeys :: XConfig l -> [((KeyMask, KeySym), X ())]
|
inskeys :: XConfig l -> [((KeyMask, KeySym), X ())]
|
||||||
inskeys conf =
|
inskeys conf@XConfig {XMonad.modMask = modm} =
|
||||||
[ ((mod4Mask, xK_g), gotoMenu)
|
[ ((modm, xK_p), spawn "rofi -show drun")
|
||||||
, ((modM4ask, xK_b), bringMenu)
|
, ((modm, xK_g), spawn "rofi -show window")
|
||||||
|
, ((modm, xK_b), spawn "rofi -show run")
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user