Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/star-tek-mb/zig-tray
Create tray applications with zig
https://github.com/star-tek-mb/zig-tray
notifications tray tray-menu zig
Last synced: 29 days ago
JSON representation
Create tray applications with zig
- Host: GitHub
- URL: https://github.com/star-tek-mb/zig-tray
- Owner: star-tek-mb
- Created: 2022-10-18T11:48:05.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-21T16:52:47.000Z (6 months ago)
- Last Synced: 2024-08-03T23:25:20.020Z (4 months ago)
- Topics: notifications, tray, tray-menu, zig
- Language: Zig
- Homepage:
- Size: 103 KB
- Stars: 13
- Watchers: 1
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-zig - star-tek-mb/zig-tray
README
# zig-tray
zig-tray is a library for creating tray applications. Supports tray and notifications.
## Features
- tray witch `.ico` support!
- left click callback support
- right click callback support
- sending notification and notification click callback support## Supported platforms
- [x] Windows
- [ ] Linux
- [ ] MacOS## Installation
### Zig `0.12` \ `0.13.0`
1. Add to `build.zig.zon`
```sh
# It is recommended to replace the following branch with commit id
zig fetch --save https://github.com/star-tek-mb/zig-tray/archive/master.tar.gz
# Of course, you can also use git+https to fetch this package!
```2. Config `build.zig`
Add this:
```zig
// To standardize development, maybe you should use `lazyDependency()` instead of `dependency()`
// more info to see: https://ziglang.org/download/0.12.0/release-notes.html#toc-Lazy-Dependencies
const zig_tray = b.dependency("zig-tray", .{
.target = target,
.optimize = optimize,
});// add module
exe.root_module.addImport("zig-tray", zig_tray.module("tray"));
```## Example
see folder `example`!
## Credits
https://github.com/zserge/tray - for initial C library
https://github.com/glfw/glfw/blob/master/src/win32_window.c#L102 - for icon creating from rgba