clan-core/pkgs/clan-app/README.md

94 lines
3.0 KiB
Markdown
Raw Normal View History

2024-06-05 09:23:12 +00:00
# clan app
2023-11-25 00:55:01 +00:00
Provides users with the simple functionality to manage their locally registered clans.
![app-preview](screenshots/image.png)
## Available commands
Run this application
2023-11-25 00:55:01 +00:00
```bash
2024-06-05 09:23:12 +00:00
./bin/clan-app
2023-11-25 00:55:01 +00:00
```
2024-03-09 10:25:11 +00:00
Join the default machine of a clan
2023-11-25 00:55:01 +00:00
```bash
2024-06-05 09:23:12 +00:00
./bin/clan-app [clan-uri]
2023-11-25 00:55:01 +00:00
```
2024-03-09 10:25:11 +00:00
Join a specific machine of a clan
```bash
2024-06-05 09:23:12 +00:00
./bin/clan-app [clan-uri]#[machine]
2024-03-09 10:25:11 +00:00
```
For more available commands see the developer section below.
## Developing this Application
### Debugging Style and Layout
```bash
# Enable the GTK debugger
gsettings set org.gtk.Settings.Debug enable-inspector-keybinding true
# Start the application with the debugger attached
2024-06-05 09:23:12 +00:00
GTK_DEBUG=interactive ./bin/clan-app --debug
```
2023-11-25 00:55:01 +00:00
Appending `--debug` flag enables debug logging printed into the console.
2023-11-28 09:23:49 +00:00
### Profiling
2023-11-25 00:55:01 +00:00
To activate profiling you can run
2023-11-25 00:55:01 +00:00
```bash
2024-06-05 09:23:12 +00:00
PERF=1 ./bin/clan-app
```
2023-11-25 00:55:01 +00:00
### Library Components
2023-12-16 14:00:43 +00:00
> Note:
>
> we recognized bugs when starting some cli-commands through the integrated vs-code terminal.
> If encountering issues make sure to run commands in a regular os-shell.
2023-12-16 14:00:43 +00:00
lib-Adw has a demo application showing all widgets. You can run it by executing
2024-02-12 10:04:48 +00:00
2023-12-16 14:00:43 +00:00
```bash
adwaita-1-demo
```
2023-12-16 14:00:43 +00:00
GTK4 has a demo application showing all widgets. You can run it by executing
```bash
gtk4-widget-factory
2023-12-16 14:00:43 +00:00
```
To find available icons execute
```bash
gtk4-icon-browser
```
### Links
2024-06-05 09:23:12 +00:00
Here are some important documentation links related to the Clan App:
2024-06-05 09:23:12 +00:00
- [Adw PyGobject Reference](http://lazka.github.io/pgi-docs/index.html#Adw-1): This link provides the PyGObject reference documentation for the Adw library, which is used in the Clan App. It contains detailed information about the Adw widgets and their usage.
2024-06-05 09:23:12 +00:00
- [GTK4 PyGobject Reference](http://lazka.github.io/pgi-docs/index.html#Gtk-4.0): This link provides the PyGObject reference documentation for GTK4, the toolkit used for building the user interface of the clan app. It includes information about GTK4 widgets, signals, and other features.
2024-06-05 09:23:12 +00:00
- [Adw Widget Gallery](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/widget-gallery.html): This link showcases a widget gallery for Adw, allowing you to see the available widgets and their visual appearance. It can be helpful for designing the user interface of the clan app.
2024-06-05 09:23:12 +00:00
- [Python + GTK3 Tutorial](https://python-gtk-3-tutorial.readthedocs.io/en/latest/textview.html): Although the clan app uses GTK4, this tutorial for GTK3 can still be useful as it covers the basics of building GTK-based applications with Python. It includes examples and explanations for various GTK widgets, including text views.
- [GNOME Human Interface Guidelines](https://developer.gnome.org/hig/): This link provides the GNOME Human Interface Guidelines, which offer design and usability recommendations for creating GNOME applications. It covers topics such as layout, navigation, and interaction patterns.
## Error handling
2024-06-05 09:23:12 +00:00
> Error dialogs should be avoided where possible, since they are disruptive.
>
> For simple non-critical errors, toasts can be a good alternative.