[tab-bar-helper] Small refinements
This commit is contained in:
parent
f7663559a1
commit
b94472f601
1 changed files with 26 additions and 19 deletions
|
@ -1,12 +1,11 @@
|
|||
;; -*- lexical-binding: t; -*-
|
||||
;;; tab-bar-helpers.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defun mmk2410/tab-bar-new-tab (name func)
|
||||
(when (eq nil tab-bar-mode)
|
||||
(tab-bar-mode))
|
||||
(tab-bar-new-tab)
|
||||
(tab-bar-rename-tab name)
|
||||
(funcall func)
|
||||
nil)
|
||||
(funcall func))
|
||||
|
||||
(defun mmk2410/tab-bar-tab-exists (name)
|
||||
(member name
|
||||
|
@ -24,34 +23,40 @@
|
|||
|
||||
(defun mmk2410/tab-bar-run-mail ()
|
||||
(interactive)
|
||||
(mmk2410/tab-bar-switch-or-create "Mail"
|
||||
#'(lambda ()
|
||||
(mu4e-context-switch :name "Private")
|
||||
(mu4e))))
|
||||
(mmk2410/tab-bar-switch-or-create
|
||||
"Mail"
|
||||
#'(lambda ()
|
||||
(mu4e-context-switch :name "Private")
|
||||
(mu4e))))
|
||||
|
||||
(defun mmk2410/tab-bar-run-irc ()
|
||||
(interactive)
|
||||
(mmk2410/tab-bar-switch-or-create "IRC"
|
||||
#'(lambda ()
|
||||
(mmk2410/erc-connect)
|
||||
(sit-for 1)
|
||||
(switch-to-buffer "Libera.Chat"))))
|
||||
(mmk2410/tab-bar-switch-or-create
|
||||
"IRC"
|
||||
#'(lambda ()
|
||||
(mmk2410/erc-connect)
|
||||
(sit-for 1)
|
||||
(switch-to-buffer "Libera.Chat"))))
|
||||
|
||||
(defun mmk2410/tab-bar-run-agenda ()
|
||||
(interactive)
|
||||
(mmk2410/tab-bar-switch-or-create "Agenda"
|
||||
#'(lambda ()
|
||||
(org-agenda nil "a"))))
|
||||
(mmk2410/tab-bar-switch-or-create
|
||||
"Agenda"
|
||||
#'(lambda ()
|
||||
(org-agenda nil "a"))))
|
||||
|
||||
(defun mmk2410/tab-bar-run-journal ()
|
||||
(interactive)
|
||||
(mmk2410/tab-bar-switch-or-create "Journal" #'org-journal-open-current-journal-file))
|
||||
(mmk2410/tab-bar-switch-or-create
|
||||
"Journal"
|
||||
#'org-journal-open-current-journal-file))
|
||||
|
||||
(defun mmk2410/tab-bar-run-projects ()
|
||||
(interactive)
|
||||
(mmk2410/tab-bar-switch-or-create "Projects"
|
||||
#'(lambda ()
|
||||
(find-file "~/org/work.projects.org"))))
|
||||
(mmk2410/tab-bar-switch-or-create
|
||||
"Projects"
|
||||
#'(lambda ()
|
||||
(find-file "~/org/work.projects.org"))))
|
||||
|
||||
(defhydra mmk2410/tab-bar (:color teal)
|
||||
"My tab-bar helpers"
|
||||
|
@ -65,3 +70,5 @@
|
|||
(global-set-key (kbd "C-c f") 'mmk2410/tab-bar/body)
|
||||
|
||||
(provide mmk2410/tab-bar-helpers)
|
||||
|
||||
;;; tab-bar-helpers.el ends here
|
||||
|
|
Loading…
Reference in a new issue