adding some tweaks i guess
This commit is contained in:
parent
458911f139
commit
acd99a5c59
37
README.org
37
README.org
|
@ -265,9 +265,9 @@ Probably the prettiest and best modeline I've found.
|
|||
:ensure t
|
||||
:init
|
||||
(doom-modeline-mode 1)
|
||||
(setq doom-modeline-height 30
|
||||
(setq doom-modeline-height 25
|
||||
doom-modeline-bar-width 3
|
||||
all-the-icons-scale-factor 1.0
|
||||
all-the-icons-scale-factor 0.9
|
||||
doom-modeline-hud nil
|
||||
doom-modeline-buffer-file-name-style 'file-name
|
||||
doom-modeline-buffer-encoding nil
|
||||
|
@ -1814,6 +1814,7 @@ These two packages created by Prot are interesting to me and may help to make su
|
|||
Builtin webbrowser for emacs. Trying it out as a text only browser for things.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq home-directory "~/")
|
||||
(defun chris/eww-mpv ()
|
||||
"Launch the url in mpv"
|
||||
(interactive)
|
||||
|
@ -1826,11 +1827,39 @@ Builtin webbrowser for emacs. Trying it out as a text only browser for things.
|
|||
(goto-char pt)
|
||||
(let ((url (get-text-property (point) 'shr-url)))
|
||||
(if (start-process "mpv" "mpv-output" "mpv" url)
|
||||
(message (concat"mpv started => " url))
|
||||
(message (concat "mpv started => " url))
|
||||
(message "mpv failed, maybe this isn't a link?"))))))
|
||||
|
||||
;; (defun chris/)
|
||||
|
||||
(defun chris/eww-video-dl ()
|
||||
"Download the video at the url"
|
||||
(interactive)
|
||||
(let ((pt (avy-with ace-link-eww
|
||||
(avy-process
|
||||
(mapcar #'cdr (ace-link--eww-collect))
|
||||
(avy--style-fn avy-style)))))
|
||||
|
||||
(when (number-or-marker-p pt)
|
||||
(goto-char pt)
|
||||
(let ((url (get-text-property (point) 'shr-url)))
|
||||
(if (start-process
|
||||
"yt-dlp"
|
||||
"yt-dlp-output"
|
||||
"yt-dlp" "-o" (concat home-directory "Videos/%(title)s.%(ext)s") url)
|
||||
(message (concat "downloading => " url))
|
||||
(message "idk this failed I guess..."))
|
||||
(pop-to-buffer "yt-dlp-output")
|
||||
(comint-mode)
|
||||
(evil-normal-state)
|
||||
(general-def 'normal comint-mode-map
|
||||
"q" 'kill-buffer-and-window)))))
|
||||
|
||||
(setq eww-search-prefix "https://search.tfcconnection.org/search?q=")
|
||||
|
||||
(general-def 'normal eww-mode-map
|
||||
"gv" 'chris/eww-mpv)
|
||||
"gv" 'chris/eww-mpv
|
||||
"gV" 'chris/eww-video-dl)
|
||||
#+end_src
|
||||
|
||||
** Completion
|
||||
|
|
37
init.el
37
init.el
|
@ -108,9 +108,9 @@
|
|||
:ensure t
|
||||
:init
|
||||
(doom-modeline-mode 1)
|
||||
(setq doom-modeline-height 30
|
||||
(setq doom-modeline-height 25
|
||||
doom-modeline-bar-width 3
|
||||
all-the-icons-scale-factor 1.0
|
||||
all-the-icons-scale-factor 0.9
|
||||
doom-modeline-hud nil
|
||||
doom-modeline-buffer-file-name-style 'file-name
|
||||
doom-modeline-buffer-encoding nil
|
||||
|
@ -1394,6 +1394,7 @@ All my (performant) foldings needs are met between this and `org-show-subtree'
|
|||
(add-hook 'imenu-after-jump-hook #'pulsar-recenter-top)
|
||||
(add-hook 'imenu-after-jump-hook #'pulsar-reveal-entry))
|
||||
|
||||
(setq home-directory "~/")
|
||||
(defun chris/eww-mpv ()
|
||||
"Launch the url in mpv"
|
||||
(interactive)
|
||||
|
@ -1406,11 +1407,39 @@ All my (performant) foldings needs are met between this and `org-show-subtree'
|
|||
(goto-char pt)
|
||||
(let ((url (get-text-property (point) 'shr-url)))
|
||||
(if (start-process "mpv" "mpv-output" "mpv" url)
|
||||
(message (concat"mpv started => " url))
|
||||
(message (concat "mpv started => " url))
|
||||
(message "mpv failed, maybe this isn't a link?"))))))
|
||||
|
||||
;; (defun chris/)
|
||||
|
||||
(defun chris/eww-video-dl ()
|
||||
"Download the video at the url"
|
||||
(interactive)
|
||||
(let ((pt (avy-with ace-link-eww
|
||||
(avy-process
|
||||
(mapcar #'cdr (ace-link--eww-collect))
|
||||
(avy--style-fn avy-style)))))
|
||||
|
||||
(when (number-or-marker-p pt)
|
||||
(goto-char pt)
|
||||
(let ((url (get-text-property (point) 'shr-url)))
|
||||
(if (start-process
|
||||
"yt-dlp"
|
||||
"yt-dlp-output"
|
||||
"yt-dlp" "-o" (concat home-directory "Videos/%(title)s.%(ext)s") url)
|
||||
(message (concat "downloading => " url))
|
||||
(message "idk this failed I guess..."))
|
||||
(pop-to-buffer "yt-dlp-output")
|
||||
(comint-mode)
|
||||
(evil-normal-state)
|
||||
(general-def 'normal comint-mode-map
|
||||
"q" 'kill-buffer-and-window)))))
|
||||
|
||||
(setq eww-search-prefix "https://search.tfcconnection.org/search?q=")
|
||||
|
||||
(general-def 'normal eww-mode-map
|
||||
"gv" 'chris/eww-mpv)
|
||||
"gv" 'chris/eww-mpv
|
||||
"gV" 'chris/eww-video-dl)
|
||||
|
||||
(use-package vertico
|
||||
:init
|
||||
|
|
34
templates
34
templates
|
@ -1,4 +1,4 @@
|
|||
;; -*- mode: lisp -*
|
||||
;; -*- lisp-data -*-
|
||||
|
||||
fundamental-mode ;; Available everywhere
|
||||
|
||||
|
@ -70,13 +70,11 @@ c-mode :condition (re-search-backward "^\\w*$" (line-beginning-position) 'noerro
|
|||
(inc "#include <" (p (concat (file-name-base (or (buffer-file-name) (buffer-name))) ".h")) ">")
|
||||
(incc "#include \"" (p (concat (file-name-base (or (buffer-file-name) (buffer-name))) ".h")) "\"")
|
||||
|
||||
c++-mode
|
||||
|
||||
(Q_PROP "Q_PROPERTY(" (p "type") " " (p "name") " READ " (p "name") " WRITE set" (p "name") " NOTIFY " (p "name") "CHANGED)")
|
||||
|
||||
org-mode
|
||||
|
||||
(title "#+title: " p n "#+author: Chris Cochrun" n n)
|
||||
(drawer ":" p ":" n r ":end:")
|
||||
(begin "#+begin_" (s name) n> r> n "#+end_" name)
|
||||
(quote "#+begin_quote" n> r> n> "#+end_quote")
|
||||
(example "#+begin_example" n> r> n> "#+end_example")
|
||||
(center "#+begin_center" n> r> n> "#+end_center")
|
||||
|
@ -93,3 +91,29 @@ web-mode
|
|||
(div "<div class=\""p"\">" n> r> n> "</div>" n)
|
||||
(input "<input type=\""p"\" id=\""p"\" name=\""p"\" class=\""p"\">")
|
||||
(label "<label for=\""p"\" class=\""p"\">")
|
||||
|
||||
c++-mode
|
||||
|
||||
(qprop "Q_PROPERTY(" (p "type") " " (p "name") " READ " (p "name") " WRITE set" (p "name") " NOTIFY " (p "name") "CHANGED)")
|
||||
|
||||
qml-mode
|
||||
|
||||
(rectangle "Rectangle {" n> "id: " r n "}">)
|
||||
(item "Item {" n> "id: " r n "}">)
|
||||
(row "RowLayout {" n> "id: " r n "}">)
|
||||
(column "ColumnLayout {" n> "id: " r n "}">)
|
||||
(grid "GridLayout {" n> "id: " r n "}">)
|
||||
(component "Component {" n> "id: " r n "}">)
|
||||
(filedialog "FileDialog {" n> "id: " r n "}">)
|
||||
(label "Controls.Label {" n> "id: " r n "}">)
|
||||
(cbutton "Controls.ToolButton {" n> "id: " r n "}">)
|
||||
(toolbar "Controls.ToolBar {" n> "id: " r n "}">)
|
||||
(toolsep "Controls.ToolSeparator {" n> "id: " r n "}">)
|
||||
(popup "Controls.Popup {" n> "id: " r n "}">)
|
||||
(combobox "Controls.ComboBox {" n> "id: " r n "}">)
|
||||
(textfield "Controls.TextField {" n> "id: " r n "}">)
|
||||
(textarea "Controls.TextArea {" n> "id: " r n "}">)
|
||||
(sheet "Kirigami.OverlaySheet {" n> "id: " r n "}">)
|
||||
(action "Kirigami.Action {" n> "id: " r n "}">)
|
||||
(icon "Kirigami.Icon {" n> "id: " r n "}">)
|
||||
(search "Kirigami.SearchField {" n> "id: " r n "}">)
|
||||
|
|
Loading…
Reference in a new issue