mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
added bullets to top comment information to make it more readable
This commit is contained in:
parent
1ee1a843b0
commit
50dd14ce0d
79
inxi
79
inxi
|
@ -78,38 +78,37 @@
|
|||
#### -S For desktop environment, user must be in X and have xprop installed (in X11-utils)
|
||||
########################################################################
|
||||
#### CONVENTIONS:
|
||||
#### Indentation: TABS
|
||||
#### Do not use `....` (back quotes), those are totally non-reabable, use $(....).
|
||||
#### Do not use one liner flow controls.
|
||||
#### The ONLY time you should use ';' (semi-colon) is in this single case: if [[ condition ]];then.
|
||||
#### Never use compound 'if': ie, if [[ condition ]] && statement.
|
||||
#### Note: [[ -n $something ]] - double brackets does not require quotes for variables: ie, "$something".
|
||||
#### Always use quotes, double or single, for all string values.
|
||||
####
|
||||
#### All new code/methods must be in a function.
|
||||
#### For all boolean tests, use 'true' / 'false'.
|
||||
#### !! Do NOT use 0 or 1 unless it's a function return.
|
||||
#### Avoid complicated tests in the if condition itself.
|
||||
#### To 'return' a value in a function, use 'echo <var>'.
|
||||
####
|
||||
#### For gawk: use always if ( num_of_cores > 1 ) { hanging { starter for all blocks
|
||||
#### This lets us use one method for all gawk structures, including BEGIN/END, if, for, etc
|
||||
#### * Character Encoding: UTF-8 - this file contains special characters that must be opened and saved as UTF8
|
||||
#### * Indentation: TABS
|
||||
#### * Do not use `....` (back quotes), those are totally non-reabable, use $(....).
|
||||
#### * Do not use one liner flow controls.
|
||||
#### The ONLY time you should use ';' (semi-colon) is in this single case: if [[ condition ]];then.
|
||||
#### Never use compound 'if': ie, if [[ condition ]] && statement.
|
||||
#### * Note: [[ -n $something ]] - double brackets does not require quotes for variables: ie, "$something".
|
||||
#### * Always use quotes, double or single, for all string values.
|
||||
#### * All new code/methods must be in a function.
|
||||
#### * For all boolean tests, use 'true' / 'false'.
|
||||
#### !! Do NOT use 0 or 1 unless it's a function return.
|
||||
#### * Avoid complicated tests in the if condition itself.
|
||||
#### * To 'return' a value in a function, use 'echo <var>'.
|
||||
#### * For gawk: use always if ( num_of_cores > 1 ) { hanging { starter for all blocks
|
||||
#### This lets us use one method for all gawk structures, including BEGIN/END, if, for, etc
|
||||
####
|
||||
#### VARIABLE/FUNCTION NAMING:
|
||||
#### All functions should follow standard naming--verb adjective noun.
|
||||
#### ie, get_cpu_data
|
||||
#### All variables MUST be initialized / declared explicitly.
|
||||
#### All variables should clearly explain what they are, except counters like i, j.
|
||||
#### Each word of variable must be separated by '_' (underscore) (camel form).
|
||||
#### Global variables are 'UPPER CASE', at top of script.
|
||||
#### ie, SOME_VARIABLE=''
|
||||
#### Local variables are 'lower case' and declared at the top of the function.
|
||||
#### ie, some_variable=''
|
||||
#### Locals that will be inherited by child functions have first char capitalized (so you know they are inherited).
|
||||
#### ie, Some_Variable
|
||||
####
|
||||
#### Booleans should start with b_ (local) or B_ (global) and state clearly what is being tested.
|
||||
#### Arrays should start with a_ (local) or A_ (global).
|
||||
#### * All functions should follow standard naming--verb adjective noun.
|
||||
#### ie, get_cpu_data
|
||||
#### * All variables MUST be initialized / declared explicitly, either top of file, for Globals, or using local
|
||||
#### * All variables should clearly explain what they are, except counters like i, j.
|
||||
#### * Each word of Bash variable must be separated by '_' (underscore) (camel form), like: cpu_data
|
||||
#### * Each word of Gawk variable must be like this (first word lower, following start with upper): cpuData
|
||||
#### * Global variables are 'UPPER CASE', at top of script.
|
||||
#### ie, SOME_VARIABLE=''
|
||||
#### * Local variables are 'lower case' and declared at the top of the function using local, always.
|
||||
#### ie: local some_variable=''
|
||||
#### * Locals that will be inherited by child functions have first char capitalized (so you know they are inherited).
|
||||
#### ie, Some_Variable
|
||||
#### * Booleans should start with b_ (local) or B_ (global) and state clearly what is being tested.
|
||||
#### * Arrays should start with a_ (local) or A_ (global).
|
||||
####
|
||||
#### SPECIAL NOTES:
|
||||
#### * The color variable ${C2} must always be followed by a space unless you know what
|
||||
|
@ -129,20 +128,16 @@
|
|||
###################################################################################
|
||||
#### KDE Konversation information. Moving from dcop(qt3/KDE3) to dbus(qt4/KDE4)
|
||||
###################################################################################
|
||||
#### dcop and dbus -- these talk back to Konversation from this script
|
||||
####
|
||||
#### Scripting info -- http://konversation.berlios.de/docs/scripting.html
|
||||
#### -- http://www.kde.org.uk/apps/konversation/
|
||||
####
|
||||
#### dbus info -- http://dbus.freedesktop.org/doc/dbus-tutorial.html
|
||||
#### view dbus info -- https://fedorahosted.org/d-feet/
|
||||
#### -- or run qdbus
|
||||
#### Konvi dbus/usage-- qdbus org.kde.konversation /irc say <server> <target-channel> <output>
|
||||
####
|
||||
#### Python usage -- http://wiki.python.org/moin/DbusExamples (just in case)
|
||||
#### * dcop and dbus -- these talk back to Konversation from this script
|
||||
#### * Scripting info -- http://konversation.berlios.de/docs/scripting.html
|
||||
#### -- http://www.kde.org.uk/apps/konversation/
|
||||
#### * dbus info -- http://dbus.freedesktop.org/doc/dbus-tutorial.html
|
||||
#### view dbus info -- https://fedorahosted.org/d-feet/
|
||||
#### -- or run qdbus
|
||||
#### * Konvi dbus/usage-- qdbus org.kde.konversation /irc say <server> <target-channel> <output>
|
||||
#### * Python usage -- http://wiki.python.org/moin/DbusExamples (just in case)
|
||||
####
|
||||
#### Because webpages come and go, the above information needs to be moved to inxi's wiki
|
||||
####
|
||||
########################################################################
|
||||
#### Valuable Resources
|
||||
#### gawk arrays: http://www.math.utah.edu/docs/info/gawk_12.html
|
||||
|
|
Loading…
Reference in a new issue