From 71584a7b387eeccc2cc86605e5a868ba982c5d41 Mon Sep 17 00:00:00 2001 From: paul-loedige Date: Sun, 11 Feb 2024 20:49:09 +0100 Subject: [PATCH] added text editors and shells --- config.org | 315 ++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 249 insertions(+), 66 deletions(-) diff --git a/config.org b/config.org index 63fd32c..4fd82c4 100644 --- a/config.org +++ b/config.org @@ -6,9 +6,11 @@ - [[#literate-file-headers][Literate File Headers]] - [[#updatesh][update.sh]] - [[#packagestxt][packages.txt]] - - [[#pathsh][path.sh]] - [[#aliassh][alias.sh]] + - [[#pathsh][path.sh]] - [[#doom-emacs][Doom Emacs]] + - [[#zshrc][.zshrc]] + - [[#bashrc][.bashrc]] - [[#package-management][Package Management]] - [[#arch-and-aur-packages][Arch and AUR Packages]] - [[#base-system][Base System]] @@ -18,25 +20,24 @@ - [[#desktop-environments-and-window-manager][Desktop Environments and Window Manager]] - [[#lightdm][LightDM]] - [[#gnome][GNOME]] -- [[#doom-emacs-1][Doom Emacs]] - - [[#installation][Installation]] - - [[#doom-modules][Doom Modules]] - - [[#general-configuration][General Configuration]] - - [[#multilanguage-spellcheck][Multilanguage Spellcheck]] - - [[#latex][LaTeX]] - - [[#org-mode][Org Mode]] - - [[#python][Python]] +- [[#text-editors][Text Editors]] + - [[#doom-emacs-1][Doom Emacs]] + - [[#vscode][VSCode]] + - [[#neovim][Neovim]] - [[#shells][Shells]] - [[#aliases][Aliases]] + - [[#zsh][ZSH]] + - [[#bash][Bash]] - [[#themeing][Themeing]] - [[#doom-emacs-2][Doom Emacs]] +- [[#misc-programs][Misc Programs]] + - [[#zathura][Zathura]] * Prerequisites - Completed Arch Linux Installation - partitioning - encryption - main user - * Literate File Headers ** update.sh #+begin_src shell :tangle update.sh @@ -58,9 +59,8 @@ contains all Arch and AUR packages #+end_src -** path.sh -contains all modifications to the path variables -#+begin_src shell :tangle path.sh +** alias.sh +#+begin_src shell :tangle alias.sh #!/bin/sh # DO NOT EDIT THIS FILE DIRECTLY # This is a file generated from a literate programing source file @@ -69,8 +69,9 @@ contains all modifications to the path variables #+end_src -** alias.sh -#+begin_src shell :tangle alias.sh +** path.sh +contains all modifications to the path variables +#+begin_src shell :tangle path.sh #!/bin/sh # DO NOT EDIT THIS FILE DIRECTLY # This is a file generated from a literate programing source file @@ -229,6 +230,22 @@ We start by simply defining the standard headers used by the three files. These #+end_src #+html: +** .zshrc +#+begin_src shell :tangle ~/.zshrc +# DO NOT EDIT THIS FILE DIRECTLY +# This is a file generated from a literate programing source file +# You should make any changes there and regenerate it from Emacs org-mode +# using org-babel-tangle (C-c C-v t) + +#+end_src +** .bashrc +#+begin_src shell :tangle ~/.bashrc +# DO NOT EDIT THIS FILE DIRECTLY +# This is a file generated from a literate programing source file +# You should make any changes there and regenerate it from Emacs org-mode +# using org-babel-tangle (C-c C-v t) + +#+end_src * Package Management ** Arch and AUR Packages *** Yay @@ -337,10 +354,10 @@ fi #+begin_src shell :tangle pkg-list.txt gnome #+end_src - -* Doom Emacs -** Installation -*** [[https://github.com/doomemacs/doomemacs#prerequisites][Prerequisites]] +* Text Editors +** Doom Emacs +*** Installation +**** [[https://github.com/doomemacs/doomemacs#prerequisites][Prerequisites]] #+begin_src shell :tangle pkg-list.txt git emacs @@ -348,7 +365,7 @@ ripgrep findutils fd #+end_src -*** Doom Installation +**** Doom Installation ~update.sh~ will install Doom Emacs if needed #+begin_src shell :tangle update.sh command_name="doom" @@ -359,11 +376,11 @@ if ! command -v "$command_name" &> /dev/null; then ~/.config/emacs/bin/doom install-devel fi #+end_src -*** add to PATH +**** add to PATH #+begin_src shell :tangle path.sh export PATH=$PATH:~/.config/emacs/bin #+end_src -** Doom Modules +*** Doom Modules #+begin_src emacs-lisp :tangle ~/.config/doom/init.el (doom! :input ;;bidi ; (tfel ot) thgir etirw uoy gnipleh @@ -546,39 +563,39 @@ export PATH=$PATH:~/.config/emacs/bin (default +bindings +smartparens)) #+end_src -** General Configuration -*** TODO User Information +*** General Configuration +**** TODO User Information #+begin_src emacs-lisp :tangle ~/.config/doom/config.el (setq user-full-name "Paul Lödige" user-mail-address "paul@gve-loedige.de") #+end_src -*** Visual Settings -**** Font +**** Visual Settings +***** Font #+begin_src emacs-lisp :tangle ~/.config/doom/config.el (setq doom-font (font-spec :family "Ubuntu Mono" :size 16) doom-variable-pitch-font (font-spec :family "Ubuntu" :size 14)) #+end_src -**** Line Numbering +***** Line Numbering having used Neovim for quiet some time I got used to relative line numbering for navigation. Until I get used to the [[https://github.com/Greduan/emacs-theme-gruvbox][evil-snipe]] navigation I would like to keep them. #+begin_src emacs-lisp :tangle ~/.config/doom/config.el (setq display-line-numbers-type 'relative) #+end_src -*** TODO Authentication +**** TODO Authentication Authentication information will be stored in a encrypted file that is part of my dotfiles #+begin_src emacs-lisp :tangle ~/.config/doom/config.el (setq auth-sources '((:source "~/.authinfo.gpg"))) #+end_src -*** Misc -**** Set Start of Week to Monday +**** Misc +***** Set Start of Week to Monday #+begin_src emacs-lisp :tangle ~/.config/doom/init.el (setq calendar-week-start-day 1) #+end_src -** Multilanguage Spellcheck +*** Multilanguage Spellcheck Enables use of multiple dictionaries. In my case German and English #+begin_src emacs-lisp :tangle ~/.config/doom/config.el (with-eval-after-load "ispell" @@ -588,16 +605,12 @@ Enables use of multiple dictionaries. In my case German and English (ispell-hunspell-add-multi-dic "en_US,de_DE")) #+end_src -** TODO LaTeX -*** Set PDF Viewer +*** TODO LaTeX +**** Set PDF Viewer #+begin_src emacs-lisp :tangle ~/.config/doom/config.el (setq +latex-viewers '(zathura)) #+end_src -requires zathura to be installed -#+begin_src shell :tangle pkg-list.txt -zathura -#+end_src -*** Add auto-compile hook for TeX mode +**** Add auto-compile hook for TeX mode Because TeX-command-run-all is an interactive command we need a helper function for the hook. This function could also become useful if we ever want to extend the compile command #+begin_src emacs-lisp :tangle ~/.config/doom/config.el @@ -610,43 +623,43 @@ This function could also become useful if we ever want to extend the compile com (add-hook 'after-save-hook #'custom-tex-compile nil t))) #+end_src -** Org Mode -*** Default Location +*** Org Mode +**** Default Location #+begin_src emacs-lisp :tangle ~/.config/doom/config.el (setq org-directory "~/org/") #+end_src -*** Visual -**** Enable Header Numbering +**** Visual +***** Enable Header Numbering #+begin_src emacs-lisp :tangle ~/.config/doom/config.el (after! org (setq org-startup-numerated t)) #+end_src -**** Image Display as Default +***** Image Display as Default [[https://emacs.stackexchange.com/questions/57603/how-to-always-display-inline-images-by-default-existing-solutions-dont-seem-to#comment89772_57607][this stackexchange comment]] states that this has to be done before the [[Add "~/org" to Agenda][adding the ~/org directory to Org Agenda]] #+begin_src emacs-lisp :tangle ~/.config/doom/config.el (after! org (setq org-startup-with-inline-images t)) #+end_src -**** Enable \LaTeX preview on default +***** Enable \LaTeX preview on default #+begin_src emacs-lisp :tangle ~/.config/doom/init.el (after! org (setq org-startup-latex-with-latex-preview t)) #+end_src -*** CalDAV Sync +**** CalDAV Sync [[https://github.com/dengste/org-caldav][org-caldav]] provides a tool for syncing with a CalDAV server (in my case Nextcloud). A lot of the config is also taken from [[https://www.reddit.com/r/orgmode/comments/8rl8ep/comment/e0sb5j0/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button][this]] reddit post. -**** org-caldav installation +***** org-caldav installation #+begin_src emacs-lisp :tangle ~/.config/doom/packages.el (package! org-caldav) #+end_src -**** Enable TODOs +***** Enable TODOs #+begin_src emacs-lisp :tangle ~/.config/doom/config.el (after! org-caldav (setq org-icalendar-include-todo 'all org-caldav-sync-todo t)) #+end_src -**** Configure Sync +***** Configure Sync add the calendars to the org-caldav config #+begin_src emacs-lisp :tangle ~/.config/doom/config.el (after! org-caldav @@ -655,8 +668,8 @@ add the calendars to the org-caldav config (setq org-caldav-calendars '((:calendar-id "todo" :files ("~/org/todo.org"))))) #+end_src -*** Org Agenda Setup -**** Progress States +**** Org Agenda Setup +***** Progress States To get a more nuanced overview of my current TODOs I add more progress states. | | INACTIVE | TODO | BLOCKED | IN_PROGRESS | REVIEW | TESTING | | DONE | DELEGATED | CANCELED | | |------------+----------+------+---------+-------------+--------+---------+---+------+-----------+----------+---| @@ -672,7 +685,7 @@ Also set the percent states for [[*CalDAV Sync][CalDAV Sync]] (after! org-caldav (setq org-caldav-todo-percent-states '((0 "INACTIVE") (1 "TODO") (2 "IN_PROGRESS") (3 "BLOCKED") (90 "REVIEW") (90 "TESTING") (100 "DONE") (100 "DELEGATED") (100 "CANCELED")))) #+end_src -**** Add "~/org" to Agenda +***** Add "~/org" to Agenda #+begin_src emacs-lisp :tangle ~/.config/doom/config.el (after! org (setq org-agenda-files (f-files "~/org" @@ -680,15 +693,15 @@ Also set the percent states for [[*CalDAV Sync][CalDAV Sync]] (string= (f-ext f) "org")) 'recursive))) #+end_src -*** Org Roam -**** set base directory +**** Org Roam +***** set base directory Both the org files themselves and the database should be located in the same directory to enable syncing via Nextcloud #+begin_src emacs-lisp :tangle ~/.config/doom/config.el (after! org (setq org-roam-directory (file-truename "~/org/org-roam")) (org-roam-db-autosync-mode)) #+end_src -**** Note Templates +***** Note Templates This contains all the capture templates I am using. Adding the "#+category: " tag improves the Org Agenda View for tasks captured in Org Roam #+begin_src emacs-lisp :tangle ~/.config/doom/config.el @@ -704,20 +717,20 @@ Adding the "#+category: " tag improves the Org Agenda View for tasks captured in :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: Master Thesis Meeting ${title}\n#+category: Master Thesis\n") :unnarrowed t)))) #+end_src -**** Misc -***** Follow Links on RET +***** Misc +****** Follow Links on RET Because the normal shortcut for `org-open-at-point` is quite cumbersome I want it to just follow links when clicking the RET button #+begin_src emacs-lisp :tangle ~/.config/doom/config.el (after! org (setq return-follows-link t)) #+end_src -*** Org Transclusion -**** Installation +**** Org Transclusion +***** Installation #+begin_src emacs-lisp :tangle ~/.config/doom/packages.el (package! org-transclusion) #+end_src -*** Bibliography -**** TODO Enabling Zotero Links +**** Bibliography +***** TODO Enabling Zotero Links Following [[https://www.riccardopinosio.com/blog/posts/zotero_notes_article.html#opening-zotero-pdf-from-org-roam][this guide]] we enable using zotero links with the following code #+begin_src emacs-lisp :tangle ~/.config/doom/config.el (after! org @@ -727,15 +740,15 @@ Following [[https://www.riccardopinosio.com/blog/posts/zotero_notes_article.html (browse-url (format "zotero:%s" zpath))))) #+end_src -**** Citar Config -***** Setting the Citar Bibliography +***** Citar Config +****** Setting the Citar Bibliography Following the [[https://github.com/doomemacs/doomemacs/tree/master/modules/tools/biblio][Doom Emacs documentation ]]we set the citar bibliography and notes paths #+begin_src emacs-lisp :tangle ~/.config/doom/config.el (after! oc (setq citar-bibliography '("~/org/biblio.bib")) (setq citar-notes-paths '("~/org/org-roam/"))) #+end_src -***** Citar Templates +****** Citar Templates Following the [[https://github.com/emacs-citar/citar#configuration][citar package documentation]] we modify the note template to contain the pdf link to Zotero *NOTE:* This requires the a [[https://www.riccardopinosio.com/blog/posts/zotero_notes_article.html#opening-zotero-pdf-from-org-roam][specific Zotero Export Configuration]] #+begin_src emacs-lisp :tangle ~/.config/doom/config.el @@ -746,7 +759,7 @@ Following the [[https://github.com/emacs-citar/citar#configuration][citar packag (preview . "${author editor:%etal} (${year issued date}) ${title}, ${journal journaltitle publisher container-title collection-title}.\n") (note . "Notes on ${author editor:%etal}, ${title}\npdf: ${file}")))) #+end_src -***** Enable Zotero Link Support +****** Enable Zotero Link Support In [[https://www.riccardopinosio.com/blog/posts/zotero_notes_article.html#citar][this tutorial]] I found the config for enabling Zotero Link Support through Citar #+begin_src emacs-lisp :tangle ~/.config/doom/config.el (after! citar @@ -760,15 +773,28 @@ In [[https://www.riccardopinosio.com/blog/posts/zotero_notes_article.html#citar] (add-to-list 'citar-file-open-functions '("pdf" . citar-file-open-external))) #+end_src -** Python -*** TODO Set Debugger to debugpy +*** Python +**** TODO Set Debugger to debugpy as per the [[https://github.com/doomemacs/doomemacs/tree/master/modules/tools/debugger#dap-python][Doom Emacs Documentation]] it is recommended to set the debugger used for python debugging to debugpy #+begin_src emacs-lisp :tangle ~/.config/doom/config.el (after! dap-mode (setq dap-python-debugger 'debugpy)) #+end_src +** VSCode +*** Installation +#+begin_src shell :tangle pkg-list.txt +visual-studio-code-bin +#+end_src +*** TODO Add-Ons +** [[https://neovim.io/][Neovim]] +*** Installation +#+begin_src shell :tangle pkg-list.txt +neovim +#+end_src +*** TODO Configuration * Shells +ZSH is used as the default shell ** Aliases *** Shutdown and Reboot #+begin_src shell :tangle alias.sh @@ -782,6 +808,152 @@ alias mv='mv -i' alias rm='rm -i' #+end_src +*** Git Aliases +#+begin_src shell :tangle pkg-list.txt +git +#+end_src +#+begin_src shell :tangle alias.sh +alias add='git add' +alias addup='git add -u' +alias addall='git add .' +alias branch='git branch' +alias checkout='git checkout' +alias co='git checkout' +alias clone='git clone' +alias commit='git commit -m' +alias fetch='git fetch' +alias pull='git pull origin' +alias push='git push origin' +alias status='git status' +alias diff='git diff' +alias remote='git remote' +alias ftemplate='git fetch template' +alias mtemplate='git merge template/master --allow-unrelated-histories' +alias log='git log' +#+end_src +** [[https://www.zsh.org/][ZSH]] +*** Installation +#+begin_src shell :tangle pkg-list.txt +zsh +which +#+end_src +*** Set as default shell +#+begin_src shell :tangle update.sh +chsh-s $(which zsh) +#+end_src +*** [[https://ohmyz.sh/][Oh-My-Zsh]] +**** Installation +#+begin_src shell :tangle pkg-list.txt +curl +#+end_src +install if needed +#+begin_src shell :tangle update.sh +if [ ! -d "~/.oh-my-zsh" ]; then + echo "Installing Oh-My-Zsh..." + sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" +fi +#+end_src +**** Basic Configuration +#+begin_src shell ~/.zshrc +export ZSH="~/.oh-my-zsh" + +# Uncomment the following line to use case-sensitive completion. +CASE_SENSITIVE="false" + +# Uncomment the following line to use hyphen-insensitive completion. +# Case-sensitive completion must be off. _ and - will be interchangeable. +HYPHEN_INSENSITIVE="true" + +# Uncomment the following line to change how often to auto-update (in days). +export UPDATE_ZSH_DAYS=3 + +# Uncomment the following line to enable command auto-correction. +ENABLE_CORRECTION="true" + +# Uncomment the following line to display red dots whilst waiting for completion. +# Caution: this setting can cause issues with multiline prompts (zsh 5.7.1 and newer seem to work) +# See https://github.com/ohmyzsh/ohmyzsh/issues/5765 +COMPLETION_WAITING_DOTS="true" +#+end_src +**** TODO [[https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins][Plugins]] +#+begin_src shell ~/.zshrc +# Which plugins would you like to load? +# Standard plugins can be found in $ZSH/plugins/ +# Custom plugins may be added to $ZSH_CUSTOM/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=( + git + svn + themes + command-not-found + vi-mode + extract + # # non oh-my-zsh plugins + # zsh-autosuggestions + # zsh-syntax-highlighting + # conda-zsh-completion +) +#+end_src +*** [[https://github.com/romkatv/powerlevel10k][Powerlevel10k]] +install if needed +#+begin_src shell :tangle pkg-list.txt +git +#+end_src +#+begin_src shell :tangle update.sh +if [ ! -d "~/.oh-my-zsh/custom/themes/powerlevel10k" ]; then + echo "Installing Powerlevel10k..." + git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/.oh-my-zsh/custom/themes/powerlevel10k +fi +#+end_src +set as zsh theme +#+begin_src shell .zshrc +ZSH_THEME="powerlevel10k/powerlevel10k" +#+end_src + +*** Configuration +**** Source Aliases +#+begin_src shell ~/.zshrc +source alias.sh +#+end_src +**** Modify PATH +#+begin_src shell ~/.zshrc +source path.sh +#+end_src +**** [[https://github.com/dylanaraps/neofetch][neofetch]] +install +#+begin_src shell :tangle pkg-list.txt +neofetch +#+end_src +and start +#+begin_src shell ~/.zshrc +neofetch +#+end_src +** [[https://www.gnu.org/software/bash/][Bash]] +*** Installation +#+begin_src shell :tangle pkg-list.txt +bash +#+end_src +*** Configuration +**** Source Aliases +#+begin_src shell ~/.bashrc +source alias.sh +#+end_src +**** Modify PATH +#+begin_src shell ~/.bashrc +source path.sh +#+end_src +**** [[https://github.com/dylanaraps/neofetch][neofetch]] +install +#+begin_src shell :tangle pkg-list.txt +neofetch +#+end_src +and start +#+begin_src shell ~/.bashrc +neofetch +#+end_src + + * Themeing ** Doom Emacs I like the [[https://github.com/Greduan/emacs-theme-gruvbox][Gruvbox Theme by Eduardo Lavaque]]. @@ -793,3 +965,14 @@ and then set it #+begin_src emacs-lisp :tangle ~/.config/doom/config.el (setq doom-theme 'gruvbox-dark-hard) #+end_src + +* Misc Programs +** Zathura +*** Installation +#+begin_src shell :tangle pkg-list.txt +zathura +#+end_src +*** enable synctex +#+begin_src shell :tangle ~/.config/zathura/zathurarc +set synctex true +#+end_src