diff options
| author | Craig Jennings <craigmartinjennings@gmail.com> | 2024-04-11 01:39:11 -0500 |
|---|---|---|
| committer | Craig Jennings <craigmartinjennings@gmail.com> | 2024-04-11 01:39:11 -0500 |
| commit | 07fd4f1a6930dc62880b0fd7a0496270f4c2efd6 (patch) | |
| tree | 31c37427859b391dd8dcad9abc2f4f3515f072b5 /modules/test-code.el | |
| parent | a55a5248bd2dae5f849476d0f7b5dcd8d91cf929 (diff) | |
more fit and finish work
User Constants
- move all file and directory constants into it's own file
- create the directories and files if they don't exist
- warn the user when not found/created
General
- remove duplicate dirvish go menu entry
- remove xterm color in test code (it's already in eshell)
- fixed org-drill not starting
- fixing issue with auto-complete not working in eshell
- adding playlists location for dirvish
- moved all org-drill config into the use-package declaration
- added drill-dir to user-constants
- default ledger-file location changed; updated tasks
- git ignore the persist folder
- added more point values in fontaine menu
- fix for gptel early key grab in authinfo.gpg
- removed localrepo from reset script
- remove magit-forge package
- don't wait too long to bury-buffers
- add setting native compile warnings to 'silent
- fixed sdcv errors when looking up a word normally and in nov
Diffstat (limited to 'modules/test-code.el')
| -rw-r--r-- | modules/test-code.el | 89 |
1 files changed, 55 insertions, 34 deletions
diff --git a/modules/test-code.el b/modules/test-code.el index 74179c95..85e7bce6 100644 --- a/modules/test-code.el +++ b/modules/test-code.el @@ -7,6 +7,28 @@ ;;; Code: +;; ---------------------------------- Yeetube ---------------------------------- +;; youtube frontend for emacs + +(use-package yeetube + :init (define-prefix-command 'cj/yeetube-map) + :bind (("C-c y" . 'cj/yeetube-map) + :map cj/yeetube-map + ("s" . 'yeetube-search) + ("b" . 'yeetube-play-saved-video) + ("d" . 'yeetube-download-videos) + ("p" . 'yeetube-mpv-toggle-pause) + ("v" . 'yeetube-mpv-toggle-video) + ("V" . 'yeetube-mpv-toggle-no-video-flag) + ("k" . 'yeetube-remove-saved-video)) + :custom + (yeetube-results-limit 50) + (yeetube-download-directory (expand-file-name "videos" "~")) + (yeetube-filter "Views") + (setq yeetube-display-thumbnails nil) + :config + (setf yeetube-mpv-disable-video nil)) + ;; --------------------------------- Recording --------------------------------- @@ -22,12 +44,12 @@ If called with a prefix arg C-u, choose the location on where to save the record otherwise use the default location in `cj/recording-location'." (interactive "P") (let* ((location (if arg - (read-directory-name "Enter recording location: ") - cj/recording-location)) - (directory (file-name-directory location))) - (unless (file-directory-p directory) - (make-directory directory t)) - (cj/ffmpeg-record location))) + (read-directory-name "Enter recording location: ") + cj/recording-location)) + (directory (file-name-directory location))) + (unless (file-directory-p directory) + (make-directory directory t)) + (cj/ffmpeg-record location))) (defun cj/ffmpeg-record (directory) "Start an ffmpeg recording. Save output to DIRECTORY." @@ -39,13 +61,13 @@ otherwise use the default location in `cj/recording-location'." (concat "ffmpeg -framerate 30 -f x11grab -i :0.0+ " "-f pulse -i alsa_input.pci-0000_00_1b.0.analog-stereo " "-ac 1 -f pulse -i alsa_output.pci-0000_00_1b.0.analog-stereo.monitor " - "-ac 2 " filename))) - ;; start the recording + "-ac 2 " filename))) + ;; start the recording (setq cj/ffmpeg-process (start-process-shell-command "ffmpeg-recording" "*ffmpeg-recording*" ffmpeg-command)) - (set-process-query-on-exit-flag cj/ffmpeg-process nil) + (set-process-query-on-exit-flag cj/ffmpeg-process nil) (message "Started recording process.")))) (defun cj/stop-recording () @@ -62,22 +84,22 @@ otherwise use the default location in `cj/recording-location'." "Prompt for a string, insert it before and after the word at point or selected region." (interactive) (let ((str (read-string "Enter a string: ")) - (regionp (use-region-p))) - (save-excursion - (if regionp - (let ((beg (region-beginning)) - (end (region-end))) - (goto-char end) - (insert str) - (goto-char beg) - (insert str)) - (if (thing-at-point 'word) - (let ((bounds (bounds-of-thing-at-point 'word))) - (goto-char (cdr bounds)) - (insert str) - (goto-char (car bounds)) - (insert str)) - (message "Can't insert around. No word at point and no region selected.")))))) + (regionp (use-region-p))) + (save-excursion + (if regionp + (let ((beg (region-beginning)) + (end (region-end))) + (goto-char end) + (insert str) + (goto-char beg) + (insert str)) + (if (thing-at-point 'word) + (let ((bounds (bounds-of-thing-at-point 'word))) + (goto-char (cdr bounds)) + (insert str) + (goto-char (car bounds)) + (insert str)) + (message "Can't insert around. No word at point and no region selected.")))))) (global-set-key (kbd "C-; i a") 'cj/insert-around-word-or-region) @@ -115,19 +137,18 @@ otherwise use the default location in `cj/recording-location'." (use-package wttrin :defer .5 - :after xterm-color :load-path ("~/code/emacs-wttrin") + :preface + ;; dependency for wttrin + (use-package xterm-color + :demand t) :bind ("M-W" . wttrin)) -;; dependency for wttrin -(use-package xterm-color - :defer .5) - ;; ------------------------------ ERC Yank To Gist ----------------------------- ;; automatically create a Gist if pasting more than 5 lines ;; this module requires https://github.com/defunkt/gist -;; via ruby: 'gem install gist' via the aur: yay -S gist +;; via ruby: 'gem install gist' via the aur: yay -S gist (use-package erc-yank :defer 1 @@ -144,9 +165,9 @@ otherwise use the default location in `cj/recording-location'." ;; :after racket-mode ;; :commands (org-babel-execute:racket) ;; :quelpa (ob-racket -;; :fetcher github -;; :repo "hasu/emacs-ob-racket" -;; :files ("*.el" "*.rkt"))) +;; :fetcher github +;; :repo "hasu/emacs-ob-racket" +;; :files ("*.el" "*.rkt"))) (provide 'test-code) ;;; test-code.el ends here. |
