minor changes to unify xmobar across devices

This commit is contained in:
Solomon Laing 2022-07-19 19:56:02 +09:30
parent e4648c2f63
commit ba7103b52b
2 changed files with 27 additions and 132 deletions

View File

@ -1,19 +1,19 @@
Config { Config {
-- appearance -- appearance
font = "xft:Fira Code:size=12:antialias=true:hinting=true" font = "xft:Fira Code:size=12:antialias=true:hinting=true"
, additionalFonts = [ "xft:FiraCode Nerd Font:size=9:antialias=true:hinting=true" ] , additionalFonts = [ "xft:FiraCode Nerd Font:size=9:antialias=true:hinting=true" ]
, bgColor = "#282a36" , bgColor = "#282a36"
, fgColor = "#f8f8f2" , fgColor = "#f8f8f2"
, position = Top , position = Top
, border = BottomB , border = BottomB
, borderColor = "#282a36" , borderColor = "#282a36"
, iconRoot = "/home/solomon/.xmonad/xpm/" -- default: "." , iconRoot = "/home/solomon/.xmonad/xpm/" -- default: "."
-- layout -- layout
, sepChar = "%" -- delineator between plugin names and straight text , sepChar = "%" -- delineator between plugin names and straight text
, alignSep = "}{" -- separator between left-right alignment , alignSep = "}{" -- separator between left-right alignment
, template = " <action=`xdotool key super+a`><icon=haskell_20.xpm/></action> <fc=#bd93f9>%cpu% %memory%</fc> <action=`nm-connection-editor`>%network%</action> <action=`toggle-sink-mute`>%volume%</action> <fc=#6272a4>|</fc> %UnsafeStdinReader% }{ %keyboard% <fc=#6272a4>|</fc> %date% <fc=#6272a4>|</fc> %YPAD% <fc=#6272a4>|</fc> %updates% %trayerpad%" , template = " <action=`xdotool key super+a`><icon=haskell_20.xpm/></action> <fc=#bd93f9>%cpu% %memory%</fc> <action=`nm-connection-editor`>%network%</action> <action=`toggle-sink-mute`>%volume%</action> <fc=#6272a4>|</fc> %UnsafeStdinReader% }{ %keyboard% <fc=#6272a4>|</fc> %date% <fc=#6272a4>|</fc> %weather% <fc=#6272a4>|</fc> %updates% %trayerpad%"
-- general behavior -- general behavior
, lowerOnStart = True -- send to bottom of window stack on start , lowerOnStart = True -- send to bottom of window stack on start
@ -38,42 +38,8 @@ Config {
-- color can be set by enclosing in <fc></fc> tags. For more details -- color can be set by enclosing in <fc></fc> tags. For more details
-- see http://projects.haskell.org/xmobar/#system-monitor-plugins. -- see http://projects.haskell.org/xmobar/#system-monitor-plugins.
, commands = , commands =
-- weather monitor -- cpu activity monitor
[ Run Weather "YPAD" ["--template" , "<station>: <tempC>C" [ Run Cpu [ "--template" , "cpu: <total>%"
, "--Low" , "10"
, "--High" , "25"
, "--normal" , "#50fa7b"
, "--high" , "#ff5555"
, "--low" , "lightblue"
] 36000
-- network activity monitor
-- , Run Network "enp33s0" [ "--template" , "eth: <icon=net_up_20.xpm/><tx>kB/s <icon=net_down_20.xpm/><rx>kB/s"
-- , "--Low" , "100000" -- units: B/s
-- , "--High" , "500000" -- units: B/s
-- , "--low" , "#50fa7b"
-- , "--normal" , "#ffb86c"
-- , "--high" , "#ff5555"
-- ] 10
-- , Run Network "wlp36s0" [ "--template" , "wlan: <icon=net_up_20.xpm/><tx>kB/s <icon=net_down_20.xpm/><rx>kB/s"
-- , "--Low" , "100000" -- units: B/s
-- , "--High" , "500000" -- units: B/s
-- , "--low" , "#50fa7b"
-- , "--normal" , "#ffb86c"
-- , "--high" , "#ff5555"
-- ] 10
-- network activity monitor (dynamic interface resolution)
-- , Run DynNetwork [ "--template" , "net: <tx>kB/s <rx>kB/s"
-- , "--Low" , "100000" -- units: B/s
-- , "--High" , "500000" -- units: B/s
-- , "--low" , "#50fa7b"
-- , "--normal" , "#ffb86c"
-- , "--high" , "#ff5555"
-- ] 10
-- cpu activity monitor
, Run Cpu [ "--template" , "cpu: <total>%"
, "--Low" , "30" -- units: % , "--Low" , "30" -- units: %
, "--High" , "60" -- units: % , "--High" , "60" -- units: %
, "--low" , "#50fa7b" , "--low" , "#50fa7b"
@ -95,26 +61,6 @@ Config {
-- (%F = y-m-d date, %a = day of week, %T = h:m:s time) -- (%F = y-m-d date, %a = day of week, %T = h:m:s time)
, Run Date "<fc=#268bd2><fn=1>\xf073 </fn>%a %_d %b %Y</fc> <fc=#6272a4>|</fc> <fc=#2AA198><fn=1>\xf017 </fn>%H:%M:%S</fc>" "date" 10 , Run Date "<fc=#268bd2><fn=1>\xf073 </fn>%a %_d %b %Y</fc> <fc=#6272a4>|</fc> <fc=#2AA198><fn=1>\xf017 </fn>%H:%M:%S</fc>" "date" 10
-- keyboard layout indicator
-- , Run Kbd [ ("us(dvorak)" , "DV")
-- , ("us" , "US")
-- ]
-- 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 BatteryP ["BAT0"]
-- [ "--template", "<acstatus> <left>%, <timeleft>"
-- , "-L", "10", "-H", "80"
-- , "-l", "#ff5555", "-h", "#50fa7b"
-- , "--", "-O", "Charging", "-o", "Battery"
-- -- , "-a", "notify-send -u critical 'Battery running out!!'"
-- -- , "-A", "10"
-- ] 10
-- Runs a standard shell command 'uname -r' to get kernel version
-- , Run Com "uname" ["-r"] "" 3600
-- Runs a simple script that counts the number of system updates to apply -- Runs a simple script that counts the number of system updates to apply
, Run Com "/home/solomon/.config/xmobar/count-updates.sh" [] "updates" 3600 , Run Com "/home/solomon/.config/xmobar/count-updates.sh" [] "updates" 3600
@ -130,6 +76,9 @@ Config {
-- Script that pulls volume related data and builds string to dislpay -- Script that pulls volume related data and builds string to dislpay
, Run Com "xmobar-status-vol" [] "volume" 5 , Run Com "xmobar-status-vol" [] "volume" 5
-- Script that pulls weather related data and builds string to display
, Run Com "xmobar-status-weather" ["YPAD"] "weather" 300
-- Prints out the left side items such as workspaces, layout, etc. -- Prints out the left side items such as workspaces, layout, etc.
, Run UnsafeStdinReader , Run UnsafeStdinReader

View File

@ -1,14 +1,14 @@
Config { Config {
-- appearance -- appearance
font = "xft:Fira Code:size=9:antialias=true:hinting=true" font = "xft:Fira Code:size=9:antialias=true:hinting=true"
, additionalFonts = [ "xft:Font Awesome:size=9:antialias=true:hinting=true" ] , additionalFonts = [ "xft:Font Awesome:size=9:antialias=true:hinting=true" ]
, bgColor = "#282a36" , bgColor = "#282a36"
, fgColor = "#f8f8f2" , fgColor = "#f8f8f2"
, position = Top , position = Top
, border = BottomB , border = BottomB
, borderColor = "#282a36" , borderColor = "#282a36"
, iconRoot = "/home/solomon/.xmonad/xpm/" -- default: "." , iconRoot = "/home/solomon/.xmonad/xpm/" -- default: "."
-- layout -- layout
@ -45,7 +45,7 @@ Config {
, "--High" , "60" -- units: % , "--High" , "60" -- units: %
, "--low" , "#50fa7b" , "--low" , "#50fa7b"
, "--normal" , "#ffb86c" , "--normal" , "#ffb86c"
, "--high" , "#ff5555" , "--high" , "#ff5555"
] 10 ] 10
-- memory usage monitor -- memory usage monitor
@ -62,60 +62,6 @@ Config {
-- (%F = y-m-d date, %a = day of week, %T = h:m:s time) -- (%F = y-m-d date, %a = day of week, %T = h:m:s time)
, Run Date "<fc=#268bd2><fn=1>\xf073 </fn> %a %Y-%m-%d</fc> <fc=#6272a4>|</fc> <fc=#2AA198><fn=1>\xf017 </fn>%H:%M:%S</fc>" "date" 10 , Run Date "<fc=#268bd2><fn=1>\xf073 </fn> %a %Y-%m-%d</fc> <fc=#6272a4>|</fc> <fc=#2AA198><fn=1>\xf017 </fn>%H:%M:%S</fc>" "date" 10
-- weather monitor
-- Run Weather "YPAD" ["--template" , "<station>: <tempC><fn=1>\x00b0</fn>C"
-- , "--Low" , "10"
-- , "--High" , "25"
-- , "--normal" , "#50fa7b"
-- , "--high" , "#ff5555"
-- , "--low" , "lightblue"
-- ] 36000
-- network activity monitor
-- , Run Network "enp33s0" [ "--template" , "eth: <icon=net_up_20.xpm/><tx>kB/s <icon=net_down_20.xpm/><rx>kB/s"
-- , "--Low" , "100000" -- units: B/s
-- , "--High" , "500000" -- units: B/s
-- , "--low" , "#50fa7b"
-- , "--normal" , "#ffb86c"
-- , "--high" , "#ff5555"
-- ] 10
-- , Run Network "wlp36s0" [ "--template" , "wlan: <icon=net_up_20.xpm/><tx>kB/s <icon=net_down_20.xpm/><rx>kB/s"
-- , "--Low" , "100000" -- units: B/s
-- , "--High" , "500000" -- units: B/s
-- , "--low" , "#50fa7b"
-- , "--normal" , "#ffb86c"
-- , "--high" , "#ff5555"
-- ] 10
-- network activity monitor (dynamic interface resolution)
-- , Run DynNetwork [ "--template" , "net: <tx>kB/s <rx>kB/s"
-- , "--Low" , "100000" -- units: B/s
-- , "--High" , "500000" -- units: B/s
-- , "--low" , "#50fa7b"
-- , "--normal" , "#ffb86c"
-- , "--high" , "#ff5555"
-- ] 10
-- keyboard layout indicator
-- , Run Kbd [ ("us(dvorak)" , "DV")
-- , ("us" , "US")
-- ]
-- 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 BatteryP ["BAT0"]
-- [ "--template", "<acstatus> <left>%, <timeleft>"
-- , "-L", "10", "-H", "80"
-- , "-l", "#ff5555", "-h", "#50fa7b"
-- , "--", "-O", "Charging", "-o", "Battery"
-- -- , "-a", "notify-send -u critical 'Battery running out!!'"
-- -- , "-A", "10"
-- ] 10
-- Runs a standard shell command 'uname -r' to get kernel version
-- , Run Com "uname" ["-r"] "" 3600
-- Runs a simple script that counts the number of system updates to apply -- Runs a simple script that counts the number of system updates to apply
, Run Com "xmobar-status-updates" [] "updates" 3600 , Run Com "xmobar-status-updates" [] "updates" 3600