summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--init.org148
1 files changed, 7 insertions, 141 deletions
diff --git a/init.org b/init.org
index f01bda4..ef27335 100644
--- a/init.org
+++ b/init.org
@@ -908,79 +908,6 @@
calendar-daylight-time-zone-name)))))
#+END_SRC
*** Weather
-***** Metar
- #+BEGIN_SRC emacs-lisp
- (use-package metar
- :ensure t
- :config
- (setq jao-metar-station
- (car (metar-find-station-by-latitude/longitude (calendar-latitude)
- (calendar-longitude))))
- (defun jao-metar-wind-direction (degrees pref)
- (if (numberp degrees)
- (concat pref (cond ((< 350 degrees 10) "N")
- ((<= 10 degrees 80) "NE")
- ((< 80 degrees 100) "E")
- ((<= 100 degrees 170) "SE")
- ((< 170 degrees 190) "S")
- ((<= 190 degrees 260) "SW")
- ((< 260 degrees 280) "W")
- ((<= 280 degrees 350) "NW")
- (t (number-to-string degrees))))
- ""))
-
- (defvar jao-metar-phenomena-alist
- '(("clear" . "šŸŒ£")
- ("sunny" . "šŸŒ£")
- ("fair" . "šŸŒ£")
- ("ice crystals" . "ā„")
- ("light snow" . "šŸŒØ")
- ("snow" . "šŸŒØ")
- ("mostly clear" . "šŸŒ¤")
- ("mostly sunny" . "šŸŒ¤")
- ("partly sunny" . "ā›…")
- ("obscured" . "šŸŒ")
- ("cloudy" . "ā˜")
- ("overcast" . "ā˜")
- ("partly cloudy" . "ā›…")
- ("mostly cloudy" . "ā˜")
- ("considerable cloudiness" . "ā›ˆ")))
-
- (defun jao-metar--phenomena (ph)
- (if-let ((i (cdr (assoc-string (downcase (or ph ""))
- jao-metar-phenomena-alist))))
- (format "%s %s" ph i)
- ph))
-
- (defun jao-metar ()
- (interactive)
- (let* ((rec (metar-get-record jao-metar-station))
- (info (metar-decode rec))
- (ph (or (metar-phenomena (cdr rec))
- (cdr (assoc 'phenomena info))))
- (tm (when info
- (float-time (time-since (cdr (assoc 'timestamp info))))))
- (mins (when tm (/ (truncate tm) 60))))
- (message "%s" info)
- (if info
- (message "%s: %dĀ°%c, %s%d%% humidity, %d km/h%s, %.1f %S (%s)"
- jao-metar-station
- (cadr (assoc 'temperature info))
- (cond
- ((eq (cdr (assq 'temperature metar-units)) 'degC) ?C)
- ((eq (cdr (assq 'temperature metar-units)) 'degF) ?F))
- (if ph (format "%s " (jao-metar--phenomena ph)) "")
- (cadr (assoc 'humidity info))
- (truncate (car (plist-get (cdr (assoc 'wind info)) :speed)))
- (jao-metar-wind-direction
- " "
- (car (plist-get (cdr (assoc 'wind info)) :direction)))
- (cadr (assoc 'pressure info))
- (cddr (assoc 'pressure info))
- (format "%d mins old" mins))
- (message "No weather information found, sorry."))))
- :bind (("<f5>" . jao-metar)))
- #+END_SRC
***** winttr
#+begin_src emacs-lisp
(defun jao-weather (&optional wide)
@@ -994,9 +921,6 @@
(progn (pop-to-buffer b)
(vterm-send-string "clear;curl wttr.in\n"))
(jao-exec-in-vterm "curl wttr.in" "*wttr*"))))
- #+end_src
-***** keybidings
- #+begin_src emacs-lisp
(global-set-key (kbd "<f5>") #'jao-weather)
#+end_src
*** Timers
@@ -1030,8 +954,8 @@
(require 'wgrep)
#+end_src
*** dired
- - [[https://www.masteringemacs.org/article/working-multiple-files-dired][Working with multiple files in dired - Mastering Emacs]]
- #+BEGIN_SRC emacs-lisp
+ - [[https://www.masteringemacs.org/article/working-multiple-files-dired][Working with multiple files in dired - Mastering Emacs]]
+ #+begin_src emacs-lisp
(require 'dired)
(require 'dired-x nil t)
(put 'dired-find-alternate-file 'disabled nil)
@@ -1054,16 +978,9 @@
#+END_SRC
***** Dired packages
#+BEGIN_SRC emacs-lisp
- ;; colorful dired
- (use-package diredfl
- :ensure t
- :disabled t
- :config (diredfl-global-mode 1))
-
(use-package dired-git-info
:ensure t
:bind (:map dired-mode-map (")" . dired-git-info-mode)))
-
#+END_SRC
* General editing
*** Completion
@@ -2133,7 +2050,7 @@
:ensure t
:bind (("C-x v p" . git-messenger:popup-message)))
- (use-package gist :ensure t :disabled t)
+ (use-package gist :ensure t)
(use-package git-timemachine :ensure t)
@@ -2280,17 +2197,8 @@
#'next-error-buffer-on-selected-frame
next-error-verbose t)
#+end_src
-*** Flycheck/make
+*** Flymake
#+begin_src emacs-lisp
- (use-package flycheck
- :disabled t
- :ensure t
- :config
- (jao-define-attached-buffer "^\\*Flycheck error.*\\*\\'")
- :custom ((flycheck-mode-line-prefix "Ļ•")
- (flycheck-keymap-prefix (kbd "s-f")))
- :hook (prog-mode . flycheck-mode))
-
(use-package flymake
:ensure t
:custom ((flymake-mode-line-format '(" " flymake-mode-line-counters)))
@@ -2301,9 +2209,8 @@
("s-f i" . flymake-show-diagnostic)
("s-f f" . flymake-show-diagnostics-buffer)
("s-f l" . consult-flymake))))
-
#+end_src
-*** Language servers
+*** Eglot
#+begin_src emacs-lisp
(use-package eglot
:ensure t
@@ -2311,46 +2218,9 @@
(elixir-mode . eglot)))
(jao-define-attached-buffer "\\*eldoc\\( .*\\)?\\*" 0.33)
-
- (use-package yasnippet
- :disabled t
- :ensure t
- :hook ((erlang-mode . yas-minor-mode-on)
- (erlixir-mode . yas-minor-mode-on))
- :diminish ((yas-minor-mode . "")))
-
- (use-package lsp-mode
- :disabled t
- :ensure t
- :commands (lsp lsp-deferred)
- :custom (lsp-auto-guess-root t)
- :config
- (jao-define-attached-buffer "\\*lsp-help\\*" 33)
- :hook ((haskell-mode . lsp)
- (elixir-mode . lsp)
- (erlang-mode . lsp))
- :diminish " š›Œ")
-
- (use-package lsp-haskell
- :disabled t
- :ensure t)
-
- (use-package dante
- :disabled t
- :ensure t
- :after haskell-mode
- :commands 'dante-mode
- :config
- (flycheck-add-next-checker 'haskell-dante '(info . haskell-hlint))
- (setq dante-methods '(new-build bare-cabal))
- :hook ((haskell-mode . dante-mode)))
#+end_src
* Programming languages
*** Elisp
- Reporting bugs
- #+begin_src emacs-lisp
- (use-package debbugs :ensure t :disabled t)
- #+end_src
Some helper packages
#+BEGIN_SRC emacs-lisp
(use-package edit-list :ensure t)
@@ -2756,17 +2626,13 @@
*** Python
***** Virtual envs (with eshell support)
See also [[https://github.com/porterjamesj/virtualenvwrapper.el][the docs]].
- #+BEGIN_SRC emacs-lisp
+ #+begin_src emacs-lisp
(use-package virtualenvwrapper
:ensure t
:config
(venv-initialize-eshell)
(jao-compilation-env "VIRTUAL_ENV"))
- #+END_SRC
-***** Python notebooks (ein)
- #+BEGIN_SRC emacs-lisp
- (use-package ein :ensure t :disabled t)
- #+END_SRC
+ #+end_src
*** Coq
#+begin_src emacs-lisp :load no
(use-package proof-general