8000 fix log default style by noborus · Pull Request #802 · noborus/ov · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix log default style #802

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


8000
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 33 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ ov is a terminal pager.
* 8.1.1. [UnderlineStyle](#underlinestyle)
* 8.2. [Customizing the bottom status line](#customizing-the-bottom-status-line)
* 8.2.1. [Customizing LeftStatus and RightStatus styles](#customizing-leftstatus-and-rightstatus-styles)
* 8.3. [Key binding customization](#key-binding-customization)
* 8.4. [General configuration](#general-configuration)
* 8.3. [Help and Log Documentation customization](#help-and-log-documentation-customization)
* 8.4. [Key binding customization](#key-binding-customization)
* 8.5. [General configuration](#general-configuration)
* 9. [VS](#vs)
* 10. [Work together](#work-together)
* 11. [Contributing](#contributing)
Expand Down Expand Up @@ -1481,7 +1482,35 @@ General:
> If `InvertColor` is set to `true`, the file name and related areas will be displayed with inverted colors, and the `LeftStatus`/`RightStatus` styles will not be applied.
> To enable your custom styles, set `InvertColor: false`.

### 8.3. <a name='key-binding-customization'></a>Key binding customization
### 8.3. <a name='help-and-log-documentation-customization'></a>Help and Log Documentation customization

You can also customize the Help and Log documentation screens.
By adding `HelpDoc` and `LogDoc` entries at the same level as `General` in your configuration file, you can apply the same types of customizations as for `General`.
This allows you to individually style and configure the Help and Log screens.

```yaml
General:
Style:
Header:
Background: "blue"
Bold: true

HelpDoc:
Style:
Header:
Background: "green"
Bold: true

LogDoc:
Style:
Header:
Background: "aqua"
Bold: true
```

For example, you can set different colors or styles for the Help and Log screens as shown above.

### 8.4. <a name='key-binding-customization'></a>Key binding customization

You can customize key bindings.

Expand All @@ -1499,7 +1528,7 @@ You can customize key bindings.

See [ov.yaml](https://github.com/noborus/ov/blob/master/ov.yaml) for more information.

### 8.4. <a name='general-configuration'></a>General configuration
### 8.5. <a name='general-configuration'></a>General configuration

You can also customize the `General` configuration in the `config.yaml` file.

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ require (

require (
github.com/gdamore/encoding v1.0.1 // indirect
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
github.com/go-viper/mapstructure/v2 v2.3.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jwalton/go-supportscolor v1.2.0 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ github.com/gdamore/encoding v1.0.1 h1:YzKZckdBL6jVt2Gc+5p82qhrGiqMdG/eNs6Wy0u3Uh
github.com/gdamore/encoding v1.0.1/go.mod h1:0Z0cMFinngz9kS1QfMjCP8TY7em3bZYeeklsSDPivEo=
github.com/gdamore/tcell/v2 v2.8.1 h1:KPNxyqclpWpWQlPLx6Xui1pMk8S+7+R37h3g07997NU=
github.com/gdamore/tcell/v2 v2.8.1/go.mod h1:bj8ori1BG3OYMjmb3IklZVWfZUJ1UBQt9JXrOCOhGWw=
github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss=
github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/go-viper/mapstructure/v2 v2.3.0 h1:27XbWsHIqhbdR5TIC911OfYvgSaW93HM+dX7970Q7jk=
github.com/go-viper/mapstructure/v2 v2.3.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
Expand Down
1 change: 1 addition & 0 deletions oviewer/logdoc.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func NewLogDoc() (*LogDocument, error) {
m.FollowMode = true
m.Caption = "Log"
m.seekable = false
m.Style = NewLogStyle()
atomic.StoreInt32(&m.closed, 1)
if err := m.ControlLog(); err != nil {
return nil, err
Expand Down
0