dotfiles/home/.config/xmobar/xmobarrc1

121 lines
4.9 KiB
Plaintext
Raw Permalink Normal View History

2021-07-16 03:10:11 +00:00
-- xmobar main configuration file
--
-- This file serves as a shared template for the specific xmonad
-- configuration files that are generated from this file to accomodate
-- for multiple monitors.
--
-- For more details, run 'man xmobar', or visit the project website
2021-07-14 13:15:53 +00:00
-- http://projects.haskell.org/xmobar/
2021-07-16 03:10:11 +00:00
Config {
-- Set font for default dg/bg colors. xmobar height will
-- be controlled by this font (it'll adjust itself to accomodate it)
-- Additional fonts can be defined for emoji support
font = "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=true",
additionalFonts = [
"xft:Font Awesome 5 Free Solid:pixelsize=12",
2021-07-16 11:15:00 +00:00
"xft:Font Awesome 5 Brands:pixelsize=12"
--"xft:Mononoki Nerd Font:pixelsize=11:antialias=true:hinting=true"
2021-07-16 03:10:11 +00:00
],
bgColor = "#282c34",
fgColor = "#ff6c6b",
-- Define static position that will be adjusted by the deploy script
-- which will tweak the starting positions for multiple monitors, this
-- configuration will work fine for single monitor systems out of the box.
position = Static { xpos = 1920, ypos = 0, width = 1920, height = 24 },
-- Define the place where all used XPM images will be stored in
-- Apparently there's is no way to use env var or relpaths here.
iconRoot = "/home/itsdrike/.config/xmobar/xpm",
-- list of commands which gather information about the system
-- which can then be referrenced in the final template string
commands = [
-- Gather and format CPU usage information
-- if it's above 50%, we consider it high and make it red
Run Cpu [
2021-12-03 22:09:28 +00:00
"-t", "<fn=1>\xf2db</fn> <total>%",
2021-07-16 03:10:11 +00:00
"-H","50",
"--high","red"
] 20,
-- Ram used number and percent
2021-12-03 22:09:28 +00:00
Run Memory ["-t", "<fn=1>\xf538</fn> <used>M (<usedratio>%)"] 20,
2021-07-16 03:10:11 +00:00
-- 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.
2021-08-24 15:25:09 +00:00
--Run Battery [
--"-t", "<fn=1>\xf240</fn> <acstatus> <left>% - <timeleft>",
--"--",
--"-i", "<fc=#75c44c>AC</fc>",
--"-O", "<fc=#75c44c>AC</fc>",
--"-o", "<fc=#ff0000>AUX</fc>",
--"-L", "12",
--"-h", "green",
--"-l", "red"
--] 10,
2021-07-16 03:10:11 +00:00
-- Time and date
Run Date "<fn=1>\xf017</fn> %H:%M %b %d %Y" "date" 50,
-- Network up and down
2021-12-03 22:09:28 +00:00
--Run Network "wlp4s0" ["-t", "<fn=1>\xf0ab</fn> <rx>kb <fn=1>\xf0aa</fn> <tx>kb"] 20,
2021-07-16 03:10:11 +00:00
--Run Network "enp3s0" ["-t", "<fn=1>\xf0ab</fn> <rx>kb <fn=1>\xf0aa</fn> <tx>kb"] 20,
2021-12-03 22:09:28 +00:00
-- Uptime
Run Uptime ["-t", "<fn=1>\xf011</fn> <days>d <hours>h"] 360,
2021-07-16 03:10:11 +00:00
-- Show free disk space on /
2021-12-03 22:09:28 +00:00
Run DiskU [("/", "<fn=1>\xf0c7</fn> <free>")] [] 60,
2021-07-16 03:10:11 +00:00
-- Get kernel version from uname -r
Run Com "uname" ["-r"] "" 3600,
2021-12-03 22:09:28 +00:00
-- Volume info
Run Volume "default" "Master" ["-t", "<fn=1>\xf028</fn> <volume>%"] 5,
2021-08-24 15:25:09 +00:00
-- Get bitcoin price from a custom script
Run Com "/home/itsdrike/.local/bin/scripts/bitcoin" [] "bitcoin" 300,
2021-07-16 03:10:11 +00:00
-- Add dynamic invisible XPM icon that resizes to accomodate trayer
-- this needs to be an absolute string path, env vars or relpaths aren't accepted
-- this should only be on 1 monitor (single file), so ignore this comment on others
-- This line tells xmobar to read input from stdin.
2021-07-16 11:15:00 +00:00
-- That's how it gets information that xmonad is sending (such as
-- workspaces) to be displayed. This will get placed onto xmobar
-- template in the position where %UnsafeStdinReader%/%StdinReader% is
-- By using UnsafeStdinReader, it will also allow for action strings
-- to be used, which are activated upon clicking on the given element
2021-07-16 03:10:11 +00:00
Run UnsafeStdinReader
],
-- Separator character used to wrap variables in the xmobar template string
sepChar = "%",
-- Alignment eparator character used in the xmobar template string.
-- Everything before this will be aligned left, everything after right.
alignSep = "}{",
-- Template string defining the xmobar contents and overall layout.
template = "\
\<icon=haskell_20.xpm/> \
2021-07-16 11:15:00 +00:00
\<fc=#666666>|</fc> %UnsafeStdinReader% }{ \
2021-07-16 03:10:11 +00:00
\<fc=#666666>|</fc> <fc=#b3afc2><fn=2></fn> %uname% </fc> \
\<fc=#666666>|</fc> <fc=#ff6c6b> %memory% </fc> \
\<fc=#666666>|</fc> <fc=#51afef> %disku% </fc> \
2021-12-03 22:09:28 +00:00
\<fc=#666666>|</fc> <fc=#78db32> %cpu% </fc> \
\<fc=#666666>|</fc> <fc=#ecbe7b> %default:Master% </fc> \
\<fc=#666666>|</fc> <fc=#98be65> %uptime% </fc> \
2021-08-24 15:25:09 +00:00
\<fc=#666666>|</fc> <fc=#efcb10><fn=2></fn> %bitcoin% </fc> \
2021-07-16 03:10:11 +00:00
\<fc=#666666>|</fc> <fc=#46d9ff> %date% </fc> \
\ "
}
2021-08-24 15:25:09 +00:00
-- Abandoned template strings
2021-12-03 22:09:28 +00:00
-- Network Wifi:
-- \<fc=#666666>|</fc> <fc=#98be65> %wlp4s0% </fc> \
2021-08-24 15:25:09 +00:00
-- Network Ethernet:
-- \<fc=#666666>|</fc> <fc=#98be65> %enp3s0% </fc> \
-- Battery:
-- \<fc=#666666>|</fc> <fc=#9ce996> %battery% </fc> \