Repository navigation
Conversation
SanTeeg0
left a comment
There was a problem hiding this comment.
Thank you for your contribution!
I think it would be better to keep the default behavior of make install(install the extension locally for user), as it's what will be used most often anyway. This will also ensure some backward compatibility.
Other than that, everything looks good to me.
|
I understand. What do you want as target name for system-wide install? |
That's true, but mainly for packages, tools, etc. Extensions, themes, and so on are mostly user-specific. Also, PaperWM only had one way for users to install it locally, which was with
Something like |
SanTeeg0
left a comment
There was a problem hiding this comment.
Looks great!
But currently, the only option is to install the extension in the system using make install-system, but I think it would be great if there was a way to uninstall it. Especially using the same make uninstall command (to remove both the local and system versions, if any).
Sorry for my oversight, I could have noticed this earlier.
Then I'll need |
|
The |
|
What can I do to help this get merged? |
Points have been addressed, make uninstall is IMO out of scope
Thesola10
left a comment
There was a problem hiding this comment.
sorry, kinda forgot about it! Looks ready for merge
| const extLocation = extension.dir.get_parent(); | ||
| console.debug("Extension location " + extLocation.get_path()); | ||
| console.debug("XDG_DATA_DIR=" + GLib.get_user_data_dir()); | ||
| if (extLocation.get_parent().get_parent().get_path() == GLib.get_user_data_dir()) { | ||
| console.debug("We are installed in $XDG_DATA_HOME"); | ||
| this.schemaSource = Gio.SettingsSchemaSource.new_from_directory( | ||
| GLib.build_filenamev([extension.path, "schemas"]), | ||
| Gio.SettingsSchemaSource.get_default(), | ||
| false | ||
| ); | ||
| } else { | ||
| // assume we are installed system-wide and our schema source is in | ||
| // the default schema. | ||
| console.debug("We are installed in system $PREFIX."); | ||
| this.schemaSource = Gio.SettingsSchemaSource.get_default(); | ||
| } |
There was a problem hiding this comment.
Is this how extensions do it? I'd be tempted to believe GJS-side loading can be made agnostic since system-wide is also technically an XDG_DATA_DIR
There was a problem hiding this comment.
There may be a simpler way to do this using Extension.prototype.getSettings() which should lookup in the rights paths. I'll try to come up with something and report here.
No description provided.