LCDproc(3pm)

πŸ“¦
version 0.037 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

LCDproc πŸ’– the Perl manual, but make it cute

okay bestie, so this is IO::LCDproc(3pm) β€” a User Contributed Perl Documentation page, aka the whole vibe guide for talking to your LCDproc display from Perl. pull up a chair, grab a strawberry πŸ“, and let's get into it.


✨ NAME ✨

IO::LCDproc β€” the Perl extension that connects you to an LCDproc-ready display. it's giving "your Perl script but make it ✨visible on a tiny screen✨". no cap.


🌸 SYNOPSIS 🌸

here's the whole main-character moment, copy-paste ready:

use IO::LCDproc;

my $client      = IO::LCDproc::Client->new(name => "MYNAME");
my $screen      = IO::LCDproc::Screen->new(name => "screen");
my $title       = IO::LCDproc::Widget->new(
                name => "date", type => "title"
                );
my $first       = IO::LCDproc::Widget->new(
                name => "first", align => "center", xPos => 1, yPos => 2
                );
my $second      = IO::LCDproc::Widget->new(
                name => "second", align => "center", xPos => 1, yPos => 3
                );
my $third       = IO::LCDproc::Widget->new(
                name => "third", xPos => 1, yPos => 4
                );
$client->add( $screen );
$screen->add( $title, $first, $second, $third );
$client->connect() or die "cannot connect: $!";
$client->initialize();

$title->set( data => "This is the title" );
$first->set( data => "First Line" );
$second->set( data => "Second line" );
$third->set( data => "Third Line" );

$client->flushAnswers();

πŸ¦‹ DESCRIPTION πŸ¦‹

literally just follow the example up there, bestie. it's pretty straight forward, fr fr. the whole flow is: you create a client πŸ‘‘, you assign a screen, you add widgets, and then you set the widgets. that's the entire plot. periodt.


πŸ’œ IO::LCDproc::Client πŸ’œ

this is the back engine of the whole module, the main character behind the scenes. it's the one that generates the connection to a ready, listening server. it ate, honestly.

METHODS

  • new( name => 'Client_Name' [, host => $MYHOSTNAME] [, port => $MYPORTNUMBER] ) β€” the Constructor, aka the birth of your client πŸ’«. it takes these possible arguments, and yes they must be given in key => value form: host, port, and name. and name is required, so don't skip it, okay?
  • add( SCREENREF ) β€” adds the screens that will be attached to this client. this is you picking which screens get to ride with you 🫢.
  • connect() β€” establishes the connection to the LCDproc server (LCDd). the moment of truth ✨.
  • initialize() β€” initializes the client, the screen, and all the widgets with the server. everybody gets ready at once.
  • answer() β€” reads an answer from the server πŸ‘€.
  • flushAnswers() β€” flushes all the answers from the server. and lowkey important: this should be called regularly if you don't need the answers. don't leave your server hanging with unread replies, bestie πŸ’€.

🌈 IO::LCDproc::Screen 🌈

METHODS

  • new( name => 'MYNAME') β€” Constructor ✨. allowed options: heartbeat => 1 or 0. that's the tea.
  • add( @WIDGETS ) β€” adds the given widgets to this screen. pop them on there πŸ’….
  • set_prio( $prio ) β€” sets the screen priority, where $prio is one of these iconic tiers:
    • hidden β€” the screen will never be visible. ghost mode πŸ‘».
    • background β€” the screen is only visible when no normal info screens exist. it's the backup dancer πŸŽ€.
    • info β€” normal info screen, and this is the default priority.
    • foreground β€” an active client. front and center πŸ”₯.
    • alert β€” the screen has an important message for the user. 🚨 drama incoming 🚨.
    • input β€” the client is doing interactive input. type type type ⌨️.

🧚 IO::LCDproc::Widget 🧚

METHODS

  • new( name => 'MYNAME' ) β€” Constructor ✨. allowed arguments: align (left, center, rigth), type (string, title, vbar, hbar, ...), xPos, yPos, data. (yes, it says rigth β€” we are keeping it exactly as written, no fixing, that's the rule πŸ’–)
  • set() β€” sets the widget to the spec'd args. they may be given on the function call, or they may be pre specified. the args are xPos, yPos, data.
  • save() β€” saves the current data to be user later. tucking it away for safekeeping 🫢.
  • restore() β€” restores previously saved data. and heads up: it implicitly calls set. so it does two things at once, multitasking queen πŸ‘‘.

⭐ SEE ALSO ⭐

  • LCDd

πŸ’Œ AUTHOR πŸ’Œ

Juan C. Muller, <jcmuller@gmail.com>


Copyright 2005 by Juan C. Muller

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


and that's the whole page, bestie! πŸ’– this was LCDproc(3pm) from perl v5.32.0, dated 2021-01-08 β€” sending you off with that exact energy, mwah πŸ˜˜πŸ’…πŸ¦‹

πŸ“¦ where this page comes from