Comments (38)
Thank you for the suggestion.
I have added a --config
flag as well as MACCHINA_CONF
environment variable both of which can set the config file.
from macchina.
Amazingly enough it seems that the line that breaks the code is:
palette = "Light"
in the theme definition.
Your example works fine; I was curious and I tried with other themes, like Hydrogen and Helium - and they still broke. So I commented out one line at a time (monkey debugging method 😝 ) and saw that if yo remove palette = ...
from any theme they work just fine. Likewise, if you add it to your example, it breaks again as well.
Can you confirm this is the case for you as well? See below for demo:
Screen.Recording.2021-12-16.at.23.38.58.mov
Now the Lithium theme does have its own palette section in the .toml
, however the same behaviour happens with Hydrogen and Helium (namely removing palette = ...
makes all work fine).
from macchina.
Woow, thank you for your quick effort! I guess you are referring to #98.
Thank you again and keep up the awesome macchina
!
from macchina.
Awesome, I have installed it and confirm the changes with the $MACCHINA_CONF
work as intended!
from macchina.
Updating to
macchina --version
macchina 6.0.5
libmacchina 6.0.0
all seems restored and fine again, I have tried with different configurations and all work well!
from macchina.
We are using dirs-rs to get the config directory.
According to that in macos config_dir is in // Mac: Some(/Users/Alice/Library/Application Support)
.
So you probably will have to place it in there.
from macchina.
I have tried the specifications indicated in dirs-rs
, nevertheless the configuration is still ignored; not a big problem, I am just going to alias the options to the command instead.
Perhaps it can be useful, down the road, to expose to the user an environment variable or a flag through which they can point to whichever location they choose, something along the lines of
export $MACCHINA_PATH=/my/custom/config/path
that they can place in their shell profile or so.
from macchina.
Sorry to re-comment on a closed issue: I saw that a new release was issued: is this already available via brew
or must we compile the binaries (upgrading it seems the latest is still 0.8.1)?
from macchina.
Sorry to re-comment on a closed issue: I saw that a new release was issued: is this already available via
brew
or must we compile the binaries (upgrading it seems the latest is still 0.8.1)?
It still isn't available on brew
, see #100
from macchina.
Hey @gennaro-tedesco, version 0.8.21 should be out on homebrew. :)
from macchina.
.toml
configuration ignored again with latest releases - same settings as per original post.
from macchina.
I'll have a look at it, sorry this happened (again).
from macchina.
Any progress on this by any chance?
from macchina.
I'm in the middle of refactoring the way configurations are handled, the progress is happening on the v6 branch. Due to the new architectural changes that macchina has undergone with the separation of themes from the main config, MACCHINA_CONF
will become MACCHINA_DIR
to accomodate for the usage of themes by specifying an entire directory.
from macchina.
I have seen that v6 has been released and I have updated it:
$ macchina -v
macchina 6.0.1
libmacchina 4.0.2
As explained here I moved the configuration to the new one, making use of themes in a separate folder as indicated. However, macchina
again does not detect them: see screenshot below:
ls ~/.config/macchina/themes
Permissions Size User Date Modified Name
.rw-r--r-- 966 gennarotedesco 16 Dec 01:53 Helium.toml
.rw-r--r-- 966 gennarotedesco 16 Dec 01:53 Hydrogen.toml
the themes are there, I have copied and pasted the documentation examples without changing anything. Still, I am unable to get it to work.
At this point I would ask if there is a plan to really test it on macOS and make it work: I am trying really hard to use it but I am spending more time looking at these GitHub issues than ever actually using the tool.
from macchina.
I am trying really hard to use it but I am spending more time looking at these GitHub issues than ever actually using the tool.
I get your frustration, and I'm really sorry you're having all this trouble :(
At this point I would ask if there is a plan to really test it on macOS and make it work
I unfortunately don't have the hardware, or time to maintain a wide variety of operating systems, all of which have their own fair share of weird quirks. I can however try to help you to the best of my ability :)
@123marvin123 is the primary contributor to the macOS side of things and his schedule is pretty tight, so I'm all you got.
Anyways, can you please post the two themes?
from macchina.
The themes are the ones shown here and the macchina.toml is the same as in the link, only obviously having theme = "Helium/Hydrogen"
accordingly.
I have tried with "bare themes" too, namely making a minimal theme with 1-2 lines just to see if the configuration is read, and they do not work either, so I suspect the macchina.toml
does not see the reference to the macchina/themes
folder?
from macchina.
I suspect the
macchina.toml
does not see the reference to themacchina/themes
folder?
This is probably the case, although I'm having a hard time tracking such a bug down, especially since I've carefully tweaked the configuration paths in v6 to look at the correct paths depending on the operating system, and macOS being the only OS suffering from this doesn't help. I'll look even harder, there's got to be a way.
from macchina.
I will look at this issue today and push a solution for macOS.
from macchina.
I will look at this issue today and push a solution for macOS.
Can you work on this in the v6.0.2 branch?
from macchina.
Please also see #239. There seems to be an issue with the Helium theme which silently fails. Also, the dirs
crate does not respect $XDG_CONFIG_HOME, the default location for the macchina.toml file is under /Users/YOU/.config/macchina/macchina.toml, alternatively you can provide the config via the --config flag.
from macchina.
#239 is about the Hydrogen theme, not Helium, is it not? From the screenshot above (see my previous comment) one can see that the location of my configuration is indeed /Users/YOU/.config/macchina
(with macchina.toml
and /themes
in there) - so I would say the paths are correct.
Do we want to create a minimally reproducible curl
example to execute and try, say something along the lines of
brew install macchina
curl .../macchina.toml
curl .../macchina/themes
so that we make sure that we both reproduce the same?
from macchina.
#239 is about the Hydrogen theme, not Helium, is it not? From the screenshot above (see my previous comment) one can see that the location of my configuration is indeed
/Users/YOU/.config/macchina
(withmacchina.toml
and/themes
in there) - so I would say the paths are correct.Do we want to create a minimally reproducible
curl
example to execute and try, say something along the lines ofbrew install macchina curl .../macchina.toml curl .../macchina/themes
so that we make sure that we both reproduce the same?
Oh, you're right, it's about the Hydrogen theme, sorry. We can create a reproducible example, please keep in mind that the changes that I made today are not (yet) in Homebrew. I created a new branch in the repository to keep track of our minimally reproducible example:
brew install macchina
cd ~/.config
mkdir macchina && cd macchina
curl https://raw.githubusercontent.com/Macchina-CLI/macchina/issue-97-example/contrib/macchina.toml > macchina.toml
mkdir themes && cd themes
curl https://raw.githubusercontent.com/Macchina-CLI/macchina/issue-97-example/contrib/themes/Lithium.toml > Lithium.toml
But even for the old version (6.0.1), this returns the proper output with the correct theme (for me):
There is a bug in 6.0.1 that will always print an error message if there is no default config file found:
But that's fixed in 6.0.2. Can you try the example above?
from macchina.
Well that's a good ending :)
I'm sorry I wasn't able to catch this before the release of v6, but I'm glad you figured it out.
I'll have that fixed ASAP.
from macchina.
Amazingly enough it seems that the line that breaks the code is:
palette = "Light"
in the theme definition.
Your example works fine; I was curious and I tried with other themes, like Hydrogen and Helium - and they still broke. So I commented out one line at a time (monkey debugging method 😝 ) and saw that if yo remove
palette = ...
from any theme they work just fine. Likewise, if you add it to your example, it breaks again as well.Can you confirm this is the case for you as well? See below for demo:
Screen.Recording.2021-12-16.at.23.38.58.mov
Now the Lithium theme does have its own palette section in the
.toml
, however the same behaviour happens with Hydrogen and Helium (namely removingpalette = ...
makes all work fine).
Yes, it happens with all themes, since palette = ...
is actually not correct syntax anymore. So when macchina tries to read the theme file, it fails. It's really necessary that we print an error message to inform the user in that case.
from macchina.
Hydrogen is the only offender, all other themes use the latest format.
It's really necessary that we print an error message to inform the user in that case.
We're still working on making error handling the best it can be, it's not exactly trivial to get it right.
from macchina.
One question though, is Homebrew packaging the manpages?
from macchina.
Sorry guys, release to v6.0.3 two days ago changed it again? :p
Probably time for me to let go of this unrequited love 😭
from macchina.
Changed what?
from macchina.
The .toml
configuration is ignored again: I do not get exceptions/errors whilst invoking macchina
, however the settings are not being parsed.
from macchina.
--config
doesn't work either, I assume?
from macchina.
I think I know what's going on, please bear with me.
from macchina.
I made a slight modification, and it seems to be working on my machine through the manual path that is $HOME/.config/macchina/macchina.toml
and not $XDG_CONFIG_HOME/.config/macchina/macchina.toml
. So you don't have to set XDG_CONFIG_HOME
.
from macchina.
In my case $XDG_CONFIG_HOME
is not set either, and the path is the correct one to $HOME/.config
. Do the themes still live in $HOME/.config/macchina/themes
(I remember previously we had a problem in the path to the theme not being recognised, and I thought this may still be the case??)?
from macchina.
Do the themes still live in
$HOME/.config/macchina/themes
No, but I found the culprit.
from macchina.
There shouldn't be any more issues now.
from macchina.
How are things looking now, @gennaro-tedesco ?
from macchina.
Thanks for bearing with me, and sorry about all this.
from macchina.
Related Issues (20)
- [BUG] Typo in build instructions provided in wiki HOT 4
- How to insert a blank line before the key-values? HOT 10
- Modifying keys does nothing on macOS HOT 7
- Compile error, possibly two tui versions? HOT 34
- [BUG] Macchina 6.1.4 doesn't report version when running macchina --version HOT 1
- [BUG] Brew packages are displayed +1 HOT 7
- [BUG] Crashes on FreeBSD 13 HOT 8
- [BUG] Fails to build on Ubutnu HOT 19
- [BUG] Custom theme not being used HOT 3
- [BUG] Invalid variant: OperatingSystem HOT 10
- [BUG] Terminal has weird name on NixOS with home-manager HOT 12
- [BUG] Proxmox VE is shown to be debian HOT 7
- [BUG] Crashes on cpu model "Intel Core i7 9xx (Nehalem Core i7, IBRS update)" HOT 7
- [feature request] Display total RAM memory in GB HOT 2
- Possible improvement to memory readout HOT 6
- [BUG] WSL2 openSUSE Tumbleweed zypper packages didn't show up HOT 4
- [Feature Request] More standard and versioned release artifacts on github
- Accept disk path(s) to display usage of specified disk / multiple disks
- [BUG] Build failed with libgit2 1.6.4 on Arch Linux HOT 2
- [BUG] Fails to build with ratatui HOT 2
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 macchina.