Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
My I3-Emacs Integration (khz.ac)
75 points by nosolace 11 hours ago | hide | past | favorite | 20 comments
 help



Side note: I am really enjoying HN today with the set of stories with personal hacks like this i3-emacs integration, someone's desk setup, someone's writer-deck laptop install, the kinda hilarious but also hecka geeky thermal ttrpg thingamabob, and the 16 byte wake up demo. Fun geeky stuff that isn't AI,and I love AI, but it ain't everything.

Can you pls link to them?

I did the same integration with an Erlang daemon. All relevant key presses are sent to it and based on the current focused application the daemon does different things. I built an Erlang library i3_IPC to listen for events and send commands to Sway.

Ooo this is nice. I may have to try to get this working with my personal setup using Emacs and Sway.

My long term vision is to make an Emacs implementation that is compatible only in philosophy. It would use Guile instead of Elisp, default to bindings that are more familiar to people coming from more modern systems, and would be built from the beginning with concurrency and graphics in mind. For now it remains a dream though.


I know, right? However, one of the strongest points of Emacs is the huge amount of existing packages.

VSCode is pretty much this. But with typescript instead of Guile. After 30 years of Emacs, I switched .

after 30 years you say this? this cannot be serious.

Sounds like you want Lem. Though it's common lisp instead of guile.

https://github.com/lem-project/lem


Unrelated, but me and Gemini just invented "C-x 4" for multiscreens.

  (defun my-external-readonly-split ()
    "Open the current file in an external xfce4-terminal as read-only."
    (interactive)
    (if buffer-file-name
        (start-process "xfce-terminal-split" nil 
                       "xfce4-terminal" "-x" "emacs" "-nw" 
                       "--eval" "(find-file-read-only (pop command-line-args-left))"
                       buffer-file-name)
      (message "Current buffer is not visiting a file!")))

  (global-set-key (kbd "C-x 4") 'my-external-readonly-split)

Incredibly splendid. I just tested it myself.

Try C-x 2, C-x 3 and C-x 4


I've started using ewm to get this kind of unification between emacs window management and non-emacs window management.

https://codeberg.org/ezemtsov/ewm


I keep trying it (coming from EXWM) but I get lots of lag, stutters, and poor fractional scaling. I'm not sure how much of that is "GTK under wayland", Emacs's PGTK build (known to have lag/rendering issues), AMD kernel drivers (?), or EWM itself; but it's not yet a replacement for EXWM in my experience.

I just use super(win key)/hyper (bound to capslock) for i3-related commands and leave emacs to its own devices with normal binds

That's fine as far as it goes, but I don't think that gets you what this article is for, which is things like using the same binding context-dependently to navigate between emacs splits and regular window manager windows, context-dependently. Which is a fun bit of overengineering.

There can never be too many modifier keys:

https://xcancel.com/octonion/status/1341113219142828039


Yes, I am misunderstanding the problem. The windows/mac command key leave shift, control and alt free for i3.

Yeah this is what I do. This article feels like crazy overengineering for something that's not really a problem

Unless you have RSI. Then it might be worth it. Depends on what hurts.

A dedicated key for all window-manager things is what people that have thought about it do (I use the "windows" key). But keyboard manufacturers haven't thought about it, so sometimes reasonable things aren't possible. I don't know.

Ah no video it action??

Very interesting though. I don’t always read entire posts on blogs but this one I did. Lisp looks really interesting.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: