a 2 years ago
parent
commit
b2ec58d775
100 changed files with 11939 additions and 693 deletions
  1. 42 17
      .gitignore
  2. 0 674
      LICENSE
  3. 18 0
      Makefile.am
  4. 715 2
      README.md
  5. 54 0
      configure.ac
  6. 33 0
      doc/Makefile
  7. 9 0
      doc/README.md
  8. 23 0
      doc/man_template.pdc
  9. 1490 0
      doc/pinkybar.1
  10. 1314 0
      doc/pinkybar.texi
  11. 53 0
      extra/FreeBSD/Makefile
  12. 1 0
      extra/FreeBSD/pkg-descr
  13. 29 0
      extra/FreeBSD/scripts/post-extract
  14. 21 0
      extra/FreeBSD/scripts/post-fetch
  15. 26 0
      extra/FreeBSD/scripts/post-install
  16. 62 0
      extra/Gentoo/app-admin/pinky-curses/pinky-curses-9999.ebuild
  17. 29 0
      extra/Gentoo/app-admin/pinky/metadata.xml
  18. 123 0
      extra/Gentoo/app-admin/pinky/pinky-bar-9999.ebuild
  19. 90 0
      extra/bash_zsh/_pinkybar
  20. 40 0
      extra/bash_zsh/pinkybar
  21. 87 0
      extra/deprecated/Makefile.skel
  22. 5 0
      extra/deprecated/README.md
  23. 262 0
      extra/deprecated/bootstrap
  24. 62 0
      extra/misc/openbsd_bugs.md
  25. 38 0
      extra/misc/skdump.c
  26. 1 0
      extra/mpd/README.md
  27. 17 0
      extra/mpd/freebsd.conf
  28. 17 0
      extra/mpd/linux.conf
  29. 17 0
      extra/mpd/openbsd.conf
  30. 64 0
      extra/ported_or_not_included/cpu_brand.S
  31. 60 0
      extra/ported_or_not_included/cpu_cache.S
  32. 267 0
      extra/ported_or_not_included/not_included.c
  33. 40 0
      extra/scripts/drive-temperature.sh
  34. 24 0
      extra/scripts/dwm.sh
  35. 27 0
      extra/scripts/pinky-curses.sh
  36. 33 0
      extra/scripts/pinky.lua
  37. 40 0
      extra/scripts/pinky.pl
  38. 41 0
      extra/scripts/pinky.py
  39. 33 0
      extra/scripts/pinky.rb
  40. 25 0
      extra/scripts/xmonad.sh
  41. 4 0
      extra/xbm_icons/arch.xbm
  42. 4 0
      extra/xbm_icons/bat.xbm
  43. 4 0
      extra/xbm_icons/clock.xbm
  44. 4 0
      extra/xbm_icons/cpu.xbm
  45. 4 0
      extra/xbm_icons/diskette.xbm
  46. 4 0
      extra/xbm_icons/fan.xbm
  47. 4 0
      extra/xbm_icons/fox.xbm
  48. 4 0
      extra/xbm_icons/mem.xbm
  49. 4 0
      extra/xbm_icons/mobo.xbm
  50. 6 0
      extra/xbm_icons/mpd.xbm
  51. 4 0
      extra/xbm_icons/net.xbm
  52. BIN
      extra/xbm_icons/sm4tik-icon-pack.tar.bz2
  53. 4 0
      extra/xbm_icons/statio.xbm
  54. 4 0
      extra/xbm_icons/temp.xbm
  55. 4 0
      extra/xbm_icons/uptime.xbm
  56. 4 0
      extra/xbm_icons/vol.xbm
  57. 4 0
      extra/xbm_icons/voltage.xbm
  58. BIN
      img/cpu-temp.png
  59. BIN
      img/mobo-temp.png
  60. BIN
      img/pic.png
  61. BIN
      img/pic2.png
  62. BIN
      img/pic4.png
  63. BIN
      img/pic5.png
  64. BIN
      img/pic6.png
  65. BIN
      img/pic7.png
  66. 74 0
      m4/1errs.m4
  67. 134 0
      m4/alsa.m4
  68. 71 0
      m4/ax_append_flag.m4
  69. 145 0
      m4/cflagz.m4
  70. 85 0
      m4/dvd.m4
  71. 309 0
      m4/extend.m4
  72. 78 0
      m4/mpd.m4
  73. 301 0
      m4/net.m4
  74. 193 0
      m4/sensors.m4
  75. 482 0
      m4/the_rest_funcs.m4
  76. 168 0
      m4/typez.m4
  77. 232 0
      m4/weather.m4
  78. 186 0
      m4/x11.m4
  79. 144 0
      set.pl
  80. 37 0
      src/Makefail.skel
  81. 474 0
      src/common.c
  82. 466 0
      src/cpu.c
  83. 293 0
      src/freebsd_functions.c
  84. 31 0
      src/include/freebzd.h
  85. 156 0
      src/include/functions_constants.h
  86. 37 0
      src/include/headers.h
  87. 42 0
      src/include/ncurses_colours.h
  88. 69 0
      src/include/non_x11_colours.h
  89. 31 0
      src/include/openbzd.h
  90. 100 0
      src/include/options_constants.h
  91. 109 0
      src/include/options_generator.h
  92. 45 0
      src/include/x11_colours.h
  93. 373 0
      src/linux_functions.c
  94. 92 0
      src/lua.c
  95. 48 0
      src/main.c
  96. 697 0
      src/net.c
  97. 310 0
      src/openbsd_functions.c
  98. 408 0
      src/options.c
  99. 121 0
      src/perl.c
  100. 0 0
      src/prototypes/common.h

+ 42 - 17
.gitignore

@@ -1,18 +1,43 @@
-# Object files
+Makefil*
+src/Makefil*
+auto*
+conf*
+aclocal.m4
 *.o
-*.ko
-
-# Libraries
-*.lib
-*.a
-
-# Shared objects (inc. Windows DLLs)
-*.dll
-*.so
-*.so.*
-*.dylib
-
-# Executables
-*.exe
-*.out
-*.app
+*bar
+temp_dir/
+src/.deps/
+.deps/
+*.in
+*.in~
+*stam*
+*.txt
+src/pinky_curses
+*.xz
+*.pdc
+*.pyo
+__pycache__
+*.info
+
+
+
+
+
+
+
+
+
+
+!Makefile.am
+src/Makefile.am
+
+
+
+!configure.ac
+!Makefile.skel
+!extra/FreeBSD/Makefile
+!extra/bash_zsh/_pinkybar
+!extra/bash_zsh/pinkybar
+!doc/man_template.pdc
+!extra/Gentoo/app-admin/pinky/*
+!doc/Makefile

+ 0 - 674
LICENSE

@@ -1,674 +0,0 @@
-GNU GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
-  To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too, receive
-or can get the source code.  And you must show them these terms so they
-know their rights.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-  Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    {one line to give the program's name and a brief idea of what it does.}
-    Copyright (C) {year}  {name of author}
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    {project}  Copyright (C) {year}  {fullname}
-    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
-  The GNU General Public License does not permit incorporating your program
-into proprietary programs.  If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.  But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.

+ 18 - 0
Makefile.am

@@ -0,0 +1,18 @@
+SUBDIRS = src
+
+dist_man_MANS = doc/pinkybar.1
+
+# Optional, create and install
+# the pinkybar info document
+# info_TEXINFOS = doc/pinkybar.texi
+# MAKEINFOFLAGS = --no-validate --no-warn --force
+
+# To satisfy make dist
+EXTRA_DIST =      \
+	src/ncurses.c   \
+	bootstrap       \
+	README.md       \
+	.gitignore      \
+	m4              \
+	doc             \
+	extra

+ 715 - 2
README.md

@@ -1,3 +1,716 @@
-pinky-bar
-=========
+The code doesn't age, neither it has expiration date.
 
+## Table of Contents
+
+- [Program Options](#program-options)
+- [Configure Options](#gnu-build-system-configure-options)
+- [Installation for dwm](#installation-for-dwm)
+- [Installation for xmonad/other WM](#installation-for-xmonad-or-other-wm)
+- [Installation in FreeBSD](#installation-in-freebsd)
+- [Installation in OpenBSD](#installation-in-openbsd)
+- [pinky curses installation](#pinky-curses-installation)
+- [pinky urxvt](#pinky-urxvt)
+- [Installation for anything else](#installation-for-anything-else)
+- [Using configuration file](#using-configuration-file)
+- [Linux Requirements](#linux-mandatory-requirements)
+- [BSD Requirements](#bsd-mandatory-requirements)
+- [Opt-in Requirements](#opt-in-requirements)
+- [WM Requirements](#wm-specific-requirements)
+- [Wish list](#wish-list)
+
+---
+
+dwm
+
+![](img/pic.png)
+
+xmonad
+
+![](img/pic5.png)
+
+![](img/pic7.png)
+
+ncurses
+
+![](img/pic6.png)
+
+Gather some system information and show it in this statusbar program, not tied to any Window Manager, terminal multiplexer, etc.
+
+Please note that the program won't detect fans connected via molex connetor(s) or external fan controller. Also I have not tested it with fan splitter(s) either.
+
+The program is smart enough to detect whether some of your fan(s) blades are spinning, or the particular fan have been removed. Hold down some of your fan blades and you'll see that the program won't include this fan and it's RPM, release the blades and you'll see the fan and it's RPM in the statusbar. Try simulating real fan hardware failure by holding down all system fan blades and watch what the program will show you, just try not to slice your cheesy fingers open in the process.
+
+You can extend pinky-bar with your own crafted perl/python/ruby/lua script.
+
+If you compile your kernel from source code make sure to include your cpu and motherboard sensors as **modules** and not inlined.
+
+**Just an example if you use BSD - acpi/aibs, coretemp/amdtemp.**
+
+![](img/cpu-temp.png)
+
+![](img/mobo-temp.png)
+
+---
+
+## Program options
+
+The order of supplied options will dictate how, where and what system information to be shown.
+
+| short option | long option | Descrtiption                                                       |
+|--------------|-------------|--------------------------------------------------------------------|
+| -M           | --mpd       | The song filename                                                  |
+| -W           | --mpdtrack  | The song track name  (not available in cmus)                       |
+| -x           | --mpdartist | The song artist(s) name(s)                                         |
+| -X           | --mpdtitle  | The song title                                                     |
+| -y           | --mpdalbum  | The song album name                                                |
+| -Y           | --mpddate   | The song date                                                      |
+| -c           | --cpu       | The current cpu load (summed up all cores/threads)                 |
+| -L           | --coresload | Show the load regarding each individual cpu core/thread            |
+| -T           | --cputemp   | The current cpu temperature                                        |
+| -C           | --cpuspeed  | Show your maximum cpu clock speed in MHz, regardless of the used governor. Uses assembly. |
+| -I           | --cpuinfo   | Detect your CPU vendor, stepping, family, clflush, l1/l2 cache and line size, physical cores, physical and virtual bits. Uses assembly. |
+| -r           | --ramperc   | The used ram in percentage                                         |
+| -J           | --ramtotal  | The total ram                                                      |
+| -K           | --ramfree   | The free ram                                                       |
+| -l           | --ramshared | The shared ram                                                     |
+| -o           | --rambuffer | The buffer ram (not available in OpenBSD)                          |
+| -s           | --driveperc | The used drive storage in percentage                               |
+| -n           | --drivetotal| The total drive storage                                            |
+| -N           | --drivefree | The free drive storage                                             |
+| -O           | --driveavail| The available drive storage (total - used)                         |
+|              | --drivetemp | Read the drive temperature from S.M.A.R.T                          |
+| -g           | --battery   | The remaining battery charge                                       |
+| -z           | --dvdstr    | The vendor and model name of your cdrom/dvdrom                     |
+| -S           | --statio    | Read and written MBs to the drive so far [argument - sda]          |
+| -p           | --packages  | The number of installed packages                                   |
+| -P           | --kernsys   | The kernel name                                                    |
+|              | --kernode   | The network node hostname                                          |
+| -Q           | --kernrel   | The kernel release                                                 |
+| -R           | --kernver   | The kernel version                                                 |
+| -u           | --kernarch  | The machine architecture                                           |
+| -k           | --kernel    | Combined kernel name and version                                   |
+|              | --perl      | Extend pinkybar with your scripts written in perl, learn more from the Opt-in section.     |
+|              | --python    | Extend pinkybar with your scripts written in python, learn more from the Opt-in section.     |
+|              | --ruby      | Extend pinkybar with your scripts written in ruby, learn more from the Opt-in section.     |
+|              | --lua       | Extend pinkybar with your scripts written in lua, learn more from the Opt-in section.     |
+| -q           | --weather   | Show the temperature outside [argument - London,uk]                |
+| -U           | --uptime    | The system uptime                                                  |
+| -w           | --loadavg   | The system average load for past 1, 5 and 15 minutes               |
+| -v           | --voltage   | The system voltage                                                 |
+| -f           | --fans      | All system fans and their speed in RPM                             |
+| -m           | --mobo      | Show the motherboard name and vendor                               |
+| -d           | --mobotemp  | The motherboard temperature                                        |
+| -V           | --volume    | The sound volume level                                             |
+| -t           | --time      | The current time                                                   |
+| -a           | --ipaddr    | The local ip address [argument - eth0]                             |
+| -b           | --bandwidth | The consumed internet bandwidth so far [argument - eth0]           |
+| -i           | --iface     | The current download and upload speed [argument - eth0]            |
+| -A           | --ipmac     | The NIC mac address [argument - eth0]                              |
+| -B           | --ipmask    | The NIC subnet mask [argument - eth0]                              |
+| -D           | --ipcast    | The NIC broadcast address [argument - eth0]                        |
+| -E           | --iplookup  | Mini website IP lookup [website argument - google.com]             |
+
+Be aware of the options that mention **Uses assembly** are tested only on AMD and Intel CPUs (starting from pentium 4 onwards).
+
+The following options are available only in Linux:
+
+| short option | long option | Descrtiption                                                       |
+|--------------|-------------|--------------------------------------------------------------------|
+| -F           | --drivemodel| The vendor name of your drive [argument - sda]                     |
+| -G           | --nicinfo   | The NIC vendor and model [argument - eth0]                         |
+|              | --nicdrv    | The NIC driver [argument - eth0]                                   |
+| -H           | --nicver    | The NIC version [argument - eth0]                                  |
+| -e           | --iplink    | The NIC link speed (useful for wireless/wifi) [argument - eth0]    |
+| -j           | --nicfw     | The NIC firmware [argument - eth0]                                 |
+| -h           | --wifiname  | The name of currently connected wifi/wireless network [argument - wlan0]  |
+
+The following options are available only to FreeBSD and OpenBSD:
+
+| short option | long option | Descrtiption                                                       |
+|--------------|-------------|--------------------------------------------------------------------|
+| -j           | --nicgw     | The NIC gateway address [argument - re0]                           |
+| -Z           | --swapused  | The used drive swap in MB                                          |
+| -F           | --swaperc   | The used drive swap in percentage                                  |
+| -h           | --swaptotal | The total drive swap                                               |
+| -H           | --swapavail | The available drive swap (total - used)                            |
+
+The following options are available only in OpenBSD:
+
+| short option | long option | Descrtiption                                                       |
+|--------------|-------------|--------------------------------------------------------------------|
+| -l           | --ramused   | The used ram in MB                                                 |
+
+---
+
+## GNU Build System (configure) options
+
+Before the source code is passed to the compiler, you can enable/disable the following **configure** options 
+that will increase/reduce the number of dependencies required to compile the program.
+
+It's up to you to decide which features suit you best.
+
+| To include     | Not to include      | Descrtiption                                                                               |
+|----------------|---------------------|--------------------------------------------------------------------------------------------|
+| --with-x11     | --without-x11       | Enable it if you are using dwm.                                                            |
+| --with-alsa    | --without-alsa      | To get the sound volume level.                                                             |
+| --with-oss     | --without-oss       | To get the sound volume level in \*BSD.                                                    |
+| --with-net     | --without-net       | Enable the internet related options.                                                       |
+| --with-libnl   | --without-libnl     | Enable the wifi related options regarding chipsets supporting the cfg80211/mac80211 modules (linux only).  |
+| --with-pci     | --without-pci       | To get the NIC vendor and model in linux                                                   |
+| --with-dvd     | --without-dvd       | To get the cdrom/dvdrom vendor and model                                                   |
+| --with-sensors | --without-sensors   | Alternative way to get data from the sensors (linux only)                                  |
+| --with-apm     | --without-apm       | APM power and resource management for laptops (FreeBSD only)                               |
+| --with-ncurses | --without-ncurses   | Output the data to the terminal using the ncurses library, can be colorized                |
+| --with-perl    | --without-perl      | Extend pinkybar with your own crafted scripts written in perl                              |
+| --with-lua     | --without-lua       | Extend pinkybar with your own crafted scripts written in lua                               |
+| --with-ruby    | --without-ruby      | Extend pinkybar with your own crafted scripts written in ruby                              |
+| --with-python2  | --without-python2  | Extend pinkybar with your own crafted scripts written in python2                           |
+| --with-python3  | --without-python3  | Extend pinkybar with your own crafted scripts written in python3                           |
+| --with-weather | --without-weather   | The temperature outside  (some details must be provided)                                   |
+| api\_key='123458976'               | | API key obtained after registering yourself in the weather website, must be combined **--with-weather**  |
+| --with-smartemp | --without-smartemp   | Read the drive temperature from S.M.A.R.T cross-platform available                       |
+| --with-drivetemp | --without-drivetemp   | Read the drive temperature from S.M.A.R.T (linux only) uses curl                       |
+| --with-drivetemp-light | --without-drivetemp-light   | Read the drive temperature from S.M.A.R.T (linux only) light version       |
+| drive\_port='1234'  |                | Different TCP port to listen to for the drive temperature, default one is 7634, must be combined **--with-drivetemp** or **--with-drivetemp-light**   |
+| --with-colours | --without-colours   | Colorize the output data.                                                                  |
+| icons=/tmp     |                     | xbm icons that can be used by dzen2 for example. Discarded when **--with-x11** is used     |
+| --with-mpd     | --without-mpd       | To see the currently played song name (if any).                                            |
+| --prefix=/tmp  |                     | The directory where the program will be installed                                          |
+| mobo\_sensor='dev.aibs.0'  |         | FreeBSD motherboard sensor module name to use in the sysctl calls. Read the FreeBSD installation below  |
+| cpu\_sensor='dev.cpu.0.temperature' |  | FreeBSD cpu temperature module name to use in the sysctl calls . Read the FreeBSD installation below  |
+
+By default, if **no** options are passed, the program will be compiled with:
+
+```bash
+--with-net --with-pci
+```
+
+Affects only FreeBSD users with laptops, **--without-apm** will compile the program with acpi support to obtain the current battery life.
+
+**--without-mpd** will compile the program with cmus support, the options syntax stays as is.
+
+The pci and sensors configure options will be discarded in \*BSD.
+
+Affects only linux users with wifi/wireless chipsets, run `lsmod|grep 802` and see whether your chipset uses cfg80211/mac80211. If that's so you can rely on libnl and enable **--with-libnl** configure options, otherwise your chipset probably still uses we/wext, so type **--without-libnl**.
+
+Affects only linux users, **--with-drivetemp** pretty much locks you down to hddtemp. You can adjust **extra/scripts/drive-temperature.sh** and compile the program **--with-smartemp**, so you can switch between hddtemp and smartmontools at any time without the need recompile pinkybar with different options. **--with-smartemp** only cares for the existance of /tmp/pinkytemp file.
+
+**--with-weather** is using [this url](http://openweathermap.org/current), register yourself there, create a new [API key](https://home.openweathermap.org/api\_keys).
+
+Don't just rush to register yourself, read carefully what the "Free" account limits are and take in account how often the program should call their api service. I'm not responsible if you exceeded the limits, you've been warned.
+
+```bash
+# Make sure it's working first
+# curl 'http://api.openweathermap.org/data/2.5/weather?q=London,uk&units=metric&APPID=28459ae16e4b3a7e5628ff21f4907b6f'
+
+# what to pass to configure
+--with-weather api_key='28459ae16e4b3a7e5628ff21f4907b6f'
+```
+
+---
+
+## Installation for dwm
+
+```bash
+perl set.pl "distro"
+autoreconf --install --force
+
+./configure --prefix=$HOME/.cache --with-x11
+make
+make install
+```
+
+Copy the code from extra/scripts/dwm.sh or `exec` it from **xinitrc** or the script used to start dwm.
+
+## Installation for xmonad (or other WM)
+
+```bash
+# Copy the xbm icons
+mkdir -p --mode=700 $HOME/.xmonad/icons
+cp -r extra/xbm_icons/*.xbm $HOME/.xmonad/icons
+
+perl set.pl "distro"
+autoreconf --install --force
+
+# disable X11, point the location to the icons
+./configure --prefix=$HOME/.cache --without-x11 icons=$HOME/.xmonad/icons
+
+# compile 'n install
+make
+make install
+```
+
+Copy the code from extra/scripts/xmonad.sh or `exec` it from **xinitrc** or the script used to start xmonad.
+
+## Installation in FreeBSD
+
+FreeBSD has no other way than using the module specific convention to query sysctl and obtain data from the sensors. Maintaining a list with all the possible module names and performing expensive sysctl calls in a loop to determine that X module is loaded into your system is no-go. Be prepared to spend a minute or two to find out some system information.
+
+Determine the motherboard sensor module name.
+
+```bash
+sysctl -a|grep 'aibs'
+
+dev.aibs.0.volt.0: 1356 850 1600
+dev.aibs.0.volt.1: 3344 2970 3630
+dev.aibs.0.volt.2: 5040 4500 5500
+dev.aibs.0.volt.3: 12278 10200 13800
+dev.aibs.0.temp.0: 39.0C 60.0C 95.0C
+dev.aibs.0.temp.1: 38.0C 45.0C 75.0C
+dev.aibs.0.fan.0: 1053 600 7200
+dev.aibs.0.fan.1: 1053 600 7200
+```
+
+Copy only 'dev.MODULE.NUMBER' (if there is any number at all) and paste it into the **mobo\_sensor** option below.
+
+Do the same for your cpu temperature, copy and paste the variable as is. **dev.cpu.0.temperature** below is provied as example.
+
+```bash
+perl set.pl "freebsd"
+autoreconf --install --force
+
+./configure --prefix=$HOME/.cache --with-x11 --without-alsa --with-oss mobo_sensor='dev.aibs.0' cpu_sensor='dev.cpu.0.temperature'
+make
+make install
+```
+
+Send a request to the FreeBSD mailing list and request the OpenBSD sensors API to be ported.
+
+## Installation in OpenBSD
+
+Before proceeding, you'll have to:
+
+```bash
+# To detect the newer compiler that you are
+# about to install
+sed -i 's/#AC_PROG_CC(/AC_PROG_CC(/g' configure.ac
+
+ls /usr/local/bin/automake-*
+ls /usr/local/bin/autoconf-*
+
+# Then replace the numbers below
+export AUTOCONF_VERSION=2.69
+export AUTOMAKE_VERSION=1.15
+
+# Your call, gcc or llvm ?
+pkg_add gcc
+
+# after that:
+perl set.pl "openbsd"
+autoreconf --install --force
+
+./configure --prefix=$HOME/.cache --without-alsa --with-oss
+make
+make install
+```
+
+## pinky curses installation
+
+Step one, compile pinky-bar **--with-ncurses**, so the output to be formated in a way that pinky-curses can parse and colorize.
+
+```bash
+perl set.pl "distro"
+autoreconf --install --force
+
+# disable X11, enable the colours and ncurses opts.
+./configure --prefix=$HOME/.cache --without-x11 --with-alsa --with-colours --with-ncurses
+
+# compile 'n install
+make
+make install
+```
+
+Step two, compile and install pinky-curses - https://notabug.org/void0/pinky-curses
+
+Copy the code from extra/scripts/pinky-curses.sh
+
+## pinky urxvt
+
+What a coincidence, pinky-urxvt is my 3rd urxvt extension and 3rd member of the pinky family.
+
+The sole purpose of this urxvt extension is to make it easy for you to keep track of things that you are interested to monitor while hacking your way something in the terminal.
+
+Link - https://notabug.org/void0/pinky-urxvt
+
+![](https://notabug.org/void0/pinky-urxvt/raw/master/2.png)
+
+pinky-urxvt, and pinky-curses are not tied to pinky-bar.
+
+## Installation for anything else
+
+pinky-bar is no longer tied to Window Managers only. With the addition of "without colours", the output can be shown in any program, just bear in mind that the more options you've supplied the more system information will be shown. 
+
+The tmux status bar in action:
+
+![](img/pic4.png)
+
+The installation steps:
+
+```bash
+perl set.pl "distro"
+autoreconf --install --force
+
+./configure --prefix=$HOME/.cache --without-x11 --without-colours
+make
+make install
+```
+
+By choosing this 3rd installation method it is up to you where, how to start and use the system information that's produced by pinky-bar.
+
+---
+
+Replace **distro** with archlinux, debian, gentoo, slackware, rhel, frugalware, angstrom. Here's some short distros list of some popular distros that are based on another one:
+
+- [x] archlinux based distros: parabola, chakra, manjaro
+- [x] debian based distros: ubuntu, linux mint, trisquel, back track, kali linux, peppermint linux, solusos, crunchbang, deepin, elementary os, and the rest \*buntu based distros
+- [x] gentoo based distros: funtoo, sabayon, calculate linux
+- [x] slackware
+- [x] rhel based distros: opensuse (uses rpm), fedora, fuduntu, mandriva, mandrake, viperr, mageia
+- [x] frugalware
+- [x] angstrom
+
+Cannot list the \*BSD flavours as "distros", so they deserve own options:
+
+- [x] freebsd
+- [x] openbsd
+
+---
+
+## Using configuration file
+
+**~/.pinky** is the location of the configuration file. It uses the same short and long command line options.
+
+I do advise you to use the long options syntax.
+
+If any option depends on argument, don't put any space between the option and the argument.
+
+Use one option per line. Contrary to your shell, the "parser" won't expand ~/my\_script.pl to point to /home/sweethome/my\_script.pl
+
+```bash
+--weather=London,uk
+--coresload
+--cputemp
+--ramperc
+--driveperc
+--packages
+--kernel
+--voltage
+--fans
+--mobo
+--mobotemp
+--perl=/home/sweethome/my_script.pl
+```
+
+Execute the program without supplying any command line options and it will parse the configuration file.
+
+---
+
+## Linux Mandatory requirements
+
+* gcc/clang
+* glibc
+* autoconf
+* automake
+* m4
+* gawk
+* perl
+
+## \*BSD Mandatory requirements
+
+* gcc/clang
+* autoconf
+* automake
+* autoconf-wrapper
+* automake-wrapper
+* autoconf-archive
+* argp-standalone
+* libtool
+* m4
+* gawk
+* perl
+
+Some llvm and gcc versions will not check for headers and libraries in /usr/local, if that's the case for you, you should export the following environment variables:
+
+```bash
+export LDFLAGS='-L/usr/local/lib'
+export CFLAGS='-I/usr/local/include'
+```
+
+After editing the wrong prototype I managed to stumble upon a bug in OpenBSD's own libc.
+
+**Warning !!! OpenBSD users !!!**
+
+The majority of SCN\* macros differs from their PRI\* cousins. And I cannot guarantee the accuracy of fixed width integers when OpenBSD own libc managed to use different format specifiers. Read extra/misc/openbsd\_bugs.md for more details.
+
+## Opt-in requirements
+
+Linux camp:
+
+The internet related options rely on headers provided iproute2.
+By default the program will try to compile with those headers included.
+If for any reason you would like to compile the program without internet related options, then pass **--without-net** to configure.
+
+* iproute2
+
+wifi/wireless chipsets supporting mac80211/cfg80211:
+
+* libnl (>= 3.0)
+* pkg-config
+
+In Gentoo there are two versions of pkg-config. The first one is named dev-util/pkgconfig and the second one is dev-ruby/pkg-config. In order to use the first one, you'll have to export the pkg-config path to the following environment variable:
+
+```bash
+export PKG_CONFIG_PATH=/usr/bin/pkg-config
+```
+
+Then pass **--with-libnl** to configure.
+
+To get the NIC vendor and model names:
+
+* pciutils
+
+Alternative way to obtain data from the sensors:
+
+* lm\_sensors
+
+To read the drive temperature from S.M.A.R.T **--with-drivetemp**:
+
+* hddtemp
+* curl
+
+To read the drive temperature from S.M.A.R.T **--with-drivetemp-light**:
+
+* hddtemp
+
+The "light" version does not rely on curl, and will not force -O0 CFLAGS.
+
+```bash
+# --with-drivetemp-light
+0.00s user 0.00s system 15% cpu 0.006
+
+# --with-drivetemp
+0.01s user 0.00s system 72% cpu 0.008
+```
+
+Try running hddtemp to see if it detects your drive, depending if it has temperature sensor in first place:
+
+```bash
+sudo hddtemp /dev/sda
+
+WARNING: Drive /dev/sda doesn't appear in the database of supported drives
+WARNING: But using a common value, it reports something.
+WARNING: Note that the temperature shown could be wrong.
+WARNING: See --help, --debug and --drivebase options.
+WARNING: And don't forget you can add your drive to hddtemp.db
+/dev/sda: Corsair Force GT:  23°C or °F
+```
+
+The message is pretty clear "don't forget to add your drive to hddtemp.db", first run the debug command to see which field is responsible to report your drive temperature, it should be in the range of 190 - 200:
+
+```bash
+# Copy the Model: line
+
+sudo hddtemp --debug /dev/sda
+
+================= hddtemp 0.3-beta15 ==================
+Model: Corsair Force GT
+
+field(1)         = 0
+field(5)         = 0
+field(9)         = 253
+field(12)        = 237
+field(171)       = 0
+field(172)       = 0
+field(174)       = 147
+field(177)       = 1
+field(181)       = 0
+field(182)       = 0
+field(187)       = 0
+field(194)       = 22
+field(195)       = 0
+field(196)       = 0
+field(201)       = 0
+field(204)       = 0
+field(230)       = 100
+field(231)       = 0
+field(233)       = 130
+field(234)       = 216
+field(241)       = 216
+field(242)       = 151
+```
+
+Open up **/usr/share/hddtemp/hddtemp.db** and append the Model: line that you copied earlier with the correct field that reports your drive temperature.
+
+```bash
+"Corsair Force GT" 194 C "Corsair Force GT 120GB SSD"
+```
+
+Next run hddtemp in daemon mode so we can request the temperature back:
+
+```bash
+sudo hddtemp -d /dev/sda
+```
+
+Open up your browser and navigate to 127.0.0.1:7634 and you'll get instant temperature report back to you.
+
+The "init" lock-in for those of you that cannot choose between udev or eudev puts me in position not rely on libatasmart, regardless how neat the library is. There is stripped example program in extra/misc/skdump.c if you are curious to check and test libatasmart.
+
+Linux camp end.
+
+To read the drive temperature from S.M.A.R.T **--with-smartemp**:
+
+* smartmontools
+
+smartmontools are not mandatory in OpenBSD, `atactl` does the same job.
+
+Execute the following command as root `visudo` and append:
+
+```bash
+# 'frost' is my computer username
+frost ALL=NOPASSWD:/usr/sbin/smartctl
+```
+
+Copy the code from extra/scripts/drive-temperature.sh or `exec` it from **xinitrc** or the script used to start your DE/WM.
+
+To extend pinkybar with your own crafted perl/python/ruby/lua script:
+
+* perl
+* python == 2.7 (--with-python2)
+* python >= 3.3 (--with-python3)
+* lua >= 5.1
+* ruby >= 2.0 and pkg-config
+
+Have a look at extra/scripts/pinky.{py,pl,ruby,lua}, they serve as examples how to write the most basic scripts in order to extend pinkybar in python/perl/ruby/lua. You can use the 3 languages simultaneously.
+
+Please, please do **NOT** export or set PYTHONPATH on it's own line.
+
+`WRONG`:
+
+```bash
+export PYTHONPATH=/meh
+pinkybar --python my_script
+```
+
+`WRONG`:
+
+```bash
+PYTHONPATH=/meh
+pinkybar --python my_script
+```
+
+Correct PYTHONPATH usage:
+
+```bash
+# ~/chewbacca is the path where pinky.py resides
+# ~/chewbacca/pinky.py
+
+# python2
+PYTHONPATH=~/chewbacca ~/pinkybar --python pinky
+
+# python3
+# executed only once
+fuNky=$(python3 -c 'import sys;print(":".join([x for x in sys.path]))')
+
+# executed in a loop
+PYTHONPATH=$fuNky:~/chewbacca ~/pinkybar --python pinky
+```
+
+**--with-perl**:
+
+```bash
+~/pinkybar --perl ~/chewbacca/pinky.pl
+```
+
+**--with-ruby**:
+
+```bash
+~/pinkybar --ruby ~/chewbacca/pinky.rb
+```
+
+**--with-lua**:
+
+Non byte-compiled script:
+
+```bash
+~/pinkybar --lua ~/chewbacca/pinky.lua
+```
+
+Once done editing your script, you can byte-compile it:
+
+```bash
+luac -o pinky.luac pinky.lua
+~/pinkybar --lua ~/chewbacca/pinky.luac # <-- .luac and not .lua
+```
+
+To get the sound volume level:
+
+* alsa-utils
+* alsa-lib
+
+Then pass **--with-alsa** to configure.
+
+\*BSD users can use the baked OSS instead, pass **--without-alsa --with-oss** to configure instead.
+
+To output the data to the terminal using the ncurses library:
+
+* ncurses
+
+To get the vendor and model name of your cdrom/dvdrom/blu-ray:
+
+* libcdio
+* libcddb
+
+In linux **--without-dvd** will still compile the program with dvd support. Except it will be limited only to dvd support, it will try to parse the sr0 vendor and model name detected by the kernel.
+
+The weather related options, please go back and read **Don't just rush to register yourself**:
+
+* curl
+* gzip
+
+**Warning, I'm not responsible for any lawsuit towards you, neither encourage you to pirate content that is not licensed as free and/or for fair use.**
+
+To see the currently played song name **--with-mpd**:
+
+  Server side:
+
+  * mpd (can be build with soundcloud support)
+
+  Client side:
+
+  * libmpdclient
+  * mpc/ncmpc/ncmpcpp, [and the rest](http://mpd.wikia.com/wiki/Clients)
+
+To see the currently played song name **--without-mpd**:
+
+* cmus
+
+The "soundcloud" alternative that is supported in cmus and your mpd client will be to download **.m3u/.pls** files according to the [radio stream station](https://www.internet-radio.com) that you are interested to listen.
+
+The FreeBSD users will notice that "mpd" is named "musicpd".
+
+If you've never used mpd before copy the example configuration from extra/mpd according to your OS.
+
+Keep an eye on the **log file size** if you are using raspberry pi (or equivalent device) that streams the music, make sure that it's deleted automatically if it exceeds some pre-defined size.
+
+---
+
+## WM specific requirements
+
+If you would like the output to be shown in your Window Manager, those are the following requirements:
+
+for non-dwm WM:
+
+* dzen2
+
+for dwm:
+
+* libx11
+* xorg-server
+
+use **--without-colours** to skip the following step:
+
+* dwm compiled with statuscolor patch. The colours in use are specified in your dwm config.h
+
+## Wish list
+
+It would be great if I had \*BSD compatible usb wifi dongle or wireless pci adapter to add wifi options in pinky-bar.

+ 54 - 0
configure.ac

@@ -0,0 +1,54 @@
+# This file is processed by autoconf to create a configure script
+AC_INIT([pinkybar], [1.0.0])
+AC_CONFIG_AUX_DIR([temp_dir])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_HEADERS([src/config.h])
+# -Werror -Wportability
+AM_INIT_AUTOMAKE([1.13 -Wall no-define foreign subdir-objects dist-xz no-dist-gzip std-options])
+
+AM_SILENT_RULES([yes])
+{perl will replace this line}
+
+# With the addition of more runtime compile and
+# link tests, this option is no longer necessary.
+# Any compiler and C library succeeding to pass the
+# tests will be able to compile and run the
+# program flawlessly.
+# If you use OpenBSD uncomment the AC_PROG_CC([])
+# line below. Make sure that you have the latest gcc/llvm
+# AC_PROG_CC([egcc clang llvm-gcc gcc])
+
+AC_PROG_CC_C99
+AC_C_CONST
+AC_HEADER_STDC
+AM_PROG_CC_C_O
+
+# AM_EXTRA_RECURSIVE_TARGETS([ncurses])
+
+# The linker flags tests in m4 dir
+TEST_SOME_FUNCS
+TEST_NET
+TEST_PCI
+TEST_X11
+TEST_ALSA
+TEST_MPD
+TEST_DVD
+TEST_SENSORS
+TEST_TYPEZ
+TEST_WEATHER
+TEST_PERL
+TEST_PYTHON
+TEST_LUA
+TEST_RUBY
+TEST_CFLAGZ
+
+AC_CONFIG_FILES([
+  Makefile
+  src/Makefile
+])
+
+AC_OUTPUT
+
+echo
+echo 'Now type \"make\" and \"make install\" afterwards'
+echo

+ 33 - 0
doc/Makefile

@@ -0,0 +1,33 @@
+# 10/29/2016
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+define pandora_snap
+	-sed -e '15r ../README.md' 'man_template.pdc' | \
+		sed -e '15,50d' | pandoc -s -S $(1) - -o pinkybar.$(2)
+endef
+
+man:
+	$(call pandora_snap,-f markdown -t man,1)
+
+info: pinkybar.info
+
+pinkybar.info:
+	$(call pandora_snap, ,texi)
+	-sed -i '2i @setfilename pinkybar.info' pinkybar.texi
+	$(MAKEINFO) --no-validate --no-warn --force pinkybar.texi
+
+.PHONY: man info pinkybar.info

+ 9 - 0
doc/README.md

@@ -0,0 +1,9 @@
+To re-create the man page and info document you'll have to install the whole pandoc suite, texinfo, gmake, gsed (replace sed with gsed on \*BSD), then invoke:
+
+```bash
+make man info
+```
+
+---
+
+Open up Makefile and delete the PHONY line. Execute `touch man`, followed by `make man`, bring back the PHONY line and execute `make man`.

+ 23 - 0
doc/man_template.pdc

@@ -0,0 +1,23 @@
+% pinkybar(1) manual
+% Aaron Caffrey
+% Oktoberfest 23, 2016
+
+# NAME
+This man page is converted from markdown, and some information might not look good and/or have been stripped during the automated process.
+
+# SYNOPSIS
+pinkybar [*option*]
+
+# DESCRIPTION
+
+
+
+
+
+
+# REPORTING BUGS
+Report bugs to https://gitlab.com/void0/pinky-bar
+
+# COPYRIGHT
+Copyright (c) 2016 Aaron Caffrey \
+Free use of this software is granted under the terms of the GNU General Public License (GPL).

File diff suppressed because it is too large
+ 1490 - 0
doc/pinkybar.1


File diff suppressed because it is too large
+ 1314 - 0
doc/pinkybar.texi


+ 53 - 0
extra/FreeBSD/Makefile

@@ -0,0 +1,53 @@
+# Created by: Aaron Caffrey
+# $FreeBSD$
+
+PORTNAME=                    pinky-bar
+PORTVERSION=                 1.0.0
+CATEGORIES=                  sysutils
+
+MAINTAINER=                  wifiextender@null.horse
+COMMENT=                     Gather some system information
+
+USE_GITHUB=                  yes
+GH_ACCOUNT=                  wifiextender
+GH_PROJECT=                  pinky-bar
+GH_TAGNAME=                  4252f74
+
+GNU_CONFIGURE=               yes
+USE_XORG+=                   x11
+LDFLAGS+=                    -L${LOCALBASE}/lib
+CFLAGS+=                     -I${LOCALBASE}/include
+CONFIGURE_ARGS=              --without-pci --without-sensors
+CONFIGURE_ARGS+=             --prefix=/usr/local icons=/usr/local/share/icons/xbm_icons
+LIB_DEPENDS=                 libargp.so:devel/argp-standalone
+BUILD_DEPENDS=               git:devel/git tar:archivers/gtar gzip:archivers/gzip
+BUILD_DEPENDS+=              gm4:devel/m4 libtool:devel/libtool autoconf:devel/autoconf 
+BUILD_DEPENDS+=              automake:devel/automake bash:shells/bash
+
+OPTIONS_DEFINE=              X11 ALSA OSS NET DVD MPD COLOURS NCURSES
+OPTIONS_DEFAULT=             OSS
+X11_CONFIGURE_WITH=          x11 
+ALSA_CONFIGURE_WITH=         alsa  
+OSS_CONFIGURE_WITH=          oss
+NET_CONFIGURE_WITH=          net
+DVD_CONFIGURE_WITH=          dvd
+MPD_CONFIGURE_WITH=          mpd
+NCURSES_CONFIGURE_WITH=      ncurses
+COLOURS_CONFIGURE_WITH=      colours
+
+X11_DESC=                    Enable it if you are using dwm
+ALSA_DESC=                   To get the sound volume level  
+OSS_DESC=                    The default way to get the sound volume level
+NET_DESC=                    Enable the internet related options
+DVD_DESC=                    To get the cdrom/dvdrom vendor and model names
+MPD_DESC=                    To see the currently played song name
+NCURSES_DESC=                Output the data to the terminal using ncurses
+COLOURS_DESC=                Colorize the output data
+
+X11_LIB_DEPENDS=             libX11.so:x11/xorg
+ALSA_LIB_DEPENDS=            libasound.so:audio/alsa-lib
+DVD_LIB_DEPENDS=             libcdio.so:sysutils/libcdio libcddb.so:audio/libcddb
+NCURSES_LIB_DEPENDS=         libncurses.so:devel/ncurses
+MPD_LIB_DEPENDS=             libmpdclient.so:audio/libmpdclient
+
+.include <bsd.port.mk>

+ 1 - 0
extra/FreeBSD/pkg-descr

@@ -0,0 +1 @@
+Gather some system information and show it in this statusbar program, not tied to any Window Manager, terminal multiplexer, etc.

+ 29 - 0
extra/FreeBSD/scripts/post-extract

@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+# Copyright 08/26/2016 
+# Aaron Caffrey https://github.com/wifiextender
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+cd work/pinky-bar-*
+
+chmod +x bootstrap
+./bootstrap freebsd
+
+mkdir -p -m 755 '/usr/local/share/icons/xbm_icons'
+install -D -m644 xbm_icons/* '/usr/local/share/icons/xbm_icons'
+
+cd ../..

+ 21 - 0
extra/FreeBSD/scripts/post-fetch

@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+
+# Copyright 08/26/2016 
+# Aaron Caffrey https://github.com/wifiextender
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+make makesum

+ 26 - 0
extra/FreeBSD/scripts/post-install

@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+
+# Copyright 08/26/2016 
+# Aaron Caffrey https://github.com/wifiextender
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+echo
+echo
+echo 'Please read the README'
+echo 'https://github.com/wifiextender/pinky-bar/blob/master/README.md'
+echo
+echo

+ 62 - 0
extra/Gentoo/app-admin/pinky-curses/pinky-curses-9999.ebuild

@@ -0,0 +1,62 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+EGIT_REPO_URI="https://gitlab.com/void0/pinky-bar.git"
+
+inherit git-r3
+
+DESCRIPTION="Standalone statusbar program utilizing ncurses"
+HOMEPAGE="https://gitlab.com/void0/pinky-bar"
+
+LICENSE="GPL-2"
+SLOT="0"
+
+DEPEND="
+	sys-devel/m4
+	sys-apps/gawk
+	sys-devel/autoconf
+	>=sys-devel/automake-1.14.1
+"
+RDEPEND="
+	sys-libs/ncurses
+"
+
+src_prepare() {
+	default
+
+	einfo 'Generating Makefiles'
+	chmod +x bootstrap
+	./bootstrap 'gentoo'
+}
+
+src_configure() {
+	econf \
+		--without-alsa \
+		--without-x11 \
+		--without-mpd \
+		--without-net \
+		--without-pci \
+		--without-dvd \
+		--without-sensors \
+		--without-weather \
+		--with-ncurses \
+		--with-colours
+}
+
+src_compile() {
+	emake 'ncurses'
+}
+
+src_install() {
+	newbin "${S}"/src/ncurses pinky-curses
+}
+
+pkg_postinst() {
+	einfo 'The program is not tied to pinky-bar. Heres some short introduction:'
+	einfo 'Depending whether you enabled the colours: ^B - Blue , ^M - Magenta , ^Y - Yellow'
+	einfo 'And here is the complete usage, copy and paste ready. Press CTRL + C to stop the program.'
+	einfo 'while true; do echo "^BOh ^Mhello ^Ydear";sleep 1;done | /usr/bin/pinky-curses'
+}

+ 29 - 0
extra/Gentoo/app-admin/pinky/metadata.xml

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="project">
+		<email>office@gentoo.org</email>
+		<name>Gentoo Office project</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="gitlab">pinky-bar</remote-id>
+	</upstream>
+	<use>
+		<flag name="x11">Enable it if you are using dwm.</flag>
+		<flag name="alsa">To get the sound volume level.</flag>
+		<flag name="net">Enable the internet related options</flag>
+		<flag name="libnl">Enable the wifi related options regarding chipsets supporting the cfg80211,mac80211 modules</flag>
+		<flag name="pci">To get the NIC vendor and model names</flag>
+		<flag name="dvd">To get the cdrom dvdrom vendor and model names</flag>
+		<flag name="sensors">Alternative way to obtain data from the sensors</flag>
+		<flag name="ncurses">Output the data to the terminal using the ncurses library</flag>
+		<flag name="colours">Colorize the output data</flag>
+		<flag name="weather">The temperature outside</flag>
+		<flag name="mpd">To see the currently played song name</flag>
+		<flag name="drivetemp">Read the drive temperature from S.M.A.R.T</flag>
+		<flag name="drivetemp-light">Read the drive temperature from S.M.A.R.T light version</flag>
+		<flag name="smartemp">Read the drive temperature from S.M.A.R.T</flag>
+		<flag name="perl">Extend pinkybar with your own crafted scripts written in perl, stored in /usr/share/pinkysc/pinky.pl</flag>
+		<flag name="python2">Extend pinkybar with your own crafted scripts written in python, stored in /usr/share/pinkysc/pinky.py</flag>
+	</use>
+</pkgmetadata>

+ 123 - 0
extra/Gentoo/app-admin/pinky/pinky-bar-9999.ebuild

@@ -0,0 +1,123 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+EGIT_REPO_URI="https://gitlab.com/void0/pinky-bar.git"
+
+inherit git-r3
+
+DESCRIPTION="Gather some system information and show it in this statusbar program"
+HOMEPAGE="https://gitlab.com/void0/pinky-bar"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="x11 alsa +net libnl +pci dvd sensors ncurses colours weather mpd drivetemp drivetemp-light smartemp perl python2"
+
+DEPEND="
+	sys-devel/m4
+	sys-apps/gawk
+	sys-devel/autoconf
+	>=sys-devel/automake-1.14.1
+"
+RDEPEND="
+	alsa? ( media-libs/alsa-lib )
+	x11? ( x11-libs/libX11 )
+	net? ( sys-apps/iproute2 )
+	libnl? ( >=dev-libs/libnl-3.2.27 dev-util/pkgconfig )
+	pci? ( sys-apps/pciutils )
+	dvd? ( dev-libs/libcdio )
+	sensors? ( sys-apps/lm_sensors )
+	ncurses? ( sys-libs/ncurses )
+	weather? ( net-misc/curl app-arch/gzip )
+	mpd? ( media-sound/mpd media-libs/libmpdclient )
+	drivetemp? ( net-misc/curl app-admin/hddtemp )
+	drivetemp-light? ( app-admin/hddtemp )
+	smartemp? ( sys-apps/smartmontools )
+	python2? ( dev-lang/python:2.7= )
+"
+REQUIRED_USE="
+	x11? ( !ncurses )
+	ncurses? ( !x11 )
+	drivetemp? ( !smartemp )
+	drivetemp-light? ( !smartemp )
+	smartemp? ( !drivetemp !drivetemp-light )
+"
+
+pkg_setup() {
+	if use weather
+	then
+		einfo 'Currently, the weather USE flag will default to London,uk'
+		einfo 'To specify other country and town youll have to supply them as variable.'
+		einfo 'Here is how: # TWN="London,uk" USE="weather" emerge -a ...'
+	fi
+}
+
+src_prepare() {
+	default
+
+	einfo 'Generating Makefiles'
+	chmod +x bootstrap
+	./bootstrap 'gentoo'
+}
+
+src_configure() {
+	export PKG_CONFIG_PATH=/usr/bin/pkg-config
+
+	econf \
+		$(use_with x11) \
+		$(use_with alsa) \
+		$(use_with net) \
+		$(use_with libnl) \
+		$(use_with pci) \
+		$(use_with dvd) \
+		$(use_with sensors) \
+		$(use_with ncurses) \
+		$(use_with colours) \
+		$(use_with weather) \
+		$(use_with mpd) \
+		$(use_with drivetemp) \
+		$(use_with drivetemp-light) \
+		$(use_with smartemp) \
+		$(use_with perl) \
+		$(use_with python2) \
+		perl_script='/usr/share/pinkysc/pinky.pl' \
+		python_script='/usr/share/pinkysc/pinky.py' \
+		api_town="${TWN:-London,uk}" \
+		api_key='28459ae16e4b3a7e5628ff21f4907b6f' \
+		icons='/usr/share/icons/xbm_icons'
+}
+
+src_compile() {
+	emake 'all'
+}
+
+src_install() {
+	if use colours && ! use x11 && ! use ncurses
+	then
+		insinto /usr/share/icons/xbm_icons
+		doins "${S}"/extra/xbm_icons/*
+	fi
+
+	if use perl || use python2
+	then
+		insinto /usr/share/pinkysc
+		doins "${S}"/extra/scripts/pinky.{py,pl}
+	fi
+
+	emake DESTDIR="${D}" install
+}
+
+pkg_postinst() {
+	use ncurses && \
+		einfo 'You can combine the output from this program with pinky-curses'
+
+	use perl && \
+		einfo 'The perl script resides in /usr/share/pinkysc/pinky.pl'
+
+	use python2 && \
+		einfo 'The python2 script resides in /usr/share/pinkysc/pinky.py'
+
+	einfo 'Please read the program man page'
+}

+ 90 - 0
extra/bash_zsh/_pinkybar

@@ -0,0 +1,90 @@
+#compdef pinkybar
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+# zsh completion
+# Cross-platform supported opts:
+
+_arguments -s -S -A '-*' : \
+'-M[song filename]' \
+'-W[song track name]' \
+'-x[song artists names]' \
+'-X[song title]' \
+'-y[song album name]' \
+'-Y[song date]' \
+'-c[summed up cores load]' \
+'-L[individual core load]' \
+'-T[cpu temp]' \
+'-C[max cpu clock speed]' \
+'-I[long and detailed cpu info]' \
+'-r[used ram]' \
+'-J[total ram]' \
+'-K[free ram]' \
+'-l[shared ram]' \
+'-o[buffered ram]' \
+'-s[used drive storage]' \
+'-n[total drive storage]' \
+'-N[free drive storage]' \
+'-O[available drive storage]' \
+'-g[remaining battery charge]' \
+'-z[dvdrom vendor and model names]' \
+'-S[disk I/O, requires argument: sda]' \
+'-p[num of installed packages]' \
+'-P[kern name]' \
+'-Q[network node hostname]' \
+'-R[kern release]' \
+'-u[kern version]' \
+'-k[machine arch.]' \
+'-q[combined kern name and version]' \
+'-U[uptime]' \
+'-w[average load]' \
+'-v[voltage]' \
+'-f[fans speed in RPM]' \
+'-m[mobo name and vendor]' \
+'-d[mobo temp.]' \
+'-V[sound volume level]' \
+'-t[current time]' \
+'-a[ip addr, requires argument eth0]' \
+'-b[consumed internet so far, requires argument eth0]' \
+'-i[current download and upload speeds, requires argument eth0]' \
+'-A[mac addr, requires argument eth0]' \
+'-B[subnet mask, requires argument eth0]' \
+'-D[broadcast addr, requires argument eth0]' \
+'-E[website ip lookup, requires argument eth0]'
+
+
+# Linux opts
+#
+# '-F[vendor and model name of ur drive, requires argument sda]' \
+# '-G[NIC vendor and model names, requires argument eth0]' \
+# '--nicinfo[NIC driver, requires argument eth0]' \
+# '-H[NIC version, requires argument eth0]' \
+# '-e[NIC links speed, requires argument eth0]' \
+# '-j[NIC firmware, requires argument eth0]' \
+# '-h[wifi essid, requires argument eth0]'
+
+
+# FreeBSD and OpenBSD opts
+#
+# '-j[NIC gateway addr, requires argument re0]' \
+# '-Z[used drive swap in MB]' \
+# '-F[used drive swap in percentage]' \
+# '-h[total drive swap]' \
+# '-H[available drive swap]'
+
+# OpenBSD opts
+#
+#'-l[used ram in MB]'

+ 40 - 0
extra/bash_zsh/pinkybar

@@ -0,0 +1,40 @@
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+# bash completion
+
+_pinky() {
+  local cur
+  COMPREPLY=()
+  cur="${COMP_WORDS[COMP_CWORD]}"
+
+  opts1='-a -b -c -d -e -f -g -h -i -j -k -l -m -n -o -p -q -r -s -t -u -v -w -x -y -z'
+  opts2='-A -B -C -D -E -F -G -H -I -J -K -L -M -N -O -P -Q -R -S -T -U -V -W -X -Y -Z'
+  opts3='--mpd --mpdtrack --mpdartist --mpdalbum --cpu --coresload --cputemp --cpuspeed'
+  opts3+='--cpuinfo --ramperc --ramtotal --ramfree --ramshared --rambuffer --driveperc'
+  opts3+='--drivetemp --drivetotal --drivefree --driveavail --battery --dvdstr --statio'
+  opts3+='--packages --kernsys --kernode --kernrel --kernver --kernarch --kern --perl'
+  opts3+='--python --weather --uptime --loadavg --voltage --fans --mobo --mobotemp --time'
+  opts3+='--ipaddr --bandwidth --iface --ipmac --ipmask --ipcase --iplookup --drivemodel'
+  opts3+='--nicinfo --nicdrv --nicver --iplink --nicfw --wifiname'
+
+  case "$cur" in
+    -*) COMPREPLY=( $(compgen -W "${opts1} ${opts2} ${opts3}" -- "${cur}") )
+      ;;
+  esac
+
+  return 0
+}
+complete -F _pinky -o filenames pinkybar

+ 87 - 0
extra/deprecated/Makefile.skel

@@ -0,0 +1,87 @@
+# 10/29/2016
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+# The GNU/Make use in here is to
+# the cover our back and do most of
+# the heavy lifting for us.
+# When dealing with different operating
+# systems the things get pretty ugly quickly.
+# I did learned my lesson with the previous bash
+# bootstrap script, including the difference
+# between BSD and GNU sed versions.
+
+
+define stay_portable
+	$(shell perl -Mstrict -Mwarnings -e $(1))
+endef
+
+define stay_portable2
+	$(shell perl -Mstrict -Mwarnings -pi -e $(1) $(2))
+endef
+
+define reflace
+	$(call stay_portable2,'if ($$. == 10) {$$_="";print "$(1)\n";}',$(2))
+endef
+
+define reflace2
+	$(call stay_portable2,'s|$(1)|$(2)|;',$(3))
+endef
+
+define reflace3
+	$(call stay_portable2,'s|$(1)|$(2)|;s|$(3)|$(4)|;',$(5))
+endef
+
+
+BSDCF := -D_DEFAULT_SOURCE -L/usr/local/lib
+POSIXCF := -D_POSIX_C_SOURCE=200112L
+BSDLIBS :=
+AMCF :=
+SRCTOAPPEND :=
+OSENTERED := $(strip $(call stay_portable,'print uc "${ARG1}";'))
+DEFTITS := m4_define\(\[OSENTERED\], \[$(OSENTERED)\]\)
+
+
+# make ARG1=bar logic
+ifeq ($(findstring FREE,$(OSENTERED)),FREE)
+	BSDLIBS += -largp -ldevstat
+	AMCF += $(BSDCF)
+	DEFTITS += m4_define\(\[FREEBZD\], \[tits\]\)
+	SRCTOAPPEND += freebsd_functions.c include/freebzd.h
+
+else
+	ifeq ($(findstring OPEN,$(OSENTERED)),OPEN)
+		BSDLIBS += -largp -lossaudio
+		AMCF += $(BSDCF)
+		DEFTITS += m4_define\(\[OPENBZD\], \[forSure\]\)
+		SRCTOAPPEND += openbsd_functions.c include/openbzd.h
+
+	else
+		AMCF += $(POSIXCF)
+		DEFTITS += m4_define\(\[LINUKS\], \[cryMeAriver\]\)
+		SRCTOAPPEND += linux_functions.c
+
+	endif
+endif
+
+
+all:
+	$(call reflace,$(DEFTITS),configure.ac)
+	$(call reflace3,{amCF},$(AMCF),{srcFiles},$(SRCTOAPPEND),src/Makefile.am)
+	$(call reflace2,{bzdlibs},$(BSDLIBS),src/Makefile.am)
+	# ...
+
+.PHONY: all

+ 5 - 0
extra/deprecated/README.md

@@ -0,0 +1,5 @@
+The bash bootstrip script served well until I ported pinky-bar to \*BSD, as I had to make bash as dependency.
+
+Second attemp was with GNU make and sed, and the difference between GNU and BSD sed version made me to pull out my hair. So I re-wrote the sed macros to use perl instead.
+
+The third and last attemp - deprecate GNU make, and use only perl. Since it high-level language it will be portable across different operating systems, and the bonus is that perl will be most likely installed out of the box.

+ 262 - 0
extra/deprecated/bootstrap

@@ -0,0 +1,262 @@
+#!/usr/bin/env bash
+
+# 07/06/2015, 07/18/2016 
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+declare -a _bases=(
+  'archlinux'
+  'debian'
+  'gentoo'
+  'slackware'
+  'rhel'
+  'frugalware'
+  'angstrom'
+  'freebsd'
+  'openbsd'
+)
+
+_printf_err() {
+  printf '%s\n' "try again with: bash ${0} basedistro"
+  printf '%s ' "Bases: ${_bases[@]}"
+  printf '\n'
+}
+
+_gen_files() {
+  progName='pinkybar'
+  progVer='1.0.0'
+  bsdLibs=''
+  osEntered="${1,,}"
+  bsdCF='-D_DEFAULT_SOURCE -L/usr/local/lib'
+  posixCF='-D_POSIX_C_SOURCE=200112L'
+  declare -a srcToAppend configure_ac main_makefile
+  declare -a src_makefile src_libs_to_add src_files
+
+  case "${osEntered}" in
+    freebsd)
+        bsdLibs='-largp -ldevstat'
+        amCF="${bsdCF}"
+        defTits='m4_define([FREEBZD], [tits])'
+        srcToAppend=(
+          'freebsd_functions.c'
+          'include/freebzd.h'
+        )
+      ;;
+    openbsd)
+        bsdLibs='-largp -lossaudio'
+        amCF="${bsdCF}"
+        defTits='m4_define([OPENBZD], [forSure])'
+        srcToAppend=(
+          'openbsd_functions.c'
+          'include/openbzd.h'
+        )
+      ;;
+    *)
+        amCF="${posixCF}"
+        defTits='m4_define([LINUKS], [cryMeAriver])'
+        srcToAppend=(
+          'linux_functions.c'
+        )
+      ;;
+  esac
+
+
+  # to strip get_packs() at compile time,
+  # also instead using more hard-coded macros
+  # let the shell enumerate them for us
+  declare -a enumDistros=()
+  for x in {0..8}
+  do
+    enumDistros[${x}]="AC_DEFINE_UNQUOTED([${_bases[${x}]^^}],[${x}],[trololo enum generator])"
+
+    [[ "${osEntered}" == "${_bases[${x}]}" ]] && {
+      distroNum="AC_DEFINE_UNQUOTED([DISTRO],[${x}],[da monster])"
+    }
+  done
+
+  # configure.ac
+  configure_ac=("# This file is processed by autoconf to create a configure script
+  AC_INIT(["${progName}"], ["${progVer}"])
+  AC_CONFIG_AUX_DIR([temp_dir])
+  AC_CONFIG_MACRO_DIR([m4])
+  AC_CONFIG_HEADERS([src/config.h])
+  # -Werror -Wportability
+  AM_INIT_AUTOMAKE([1.13 -Wall no-define foreign subdir-objects dist-xz no-dist-gzip std-options])
+
+  AM_SILENT_RULES([yes])
+  "${defTits}"
+
+  # With the addition of more runtime compile and
+  # link tests, this option is no longer necessary.
+  # Any compiler and C library succeeding to pass the
+  # tests will be able to compile and run the
+  # program flawlessly.
+  # If you use OpenBSD uncomment the AC_PROG_CC([])
+  # line below. Make sure that you have the latest gcc/llvm
+  # AC_PROG_CC([egcc clang llvm-gcc gcc])
+
+  AC_PROG_CC_C99
+  AC_C_CONST
+  AC_HEADER_STDC
+  AM_PROG_CC_C_O
+
+  # AM_EXTRA_RECURSIVE_TARGETS([ncurses])
+
+  # The linker flags tests in m4 dir
+  TEST_SOME_FUNCS
+  TEST_NET
+  TEST_PCI
+  TEST_X11
+  TEST_ALSA
+  TEST_MPD
+  TEST_DVD
+  TEST_SENSORS
+  TEST_TYPEZ
+  TEST_WEATHER
+  TEST_PERL
+  TEST_PYTHON
+  TEST_CFLAGZ
+
+  # Definitions
+  "${distroNum}"
+  "${enumDistros[@]}"
+
+  AC_CONFIG_FILES([
+    Makefile
+    src/Makefile
+  ])
+
+  AC_OUTPUT
+
+  echo
+  echo 'Now type \"make\" and \"make install\" afterwards'
+  echo")
+
+
+  # Makefile.am
+  main_makefile=('
+    SUBDIRS = src
+
+    dist_man_MANS = doc/pinkybar.1
+
+    # Optional, create and install
+    # the pinkybar info document
+    # info_TEXINFOS = doc/pinkybar.texi
+    # MAKEINFOFLAGS = --no-validate --no-warn --force
+
+    # To satisfy make dist
+    EXTRA_DIST =      \
+      src/ncurses.c   \
+      bootstrap       \
+      README.md       \
+      .gitignore      \
+      m4              \
+      doc             \
+      extra
+
+# using 1 tab
+ncurses:
+	@cd src && $(MAKE) ncurses
+
+man:
+	@cd doc && $(MAKE) man
+
+info:
+	@cd doc && $(MAKE) info
+  ')
+
+
+  # src/Makefile.am
+  src_files=(
+    'main.c'
+    'cpu.c'
+    'common.c'
+    'sound.c'
+    'options.c'
+    'net.c'
+    'weather.c'
+    'smart.c'
+    'perl.c'
+    'python.c'
+
+    'prototypes/cpu.h'
+    'prototypes/common.h'
+    'prototypes/sound.h'
+    'prototypes/net.h'
+    'prototypes/functions.h'
+    'prototypes/options.h'
+    'prototypes/weather.h'
+    'prototypes/smart.h'
+    'prototypes/perl.h'
+    'prototypes/python.h'
+
+    'include/headers.h'
+    'include/options_constants.h'
+    'include/functions_constants.h'
+    'include/non_x11_colours.h'
+    'include/x11_colours.h'
+    'include/options_generator.h'
+
+    "${srcToAppend[@]}"
+  )
+
+  # The syntax is autotools specific
+  src_libs_to_add=(
+    '$(X_LIBS) $(ALSA_LIBS)'
+    '$(MPD_LIBS) $(PCI_LIBS)'
+    '$(DVD_LIBS) $(SENSORS_LIBS)'
+    '$(CURL_LIBS) $(LIBNL_LZ)'
+    '$(PERL_LZ) $(PYTHON_LZ)'
+  )
+
+  # Do not pass more definitions to AM_CFLAGS
+  # Think of the line limit
+  src_makefile=('AM_CFLAGS = '${amCF}' \
+    -I/usr/local/include $(LIBNL_CF) $(PERL_CF) $(PYTHON_CF)
+
+    bin_PROGRAMS = '${progName}'
+
+    EXTRA_PROGRAMS   = ncurses
+    ncurses_SOURCES  = ncurses.c
+    ncurses_LDADD    = -lncurses
+
+    '${progName}'_LDADD = '${src_libs_to_add[@]}' '${bsdLibs}'
+    '${progName}'_SOURCES = '${src_files[@]}'
+  ')
+
+
+  cat <<EOF > configure.ac
+${configure_ac[@]}
+EOF
+
+  cat <<EOF > Makefile.am
+${main_makefile[@]}
+EOF
+
+  cat <<EOF > src/Makefile.am
+${src_makefile[@]}
+EOF
+
+
+  # do not remove nor edit
+  autoreconf --install --force
+}
+
+
+[[ -z "${1}" ]] && _printf_err "$@" || {
+  [[ " ${_bases[@]} " =~ " ${1,,} " ]] && \
+    _gen_files "$@" || _printf_err "$@"
+}

+ 62 - 0
extra/misc/openbsd_bugs.md

@@ -0,0 +1,62 @@
+The majority of SCN* macros differs from their PRI* cousins. When you define unsigned int you should always follow the C standards that made it clear what format specifier unsigned int should use, unfortunately the majority of OpenBSD's own libc SCN* macros managed not to follow the standard. "hu" and "hhu" are not unsigned int format specifiers, tried to get in touch with OpenBSD devs, reported this bug but no one responded.
+
+If they wanted to use specific integer type, then they should define it as such earlier. 8 bit integer is the smallest integer type in existance and for sure it cannot represent the 32 bit UINT_MAX number. glibc uses the maximum unsigned char and signed char for all int8_t, int_least8_t, int_fast8_t and uint8_t, uint_least8_t, uint_fast8_t , and yes glibc defines corrent PRI* and SCN* format specifier macros to match that integer type.
+
+It's not like to mistake the float format specifier with the "double" one.
+
+It's dirty trick to let the complier do the conversion for you to lower the integer type and not follow the standards to define it as such earlier.
+
+Go ahead and read sections 13.2 and 13.2.1 https://www.gnu.org/software/autoconf/manual/autoconf.html#Integer-Overflow
+
+The definitions in OpenBSD own libc:
+
+```cpp
+/* machine/_types.h */
+typedef	unsigned int		__uint32_t;
+
+typedef	__uint32_t		__uint_fast8_t;
+typedef	__uint32_t		__uint_fast16_t;
+
+/* stdint.h */
+typedef	__uint_fast8_t		uint_fast8_t;
+typedef	__uint_fast16_t		uint_fast16_t;
+
+/* inttypes.h */
+#define	PRIuFAST8		"u"		/* uint_fast8_t */
+#define	SCNuFAST8		"hhu"		/* uint_fast8_t */
+
+#define	PRIuFAST16		"u"		/* uint_fast16_t */
+#define	SCNuFAST16		"hu"		/* uint_fast16_t */
+```
+
+Sample program to simulate the bug:
+
+```cpp
+#include <stdio.h>
+#include <stdlib.h>
+#include <inttypes.h>
+
+int main(void) {
+  char acc[] = "Remaining: 99000";
+  uint_fast8_t cur = 0, started = 99000;
+
+  printf("%s\n", acc);
+  if (EOF == (sscanf(acc, "%*s %"SCNuFAST8, &cur))) {
+    return EXIT_FAILURE;
+  }
+  printf("%s " "%"PRIuFAST8 " %s " "%"PRIuFAST8 "\n",
+   "Started with: $", started,
+   "The current balance now: $", cur
+  );
+
+  return EXIT_SUCCESS;
+}
+```
+
+Amusing representation of the above code:
+
+```cpp
+unsigned long long int small_int = 240;
+
+printf("%hhu\n", small_int);
+```

+ 38 - 0
extra/misc/skdump.c

@@ -0,0 +1,38 @@
+/*
+ * Sample program to demonstate the usage of libatasmart
+*/
+
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include <atasmart.h>
+
+int main(void) {
+  uint64_t mkelvin = 0;
+  const char *device = "/dev/sda";
+  SkDisk *d = NULL;
+
+  if (-1 == (sk_disk_open(device, &d))) {
+    fprintf(stderr, "Failed to open disk %s: %s\n", device, strerror(errno));
+    return 1;
+  }
+
+  if (-1 == (sk_disk_smart_read_data(d))) {
+    fprintf(stderr, "Failed to read SMART data: %s\n", strerror(errno));
+    goto finish;
+  }
+
+  if (-1 == (sk_disk_smart_get_temperature(d, &mkelvin))) {
+    fprintf(stderr, "Failed to get temperature: %s\n", strerror(errno));
+    goto finish;
+  }
+
+  printf("%llu\n", (unsigned long long)mkelvin);
+
+finish:
+  if (NULL != d) {
+    sk_disk_free(d);
+  }
+  return 0;
+}

+ 1 - 0
extra/mpd/README.md

@@ -0,0 +1 @@
+\*BSD users should add the "musicpd" daemon user on their own

+ 17 - 0
extra/mpd/freebsd.conf

@@ -0,0 +1,17 @@
+music_directory "/home/frost/music"
+playlist_directory "/home/frost/music"
+db_file "/tmp/mpddb"
+log_file "/tmp/mpdlog"
+state_file "/tmp/mpdstate"
+pid_file "/tmp/mpdpid"
+log_level "default"
+user "musicpd"
+
+audio_output {
+  type "oss"
+  name "My sound card"
+  mixer_type "software"
+}
+
+port "6600"
+bind_to_address "127.0.0.1"

+ 17 - 0
extra/mpd/linux.conf

@@ -0,0 +1,17 @@
+music_directory "/home/frost/music"
+playlist_directory "/home/frost/music"
+db_file "/tmp/mpddb"
+log_file "/tmp/mpdlog"
+state_file "/tmp/mpdstate"
+pid_file "/tmp/mpdpid"
+log_level "default"
+user "mpd"
+
+audio_output {
+  type "alsa"
+  name "My sound card"
+  mixer_type "software"
+}
+
+port "6600"
+bind_to_address "127.0.0.1"

+ 17 - 0
extra/mpd/openbsd.conf

@@ -0,0 +1,17 @@
+music_directory "/home/frost/music"
+playlist_directory "/home/frost/music"
+db_file "/tmp/mpddb"
+log_file "/tmp/mpdlog"
+state_file "/tmp/mpdstate"
+pid_file "/tmp/mpdpid"
+log_level "default"
+user "musicpd"
+
+audio_output {
+  type "ao"
+  name "My sound card"
+  mixer_type "software"
+}
+
+port "6600"
+bind_to_address "127.0.0.1"

+ 64 - 0
extra/ported_or_not_included/cpu_brand.S

@@ -0,0 +1,64 @@
+/* source - https://en.wikipedia.org/wiki/CPUID */
+/* used it to port it to pinky-bar */
+
+.section .data
+
+s0 : .asciz "Processor Brand String: %.48s\n"
+err : .asciz "Feature unsupported.\n"
+
+.section .text
+
+.global main
+.type main,@function
+.align 32
+main:
+	pushq	%rbp
+	movq	%rsp,	%rbp
+	subq	$48,	%rsp
+	pushq	%rbx
+	
+	movl	$0x80000000,	%eax
+	cpuid
+	
+	cmpl	$0x80000004,	%eax
+	jl	error
+	
+	movl	$0x80000002,	%esi
+	movq	%rsp,	%rdi
+
+.align 16
+get_brand:
+	movl	%esi,	%eax
+	cpuid
+	
+	movl	%eax,	(%rdi)
+	movl	%ebx,	4(%rdi)
+	movl	%ecx,	8(%rdi)
+	movl	%edx,	12(%rdi)
+	
+	addl	$1,	%esi
+	addq	$16,	%rdi
+	cmpl	$0x80000004,	%esi
+	jle	get_brand
+
+print_brand:
+	movq	$s0,	%rdi
+	movq	%rsp,	%rsi
+	xorb	%al,	%al
+	call	printf
+	
+	jmp	end
+
+.align 16
+error:
+	movq	$err,	%rdi
+	xorb	%al,	%al
+	call	printf
+
+.align 16
+end:
+	popq	%rbx
+	movq	%rbp,	%rsp
+	popq	%rbp
+	xorl	%eax,	%eax
+	ret

+ 60 - 0
extra/ported_or_not_included/cpu_cache.S

@@ -0,0 +1,60 @@
+/* source - https://en.wikipedia.org/wiki/CPUID */
+/* used it to port it to pinky-bar */
+
+.section .data
+
+info : .ascii "L2 Cache Size : %u KB\nLine size : %u bytes\n"
+.asciz "Associativity : %02xh\n"
+err : .asciz "Feature unsupported.\n"
+
+.section .text
+
+.global main
+.type main,@function
+.align 32
+main:
+	pushq	%rbp
+	movq	%rsp,	%rbp
+	pushq	%rbx
+	
+	movl	$0x80000000,	%eax
+	cpuid
+	
+	cmpl	$0x80000006,	%eax
+	jl	error
+	
+	movl	$0x80000006,	%eax
+	cpuid
+	
+	movl	%ecx,	%eax
+	
+	movl	%eax,	%edx
+	andl	$0xff,	%edx
+	
+	movl	%eax,	%ecx
+	shrl	$12,	%ecx
+	andl	$0xf,	%ecx
+	
+	movl	%eax,	%esi
+	shrl	$16,	%esi
+	andl	$0xffff,%esi
+	
+	movq	$info,	%rdi
+	xorb	%al,	%al
+	call	printf
+	
+	jmp end
+	
+.align 16
+error:
+	movq	$err,	%rdi
+	xorb	%al,	%al
+	call	printf
+
+.align 16
+end:
+	popq	%rbx
+	movq	%rbp,	%rsp
+	popq	%rbp
+	xorl	%eax,	%eax
+	ret

+ 267 - 0
extra/ported_or_not_included/not_included.c

@@ -0,0 +1,267 @@
+/* "borrowed" from the Hacked Team */
+
+#include <time.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <strings.h>
+#include <sys/types.h>
+#include <sys/statvfs.h>
+#include <sys/utsname.h>
+
+struct device_info {
+   struct {
+      char vendor[128];
+      char model[128];
+      char cpu[128];
+      unsigned char ncpu;
+   } hw;
+   struct {
+      unsigned int memt;