From 1316145c4392b981e0d346196e7f7ababd71ef94 Mon Sep 17 00:00:00 2001 From: fredrikr79 Date: Sat, 22 Mar 2025 22:03:08 +0100 Subject: [PATCH] tmux battery xmobar colors --- home.nix | 6 ++++ home/.xmobarrc | 62 +++++++++++++++++------------------- home/config/xmonad/xmonad.hs | 25 ++++++++------- 3 files changed, 50 insertions(+), 43 deletions(-) diff --git a/home.nix b/home.nix index 39c84b1..91bc70b 100644 --- a/home.nix +++ b/home.nix @@ -1101,6 +1101,12 @@ in { { plugin = tmuxPlugins.session-wizard; } + { + plugin = tmuxPlugins.battery; + extraConfig = '' + set -g status-right '#{battery_percentage} | %a %h-%d %H:%M ' + ''; + } ]; shell = "${pkgs.zsh}/bin/zsh"; newSession = true; diff --git a/home/.xmobarrc b/home/.xmobarrc index 42e0946..b74a22d 100644 --- a/home/.xmobarrc +++ b/home/.xmobarrc @@ -1,66 +1,64 @@ Config { overrideRedirect = False - , font = "xft:iosevka-9" - , bgColor = "#000000" + , font = "Uiua386 10" + , bgColor = "#282a36" , lowerOnStart = True , fgColor = "#f8f8f2" , position = TopW L 100 - , commands = [ Run Weather "ENVA" - [ "--template", " °C " - , "-L", "0" - , "-H", "25" - , "--low" , "lightblue" - , "--normal", "#f8f8f2" - , "--high" , "red" - ] 36000 - , Run Cpu + , commands = [ Run Cpu [ "-L", "3" , "-H", "50" - , "--high" , "red" - , "--normal", "green" , "--template", " %" + , "--high" , "#ff5555" + , "--normal", "#ffb86c" + , "--low", "#50fa7b" + ] 10 + , Run Memory + [ "--template", " %" + , "--high" , "#ff5555" + , "--normal", "#ffb86c" + , "--low", "#50fa7b" ] 10 , Run Alsa "default" "Master" [ "--template", " " + , "--low" , "#ff5555" + , "--normal", "#ffb86c" + , "--high", "#50fa7b" , "--suffix" , "True" , "--" , "--on", "" ] - , Run Memory ["--template", " %"] 10 - , Run Swap [] 10 , Run Date "%a %Y-%m-%d %H:%M:%S" "date" 10 , Run XMonadLog - - -- Battery information. This is likely to require some customization - -- based upon your specific hardware. Or, for a desktop you may want - -- to just remove this section entirely. , Run Battery [ "-t", " %", "--", - --"-c", "charge_full", "-O", "󰢟 ", "-i", "󱟩 ", "-o", "󰂎 ", - "-h", "green", - "-l", "red" + "-h", "#ff5555", + "-l", "#50fa7b" ] 10 - -- , Run Network "wlp0s20f3" ["-L","0","-H","32","--normal","green","--high","red"] 10 , Run CoreTemp [ "--template" , " °C" , "--Low" , "70" -- units: °C , "--High" , "80" -- units: °C - , "--low" , "darkgreen" - , "--normal" , "darkorange" - , "--high" , "darkred" + , "--low" , "#50fa7b" + , "--normal" , "#ffb86c" + , "--high" , "#ff5555" ] 50 , Run DynNetwork [ "--template" , " kB/s" , "--Low" , "1000" -- units: kB/s - , "--High" , "5000" -- units: kB/s - , "--low" , "darkgreen" - , "--normal" , "darkorange" - , "--high" , "darkred" + , "--High" , "10000" -- units: kB/s + , "--low" , "#50fa7b" + , "--normal" , "#ffb86c" + , "--high" , "#ff5555" ] 10 - , Run Brightness [ "-t", "󰃠 %", "--", "-D", "intel_backlight" ] 60 + , Run Brightness [ "-t", "󰃠 %" + , "--low" , "#ff5555" + , "--normal" , "#ffb86c" + , "--high" , "#50fa7b", + "--", "-D", "intel_backlight" ] 60 ] , sepChar = "%" , alignSep = "}{" - , template = " %XMonadLog% } %date% { %alsa:default:Master% | %bright% | %cpu% - %coretemp% | %memory% | %ENVA% | %dynnetwork% | %battery% " + , template = " %XMonadLog% %alsa:default:Master% } %date% { %bright% | %cpu% - %coretemp% | %memory% | %dynnetwork% | %battery% " } diff --git a/home/config/xmonad/xmonad.hs b/home/config/xmonad/xmonad.hs index 5aa134b..2828dfa 100644 --- a/home/config/xmonad/xmonad.hs +++ b/home/config/xmonad/xmonad.hs @@ -105,31 +105,34 @@ myConfig = myXmobarPP :: PP myXmobarPP = def - { ppSep = magenta " • ", + { ppSep = purple " • ", ppTitleSanitize = xmobarStrip, - ppCurrent = wrap " " "" . xmobarBorder "Top" "#8be9fd" 2, - ppHidden = white . wrap " " "", - ppHiddenNoWindows = lowWhite . wrap " " "", + ppCurrent = wrap "" "" . xmobarBorder "Top" "#8be9fd" 2, + ppHidden = white . wrap "" "", + ppHiddenNoWindows = white . wrap "" "", ppUrgent = red . wrap (yellow "!") (yellow "!"), ppOrder = \[ws, l, _, wins] -> [ws, l, wins], ppExtras = [logTitles formatFocused formatUnfocused] } where - formatFocused = wrap (white "[") (white "]") . magenta . ppWindow - formatUnfocused = wrap (lowWhite "[") (lowWhite "]") . blue . ppWindow + formatFocused = wrap (white "[") (white "]") . purple . ppWindow + formatUnfocused = wrap (white "[") (white "]") . blue . ppWindow -- \| Windows should have *some* title, which should not not exceed a -- sane length. ppWindow :: String -> String ppWindow = xmobarRaw . (\w -> if null w then "untitled" else w) . shorten 30 - blue, lowWhite, magenta, red, white, yellow :: String -> String - magenta = xmobarColor "#ff79c6" "" - blue = xmobarColor "#bd93f9" "" - white = xmobarColor "#f8f8f2" "" + purple = xmobarColor "#bd93f9" "" + green = xmobarColor "#50fa7b" "" + blue = xmobarColor "#8be9fd" "" yellow = xmobarColor "#f1fa8c" "" + white = xmobarColor "#f8f8f2" "" + black = xmobarColor "#282a36" "" + gray = xmobarColor "#44475a" "" + comment = xmobarColor "#6272a4" "" red = xmobarColor "#ff5555" "" - lowWhite = xmobarColor "#bbbbbb" "" + orange = xmobarColor "#ffb86c" "" myStartupHook :: X () myStartupHook = do