Skip to content
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

Would it be possible to implement some python plugin api? #2

Open
dolphin-cat opened this issue Apr 9, 2023 · 0 comments
Open

Would it be possible to implement some python plugin api? #2

dolphin-cat opened this issue Apr 9, 2023 · 0 comments

Comments

@dolphin-cat
Copy link

example code:

import tuxapi, os
tux = tuxapi.gettux()
events = tuxapi.geteventapi()
@events.onclick
def onclick(tuxinstance):
    if tuxinstance.position.x = 69 and tuxinstance.position.y = 96:
        tuxapi.showmessagebox(str(tuxapi.procid()))
def tuxopenfirefox(tuxinstance):
    tuxinstance.setpos(69, 96)
    os.popen("firefox")
tuxapi.registerbehaviour(tuxopenfirefox)
tuxapi.plugin.ready()

and like you'd put that in a file in like /etc/desktoptux/plugins/.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant