Skip to content

Commit

Permalink
Merge branch 'split'
Browse files Browse the repository at this point in the history
  • Loading branch information
raphamorim committed Oct 17, 2024
2 parents 1621348 + 1a6c90a commit ac838df
Show file tree
Hide file tree
Showing 50 changed files with 3,503 additions and 2,372 deletions.
46 changes: 26 additions & 20 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ copa = { default-features = false, version = "0.1.14" }
raw-window-handle = { version = "0.6.2", features = ["std"] }
parking_lot = { version = "0.12.3", features = ["nightly", "hardware-lock-elision"] }
rustc-hash = "2.0.0"
unicode-width = "0.1.13"
unicode-width = "0.2.0"
base64 = "0.22.1"
image_rs = { package = "image", version = "0.25.2", default-features = false, features = ["gif", "jpeg", "ico", "png", "pnm", "webp", "bmp"] }
regex = "1.10.6"
regex = "1.11.0"
bytemuck = { version = "1.17.0", features = [ "derive" ] }
swash = "0.1.18"
serde = { version = "1.0.208", features = ["derive"] }
Expand Down
67 changes: 32 additions & 35 deletions docs/docs/config/bindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ You can see the default [default key bindings](/docs/default-key-bindings)

Rio allows you to add new keybindings and overwrite any default key bindings.

Keybinds are built using the following trigger fields:
Bindings are built using the following trigger fields:

| Name | Description |
| ------------- | --------------- |
Expand All @@ -34,7 +34,7 @@ keys = [
]
```

### [Key](#key)
## [Key](#key)

Each value in key binding will specify an identifier of the key pressed:

Expand All @@ -48,43 +48,40 @@ Each value in key binding will specify an identifier of the key pressed:
- `numpadenter` `numpadadd` `numpadcomma` `numpaddivide` `numpadequals` `numpadsubtract` `numpadmultiply`
- `numpad1` `numpad2` `numpad3` `numpad4` `numpad5` `numpad6` `numpad7` `numpad8` `numpad9` `numpad0`

### [Action](#action)
## [Action](#action)

Execute a predefined action in Rio terminal.

#### [Basic Actions](#basic-actions)
### [Basic Actions](#basic-actions)

| Action | Description |
| :--------------- | :---------------------------------------------------------------------------- |
| None | |
| ReceiveChar | |
| ToggleVIMode | |
| Paste | Paste command |
| Copy | |
| OpenConfigEditor | |
| Copy | Copy command |
| OpenConfigEditor | Open configuration file on configured editor property |
| ResetFontSize | |
| IncreaseFontSize | |
| DecreaseFontSize | |
| Run(string) | Example: Running command `Run(code)` or `Run(code ~/.config/rio/config.toml)` |
| PasteSelection | |
| ClearSelection | |
| CreateWindow | Create a Rio window instance |
| Quit | Exit Rio |

#### [Window Actions](#window-actions)
### [Split Actions](#split-actions)

| Action | Description |
| :----------- | :---------- |
| CreateWindow | |
| Quit | |

#### [Pane Actions](#pane-actions)

| Action | Description |
| :---------------- | :---------- |
| SplitHorizontally | |
| SplitVertically | |
| ClosePane | |
| Action | Description |
| :----------------- | :------------------------------------------------------------------------- |
| SplitRigh | Create a split by right side |
| SplitDown | Create a split by under current pane |
| SelectNextSplit | Select next split |
| SelectPrevSplit | Select previous split |
| CloseSplitOrTab | Close split, if split is the last then will close the tab |

#### [Tab Actions](#tab-actions)
### [Tab Actions](#tab-actions)

| Action | Description |
| :------------------- | :------------------------------------------------------------------ |
Expand All @@ -96,7 +93,7 @@ Execute a predefined action in Rio terminal.
| SelectLastTab | |
| SelectTab(tab_index) | Example: Select first tab `SelectTab(0)`, second tab `SelectTab(1)` |

#### [Scroll Actions](#scroll-actions)
### [Scroll Actions](#scroll-actions)

| Action | Description |
| :----------------- | :------------------------------------------------------------------------- |
Expand All @@ -108,29 +105,29 @@ Execute a predefined action in Rio terminal.
| ScrollToTop | |
| ScrollToBottom | |

### [Search](#search)
### [Search Actions](#search-actions)

| Action | Description |
| :----------------- | :------------------------------------------------------------------------- |
| SearchForward | |
| SearchBackward | |
| SearchConfirm | |
| SearchClear | |
| SearchFocusNext | |
| SearchFocusPrevious | |
| SearchDeleteWord | |
| SearchHistoryNext | |
| SearchHistoryPrevious | |
| SearchBackward | |
| SearchConfirm | |
| SearchClear | |
| SearchFocusNext | |
| SearchFocusPrevious | |
| SearchDeleteWord | |
| SearchHistoryNext | |
| SearchHistoryPrevious | |

### [Bytes](#bytes)
## [Bytes](#bytes)

Send a byte sequence to the running application.

The `bytes` field writes the specified string to the terminal. This makes
it possible to pass escape sequences, like `PageUp` ("\x1b[5~"). Note that applications use terminfo to map escape sequences back
to keys. It is therefore required to update the terminfo when changing an escape sequence.

### [With](#with)
## [With](#with)

Key modifiers to filter binding actions

Expand All @@ -157,7 +154,7 @@ with = "control | shift"
A `~` operator can be used before a mode to apply the binding whenever
the mode is *not* active, e.g. `~Alt`. -->

### [Mode](#mode)
## [Mode](#mode)

There is currently four different modes:

Expand All @@ -176,7 +173,7 @@ keys = [
]
```

