Backgrounds expects the entry_ref of the image file as part of the BMessage you send to it with hey. But that’s not possible, so your best bet is Lrrr’s little tool.
It may not be so out of reach. Try this instead of your ‘scpl’ message:
hey application/x-vnd.Haiku-Backgrounds Do MenuItem 'Scale to fit' of View 0 of View 'placement' of Window 0
Other views in Window 0 that may be of your interest are image
and workspaceMenuField
.
I’ve just finished adding the ability to modify placement mode, text outline, and offset, to my bgswitch app. Don’t hesitate to let me know if you encounter any “unexpected features” (otherwise known as bugs)
@Lrrr would you consider trying to add those command line options to the Background prefs? A nice addition IMO…
I have added it to my to-do list but I don’t know if it will get done any time soon.
Script updated with @augiedoggie 's bgswitch, and hey scripting, with the hints by @madmax
Or
Hi, it’s me again.
I recently started writing a yab script that is meant to be a replica/replacement of an old BeOS application, its name was DogWhistle (it opened folders using a tree view).
Currently yab is unable to represent the file system with a complete tree structure (at least I haven’t figured out how ), so I switched to a filtered listbox which is enough for my purpose.
Currently I open a new tracker window with the desired path by drawing it into the script window, and close the previous one using its title (so I have to enable tracker in showing the full path in the title tab), is it possible to script Tracker to open a path in a given window instead?
Just for clarity on how the script behaves now
That looks awesome.
Yeah, and I like the icon
Anyway, here’s a nice list of commands for tracker: Commands.h « tracker « kits « src - haiku - Haiku's main repository. kSwitchDirectory ('Tswd'
) looks promising.
Wow! Gret tool! I always wanted something like that, but for query and launch Webopostive bookmarks.
Looking good!
To get a treeview of the directories you will have to make a sys call to the tree
command, which is not installed by default. HaikuPorts is offline right now, but you can download it directly from https://depot.haiku-os.org.
for example
It should be possible to redirect that into a file, parse the file and feed the results into a yab treeview.
Hi, this is my current hobby, involving an input_filter, shortcuts and a bash script
In yab I can get the tab height value, while in bash I haven’t figured out how to do it yet, so I had to declare it as a constant, any guesses or suggestions?
Thanks in advance
You could get the tab frame with a scripting query and then calculate the height from that. hey MyApp get TabFrame of Window 0
Will this work without mouse then?
Moving a window without mouse input?
I mean the title tab, but I’ll try this anyway, perhaps it could return something useful, thanks
The input filter translates a gesture to an unmapped key, that shortcut could use to send a command, in this case my script with options and arguments, so this is a long way to say yes, it could
I guess I don’t understand what you mean then. The TabFrame is what holds the title tab.
Im sorry, i misunderstood what you meant (I thought you were talking about a tabbed view, my fault), I can confirm you are totally right, I have just to subtract this from the window’s frame brect, thanks a lot
Harder question: how to get deskbar’s “IsExpanded” using hey? -Not from its settings file, so it can’t be parsed from there using ‘message’-
EDIT: I’m sorry to bother you with these posts, but, yes, it can, it’s in the not so obvious boolean ‘state’ value, along with ‘vertical’,‘left’ and ‘top’ values that could be parsed to get deskbar’s position, I leave it here for posperity