Config...l::TkUI(3pm)
π NAME π
okay so bestie, you opened Config::Model::TkUI(3pm) and lemme tell you, this one's a whole vibe: Config::Model::TkUI is the Tk GUI you use to edit config data through Config::Model. That's it, that's the name, slay.
β¨ SYNOPSIS β¨
use Config::Model::TkUI;
# init trace
Log::Log4perl->easy_init($WARN);
# create configuration instance
my $model = Config::Model -> new ;
my $inst = $model->instance (root_class_name => 'a_config_class',
instance_name => 'test');
# Tk part
my $mw = MainWindow-> new ;
$mw->withdraw ;
$mw->ConfigModelUI (-instance => $inst) ;
MainLoop ;
no cap, that's the entire recipe. copy it, run it, main character energy unlocked. π₯
π¦ DESCRIPTION π¦
So this class hands you a GUI for Config::Model. Periodt.
Pair this class with Config::Model plus an actual configuration model (think Config::Model::Xorg), and what you get is a whole tool for editing configuration files, e.g. /etc/X11/xorg.conf. it's giving "graphical frontend that actually knows what it's doing." π
π USAGE π
πΈ Left side tree πΈ
- Click on the
+and-boxes to open or close content. open, close, open, close, it's a fidget toy fr. - Left-click on an item to open a viewer widget.
- Double-click, or hit
return, on any item to open an editor widget. - Use
Ctrl-Cto copy configuration data into an internal buffer. - Use
Ctrl-Vto copy configuration data from that internal buffer into the configuration tree. > β οΈ beware bestie: there is no "undo" operation. none. zero. don't test it. π - Before saving your modifications, you can review the change list with the menu entry
File -> show unsaved changes. That list gets cleared after you do aFile -> save. - Pasting the cut buffer intoβ¦
- a leaf element will store the content of the buffer into the element.
- a list element will split the content of the buffer with
/\n/or/,/and push the resulting array at the end of the list element. - a hash element will use the content of the cut buffer to create a new key in the hash element.
π Font size and big screens π
Font type and size can be adjusted using the menu: Options -> Font menu. This setup is saved in the file ~/.cme/config/tkui.yml. your eyes, your rules. π
π Search π
Hit Ctrl-F or use the menu Edit -> Search to open a search widget at the bottom of the window.
Enter a keyword in the entry widget and click on the Next button.
The keyword will be searched in the configuration tree, in element name, in element value and in documentation. three places at once, she's thorough like that. β¨
π«Ά Editor widget π«Ά
The right side of the widget is either a viewer or an editor. When you click on store in the editor, the new data is stored in the tree represented on the left side of TkUI. The new data will be stored in the configuration file only when the File -> save menu is invoked. so like, it's saved in the tree, but not in the file until you actually say so. iykyk. π
π§ Wizard π§
A wizard can be launched either with the File -> Wizard menu entry or with the Run Wizard button.
The wizard will scan the configuration tree and stop on all items flagged as important in the model. It will also stop on all erroneous items (mostly missing mandatory values). it's basically the friend who checks your homework before you turn it in. π
π Methods π
β save(callback) β
Save modified data in the configuration file. The callback function is called only if the save was done without error. The callback is called with $@ in case of a failed save. so like, callback means it worked, $@ means it did not. rude but honest. π
π TODO π
- add tabular view ?
- expand the whole tree at once
- add plug-in mechanism so that dedicated widget can be used for some config Class (Could be handy for Xorg::ServerLayout)
(the future is bright and also extremely backlogged, ngl)
πΈ More information πΈ
- See Config::Model home page
https://github.com/dod38fr/config-model/wiki - Or Author's blog
http://ddumont.wordpress.comwhere you can find many post aboutConfig::Model.
π FEEDBACK and HELP wanted π
This project needs feedback from its users. Please send your feedbacks, comments and ideas to the author. (yes, this is your sign to actually send that email, bestie π«Ά)
- Look and feel of Perl/Tk interface can be improved
- A nicer logo (maybe a penguin with a wrench...) would be welcomed
Config::Modelcould use a web interface- May be also an interface based on Gtk or Wx for better integration in Desktop
π SEE ALSO π
Config::Model,cmehttps://github.com/dod38fr/config-model-tkui/wiki
and that's the whole page, babes β it shipped with perl v5.40.1 and it's dated 2026-03-03. go edit some config files, drink water, and remember: save your work before you paste anything. mwah π
π¦ where this page comes from
- ubuntu resolute: libconfig-model-tkui-perl 1.381-1 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms