;;; thanos-aesthetics.el --- -*- lexical-binding: t; -*- ;; Copyright (C) 2023 Thanos Apollo ;; Author: Thanos Apollo ;; Keywords: ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see . ;;; Commentary: ;; ╭━━━━┳╮╱╱╱╱╱╱╱╱╱╱╱╱╱╱╭━━━╮╱╱╱╱╱╭╮╭╮╱╱╱╱╱╱╱╱╭━━━╮ ;; ┃╭╮╭╮┃┃╱╱╱╱╱╱╱╱╱╱╱╱╱╱┃╭━╮┃╱╱╱╱╱┃┃┃┃╱╱╱╱╱╱╱╱┃╭━━╯ ;; ╰╯┃┃╰┫╰━┳━━┳━╮╭━━┳━━╮┃┃╱┃┣━━┳━━┫┃┃┃╭━━╮╱╱╱╱┃╰━━┳╮╭┳━━┳━━┳━━╮ ;; ╱╱┃┃╱┃╭╮┃╭╮┃╭╮┫╭╮┃━━┫┃╰━╯┃╭╮┃╭╮┃┃┃┃┃╭╮┃╭━━╮┃╭━━┫╰╯┃╭╮┃╭━┫━━┫ ;; ╱╱┃┃╱┃┃┃┃╭╮┃┃┃┃╰╯┣━━┃┃╭━╮┃╰╯┃╰╯┃╰┫╰┫╰╯┃╰━━╯┃╰━━┫┃┃┃╭╮┃╰━╋━━┃ ;; ╱╱╰╯╱╰╯╰┻╯╰┻╯╰┻━━┻━━╯╰╯╱╰┫╭━┻━━┻━┻━┻━━╯╱╱╱╱╰━━━┻┻┻┻╯╰┻━━┻━━╯ ;; ╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱┃┃ ;; ╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╰╯ ;;; Code: (setf inhibit-startup-message t) (setf initial-scratch-message nil) ;; Transparency (add-to-list 'default-frame-alist '(alpha-background . 90)) (add-to-list 'default-frame-alist '(alpha 90 90)) (when (equal is-phone nil) (scroll-bar-mode -1) (set-fringe-mode 10)) (tool-bar-mode -1) (tooltip-mode -1) (menu-bar-mode -1) (which-key-mode 1) (blink-cursor-mode -1) (menu-bar--visual-line-mode-enable) (global-visual-line-mode 1) ;; Set emojis for emacs 29 (require 'emojify) (setf global-emojify-mode 1) (setf visible-bell t) (column-number-mode) (global-display-line-numbers-mode 1) (menu-bar--display-line-numbers-mode-relative) ;;Disable line numbers for some modes (dolist (mode '(pdf-view-mode-hook org-mode-hook term-mode-hook shell-mode-hook eshell-mode-hook vterm-mode-hook elfeed vterm-mode telega-chat-mode-hook telega-root-mode-hook nov-mode-hook transmission-mode-hook)) (add-hook mode (lambda () (display-line-numbers-mode 0)))) ;; Set font-size for each device (custom-set-faces (if is-hermes '(default ((t (:inherit nil :height 120 :family "Jetbrains Mono")))) '(default ((t (:inherit nil :height 135 :family "Jetbrains Mono")))))) (load-theme 'doom-molokai) ;; Custom function to load theme (defun thanos/load-theme () "Disable current theme and load a new one." (interactive) (let ((theme (intern (completing-read "Theme: " (custom-available-themes))))) (disable-theme (car custom-enabled-themes)) (load-theme theme t))) (define-key thanos/applications-map (kbd "t") 'thanos/load-theme) (doom-modeline-mode 1) (setf doom-modeline-height 35) ;; Don't display battery-mode on desktop (if is-zeus (display-battery-mode 0) (display-battery-mode 1)) ;; UI -- Vertico, consult, marginalia (nerd-icons-completion-mode) (vertico-mode) (savehist-mode) (define-key global-map (kbd "C-s") 'consult-line) (define-key global-map (kbd "C-x b") 'consult-buffer) (define-key global-map (kbd "C-c m") 'consult-imenu) (setf register-preview-delay 0.5 register-preview-function #'consult-register-format) (setf xref-show-xrefs-function #'consult-xref xref-show-definitions-function #'consult-xref) (require 'marginalia) (marginalia-mode) (add-hook 'marginalia-mode-hook #'nerd-icons-completion-marginalia-setup) ;; Helpful (require 'helpful) (define-key global-map (kbd "C-h f") #'helpful-callable) (define-key global-map (kbd "C-h v") #'helpful-variable) (define-key global-map (kbd "C-h k") #'helpful-key) (define-key global-map (kbd "C-h x") #'helpful-command) (define-key global-map (kbd "C-c C-d") #'helpful-at-point) (define-key global-map (kbd "C-h F") #'helpful-function) ;; ibuffer (global-set-key (kbd "C-x C-b") 'ibuffer) (add-hook 'ibuffer-mode-hook 'nerd-icons-ibuffer-mode) (defun thanos/markdown-theme () "Adjust height for markdown" (interactive) (dolist (face '(markdown-header-face-1 :height 2.0)))) (require 'markdown-mode) (setq markdown-header-scaling t) (add-to-list 'auto-mode-alist '("\\.md\\'" . gfm-mode)) (setq markdown-command "multimarkdown") (electric-pair-mode 1) (auto-insert-mode 1) (global-flycheck-mode) (global-set-key (kbd "M-.") 'xref-find-definitions) (global-set-key (kbd "C-c l") 'display-line-numbers-mode) (provide 'thanos-aesthetics) ;;; thanos-aesthetics.el ends here