From 67476d85072531a13aec769af37d098a60fe658b Mon Sep 17 00:00:00 2001 From: Emmet Date: Sun, 28 May 2023 19:23:59 -0500 Subject: [PATCH] Include theme name on xmobar --- user/style/stylix.nix | 1 + user/wm/picom/picom.conf | 8 +------- user/wm/xmonad/xmobarrc.mustache | 8 ++++++-- user/wm/xmonad/xmonad.org | 10 +++++++--- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/user/style/stylix.nix b/user/style/stylix.nix index 6a43298..0f57285 100644 --- a/user/style/stylix.nix +++ b/user/style/stylix.nix @@ -6,6 +6,7 @@ let myThemePath = "../../../themes/"+myTheme+".yaml"; in { + home.file.".currenttheme".text = myTheme; stylix.autoEnable = false; stylix.polarity = myThemePolarity; stylix.image = pkgs.fetchurl { diff --git a/user/wm/picom/picom.conf b/user/wm/picom/picom.conf index 92ec20b..78320ff 100644 --- a/user/wm/picom/picom.conf +++ b/user/wm/picom/picom.conf @@ -195,13 +195,7 @@ focus-exclude = [ # # opacity-rule = [] opacity-rule = [ - "80:class_g = 'Bar'", # lemonbar - "100:class_g = 'slop'", # maim - "100:class_g = 'XTerm'", - "100:class_g = 'URxvt'", - "100:class_g = 'kitty'", - "100:class_g = 'Alacritty'", - "80:class_g = 'Polybar'", + "90:class_g = 'xmobar'", "90:class_g = 'firefox'", "90:class_g = 'librewolf'", "90:class_g = 'Navigator'", diff --git a/user/wm/xmonad/xmobarrc.mustache b/user/wm/xmonad/xmobarrc.mustache index 311f747..6a962f3 100644 --- a/user/wm/xmonad/xmobarrc.mustache +++ b/user/wm/xmonad/xmobarrc.mustache @@ -1,4 +1,4 @@ -Config { font = "Inconsolata 18" +Config { font = "Inconsolata 16" , additionalFonts = ["Symbols Nerd Font 14"] , border = NoBorder , bgColor = "#{{base00-hex}}" @@ -40,10 +40,14 @@ Config { font = "Inconsolata 18" [ "-t", "\xf0200 "] 1 , Run Com "echo" [ "\xea77 st"] "syncthing" 0 + , Run Com "echo" + [ "\xeb5c "] "currentthemesymbol" 0 + , Run Com "cat" + [ "/home/emmet/.currenttheme"] "currenttheme" 0 , Run Memory [ "-t", "\xf035b % ( GB)", "-d", "1", "--", "--scale", "1024"] 20 ] , sepChar = "%" , alignSep = "}{" - , template = " %battery% %bright%%default:Master%%memory%}%XMonadLog%{%syncthing% %dynnetwork%%date% " + , template = " %battery% %bright%%default:Master%%memory% %currentthemesymbol%%currenttheme%}%XMonadLog%{%syncthing% %dynnetwork%%date% " } } diff --git a/user/wm/xmonad/xmonad.org b/user/wm/xmonad/xmonad.org index 0956d8b..7602a44 100644 --- a/user/wm/xmonad/xmonad.org +++ b/user/wm/xmonad/xmonad.org @@ -333,7 +333,7 @@ All of the following keybinds pertain to window management and layouts: | S-Space | Switch to next layout | | S-Shift-Space | Reset layout on current workspace | | S-r | Resize windows to correct size | -| S-{←,↓,↑,→} | Switch to screen visually {left,down,up,right} (requires a [[Window Rules and Hooks][Navigation2Dconfig]]) | +| S-{←,↓,↑,→} | Switch to screen visually {left,down,up,right} (requires a [[Window Rules and Hooks][Navigation2Dconfig]]) | | S-{h,j,k,l} | Switch to window visually {left,down,up,right} (requires a [[Window Rules and Hooks][Navigation2Dconfig]]) | | S-Shift-{h,j,k,l} | Swap window visually {left,down,up,right} on current workspace (requires a [[Window Rules and Hooks][Navigation2Dconfig]]) | | S-C-{h,l} | Resize master window area | @@ -721,7 +721,7 @@ I utilize xmobar as a status bar on my monitors. To manage my xmobar config, I ** Xmobar Template This is my base xmobarrc. This is a full xmobar config with placeholders for the colors (i.e. =colorFgNormal=, =colorBgNormal=, =color01Normal=, =color01Bright=, etc...). [[./startup.sh][startup.sh]] copies this into =xmobarrc= with my current base16 color scheme. This also depends on =Inconsolata= and =Symbols Nerd Font=. #+BEGIN_SRC haskell :tangle xmobarrc.mustache -Config { font = "Inconsolata 18" +Config { font = "Inconsolata 16" , additionalFonts = ["Symbols Nerd Font 14"] , border = NoBorder , bgColor = "#{{base00-hex}}" @@ -763,11 +763,15 @@ Config { font = "Inconsolata 18" [ "-t", "\xf0200 "] 1 , Run Com "echo" [ "\xea77 st"] "syncthing" 0 + , Run Com "echo" + [ "\xeb5c "] "currentthemesymbol" 0 + , Run Com "cat" + [ "/home/emmet/.currenttheme"] "currenttheme" 0 , Run Memory [ "-t", "\xf035b % ( GB)", "-d", "1", "--", "--scale", "1024"] 20 ] , sepChar = "%" , alignSep = "}{" - , template = " %battery% %bright%%default:Master%%memory%}%XMonadLog%{%syncthing% %dynnetwork%%date% " + , template = " %battery% %bright%%default:Master%%memory% %currentthemesymbol%%currenttheme%}%XMonadLog%{%syncthing% %dynnetwork%%date% " } }