From 3670254b71a93b71a12d66165418db35d5726190 Mon Sep 17 00:00:00 2001 From: pi-bot-01 Date: Thu, 26 Mar 2026 01:01:07 -0700 Subject: [PATCH] Initial commit --- command-list.el | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 command-list.el diff --git a/command-list.el b/command-list.el new file mode 100644 index 0000000..80a0151 --- /dev/null +++ b/command-list.el @@ -0,0 +1,66 @@ + +;; (defun command-list () +;; "A `completing-read' based command list" +;; (interactive) +;; (let ((actions +;; '(("one" . 'one)) )) +;; (eval (cdr (assoc (completing-read "Prompt:" actions) actions))))) + +;;; A list of commands related to reading novels in `eww' and with `nob'. +(defun nob-command-list () + "A `completing-read' based command list" + (interactive) + (let ((actions + '(("Nob select" . (nob-select)) + ("Next chapter" . (next-chapter)) + ("Next url" . (eww-next-url)) + ("Go back" . (eww-back-url)) + ("List buffers" . (eww-list-buffers)) + ("History" . (eww-list-histories)) + ("Email page" . (eww-mail-page-url))) )) + (eval (cdr (assoc (completing-read "Root->Nob: " actions) actions))))) + +(defun cb-category-list () + (let ((categories + '(("Female" . "female-cams") + ("Asian" . "tag/asian/f") + ("Lesbian" . "tag/lesbian") + ("Couples" . "couple-cams") + ;; ("Other" . (read-string "Path: ")) ; ALMOST works. I don't think I full understand lisp behavior. :( + ))) + (cb-stream-list (cdr (assoc (completing-read "Category: " categories) categories))))) + +(defun cb-category-list-no-xwinwrap () + (let ((cb-player-command "mpv --input-ipc-server=/tmp/mpv +--cache=yes --mute=yes")) + (cb-category-list))) + +;;; I see a lot of potential in this `completing-read' driver menu system. +;;; Right now, there's a lot of hardcoded values, but with some functions +;;; and maybe a macro, I think I could create a flexible system for +;;; creating menus. +;;; A macro that's aware of sub menu levels would be cool. +(defun cb-command-list () + "Choose a command in list to execute." + (interactive) + (let ((actions + '(("Take screenshot" . (cb-screenshot)) + ("Select Stream" . (cb-stream-list)) + ("Select Stream by Category" . (cb-category-list)) + ("Select Stream by Category no xwinwrap" . (cb-category-list-no-xwinwrap)) + ("Toggle Transparency" . (transparency-toggle)) + ("Toggle mute" . (cb-mute)) + ("Kill " . (cb-kill))) )) + (eval (cdr (assoc (completing-read "Root->Chaturbate: " actions) actions))))) + +(defun root-command-list () + "`completing-read based command menu.'" + (interactive) + (let ((actions + '(("Nob" . (nob-command-list)) + ("Chaturbate ;-)" . (cb-command-list)) + ("Switch Buffer" . (counsel-switch-buffer)) + ("Start firefox" . (start-process-shell-command "firefox" nil "firefox"))))) + (eval (cdr (assoc (completing-read "Root: " actions) actions))))) + +(provide 'command-list)