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

Chords do not work #101

Closed
xircon opened this issue Mar 28, 2022 · 7 comments · Fixed by #135
Closed

Chords do not work #101

xircon opened this issue Mar 28, 2022 · 7 comments · Fixed by #135
Assignees
Labels
Bug Something isn't working

Comments

@xircon
Copy link

xircon commented Mar 28, 2022

Version Information:

  • Distribution Information ( run uname -a )
    Linux xircon-w6567sz 5.16.16-zen1-1-zen #1 ZEN SMP PREEMPT Mon, 21 Mar 2022 22:59:42 +0000 x86_64 GNU/Linux
  • swhkd version ( swhkd -V )
    swhkd 1.1.7

Describe the bug:
Chords not working

super + n:  {n,p,d,x}
    {variety -n, variety -p, variety -t, variety --pause && notify-send Paused} 
[2022-03-28T13:43:13Z ERROR swhkd] Config Error: Error parsing config file "/etc/swhkd/swhkdrc". Unknown symbol at line 11.

Expected behavior:
Should work as it does in sxhkd.

Actual behavior:
See error swhkd does not load.

@xircon xircon added the Bug Something isn't working label Mar 28, 2022
@Shinyzenith
Copy link
Member

This is a known bug, we have implemented chords in the config but daemon doesn't support it yet.
Eden, who is working on it is currently sick so it'll be implemented as soon as they're back!

@Shinyzenith Shinyzenith pinned this issue Mar 28, 2022
@EdenQwQ
Copy link
Member

EdenQwQ commented Jun 14, 2022

@xircon would you mind trying out the new branch where we implemented a new feature called modes, which is supposed to work similar to chords but with a greater readability and functionality.

The basic syntax of key modes:

# the default mode is `normal` mode, which is always on the bottom of the mode stack
super + m
    # commands starting with `@` are internal commands. Internal commands can be combined with normal commands with `&&`
    # @enter will push a mode into the mode stack
    @enter music && echo music > .swhkd_mode

mode music # define a mode with the `mode` statement
super + {n,p,space}
    mpc {next,prev,pause}
q
    @escape # an internal command to pop the current mode out of the mode stack
endmode # end a mode definition with `endmode`

@EdenQwQ EdenQwQ unpinned this issue Jun 14, 2022
@xircon
Copy link
Author

xircon commented Jun 14, 2022

Seems to work OK, need to get my head around it, will have some questions 😄
First one:

  • @Enter music && echo music > .swhkd_mode
    This is set, but never unset? The file always contains music.

  • KP_Add & KP_Subtract don't work as keys.

@EdenQwQ
Copy link
Member

EdenQwQ commented Jun 14, 2022

Thanks for your tests

  • that .swhkd_mode is for something like waybar integration and I forgot to write echo normal > .swhkd_mode after the @escape
  • Will check out the key issue later

@Shinyzenith
Copy link
Member

Seems to work OK, need to get my head around it, will have some questions smile First one:

  • @Enter music && echo music > .swhkd_mode
    This is set, but never unset? The file always contains music.
  • KP_Add & KP_Subtract don't work as keys.

Hi kpsubtract and kpplusminus exists, can you try binding them?

@EdenQwQ EdenQwQ linked a pull request Jun 15, 2022 that will close this issue
@xircon
Copy link
Author

xircon commented Jun 15, 2022

@Shinyzenith - kpminus works for the "-" key (numeric keypad), kpplusminus is valid, but does nothing as do all combinations I invented which all error 😄

@Shinyzenith
Copy link
Member

Chords should work now, if you face any issue then please make a new ticket 😁.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Development

Successfully merging a pull request may close this issue.

5 participants