### [Text](#text)
## [Text](#text)

`text` can be used to write specific text on key press:

Expand All @@ -188,7 +185,7 @@ keys = [
]
```

### [Overwriting](#overwriting)
## [Overwriting](#overwriting)

Bindings are always filled by default, but will be replaced when a new binding with the same triggers is defined. To unset a default binding, it can be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for a no-op if you do not wish to receive input characters for that binding.

Expand Down
25 changes: 20 additions & 5 deletions docs/docs/config/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ language: 'en'
- `clickable` - Enable click on tabs to switch.
- `use-current-path` - Use same path whenever a new tab is created (Note: requires [`use-fork`](/docs/config/use-fork) to be set to false).
- `color-automation` - Set a specific color for the tab whenever a specific program is running, or in a specific directory.
- `use-split` - Enable split panels feature.

```toml
[navigation]
Expand All @@ -15,8 +16,11 @@ clickable = false
hide-if-single = true
use-current-path = false
color-automation = []
use-split = true
```

## Mode

Rio has multiple styles of showing navigation/tabs.

### Bookmark
Expand Down Expand Up @@ -90,7 +94,18 @@ Usage:
mode = "Plain"
```

### Hide if is only one tab
## Split

Enable split feature. It is enabled by default.

```toml
[navigation]
use-split = true
```

![Demo split](/assets/features/demo-split.png)

## Hide if is only one tab

The property `hide-if-single` hides navigation UI if there is only one tab. It does not work for `NativeTab`.

Expand All @@ -101,7 +116,7 @@ Default is `true`.
hide-if-single = true
```

### Color automation for navigation
## Color automation for navigation

Rio supports specifying the color of tabs using the `program` and `path` options.

Expand All @@ -119,7 +134,7 @@ color-automation = [
]
```

#### Program
### Program

The example below sets `#FFFF00` as color background whenever `nvim` is running.

Expand All @@ -138,7 +153,7 @@ color-automation = [
]
```

#### Path
### Path

The example below sets `#FFFF00` as color background when in the `/home/geg/.config/rio` path.

Expand All @@ -159,7 +174,7 @@ color-automation = [
<img alt="example navigation with path color automation using Bookmark" src="/rio/assets/features/demo-colorized-navigation-path-2.png" width="48%"/>
</p>

#### Program and path
### Program and path

It is possible to use both `path` and `program` at the same time.

Expand Down
Loading

0 comments on commit ac838df

Please sign in to comment.