Compare commits
2 Commits
cb680e1555
...
eedf8c51a2
Author | SHA1 | Date | |
---|---|---|---|
|
eedf8c51a2 | ||
|
83ab0080d7 |
87
.emacs.d/init-social.el
Normal file
87
.emacs.d/init-social.el
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
;; -*- mode: elisp -*-
|
||||||
|
|
||||||
|
;; setup basic defaults for social emacs config
|
||||||
|
;;;; Bootstrap's bootstraps
|
||||||
|
;;;;;; bootstrap's bootstraps
|
||||||
|
|
||||||
|
(package-initialize)
|
||||||
|
(require 'package)
|
||||||
|
(setq package-archives
|
||||||
|
'(("melpa" . "http://melpa.milkbox.net/packages/")
|
||||||
|
("gnu" . "http://elpa.gnu.org/packages/")
|
||||||
|
("elpy" . "http://jorgenschaefer.github.io/packages/")))
|
||||||
|
|
||||||
|
(unless (package-installed-p 'use-package)
|
||||||
|
(package-refresh-contents)
|
||||||
|
(package-install 'use-package))
|
||||||
|
|
||||||
|
(eval-when-compile
|
||||||
|
(require 'use-package))
|
||||||
|
|
||||||
|
;; load my files
|
||||||
|
(load-file "~/.emacs.d/src/keychain-environment.el")
|
||||||
|
(load-file "~/.emacs.d/jlj-social.el")
|
||||||
|
|
||||||
|
;; load keychain (if it exists)
|
||||||
|
(when (eq system-type 'gnu/linux)
|
||||||
|
(keychain-refresh-environment)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
(setq inhibit-splash-screen t) ; Disable the splash screen
|
||||||
|
;; (when (version<= "26.0.50" emacs-version )
|
||||||
|
;; (global-display-line-numbers-mode)); show line numbers; use this instead of linum if you can
|
||||||
|
|
||||||
|
;; (global-visual-line-mode t) ; turn on word-wrap globally
|
||||||
|
(menu-bar-mode -1) ; disable visual menu on emacs
|
||||||
|
(tool-bar-mode -1) ; disable toolbar
|
||||||
|
|
||||||
|
(setq case-fold-search t) ; ignore case when searching
|
||||||
|
(fset 'yes-or-no-p 'y-or-n-p) ; make it easier to answer qs.
|
||||||
|
(set-frame-font "Consolas 12") ; set default font
|
||||||
|
(transient-mark-mode 1) ; Enable transient mark mode (highlights)
|
||||||
|
(load-theme 'manoj-dark) ; loads my favorite default theme
|
||||||
|
(global-hl-line-mode t) ; highlights the line you're on
|
||||||
|
|
||||||
|
(setq indent-tabs-mode nil) ; always use spaces when indenting
|
||||||
|
(setq require-final-newline t)
|
||||||
|
(setq backup-directory-alist `(("." . "~/Nextcloud/Documents/org/.saves")))
|
||||||
|
(electric-pair-mode 1) ; create paired brackets.
|
||||||
|
|
||||||
|
;; lets you find all instance of string @ point with C-;
|
||||||
|
(use-package iedit
|
||||||
|
:ensure t)
|
||||||
|
|
||||||
|
(when (eq system-type 'darwin)
|
||||||
|
(setq mac-command-modifier 'meta)
|
||||||
|
;; Make emacs use a different default than the OS
|
||||||
|
;; only really useful on work computers, but there we go.
|
||||||
|
(setq browse-url-browser-function #'browse-url-generic
|
||||||
|
browse-url-generic-program "open"
|
||||||
|
browse-url-generic-args '("-a" "Firefox")))
|
||||||
|
|
||||||
|
(if (eq system-type 'windows-nt)
|
||||||
|
(message "i am windows and suck") ; deal with mac command key problems
|
||||||
|
(exec-path-from-shell-copy-env "PATH"))
|
||||||
|
|
||||||
|
(setq user-init-file "~/.emacs.d/init-mail.el")
|
||||||
|
|
||||||
|
(defun find-user-init-file ()
|
||||||
|
"Edit the `user-init-file', in another window."
|
||||||
|
(interactive)
|
||||||
|
(find-file-other-window user-init-file))
|
||||||
|
(global-set-key (kbd "C-c J") 'find-user-init-file)
|
||||||
|
|
||||||
|
(custom-set-variables
|
||||||
|
;; custom-set-variables was added by Custom.
|
||||||
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
|
;; Your init file should contain only one such instance.
|
||||||
|
;; If there is more than one, they won't work right.
|
||||||
|
'(package-selected-packages
|
||||||
|
'(pinboard yaml-mode which-key web-mode virtualenvwrapper use-package twittering-mode try smex racer powershell poetry pipenv ox-reveal outline-magic org-pdfview org-bullets ob-restclient multiple-cursors magit lua-mode lsp-ui iedit helm flycheck-rust exec-path-from-shell eglot edit-indirect company-lsp ansible ace-window)))
|
||||||
|
(custom-set-faces
|
||||||
|
;; custom-set-faces was added by Custom.
|
||||||
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
|
;; Your init file should contain only one such instance.
|
||||||
|
;; If there is more than one, they won't work right.
|
||||||
|
)
|
@ -41,7 +41,7 @@
|
|||||||
'(epg-gpg-program "/usr/local/bin/gpg")
|
'(epg-gpg-program "/usr/local/bin/gpg")
|
||||||
'(global-hl-line-mode t)
|
'(global-hl-line-mode t)
|
||||||
'(package-selected-packages
|
'(package-selected-packages
|
||||||
(lsp poetry yasnippet company-lsp ob-restclient virtualenvwrapper flymake-python-pyflakes lsp-ui lsp-mode jedi znc yaml-mode which-key use-package twittering-mode try smex racer python-mode pylint py-autopep8 powershell pdf-tools outline-magic org2blog multiple-cursors magit helm flycheck-rust eyebrowse exec-path-from-shell emojify elpy ein doom-themes dockerfile-mode docker csharp-mode ansible anaconda-mode ace-window)))
|
'(pinboard yaml-mode which-key web-mode virtualenvwrapper use-package twittering-mode try smex racer powershell poetry pipenv ox-reveal outline-magic org-pdfview org-bullets ob-restclient multiple-cursors magit lua-mode lsp-ui iedit helm flycheck-rust exec-path-from-shell eglot edit-indirect company-lsp ansible ace-window)))
|
||||||
'(znc-servers
|
'(znc-servers
|
||||||
`(("bouncer.awful.club" 5000 t
|
`(("bouncer.awful.club" 5000 t
|
||||||
((freenode "blindidiotgod/freenode" ,znc-password)
|
((freenode "blindidiotgod/freenode" ,znc-password)
|
||||||
|
Binary file not shown.
@ -5,8 +5,61 @@
|
|||||||
;; - uncomment if you want to only use emacs to input/manage the gpg key
|
;; - uncomment if you want to only use emacs to input/manage the gpg key
|
||||||
;; - comment out if you want gpg to be handled through seahorse/gnome keyring.
|
;; - comment out if you want gpg to be handled through seahorse/gnome keyring.
|
||||||
|
|
||||||
;; (when (eq system-type 'darwin)
|
;; configure global auth constants
|
||||||
;; (setf epa-pinentry-mode 'loopback))
|
(require 'epa)
|
||||||
|
(when (eq system-type 'darwin)
|
||||||
|
(setf epa-pinentry-mode 'loopback))
|
||||||
|
(setq auth-sources '("~/.emacs.d/jlj-secrets.gpg"))
|
||||||
|
(setq auth-source-debug t)
|
||||||
|
(custom-set-variables '(epg-gpg-program "/usr/local/bin/gpg"))
|
||||||
|
|
||||||
|
;; configure social functions
|
||||||
|
;;;; pinboard.el
|
||||||
|
(defun lookup-pinboard-password (host)
|
||||||
|
"Lookup encrypted password given HOST."
|
||||||
|
(require 'auth-source)
|
||||||
|
(funcall (plist-get
|
||||||
|
(car (auth-source-search
|
||||||
|
:host host
|
||||||
|
:type 'netrc))
|
||||||
|
:secret)))
|
||||||
|
|
||||||
|
(setq pinboard-password(lookup-pinboard-password "api.pinboard.in"))
|
||||||
|
|
||||||
|
(use-package pinboard
|
||||||
|
:ensure t
|
||||||
|
:config
|
||||||
|
(progn
|
||||||
|
(setq pinboard-api-token pinboard-password)))
|
||||||
|
|
||||||
|
(require 'org)
|
||||||
|
|
||||||
|
(defun org-pinboard-store-link ()
|
||||||
|
"Store a link taken from a pinboard buffer."
|
||||||
|
(when (eq major-mode 'pinboard-mode)
|
||||||
|
(pinboard-with-current-pin pin
|
||||||
|
(org-store-link-props
|
||||||
|
:type "pinboard"
|
||||||
|
:link (alist-get 'href pin)
|
||||||
|
:description (alist-get 'description pin)))))
|
||||||
|
|
||||||
|
(org-link-set-parameters "pinboard"
|
||||||
|
:follow #'browse-url
|
||||||
|
:store #'org-pinboard-store-link)
|
||||||
|
|
||||||
|
;;;; twitter
|
||||||
|
;;;; the only thing that isn't pretty much stock is
|
||||||
|
;;;; - i rebound C-c C-o to open links, so it would mimic org-mode's layout.
|
||||||
|
(use-package twittering-mode
|
||||||
|
:ensure t
|
||||||
|
:config
|
||||||
|
(progn
|
||||||
|
(setq twittering-icon-mode t)
|
||||||
|
(setq twittering-reverse-mode t)
|
||||||
|
(setq twittering-enable-unread-status-notifier t)
|
||||||
|
(with-eval-after-load "twittering-mode" (define-key twittering-mode-map (kbd "C-c C-o") `twittering-view-user-page))))
|
||||||
|
|
||||||
|
;;;; irc
|
||||||
;; (use-package znc
|
;; (use-package znc
|
||||||
;; :ensure t
|
;; :ensure t
|
||||||
;; :config
|
;; :config
|
||||||
@ -14,21 +67,20 @@
|
|||||||
;; (custom-set-variables '(epg-gpg-program "/usr/local/bin/gpg"))
|
;; (custom-set-variables '(epg-gpg-program "/usr/local/bin/gpg"))
|
||||||
;; (setq auth-sources `("~/Documents/projects/agares/applicationConfiguration/.emacs/jlj-secrets.gpg"))
|
;; (setq auth-sources `("~/Documents/projects/agares/applicationConfiguration/.emacs/jlj-secrets.gpg"))
|
||||||
|
|
||||||
;; (require 'epa)
|
|
||||||
|
|
||||||
;; ;; handle annoying gpg shit.
|
;; handle annoying gpg shit.
|
||||||
;; (defun lookup-password (host user port)
|
(defun lookup-password (host user port)
|
||||||
;; "Lookup encrypted password given HOST, USER and PORT for service."
|
"Lookup encrypted password given HOST, USER and PORT for service."
|
||||||
;; (require 'auth-source)
|
(require 'auth-source)
|
||||||
;; (funcall (plist-get
|
(funcall (plist-get
|
||||||
;; (car (auth-source-search
|
(car (auth-source-search
|
||||||
;; :host host
|
:host host
|
||||||
;; :user user
|
:user user
|
||||||
;; :type 'netrc
|
:type 'netrc
|
||||||
;; :port port))
|
:port port))
|
||||||
;; :secret)))
|
:secret)))
|
||||||
|
|
||||||
;; (setq znc-password(lookup-password "bouncer.awful.club" "blindidiotgod/OFTC" 5000))
|
(setq znc-password(lookup-password "bouncer.awful.club" "blindidiotgod/OFTC" 5000))
|
||||||
|
|
||||||
;; ;; by default, erc alerts you on any activity. I only want to hear
|
;; ;; by default, erc alerts you on any activity. I only want to hear
|
||||||
;; ;; about mentions of nick or keyword
|
;; ;; about mentions of nick or keyword
|
||||||
@ -47,15 +99,3 @@
|
|||||||
;; (setq erc-hide-list '("PART" "QUIT" "JOIN"))
|
;; (setq erc-hide-list '("PART" "QUIT" "JOIN"))
|
||||||
;; (setq erc-join-buffer 'bury)))
|
;; (setq erc-join-buffer 'bury)))
|
||||||
|
|
||||||
|
|
||||||
;; the only thing that isn't pretty much stock is
|
|
||||||
;; - i rebound C-c C-o to open links, so it would mimic org-mode's layout.
|
|
||||||
|
|
||||||
(use-package twittering-mode
|
|
||||||
:ensure t
|
|
||||||
:config
|
|
||||||
(progn
|
|
||||||
(setq twittering-icon-mode t)
|
|
||||||
(setq twittering-reverse-mode t)
|
|
||||||
(setq twittering-enable-unread-status-notifier t)
|
|
||||||
(with-eval-after-load "twittering-mode" (define-key twittering-mode-map (kbd "C-c C-o") `twittering-view-user-page))))
|
|
||||||
|
Loading…
Reference in New Issue
Block a user