Skip to content

Commit

Permalink
Twix documentation (#1440)
Browse files Browse the repository at this point in the history
* beautify twix page, add information about installation

* correct how to update
  • Loading branch information
schluis authored Sep 12, 2024
1 parent a8eb1e4 commit a4618cf
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 23 deletions.
6 changes: 4 additions & 2 deletions docs/setup/development_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ We use Git to manage all our software.
git clone https://github.com/hulks/hulk.git
```

## Build Pepsi
## Build [Pepsi](../tooling/pepsi.md)

Pepsi is our main tool to interact with the repository, configure NAOs, and upload the software to the robot.
For a more in depth overview and introduction to Pepsi, consult [../tooling/pepsi.md].
Expand All @@ -95,10 +95,12 @@ This downloads and builds all dependencies for the workspace and displays the he

!!! tip

You can also install Pepsi into your local system to conviniently use it without rebuilding:
You can also install Pepsi into your local system to conveniently use it without rebuilding:

```
cargo install --path tools/pepsi
```

Pepsi is subsequently installed at `~/.cargo/bin/pepsi`.
Don't forget to update it from time to time by reinstalling it to get the latest features and bugfixes. <br> <br>
The same can also be done for [twix](../tooling/twix.md), our debug tool.
61 changes: 40 additions & 21 deletions docs/tooling/twix.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
# Installation

Twix doesn't have to be installed to be used, it can be directly run from the repository with `./twix` (just as pepsi).
But you can also install it into your local system to conveniently use it without rebuilding:

```
cargo install --path tools/twix
```

Twix is subsequently installed at `~/.cargo/bin/twix`. <br>

!!! tip

Don't forget to update it from time to time by reinstalling it to get the latest features and bugfixes.

# Configuration

Twix loads a user configuration file on startup. The location of the configuration file depends on your platform:
- Linux: `/home/alice/.config/hulks/twix.toml`
- Windows: `C:\Users\Alice\AppData\Roaming\hulks\twix.toml`
- MacOS: `/Users/Alice/Library/Application Support/hulks/twix.toml`

- Linux: `/home/alice/.config/hulks/twix.toml`
- Windows: `C:\Users\Alice\AppData\Roaming\hulks\twix.toml`
- MacOS: `/Users/Alice/Library/Application Support/hulks/twix.toml`

See the example config further down on this page for the general format.

After loading the user configuration, it is merged with the default values, which are defined in `tools/twix/default.toml`.
After loading the user configuration, it is merged with the default values, which are defined in `tools/twix/config_default.toml`.

## Keybindings

Expand All @@ -21,12 +37,15 @@ for a complete list of bindable keys.
Possible modifiers are `A` (Alt), `C` (Ctrl), and `S` (Shift).
When binding a single-letter key, it is also possible and preferred to specify "Shift" by capitalizing the letter, e.g. `C-T` for Ctrl+Shift+T.

Example keybind triggers:
- `C-t`: Ctrl + T
- `C-T`: Ctrl + Shift + T
- `A-S-Esc`: Alt + Shift + Escape
!!! example "Example keybind triggers"

- `C-t`: Ctrl + T
- `C-T`: Ctrl + Shift + T
- `A-S-Esc`: Alt + Shift + Escape

Possible actions are:

<!-- prettier-ignore -->
| Action | Description |
|----------------|--------------------------------------------------|
|`close_tab` | Close current tab |
Expand All @@ -41,18 +60,18 @@ Possible actions are:
|`open_tab` | Open a new tab in the current surface |
|`reconnect` | Reestablish the connection to the NAO |

## Example configuration
!!! example "Example configuration"

```toml
# Remap navigation keys for non-vim users
[keys]
C-h = "no_op"
C-j = "no_op"
C-k = "no_op"
C-l = "no_op"
```toml
# Remap navigation keys for non-vim users
[keys]
C-h = "no_op"
C-j = "no_op"
C-k = "no_op"
C-l = "no_op"

C-Left = "focus_left"
C-Down = "focus_below"
C-Up = "focus_above"
C-Right = "focus_right"
```
C-Left = "focus_left"
C-Down = "focus_below"
C-Up = "focus_above"
C-Right = "focus_right"
```

0 comments on commit a4618cf

Please sign in to comment.