Giter Club home page Giter Club logo

Comments (16)

jian-lin avatar jian-lin commented on July 21, 2024 2

FYI, I made a Gnome shell extension to display kanata layer info.

https://github.com/jian-lin/kanata

from kanata.

rszyma avatar rszyma commented on July 21, 2024 2

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.

rszyma avatar rszyma commented on July 21, 2024 1

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.

jtroo avatar jtroo commented on July 21, 2024 1

Thanks for the great work! Mention of kanata-tray is now included in README.

from kanata.

jtroo avatar jtroo commented on July 21, 2024

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.

13minutes-yt avatar 13minutes-yt commented on July 21, 2024

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.

LGUG2Z avatar LGUG2Z commented on July 21, 2024

#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.

Prometheus720 avatar Prometheus720 commented on July 21, 2024

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.

Fred-Vatin avatar Fred-Vatin commented on July 21, 2024

#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.

Fred-Vatin avatar Fred-Vatin commented on July 21, 2024

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.

rszyma avatar rszyma commented on July 21, 2024

I'm not entirely sure what you mean by "toast overlay"

Can you show an example?

from kanata.

Fred-Vatin avatar Fred-Vatin commented on July 21, 2024

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.

Gif Animate 2024-02-09 21h21 #3411 _optimized

from kanata.

rszyma avatar rszyma commented on July 21, 2024

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.

Fred-Vatin avatar Fred-Vatin commented on July 21, 2024

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.

gerhard-h avatar gerhard-h commented on July 21, 2024

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

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.

patrikkj avatar patrikkj commented on July 21, 2024

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)

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.