diff options
Diffstat (limited to 'emacs.org')
-rwxr-xr-x | emacs.org | 145 |
1 files changed, 85 insertions, 60 deletions
@@ -118,7 +118,7 @@ Set ~package-archives~, and install packages * UI Settings ** Basic UI -Fonts and basic appearance settings +Fonts and basic appearance settings for each device #+begin_src emacs-lisp (setq inhibit-startup-message t) (setq initial-scratch-message nil) @@ -166,21 +166,21 @@ Fonts and basic appearance settings elfeed)) (add-hook mode (lambda () (display-line-numbers-mode 0)))) - (defvar apollo/default-font-size 140) + (defvar thanos/default-font-size 140) (when is-hermes - (setq apollo/default-font-size 120)) + (setq thanos/default-font-size 120)) (set-face-attribute 'default nil :font "JetBrains Mono" - :height apollo/default-font-size) + :height thanos/default-font-size) (set-face-attribute 'fixed-pitch nil :font "JetBrains Mono" - :height apollo/default-font-size) + :height thanos/default-font-size) (set-face-attribute 'variable-pitch nil :font "JetBrains Mono" - :height apollo/default-font-size + :height thanos/default-font-size :weight 'regular) #+end_src @@ -372,7 +372,7 @@ Hook with ~dired-mode~ ** Themes *** Dracula #+begin_src emacs-lisp -(defun apollo/org-theme-dracula () +(defun thanos/org-theme-dracula () "Enable Dracula theme for Org headers." (interactive) (dolist @@ -398,7 +398,7 @@ Hook with ~dired-mode~ #+end_src *** Darkone #+begin_src emacs-lisp -(defun apollo/org-theme-darkone () +(defun thanos/org-theme-darkone () "Enable Darkone theme for Org headers." (interactive) (dolist @@ -424,7 +424,7 @@ Hook with ~dired-mode~ #+end_src *** Gruvbox #+begin_src emacs-lisp - (defun apollo/org-theme-gruvbox () + (defun thanos/org-theme-gruvbox () "Enable Darkone theme for Org headers." (interactive) (dolist @@ -500,7 +500,6 @@ Hook with ~dired-mode~ org-agenda-start-log-mode t org-log-done 'time org-log-into-drawer t - org-indent-mode t org-todo-keywords ;; This overwrites the default Doom org-todo-keywords '((sequence "TODO(t)" ;; A task that is ready to be tackled @@ -513,13 +512,14 @@ Hook with ~dired-mode~ org-superstar-headline-bullets-list '("◉" "●" "○" "●" "○" "●" "◆") org-superstar-itembullet-alist '((?+ . ?➤) (?- . ?✦))) ;; changes +/- symbols in item lists) #+end_src -Keybindings: +~Keybindings:~ #+begin_src emacs-lisp - (define-key org-mode-map (kbd "C-c t") 'org-time-stamp-inactive) + (define-key org-mode-map (kbd "C-c t") 'org-time-stamp-inactive) + (define-key org-mode-map (kbd "C-c s") 'org-download-screenshot) #+end_src -Hooks: +~Hooks~ #+begin_src emacs-lisp - (add-hook 'org-mode-hook 'apollo/org-theme-gruvbox) + (add-hook 'org-mode-hook 'thanos/org-theme-gruvbox) (add-hook 'org-mode-hook 'flyspell-mode) (add-hook 'org-mode-hook 'toc-org-mode) #+end_src @@ -546,10 +546,22 @@ Hooks: ;;Auto tangle (add-hook 'org-mode-hook 'org-auto-tangle-mode) #+end_src +** Org-download +#+begin_src emacs-lisp + (when (or (eq is-zeus t) + (eq is-hermes)) + (setq org-download-screenshot-method "grim -g \"$(slurp)\" %s")) +#+end_src +** Org-drill +#+begin_src emacs-lisp + (when is-zeus + (load-file "~/Developer/org-drill/org-drill.el")) + (setq org-drill-spaced-repetition-algorithm 'sm2) +#+end_src * Markdown ** Theme #+begin_src emacs-lisp -(defun apollo/markdown-theme () +(defun thanos/markdown-theme () (interactive) (dolist (face @@ -615,13 +627,13 @@ Hooks: #+end_src ** LSP #+begin_src emacs-lisp -(defun apollo/lsp-mode-setup () +(defun thanos/lsp-mode-setup () (setq lsp-headerline-breadcrumb-segments '(path-up-to-project file symbols)) (lsp-headerline-breadcrumb-mode)) (use-package lsp-mode :commands (lsp lsp-deferred) - :hook (lsp-mode . apollo/lsp-mode-setup) + :hook (lsp-mode . thanos/lsp-mode-setup) :init (setq lsp-keymap-prefix "C-c l") ;; Or 'C-l', 's-l' :config @@ -676,7 +688,7 @@ Hooks: ( ("https://hackaday.com/blog/feed/" hackaday linux) - ("https://thanosapollo.com/public/feed.xml" + ("https://thanosthanos.com/public/feed.xml" me) ("https://protesilaos.com/news.xml" protesilaos) @@ -684,7 +696,7 @@ Hooks: proetesilaos) ("https://guix.gnu.org/feeds/blog.atom" gnu guix) - ("https://thanosapollo.com/posts/index.xml" + ("https://thanosthanos.com/posts/index.xml" thanos me) ("https://rss.nytimes.com/services/xml/rss/nyt/Science.xml" NYT science news) @@ -692,7 +704,7 @@ Hooks: NYT med news) ("https://rss.nytimes.com/services/xml/rss/nyt/World.xml" NYT world news) - ("https://thanosapollo.com/posts/index.xml" + ("https://thanosthanos.com/posts/index.xml" thanos) ("http://nullprogram.com/feed/" emacs linux) @@ -809,8 +821,8 @@ Create function to watch videos using ~mpv~ (setq mu4e-contexts `(, (set-mu4e-context - "Fastmail" "Thanos Apollo" - "[email protected]" "Thanos\nhttps://thanosapollo.com" + "Fastmail" "Thanos Thanos" + "[email protected]" "Thanos\nhttps://thanosthanos.com" "smtp.fastmail.com"))) ;; (setq smtpmail-smtp-service 465 @@ -836,6 +848,11 @@ Create function to watch videos using ~mpv~ ("MCheck if merged" . my-mu4e-action-check-if-merged))))) #+end_src * Eshell +First let's set ~eshell-visual-commands~ ++ This are commands cannot be displayed properly with ~eshell~ +#+begin_src emacs-lisp + (setq eshell-visual-commands '("mocp" "htop" "nvim")) +#+end_src ** Completions #+begin_src emacs-lisp ;;;; sudo completion @@ -897,23 +914,43 @@ Create function to watch videos using ~mpv~ (pcomplete-here (append pcomplete-hut-commands))) #+end_src ** Aliases & Paths +Set aliases for ~~/.emacs.d/eshell/alias~ similarly that I would for a ~~/.bashrc~ file +#+begin_src fundamental :tangle ~/.emacs.d/eshell/alias + alias ls ls -la + alias anki QTWEBENGINE_CHROMIUM_FLAGS="--disable-seccomp-filter-sandbox" anki + alias b bluetoothctl + alias ba bluetooth-autoconnect + alias c pavucontrol + alias ca config add + alias cc config commit -m + alias cpm config push -u origin master + alias cs config status + alias fanki flatpak run net.ankiweb.Anki + alias ga git add + alias gaa git add . + alias gc git commit -m + alias gp git push -u origin + alias gpd git push -u origin developer + alias gpm git push -u origin master + alias grep grep --color=auto + alias gs git status + alias klight='brightnessctl --device \''tpacpi::kbd_backlight'\'' set 1 + alias logout pkill -U $USER + alias music mocp + alias mykeys setxkbmap -option caps:escape + alias r ranger + alias sb sudo systemctl start bluetooth + alias sweb BROWSER="firefox" yarn start + alias vi nvim + alias vim nvim + alias weather curl wttr.in + alias yeet paru -Rsc + alias ytd yt-dlp +#+end_src +Set aliases for emacs functions and ~PATH~ #+begin_src emacs-lisp (defvar eshell-path-env (getenv "~/.local/bin")) - - (defun eshell-load-bash-aliases () - "Read Bash aliases and add them to the list of eshell aliases." - ;; Bash needs to be run - temporarily - interactively - ;; in order to get the list of aliases. - (with-temp-buffer - (call-process "bash" nil '(t nil) nil "-ci" "alias") - (goto-char (point-min)) - (while (re-search-forward "alias \\(.+\\)='\\(.+\\)'$" nil t) - (eshell/alias (match-string 1) (match-string 2))))) - (defalias 'o 'find-file) - - - (add-hook 'eshell-alias-load-hook 'eshell-load-bash-aliases) #+end_src ** Prompt #+begin_src emacs-lisp @@ -1100,7 +1137,7 @@ Create function to watch videos using ~mpv~ * Misc ** Random functions #+begin_src emacs-lisp - (defun apollo/html-boostrap-boilerplate () + (defun thanos/html-boostrap-boilerplate () "Insert html boilerplate with boostrap link." (interactive) (insert @@ -1123,7 +1160,7 @@ Create function to watch videos using ~mpv~ </html>" )) - (defun apollo/center-buffer () + (defun thanos/center-buffer () "Centers/Uncenters selected buffer" (interactive) (if visual-fill-column-center-text @@ -1132,13 +1169,13 @@ Create function to watch videos using ~mpv~ (visual-fill-column-mode 1)) - (defun apollo/rofi-switch-window () + (defun thanos/rofi-switch-window () "Navigate X11 buffers using rofi." (interactive) (start-process-shell-command "rofi" nil "rofi -show window")) - (defun apollo/run-in-background (command) + (defun thanos/run-in-background (command) "Run COMMAND in the background." (let ((command-parts (split-string command "[ ]+"))) (apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts))))) @@ -1146,39 +1183,39 @@ Create function to watch videos using ~mpv~ (defun rofi () "Run Rofi." (interactive) - (apollo/run-in-background "rofi -show drun")) + (thanos/run-in-background "rofi -show drun")) - (defun apollo/volume-increase () + (defun thanos/volume-increase () "Increase Volume." (interactive) (start-process-shell-command "amixer" nil "amixer sset Master 5%+")) - (defun apollo/volume-decrease () + (defun thanos/volume-decrease () "Decrease Volume." (interactive) (start-process-shell-command "amixer" nil "amixer sset Master 5%-")) - (defun apollo/restore-wallpaper () + (defun thanos/restore-wallpaper () "Set NAME as wallpaper." (interactive) (start-process-shell-command "feh" nil "feh --bg-scale ~/dotfiles/wallpaper.png")) - (defun apollo/emacs-keys () + (defun thanos/emacs-keys () "Swap caps with ctrl." (interactive) (start-process-shell-command "setxkbmap" nil "setxkbmap us -option ctrl:swapcaps")) - (defun apollo/greek-keyboard () + (defun thanos/greek-keyboard () "Swap caps with ctrl." (interactive) (start-process-shell-command "setxkbmap" nil "setxkbmap gr")) - (defun apollo/exwm-update-class () + (defun thanos/exwm-update-class () (exwm-workspace-rename-buffer exwm-class-name)) (defun eshell-new() @@ -1215,7 +1252,7 @@ Create function to watch videos using ~mpv~ (interactive) ;; Get fastmail API Key (insert - (password-store-get-field "fastmail.com/thanosapollo.com" "API"))) + (password-store-get-field "fastmail.com/thanosthanos.com" "API"))) (global-set-key (kbd "C-c p m") 'get-mail-pass) @@ -1259,15 +1296,3 @@ Create function to watch videos using ~mpv~ (define-key thanos/vterm-map (kbd "o") 'multi-vterm) #+end_src - - - -* Org-fc -#+begin_src emacs-lisp - (add-to-list 'load-path "~/Developer/org-fc/") - - (require 'org-fc) - (require 'org-fc-hydra) - - (setq org-fc-directories '("~/org")) -#+end_src |