76 lines
2.3 KiB
EmacsLisp
76 lines
2.3 KiB
EmacsLisp
(require 'ox-latex)
|
|
|
|
(defun mk-show-modeline ()
|
|
(interactive)
|
|
(setq mode-line-format
|
|
'(("-" mode-line-mule-info
|
|
mode-line-modified
|
|
mode-line-frame-identification
|
|
mode-line-buffer-identification " "
|
|
mode-line-position
|
|
mode-line-modes
|
|
(which-func-mode
|
|
("" which-func-format "--"))
|
|
(global-mode-string
|
|
("--" global-mode-string)) "-%-")))
|
|
(defvar mode-line-format-current
|
|
(symbol-value 'mode-line-format)))
|
|
|
|
(defun mk-hide-modeline ()
|
|
(interactive)
|
|
(setq mode-line-format nil))
|
|
|
|
(defun mk-write-mode-enable ()
|
|
(setq olivetti-body-width 73)
|
|
(olivetti-mode)
|
|
(mk-hide-modeline))
|
|
|
|
(defun mk-write-mode-disable ()
|
|
(olivetti-mode)
|
|
(mk-show-modeline))
|
|
|
|
(defun me/split-windows-horizontal (count-windows)
|
|
"Split windows horizontal by equal width."
|
|
(interactive "nHow many splits? ")
|
|
(delete-other-windows)
|
|
(let ((width (/ (window-total-width) count-windows)))
|
|
(dotimes (i (1- count-windows))
|
|
(split-window-right (- width)))))
|
|
|
|
(defun me/split-windows-vertical (count-windows)
|
|
"Split windows vertical by equal width."
|
|
(interactive "nHow many splits? ")
|
|
(delete-other-windows)
|
|
(let ((height (/ (window-total-height) count-windows)))
|
|
(dotimes (i (1- count-windows))
|
|
(split-window-below (- height)))))
|
|
|
|
(defun me/split-h3 ()
|
|
(interactive)
|
|
(me/split-windows-horizontal 3))
|
|
|
|
(defun me/split-v3 ()
|
|
(interactive)
|
|
(me/split-windows-vertical 3))
|
|
|
|
(add-to-list 'org-latex-classes
|
|
'("koma-article"
|
|
"\\documentclass{scrartcl}"
|
|
("\\section{%s}" . "\\section*{%s}")
|
|
("\\subsection{%s}" . "\\subsection*{%s}")
|
|
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
|
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
|
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
|
|
|
|
;; Set transparency of emacs
|
|
(defun transparency (value)
|
|
"Sets the transparency of the frame window. 0=transparent/100=opaque"
|
|
(interactive "nTransparency Value 0 - 100 opaque: ")
|
|
(set-frame-parameter (selected-frame) 'alpha value))
|
|
|
|
(defun start-irc (nick)
|
|
(interactive "sTell me your nick please: ")
|
|
(erc-tls :server "irc.libera.chat"
|
|
:port 6697
|
|
:nick nick
|
|
:full-name "emacs-user"))
|