Advertisement
bluebyt

mpvWorkspace.py

Sep 16th, 2024 (edited)
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/python3
  2.  
  3. from wayfire import WayfireSocket
  4.  
  5. sock = WayfireSocket()
  6. sock.watch(['view-mapped'])
  7.  
  8. while True:
  9.     msg = sock.read_next_event()
  10.     # The view-mapped event is emitted when a new window has been opened.
  11.     if "event" in msg:
  12.         view = msg["view"]
  13.         if view["title"] == "Paramore Last Hope.mp4 - mpv":
  14.             sock.configure_view(view["id"], 1304, 717, 812, 476)
  15.             sock.set_workspace(2, 2, view["id"])
  16.  #          exit(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement