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

how to invoke shortcuts from terminal #325

Closed
ghost opened this issue Oct 30, 2019 · 10 comments
Closed

how to invoke shortcuts from terminal #325

ghost opened this issue Oct 30, 2019 · 10 comments

Comments

@ghost
Copy link

ghost commented Oct 30, 2019

how can i invoke wayfire shortcut from terminal.
ex.
i want to leave wayfire session (logout) using
terminal.
and want to create a logout.desktop
file and add as an launcher in wf-panel.
in x
xdotool can do this with

xdotool key ctrl + alt + backspace

also i want to use libinput-gestures to invoke wayfire keyboard shortcuts with touchpad gestures.

how to invoke various wayfire functions with terminal.

in kwin its executed this way

qdbus org.kde.kglobalaccel /component/kwin invokeShortcut "Switch to Next Desktop"

@soreau
Copy link
Member

soreau commented Oct 30, 2019

You can write evdev events using a script like this. To trigger plugin bindings as user, there would need to be some interface, maybe dbus or a custom protocol that wouldn't require root.

@ghost
Copy link
Author

ghost commented Nov 1, 2019

you wont mind ?
@ammen99
@soreau
if i make a
linux spin with wayfire
and
name it wayfire linux.
it will be based on manjaro unstable branch.
i am going to use
gnome apps with it.
and cmst for network
and no gnome control centre.

@ammen99
Copy link
Member

ammen99 commented Nov 1, 2019

@librewish, wayfire is open-source and MIT licensed, you can do almost anything you want :) And I am also fine with you using the name. Only please specify that your project is made by yourself, and not us.

@ghost
Copy link
Author

ghost commented Nov 1, 2019

okay thanks.
here is a screenshot of how it will look.
slurped-2019-11-01-12:20:47

@ghost
Copy link
Author

ghost commented Nov 21, 2019

You can write evdev events using a script like this. To trigger plugin bindings as user, there would need to be some interface, maybe dbus or a custom protocol that wouldn't require root.

adding the user to plugdev group
eliminates the need for root access to use the script.

also i found
ydotool

https://github.com/ReimuNotMoe/ydotool

which does the xdotool job.
without requiring x.

@ammen99
Copy link
Member

ammen99 commented Aug 1, 2020

Duplicate of #49

@ammen99 ammen99 marked this as a duplicate of #49 Aug 1, 2020
@ammen99 ammen99 closed this as completed Aug 1, 2020
@damianatorrpm
Copy link
Contributor

@librewish Checkout https://github.com/damianatorrpm/wayfire-plugin_dbus_interface
if you want to implement xdotool functionality there is an open issue and it shouldn't be too hard.

@ammen99
Copy link
Member

ammen99 commented Aug 1, 2020

@damianatorrpm My first impression was that they wanted to have a way to trigger activators from cmdline.

@damianatorrpm
Copy link
Contributor

damianatorrpm commented Aug 1, 2020

@ammen99 that's one way to achieve this, they could of course do this , or send ctrl + alt + backspace via an xdotool like command gdbus call --sesion org.wayland.compositor / org.wayland.compositor.send_keys ['ctrl', 'alt', 'backspace']
whatever they feel more comfortable with, after all the goal was to make an icon to do action X, the other things may be implementation details

@AdrianVovk
Copy link
Contributor

@damianatorrpm Having to send keys means that the external program would have to parse wayfire's config and then decide which keys to send based on that. No good

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

4 participants