:straight (:type built-in)
:config
(load "~/.emacs.d/irc.el")
- (acheam-irc)
- (erc-notifications-enable)
- (erc-smiley-disable))
+ (erc-notifications-mode 1)
+ (erc-smiley-disable)
+ :custom (erc-prompt-for-password . nil))
(use-package erc-hl-nicks
:config (erc-hl-nicks-mode 1))
+
+ (defun acheam-irc ()
+ "Connect to irc"
+ (interactive)
+ (erc-tls :server "irc.armaanb.net" :nick "emacs"))
+
+ (acheam-irc)
#+end_src
** Emacs Anywhere
Use Emacs globally. Use the Emacs daemon and bind a key in your wm to =emacsclient --eval "(emacs-everywhere)"=.
#+begin_src emacs-lisp
(setq ispell-silently-savep t)
#+end_src
+** Open file as root
+#+begin_src emacs-lisp
+ (defun doas-edit (&optional arg)
+ "Edit currently visited file as root.
+
+ With a prefix ARG prompt for a file to visit.
+ Will also prompt for a file to visit if current
+ buffer is not visiting a file.
+
+ Modified from Emacs Redux."
+ (interactive "P")
+ (if (or arg (not buffer-file-name))
+ (find-file (concat "/doas:root@localhost:"
+ (ido-read-file-name "Find file(as root): ")))
+ (find-alternate-file (concat "/doas:root@localhost:" buffer-file-name))))
+
+ (global-set-key (kbd "C-x C-r") #'doas-edit)
+#+end_src
* Keybindings
** Switch windows
#+begin_src emacs-lisp
#+end_src
**** Programs
#+begin_src conf :tangle ~/.spectrwm.conf
- program[aerc] = alacritty -e aerc
- program[catgirl] = alacritty --hold -e sh -c "while : ; do ssh root@armaanb.net -t abduco -A irc catgirl freenode; sleep 2; done"
+ program[email] = emacsclient -c --eval "(mu4e)"
+ program[irc] = emacsclient -c --eval '(switch-to-buffer "irc.armaanb.net:6697")'
program[emacs] = emacsclient -c
program[firefox] = firefox
program[calc] = alacritty -e because -l
program[emacs-anywhere] = emacsclient --eval "(emacs-everywhere)"
- bind[aerc] = MOD+Control+1
- bind[catgirl] = MOD+Control+2
+ bind[email] = MOD+Control+1
+ bind[irc] = MOD+Control+2
bind[firefox] = MOD+Control+3
bind[emacs-anywhere] = MOD+Control+4
bind[calc] = MOD+Control+5
alias unar='atool -x'
alias wget='wget -e robots=off'
alias lanex='~/.local/share/lxc/lxc'
- alias vim='nvim'
+ alias vim=$EDITOR
+ alias emacs=$EDITOR
#+end_src
**** System management
#+begin_src shell :tangle ~/.config/ash/ashrc