1

I have a big monitor and I am using I3 in linux. Frame adaption is thus not possible. I need something like zen mode, that does not hide anything.

The problem I have is, that everything is too far on the left.

right now I use this solution:

enter image description here

David
  • 291
  • 1
  • 9
  • 1
    Do you mean “window” or “frame” instead of “buffer”? – shynur Mar 14 '23 at 11:55
  • thanks, yes, you are right – David Mar 14 '23 at 11:59
  • 1
    Is this an emacs problem or a WM problem? I cannot figure out what question you are asking. – NickD Mar 14 '23 at 13:14
  • 1
    When I want my buffer to be in the middle of the screen with large "borders" on right and left, I put my emacs on fullscreen, open 3 buffers side by side, the ones one the borders I load the 'scratch' buffer, while the one in the middle is kept with whatever 'main' buffer I'm currently working on. Then I simply resize the buffers on the border to whatever size I want, squishing the one in the middle. `C-x 3` will split the frame vertically. – delki8 Mar 14 '23 at 14:01
  • 1
    Maybe olivetti-mode could help. https://github.com/rnkn/olivetti – g-gundam Mar 14 '23 at 15:14
  • @NickD This is a general problem with having a big monitor. Everything is too far on the left and I need it to be more centered. – David Mar 14 '23 at 18:06
  • But what does it have to do with Emacs? – NickD Mar 14 '23 at 18:46
  • @NickD maybe there is a function, that adds a gap on a window. That would solve my problem. – David Mar 14 '23 at 18:50
  • 1
    Maybe what @g-gundam said? In combination with deiki8's comment? Make a full size window and adjust the margins is the idea. Is that what you are asking? – NickD Mar 14 '23 at 18:50
  • 1
    You can use Emacs in an I3 floating window, and place it manually. Script I3's IPC as mentioned [I3's issue #3777](https://github.com/i3/i3/issues/3777). Set up I3's tiling to tile how you like. Keep Emacs "full screen" and use/configure a "distraction free" such as olivetti as mentioned by @g-gundam, zen-mode as mentioned by you, or [writeroom-mode](https://github.com/joostkremers/writeroom-mode). You may need to modify one of those to meet your needs. Or you can just set `left-margin-width` and/or `right-margin-width`. Otherwise you'll need to think about using a different window manager. – nega Mar 14 '23 at 19:00
  • 1
    You could also try https://emacs.stackexchange.com/questions/76087/save-restore-the-frame-position-and-size-of-the-last-session. I have no idea how or if those options would work with an I3 floating window though. – nega Mar 14 '23 at 19:06
  • @nega thank you, you helped me find the answer. – David Mar 14 '23 at 19:19
  • There are some packages that handle margins: `perfect-margin`, `centered-window`, `olivetti`. – crocefisso Apr 13 '23 at 22:45

2 Answers2

1

Have you tried installing the centered-window package, and toggling centered-window-mode to be on?

Blender
  • 25
  • 6
0

I found the solution with help of all the comments:

https://superuser.com/a/645114/1172141

(setq-default left-margin-width 10 right-margin-width 8);

enter image description here

David
  • 291
  • 1
  • 9