Add +workspace/load-last-session
And fix the load last session button on dashboard.
This commit is contained in:
parent
cf55049a17
commit
1a068f82f1
3 changed files with 9 additions and 3 deletions
|
@ -530,7 +530,7 @@
|
||||||
:desc "Display tab bar" :n [tab] #'+workspace/display
|
:desc "Display tab bar" :n [tab] #'+workspace/display
|
||||||
:desc "New workspace" :n "n" #'+workspace/new
|
:desc "New workspace" :n "n" #'+workspace/new
|
||||||
:desc "Load workspace from file" :n "l" #'+workspace/load
|
:desc "Load workspace from file" :n "l" #'+workspace/load
|
||||||
:desc "Load last session" :n "L" #'+workspace/load-session
|
:desc "Load a past session" :n "L" #'+workspace/load-session
|
||||||
:desc "Save workspace to file" :n "s" #'+workspace/save
|
:desc "Save workspace to file" :n "s" #'+workspace/save
|
||||||
:desc "Autosave current session" :n "S" #'+workspace/save-session
|
:desc "Autosave current session" :n "S" #'+workspace/save-session
|
||||||
:desc "Switch workspace" :n "." #'+workspace/switch-to
|
:desc "Switch workspace" :n "." #'+workspace/switch-to
|
||||||
|
@ -538,7 +538,7 @@
|
||||||
:desc "Delete session" :n "X" #'+workspace/kill-session
|
:desc "Delete session" :n "X" #'+workspace/kill-session
|
||||||
:desc "Delete this workspace" :n "d" #'+workspace/delete
|
:desc "Delete this workspace" :n "d" #'+workspace/delete
|
||||||
:desc "Rename workspace" :n "r" #'+workspace/rename
|
:desc "Rename workspace" :n "r" #'+workspace/rename
|
||||||
:desc "Restore last session" :n "R" (λ! (+workspace/load-session))
|
:desc "Restore last session" :n "R" #'+workspace/load-last-session
|
||||||
:desc "Next workspace" :n "]" #'+workspace/switch-right
|
:desc "Next workspace" :n "]" #'+workspace/switch-right
|
||||||
:desc "Previous workspace" :n "[" #'+workspace/switch-left
|
:desc "Previous workspace" :n "[" #'+workspace/switch-left
|
||||||
:desc "Switch to 1st workspace" :n "1" (λ! (+workspace/switch-to 0))
|
:desc "Switch to 1st workspace" :n "1" (λ! (+workspace/switch-to 0))
|
||||||
|
|
|
@ -248,6 +248,12 @@ session."
|
||||||
(+workspace-message (format "'%s' workspace loaded" name) 'success))
|
(+workspace-message (format "'%s' workspace loaded" name) 'success))
|
||||||
'(error (+workspace-error (cadr ex) t))))
|
'(error (+workspace-error (cadr ex) t))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +workspace/load-last-session ()
|
||||||
|
"Restore last session and switch to it."
|
||||||
|
(interactive)
|
||||||
|
(+workspace/load-session))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +workspace/save-session (&optional name)
|
(defun +workspace/save-session (&optional name)
|
||||||
"Save the current session. If called with C-u, prompt you for the name to save
|
"Save the current session. If called with C-u, prompt you for the name to save
|
||||||
|
|
|
@ -46,7 +46,7 @@ Possible values:
|
||||||
(file-exists-p (expand-file-name persp-auto-save-fname
|
(file-exists-p (expand-file-name persp-auto-save-fname
|
||||||
persp-save-dir)))
|
persp-save-dir)))
|
||||||
:face (:inherit (font-lock-keyword-face bold))
|
:face (:inherit (font-lock-keyword-face bold))
|
||||||
:action +workspace/load-session)
|
:action +workspace/load-last-session)
|
||||||
("See agenda for this week"
|
("See agenda for this week"
|
||||||
:icon (all-the-icons-octicon "calendar" :face 'font-lock-keyword-face)
|
:icon (all-the-icons-octicon "calendar" :face 'font-lock-keyword-face)
|
||||||
:when (fboundp 'org-agenda-list)
|
:when (fboundp 'org-agenda-list)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue