Skip to content
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

custom config file not working on mac #120

Open
mactanxin opened this issue May 11, 2024 · 11 comments
Open

custom config file not working on mac #120

mactanxin opened this issue May 11, 2024 · 11 comments
Labels
bug Something isn't working

Comments

@mactanxin
Copy link

Describe the bug
A clear and concise description of what the bug is.
Installed from homebrew.
After install, there's no ~/.config/superfile/config.toml or even the ~/.config/superfile/ folder.

I created the folder with mkdir -p ~/.config/superfile/, then touch & edited the config.toml followed from Tutorial, Themes section, nothting changed.

then I found ~/Library/Application\ Support/superfile/ folder and after edit config files it works.

Expected behavior
generate config files in ~/.config/superfile folder and overwrite the default ones.

Screenshots
If applicable, add screenshots to help explain your problem.

System information (please complete the following information):

  • OS: MacOS
  • Version 14.2.1 (23C71)
  • Superfile Version v1.1.2
@mactanxin mactanxin added the bug Something isn't working label May 11, 2024
@yorukot
Copy link
Owner

yorukot commented May 11, 2024

https://github.com/adrg/xdg

So it's not technically a bug I think the documentation needs to be updated..

image
I actually update this in next version to make it easier for users to find the config file location.

@albinabc
Copy link

Was also expecting to user .config folder. But for me even the Application Support folder doesn't seem to work. Tried with both creating the folder /superfile and putting the config.toml / hotkeys.toml directly in the Application Support folder. Any suggestions? Can't run spl pl either, just gets me into superfile with "pl" as a search term.

@yorukot
Copy link
Owner

yorukot commented May 21, 2024

You should be running v1.1.2 v1.1.2 does not have this feature :(

@albinabc
Copy link

Ahh. Tested building from source now instead, and now the pl command works, and I can get the config path. However, one thing I'm noticing is that if I try to copy the path and paste for just opening in an editor, it doesn't find the config file because it doesn't escape the space in the "Application Support". However since it seemed to work for OP I guess that's not the culprit here...

@albinabc
Copy link

albinabc commented May 23, 2024

I tried updating the config path in the src and rebuilding, to see if I could put the config files in the .config/superfile folder instead. But that doesn't seem to work either. Not really getting those hotkeys, and can't get a theme to apply either.

A note, do I need to put themes like "catppuccin-latte" in the superfile/theme folder to be able to use it, or should it be available to begin with?

image

Note, running macOS 14.3 (23D56)

@yorukot
Copy link
Owner

yorukot commented May 23, 2024

@albinabc
Are you using the current branch version? If so, you can try changing the data in /src/config/fixed_variable.go.

@albinabc
Copy link

Just updated to try, did the config in /src/config/fixed_variable.go as you mentioned, rebuilt and moved the executable (to a non-privileged folder and running from there instead), but no difference. So what I'm testing to check if it has applied if I close the application with q (I'm using the vim hotkeys file) and also if the theme specified in config.toml has applied. Nothing seems to apply, and as the screenshot in my previous message, the path looks right after running spf pl. The command spf eh yields nothing, is that expected?

@yorukot
Copy link
Owner

yorukot commented May 23, 2024

Would you like to send your fixed_variable.go because I tested that it changes after updating it.

// ...

var HomeDir = xdg.Home
var SuperFileMainDir = "/home/nightcat/Documents/code/superfile" + "/superfile"
var SuperFileCacheDir = xdg.CacheHome + "/superfile"
var SuperFileDataDir = xdg.DataHome + "/superfile"
var SuperFileStateDir = xdg.StateHome + "/superfile"

// ...

@albinabc
Copy link

albinabc commented May 24, 2024

var HomeDir = xdg.Home
var SuperFileMainDir =  "~/.config/superfile"
var SuperFileCacheDir =  "~/.config/superfile"
var SuperFileDataDir =  "~/.config/superfile"
var SuperFileStateDir = "~/.config/superfile"

And also

var (
	ThemeFoldera      string = SuperFileMainDir + "/theme"
	LastCheckVersiona string = SuperFileDataDir + "/lastCheckVersion"
	ThemeFileVersiona string = SuperFileDataDir + "/themeFileVersion"
	FirstUseChecka    string = SuperFileDataDir + "/firstUseCheck"
	PinnedFilea       string = SuperFileDataDir + "/pinned.json"
	ConfigFilea       string = SuperFileMainDir + "/config.toml"
	HotkeysFilea      string = SuperFileMainDir + "/hotkeys.toml"
	ToggleDotFilea    string = SuperFileDataDir + "/toggleDotFile"
	LogFilea          string = SuperFileStateDir + "/superfile.log"
)

And yes this seems to apply, before I had updated it to .config/superfile I got the Application Support folder outputted from spf pl. The thing is that it doesn't seem to matter, because in neither case I can get any configuration/hotkeys to load.

@yorukot
Copy link
Owner

yorukot commented May 25, 2024

I tested it a little bit and I probably know why, you should use full paths instead of relative paths (~).

@albinabc
Copy link

Heyy that works!
I guess it's still a mystery as to why the original XDG path did not work for me, because then I hadn't fiddled with the paths or anything. But it's a viable workaround, thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants