From 2286a6404fe85fcc5a91da22090e14b31407694d Mon Sep 17 00:00:00 2001 From: Benjamin Andresen Date: Sun, 6 Aug 2017 12:54:09 +0200 Subject: [PATCH 1/2] Add: app/irc: make truncate nick character customizable --- modules/app/irc/config.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/app/irc/config.el b/modules/app/irc/config.el index c1704c314..db4c039a5 100644 --- a/modules/app/irc/config.el +++ b/modules/app/irc/config.el @@ -3,6 +3,9 @@ (defvar +irc-left-padding 13 "TODO") +(defvar +irc-truncate-nick-char ?… + "Character to displayed when nick > `+irc-left-padding' in length.") + (defvar +irc-scroll-to-bottom-on-commands '(self-insert-command yank hilit-yank) "If these commands are called pre prompt the buffer will scroll to `point-max'.") @@ -93,7 +96,7 @@ playback.") :nick))) (when (> (length nick) +irc-left-padding) (compose-region (+ beg +irc-left-padding -1) end - ?…))))) + +irc-truncate-nick-char))))) (add-hook 'lui-pre-output-hook #'+irc*circe-truncate-nicks) (defun +irc|circe-message-option-bot (nick &rest ignored) From 00180310df78e210c6ba4de185dd703f5f78ed16 Mon Sep 17 00:00:00 2001 From: Benjamin Andresen Date: Sun, 6 Aug 2017 15:44:27 +0200 Subject: [PATCH 2/2] Add: app/irc: (=irc) if irc workspace exists switch to that don't connect to the networks again --- modules/app/irc/autoload/irc.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/app/irc/autoload/irc.el b/modules/app/irc/autoload/irc.el index 388410492..1e1f01210 100644 --- a/modules/app/irc/autoload/irc.el +++ b/modules/app/irc/autoload/irc.el @@ -20,9 +20,11 @@ If INHIBIT-WORKSPACE (the universal argument) is non-nil, don't spawn a new workspace for it." (interactive "P") - (and (+irc-setup-wconf inhibit-workspace) - (cl-loop for network in circe-network-options - collect (circe (car network))))) + (if (+workspace-exists-p +irc--workspace-name) + (+workspace-switch +irc--workspace-name) + (and (+irc-setup-wconf inhibit-workspace) + (cl-loop for network in circe-network-options + collect (circe (car network)))))) ;;;###autoload (defun +irc/connect (&optional inhibit-workspace)