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"
|
||||
, 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,9 +6,14 @@ import XMonad.Hooks.StatusBar.PP
|
|||
import XMonad.Hooks.EwmhDesktops
|
||||
import XMonad.Util.SpawnOnce (spawnOnce)
|
||||
|
||||
import Theme
|
||||
import NaturalGreenTheme
|
||||
|
||||
main = do
|
||||
xmonad . ewmhFullscreen . ewmh . xmobarProp $ def
|
||||
{ terminal = myTerminal
|
||||
xmonad . ewmhFullscreen . ewmh . withEasySB (statusBarProp ("xmobar " ++ themeWallpaper myTheme) (pure $ themeXmobarPP myTheme)) defToggleStrutsKey $ myConfig
|
||||
|
||||
|
||||
myConfig = def { terminal = myTerminal
|
||||
, modMask = myModMask
|
||||
, borderWidth = myBorderWidth
|
||||
, focusedBorderColor = themeFocusedBorderColor myTheme
|
||||
|
|
@ -17,7 +22,6 @@ main = do
|
|||
}
|
||||
`additionalKeysP` myKeybindings
|
||||
|
||||
|
||||
myTerminal = "alacritty"
|
||||
myModMask = mod4Mask
|
||||
myBorderWidth = 5
|
||||
|
|
@ -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"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue