diff options
Diffstat (limited to 'attic/elisp/misc.el')
-rw-r--r-- | attic/elisp/misc.el | 102 |
1 files changed, 97 insertions, 5 deletions
diff --git a/attic/elisp/misc.el b/attic/elisp/misc.el index 2f1bcb0..558202e 100644 --- a/attic/elisp/misc.el +++ b/attic/elisp/misc.el @@ -813,11 +813,6 @@ :diminish ((disable-mouse-global-mode . ""))) (global-disable-mouse-mode) -;;; tmr -(use-package tmr - :ensure t - :init - (setq tmr-sound-file "/usr/share/sounds/freedesktop/stereo/message.oga")) ;;; pdf-tools (use-package pdf-tools :ensure t @@ -955,3 +950,100 @@ 'notmuch-tree-match-author-face 'notmuch-tree-no-match-author-face))) (propertize auth 'face face))) + +;; winttr + +(defun jao-weather (&optional wide) + (interactive "P") + (if (not wide) + (message "%s" + (jao-shell-string "curl -s" + "https://wttr.in/?format=%l++%m++%C+%c+%t+%w++%p")) + (jao-afio-goto-scratch) + (if-let ((b (get-buffer "*wttr*"))) + (progn (pop-to-buffer b) + (term-send-string (get-buffer-process nil) "clear;curl wttr.in\n")) + (jao-exec-in-term "curl wttr.in" "*wttr*")))) +(global-set-key (kbd "<f5>") #'jao-weather) + +;; so-long +(setq large-file-warning-threshold (* 200 1024 1024)) + +(use-package so-long + :ensure t + :diminish) +(global-so-long-mode 1) + +;;;; code reviews +(use-package code-review + :disabled t + :ensure t + :after forge + :bind (:map magit-status-mode-map + ("C-c C-r" . code-review-forge-pr-at-point))) + +;;;; jenkins +(use-package jenkins + :ensure t + :init + ;; one also needs jenkins-api-token, jenkins-username and jenkins-url + ;; optionally: jenkins-colwidth-id, jenkins-colwidth-last-status + (setq jenkins-colwidth-name 35) + :config + (defun jao-jenkins-first-job (&rest _) + (interactive) + (goto-char (point-min)) + (when (re-search-forward "^- Job" nil t) + (goto-char (match-beginning 0)))) + (add-hook 'jenkins-job-view-mode-hook #'jao-jenkins-first-job) + (advice-add 'jenkins-job-render :after #'jao-jenkins-first-job) + + (defun jenkins-refresh-console-output () + (interactive) + (let ((n (buffer-name))) + (when (string-match "\\*jenkins-console-\\([^-]+\\)-\\(.+\\)\\*$" n) + (jenkins-get-console-output (match-string 1 n) (match-string 2 n)) + (goto-char (point-max))))) + + :bind (:map jenkins-job-view-mode-map + (("n" . next-line) + ("p" . previous-line) + ("f" . jao-jenkins-first-job) + ("RET" . jenkins--show-console-output-from-job-screen)) + :map jenkins-console-output-mode-map + (("n" . next-line) + ("p" . previous-line) + ("g" . jenkins-refresh-console-output)))) + +;;; doric themes +(use-package doric-themes + :if (jao-is-darwin) + :ensure t + :demand t + :config + ;; These are the default values. + (setq doric-themes-to-toggle '(doric-light doric-marble)) + (setq doric-themes-to-rotate doric-themes-collection) + + (doric-themes-select 'doric-marble) + + (set-face-attribute 'default nil :family "Triplicate T4c" :height 120) + ;; (set-face-attribute 'default nil :family "0xProto" :height 110) + ;; (set-face-attribute 'default nil :family "Rec Mono Casual" :height 120) + ;; (set-face-attribute 'default nil :family "Rec Mono Linear" :height 120) + ;; (set-face-attribute 'default nil :family "Rec Mono Duotone" :height 120) + ;; (set-face-attribute 'default nil :family "Victor Mono" :height 120) + ;; (set-face-attribute 'variable-pitch nil :family "Aporetic Sans" :height 1.0) + ;; (set-face-attribute 'fixed-pitch nil :family "Aporetic Sans Mono" :height 1.0) + + :bind + (("<f5>" . doric-themes-toggle) + ("C-<f5>" . doric-themes-select) + ("M-<f5>" . doric-themes-rotate))) + +;;; gnuplot +(use-package gnuplot + :disabled t + :ensure t + :commands (gnuplot-mode gnuplot-make-buffer) + :init (add-to-list 'auto-mode-alist '("\\.gp$" . gnuplot-mode))) |