summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop.org361
-rwxr-xr-xemacs.org1554
-rw-r--r--hyprland.org462
-rwxr-xr-xshells.org260
4 files changed, 0 insertions, 2637 deletions
diff --git a/desktop.org b/desktop.org
deleted file mode 100644
index d1fb5ce..0000000
--- a/desktop.org
+++ /dev/null
@@ -1,361 +0,0 @@
-#+TITLE: General System Configurations
-#+PROPERTY: header-args :mkdirp yes
-#+STARTUP: overview
-
-* Git
-#+begin_src conf :tangle ~/.gitconfig
- [user]
- name = Thanos Apollo
- signingkey = 5F6B32E27F433AA9E42A530A0A50703D1CE7AE29
- [commit]
- gpgsign = true
- [format]
- subjectPrefix = PATCH
- [sendemail]
- from = Thanos Apollo <[email protected]>
- smtpserver = smtp.fastmail.com
- smtpuser = [email protected]
- smtpencryption = ssl
- smtpserverport = 465
- annotate = yes
-
- [credential "smtp://smtp.fastmail.com"]
- helper = "!f() { echo [email protected]; echo \"password=$(pass show fastmail.com/[email protected] | sed -n '/smtp:/,+3p')\"; }; f"
-
-#+end_src
-* gnupgp
-#+begin_src conf :tangle ~/.gnupg/gpg-agent.conf
- default-cache-ttl 172800
- max-cache-ttl 282800
- pinentry-program /home/thanos/.stumpwm.d/modules/util/pinentry/stumpwm-pinentry
-#+end_src
-* iSync
-#+begin_src conf :tangle ~/.mbsyncrc
- IMAPAccount fastmail
- Host imap.fastmail.com
- Port 993
- PassCmd "emacsclient -e '(password-store-get-field \"fastmail.com/[email protected]\" \"smtp\")'"
- SSLType IMAPS
- SSLVersions TLSv1.2
- CertificateFile /etc/ssl/certs/ca-certificates.crt
-
- IMAPStore fastmail-remote
- Account fastmail
-
- MaildirStore fastmail-local
- Path ~/Mail/
- Inbox ~/Mail/Inbox
- Trash ~/Mail/Trash/
- SubFolders Verbatim
-
- Channel fastmail
- Far :fastmail-remote:
- Near :fastmail-local:
- Patterns *
- Expunge None
- CopyArrivalDate yes
- Sync All
- Create Both
- SyncState *
-#+end_src
-
-* Starship
-#+begin_src conf :tangle ~/.config/starship.toml
- # Get editor completions based on the config schema
- "$schema" = 'https://starship.rs/config-schema.json'
- # Inserts a blank line between shell prompts
- add_newline = true
-
- # Replace the '❯' symbol in the prompt with '➜'
- [character] # The name of the module we are configuring is 'character'
- success_symbol = '[λ](red)' # The 'success_symbol' segment is being set to '➜' with the color 'bold green'
- error_symbol = "[✖](bold red) "
-
- [battery]
- full_symbol = "🔋"
- charging_symbol = "🔌"
- discharging_symbol = "⚡"
-
- [[battery.display]]
- threshold = 30
- style = "bold red"
-
- [cmd_duration]
- min_time = 10_000 # Show command duration over 10,000 milliseconds (=10 sec)
- format = " took [$duration]($style)"
-
- [directory]
- truncation_length = 5
- format = "[$path](yellow)[$lock_symbol]($lock_style) "
-
- [git_branch]
- format = " [$symbol$branch]($style) "
- symbol = "[](bold green) "
- style = "blue bold"
-
- [git_commit]
- commit_hash_length = 8
- style = "bold white"
-
- [git_state]
- format = '[\($state( $progress_current of $progress_total)\)]($style) '
-
- [git_status]
- conflicted = "⚔️ "
- ahead = "🏎️ 💨 ×${count}"
- behind = "🐢 ×${count}"
- diverged = "🔱 🏎️ 💨 ×${ahead_count} 🐢 ×${behind_count}"
- untracked = "  ×${count}"
- stashed = "📦 "
- modified = " ×${count}"
- staged = "🗃️ ×${count}"
- renamed = "📛 ×${count}"
- deleted = "🗑️ ×${count}"
- style = "bright-white"
- format = "$all_status$ahead_behind"
-
- [hostname]
- ssh_only = false
- format = "<[$hostname]($style)>"
- trim_at = "-"
- style = "bold dimmed white"
- disabled = true
-
- [julia]
- format = "[$symbol$version]($style) "
- symbol = "ஃ "
- style = "bold green"
-
- [memory_usage]
- format = "$symbol[${ram}( | ${swap})]($style) "
- threshold = 70
- style = "bold dimmed white"
- disabled = false
-
- [package]
- disabled = true
-
- [python]
- format = "[$symbol$version]($style) "
- style = "bold green"
-
- [rust]
- format = "[$symbol$version]($style) "
- style = "bold green"
-
- [time]
- time_format = "%T"
- format = "🕙 $time($style) "
- style = "bright-white"
- disabled = true
-
- [username]
- style_user = "bold dimmed blue"
- show_always = false
-
- [nodejs]
- format = "via [🤖 $version](bold green) "
-#+end_src
-
-* slock
-#+begin_src conf :tangle "/sudo::/etc/systemd/system/[email protected]"
- [Unit]
- Description=Lock X session using slock for user %i
- Before=sleep.target
-
- [Service]
- User=%i
- Environment=DISPLAY=:0
- ExecStartPre=/usr/bin/xset dpms force suspend
- ExecStart=/usr/bin/slock
-
- [Install]
- WantedBy=sleep.target
-#+end_src
-* Keyboards
-** Cyrillic
-#+begin_src fundamental :tangle "/sudo::/usr/share/X11/xkb/symbols/my-cyr"
-partial alphanumeric_keys
-xkb_symbols "phonetic" {
-
- name[Group1]= "Russian (phonetic)";
-
- key <AE01> { [ 1, exclam ] };
- key <AE02> { [ 2, at ] };
- key <AE03> { [ 3, Cyrillic_io ] };
- key <AE04> { [ 4, Cyrillic_IO ] };
- key <AE05> { [ 5, Cyrillic_hardsign ] };
- key <AE06> { [ 6, Cyrillic_HARDSIGN ] };
- key <AE07> { [ 7, ampersand ] };
- key <AE08> { [ 8, asterisk ] };
- key <AE09> { [ 9, parenleft ] };
- key <AE10> { [ 0, parenright ] };
- key <AE11> { [ minus, underscore ] };
-
- key <AB09> { [ period, greater ] };
- key <AB10> { [ slash, question ] };
- key <AB08> { [ comma, less ] };
- key <AC10> { [ semicolon, colon ] };
- key <AC11> { [ apostrophe, quotedbl ] };
- key <LSGT> { [ bar, brokenbar ] };
-
- key <TLDE> { [ Cyrillic_yu, Cyrillic_YU ] };
- key <LatQ> { [ Cyrillic_ya, Cyrillic_YA ] };
- key <LatZ> { [ Cyrillic_ze, Cyrillic_ZE ] };
- key <LatS> { [ Cyrillic_es, Cyrillic_ES ] };
- key <LatA> { [ Cyrillic_a, Cyrillic_A ] };
- key <LatW> { [ Cyrillic_ve, Cyrillic_VE ] };
- key <LatC> { [ Cyrillic_tse, Cyrillic_TSE ] };
- key <LatX> { [ Cyrillic_softsign, Cyrillic_SOFTSIGN ] };
- key <LatD> { [ Cyrillic_de, Cyrillic_DE ] };
- key <LatE> { [ Cyrillic_ie, Cyrillic_IE ] };
- key <LatV> { [ Cyrillic_zhe, Cyrillic_ZHE ] };
- key <LatF> { [ Cyrillic_ef, Cyrillic_EF ] };
- key <LatT> { [ Cyrillic_te, Cyrillic_TE ] };
- key <LatR> { [ Cyrillic_er, Cyrillic_ER ] };
- key <LatN> { [ Cyrillic_en, Cyrillic_EN ] };
- key <LatB> { [ Cyrillic_be, Cyrillic_BE ] };
- key <LatH> { [ Cyrillic_ha, Cyrillic_HA ] };
- key <LatG> { [ Cyrillic_ghe, Cyrillic_GHE ] };
- key <LatY> { [ Cyrillic_yeru, Cyrillic_YERU ] };
- key <LatM> { [ Cyrillic_em, Cyrillic_EM ] };
- key <LatJ> { [ Cyrillic_shorti, Cyrillic_SHORTI ] };
- key <LatU> { [ Cyrillic_u, Cyrillic_U ] };
- key <LatK> { [ Cyrillic_ka, Cyrillic_KA ] };
- key <LatI> { [ Cyrillic_i, Cyrillic_I ] };
- key <LatO> { [ Cyrillic_o, Cyrillic_O ] };
- key <LatL> { [ Cyrillic_el, Cyrillic_EL ] };
- key <LatP> { [ Cyrillic_pe, Cyrillic_PE ] };
-
- key <AD11> { [ Cyrillic_sha, Cyrillic_SHA ] };
- key <AE12> { [ Cyrillic_che, Cyrillic_CHE ] };
- key <AD12> { [ Cyrillic_shcha, Cyrillic_SHCHA ] };
- key <BKSL> { [ Cyrillic_e, Cyrillic_E ] };
-};
-#+end_src
-
-#+begin_src fundamental :tangle "/sudo::/usr/share/X11/xkb/symbols/my-cyr2"
-partial alphanumeric_keys
-xkb_symbols "phonetic" {
-
- name[Group1]= "Russian (phonetic)";
-
- key <AE01> { [ 1, exclam ] };
- key <AE02> { [ 2, at ] };
- key <AE03> { [ 3, Cyrillic_io ] };
- key <AE04> { [ 4, Cyrillic_IO ] };
- key <AE05> { [ 5, Cyrillic_hardsign ] };
- key <AE06> { [ 6, Cyrillic_HARDSIGN ] };
- key <AE07> { [ 7, ampersand ] };
- key <AE08> { [ 8, asterisk ] };
- key <AE09> { [ 9, parenleft ] };
- key <AE10> { [ 0, parenright ] };
- key <AE11> { [ minus, underscore ] };
-
- key <AB09> { [ period, greater ] };
- key <AB10> { [ slash, question ] };
- key <AB08> { [ comma, less ] };
- key <AC10> { [ semicolon, colon ] };
- key <AC11> { [ apostrophe, quotedbl ] };
- key <LSGT> { [ bar, brokenbar ] };
-
- key <TLDE> { [ Cyrillic_yu, Cyrillic_YU ] };
- key <LatQ> { [ Cyrillic_ya, Cyrillic_YA ] };
- key <LatZ> { [ Cyrillic_ze, Cyrillic_ZE ] };
- key <LatS> { [ Cyrillic_es, Cyrillic_ES ] };
- key <LatA> { [ Cyrillic_a, Cyrillic_A ] };
- key <LatW> { [ Cyrillic_ve, Cyrillic_VE ] };
- key <LatC> { [ Cyrillic_tse, Cyrillic_TSE ] };
- key <LatX> { [ Cyrillic_softsign, Cyrillic_SOFTSIGN ] };
- key <LatD> { [ Cyrillic_de, Cyrillic_DE ] };
- key <LatE> { [ Cyrillic_ie, Cyrillic_IE ] };
- key <LatV> { [ Cyrillic_zhe, Cyrillic_ZHE ] };
- key <LatF> { [ Cyrillic_ef, Cyrillic_EF ] };
- key <LatT> { [ Cyrillic_te, Cyrillic_TE ] };
- key <LatR> { [ Cyrillic_er, Cyrillic_ER ] };
- key <LatN> { [ Cyrillic_en, Cyrillic_EN ] };
- key <LatB> { [ Cyrillic_be, Cyrillic_BE ] };
- key <LatH> { [ Cyrillic_ha, Cyrillic_HA ] };
- key <LatG> { [ Cyrillic_ghe, Cyrillic_GHE ] };
- key <LatY> { [ Cyrillic_yeru, Cyrillic_YERU ] };
- key <LatM> { [ Cyrillic_em, Cyrillic_EM ] };
- key <LatJ> { [ Cyrillic_shorti, Cyrillic_SHORTI ] };
- key <LatU> { [ Cyrillic_u, Cyrillic_U ] };
- key <LatK> { [ Cyrillic_ka, Cyrillic_KA ] };
- key <LatI> { [ Cyrillic_i, Cyrillic_I ] };
- key <LatO> { [ Cyrillic_o, Cyrillic_O ] };
- key <LatL> { [ Cyrillic_el, Cyrillic_EL ] };
- key <LatP> { [ Cyrillic_pe, Cyrillic_PE ] };
-
- key <AD11> { [ Cyrillic_sha, Cyrillic_SHA ] };
- key <AE12> { [ Cyrillic_che, Cyrillic_CHE ] };
- key <AD12> { [ Cyrillic_shcha, Cyrillic_SHCHA ] };
- key <BKSL> { [ Cyrillic_e, Cyrillic_E ] };
-};
-#+end_src
-
-#+begin_src fundamental :tangle "/sudo::/usr/share/X11/xkb/symbols/my-bg"
- partial alphanumeric_keys
- xkb_symbols "phonetic" {
- name[Group1]= "Bulgarian (traditional phonetic)";
-
- key <TLDE> {[ Cyrillic_che, Cyrillic_CHE ]};
- key <AE01> {[ 1, exclam ]};
- key <AE02> {[ 2, at ]};
- key <AE03> {[ 3, numerosign ]};
- key <AE04> {[ 4, dollar, EuroSign, EuroSign ]};
- key <AE05> {[ 5, percent ]};
- key <AE06> {[ 6, EuroSign ]};
- key <AE07> {[ 7, section ]};
- key <AE08> {[ 8, asterisk ]};
- key <AE09> {[ 9, parenleft, bracketleft, U2329 ]};
- key <AE10> {[ 0, parenright, bracketright, U232A ]};
- key <AE11> {[ minus, endash, U2011, U2011 ]};
- key <AE12> {[ equal, plus, emdash, dagger ]};
-
- key <AD01> {[ Cyrillic_ya, Cyrillic_YA, U0463, U0462 ]};
- key <AD02> {[ Cyrillic_ve, Cyrillic_VE ]};
- key <AD03> {[ Cyrillic_ie, Cyrillic_IE, Cyrillic_e, Cyrillic_E ]};
- key <AD04> {[ Cyrillic_er, Cyrillic_ER, registered, registered ]};
- key <AD05> {[ Cyrillic_te, Cyrillic_TE, trademark, trademark ]};
- key <AD06> {[ Cyrillic_hardsign, Cyrillic_HARDSIGN, U046B, U046A ]};
- key <AD07> {[ Cyrillic_u, Cyrillic_U ]};
- key <AD08> {[ Cyrillic_i, Cyrillic_I, U045D, U040D ]};
- key <AD09> {[ Cyrillic_o, Cyrillic_O ]};
- key <AD10> {[ Cyrillic_pe, Cyrillic_PE ]};
- key <AD11> {[ Cyrillic_sha, Cyrillic_SHA ]};
- key <AD12> {[ Cyrillic_shcha, Cyrillic_SHCHA ]};
-
- key <AC01> {[ Cyrillic_a, Cyrillic_A ]};
- key <AC02> {[ Cyrillic_es, Cyrillic_ES, copyright, copyright ]};
- key <AC03> {[ Cyrillic_de, Cyrillic_DE ]};
- key <AC04> {[ Cyrillic_ef, Cyrillic_EF ]};
- key <AC05> {[ Cyrillic_ghe, Cyrillic_GHE ]};
- key <AC06> {[ Cyrillic_ha, Cyrillic_HA ]};
- key <AC07> {[ Cyrillic_shorti, Cyrillic_SHORTI, U046D, U046C ]};
- key <AC08> {[ Cyrillic_ka, Cyrillic_KA ]};
- key <AC09> {[ Cyrillic_el, Cyrillic_EL ]};
- key <AC10> {[ semicolon, colon, ellipsis, ellipsis ]};
- key <AC11> {[ apostrophe, quotedbl, rightsinglequotemark, leftsinglequotemark ]};
- key <BKSL> {[ Cyrillic_yu, Cyrillic_YU ]};
-
- key <LSGT> {[ U045D, U040D ]};
- key <AB01> {[ Cyrillic_ze, Cyrillic_ZE ]};
- key <AB02> {[ Cyrillic_softsign, U045D, Cyrillic_yeru, Cyrillic_YERU ]};
- key <AB03> {[ Cyrillic_tse, Cyrillic_TSE, copyright, copyright ]};
- key <AB04> {[ Cyrillic_zhe, Cyrillic_ZHE ]};
- key <AB05> {[ Cyrillic_be, Cyrillic_BE ]};
- key <AB06> {[ Cyrillic_en, Cyrillic_EN ]};
- key <AB07> {[ Cyrillic_em, Cyrillic_EM ]};
- key <AB08> {[ comma, doublelowquotemark, guillemotleft, guillemotleft ]};
- key <AB09> {[ period, leftdoublequotemark, guillemotright, guillemotright ]};
- key <AB10> {[ slash, question, U0300, U0301 ]};
-
- key <SPCE> {[ space, space, nobreakspace, nobreakspace ]};
-
- key <KPDL> { type[Group1] = "KEYPAD", [ KP_Delete, KP_Separator ]};
- };
-#+end_src
-
diff --git a/emacs.org b/emacs.org
deleted file mode 100755
index a316202..0000000
--- a/emacs.org
+++ /dev/null
@@ -1,1554 +0,0 @@
-#+TITLE: Emacs Configuration
-#+AUTHOR: Thanos Apollo
-#+PROPERTY: header-args :tangle ~/.emacs.d/init.el :mkdirp yes
-#+auto_tangle: t
-#+STARTUP: overview
-
-* System Information
-** Essentials
-Set my name and email address
-#+begin_src emacs-lisp
- (setf user-full-name "Thanos Apollo"
- user-mail-address "[email protected]")
-#+end_src
-Check the ~$HOSTNAME~ to set a variable for different devices
-#+begin_src emacs-lisp
- (defvar is-zeus (equal (system-name) "zeus"))
- (defvar is-hermes (equal (system-name) "hermes"))
- (defvar is-phone (equal (system-name) "localhost"))
-#+end_src
-Setup default browser as ~firefox~
-#+begin_src emacs-lisp
- (setf browse-url-browser-function 'browse-url-generic
- browse-url-generic-program "firefox")
-#+end_src
-Set backup fails at ~~/Trash~
-#+begin_src emacs-lisp
- (setf backup-directory-alist '((".*" . "~/.Trash")))
-#+end_src
-Define essential keybindings
-#+begin_src emacs-lisp
- (define-prefix-command 'thanos/applications-map)
- (global-set-key (kbd "C-c a") 'thanos/applications-map)
- (when is-zeus
- (define-key 'thanos/applications-map (kbd "g") 'guix))
-
- (define-prefix-command 'Create)
- (define-key thanos/applications-map (kbd "C-c") 'Create)
-
- (global-set-key (kbd "<escape>") 'keyboard-escape-quit)
-#+end_src
-** Paths
-#+begin_src emacs-lisp
- ;; mu4e
- (add-to-list 'load-path "/usr/share/emacs/site-lisp/elpa/mu4e-1.8.14")
-
- ;; custom themes
- (add-to-list 'custom-theme-load-path (expand-file-name "~/.emacs.d/themes/"))
-#+end_src
-* Setting Up Packages
-** List of required packages
-Request the following packages:
-#+begin_src emacs-lisp
- (defvar thanos/packages
- '(emms tree-sitter org-snooze org-drill
- all-the-icons all-the-icons-dired
- all-the-icons-ivy-rich toc-org emojify
- doom-themes doom-modeline gruvbox-theme counsel
- vterm multi-vterm which-key ivy ivy-rich helpful
- password-store org org-modern org-roam
- visual-fill-column rainbow-delimiters flycheck
- lsp-mode lsp-ui json-mode rjsx-mode
- typescript-mode python-mode pyvenv company
- company-box magit elfeed elfeed-goodies paredit
- corfu monkeytype sudo-edit consult alsamixer
- simple-httpd eshell-syntax-highlighting
- org-superstar pdf-tools org-auto-tangle sly
- org-download eshell-git-prompt eshell-vterm
- hackernews circe gptel beacon ement mu4e-alert
- pass eat nov yeetube stumpwm-mode telega
- transmission))
-#+end_src
-** Installation & activation
-Set ~package-archives~, and install packages
-#+begin_src emacs-lisp
- (setf package-archives '(("melpa" . "https://melpa.org/packages/")
- ("elpa" . "https://elpa.gnu.org/packages/")
- ("nongnu" . "https://elpa.nongnu.org/nongnu/")))
- ;; Activate all the packages
- (package-initialize)
- ;; Install the missing packages
- (dolist (package thanos/packages)
- (unless (package-installed-p package)
- (package-install package)))
-
- ;; Set and load custom.el
- (setf custom-file (concat user-emacs-directory "custom.el"))
- (load custom-file 'noerror)
-#+end_src
-* UI Settings
-** Basic UI
-Fonts and basic appearance settings for each device
-#+begin_src emacs-lisp
- (setf inhibit-startup-message t)
- (setf initial-scratch-message nil)
- (setf company-box-icons-alist 'company-box-icons-images)
- ;; Transparency
- (add-to-list 'default-frame-alist '(alpha-background . 90))
- (add-to-list 'default-frame-alist '(alpha 90 90))
-
-
- (add-hook 'dired-mode-hook 'all-the-icons-dired-mode)
-
- (when (equal is-phone nil)
- (scroll-bar-mode -1)
- (set-fringe-mode 10))
-
- (beacon-mode 1)
- (tool-bar-mode -1)
- (tooltip-mode -1)
- (menu-bar-mode -1)
- (which-key-mode 1)
- (blink-cursor-mode -1)
- (menu-bar--visual-line-mode-enable)
- (global-visual-line-mode 1)
-
- ;; Set emojis for emacs 29
- (require 'emojify)
- (setf global-emojify-mode 1)
-
- (setf visible-bell t)
-
- (column-number-mode)
- (global-display-line-numbers-mode 1)
- (menu-bar--display-line-numbers-mode-relative)
- ;;Disable line numbers for some modes
- (dolist (mode '(pdf-view-mode-hook
- org-mode-hook
- term-mode-hook
- shell-mode-hook
- eshell-mode-hook
- vterm-mode-hook
- elfeed
- vterm-mode
- telega-chat-mode-hook
- telega-root-mode-hook
- nov-mode-hook
- transmission-mode-hook))
- (add-hook mode (lambda ()
- (display-line-numbers-mode 0))))
-
- ;; Set font-size for each device
- (custom-set-faces
- (if is-hermes '(default ((t (:inherit nil :height 120 :family "Jetbrains Mono"))))
- '(default ((t (:inherit nil :height 135 :family "Jetbrains Mono"))))))
-#+end_src
-** Theme
-#+begin_src emacs-lisp
- (load-theme 'doom-monokai-classic)
-
- (doom-modeline-mode 1)
-
- (setf doom-modeline-height 35)
-
- ;; Don't display battery-mode on desktop
- (if is-zeus
- (display-battery-mode 0)
- (display-battery-mode 1))
-#+end_src
-** Ivy
-#+begin_src emacs-lisp
- (require 'ivy)
-
- (ivy-mode 1)
- ;(setf ivy-use-virtual-buffers t)
- ;(setf enable-recursive-minibuffers t)
- (global-set-key (kbd "C-s") 'swiper)
- (define-key ivy-minibuffer-map (kbd "TAB") 'ivy-alt-done)
- (global-set-key "\C-s" 'swiper)
- (global-set-key (kbd "C-c C-r") 'ivy-resume)
- (global-set-key (kbd "<f6>") 'ivy-resume)
- (global-set-key (kbd "M-x") 'counsel-M-x)
- (global-set-key (kbd "C-x C-f") 'counsel-find-file)
- (global-set-key (kbd "<f1> f") 'counsel-describe-function)
- (global-set-key (kbd "<f1> v") 'counsel-describe-variable)
- (global-set-key (kbd "<f1> o") 'counsel-describe-symbol)
- (global-set-key (kbd "<f1> l") 'counsel-find-library)
- (global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol)
- (global-set-key (kbd "<f2> u") 'counsel-unicode-char)
- (global-set-key (kbd "C-c g") 'counsel-git)
- (global-set-key (kbd "C-c j") 'counsel-git-grep)
- (global-set-key (kbd "C-c k") 'counsel-ag)
- (global-set-key (kbd "C-x l") 'counsel-locate)
- (global-set-key (kbd "C-S-o") 'counsel-rhythmbox)
- (define-key minibuffer-local-map (kbd "C-r") 'counsel-minibuffer-history)
-
- (ivy-rich-mode 1)
- (all-the-icons-ivy-rich-mode 1)
-
- (setf ivy-use-selectable-prompt t)
-
- (global-set-key (kbd "C-c m") 'consult-imenu)
- (define-key thanos/applications-map (kbd "t") 'counsel-load-theme)
-#+end_src
-** Helpful
-#+begin_src emacs-lisp
- (require 'helpful)
- (global-set-key (kbd "C-h f") #'helpful-callable)
- (global-set-key (kbd "C-h v") #'helpful-variable)
- (global-set-key (kbd "C-h k") #'helpful-key)
- (global-set-key (kbd "C-h x") #'helpful-command)
-
- (global-set-key (kbd "C-c C-d") #'helpful-at-point)
- (global-set-key (kbd "C-h F") #'helpful-function)
-
- (setf counsel-describe-function-function #'helpful-callable)
- (setf counsel-describe-variable-function #'helpful-variable)
-#+end_src
-** Navigation
-#+begin_src emacs-lisp
- (global-set-key (kbd "C-x r d") 'bookmark-delete)
- (global-set-key (kbd "C-x r C-r") 'bookmark-rename)
-
- ;; ibuffer
- (global-set-key (kbd "C-x C-b") 'ibuffer)
-#+end_src
-* Pass
-** Setup
-Generate a random password between 20 and 40 characters
-#+begin_src emacs-lisp
- (setf password-store-password-length (+ 20 (random 20)))
-#+end_src
-** Pass Launcher
-#+begin_src emacs-lisp
- (require 'password-store)
-
- (defun thanos/pass-launcher ()
- "Launch Emacs as a front-end for pass."
- (interactive)
- (cl-flet ((pass-autotype (entry)
- (let ((user (password-store-get-field entry "user"))
- (pass (password-store-get entry)))
- (start-process-shell-command
- "xdotool" nil
- (if user
- (format "sleep 0.3 && xdotool getactivewindow type '%s' && xdotool getactivewindow key Tab && xdotool getactivewindow type '%s'" user pass)
- (format "sleep 0.3 && xdotool getactivewindow type 'thanosapollo' && xdotool getactivewindow key Tab && xdotool getactivewindow type '%s'" pass))))))
- (let ((ivy-height 100))
- (unwind-protect
- (with-selected-frame
- (make-frame '((name . "thanos/pass-launcher")
- (minibuffer . only)
- (fullscreen . 0)
- (undecorated . t)
- (internal-border-width . 10)
- (width . 80)
- (height . 11)))
- (let* ((choice (completing-read "Choose an action: " '("AUTO" "COPY PASS" "COPY USERNAME" "EDIT" "GENERATE")))
- (action (pcase choice
- ("AUTO" #'pass-autotype)
- ("COPY PASS" #'password-store-copy)
- ("COPY USERNAME" #'(lambda (entry) (password-store-copy-field entry "user")))
- ("EDIT" #'password-store-edit)
- ("GENERATE" #'password-store-generate))))
- (funcall action (completing-read "Search: " (password-store-list)))
- (delete-frame)))))))
-
- (defun smtp-get-pass ()
- "Get password for smtp"
- (interactive)
- (password-store-copy-field "fastmail.com/[email protected]" "smtp"))
-#+end_src
-** Keybindings
-#+begin_src emacs-lisp
- (define-prefix-command 'thanos/pass)
- (global-set-key (kbd "C-c p") 'thanos/pass)
- (define-key thanos/pass (kbd "i") 'password-store-insert)
- (define-key thanos/pass (kbd "e") 'password-store-edit)
- (define-key thanos/pass (kbd "g") 'password-store-generate)
- (define-key thanos/pass (kbd "s") 'smtp-get-pass)
-#+end_src
-
-* App Launcher
-#+begin_src emacs-lisp
- (defun thanos/app-launcher ()
- "Launch Emacs as an Application Launcher."
- (interactive)
- (let ((ivy-height 100))
- (unwind-protect
- (with-selected-frame
- (make-frame '((name . "thanos/emacs-launcher")
- (minibuffer . only)
- (fullscreen . 0)
- (undecorated . t)
- (internal-border-width . 10)
- (width . 80)
- (height . 11)))
- (counsel-linux-app)
- (delete-frame)))))
-#+end_src
-* VM Manager
-#+begin_src emacs-lisp
- (defvar vm-directory "~/virtual-machines/")
-
- (defun vm-create-image ()
- "Create qcow2 image."
- (interactive)
- (let ((name (format "%s%s.qcow2" vm-directory (read-string "Name: ")))
- (size (format "%s" (read-string "Size(G): "))))
- (shell-command
- (format "qemu-img create -f qcow2 %s %sG" name size))))
-
-
- (defun vm-run ()
- "Spawn Virtual Machine."
- (interactive)
- (let ((memory (format "%sG" (read-string "Memory(G): ")))
- (cores (read-string "Cores: "))
- (image (read-file-name "Image: " vm-directory))
- (iso (if (y-or-n-p "Load iso?? ")
- (read-file-name "ISO: ")
- nil)))
- (start-process-shell-command
- "virtual-machine" nil
- (format "qemu-system-x86_64 -enable-kvm -m %s -smp %s -hda %s -vga qxl -device virtio-serial-pci -spice port=5784,disable-ticketing -display spice-app %s "
- memory cores image (when iso (concat "-cdrom " iso))))))
-#+end_src
-* Dired
-** Functions
-#+begin_src emacs-lisp
- (require 'dired)
-
- (defun dired-watch-video ()
- "Watch play file with mpv."
- (interactive)
- (call-process-shell-command
- (format "mpv \"%s\"" (dired-get-filename)) nil 0))
-
- (defun dired-set-wallpaper ()
- "Set NAME as wallpaper using feh."
- (interactive)
- (call-process-shell-command
- (format "feh --bg-scale %s" (dired-get-filename)) nil 0))
-
- (defun dired-delete-files-except ()
- "Delete all files inside directory except match."
- (interactive)
- (let* ((directory (read-directory-name "Select directory: "))
- (files (directory-files directory t))
- (except-match (read-string "Except the ones that have: ")))
- (dolist (file files)
- (unless (or (string= "." (substring file -1))
- (string= ".." (substring file -2))
- (string-match except-match file))
- (dired-delete-file file t)))))
-
- (defun dired-delete-file-match ()
- "Delete all files inside directory except match."
- (interactive)
- (let* ((directory (read-directory-name "Select directory: "))
- (files (directory-files directory t))
- (match (read-string "Delete files that match: ")))
- (dolist (file files)
- (when (string-match-p match file)
- (dired-delete-file file t)))))
-
- (defun dired-rename-capitalize-file ()
- "Capitalize the base name of the file at point in a dired buffer."
- (interactive)
- (let* ((file (dired-get-file-for-visit))
- (new-file (capitalize (file-name-nondirectory file))))
- (if (string-prefix-p "." file)
- (message "Skipping file starting with '.'")
- (progn
- (rename-file file (concat (file-name-directory file) new-file))
- (revert-buffer)
- (message "Renamed %s to %s" file new-file)))))
-#+end_src
-** Keybindings
-#+begin_src emacs-lisp
- (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 global-map (kbd "C-c d") 'dired-delete-files-except)
-#+end_src
-** All-the-icons
-#+begin_src emacs-lisp
- (add-hook 'dired-mode-hook 'all-the-icons-dired-mode)
- (setf all-the-icons-dired-monochrome 'nil
- all-the-icons-dired-v-adjust 0.10)
-#+end_src
-* Org
-** Org-Roam
-#+begin_src emacs-lisp
- ;; Create ~/Notes, ignore errors if it's already made
- (ignore-errors
- (make-directory "~/Notes"))
-
- (setf org-roam-directory "~/Notes"
- org-roam-dailies-directory "journal/")
-
- (org-roam-db-autosync-enable)
-
- (setf org-roam-node-display-template (concat "${title:50} "(propertize "${tags:30}" 'face 'org-tag)))
-
- (setf org-roam-db-node-include-function
- (lambda ()
- (not (or (member "journal" (org-get-tags))
- (member "memorize" (org-get-tags))))))
-
- ;; Functions
- (defun org-insert-book ()
- "Insert org-link from ~/Library for book"
- (interactive)
- (let* ((book-path (read-file-name "Book: " "~/Library/")))
- (org-insert-link nil book-path (file-name-base book-path))))
-
- ;;; Keybindings
- (define-key org-mode-map (kbd "C-c b") 'org-insert-book)
-
- ;; Set maps
- (define-prefix-command 'thanos/notes)
- (global-set-key (kbd "C-c n") 'thanos/notes)
- ;; org-roam keys
- (define-key thanos/notes (kbd "t") 'org-roam-buffer-toggle)
- (define-key thanos/notes (kbd "f") 'org-roam-node-find)
- (define-key thanos/notes (kbd "i") 'org-roam-node-insert)
- ;; Journaling
- (define-prefix-command 'Journal)
- (define-key thanos/notes (kbd "C-j") 'Journal)
- (define-key Journal (kbd "d") 'Journaling/dailies)
- (define-key Journal (kbd "C-c") 'org-roam-dailies-capture-today)
- (define-key Journal (kbd "C-t") 'org-roam-dailies-capture-tomorrow)
- (define-key Journal (kbd "C-y") 'org-roam-dailies-capture-yesterday)
- (define-key Journal (kbd "c") 'org-roam-dailies-goto-today)
- (define-key Journal (kbd "t") 'org-roam-dailies-goto-tomorrow)
- (define-key Journal (kbd "y") 'org-roam-dailies-goto-yesterday)
-
- (define-key org-mode-map (kbd "C-c C-.") 'org-roam-tag-add)
- (define-key org-mode-map (kbd "C-c i") 'org-id-get-create)
-
- ;; Templates
- (setf org-roam-capture-templates
- '(("d" "default" plain
- "%?"
- :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n")
- :unnarrowed t)
- ("l" "programming language" plain
- "* Characteristics\n\n- Family: %?\n- Inspired by: \n\n* Reference:\n\n"
- :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n")
- :unnarrowed t)
- ("p" "MUS" plain "* Goals\n\n%?\n\n* Tasks\n\n** TODO Add initial tasks\n\n* Dates\n\n"
- :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+filetags: MUS")
- :unnarrowed t)))
- ;; Dailies
- (setf org-roam-dailies-capture-templates
- '(("d" "default" entry
- "* %?"
- :target (file+head "%<%Y-%m-%d>.org"
- "#+title: %<%Y-%m-%d>\n"))
- ("j" "Daily Journaling" entry
- (file "~/org/Templates/journaling.org")
- :target (file+head "%<%Y-%m-%d>.org"
- "#+title: %<%Y-%m-%d>\n"))
- ("i" "Improve" entry
- (file "~/org/Templates/improve.org")
- :target (file+head "%<%Y-%m-%d>.org"
- "#+title: %<%Y-%m-%d>\n"))))
-#+end_src
-** Themes
-*** Dracula
-#+begin_src emacs-lisp
- (defun thanos/org-theme-dracula ()
- "Enable Dracula theme for Org headers."
- (interactive)
- (dolist
- (face
- '((org-level-1 1.7 "#8be9fd" extra-bold)
- (org-level-2 1.6 "#bd93f9" extra-bold)
- (org-level-3 1.5 "#50fa7b" bold)
- (org-level-4 1.4 "#ff79c6" semi-bold)
- (org-level-5 1.3 "#9aedfe" normal)
- (org-level-6 1.2 "#caa9fa" normal)
- (org-level-7 1.1 "#5af78e" normal)
- (org-level-8 1.0 "#ff92d0" normal)))
- (set-face-attribute (nth 0 face) nil
- :font "JetBrains Mono"
- :weight (nth 3 face)
- :height (nth 1 face)
- :foreground (nth 2 face)))
- (set-face-attribute 'org-table nil
- :font "JetBrains Mono"
- :weight 'normal
- :height 1.0
- :foreground "#bfafdf"))
-#+end_src
-*** Darkone
-#+begin_src emacs-lisp
- (defun thanos/org-theme-darkone ()
- "Enable Darkone theme for Org headers."
- (interactive)
- (dolist
- (face
- '((org-level-1 1.70 "#51afef" bold)
- (org-level-2 1.55 "#7FBCD2" bold)
- (org-level-3 1.40 "#da8548" bold)
- (org-level-4 1.20 "#da8548" semi-bold)
- (org-level-5 1.20 "#5699af" normal)
- (org-level-6 1.20 "#a9a1e1" normal)
- (org-level-7 1.10 "#46d9ff" normal)
- (org-level-8 1.00 "#ff6c6b" normal)))
- (set-face-attribute (nth 0 face) nil
- :font "Jetbrains Mono"
- :weight (nth 3 face)
- :height (nth 1 face)
- :foreground (nth 2 face)))
- (set-face-attribute 'org-table nil
- :font "Jetbrains Mono"
- :weight 'normal
- :height 1.0
- :foreground "#A66CFF"))
-#+end_src
-*** Gruvbox
-#+begin_src emacs-lisp
- (defun thanos/org-theme-gruvbox ()
- "Enable Darkone theme for Org headers."
- (interactive)
- (dolist
- (face
- '((org-level-1 1.70 "#fb4934" bold)
- (org-level-2 1.55 "#98971a" bold)
- (org-level-3 1.40 "#458588" bold)
- (org-level-4 1.20 "#b16286" semi-bold)
- (org-level-5 1.20 "#689d6a" normal)
- (org-level-6 1.20 "#d3869b" normal)
- (org-level-7 1.10 "#8ec07c" normal)
- (org-level-8 1.00 "#ebdbb2" normal)))
- (set-face-attribute (nth 0 face) nil
- :font "Jetbrains Mono"
- :weight (nth 3 face)
- :height (nth 1 face)
- :foreground (nth 2 face)))
- (set-face-attribute 'org-table nil
- :font "Jetbrains Mono"
- :weight 'normal
- :height 1.0
- :foreground "#A66CFF"))
-#+end_src
-*** Org Modern
-#+begin_src emacs-lisp
- (modify-all-frames-parameters
- '((right-divider-width . 5)
- (internal-border-width . 5)))
- (dolist (face '(window-divider
- window-divider-first-pixel
- window-divider-last-pixel))
- (face-spec-reset-face face)
- (set-face-foreground face (face-attribute 'default :background)))
- (set-face-background 'fringe (face-attribute 'default :background))
-
- (setf
- ;; Edit settings
- org-auto-align-tags nil
- org-tags-column 0
- org-catch-invisible-edits 'show-and-error
- org-special-ctrl-a/e t
- org-insert-heading-respect-content t
-
- ;; Org styling, hide markup etc.
- org-hide-emphasis-markers t
- org-pretty-entities t
-
- ;; Agenda styling
- org-agenda-tags-column 0
- org-agenda-block-separator ?─
- org-agenda-time-grid
- '((daily today require-timed)
- (800 1000 1200 1400 1600 1800 2000)
- " ┄┄┄┄┄ " "┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄")
- org-agenda-current-time-string
- "⭠ now ─────────────────────────────────────────────────")
-
- (global-org-modern-mode)
-
- (setf org-modern-todo nil)
-#+end_src
-** Settings
-#+begin_src emacs-lisp
- (require 'ox-md nil t)
- (require 'org-download)
- ;;(require 'org-drill)
-
- (setf org-directory "~/org/"
- org-agenda-files '("~/org/agenda.org")
- org-default-notes-file (expand-file-name "notes.org" org-directory)
- org-ellipsis " ▼ "
- org-log-done 'time
- org-hide-emphasis-markers nil ;;change to t to hide emphasis markers
- org-table-convert-region-max-lines 20000
- org-agenda-start-log-mode t
- org-log-done 'time
- org-log-into-drawer t
- org-todo-keywords ;; This overwrites the default Doom org-todo-keywords
- '((sequence
- "TODO(t)" ;; A task that is ready to be tackled
- "BLOG(b)" ;; Blog writing assignments
- "GYM(g)" ;; Things to accomplish at the gym
- "WAIT(w)" ;; Something is holding up this task
- "|" ;; The pipe necessary to separate "active" states and "inactive" states
- "DONE(d)" ;; Task has been completed
- "CANCELLED(c)" ))
- org-superstar-headline-bullets-list '("◉" "●" "○" "●" "○" "●" "◆")
- org-superstar-itembullet-alist '((?+ . ?➤) (?- . ?✦))) ;; changes +/- symbols in item lists)
-#+end_src
-
-=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 s") 'org-download-screenshot)
-#+end_src
-=Hooks=
-#+begin_src emacs-lisp
- (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
-** Babel
-#+begin_src emacs-lisp
- (defadvice org-edit-src-code (around set-buffer-file-name activate compile)
- (let ((file-name (buffer-file-name))) ;; (1)
- ad-do-it ;; (2)
- (setf buffer-file-name file-name))) ;; (3)
-
- (org-babel-do-load-languages
- 'org-babel-load-languages
- '((emacs-lisp . t)
- (python . t)))
-
-
- (setf org-structure-template-alist
- '(("e" . "src emacs-lisp")
- ("p" . "src python")
- ("l" . "src lisp")
- ("b" . "src bash")
- ("q" . "QUOTE")))
-
- ;;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 t))
- (setf org-download-screenshot-method "grim -g \"$(slurp)\" %s"))
-#+end_src
-
-* Memorize
-#+begin_src emacs-lisp
- ;; (when is-zeus
- ;; (load-file "~/Developer/memorize/memorize.el"))
-#+end_src
-* Markdown
-** Theme
-#+begin_src emacs-lisp
- (defun thanos/markdown-theme ()
- (interactive)
- (dolist
- (face
- '(markdown-header-face-1 :height 2.0))))
-#+end_src
-** Settings
-#+begin_src emacs-lisp
- (require 'markdown-mode)
- (setf markdown-header-scaling t)
- (add-to-list 'auto-mode-alist '("\\.md\\'" . gfm-mode))
- (setf markdown-command "multimarkdown")
-#+end_src
-* DevTools
-** Essentials
-#+begin_src emacs-lisp
- (electric-pair-mode 1)
- (auto-insert-mode 1)
- (global-flycheck-mode)
- (global-set-key (kbd "M-.") 'xref-find-definitions)
- (global-set-key (kbd "C-c l") 'display-line-numbers-mode)
-
-
- (require 'company)
- (add-hook 'after-init-hook 'global-company-mode)
- (define-key company-active-map (kbd "TAB") 'company-indent-or-complete-common)
- (setf company-idle-delay
- (lambda () (if (company-in-string-or-comment) nil 0.0)))
-
- (require 'company-box)
- (add-hook 'company-mode-hook 'company-box-mode)
-
- (setf indent-tabs-mode nil)
-
- (defun insert-brackets (&optional arg)
- (interactive "P")
- (insert-pair arg ?\[ ?\]))
-
- (global-set-key (kbd "C-x M-[") 'insert-brackets)
-#+end_src
-** Magit
-#+begin_src emacs-lisp
- (require 'magit)
- (setf magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)
- (define-prefix-command 'thanos/magit)
- (global-set-key (kbd "C-c g") 'thanos/magit)
- (define-key thanos/magit (kbd "c") 'magit-clone)
-#+end_src
-** Auto-insertions
-+ Shell scripting/bash
-#+begin_src emacs-lisp
- (define-auto-insert '("\\.sh\\'" . "Bash skeleton")
- '("Description:" \n
- "#!/bin/bash"))
- (add-hook 'shell-script-mode #'auto-insert)
-#+end_src
-** Emacs lisp
-#+begin_src emacs-lisp
- (setf tab-always-indent 'complete)
- (add-to-list 'completion-styles 'initials t)
-
- (add-hook 'emacs-lisp-mode-hook #'rainbow-delimiters-mode)
- (add-hook 'emacs-lisp-mode-hook #'company-mode)
- (add-hook 'emacs-lisp-mode-hook #'display-line-numbers-mode)
-
- ;; Disable checkdoc flycheck for org-src buffers
- (add-hook 'org-src-mode-hook #'(lambda ()
- (flycheck-disable-checker 'emacs-lisp-checkdoc)))
-#+end_src
-** Common Lisp
-#+begin_src emacs-lisp
- (setf inferior-lisp-program "sbcl")
- (add-hook 'lisp-mode-hook #'rainbow-delimiters-mode)
- (add-hook 'lisp-mode-hook #'company-mode)
- (add-hook 'lisp-mode-hook #'display-line-numbers-mode)
-#+end_src
-** Scheme
-#+begin_src emacs-lisp
- (add-hook 'scheme-mode-hook #'rainbow-delimiters-mode)
- (add-hook 'scheme-mode-hook #'company-mode)
-#+end_src
-** LSP
-#+begin_src emacs-lisp
- (defun thanos/lsp-mode-setup ()
- (setf lsp-headerline-breadcrumb-segments '(path-up-to-project file symbols))
- (lsp-headerline-breadcrumb-mode))
-
- (require 'lsp-mode)
- (add-hook 'lsp-mode #'thanos/lsp-mode-setup)
- (setf lsp-keymap-prefix "C-c l")
- (lsp-enable-which-key-integration t)
-
- (require 'lsp-ui)
- (add-hook 'lsp-mode 'lsp-ui-mode)
- (setf lsp-ui-doc-position 'bottom)
-#+end_src
-** Python
-#+begin_src emacs-lisp
- ;; set pylsp with lsp-mode
- (setf lsp-pyls-server-command "~/usr/bin/pylsp")
-
- (require 'python-mode)
- (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
- (add-hook 'python-mode 'lsp-deferred)
-#+end_src
-** JSON
-#+begin_src emacs-lisp
- (require 'json-mode)
- (add-to-list 'auto-mode-alist '("\\.json'" . json-mode))
-#+end_src
-* Elfeed
-** Feeds
-#+begin_src emacs-lisp
- (require 'elfeed)
- (require 'elfeed-goodies)
- (setf elfeed-feeds
- '(("https://hackaday.com/blog/feed/"
- hackaday linux)
- ("https://protesilaos.com/news.xml"
- protesilaos)
- ("https://protesilaos.com/codelog.xml"
- proetesilaos)
- ("https://guix.gnu.org/feeds/blog.atom"
- gnu guix)
- ("https://thanosapollo.com/posts/index.xml"
- thanos)
- ("http://nullprogram.com/feed/"
- emacs linux)
- ("https://drewdevault.com/blog/index.xml"
- sourcehut drewdevault)
- ("https://spacepub.space/feeds/videos.xml?videoChannelId=2"
- drewdevault video)
- ("https://odysee.com/$/rss/@DistroTube:2"
- video dt)
- ("https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA"
- video mental)
- ("https://www.youtube.com/feeds/videos.xml?channel_id=UCAiiOTio8Yu69c3XnR7nQBQ"
- video daviwil)
- ("https://videos.lukesmith.xyz/feeds/videos.atom?sort=-publishedAt&isLocal=true"
- video luke)
- ("https://www.youtube.com/feeds/videos.xml?channel_id=UCrc2iv2-G1FZ3VscM3zu2jg"
- video zoogirl)
- ("https://www.youtube.com/feeds/videos.xml?channel_id=UC0uTPqBCFIpZxlz_Lv1tk_g"
- video prot)
- ("https://www.youtube.com/feeds/videos.xml?channel_id=UCq6VFHwMzcMXbuKyG7SQYIg"
- video moist)
- ("https://www.youtube.com/feeds/videos.xml?channel_id=UC05XpvbHZUQOfA6xk4dlmcw"
- video djware)
- ("https://archlinux.org/feeds/news/"
- ArchLinux Latest)
- ("https://www.youtube.com/feeds/videos.xml?channel_id=UCsBjURrPoezykLs9EqgamOA"
- fireship video)
- ("https://www.youtube.com/feeds/videos.xml?channel_id=UCl-J-ovSJhA3or73Q2uVpow"
- medicosperf video)
- ("https://www.youtube.com/feeds/videos.xml?channel_id=UCSuHzQ3GrHSzoBbwrIq3LLA"
- naomi video)
- ("https://www.youtube.com/feeds/videos.xml?channel_id=UCqYPhGiB9tkShZorfgcL2lA"
- WhatIveLearned video)
- ("http://wikileaks.org/feed"
- wikileaks)
- ("https://hackernoon.com/feed"
- hackernoon)
- ("https://sachachua.com/blog/feed/"
- sacha emacs)
- ("https://www.youtube.com/feeds/videos.xml?channel_id=UCtMVHI3AJD4Qk4hcbZnI9ZQ"
- video OrdinaeryGamers)
- ("https://www.youtube.com/feeds/videos.xml?channel_id=UCl2mFZoRqjw_ELax4Yisf6w"
- video Louis)
- ("https://www.youtube.com/feeds/videos.xml?channel_id=UC1yNl2E66ZzKApQdRuTQ4tw "
- video sabine)
- ("https://bits.debian.org/feeds/feed.rss"
- debian linux)
- ("https://torrentfreak.com/feed"
- torrentfreak)
- ("https://www.youtube.com/feeds/videos.xml?channel_id=UCM6SlP9fiwPIjhkWmbg8Ojg"
- video liberated-programmer)
- ("https://odysee.com/$/rss/@seytonic:c"
- video seytonic)
- ("https://www.youtube.com/feeds/videos.xml?channel_id=UC1yNl2E66ZzKApQdRuTQ4tw"
- video sabine)
- ("https://wp.medscape.com/cx/rssfeeds/2700.xml"
- med medscape)
- ("https://nyxt.atlas.engineer/feed"
- nyxt)))
-#+end_src
-** Watch Videos
-Create function to watch videos using ~mpv~
-#+begin_src emacs-lisp
- (defun elfeed-v-mpv (url)
- "Watch a video from URL in MPV"
- (start-process-shell-command "elfeed-video" nil (format "mpv \"%s\"" url)))
-
- (defun elfeed-view-mpv (&optional use-generic-p)
- "Youtube-feed link"
- (interactive "P")
- (let ((entries (elfeed-search-selected)))
- (cl-loop for entry in entries
- do (elfeed-untag entry 'unread)
- when (elfeed-entry-link entry)
- do (elfeed-v-mpv it))
- (mapc #'elfeed-search-update-entry entries)
- (unless (use-region-p) (forward-line))))
-#+end_src
-** Settings & Keys
-#+begin_src emacs-lisp
- (define-key elfeed-search-mode-map (kbd "v") 'elfeed-view-mpv)
- (define-key elfeed-search-mode-map (kbd "U") 'elfeed-update)
- (define-key thanos/applications-map (kbd "f") 'elfeed)
-
- (setf elfeed-goodies/entry-pane-size 0.55)
- (elfeed-goodies/setup)
-#+end_src
-
-* mu4e
-** Setting up mail
-#+begin_src emacs-lisp
- (require 'smtpmail)
- (require 'mu4e)
-
- (when is-zeus (setf mu4e-update-interval (* 10 60)))
-
- (setf mu4e-get-mail-command "mbsync -a")
-
- (defun set-mu4e-context (context-name full-name mail-address signature)
- "Return a mu4e context named CONTEXT-NAME with :match-func matching
- folder name CONTEXT-NAME in Maildir. The context's `user-mail-address',
- `user-full-name' and `mu4e-compose-signature'`smtpmail-smpt-server' is set to MAIL-ADDRESS
- FULL-NAME SIGNATURE and SERVER respectively.
- Special folders are set to context specific folders."
- (let ((dir-name (concat "/" context-name)))
- (make-mu4e-context
- :name context-name
- ;; we match based on the maildir of the message
- :match-func
- `(lambda (msg)
- (when msg
- (string-match-p
- ,(concat "^" dir-name)
- (mu4e-message-field msg :maildir))))
- :vars
- `((user-mail-address . ,mail-address)
- (user-full-name . ,full-name)
- (mu4e-sent-folder . ,(concat dir-name "/Sent"))
- (mu4e-drafts-folder . ,(concat dir-name "/Drafts"))
- (mu4e-trash-folder . ,(concat dir-name "/Trash"))
- (mu4e-trash-folder . ,(concat dir-name "/Starred"))
- (mu4e-refile-folder . ,(concat dir-name "/Archive"))
- (mu4e-compose-signature . ,signature)))))
- ;;Fixing duplicate UID errors when using mbsync and mu4e
- (setf mu4e-change-filenames-when-moving t)
-
- (setf mu4e-maildir-shortcuts
- '(("/Public/Inbox" . ?I)
- ("/Inbox" . ?i)
- ("/Sent" . ?s)
- ("/Emacs/dev" . ?e)
- ("/Guix/dev" . ?g)))
-
- (setf mu4e-contexts
- (list
- (make-mu4e-context
- :name "Fastmail"
- :match-func
- (lambda (msg)
- (when msg
- (string-prefix-p "/" (mu4e-message-field msg :maildir))))
- :vars '((user-mail-address . "[email protected]")
- (user-full-name . "Thanos Apollo")
- (mu4e-drafts-folder . "/Drafts")
- (mu4e-sent-folder . "/Sent")
- (mu4e-refile-folder . "/Archive")
- (mu4e-trash-folder . "/Trash")))
- (make-mu4e-context
- :name "Public"
- :match-func
- (lambda (msg)
- (when msg
- (string-prefix-p "/" (mu4e-message-field msg :maildir))))
- :vars '((user-mail-address . "[email protected]")
- (user-full-name . "Thanos Apollo")
- (mu4e-drafts-folder . "/Drafts")
- (mu4e-sent-folder . "/Sent")
- (mu4e-refile-folder . "/Archive")
- (mu4e-trash-folder . "/Trash")))))
-
- (setf message-send-mail-function 'smtpmail-send-it
- smtpmail-smtp-server "smtp.fastmail.com"
- smtpmail-smtp-service 465
- smtpmail-stream-type 'ssl
- mu4e-compose-signature "Thanos Apollo\nhttps://thanosapollo.com"
- mu4e-compose-context-policy 'ask
- mu4e-compose-format-flowed t)
-
- (setf mu4e-view-actions
- (delete-dups
- (append
- '(("gapply git patches" . mu4e-action-git-apply-patch)
- ("mgit am patch" . mu4e-action-git-apply-mbox)
- ("bb4 am patch" . mu4e-action-git-apply-b4)
- ("ssetup reword list with b4" . mu4e-action-setup-reword-b4)
- ("crun checkpatch script" . my-mu4e-action-run-check-patch)
- ("MCheck if merged" . my-mu4e-action-check-if-merged)))))
-#+end_src
-** Actions
-#+begin_src emacs-lisp
- (setf mu4e-view-actions
- (delete-dups
- (append
- '(("gapply git patches" . mu4e-action-git-apply-patch)
- ("mgit am patch" . mu4e-action-git-apply-mbox)
- ("bb4 am patch" . mu4e-action-git-apply-b4)
- ("ssetup reword list with b4" . mu4e-action-setup-reword-b4)
- ("crun checkpatch script" . my-mu4e-action-run-check-patch)
- ("MCheck if merged" . my-mu4e-action-check-if-merged)))))
-#+end_src
-** Notifications/Style
-#+begin_src emacs-lisp
- (require 'mu4e-alert)
- (mu4e-alert-enable-mode-line-display)
-#+end_src
-** Keybindings
-#+begin_src emacs-lisp
- (define-key thanos/applications-map (kbd "m") 'mu4e)
-#+end_src
-
-* Eshell
-** Configuration with Eat
-#+begin_src emacs-lisp
- (setf eshell-visual-commands '())
- (eat-eshell-mode 1)
-#+end_src
-** Environment
-#+begin_src emacs-lisp
- (setenv "EDITOR" "emacsclient -n")
- (setenv "DEBEMAIL" "[email protected]")
- (setenv "DEBNAME" "Thanos Apollo")
-#+end_src
-** Completions
-#+begin_src emacs-lisp
- ;;;; sudo completion
- (defun pcomplete/sudo ()
- "Completion rules for the `sudo' command."
- (let ((pcomplete-ignore-case t))
- (pcomplete-here (funcall pcomplete-command-completion-function))
- (while (pcomplete-here (pcomplete-entries)))))
-
- ;;;; systemctl completion
- (defcustom pcomplete-systemctl-commands
- '("disable" "enable" "status" "start" "restart" "stop" "reenable"
- "list-units" "list-unit-files")
- "p-completion candidates for `systemctl' main commands"
- :type '(repeat (string :tag "systemctl command"))
- :group 'pcomplete)
-
- (defvar pcomplete-systemd-units
- (split-string
- (shell-command-to-string
- "(systemctl list-units --all --full --no-legend;systemctl list-unit-files --full --no-legend)|while read -r a b; do echo \" $a\";done;"))
- "p-completion candidates for all `systemd' units")
-
- (defvar pcomplete-systemd-user-units
- (split-string
- (shell-command-to-string
- "(systemctl list-units --user --all --full --no-legend;systemctl list-unit-files --user --full --no-legend)|while read -r a b;do echo \" $a\";done;"))
- "p-completion candidates for all `systemd' user units")
-
- (defun pcomplete/systemctl ()
- "Completion rules for the `systemctl' command."
- (pcomplete-here (append pcomplete-systemctl-commands '("--user")))
- (cond ((pcomplete-test "--user")
- (pcomplete-here pcomplete-systemctl-commands)
- (pcomplete-here pcomplete-systemd-user-units))
- (t (pcomplete-here pcomplete-systemd-units))))
-
- ;;;; man completion
- (defvar pcomplete-man-user-commands
- (split-string
- (shell-command-to-string
- "apropos -s 1 .|while read -r a b; do echo \" $a\";done;"))
- "p-completion candidates for `man' command")
-
- (defun pcomplete/man ()
- "Completion rules for the `man' command."
- (pcomplete-here pcomplete-man-user-commands))
-
- ;; hut completion
- (defcustom pcomplete-hut-commands
- '("builds" "export" "git" "graphql" "lists" "help" "hg"
- "init" "meta" "pages" "paste" "todo")
- "p-completion candidates for `hut' main commands"
- :type '(repeat (string :tag "hut command"))
- :group 'pcomplete)
-
- (defun pcomplete/hut ()
- "Completion rules for `hut' command"
- (pcomplete-here (append pcomplete-hut-commands)))
-#+end_src
-** Aliases & Paths
-#+begin_src emacs-lisp
- (setf thanos/eshell-aliases
- '((g . magit)
- (gl . magit-log)
- (d . dired)
- (o . find-file)
- (oo . find-file-other-window)
- (ll . (lambda () (eshell/ls '-la)))
- (eshell/clear . eshell/clear-scrollback)))
-
- ;; Define aliases using `mapc`
- (mapc (lambda (alias)
- (defalias (car alias) (cdr alias)))
- thanos/eshell-aliases)
-
- ;; PATH
- (defvar eshell-path-env (getenv "~/.local/bin"))
-#+end_src
-** Prompt
-#+begin_src emacs-lisp
- (require 'eshell-git-prompt)
- ;; customize multiline theme
- (defun eshell-git-prompt-multiline ()
- "Eshell Git prompt inspired by spaceship-prompt."
- (let (separator hr dir git git-dirty time sign command)
- (setf separator (with-face " | " 'eshell-git-prompt-multiline-secondary-face))
- (setf hr (with-face (concat "\n" (make-string (/ (window-total-width) 2) ?─) "\n") 'eshell-git-prompt-multiline-secondary-face))
- (setf dir
- (concat
- (concat (abbreviate-file-name (eshell/pwd)))))
- (setf git
- (concat (with-face "⎇" 'eshell-git-prompt-exit-success-face)
- (concat (eshell-git-prompt--branch-name))))
- (setf git-dirty
- (when (eshell-git-prompt--branch-name)
- (if (eshell-git-prompt--collect-status)
- (with-face " ✎" 'eshell-git-prompt-modified-face)
- (with-face " ✔" 'eshell-git-prompt-exit-success-face))))
- (setf time (with-face (format-time-string "%I:%M:%S %p") 'eshell-git-prompt-multiline-secondary-face))
- (setf sign
- (if (= (user-uid) 0)
- (with-face "\n#" 'eshell-git-prompt-multiline-sign-face)
- (with-face "\nλ" 'eshell-git-prompt-multiline-sign-face)))
- (setf command (with-face " " 'eshell-git-prompt-multiline-command-face))
-
-
- (eshell-git-prompt---str-read-only
- (concat hr dir separator git git-dirty separator time sign command))))
-
- (eshell-git-prompt-use-theme 'multiline)
-
- (eshell-syntax-highlighting-global-mode 1)
-
- (setf eshell-highlight-prompt t)
-#+end_src
-** Multi Eshell
-#+begin_src emacs-lisp
- (defun if-void (arg default)
- (if (boundp arg)
- (eval arg)
- default
- ))
-
- (defgroup multi-eshell nil
- "Simple support for having multiple shells open."
- :group 'languages)
-
- (defcustom multi-eshell-shell-function '(eshell)
- "Command called to create shell"
- :group 'multi-eshell)
-
- (defcustom multi-eshell-name "*eshell*" "The name of the buffer opened by the shell command."
- :type 'string
- :group 'multi-eshell)
-
- (defun multi-eshell-function () "This function opens the appropriate shell." (eval multi-eshell-shell-function) )
- ;;;(defvar multi-eshell-function `(shell) ) ;;; Defines the shell. ('shell) or ('eshell)
- ;(defvar multi-eshell-name "*eshell*") ;;; Name of default shell or eshell buffer
-
- (defvar multi-eshell-ring (make-ring 100) "This stores a bunch of buffers, which are shells created by multi-eshell." )
- (setf multi-eshell-index 0 )
- (defvar multi-eshell-last-buffer nil)
-
- (defun multi-eshell-is-current-buffer-current-multi-eshell (&optional ignored)
- "Checks if current buffer is the current multi-eshell."
- (eq (current-buffer) (ring-ref multi-eshell-ring multi-eshell-index))
- )
-
- (defun multi-eshell-switch-to-current-shell (&optional ignored)
- "Switch to shell buffer."
- (if (buffer-live-p (ring-ref multi-eshell-ring multi-eshell-index))
- (switch-to-buffer (ring-ref multi-eshell-ring multi-eshell-index))
- )
- )
-
- (defun multi-eshell-current-shell (&optional ignored)
- "Returns the current multi-eshell."
- (ring-ref multi-eshell-ring multi-eshell-index)
- )
-
- (defun multi-eshell-switch-to-next-live-shell (&optional ignored)
- "Switches to the next live shell. Creates one if none exists."
- (interactive "p")
- (let ((still-looking t)
- (empty nil))
- (while (and still-looking (not empty))
- (if (ring-empty-p multi-eshell-ring)
- (progn
- (setf empty t)
- (multi-eshell 1)
- )
- (progn
- (if (buffer-live-p (ring-ref multi-eshell-ring multi-eshell-index))
- (progn
- (setf multi-eshell-index (+ multi-eshell-index 1))
- (switch-to-buffer (ring-ref multi-eshell-ring multi-eshell-index))
- (setf still-looking nil)
- )
- (ring-remove multi-eshell-ring multi-eshell-index)
- )
- )
- )
- )
- )
- )
-
- ;;;###autoload
- (defun multi-eshell-go-back (&optional ignored)
- "Switch to buffer multi-eshell-last-buffer."
- (interactive "p")
- (if (buffer-live-p multi-eshell-last-buffer)
- (switch-to-buffer multi-eshell-last-buffer)
- (message "Last buffer visited before multi-eshell is gone. Nothing to go back to..")
- ))
-
-
- ;;;###autoload
- (defun multi-eshell-switch (&optional ignored)
- "If current buffer is not an multi-eshell, switch to current multi-eshell buffer. Otherwise, switch to next multi-eshell buffer."
- (interactive "p")
- (progn
- (setf multi-eshell-last-buffer (current-buffer))
- (let ((still-looking t)
- (empty nil))
- (if (ring-empty-p multi-eshell-ring)
- (multi-eshell 1)
- (if (and (buffer-live-p (multi-eshell-current-shell) )
- (not (eq (multi-eshell-current-shell) (current-buffer))))
- (switch-to-buffer (multi-eshell-current-shell))
- (multi-eshell-switch-to-next-live-shell)
- )
- )
- )))
-
- ;;;###autoload
- (defun multi-eshell (&optional numshells)
- "Creates a shell buffer. If one already exists, this creates a new buffer, with the name '*shell*<n>', where n is chosen by the function generate-new-buffer-name."
- (interactive "p")
- (progn
- (setf multi-eshell-last-buffer (current-buffer))
- (dotimes (i (if-void 'numshells 1) nil)
- (let ( (tempname (generate-new-buffer-name "*tempshell*"))
- (new-buff-name (generate-new-buffer-name multi-eshell-name))
- (localdir default-directory)
- )
- (if (eq (get-buffer multi-eshell-name) nil) ;If a
- (progn
- (multi-eshell-function)
- ;(process-send-string (get-buffer-process new-buff-name) (concat "cd " localdir "\n"))
- (ring-insert multi-eshell-ring (current-buffer) )
- (setf multi-eshell-index (+ multi-eshell-index 1))
- )
- (progn
- (interactive)
- (multi-eshell-function)
- (rename-buffer tempname)
- (multi-eshell-function)
- (rename-buffer new-buff-name )
- (switch-to-buffer tempname)
- (rename-buffer multi-eshell-name)
- (switch-to-buffer new-buff-name)
- ;(process-send-string (get-buffer-process new-buff-name) (concat "cd " localdir "\n"))
- (ring-insert multi-eshell-ring (current-buffer) )
- (setf multi-eshell-index (+ multi-eshell-index 1))
- )
- )
- )
- )
- )
- )
-
- (defun shell-with-name (name)
- "Creates a shell with name given by the first argument, and switches to it. If a buffer with name already exists, we simply switch to it."
- (let ((buffer-of-name (get-buffer name))
- (tempname (generate-new-buffer-name "*tempshell*") ) )
- (cond ((bufferp buffer-of-name) ;If the buffer exists, switch to it (assume it is a shell)
- (switch-to-buffer name))
- ( (bufferp (get-buffer multi-eshell-name))
- (progn
- (multi-eshell-function)
- (rename-buffer tempname)
- (multi-eshell-function)
- (rename-buffer name)
- (switch-to-buffer tempname)
- (rename-buffer multi-eshell-name)
- (switch-to-buffer name)))
- ( t
- (progn
- (multi-eshell-function)
- (rename-buffer name))))))
-#+end_src
-** Keybindings
-#+begin_src emacs-lisp
- (define-prefix-command 'thanos/eshell-map)
- (global-set-key (kbd "C-c e") 'thanos/eshell-map)
-
- (define-key thanos/eshell-map (kbd "o") 'multi-eshell)
- (define-key thanos/eshell-map (kbd "n") 'multi-eshell-switch)
-#+end_src
-* Vterm
-#+begin_src emacs-lisp
- (defvar thanos/vterm-map (make-sparse-keymap))
- (define-prefix-command 'thanos/vterm-map)
- (define-key global-map (kbd "C-c v") 'thanos/vterm-map)
- (define-key thanos/vterm-map (kbd "n") 'multi-vterm-next)
- (define-key thanos/vterm-map (kbd "p") 'multi-vterm-prev)
- (define-key thanos/vterm-map (kbd "d") 'multi-vterm-dedicated-open)
- (define-key thanos/vterm-map (kbd "o") 'multi-vterm)
-#+end_src
-* Chatgpt
-#+begin_src emacs-lisp
- (require 'gptel)
- (define-key 'thanos/applications-map (kbd "c") 'gptel-send)
- (setf gptel-api-key (password-store-get "chatgpt/api")
- gptel-model 'gpt-4-32k)
-#+end_src
-* Multimedia
-** YeeTube
-*** Vimeo
-+ Downlaod videos from ~vimeo~, /just change .json to .mpd on master.json/
- #+begin_src emacs-lisp
- (defun yeetube-download-vimeo-videos ()
- (interactive)
- (let ((url "")
- (name "")
- (download-counter 1))
- (while (not (string= url "q"))
- (setf url (read-string "Enter URL (q to quit): "))
- (unless (string= url "q")
- (setf name (read-string (format "Custom name (download counter: %d) " download-counter)))
- (setf download-counter (1+ download-counter))
- (call-process-shell-command
- (format
- "yt-dlp '%s' -o '%s'"
- (replace-regexp-in-string "\\.json" ".m3u8" url) name)
- nil 0)))))
- #+end_src
-*** Ffmpeg
-+ Use ~ffmpeg~ to download videos
-
-#+begin_src emacs-lisp
- (defun yeetube-download-videos-ffmpeg ()
- "Download one or multiple videos using yt-dlp.
- This command is not meant to be used in the *Yeetube Search* buffer.
-
- Usage Example:
- Open a Dired buffer and navigate where you want to download your videos,
- then run this command interactively. You can leave the 'Custom name:'
- prompt blank to keep the default name."
- (interactive)
- (let ((url "")
- (name "")
- (download-counter 1)
- (stored-contents nil))
- ;; Read links and names until "q" is entered
- (while (not (string= url "q"))
- (setf url (read-string "Enter URL (q to quit): "))
- (unless (string= url "q")
- (setf name (read-string (format "Custom name (download counter: %d) " download-counter)))
- (push (cons url name) stored-contents)
- (setf download-counter (1+ download-counter))))
- ;; Process the collected links and names
- (dolist (pair stored-contents)
- (let ((url (car pair))
- (name (cdr pair)))
- (async-shell-command
- (format
- "ffmpeg -protocol_whitelist file,crypto,data,https,tls,tcp -stats -i '%s' -codec copy '%s.mp4'"
- url name))))))
-#+end_src
-*** Keybindings
-#+begin_src emacs-lisp
- (when is-zeus
- (load-file "~/Developer/yeetube.el/yeetube.el"))
- (require 'yeetube)
-
- (setf yeetube-results-limit 30
- yeetube-mpv-disable-video t)
-
- (define-prefix-command 'thanos/yeetube)
- (global-set-key (kbd "C-c y") 'thanos/yeetube)
- (define-key thanos/yeetube (kbd "s") 'yeetube-search)
- (define-key thanos/yeetube (kbd "b") 'yeetube-play-saved-video)
- (define-key thanos/yeetube (kbd "d") 'yeetube-download-videos)
- (define-key thanos/yeetube (kbd "p") 'yeetube-mpv-toggle-pause)
- (define-key thanos/yeetube (kbd "C-p") 'yeetube-mpv-toggle-video)
- (define-key thanos/yeetube (kbd "k") 'yeetube-remove-saved-video)
- (define-key thanos/yeetube (kbd "u") 'yeetube-change-platform)
- (define-key thanos/yeetube (kbd "C-d") 'yeetube-download-vimeo-videos)
-
- (define-key yeetube-mode-map (kbd "c") 'yeetube-switch-mpv)
-#+end_src
-
-** EMMS
-#+begin_src emacs-lisp
- (require 'emms)
- (emms-all)
- (setf emms-player-list '(emms-player-mpv)
- emms-player-mpv-parameters '("--no-video")
- emms-info-functions '(emms-info-native)
- emms-playlist-buffer-name "*Music*"
- emms-source-file-default-directory "~/Music/jazz")
- (define-key 'thanos/applications-map (kbd "e") 'emms)
- (define-key emms-playlist-mode-map (kbd "A") 'emms-add-directory-tree)
-#+end_src
-* Chat
-** Ement
-#+begin_src emacs-lisp
- (defun ement-login ()
- (interactive)
- (ement-connect
- :user-id "@thanos_apollon:matrix.org"
- :password (password-store-get "matrix/thanos_apollon")
- :uri-prefix "https://matrix-client.matrix.org"))
-
- (define-key thanos/applications-map (kbd "M-e") 'ement-login)
-#+end_src
-** ERC
-#+begin_src emacs-lisp
- ;;; Code:
- (require 'erc)
-
- (setf erc-modules
- '(sasl netsplit fill button match track completion readonly
- networks ring autojoin noncommands irccontrols move-to-prompt stamp
- menu list))
-
- (defun erc-libera ()
- "Login to liberachat with erc."
- (interactive)
- (erc-tls :server "irc.libera.chat" :port 6697
- :nick "thanosapollo"
- :user "thanosapollo"
- :password (password-store-get "liberachat/thanos_apollo")))
-
- (defun erc-mouse ()
- "Login to liberachat with erc."
- (interactive)
- (erc-tls :server "irc.myanonamouse.net" :port 6697
- :nick "Skylosophos"
- :user "Skylosophos"
- :password (password-store-get "myanonamouse.net/irc")))
-
- (define-key thanos/applications-map (kbd "i") 'erc-libera)
-#+end_src
-** Telega
-#+begin_src emacs-lisp
- (require 'telega)
- (add-hook 'telega-root-mode-hook 'emojify-mode)
- (add-hook 'telega-chat-mode-hook 'emojify-mode)
-#+end_src
-* Extras
-** StumpWM
-#+begin_src emacs-lisp
- (require 'stumpwm-mode)
- (setf stumpwm-shell-program "~/.stumpwm.d/modules/util/stumpish/stumpish")
-#+end_src
-** pdf-tools
-#+begin_src emacs-lisp
- (require 'pdf-tools)
- (pdf-tools-install)
- ;;Add pdf-isearch-minor-mode hook, otherwise isearch will be buggy
- ;;Darkmode hook, cause I don't want color or light in my life, I'm a vampire.
- (add-hook 'pdf-view-mode-hook 'pdf-isearch-minor-mode)
- (add-hook 'pdf-view-mode-hook 'pdf-view-midnight-minor-mode)
- (add-to-list 'auto-mode-alist '("\\.pdf\\'" . 'pdf-view-mode))
-#+end_src
-** nov
-#+begin_src emacs-lisp
- (add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
-
- (defun my-nov-font-setup ()
- (face-remap-add-relative 'variable-pitch
- :family "Jetbrains Mono"
- :height 100))
- (add-hook 'nov-mode-hook 'my-nov-font-setup)
-#+end_src
-** Random functions
-#+begin_src emacs-lisp
- (defun thanos/center-buffer ()
- "Centers/Uncenters selected buffer"
- (interactive)
- (if visual-fill-column-center-text
- (setf visual-fill-column-center-text nil)
- (setf visual-fill-column-center-text t))
- (visual-fill-column-mode 1))
-
-
- (defun thanos/rofi-switch-window ()
- "Navigate X11 buffers using rofi."
- (interactive)
- (start-process-shell-command
- "rofi" nil "rofi -show window"))
-
- (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)))))
-
- (defun rofi ()
- "Run Rofi."
- (interactive)
- (thanos/run-in-background "rofi -show drun"))
-
- (defun thanos/volume-increase ()
- "Increase Volume."
- (interactive)
- (start-process-shell-command
- "amixer" nil "amixer sset Master 5%+"))
-
- (defun thanos/volume-decrease ()
- "Decrease Volume."
- (interactive)
- (start-process-shell-command
- "amixer" nil "amixer sset Master 5%-"))
-
- (defun thanos/restore-wallpaper ()
- "Set NAME as wallpaper."
- (interactive)
- (start-process-shell-command
- "feh" nil "feh --bg-scale ~/dotfiles/wallpaper.png"))
-
- (defun thanos/emacs-keys ()
- "Swap caps with ctrl."
- (interactive)
- (start-process-shell-command
- "setxkbmap" nil "setxkbmap us -option ctrl:swapcaps"))
-
- (defun thanos/greek-keyboard ()
- "Swap caps with ctrl."
- (interactive)
- (start-process-shell-command
- "setxkbmap" nil "setxkbmap gr"))
-
- (defun thanos/exwm-update-class ()
- (exwm-workspace-rename-buffer exwm-class-name))
-
- (defun eshell-new()
- "Open a new instance of eshell."
- (interactive)
- (eshell 'N))
-
- (defun make-mini-geiser ()
- (interactive)
- (split-window-below 60)
- (geiser nil))
-
- (defun start-polybar ()
- "Check which system is running, start polybar accordingly."
- (interactive)
- (if (string= (system-name) "fsociety")
- (start-process-shell-command
- "polybar" nil "polybar main & polybar second")
- (start-process-shell-command
- "polybar" nil "polybar main")))
-
- (defun create-text-scratch ()
- "create a scratch buffer"
- (interactive)
- (switch-to-buffer (get-buffer-create "*Text Scratch*"))
- (markdown-mode)
- (gptel-mode))
-
- (define-key Create (kbd "t") 'create-text-scratch)
-
- (defun create-scratch ()
- (interactive)
- (switch-to-buffer (get-buffer-create "*scratch*"))
- (emacs-lisp-mode))
-
- (defun thanos/frame ()
- (let ((frame (make-frame '((minibuffer . only)))))
- (set-frame-height frame 300)
- (set-frame-width frame 800)
- (counsel-linux-app)
- frame))
-
- (define-key Create (kbd "e") 'create-scratch)
- ;;
-#+end_src
-
diff --git a/hyprland.org b/hyprland.org
deleted file mode 100644
index 4eaa958..0000000
--- a/hyprland.org
+++ /dev/null
@@ -1,462 +0,0 @@
-#+title: Configuration for Hyprland
-#+PROPERTY: header-args :mkdirp yes
-#+STARTUP: overview
-
-* Hyprland
-** Config
-*** Keyboard & monitors
-#+begin_src conf :tangle ~/.config/hypr/hyprland.conf
- # See https://wiki.hyprland.org/Configuring/Monitors/
- monitor=transform,preferred,auto,auto
-
- # See https://wiki.hyprland.org/Configuring/Keywords/ for more
-
- # Some default env vars.
- env = XCURSOR_SIZE,24
-
- # For all categories, see https://wiki.hyprland.org/Configuring/Variables/
- input {
- kb_layout = us,gr,my-cyr
- kb_variant =
- kb_model =
- kb_options = ctrl:swapcaps, grp:alt_space_toggle,
- kb_rules =
-
- follow_mouse = 1
-
- touchpad {
- natural_scroll = no
- }
-
- sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
- }
-#+end_src
-*** Style
-#+begin_src conf :tangle ~/.config/hypr/hyprland.conf
- general {
- # See https://wiki.hyprland.org/Configuring/Variables/ for more
- gaps_in = 5
- gaps_out = 10
- border_size = 2
- col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
- col.inactive_border = rgba(595959aa)
- layout = master
- }
-
- decoration {
- # See https://wiki.hyprland.org/Configuring/Variables/ for more
- active_opacity = 0.99
- inactive_opacity = 0.97
- rounding = 10
- blur = no
- blur_size = 3
- blur_passes = 1
- blur_new_optimizations = on
- drop_shadow = yes
- shadow_range = 4
- shadow_render_power = 3
- col.shadow = rgba(1a1a1aee)
- }
-
- animations {
- enabled = yes
-
- # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
-
- bezier = myBezier, 0.05, 0.9, 0.1, 1.05
- animation = windows, 1, 7, myBezier
- animation = windowsOut, 1, 7, default, popin 80%
- animation = border, 1, 10, default
- animation = borderangle, 1, 8, default
- animation = fade, 1, 7, default
- animation = workspaces, 1, 6, default
- }
-
- dwindle {
- # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
- pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
- preserve_split = yes # you probably want this
- }
-
- master {
- # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
- new_is_master = false
- mfact = 0.53
- }
-
- gestures {
- # See https://wiki.hyprland.org/Configuring/Variables/ for more
- workspace_swipe = off
- }
-
- # Personal Configuration for Hyprland
- # Thanos Apollo 2023
-
- # See https://wiki.hyprland.org/Configuring/ for more
-
- device:epic mouse V1 {
- sensitivity = -0.5
- }
-#+end_src
-*** Keybindings
-#+begin_src conf :tangle ~/.config/hypr/hyprland.conf
- # See https://wiki.hyprland.org/Configuring/Keywords/ for more
- $mainMod = CTRL_ALT
-
- # Binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
- bind = , F5, exec, "/home/$USER/Developer/scripts/keyboard-light-x220.sh"
- bind = , F1, exec, swaylock --screenshot --clock --effect-blur 10x9 --indicator
- bind = , F8, exec, brightnessctl set +5%
- bind = , F7, exec, brightnessctl set 5-%
- bind = , XF86AudioRaiseVolume, exec, pamixer -i 5
- bind = , XF86AudioLowerVolume, exec, pamixer -d 5
- bind = , XF86AudioMute, exec, pamixer -t
-
- bind = $mainMod, Return, exec, emacsclient -c
- bind = $mainMod, W, exec, kitty
- bind = $mainMod, Q, killactive,
- bind = $mainMod SHIFT, Q, exit,
- bind = $mainMod, R, exec, rofi -show drun
- bind = $mainMod, E, exec, tessen --dmenu=rofi
- bind = $mainMod, V, togglefloating,
- bind = $mainMod, J, togglesplit, # dwindle
- bind = ALT, F12, exec, grim -g "$(slurp)"
- bind = ALT, F11, fullscreen
-
- # Move focus with mainMod + arrow keys
- bind = $mainMod, B, movefocus, l
- bind = $mainMod, F, movefocus, r
- bind = $mainMod, N, movefocus, d
- bind = $mainMod, P, movefocus, u
-
- bind = $mainMod SHIFT, P, movewindow, u
- bind = $mainMod SHIFT, N, movewindow, d
- bind = $mainMod SHIFT, F, movewindow, r
- bind = $mainMod SHIFT, B, movewindow, l
-
-
- # Switch workspaces with mainMod + [0-9]
- bind = $mainMod, 1, workspace, 1
- bind = $mainMod, 2, workspace, 2
- bind = $mainMod, 3, workspace, 3
- bind = $mainMod, 4, workspace, 4
- bind = $mainMod, 5, workspace, 5
- bind = $mainMod, 6, workspace, 6
- bind = $mainMod, 7, workspace, 7
- bind = $mainMod, 8, workspace, 8
- bind = $mainMod, 9, workspace, 9
- bind = $mainMod, 0, workspace, 10
-
- # Move active window to a workspace with mainMod + SHIFT + [0-9]
- bind = $mainMod SHIFT, 1, movetoworkspace, 1
- bind = $mainMod SHIFT, 2, movetoworkspace, 2
- bind = $mainMod SHIFT, 3, movetoworkspace, 3
- bind = $mainMod SHIFT, 4, movetoworkspace, 4
- bind = $mainMod SHIFT, 5, movetoworkspace, 5
- bind = $mainMod SHIFT, 6, movetoworkspace, 6
- bind = $mainMod SHIFT, 7, movetoworkspace, 7
- bind = $mainMod SHIFT, 8, movetoworkspace, 8
- bind = $mainMod SHIFT, 9, movetoworkspace, 9
- bind = $mainMod SHIFT, 0, movetoworkspace, 10
-
- # Scroll through existing workspaces with mainMod + scroll
- bind = ALT, mouse_down, workspace, e+1
- bind = ALT, mouse_up, workspace, e-1
-
- # Move/resize windows with mainMod + LMB/RMB and dragging
- bindm = ALT, mouse:272, movewindow
- bindm = ALT, mouse:273, resizewindow
-#+end_src
-*** Exec upon start
-#+begin_src conf :tangle ~/.config/hypr/hyprland.conf
- exec-once = waybar
- exec = hyprpaper
- exec-once = emacs --daemon
- exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
- exec-once = nm-applet
-#+end_src
-** Hyprpaper
-#+begin_src conf :tangle ~/.config/hypr/hyprpaper.conf
- preload = ~/wallpapers/wallpaper-cyberpunk.jpg
- preload = ~/wallpapers/science-athlete.jpg
- preload = ~/wallpapers/robo-girl.jpg
- preload = ~/wallpapers/chalk-board-wallpapers.jpg
-
- wallpaper = DP-1, ~/wallpapers/chalk-board-wallpapers.jpg
-
- wallpaper = HDMI-A-1, ~/wallpapers/chalk-board-wallpapers.jpg
-
- wallpaper = LVDS-1, ~/wallpapers/science-athlete.jpg
-#+end_
-* Waybar
-** Configuration
-#+begin_src jsonc :tangle ~/.config/waybar/config.jsonc
- {
- "layer": "top",
- "position": "top",
- "mod": "dock",
- "exclusive": true,
- "passthrough": false,
- "gtk-layer-shell": true,
- "height": 0,
- "modules-left": [
- "clock",
- "custom/weather"
- // "hyprland/window",
- ],
- "modules-center": ["wlr/workspaces"],
- "modules-right": [
- "tray",
- "custom/updates",
- "custom/language",
- "battery",
- "backlight",
- "custom/volume"
- // "pulseaudio#microphone"
- ],
-
- "hyprland/window": {
- "format": "{}"
- },
- "wlr/workspaces": {
- "disable-scroll": true,
- "all-outputs": true,
- "on-click": "activate",
- //"format": "{icon}",
- "persistent_workspaces": {
- "1": [],
- "2": [],
- "3": [],
- "4": [],
- "5": [],
- "6": [],
- "7": [],
- "8": [],
- "9": [],
- "10": []
- }
- },
- "custom/updates": {
- "exec": "(pacman -Qu ; paru -Qua) | wc -l",
- "interval": 7200,
- "format": " {}"
- },
- "custom/weather" : {
- "tooltip" : true,
- "format" : "{}",
- "interval" : 30,
- "exec" : "~/Developer/scripts/waybar-wttr.py",
- "return-type" : "json"
- },
- "tray": {
- "icon-size": 13,
- "spacing": 10
- },
- "clock": {
- "format": "{: %R  %d/%m}",
- "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
- },
- "backlight": {
- "device": "intel_backlight",
- "format": "{icon} {percent}%",
- "format-icons": ["", "", ""],
- "on-scroll-up": "brightnessctl set 1%+",
- "on-scroll-down": "brightnessctl set 1%-",
- "min-length": 6
- },
- "battery": {
- "states": {
- "good": 95,
- "warning": 30,
- "critical": 20
- },
- "format": "{icon} {capacity}%",
- "format-charging": " {capacity}%",
- "format-plugged": " {capacity}%",
- "format-alt": "{time} {icon}",
- "format-icons": ["", "", "", "", "", "", "", "", "", "", ""]
- },
- "pulseaudio": {
- "format": "{icon} {volume}%",
- "tooltip": false,
- "format-muted": " Muted",
- "on-click": "pamixer -t",
- "on-scroll-up": "pamixer -i 5",
- "on-scroll-down": "pamixer -d 5",
- "scroll-step": 5,
- "format-icons": {
- "headphone": "",
- "hands-free": "",
- "headset": "",
- "phone": "",
- "portable": "",
- "car": "",
- "default": ["", "", ""]
- }
- },
- "custom/volume": {
- "exec": "pamixer --get-volume",
- "interval": 1,
- "format": " {}%",
- "tooltip": true
- }
- // "custom/pipewire": {
- // "format": {},
- // "exec": "awk -F"[][]" '/Left:/ { print $2 }' <(amixer sget Master)",
- // "interval": 10
- // },
- }
-#+end_src
-
-** Style
-#+begin_src css :tangle ~/.config/waybar/style.css
- ,* {
- border: none;
- border-radius: 0;
- font-family: Jetbrains Mono, Cartograph CF Nerd Font, monospace;
- font-weight: bold;
- font-size: 14px;
- min-height: 0;
- }
-
- window#waybar {
- background: rgba(21, 18, 27, 0);
- color: #cdd6f4;
- }
-
- tooltip {
- background: #0d1017;
- border-radius: 10px;
- border-width: 2px;
- border-style: solid;
- border-color: #11111b;
- }
-
- #workspaces button {
- padding: 5px;
- color: #313244;
- margin-right: 5px;
- }
-
- #workspaces button.active {
- color: #39bae6;
- }
-
- #workspaces button.focused {
- color: #a6adc8;
- background: #eba0ac;
- border-radius: 10px;
- }
-
- #workspaces button.urgent {
- color: #11111b;
- background: #a6e3a1;
- border-radius: 10px;
- }
-
- #workspaces button:hover {
- background: #11111b;
- color: #cdd6f4;
- border-radius: 10px;
- }
-
- #custom-language,
- #custom-updates,
- #custom-caffeine,
- #custom-weather,
- #window,
- #clock,
- #battery,
- #pulseaudio,
- #custrom-volume,
- #network,
- #workspaces,
- #tray,
- #backlight {
- background: #0d1017;
- padding: 0px 10px;
- margin: 3px 0px;
- margin-top: 10px;
- border: 1px solid #181825;
- }
-
- #tray {
- border-radius: 10px;
- margin-right: 10px;
- }
-
- #workspaces {
- background: #0d1017;
- border-radius: 10px;
- margin-left: 10px;
- padding-right: 0px;
- padding-left: 5px;
- }
-
- #custom-caffeine {
- color: #89dceb;
- border-radius: 10px 0px 0px 10px;
- border-right: 0px;
- margin-left: 10px;
- }
-
- #custom-language {
- color: #f38ba8;
- border-left: 0px;
- border-right: 0px;
- }
-
- #custom-updates {
- color: #ff8f40;
- border-left: 0px;
- border-right: 0px;
- }
-
- #window {
- border-radius: 10px;
- margin-left: 20px;
- margin-right: 60px;
- }
-
- #clock {
- color: #39bae6;
- border-radius: 10px 0px 0px 10px;
- margin-left: 0px;
- border-right: 0px;
- }
-
- #network {
- color: #f9e2af;
- border-left: 0px;
- border-right: 0px;
- }
-
- #pulseaudio {
- color: #59c2ff;
- border-left: 5px;
- border-right: 5px;
- }
- #custom-volume {
- background: #0d1017;
- color: #59c2ff;
- padding: 8px;
- margin-top: 11px;
- margin-bottom: 3px;
- border-left: 0px;
- border-right: 0px;
- }
-
- #battery {
- color: #a6e3a1;
- border-radius: 0 10px 10px 0;
- margin-right: 10px;
- border-left: 0px;
-
- }
-
- #custom-weather {
- border-radius: 0px 10px 10px 0px;
- border-right: 0px;
- margin-left: 0px;
- }
-#+end_src
diff --git a/shells.org b/shells.org
deleted file mode 100755
index d8b4521..0000000
--- a/shells.org
+++ /dev/null
@@ -1,260 +0,0 @@
-#+TITLE: Shells configuration
-#+PROPERTY: header-args :mkdirp yes
-#+auto_tangle: t
-#+STARTUP: overview
-* Aliases
-#+begin_src bash :tangle ~/.shells/alias.sh
- alias grep='grep --color=auto'
- alias anki='QTWEBENGINE_CHROMIUM_FLAGS="--disable-seccomp-filter-sandbox" anki'
-
- alias vim='nvim'
- alias vi='nvim'
-
- #git
- alias ga='git add'
- alias gaa='git add .'
- alias gc='git commit -m'
- alias gp='git push -u origin'
- alias gpm='git push -u origin master'
- alias gpd='git push -u origin developer'
- alias gs='git status'
- alias cpm='config push -u origin master'
- alias ca='config add'
- alias cs='config status'
- alias cc='config commit -m'
-
- #pacman | yay
- alias yeet='paru -Rsc'
-
- # weather
- alias weather="curl wttr.in"
-
- alias ls='ls -la --color'
- alias sb='sudo systemctl start bluetooth'
- alias mykeys='setxkbmap -option caps:escape'
- alias logout='pkill -U $USER'
- #alias neofetch='neofetch | lolcat'
- alias b='bluetoothctl'
- alias ba='bluetooth-autoconnect'
- alias music='mocp'
- alias ytd="yt-dlp"
- alias c="pavucontrol"
- alias r="ranger"
- alias klight="brightnessctl --device='tpacpi::kbd_backlight' set 1"
-
- ##yarn
- alias sweb='BROWSER="firefox" yarn start'
-
- ##flatpaks
- alias fanki='flatpak run net.ankiweb.Anki'
-#+end_src
-
-* Exports
-#+begin_src shell :tangle ~/.shells/exports.sh
- # Export 'SHELL' to child processes. Programs such as 'screen'
- # honor it and otherwise use /bin/sh.
- export SHELL
- export PATH
- export PATH=/home/$USER/.local/bin:$PATH
- export EDITOR="emacsclient"
- export GIT_EDITOR="emacsclient"
- export SBCL_HOME="/usr/lib/sbcl/"
-
- if [[ $- != *i* ]]
- then
- # We are being invoked from a non-interactive shell. If this
- # is an SSH session (as in "ssh host command"), source
- # /etc/profile so we get PATH and other essential variables.
- [[ -n "$SSH_CLIENT" ]] && source /etc/profile
-
- # Don't do anything else.
- return
- fi
-#+end_src
-
-* bashrc
-#+begin_src shell :tangle ~/.bashrc
- source ~/.shells/alias.sh
- source ~/.shells/exports.sh
- # System-wide .bashrc file for interactive bash(1) shells.
- # ~/.bashrc: executed by bash(1) for non-login shells.
- # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
- # for examples
-
- # If not running interactively, don't do anything
- case $- in
- ,*i*) ;;
- ,*) return;;
- esac
-
- # don't put duplicate lines or lines starting with space in the history.
- # See bash(1) for more options
- HISTCONTROL=ignoreboth
-
- # append to the history file, don't overwrite it
- shopt -s histappend
-
- # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
- HISTSIZE=1000
- HISTFILESIZE=2000
-
- # check the window size after each command and, if necessary,
- # update the values of LINES and COLUMNS.
- shopt -s checkwinsize
-
- # If set, the pattern "**" used in a pathname expansion context will
- # match all files and zero or more directories and subdirectories.
- #shopt -s globstar
-
- # make less more friendly for non-text input files, see lesspipe(1)
- #[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
-
- # set variable identifying the chroot you work in (used in the prompt below)
- if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
- debian_chroot=$(cat /etc/debian_chroot)
- fi
-
- # set a fancy prompt (non-color, unless we know we "want" color)
- case "$TERM" in
- xterm-color|*-256color) color_prompt=yes;;
- esac
-
- # uncomment for a colored prompt, if the terminal has the capability; turned
- # off by default to not distract the user: the focus in a terminal window
- # should be on the output of commands, not on the prompt
- #force_color_prompt=yes
-
- if [ -n "$force_color_prompt" ]; then
- if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
- # We have color support; assume it's compliant with Ecma-48
- # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
- # a case would tend to support setf rather than setaf.)
- color_prompt=yes
- else
- color_prompt=
- fi
- fi
-
- if [ "$color_prompt" = yes ]; then
- PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
- else
- PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
- fi
- unset color_prompt force_color_prompt
-
- # If this is an xterm set the title to user@host:dir
- case "$TERM" in
- xterm*|rxvt*)
- PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
- ;;
- ,*)
- ;;
- esac
-
- # enable color support of ls and also add handy aliases
- if [ -x /usr/bin/dircolors ]; then
- test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
- alias ls='ls --color=auto'
- #alias dir='dir --color=auto'
- #alias vdir='vdir --color=auto'
-
- #alias grep='grep --color=auto'
- #alias fgrep='fgrep --color=auto'
- #alias egrep='egrep --color=auto'
- fi
-
- # colored GCC warnings and errors
- #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
-
- # some more ls aliases
- #alias ll='ls -l'
- #alias la='ls -A'
- #alias l='ls -CF'
-
- # Alias definitions.
- # You may want to put all your additions into a separate file like
- # ~/.bash_aliases, instead of adding them here directly.
- # See /usr/share/doc/bash-doc/examples in the bash-doc package.
-
- if [ -f ~/.bash_aliases ]; then
- . ~/.bash_aliases
- fi
-
- # enable programmable completion features (you don't need to enable
- # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
- # sources /etc/bash.bashrc).
- if ! shopt -oq posix; then
- if [ -f /usr/share/bash-completion/bash_completion ]; then
- . /usr/share/bash-completion/bash_completion
- elif [ -f /etc/bash_completion ]; then
- . /etc/bash_completion
- fi
- fi
-
- #PS1='\n\[\e[0m\][\[\e[0;1;38;5;208m\]\w\[\e[0;2;38;5;248m\]|\[\e[0;2;38;5;220m\]$(git branch 2>/dev/null | grep '"'"'^*'"'"' | colrm 1 2) \[\e[0;2;38;5;242m\]\t\[\e[0m\]]\n\[\e[0m\]-\[\e[0m\]> \[\e[0m\]'
-
- # Uncomment next line to enable starship prompt
- eval "$(starship init bash)"
-#+end_src
-
-* zshrc
-#+begin_src bash :tangle ~/.zshrc
- source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
- source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
-
- source ~/.shells/alias.sh
- source ~/.shells/exports.sh
- export PATH=/home/$USER/.local/bin:$PATH
- export HISTFILE=.zhistory
-
- eval "$(starship init zsh)"
-
- autoload Uz compinit
- compinit
-
- typeset -g -A key
-
- key[Home]="${terminfo[khome]}"
- key[End]="${terminfo[kend]}"
- key[Insert]="${terminfo[kich1]}"
- key[Backspace]="${terminfo[kbs]}"
- key[Delete]="${terminfo[kdch1]}"
- key[Up]="${terminfo[kcuu1]}"
- key[Down]="${terminfo[kcud1]}"
- key[Left]="${terminfo[kcub1]}"
- key[Right]="${terminfo[kcuf1]}"
- key[PageUp]="${terminfo[kpp]}"
- key[PageDown]="${terminfo[knp]}"
- key[ShiftTab]="${terminfo[kcbt]}"
-
- # setup key accordingly
- [[ -n "${key[Home]}" ]] && bindkey -- "${key[Home]}" beginning-of-line
- [[ -n "${key[End]}" ]] && bindkey -- "${key[End]}" end-of-line
- [[ -n "${key[Insert]}" ]] && bindkey -- "${key[Insert]}" overwrite-mode
- [[ -n "${key[Backspace]}" ]] && bindkey -- "${key[Backspace]}" backward-delete-char
- [[ -n "${key[Delete]}" ]] && bindkey -- "${key[Delete]}" delete-char
- [[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-history
- [[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-history
- [[ -n "${key[Left]}" ]] && bindkey -- "${key[Left]}" backward-char
- [[ -n "${key[Right]}" ]] && bindkey -- "${key[Right]}" forward-char
- [[ -n "${key[PageUp]}" ]] && bindkey -- "${key[PageUp]}" beginning-of-buffer-or-history
- [[ -n "${key[PageDown]}" ]] && bindkey -- "${key[PageDown]}" end-of-buffer-or-history
- [[ -n "${key[Shift-Tab]}" ]] && bindkey -- "${key[Shift-Tab]}" reverse-menu-complete
-
- # Finally, make sure the terminal is in application mode, when zle is
- # active. Only then are the values from $terminfo valid.
- if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then
- autoload -Uz add-zle-hook-widget
- function zle_application_mode_start { echoti smkx }
- function zle_application_mode_stop { echoti rmkx }
- add-zle-hook-widget -Uz zle-line-init zle_application_mode_start
- add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop
- fi
-
- # History search
- autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
- zle -N up-line-or-beginning-search
- zle -N down-line-or-beginning-search
-
- [[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-beginning-search
-#+end_src