Seperate theme files, Xmobar major changes.

This commit is contained in:
ramazanemreosmanoglu 2022-10-26 10:59:51 +03:00
parent 1fcc67c8f2
commit f70f93141f
4 changed files with 48 additions and 28 deletions

View file

@ -6,17 +6,21 @@ import XMonad.Hooks.StatusBar.PP
import XMonad.Hooks.EwmhDesktops
import XMonad.Util.SpawnOnce (spawnOnce)
main = do
xmonad . ewmhFullscreen . ewmh . xmobarProp $ def
{ terminal = myTerminal
, modMask = myModMask
, borderWidth = myBorderWidth
, focusedBorderColor = themeFocusedBorderColor myTheme
, normalBorderColor = themeBorderColor myTheme
, startupHook = myStartupHook
}
`additionalKeysP` myKeybindings
import Theme
import NaturalGreenTheme
main = do
xmonad . ewmhFullscreen . ewmh . withEasySB (statusBarProp ("xmobar " ++ themeWallpaper myTheme) (pure $ themeXmobarPP myTheme)) defToggleStrutsKey $ myConfig
myConfig = def { terminal = myTerminal
, modMask = myModMask
, borderWidth = myBorderWidth
, focusedBorderColor = themeFocusedBorderColor myTheme
, normalBorderColor = themeBorderColor myTheme
, startupHook = myStartupHook
}
`additionalKeysP` myKeybindings
myTerminal = "alacritty"
myModMask = mod4Mask
@ -27,7 +31,7 @@ myTheme = naturalGreenTheme
myStartupHook :: X ()
myStartupHook = do
spawnOnce $ "/usr/bin/xmobar " ++ themeBarConfig myTheme
spawn $ "/usr/bin/xmobar " ++ themeBarConfig myTheme
spawn $ "feh --bg-scale " ++ themeWallpaper myTheme
myKeybindings :: [(String, X())]
@ -39,19 +43,3 @@ myKeybindings = [ ("M-e", spawn myEmacs)
, ("<XF86AudioLowerVolume>", spawn "amixer -q sset Master 3%-")
, ("M-<Return>", spawn myTerminal)
]
-- Themes
data Theme = Theme { themeName :: String
, themeBarConfig :: String
, themeBorderColor :: String
, themeFocusedBorderColor :: String
, themeWallpaper :: String
}
naturalGreenTheme :: Theme
naturalGreenTheme = Theme { themeName = "Natural Green"
, themeBarConfig = "~/.config/xmobar/natural-green-xmobarrc"
, themeBorderColor = "#425F57"
, themeFocusedBorderColor = "#749F82"
, themeWallpaper = "~/Wallpapers/wp-hs.png"
}