Commit graph

18 commits

Author SHA1 Message Date
Jan De Dobbeleer cea18715bb refactor: add config version 3 2024-11-04 12:15:40 +01:00
Jan De Dobbeleer f47da9592f feat(exit): implement pipestatus
BREAKING CHANGE: exit segment is now called status segment.

The exit keyword is now deprecated and will be removed in a future
release. Please use the status keyword instead:

```diff
"segments": {
    {
-     "type": "exit"
+     "type": "status"
    }
}
```

Additionally, the status segment configuration has changed to support
$PIPESTATUS. You can include a status template to customize the
rendering of each individual status code (supported in fish, zsh and
bash).

```json
"segments": {
    {
        "type": "status",
        "properties": {
            "status_template": "{{ if gt .Code 0 }}\uf071{{ else }}\uf00c{{ end }}",
            "status_separator": " "
        }
    }
}
```

In case no $PIPESTATUS is available, the status segment will fall back
to the exit code of the last command using the status template
for rendering.

The `{{ .Meaning }}` property has been marked as deprecated and can be
replaced with `{{ reason .Code }}`, allowing it to be reused in
cross segment templates.

resolves #4070
2023-07-24 11:46:33 +02:00
Jan De Dobbeleer 17f75fa1ff refactor(git): no leading space on branch status 2022-09-07 18:04:41 +02:00
Jan De Dobbeleer 859fd0bbef feat: add osc7 support
resolves #2515
2022-07-13 13:59:21 +02:00
Jan De Dobbeleer ee3b1127de feat: move template to segment 2022-03-27 15:42:42 +02:00
Stefan aaa46f5b2d fix: add back missing space character 2022-02-15 12:18:33 +01:00
Jan De Dobbeleer 86db860fe6 theme: migrate all 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer f5178e8c8c feat: remove enable_hyperlink 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer b816a0bf70 feat: templates for all segments 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer e6d4413ae7 feat: adjust var names for consistency
BREAKING CHANGE: adjusts the way some segment work for templates.

Mapping the var names as following will resolve the issue.
- session/title/general purpose
    - .Host -> .HostName
    - .User -> .UserName
- az
    - .UserName -> .Name
- kubectl
    - .UserName -> .User
2022-01-17 16:29:39 +01:00
Jan De Dobbeleer a08a3a9a21 feat(session): refactor for template 2021-12-03 23:50:50 +01:00
Stefan 789d2c2269
fix: remove unsupported icons from minimal themes 2021-11-15 11:26:22 +00:00
Jan De Dobbeleer f850f3b805 feat(exit): add template properties 2021-11-15 11:39:34 +01:00
Jan De Dobbeleer 2d25c59c00 fix(git): remove Repo struct 2021-11-09 17:16:37 +01:00
Jan De Dobbeleer 7a5bccf101 fix(git): correct color templates functions 2021-11-09 13:26:59 +01:00
Jan De Dobbeleer d29a6befd9 refactor: adjust themes to new git segment properties 2021-11-09 13:26:59 +01:00
Jan De Dobbeleer c24ca82f17 feat: newline as part of block
this deprecates the "newline" block and favours using the newline
property on the Block component. For backwards compatibility we'll
keep recognizing the newline block for the time being.

resolves #607
2021-04-21 19:54:43 +02:00
Stefan 7299d8a782 feat(theme): add stelbent
add new theme, Stelbent, using only the base powerline characters from
the private Unicode space

note: this theme does not require a Nerd Font
2021-04-07 16:56:18 +02:00