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

Improve display handling and Makefile #7

Merged
merged 8 commits into from Feb 25, 2021

Conversation

MassimoGirondi
Copy link
Contributor

Hey Ciao!

Some patches to improve the usability:

  • X11 display handling
    The primary display can be disconnected (counter-intuitive but it can happen).
    With the previous solution, if the display was not connected, the program crashed.
    This patch improve display handling by searching the primary one. If not found as connected, select the first display in the list.
  • Makefile
    Automatically compile and install the software with make install. Install the requirements too.
  • .gitignore and prtscn.so file
    Adding a compiled library is generally useless since it would need to be recompiled for each machine.
    Remove it from the tree and avoid to add it again with .gitignore.

- Copy the files to ~/.config/i3expo with make install
- Copy the default configuration if it doesn't exist or if FORCE=1 is
  passed
- Remove installed files with make uninstall
Automatic install python dependencies with make install
@morrolinux
Copy link
Owner

Neat work!
On a side note, ~/.config folder should really be used only for user configurations, so the makefile target install should copy the python files and the screenshot library somewhere else, I'd suggest /opt/i3expo-ng.
Also could you add a note in the README explaining that the force option to overwrite previous configuration is suggested if after an update i3expo-ng crashes because of some missing config entries?

Thanks for your contribution

- The program is now installed to ~/.local/bin, a common path on modern
  machines.
- PATH is checked after installation, print how to run i3expod if not
  in  system paths.
- When force-copying config file, maintain the old one.
@MassimoGirondi
Copy link
Contributor Author

MassimoGirondi commented Feb 25, 2021

On a side note, ~/.config folder should really be used only for user configurations, so the makefile target install should copy the python files and the screenshot library somewhere else, I'd suggest /opt/i3expo-ng.

Why not ~/.local/bin? Seems more appropriate for modern systems and does not require root permissions.

Also could you add a note in the README explaining that the force option to overwrite previous configuration is suggested if after an update i3expo-ng crashes because of some missing config entries?

Done!

@morrolinux
Copy link
Owner

Why not ~/.local/bin? Seems more appropriate for modern systems and does not require root permissions.

Perfect :)

@morrolinux morrolinux merged commit 9a77521 into morrolinux:main Feb 25, 2021
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.

None yet

2 participants