summaryrefslogtreecommitdiffstats
path: root/init.org
diff options
context:
space:
mode:
authorAmin Bandali <bandali@gnu.org>2018-11-01 18:20:51 -0400
committerAmin Bandali <bandali@gnu.org>2018-11-01 18:20:51 -0400
commit313f587783feb1c4b497451a2f3af370c0018ff9 (patch)
tree2c62897cc7c5e6771456ddaf819ea101b6357aeb /init.org
parent0c158cafca2f97bc07de692ff4b81f300f292e8f (diff)
downloadconfigs-313f587783feb1c4b497451a2f3af370c0018ff9.tar.gz
configs-313f587783feb1c4b497451a2f3af370c0018ff9.tar.xz
configs-313f587783feb1c4b497451a2f3af370c0018ff9.zip
[emacs] assimilate slack and deps, clear up .gitignore, add secrets
hopefully the slack thing is temporary, as i don’t like using proprietary platforms. however, if i must, i’d *much* prefer using free software to access it, rather than executing proprietary JS. note: since i’ve decided to commit etc/secrets.el, it shall not contain any sensitive information itself, but rather how to obtain them. therefore, it must be byte-compiled; and the byte-compiled etc/secrets.elc must *never* be committed.
Diffstat (limited to '')
-rw-r--r--init.org61
1 files changed, 60 insertions, 1 deletions
diff --git a/init.org b/init.org
index 9a0e1dd..d64925d 100644
--- a/init.org
+++ b/init.org
@@ -324,6 +324,12 @@ it it's own file. While at it, treat themes as safe.
(setf custom-safe-themes t))
#+end_src
+** Secrets file
+
+#+begin_src emacs-lisp
+(load (no-littering-expand-etc-file-name "secrets"))
+#+end_src
+
** Better =$PATH= handling
Let's use [[https://github.com/purcell/exec-path-from-shell][exec-path-from-shell]] to make Emacs use the =$PATH= as set up
@@ -642,7 +648,7 @@ Enable =winner-mode=.
#+begin_src emacs-lisp
(bind-keys
("C-c b k" . kill-this-buffer)
- ("C-c s s" . save-buffer)
+ ;; ("C-c s s" . save-buffer)
("C-c b s" . save-buffer)
("C-c S" . save-buffer)
("C-c o" . other-window)
@@ -1642,6 +1648,59 @@ Also see [[https://www.emacswiki.org/emacs/rebox2][rebox2]].
:hook (text-mode . typo-mode))
#+end_src
+** slack
+
+Hopefully temporary.
+
+#+begin_src emacs-lisp
+(use-package slack
+ :commands (slack-start)
+ :init
+ (eval-when-compile ; silence the byte-compiler
+ (defvar url-http-data nil)
+ (defvar url-http-extra-headers nil)
+ (defvar url-http-method nil)
+ (defvar url-callback-function nil)
+ (defvar url-callback-arguments nil)
+ (defvar oauth--token-data nil))
+ (setq slack-buffer-emojify t
+ slack-prefer-current-team t)
+ :config
+ (slack-register-team
+ :name "uw-apv"
+ :default t
+ :client-id uw-apv-client-id
+ :client-secret uw-apv-client-secret
+ :token uw-apv-token
+ :subscribed-channels '(general)
+ :full-and-display-names t)
+ (slack-register-team
+ :name "watform"
+ :default nil
+ :client-id watform-client-id
+ :client-secret watform-client-secret
+ :token watform-token
+ :subscribed-channels '(general)
+ :full-and-display-names t);
+ :bind
+ (("C-c s s" . slack-start)
+ ("C-c s u" . slack-select-unread-rooms)
+ ("C-c s b" . slack-select-rooms)
+ ("C-c s t" . slack-change-current-team)
+ ("C-c s c" . slack-ws-close)
+ :map slack-mode-map
+ ("C-c e" . slack-message-edit)
+ ("C-c k" . slack-message-delete)
+ ("C-c C-k" . slack-channel-leave)
+ ("@" . slack-message-embed-mention)
+ ("#" . slack-message-embed-channel)));
+
+(use-package alert
+ :commands (alert)
+ :init
+ (setq alert-default-style 'notifier))
+#+end_src
+
* Email
#+begin_src emacs-lisp