dzen
dzen copied to clipboard
Add align commands (left, center, right)
Added ^left()
, ^center()
, and ^right()
commands.
With these commands, there's no longer a need to run multiple instances of dzen2 or use the -expand
parameter.
Each new command will copy pixmap to window and call parse_line with rest of not processed text.
Demo:
#!/usr/bin/env bash
# nano dark theme
FOREGROUND="#ECEFF4" # white
BACKGROUND="#2E3440" # black
HIGHLIGHT="#3B4252" # brightblack
SUBTLE="#434C5E" # brightblack
FADED="#677691" # cyan
SALIENT="#81A1C1" # brightblue
STRONG="#FFFFFF" # brightwhite
POPOUT="#D08770" # brightred
CRITICAL="#EBCB8B" # yellow
fg="^fg($FOREGROUND)"
bg="^fg($BACKGROUND)"
sep="^fg($FADED)|"
active="^bg($POPOUT)^fg($BACKGROUND)"
key="^fg($SALIENT)"
val="^fg($STRONG)"
left="^left()${bg}$fg 1 $sep $fg 2 $sep $active 3 "
center="^center()${fg}12:34"
right="^right()$key CPU:$val 10% $sep $key MEM:$val 3.3GB"
echo " ${left}${center}${right} " | ./dzen2 -p -fn "Iosevka Comfy-12" -w 800 -bg $BACKGROUND -fg $FOREGROUND
My fork includes graphical unit tests, and no regressions have been detected.