summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
authorMarc Coquand <marc@mccd.space>2024-10-29 11:35:34 +0200
committerMarc Coquand <marc@mccd.space>2024-10-29 11:35:34 +0200
commit7a3778086d173742e816eb7d3e0e82bb6ce1cbd5 (patch)
treeab0cd2e58758a8705a8c8e749fda944865c2493d /home
parent3449baae2d37938bbced90b4d9734911d2c6e875 (diff)
downloadguix-7a3778086d173742e816eb7d3e0e82bb6ce1cbd5.tar.gz
guix-7a3778086d173742e816eb7d3e0e82bb6ce1cbd5.tar.bz2
guix-7a3778086d173742e816eb7d3e0e82bb6ce1cbd5.zip
.
Diffstat (limited to '')
-rw-r--r--home/config.scm16
-rw-r--r--home/dots/.emacs170
-rwxr-xr-xhome/dots/.xinitrc4
3 files changed, 100 insertions, 90 deletions
diff --git a/home/config.scm b/home/config.scm
index fd461e9..12f852c 100644
--- a/home/config.scm
+++ b/home/config.scm
@@ -122,10 +122,6 @@
pinentry
openssh
-; flatpak
-; flatpak-xdg-utils
-
-
firefox
librewolf
@@ -148,11 +144,11 @@
(bashrc (list (local-file "./bashrc")))))
(service home-startx-command-service-type
- (xorg-configuration (keyboard-layout (keyboard-layout "us" "colemak" #:options '("ctrl:nocaps")))))
- (service home-xmodmap-service-type
- (home-xmodmap-configuration
- (key-map '(("remove Lock" . "Caps_Lock")
- ("keysym Caps_Lock" . "Control_L")))))
+ (xorg-configuration (keyboard-layout (keyboard-layout "us" "colemak" #:options '("ctrl:escape")))))
+; (service home-xmodmap-service-type
+; (home-xmodmap-configuration
+; (key-map '(("remove Lock" . "Caps_Lock")
+; ("keysym Caps_Lock" . "Escape")))))
(simple-service 'additional-fonts-service
home-fontconfig-service-type
@@ -181,8 +177,6 @@
(home-xdg-mime-applications-configuration
(default
'(("application/mp4" . "mpv.desktop")
-
-
("application/x-shellscript" . "emacsclient.desktop")
("text/javascript" . "emacsclient.desktop")
("text/markdown" . "emacsclient.desktop")
diff --git a/home/dots/.emacs b/home/dots/.emacs
index 2e81266..a81fa6d 100644
--- a/home/dots/.emacs
+++ b/home/dots/.emacs
@@ -3,7 +3,7 @@
(fset 'yes-or-no-p 'y-or-n-p)
(setq
default-frame-alist '((font . "Iosevka SS13 Extended")
- (height . 125)
+ (height . 150)
(line-spacing . 0.5))
;; undo
undo-limit 10000000
@@ -25,6 +25,7 @@
geiser
geiser-guile
go-mode
+ god-mode
guix
pdf-tools
lem
@@ -176,14 +177,49 @@
:init
(scroll-bar-mode -1))
-(use-package frame
- :init
- (window-divider-mode))
-
(use-package delsel
:init
(delete-selection-mode))
+(use-package frame
+ :config
+ (window-divider-mode))
+
+(defun me/god-mode-update-cursor-type ()
+ (setq cursor-type (if (or god-local-mode buffer-read-only) 'box 'bar)))
+
+(use-package god-mode
+ :hook
+ ((prog-mode . god-local-mode)
+ (post-command . me/god-mode-update-cursor-type))
+ :config
+ (god-mode)
+ (define-key god-local-mode-map (kbd "z") #'repeat)
+ (define-key god-local-mode-map (kbd "M-j") #'minibuffer-keyboard-quit)
+ (define-key god-local-mode-map (kbd ".") #'er/expand-region)
+ (define-key god-local-mode-map (kbd "o") #'avy-goto-char-timer)
+ (define-key god-local-mode-map (kbd ";") #'point-to-register)
+ (global-set-key (kbd "C-x C-1") #'delete-other-windows)
+ (global-set-key (kbd "C-x C-2") #'split-window-below)
+ (global-set-key (kbd "C-x C-3") #'split-window-right)
+ (global-set-key (kbd "C-x C-0") #'delete-window)
+ (add-to-list 'god-exempt-major-modes 'mu4e-headers-mode)
+ (add-to-list 'god-exempt-major-modes 'org-mode)
+ (custom-set-faces
+ '(god-mode-lighter ((t (:weight bold :foreground "orange red")))))
+
+ (setq god-mode-alist
+ '((nil . "C-")
+ ("g" . "M-")
+ ("G" . "C-M-")))
+ (require 'god-mode-isearch)
+ (define-key isearch-mode-map (kbd "<escape>") #'god-mode-isearch-activate)
+ (define-key god-mode-isearch-map (kbd "<escape>") #'god-mode-isearch-disable)
+
+ (define-key god-local-mode-map (kbd "[") #'backward-paragraph)
+ (define-key god-local-mode-map (kbd "]") #'forward-paragraph)
+ (global-set-key (kbd "<escape>") #'god-local-mode))
+
(use-package files
:config
(setq delete-old-versions t
@@ -205,8 +241,8 @@
(use-package embark
:ensure t
:bind
- (("M-RET" . embark-dwim)
- ("C-h B" . embark-bindings))
+ (("M-RET" . embark-dwim)
+ ("C-h B" . embark-bindings))
:ensure t)
(use-package select
@@ -216,7 +252,7 @@
(use-package exwm-randr
:config
- (exwm-randr-enable)
+ (exwm-randr-mode)
(start-process-shell-command "xrandr" nil ""))
(use-package pdf-tools)
@@ -236,11 +272,11 @@
(use-package guix
:ensure t
:bind
- (("C-c C-g g" . guix)
- ("C-c C-g o" . (lambda ()
+ (("C-c C-p g" . guix)
+ ("C-c C-p o" . (lambda ()
(interactive)
(sudo-shell-command "guix system reconfigure /home/mccd/system/os/config.scm")))
- ("C-c C-g h" . (lambda ()
+ ("C-c C-p h" . (lambda ()
(interactive)
(async-shell-command "guix home reconfigure ~/system/home/config.scm")))))
@@ -258,28 +294,28 @@
(ednc-mode))
(use-package org-remark
- :bind (;; :bind keyword also implicitly defers org-remark itself.
- ;; Keybindings before :map is set for global-map.
- ("C-c n m" . org-remark-mark)
- ("C-c n l" . org-remark-mark-line) ; new in v1.3
- :map org-remark-mode-map
- ("C-c n o" . org-remark-open)
- ("C-c n ]" . org-remark-view-next)
- ("C-c n [" . org-remark-view-prev)
- ("C-c n r" . org-remark-remove)
- ("C-c n d" . org-remark-delete))
- ;; Alternative way to enable `org-remark-global-tracking-mode' in
- ;; `after-init-hook'.
- ;; :hook (after-init . org-remark-global-tracking-mode)
- :init
- ;; It is recommended that `org-remark-global-tracking-mode' be
- ;; enabled when Emacs initializes. Alternatively, you can put it to
- ;; `after-init-hook' as in the comment above
- (org-remark-global-tracking-mode +1)
- :config
- (use-package org-remark-info :after info :config (org-remark-info-mode +1))
- (use-package org-remark-eww :after eww :config (org-remark-eww-mode +1))
- (use-package org-remark-nov :after nov :config (org-remark-nov-mode +1)))
+ :bind (;; :bind keyword also implicitly defers org-remark itself.
+ ;; Keybindings before :map is set for global-map.
+ ("C-c n m" . org-remark-mark)
+ ("C-c n l" . org-remark-mark-line) ; new in v1.3
+ :map org-remark-mode-map
+ ("C-c n o" . org-remark-open)
+ ("C-c n ]" . org-remark-view-next)
+ ("C-c n [" . org-remark-view-prev)
+ ("C-c n r" . org-remark-remove)
+ ("C-c n d" . org-remark-delete))
+ ;; Alternative way to enable `org-remark-global-tracking-mode' in
+ ;; `after-init-hook'.
+ ;; :hook (after-init . org-remark-global-tracking-mode)
+ :init
+ ;; It is recommended that `org-remark-global-tracking-mode' be
+ ;; enabled when Emacs initializes. Alternatively, you can put it to
+ ;; `after-init-hook' as in the comment above
+ (org-remark-global-tracking-mode +1)
+ :config
+ (use-package org-remark-info :after info :config (org-remark-info-mode +1))
+ (use-package org-remark-eww :after eww :config (org-remark-eww-mode +1))
+ (use-package org-remark-nov :after nov :config (org-remark-nov-mode +1)))
(use-package battery
:init
@@ -296,33 +332,6 @@
:demand t
:bind
((:repeat-map
- repeat-normal-movement-map
- ("n" . next-line)
- ("b" . backward-char)
- ("f" . forward-char)
- ("e" . move-end-of-line)
- ("F" . forward-word)
- ("B" . backward-word)
- ("v" . scroll-up-command)
- ("V" . scroll-down-command)
- ("O" . open-line)
- ("/" . undo)
- ("\\" . indent-region)
- ("?" . redo)
- ("W" . kill-ring-save)
- ("w" . kill-region)
- ("y" . yank)
- ("o" . avy-goto-char-timer)
- ("x" . eval-region)
- ("g" . goto-line)
- ("a" . move-beginning-of-line)
- ("k" . kill-line)
- ("d" . delete-char)
- ("D" . kill-word)
- ("." . er/expand-region)
- ("-" . er/contract-region)
- ("p" . previous-line))
- (:repeat-map
repeat-movement-map
("e" . end-of-defun)
("f" . forward-sexp)
@@ -427,6 +436,17 @@
(save-excursion (yank))
t)
+ (defun avy-action-embark (pt)
+ (unwind-protect
+ (save-excursion
+ (goto-char pt)
+ (embark-act))
+ (select-window
+ (cdr (ring-ref avy-ring 0))))
+ t)
+
+ (setf (alist-get ?. avy-dispatch-alist) 'avy-action-embark)
+
(setf (alist-get ?y avy-dispatch-alist) 'avy-action-yank
(alist-get ?w avy-dispatch-alist) 'avy-action-copy
(alist-get ?W avy-dispatch-alist) 'avy-action-copy-whole-line
@@ -560,23 +580,15 @@
(use-package calendar
:defer t
- :init
- (add-to-list 'auto-mode-alist '("~/personal-db/log" . diary-mode))
:hook
((diary-mode . variable-pitch-mode)
; (diary-mode . org-link-minor-mode)
; (diary-fancy-display-mode . org-link-minor-mode)
- (diary-fancy-display-mode . variable-pitch-mode)
- (diary-mode . (lambda ()
- (add-hook 'after-save-hook 'sync-org nil t)))
- (diary-mode . flyspell-mode))
+ (diary-fancy-display-mode . variable-pitch-mode))
:config
(global-set-key (kbd "C-c d") 'calendar)
(calendar-set-date-style 'european)
- (set-face-attribute 'diary nil :inherit 'fixed-pitch)
- (setq diary-file "~/personal-db/log"
- calendar-mark-diary-entries-flag t
- calendar-week-start-day 1))
+ (setq calendar-week-start-day 1))
(use-package nix-mode
:ensure t
@@ -674,7 +686,7 @@
(org-agenda-files :maxlevel . 4))
org-default-notes-file "~/personal-db/notes/todo.org"
org-hide-emphasis-markers t
- org-agenda-include-diary t
+ org-agenda-include-diary nil
org-agenda-remove-tags t
org-startup-folded 'content
org-agenda-inhibit-startup nil
@@ -689,12 +701,14 @@
entry (file "~/personal-db/notes/todo.org")
"* TODO %?\n%i\n%a\n "
:empty-lines 1)
- ("l" "Log" plain (file "~/personal-db/log")
- "%<%d %b %Y %H:%M> %?"
- :prepend t)
+ ("l" "Log"
+ entry (file+headline "~/personal-db/notes/log.org" "Log")
+ "** %?\n%T"
+ :prepend t
+ :empty-lines 0)
("n" "Inbox"
entry (file "~/personal-db/notes/inbox.org")
- "* %?\n%T\n"
+ "* %?\n%U\n"
:empty-lines 1)))
(set-face-attribute 'org-block nil :inherit 'fixed-pitch)
(set-face-attribute 'org-code nil :inherit 'fixed-pitch)
@@ -715,6 +729,7 @@
((org-mode . auto-save-visited-mode)
(org-mode . org-indent-mode)
(org-mode . flyspell-mode)
+ (org-mode . auto-revert-mode)
(org-mode . visual-line-mode)
(org-mode . (lambda ()
(add-hook 'after-save-hook 'sync-org nil t)))
@@ -905,12 +920,13 @@
(emms-all)
(emms-default-players))
+(set-cursor-color "red")
(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 (:inherit nil :extend nil :stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight regular :height 125 :width expanded :foundry "UKWN" :family "Iosevka SS13 Extended"))))
+ '(default ((t (:inherit nil :extend nil :stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight regular :height 150 :width expanded :foundry "UKWN" :family "Iosevka SS13 Extended"))))
'(avy-lead-face ((t (:inherit fixed-pitch :background "dark red" :foreground "white"))))
'(calendar-weekend-header ((t (:inherit nil))))
'(custom-group-subtitle ((t (:weight bold :family "Iosevka Aile"))))
@@ -988,7 +1004,7 @@
'((:name "Last 7 days" :query "date:7d..now" :hide-unread t :key 119)
(:name "Messages with images" :query "mime:image/*" :key 112)))
'(org-agenda-files
- '("~/personal-db/notes/sustainable-software.org" "/home/mccd/personal-db/notes/thoughts.org" "/home/mccd/personal-db/notes/cal-ios.org" "/home/mccd/personal-db/notes/ethics-and-software.org" "/home/mccd/personal-db/notes/reminders.org" "/home/mccd/builds/sustainably/piva.org" "/home/mccd/personal-db/notes/programming.org" "/home/mccd/personal-db/notes/unix.org" "/home/mccd/personal-db/notes/agency-and-tech.org" "/home/mccd/personal-db/notes/emacs-teaches.org" "/home/mccd/personal-db/notes/emacs.org" "/home/mccd/personal-db/notes/inbox.org" "/home/mccd/personal-db/notes/todo.org" "/home/mccd/system/guix.org"))
+ '("~/personal-db/notes/sustainable-software.org" "/home/mccd/personal-db/notes/thoughts.org" "/home/mccd/personal-db/notes/cal-ios.org" "/home/mccd/personal-db/notes/ethics-and-software.org" "/home/mccd/personal-db/notes/reminders.org" "/home/mccd/builds/sustainably/piva.org" "/home/mccd/personal-db/notes/programming.org" "/home/mccd/personal-db/notes/unix.org" "/home/mccd/personal-db/notes/agency-and-tech.org" "/home/mccd/personal-db/notes/emacs-teaches.org" "/home/mccd/personal-db/notes/emacs.org" "/home/mccd/personal-db/notes/inbox.org" "/home/mccd/personal-db/notes/todo.org" "/home/mccd/system/guix.org" "/home/mccd/personal-db/notes/log.org"))
'(org-fold-core-style 'overlays)
'(package-selected-packages
'(nov eldoc-box hide-mode-line exwm-mff eat pinentry exwm emms company orglink web-mode flycheck nix-mode nix-ts-mode avy pdf-tools elfeed-protocol lem yasnippet-snippets elfeed yasnippet smartparens markdown-mode mastodon tldr almost-mono-themes rec-mode magit go-mode expand-region devdocs))
diff --git a/home/dots/.xinitrc b/home/dots/.xinitrc
index 914bcec..d7014d7 100755
--- a/home/dots/.xinitrc
+++ b/home/dots/.xinitrc
@@ -22,8 +22,8 @@ gsettings set org.gnome.desktop.interface font-name 'Iosevka Aile' &
gsettings set org.gnome.desktop.interface cursor-size 32 &
gsettings set org.gnome.desktop.interface cursor-theme Adwaita &
# xkbcomp $HOME/.config/keymap_locked_modifier.xkb $DISPLAY &
-#setxkbmap -layout us -variant colemak -option "caps:ctrl_modifier" &
+setxkbmap -layout us -variant colemak -option "caps:escape" &
xsetroot -cursor_name left_ptr &
xset r rate 200 60 &
emacs --daemon --eval "(require 'exwm)" -f exwm-enable
-exec dbus-run-session emacsclient -c
+exec emacsclient -c