Comments (16)
FYI, I made a Gnome shell extension to display kanata layer info.
https://github.com/jian-lin/kanata
from kanata.
I've just released kanata-tray v0.1.0, which is a tray-app wrapper for kanata for Windows and Linux.
https://github.com/rszyma/kanata-tray
PS: Technically should work on macOS too, but I have no way to test it there.
from kanata.
The kind of overlay notification on desktop like the one sent by some keyboard keys state (capslock, num…)
Oh, I thought this was a native windows popup, it turns out it's generated by Logi Options+ https://www.reddit.com/r/Windows11/comments/xqj60m/caps_lock_onoff_notification/
Anyways, I've created an issue in kanata-tray repo to track this feature request: rszyma/kanata-tray#3
from kanata.
Thanks for the great work! Mention of kanata-tray is now included in README.
from kanata.
Sounds like a nice feature, though I myself would not make use of it. I'm unfamiliar with desktop programming so I probably won't work on this in the foreseeable future.
I'm happy to assist if you or someone else would like to try adding it to kanata. It shouldn't be too hard to wrap kanata in e.g. Python if it's more familiar and is easier to do GUI programming with. For example, a Python program could run kanata as a subprocess and communicate via stdin and stdout.
from kanata.
I am not a programmer myself. What I use is a simple bash script
if pidof kanata_cmd_allowed | grep [0-9] > /dev/null
then
killall kanata_cmd_allowed && notify-send "kanata killed"
else
$HOME/Documents/scripts/kanata_cmd_allowed --cfg mykanata1.kbd & notify-send "kanata started"
fi
It is for notification when kanata starts or killed. I add the script to a tint2 panel as an executor icon.
It cannot be used as a general option
I had a look at https://github.com/olback/tray-item-rs, but I didn't understand anything:). All rust thing. hehe
from kanata.
#44 Once this is ready to be merged, anyone should be able to connect to a TCP socket on kanata
to receive push notifications of layer changes, and then use that data to update widgets on bars or system tray icons.
from kanata.
I am seeking to migrate from EPKL which is Windows only because it runs on Autohotkey. This is a huge weakness that Kanata does not share.
However, the way that it handles tray support is very reasonable (if not the best way) and might serve as a good conceptual guide to how to implement tray support in a similar type of application.
from kanata.
#44 Once this is ready to be merged, anyone should be able to connect to a TCP socket on
kanata
to receive push notifications of layer changes, and then use that data to update widgets on bars or system tray icons.
This is great. On Windows, we would need to be able to start kanata with a no window mode (as a service maybe ?) Then the client could start kanata, passing arguments like --cfg
and --port
.
Edit
About a GUI with tray icon, we could use tauri. It’s cross-platform, use rust to serve a frontend webview. Here is a tray menu example . Like electron but very light and fast. Technically, I guess we could use it to display layer change in a toast overlay. The thing is, do we build kanata using tauri or do we build an external client with tauri to receive layer change and even more ?
from kanata.
Thanks. This is awesome ! Now kanata can run in the tray only. Do you plan to add
display layer change in a toast overlay
?
I’m the kind of guy who auto hide the windows toolbar. So icon in the tray to show layer status, although awesome, is not very helpful for weirdos like me.
from kanata.
I'm not entirely sure what you mean by "toast overlay"
Can you show an example?
from kanata.
The kind of overlay notification on desktop like the one sent by some keyboard keys state (capslock, num…). It would be great if we could set their position, text color, background color, size, position, duration or fixed.
from kanata.
I quickly google searched how to create this kind of popup, but didn't find any releavant info. An alternative would be to create a native popup in notification area. This can be easily done both on Linux (via notify-send
command) and on Windows (see this).
from kanata.
I faced the same problem with google search in the past. I posted the question on Tauri month ago on how to display those kind of overlay. I got an answer but didn’t have the time to test. I guess it would be the same method with go. Display a window with these properties : decorations: false
, ignoreCursorEvents: true
and focus: false
or any equivalent in golang.
tauri-apps/tauri#7951
Check this go project : https://github.com/progrium/topframe (mac os unfortunately)
from kanata.
I've just released kanata-tray v0.1.0, which is a tray-app wrapper for kanata for Windows and Linux.
I used NUMLOCK
to get an audio and toast warning for dangerous layers, but your tool is much cooler. :)
;; numlock on
nly (cmd-output-keys powershell.exe "if ($([console]::NumberLock) -match 'True') { echo '()' } else { echo '(nlck)' }")
;; numlock off
nln (cmd-output-keys powershell.exe "if ($([console]::NumberLock) -match 'True') { echo '(nlck)' } else { echo '()' }")
base (multi (layer-switch base ) @nln)
numfix (multi (layer-switch numfix) @nly)
from kanata.
Dropping this here in case it's helpful.
Wrote a script to launch kanata as a background daemon on mac - #1086
from kanata.
Related Issues (20)
- Bug: Release 1.6.1 macos_x86_64 executable isn't what it says. HOT 6
- Feature request: Show keystroke or can let other app know the real key is stroked. HOT 2
- Feature request: Can we have a more flexible unmod? HOT 1
- See if windows shift workaround can be compiled out for winiov2 HOT 1
- Bug: kanata does not work properly with listary HOT 3
- `release-key` releases both sides of a mod and not just one, e.g. `lctl` and `rctl` or `lmet` and `rmet` HOT 7
- Feature request: Compile-time conditional mappings HOT 1
- chordsv2 activation does not trigger early interruption of `tap-hold-press|release` HOT 9
- make macro-release-cancel also cancel virtual keys HOT 1
- Bug: switch's layer logic not recognized HOT 2
- Feature request: remove dependency on AutohotKey for EnableUIAccess
- Bluetooth keyboard cannot use without Chicony Keyboard attached on Thinkpad X1 Tablet Gen 3 HOT 9
- unable to set linux-use-trackpoint-propety HOT 3
- one-shot shift interferes with defoverrides HOT 5
- Feature request: chord toggle action HOT 1
- Feature request: homebrew
- Bug: special buttons on function row not working on macos HOT 2
- Bug: chord v2 overlapping chords HOT 2
- Bug: tray icons change randomly when layer changes by Meta key.
- Bug: S-home does not work as expected HOT 1
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 kanata.