Git Product home page Git Product logo

pyosd's Introduction

PyOSD: A python wrapper for libxosd
-----------------------------------

Description
-----------

     PyOSD is a python module for displaying text on your X display,
     much like the "On Screen Displays" used on TVs and some monitors.

     This is useful for such things as displaying the currently
     playing song in your media player.

Installation
------------

    PyOSD will now run out of the box provided you have xosd version 1.0.0 or
    later. So fetch and install that first. You can find xosd here:

        http://www.ignavus.net/software.html

    Installing pyosd
    ----------------

    All you need here is distutils, which is packaged with recent pythons. If
    you're using debian, install python2.1-dev (or your preferred version)

    People with a umask that doesn't allow files to be world readable have
    reported permission problems installing these files. If you're installing
    via sudo the umask will be inherited - make sure
    site-packages/{_pyosd.so,pyosd*/*} are world readable. 

    Then:

    $ python setup.py build

    (then as root)

    # python setup.py install

    ** NOTE **

    If you were previously using an older version of pyosd and didn't
    uninstall it first, you may have difficulty using the new version. The
    solution to that is to run a command like this:

    $ rm /usr/lib/python2.1/site-packages/pyosd.py

    Since pyosd is now a directory.

How to use
----------

     Here's an example python session with the basics:

     $ python
     ...
     >>> import pyosd
     >>> p = pyosd.osd()
     >>> p.display("this is a message")
     >>> p.set_pos(pyosd.POS_BOT)
     >>> p.display("this will be down the bottom")

     That code should display a message at the top of your screen, and then
     another at the bottom. If you receive an error, it's possible you don't
     have that font. You can try a line like this instead:

     >>> p = pyosd.osd("fixed", "white")

     The default font is:

     >>> pyosd.default_font
     '-adobe-helvetica-medium-r-normal-*-*-400-*-*-p-*-iso8859-1'

     When you use pyosd in a script, you need to make it wait for your
     message to be displayed. To do this, try:

     >>> p.wait_until_no_display()
     
     You can read more about the inteface by looking at pyosd.html

Feedback
--------

     If you have any questions or problems with this, please don't hesitate
     to give me a yell. 

--
Damien Elmes
[email protected]
http://repose.cx/pyosd

pyosd's People

Contributors

dzen avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

rdiaz02

pyosd's Issues

Solid background behind OSD text

Is there any way that we can add a solid background on the OSD text?

Sometimes it's a bit hard to read (i.e. White text with white picture behind it) so I'd love to be able to add a solid black background - just behind the OSD text (say with a 5 or 10px padding).

Cheers,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.