From dudi at kolcore.com Wed May 25 11:56:08 2016 From: dudi at kolcore.com (Dudi Goldenberg) Date: Wed, 25 May 2016 15:56:08 +0000 Subject: [Tkinter-discuss] Add text to desktop Message-ID: Hello list, What would be the best way to add some text over the desktop background image, with no window and no frame? Font, size and colors needs to be controlled, some of the text will come from updated variables. I managed to get the text to display, but always boxed In a frame... TIA & Regards, D. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bryan.oakley at gmail.com Wed May 25 19:28:56 2016 From: bryan.oakley at gmail.com (Bryan Oakley) Date: Wed, 25 May 2016 18:28:56 -0500 Subject: [Tkinter-discuss] Add text to desktop In-Reply-To: References: Message-ID: There is no way to do what you want with tkinter. On Wed, May 25, 2016 at 10:56 AM, Dudi Goldenberg wrote: > Hello list, > > > > What would be the best way to add some text over the desktop background > image, with no window and no frame? > > > > Font, size and colors needs to be controlled, some of the text will come > from updated variables. > > > > I managed to get the text to display, but always boxed In a frame? > > > > TIA & Regards, > > > > D. > > > > _______________________________________________ > Tkinter-discuss mailing list > Tkinter-discuss at python.org > https://mail.python.org/mailman/listinfo/tkinter-discuss > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dudi at kolcore.com Wed May 25 19:31:13 2016 From: dudi at kolcore.com (Dudi Goldenberg) Date: Wed, 25 May 2016 23:31:13 +0000 Subject: [Tkinter-discuss] Add text to desktop In-Reply-To: References: Message-ID: Is there another method/module/anything that makes this possible?? D. From: Bryan Oakley [mailto:bryan.oakley at gmail.com] Sent: Thursday, May 26, 2016 2:29 To: Dudi Goldenberg Cc: tkinter-discuss at python.org Subject: Re: [Tkinter-discuss] Add text to desktop There is no way to do what you want with tkinter. On Wed, May 25, 2016 at 10:56 AM, Dudi Goldenberg > wrote: Hello list, What would be the best way to add some text over the desktop background image, with no window and no frame? Font, size and colors needs to be controlled, some of the text will come from updated variables. I managed to get the text to display, but always boxed In a frame? TIA & Regards, D. _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss at python.org https://mail.python.org/mailman/listinfo/tkinter-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From kw at codebykevin.com Wed May 25 22:23:07 2016 From: kw at codebykevin.com (Kevin Walzer) Date: Wed, 25 May 2016 22:23:07 -0400 Subject: [Tkinter-discuss] Add text to desktop In-Reply-To: References: Message-ID: <22eaf6a9-8cfb-26ec-7962-9b5982ce02a5@codebykevin.com> On 5/25/16 7:31 PM, Dudi Goldenberg wrote: > Is there another method/module/anything that makes this possible?? Your previous question asked if there was a way to do this without windows--that is absurd since drawing in and displaying windows is all Tkinter does. There may be ways to display text in the manner you describe in a borderless window, but as far as doing so without a window, no. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From hexamorph at gmx.net Thu May 26 01:25:26 2016 From: hexamorph at gmx.net (Hexamorph) Date: Thu, 26 May 2016 07:25:26 +0200 Subject: [Tkinter-discuss] Add text to desktop In-Reply-To: <22eaf6a9-8cfb-26ec-7962-9b5982ce02a5@codebykevin.com> References: <22eaf6a9-8cfb-26ec-7962-9b5982ce02a5@codebykevin.com> Message-ID: <574688C6.6000909@gmx.net> Am 26.05.2016 um 04:23 schrieb Kevin Walzer: > On 5/25/16 7:31 PM, Dudi Goldenberg wrote: >> Is there another method/module/anything that makes this possible?? > > Your previous question asked if there was a way to do this without > windows--that is absurd since drawing in and displaying windows is > all Tkinter does. > > There may be ways to display text in the manner you describe in a > borderless window, but as far as doing so without a window, no. I basically see five options which I know work on Linux, don't know about Windows or Mac. 1. Display text in a transparent borderless window such as a terminal emulator. Terminator can do this. 2. Use a tool such as root-tail to display text on the "root window" while using a window manager such as Fvwm which doesn't cover the root window (most WMs these days cover it) 3. Use a tool such as ImageMagick to manipulate the background image file (add text to it) and redisplay it. This will probably work on Windows too but it will be very slow. 4. Write an extension/addon for your window manager or desktop manager that displays text on the background. This massively depends on the WM you use. 5. Write something like root-tail yourself, but let it write on the desktop manager's background window instead of the root window. Finding the correct window in the window hierarchy is tricky tough (refer to newer versions of XSnow). Tkinter is likely not going to help you with this, but the XLib package can probably do this (but I haven't checked) Notice, that in most of these ways (except 3.) there actually *is* a window created, albeit a transparent one which still "covers" what's behind it and thus will intercept mouse clicks in its area. From dudi at kolcore.com Thu May 26 01:32:50 2016 From: dudi at kolcore.com (Dudi Goldenberg) Date: Thu, 26 May 2016 05:32:50 +0000 Subject: [Tkinter-discuss] Add text to desktop In-Reply-To: <22eaf6a9-8cfb-26ec-7962-9b5982ce02a5@codebykevin.com> References: <22eaf6a9-8cfb-26ec-7962-9b5982ce02a5@codebykevin.com> Message-ID: Hi Kevin and Hexamorph, I understand your point. The choice of Python was done for its good and easy support for my hardware (BeagleBone Black). While the project functionality is complete, I am now facing the need to display small amount (3-5 strings) on the desktop as I explained in previous posts. During my tests using many examples for various sources, I had the text displayed in a borderless/title-less window, if only I could make the background transparent, I could use this. If there is no solution using Python - I'll search for a solution to this in any other language and incorporate it in my Python source. I just got Hexamorph's reply - I'm off to dig into the option, I am on Debian 7 with openbox WM. Thanks & Regards, D. From: Tkinter-discuss [mailto:tkinter-discuss-bounces+dudi=kolcore.com at python.org] On Behalf Of Kevin Walzer Sent: Thursday, May 26, 2016 5:23 To: tkinter-discuss at python.org Subject: Re: [Tkinter-discuss] Add text to desktop On 5/25/16 7:31 PM, Dudi Goldenberg wrote: Is there another method/module/anything that makes this possible?? Your previous question asked if there was a way to do this without windows--that is absurd since drawing in and displaying windows is all Tkinter does. There may be ways to display text in the manner you describe in a borderless window, but as far as doing so without a window, no. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From hexamorph at gmx.net Thu May 26 03:34:09 2016 From: hexamorph at gmx.net (Hexamorph) Date: Thu, 26 May 2016 09:34:09 +0200 Subject: [Tkinter-discuss] Add text to desktop In-Reply-To: References: <22eaf6a9-8cfb-26ec-7962-9b5982ce02a5@codebykevin.com> Message-ID: <5746A6F1.6090106@gmx.net> Am 26.05.2016 um 07:32 schrieb Dudi Goldenberg: > Hi Kevin and Hexamorph, > > I understand your point. > > The choice of Python was done for its good and easy support for my hardware (BeagleBone Black). > > While the project functionality is complete, I am now facing the need to display small amount (3-5 strings) on the desktop as I explained in previous posts. > > During my tests using many examples for various sources, I had the text displayed in a borderless/title-less window, if only I could make the background transparent, I could use this. > > If there is no solution using Python - I'll search for a solution to this in any other language and incorporate it in my Python source. > > I just got Hexamorph's reply - I'm off to dig into the option, I am on Debian 7 with openbox WM. > > Thanks & Regards, > > D. Luckily OpenBox is one of those WMs which don't cover the root window, so root-tail will work. You should be able to find it in the Debian repos or at: http://oldhome.schmorp.de/marc/root-tail.html I don't know how feature-complete python-xlib is, but you probably can reimplement root-tail with it. python-xlib should also be in the repos or at: https://github.com/python-xlib/python-xlib The easiest method would be to simply display your text in a terminal window which supports transparency, but notice, that there are two types of it. Terminal emulators such as rxvt support only pseudo-transparency. They simply take the desktop background image, crop the area they cover out of it and display it as their window background, so while the desktop background shows through, any windows or widgets under the terminal will be covered. The other form is true alpha-channel transparency which terminal emulators such as Terminator support, but for this they need a compositor running such as xcompmgr, compiz or a modern WM such as Gnome, KDE, etc. Running a compositor requires an accelerated graphics driver. I don't know if the BeagleBone supports this. From dudi at kolcore.com Thu May 26 03:59:01 2016 From: dudi at kolcore.com (Dudi Goldenberg) Date: Thu, 26 May 2016 07:59:01 +0000 Subject: [Tkinter-discuss] Add text to desktop In-Reply-To: <5746A770.1030301@tartan.co.za> References: <22eaf6a9-8cfb-26ec-7962-9b5982ce02a5@codebykevin.com> <5746A770.1030301@tartan.co.za> Message-ID: Thanks to all repliers! This is all great help! I'll post the results. Thanks again. D. From: Paul Malherbe [mailto:paul at tartan.co.za] Sent: Thursday, May 26, 2016 10:36 To: Dudi Goldenberg ; tkinter-discuss at python.org Subject: Re: [Tkinter-discuss] Add text to desktop Hi You could use canvas to achieve this as per attached snippet. Regards Paul Malherbe On 26/05/2016 07:32, Dudi Goldenberg wrote: Hi Kevin and Hexamorph, I understand your point. The choice of Python was done for its good and easy support for my hardware (BeagleBone Black). While the project functionality is complete, I am now facing the need to display small amount (3-5 strings) on the desktop as I explained in previous posts. During my tests using many examples for various sources, I had the text displayed in a borderless/title-less window, if only I could make the background transparent, I could use this. If there is no solution using Python - I'll search for a solution to this in any other language and incorporate it in my Python source. I just got Hexamorph's reply - I'm off to dig into the option, I am on Debian 7 with openbox WM. Thanks & Regards, D. From: Tkinter-discuss [mailto:tkinter-discuss-bounces+dudi=kolcore.com at python.org] On Behalf Of Kevin Walzer Sent: Thursday, May 26, 2016 5:23 To: tkinter-discuss at python.org Subject: Re: [Tkinter-discuss] Add text to desktop On 5/25/16 7:31 PM, Dudi Goldenberg wrote: Is there another method/module/anything that makes this possible?? Your previous question asked if there was a way to do this without windows--that is absurd since drawing in and displaying windows is all Tkinter does. There may be ways to display text in the manner you describe in a borderless window, but as far as doing so without a window, no. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss at python.org https://mail.python.org/mailman/listinfo/tkinter-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul at tartan.co.za Thu May 26 03:36:16 2016 From: paul at tartan.co.za (Paul Malherbe) Date: Thu, 26 May 2016 09:36:16 +0200 Subject: [Tkinter-discuss] Add text to desktop In-Reply-To: References: <22eaf6a9-8cfb-26ec-7962-9b5982ce02a5@codebykevin.com> Message-ID: <5746A770.1030301@tartan.co.za> An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.py Type: text/x-python Size: 431 bytes Desc: not available URL: From klappnase at web.de Thu May 26 06:11:17 2016 From: klappnase at web.de (Michael Lange) Date: Thu, 26 May 2016 12:11:17 +0200 Subject: [Tkinter-discuss] Add text to desktop In-Reply-To: <5746A770.1030301@tartan.co.za> References: <22eaf6a9-8cfb-26ec-7962-9b5982ce02a5@codebykevin.com> <5746A770.1030301@tartan.co.za> Message-ID: <20160526121117.15248bfce1e3233765809848@web.de> Hi, On Thu, 26 May 2016 09:36:16 +0200 Paul Malherbe wrote: > You could use canvas to achieve this as per attached snippet. with a few modifications, your example can be used to actually look like a desktop wallpaper: ##################################################### import Tkinter as tk import ttk from PIL import Image, ImageTk root = tk.Tk() w, h = root.winfo_screenwidth(), root.winfo_screenheight() root.geometry('%dx%d+0+0' % (w, h)) root.wm_overrideredirect(1) root.lower() pilimg = Image.open("example.gif") rimage = pilimg.resize((w, h), Image.ANTIALIAS) fimage = ImageTk.PhotoImage(image=rimage) cnv = tk.Canvas(root) cnv.create_image(0, 0, image=fimage, anchor="nw", tags="img") cnv.create_text(200, 100, text="HELLO BABY", font=("Arial", 20, "bold")) cnv.pack(side="left", fill="both", expand="yes") root.mainloop() ################################################### However, as soon as you call something like "pcmanfm --desktop" to get desktop icons your Tkinter "wallpaper" will be hidden underneath. Regards Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. I object to intellect without discipline; I object to power without constructive purpose. -- Spock, "The Squire of Gothos", stardate 2124.5 From daniel.graham at duke.edu Thu May 26 06:37:36 2016 From: daniel.graham at duke.edu (Daniel Graham) Date: Thu, 26 May 2016 10:37:36 +0000 Subject: [Tkinter-discuss] Tkinter-discuss Digest, Vol 143, Issue 1 In-Reply-To: References: Message-ID: <517A9B6D-49E8-407F-BAAE-BCC21B8507C2@duke.edu> On osx you can use geektool. > On May 25, 2016, at 9:04 PM, tkinter-discuss-request at python.org wrote: > > Send Tkinter-discuss mailing list submissions to > tkinter-discuss at python.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/tkinter-discuss > or, via email, send a message with subject or body 'help' to > tkinter-discuss-request at python.org > > You can reach the person managing the list at > tkinter-discuss-owner at python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Tkinter-discuss digest..." > > > Today's Topics: > > 1. Add text to desktop (Dudi Goldenberg) > 2. Re: Add text to desktop (Bryan Oakley) > 3. Re: Add text to desktop (Dudi Goldenberg) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 25 May 2016 15:56:08 +0000 > From: Dudi Goldenberg > To: "tkinter-discuss at python.org" > Subject: [Tkinter-discuss] Add text to desktop > Message-ID: > > > Content-Type: text/plain; charset="us-ascii" > > Hello list, > > What would be the best way to add some text over the desktop background image, with no window and no frame? > > Font, size and colors needs to be controlled, some of the text will come from updated variables. > > I managed to get the text to display, but always boxed In a frame... > > TIA & Regards, > > D. > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Message: 2 > Date: Wed, 25 May 2016 18:28:56 -0500 > From: Bryan Oakley > To: Dudi Goldenberg > Cc: "tkinter-discuss at python.org" > Subject: Re: [Tkinter-discuss] Add text to desktop > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > There is no way to do what you want with tkinter. > > On Wed, May 25, 2016 at 10:56 AM, Dudi Goldenberg wrote: > >> Hello list, >> >> >> >> What would be the best way to add some text over the desktop background >> image, with no window and no frame? >> >> >> >> Font, size and colors needs to be controlled, some of the text will come >> from updated variables. >> >> >> >> I managed to get the text to display, but always boxed In a frame? >> >> >> >> TIA & Regards, >> >> >> >> D. >> >> >> >> _______________________________________________ >> Tkinter-discuss mailing list >> Tkinter-discuss at python.org >> https://mail.python.org/mailman/listinfo/tkinter-discuss >> >> > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Message: 3 > Date: Wed, 25 May 2016 23:31:13 +0000 > From: Dudi Goldenberg > To: Bryan Oakley > Cc: "tkinter-discuss at python.org" > Subject: Re: [Tkinter-discuss] Add text to desktop > Message-ID: > > > Content-Type: text/plain; charset="utf-8" > > Is there another method/module/anything that makes this possible?? > > D. > > From: Bryan Oakley [mailto:bryan.oakley at gmail.com] > Sent: Thursday, May 26, 2016 2:29 > To: Dudi Goldenberg > Cc: tkinter-discuss at python.org > Subject: Re: [Tkinter-discuss] Add text to desktop > > There is no way to do what you want with tkinter. > > On Wed, May 25, 2016 at 10:56 AM, Dudi Goldenberg > wrote: > Hello list, > > What would be the best way to add some text over the desktop background image, with no window and no frame? > > Font, size and colors needs to be controlled, some of the text will come from updated variables. > > I managed to get the text to display, but always boxed In a frame? > > TIA & Regards, > > D. > > > _______________________________________________ > Tkinter-discuss mailing list > Tkinter-discuss at python.org > https://mail.python.org/mailman/listinfo/tkinter-discuss > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > Tkinter-discuss mailing list > Tkinter-discuss at python.org > https://mail.python.org/mailman/listinfo/tkinter-discuss > > > ------------------------------ > > End of Tkinter-discuss Digest, Vol 143, Issue 1 > *********************************************** From dudi at kolcore.com Thu May 26 13:38:58 2016 From: dudi at kolcore.com (Dudi Goldenberg) Date: Thu, 26 May 2016 17:38:58 +0000 Subject: [Tkinter-discuss] Add text to desktop In-Reply-To: <20160526121117.15248bfce1e3233765809848@web.de> References: <22eaf6a9-8cfb-26ec-7962-9b5982ce02a5@codebykevin.com> <5746A770.1030301@tartan.co.za> <20160526121117.15248bfce1e3233765809848@web.de> Message-ID: with a few modifications, your example can be used to actually look like a desktop wallpaper: ##################################################### --- --- ################################################### However, as soon as you call something like "pcmanfm --desktop" to get desktop icons your Tkinter "wallpaper" will be hidden underneath. *** DG This is not a problem since this machine will have no user interaction with the desktop, no mouse, no keyboard. The desktop is just an information center. All other activity will be controlled from the BeagleBone GPIO. Regards, D.