aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardofSprites <[email protected]>2025-03-20 20:56:55 -0400
committerBardofSprites <[email protected]>2025-03-20 20:56:55 -0400
commit1ba0aaecfa3448e9ce01580b34c46e4ffa343098 (patch)
tree76825fd370f1b17df62c2b3e64257049f4dd9149
parent34d01d56a9dabc72944a1faeb7b998cdf66f3e0c (diff)
xmonad color changing
-rwxr-xr-xbin/.local/bin/scripts/xmonad-themechange54
-rw-r--r--xmonad/.config/xmobar/xmobarrc8
-rw-r--r--xmonad/.config/xmonad/lib/Colors/GruberDarker.hs17
-rw-r--r--xmonad/.config/xmonad/lib/Colors/Modus/Vivendi.hs17
-rw-r--r--xmonad/.config/xmonad/xmonad.hs29
5 files changed, 101 insertions, 24 deletions
diff --git a/bin/.local/bin/scripts/xmonad-themechange b/bin/.local/bin/scripts/xmonad-themechange
new file mode 100755
index 0000000..c515578
--- /dev/null
+++ b/bin/.local/bin/scripts/xmonad-themechange
@@ -0,0 +1,54 @@
+#!/usr/bin/bash
+
+themes=("Gruber Darker" "Modus Vivendi")
+
+selected_theme=$(printf "%s\n" "${themes[@]}" | dmenu -p "Select a theme:")
+
+# Exit if no theme is selected
+if [ -z "$selected_theme" ]; then
+ exit 1
+fi
+
+apply_emacs_theme() {
+ emacsclient -e "(bard/select-theme '$1)"
+}
+
+apply_generic_theme() {
+ case $selected_theme in
+ "Gruber Darker")
+ BG_COLOR="#181818"
+ FG_COLOR="#e4e4e4"
+ BORDER_COLOR="#cc8c3c"
+ XMONAD_MODULE="GruberDarker"
+ apply_emacs_theme "gruber-darker"
+ xrdb -merge ~/.Xresources.d/Xresources.gruber
+ ;;
+ "Modus Vivendi")
+ BG_COLOR="#000000"
+ FG_COLOR="#ffffff"
+ BORDER_COLOR="#989898"
+ XMONAD_MODULE="Modus.Vivendi"
+ apply_emacs_theme "modus-vivendi"
+ xrdb -merge ~/.Xresources.d/Xresources.vivendi
+ ;;
+ *)
+ BG_COLOR="#181818"
+ FG_COLOR="#e4e4e4"
+ BORDER_COLOR="#95a99f"
+ ;;
+ esac
+
+ # Update xmonad theme library
+ sed -i "s/^import Colors\..*/import Colors.$XMONAD_MODULE/" ~/.config/xmonad/xmonad.hs
+
+ # Update xmobar config file
+ sed -i "s/bgColor = .*/bgColor = \"$BG_COLOR\"/" ~/.config/xmobar/xmobarrc
+ sed -i "s/fgColor = .*/fgColor = \"$FG_COLOR\"/" ~/.config/xmobar/xmobarrc
+ sed -i "s/borderColor = .*/borderColor = \"$BORDER_COLOR\"/" ~/.config/xmobar/xmobarrc
+}
+
+apply_generic_theme
+
+# Recompile and restart xmonad
+xmonad --recompile
+xmonad --restart
diff --git a/xmonad/.config/xmobar/xmobarrc b/xmonad/.config/xmobar/xmobarrc
index 517956d..7b669aa 100644
--- a/xmonad/.config/xmobar/xmobarrc
+++ b/xmonad/.config/xmobar/xmobarrc
@@ -1,8 +1,8 @@
Config {
- bgColor = "#181818"
- , fgColor = "#e4e4e4"
+ bgColor = "#181818"
+ , fgColor = "#e4e4e4"
, border = BottomB
- , borderColor = "#95a99f"
+ , borderColor = "#cc8c3c"
, font = "xft:Iosevka Comfy-13"
, position = TopH 22
, commands = [
@@ -11,4 +11,4 @@ Config {
, Run StdinReader -- text coming from xmonad
]
, template = "%StdinReader% }{ %mydate% "
-} \ No newline at end of file
+}
diff --git a/xmonad/.config/xmonad/lib/Colors/GruberDarker.hs b/xmonad/.config/xmonad/lib/Colors/GruberDarker.hs
new file mode 100644
index 0000000..7150137
--- /dev/null
+++ b/xmonad/.config/xmonad/lib/Colors/GruberDarker.hs
@@ -0,0 +1,17 @@
+module Colors.GruberDarker where
+
+import XMonad
+
+fg = "#e4e4ef"
+bg = "#181818"
+bg_alt = "#282828"
+bg_active = "#282828"
+red = "#f43841"
+green = "#73c936"
+yellow = "#ffdd33"
+active_fg = "#cc8c3c"
+tab_fg = "#cc8c3c"
+purple = "#9e95c7"
+inactive_fg = "#95a99f"
+active_border = "#cc8c3c"
+inactive_border = "#282828"
diff --git a/xmonad/.config/xmonad/lib/Colors/Modus/Vivendi.hs b/xmonad/.config/xmonad/lib/Colors/Modus/Vivendi.hs
new file mode 100644
index 0000000..4cac7da
--- /dev/null
+++ b/xmonad/.config/xmonad/lib/Colors/Modus/Vivendi.hs
@@ -0,0 +1,17 @@
+module Colors.Modus.Vivendi where
+
+import XMonad
+
+fg = "#ffffff"
+bg = "#000000"
+bg_active = "#606060"
+bg_alt = "#303030"
+red = "#ff5f59"
+green = "#70b900"
+yellow = "#cabf00"
+active_fg = "#b6a0ff"
+active_border = "#959595"
+tab_fg = "#ffffff"
+inactive_border = "#2d2d2d"
+purple = "#b6a0ff"
+inactive_fg = "#959595"
diff --git a/xmonad/.config/xmonad/xmonad.hs b/xmonad/.config/xmonad/xmonad.hs
index 30b0557..51c6805 100644
--- a/xmonad/.config/xmonad/xmonad.hs
+++ b/xmonad/.config/xmonad/xmonad.hs
@@ -40,17 +40,6 @@ main = do
term :: String
term = "st"
--- Gruber Darker Colors
-fg = "#e4e4ef"
-bg = "#181818"
-bg_alt = "#282828"
-red = "#f43841"
-green = "#73c936"
-yellow = "#ffdd33"
-orange = "#cc8c3c"
-wisteria = "#9e95c7"
-quartz = "#95a99f"
-
myConfig xmprocs = def
{
modMask = mod4Mask
@@ -61,8 +50,8 @@ myConfig xmprocs = def
, startupHook = spawn "conky -c ~/.config/conky/conky.conf"
, manageHook = myManageHook
, borderWidth = 3
- , focusedBorderColor = orange -- Focused window border color
- , normalBorderColor = bg_alt -- Unfocused window border color
+ , focusedBorderColor = active_border -- Focused window border color
+ , normalBorderColor = inactive_border -- Unfocused window border color
}
`additionalKeysP` myKeys
@@ -149,14 +138,14 @@ myKeys =
]
-myTabConfig = def { activeColor = bg_alt
+myTabConfig = def { activeColor = bg_active
, inactiveColor = bg
, urgentColor = red
- , activeBorderColor = orange
- , inactiveBorderColor = bg_alt
+ , activeBorderColor = active_border
+ , inactiveBorderColor = inactive_border
, urgentBorderColor = red
- , activeTextColor = orange
- , inactiveTextColor = quartz
+ , activeTextColor = tab_fg
+ , inactiveTextColor = inactive_fg
, urgentTextColor = fg
, decoHeight = 25
, fontName = "xft:Iosevka Comfy:size=13"
@@ -173,9 +162,9 @@ myLayout = tiled ||| Mirror tiled ||| tabbedBottom
myLogHook xmprocs = mapM_ (\xmproc -> dynamicLogWithPP xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor green "" . shorten 50
- , ppLayout = xmobarColor wisteria ""
+ , ppLayout = xmobarColor purple ""
, ppSep = " | "
- , ppCurrent = xmobarColor orange "" . wrap "[" "]"
+ , ppCurrent = xmobarColor active_fg "" . wrap "[" "]"
, ppVisible = wrap "[" "]"
, ppHidden = \ws -> if ws == "NSP" then "" else wrap "[" "]" ws
, ppHiddenNoWindows = \ws -> ""