waybind
waybind copied to clipboard
Specific keybinds per an app?
Do you think you'd be able to do something similar to xkeysnail? It uses x11 to figure out the active window though, something wayland is not likely to support vs communicating to the DE imo, but I would interested to know your thoughts.
https://github.com/mooz/xkeysnail
I also brought this up here https://github.com/snyball/Hawck/issues/6.
This wouldn't be impossible but would require us to support every single different method of getting the focused window (limited to wayland WMs).
For example in sway I can get it simply using swaymsg
:
>> swaymsg -t get_tree | jq '.nodes[].nodes[].nodes[] | select(.focused)'
{
"id": 1024,
"name": "swaymsg -t get_tree | jq '.nodes[].nodes[].nodes[] | select(.focused)'",
"rect": {
"x": 1283,
"y": 36,
"width": 1271,
"height": 1398
},
"focused": true,
"focus": [],
"border": "pixel",
"current_border_width": 2,
"layout": "none",
"orientation": "none",
"percent": 0.49882260596546313,
"window_rect": {
"x": 2,
"y": 2,
"width": 1267,
"height": 1394
},
"deco_rect": {
"x": 0,
"y": 0,
"width": 0,
"height": 0
},
"geometry": {
"x": 0,
"y": 0,
"width": 800,
"height": 600
},
"window": null,
"urgent": false,
"marks": [],
"fullscreen_mode": 0,
"nodes": [],
"floating_nodes": [],
"sticky": false,
"type": "con",
"pid": 23757,
"app_id": "Alacritty", <- Looks useful
"visible": true,
"max_render_time": 0,
"shell": "xdg_shell",
"inhibit_idle": false,
"idle_inhibitors": {
"user": "none",
"application": "none"
}
}
I don't have much use for this myself and I'm a bit reluctant of complicating this app too much. But I'll keep this open for now.