Skip to content

How to run a script when viewport changes? #2470

Answered by soreau
vdegenne asked this question in Q&A
Discussion options

You must be logged in to vote

IPC is probably the best way to go, especially if you're using latest wayfire. You can use sock.watch["wset-workspace-changed"] to receive this data set. For this to work, you will need to enable ipc and ipc-rules plugins, and install pywayfire with python pip. The other way is to write a wayfire plugin which calls wf::get_core().run(cmd); when it gets the wf::workspace_changed_signal signal internally.

Replies: 1 comment 12 replies

Comment options

You must be logged in to vote
12 replies
@soreau
Comment options

@vdegenne
Comment options

@soreau
Comment options

@soreau
Comment options

@vdegenne
Comment options

Answer selected by vdegenne
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants