Open joaocandre opened 4 months ago
Pull requests are appreciated !!
I believe one just need to edit the desktop file since you can already
launch com.vixalien.sticky -n
to launch a new note.
On Thu, 23 May 2024 at 03:27, João André @.***> wrote:
Gnome Shell's Desktop's context menu is, in my opinion, entirely redundant, and adding a 'New Note' option would add some practical utility to it.
Alternatively, a Gnome Shell extension that placed the '+' button on the panel would also be useful.
— Reply to this email directly, view it on GitHub https://github.com/vixalien/sticky/issues/126, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJB5FCKPADI6FMM6JORKYMDZDVAZBAVCNFSM6AAAAABIEVRVCGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGMYTCNZVHA3DGMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
I have little to no experience in Gnome development, but I can look into it once I find the time.
(likely will start by reverse engineering some simple extension to implement this)
com.vixalien.sticky -n
to launch a new note.
after testing, that doesn't seem to work, I only get:
Gjs-Console-Message: 02:44:23.000: Storing Notes at: ~/.local/share/com.vixalien.sticky/notes
the same goes for com.vixalien.sticky -i
. I do get a notification of 'Sticky Notes is ready' though.
I do get a notification of 'Sticky Notes is ready' though.
You probably already have Sticky Notes running.
Indeed it does seem the case, but I wasn't sure if that was the planned behavior or a bug; I was able to override the desktop context menu through a simple Gnome Shell extension, but, as it stands, it needs to close all open notes before creating a new one, and as a result the open/closed status of each note is lost:
Nevertheless, adding a new note through the '+' button and through the CLI leads to two very different outcomes, which I think can be improved upon.
In any case, I may submit a PR with it or just extend the extension with additional features, such as nautilus integration and a panel indicator.
The issue seems to arise from how GIO works. When you run the command line command, GTK doesn’t know what instance you’re referring to. It instead recognizes that there is an existing application instance of Sticky Notes and launches that instead.
I’ll be trying to work on this soon.
On Mon, 3 Jun 2024 at 15:54, João André @.***> wrote:
Indeed it does seem the case, but I wasn't sure if that was the planned behavior or a bug; I was able to override the desktop context menu through a simple Gnome Shell extension, but, as it stands, needs to close all open notes before creating a new one, and as a result the open/closed status of each note is lost: Screenshot.from.2024-06-03.01-47-04.png (view on web) https://github.com/vixalien/sticky/assets/1812344/72c24de8-0447-4b6f-8e80-b73da18113da
Nevertheless, adding a new note through the '+' button and through the CLI leads to two very different outcomes, which I think can be improved upon.
In any case, I may submit a PR with it or just extend the extension with additional features, such as nautilus integration and a panel indicator.
— Reply to this email directly, view it on GitHub https://github.com/vixalien/sticky/issues/126#issuecomment-2145265930, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJB5FCJ6DIRBG3TISE6RSJLZFRYQDAVCNFSM6AAAAABIEVRVCGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBVGI3DKOJTGA . You are receiving this because you commented.Message ID: @.***>
I submitted a PR to update the desktop file of the app to add the 'New Note' action, but that only updates the extra options on the app launcher (e.g. secondary click on the dash); seems to me that the general/main background context menu is very much WM-dependent, so it's perhaps best to approach this on a case-by-case basis, even this is a GTK app and thus the Gnome ecosystem can be assumed.
In any case, the Gnome extension I mentioned implements this option in the background menu (and moves the note to the cursor position), in addition to other features like a general purpose panel indicator. An extension ends up being simpler to write (no need to delve into the app's extensive code base) and easier to debug.
I haven't thoroughly tested it, but it works well enough at the moment. Naturally you're welcome to review it!
the general/main background context menu
what does this mean?
the context menu you get when you right click on the desktop background; GJS calls it a background menu.
this thing?
Yes, that extension updates it to this.
Gnome Shell's Desktop's context menu is, in my opinion, entirely redundant, and adding a 'New Note' option would add some practical utility to it.
Alternatively, a Gnome Shell extension that placed the '+' button on the panel would also be useful.