Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kanata native Windows GUI tray app #990

Merged
merged 154 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
6fff86f
win-tray: add icon
eugenesvk Apr 18, 2024
013a05c
win-tray: move main to m_cli
eugenesvk Apr 28, 2024
3a71ddd
win-tray: add main_gui
eugenesvk Apr 18, 2024
a7f9a81
win-tray: fix guards
eugenesvk Apr 18, 2024
9221e6a
win-tray: move code to the lib
eugenesvk Apr 19, 2024
8928aff
win-tray: update main
eugenesvk Apr 28, 2024
5802433
win-tray: disable console with a gui app
eugenesvk Apr 28, 2024
6b06a90
win-tray: add IS_CONSOLE as a lazy static
eugenesvk Apr 21, 2024
0682b0f
win-tray: update import
eugenesvk Apr 19, 2024
c55eca3
gui build: add manifest to avoid STATUS_ENTRYPOINT_NOT_FOUND error
eugenesvk Apr 18, 2024
a1890d9
win-tray: add tray icon construction before llhook's gui loop
eugenesvk Apr 28, 2024
9830ba3
win-tray: combine common things in lib_main
eugenesvk Apr 21, 2024
13a0aa7
win-tray: update lib
eugenesvk Apr 22, 2024
9356724
win-tray: update lib main
eugenesvk Apr 28, 2024
8569975
win-tray: rename to gui_win for Win
eugenesvk Apr 28, 2024
b3cd5a4
win-tray: handle exit sequence and stop dispatch to hide the tray icon
eugenesvk Apr 24, 2024
3deba08
win-tray: add dpi awareness to the manifest
eugenesvk Apr 23, 2024
79fa0ec
gui-tray: fix manifest format
eugenesvk Apr 23, 2024
f287340
win-tray: update manifest
eugenesvk Apr 23, 2024
40f8370
win-tray: attempt to fix some manifest signing issues, replace Enable…
eugenesvk Apr 28, 2024
56bad59
win-tray: update manifest
eugenesvk Apr 23, 2024
3880663
win-tray: add request_live_reload
eugenesvk Apr 28, 2024
d0c199f
win-tray: update guards
eugenesvk Apr 28, 2024
9f001b1
win-tray: add request live reload n function
eugenesvk Apr 25, 2024
c897742
doc(gui): update AHK installer guide
eugenesvk Apr 26, 2024
6e402e2
log: update error context message
eugenesvk Apr 28, 2024
610f62f
win-tray: add tray builder to llhook near main thread loop
eugenesvk Apr 28, 2024
235000c
win-tray: add win-tray-icon support to user config
eugenesvk Apr 28, 2024
4417eb7
dep(gui): add gui feature
eugenesvk Apr 18, 2024
100e492
dep: add win_dbg_logger to the workspace
eugenesvk Apr 28, 2024
ea17ae6
dep(gui-tray): add highdpi, allow embed, parsing non.ico images
eugenesvk Apr 28, 2024
8becb14
win-tray: extend existing winmanifest instead of appendign a few line…
eugenesvk Apr 28, 2024
9e0084d
dep(gui): add gui feature to parser
eugenesvk Apr 28, 2024
7b9f66b
win-tray: update live reload function and win_tray_icon config
eugenesvk Apr 27, 2024
202d9e9
doc(gui-tray): update config adoc
eugenesvk Apr 27, 2024
8208910
dep: add windbg log for win logging without console
eugenesvk Apr 22, 2024
781c492
win-tray: embed icon
eugenesvk Apr 23, 2024
cff15fe
win-tray: replace derive with manual builder
eugenesvk Apr 23, 2024
5292836
win-tray: handle window close
eugenesvk Apr 24, 2024
6960da4
win-tray: add tray builder function
eugenesvk Apr 28, 2024
a614ed7
win-tray: add config reloading support
eugenesvk Apr 28, 2024
f0d11d7
clippy fmt
eugenesvk Apr 28, 2024
b50362f
clippy
eugenesvk Apr 28, 2024
4e0d51c
clippy fix test import
eugenesvk Apr 28, 2024
4ed6e22
ahk: silence debug msgbox
eugenesvk Apr 28, 2024
d1681e9
doc: update 'gui' feature
eugenesvk Apr 28, 2024
145a57c
__fix weird doc test fail
eugenesvk Apr 28, 2024
663c1ef
fmt
eugenesvk Apr 28, 2024
684def0
doc: update AHK install instructions
eugenesvk Apr 30, 2024
6a1d414
format
eugenesvk Apr 30, 2024
3249fc5
format
eugenesvk Apr 30, 2024
d8a0ba3
dep: move NWG features needed for win-tray to the "gui" feature
eugenesvk Apr 30, 2024
8eeec54
remove unused cfg guards
eugenesvk Apr 30, 2024
61ee020
move win-specific functions to Windows module
eugenesvk Apr 30, 2024
e2ac98f
add unknown to support WASM in new wintray cfg
eugenesvk Apr 30, 2024
8b72e1f
update icon
eugenesvk Apr 30, 2024
0ed4d43
remove m_
eugenesvk Apr 30, 2024
e82bd9d
cargo fmt
eugenesvk Apr 30, 2024
81b212e
remove unused imports
eugenesvk Apr 30, 2024
c81d4bb
remove warning on empty icon config
eugenesvk Apr 30, 2024
72d974e
gui: dep: add notice NWG feature
eugenesvk May 2, 2024
9218979
gui: move gui creation from llhook to lib main to allow passing gui n…
eugenesvk May 2, 2024
b9c440b
gui: let processing loop notify on layer changes
eugenesvk May 2, 2024
1a4a7a1
gui: add layer_notice notification receiver to get notified on layer …
eugenesvk May 2, 2024
ff12426
gui: cfg: initial support for specifying icons in config as part of t…
eugenesvk May 2, 2024
3383c19
gui: add cfg support for icon
eugenesvk May 2, 2024
3576920
gui: cfg: remove feature flags as configs should work everywhere
eugenesvk May 2, 2024
7725397
gui: cfg trim icon from quotes
eugenesvk May 1, 2024
5b4efec
gui: rename to tray_icon
eugenesvk May 2, 2024
795f421
gui: doc: add icon config example
eugenesvk May 1, 2024
3ad6f22
rename to tray_icon
eugenesvk May 2, 2024
095e8f5
fmt
eugenesvk May 2, 2024
7045bbf
gui: update config/layer icon functions
eugenesvk May 2, 2024
beb4dba
gui: update layer tooltip format
eugenesvk May 2, 2024
208f73f
gui: update debug
eugenesvk May 2, 2024
642e4d4
gui: use up-to-date icon_match_layer_name
eugenesvk May 2, 2024
de39eff
fmt
eugenesvk May 2, 2024
3d47cde
gui: make icon log messages a debug level
eugenesvk May 2, 2024
da40fde
gui: cfg icon fix wrong conditional
eugenesvk May 2, 2024
c7653c8
clippy
eugenesvk May 2, 2024
2e87eea
gui: dep: add menu icons
eugenesvk May 3, 2024
987191d
gui: vendor nwg extension
eugenesvk May 2, 2024
e386f3f
gui: extend nwg Menu to show icons in Menu
eugenesvk May 3, 2024
472f5d5
gui: add nwg ext module
eugenesvk May 3, 2024
b41cc4c
gui: add menu item icons
eugenesvk May 3, 2024
fb0fb56
gui: add reload icon
eugenesvk May 2, 2024
67c76e7
gui: add a loader for menu tray icons per config file
eugenesvk May 3, 2024
a3d2172
gui: move icon path parsing functions outside of SystemTray impl as t…
eugenesvk May 3, 2024
759d743
gui: reformat
eugenesvk May 3, 2024
9c4e556
gui: show currently active icon in the cfg group menu
eugenesvk May 3, 2024
c490e0b
future fix: revert index on failed config reload
eugenesvk May 3, 2024
81caca1
gui: return Result from reload_cfg
eugenesvk May 3, 2024
1686e7d
gui: update config tray icons on menu hover
eugenesvk May 3, 2024
071195a
gui: move set_menu_item_cfg_icon out of UI
eugenesvk May 3, 2024
5801431
gui: add a function to update config group icon
eugenesvk May 3, 2024
a5e2c53
gui: reset menu item image cache as well on config reload
eugenesvk May 3, 2024
bfed72d
gui: avoid main tray icon flashing from config icon to layer icon
eugenesvk May 3, 2024
5fa298d
gui: move ui back to event loop to avoid panicks on exits via GUI
eugenesvk May 3, 2024
2bd5431
fix formatting
eugenesvk May 3, 2024
b095dc3
doc: use smaller icons
eugenesvk May 3, 2024
1999abb
revert gui: let processing loop notify on layer changes
eugenesvk May 4, 2024
53e30db
win-tray: store GUI notifier in a static var
eugenesvk May 4, 2024
c99ab76
win-tray: use static GUI notifier
eugenesvk May 4, 2024
67c1075
format
eugenesvk May 4, 2024
32e8582
fix a comment
eugenesvk May 4, 2024
9999e31
parser: convert parse_action_as_cfg to functional notation
eugenesvk May 4, 2024
e2c0035
Update src/kanata/mod.rs
eugenesvk May 4, 2024
1be460c
Update src/kanata/mod.rs
eugenesvk May 4, 2024
1eb70c7
win-tray: fix default value to read from options
eugenesvk May 4, 2024
23b819f
win-tray: remove unneeded console no-close-on-error guard when there …
eugenesvk May 4, 2024
9dee8bb
cargo fmt
eugenesvk May 4, 2024
02b0cd5
Revert "parser: convert parse_action_as_cfg to functional notation"
eugenesvk May 4, 2024
e56215e
Revert "fix a comment"
eugenesvk May 4, 2024
3340060
Revert "clippy"
eugenesvk May 4, 2024
aaac2d5
Revert "gui: cfg icon fix wrong conditional"
eugenesvk May 4, 2024
85bb5cd
revert fmt
eugenesvk May 4, 2024
6c0a0ac
Revert "gui: cfg trim icon from quotes"
eugenesvk May 4, 2024
105af4c
Revert "gui: cfg: remove feature flags as configs should work everywh…
eugenesvk May 4, 2024
f6695d0
Revert "gui: add cfg support for icon"
eugenesvk May 4, 2024
ff58f74
Revert "gui: cfg: initial support for specifying icons in config as p…
eugenesvk May 4, 2024
317dca0
cfg: add initial support for specifying layer icons in config
eugenesvk May 4, 2024
515f96d
win-tray: move icon config to a layer name instead of having a specia…
eugenesvk May 4, 2024
6ca811a
cargo fmt, clippy
eugenesvk May 4, 2024
8f2be35
doc: update tray icon format
eugenesvk May 4, 2024
1d2a22b
fix missing logging
eugenesvk May 4, 2024
05e6e1f
win-tray: dep: update lock file
eugenesvk May 4, 2024
352faaf
make Args pub to be used in gui
eugenesvk May 5, 2024
2534646
win-tray: move gui win to a separate folder
eugenesvk May 5, 2024
2bafd0b
win-tray: update gui references to the new mod
eugenesvk May 5, 2024
39ee0db
cargo fmt
eugenesvk May 5, 2024
a5cff36
win-tray: move gui notice sender to gui mode
eugenesvk May 5, 2024
902248b
Revert "make Args pub to be used in gui"
eugenesvk May 5, 2024
4a89fe0
win-tray: dupe Args from cli
eugenesvk May 5, 2024
f1b4628
win-tray: move cli back to main
eugenesvk May 5, 2024
8079198
dep: update lock
eugenesvk May 5, 2024
d91b97f
dep: remove lazy static
eugenesvk May 5, 2024
81331df
windbg: replace lazy static with std and a macro
eugenesvk May 5, 2024
3314c55
dep: update lock
eugenesvk May 5, 2024
430330c
refactor(parser): extract parse_layer_opts into a separate function
eugenesvk May 5, 2024
9a38688
test: icon layer opts
eugenesvk May 5, 2024
602c76c
doc(win-tray): add screenshot/video
eugenesvk May 5, 2024
1f4fd41
move/rename files to match conventions better
jtroo May 5, 2024
6e76660
reduce cfg usage in main.rs
jtroo May 5, 2024
7d0bfb9
move main code to main
jtroo May 5, 2024
a1fe3e4
apply clippy auto-fixes
jtroo May 5, 2024
5f52487
clippy/fmt gui
jtroo May 5, 2024
66e4b76
add gui to ci
jtroo May 5, 2024
02645cd
use slice instead of iter, deduplicate, use None
jtroo May 5, 2024
0bd4643
random fix I noticed while refactoring
jtroo May 5, 2024
af1ea80
refactor
jtroo May 5, 2024
fddd7c0
add to tests, use chunk_exact
jtroo May 5, 2024
a3b1db8
split long comments+code
eugenesvk May 6, 2024
4efe19e
split long comments+code
eugenesvk May 6, 2024
eb658e2
chore(justfile): add gui check/format commands
eugenesvk May 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ jobs:
- name: Run clippy simulated output
run: cargo clippy --all --features=simulated_output,cmd -- -D warnings

