From 6327b90ca11f3fa5d9905d088d56ea8327726cdd Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Sat, 22 Apr 2023 20:09:59 +0300 Subject: emacs: Add erc settings and remove exwm --- .emacs.d/init.el | 158 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 98 insertions(+), 60 deletions(-) (limited to '.emacs.d') diff --git a/.emacs.d/init.el b/.emacs.d/init.el index b71310a..68e6213 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -5,56 +5,54 @@ browse-url-generic-program "mullvad-browser") (defconst my-package-list '(org-snooze - all-the-icons - all-the-icons-dired - all-the-icons-ivy-rich - dap-mode - toc-org - emojify - general - doom-themes - gruvbox-theme - doom-modeline - counsel - which-key - ivy - ivy-rich - helpful - password-store - org - org-modern - 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 - exwm - exwm-mff - ;; exwm-firefox-core - consult - alsamixer - simple-httpd - circe - eshell-syntax-highlighting -; pdf-tools - org-superstar - mastodon - dashboard - org-auto-tangle)) + all-the-icons + all-the-icons-dired + all-the-icons-ivy-rich + dap-mode + toc-org + emojify + general + doom-themes + gruvbox-theme + doom-modeline + counsel + which-key + ivy + ivy-rich + helpful + password-store + org + org-modern + 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 + exwm + exwm-mff + ;; exwm-firefox-core + consult + alsamixer + simple-httpd + eshell-syntax-highlighting + org-superstar + mastodon + dashboard + org-auto-tangle)) (setq package-archives '(("melpa" . "https://melpa.org/packages/") ("org" . "https://orgmode.org/elpa/") @@ -175,7 +173,7 @@ Contains the list of packages that need to be installed.") :v-adjust -0.05 :face 'font-lock-keyword-face)) -(load-theme 'gruvbox-dark-hard t) +(load-theme 'doom-ayu-dark t) (doom-modeline-mode 1) (setq doom-modeline-height 35) @@ -212,8 +210,6 @@ Contains the list of packages that need to be installed.") ([remap describe-variable] . counsel-describe-variable) ([remap describe-key] . helpful-key)) -(define-key dired-mode-map "b" 'dired-up-directory) - ;;; all-the-icons-dired.el --- Shows icons for each file in dired mode -*- lexical-binding: t; -*- ;;; Code: @@ -367,7 +363,7 @@ Contains the list of packages that need to be installed.") My Title - + p

Starting point

@@ -461,10 +457,14 @@ Contains the list of packages that need to be installed.") (switch-to-buffer (get-buffer-create "*Keimenografos*")) (text-mode)) +(define-key dired-mode-map "b" 'dired-up-directory) + (global-set-key (kbd "") 'keyboard-escape-quit) -(global-set-key (kbd "s-=") 'text-scale-increase) -(global-set-key (kbd "s--") 'text-scale-decrease) + +(global-set-key (kbd "C-=") 'text-scale-increase) +(global-set-key (kbd "C--") 'text-scale-decrease) (global-set-key (kbd "C-k") 'copy-region-as-kill) + ;; Pass (global-set-key (kbd "C-c p i") 'password-store-insert) (global-set-key (kbd "C-c p e") 'password-store-edit) @@ -516,12 +516,9 @@ Contains the list of packages that need to be installed.") "l" 'display-line-numbers-mode "v" 'multi-vterm "e" 'eshell - "i" 'circe "c" 'apollo/center-buffer "m" 'mu4e - "f" 'elfeed - "C-t" 'telega - "g" 'guix) + "f" 'elfeed) ;;pdf-tools (general-define-key @@ -932,3 +929,44 @@ Contains the list of packages that need to be installed.") (setq message-send-mail-function 'smtpmail-send-it smtpmail-stream-type 'ssl)) + +(add-to-list 'load-path "~/dotfiles/.emacs.d/lisp/") +(require 'erc-sasl) +;; Add SASL server to list of SASL servers (start a new list, if it did not exist) +(add-to-list 'erc-sasl-server-regexp-list "irc\\.libera\\.chat") + +;; Redefine/Override the erc-login() function from the erc package, so that +;; it now uses SASL +(defun erc-login () + "Perform user authentication at the IRC server. (PATCHED)" + (erc-log (format "login: nick: %s, user: %s %s %s :%s" + (erc-current-nick) + (user-login-name) + (or erc-system-name (system-name)) + erc-session-server + erc-session-user-full-name)) + (if erc-session-password + (erc-server-send (format "PASS %s" erc-session-password)) + (message "Logging in without password")) + (when (and (featurep 'erc-sasl) (erc-sasl-use-sasl-p)) + (erc-server-send "CAP REQ :sasl")) + (erc-server-send (format "NICK %s" (erc-current-nick))) + (erc-server-send + (format "USER %s %s %s :%s" + ;; hacked - S.B. + (if erc-anonymous-login erc-email-userid (user-login-name)) + "0" "*" + erc-session-user-full-name)) + (erc-update-mode-line)) + +(erc-tls :server "irc.libera.chat" :port 6697 :nick "thanos_apollo" + :full-name "thanos_apollo" + :password (password-store-get "liberachat/thanos_apollo")) + +;; (defun erc-connect () +;; (interactive) +;; (erc-tls :server "irc.libera.chat" :port 6697 :nick "thanos" +;; :full-name "thanos_apollo" +;; :password (password-store-get "liberachat/thanos_apollo"))) + +;; ;; -- cgit v1.2.3