Activate with M-F11 -> enhanced fullscreen :) (remove-hook 'after-save-hook 'count-words-and-characters-buffer) (set-fringe-mode (truncate (* fringe-width char-width-pixels)))) 8 pixels is the default, 6 is the average char width in pixels save the frame configuration to be able to restore to the exact previous state. if the menu bar was enabled, reenable it when disabling darkroom TODO : Find out if menu bar is enabled when entering darkroom. simple darkroom with fullscreen, fringe, mode-line, menu-bar and scroll-bar hiding. (setq babcore-fullscreen-p (not babcore-fullscreen-p)) (set-frame-parameter nil 'fullscreen 'fullboth))) (setq babcore-stored-frame-height (frame-height)) (setq babcore-stored-frame-width (frame-width)) (set-frame-parameter nil 'fullscreen nil)))) ( defvar babcore-fullscreen-p t "Check if fullscreen is on or off") should work for X und OSX with emacs 23.x ( TODO find minimum version). (wc-non-interactive (point-min) (point-max))) (message (concat "The current buffer contains " "Display the number of words and characters in the current buffer." ( defun count-words-and-characters-buffer () (autoload 'hide-mode-line "hide-mode-line" nil t) The whole code just takes 76 lines of code plus 26 lines comments and whitespace: Activate distraction free editing with F11 I build on hide-mode-line ( livejournal post or webonastick) as well as the full-screen info in the emacs wiki. It took some googling and reading emacs wiki, and then some Lisp-hacking, but finally it’s 4 o’clock in the morning and I’m writing this in my own darkroom mode 1, toggled on and off by just hitting F11. More exactly: I thought about looking at them again, but at second thought I decided to see if I could not just customize emacs to do the same, backed with all the power you get from several decades of being THE editor for many great hackers. To remove the distractions I looked again at WriteRoom and DarkRoom and similar which show just the text I want to write. via M-x), the status bar (modeline) is shown. Let’s take a break for a screenshot of the final version, because that’s what we really want to gain from this article: a distraction-free screenshot as distraction from the text :)Īs you can see, the distractions are removed - the screenshot is completely full screen and only the text is left. I just realized that I let myself be distracted by all kinds of not-so-useful stuff instead of finally getting to type the text I already wanted to transcribe from stenografic at the beginning of … last week.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |