diff options
author | Marc Coquand <marc@mccd.space> | 2024-10-13 11:31:54 +0200 |
---|---|---|
committer | Marc Coquand <marc@mccd.space> | 2024-10-13 11:31:54 +0200 |
commit | 64063c0f26b6d73aa62316147cb82c14d3c58fbf (patch) | |
tree | 00ed6a73a3d7867b0e3ab04f7c2921d9088a0a48 /emacs | |
parent | fc8b49dc60c2813f2a074f93ac22da91b5ac1ec4 (diff) | |
download | bsd-64063c0f26b6d73aa62316147cb82c14d3c58fbf.tar.gz bsd-64063c0f26b6d73aa62316147cb82c14d3c58fbf.tar.bz2 bsd-64063c0f26b6d73aa62316147cb82c14d3c58fbf.zip |
Switch to exwm
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs | 56 |
1 files changed, 51 insertions, 5 deletions
@@ -9,6 +9,7 @@ inhibit-startup-screen t display-time-format "%a, %d/%m/%Y %H:%M" default-frame-alist '((font . "Iosevka SS13 Extended") + (height . 170) (line-spacing . 0.5)) @@ -50,6 +51,7 @@ markdown-mode yasnippet yasnippet-snippets + pinentry avy tldr elfeed @@ -90,7 +92,7 @@ (column-number-mode) (line-number-mode) (display-time-mode) -(set-face-attribute 'default nil :height 150) +(set-face-attribute 'default nil :height 170) ;; activate all thpe packages (in particular autoloads) (package-initialize) @@ -104,6 +106,48 @@ (unless (package-installed-p package) (package-install package))) +(use-package exwm + :init + (setq exwm-workspace-number 4 + exwm-input-global-keys + `(([?\s-r] . exwm-reset) ;; s-r: Reset (to line-mode). + ([?\s-w] . exwm-workspace-switch) ;; s-w: Switch workspace. + ([?\s-&] . (lambda (cmd) ;; s-&: Launch application. + (interactive (list (read-shell-command "$ "))) + (start-process-shell-command cmd nil cmd))) + ;; s-N: Switch to certain workspace. + ,@(mapcar (lambda (i) + `(,(kbd (format "s-%d" i)) . + (lambda () + (interactive) + (exwm-workspace-switch-create ,i)))) + (number-sequence 0 9)))) + (exwm-enable) + (exwm-xim-mode) + (push ?\C-\\ exwm-input-prefix-keys) + :hook + (exwm-update-class . (lambda () + (exwm-workspace-rename-buffer exwm-class-name)))) + +(use-package pinentry + :ensure t + :init + (pinentry-start)) + +(use-package epa-file + :init + (epa-file-enable) + :config + (setq + epa-pinentry-mode 'loopback + epa-pinentry-mode 'loopback)) + +(use-package org-crypt + :config + (setenv "GPG_AGENT_INFO" nil) + (setq auth-source-debug t) + (org-crypt-use-before-save-magic)) + (use-package avy :ensure t :config @@ -197,8 +241,6 @@ :init (global-set-key (kbd "C-h D") 'devdocs-lookup)) - - (use-package sgml-mode :init (add-to-list 'auto-mode-alist '("\\.njk\\'" . html-mode)) @@ -326,6 +368,10 @@ Uses `marcc/timestamp-format' for formatting the date/time." (use-package ob-rec :ensure nil) +(defun sync-org () + (interactive) + (shell-command "org-sync")) + ;; Org (use-package org :ensure t @@ -375,7 +421,7 @@ Uses `marcc/timestamp-format' for formatting the date/time." (global-set-key (kbd "C-c j") #'org-goto) (global-set-key (kbd "C-c s") #'project-find-regexp) (global-set-key (kbd "C-c C-o") #'org-open-at-point-global) - (global-set-key (kbd "C-c C-s") (lambda () (interactive) (shell-command "org-sync"))) + (global-set-key (kbd "C-c C-s") #'sync-org) :hook ((org-mode . auto-save-visited-mode)) (org-mode . org-indent-mode) @@ -617,7 +663,7 @@ Uses `marcc/timestamp-format' for formatting the date/time." '("~/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/sustainable-software.org" "/home/mccd/personal-db/notes/agency-and-tech.org" "/home/mccd/personal-db/notes/carving-my-own-road.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")) '(org-fold-core-style 'overlays) '(package-selected-packages - '(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)) + '(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)) '(tab-bar-format '(tab-bar-separator tab-bar-format-align-right tab-bar-format-global)) '(yank-from-kill-ring-rotate t)) |