reddit / emacs
Embar: Emacs bar and launcher combination
ior3k · 2022-08-15 21:10
This is an emacs bar and launcher combination, written in emacs lisp, I am currently working on. I do not have it on a public repo yet. Would anyone be interested in this?
mitchTux · 2022-08-15 21:14
How does this work? Is it one frame per buffer? how are you drawing the bar? does it use EXWM? I have so many questions
ior3k · 2022-08-15 22:24
The bar is just a minibuffer frame. I use a single minibuffer for all frames, which is why there are no minibuffers attached to the frames in the screenshots. I am not using EXWMi and my objective is to make the bar WM independent.
\> I have so many questions
Ask away. I would rather have questions to answer than having to come up with them by myself.
timvinc · 2022-08-15 22:29
This looks pretty cool, I am interested if you do make it public.
lebensterben · 2022-08-15 23:16
You should post this to r/unixporn too
MitchellMarquez42 · 2022-08-15 23:16
Please.
mitchTux · 2022-08-15 23:17
Ok that makes a lot of sense. What's the window manager? And how does it communicate with your window switcher?
github-alphapapa · 2022-08-15 23:43
It would be helpful if you explained exactly what it does. :)
DefiantAverage1 · 2022-08-16 00:03
Potential rofi alternative?
rfeynman42 · 2022-08-16 01:44
I would definitely be interested! Seems like a more emacs-y alternative to polybar when running in EXWM
Litanys · 2022-08-16 02:41
What beautiful concoction is this!? You gonna post a public repo? Do you have a keybind that invokes it from other apps? How does it stay placed there? Does the frame use the X dock hints or something in it's frame?
CorysInTheHouse69 · 2022-08-16 03:02
I would be very interested
B4C0N2 · 2022-08-16 03:20
Nice work mate. Super interested in this project.
No_Function9350 · 2022-08-16 05:30
Yes please. I’ve been searching for something like this forever
FOSSbflakes · 2022-08-16 06:44
Very neat! I use krunner quite a lot and would be eager to switch to something like this. Especially if it easily can org-capture from other applications.
draxil · 2022-08-16 07:09
Fair to say people are interested! Can't wait to see more.
tognols · 2022-08-16 08:27
This is very cool, does it work on Wayland or is it X dependent?
No_Psychology_2418 · 2022-08-16 09:18
I have been trying to achieve something similar (just started though, i am much less advanced in my project than you are) if you shared it, i would be very glad to test it for you and even contribute to your project at my own level if you'd like me to
Kqpa · 2022-08-16 09:33
Wall?
k_bo_flub · 2022-08-16 09:43
This needs to be posted in r/unixporn. This is just lovely, beautiful.
ior3k · 2022-08-16 10:03
My window manager is (currently) Qtile, I will add a snippet with my changes to [config.py](https://config.py) that made it possible for the bar to stay up there.
ior3k · 2022-08-16 10:06
Sorry, I hit C-RET by mistake.
Re: your second question, I wrote a small library to communicate with the WM using EWMH, which means that all of this only works on X11, for now. I may try to add a Wayland backend when/if I learn more about how to communicate with Wayland compositors, but no guarantees.
ior3k · 2022-08-16 10:07
That is one of the objectives, yes.
ior3k · 2022-08-16 10:07
Could you elaborate? I am not sure I understand what you mean.
ior3k · 2022-08-16 10:10
I appreciate your offer of help. I hope to make this public soon (i.e., in about a week or so). It s just that there is currently no documentation, and there are a few bugs that I need to fix first before this is usable by a wider group of people.
ior3k · 2022-08-16 10:21
> What beautiful concoction is this!?
It's a mix of emacs minibuffer,, with some widgets drawn in it while it is inactive, along with consult--multi and vertico (with a few custom sources) for the launcher bit.
> You gonna post a public repo?
I do hope so.
> Do you have a keybind that invokes it from other apps?
Yes, I added a keybind to my WM config which opens the launcher via emacsclient.
> How does it stay placed there?
I added it to the floating layer of my WM config, and then configured it in elisp to move it to the right place. Something like this:
```elisp
(minibuffer-frame-alist '((title . "_minibuffer_")
(font . "Ubuntu Mono-15")
(line-spacing . 0.2)
(internal-border-width . 12)
(height . 1)
(top . 18)
(left . 194)
(width . (text-pixels . 2130))))
```
ior3k · 2022-08-16 10:22
Only X right now.
ior3k · 2022-08-16 10:22
Not sure what you mean.
ior3k · 2022-08-16 10:23
Thank you, I appreciate it. I'll leave it to others to post there, if they want, though.
Kqpa · 2022-08-16 10:27
What’s the wallpaper?
ior3k · 2022-08-16 10:31
Sure. The goal is for this to be a pure emacs lisp replacement for both bars like polybar, tint2, etc, and also for launchers like krunner, rofi, etc. The bar is extensible through "widgets" (plain emacs functions, really).
The following widgets are currently implemented for the bar:
- Desktop indicator, with different colors for active desktop, inactive desktop that contains windows, and inactive empty desktop.
- Current window title. If the window is an emacs frame, it shows the buffer state (modified/saved) and the cursor position. If it's not an emacs frame, then it only shows the title, for now.
- Clock with customizable format.
The launcher is using consult--multi and vertico, and a few consult custom sources to let you switch to windows, launch apps, etc. It is also extensible.
Please let me know if you have more questions, or if my response is incomplete.
ior3k · 2022-08-16 10:35
Oh, sorry, it's an image I got from http://pexels.com. There are lots of great potential wallpapers there.
No_Psychology_2418 · 2022-08-16 10:38
Great, i am really looking forward to seeing it released and to try it out
Kqpa · 2022-08-16 10:46
Thanks, do you remember the wallpaper you’re using by any chance?
ior3k · 2022-08-16 10:54
Unfortunately I can't seem to find it, but this query: [https://www.pexels.com/search/sunset/](https://www.pexels.com/search/sunset/]) has a lot of similar ones.
[deleted] · 2022-08-16 11:33
[deleted]
palebluebytes · 2022-08-16 12:05
Ive been trying to get something like this running on and off for a while, this looks like Nirvana to me, great work
github-alphapapa · 2022-08-16 13:28
Sounds great! Keep it up!
mitchTux · 2022-08-16 15:10
ok that makes sense. how does this work when you split a window in emacs? does it create a new frame for the window? what happens if you switch the buffer in a frame? or are the buffers not shared?
protoHumanum · 2022-08-16 15:21
I would be interested as well
White86ec · 2022-08-16 15:23
I LOVE IT!
ior3k · 2022-08-16 15:47
> how does this work when you split a window in emacs?
In this case, the bar will show information about the active window. No new frames will be created by the bar.
>what happens if you switch the buffer in a frame?
That, along with, say, changing tabs on the browser, should trigger a change in the text shown by the bar. It's not working yet due to a bug, but that's exactly the thing I'm currently working on.
Cat_Marshal · 2022-08-16 18:35
Looks awesome, post a public repo I can follow or something when you can. Even if it is empty for now.
ior3k · 2022-08-16 19:49
I'll keep a bookmark to this article and warn everybody when it's up.
french_pressed · 2022-08-16 22:58
This looks great. Do you see it also serving a function similar to something like [Alfred](https://www.alfredapp.com/) or [Raycast](https://www.raycast.com/)? This is an idea I've always wanted to play around with and was thinking it might fit into your project.
ior3k · 2022-08-16 23:10
If you are talking about being able to list entries from multiple sources, that is one of the design goals. If not, could you be more specific?
french_pressed · 2022-08-16 23:37
I think that's pretty much it. As a more concrete example, for Alfred there is the [Dash plugin](https://github.com/Kapeli/Dash-Alfred-Workflow). It lets you interface with the Dash app by typing `dash {query}`. (Note I'm just talking about this general idea, not interfacing with Dash specifically).
Another useful feature is the ability to quickly perform calculations from Alfred or Raycast.
emacsomancer · 2022-08-17 01:01
I'd be interested in the launcher. Maybe add clipboard management too?
hkjels · 2022-08-17 07:27
I'm not 100% sure how I feel about this being the mini-buffer, but I'm interested in giving it a run. I'm setting up a new box really soon, so the timing is impeccable.
ior3k · 2022-08-17 09:52
TBH, use of the minibuffer is almost an implementation detail. I prefer it that way because I want to have as few visible elements as possible, but there's no impediment for the bar to be a different frame.
I want to be careful, though, because I don't want to have to deal with a huge project (which is why I'm trying to make things as extensible as possible).
w0ntfix · 2022-08-17 16:05
I've been doing this for a few years to get the frecency from presient.el into dmenu-like contexts. Yours looks really nice though, excited for you to put it in a repo
wdkrnls · 2022-08-21 22:02
I love everything about this. This would fit wonderfly into my emacs controlled herbstluftwm setup. It's always irritated me that I waste so much space on my tiny laptop screen drawing minibuffers for each emacs frame.
positivelyqualityles · 2022-08-22 23:00
Hi, I'm interested as well. This is really beautiful! Thanks for sharing
I made a similar project last year: [https://github.com/jollm/exlybar](https://github.com/jollm/exlybar) . I've been using it personally since initial development, but it needs improvements, e.g., I'm planning to make a new rendering backend based on posframe, and the system tray needs work.
Hope to see your repo pop up on emacs-news or another emacs-related channel at some point in the future :)
ior3k · 2022-08-23 10:09
Oh, this is pretty neat. I had no idea something like this already existed. Did you announce it here? Judging by the feedback on this post, it seems there is a lot of room for these kinds of widgets.
I did not look at the code in depth yet, but it seems that I am using a different approach than you are. I am trying to make the bar a single svg image and render to that, and I am aiming to use a very limited markup language for configuration/new widget creation.
In any case, dont give up on your project. I am sure more people would be interested.
positivelyqualityles · 2022-08-24 00:37
No, I only announced it on IRC, mostly because I wanted to have a better performing start up time prior to a wider announcement.
Yes, I really like your approach! Likely there are a lot of great applications for SVG in Emacs. Mine renders individual glyphs and then sends them to the X server with coordinates from a layout.
Thanks! Hoping to get back to it soon. It's good to see the level of interest in this area.
No_Psychology_2418 · 2022-11-07 19:40
Hi there, have you ever realeased or at least made your project public? I have been waiting for this, and I would be more than happy with even a buggy and unfinished version of it if that's ok with you. I don't really know how these things work, and I feel like your work would be a very solid basis to at least learn about it, and maybe someday contribute myself :)
ior3k · 2022-11-07 22:30
Hey, thanks for your interest. I have not yet released anything or made the project public. I am indeed taking a little bit longer than "a week or so", but I decided to do some other related emacs work before I went back to the bar itself. Bottom line, though, is I haven't given up, I just changed the strategy a little bit. When I have something that I think is good enough to show, I'll post it on this subreddit, so feel free to keep an eye on it.
No_Psychology_2418 · 2022-11-08 10:09
Thanks a lot, i am very hyped for it, and kind of struggling to achieve this myself, so I'll be waiting here. Hope you get some time to release a prototype soon :)
agostinoba · 2022-11-24 03:34
Are you still working on this?
ior3k · 2022-11-24 05:29
I am.
agostinoba · 2022-11-24 23:13
It's good to hear it. I hope you can finish it one day.
ior3k · 2022-12-18 17:44
Progress here: https://github.com/dleal-mojotech/edie
ior3k · 2022-12-18 17:44
Progress here: https://github.com/dleal-mojotech/edie
No_Psychology_2418 · 2022-12-18 18:34
Awesome, thanks a lot I'll check it out as soon as I get some time to