Adding trayer to xmonad with script to adjust for trayer width.

This commit is contained in:
Derek Taylor 2020-05-17 18:50:29 -05:00
parent c6d267c7f3
commit a10b1546f3
3 changed files with 19 additions and 18 deletions

View File

@ -14,20 +14,20 @@ Config { font = "xft:Mononoki Nerd Font:pixelsize=12:antialias=true:hinting=t
, iconRoot = "/home/dt/.xmonad/xpm/" -- default: "."
, commands = [
-- Time and date
Run Date "\xf133 %b %d %Y (%H:%M)" "date" 10
Run Date "\xf133 %b %d %Y (%H:%M)" "date" 50
-- Network up and down
, Run Network "enp6s0" ["-t", "\xf0aa <rx>kb \xf0ab <tx>kb"] 10
, Run Network "enp6s0" ["-t", "\xf0aa <rx>kb \xf0ab <tx>kb"] 20
-- Cpu usage in percent
, Run Cpu ["-t", "\xf108 cpu: (<total>%)","-H","50","--high","red"] 10
, Run Cpu ["-t", "\xf108 cpu: (<total>%)","-H","50","--high","red"] 20
-- Ram used number and percent
, Run Memory ["-t", "\xf233 mem: <used>M (<usedratio>%)"] 10
, Run Memory ["-t", "\xf233 mem: <used>M (<usedratio>%)"] 20
-- Disk space free
, Run DiskU [("/", "\xf0c7 hdd: <free> free")] [] 60
-- Runs custom script to check for pacman updates.
-- This script is in my dotfiles repo in .local/bin.
, Run Com "pacupdate" [] "" 3600
, Run Com "pacupdate" [] "" 36000
-- Runs a standard shell command 'uname -r' to get kernel version
, Run Com "uname" ["-r"] "" 3600
, Run Com "uname" ["-r"] "" 36000
-- Prints out the left side items such as workspaces, layout, etc.
-- The workspaces are 'clickable' in my configs.
, Run UnsafeStdinReader

View File

@ -14,20 +14,20 @@ Config { font = "xft:Mononoki Nerd Font:pixelsize=12:antialias=true:hinting=t
, iconRoot = "/home/dt/.xmonad/xpm/" -- default: "."
, commands = [
-- Time and date
Run Date "\xf133 %b %d %Y (%H:%M)" "date" 10
Run Date "\xf133 %b %d %Y (%H:%M)" "date" 50
-- Network up and down
, Run Network "enp6s0" ["-t", "\xf0aa <rx>kb \xf0ab <tx>kb"] 10
, Run Network "enp6s0" ["-t", "\xf0aa <rx>kb \xf0ab <tx>kb"] 20
-- Cpu usage in percent
, Run Cpu ["-t", "\xf108 cpu: (<total>%)","-H","50","--high","red"] 10
, Run Cpu ["-t", "\xf108 cpu: (<total>%)","-H","50","--high","red"] 20
-- Ram used number and percent
, Run Memory ["-t", "\xf233 mem: <used>M (<usedratio>%)"] 10
, Run Memory ["-t", "\xf233 mem: <used>M (<usedratio>%)"] 20
-- Disk space free
, Run DiskU [("/", "\xf0c7 hdd: <free> free")] [] 60
-- Runs custom script to check for pacman updates.
-- This script is in my dotfiles repo in .local/bin.
, Run Com "pacupdate" [] "" 3600
, Run Com "pacupdate" [] "" 36000
-- Runs a standard shell command 'uname -r' to get kernel version
, Run Com "uname" ["-r"] "" 3600
, Run Com "uname" ["-r"] "" 36000
-- Prints out the left side items such as workspaces, layout, etc.
-- The workspaces are 'clickable' in my configs.
, Run UnsafeStdinReader

View File

@ -14,23 +14,24 @@ Config { font = "xft:Mononoki Nerd Font:pixelsize=12:antialias=true:hinting=t
, iconRoot = "/home/dt/.xmonad/xpm/" -- default: "."
, commands = [
-- Time and date
Run Date "\xf133 %b %d %Y (%H:%M)" "date" 10
Run Date "\xf133 %b %d %Y (%H:%M)" "date" 50
-- Network up and down
, Run Network "enp6s0" ["-t", "\xf0aa <rx>kb \xf0ab <tx>kb"] 10
, Run Network "enp6s0" ["-t", "\xf0aa <rx>kb \xf0ab <tx>kb"] 20
-- Cpu usage in percent
, Run Cpu ["-t", "\xf108 cpu: (<total>%)","-H","50","--high","red"] 10
, Run Cpu ["-t", "\xf108 cpu: (<total>%)","-H","50","--high","red"] 20
-- Ram used number and percent
, Run Memory ["-t", "\xf233 mem: <used>M (<usedratio>%)"] 10
, Run Memory ["-t", "\xf233 mem: <used>M (<usedratio>%)"] 20
-- Disk space free
, Run DiskU [("/", "\xf0c7 hdd: <free> free")] [] 60
-- Runs custom script to check for pacman updates.
-- This script is in my dotfiles repo in .local/bin.
, Run Com "pacupdate" [] "" 3600
, Run Com "pacupdate" [] "" 36000
-- Runs a standard shell command 'uname -r' to get kernel version
, Run Com "uname" ["-r"] "" 3600
-- Script that dynamically adjusts xmobar padding depending on number of trayer icons.
, Run Com "/home/dt/.config/xmobar/trayer-padding-icon.sh" [] "trayerpad" 20
-- Prints out the left side items such as workspaces, layout, etc.
-- The workspaces are 'clickable' in my configs.
, Run Com "/home/dt/.config/xmobar/trayer-padding-icon.sh" [] "trayerpad" 10
, Run UnsafeStdinReader
]
, sepChar = "%"