aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjjanzen <jjanzen@jjanzen.ca>2025-03-13 19:11:03 -0500
committerjjanzen <jjanzen@jjanzen.ca>2025-03-13 19:11:03 -0500
commit3c42bffc76c61ac11405316655c68e97e3bf3690 (patch)
tree3c266423153335a5b5e6d8c5687ee4ec80c3a61a
parent84df97ccf25dc6af05be799ffc1038a88db24654 (diff)
system changes
-rw-r--r--common/.config/emacs/init.el.org19
-rw-r--r--macos.local/flake/home/scripts/core.nix.org4
-rw-r--r--macos.local/flake/home/scripts/yt-to-rss.org8
3 files changed, 17 insertions, 14 deletions
diff --git a/common/.config/emacs/init.el.org b/common/.config/emacs/init.el.org
index 5f396b6..27e2c17 100644
--- a/common/.config/emacs/init.el.org
+++ b/common/.config/emacs/init.el.org
@@ -309,28 +309,43 @@ Install a better PDF viewer than =DocView=.
TeX-source-correlate-start-server t))
#+end_src
-Install and configure =eat= as a terminal emulator in Emacs.
+Install and configure =eat= as a terminal emulator in Emacs with =eshell= as a shell.
#+begin_src emacs-lisp
(use-package eat
:init
(setopt eat-kill-buffer-on-exit t)
+
(defun jj/eshell-quit-or-delete-char (arg)
+ "Close the terminal if I hit C-d on an empty line"
(interactive "p")
(if (and (eolp) (looking-back eshell-prompt-regexp))
(eshell-life-is-too-much)
(delete-forward-char arg)))
+
(defun eshell/manage-configs (arg)
+ "run the argument through make at the root of my dotfiles repository"
(let ((dir (eshell/pwd)))
(eshell/cd "~/.dotfiles")
(compile (concat "make " arg))
(eshell/cd dir)))
+
+ (defun eshell/yt-2-rss (url)
+ "convert a youtube channel link into an rss link"
+ (if (not (libxml-available-p))
+ (message "libxml is not available")
+ (browse-url-emacs url t)
+ (let* ((dom (libxml-parse-html-region))
+ (rss (dom-elements dom 'title "RSS"))
+ (href (dom-attr rss 'href)))
+ (kill-buffer)
+ href)))
+
:config
(eat-eshell-mode)
(setq eshell-visual-commands '())
:hook
(eat-mode . (lambda () (display-line-numbers-mode -1)))
(eshell-mode . (lambda () (display-line-numbers-mode -1)
- (bind-keys :map eshell-mode-map ("C-d" . jj/eshell-quit-or-delete-char))
(eshell/alias "ll" "ls -alF $@*")
(eshell/alias "la" "ls -a $@*")
(eshell/alias "l" "ls -F $@*")))
diff --git a/macos.local/flake/home/scripts/core.nix.org b/macos.local/flake/home/scripts/core.nix.org
index 51c637f..e53c38c 100644
--- a/macos.local/flake/home/scripts/core.nix.org
+++ b/macos.local/flake/home/scripts/core.nix.org
@@ -18,10 +18,6 @@ Import various scripts useful on my system.
executable = true;
source = ./remove-quarantine;
};
- "./.local/bin/yt-to-rss" = {
- executable = true;
- source = ./yt-to-rss;
- };
};
}
#+end_src
diff --git a/macos.local/flake/home/scripts/yt-to-rss.org b/macos.local/flake/home/scripts/yt-to-rss.org
deleted file mode 100644
index afe31da..0000000
--- a/macos.local/flake/home/scripts/yt-to-rss.org
+++ /dev/null
@@ -1,8 +0,0 @@
-#+title: YouTube Channel to RSS Link
-
-Quick script to get the RSS link for a YouTube channel so I don't have to visit the website.
-#+begin_src sh
- #!/bin/sh
-
- /usr/bin/curl "$1" 2> /dev/null | /usr/bin/env pup 'link[title="RSS"] attr{href}'
-#+end_src