-*- mode: org -*-
* About
Guile-XOSD provides the Guile bindings for [[http://sourceforge.net/projects/libxosd/][libxosd]] library.
Guile-XOSD is the reincarnation of [[https://github.com/sigma/lisposd][lisposd]]. The C file with the Guile
bindings was written at the time (2004-2005) by Yann Hodique, and the
rest (GNU Build System infrastructure, guile modules, documentation and
examples) was added as a part of Guile-XOSD in 2016 by Alex Kost.
* Usage
From the following screenshots you can get the idea how Guile-XOSD may
be used:
- [[http://i.imgur.com/vNbFrDm.png]]
- [[http://i.imgur.com/XCn4ysP.png]]
And here is the code to display the OSD from the second screenshot:
#+BEGIN_SRC scheme
(use-modules (xosd))
(define osd
(make-osd #:lines 2
#:position 'top
#:align 'center
#:font "-*-ubuntu-bold-r-normal--*-500-*-*-p-*-*-1"
#:color "dark green"
#:outline-offset 1
#:outline-color "white"))
(define (display-percentage percent)
(display-string-in-osd osd (format #f "~a%" percent) 0)
(display-percentage-in-osd osd percent 1))
(display-percentage 73)
#+END_SRC
The full documentation (texinfo manual) and a couple of other examples
can be found in the source tree (and in the installed package).
* Building from Git
Along with the obvious requirements for Guile-XOSD:
- [[http://gnu.org/software/guile/][GNU Guile]]
- [[http://sourceforge.net/projects/libxosd/][XOSD]] library
to build it from git, you also need:
- [[http://gnu.org/software/autoconf/][GNU Autoconf]]
- [[http://gnu.org/software/automake/][GNU Automake]]
- [[http://gnu.org/software/libtool/][GNU Libtool]]
- [[http://gnu.org/software/texinfo/][GNU Texinfo]]
Run =./autogen.sh= to generate the build system infrastructure. After
that, the program can be built and installed with the usual sequence of
commands of the GNU Build System:
#+BEGIN_SRC sh
$ ./configure
$ make
# make install
#+END_SRC
It is possible to use/test Guile-XOSD without installing (i.e., after
running =make= but before running =make install=) with the help of
=pre-inst-env= script in the top build tree, like this:
#+BEGIN_SRC sh
$ ./pre-inst-env guile
scheme@(guile-user)> ,use(xosd)
#+END_SRC
* Building/installing with Guix
The latest version of Guile-XOSD can be installed with [[http://www.gnu.org/software/guix/][GNU Guix]]:
[[https://guix.gnu.org/en/packages/guile-xosd-0.2.2]].
Also this repository contains [[file:guix.scm]] file which can be used to
build/install Guile-XOSD using the git checkout, or to make a
development environment for it (see the commentary in that file for more
details).