diff options
author | bd <bdunahu@colostate.edu> | 2024-03-14 01:20:44 -0600 |
---|---|---|
committer | bd <bdunahu@colostate.edu> | 2024-03-14 01:20:44 -0600 |
commit | f561373103be38ecb6dc5103ded7737437acb0ed (patch) | |
tree | 9827d4027ea4c135b081a54ea3910927f36450a8 /.config/emacs/modules | |
parent | 396d0e461555de52214f5224e4ff5716766283ca (diff) |
Bind switch-tab to meta-#
Diffstat (limited to '.config/emacs/modules')
-rw-r--r-- | .config/emacs/modules/bd--eww.el | 2 | ||||
-rw-r--r-- | .config/emacs/modules/bd--tabs.el (renamed from .config/emacs/modules/bd--project.el) | 15 |
2 files changed, 15 insertions, 2 deletions
diff --git a/.config/emacs/modules/bd--eww.el b/.config/emacs/modules/bd--eww.el index 6623323..1088c6b 100644 --- a/.config/emacs/modules/bd--eww.el +++ b/.config/emacs/modules/bd--eww.el @@ -16,7 +16,7 @@ "yewtu.be" "vid.puffyan.us")) browse-url-handlers - `((,(regexp-opt'("youtube.com" "youtu.be" "yewtu.be" "vid.puffyan.us")) . + `((,(regexp-opt'("youtube.com" "youtu.be" "yewtu.be" "vid.puffyan.us" "invidious.protokolla.fi")) . (lambda (url &rest _) (message "Ludu %s" url) (start-process-shell-command "rip-video" nil (concat "rip-video " url)))))) diff --git a/.config/emacs/modules/bd--project.el b/.config/emacs/modules/bd--tabs.el index 6c54a1a..e9c9ac3 100644 --- a/.config/emacs/modules/bd--project.el +++ b/.config/emacs/modules/bd--tabs.el @@ -1,9 +1,21 @@ ;; -*- lexical-binding: t; -*- +;; turn tabs on, undo/redo mode (setq tab-bar-show 1) (tab-bar-history-mode) + +;; bind tabs to 'Meta' like a browser +(mapcar (lambda (i) + (keymap-global-set (format "M-%d" i) + (lambda () + (interactive) + (tab-bar-select-tab i)))) + (number-sequence 0 9)) + + +;; use project name if it exists (defun bd/tab-bar-name-function () (let ((project (project-current))) (if project @@ -15,4 +27,5 @@ (setq tab-bar-tab-name-function #'bd/tab-bar-name-function) -(provide 'bd--project) + +(provide 'bd--tabs) |