Comments (9)
If we are gonna do JSON files, maybe something like this:
{
// Don't include / have empty list to use all keyboards
"use_keyboards": [
"/dev/input8"
]
// All combos we should look for
"combos": [
{
"keys": ["SUPER", "m"],
"action": {
"working_dir": "~",
"environment_vars": [
{
"name": "DEBUG",
"value": "1"
}
]
"command": "mousepad"
}
}
]
}
(Obviously, this is trying to show off every setting you can use)
from swhkd.
Have you seen the config file of sxhkd? I plan to clone it exactly as is.
from swhkd.
That's probably a better idea :)
from swhkd.
I think making the config file of sxhkd and swhkd cross compatible will be the better idea rather than using something like TOML or JSON
mod edit:
#8 (comment)
from swhkd.
@angelofallars Hi angelo, you can go ahead and make a config-devel branch for your work.
Please do send a PR if possible and mark it as a draft if you do 🥰
from swhkd.
Will do!
from swhkd.
https://github.com/baskerville/sxhkd/blob/master/src/parse.c I believe this can help you @angelofallars
from swhkd.
any updates on this?
from swhkd.
I finally added a basic config parser: see commit on config
252ce9f . I also wrote some unit tests to test the config parser, as it was the only way to test it. It is still not complete, however.
As an example, here's a config file that "works":
r
alacritty
w
kitty
t
/bin/firefox
TODO:
- Add more supported key presses (alphabetical, numerical, insert, home, delete, end, super, etc)
- Add chained keybindings (
super + g
,shift + 1
,shift + ctrl + o
) - Add error handling for config errors (example: keybinding without command, invalid/unrecognizable keybind combination)
from swhkd.
Related Issues (20)
- Keyboard stops working after running `pkexec swhkd` HOT 6
- How to express this sxkhd underscore-range idiom in swkhd?
- `XDG_RUNTIME_DIR` is not a typo HOT 1
- `/dev/input/mouse1`: Inappropriate ioctl for device HOT 10
- compositor pkexec swhkd invocation is buggy
- documentation for multiple config loading
- pkexec alternative ?
- Can't compile (make: rustup: No such file or directory make: *** [Makefile:61: setup] Error 127) HOT 2
- Systemd service won't start HOT 2
- swhkd doesn't compile, returns Makefile 25 error HOT 10
- Proposal: Better Path handling Mechanisms HOT 3
- Mouse events occur twice HOT 2
- [enchancement] Add Path Validations to Environment Variables
- feat: generate default config HOT 1
- [enchancement] Fork into SWHKS when not detected HOT 3
- Swhks stops after login HOT 5
- Use rust build scripts/GH integration instead of Makefile
- compatibility with hyprland HOT 1
- XF86AudioStop not being recognized HOT 1
- install guide turns off NetworkManager wifi
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swhkd.