More comprehensive examples please
Opened this issue · 3 comments
How do I set the bar at the bottom of the screen?
I dont quite understand where to add set-bottom
in the river/status
also how do you set the font pixel size? the example in the README doesn't specify a pixelsize.
Lastly, can I remove/disable things like window title, wm mode/layout ?
I agree that the examples need improving.
You can set your bar to be on the bottom by appending -bottom
when running the sandbar
binary. Font size is set by adding :size=n
to the font name. For example:
while cat "$FIFO"; do :; done | sandbar \
-font "LiterationMono Nerd Font:size=16" \
-active-bg-color "#9D3232" \
-inactive-bg-color "#222222" \
-title-bg-color "#222222" \
-bottom
You can set the bar at the bottom by passing in -bottom
on invocation like @realcharmer suggested, or you can write all set-bottom
/ all set-top
into sandbar's stdin to change it at runtime. If you have a fifo setup like the one shown in the readme, you can do this:
echo 'all set-bottom' > "$MY_FIFO_PATH"
you can replace all
with your specific output name if you want
realcharmer answered your second question, just pass -font "${MY_FONT_NAME}:size=${MY_FONT_SIZE}"
as an argument
As for your third question, the -no-title
option exists to disable the window title, but nothing for the wm mode and layout. For now, you can probably just comment out these lines: https://github.com/kolunmi/sandbar/blob/main/sandbar.c#L412-L423 and you'll get the effect you want
the example on the readme was contributed. What in particular could use improvement?
I agree that the examples need improving. You can set your bar to be on the bottom by appending
-bottom
when running thesandbar
binary. Font size is set by adding:size=n
to the font name. For example:while cat "$FIFO"; do :; done | sandbar \ -font "LiterationMono Nerd Font:size=16" \ -active-bg-color "#9D3232" \ -inactive-bg-color "#222222" \ -title-bg-color "#222222" \ -bottom
This was very helpful, thanks! Perhaps the readme should show an example with with all the commandline options for dumdums like me :P
Side note: -font "My Font:size=10.5"
does not work for me. What worked was -font "My Font-10.5"
You can set the bar at the bottom by passing in
-bottom
on invocation like @realcharmer suggested, or you can writeall set-bottom
/all set-top
into sandbar's stdin to change it at runtime. If you have a fifo setup like the one shown in the readme, you can do this:echo 'all set-bottom' > "$MY_FIFO_PATH"
I'm just a little confused by the all
and status
I have echo "all status $battery $volume $datetime" >"FIFO"
and thought that I needed to keep status
in order to show the status's... therfore my first thought was to just add in set-bottom
like so:
echo "all set-bottom status $battery $volume $datetime" >"FIFO"
which didn't quite work.
I've just set the command line option in the bar script which works fine.
you can replace
all
with your specific output name if you want
Not quite sure what else I'd replace all
with exactly.
As for your third question, the
-no-title
option exists to disable the window title, but nothing for the wm mode and layout. For now, you can probably just comment out these lines: https://github.com/kolunmi/sandbar/blob/main/sandbar.c#L412-L423 and you'll get the effect you want
That worked! would love for it to become a command line option in the future so I don't need to hack the source.
One more question for now..
Id like to be able to separate the inactive-bg-color
and inactive-fg-color
between the TAGS and the STATUS ie. Set the status-fg-color
and status-bg-color
for my status output to be different to that of the window tags. I'd also like to have the option to set urgent
and critical
colors also for high temps, low battery etc.
There doesn't seem to be an option for this yet? Is this possibly something you'd consider implementing?
Thanks!