refactor(ibuffer): move workspace functions
This commit is contained in:
parent
9e79aa3446
commit
e9c088cf3b
2 changed files with 16 additions and 12 deletions
14
modules/emacs/ibuffer/autoload/workspaces.el
Normal file
14
modules/emacs/ibuffer/autoload/workspaces.el
Normal file
|
@ -0,0 +1,14 @@
|
|||
;;; emacs/ibuffer/autoload/workspaces.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :ui workspaces)
|
||||
|
||||
;;;###autoload
|
||||
(defun +ibuffer-workspace (workspace-name)
|
||||
"Open an ibuffer window for a workspace"
|
||||
(ibuffer nil (format "%s buffers" workspace-name)
|
||||
(list (cons 'workspace-buffers (+workspace-get workspace-name)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +ibuffer/open-for-current-workspace ()
|
||||
"Open an ibuffer window for the current workspace"
|
||||
(interactive)
|
||||
(+ibuffer-workspace (+workspace-current-name)))
|
|
@ -44,20 +44,10 @@
|
|||
"Filter for workspace buffers"
|
||||
(:reader (+workspace-get (read-string "workspace name: "))
|
||||
:description "workspace")
|
||||
(memq buf (+workspace-buffer-list qualifier)))
|
||||
|
||||
(defun +ibuffer-workspace (workspace-name)
|
||||
"Open an ibuffer window for a workspace"
|
||||
(ibuffer nil (format "%s buffers" workspace-name)
|
||||
(list (cons 'workspace-buffers (+workspace-get workspace-name)))))
|
||||
|
||||
(defun +ibuffer/open-for-current-workspace ()
|
||||
"Open an ibuffer window for the current workspace"
|
||||
(interactive)
|
||||
(+ibuffer-workspace (+workspace-current-name))))
|
||||
(memq buf (+workspace-buffer-list qualifier))))
|
||||
|
||||
(when (featurep! :completion ivy)
|
||||
(defadvice! +ibuffer-use-counsel-maybe-a (_file &optional _wildcards)
|
||||
(defadvice! +ibuffer--use-counsel-maybe-a (_file &optional _wildcards)
|
||||
"Use `counsel-find-file' instead of `find-file'."
|
||||
:override #'ibuffer-find-file
|
||||
(interactive
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue