XOSD_SET_BAR_LENGTH(3)

πŸ“¦
version 2.2.15 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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 between 0 and 100. And listen πŸ‘€ β€” setting displayPercentage to -1 reverts 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 -1 and xosd_error gets 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_length lives in the XOSD_SET_BAR_LENGTH(3) page, section 3 of the manual β€” that's the C library section, iykyk. Go read her sisters, xosd_create(3) and xosd_display(3), and then go make the prettiest little percentage bar the world has ever seen. Periodt. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά