summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
Diffstat (limited to 'home')
-rw-r--r--home/dots/.emacs54
1 files changed, 33 insertions, 21 deletions
diff --git a/home/dots/.emacs b/home/dots/.emacs
index c1f4bb6..57540f2 100644
--- a/home/dots/.emacs
+++ b/home/dots/.emacs
@@ -51,7 +51,6 @@
(load-theme 'BOGO t)
-
(use-package exwm
:init
(setq exwm-workspace-number 1
@@ -352,7 +351,6 @@
:defer t
:custom
(completion-cycle-threshold 5)
- (completion-styles '('flex 'partial-completion 'initials 'emacs22))
(completion-ignore-case t))
(use-package pass
@@ -767,6 +765,7 @@
("M-[" . insert-pair))
(use-package dbus
+ :demand t
:config
(defun ctrl-lock-on ()
(set-cursor-color "red")
@@ -917,13 +916,15 @@
(use-package ob-rec
:ensure nil)
-(defun sync-org ()
- (interactive)
- (async-shell-command "org-sync"))
+
;; Org
(use-package org
:ensure t
+ :init
+ (defun sync-org ()
+ (interactive)
+ (async-shell-command "org-sync"))
:custom
(org-refile-targets
'((nil :maxlevel . 4)
@@ -1089,8 +1090,7 @@
:config
(advice-add 'org-agenda-quit :before (lambda ()
(interactive)
- (org-save-all-org-buffers)
- (sync-org)))
+ (org-save-all-org-buffers)))
:bind
(("C-c a" . org-agenda)
:map org-agenda-mode-map
@@ -1100,8 +1100,7 @@
:diminish auto-revert-mode)
(use-package org-agenda
- :demand t
- :ensure nil)
+ :demand t)
(use-package appt
:after (org-agenda dbus)
@@ -1115,8 +1114,11 @@
(appt-disp-window-function
(lambda (remaining new-time msg)
(notifications-notify
- :title (format "Scheduled for %s minutes" remaining)
+ :title (format "Event in %s min" remaining)
:body msg
+ :app-name "Agenda"
+ :app-icon nil
+ :timeout 300000
:urgency 'critical)))
:config
(define-advice appt-activate (:after (&optional _arg) hold-your-horses)
@@ -1151,8 +1153,16 @@
:custom
(skeleton-end-hook nil)
:init
+ (define-skeleton s/go-tmpl-translate
+ "Translate" nil
+ > "{{ T .p \"" - @ "\" }}")
+
+ (define-skeleton s/go-tmpl-insert
+ "Insert template" nil
+ > "{{template \"" - @ "\" .}}")
+
(define-skeleton s/elisp-use-package
- "New packagn"
+ "New package"
"Package name: "
> "(use-package " str \n
- @ ")")
@@ -1170,27 +1180,27 @@
"(interactive)" \n
- @")")
- (define-skeleton golang-new-function
+ (define-skeleton s/golang-new-function
"New function"
"Function name: "
> "func " str " (" - @ ") {" \n
\n
-1 "}")
- (define-skeleton golang-if-nil-err
+ (define-skeleton s/golang-if-nil-err
"If err != nil" nil
> "if err != nil {" \n
@ - \n
-1 "}")
- (define-skeleton golang-new-struct
+ (define-skeleton s/golang-new-struct
"New struct"
"Struct name: "
> "type " str " struct {" \n
\n
-1 "}")
- (define-skeleton golang-for-loop
+ (define-skeleton s/golang-for-loop
"For loop"
> "for _, v := range " - @ "{" \n
\n
@@ -1202,6 +1212,10 @@
:init
(setq-default abbrev-mode t)
:config
+ (define-abbrev html-mode-abbrev-table "2tr"
+ "" 's/go-tmpl-translate)
+ (define-abbrev html-mode-abbrev-table "2te"
+ "" 's/go-tmpl-insert)
(define-abbrev lisp-mode-abbrev-table "2us"
"" 's/elisp-use-package)
(define-abbrev lisp-mode-abbrev-table "2fu"
@@ -1209,14 +1223,13 @@
(define-abbrev lisp-mode-abbrev-table "2la"
"" 's/lisp-lambda)
(define-abbrev go-mode-abbrev-table "2err"
- "" 'golang-if-nil-err)
+ "" 's/golang-if-nil-err)
(define-abbrev go-mode-abbrev-table "2fu"
- "" 'golang-new-function)
+ "" 's/golang-new-function)
(define-abbrev go-mode-abbrev-table "2st"
- "" 'golang-new-struct)
+ "" 's/golang-new-struct)
(define-abbrev go-mode-abbrev-table "2fo"
- "" 'golang-for-loop))
-
+ "" 's/golang-for-loop))
(use-package flyspell
:diminish flyspell-mode
@@ -1346,7 +1359,6 @@
(rmail-mime-prefer-html nil)
(rmail-displayed-headers "^\\(?:Cc\\|Date\\|From\\|Subject\\|To\\|List-Id\\):"))
-
(use-package mastodon
:defer t
:custom