2019-01-15 16:27:01 -05:00
|
|
|
-- http://projects.haskell.org/xmobar/
|
2021-04-28 18:21:58 -04:00
|
|
|
-- I use Font Awesome 5 fonts in this config for unicode "icons". On Arch Linux,
|
|
|
|
-- install this package from the AUR to get these fonts: otf-font-awesome-5-free
|
2019-01-15 16:27:01 -05:00
|
|
|
|
2020-07-12 11:52:51 -04:00
|
|
|
Config { font = "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=true"
|
2021-09-04 00:22:44 -04:00
|
|
|
, additionalFonts = [ "xft:Mononoki:pixelsize=11:antialias=true:hinting=true"
|
2021-04-28 18:21:58 -04:00
|
|
|
, "xft:Font Awesome 5 Free Solid:pixelsize=12"
|
|
|
|
, "xft:Font Awesome 5 Brands:pixelsize=12"
|
2020-07-12 11:52:51 -04:00
|
|
|
]
|
2020-09-29 17:28:27 -04:00
|
|
|
, bgColor = "#282c34"
|
|
|
|
, fgColor = "#ff6c6b"
|
2021-04-26 14:32:23 -04:00
|
|
|
, position = Static { xpos = 1920 , ypos = 0, width = 1920, height = 24 }
|
2019-01-15 16:27:01 -05:00
|
|
|
, lowerOnStart = True
|
|
|
|
, hideOnStart = False
|
|
|
|
, allDesktops = True
|
|
|
|
, persistent = True
|
2021-04-25 19:24:22 -04:00
|
|
|
, iconRoot = "/home/dt/.xmonad/xpm/" -- default: "."
|
|
|
|
, commands = [
|
2021-04-26 14:32:23 -04:00
|
|
|
-- Time and date
|
2021-04-28 18:21:58 -04:00
|
|
|
Run Date "<fn=2>\xf017</fn> %b %d %Y - (%H:%M) " "date" 50
|
2020-05-12 23:26:28 -04:00
|
|
|
-- Network up and down
|
2021-04-28 18:21:58 -04:00
|
|
|
, Run Network "enp6s0" ["-t", "<fn=2>\xf0ab</fn> <rx>kb <fn=2>\xf0aa</fn> <tx>kb"] 20
|
2020-05-12 23:26:28 -04:00
|
|
|
-- Cpu usage in percent
|
2021-04-28 18:21:58 -04:00
|
|
|
, Run Cpu ["-t", "<fn=2>\xf108</fn> cpu: (<total>%)","-H","50","--high","red"] 20
|
2020-05-12 23:26:28 -04:00
|
|
|
-- Ram used number and percent
|
2021-04-28 18:21:58 -04:00
|
|
|
, Run Memory ["-t", "<fn=2>\xf233</fn> mem: <used>M (<usedratio>%)"] 20
|
2020-05-12 23:26:28 -04:00
|
|
|
-- Disk space free
|
2021-04-28 18:21:58 -04:00
|
|
|
, Run DiskU [("/", "<fn=2>\xf0c7</fn> hdd: <free> free")] [] 60
|
2021-09-04 00:55:13 -04:00
|
|
|
-- Echos a "bell" icon in front of the pacman updates.
|
|
|
|
, Run Com "echo" ["<fn=2>\xf0f3</fn>"] "echo" 3600
|
2020-05-12 23:26:28 -04:00
|
|
|
-- Runs custom script to check for pacman updates.
|
|
|
|
-- This script is in my dotfiles repo in .local/bin.
|
2021-04-23 09:26:54 -04:00
|
|
|
, Run Com "/home/dt/.local/bin/pacupdate" [] "pacupdate" 36000
|
2020-05-12 23:26:28 -04:00
|
|
|
-- Runs a standard shell command 'uname -r' to get kernel version
|
2021-09-04 00:55:13 -04:00
|
|
|
, Run Uptime ["-t", "<fn=3>\xf17c</fn> uptime: <days>d <hours>h"] 360
|
2021-04-26 14:32:23 -04:00
|
|
|
-- Script that dynamically adjusts xmobar padding depending on number of trayer icons.
|
2021-04-28 18:21:58 -04:00
|
|
|
, Run Com "/home/dt/.config/xmobar/trayer-padding-icon.sh" [] "trayerpad" 20
|
2020-05-12 23:26:28 -04:00
|
|
|
-- Prints out the left side items such as workspaces, layout, etc.
|
|
|
|
-- The workspaces are 'clickable' in my configs.
|
2019-01-15 16:27:01 -05:00
|
|
|
, Run UnsafeStdinReader
|
|
|
|
]
|
|
|
|
, sepChar = "%"
|
|
|
|
, alignSep = "}{"
|
2021-09-04 00:55:13 -04:00
|
|
|
, template = " <icon=haskell_20.xpm/> <fc=#666666>|</fc> %UnsafeStdinReader% }{ <box type=Bottom width=2 mb=2 color=#51afef><fc=#51afef><action=`alacritty -e htop`>%uptime%</action> </fc></box> <box type=Bottom width=2 mb=2 color=#ecbe7b><fc=#ecbe7b><action=`alacritty -e htop`>%cpu%</action></fc></box> <box type=Bottom width=2 mb=2 color=#ff6c6b><fc=#ff6c6b><action=`alacritty -e htop`>%memory%</action></fc></box> <box type=Bottom width=2 mb=2 color=#a9a1e1><fc=#a9a1e1><action=`alacritty -e htop`>%disku%</action></fc></box> <box type=Bottom width=2 mb=2 color=#98be65><fc=#98be65><action=`alacritty -e sudo iftop`>%enp6s0%</action></fc></box> <box type=Bottom width=2 mb=2 color=#c678dd><fc=#c678dd>%echo% <action=`alacritty -e sudo pacman -Syu`>%pacupdate%</action></fc></box> <box type=Bottom width=2 mb=2 color=#46d9ff><fc=#46d9ff><action=`emacsclient -c -a 'emacs' --eval '(doom/window-maximize-buffer(dt/year-calendar))'`>%date%</action></fc></box> %trayerpad%"
|
2020-07-15 00:28:57 -04:00
|
|
|
}
|