Skip to content

Commit

Permalink
Switch to use-package' for ublt-communication'
Browse files Browse the repository at this point in the history
  • Loading branch information
ubolonton committed Apr 24, 2019
1 parent 197eb04 commit 8d83fda
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 46 deletions.
85 changes: 41 additions & 44 deletions config/ublt-communication.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@


;;; Twitter
(ublt/set-up 'twittering-mode
(use-package twittering-mode
:custom ((twittering-status-format
"%i %s%RT{%FACE[ublt-twitter-meta-face]{ ♽ }%FACE[ublt-twitter-meta-retweet]{%s}}%FACE[ublt-twitter-meta-reply]{%r}%FACE[ublt-twitter-meta-face]{ %@}%FACE[ublt-twitter-meta-location]{ from %f%L}\n %t")
(twittering-url-show-status nil)
(twittering-timer-interval 600)
(twittering-use-master-password t)
(twittering-use-icon-storage t)
(twittering-display-remaining t)
(twittering-use-native-retweet t)
(twittering-number-of-tweets-on-retrieval 100))
:config
(twittering-icon-mode +1)

(defgroup ubolonton nil ""
Expand All @@ -21,59 +31,46 @@
'((t (:inherit ublt-twitter-meta-face)))
"")

(setq twittering-status-format
"%i %s%RT{%FACE[ublt-twitter-meta-face]{ ♽ }%FACE[ublt-twitter-meta-retweet]{%s}}%FACE[ublt-twitter-meta-reply]{%r}%FACE[ublt-twitter-meta-face]{ %@}%FACE[ublt-twitter-meta-location]{ from %f%L}\n %t"
;; "%i %s %FACE[ublt-twitter-meta-face]{%@ from %f%L%r}%FACE[shadow]{%R}\n\t%t"
;; "%i %s: %t\n\t%FACE[ublt-twitter-meta-face]{%@ from %f%L%r%R}"
twittering-url-show-status nil
twittering-timer-interval 600
twittering-use-master-password t
twittering-use-icon-storage t
twittering-display-remaining t
twittering-use-native-retweet t
twittering-number-of-tweets-on-retrieval 100
)
(add-hook 'twittering-mode-hook (ublt/on-fn 'hl-line-mode))
(add-hook 'twittering-mode-hook (ublt/on-fn 'adaptive-wrap-prefix-mode))
(add-hook 'twittering-edit-mode-hook (ublt/off-fn 'auto-fill-mode))
(add-hook 'twittering-edit-mode-hook (ublt/on-fn 'visual-line-mode))
)
(add-hook 'twittering-edit-mode-hook (ublt/on-fn 'visual-line-mode)))

;;; ERC

(ublt/set-up 'erc
(setq erc-autojoin-channels-alist
'(("freenode.net" "#emacs" "#conkeror" "#clojure" "#concatenative" "#flink"))
(use-package erc
:straight nil
:custom ((erc-autojoin-channels-alist
'(("freenode.net" "#emacs" "#conkeror" "#clojure" "#concatenative" "#flink")))

erc-server "irc.freenode.net"
erc-port 6667
erc-nick "ubolonton"
erc-try-new-nick-p nil
(erc-server "irc.freenode.net")
(erc-port 6667)
(erc-nick "ubolonton")
(erc-try-new-nick-p nil)

erc-hide-list '("JOIN" "PART" "QUIT" "NICK")
erc-track-exclude-types '("JOIN" "NICK" "PART" "QUIT" "MODE"
"324" "329" "332" "333" "353" "477")
(erc-hide-list '("JOIN" "PART" "QUIT" "NICK"))
(erc-track-exclude-types '("JOIN" "NICK" "PART" "QUIT" "MODE"
"324" "329" "332" "333" "353" "477"))

erc-auto-query 'buffer
(erc-auto-query 'buffer)

erc-log-channels-directory "~/erc_logs/"
erc-save-buffer-on-part t
erc-save-queries-on-quit t
erc-log-write-after-send t
erc-log-write-after-insert t)
(defun ublt/erc ()
(interactive)
(erc :server "irc.freenode.net" :port 6667 :nick "ubolonton"
:password (read-passwd "Password on freenode: "))))
(erc-log-channels-directory "~/erc_logs/")
(erc-save-buffer-on-part t)
(erc-save-queries-on-quit t)
(erc-log-write-after-send t)
(erc-log-write-after-insert t))
:config (defun ublt/erc ()
(interactive)
(erc :server "irc.freenode.net" :port 6667 :nick "ubolonton"
:password (read-passwd "Password on freenode: "))))

;;; scpaste
(ublt/set-up 'scpaste
(setq scpaste-scp-destination "[email protected]:/home/ubolonton/paste"
scpaste-http-destination "https://ubolonton.org/paste"
scpaste-footer (concat "<p style='font-size: 12pt;'>Generated by "
user-full-name
" using <a href='https://p.hagelb.org'>scpaste</a> at %s. "
(cadr (current-time-zone)) ". (<a href='%s'>original</a>)</p>")))

;;; Publish highlighted code fragments.
(use-package scpaste
:custom ((scpaste-scp-destination "[email protected]:/home/ubolonton/paste")
(scpaste-http-destination "https://ubolonton.org/paste")
(scpaste-footer (concat "<p style='font-size: 12pt;'>Generated by "
user-full-name
" using <a href='https://p.hagelb.org'>scpaste</a> at %s. "
(cadr (current-time-zone)) ". (<a href='%s'>original</a>)</p>"))))

(provide 'ublt-communication)
3 changes: 1 addition & 2 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
yasnippet
yasnippet-snippets
textmate undo-tree whole-line-or-region
avy twittering-mode keyfreq
avy keyfreq
ag
expand-region
popwin ; make unimportant windows transient
Expand All @@ -29,7 +29,6 @@
projectile ; Project management
emms ; Music
paredit ; Structural editing with ()[]{}
scpaste ; Publish highlighted code fragments
exec-path-from-shell ; Uhm, f*ck shell
pabbrev ; TODO: Find better alternative
;; Vim emulation
Expand Down

0 comments on commit 8d83fda

Please sign in to comment.