Comments (4)
Fwiw, I've tried the indicated directory and others that I thought could be an option:
~/.lnav/configs/installed/
~/.lnav/configs/themes/
~/.lnav/themes/
~/.config/lnav/configs/installed/
~/.config/lnav/configs/themes/
~/.config/lnav/themes/
Running lnav -h
should show the lnav directory that would be used. This is what I see:
Paths
• Format files are read from:
📂 /etc/lnav
📂 /usr/local/etc/lnav
• Configuration, session, and format files are stored in:
📂 /Users/tstack/.config/lnav
Under that directory, configs/installed
should work.
The theme file that was put into each of these folders is
tokyonight-storm-theme.json
.
Would you be able to attach this file?
A configuration file must have a $schema
property in the top level object, like so:
"$schema": "https://lnav.org/schemas/config-v1.schema.json"
To get a dump of the full lnav configuration, you can run lnav -m config get
. To get a listing of where the value of each property came from, you can run lnav -m config blame
.
Running lnav with -d /tmp/lnav-debug.log
will write the lnav debug log to that file. Near the start there are some log messages related to loading the configuration. In the snippet below, you can see a theme configuration being loaded:
2024-05-23T20:56:54.287-07:00 I t0 lnav.cc:2559 lnav started
2024-05-23T20:56:54.290-07:00 I t0 lnav_config.cc:1879 loading builtin configuration into default
2024-05-23T20:56:54.295-07:00 I t0 lnav_config.cc:1881 loading builtin configuration into base
2024-05-23T20:56:54.300-07:00 I t0 lnav_config.cc:1884 loading installed configuration files
2024-05-23T20:56:54.300-07:00 I t0 lnav_config.cc:1769 loading configuration from /Users/tstack/.config/lnav/configs/installed/config.simple_theme.json
2024-05-23T20:56:54.300-07:00 I t0 lnav_config.cc:1769 loading configuration from /Users/tstack/.config/lnav/configs/installed/config.simple_theme.json
2024-05-23T20:56:54.301-07:00 I t0 lnav_config.cc:1914 loading user configuration
2024-05-23T20:56:54.301-07:00 I t0 lnav_config.cc:1769 loading configuration from /Users/tstack/.config/lnav/config.json
Let me know what happens, there might be a better error/help message I can add somewhere.
from lnav.
Hmm, interesting. I had been running lnav
for years with config info under ~/.lnav/
instead of ~/.confifig/lnav/
...
Here's the theme (along with the command to cat it so you can see the source location): cat_of_tokyonight-storm-theme.json
Shell incantations:
# tried to start after ensured it was in a properly supported path of ~/.config/lnav/configs/installed/tokyonight-storm-theme.json
$ lnav
✘ error: invalid value for property “/ui/theme”
reason: unknown theme -- “tokyonight-storm”
| = help: The available themes are: default, dracula, eldar, grayscale, monocai, night-owl, solarized-dark, solarized-light
--> /Users/username/.config/lnav/config.json:3
= help: Property Synopsis
/ui/theme theme_name
Description
The name of the theme to use.
# attempted suggested command, again with the theme name inserted into config.json of `"theme": "tokyonight-storm"`:
$ lnav -m config get
✘ error: invalid value for property “/ui/theme”
reason: unknown theme -- “tokyonight-storm”
| = help: The available themes are: default, dracula, eldar, grayscale, monocai, night-owl, solarized-dark, solarized-light
--> /Users/username/.config/lnav/config.json:3
= help: Property Synopsis
/ui/theme theme_name
Description
The name of the theme to use.
# attempted to modify theme name to `"theme": "tokyonight-storm-theme"`:
$ nano ~/.config/lnav/config.json
# again attempted suggested command:
$ lnav -m config get
✘ error: invalid value for property “/ui/theme”
reason: unknown theme -- “tokyonight-storm-theme”
| = help: The available themes are: default, dracula, eldar, grayscale, monocai, night-owl, solarized-dark, solarized-light
--> /Users/username/.config/lnav/config.json:3
= help: Property Synopsis
/ui/theme theme_name
Description
The name of the theme to use.
# other suggested command just for thoroughness, knowing it wouldn't yield much:
$ lnav -m config blame
✘ error: invalid value for property “/ui/theme”
reason: unknown theme -- “tokyonight-storm-theme”
| = help: The available themes are: default, dracula, eldar, grayscale, monocai, night-owl, solarized-dark, solarized-light
--> /Users/username/.config/lnav/config.json:3
= help: Property Synopsis
/ui/theme theme_name
Description
The name of the theme to use.
# debug generation:
$ lnav -d /tmp/lnav-debug.log
✘ error: invalid value for property “/ui/theme”
reason: unknown theme -- “tokyonight-storm-theme”
| = help: The available themes are: default, dracula, eldar, grayscale, monocai, night-owl, solarized-dark, solarized-light
--> /Users/username/.config/lnav/config.json:3
= help: Property Synopsis
/ui/theme theme_name
Description
The name of the theme to use.
Debug output: lnav-debug.log
The debug log contains attempted start with both the name defined as tokyonight-storm-theme
and as tokyonight-storm
in the config.json
, so seems to indicate the theme is maybe being loaded, but still no success...
from lnav.
You need to change “default” under “theme-defs” to the theme name. The name does not come from the file name. Right now, that file is overriding the default theme properties.
from lnav.
So you're saying config.json
should have:
{
"ui": {
"theme": "tokyonight-storm",
"theme-defs": {
"tokyonight-storm": {
"highlights": {
...
This does seem to evoke a change - even though now I simply lack formatting. I have to assume that the actual theme is not configured properly and now it will be a matter of iterating through the json theme file to implement a theme that I would expect to see.
Thanks.
from lnav.
Related Issues (20)
- Can it be built without Rust, disabling related module? HOT 2
- Cursor mode selection does not select expected lines HOT 1
- Feature request: hide/show "discovered fields"
- Customizable hidden fields separate so you can replace vertical ellipsis
- support for multiple JSON line-formats and switching between them HOT 1
- Add time filters to the Filters configuration panel
- Timezone ignored if miliseconds is absent HOT 3
- highlight log content using data parser
- A line with three quotes crashes lnav HOT 1
- Globbing (* wildcard) stop working on macos in remote HOT 1
- With enable-word-wrap found matches are below the fold
- env_logger format is not detected HOT 2
- Esc key doesn't abort HOT 2
- Crash with a specific regex pattern
- Crash when regex without body is used HOT 2
- Regex exact match for filter possible? HOT 4
- Multiple failures if a timezone is not configured on a system or if tzdata not installed
- Apple silicone support (arm64) HOT 2
- Crash when filtering log piped through stdin
- How to turn off hex string and confirm which format configuration is applying?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lnav.