Seperate theme files, Xmobar major changes.
This commit is contained in:
parent
1fcc67c8f2
commit
f70f93141f
4 changed files with 48 additions and 28 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
Config { bgColor = "#425F57"
|
Config { bgColor = "#425F57"
|
||||||
, fgColor = "#CFFF8D"
|
, fgColor = "#CFFF8D"
|
||||||
, template = "%XMonadPropRead%"}
|
, font = "xft:iosevka-9"
|
||||||
|
, commands = [ Run Date "%a %Y-%m-%d <fc=#8be9fd>%H:%M</fc>" "date" 10
|
||||||
|
, Run XMonadLog
|
||||||
|
]
|
||||||
|
, alignSep = "}{"
|
||||||
|
, template = " %XMonadLog% }{ %date% "}
|
||||||
|
|
|
||||||
17
.config/xmonad/lib/NaturalGreenTheme.hs
Normal file
17
.config/xmonad/lib/NaturalGreenTheme.hs
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
module NaturalGreenTheme (naturalGreenTheme) where
|
||||||
|
import Theme (Theme(..))
|
||||||
|
import XMonad.Hooks.StatusBar.PP
|
||||||
|
|
||||||
|
naturalGreenXmobarPP :: PP
|
||||||
|
naturalGreenXmobarPP = def
|
||||||
|
{ ppSep = " • "
|
||||||
|
}
|
||||||
|
|
||||||
|
naturalGreenTheme :: Theme
|
||||||
|
naturalGreenTheme = Theme { themeName = "Natural Green"
|
||||||
|
, themeBarConfig = "~/.config/xmobar/natural-green-xmobarrc"
|
||||||
|
, themeBorderColor = "#425F57"
|
||||||
|
, themeFocusedBorderColor = "#749F82"
|
||||||
|
, themeWallpaper = "~/Wallpapers/wp-hs.png"
|
||||||
|
, themeXmobarPP = naturalGreenXmobarPP
|
||||||
|
}
|
||||||
10
.config/xmonad/lib/Theme.hs
Normal file
10
.config/xmonad/lib/Theme.hs
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
module Theme ( Theme(..) ) where
|
||||||
|
import XMonad.Hooks.StatusBar.PP
|
||||||
|
|
||||||
|
data Theme = Theme { themeName :: String
|
||||||
|
, themeBarConfig :: String
|
||||||
|
, themeBorderColor :: String
|
||||||
|
, themeFocusedBorderColor :: String
|
||||||
|
, themeWallpaper :: String
|
||||||
|
, themeXmobarPP :: PP
|
||||||
|
}
|
||||||
|
|
@ -6,17 +6,21 @@ import XMonad.Hooks.StatusBar.PP
|
||||||
import XMonad.Hooks.EwmhDesktops
|
import XMonad.Hooks.EwmhDesktops
|
||||||
import XMonad.Util.SpawnOnce (spawnOnce)
|
import XMonad.Util.SpawnOnce (spawnOnce)
|
||||||
|
|
||||||
main = do
|
import Theme
|
||||||
xmonad . ewmhFullscreen . ewmh . xmobarProp $ def
|
import NaturalGreenTheme
|
||||||
{ terminal = myTerminal
|
|
||||||
, modMask = myModMask
|
|
||||||
, borderWidth = myBorderWidth
|
|
||||||
, focusedBorderColor = themeFocusedBorderColor myTheme
|
|
||||||
, normalBorderColor = themeBorderColor myTheme
|
|
||||||
, startupHook = myStartupHook
|
|
||||||
}
|
|
||||||
`additionalKeysP` myKeybindings
|
|
||||||
|
|
||||||
|
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"
|
myTerminal = "alacritty"
|
||||||
myModMask = mod4Mask
|
myModMask = mod4Mask
|
||||||
|
|
@ -27,7 +31,7 @@ myTheme = naturalGreenTheme
|
||||||
|
|
||||||
myStartupHook :: X ()
|
myStartupHook :: X ()
|
||||||
myStartupHook = do
|
myStartupHook = do
|
||||||
spawnOnce $ "/usr/bin/xmobar " ++ themeBarConfig myTheme
|
spawn $ "/usr/bin/xmobar " ++ themeBarConfig myTheme
|
||||||
spawn $ "feh --bg-scale " ++ themeWallpaper myTheme
|
spawn $ "feh --bg-scale " ++ themeWallpaper myTheme
|
||||||
|
|
||||||
myKeybindings :: [(String, X())]
|
myKeybindings :: [(String, X())]
|
||||||
|
|
@ -39,19 +43,3 @@ myKeybindings = [ ("M-e", spawn myEmacs)
|
||||||
, ("<XF86AudioLowerVolume>", spawn "amixer -q sset Master 3%-")
|
, ("<XF86AudioLowerVolume>", spawn "amixer -q sset Master 3%-")
|
||||||
, ("M-<Return>", spawn myTerminal)
|
, ("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"
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue