README 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. -*- mode: org -*-
  2. * About
  3. Guile-XOSD provides the Guile bindings for [[http://sourceforge.net/projects/libxosd/][libxosd]] library.
  4. Guile-XOSD is the reincarnation of [[https://github.com/sigma/lisposd][lisposd]]. The C file with the Guile
  5. bindings was written at the time (2004-2005) by Yann Hodique, and the
  6. rest (GNU Build System infrastructure, guile modules, documentation and
  7. examples) was added as a part of Guile-XOSD in 2016 by Alex Kost.
  8. * Usage
  9. From the following screenshots you can get the idea how Guile-XOSD may
  10. be used:
  11. - [[http://i.imgur.com/vNbFrDm.png]]
  12. - [[http://i.imgur.com/XCn4ysP.png]]
  13. And here is the code to display the OSD from the second screenshot:
  14. #+BEGIN_SRC scheme
  15. (use-modules (xosd))
  16. (define osd
  17. (make-osd #:lines 2
  18. #:position 'top
  19. #:align 'center
  20. #:font "-*-ubuntu-bold-r-normal--*-500-*-*-p-*-*-1"
  21. #:color "dark green"
  22. #:outline-offset 1
  23. #:outline-color "white"))
  24. (define (display-percentage percent)
  25. (display-string-in-osd osd (format #f "~a%" percent) 0)
  26. (display-percentage-in-osd osd percent 1))
  27. (display-percentage 73)
  28. #+END_SRC
  29. The full documentation (texinfo manual) and a couple of other examples
  30. can be found in the source tree (and in the installed package).
  31. * Building from Git
  32. Along with the obvious requirements for Guile-XOSD:
  33. - [[http://gnu.org/software/guile/][GNU Guile]]
  34. - [[http://sourceforge.net/projects/libxosd/][XOSD]] library
  35. to build it from git, you also need:
  36. - [[http://gnu.org/software/autoconf/][GNU Autoconf]]
  37. - [[http://gnu.org/software/automake/][GNU Automake]]
  38. - [[http://gnu.org/software/libtool/][GNU Libtool]]
  39. - [[http://gnu.org/software/texinfo/][GNU Texinfo]]
  40. Run =./autogen.sh= to generate the build system infrastructure. After
  41. that, the program can be built and installed with the usual sequence of
  42. commands of the GNU Build System:
  43. #+BEGIN_SRC sh
  44. $ ./configure
  45. $ make
  46. # make install
  47. #+END_SRC
  48. It is possible to use/test Guile-XOSD without installing (i.e., after
  49. running =make= but before running =make install=) with the help of
  50. =pre-inst-env= script in the top build tree, like this:
  51. #+BEGIN_SRC sh
  52. $ ./pre-inst-env guile
  53. scheme@(guile-user)> ,use(xosd)
  54. #+END_SRC
  55. * Building/installing with Guix
  56. The latest version of Guile-XOSD can be installed with [[http://www.gnu.org/software/guix/][GNU Guix]]:
  57. [[https://guix.gnu.org/en/packages/guile-xosd-0.2.2]].
  58. Also this repository contains [[file:guix.scm]] file which can be used to
  59. build/install Guile-XOSD using the git checkout, or to make a
  60. development environment for it (see the commentary in that file for more
  61. details).