summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
authorMarc Coquand <marc@mccd.space>2024-11-01 13:59:51 +0200
committerMarc Coquand <marc@mccd.space>2024-11-01 13:59:51 +0200
commit4ef0411cf14c2cbffa60032b7fe71c046400dd3e (patch)
tree3bf3f7be20b9e240c900666b819cdb037d0d40a1 /home
parent53daa6ec446840511e78d2d78ce1b88470cc8541 (diff)
downloadguix-4ef0411cf14c2cbffa60032b7fe71c046400dd3e.tar.gz
guix-4ef0411cf14c2cbffa60032b7fe71c046400dd3e.tar.bz2
guix-4ef0411cf14c2cbffa60032b7fe71c046400dd3e.zip
.
Diffstat (limited to 'home')
-rw-r--r--home/config.scm19
-rw-r--r--home/dots/.emacs162
-rwxr-xr-xhome/dots/.xinitrc2
3 files changed, 95 insertions, 88 deletions
diff --git a/home/config.scm b/home/config.scm
index 12f852c..e2b3e17 100644
--- a/home/config.scm
+++ b/home/config.scm
@@ -50,7 +50,9 @@
#:use-module (gnu packages ssh)
#:use-module (gnu packages pdf)
#:use-module (gnu packages texinfo)
- #:use-module (gnu packages man)
+ #:use-module (gnu packages man)
+ #:use-module (gnu packages llvm)
+ #:use-module (gnu packages cmake)
#:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix download)
@@ -96,6 +98,8 @@
binutils
sqlite
gcc-toolchain
+ clang-toolchain
+ cmake
mg
@@ -125,7 +129,10 @@
firefox
librewolf
+ xkbutils
+
xsetroot
+ xkbset
xhost
scrot
imlib2 ;; Needed for scrot
@@ -144,11 +151,11 @@
(bashrc (list (local-file "./bashrc")))))
(service home-startx-command-service-type
- (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")))))
+ (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" . "Escape")))))
(simple-service 'additional-fonts-service
home-fontconfig-service-type
diff --git a/home/dots/.emacs b/home/dots/.emacs
index 923d8bc..92920e2 100644
--- a/home/dots/.emacs
+++ b/home/dots/.emacs
@@ -12,20 +12,19 @@
;; Package list
package-list '(almost-mono-themes
avy
+ company
devdocs
ednc
eldoc-box
elfeed
elfeed-protocol
enwc
- embark
emms
expand-region
exwm
geiser
geiser-guile
go-mode
- god-mode
guix
pdf-tools
lem
@@ -129,7 +128,10 @@
(shell-command "xset r rate 200 60 1> /dev/null")
(shell-command "xrdb ~/.Xresources")
- (shell-command "dbus-update-activation-environment DISPLAY")
+ (shell-command "dbus-update-activation-environment DISPLAY")
+ ;; Sticky keys
+ ;;(shell-command "xkbset -feedback sticky -twokey latchlock")
+ ;;(shell-command "xkbset exp 64 '=sticky' '=twokey' '=latchlock'")
(push ?\C-\\ exwm-input-prefix-keys)
:config
(setq
@@ -183,6 +185,26 @@
:init
(pixel-scroll-precision-mode))
+
+(use-package company
+ :ensure t
+ :init
+ (global-company-mode)
+ :config
+ ;; Disable auto start behavior
+ (setq company-idle-delay nil)
+ :bind
+ (("M-<tab>" . company-indent-or-complete-common)
+ ("C-M-i" . company-complete)
+ :map company-active-map
+ ("C-n" . nil)
+ ("C-p" . nil)
+ ("M-<ret>" . company-complete-selection)
+ ("M-<tab>" . company-complete-common-or-cycle)
+ ("M-<backtab>" . (lambda ()
+ (interactive)
+ (company-complete-common-or-cycle -1)))))
+
(use-package scroll-bar
:init
(scroll-bar-mode -1))
@@ -195,47 +217,6 @@
: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)
- (html-mode . god-local-mode)
- (css-mode . god-local-mode)
- (go-mode . god-local-mode)
- (nix-mode . god-local-mode)
- (markdown-mode . god-local-mode)
- (org-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
@@ -254,13 +235,6 @@
:defer t
:ensure t)
-(use-package embark
- :ensure t
- :bind
- (("M-RET" . embark-dwim)
- ("C-h B" . embark-bindings))
- :ensure t)
-
(use-package select
:config
(setq x-select-enable-clipboard t
@@ -284,19 +258,6 @@
(cd "/sudo::/")
(async-shell-command command)))
-
-(use-package guix
- :ensure t
- :bind
- (("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-p h" . (lambda ()
- (interactive)
- (async-shell-command "guix home reconfigure ~/system/home/config.scm")))))
-
-
(use-package nov
:defer t
:ensure t
@@ -347,7 +308,38 @@
(use-package repeat
:demand t
:bind
- ((:repeat-map
+ (("C-z" . repeat)
+ :repeat-map
+ repeat-basic-movement-map
+ ("n" . next-line)
+ ("p" . previous-line)
+ ("f" . forward-char)
+ ("M-f" . forward-word)
+ ("M-b" . backward-word)
+ ("o" . avy-goto-char-timer)
+ ("b" . backward-char)
+ ("e" . move-end-of-line)
+ ("v" . scroll-up-command)
+ ("M-v" . scroll-down-command)
+ ("M-e" . forward-sentence)
+ ("a" . move-beginning-of-line)
+ :repeat-map
+ repeat-isearch-map
+ ("s" . isearch-repeat-forward)
+ ("r" . isearch-repeat-backward)
+ :repeat-map
+ repeat-repeat-map
+ ("z" . repeat)
+ :repeat-map
+ repeat-undo-map
+ ("/" . undo)
+ ("?" . undo-redo)
+ :repeat-map
+ repeat-kill-map
+ ("d" . delete-char)
+ ("M-d" . kill-word)
+ ("k" . kill-line)
+ :repeat-map
repeat-movement-map
("e" . end-of-defun)
("f" . forward-sexp)
@@ -452,16 +444,6 @@
(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
@@ -516,7 +498,7 @@
(use-package expand-region
:ensure t
:bind
- ("C-c ." . er/expand-region))
+ ("C-." . er/expand-region))
(use-package devdocs
:ensure t
@@ -524,11 +506,25 @@
(global-set-key (kbd "C-h D") 'devdocs-lookup))
(use-package custom-keymaps
+ :ensure nil
+ :config
+ (keymaps-mode)
:bind
(:map keymaps-mode-map
- ("C-c ." . er/expand-region))
+ ("C-." . er/expand-region))
:load-path "elisp")
+(use-package guix
+ :ensure t
+ :bind
+ (("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-p h" . (lambda ()
+ (interactive)
+ (async-shell-command "guix home reconfigure ~/system/home/config.scm")))))
+
(use-package sgml-mode
:init
(add-to-list 'auto-mode-alist '("\\.njk\\'" . html-mode))
@@ -617,8 +613,12 @@
(use-package hyperbole
:ensure t
:defer t
+ :bind
+ (:map hyperbole-mode-map
+ ("M-o" . nil))
:config
- (setq hyperbole-file-list '("~/personal-db/notes/inbox.org")))
+ (setq hyperbole-file-list '("~/personal-db/notes/inbox.org"))
+ (hyperbole-mode 1))
(use-package eglot
:config
@@ -779,9 +779,9 @@
:init
(yas-global-mode 1))
-(use-package register
- :bind
- (("C-z" . 'point-to-register)))
+;(use-package register
+; :bind
+; (("C-z" . 'point-to-register)))
(defun marc/set-msmtp-account ()
(if (message-mail-p)
diff --git a/home/dots/.xinitrc b/home/dots/.xinitrc
index d7014d7..2fe5129 100755
--- a/home/dots/.xinitrc
+++ b/home/dots/.xinitrc
@@ -22,7 +22,7 @@ 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:escape" &
+#setxkbmap -layout us -variant colemak -option "caps:nocaps" &
xsetroot -cursor_name left_ptr &
xset r rate 200 60 &
emacs --daemon --eval "(require 'exwm)" -f exwm-enable