1

I try to put google calendar in a webkit window as wallpaper.

The python working script looks like :

#!/usr/bin/python2 -u
# -*- coding: iso8859-15 -*-

display_UI = True
email = "xxxx@gmail.com"
passwd = "xxxxxxxx"
useragent = "Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"

import spynner

browser = spynner.Browser(
        debug_level=spynner.WARNING,
        user_agent = useragent
)

browser.create_webview(display_UI)
browser.webview.setWindowTitle('Gcalendar')
browser.webview.showMaximized()

browser.load("https://accounts.google.com/ServiceLogin?service=cl&passive=1209600&continue=https://www.google.com/calendar/render&followup=http://www.google.com/calendar&scc=1")
browser.fill("input[name=Email]", email)
browser.fill("input[name=Passwd]", passwd)
browser.click("input[name=signIn]")
browser.wait_load()
browser.load("https://www.google.com/calendar/render?pli=1")
browser.wait_load()

# vim:ts=4:sw=4

What I would like to do now, is to programmatically put this window as a wallpaper :

  • skip taskbar
  • skip pager
  • full screen (DONE with spynner module)
  • if I hide all applications, the window should stay like any wallpapers.

What I tried without sucess

  • kde advanced settings on application name
  • xwinwrap
Gilles Quénot
  • 173,512
  • 41
  • 224
  • 223
  • 1
    in kde you can use [KWin Rules Window Attributes](http://userbase.kde.org/KWin_Rules_Window_Attributes#Arrangement_.26_Access) to keep the window below others –  Dec 11 '12 at 13:13

1 Answers1

2

You can take a screenshot of the page, save it somewhere and then launch a command that changes the background.

image = spynner.QImage(browser.webpage.viewportSize(), spynner.QImage.Format_ARGB32)
painter = spynner.QPainter(image)
browser.webpage.mainFrame().render(painter)
painter.end()
image.save("/path/to/img/gcscreen.png")

Then use the subprocess module to call a command that changes the wallpaper from terminal. A google search resulted with this for a Gnome ubuntu. I'm sure you can also find a similar one for KDE if you like.

Community
  • 1
  • 1
YusuMishi
  • 2,317
  • 1
  • 18
  • 8
  • Thanks for that, that's interesting, but that don't fit what I try, I would like to have a webkit wallpaper. That way, calendar will be editable. – Gilles Quénot Jun 23 '12 at 11:41