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

Initial try on functions for sway/wayland #93

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

zauster
Copy link

@zauster zauster commented Jun 26, 2024

Hey,

I have a basic implementation of the needed functions for sway/wayland that mostly works. ydotoold has to run to be able to use this code. It mainly uses the commands proposed by msin32 here: #50 (comment)

What does not work:

  • mark a region, call (emacs-everywhere), modify that text and paste it back: nothing is pasted back into the input field
  • repeatedly calling (emacs-everywhere) in the same input field does not always paste the text

@zauster zauster mentioned this pull request Jun 26, 2024
@tecosaur
Copy link
Owner

tecosaur commented Jul 9, 2024

This looks like something I'll be happy to merge, thanks @zauster! At a glance, three comments come to mind:

  • Since availability of particular wayland do-style tools is spotty across distros/repositories (for now at least), I think it would be good to try to support ydotool just prefer dotool, as opposed to switching them out.
  • I don't like the shell call swaymsg -t get_tree | jq '.. | select(.type?) | select(.focused==true)', can't we process the json ourselves without too much difficulty?
  • There seem to be some unrelated whitespace changes

@zauster
Copy link
Author

zauster commented Jul 9, 2024

Hey,
I adapted the PR according to your points 1 and 3.

I agree that it would be nicer to do the json parsing in elisp. But my
elisp is still quite rudimentary, so it might take a while until I
have something like that ready.

@tecosaur
Copy link
Owner

tecosaur commented Jul 9, 2024

I don't have dotool conveniently packaged, could you share some example JSON output?

@zauster
Copy link
Author

zauster commented Jul 9, 2024

Sure, here you go:
swaymsg_tree.json

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

Successfully merging this pull request may close these issues.

3 participants