Fork me on GitHub
#portal
<
2022-04-10
>
djblue04:04:21

Also, the electron host is now https://github.com/djblue/portal/releases/download/0.23.0/portal-darwin-x64-0.23.0.zip! (OSX only for now) You need to start the electron portal app first, but no windows will appear. When you run (portal.api/open {:launcher :electron}) an always-on-top window should appear that will become transparent when not focused. Feedback welcome!

🎉 5
😎 4
Brian Chevalier04:04:09

Excited to try this one out

❤️ 1
djblue04:04:51

Should be handy for those looking for a more integrated approach but can't host a web ui in their editor / ide 👌

djblue04:04:26

I have it setup to work kinda like the conjure HUD in that it will auto-open when I eval

djblue04:04:43

Then I can close it when I want to focus my code again

pithyless08:04:35

@U1G869VNV - just tried it out; it looks interesting, but I think you need to expose some of the config options. Most of the choices (zoom-factor and width/height) I can change via existing keyboard bindings, but if it's going to run in always-on-top mode, I'd like to configure the opacity. I think I'd prefer to set the opacity to 0 so it will "hide" completely from view when not focused (even though it could still remain on top).

👍 1
pithyless08:04:58

^ This option may be more relevant to a laptop setup than perhaps a multi-monitor setup where you can just dedicate a portion of your screen to portal.

pithyless08:04:07

> Then I can close it when I want to focus my code again How do you close it? Via cmd-q? Is there a shortcut in the electron portal to close/hide without quitting?

djblue09:04:06

Cmd+w is the shortcut I use

pithyless10:04:44

Doesn't that still keep portal focused as the primary app (from the MacOS window manager perspective)?

pithyless10:04:10

Either way, cmd-q and cmd-w are commands that I would like to avoid -> I am far too likely to accidentally close some other application tab when switching between apps. I'm considering a workflow where I can cmd-tab to portal to show/hide it. That way I can also setup my editor to auto-show after eval, but I can easily jump back and forth via cmd-tab (which I'm used to, since I end up jumping through other apps as well). Any thoughts on allowing the customization of opacity in the Electron build, so I can have it become 100% transparent when I switch apps?

1
pithyless10:04:42

That is to say, it's already how I work by having portal open in a web-browser tab. But it would be nicer to use the functionality of having it as a separate electron process in my application-switcher and to make sure it always stays on top when focused (vs. switching to my browser and looking for the window with my Portal tab).

nate20:04:44

> I have it setup to work kinda like the conjure HUD in that it will auto-open when I eval Is this behavior built-in or are you combining it with another tool? or perhaps a fancy tap function that wraps portal?

djblue21:04:14

Not built it. I wrap my evals in a thing that will open portal if it's not open, and then tap the result to it 👌

👍 1
jumar08:04:51

@U1G869VNV is the electron app mentioned somewhere in the repo / docs? I couldn't find anything about it there. How do I get the latest download link?

jumar08:04:36

I'm also not able to use shortcuts like Ctrl+J for command pallete, etc. Is there some trick to make them work?

djblue20:04:07

Hi @U06BE1L6T, I haven't documented the electron app since it's till in the works. However, you can try an early version it on OSX using this https://github.com/djblue/portal/releases/download/0.23.0/portal-darwin-x64-0.23.0.zip 👌

djblue20:04:10

Also, what os/browser are you using? There are other shortcuts, such as (ctrl|cmd)+shift+p or :

jumar04:04:25

I tried again and it works! It must have been doing something wrong yesterday - not sure what but when I started the app again, both Ctrl+j and Cmd + shift + p work just fine