1 Emacs my Window Manager
Yes I use emacs to manage my windows on my main machine, I find it to be very useful, some of the benefits I have from doing this are.
- Having a unified scripting language for my whole computer interface.
- Access to all my notes at the push of a button.
- Emacs commands for managing windows.
Having emacs be my window manager means that if I can imagine something most likely I can make it happen. For instance I might want to have a key binding that brings up a specific buffer (windows in emacs are buffers or in terms of the UI it is frames, emacs is really old), I can basically just write a function that does this.
(switch-to-buffer "<buffer name>")
this has a slight problem with my multi head setup, so I need to figure out how to do it better, but this would do the thing I want if I am on the right screen. This is however only a small part of the things that is possible when you have all the power of emacs everywhere in your system, I can push a few buttons and get a search result. So if I push "C-c w s" I get a small prompt in my command line, querying what I want to search for, so I type in something then it searches on whatever search engine I want it to search on, right now I use duckduckgo.com, but that is easy to change, but even better it just opens up the webpage when I hit enter, and I can look through the results.
(defun tsl/w3m-search (search) (interactive "sSearch for ?:") (w3m-goto-url (concat "http://duckduckgo.com/?q=" search)))
that is the code I wrote to do it, and then the code to bind it to a key.
(global-set-key (kbd "C-c w s") 'tsl/w3m-search)
but again you can extend the environment so far, all this from having your powerful text editor be your manager, I think I will stay with this setup, once I get it done how I like it I wont move away for a long time.
So I like to keep my notes in a specific folder, and do them with org-mode, although I still have not actually put it down to a very good structure and made my system built up around the notes the ability to do this is pretty straightforward, but there is not so much around this in my current setup.
1.2 Commands for navigating window layout
This is also nice, it means I wont have to learn a different set of commands to do my window management, and everything can be done in the same language which is actually the biggest gain in this setup, since everything is pretty consistent and I can do what I want with the same commands that I use when I write text, there is a few small things about this when I am using something like <Brave>, copying text in X apps is C-c, but emacs takes this, so there is a workaround, all the normal commands takes Shift as well, works fine but it is a thing to get used to.