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

Cannot start under x11 and wayland, an error occurs #276

Open
linux36524 opened this issue Nov 10, 2024 · 5 comments
Open

Cannot start under x11 and wayland, an error occurs #276

linux36524 opened this issue Nov 10, 2024 · 5 comments

Comments

@linux36524
Copy link

linux36524 commented Nov 10, 2024

thread 'main' panicked at swhkd/src/config.rs:7:80:
called Result::unwrap() on an Err value: Grammar(Error { variant: ParsingError { positives: [command], negatives: [] }, location: Pos(204), line_col: Pos((7, 2)), path: Some("/home/xxx/.config/swhkd/swhkdrc"), line: "button8", continued_line: None, parse_attempts: None })
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

@Shinyzenith
Copy link
Member

Hi @linux36524 it seems your configuration file is incorrect
Cc: @lavafroth

@Shinyzenith Shinyzenith reopened this Nov 11, 2024
@lavafroth
Copy link
Contributor

lavafroth commented Nov 11, 2024 via email

@linux36524
Copy link
Author

linux36524 commented Nov 12, 2024

Hi. It seems you're either attempting to use the key 8 from numeric row or the keypad. If you wish to use the numeric row key, simply use 8 instead of button8. If it is the other one, use kp8. All of the key names are the same as defined in the kernel without the KEY_ prefix.

button8 is the mouse button.
This is the configuration of sxhkd, no problem,

button8
	xte 'keydown Alt_L' 'key n' 'keyup Alt_L'

But when ported to swhkd, it is like this, is there anything wrong with writing it this way?

button8
	wtype -M alt n -m alt

@lavafroth
Copy link
Contributor

lavafroth commented Nov 12, 2024 via email

@linux36524
Copy link
Author

I'm afraid there is no implementation for the mouse button in swkhd. Let me consult @Shinyzenith and check if we want to implement this.

OK, thanks

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

No branches or pull requests

3 participants