An XOSD-inspired on-screen display (OSD) library with XFT support.
Go to file
2021-06-30 16:05:16 +05:30
archlinux Changed PKGBUILD to use latest main branch from github 2021-06-30 16:02:04 +05:30
autom4te.cache 1. Changed version and Updated Changelog 2021-06-30 16:05:07 +05:30
m4 Initial public release 2021-06-30 13:01:32 +05:30
man Initial public release 2021-06-30 13:01:32 +05:30
src Fixed: Warning of unused variable when DEBUG not set. 2021-06-30 15:35:27 +05:30
.gitignore 1. Changed version and Updated Changelog 2021-06-30 16:05:07 +05:30
aclocal.m4 Initial public release 2021-06-30 13:01:32 +05:30
AUTHORS Initial public release 2021-06-30 13:01:32 +05:30
autobuild.sh Initial public release 2021-06-30 13:01:32 +05:30
ChangeLog 1. Changed version and Updated Changelog 2021-06-30 16:05:07 +05:30
compile Updated symbolic likes to file copies and crated PKGBUILD 2021-06-30 15:03:32 +05:30
config.guess Updated symbolic likes to file copies and crated PKGBUILD 2021-06-30 15:03:32 +05:30
config.sub Updated symbolic likes to file copies and crated PKGBUILD 2021-06-30 15:03:32 +05:30
configure 1. Changed version and Updated Changelog 2021-06-30 16:05:07 +05:30
configure.ac 1. Changed version and Updated Changelog 2021-06-30 16:05:07 +05:30
COPYING Updated symbolic likes to file copies and crated PKGBUILD 2021-06-30 15:03:32 +05:30
COPYING.LESSER Initial public release 2021-06-30 13:01:32 +05:30
depcomp Updated symbolic likes to file copies and crated PKGBUILD 2021-06-30 15:03:32 +05:30
INSTALL Updated symbolic likes to file copies and crated PKGBUILD 2021-06-30 15:03:32 +05:30
install-sh Updated symbolic likes to file copies and crated PKGBUILD 2021-06-30 15:03:32 +05:30
ltmain.sh Updated symbolic likes to file copies and crated PKGBUILD 2021-06-30 15:03:32 +05:30
Makefile.am Initial public release 2021-06-30 13:01:32 +05:30
Makefile.in 1. Changed version and Updated Changelog 2021-06-30 16:05:07 +05:30
missing Updated symbolic likes to file copies and crated PKGBUILD 2021-06-30 15:03:32 +05:30
NEWS Initial public release 2021-06-30 13:01:32 +05:30
README Initial public release 2021-06-30 13:01:32 +05:30
README.md Initial public release 2021-06-30 13:01:32 +05:30
xosd-xft.pc.in Initial public release 2021-06-30 13:01:32 +05:30

XOSD-XFT - OSD for X11

Inspired by libxosd.

xosd-xft supports:

  • Use Xft/TTF fonts
  • Xrandr and Xinerama extensions
  • Allows you to choose a monitor in multihead setups - including active monitor
  • Use osd-show-key to display a Nerd Font glyph
  • Use osd-show-file to display a file

Installation

./configure
make
sudo make install

Quick Look

Using osd-show-key

To display volume off glyph and execute amixer command:

    osd-show-key -e 'amixer set Master off' :fa-volume_off:")

To list available glyph names that contain volume in them:

    osd-show-key -lvolume

Using osd-showfile

To override the font used to display a file:

    osd-show-file -f "SourceCodePro:size=14" /etc/passwd

The following command shows the output of uptime on the screen and updates every 5 seconds:

while true; do uptime; sleep 5; done | osd-show-file --number-of-lines 1 -g 0x1l+0-0

Using the library

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

#include <xosd-xft.h>

xosd_xft *osd;

int main(int argc, char *argv[])
{
  osd_geometry g;

  xosd_xft *osd = osd_create();
  if(osd_parse_geometry("300x300+0+0*middle/center", "center/middle", &g) == NULL) {
    fprintf(stderr, "%s\n", osd_error);
    return EXIT_FAILURE;
  }
  osd_set_geometry(osd, &g);
  osd_set_font(osd, "mono:size=16");
  osd_set_color(osd, "lightblue");
  osd_set_bgcolor(osd, "black", 100);

  char* message = "HELLO XOSD-XFT" ;
  osd_display(osd, message, strlen(message));

  usleep(1000000);
  osd_destroy(osd);
  return EXIT_SUCCESS;
}