Added new layouts and cleaned up startup
This commit is contained in:
parent
f895e95df2
commit
c580745feb
|
@ -6,52 +6,93 @@ import Graphics.X11.Xlib
|
|||
import Graphics.X11.Xlib.Extras
|
||||
import XMonad.Hooks.DynamicLog
|
||||
import XMonad.Hooks.ManageDocks
|
||||
import XMonad.Layout.Accordion
|
||||
import XMonad.Layout.Circle
|
||||
import XMonad.Layout.Grid
|
||||
import XMonad.Layout.Spiral
|
||||
import XMonad.Layout.Tabbed
|
||||
import XMonad.Layout.ThreeColumns
|
||||
import XMonad.Prompt
|
||||
import XMonad.Prompt.Shell ( shellPrompt )
|
||||
import XMonad.Util.Run(spawnPipe)
|
||||
import XMonad.Util.EZConfig(additionalKeys)
|
||||
--import XMonad.Util.SpawnOnce
|
||||
import XMonad.Util.SpawnOnce
|
||||
import System.IO
|
||||
|
||||
colourBackground :: String
|
||||
colourBackground = "#073642"
|
||||
|
||||
colourForeground :: String
|
||||
colourForeground = "#93a1a1"
|
||||
|
||||
highlightBackground :: String
|
||||
highlightBackground = "#002b36"
|
||||
|
||||
highlightForeground :: String
|
||||
highlightForeground = "#859900"
|
||||
|
||||
-- Set xmobar as my task bar.
|
||||
myWsBar :: String
|
||||
myWsBar = "xmobar -v $HOME/.xmobarrc"
|
||||
|
||||
myXPConfig = def -- Configure the prompt's appearance
|
||||
{ alwaysHighlight = True
|
||||
, bgColor = colourBackground
|
||||
, bgHLight = highlightBackground
|
||||
, fgColor = colourForeground
|
||||
, fgHLight = highlightForeground
|
||||
, font = "xft:Open Sans:size=9"
|
||||
, position = Top
|
||||
, promptBorderWidth = 0
|
||||
}
|
||||
|
||||
backgroundCmd = "feh --bg-scale ~/Documents/Images/Posters/FuegoMilkyWay.jpg"
|
||||
compositeMgr = "xcompmgr -f -C -n -D 3"
|
||||
musicCmd = "mpd"
|
||||
nextcloudCmd = "nextcloud"
|
||||
notificationCmd = "lxqt-notificationd"
|
||||
screensaverCmd = "xscreensaver -no-splash"
|
||||
settingsDaemon = "xsettingsd"
|
||||
terminalCmd = "termonad"
|
||||
trayerCmd = "trayer --edge top --align right --SetDockType true --SetPartialStrut false --expand true --width 7 --transparent true --alpha 0 --tint 0x073642 --height 20 --monitor primary"
|
||||
|
||||
main = do
|
||||
-- Make sure that HDMI is turned off by default
|
||||
spawn "xrandr --output eDP-1 --primary --output HDMI1 --off"
|
||||
-- Launch the composite manager
|
||||
spawn "xcompmgr -f -C -n -D 3"
|
||||
-- Launch xmobar as my task bar.
|
||||
xmproc <- spawnPipe "xmobar /home/craige/.xmobarrc"
|
||||
-- Launch the system tray, configured to work correctly with dual monitors
|
||||
spawn "trayer --edge top --align right --SetDockType true --SetPartialStrut false --expand true --width 5 --transparent true --alpha 0 --tint 0x073642 --height 20 --monitor primary"
|
||||
-- Launch the settings daemon
|
||||
spawn "xsettingsd"
|
||||
-- Launch the screen saver
|
||||
spawn "xscreensaver -no-splash"
|
||||
spawn "nm-applet"
|
||||
spawn "owncloud"
|
||||
-- Launch the music playing daemon
|
||||
spawn "mpd"
|
||||
-- Set the background wallpaper
|
||||
spawn "feh --bg-scale ~/Documents/Images/Posters/FuegoMilkyWay.jpg"
|
||||
spawn "lxqt-notificationd"
|
||||
wsbar <- spawnPipe myWsBar
|
||||
xmonad $ desktopConfig
|
||||
{ focusFollowsMouse = False
|
||||
, terminal = "termonad" -- Set the default terminal
|
||||
, manageHook = manageDocks <+> manageHook desktopConfig
|
||||
, layoutHook = avoidStruts $ layoutHook desktopConfig
|
||||
, logHook = dynamicLogWithPP $ xmobarPP
|
||||
{ ppOutput = hPutStrLn xmproc
|
||||
, terminal = terminalCmd -- Set the default terminal
|
||||
, startupHook = do
|
||||
spawnOnce screensaverCmd -- Launch the screen saver
|
||||
spawnOnce backgroundCmd -- Set the background wallpaper
|
||||
spawnOnce compositeMgr -- Launch the composite manager
|
||||
spawnOnce settingsDaemon -- Launch the settings daemon
|
||||
spawnOnce trayerCmd -- Launch the system tray, configured to work correctly with dual monitors
|
||||
spawnOnce notificationCmd -- Launch the notification service
|
||||
spawnOnce musicCmd -- Launch the music playing daemon
|
||||
spawnOnce nextcloudCmd -- Launch the cloud service
|
||||
, manageHook = manageDocks <+> manageHook desktopConfig
|
||||
, layoutHook = avoidStruts $ layoutHook desktopConfig
|
||||
||| spiral (6/7)
|
||||
||| Grid
|
||||
||| Circle
|
||||
||| ThreeCol 1 (3/100) (1/2)
|
||||
||| simpleTabbed
|
||||
||| Accordion
|
||||
, handleEventHook = handleEventHook desktopConfig <+> docksEventHook
|
||||
, logHook = dynamicLogWithPP $ xmobarPP
|
||||
{ ppOutput = hPutStrLn wsbar
|
||||
, ppCurrent = xmobarColor "#859900" "" . wrap "[" "]"
|
||||
, ppVisible = xmobarColor "#2aa198" "" . wrap "(" ")"
|
||||
, ppLayout = xmobarColor "#2aa198" ""
|
||||
, ppTitle = xmobarColor "#859900" "" . shorten 50
|
||||
, ppLayout = xmobarColor "#2aa198" ""
|
||||
, ppTitle = xmobarColor "#859900" "" . shorten 50
|
||||
}
|
||||
, modMask = mod4Mask -- Rebind Mod to the Windows key
|
||||
--, borderWidth = 1
|
||||
} `additionalKeys`
|
||||
-- Custom dmenu launcher
|
||||
[ ((mod4Mask, xK_p ), spawn
|
||||
" exe=`dmenu_path | dmenu -fn \"Open Sans-10\" -p \"λ:\" \
|
||||
\ -nb \"#073642\" -nf \"#93a1a1\" -sb \"#002b36\" -sf \
|
||||
\ \"#859900\"` && eval \"exec $exe\""
|
||||
)
|
||||
-- Use Xmonad's built-in launcher
|
||||
[ ((mod4Mask, xK_p), shellPrompt myXPConfig)
|
||||
-- Lock the screen
|
||||
, ((0, 0x1008ff2d), spawn "xscreensaver-command -lock")
|
||||
-- XF86ScreenSaver
|
||||
|
|
Loading…
Reference in a new issue