Commit Graph

19 Commits

Author SHA1 Message Date
James Prestwood 0b68601c10 client: make COLOR_* macros take a string input
The existing color code escape sequences required the user to set the
color, write the string, then unset with COLOR_OFF. Instead the macros
can be made to take the string itself and automatically terminate the
color with COLOR_OFF. This makes for much more concise strings.
2022-07-07 14:09:03 -05:00
James Prestwood e4c3cfd229 client: update CLEAR_SCREEN to be consistent with others
Clear screen used a \033 escape sequence while others used a \x
2022-07-07 14:09:03 -05:00
James Prestwood 80051f0124 client: add generic display function for table rows
There was no easy to use API for printing the contents of a table, and
was left up to the caller to handle manually. This adds display_table_row
which makes displaying tables much easier, including automatic support
for line truncation and continuation on the next line.

Lines which are too long will be truncated and displayed on the next
line while also taking into account any colored output. This works with any
number of columns.

This removes the need for the module to play games with encoding newlines
and tabs to make the output look nice.

As a start, this functionality was added to the command display.
2022-07-07 14:08:56 -05:00
Vladimír Dudr 1d348b131d client: fix colors to make grey really grey
\e[1;30m is bold black, often, but not always displayed bright black or
bold bright black. In case it is displayed as real black it is
invisible. \e[1;90m is explicit bold bright black.

\e[37m is white, therefore it is not suitable to be labeled as GREY,
which is \e[90m
2022-03-16 09:56:08 -05:00
James Prestwood 8539c7aa9e client: remove display_dictionary
This has been replaced by diagnostic_display
2021-01-22 15:02:54 -06:00
James Prestwood 9ac59700d1 client: implement display_dictionary
This takes a Dbus iterator which has been entered into a
dictionary and prints out each key and value. It requires
a mapping which maps keys to types and units. For simple
cases the mapping will consist of a dbus type character
and a units string, e.g. dBm, Kbit/s etc. For more complex
printing which requires processing the value the 'units'
void* cant be set to a function which can be custom written
to handle the value.
2021-01-21 13:48:43 -06:00
Tim Kourt 5d68fbd55f client: Automate display refresh enablement
The display refresh is automatically enabled or disabled depending on
the width of the window. This allows to avoid the incorrect display on
refresh for the small windows.
2020-04-08 21:01:27 -05:00
Rosen Penev 2acda158ef client: apply format attribute to two functions
Clang was able to find these extra ones.
2020-04-08 16:14:44 -05:00
Marcel Holtmann 152b56a12a treewide: Move the Intel copyright forward to 2019 2019-10-25 00:43:08 +02:00
Denis Kenzior 67e590cfeb client: Utilize l_parse_args 2018-07-30 08:59:55 -05:00
Tim Kourt 0716334e61 client: Enable agent to control its prompt 2018-05-04 19:37:38 -05:00
Tim Kourt af14445509 client: add agent prompt to display 2018-05-03 16:00:23 -05:00
Tim Kourt b2ea962a67 client: remove unused function 2017-04-28 15:02:15 -05:00
Tim Kourt 6a06623b0d client: exclude unicode characters 2017-04-28 13:27:05 -05:00
Tim Kourt 966a8effd1 client: Define command refresh interfaces 2017-04-12 15:33:26 -05:00
Tim Kourt 7c3ed0c61d client: Command display functions 2017-04-12 15:33:00 -05:00
Tim Kourt f5cb1d46bd client: display quit 2017-04-10 20:06:05 -05:00
Tim Kourt 52b878c24f client: add display functions 2017-03-24 09:11:03 -05:00
Tim Kourt 21bebbd581 client: Introduce display files
The purpose of these files is to encapsulate all of
the display related functionality
2017-03-24 09:06:30 -05:00