From 67dabb3f4bc5cca24d5bb75f5bab42b5ee68a9a0 Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Fri, 5 Nov 2021 22:17:11 +0300 Subject: [PATCH] feat(emacs): add pomm --- .emacs.d/init.el | 18 ++++++++++++++---- Emacs.org | 26 +++++++++++++++++++++----- bin/polybar/pomm.sh | 6 ++++++ 3 files changed, 41 insertions(+), 9 deletions(-) create mode 100755 bin/polybar/pomm.sh diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 5e17e82..a50a45f 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -182,6 +182,7 @@ pass calendar dired + ivy debug guix calc @@ -957,9 +958,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." (use-package emojify :straight t - :if (and (display-graphic-p) (not (or my/lowpower my/is-termux))) - :disabled - :hook (after-init . global-emojify-mode)) + :if (and (display-graphic-p) (not (or my/lowpower my/is-termux)))) (use-package ligature :straight (:host github :repo "mickeynp/ligature.el") @@ -3860,7 +3859,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." :straight t :commands (prodigy) :init - (my-leader-def "ap" 'prodigy) + (my-leader-def "aP" 'prodigy) :config (when (not (boundp 'my/docker-directories)) (load (concat user-emacs-directory "prodigy-config"))) @@ -3922,8 +3921,19 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." :init (my-leader-def "ag" 'guix)) +(use-package pomm + :straight (:repo "SqrtMinusOne/pomm.el" :host github) + :commands (pomm) + :init + (my-leader-def "ap" #'pomm) + :config + (setq alert-default-style 'libnotify) + (add-hook 'pomm-on-tick-hook 'pomm-update-mode-line-string) + (add-hook 'pomm-on-status-changed-hook 'pomm-update-mode-line-string)) + (use-package pomidor :straight t + :disabled :commands (pomidor) :init (my-leader-def "aP" #'pomidor) diff --git a/Emacs.org b/Emacs.org index 702c070..77a3c67 100644 --- a/Emacs.org +++ b/Emacs.org @@ -620,6 +620,7 @@ Basic evil configuration. pass calendar dired + ivy debug guix calc @@ -1840,9 +1841,7 @@ References: #+begin_src emacs-lisp (use-package emojify :straight t - :if (and (display-graphic-p) (not (or my/lowpower my/is-termux))) - :disabled - :hook (after-init . global-emojify-mode)) + :if (and (display-graphic-p) (not (or my/lowpower my/is-termux)))) #+end_src *** Ligatures Ligature setup for the JetBrainsMono font. @@ -5792,7 +5791,7 @@ The actual service definitions are in the =~/.emacs.d/prodigy.org=, which tangle :straight t :commands (prodigy) :init - (my-leader-def "ap" 'prodigy) + (my-leader-def "aP" 'prodigy) :config (when (not (boundp 'my/docker-directories)) (load (concat user-emacs-directory "prodigy-config"))) @@ -5874,12 +5873,29 @@ An Emacs package to help managing GNU Guix. (my-leader-def "ag" 'guix)) #+end_src ** Productivity -*** Pomidor +*** pomm +My package for doing Pomodoro timer. + +#+begin_src emacs-lisp +(use-package pomm + :straight (:repo "SqrtMinusOne/pomm.el" :host github) + :commands (pomm) + :init + (my-leader-def "ap" #'pomm) + :config + (setq alert-default-style 'libnotify) + (add-hook 'pomm-on-tick-hook 'pomm-update-mode-line-string) + (add-hook 'pomm-on-status-changed-hook 'pomm-update-mode-line-string)) +#+end_src +*** OFF (OFF) Pomidor A simple pomodoro technique timer. +Disabled it in favour of my own package. + #+begin_src emacs-lisp (use-package pomidor :straight t + :disabled :commands (pomidor) :init (my-leader-def "aP" #'pomidor) diff --git a/bin/polybar/pomm.sh b/bin/polybar/pomm.sh new file mode 100755 index 0000000..b3a8dce --- /dev/null +++ b/bin/polybar/pomm.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +# [[file:../../Desktop.org::*pomm][pomm:1]] +if ps -e | grep emacs >> /dev/null; then + emacsclient --eval "(if (boundp 'pomm-current-mode-line-string) pomm-current-mode-line-string \"\") " | xargs echo -e +fi +# pomm:1 ends here