2023-07-16 11:32:06 +02:00
|
|
|
;;; init.el -- Fschl Crafted Emacs user customization file -*- lexical-binding: t; -*-
|
2023-07-17 22:08:19 +02:00
|
|
|
;; This file is generated from the .org-file with the same name. If you want to edit the
|
|
|
|
;; configuration, DO NOT edit this .el-file, edit .org, instead.
|
2023-07-16 11:32:06 +02:00
|
|
|
|
2024-04-08 10:30:34 +02:00
|
|
|
(setq user-emacs-directory "~/.config/emacs/")
|
2024-02-23 18:55:38 +01:00
|
|
|
(setq crafted-emacs-home (expand-file-name "crafted-emacs/" user-emacs-directory))
|
2023-07-15 23:28:55 +02:00
|
|
|
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
|
|
|
|
(when (and custom-file
|
|
|
|
(file-exists-p custom-file))
|
|
|
|
(load custom-file nil :nomessage))
|
|
|
|
|
2023-07-16 11:32:06 +02:00
|
|
|
(load (expand-file-name "modules/crafted-init-config" crafted-emacs-home))
|
2023-07-15 23:28:55 +02:00
|
|
|
|
|
|
|
(require 'crafted-completion-packages)
|
|
|
|
(require 'crafted-evil-packages)
|
|
|
|
(require 'crafted-org-packages)
|
|
|
|
(require 'crafted-ui-packages)
|
2023-07-16 11:32:06 +02:00
|
|
|
(require 'crafted-ide-packages)
|
2023-07-17 23:52:54 +02:00
|
|
|
(require 'crafted-writing-packages)
|
2023-07-16 11:32:06 +02:00
|
|
|
|
2024-04-17 08:41:12 +02:00
|
|
|
(add-to-list 'package-selected-packages 'vterm)
|
2024-04-18 14:31:30 +02:00
|
|
|
(add-to-list 'package-selected-packages 'all-the-icons-dired)
|
|
|
|
(add-to-list 'package-selected-packages 'ranger)
|
|
|
|
(add-to-list 'package-selected-packages 'dired-ranger)
|
2024-04-17 08:41:12 +02:00
|
|
|
|
2023-07-15 23:28:55 +02:00
|
|
|
(package-install-selected-packages :noconfirm)
|
|
|
|
|
|
|
|
(require 'crafted-defaults-config)
|
|
|
|
(require 'crafted-startup-config)
|
|
|
|
(require 'crafted-completion-config)
|
|
|
|
(require 'crafted-evil-config)
|
2023-07-16 11:32:06 +02:00
|
|
|
(require 'crafted-org-config)
|
|
|
|
(require 'crafted-ui-config)
|
|
|
|
(require 'crafted-ide-config)
|
2023-07-17 23:52:54 +02:00
|
|
|
(require 'crafted-writing-config)
|
2023-07-15 23:28:55 +02:00
|
|
|
|
2024-04-17 08:41:12 +02:00
|
|
|
(require 'vterm)
|
|
|
|
|
2023-07-15 23:28:55 +02:00
|
|
|
(unless crafted-startup-inhibit-splash
|
|
|
|
(setq initial-buffer-choice #'crafted-startup-screen))
|
2023-07-27 23:57:28 +02:00
|
|
|
|
2024-04-18 14:31:30 +02:00
|
|
|
(defvar dw/is-termux
|
|
|
|
(string-suffix-p "Android" (string-trim (shell-command-to-string "uname -a"))))
|
|
|
|
|
|
|
|
(defvar dw/is-guix-system (and (eq system-type 'gnu/linux)
|
2024-04-29 14:29:41 +02:00
|
|
|
(file-exists-p "/etc/os-release")
|
2024-04-18 14:31:30 +02:00
|
|
|
(with-temp-buffer
|
|
|
|
(insert-file-contents "/etc/os-release")
|
|
|
|
(search-forward "ID=guix" nil t))
|
|
|
|
t))
|
|
|
|
|
2024-04-08 10:31:48 +02:00
|
|
|
(keymap-global-unset "M-#")
|
|
|
|
|
2024-04-29 14:29:41 +02:00
|
|
|
(define-key global-map (kbd "M-#") 'comment-line)
|
2024-04-08 10:31:48 +02:00
|
|
|
(define-key global-map (kbd "s-b") 'switch-to-buffer)
|
|
|
|
(define-key global-map (kbd "s-w") 'kill-current-buffer)
|
|
|
|
(define-key global-map (kbd "s-W") 'kill-buffer-and-window)
|
|
|
|
(define-key global-map (kbd "s-o") 'other-window)
|
|
|
|
(define-key global-map (kbd "C-z") nil)
|
|
|
|
|
2024-04-18 14:31:30 +02:00
|
|
|
(use-package all-the-icons-dired)
|
|
|
|
(use-package dired-ranger)
|
|
|
|
|
|
|
|
(defun dw/dired-mode-hook ()
|
|
|
|
(interactive)
|
|
|
|
(dired-hide-details-mode 0)
|
|
|
|
(unless (or dw/is-termux
|
|
|
|
(string-equal "/gnu/store/" (expand-file-name default-directory)))
|
|
|
|
(all-the-icons-dired-mode 1))
|
|
|
|
(hl-line-mode 1))
|
|
|
|
|
|
|
|
|
|
|
|
(use-package dired
|
|
|
|
:ensure nil
|
|
|
|
:bind (:map dired-mode-map
|
|
|
|
("b" . dired-up-directory)
|
|
|
|
("H" . dired-hide-details-mode))
|
|
|
|
:config
|
|
|
|
(setq dired-listing-switches "-agho --group-directories-first"
|
|
|
|
dired-omit-files "^\\.[^.].*"
|
|
|
|
dired-omit-verbose nil
|
|
|
|
dired-dwim-target 'dired-dwim-target-next
|
|
|
|
dired-hide-details-hide-symlink-targets nil
|
|
|
|
dired-kill-when-opening-new-dired-buffer t
|
|
|
|
delete-by-moving-to-trash t)
|
|
|
|
|
|
|
|
(add-hook 'dired-mode-hook #'dw/dired-mode-hook)
|
|
|
|
(global-set-key (kbd "s-j") #'dired-jump))
|
2023-07-27 23:57:28 +02:00
|
|
|
|
2024-04-18 14:31:30 +02:00
|
|
|
(load (expand-file-name "modules/fschl-ide.el" user-emacs-directory))
|
|
|
|
(load (expand-file-name "modules/fschl-org.el" user-emacs-directory))
|