XOSD_SET_BAR_LENGTH(3)
π NAME π
xosd_set_bar_length β change the length of the percentage bar or slider, bestie ποΈβ¨
π¦ SYNOPSIS π¦
#include <xosd.h>
int xosd_set_bar_length (xosd *osd, int displayPercentage);
Like, that's the whole thing. One function. One vibe. iconic π
πΈ DESCRIPTION πΈ
Okay so here's the tea β: xosd_set_bar_length changes the percentage of the display that gets used up by a slider or a percentage bar. That's it, that's the job.
Normally XOSD is a whole grown-up and chooses a sensible length for the bar all by itself β no input needed, it just knows. But sometimes you're out here with only a tiny handful of possible values to show, and the default bar length is giving absolutely nothing, and you're like "bestie this is too long for my three (3) options." That's when you wanna change the default behavior. That's your moment. π
π ARGUMENTS π
osdβ the XOSD window you're altering. Your canvas. Your main character. πΌοΈdisplayPercentageβ the percentage of the display that's gonna get eaten up by the slider or percentage bar. It's an integer between0and100. And listen π β settingdisplayPercentageto-1reverts everything back to the default behaviour. It's the "nvm, undo, forget I said anything" button π«Ά
β RETURN VALUE β
- Slayed successfully? You get a zero. π
- Something went wrong? You get
-1andxosd_errorgets set to tell you why, so you're not just sitting there confused. π
π ENVIRONMENT π
char *xosd_errorβ a string that describes the error, if one even occurred. She's the narrator of your tragedy, fr fr. π
π BUGS π
There are no known bugs with xosd_set_bar_length. Clean. Flawless. Not a single crumb. β¨
But if you do find one? Bug reports can be sent to <xosd@ignavus.net>. Spill the tea, they wanna hear it π¬
π AUTHORS π
The XOSD library was originally written by AndrΓ© Renaud, and is currently maintained by Tim Wright. This document was written by Michael JasonSmith. Three legends, one library, no notes. π«‘π
π§ SEE ALSO π§
Heads up bestie:xosd_set_bar_lengthlives in theXOSD_SET_BAR_LENGTH(3)page, section 3 of the manual β that's the C library section, iykyk. Go read her sisters,xosd_create(3)andxosd_display(3), and then go make the prettiest little percentage bar the world has ever seen. Periodt. πβ¨ππ¦πΈπ π«Ά
π¦ where this page comes from
- debian bookworm: libxosd-dev 2.2.14-2.1+b1
- debian trixie: libxosd-dev 2.2.15-1 Β· GPL-2.0-or-later
- ubuntu jammy: libxosd-dev 2.2.14-2.1build1
- ubuntu noble: libxosd-dev 2.2.14-2.1build1
- ubuntu questing: libxosd-dev 2.2.15-1.1
- ubuntu resolute: libxosd-dev 2.2.15-1.1build1 Β· GPL-2.0-or-later
- ubuntu stonking: libxosd-dev 2.2.15-1.1build1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms