GithubHelp home page GithubHelp logo

rasmuslindroth / i3keys Goto Github PK

View Code? Open in Web Editor NEW
128.0 4.0 7.0 97 KB

Lists available bindings for i3 or Sway with a graphical or text keyboard

License: MIT License

Go 91.36% CSS 4.54% JavaScript 4.10%
i3 i3wm i3-config i3-conf sway swaywm sway-config

i3keys's People

Contributors

ammgws avatar rasmuslindroth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

i3keys's Issues

sway: i3keys web - Supporting symbol key names starting with a capital letter.

Hi, thanks for providing and maintaining this nice tool!

My environment

I am using sway on Fedora Linux 38.

$ sway --version
sway version 1.8.1

I am using the i3keys on the current latest master branch 99e368e.

The issue summary

In sway, it's possible to define symbol keys as the name starting with a capital letter first such as Return, Space, Semicolon, Comma, Period, Slash. I can see these keys are not shown as occupied (red color) on the page by the i3keys web.

I don't see the capital letter first names worked in i3 config except "Return". But it's nice if i3keys considers the capital letter first key names.

I am using this sway config.
https://github.com/junaruga/framework-laptop-config/blob/main/home/.config/sway/config

set $mod Mod4
...
bindsym $mod+Return exec $term
...
bindsym $mod+Shift+Semicolon exec $term
...
# KEY_DELETE 111
bindsym $mod+Comma exec "sudo ydotool key 111:1 111:0"
# KEY_INSERT 110
bindsym $mod+Period exec "sudo ydotool key 110:1 110:0"
# KEY_ENTER 28
bindsym $mod+Slash exec "sudo ydotool key 28:1 28:0"
...
bindsym $mod+Semicolon mode "symbol"
bindsym $mod+Shift+Space mode "symbol"

I was able to see the following $mod+minus was shown as occupied.

bindsym $mod+minus scratchpad show

Here is the actual screenshot. You can see these capital letter first keys are not shown as occupied (red).

screenshot-i3keys-sway

"i3keys web" ==> Mod4+Alt keyboard does not have the Alt keys in green

For Debian Testing + sway 1.5.1-2 + Firefox ESR 78.13.0esr (64-bit).

The Mod4+Shift keyboard has both the Super_ and Shift_ modifier keys colored green.
The Mod4+Alt keyboard has only the Super_ keys colored green - the Alt_ keys are white.

I have no Mod4_Ctrl keybindings, so I suppose that is why there is no Mod4+Ctrl keyboard.
(Likewise with Mod4+Shift+Alt or Mod4+Ctrl+Alt or Mod4+Shift+Alt+Ctrl ... ?)

Therefore, I do not know if there is also a problem with the other modifier combinations...
NoGreenAlt

Support Ctrl+Shift

Hello,

I have some keybinds that use the Ctrl+Shift+key combination (for PrintScreen in my case), is it possible to support that? Eventually support all combinations automatically?

Thanks.

$HOME/go

Installing/updating via the AUR package seems to create the directory $HOME/go. Isn't there any way to avoid creating a new directory in $HOME?

couldn't expand the following command in include: HOME

Just for information, I noticed that an include like include $HOME/.config/sway/config.d/* (valid in sway and used by some distros) results in couldn't expand the following command in include: HOME.
This is of little consequence in practice, simply replacing $HOME with ${HOME} in the config works for both sway and i3keys.
I haven't used i3 in a long time but looks like it now supports includes and accepts that syntax too.
I just thought I'd mention it, personally I adjusted the config as above and called it a day.
Note, I'm using the 0.0.14-1 from the AUR.

expose parsing as a library.

I'll happily do the work necessary and generate a PR. would you be open to exposing a small api for parsing bindings?

no longer runs?

getting this error as of this week

panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/RasmusLindroth/i3keys/internal/i3parse.parseBinding(0xc00047c780, 0x5, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	internal/i3parse/parse.go:339 +0x2e5
github.com/RasmusLindroth/i3keys/internal/i3parse.parseConfig(0x8eb280, 0xc00000e660, 0xc0000267c0, 0x1a, 0xb71e88, 0x21, 0x40, 0x0, 0x0, 0x203000, ...)
	internal/i3parse/parse.go:210 +0x4f5
github.com/RasmusLindroth/i3keys/internal/i3parse.parse(0x8eb280, 0xc00000e660, 0x0, 0x0, 0x848040, 0xc000060c60, 0xc000158690, 0xc00015fb58, 0x1, 0x81e180, ...)
	internal/i3parse/parse.go:244 +0x96
github.com/RasmusLindroth/i3keys/internal/i3parse.ParseFromRunning(0x0, 0x0, 0xc000158460, 0x100010070, 0xc000158460, 0x4, 0xc00015fa58, 0x77b371, 0xc0000000c, 0xc000021200)
	internal/i3parse/parse.go:78 +0x78
github.com/RasmusLindroth/i3keys/internal/web.Output(0x0, 0x0, 0x7fffcb461a08, 0x4)
	internal/web/output.go:22 +0x50
main.main()
	i3keys.go:67 +0x55c

Variables in config

hey mate i dont know if you are still working on this but any way you could make it so that things like below will work. because i myself do you use bindsym in the config itself my keys dont seem to show up at all if you want an example of my config here it is

set $super      Mod4
set $super_b    bindsym Mod4
set $alt        Mod1
set $alt_b      bindsym Mod1
set $control    Control
set $control_b  bindsym Control
set $shift      Shift
set $shift_b    bindsym Shift
set $exe        exec --no-startup-id
set $exe_always exec_always --no-startup-id

Ordering of layouts

The ordering is currently based on which appears first in i3config. For me, this is:

Mod4+shift
Mod4
Mod4+Shift
No modifiers
Mod1+Mod4
Mod1
Mod1+shift
Mod4+ctrl
Mod4+ctrl+shift
Mod1+Mod4+shift
ctrl+shift
ctrl
shift
Mod1+Mod4+ctrl

It would be nice to get some consistency in sort order. For instance:

Mod4             # which I use more than Mod1... auto-detected?
Mod4+Shift       # combined with Mod4+shift
Mod4+Ctrl
Mod4+Ctrl+Shift

Mod1
Mod1+Shift

Mod1+Mod4
Mod1+Mod4+Shift

No modifiers
Shift
Ctrl
Ctrl+Shift

(And perhaps some way to filter prefixes (e.g. selecting Mod4) and show only those keyboard layouts, to prevent information overload. Or a table of contents with relative links. But that's outside the scope of this issue!)

Not clear on install instructions

I'm getting this error while trying to install

sam@***:[~/Downloads/i3keys] (master)
$ go install
go: downloading github.com/gorilla/handlers v1.4.0
go: downloading github.com/gorilla/mux v1.7.1
go: downloading go.i3wm.org/i3/v4 v4.17.0
go: downloading github.com/BurntSushi/xgbutil v0.0.0-20160919175755-f7c97cef3b4e
go: downloading github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802
# github.com/RasmusLindroth/i3keys/internal/xlib
internal/xlib/xlib.go:8:11: fatal error: X11/extensions/XTest.h: No such file or directory
    8 | // #include <X11/extensions/XTest.h>
      |           ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Show the image in an overlay?

There is a fairly widespread way of making overlays on Wayland using gtk-layer-shell.
For example, wlogout does it for logout buttons.

Would it be possible to add support to show the keymap in an overlay?

Add 'include' functionality

It would be very cool if this could handle 'include' statements in the config to pull in other config files with key definitions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.