#+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 * Window Size Set the default window size when making a new frame #+begin_src emacs-lisp (defun set-window-size () (add-to-list 'default-frame-alist '(width . 80)) (add-to-list 'default-frame-alist '(height . 40)) (add-to-list 'initial-frame-alist '(width . 80)) (add-to-list 'initial-frame-alist '(height . 40))) #+end_src run the function at startup of a frame #+begin_src emacs-lisp (when (display-graphic-p) (set-window-size)) (add-hook 'before-make-frame-hook 'set-window-size) #+end_src * 80 Column Line with fill-column-indicator #+begin_src emacs-lisp (when (> emacs-major-version 27) (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 (let ((custom-tab-size 5)) (setq-default default-tab-width custom-tab-size tab-width custom-tab-size c-basic-offset custom-tab-size)) #+end_src * Line Highlight Highlights the current line #+begin_src emacs-lisp (global-hl-line-mode 1) #+end_src * Indentation guides #+begin_src emacs-lisp (use-package highlight-indent-guides :hook (prog-mode . highlight-indent-guides-mode)) ;; :custom ;; (highlight-indent-guides-method 'character "set the guide style to a bitmap picture") ;; (highlight-indent-guides-character "│" "set the guide character to a horizontal line") ;; (highlight-indent-guides-auto-enabled nil) ;; :config ;; (set-face-foreground 'highlight-indent-guides-character-face (face-foreground 'fill-column-indicator))) #+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 * Focus on Hover #+begin_src emacs-lisp (setq mouse-autoselect-window t) #+end_src * Ligatures #+begin_src emacs-lisp ;; (when (> emacs-major-version 28) ;; (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 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) ;; (use-package solarized-theme ;; :config ;; (load-theme 'solarized-selenized-black)) #+end_src * Fringes Fringes are the small gap at the side of emacs. #+begin_src emacs-lisp (fringe-mode '(12 . 6)) #+end_src * Line numbers Turn on line numbers in text mode/code modes. #+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 * 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