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

Change install location #6

Closed
dominiksalvet opened this issue Apr 26, 2020 · 21 comments
Closed

Change install location #6

dominiksalvet opened this issue Apr 26, 2020 · 21 comments

Comments

@dominiksalvet
Copy link

dominiksalvet commented Apr 26, 2020

I am really happy that you have adopted GitPack in this project! 😃

But your local installation target directory for afc-gui.py does not seem to be correct. You probably would not want to have all binaries of locally (per user) installed programs in your home directory which is also visible from a file manager. Moreover, home directory is not in the PATH environment variable, so you cannot run your program just by typing its file name. So typing afc-gui.py in a terminal won't work on most, if not all, Linux setups. You would need to use /home/<user>/afc-gui.py command to actually run it.

So I am suggesting to change it from "$HOME" to "$HOME/.local/bin", which is in the PATH at least on Ubuntu-based systems (after reboot if ~/.local/bin is freshly created). Feel free to get inspired from afc-scout, which may be similar in many GitPack-related cases.

Nevertheless, I think that sooner or later you may want to create an application launcher in ~/.local/share/applications as well. It can be directly run from GNOME Shell.


The temperature presets is a good idea for a GUI as such but its current implementation is not so good (note that it affect yours GitPack map file). I would be for something similar to asus-fan-control's models database (<preset-name><separator><temperatures> per line), which could be placed somewhere in ~/.local/share. Once user wants to choose a new preset to apply, it would read all presets from one file and it could present all presets in a better way than wanting the user to find an .afc file manually. Current presets are cumbersome in GitPack (and any package manager) matter. Just my opinion... 😄

@Greifent
Copy link
Owner

For the file selection I'm still developing it, it should be complete by tomorrow, I'm adding a window that show the temperature, in that window you can choose if apply or not the temperature

@Greifent
Copy link
Owner

For the path, I didn't know that, I'm changing it

@Greifent
Copy link
Owner

I have also in mind the creation of an application

@Greifent
Copy link
Owner

BTW I'm having a lot of trouble uploading the modified files. How do you do it?

@dominiksalvet
Copy link
Author

What do you mean? Images or terminal dumps would be appreciated.

BTW, if you create a file directly using GitHub (e.g., Create new file button), it is better to commit it directly to the master branch instead of creating a new one (switch is at the bottom) for your project's size. Your Git history graph looks really weird... Where is the problem? Why are you continuously merging master branch?


Based on the current repository state, temperaturesPreset/ is mapped to "$HOME"/.local/bin, which is very bad - it is not a binary. I am for modifying the presets mechanism as described above. If you want to keep the current implementation, I would be for removing presets folder from GitPack mapping completely and provide them another way. If you still want to map it somewhere, I am for "$HOME"/.local/share/afc-gui.

@Greifent
Copy link
Owner

Greifent commented Apr 26, 2020

I have a lot of problem uploading files:
It says it is up to date while is not, sometimes I have this:
error: failed to push some refs to 'https://github.com/Greifent/afc-gui.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.

I think I'm doing something wrong.
And since I had to go I simply rewrote what was on afc-gui, I'm changing it, where you think I should put it?

@dominiksalvet
Copy link
Author

dominiksalvet commented Apr 26, 2020

Okay - the swiftest advice. Cut and paste your local afc-gui repository (containing folder should have the same name) somewhere else. Clone you repository again and go manually through changes not commited yet on broken repository and apply them to the fresh one. Commit your changes.

And since I had to go I simply rewrote what was on afc-gui, I'm changing it, where you think I should put it?

Did not understand, sorry. 😢


BTW, the problem looks like to be connected with the fact that you are making changes based on commits rather than based on branches (branch tip, branch HEAD). You never want to do that except when creating a branch but that is another story. So for next time, try to use git status from time to time and make sure its output starts with something like this:

On branch master
Your branch is up to date with 'origin/master'.

Do not ever work on changes when your output starts with something like this:

HEAD detached at f38db2a

Use git checkout master to get back on the master branch and here you will be able to push changes to origin/master branch -- origin/master is a master branch on the remote (so on GitHub).

@Greifent
Copy link
Owner

Greifent commented Apr 26, 2020

Did not understand, sorry.

I had done the path for afc-gui.py, then I had to do another thing, came back and, for error, rewrote the same thing for the folder, where should I place that folder

@Greifent
Copy link
Owner

I think I understood how the git upload work, I was missing steps, thanks.

@dominiksalvet
Copy link
Author

I had done the path for afc-gui.py, then I had to do another thing, came back and, for error, rewrote the same thing for the folder, where should I place that folder

If I understand it correctly, I have already written it - "$HOME"/.local/share/afc-gui.

@Greifent
Copy link
Owner

This is what i see:
Screenshot from 2020-04-26 23-27-01

@dominiksalvet
Copy link
Author

Yes, and it should be:

afc-gui.py "$HOME"/.local/bin
temperaturesPreset/ "$HOME"/.local/share/afc-gui

@Greifent
Copy link
Owner

Oh, I thought you changed it, my bad, I'm changing it

@dominiksalvet
Copy link
Author

Nope, it was directed to you. 😄 Please, read the original post of this issue again to make sure you are not missing anything. ☺️ Most importantly, its second part.

@Greifent
Copy link
Owner

Greifent commented Apr 26, 2020

Yeah, doing something like you have done for the models would be good, I only need to figure out how to do that; I'll try in a few days, this week I'll be busy with school.

@dominiksalvet
Copy link
Author

Yeah, do not rush with afc-gui. You have no deadlines and no commitments. You just want to learn something new and you should enjoy it! Work on it when you want. 😊

I think that this issue has reached the point that its major part has been resolved. You can close it or leave it open if you want to remember the presets stuff.

Good luck with studies! 🧑‍🎓

@Greifent
Copy link
Owner

I know, I just found something interesting to do during quarantine, and I'm pretty happy with the results. I'll leave this open.
Thanks

@dominiksalvet
Copy link
Author

dominiksalvet commented Apr 27, 2020

if you create a file directly using GitHub (e.g., Create new file button), it is better to commit it directly to the master branch instead of creating a new one

BTW, if you modify/create/delete files using GitHub, then once you are on the master branch (git checkout master) in your local repository, you also need to run git pull to actually fetch these changes from GitHub (from origin/master) and merge them into local master branch. Then you will have your local branch master synchronized with the remote branch origin/master and it should be very easy to push changes without any complications whatsoever. JFYI. :octocat:

@Greifent
Copy link
Owner

Greifent commented Apr 27, 2020

Thanks, I'll try to modify on my local saves, then upload. I thinks it is easier

@dominiksalvet
Copy link
Author

Yeah, you can do it that way for now. But once you are working with someone on the same branch, you can imagine their changes as being "done on GitHub"... So you eventually will need to pull their changes and they will need to pull yours.

@Greifent
Copy link
Owner

I know that

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