|
|
|
|
@@ -33,6 +33,7 @@ This function should only modify configuration layer settings."
|
|
|
|
|
;; List of configuration layers to load.
|
|
|
|
|
dotspacemacs-configuration-layers
|
|
|
|
|
'(swift
|
|
|
|
|
shell
|
|
|
|
|
yaml
|
|
|
|
|
themes-megapack
|
|
|
|
|
nginx
|
|
|
|
|
@@ -901,6 +902,120 @@ before packages are loaded."
|
|
|
|
|
|
|
|
|
|
(my/set-clipboard-integration)
|
|
|
|
|
|
|
|
|
|
;; set gls as ls on mac/unix, keep ls on linux
|
|
|
|
|
(cond
|
|
|
|
|
;; macOS
|
|
|
|
|
((eq system-type 'darwin)
|
|
|
|
|
(when (executable-find "gls")
|
|
|
|
|
(setq insert-directory-program (executable-find "gls"))))
|
|
|
|
|
|
|
|
|
|
;; Linux (GNU ls is the default `ls`)
|
|
|
|
|
((or (eq system-type 'gnu/linux)
|
|
|
|
|
(eq system-type 'linux))
|
|
|
|
|
(setq insert-directory-program (executable-find "ls")))
|
|
|
|
|
|
|
|
|
|
;; Solaris / other Unixes
|
|
|
|
|
((or (eq system-type 'usg-unix-v)
|
|
|
|
|
(eq system-type 'berkeley-unix)
|
|
|
|
|
(eq system-type 'unix))
|
|
|
|
|
(if (executable-find "gls")
|
|
|
|
|
(setq insert-directory-program (executable-find "gls"))
|
|
|
|
|
(setq insert-directory-program (executable-find "ls")))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; org config based on https://doc.norang.ca/org-mode.html
|
|
|
|
|
;; punching in/out and other mods
|
|
|
|
|
|
|
|
|
|
(global-set-key (kbd "<f9> i") 'bh/punch-in)
|
|
|
|
|
(global-set-key (kbd "<f9> o") 'bh/punch-out)
|
|
|
|
|
(global-set-key (kbd "<f11>") 'org-clock-goto)
|
|
|
|
|
|
|
|
|
|
;; Resume clocking task when emacs is restarted
|
|
|
|
|
(org-clock-persistence-insinuate)
|
|
|
|
|
;; Save the running clock and all clock history when exiting Emacs, load it on startup
|
|
|
|
|
(setq org-clock-persist t)
|
|
|
|
|
;; Include current clocking task in clock reports
|
|
|
|
|
(setq org-clock-report-include-clocking-task t)
|
|
|
|
|
|
|
|
|
|
(setq bh/keep-clock-running nil)
|
|
|
|
|
(defvar bh/organization-task-id "4d2f34b0-92dd-11f0-9319-bdd95275e5c9")
|
|
|
|
|
|
|
|
|
|
(defun bh/find-project-task ()
|
|
|
|
|
"Move point to the parent (project) task if any"
|
|
|
|
|
(save-restriction
|
|
|
|
|
(widen)
|
|
|
|
|
(let ((parent-task (save-excursion (org-back-to-heading 'invisible-ok) (point))))
|
|
|
|
|
(while (org-up-heading-safe)
|
|
|
|
|
(when (member (nth 2 (org-heading-components)) org-todo-keywords-1)
|
|
|
|
|
(setq parent-task (point))))
|
|
|
|
|
(goto-char parent-task)
|
|
|
|
|
parent-task)))
|
|
|
|
|
|
|
|
|
|
(defun bh/punch-in (arg)
|
|
|
|
|
"Start continuous clocking and set the default task to the
|
|
|
|
|
selected task. If no task is selected set the Organization task
|
|
|
|
|
as the default task."
|
|
|
|
|
(interactive "p")
|
|
|
|
|
(setq bh/keep-clock-running t)
|
|
|
|
|
(if (equal major-mode 'org-agenda-mode)
|
|
|
|
|
;;
|
|
|
|
|
;; We're in the agenda
|
|
|
|
|
;;
|
|
|
|
|
(let* ((marker (org-get-at-bol 'org-hd-marker))
|
|
|
|
|
(tags (org-with-point-at marker (org-get-tags-at))))
|
|
|
|
|
(if (and (eq arg 4) tags)
|
|
|
|
|
(org-agenda-clock-in '(16))
|
|
|
|
|
(bh/clock-in-organization-task-as-default)))
|
|
|
|
|
;;
|
|
|
|
|
;; We are not in the agenda
|
|
|
|
|
;;
|
|
|
|
|
(save-restriction
|
|
|
|
|
(widen)
|
|
|
|
|
; Find the tags on the current task
|
|
|
|
|
(if (and (equal major-mode 'org-mode) (not (org-before-first-heading-p)) (eq arg 4))
|
|
|
|
|
(org-clock-in '(16))
|
|
|
|
|
(bh/clock-in-organization-task-as-default)))))
|
|
|
|
|
|
|
|
|
|
(defun bh/punch-out ()
|
|
|
|
|
(interactive)
|
|
|
|
|
(setq bh/keep-clock-running nil)
|
|
|
|
|
(when (org-clock-is-active)
|
|
|
|
|
(org-clock-out))
|
|
|
|
|
(org-agenda-remove-restriction-lock))
|
|
|
|
|
|
|
|
|
|
(defun bh/clock-in-default-task ()
|
|
|
|
|
(save-excursion
|
|
|
|
|
(org-with-point-at org-clock-default-task
|
|
|
|
|
(org-clock-in))))
|
|
|
|
|
|
|
|
|
|
(defun bh/clock-in-parent-task ()
|
|
|
|
|
"Move point to the parent (project) task if any and clock in"
|
|
|
|
|
(let ((parent-task))
|
|
|
|
|
(save-excursion
|
|
|
|
|
(save-restriction
|
|
|
|
|
(widen)
|
|
|
|
|
(while (and (not parent-task) (org-up-heading-safe))
|
|
|
|
|
(when (member (nth 2 (org-heading-components)) org-todo-keywords-1)
|
|
|
|
|
(setq parent-task (point))))
|
|
|
|
|
(if parent-task
|
|
|
|
|
(org-with-point-at parent-task
|
|
|
|
|
(org-clock-in))
|
|
|
|
|
(when bh/keep-clock-running
|
|
|
|
|
(bh/clock-in-default-task)))))))
|
|
|
|
|
|
|
|
|
|
(defun bh/clock-in-organization-task-as-default ()
|
|
|
|
|
(interactive)
|
|
|
|
|
(org-with-point-at (org-id-find bh/organization-task-id 'marker)
|
|
|
|
|
(org-clock-in '(16))))
|
|
|
|
|
|
|
|
|
|
(defun bh/clock-out-maybe ()
|
|
|
|
|
(when (and bh/keep-clock-running
|
|
|
|
|
(not org-clock-clocking-in)
|
|
|
|
|
(marker-buffer org-clock-default-task)
|
|
|
|
|
(not org-clock-resolving-clocks-due-to-idleness))
|
|
|
|
|
(bh/clock-in-parent-task)))
|
|
|
|
|
|
|
|
|
|
(add-hook 'org-clock-out-hook 'bh/clock-out-maybe 'append)
|
|
|
|
|
|
|
|
|
|
) ;; user-config
|
|
|
|
|
|
|
|
|
|
@@ -939,66 +1054,67 @@ This function is called at the very end of Spacemacs initialization."
|
|
|
|
|
dap-mode darkmine-theme darkokai-theme darktooth-theme deferred
|
|
|
|
|
define-word devdocs diminish dired-quick-sort disable-mouse django-theme
|
|
|
|
|
docker dockerfile-mode doom-themes dotenv-mode dracula-theme drag-stuff
|
|
|
|
|
dumb-jump edit-indirect editorconfig ef-themes elisp-def elisp-demos
|
|
|
|
|
elisp-slime-nav emacsql emmet-mode emojify emr epc espresso-theme
|
|
|
|
|
eval-sexp-fu evil-anzu evil-args evil-cleverparens evil-collection
|
|
|
|
|
evil-easymotion evil-escape evil-evilified-state evil-exchange
|
|
|
|
|
evil-goggles evil-iedit-state evil-indent-plus evil-lion evil-lisp-state
|
|
|
|
|
evil-matchit evil-mc evil-nerd-commenter evil-numbers evil-org
|
|
|
|
|
evil-surround evil-textobj-line evil-tutor evil-unimpaired
|
|
|
|
|
evil-visual-mark-mode evil-visualstar exotica-theme expand-region
|
|
|
|
|
eyebrowse eziam-themes fancy-battery farmhouse-themes fish-mode
|
|
|
|
|
flatland-theme flatui-theme flx-ido flycheck-bashate flycheck-elsa
|
|
|
|
|
flycheck-package flycheck-pos-tip forge frame-local gandalf-theme gh-md
|
|
|
|
|
ghub git-link git-messenger git-modes git-timemachine gitignore-templates
|
|
|
|
|
gntp gnuplot golden-ratio google-translate gotham-theme grandshell-theme
|
|
|
|
|
gruber-darker-theme gruvbox-theme haml-mode hc-zenburn-theme hcl-mode
|
|
|
|
|
helm-ag helm-c-yasnippet helm-comint helm-company helm-css-scss
|
|
|
|
|
helm-descbinds helm-git-grep helm-ls-git helm-lsp helm-make
|
|
|
|
|
helm-mode-manager helm-org helm-org-rifle helm-projectile helm-purpose
|
|
|
|
|
helm-pydoc helm-swoop helm-themes helm-xref hemisu-theme heroku-theme
|
|
|
|
|
hide-comnt hierarchy highlight-indentation highlight-numbers
|
|
|
|
|
highlight-parentheses hl-todo holy-mode htmlize hungry-delete hybrid-mode
|
|
|
|
|
impatient-mode importmagic indent-guide info+ inkpot-theme insert-shebang
|
|
|
|
|
inspector ir-black-theme jazz-theme jbeans-theme js-doc js2-mode
|
|
|
|
|
js2-refactor json-mode json-navigator json-reformat json-snatcher
|
|
|
|
|
kaolin-themes light-soap-theme link-hint live-py-mode livid-mode
|
|
|
|
|
load-env-vars log4e lorem-ipsum lsp-docker lsp-mode lsp-origami
|
|
|
|
|
lsp-pyright lsp-treemacs lsp-ui lush-theme macrostep madhat2r-theme magit
|
|
|
|
|
magit-section markdown-mode markdown-toc material-theme minimal-theme
|
|
|
|
|
modus-themes moe-theme molokai-theme monochrome-theme monokai-theme
|
|
|
|
|
multi-line multiple-cursors mustang-theme nameless naquadah-theme
|
|
|
|
|
dumb-jump eat edit-indirect editorconfig ef-themes elisp-def elisp-demos
|
|
|
|
|
elisp-slime-nav emacsql emmet-mode emojify emr epc esh-help
|
|
|
|
|
eshell-prompt-extras eshell-z espresso-theme eval-sexp-fu evil-anzu
|
|
|
|
|
evil-args evil-cleverparens evil-collection evil-easymotion evil-escape
|
|
|
|
|
evil-evilified-state evil-exchange evil-goggles evil-iedit-state
|
|
|
|
|
evil-indent-plus evil-lion evil-lisp-state evil-matchit evil-mc
|
|
|
|
|
evil-nerd-commenter evil-numbers evil-org evil-surround evil-textobj-line
|
|
|
|
|
evil-tutor evil-unimpaired evil-visual-mark-mode evil-visualstar
|
|
|
|
|
exotica-theme expand-region eyebrowse eziam-themes fancy-battery
|
|
|
|
|
farmhouse-themes fish-mode flatland-theme flatui-theme flx-ido
|
|
|
|
|
flycheck-bashate flycheck-elsa flycheck-package flycheck-pos-tip forge
|
|
|
|
|
frame-local gandalf-theme gh-md ghub git-link git-messenger git-modes
|
|
|
|
|
git-timemachine gitignore-templates gntp gnuplot golden-ratio
|
|
|
|
|
google-translate gotham-theme grandshell-theme gruber-darker-theme
|
|
|
|
|
gruvbox-theme haml-mode hc-zenburn-theme hcl-mode helm-ag
|
|
|
|
|
helm-c-yasnippet helm-comint helm-company helm-css-scss helm-descbinds
|
|
|
|
|
helm-git-grep helm-ls-git helm-lsp helm-make helm-mode-manager helm-org
|
|
|
|
|
helm-org-rifle helm-projectile helm-purpose helm-pydoc helm-swoop
|
|
|
|
|
helm-themes helm-xref hemisu-theme heroku-theme hide-comnt hierarchy
|
|
|
|
|
highlight-indentation highlight-numbers highlight-parentheses hl-todo
|
|
|
|
|
holy-mode htmlize hungry-delete hybrid-mode impatient-mode importmagic
|
|
|
|
|
indent-guide info+ inkpot-theme insert-shebang inspector ir-black-theme
|
|
|
|
|
jazz-theme jbeans-theme js-doc js2-mode js2-refactor json-mode
|
|
|
|
|
json-navigator json-reformat json-snatcher kaolin-themes light-soap-theme
|
|
|
|
|
link-hint live-py-mode livid-mode load-env-vars log4e lorem-ipsum
|
|
|
|
|
lsp-docker lsp-mode lsp-origami lsp-pyright lsp-treemacs lsp-ui
|
|
|
|
|
lush-theme macrostep madhat2r-theme magit magit-section markdown-mode
|
|
|
|
|
markdown-toc material-theme minimal-theme modus-themes moe-theme
|
|
|
|
|
molokai-theme monochrome-theme monokai-theme multi-line multi-term
|
|
|
|
|
multi-vterm multiple-cursors mustang-theme nameless naquadah-theme
|
|
|
|
|
nginx-mode noctilux-theme nodejs-repl nose npm-mode obsidian-theme
|
|
|
|
|
occidental-theme oldlace-theme omtose-phellack-themes open-junk-file
|
|
|
|
|
org-alert org-caldav org-category-capture org-cliplink org-contrib
|
|
|
|
|
org-download org-jira org-mac-link org-mime org-pomodoro org-present
|
|
|
|
|
org-project-capture org-projectile org-rich-yank org-superstar
|
|
|
|
|
organic-green-theme orgit orgit-forge origami overseer ox-jira
|
|
|
|
|
ox-twbs pandoc-mode paradox password-generator pcre2el
|
|
|
|
|
phoenix-dark-mono-theme phoenix-dark-pink-theme pip-requirements pipenv
|
|
|
|
|
pippel planet-theme poetry popwin pos-tip prettier-js professional-theme
|
|
|
|
|
pug-mode purple-haze-theme py-isort pydoc pyenv-mode pylookup pytest
|
|
|
|
|
pythonic pyvenv quickrun railscasts-theme rainbow-delimiters
|
|
|
|
|
rebecca-theme request restart-emacs reverse-theme sass-mode scss-mode
|
|
|
|
|
seti-theme shfmt simple-httpd skewer-mode slim-mode smeargle smyx-theme
|
|
|
|
|
organic-green-theme orgit orgit-forge origami overseer ox-jira ox-twbs
|
|
|
|
|
pandoc-mode paradox password-generator pcre2el phoenix-dark-mono-theme
|
|
|
|
|
phoenix-dark-pink-theme pip-requirements pipenv pippel planet-theme
|
|
|
|
|
poetry popwin pos-tip prettier-js professional-theme pug-mode
|
|
|
|
|
purple-haze-theme py-isort pydoc pyenv-mode pylookup pytest pythonic
|
|
|
|
|
pyvenv quickrun railscasts-theme rainbow-delimiters rebecca-theme request
|
|
|
|
|
restart-emacs reverse-theme sass-mode scss-mode seti-theme shell-pop
|
|
|
|
|
shfmt simple-httpd skewer-mode slim-mode smeargle smyx-theme
|
|
|
|
|
soft-charcoal-theme soft-morning-theme soft-stone-theme solarized-theme
|
|
|
|
|
soothe-theme space-doc spacegray-theme spaceline spacemacs-purpose-popwin
|
|
|
|
|
spacemacs-whitespace-cleanup sphinx-doc string-edit-at-point
|
|
|
|
|
string-inflection subatomic-theme subatomic256-theme sublime-themes
|
|
|
|
|
sunny-day-theme symbol-overlay symon tablist tagedit tango-2-theme
|
|
|
|
|
tango-plus-theme tangotango-theme tao-theme term-cursor tern
|
|
|
|
|
terraform-mode toc-org toml-mode toxi-theme transient treemacs-evil
|
|
|
|
|
tango-plus-theme tangotango-theme tao-theme term-cursor terminal-here
|
|
|
|
|
tern terraform-mode toc-org toml-mode toxi-theme transient treemacs-evil
|
|
|
|
|
treemacs-icons-dired treemacs-magit treemacs-persp treemacs-projectile
|
|
|
|
|
treepy twilight-anti-bright-theme twilight-bright-theme twilight-theme
|
|
|
|
|
ujelly-theme underwater-theme undo-fu undo-fu-session vi-tilde-fringe
|
|
|
|
|
vim-powerline volatile-highlights vundo web-beautify web-completion-data
|
|
|
|
|
web-mode which-key white-sand-theme winum with-editor writeroom-mode
|
|
|
|
|
ws-butler yaml yaml-mode yapfify yasnippet yasnippet-snippets
|
|
|
|
|
zen-and-art-theme zenburn-theme zonokai-emacs)))
|
|
|
|
|
vim-powerline volatile-highlights vterm vundo web-beautify
|
|
|
|
|
web-completion-data web-mode which-key white-sand-theme winum with-editor
|
|
|
|
|
writeroom-mode ws-butler yaml yaml-mode yapfify yasnippet
|
|
|
|
|
yasnippet-snippets zen-and-art-theme zenburn-theme zonokai-emacs)))
|
|
|
|
|
(custom-set-faces
|
|
|
|
|
;; custom-set-faces was added by Custom.
|
|
|
|
|
;; If you edit it by hand, you could mess it up, so be careful.
|
|
|
|
|
;; Your init file should contain only one such instance.
|
|
|
|
|
;; If there is more than one, they won't work right.
|
|
|
|
|
)
|
|
|
|
|
'(default ((t (:background nil)))))
|
|
|
|
|
)
|
|
|
|
|
|