2023-10-15 23:24:24 +02:00
|
|
|
-- Xmobar (http://projects.haskell.org/xmobar/)
|
|
|
|
-- This is one of the xmobar configurations for DTOS.
|
|
|
|
-- This config is packaged in the DTOS repo as 'dtos-xmobar'
|
|
|
|
-- Color scheme: Tomorrow Night
|
|
|
|
-- Dependencies:
|
|
|
|
-- otf-font-awesome
|
|
|
|
-- ttf-mononoki
|
|
|
|
-- ttf-ubuntu-font-family
|
|
|
|
-- htop
|
|
|
|
-- emacs
|
|
|
|
-- pacman (Arch Linux)
|
|
|
|
-- trayer
|
|
|
|
-- 'dtos-local-bin' (from dtos-core-repo)
|
|
|
|
|
|
|
|
Config {
|
|
|
|
font = "xft:Iosevka-12"
|
|
|
|
, additionalFonts = [ "xft:Mononoki:pixelsize=8:antialias=true:hinting=true"
|
|
|
|
, "xft:Font Awesome 6 Free Solid:pixelsize=10"
|
|
|
|
, "xft:Font Awesome 6 Brands:pixelsize=10"
|
|
|
|
]
|
|
|
|
, bgColor = "#1d1f21"
|
|
|
|
, fgColor = "#ffffff"
|
|
|
|
-- Position TopSize and BottomSize take 3 arguments:
|
|
|
|
-- an alignment parameter (L/R/C) for Left, Right or Center.
|
|
|
|
-- an integer for the percentage width, so 100 would be 100%.
|
|
|
|
-- an integer for the minimum pixel height for xmobar, so 24 would force a height of at least 24 pixels.
|
|
|
|
-- NOTE: The height should be the same as the trayer (system tray) height.
|
|
|
|
, position = TopSize L 100 16
|
|
|
|
, lowerOnStart = True
|
|
|
|
, hideOnStart = False
|
|
|
|
, allDesktops = True
|
|
|
|
, persistent = True
|
|
|
|
, iconRoot = ".config/xmonad/xpm/" -- default: "."
|
|
|
|
, commands = [
|
|
|
|
Run UnsafeXMonadLog
|
|
|
|
, Run StdinReader
|
|
|
|
-- Echos a "penguin" icon in front of the kernel output.
|
|
|
|
-- Run Com "echo" ["<fn=3>\xf17c</fn>"] "penguin" 3600
|
|
|
|
-- Get kernel version (script found in .local/bin)
|
|
|
|
-- , Run Com ".local/bin/kernel" [] "kernel" 36000
|
|
|
|
-- Cpu usage in percent
|
|
|
|
, Run Cpu ["-t", "<fn=2>\xf108</fn> cpu: <total>%","-H","50","--high","red"] 20
|
|
|
|
-- Ram used number and percent
|
|
|
|
, Run Memory ["-t", "<fn=2>\xf233</fn> mem: <used>M <usedratio>%"] 20
|
|
|
|
-- Disk space free
|
2024-06-06 01:26:00 +02:00
|
|
|
, Run DiskU [("/", "<fn=2>\xf0c7</fn> /: <free> free")] [] 60
|
2023-10-15 23:24:24 +02:00
|
|
|
-- Echos an "up arrow" icon in front of the uptime output.
|
2024-06-06 01:26:00 +02:00
|
|
|
-- , Run Com "echo" ["<fn=2>\xf0aa</fn>"] "uparrow" 3600
|
2023-10-15 23:24:24 +02:00
|
|
|
-- Uptime
|
2024-06-06 01:26:00 +02:00
|
|
|
-- , Run Uptime ["-t", "uptime: <days>:<hours>:<minutes>"] 360
|
2023-10-15 23:24:24 +02:00
|
|
|
-- Echos a "bell" icon in front of the pacman updates.
|
|
|
|
-- , Run Com "echo" ["<fn=2>\xf0f3</fn>"] "bell" 3600
|
|
|
|
-- Check for pacman updates (script found in .local/bin)
|
|
|
|
-- , Run Com ".local/bin/pacupdate" [] "pacupdate" 36000
|
|
|
|
-- Echos a "battery" icon in front of the pacman updates.
|
|
|
|
, Run Com "echo" ["<fn=2>\xf242</fn>"] "baticon" 3600
|
|
|
|
-- Battery
|
|
|
|
, Run BatteryP ["BAT0"] ["-t", "<acstatus><watts> <left>%"] 360
|
|
|
|
-- Time and date
|
|
|
|
, Run Date "<fn=2>\xf017</fn>%d.%m.%Y %H:%M " "date" 50
|
|
|
|
-- Script that dynamically adjusts xmobar padding depending on number of trayer icons.
|
|
|
|
, Run Com ".config/xmobar/trayer-padding-icon.sh" [] "trayerpad" 20
|
|
|
|
-- Prints out the left side items such as workspaces, layout, etc.
|
|
|
|
]
|
|
|
|
, sepChar = "%"
|
|
|
|
, alignSep = "}{"
|
2024-06-06 01:26:00 +02:00
|
|
|
, template = "%UnsafeXMonadLog% }{ <box type=Bottom width=2 mb=2 color=#b5bd68><fc=#b5bd68>%cpu%</fc></box> <box type=Bottom width=2 mb=2 color=#e6c547><fc=#e6c547>%memory%</fc></box> <box type=Bottom width=2 mb=2 color=#81a2be><fc=#81a2be>%disku%</fc></box> <box type=Bottom width=2 mb=2 color=#ff3334><fc=#ff3334>%baticon% %battery%</fc></box> <box type=Bottom width=2 mb=2 color=#9ec400><fc=#9ec400>%date%</fc></box> %trayerpad%"
|