refactor(wpcarro/emacs): Remove vterm-mgt.el's dep on dash.el
TIL (or remembered rather) `seq.el` exists Change-Id: Iec5c21aff7a76906cb24d03bf39bf03f94b67760 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6037 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
This commit is contained in:
parent
70a13db93b
commit
3ebd71dfa2
2 changed files with 22 additions and 24 deletions
|
@ -1,18 +1,19 @@
|
||||||
{ pkgs, depot, ... }:
|
{ pkgs, depot, ... }:
|
||||||
|
|
||||||
pkgs.callPackage
|
pkgs.emacsPackages.trivialBuild {
|
||||||
({ emacsPackages }:
|
|
||||||
emacsPackages.trivialBuild {
|
|
||||||
pname = "vterm-mgt";
|
pname = "vterm-mgt";
|
||||||
version = "1.0.0";
|
version = "1.0.0";
|
||||||
src = ./vterm-mgt.el;
|
src = ./vterm-mgt.el;
|
||||||
packageRequires =
|
packageRequires =
|
||||||
(with emacsPackages; [
|
(with pkgs.emacsPackages; [
|
||||||
dash
|
|
||||||
vterm
|
vterm
|
||||||
]) ++
|
]) ++
|
||||||
(with depot.users.wpcarro.emacs.pkgs; [
|
(with depot.users.wpcarro.emacs.pkgs; [
|
||||||
cycle
|
cycle
|
||||||
]);
|
]);
|
||||||
})
|
passthru.meta.ci.extraSteps.github = depot.tools.releases.filteredGitPush {
|
||||||
{ }
|
filter = ":/users/wpcarro/emacs/pkgs/vterm-mgt";
|
||||||
|
remote = "git@github.com:wpcarro/vterm-mgt.el.git";
|
||||||
|
ref = "refs/heads/canon";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -22,16 +22,17 @@
|
||||||
;; Dependencies
|
;; Dependencies
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(require 'dash)
|
|
||||||
(require 'cycle)
|
(require 'cycle)
|
||||||
(require 'vterm)
|
(require 'vterm)
|
||||||
|
(require 'seq)
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; Configuration
|
;; Configuration
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(defgroup vterm-mgt nil
|
(defgroup vterm-mgt nil
|
||||||
"Customization options for `vterm-mgt'.")
|
"Customization options for `vterm-mgt'."
|
||||||
|
:group 'vterm)
|
||||||
|
|
||||||
(defcustom vterm-mgt-scroll-on-focus nil
|
(defcustom vterm-mgt-scroll-on-focus nil
|
||||||
"When t, call `end-of-buffer' after focusing a vterm instance."
|
"When t, call `end-of-buffer' after focusing a vterm instance."
|
||||||
|
@ -124,9 +125,7 @@ If for whatever reason, the state of `vterm-mgt--instances' is corrupted and
|
||||||
restore the state."
|
restore the state."
|
||||||
(interactive)
|
(interactive)
|
||||||
(setq vterm-mgt--instances
|
(setq vterm-mgt--instances
|
||||||
(->> (buffer-list)
|
(cycle-from-list (seq-filter #'vterm-mgt--instance? (buffer-list)))))
|
||||||
(-filter #'vterm-mgt--instance?)
|
|
||||||
cycle-from-list)))
|
|
||||||
|
|
||||||
(defun vterm-mgt-select ()
|
(defun vterm-mgt-select ()
|
||||||
"Select a vterm instance by name from the list in `vterm-mgt--instances'."
|
"Select a vterm instance by name from the list in `vterm-mgt--instances'."
|
||||||
|
@ -134,9 +133,7 @@ If for whatever reason, the state of `vterm-mgt--instances' is corrupted and
|
||||||
(vterm-mgt-reconcile-state)
|
(vterm-mgt-reconcile-state)
|
||||||
(switch-to-buffer
|
(switch-to-buffer
|
||||||
(completing-read "Switch to vterm: "
|
(completing-read "Switch to vterm: "
|
||||||
(->> vterm-mgt--instances
|
(seq-map #'buffer-name (cycle-to-list vterm-mgt--instances)))))
|
||||||
cycle-to-list
|
|
||||||
(-map #'buffer-name)))))
|
|
||||||
|
|
||||||
(provide 'vterm-mgt)
|
(provide 'vterm-mgt)
|
||||||
;;; vterm-mgt.el ends here
|
;;; vterm-mgt.el ends here
|
||||||
|
|
Loading…
Reference in a new issue