summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
authorMarc Coquand <marc@mccd.space>2024-11-27 18:52:21 +0200
committerMarc Coquand <marc@mccd.space>2024-11-27 18:52:21 +0200
commit9a126f6524bfab5be3d3530ad0cfdf842c2af070 (patch)
tree2a373703ddc3e1a7da4ca5588315d30cb6add098 /home
parent1397f4ec81f147ecad754b7ad7ab50bce1d9b8e1 (diff)
downloadguix-9a126f6524bfab5be3d3530ad0cfdf842c2af070.tar.gz
guix-9a126f6524bfab5be3d3530ad0cfdf842c2af070.tar.bz2
guix-9a126f6524bfab5be3d3530ad0cfdf842c2af070.zip
.
Diffstat (limited to 'home')
-rw-r--r--home/bashrc2
-rw-r--r--home/config.scm1
-rw-r--r--home/dots/.emacs102
-rw-r--r--home/dots/.emacs.d/BOGO-theme.el2
4 files changed, 78 insertions, 29 deletions
diff --git a/home/bashrc b/home/bashrc
index 91d2db6..6752822 100644
--- a/home/bashrc
+++ b/home/bashrc
@@ -33,7 +33,7 @@ refs() {
cleartrail() {
cat $1 | tr -d '\n'
}
-
+source /run/current-system/profile/etc/profile.d/nix.sh
alias a='pwd'
eval "$(direnv hook bash)"
eval "$(zoxide init posix --hook prompt)"
diff --git a/home/config.scm b/home/config.scm
index e9ea01a..8c185aa 100644
--- a/home/config.scm
+++ b/home/config.scm
@@ -87,6 +87,7 @@
imagemagick
password-store
fd
+ age
recutils
unzip
inxi
diff --git a/home/dots/.emacs b/home/dots/.emacs
index 65c4ad1..5ffe486 100644
--- a/home/dots/.emacs
+++ b/home/dots/.emacs
@@ -32,8 +32,6 @@
rec-mode
tldr
transpose-frame
- yasnippet
- yasnippet-snippets
ws-butler)
package-archives '(("elpa" . "https://elpa.gnu.org")
("gnu" . "http://elpa.gnu.org/packages/")
@@ -67,6 +65,8 @@
(number-sequence 0 9))))
(exwm-input-set-key (kbd "s-f")
'exwm-layout-toggle-fullscreen)
+ (exwm-input-set-key (kbd "s-t")
+ 'exwm-floating-toggle-floating)
(exwm-input-set-key (kbd "<print>")
(lambda () (interactive)
(shell-command "scrot -F '/home/mccd/screenshots/%Y-%m-%d_$wx$h.png'")))
@@ -252,7 +252,8 @@
:ensure t
:init
(with-eval-after-load 'geiser-guile
- (add-to-list 'geiser-guile-load-path "~/dev/nonguix")))
+ (add-to-list 'geiser-guile-load-path "~/dev/nonguix")
+ (keymap-set geiser-mode-map "C-." nil)))
(use-package corfu
;; Optional customizations
@@ -445,7 +446,7 @@
("b" . backward-word)
:repeat-map undo-redo-repeat-map
("/" . undo)
- ("?" . redo)
+ ("?" . undo-redo)
:repeat-map kill-lines-repeat-map
("k" . kill-line)
:repeat-map kill-lines-org-repeat-map
@@ -664,8 +665,8 @@
(use-package devdocs
:ensure t
- :init
- (global-set-key (kbd "C-h D") 'devdocs-lookup))
+ :bind
+ ("C-h D" . devdocs-lookup))
(use-package custom-keymaps
:load-path "elisp"
@@ -731,8 +732,8 @@
:demand t
:hook
(eglot-managed-mode . #'eldoc-box-hover-mode)
- :config
- (global-set-key (kbd "C-h .") #'eldoc-box-help-at-point))
+ :bind
+ ("C-h ." . eldoc-box-help-at-point))
(use-package markdown-mode
:ensure t
@@ -749,12 +750,12 @@
(use-package elec-pair
:init
(electric-pair-mode 1)
- :config
- (global-set-key (kbd "M-{") 'insert-pair)
- (global-set-key (kbd "M-\"") 'insert-pair)
- (global-set-key (kbd "M-\'") 'insert-pair)
- (global-set-key (kbd "M-<") 'insert-pair)
- (global-set-key (kbd "M-[") 'insert-pair))
+ :bind
+ ("M-{" . insert-pair)
+ ("M-\"" . insert-pair)
+ ("M-\'" . insert-pair)
+ ("M-<" . insert-pair)
+ ("M-[" . insert-pair))
(use-package dbus
:config
@@ -807,7 +808,6 @@
:custom
(calendar-week-start-day 1)
:config
- (global-set-key (kbd "C-c d") 'calendar)
(calendar-set-date-style 'european)
(setq calendar-week-start-day 1))
@@ -881,9 +881,8 @@
"#netbsd"
"#nonguix"
"#guix")))
- :init
- (global-set-key
- "\C-ceo"
+ :bind
+ ("\C-ceo" .
(lambda ()
"erc - join osm"
(interactive)
@@ -891,8 +890,7 @@
:server "irc.oftc.net"
:port "6667"
:nick "mccd")))
- (global-set-key
- "\C-cel"
+ ("\C-cel" .
(lambda ()
"erc - join libera chat"
(interactive)
@@ -1030,9 +1028,9 @@
entry (file+headline "~/personal-db/notes/notes.org" "References")
"* %?\n%i\n%a\n "
:empty-lines 1)
- ("s" "Schedule"
+ ("e" "Event"
entry (file+headline "~/personal-db/notes/notes.org" "Event")
- "* TODO %?\nSCHEDULED: %^T"
+ "* %?\n%^T"
:empty-lines 1)
("a" "Article"
entry (file+olp "~/personal-db/notes/notes.org" "References" "Articles")
@@ -1127,11 +1125,50 @@
:demand t
:ensure magit)
-(use-package yasnippet
- :diminish yas-minor-mode
- :ensure t
+(use-package skeleton
+ :custom
+ (skeleton-end-hook nil)
:init
- (yas-global-mode 1))
+ (define-skeleton golang-new-function
+ "New function"
+ "Function name: "
+ > "func " str " (" - @ ") {" \n
+ \n
+ -1 "}")
+
+ (define-skeleton golang-if-nil-err
+ "If err != nil" nil
+ > "if err != nil {" \n
+ @ - \n
+ -1 "}")
+
+ (define-skeleton golang-new-struct
+ "New struct"
+ "Struct name: "
+ > "type " str " struct {" \n
+ \n
+ -1 "}")
+
+ (define-skeleton golang-for-loop
+ "For loop"
+ > "for _, v := range " - @ "{" \n
+ \n
+ -1 "}"))
+
+(use-package abbrev
+ :after skeleton go-mode
+ :init
+ (setq-default abbrev-mode t)
+ :config
+ (define-abbrev go-mode-abbrev-table "2err"
+ "" 'golang-if-nil-err)
+ (define-abbrev go-mode-abbrev-table "2fu"
+ "" 'golang-new-function)
+ (define-abbrev go-mode-abbrev-table "2st"
+ "" 'golang-new-struct)
+ (define-abbrev go-mode-abbrev-table "2fo"
+ "" 'golang-for-loop)
+ )
(use-package flyspell
:diminish flyspell-mode
@@ -1175,6 +1212,8 @@
(message-send-mail-function 'message-send-mail-with-sendmail)
(mail-user-agent 'message-user-agent))
+(use-package tempo)
+
(use-package rmail
:init
(defvar selected-rmail-account "")
@@ -1189,7 +1228,7 @@
(rmail-output-as-seen "/tmp/new-patch.patch"))
:bind
(("C-c m" . rmail-open)
- ("C-c M" . rmail-no-check)
+ ("C-c M" . rmail-open-no-check)
:map rmail-mode-map
("r" . rmail-reply-t)
("R" . rmail-reply)
@@ -1250,6 +1289,15 @@
["Home" mail-home]
["Work" mail-work]))
+ (defun rmail-open-no-check ()
+ (interactive)
+ (let ((prev selected-rmail-account))
+ (tmm-prompt rmail-prompt-account)
+ (unless (eq selected-rmail-account prev)
+ ;; First kill all RMAIL buffers to not leave any dangling
+ (kill-matching-buffers "\\.mbox\\|RMAIL")))
+ (rmail-no-check))
+
(defun rmail-open ()
(interactive)
(let ((prev selected-rmail-account))
diff --git a/home/dots/.emacs.d/BOGO-theme.el b/home/dots/.emacs.d/BOGO-theme.el
index 12d95e8..7d09fd3 100644
--- a/home/dots/.emacs.d/BOGO-theme.el
+++ b/home/dots/.emacs.d/BOGO-theme.el
@@ -101,7 +101,7 @@
'(tldr-command-itself ((t (:background "khaki" :foreground "#111111" :weight bold))))
'(tldr-introduction ((t (:foreground "#111111" :slant italic))))
'(tldr-title ((t (:inherit variable-pitch :foreground "#111111" :weight bold))))
- '(variable-pitch ((t (:family "Iosevka Etoile" :height 1.0))))
+ '(variable-pitch ((t (:family "Iosevka Aile" :height 1.0))))
'(window-divider ((t (:foreground "gray90")))))
(provide-theme 'BOGO)