diff options
Diffstat (limited to '.emacs.d')
-rw-r--r-- | .emacs.d/init.el | 124 |
1 files changed, 59 insertions, 65 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 754c54f..047e44e 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -32,8 +32,6 @@ (setf user-full-name "Thanos Apollo" user-mail-address "[email protected]") - - (defvar is-zeus (equal (system-name) "zeus")) (defvar is-hermes (equal (system-name) "hermes")) (defvar is-phone (equal (system-name) "localhost")) @@ -42,7 +40,7 @@ browse-url-generic-program "nyxt" backup-directory-alist '((".*" . "~/.Trash")) sentence-end-double-space nil - default-input-method "greek") + default-input-method "bulgarian-phonetic") (define-key global-map (kbd "<escape>") 'keyboard-escape-quit) (define-key global-map (kbd "M-<backspace>") 'backward-kill-sexp) @@ -52,6 +50,48 @@ (setf disabled-command-function nil ;; Enable all commands url-privacy-level 'high) ;; Privacy level +(require 'dired) +(define-key dired-mode-map (kbd "b") 'dired-up-directory) +(define-key dired-mode-map (kbd "v") 'dired-watch-video) +(define-key dired-mode-map (kbd "z") 'wdired-change-to-wdired-mode) +(define-key dired-mode-map (kbd "C-c w") 'dired-set-wallpaper) +(define-key dired-mode-map (kbd "C-c d") 'dired-delete-files-except) + +;; font +(custom-set-faces + (if is-hermes '(default ((t (:inherit nil :height 120 :family "Jetbrains Mono")))) + '(default ((t (:inherit nil :height 130 :family "Jetbrains Mono")))))) + +(if is-zeus + (display-battery-mode 0) + (display-battery-mode 1)) + +(savehist-mode) +(save-place-mode 1) +(recentf-mode 1) +(electric-pair-mode 1) + +;; Autoinsert +(auto-insert-mode 1) +(define-auto-insert + '("\\.sh\\'" . "Bash skeleton") + '("Description:" + "#!/bin/bash\n\n")) + +(add-to-list 'completion-styles 'initials t) + +(setf tab-always-indent 'complete) + +;; tramp +(setf tramp-default-method "ssh") + +;; xref +(setf xref-show-xrefs-function #'consult-xref + xref-show-definitions-function #'consult-xref) + +(add-hook 'emacs-lisp-mode-hook #'prettify-symbols-mode) +(add-hook 'lisp-mode-hook #'prettify-symbols-mode) + ;; Set and load custom.el (setf custom-file (locate-user-emacs-file "custom.el")) (load custom-file 'noerror) @@ -84,9 +124,9 @@ (setf straight-use-package-by-default t) -(setf straight-recipe-overrides - '((transmission :type git :host nil :repo "[email protected]:/var/git/transmission") - (yeetube :type git :host nil :repo "[email protected]:/var/git/yeetube"))) +;; (setf straight-recipe-overrides +;; '((transmission :type git :host nil :repo "[email protected]:/var/git/transmission") +;; (yeetube :type git :host nil :repo "[email protected]:/var/git/yeetube"))) (defvar thanos/custom-packages '((yeetube :local-repo "~/Dev/emacs-lisp/yeetube") @@ -203,7 +243,7 @@ (use-package nerd-icons-ibuffer :defer t - :hook ((ibuffer-mod))) + :hook ((ibuffer-mode . nerd-icons-ibuffer-mode-hook))) (use-package consult :defer t @@ -398,7 +438,6 @@ (use-package rainbow-delimiters :defer t - :init (add-hook 'emacs-lisp-mode-hook 'prettify-symbols-mode) :hook ((emacs-lisp-mode . rainbow-delimiters-mode) (lisp-mode . rainbow-delimiters-mode) (scheme-mode . rainbow-delimiters-mode))) @@ -411,7 +450,8 @@ ("C-h x" . 'helpful-command) ("C-h ." . 'helpful-at-point) ("C-h F" . 'helpful-function) - ("C-h C-k" . 'helpful-kill-buffers))) + ("C-h C-k" . 'helpful-kill-buffers) + ("C-h A" . 'apropos))) (use-package password-store :defer t) @@ -532,7 +572,8 @@ :defer t :bind (("C-c v" . vterm) :map vterm-mode-map - ("M-&" . 'async-shell-command)) + ("M-&" . 'async-shell-command) + ("C-c C-y" . 'vterm-copy-mode)) :hook ((vterm-mode . (lambda () (display-line-numbers-mode -1))))) (defvar thanos/aliases @@ -596,17 +637,14 @@ :password (password-store-get "liberachat/thanos_apollo"))) (use-package transmission - :defer t - :straight (transmission :type git :host nil :repo "[email protected]:/var/git/transmission")) + :defer t) (use-package nerd-icons-dired :defer t :hook ((dired-mode . nerd-icons-dired-mode))) (use-package sudo-edit - :defer t - :config - (setf sudo-edit-local-method "doas")) + :defer t) (use-package jinx :defer t @@ -624,48 +662,6 @@ ("M-p" . term-send-up) ("M-n" . term-send-down))) -(use-package emacs - :ensure t - :init - (require 'dired) - :bind (("C-x C-b" . 'ibuffer) - ("M-." . 'xref-find-definitions) - ("C-c L" . 'display-line-numbers-mode) - :map dired-mode-map - (("b" . 'dired-up-directory) - ("v" . 'dired-watch-video) - ("z" . 'wdired-change-to-wdired-mode) - ("C-c w" . 'dired-set-wallpaper) - ("C-c d" . 'dired-delete-files-except))) - :config - (custom-set-faces - (if is-hermes '(default ((t (:inherit nil :height 120 :family "Jetbrains Mono")))) - '(default ((t (:inherit nil :height 130 :family "Jetbrains Mono")))))) - ;; Don't display battery-mode on desktop - (if is-zeus - (display-battery-mode 0) - (display-battery-mode 1)) - (savehist-mode) - (save-place-mode 1) - (recentf-mode 1) - (electric-pair-mode 1) - ;; Autoinsert - (auto-insert-mode 1) - (define-auto-insert - '("\\.sh\\'" . "Bash skeleton") - '("Description:" - "#!/bin/bash\n\n")) - (add-to-list 'completion-styles 'initials t) - (setf tab-always-indent 'complete) - ;; tramp - (setf tramp-default-method "ssh") - ;; xref - (setf xref-show-xrefs-function #'consult-xref - xref-show-definitions-function #'consult-xref) - ;; dabbrev - :hook ((ibuffer-mode . 'nerd-icons-ibuffer-mode) - (shell-script-mode . 'auto-insert))) - (use-package dabbrev :defer t :config @@ -677,10 +673,6 @@ (setf xref-show-xrefs-function #'consult-xref xref-show-definitions-function #'consult-xref)) -;; (use-package tramp -;; :ensure t -;; :init (setf tramp-default-method "ssh")) - ;; My packages (use-package yeetube :init (define-prefix-command 'thanos/yeetube-map) @@ -704,20 +696,22 @@ :straight (gnosis :local-repo "~/Dev/emacs-lisp/gnosis") :init (define-prefix-command 'thanos/gnosis-map) :config - (require 'gnosis-dev) + ;; (require 'gnosis-test) :bind (("C-r" . thanos/gnosis-map) :map thanos/gnosis-map ("r" . 'gnosis-review) ("a" . 'gnosis-add-note) - ("t" . 'gnosis-dev-test))) + ("t" . 'gnosis-test-start))) + +(use-package pcomplete-yay + :straight (pcomplete-yay :local-repo "~/Dev/emacs-lisp/pcomplete-yay")) -;; (require 'gnosis-dev) ;; AI tools (use-package gptel :defer t :config - (setf gptel-api-key (password-store-get "chatgpt/api")) + (setf gptel-api-key (password-store-get-field "openai/[email protected]" "api")) :bind (:map gptel-mode-map ("C-c h" . 'gptel-menu))) |