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

Don't store window state in config file #2240

Open
4 tasks done
danielwerg opened this issue Nov 10, 2024 · 2 comments
Open
4 tasks done

Don't store window state in config file #2240

danielwerg opened this issue Nov 10, 2024 · 2 comments

Comments

@danielwerg
Copy link

The fewer issues I have to read, the more new features I will have time to implement, so I ask that you please try these things first

Description

I manage my dotfiles with git and lossless-cut's config changing after every use because I will definitely resize it at least once while using:

"windowBounds": {
-        "x": 2567,
-        "y": 745,
-        "width": 1266,
-        "height": 688
+        "x": 4383,
+        "y": 42,
+        "width": 730,
+        "height": 1391
},

windowBounds should be stored in separate file and preferably in correct system dir (~/.local/state/lossless-cut on linux for example)

Also I don't know what would happen if x and y is bigger then device's monitor, if I were to pull this config from my laptop with a smaller resolution screen.

@mifi
Copy link
Owner

mifi commented Nov 10, 2024

Hmm, I think you could then argue that many other things (that change frequently) should also not be stored in the config file, like volume, output directory etc. But I don't think the added complexity of having two separate storage files outweighs the need for a less-frequently changing config file. And some people might want to customise all these things from a custom config file (see cli). I could be open for having a config setting for completely disabling storing of window bounds though.

Also LosslessCut uses the appPath in Electron which uses de facto "standard" config storage locations on different OSes. On Linux this happens to be $XDG_CONFIG_HOME or ~/.config. I'm hesitant to implement a custom logic for each platform to store an additional config file in a completely different location.

Also I don't know what would happen if x and y is bigger then device's monitor, if I were to pull this config from my laptop with a smaller resolution screen.

I think window managers will usually force-resize the window to fit the screen (at least MacOS does this in my experience).

@danielwerg
Copy link
Author

danielwerg commented Nov 10, 2024

I could be open for having a config setting for completely disabling storing of window bounds though.

Good middle ground! I haven't encountered this with "volume" but I could see it causing issue in future.

...store an additional config file in a completely different location

Well my argument is that it is not a "config" but rather a "state"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants