nadrad / h-m-m

Hackers Mind Map
GNU General Public License v3.0
1.89k stars 53 forks source link

h-m-m --config doesn't work. #43

Closed sofomryu closed 1 year ago

sofomryu commented 1 year ago

Hi, I posted same one in here.

https://github.com/nadrad/h-m-m/issues/42

As you fixed, h-m-m --focus-lock=true test works! However, setting a config file still doesn't work. typing 'h-m-m --config=./.h-m-m.conf' still show the same problem in the previous issue.

Below is my conf file

Screenshot from 2022-11-25 19-01-22

nadrad commented 1 year ago

I seems to be working fine! Are you sure the file is ./.h-m-m.conf and not ./h-m-m.conf? Regardless, now it gives an error if you enter a non-existing config file.

sofomryu commented 1 year ago

I am sure the file is ./.h-m-m.conf As you said, if I type wrong name of a file, it shows an error that the custom config file doesn't exit! But, If I type correct conf file, it shows the second image in the referred issue (#42).

Maybe I set inproper conf file? Below is my conf file. Please let me know if there is anything wrong set in the conf file.

Screenshot from 2022-11-25 19-01-22

nadrad commented 1 year ago

The problem is with the color values. The "\033" works as a string and not a escape code, and that's why you were seeing its value on the screen instead of seeing its effect. It's fixed now. Note: remove the quotation marks in the config file.

sofomryu commented 1 year ago

The problem is with the color values. The "\033" works as a string and not a escape code, and that's why you were seeing its value on the screen instead of seeing its effect. It's fixed now. Note: remove the quotation marks in the config file.

Thank you! I have one more question. After removing quotation mark, typing 'h-m-m --config=./.h-m-m.conf" opens a h-m-m file with the config adjusted. But, the config is not adjusted to the whole h-m-m file as a default value. I should add the comment '--config=./.h-m-m.conf' every time I want to adjust the config to a h-m-m file. How can I set the config as a default?

nadrad commented 1 year ago

Well, you have a few options:

  1. move the config file to the default location, or
  2. use an environment variable to set the custom location instead of adding it to the command, or
  3. create an alias for the command in your shell to run the application with the current arguments.

I personally open it (and other frequently used applications) using a key binding. My key binding runs the following:

xfce4-terminal -T h-m-m --working-directory=/mind-maps-path/ --zoom=0.9 -e /path/h-m-m

In a case like this, you can easily add the config location as an argument as well. Although, I don't do it and use a config file in the default location instead.