Catppuccin!
This commit is contained in:
parent
9c445e801a
commit
ef916319ca
4 changed files with 91 additions and 77 deletions
82
lib/Catppuccin.hs
Normal file
82
lib/Catppuccin.hs
Normal file
|
@ -0,0 +1,82 @@
|
|||
module Catppuccin
|
||||
( base
|
||||
, blue
|
||||
, crust
|
||||
, flamingo
|
||||
, green
|
||||
, lavender
|
||||
, mantle
|
||||
, maroon
|
||||
, mauve
|
||||
, overlay0
|
||||
, overlay1
|
||||
, overlay2
|
||||
, peach
|
||||
, pink
|
||||
, red
|
||||
, rosewater
|
||||
, sapphire
|
||||
, sky
|
||||
, subtext0
|
||||
, subtext1
|
||||
, surface0
|
||||
, surface1
|
||||
, surface2
|
||||
, teal
|
||||
, text
|
||||
, yellow
|
||||
, theme
|
||||
) where
|
||||
|
||||
import XMonad.Layout.Decoration (Theme(..))
|
||||
|
||||
theme :: Theme
|
||||
theme =
|
||||
Theme { activeColor = mauve
|
||||
, inactiveColor = surface0
|
||||
, urgentColor = red
|
||||
, activeBorderColor = mauve
|
||||
, inactiveBorderColor = surface0
|
||||
, urgentBorderColor = red
|
||||
, activeBorderWidth = 1
|
||||
, inactiveBorderWidth = 1
|
||||
, urgentBorderWidth = 1
|
||||
, activeTextColor = surface0
|
||||
, inactiveTextColor = surface1
|
||||
, urgentTextColor = red
|
||||
, fontName = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
|
||||
, decoWidth = 200
|
||||
, decoHeight = 15
|
||||
, windowTitleAddons = []
|
||||
, windowTitleIcons = []
|
||||
}
|
||||
|
||||
-- Colors for the Mocha variant
|
||||
-- https://raw.githubusercontent.com/catppuccin/palette/main/palette.json
|
||||
-- cat palette.json|jq -rc '.mocha.colors|map ({(.name):.hex})|.[]'
|
||||
base = "#1e1e2e"
|
||||
blue = "#89b4fa"
|
||||
crust = "#11111b"
|
||||
flamingo = "#f2cdcd"
|
||||
green = "#a6e3a1"
|
||||
lavender = "#b4befe"
|
||||
mantle = "#181825"
|
||||
maroon = "#eba0ac"
|
||||
mauve = "#cba6f7"
|
||||
overlay0 = "#6c7086"
|
||||
overlay1 = "#7f849c"
|
||||
overlay2 = "#9399b2"
|
||||
peach = "#fab387"
|
||||
pink = "#f5c2e7"
|
||||
red = "#f38ba8"
|
||||
rosewater = "#f5e0dc"
|
||||
sapphire = "#74c7ec"
|
||||
sky = "#89dceb"
|
||||
subtext0 = "#a6adc8"
|
||||
subtext1 = "#bac2de"
|
||||
surface0 = "#313244"
|
||||
surface1 = "#45475a"
|
||||
surface2 = "#585b70"
|
||||
teal = "#94e2d5"
|
||||
text = "#cdd6f4"
|
||||
yellow = "#f9e2af"
|
|
@ -24,7 +24,7 @@ import XMonad.Prompt.Shell
|
|||
import XMonad.Prompt.Workspace (workspacePrompt)
|
||||
import XMonad.Util.EZConfig
|
||||
import XMonad.Util.NamedScratchpad
|
||||
import qualified Solarized as S
|
||||
import qualified Catppuccin as C
|
||||
import qualified Scratchpad as R
|
||||
import qualified XMonad.StackSet as W
|
||||
|
||||
|
@ -113,12 +113,12 @@ viewProject id = do
|
|||
promptConfig = def
|
||||
{ position = Bottom
|
||||
, alwaysHighlight = True
|
||||
, bgColor = S.magenta
|
||||
, bgHLight = S.base0
|
||||
, borderColor = S.magenta
|
||||
, bgColor = C.lavender
|
||||
, bgHLight = C.surface0
|
||||
, borderColor = C.lavender
|
||||
, defaultText = ""
|
||||
, fgColor = S.base02
|
||||
, fgHLight = S.base03
|
||||
, fgColor = C.surface2
|
||||
, fgHLight = C.text
|
||||
, font = "xft:Iosevka Samae:style=Regular:size=10:charwidth=6.5"
|
||||
, height = 24
|
||||
, promptBorderWidth = 5
|
||||
|
|
|
@ -1,69 +0,0 @@
|
|||
{-# LANGUAGE FlexibleContexts #-}
|
||||
|
||||
module StatusBar (
|
||||
StatusBar.modify
|
||||
) where
|
||||
|
||||
import Data.List
|
||||
import Data.Monoid
|
||||
import Solarized as S
|
||||
import XMonad.Core
|
||||
import XMonad.Hooks.DynamicBars (dynStatusBarStartup,dynStatusBarEventHook,multiPP)
|
||||
import XMonad.Hooks.DynamicLog
|
||||
import XMonad.ManageHook
|
||||
import XMonad.Util.Run
|
||||
|
||||
-- Type constructors
|
||||
import GHC.IO.Handle (Handle)
|
||||
|
||||
modify :: XConfig l -> XConfig l
|
||||
modify conf = conf
|
||||
{ startupHook = do
|
||||
startupHook conf
|
||||
dynStatusBarStartup runXmobar killXmobar
|
||||
, handleEventHook = handleEventHook conf <+> dynStatusBarEventHook runXmobar killXmobar
|
||||
, logHook = do
|
||||
logHook conf
|
||||
multiPP currentPP otherPP
|
||||
}
|
||||
|
||||
runXmobar :: ScreenId -> IO Handle
|
||||
runXmobar (S id) = spawnPipe
|
||||
$ "/run/current-system/sw/bin/xmobar --screen="
|
||||
<> show id
|
||||
<> " /home/e/.xmonad/xmobarrc"
|
||||
|
||||
killXmobar :: IO ()
|
||||
-- killXmobar = spawn "/run/current-system/sw/bin/pkill xmobar"
|
||||
killXmobar = return ()
|
||||
|
||||
otherPP = currentPP
|
||||
{ ppCurrent = xmobarColor S.foreground S.background
|
||||
, ppVisible = xmobarColor S.foreground S.background
|
||||
, ppHidden = xmobarColor S.foreground S.background
|
||||
, ppHiddenNoWindows = xmobarColor S.backgroundhl S.background
|
||||
}
|
||||
|
||||
currentPP = def
|
||||
{ ppCurrent = xmobarColor' S.orange
|
||||
, ppVisible = xmobarColor' S.yellow -- other screen
|
||||
, ppHidden = xmobarColor' S.foreground -- other workspaces with windows
|
||||
, ppHiddenNoWindows = xmobarColor' S.foregroundll -- other workspaces
|
||||
, ppSep = " "
|
||||
, ppWsSep = " "
|
||||
, ppLayout = printLayout
|
||||
, ppTitle = printTitle
|
||||
}
|
||||
where xmobarColor' fg = xmobarColor fg S.base03
|
||||
|
||||
printLayout s | "Mirror ResizableTall" `isSuffixOf` s = "[ — ]"
|
||||
printLayout s | "ResizableTall" `isSuffixOf` s = "[ | ]"
|
||||
printLayout "Full" = "[ F ]"
|
||||
printLayout l = "[" ++ l ++ "]"
|
||||
|
||||
printTitle t = let t' = shorten 120 t
|
||||
in xmobarColor' S.foregroundll "« "
|
||||
++ xmobarColor' S.foregroundhl t'
|
||||
++ xmobarColor' S.foregroundll " »"
|
||||
|
||||
|
|
@ -24,6 +24,7 @@ import XMonad.StackSet (sink)
|
|||
import XMonad.Util.EZConfig
|
||||
import XMonad.Util.SpawnOnce
|
||||
import qualified Solarized as S
|
||||
import qualified Catppuccin as C
|
||||
|
||||
-- Tidy modules
|
||||
import KeyBindings as Keys (modify)
|
||||
|
@ -76,8 +77,8 @@ withConfig =
|
|||
, layoutHook = desktopLayoutModifiers layouts
|
||||
, startupHook = spawnOnce "sh /home/e/.fehbg"
|
||||
, terminal = "rio"
|
||||
, normalBorderColor = S.base03
|
||||
, focusedBorderColor = S.green
|
||||
, normalBorderColor = C.surface0
|
||||
, focusedBorderColor = C.mauve
|
||||
, borderWidth = 5
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue