Open OneSons opened 2 years ago
+1 on this request
+1 on this request
I tried to do it by myself as light knowledge of Python. I created an interface Monitor to keep wallpapers with peering monitor.
Kept wallpapers in config as list like:
"data_source":[ "/home/xaprier/Videos/Hidamari/ghost.mp4", "/home/xaprier/Videos/Hidamari/ghost2.mp4" ],
Created ui like this:
def on_local_video_apply(self, *_):
selected = self.icon_view.get_selected_items()
if len(selected) != 0:
menu = Gtk.Menu()
items = []
for i in range(len(self.monitors.get_monitors())):
item = Gtk.MenuItem(label=f"Set As {i}")
item.connect("activate", self.on_set_as, i)
menu.append(item)
items.append(item)
# show menu
menu.show_all()
menu.popup(None, None, None, None, 0, Gtk.get_current_event_time())
def on_set_as(self, widget, index):
video_path = self.video_paths[index]
logger.info(f"[GUI] Local Video Set To {video_path} for {index}")
self.config[CONFIG_KEY_MODE] = MODE_VIDEO
paths = self.config[CONFIG_KEY_DATA_SOURCE] if not None else []
if len(paths) < index:
raise Exception("Index cannot be greater than path size")
return
paths[index] = video_path
self.config[CONFIG_KEY_DATA_SOURCE] = paths
self.monitors.get_monitor_by_index(index).set_wallpaper(video_path)
if self.server is not None:
self.server.video(self.video_paths)
But i cannot reach more after server.(the code i sent will throw waiting string for video) I Overlooked for 1 hour but I cannot understand how this application set video as wallpaper.
Sorry if this has already been discussed, but I didn't see a submitted issue for this. I'd love to be able to use different video wallpapers per monitor.
If it matters, I'm running Manjaro Gnome 21.2.4.
Thanks!