- name: Run tests gui
run: cargo test --all --features=gui
- name: Run clippy gui
run: cargo clippy --all --features=gui -- -D warnings

build-test-clippy-macos:
runs-on: ${{ matrix.os }}
strategy:
Expand Down
79 changes: 70 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 19 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ members = [
"tcp_protocol",
"simulated_input",
"windows_key_tester",
"win_dbg_logger",
]
exclude = [
"wasm",
Expand Down Expand Up @@ -79,7 +80,23 @@ winapi = { version = "0.3.9", features = [
"timeapi",
"mmsystem",
] }
native-windows-gui = { version = "1.0.12", default_features = false }
windows-sys = { version = "0.52.0", features = [
"Win32_Devices_DeviceAndDriverInstallation",
"Win32_Devices_Usb",
"Win32_Foundation",
"Win32_Graphics_Gdi",
"Win32_Security",
"Win32_System_Diagnostics_Debug",
"Win32_System_Registry",
"Win32_System_Threading",
"Win32_UI_Controls",
"Win32_UI_Shell",
"Win32_UI_WindowsAndMessaging",
], optional=true }
win_dbg_logger = { path = "win_dbg_logger", optional = true }
native-windows-gui = { version = "1.0.13", default_features = false}
native-windows-derive = { version = "1.0.5", default_features = false, optional = true }
regex = { version = "1.10.4", optional = true }
kanata-interception = { version = "0.2.0", optional = true }

[target.'cfg(target_os = "windows")'.build-dependencies]
Expand All @@ -98,6 +115,7 @@ cmd = ["kanata-parser/cmd"]
interception_driver = ["kanata-interception", "kanata-parser/interception_driver"]
simulated_output = ["indoc"]
wasm = [ "instant/wasm-bindgen" ]
gui = ["win_manifest","native-windows-derive","win_dbg_logger","win_dbg_logger/simple_shared","kanata-parser/gui","native-windows-gui/tray-notification","native-windows-gui/message-window","native-windows-gui/menu","native-windows-gui/cursor","native-windows-gui/high-dpi","native-windows-gui/embed-resource","native-windows-gui/image-decoder","native-windows-gui/notice","dep:windows-sys"]

[profile.release]
opt-level = "z"
Expand Down
Loading
Loading