Skip to content

Instantly share code, notes, and snippets.

@howardabrams
Last active December 10, 2016 11:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save howardabrams/9884305 to your computer and use it in GitHub Desktop.
Save howardabrams/9884305 to your computer and use it in GitHub Desktop.
In my Emacs initialization, I run through a few functions that automatically set up my windows and environment. This `setup-windows` function is unique for each machine that I work on, but I bind it to <F6>, so that I can easily start this. Why yes, if I run this function, I rebind it.
(defun setup-windows ()
"Setup my entire Emacs environment. Function is often called when I first start it up."
(interactive)
(frame-fullscreen)
(split-window-horizontally 168) ;; On this machine, I know how big
(split-window-horizontally 84) ;; my monitor is, so ...
(other-window 2)
(split-window-vertically)
(circe-connect-all) ;; Connect to all my IRC channels
(twit) ;; Start twitter in this window
(other-window 2)
(find-file "~/technical/personal.org")
(calendar)
;; <F6> is bound to this function, but once it starts, I don't want
;; to waste such a good keybinding, so I rebind it to the reconnect
;; function, which I need to do if the computer goes to sleep.
(global-set-key (kbd "<f6>") 'reconnect))
(defun frame-fullscreen ()
"Set the frame window to cover the full screen."
(interactive)
(set-frame-parameter nil 'fullscreen 'fullboth))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment