From 4643850108db54d804268d6b1a43eee70a40d52f Mon Sep 17 00:00:00 2001 From: ne_mene Date: Mon, 2 Mar 2026 12:03:34 +0100 Subject: moar --- README.md | 11 +++++++++++ examplebar.sh | 7 ++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b8c6db5..a21c1e5 100644 --- a/README.md +++ b/README.md @@ -58,3 +58,14 @@ On the right, left and center there will be a previously set `label` component. ``` tsarc layout -left label -center label -right label ``` + +Consider the following script: +``` +while true; do + tsarc set date -text "$(date)" + sleep 1 +done +``` +If our tsarbar has a component named `date` somewhere in the layout and this script is running. +It will update the date to `$(date)`, this is a clock in our bar! +See `man date` for more info. diff --git a/examplebar.sh b/examplebar.sh index 9a6f163..b32eae8 100755 --- a/examplebar.sh +++ b/examplebar.sh @@ -1,14 +1,15 @@ #! /bin/sh # Put any monospace font here -tsarc config -font "Liberation Mono:style=Regular:size=9" -tsarc config -height 16 +tsarc config -font "Liberation Mono:style=Regular:size=12" +tsarc config -height 18 tsarc config -padding 4 tsarc config -foreground #FFFFFF tsarc config -background #000000 +tsarc config -gap 8 tsarc set test_comp -text "Testing spaces" -tsarc set sep -text " | " +tsarc set sep -text "|" tsarc layout \ -left test_comp sep date \ -- cgit v1.3-2-g0d8e