1

Edit

Now I am currently using osd_cat, installed with xosd. It does the job perfectly for me since it is customizeable to my needs. You can even choose a font from the output of xlsfonts

Original Post

I would like to overlay custom text as a notification.

It is important that the notification is non obtrusive (does not take away window focus).

I made an 8 second video to show what I am trying to do:

8 second sample clip

I am aware of zenity, xmessage, and notify-send, and I don't think any of these can do what I am trying to do.

I am willing to use png's as overlays if custom text is harder to do.

This was inspired by Linux Mint's Change Workspace OSD:

Linux Mint's Change Workspace Screenshot

1
  • @JacobVlijm can you take a look at this one please ? Python should have something like that , right ? Oct 19, 2015 at 1:04

1 Answer 1

2

Edit

After some research , I have found a gnome-osd package, which by the way uses python, and installed simply with sudo apt-get install gnome-osd.

The properties , such as text location can be configured with gnome-osd-properties tool. Sending messages is the same syntax as notify-send. The notifications are non-obtrusive. I've tested that with command sleep 10; gnome-osd-client "This is a test message" and switched on working in firefox until the text came up; I was still able to write in firefox even when notification was drawn on the screen.

Bellow you can see the example with test message:

enter image description here

Another alternative is to use osdsh , which works pretty much the same, launch the daemon with osdsh , configured with osdshconfig and send message with osdctl -s "TEST STRING"

Original Post

notify-send doesn't specify options for location. Use zenity or xmessage

zenity gives centered popups by default. Example :

zenity --info --text "Hello world"

xmessage has to be configured according to -geometry flag specified in man page for X (man x). But you need to know size of your screen, which can be found with xrandr , xprop -root , or xwininfo -root. Example:

xmessage "Hello world" -geometry 250x250-130+100
8
  • Hey Serg! Hope your trip went well. As I mentioned in my question, it is important that the message does not take window focus. I don't think zenity, xmessage, or notify-send can do this since they all open up a new window, which removes focus of the previous window. I will edit my question a little to try to make this more obvious.
    – TuxForLife
    Oct 19, 2015 at 0:37
  • @TuxForLife Thank you ! The trip was alright. I don't know of any notification programs that can do what you're asking, but perhaps others others can answer that. Oct 19, 2015 at 0:50
  • Ok, I found that many of the gnome user interface popups and dialogs are in /usr/share/gnome-shell/js/ui which i am assuming is all javascript , which i don't know yet. However you might find someone who does, and write a custom notification tool like you'd like Oct 19, 2015 at 0:55
  • I actually don't have the /usr/share/gnome-shell/js directory you mentioned. I'm crossing my fingers your friend may help, it would be cool if there was something in python, since I am just learning it!
    – TuxForLife
    Oct 19, 2015 at 1:11
  • I researched a python module called "pynotify", I will try to see if I can do something with it.
    – TuxForLife
    Oct 19, 2015 at 1:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .