Skip to content

Commit

Permalink
Update CHANGELOG.md, README.md and THEME.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Exidex committed Jan 19, 2025
1 parent 6f7732c commit d861b73
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 66 deletions.
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ For changes in `@project-gauntlet/tools` see [separate CHANGELOG.md](https://git
### General
- Window Tracking
- Gauntlet now tracks opened windows and assigns them to specific application entry in results
- If application has window open, primary action now instead focuses the window, or if there are multiple opens view which contains list of windows that can be focused
- If application has window open, primary action now instead focuses the window
- If there are multiple windows open, primary action opens view which contains list of windows that can be focused
- If application has window open, it is still possible to open new application instance by using separate new action
- It is experimental, and it is possible to disable window tracking by unchecking checkbox in Application entrypoint preferences in Settings UI
- Currently supported on
Expand All @@ -36,6 +37,7 @@ For changes in `@project-gauntlet/tools` see [separate CHANGELOG.md](https://git
- `Active Monitor`
- Windows opens on monitor which has currently focused window
- Currently supported only on macOS
- Improve config and theme config error parsing logs

### Theming
- Themes have been reworked
Expand Down Expand Up @@ -66,8 +68,10 @@ For changes in `@project-gauntlet/tools` see [separate CHANGELOG.md](https://git
- Added `get: (id: string) => GeneratedEntrypoint | undefined` function to `GeneratorContext` to get added entrypoint
- Added `getAll: () => GeneratedEntrypoint[]` function to `GeneratorContext` to get all added entrypoints
- Generated Entrypoints can now have accessories similar to `<List/>` component
- Removed `pluginPreferences` and `entrypointPreferences`
- Add `usePluginPreferences` and `useEntrypointPreferences` React Hooks
- Removed `pluginPreferences` and `entrypointPreferences` helper functions
- Added `usePluginPreferences` and `useEntrypointPreferences` React Hooks
- Command function now receives `CommandContext` as first argument
- Object contains `pluginPreferences` and `entrypointPreferences` properties to access preferences from Command
- Unified primary and secondary action execution in `<List.Item/>` and `<Grid.Item/>`
- **BREAKING CHANGE**: Removed `onClick` property on `<List.Item/>` and `<Grid.Item/>` components
- **BREAKING CHANGE**: `<List.Item/>` and `<Grid.Item/>` now has how `id: string` required property
Expand Down Expand Up @@ -97,6 +101,7 @@ For changes in `@project-gauntlet/tools` see [separate CHANGELOG.md](https://git
- Fixed `<Grid.EmptyView/>` not displaying the image
- Fixed image in `<List.EmptyView/>` being too big so labels are not shown
- Fixed action not being run if `<List/>` or `<Grid/>` view has focused `<SearchBar/>`
- Fixed `npm run dev` failing because of missing log files when run for the first time

## [12] - 2024-12-22

Expand Down
43 changes: 14 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<img align="right" width="100" height="100" src="assets/linux/icon_256.png">

Web-first cross-platform application launcher with React-based plugins.
Web-first cross-platform application launcher with React-based plugins

> [!NOTE]
> Launcher is in active development, expect bugs, missing features, incomplete ux, etc.
Expand Down Expand Up @@ -71,7 +71,6 @@ https://github.com/user-attachments/assets/19964ed6-9cd9-48d4-9835-6be04de14b66
- Application plugin depends on `gtk-launch`
- <img src="https://cdn.jsdelivr.net/gh/simple-icons/simple-icons@develop/icons/apple.svg" width="18" height="18" /> macOS
- <img src="https://img.icons8.com/windows/32/windows-11.png" width="18" height="18" /> Windows
- Bundled "Applications" plugin is not yet implemented. See [#9](https://github.com/project-gauntlet/gauntlet/issues/9)

##### Planned features

Expand Down Expand Up @@ -216,7 +215,7 @@ Main window can be opened using global shortcut or CLI command:
name = 'Plugin Name'
description = """
Plugin description
""" # required
"""

[[preferences]] # plugin preference
name = 'testBool'
Expand All @@ -229,8 +228,9 @@ enum_values = [{ label = 'Item', value = 'item'}] # defines list of available en
id = 'ui-view' # id for entrypoint
name = 'UI view' # name of entrypoint
path = 'src/ui-view.tsx' # path to file, default export is expected to be function React Function Component
icon = 'icon.png' # optional, path to file inside assets dir
type = 'view'
description = 'Some entrypoint description' # required
description = 'Some entrypoint description'

[[entrypoint.preferences]] # entrypoint preference
name = 'boolPreference'
Expand All @@ -248,21 +248,21 @@ id = 'command-a'
name = 'Command A'
path = 'src/command-a.ts' # path to file, the whole file is a js script
type = 'command'
description = 'Some entrypoint description' # required
description = 'Some entrypoint description'

[[entrypoint]]
id = 'command-generator'
name = 'Command generator'
path = 'src/command-generator.ts'
type = 'command-generator'
description = 'Some entrypoint description' # required
description = 'Some entrypoint description'

[[entrypoint]]
id = 'inline-view'
name = 'Inline view'
path = 'src/inline-view.tsx'
type = 'inline-view'
description = 'Some entrypoint description' # required
description = 'Some entrypoint description'

[permissions]
network = ["github.com", "example.com:8833"]
Expand Down Expand Up @@ -311,8 +311,6 @@ The Application has a simple command line interface
- `gauntlet --minimized` - starts server without opening main window
- `gauntlet open` - opens application window, can be used instead of global shortcut
- `gauntlet settings` - settings, plugin installation and removal, preferences, etc
- `gauntlet generate-sample-simple-theme` - generate sample of simple theme. See: [THEME.md](./docs/THEME.md)
- `gauntlet generate-sample-complex-theme` - generate sample of complex theme. See: [THEME.md](./docs/THEME.md)

### Dev Tools

Expand All @@ -336,34 +334,29 @@ See [THEME.md](./docs/THEME.md)

## Architecture

The Application consists of three parts: server, frontend and settings.
Server is an application that exposes gRPC server.
All plugins run on server.
Each plugin in its own sandboxed Deno Worker.
The Application consists of 4 parts: server, frontend, plugin runtime and settings.
Each plugin runs in separate plugin runtime in separate OS process. Each plugin is its own sandboxed Deno Worker.
In plugin manifest it is possible to configure permissions which will allow plugin to have access to filesystem,
network, environment variables or subprocess execution.
Server saves plugins themselves and state of plugins into SQLite database.

Frontend is GUI module that uses [iced-rs](https://github.com/iced-rs/iced) as a GUI framework. It is run in the same process as a server.

Plugins can create UI using [React](https://github.com/facebook/react).
Server implements custom React Reconciler (similar to React Native) which renders GUI components to frontend.
Server listens on signals from frontend, so when user opens view defined by plugin, frontend sends an open-view request.
Server then receives it, runs React render and React Reconciler
makes requests to the frontend containing information what actually should be rendered.
Plugin Runtime implements custom React Reconciler (similar to React Native) which renders GUI components to frontend.
Plugin Runtime listens on signals from frontend, so when user opens view defined by plugin, frontend sends an open-view request.
Plugin Runtime then receives it, runs React render and React Reconciler makes requests to the frontend containing information what actually should be rendered.
When a user interacts with the UI by clicking button or entering text into form,
frontend sends events to server to see whether any re-renders are needed.

Settings is a GUI application runs in separate process that communicates with server via gRPC using a simple request-response approach.
Settings is a GUI application runs in separate process that communicates with server using a simple request-response approach.

Simplified gRPC communication:
Simplified communication:
![](docs/architecture.png)

Components:
![](docs/architecture-blocks.png)

Each component runs in a separate thread. Main thread is the thread that renders GUI. Each component has its own tokio runtime instance.

Plugins (or rather its compiled state: manifest, js code and assets) are distributed via Git repository in `gauntlet/release` branch (similar to GitHub Pages).
Which means there is no one central place required for plugin distribution.
And to install plugin all you need is Git repository url.
Expand Down Expand Up @@ -402,13 +395,6 @@ Relevant CLI commands:
- contains log files created by plugin development
- `.desktop` files at locations defined by [Desktop Entry Specification](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html)

Application and Dev Tools use temporary directories:

- Rust: [tempfile crate](https://crates.io/crates/tempfile)
- JS: [NodeJS mkdtemp](https://nodejs.org/api/fs.html#fspromisesmkdtempprefix-options)

X11 API is used to add global shortcut

Client and Setting applications have GUI and therefore use all the usual graphics-related stuff from X11.
Wayland support requires LayerShell protocol `zwlr_layer_shell_v1`.

Expand Down Expand Up @@ -442,7 +428,6 @@ But the new version release needs to be done via GitHub Actions
If you'd like to help build Gauntlet you can do it in more ways than just contributing code:
- Reporting a bug or UI/UX problem
- Creating a plugin
- Creating and contributing a theme - see [#16](https://github.com/project-gauntlet/gauntlet/issues/16)

If you are looking for things to do see pinned [issues](https://github.com/project-gauntlet/gauntlet/issues).

Expand Down
45 changes: 11 additions & 34 deletions docs/THEME.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,21 @@
# Gauntlet Theming

Gauntlet has extensive theming possibilities
Currently, in Gauntlet with themes it is possible to change (list is likely be extended with future updates):
- Colors of text and background
- Window border color, width and radius
- Border radius of components in content

There are 2 types of themes:
- Simple Theme
- Global colors
- Global border width and radius
- Complex Theme
- Colors on per widget type bases
- Paddings and spacing on per widget type bases
- Borders colors, width and radius on per widget type bases
Theming is only affects main window and doesn't affect settings

Unfortunately due to the internally invasive nature of themes, it is perpetually unstable feature.
Themes are versioned and only one version is supported by application at the same time.
Meaning if there were some changes made in the release and theme version was incremented,
theme will stop working until it is updated.
This may change in the future
Theme config file is in TOML format

Current version:
- Simple Theme: `4`
- Complex Theme: `4`

Theming is only applied to main window and doesn't affect settings

### Creating a custom theme

Gauntlet provides 2 CLI commands to generate sample: `generate-sample-simple-theme` and `generate-sample-complex-theme`. Sample is just a default theme that has been saved to file.

Running the command will create sample file, print location of that sample file
and will print location to which theme file will need to be saved to be detected by application
Theme config file locations:
- Windows: `C:\Users\Username\AppData\Roaming\Gauntlet\config\theme.toml`
- Linux: `$XDG_CONFIG_HOME/gauntlet/theme.toml`
- macOS: `$HOME/Library/Application Support/dev.project-gauntlet.gauntlet/theme.toml`

Currently, theme change is only applied after application restart

Any errors in theme parsing will be shown in application logs

#### Linux
- `gauntlet generate-sample-simple-theme`
- `gauntlet generate-sample-complex-theme`

#### macOS
Note: the binary is not on the PATH
- `/Applications/Gauntlet.app/Contents/MacOS/Gauntlet generate-sample-simple-theme`
- `/Applications/Gauntlet.app/Contents/MacOS/Gauntlet generate-sample-complex-theme`
See bundled themes for examples [here](./../bundled_themes)

0 comments on commit d861b73

Please sign in to comment.