mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-08-10 18:11:13 +10:00
Adding new colorscheme variables to config.
This commit is contained in:
+51
-13
@@ -7,6 +7,7 @@
|
|||||||
- [[#about-this-config][About This Config]]
|
- [[#about-this-config][About This Config]]
|
||||||
- [[#imports][Imports]]
|
- [[#imports][Imports]]
|
||||||
- [[#variables][Variables]]
|
- [[#variables][Variables]]
|
||||||
|
- [[#color-scheme][Color Scheme]]
|
||||||
- [[#autostart-the-startup-hook][Autostart (The Startup Hook)]]
|
- [[#autostart-the-startup-hook][Autostart (The Startup Hook)]]
|
||||||
- [[#gridselect][Gridselect]]
|
- [[#gridselect][Gridselect]]
|
||||||
- [[#scratchpads][Scratchpads]]
|
- [[#scratchpads][Scratchpads]]
|
||||||
@@ -142,6 +143,32 @@ windowCount :: X (Maybe String)
|
|||||||
windowCount = gets $ Just . show . length . W.integrate' . W.stack . W.workspace . W.current . windowset
|
windowCount = gets $ Just . show . length . W.integrate' . W.stack . W.workspace . W.current . windowset
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
* Color Scheme
|
||||||
|
Set the color scheme for xmobar.
|
||||||
|
#+begin_src haskell
|
||||||
|
-- Set the color scheme. The following are valid color schemes:
|
||||||
|
-- doom-one
|
||||||
|
-- dracula
|
||||||
|
-- gruvbox-dark
|
||||||
|
-- monokai-pro
|
||||||
|
-- nord
|
||||||
|
-- oceanic-next
|
||||||
|
-- solarized-dark
|
||||||
|
-- solarized-light
|
||||||
|
-- tomorrow-night
|
||||||
|
|
||||||
|
colorScheme :: String
|
||||||
|
colorScheme = "doom-one"
|
||||||
|
|
||||||
|
colorCurrent01 = "#c792ea"
|
||||||
|
colorVisible01 = "#c792ea"
|
||||||
|
colorHidden01 = "#82aaff"
|
||||||
|
colorHiddenNW01 = "#82aaff"
|
||||||
|
colorTitle01 = "#b3afc2"
|
||||||
|
colorSep01 = "#b3afc2"
|
||||||
|
colorUrgent01 = "#c45500"
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Autostart (The Startup Hook)
|
* Autostart (The Startup Hook)
|
||||||
These are commands we want XMonad to execute on startup, such as running a compositor, setting our wallpaper, starting the emacs daemon, and starting our system tray and the applications that belong in it.
|
These are commands we want XMonad to execute on startup, such as running a compositor, setting our wallpaper, starting the emacs daemon, and starting our system tray and the applications that belong in it.
|
||||||
|
|
||||||
@@ -603,9 +630,9 @@ This is the "main" of XMonad. This where everything in our configs comes togethe
|
|||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = do
|
main = do
|
||||||
-- Launching three instances of xmobar on their monitors.
|
-- Launching three instances of xmobar on their monitors.
|
||||||
xmproc0 <- spawnPipe "xmobar -x 0 $HOME/.config/xmobar/doom-one-xmobarrc"
|
xmproc0 <- spawnPipe ("xmobar -x 0 $HOME/.config/xmobar/" ++ colorScheme ++ "-xmobarrc")
|
||||||
xmproc1 <- spawnPipe "xmobar -x 1 $HOME/.config/xmobar/doom-one-xmobarrc"
|
xmproc1 <- spawnPipe ("xmobar -x 1 $HOME/.config/xmobar/" ++ colorScheme ++ "-xmobarrc")
|
||||||
xmproc2 <- spawnPipe "xmobar -x 2 $HOME/.config/xmobar/doom-one-xmobarrc"
|
xmproc2 <- spawnPipe ("xmobar -x 2 $HOME/.config/xmobar/" ++ colorScheme ++ "-xmobarrc")
|
||||||
-- the xmonad, ya know...what the WM is named after!
|
-- the xmonad, ya know...what the WM is named after!
|
||||||
xmonad $ ewmh def
|
xmonad $ ewmh def
|
||||||
{ manageHook = myManageHook <+> manageDocks
|
{ manageHook = myManageHook <+> manageDocks
|
||||||
@@ -624,19 +651,30 @@ main = do
|
|||||||
, normalBorderColor = myNormColor
|
, normalBorderColor = myNormColor
|
||||||
, focusedBorderColor = myFocusColor
|
, focusedBorderColor = myFocusColor
|
||||||
, logHook = dynamicLogWithPP $ namedScratchpadFilterOutWorkspacePP $ xmobarPP
|
, logHook = dynamicLogWithPP $ namedScratchpadFilterOutWorkspacePP $ xmobarPP
|
||||||
-- the following variables beginning with 'pp' are settings for xmobar.
|
-- XMOBAR SETTINGS
|
||||||
{ ppOutput = \x -> hPutStrLn xmproc0 x -- xmobar on monitor 1
|
{ ppOutput = \x -> hPutStrLn xmproc0 x -- xmobar on monitor 1
|
||||||
>> hPutStrLn xmproc1 x -- xmobar on monitor 2
|
>> hPutStrLn xmproc1 x -- xmobar on monitor 2
|
||||||
>> hPutStrLn xmproc2 x -- xmobar on monitor 3
|
>> hPutStrLn xmproc2 x -- xmobar on monitor 3
|
||||||
, ppCurrent = xmobarColor "#c792ea" "" . wrap "<box type=Bottom width=2 mb=2 color=#c792ea>" "</box>" -- Current workspace
|
-- Current workspace
|
||||||
, ppVisible = xmobarColor "#c792ea" "" . clickable -- Visible but not current workspace
|
, ppCurrent = xmobarColor colorCurrent01 "" . wrap
|
||||||
, ppHidden = xmobarColor "#82AAFF" "" . wrap "<box type=Top width=2 mt=2 color=#82AAFF>" "</box>" . clickable -- Hidden workspaces
|
("<box type=Bottom width=2 mb=2 color=" ++ colorCurrent01 ++ ">") "</box>"
|
||||||
, ppHiddenNoWindows = xmobarColor "#82AAFF" "" . clickable -- Hidden workspaces (no windows)
|
-- Visible but not current workspace
|
||||||
, ppTitle = xmobarColor "#b3afc2" "" . shorten 60 -- Title of active window
|
, ppVisible = xmobarColor colorVisible01 "" . clickable
|
||||||
, ppSep = "<fc=#666666> <fn=1>|</fn> </fc>" -- Separator character
|
-- Hidden workspace
|
||||||
, ppUrgent = xmobarColor "#C45500" "" . wrap "!" "!" -- Urgent workspace
|
, ppHidden = xmobarColor colorHidden01 "" . wrap
|
||||||
, ppExtras = [windowCount] -- # of windows current workspace
|
("<box type=Top width=2 mt=2 color=" ++ colorHidden01 ++ ">") "</box>" . clickable
|
||||||
, ppOrder = \(ws:l:t:ex) -> [ws,l]++ex++[t] -- order of things in xmobar
|
-- Hidden workspaces (no windows)
|
||||||
|
, ppHiddenNoWindows = xmobarColor colorHiddenNW01 "" . clickable
|
||||||
|
-- Title of active window
|
||||||
|
, ppTitle = xmobarColor colorTitle01 "" . shorten 60
|
||||||
|
-- Separator character
|
||||||
|
, ppSep = "<fc=" ++ colorSep01 ++ "> <fn=1>|</fn> </fc>"
|
||||||
|
-- Urgent workspace
|
||||||
|
, ppUrgent = xmobarColor colorUrgent01 "" . wrap "!" "!"
|
||||||
|
-- Adding # of windows on current workspace to the bar
|
||||||
|
, ppExtras = [windowCount]
|
||||||
|
-- order of things in xmobar
|
||||||
|
, ppOrder = \(ws:l:t:ex) -> [ws,l]++ex++[t]
|
||||||
}
|
}
|
||||||
} `additionalKeysP` myKeys
|
} `additionalKeysP` myKeys
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|||||||
+46
-13
@@ -97,6 +97,28 @@ myFocusColor = "#46d9ff" -- Border color of focused windows
|
|||||||
windowCount :: X (Maybe String)
|
windowCount :: X (Maybe String)
|
||||||
windowCount = gets $ Just . show . length . W.integrate' . W.stack . W.workspace . W.current . windowset
|
windowCount = gets $ Just . show . length . W.integrate' . W.stack . W.workspace . W.current . windowset
|
||||||
|
|
||||||
|
-- Set the color scheme. The following are valid color schemes:
|
||||||
|
-- doom-one
|
||||||
|
-- dracula
|
||||||
|
-- gruvbox-dark
|
||||||
|
-- monokai-pro
|
||||||
|
-- nord
|
||||||
|
-- oceanic-next
|
||||||
|
-- solarized-dark
|
||||||
|
-- solarized-light
|
||||||
|
-- tomorrow-night
|
||||||
|
|
||||||
|
colorScheme :: String
|
||||||
|
colorScheme = "doom-one"
|
||||||
|
|
||||||
|
colorCurrent01 = "#c792ea"
|
||||||
|
colorVisible01 = "#c792ea"
|
||||||
|
colorHidden01 = "#82aaff"
|
||||||
|
colorHiddenNW01 = "#82aaff"
|
||||||
|
colorTitle01 = "#b3afc2"
|
||||||
|
colorSep01 = "#b3afc2"
|
||||||
|
colorUrgent01 = "#c45500"
|
||||||
|
|
||||||
myStartupHook :: X ()
|
myStartupHook :: X ()
|
||||||
myStartupHook = do
|
myStartupHook = do
|
||||||
spawnOnce "lxsession &"
|
spawnOnce "lxsession &"
|
||||||
@@ -489,9 +511,9 @@ myKeys =
|
|||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = do
|
main = do
|
||||||
-- Launching three instances of xmobar on their monitors.
|
-- Launching three instances of xmobar on their monitors.
|
||||||
xmproc0 <- spawnPipe "xmobar -x 0 $HOME/.config/xmobar/doom-one-xmobarrc"
|
xmproc0 <- spawnPipe ("xmobar -x 0 $HOME/.config/xmobar/" ++ colorScheme ++ "-xmobarrc")
|
||||||
xmproc1 <- spawnPipe "xmobar -x 1 $HOME/.config/xmobar/doom-one-xmobarrc"
|
xmproc1 <- spawnPipe ("xmobar -x 1 $HOME/.config/xmobar/" ++ colorScheme ++ "-xmobarrc")
|
||||||
xmproc2 <- spawnPipe "xmobar -x 2 $HOME/.config/xmobar/doom-one-xmobarrc"
|
xmproc2 <- spawnPipe ("xmobar -x 2 $HOME/.config/xmobar/" ++ colorScheme ++ "-xmobarrc")
|
||||||
-- the xmonad, ya know...what the WM is named after!
|
-- the xmonad, ya know...what the WM is named after!
|
||||||
xmonad $ ewmh def
|
xmonad $ ewmh def
|
||||||
{ manageHook = myManageHook <+> manageDocks
|
{ manageHook = myManageHook <+> manageDocks
|
||||||
@@ -510,18 +532,29 @@ main = do
|
|||||||
, normalBorderColor = myNormColor
|
, normalBorderColor = myNormColor
|
||||||
, focusedBorderColor = myFocusColor
|
, focusedBorderColor = myFocusColor
|
||||||
, logHook = dynamicLogWithPP $ namedScratchpadFilterOutWorkspacePP $ xmobarPP
|
, logHook = dynamicLogWithPP $ namedScratchpadFilterOutWorkspacePP $ xmobarPP
|
||||||
-- the following variables beginning with 'pp' are settings for xmobar.
|
-- XMOBAR SETTINGS
|
||||||
{ ppOutput = \x -> hPutStrLn xmproc0 x -- xmobar on monitor 1
|
{ ppOutput = \x -> hPutStrLn xmproc0 x -- xmobar on monitor 1
|
||||||
>> hPutStrLn xmproc1 x -- xmobar on monitor 2
|
>> hPutStrLn xmproc1 x -- xmobar on monitor 2
|
||||||
>> hPutStrLn xmproc2 x -- xmobar on monitor 3
|
>> hPutStrLn xmproc2 x -- xmobar on monitor 3
|
||||||
, ppCurrent = xmobarColor "#c792ea" "" . wrap "<box type=Bottom width=2 mb=2 color=#c792ea>" "</box>" -- Current workspace
|
-- Current workspace
|
||||||
, ppVisible = xmobarColor "#c792ea" "" . clickable -- Visible but not current workspace
|
, ppCurrent = xmobarColor colorCurrent01 "" . wrap
|
||||||
, ppHidden = xmobarColor "#82AAFF" "" . wrap "<box type=Top width=2 mt=2 color=#82AAFF>" "</box>" . clickable -- Hidden workspaces
|
("<box type=Bottom width=2 mb=2 color=" ++ colorCurrent01 ++ ">") "</box>"
|
||||||
, ppHiddenNoWindows = xmobarColor "#82AAFF" "" . clickable -- Hidden workspaces (no windows)
|
-- Visible but not current workspace
|
||||||
, ppTitle = xmobarColor "#b3afc2" "" . shorten 60 -- Title of active window
|
, ppVisible = xmobarColor colorVisible01 "" . clickable
|
||||||
, ppSep = "<fc=#666666> <fn=1>|</fn> </fc>" -- Separator character
|
-- Hidden workspace
|
||||||
, ppUrgent = xmobarColor "#C45500" "" . wrap "!" "!" -- Urgent workspace
|
, ppHidden = xmobarColor colorHidden01 "" . wrap
|
||||||
, ppExtras = [windowCount] -- # of windows current workspace
|
("<box type=Top width=2 mt=2 color=" ++ colorHidden01 ++ ">") "</box>" . clickable
|
||||||
, ppOrder = \(ws:l:t:ex) -> [ws,l]++ex++[t] -- order of things in xmobar
|
-- Hidden workspaces (no windows)
|
||||||
|
, ppHiddenNoWindows = xmobarColor colorHiddenNW01 "" . clickable
|
||||||
|
-- Title of active window
|
||||||
|
, ppTitle = xmobarColor colorTitle01 "" . shorten 60
|
||||||
|
-- Separator character
|
||||||
|
, ppSep = "<fc=" ++ colorSep01 ++ "> <fn=1>|</fn> </fc>"
|
||||||
|
-- Urgent workspace
|
||||||
|
, ppUrgent = xmobarColor colorUrgent01 "" . wrap "!" "!"
|
||||||
|
-- Adding # of windows on current workspace to the bar
|
||||||
|
, ppExtras = [windowCount]
|
||||||
|
-- order of things in xmobar
|
||||||
|
, ppOrder = \(ws:l:t:ex) -> [ws,l]++ex++[t]
|
||||||
}
|
}
|
||||||
} `additionalKeysP` myKeys
|
} `additionalKeysP` myKeys
|
||||||
|
|||||||
Reference in New Issue
Block a user