system changes
This commit is contained in:
parent
84df97ccf2
commit
3c42bffc76
3 changed files with 17 additions and 14 deletions
|
@ -309,28 +309,43 @@ Install a better PDF viewer than =DocView=.
|
||||||
TeX-source-correlate-start-server t))
|
TeX-source-correlate-start-server t))
|
||||||
#+end_src
|
#+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
|
#+begin_src emacs-lisp
|
||||||
(use-package eat
|
(use-package eat
|
||||||
:init
|
:init
|
||||||
(setopt eat-kill-buffer-on-exit t)
|
(setopt eat-kill-buffer-on-exit t)
|
||||||
|
|
||||||
(defun jj/eshell-quit-or-delete-char (arg)
|
(defun jj/eshell-quit-or-delete-char (arg)
|
||||||
|
"Close the terminal if I hit C-d on an empty line"
|
||||||
(interactive "p")
|
(interactive "p")
|
||||||
(if (and (eolp) (looking-back eshell-prompt-regexp))
|
(if (and (eolp) (looking-back eshell-prompt-regexp))
|
||||||
(eshell-life-is-too-much)
|
(eshell-life-is-too-much)
|
||||||
(delete-forward-char arg)))
|
(delete-forward-char arg)))
|
||||||
|
|
||||||
(defun eshell/manage-configs (arg)
|
(defun eshell/manage-configs (arg)
|
||||||
|
"run the argument through make at the root of my dotfiles repository"
|
||||||
(let ((dir (eshell/pwd)))
|
(let ((dir (eshell/pwd)))
|
||||||
(eshell/cd "~/.dotfiles")
|
(eshell/cd "~/.dotfiles")
|
||||||
(compile (concat "make " arg))
|
(compile (concat "make " arg))
|
||||||
(eshell/cd dir)))
|
(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
|
:config
|
||||||
(eat-eshell-mode)
|
(eat-eshell-mode)
|
||||||
(setq eshell-visual-commands '())
|
(setq eshell-visual-commands '())
|
||||||
:hook
|
:hook
|
||||||
(eat-mode . (lambda () (display-line-numbers-mode -1)))
|
(eat-mode . (lambda () (display-line-numbers-mode -1)))
|
||||||
(eshell-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 "ll" "ls -alF $@*")
|
||||||
(eshell/alias "la" "ls -a $@*")
|
(eshell/alias "la" "ls -a $@*")
|
||||||
(eshell/alias "l" "ls -F $@*")))
|
(eshell/alias "l" "ls -F $@*")))
|
||||||
|
|
|
@ -18,10 +18,6 @@ Import various scripts useful on my system.
|
||||||
executable = true;
|
executable = true;
|
||||||
source = ./remove-quarantine;
|
source = ./remove-quarantine;
|
||||||
};
|
};
|
||||||
"./.local/bin/yt-to-rss" = {
|
|
||||||
executable = true;
|
|
||||||
source = ./yt-to-rss;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
|
@ -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
|
|
Loading…
Add table
Reference in a new issue