146 lines
4.2 KiB
Org Mode
146 lines
4.2 KiB
Org Mode
#+TITLE: UI Configurations
|
|
|
|
* Intro
|
|
this file/section configures the UI settings
|
|
|
|
* Toolbar and Scrollbar
|
|
removing this stuff makes emacs looks more cleaner
|
|
#+begin_src emacs-lisp
|
|
(tool-bar-mode -1)
|
|
(menu-bar-mode -1)
|
|
(scroll-bar-mode 1)
|
|
#+end_src
|
|
|
|
* Maximize
|
|
Start emacs as a maximized window at start
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
;; (add-hook 'window-setup-hook 'toggle-frame-maximized t)
|
|
|
|
#+END_SRC
|
|
|
|
* Fringes
|
|
Fringes are the small gap at the side of emacs.
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
(fringe-mode '(12 . 6))
|
|
#+END_SRC
|
|
|
|
* 80 Column Line with fill-column-indicator
|
|
|
|
#+begin_src emacs-lisp
|
|
(add-hook 'text-mode-hook #'display-fill-column-indicator-mode)
|
|
(add-hook 'prog-mode-hook #'display-fill-column-indicator-mode)
|
|
#+end_src
|
|
|
|
* Cursor Shape
|
|
The most visible type of cursor shape
|
|
|
|
#+begin_src emacs-lisp
|
|
(setq-default cursor-type 'box)
|
|
#+end_src
|
|
|
|
* Tab Size
|
|
sets the tab size 5 spaces
|
|
|
|
#+begin_src emacs-lisp
|
|
(defvar default-custom-tab-size 5 "set the main tab size for all configs")
|
|
|
|
(setq-default default-tab-width default-custom-tab-size
|
|
tab-width default-custom-tab-size
|
|
c-basic-offset default-custom-tab-size)
|
|
#+end_src
|
|
|
|
* Line numbers
|
|
Turn on line numbers in text mode/code modes. ~this part is not fully working~
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(add-hook 'term-mode-hook (lambda () (display-line-numbers-mode -1)))
|
|
(add-hook 'text-mode-hook 'display-line-numbers-mode)
|
|
(add-hook 'emacs-lisp-mode-hook 'display-line-numbers-mode)
|
|
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
|
|
|
|
#+END_SRC
|
|
|
|
* Line Highlight
|
|
Highlights the current line
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(global-hl-line-mode 1)
|
|
|
|
#+end_src
|
|
|
|
* Matching Pairs
|
|
|
|
** Highlight
|
|
highlight matching pairs of parenthesis, and other characters
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(show-paren-mode 1)
|
|
|
|
#+END_SRC
|
|
|
|
** Electric-pair-mode
|
|
Automatically pair parentheses, and other characters, built in on emacs
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(electric-pair-mode 1)
|
|
|
|
#+END_SRC
|
|
|
|
* Clock/Time in Modeline
|
|
currently unused
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
;; (display-time-mode)
|
|
#+END_SRC
|
|
|
|
* Ligatures
|
|
#+begin_src emacs-lisp
|
|
|
|
(use-package ligature
|
|
:config
|
|
;; Enable the "www" ligature in every possible major mode
|
|
(ligature-set-ligatures 't '("www"))
|
|
;; Enable traditional ligature support in eww-mode, if the
|
|
;; `variable-pitch' face supports it
|
|
(ligature-set-ligatures 'eww-mode '("ff" "fi" "ffi"))
|
|
;; Enable all Cascadia Code ligatures in programming modes
|
|
(ligature-set-ligatures 'prog-mode '("|||>" "<|||" "<==>" "<!--" "####" "~~>" "***" "||=" "||>"
|
|
":::" "::=" "=:=" "===" "==>" "=!=" "=>>" "=<<" "=/=" "!=="
|
|
"!!." ">=>" ">>=" ">>>" ">>-" ">->" "->>" "-->" "---" "-<<"
|
|
"<~~" "<~>" "<*>" "<||" "<|>" "<$>" "<==" "<=>" "<=<" "<->"
|
|
"<--" "<-<" "<<=" "<<-" "<<<" "<+>" "</>" "###" "#_(" "..<"
|
|
"..." "+++" "/==" "///" "_|_" "www" "&&" "^=" "~~" "~@" "~="
|
|
"~>" "~-" "**" "*>" "*/" "||" "|}" "|]" "|=" "|>" "|-" "{|"
|
|
"[|" "]#" "::" ":=" ":>" ":<" "$>" "==" "=>" "!=" "!!" ">:"
|
|
">=" ">>" ">-" "-~" "-|" "->" "--" "-<" "<~" "<*" "<|" "<:"
|
|
"<$" "<=" "<>" "<-" "<<" "<+" "</" "#{" "#[" "#:" "#=" "#!"
|
|
"##" "#(" "#?" "#_" "%%" ".=" ".-" ".." ".?" "+>" "++" "?:"
|
|
"?=" "?." "??" ";;" "/*" "/=" "/>" "//" "__" "~~" "(*" "*)"
|
|
"\\\\" "://"))
|
|
;; Enables ligature checks globally in all buffers. You can also do it
|
|
;; per mode with `ligature-mode'.
|
|
(global-ligature-mode t))
|
|
|
|
#+end_src
|
|
|
|
* Theme
|
|
Load theme (that is built-in)
|
|
|
|
#+begin_src emacs-lisp
|
|
(load-theme 'modus-vivendi t)
|
|
#+end_src
|
|
|
|
* Welcome Screen
|
|
Having a blank screen at the start is much more simpler and better
|
|
#+begin_src emacs-lisp
|
|
(setq inhibit-startup-screen t)
|
|
#+end_src
|
|
|