Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • P Pacman
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare
    • Locked Files
  • Issues 6
    • Issues 6
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 19
    • Merge requests 19
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Pacman
  • Pacman
  • Merge requests
  • !29

Allow setting custom glyphs for progress bar

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed txtsd requested to merge txtsd/pacman:progbar into master Dec 06, 2022
  • Overview 2
  • Commits 1
  • Pipelines 1
  • Changes 5

This allows using custom unicode glyphs to render progress bars.

Requires a new setting GlyphBar =  in pacman.conf (Use Fira Code to see these glyphs)
The setting is parsed but ignored if ILoveCandy is also set.
The 6 glyphs in the string are [emptybar_beg, emptybar_mid, emptybar_end, fullbar_beg, fullbar_mid, fullbar_end] in that order.

Technically, any unicode chars can be used, even emoji, but the emoji's double-width will cause chaos, so don't 🤷

Try these:
GlyphBar = ╠═╣┣━┫
GlyphBar = पगचदटड

pacman-conf.c also required a small refactor to be able to handle multibyte characters.
Additionally, makepkg.sh's write_buildinfo() which always defaulted to LC_ALL=C needed a change to not break when using GlyphBar. It now uses LC_ALL=C.UTF-8 if the user's locale's encoding is UTF-8, and falls back to LC_ALL=C otherwise.

Feedback is welcome! Let me know if anything needs to be changed, or is missing.

Screenshot:

2022-12-06-22_15_47_49_447771562-937x479_grim

Edited Dec 06, 2022 by txtsd
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: progbar