-
-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Play effect on whole desktop on shutdown #417
Comments
Hey there! This is a pretty neat idea. I'll definitely look into this at some point. These days however, I am pretty busy with Kando. So it may take some time. If somebody else wants to look into this, feel free to drop a note here and I would happily provide some pointers to the source code! |
Codeimport time
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk, GdkPixbuf, GLib
from PIL import Image
import pyscreenshot as ImageGrab
# Take a screenshot of the desktop
screenshot = ImageGrab.grab()
screenshot.save("screenshot.png")
class BlackWindow(Gtk.Window):
def __init__(self):
super().__init__()
self.fullscreen()
self.connect('destroy', Gtk.main_quit)
class ScreenshotWindow(Gtk.Window):
def __init__(self, screenshot_path):
super().__init__()
self.fullscreen()
image = Gtk.Image.new_from_file('screenshot.png')
self.add(image)
GLib.timeout_add(1000, self.on_timeout, None)
def on_timeout(self, *args):
self.destroy()
# Open a fullscreen window that is solid black
win = BlackWindow()
win.show_all()
# Display the screenshot on top of this window
screenshot_win = ScreenshotWindow("screenshot.png")
screenshot_win.show_all()
Gtk.main()
# Wait for 1 second then close the screenshot window
# Gtk.main_quit() Screencast.from.2024-01-26.12-32-27.webm.mov |
The Idea
I'm not sure if this is really difficult or out of scope, but it would be cool if when you shut down (from the GNOME menu at least, hooking into systemd would be harder), a specified animation displays on the whole desktop. For example, selecting the default fire effect then shutting down would cause your entire screen including the panel and wallpaper to burn away.
This would probably require another setting for an image or solid color background.
The Alternatives
I guess one could hack together a script to screenshot the desktop, display a fullscreen image, then close it with that effect?
The text was updated successfully, but these errors were encountered: