summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--early-init.el8
-rw-r--r--eshell/history23
-rw-r--r--eshell/lastdir5
-rw-r--r--init.el93
-rw-r--r--lisp/+elfeed.el75
-rw-r--r--lisp/+eshell.el8
-rw-r--r--lisp/+org.el8
-rw-r--r--lisp/+straight.el41
-rw-r--r--lisp/+tab-bar.el55
-rw-r--r--lisp/acdw.el24
-rw-r--r--lisp/fibs.el37
11 files changed, 315 insertions, 62 deletions
diff --git a/early-init.el b/early-init.el index 67b4271..840a649 100644 --- a/early-init.el +++ b/early-init.el
@@ -24,13 +24,13 @@
24;;(setq debug-on-error t) 24;;(setq debug-on-error t)
25(message "Loading early-init.el...") 25(message "Loading early-init.el...")
26 26
27;; (define-advice load (:before (feature &rest _)) 27(define-advice load (:before (feature &rest _))
28;; "Message the user when loading a library." 28 "Message the user when loading a library."
29;; (with-temp-message (format "Now loading: '%s'" feature))) 29 (with-temp-message (format "Now loading: '%s'" feature)))
30 30
31;;; Speed up init 31;;; Speed up init
32 32
33;; (setq gc-cons-threshold most-positive-fixnum) 33(setq gc-cons-threshold most-positive-fixnum)
34 34
35(add-hook 'emacs-startup-hook 35(add-hook 'emacs-startup-hook
36 (defun emacs-startup@restore-values () 36 (defun emacs-startup@restore-values ()
diff --git a/eshell/history b/eshell/history index 67689e1..81214c1 100644 --- a/eshell/history +++ b/eshell/history
@@ -12,3 +12,26 @@ vterm
12cat ~/Sync/fonts-debian.txt | sudo xargs apt install 12cat ~/Sync/fonts-debian.txt | sudo xargs apt install
13cat ~/Sync/fonts-debian.txt | sudo xargs apt install -y 13cat ~/Sync/fonts-debian.txt | sudo xargs apt install -y
14alias e='find-file $*' 14alias e='find-file $*'
15emacs --debug-init
16apt search xfce
17sudo apt install bluebird-gtk-theme blackbird-gtk-theme greybird-gtk-theme xfce4-mount-plugin
18apt search icons
19sudo apt install elementary-xfce-icon-theme
20apt search elementary
21apt search wingpanel
22apt search elementary
23cd ~/src
24ls
25git clone https://github.com/elementary/stylesheet.git elementary-gtk-stylesheet
26cd elementary-gtk-stylesheet/
27meson build --prefix=~/.local
28meson build --prefix=$HOME/.local
29sudo apt install meson ninja sassc
30sudo apt install meson sassc
31meson build --prefix=$HOME/.local
32cd build
33ninja install
34ninja clean
35sudo apt install gimp
36(derived-mode-p 'eshell-mode)
37echo $PAGER
diff --git a/eshell/lastdir b/eshell/lastdir index 1549824..552e2ce 100644 --- a/eshell/lastdir +++ b/eshell/lastdir
@@ -9,3 +9,8 @@
9/home/case/Sync 9/home/case/Sync
10/home/case 10/home/case
11/home/case/.emacs.d 11/home/case/.emacs.d
12/home/case/Sync/emacs/private
13/home/case/src
14/home/case/src/elementary-gtk-stylesheet
15/home/case/src/elementary-gtk-stylesheet/build
16~
diff --git a/init.el b/init.el index 0011380..f28da00 100644 --- a/init.el +++ b/init.el
@@ -413,13 +413,13 @@
413 ;; Brand new for Emacs 28: see https://ruzkuku.com/texts/emacs-mouse.html 413 ;; Brand new for Emacs 28: see https://ruzkuku.com/texts/emacs-mouse.html
414 ;; Actually, look at this as well: https://www.emacswiki.org/emacs/Mouse3 414 ;; Actually, look at this as well: https://www.emacswiki.org/emacs/Mouse3
415 (when (fboundp 'context-menu-mode) 415 (when (fboundp 'context-menu-mode)
416 ;; (:option context-menu-functions 416 (:option context-menu-functions
417 ;; '(context-menu-ffap 417 '(context-menu-ffap
418 ;; context-menu-region 418 context-menu-region
419 ;; context-menu-undo 419 context-menu-undo
420 ;; context-menu-dictionary)) 420 context-menu-dictionary))
421 (context-menu-mode +1)) 421 (context-menu-mode +1))
422 (dolist (click '( ; Fix scrolling in the margin 422 (dolist (click '(;; Fix scrolling in the margin
423 wheel-down double-wheel-down triple-wheel-down 423 wheel-down double-wheel-down triple-wheel-down
424 wheel-up double-wheel-up triple-wheel-up)) 424 wheel-up double-wheel-up triple-wheel-up))
425 (global-set-key (vector 'right-margin click) 'mwheel-scroll) 425 (global-set-key (vector 'right-margin click) 'mwheel-scroll)
@@ -505,6 +505,8 @@
505 ;; (let ((browse-url-browser-function browse-url-secondary-browser-function)) 505 ;; (let ((browse-url-browser-function browse-url-secondary-browser-function))
506 ;; (apply fn r))) 506 ;; (apply fn r)))
507 (with-eval-after-load 'org 507 (with-eval-after-load 'org
508 (setf (alist-get "\\.x?html?\\'" org-file-apps nil nil #'equal)
509 #'+org-open-html)
508 (org-clock-persistence-insinuate) 510 (org-clock-persistence-insinuate)
509 (org-link-set-parameters "tel" :follow #'+org-tel-open) 511 (org-link-set-parameters "tel" :follow #'+org-tel-open)
510 (setf (alist-get "\\.x?html?\\'" org-file-apps nil nil #'equal) 512 (setf (alist-get "\\.x?html?\\'" org-file-apps nil nil #'equal)
@@ -626,11 +628,52 @@
626 628
627(setup time 629(setup time
628 ;; TODO: +display-time-mode with MOAR customizations 630 ;; TODO: +display-time-mode with MOAR customizations
629 (:option display-time-format "%H:%M %a %e" 631 (:option display-time-default-load-average nil
630 display-time-default-load-average nil
631 display-time-mail-file :disable) 632 display-time-mail-file :disable)
633 (with-eval-after-load 'discord
634 (with-eval-after-load '+tab-bar
635 (:option display-time-string-forms
636 '((propertize (format-time-string "%H:%M %a %e" now)
637 'face '+tab-bar-extra
638 'help-echo (discord-date-string))
639 load
640 (if mail
641 (concat " "
642 (propertize
643 display-time-mail-string
644 'display `(when (and display-time-use-mail-icon
645 (display-graphic-p))
646 ,@display-time-mail-icon
647 ,@(when (and
648 display-time-mail-face
649 (memq
650 (plist-get
651 (cdr display-time-mail-icon)
652 :type)
653 '(pbm xbm)))
654 (let ((bg (face-attribute
655 display-time-mail-face
656 :background)))
657 (when (stringp bg)
658 (list :background bg)))))
659 'face display-time-mail-face))
660 "")
661 " "))))
662
632 (display-time-mode +1)) 663 (display-time-mode +1))
633 664
665(setup tramp
666 (el-patch-feature tramp)
667 (with-eval-after-load 'tramp
668 (el-patch-defun tramp-debug-buffer-command-completion-p (_symbol buffer)
669 "A predicate for Tramp interactive commands.
670They are completed by \"M-x TAB\" only in Tramp debug buffers."
671 (with-current-buffer buffer
672 (el-patch-wrap 2
673 (save-restriction
674 (widen)
675 (string-equal (buffer-substring 1 10) ";; Emacs:")))))))
676
634(setup (:straight 0x0) 677(setup (:straight 0x0)
635 (:option 0x0-default-server 'ttm) 678 (:option 0x0-default-server 'ttm)
636 (with-eval-after-load 'embark 679 (with-eval-after-load 'embark
@@ -1015,7 +1058,7 @@ See also `crux-reopen-as-root-mode'."
1015 (electric-cursor-mode +1)) 1058 (electric-cursor-mode +1))
1016 1059
1017(setup (:straight elfeed) 1060(setup (:straight elfeed)
1018 (:also-load +elfeed) 1061 (:require +elfeed)
1019 (+define-dir elfeed/ (sync/ "emacs/elfeed/" t)) 1062 (+define-dir elfeed/ (sync/ "emacs/elfeed/" t))
1020 (:option 1063 (:option
1021 elfeed-curl-program-name (executable-find "curl") 1064 elfeed-curl-program-name (executable-find "curl")
@@ -1046,10 +1089,7 @@ See also `crux-reopen-as-root-mode'."
1046 "&" #'+elfeed-show-browse-generic 1089 "&" #'+elfeed-show-browse-generic
1047 "RET" #'shr-browse-url) 1090 "RET" #'shr-browse-url)
1048 (:hook #'reading-mode) 1091 (:hook #'reading-mode)
1049 ;; (define-advice elfeed-show-entry (:after (&rest _)) 1092 (+elfeed-update-async-mode +1)))
1050 ;; "Re-flow the entry a short time after showing it."
1051 ;; (run-at-time 0.1 nil #'elfeed-show-refresh))
1052 ))
1053 1093
1054(setup (:straight elfeed-org) 1094(setup (:straight elfeed-org)
1055 (:also-load +org-capture) 1095 (:also-load +org-capture)
@@ -1212,6 +1252,8 @@ See also `crux-reopen-as-root-mode'."
1212(setup (:straight hungry-delete) 1252(setup (:straight hungry-delete)
1213 (:option hungry-delete-chars-to-skip " \t" 1253 (:option hungry-delete-chars-to-skip " \t"
1214 hungry-delete-join-reluctantly nil) 1254 hungry-delete-join-reluctantly nil)
1255 (+with-ensure-after-init
1256 (add-to-list 'hungry-delete-except-modes 'eshell-mode))
1215 (:bind-into paredit 1257 (:bind-into paredit
1216 ;; I define these functions here because they really require both packages 1258 ;; I define these functions here because they really require both packages
1217 ;; to make any sense. So, would I put them in `+hungry-delete' or 1259 ;; to make any sense. So, would I put them in `+hungry-delete' or
@@ -1297,6 +1339,17 @@ See also `crux-reopen-as-root-mode'."
1297 (setf (alist-get 'markdown-mode apheleia-mode-alist) 'markdownfmt) 1339 (setf (alist-get 'markdown-mode apheleia-mode-alist) 'markdownfmt)
1298 (setf (alist-get 'gfm-mode apheleia-mode-alist) 'markdownfmt)))) 1340 (setf (alist-get 'gfm-mode apheleia-mode-alist) 'markdownfmt))))
1299 1341
1342(setup (:straight mastodon)
1343 (:option mastodon-instance-url "https://tiny.tilde.website"
1344 mastodon-client--token-file (.etc "mastodon.plstore")
1345 mastodon-auth-source-file (car auth-sources)
1346 mastodon-tl--enable-proportional-fonts t
1347 mastodon-tl--show-avatars t)
1348 (:hook #'mastodon-async-mode
1349 #'reading-mode
1350 #'hl-line-mode
1351 #'lin-mode))
1352
1300(setup (:straight minions) 1353(setup (:straight minions)
1301 (minions-mode +1)) 1354 (minions-mode +1))
1302 1355
@@ -1649,13 +1702,6 @@ See also `crux-reopen-as-root-mode'."
1649 (sync/ "emacs/snippets" t))) 1702 (sync/ "emacs/snippets" t)))
1650 (yas-global-mode +1)) 1703 (yas-global-mode +1))
1651 1704
1652(setup (:straight zoom-frm))
1653
1654(setup (:straight zzz-to-char)
1655 (:require +zzz-to-char)
1656 (:option zzz-to-char-reach 1024)
1657 (:global "M-z" #'+zzz-to-char))
1658
1659(setup (:straight (ytdious 1705(setup (:straight (ytdious
1660 :host github :repo "spiderbit/ytdious" 1706 :host github :repo "spiderbit/ytdious"
1661 :fork (:host github :repo "duckwork/ytdious"))) 1707 :fork (:host github :repo "duckwork/ytdious")))
@@ -1664,3 +1710,10 @@ See also `crux-reopen-as-root-mode'."
1664 (concat "https://" +invidious-host) 1710 (concat "https://" +invidious-host)
1665 "https://invidious.snopyta.org")) 1711 "https://invidious.snopyta.org"))
1666 (:bind "y" #'+ytdious-watch)) 1712 (:bind "y" #'+ytdious-watch))
1713
1714(setup (:straight zoom-frm))
1715
1716(setup (:straight zzz-to-char)
1717 (:require +zzz-to-char)
1718 (:option zzz-to-char-reach (+bytes 1 :kib))
1719 (:global "M-z" #'+zzz-to-char))
diff --git a/lisp/+elfeed.el b/lisp/+elfeed.el index 9e5f787..ef93347 100644 --- a/lisp/+elfeed.el +++ b/lisp/+elfeed.el
@@ -2,8 +2,6 @@
2 2
3;;; Code: 3;;; Code:
4 4
5(require 'elfeed)
6
7;; https://karthinks.com/software/lazy-elfeed/ 5;; https://karthinks.com/software/lazy-elfeed/
8(defun +elfeed-scroll-up-command (&optional arg) 6(defun +elfeed-scroll-up-command (&optional arg)
9 "Scroll up or go to next feed item in Elfeed" 7 "Scroll up or go to next feed item in Elfeed"
@@ -31,5 +29,78 @@
31 (interactive) 29 (interactive)
32 (elfeed-show-visit t)) 30 (elfeed-show-visit t))
33 31
32;;; Fetch feeds async
33;; https://github.com/skeeto/elfeed/issues/367
34
35(defun +elfeed--update-message ()
36 (message "[Elfeed] Update in progress")
37 'ignore)
38
39(defvar +elfeed--update-running nil "Whether an update is currently running.")
40
41(defun +elfeed-update-command ()
42 (interactive)
43 (let ((script (expand-file-name "~/.local/bin/elfeed")))
44 (message "[Elfeed] Updating in the background.")
45 (setq +elfeed--update-running t)
46 (elfeed-db-save)
47 (advice-add 'elfeed :override #'+elfeed--update-message)
48 (ignore-errors (kill-buffer "*elfeed-search*"))
49 (ignore-errors (kill-buffer "*elfeed-log*"))
50 (elfeed-db-unload)
51 (unless (file-exists-p script)
52 (make-directory (file-name-directory script) :parents)
53 (with-temp-buffer
54 (insert "(progn\n"
55 " (load (locate-user-emacs-file \"early-init\"))\n"
56 " (straight-use-package 'elfeed)\n"
57 " (require 'elfeed)\n"
58 " (elfeed)\n"
59 " (elfeed-update)\n"
60 " (while (> (elfeed-queue-count-total) 0)\n"
61 " (sleep-for 5)\n"
62 " (message \"%s\" (elfeed-queue-count-total))\n"
63 " (accept-process-output))\n"
64 " (elfeed-db-save-safe)\n"
65 " (elfeed-db-gc-safe))")
66 (write-file script)))
67 (set-process-sentinel (start-process-shell-command
68 "Elfeed" nil (concat "emacs --script " script))
69 (lambda (a b)
70 (advice-remove 'elfeed #'+elfeed--update-message)
71 (setq +elfeed--update-running nil)
72 (message "[Elfeed] Background update %s."
73 (string-trim b))))))
74
75(defvar +elfeed--update-timer nil "Timer for `elfeed-update-command'.")
76(defvar +elfeed--update-first-time 6 "How long to wait for the first time.")
77(defvar +elfeed--update-repeat (* 60 15) "How long between updates.")
78
79(defun +elfeed--cancel-update-timer ()
80 "Cancel `+elfeed--update-timer'."
81 (unless +elfeed--update-running
82 (ignore-errors (cancel-timer +elfeed--update-timer))
83 (setq +elfeed--update-timer nil)))
84
85(defun +elfeed--reinstate-update-timer ()
86 "Reinstate `+elfeed--update-timer'."
87 (setq +elfeed--update-timer
88 (run-at-time +elfeed--update-first-time
89 +elfeed--update-repeat
90 #'+elfeed-update-command)))
91
92(define-minor-mode +elfeed-update-async-mode
93 "Minor mode to update elfeed async-style every 15 minutes."
94 :global t
95 (if +elfeed-update-async-mode
96 (progn ; enable
97 (+elfeed--reinstate-update-timer)
98 (advice-add 'elfeed :before '+elfeed--cancel-update-timer)
99 (advice-add 'elfeed-search-quit-window :after '+elfeed--reinstate-update-timer))
100 (progn ; disable
101 (advice-remove 'elfeed '+elfeed--cancel-update-timer)
102 (advice-remove 'elfeed-search-quit-window '+elfeed--reinstate-update-timer)
103 (+elfeed--cancel-update-timer))))
104
34(provide '+elfeed) 105(provide '+elfeed)
35;;; +elfeed.el ends here 106;;; +elfeed.el ends here
diff --git a/lisp/+eshell.el b/lisp/+eshell.el index 1f8677c..d49358d 100644 --- a/lisp/+eshell.el +++ b/lisp/+eshell.el
@@ -91,10 +91,10 @@ something, it's really annoying to work with."
91 ,@forms) 91 ,@forms)
92 (when (featurep 'eshell) 92 (when (featurep 'eshell)
93 `(dolist (buf (buffer-list)) 93 `(dolist (buf (buffer-list))
94 (with-current-buffer buf 94 (with-current-buffer buf
95 (when (derived-mode-p 'eshell-mode) 95 (when (derived-mode-p 'eshell-mode)
96 (+eshell@setup))))) 96 (+eshell@setup)))))
97 '(add-hook 'eshell-mode-hook #'+eshell@setup))) 97 (add-hook 'eshell-mode-hook #'+eshell@setup)))
98 98
99(provide '+eshell) 99(provide '+eshell)
100;;; +eshell.el ends here 100;;; +eshell.el ends here
diff --git a/lisp/+org.el b/lisp/+org.el index 0f2c625..57a4a16 100644 --- a/lisp/+org.el +++ b/lisp/+org.el
@@ -433,8 +433,12 @@ the deletion might narrow the column."
433 (when (and (memq this-char-type types) (memq prev-char-type types)) 433 (when (and (memq this-char-type types) (memq prev-char-type types))
434 (backward-char) 434 (backward-char)
435 (setq type prev-char-type)) ; what the fuckckckckck 435 (setq type prev-char-type)) ; what the fuckckckckck
436 (if (memq type types) 436 ;; Okay, so this ^ is pretty janky and doesn't /really/ work that well,
437 (progn (org-open-at-point arg)) 437 ;; especially on DEADLINE (and probably SCHEDULED) lines. However, since
438 ;; I really just want to open the list of URLs /most of the time/, I'm
439 ;; fixing it like this instead.
440 (unless (and (memq type types)
441 (ignore-errors (org-open-at-point arg)))
438 (while (not 442 (while (not
439 (progn 443 (progn
440 (org-back-to-heading) 444 (org-back-to-heading)
diff --git a/lisp/+straight.el b/lisp/+straight.el new file mode 100644 index 0000000..d00ad9a --- /dev/null +++ b/lisp/+straight.el
@@ -0,0 +1,41 @@
1;;; +straight.el --- Straight.el extras -*- lexical-binding: t; -*-
2
3;;; Commentary:
4
5;;; Code:
6
7(defun +straight-update-package (package &optional recursive)
8 "Update PACKAGE using straight.
9This pulls, rebuilds, and loads the updated PACKAGE."
10 (interactive (list (straight--select-package "Update package"
11 #'straight--installed-p)
12 current-prefix-arg))
13 (+with-message (format "Pulling package `%s'%s" package
14 (if recursive " and deps" ""))
15 (funcall (if recursive
16 #'straight-pull-package-and-deps
17 #'straight-pull-package)
18 package
19 :from-upstream))
20 (+with-message (format "Rebuilding package `%s'%s" package
21 (if recursive " and deps" ""))
22 (straight-rebuild-package package recursive))
23 (+with-message (format "Loading package `%s'%s" package
24 (if recursive " and deps" ""))
25 (ignore-errors (load-library (symbol-name package)))
26 (when recursive
27 (dolist (dep (straight--get-transitive-dependencies package))
28 (ignore-errors (load-library (symbol-name package)))))))
29
30(defun +straight-update-all (from-upstream)
31 "Update all installed packages using straight.
32This pulls and rebuilds all packages at once. It does not reload
33all of them, for reasons that should be obvious.
34
35With a prefix argument, it also pulls the packages FROM-UPSTREAM."
36 (interactive "P")
37 (straight-pull-all from-upstream)
38 (straight-rebuild-all))
39
40(provide '+straight)
41;;; +straight.el ends here
diff --git a/lisp/+tab-bar.el b/lisp/+tab-bar.el index 2e9198c..b11be2c 100644 --- a/lisp/+tab-bar.el +++ b/lisp/+tab-bar.el
@@ -22,7 +22,7 @@
22 `((global menu-item ,(string-trim-right 22 `((global menu-item ,(string-trim-right
23 (format-mode-line mode-line-misc-info)) 23 (format-mode-line mode-line-misc-info))
24 24
25 ignore))) 25 ignore :help (discord-date-string))))
26 26
27(defvar +tab-bar-show-original nil 27(defvar +tab-bar-show-original nil
28 "Original value of `tab-bar-show'.") 28 "Original value of `tab-bar-show'.")
@@ -129,35 +129,30 @@ Used by `tab-bar-format-menu-bar'."
129;;; Tab bar format tabs 129;;; Tab bar format tabs
130 130
131(require 'el-patch) 131(require 'el-patch)
132 132(el-patch-feature tab-bar)
133(el-patch-defun tab-bar--format-tab (tab i) 133(with-eval-after-load 'tab-bar
134 (append 134 (el-patch-defun tab-bar--format-tab (tab i)
135 (el-patch-remove 135 "Format TAB using its index I and return the result as a keymap."
136 `((,(intern (format "sep-%i" i)) menu-item ,(tab-bar-separator) ignore))) 136 (append
137 (cond 137 (el-patch-remove
138 ((eq (car tab) 'current-tab) 138 `((,(intern (format "sep-%i" i)) menu-item ,(tab-bar-separator) ignore)))
139 `((current-tab 139 (cond
140 menu-item 140 ((eq (car tab) 'current-tab)
141 ,(funcall tab-bar-tab-name-format-function tab i) 141 `((current-tab
142 ignore 142 menu-item
143 :help "Current tab"))) 143 ,(funcall tab-bar-tab-name-format-function tab i)
144 (t 144 ignore
145 `((,(intern (format "tab-%i" i)) 145 :help "Current tab")))
146 menu-item 146 (t
147 ,(funcall tab-bar-tab-name-format-function tab i) 147 `((,(intern (format "tab-%i" i))
148 ,(or 148 menu-item
149 (alist-get 'binding tab) 149 ,(funcall tab-bar-tab-name-format-function tab i)
150 `(lambda () 150 ,(alist-get 'binding tab)
151 (interactive) 151 :help "Click to visit tab"))))
152 (tab-bar-select-tab ,i))) 152 (when (alist-get 'close-binding tab)
153 :help "Click to visit tab")))) 153 `((,(if (eq (car tab) 'current-tab) 'C-current-tab (intern (format "C-tab-%i" i)))
154 `((,(if (eq (car tab) 'current-tab) 'C-current-tab (intern (format "C-tab-%i" i))) 154 menu-item ""
155 menu-item "" 155 ,(alist-get 'close-binding tab)))))))
156 ,(or
157 (alist-get 'close-binding tab)
158 `(lambda ()
159 (interactive)
160 (tab-bar-close-tab ,i)))))))
161 156
162 157
163;; Emacs 27 158;; Emacs 27
diff --git a/lisp/acdw.el b/lisp/acdw.el index 28ea108..34d1bc4 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el
@@ -248,5 +248,29 @@ With optional ARG (\\[universal-argument]), just split."
248 (interactive "P") 248 (interactive "P")
249 (+split-window-then :below arg)) 249 (+split-window-then :below arg))
250 250
251(defun +bytes (number unit)
252 "Convert NUMBER UNITs to bytes.
253UNIT can be one of :kb, :mb, :gb, :tb, :pb, :eb, :zb, :yb; :kib, :mib, :gib,
254:tib, :pib, :eib, :zib, :yib."
255 (* number (pcase unit
256 ;; Base 10 units
257 (:kb 1000)
258 (:mb (* 1000 1000))
259 (:gb (* 1000 1000 1000))
260 (:tb (* 1000 1000 1000 1000))
261 (:pb (* 1000 1000 1000 1000 1000))
262 (:eb (* 1000 1000 1000 1000 1000 1000))
263 (:zb (* 1000 1000 1000 1000 1000 1000 1000))
264 (:yb (* 1000 1000 1000 1000 1000 1000 1000 1000))
265 ;; Base 2 units
266 (:kib 1024)
267 (:mib (* 1024 1024))
268 (:gib (* 1024 1024 1024))
269 (:tib (* 1024 1024 1024 1024))
270 (:pib (* 1024 1024 1024 1024 1024))
271 (:eib (* 1024 1024 1024 1024 1024 1024))
272 (:zib (* 1024 1024 1024 1024 1024 1024 1024))
273 (:yib (* 1024 1024 1024 1024 1024 1024 1024 1024)))))
274
251(provide 'acdw) 275(provide 'acdw)
252;;; acdw.el ends here 276;;; acdw.el ends here
diff --git a/lisp/fibs.el b/lisp/fibs.el new file mode 100644 index 0000000..545c2a7 --- /dev/null +++ b/lisp/fibs.el
@@ -0,0 +1,37 @@
1;;; fibs.el --- Play backgammon with FIBS -*- lexical-binding: t; -*-
2
3;;; Commentary:
4
5;; fibs.com is one of the oldest backgammon servers out there, and it's
6;; accessible via telnet. This package provides a wrapper to enable you to play
7;; backgammon on fibs.com more easily than just opening a telnet session
8;; yourself.
9
10;;; TODO:
11
12;; - Automatically log in.
13;; - Add a `fibs-quit' function to kill the telnet server and buffer.
14
15;;; Code:
16
17(require 'telnet)
18
19(defgroup fibs nil
20 "Customizations for FIBS, the First Internet Backgammon Server."
21 :group 'games)
22
23(defcustom fibs-server "fibs.com"
24 "The server to connect to FIBS with."
25 :type 'string)
26
27(defcustom fibs-port 4321
28 "The port to connect to FIBS with."
29 :type 'number)
30
31;;;###autoload
32(defun fibs ()
33 (interactive)
34 (telnet fibs-server fibs-port))
35
36(provide 'fibs)
37;;; fibs.el ends here