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

Use XDG config folder instead of .shutter stray folder #492

Closed
wants to merge 4 commits into from
Closed

Use XDG config folder instead of .shutter stray folder #492

wants to merge 4 commits into from

Conversation

artscoop
Copy link

@artscoop artscoop commented Aug 1, 2022

Changed the sometimes hardcoded settings path to instead use
.config/shutter instead of .shutter. Respects XDG standards and the home folder.

Needs testing since I know nothing about Perl and could not execute project.

Changed the sometimes hardcoded settings path to instead use
`.config/shutter` instead of `.shutter`.
Respects standards and the home folder.
@Photon89
Copy link
Member

Photon89 commented Aug 1, 2022

Looks like our tests expect the ~/.shutter dir.
@ruzhnikov, @DarthGandalf What do you think?

@artscoop
Copy link
Author

artscoop commented Aug 1, 2022

(I can have a look at the tests, it's just that I know nothing about Perl and could not run from source)

@Photon89
Copy link
Member

Photon89 commented Aug 1, 2022

Unfortunately, I know nothing about Perl as well, so I guess, we need input from the more knowledgeable guys. 😃

Changed tests to reflect config folder change.
@ruzhnikov
Copy link
Contributor

@artscoop let me checkout into your master branch and pass tests. I'll try to do it today or tomorrow

@artscoop
Copy link
Author

artscoop commented Aug 2, 2022

Hi, thank you very much! I've added you as a collaborator to the project.

@ruzhnikov
Copy link
Contributor

ok, it will take a while. Give me a couple of days

Copy link
Member

@DarthGandalf DarthGandalf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve the idea in general. But we need to have a clean migration path for existing users

@@ -260,6 +260,7 @@ my $so = Shutter::App::Options->new($sc, $shf);
#set home
#--------------------------------------
$ENV{'HOME'} = Shutter::App::Directories::get_home_dir();
$ENV{'CONFIG'} = Shutter::App::Directories::get_config_dir();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this need to be in the process environment?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not needed. I'll drop it.

@DarthGandalf
Copy link
Member

This closes #67

@@ -66,7 +65,7 @@ sub get_home_dir {Glib::get_home_dir}
sub get_config_dir {Glib::get_user_config_dir}

sub create_hidden_home_dir_if_not_exist {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function name doesn't reflect anymore what this function does, as the shutter dir is not longer "hidden", and not necessary in home

@ruzhnikov
Copy link
Contributor

I approve the idea in general. But we need to have a clean migration path for existing users

I think we should move the current data from ~/.shutter to ~/.config/shutter on the running stage and keep only the folder ~/.shutter existing after that.

@Photon89 Photon89 linked an issue Aug 14, 2022 that may be closed by this pull request
@Nurmagoz
Copy link

Nurmagoz commented Sep 9, 2023

Hello, any progress to be made?

@artscoop artscoop closed this by deleting the head repository Nov 7, 2023
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

Successfully merging this pull request may close these issues.

use XDG base directories instead of HOME
5 participants