Feature #42

Give the geeklets an optional name property

Added by Philippe Martin 416 days ago. Updated 371 days ago.

Status:Closed Start:
Priority:Low Due date:
Assigned to:Yann BIZEUL % Done:

100%

Category:File plugin
Target version:3.0 RC1
Resolution:

fixed


Description

If you want to target a specific geeklet from AppleScript, the only current way, apparently, is to use its index:

tell application "GeekTool" to refresh geeklet 3

However it implies that you know its index and this one never changes.

I tried using the id property, as in:

refresh (shell geeklet whose id is "948A919F-C56C-45B2-B377-5D5848C99EA8")

... but I get an execution error (Can’t get shell geeklet whose id = "948A919F-C56C-45B2-B377-5D5848C99EA8".). I would expect that to work. However, even if it did work, the id is not visible in the UI so that's not very handy. Ideally, a name property visible in the Properties window would allow things like this:

tell application "GeekTool"
tell shell geeklet "somename" to refresh
--or
refresh geeklet "somename"
end tell

Associated revisions

Revision 145
Added by Yann BIZEUL 379 days ago

FIX #42 Large font choices make "chose font" button unredable

History

Updated by Yann BIZEUL 416 days ago

try refresh shell geeklet id "5948A919F-C56C-45B2-B377-5D5848C99EA8"

It would probably be a good idea to reference the geeklet id somewhere, like a button in the inspector to copy ID to pasteboard, it would be handy and maybe less confusing than provide a name field that would not have much utility beyond that

Updated by Philippe Martin 415 days ago

Sorry, I missed your reply again. This TrackTicket software is not very handy to follow threads.

Replying to [comment:1 yann]:

try refresh shell geeklet id "5948A919F-C56C-45B2-B377-5D5848C99EA8"

That works, thank you! I don't know if it's just me, but I find this syntax a bit unusual, though. But as long as it's documented, that's fine by me. :)

It would probably be a good idea to reference the geeklet id somewhere, like a button in the inspector to copy ID to pasteboard, it would be handy and maybe less confusing than provide a name field that would not have much utility beyond that

Yes, that would work. I suggested a name, because GeelTool 2 used them (which I found handy), and I thought a name might be useful in relation with the groups feature too. How do you make a GUI for groups that allows to list and edit their contents without a name? I mean if you keep every group-related controls in the geeklet's properties window, how does the user see which geeklets a given group contains? Do you plan to draw them all as selected?

Generally I'd tend to favor human-readable identifiers, which are more friendly, especially when the user is given the possibility to choose/change them. And obviously a statement reading 'tell geeklet "uptime" to refresh' is more readable than 'tell geekelt id "5948A919F-C56C-45B2-B377-5D5848C99EA8" to refresh'. However, if GeekTool's main target is geeks, such ids are probably just fine. ;) Personally I'll keep loving it anyway!

Updated by Yann BIZEUL 393 days ago

You can now easily get a Geeklet ID by double-clicking the bottom of the inpector or using the field's contextual menu.
Nervertheless, I don't consider this issue fixed, cos ideally, I agree with you, naming a geeklet would be nice to use that name in script, but I'm still looking for a way to implement that wouldn't bother people that don't need it.

Updated by Philippe Martin 393 days ago

Having the ID easily accessible is a very good thing, in the meantime. Thanks for that!

Updated by Yann BIZEUL 374 days ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset r145.

Updated by Anonymous 374 days ago

Yann BIZEUL wrote:

Applied in changeset r145.

I'm confused. All changeset r145 says is "FIX #42 Large font choices make "chose font" button unredable". Looks like you updated the wrong ticket.

Updated by Yann BIZEUL 373 days ago

Yes I put 42 instead of 62 in the commit log, sorry :-)

Updated by Yann BIZEUL 373 days ago

  • Status changed from Resolved to Closed
  • Resolution set to fixed

Also available in: Atom PDF