aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.alias.d/00-general4
-rw-r--r--.bashrc4
-rw-r--r--.emacs.d/init.el1
-rw-r--r--.emacs.d/rul-emacs.org83
-rw-r--r--.emacs.d/rul-lisp/packages/rul-dashboard.el22
-rw-r--r--.emacs.d/rul-lisp/packages/rul-fonts.el16
-rw-r--r--.emacs.d/rul-lisp/packages/rul-io.el5
-rw-r--r--.emacs.d/rul-lisp/packages/rul-mail.el6
-rw-r--r--.emacs.d/rul-lisp/packages/rul-modeline.el4
-rw-r--r--.emacs.d/rul-lisp/packages/rul-org.el10
-rw-r--r--.emacs.d/rul-lisp/packages/rul-prog.el3
-rw-r--r--.emacs.d/rul-lisp/packages/rul-terminals.el9
-rw-r--r--.emacs.d/rul-lisp/packages/rul-wm.el15
-rw-r--r--.emacs.d/rul-lisp/packages/rul-write.el17
-rw-r--r--.inputrc2
-rwxr-xr-xbin/gnome-set-config8
16 files changed, 187 insertions, 22 deletions
diff --git a/.alias.d/00-general b/.alias.d/00-general
index ab57817..3feaef4 100644
--- a/.alias.d/00-general
+++ b/.alias.d/00-general
@@ -17,4 +17,6 @@ alias e=$EDITOR
alias mtr='mtr --curses'
alias t='cd ~/src/'
-alias by='batcat -l yaml' \ No newline at end of file
+alias by='batcat -l yaml'
+
+alias fd=fdfind \ No newline at end of file
diff --git a/.bashrc b/.bashrc
index 48999af..a84817c 100644
--- a/.bashrc
+++ b/.bashrc
@@ -130,3 +130,7 @@ PROMPT_DIRTRIM=2
if [ -e ~/.bashrc.post ]; then
. ~/.bashrc.post
fi
+
+export NVM_DIR="$HOME/.nvm"
+[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
+[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index a07d86f..43b9e06 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -76,6 +76,7 @@
(require 'rul-themes)
(require 'rul-bindings)
(require 'rul-completion)
+(require 'rul-dashboard)
(require 'rul-fm)
(require 'rul-fonts)
(require 'rul-io)
diff --git a/.emacs.d/rul-emacs.org b/.emacs.d/rul-emacs.org
index e7162c8..1ba5aae 100644
--- a/.emacs.d/rul-emacs.org
+++ b/.emacs.d/rul-emacs.org
@@ -203,6 +203,7 @@ Now, I simply start it from Emacs itself. This approach works well for me.
(require 'rul-themes)
(require 'rul-bindings)
(require 'rul-completion)
+(require 'rul-dashboard)
(require 'rul-fm)
(require 'rul-fonts)
(require 'rul-io)
@@ -522,6 +523,31 @@ context-specific actions in the minibuffer, or common buffers.
(provide 'rul-completion)
#+end_src
+** The =dashboard= module
+#+begin_src emacs-lisp :tangle "rul-lisp/packages/rul-dashboard.el"
+(use-package page-break-lines :ensure t)
+
+(use-package dashboard
+ :ensure t
+
+ :config
+ (dashboard-setup-startup-hook)
+
+ :custom
+ (dashboard-center-content t)
+ (dashboard-startup-banner 3)
+ (dashboard-items '((recents . 5)
+ (bookmarks . 5)
+ (projects . 5)
+ (agenda . 5)
+ ))
+ (dashboard-icon-type 'nerd-icons)
+ (dashboard-set-heading-icons t)
+ (dashboard-set-file-icons t)
+)
+
+(provide 'rul-dashboard)
+#+end_src
** The =fm= module
The =fm= module contains code pertaining to file management. In
particular, it's the module that configures =dired= and adds a few extra
@@ -578,6 +604,11 @@ installs =fontaine=, a software that allows defining font presets.
:default-weight semilight
:default-height 230
:bold-weight extrabold)
+ (writing
+ :default-height 140
+ :default-family "Lato"
+ :variable-pitch-family "Regular"
+ )
(t
:default-family "Iosevka"
:default-weight regular
@@ -643,7 +674,9 @@ Emacs can act as Mail User Agent. My preferred package for this is
notmuch-hello-auto-refresh t
notmuch-hello-recent-searches-max 20
notmuch-hello-thousands-separator ""
- notmuch-show-all-tags-list t)
+ notmuch-show-all-tags-list t
+ notmuch-show-text/html-blocked-images nil
+ )
;; Keymaps
(defun rul/capture-mail()
@@ -946,6 +979,10 @@ My org mode configuration is quite big, so I split it across multiple files.
(global-set-key (kbd "C-c c") #'org-capture)
(global-set-key (kbd "C-c s") #'org-schedule)
+(global-set-key (kbd "<f9>") 'bh/punch-in)
+(global-set-key (kbd "<f10>") 'bh/punch-out)
+(global-set-key (kbd "<f12>") 'org-agenda)
+
;; ORG STATES ;;
(setq org-todo-keywords
(quote ((sequence "TODO(t)" "MAYBE(m)" "NEXT(n)" "|" "DONE(d)")
@@ -966,6 +1003,7 @@ My org mode configuration is quite big, so I split it across multiple files.
(setq org-log-done (quote time))
(setq org-log-redeadline (quote time))
(setq org-log-reschedule (quote time))
+(setq org-log-into-drawer t)
;; CAPTURE ;;
(setq org-capture-templates
@@ -990,13 +1028,12 @@ My org mode configuration is quite big, so I split it across multiple files.
("L" "Web Link" entry
(file+headline org-refile-path "Read later")
- "* %?[[%:link][%:description]] \"\")\n %:initial\n \nCaptured On: %U"
+ "* %?[[%:link][%:description]]\n %:initial\n \nCaptured On: %U"
)
("l" "Web Link with Selection" entry
(file+headline org-refile-path "Read later")
- "* [[%:link][%:description]] \n %:initial\n \nCaptured On: %U")
-
+ "* [[%:link][%:description]]\n %:initial\n \nCaptured On: %U")
)))
;; REFILE ;;
@@ -1434,7 +1471,7 @@ as the default task."
(when bh/keep-clock-running
(bh/clock-in-default-task)))))))
-(defvar bh/organization-task-id "eb155a82-92b2-4f25-a3c6-0304591af2f9")
+(defvar bh/organization-task-id "redefine") ;; org-id-get-create
;; https://stackoverflow.com/a/10091330
(defun zin/org-agenda-skip-tag (tag &optional others)
@@ -1467,6 +1504,34 @@ If OTHERS is true, skip all entries that do not correspond to TAG."
(add-hook 'org-clock-out-hook 'bh/clock-out-maybe 'append)
+;;; Focusing on current work
+
+(global-set-key (kbd "<f5>") 'bh/org-todo)
+(defun bh/org-todo (arg)
+ (interactive "p")
+ (if (equal arg 4)
+ (save-restriction
+ (bh/narrow-to-org-subtree)
+ (org-show-todo-tree nil))
+ (bh/narrow-to-org-subtree)
+ (org-show-todo-tree nil)))
+
+(global-set-key (kbd "<S-f5>") 'bh/widen)
+(defun bh/widen ()
+ (interactive)
+ (if (equal major-mode 'org-agenda-mode)
+ (progn
+ (org-agenda-remove-restriction-lock)
+ (when org-agenda-sticky
+ (org-agenda-redo)))
+ (widen)))
+
+(defun bh/narrow-to-org-subtree ()
+ (widen)
+ (org-narrow-to-subtree)
+ (save-restriction
+ (org-agenda-set-restriction-lock)))
+
;; AGENDA VIEW ;;
;; Do not dim blocked tasks
@@ -1533,7 +1598,13 @@ on a single file.
;; Python
(use-package blacken :ensure t :defer t)
-(add-hook 'python-mode-hook 'py-autopep8-enable-on-save)
+(with-eval-after-load 'lsp-mode
+ (lsp-register-client
+ (make-lsp-client
+ :new-connection (lsp-stdio-connection '("ruff" "server"))
+ :activation-fn (lsp-activate-on "python")
+ :server-id 'ruff-lsp)))
+(add-hook 'python-mode-hook #'lsp)
;; Terraform
(use-package terraform-mode :ensure t :defer t)
diff --git a/.emacs.d/rul-lisp/packages/rul-dashboard.el b/.emacs.d/rul-lisp/packages/rul-dashboard.el
new file mode 100644
index 0000000..67bd188
--- /dev/null
+++ b/.emacs.d/rul-lisp/packages/rul-dashboard.el
@@ -0,0 +1,22 @@
+(use-package page-break-lines :ensure t)
+
+(use-package dashboard
+ :ensure t
+
+ :config
+ (dashboard-setup-startup-hook)
+
+ :custom
+ (dashboard-center-content t)
+ (dashboard-startup-banner 3)
+ (dashboard-items '((recents . 5)
+ (bookmarks . 5)
+ (projects . 5)
+ (agenda . 5)
+ ))
+ (dashboard-icon-type 'nerd-icons)
+ (dashboard-set-heading-icons t)
+ (dashboard-set-file-icons t)
+)
+
+(provide 'rul-dashboard)
diff --git a/.emacs.d/rul-lisp/packages/rul-fonts.el b/.emacs.d/rul-lisp/packages/rul-fonts.el
index 8395292..d491605 100644
--- a/.emacs.d/rul-lisp/packages/rul-fonts.el
+++ b/.emacs.d/rul-lisp/packages/rul-fonts.el
@@ -1,5 +1,8 @@
;;; rul-fonts.el --- Fonts configuration
+(defun rul-wayland-session-p ()
+ (string= (getenv "XDG_SESSION_TYPE") "wayland"))
+
(use-package fontaine
:ensure t
:config
@@ -9,7 +12,9 @@
(small
:default-height 120)
(medium
- :default-height 140)
+ :default-height 150)
+ (wayland-medium
+ :default-height 320)
(large
:default-weight semilight
:default-height 180
@@ -22,6 +27,11 @@
:default-weight semilight
:default-height 230
:bold-weight extrabold)
+ (writing
+ :default-height 140
+ :default-family "Lato"
+ :variable-pitch-family "Regular"
+ )
(t
:default-family "Iosevka"
:default-weight regular
@@ -29,6 +39,8 @@
:variable-pitch-family "Iosevka Aile")))
;; Set desired style from `fontaine-presets'
- (fontaine-set-preset 'medium))
+ (if (rul-wayland-session-p)
+ (fontaine-set-preset 'wayland-medium)
+ (fontaine-set-preset 'medium)))
(provide 'rul-fonts)
diff --git a/.emacs.d/rul-lisp/packages/rul-io.el b/.emacs.d/rul-lisp/packages/rul-io.el
index eb2c1c7..50e5a68 100644
--- a/.emacs.d/rul-lisp/packages/rul-io.el
+++ b/.emacs.d/rul-lisp/packages/rul-io.el
@@ -14,6 +14,9 @@
("SomaFM - Metal" . "https://somafm.com/metal.pls")
("SomaFM - Lush" . "https://somafm.com/lush130.pls")
("KCSM Jazz 91" . "http://ice5.securenetsystems.net/KCSM")
- )))
+ ("KSUA 91.5 FM" . "https://stream.radio.co/se776fab22/listen")
+ ))
+ (setq empv-fd-binary "fdfind")
+ )
(provide 'rul-io)
diff --git a/.emacs.d/rul-lisp/packages/rul-mail.el b/.emacs.d/rul-lisp/packages/rul-mail.el
index dbf9c9b..6206118 100644
--- a/.emacs.d/rul-lisp/packages/rul-mail.el
+++ b/.emacs.d/rul-lisp/packages/rul-mail.el
@@ -13,7 +13,11 @@
notmuch-hello-auto-refresh t
notmuch-hello-recent-searches-max 20
notmuch-hello-thousands-separator ""
- notmuch-show-all-tags-list t)
+ notmuch-show-all-tags-list t
+ notmuch-show-text/html-blocked-images nil
+ )
+
+ (setq notmuch-draft-folder "current/Drafts")
;; Keymaps
(defun rul/capture-mail()
diff --git a/.emacs.d/rul-lisp/packages/rul-modeline.el b/.emacs.d/rul-lisp/packages/rul-modeline.el
index e20bb2c..32c6048 100644
--- a/.emacs.d/rul-lisp/packages/rul-modeline.el
+++ b/.emacs.d/rul-lisp/packages/rul-modeline.el
@@ -105,10 +105,14 @@ Specific to the current window's mode line.")
mode-line-front-space
mode-line-buffer-identification
mode-line-front-space
+ mode-line-percent-position
+ mode-line-front-space
rul-modeline-major-mode
prot-modeline-eglot
mode-line-format-right-align
rul-modeline-misc-info
+ mode-line-front-space
+ mode-line-front-space
))
(provide 'rul-modeline)
diff --git a/.emacs.d/rul-lisp/packages/rul-org.el b/.emacs.d/rul-lisp/packages/rul-org.el
index 9439b86..bfa70cc 100644
--- a/.emacs.d/rul-lisp/packages/rul-org.el
+++ b/.emacs.d/rul-lisp/packages/rul-org.el
@@ -51,10 +51,8 @@
(global-set-key (kbd "C-c c") #'org-capture)
(global-set-key (kbd "C-c s") #'org-schedule)
-
(global-set-key (kbd "<f9>") 'bh/punch-in)
(global-set-key (kbd "<f10>") 'bh/punch-out)
-(global-set-key (kbd "<f11>") 'org-clock-goto)
(global-set-key (kbd "<f12>") 'org-agenda)
;; ORG STATES ;;
@@ -77,6 +75,7 @@
(setq org-log-done (quote time))
(setq org-log-redeadline (quote time))
(setq org-log-reschedule (quote time))
+(setq org-log-into-drawer t)
;; CAPTURE ;;
(setq org-capture-templates
@@ -101,13 +100,12 @@
("L" "Web Link" entry
(file+headline org-refile-path "Read later")
- "* %?[[%:link][%:description]] \"\")\n %:initial\n \nCaptured On: %U"
+ "* %?[[%:link][%:description]]\n %:initial\n \nCaptured On: %U"
)
("l" "Web Link with Selection" entry
(file+headline org-refile-path "Read later")
- "* [[%:link][%:description]] \n %:initial\n \nCaptured On: %U")
-
+ "* [[%:link][%:description]]\n %:initial\n \nCaptured On: %U")
)))
;; REFILE ;;
@@ -173,4 +171,6 @@
;; Honor ATTR_ORG attribute. Defaults to image's width if not set.
(setq org-image-actual-width nil)
+(setq org-clock-mode-line-total 'today)
+
(provide 'rul-org)
diff --git a/.emacs.d/rul-lisp/packages/rul-prog.el b/.emacs.d/rul-lisp/packages/rul-prog.el
index 581dbc1..72625cb 100644
--- a/.emacs.d/rul-lisp/packages/rul-prog.el
+++ b/.emacs.d/rul-lisp/packages/rul-prog.el
@@ -9,9 +9,7 @@
(progn
(bind-key [remap find-tag] #'godef-jump))
:config
- (add-hook 'go-mode-hook #'yas-minor-mode)
(add-hook 'go-mode-hook 'electric-pair-mode)
- (add-hook 'go-mode-hook 'my-go-mode-hook)
(add-hook 'before-save-hook 'gofmt-before-save))
(use-package go-eldoc
@@ -38,7 +36,6 @@
;; Python
(use-package blacken :ensure t :defer t)
-(add-hook 'python-mode-hook 'py-autopep8-enable-on-save)
;; Terraform
(use-package terraform-mode :ensure t :defer t)
diff --git a/.emacs.d/rul-lisp/packages/rul-terminals.el b/.emacs.d/rul-lisp/packages/rul-terminals.el
index 9678b55..bbbcd10 100644
--- a/.emacs.d/rul-lisp/packages/rul-terminals.el
+++ b/.emacs.d/rul-lisp/packages/rul-terminals.el
@@ -1,3 +1,12 @@
+(use-package vterm
+ :ensure t
+ :config
+ ;; Standard vterm keybindings
+ (define-key vterm-mode-map (kbd "C-c C-t") 'vterm-copy-mode)
+ (define-key vterm-mode-map (kbd "C-c C-c") (lambda () (interactive) (vterm-send-string "\C-c")))
+ (define-key vterm-mode-map (kbd "C-l") 'vterm-clear)
+ )
+
(use-package multi-vterm
:ensure t
:init
diff --git a/.emacs.d/rul-lisp/packages/rul-wm.el b/.emacs.d/rul-lisp/packages/rul-wm.el
index 5a2293c..d33bcdb 100644
--- a/.emacs.d/rul-lisp/packages/rul-wm.el
+++ b/.emacs.d/rul-lisp/packages/rul-wm.el
@@ -6,6 +6,14 @@
(or (derived-mode-p 'org-mode 'org-agenda-mode)
(member (buffer-file-name) (org-agenda-files)))))
+;; Side window for dictionary
+(setq switch-to-buffer-obey-display-actions t)
+(add-to-list 'display-buffer-alist
+ '("^\\*Dictionary\\*" display-buffer-in-side-window
+ (side . bottom)
+ (window-height . 12)
+ ))
+
;;;; tab-bar.el
(let ((map global-map))
(define-key map (kbd "C-<next>") 'tab-bar-switch-to-next-tab)
@@ -129,4 +137,11 @@ With optional argument FRAME, return the list of buffers of FRAME."
(add-to-list 'consult-buffer-sources 'beframe-consult-source)))
+(defun kill-project-buffers-and-close-frame ()
+ (interactive)
+ (project-kill-buffers)
+ (delete-frame (selected-frame)))
+
+(define-key global-map (kbd "C-x p K") 'kill-project-buffers-and-close-frame)
+
(provide 'rul-wm)
diff --git a/.emacs.d/rul-lisp/packages/rul-write.el b/.emacs.d/rul-lisp/packages/rul-write.el
index 719baaf..4160d2f 100644
--- a/.emacs.d/rul-lisp/packages/rul-write.el
+++ b/.emacs.d/rul-lisp/packages/rul-write.el
@@ -1,5 +1,5 @@
;;;; `dictionary'
-(setq dictionary-server "dict.org"
+(setq dictionary-server "localhost"
dictionary-default-popup-strategy "lev"
dictionary-create-buttons nil
dictionary-use-single-buffer t)
@@ -54,6 +54,21 @@ Else create a new file."
;; auto-fill mode
(add-hook 'text-mode-hook 'turn-on-auto-fill)
+(use-package electric
+ :init
+ (setq electric-quote-replace-double t)
+ :hook
+ (message-mode . electric-quote-local-mode))
+
+(use-package message
+ :hook
+ (message-mode . my/message-mode-setup))
+
+(defun my/message-mode-setup ()
+ (setq fill-column 72
+ sentence-end-double-space nil)
+ (auto-fill-mode 1))
+
;; Flycheck
(use-package flycheck
:ensure t
diff --git a/.inputrc b/.inputrc
new file mode 100644
index 0000000..a8e424b
--- /dev/null
+++ b/.inputrc
@@ -0,0 +1,2 @@
+"\M-\C-f": shell-forward-word
+"\M-\C-b": shell-backward-word \ No newline at end of file
diff --git a/bin/gnome-set-config b/bin/gnome-set-config
index 15771d7..eb5d1f8 100755
--- a/bin/gnome-set-config
+++ b/bin/gnome-set-config
@@ -18,7 +18,7 @@ for i in $(seq 1 $NUM_WORKSPACES); do
done
# This configuration is not present in gsettings; we need to fall back to dconf
-bindings="emacs org-mode move-windows rofi"
+bindings="emacs org-mode move-windows rofi rofi-run"
keybindings_key="/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings"
keybindings=$(echo $bindings | awk -v key="$keybindings_key" '{for(i=1;i<=NF;i++) printf("'\''" key "/" $i "/'\''%s", (i==NF ? "" : ","))}')
keybindings="[$keybindings]"
@@ -42,5 +42,9 @@ gsettings set org.gnome.desktop.wm.keybindings switch-input-source "[]"
gsettings set org.gnome.desktop.wm.keybindings switch-input-source-backward '[]'
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/rofi/binding "'<Super>space'"
-dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/rofi/command "'rofi -show window'"
+dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/rofi/command "'rofi -x11 -show window'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/rofi/name "'rofi'"
+
+dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/rofi-run/binding "'<Super>f2'"
+dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/rofi-run/command "'rofi -x11 -show run'"
+dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/rofi-run/name "'rofi-run'"
nihil fit ex nihilo