Skip to content

Latest commit

 

History

History
61 lines (46 loc) · 1.53 KB

mh-misc.org

File metadata and controls

61 lines (46 loc) · 1.53 KB

Misc

Misc Things

Here are some Misc things I don’t know where to put anything else.

This is basically stolen from https://github.com/sethmdoty/emacs.d/blob/master/emacs.org

(global-hl-line-mode 1)

customize the titlebar

(defun frame-title-format ()
  "Return frame title with current project name, where applicable."
  (concat
   "emacs - "
   (when (and (bound-and-true-p projectile-mode)
              (projectile-project-p))
     (format "[%s] - " (projectile-project-name)))
   (let ((file buffer-file-name))
     (if file
          (abbreviate-file-name file)
       "%b"))))

(setq-default frame-title-format '((:eval (frame-title-format))))
(add-to-list 'default-frame-alist '(ns-transparent-titlebar . t))
(add-to-list 'default-frame-alist '(ns-appearance . dark))

Colorize buffer

;; load package
(require 'ansi-color)

;; function for colorizing
(defun colorize-buffer ()
  (interactive)
  (toggle-read-only)
  (ansi-color-apply-on-region (point-min) (point-max))
  (toggle-read-only))

;; add hook to apply the function when magit mode is enabled
(add-hook 'magit-mode-hook 'colorize-buffer)