CodeTe...ources(3pm)
β¨ NAME β¨
Tk::CodeText::Xresources β a Plugin for xresources files syntax highlighting π¨π
okay so real quick, bestie: this is a plugin for Tk::CodeText that makes xresources files look gorgeous while you're editing them. that's the whole vibe. periodt. π
πΈ SYNOPSIS πΈ
require Tk::CodeText::Xresources;
my $sh = new Tk::CodeText::Xresources([
['Comment', -foreground => 'lightblue'],
['Path', -foreground => 'brown'],
['Command', -foreground => 'blue'],
['Separator', -foreground => 'darkblue'],
['Value', -foreground => 'orange'],
['False', -foreground => 'red'],
]);
look at that. six little tag/colour pairs and you're slaying β¨ you literally just hand it your tag names plus the options you want, and it does the rest. no cap.
π¦ DESCRIPTION π¦
Tk::CodeText::Xresources is a plugin module</> that provides syntax highlighting for xresources files to a Tk::CodeText text widget. π
so basically: you've got a Tk::CodeText widget, you've got an xresources file, and this plugin is the matchmaker that makes them understand each other. it's giving glow-up energy for your config files, fr fr. π₯
it inherits Tk::CodeText::Template. See also there. π (like, go look, it's the parent, it's got lore.)
π METHODS π
highlight($string);β returns a list of string snippets and tags that can be inserted in aTk::Textlike widget instantly. β‘
like, "instantly" instantly. you get back the pieces plus the tags that go with them, and boom π₯ you shove those straight into a Tk::Text-ish widget and it's already highlighted. no extra steps, no drama, we love a one-call wonder. π«Ά
π AUTHOR π
Hans Jeuken (haje@toneel.demon.nl)
shoutout to Hans, absolute icon, wrote the whole thing. π
π BUGS π
Unknown
literally unknown. zero known bugs. either it's flawless or nobody's looked hard enough β we don't ask questions around here, we just enjoy the highlighting. πβ¨
π SEE ALSO π
(nothing explicitly listed in this page β but it does tell you to go peek at Tk::CodeText::Template, which it inherits from, so that's your next stop bestie π§)
okay that's the whole page, mwah π this came out of the User Contributed Perl Documentation corner of the world, perl v5.40.1, dated 2025-05-04, and yeah the title got chopped to CodeTe...ources(3pm) which is honestly a tragedy, but the facts are all here and they're all correct. go highlight something pretty. ππ
π¦ where this page comes from
- debian trixie: libtk-codetext-perl 0.3.4-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtk-codetext-perl 0.3.4-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtk-codetext-perl 0.3.4-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms