mirror of
https://github.com/sharkdp/bat.git
synced 2024-11-08 08:54:39 +01:00
add dark mode script
This commit is contained in:
parent
ea5e096705
commit
a736889ef1
10
README.md
10
README.md
@ -416,6 +416,16 @@ will hopefully enable both quit-if-one-screen and mouse-wheel scrolling.
|
|||||||
|
|
||||||
If scrolling still doesn't work for you, you can try to pass the `-S` option in addition.
|
If scrolling still doesn't work for you, you can try to pass the `-S` option in addition.
|
||||||
|
|
||||||
|
### Dark mode
|
||||||
|
|
||||||
|
If you make use of the dark mode feature in macOS, you might want to configure `bat` to use a different
|
||||||
|
theme based on the OS theme. The following snippet uses the `default` theme when in the light mode
|
||||||
|
and the `GitHub` theme when in the dark mode.
|
||||||
|
|
||||||
|
```
|
||||||
|
alias cat="bat --theme=\$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo default || echo GitHub)"
|
||||||
|
```
|
||||||
|
|
||||||
## Configuration file
|
## Configuration file
|
||||||
|
|
||||||
`bat` can also be customized with a configuration file. The location of the file is dependent
|
`bat` can also be customized with a configuration file. The location of the file is dependent
|
||||||
|
Loading…
Reference in New Issue
Block a user