140 lines
4.0 KiB
EmacsLisp
140 lines
4.0 KiB
EmacsLisp
(add-hook 'scheme-mode-hook 'guix-devel-mode)
|
|
|
|
(dirvish-override-dired-mode)
|
|
|
|
;; Example: Setting cursor-type to 'box
|
|
(setq cursor-type 'box)
|
|
|
|
(setq org-roam-directory "/mnt/Data/Documents/org-files/org-roam")
|
|
|
|
(load-file "~/.emacs.d/org-roam-templates/main.el")
|
|
|
|
(set-frame-parameter nil 'alpha-background 100)
|
|
|
|
(add-to-list 'default-frame-alist '(alpha-background . 100))
|
|
|
|
(defun toggle-transparency ()
|
|
(interactive)
|
|
(let ((alpha (frame-parameter nil 'alpha)))
|
|
(set-frame-parameter
|
|
nil 'alpha
|
|
(if (eql (cond ((numberp alpha) alpha)
|
|
((numberp (cdr alpha)) (cdr alpha))
|
|
;; Also handle undocumented (<active> <inactive>) form.
|
|
((numberp (cadr alpha)) (cadr alpha)))
|
|
100)
|
|
'(85 . 50) '(100 . 100)))))
|
|
|
|
(toggle-transparency)
|
|
(load-theme 'modus-operandi)
|
|
(global-set-key (kbd "C-c t") 'toggle-transparency)
|
|
|
|
|
|
(load-file "~/.emacs.d/extensions/alert/alert.el")
|
|
;; needs alert
|
|
(load-file "~/.emacs.d/extensions/pomidor/pomidor.el")
|
|
|
|
(add-to-list 'load-path "~/.emacs.d/extensions/xeft") ;; fix a bug that doesn't let it find the xapian module
|
|
|
|
(load-file "~/.emacs.d/extensions/xeft/xeft.el")
|
|
|
|
(setq xeft-title-function #'file-name-nondirectory)
|
|
;; Follow symlinks.
|
|
(setq xeft-recursive 'follow-symlinks)(defvar-local xeft--displayed-by-xeft-p nil)
|
|
|
|
(defun xeft--eager-preview()
|
|
(when-let* ((button (button-at (point)))
|
|
(path (button-get button 'path)))
|
|
;; Kill previously displayed buffer.
|
|
(when (window-live-p xeft--preview-window)
|
|
(with-selected-window xeft--preview-window
|
|
(when xeft--displayed-by-xeft-p
|
|
(kill-buffer))))
|
|
;; Show preview of current selection.
|
|
(xeft--preview-file path)))
|
|
|
|
(add-hook 'xeft-find-file-hook
|
|
(lambda () (setq xeft--displayed-by-xeft-p t)))
|
|
|
|
(advice-add 'xeft-next :after #'xeft--eager-preview)
|
|
(advice-add 'xeft-previous :after #'xeft--eager-preview)
|
|
|
|
|
|
;; Disable menu bar, tool bar, and scroll bar
|
|
(menu-bar-mode -1)
|
|
(tool-bar-mode -1)
|
|
(scroll-bar-mode -1)
|
|
|
|
;; Disable splash screen and startup message
|
|
(setq inhibit-splash-screen t
|
|
inhibit-startup-message t)
|
|
|
|
;; Set default font and size
|
|
(set-face-attribute 'default nil :family "DejaVu Sans Mono" :height 120)
|
|
|
|
;; Show line numbers
|
|
(global-display-line-numbers-mode)
|
|
|
|
;; Highlight current line
|
|
(global-hl-line-mode t)
|
|
|
|
;; Clean mode-line
|
|
(setq-default mode-line-format
|
|
'("%e"
|
|
mode-line-front-space
|
|
mode-line-mule-info
|
|
mode-line-client
|
|
mode-line-modified
|
|
mode-line-remote
|
|
mode-line-frame-identification
|
|
mode-line-buffer-identification
|
|
" "
|
|
mode-line-position
|
|
(vc-mode vc-mode)
|
|
" "
|
|
mode-line-modes
|
|
mode-line-misc-info
|
|
mode-line-end-spaces))
|
|
|
|
;; Set a clean minibuffer prompt
|
|
(setq-default minibuffer-prompt-properties
|
|
'(read-only t intangible t cursor-intangible t face minibuffer-prompt))
|
|
|
|
|
|
|
|
|
|
|
|
;; Set font to Iosevka Comfy with aliasing
|
|
(set-face-attribute 'default nil
|
|
:family "Iosevka Comfy"
|
|
:height 120
|
|
:weight 'normal
|
|
:width 'normal
|
|
:foundry "CTDB"
|
|
:slant 'normal
|
|
:underline nil
|
|
:overline nil
|
|
:strike-through nil
|
|
:box nil
|
|
:inverse-video nil
|
|
:foreground "unspecified"
|
|
:background "unspecified"
|
|
:stipple nil
|
|
:inherit 'unspecified
|
|
:antialias 'subpixel)
|
|
|
|
|
|
|
|
|
|
|
|
(add-to-list
|
|
'org-capture-templates
|
|
`("wN" "Web link" entry (file+headline ,(car org-agenda-files) "Links to read later")
|
|
"* %?%a \nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"Fri\"))\n"
|
|
:immediate-finish t :empty-lines 2))
|
|
|
|
|
|
|
|
(load-file "~/.emacs.d/emacs-nyxt.el" )
|
|
|