aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emacs/.emacs.d/init/ycp-web.el3
-rw-r--r--emacs/.emacs.d/lisp/my/my-org-jira.el10
-rw-r--r--emacs/.emacs.d/lisp/my/my-web.el13
-rw-r--r--emacs/.emacs.d/lisp/my/my-ytdl.el12
-rw-r--r--misc/.config/rofi/config.rasi2
5 files changed, 25 insertions, 15 deletions
diff --git a/emacs/.emacs.d/init/ycp-web.el b/emacs/.emacs.d/init/ycp-web.el
index dd733dc..a4fa8f5 100644
--- a/emacs/.emacs.d/init/ycp-web.el
+++ b/emacs/.emacs.d/init/ycp-web.el
@@ -203,6 +203,7 @@
org-jira-jira-status-to-org-keyword-alist
org-jira-project-filename-alist
org-jira-custom-jqls)
+ (org-link-set-parameters "jira" '((:follow . org-jira-open)))
(require 'my-org-jira)
(my-override org-jira--render-issue)
(my-override org-jira-update-worklogs-from-org-clocks)
@@ -260,6 +261,8 @@
. ,(lambda (url &rest _) (mastorg-open url)))
(my-newscorp-au-url-p
. ,(lambda (url &rest _) (my-open-newscorp-au url)))
+ (my-org-jira-url-p
+ . ,(lambda (url &rest _) (my-org-jira-open-url url)))
(reddio-reddit-url-p
. ,(lambda (url &rest _) (reddio-open-url url)))
("^https?://www.spectator.com.au\\>" .
diff --git a/emacs/.emacs.d/lisp/my/my-org-jira.el b/emacs/.emacs.d/lisp/my/my-org-jira.el
index 2502f02..9e2f821 100644
--- a/emacs/.emacs.d/lisp/my/my-org-jira.el
+++ b/emacs/.emacs.d/lisp/my/my-org-jira.el
@@ -82,7 +82,7 @@
:proj-key (path '(fields project key))
:related-issues (mapconcat
(lambda (c)
- (print c)
+ ;; (print c)
(if (org-jira-sdk-path c '(inwardIssue))
(if (equal
(org-jira-sdk-path
@@ -269,5 +269,13 @@
(interactive)
(kill-new (my-org-jira-comment-url-at-point)))
+(defun my-org-jira-url-p (url)
+ (string-match-p (format "^%s/browse/[^/]" jiralib-url) url))
+
+(defun my-org-jira-open-url (url)
+ (interactive "sJIRA issue url: ")
+ (when (string-match (format "^%s/browse/\\([^/]+\\)" jiralib-url) url)
+ (org-jira-get-issue (match-string 1 url))))
+
(provide 'my-org-jira)
;;; my-org-jira.el ends here
diff --git a/emacs/.emacs.d/lisp/my/my-web.el b/emacs/.emacs.d/lisp/my/my-web.el
index f33f30c..f2e48ba 100644
--- a/emacs/.emacs.d/lisp/my/my-web.el
+++ b/emacs/.emacs.d/lisp/my/my-web.el
@@ -86,19 +86,6 @@
(start-process (concat "mullvad-browser " url) nil "mullvad-browser"
url))
-;; TODO: change to using hmm matching url with default app
-;; override browse-url
-(defun my-browse-url (url &optional arg)
- (interactive "P")
- (cond ((equal arg '(4))
- (funcall browse-url-secondary-browser-function url))
- ((equal arg '(16))
- (my-browse-url-tor-browser url))
- (t (luwak-open url))))
-
-;; this fixes clicking url buttons like those in gnus messages
-(defalias 'browse-url-button-open-url 'my-browse-url)
-
(defun my-browse-url-at-point (arg)
(interactive "P")
(my-browse-url (browse-url-url-at-point) arg))
diff --git a/emacs/.emacs.d/lisp/my/my-ytdl.el b/emacs/.emacs.d/lisp/my/my-ytdl.el
index 9118493..d3998ee 100644
--- a/emacs/.emacs.d/lisp/my/my-ytdl.el
+++ b/emacs/.emacs.d/lisp/my/my-ytdl.el
@@ -76,6 +76,18 @@
(if (eq type 'video) my-ytdl-video-args my-ytdl-audio-args)
(split-string urls)))))
+(defun my-ytdl-video-info (url)
+ "Given a video URL, return an alist of its properties."
+ (with-temp-buffer
+ (call-process my-ytdl-program nil t nil "-j" url)
+ (let ((start (point)))
+ (call-process-region
+ nil nil "jq" nil t nil
+ "pick(.webpage_url, .fulltitle, .description, .channel_url, .channel, .channel_follower_count, .thumbnail, .duration_string, .view_count, .upload_date, .like_count, .is_live, .was_live, .categories, .tags, .chapters, .availability)")
+ (goto-char start)
+ (json-read)))
+ )
+
;;; fixme: autoload
(defun my-ytdl-video (urls)
"Download videos with ytdl."
diff --git a/misc/.config/rofi/config.rasi b/misc/.config/rofi/config.rasi
index aab83de..041b095 100644
--- a/misc/.config/rofi/config.rasi
+++ b/misc/.config/rofi/config.rasi
@@ -33,7 +33,7 @@ configuration {
/* parse-hosts: false;*/
/* parse-known-hosts: true;*/
combi-modes: "run,drun";
- matching: "glob";
+ matching: "prefix";
/* tokenize: true;*/
/* m: "-5";*/
/* filter: ;*/