summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.config/i3/config4
-rw-r--r--.emacs.d/init.el51
-rw-r--r--.emacs.d/lisp/bandali-gnus.el4
-rw-r--r--.emacs.d/lisp/bandali-message.el1
-rw-r--r--.emacs.d/lisp/ffs/ffs.el32
5 files changed, 77 insertions, 15 deletions
diff --git a/.config/i3/config b/.config/i3/config
index dc8305c..8547088 100644
--- a/.config/i3/config
+++ b/.config/i3/config
@@ -131,7 +131,8 @@ bindsym $mod2+Shift+bracketright exec --no-startup-id b-ws-util i3 move next f
set $mode_system System (l)ock | (e)xit i3 | (s)uspend | (h)ibernate | (r)eboot | (S)hutdown
mode "$mode_system" {
- bindsym l exec i3lock, mode "default"
+ # bindsym l exec i3lock, mode "default"
+ bindsym l exec xscreensaver-command -lock, mode "default"
bindsym e exec i3-msg exit, mode "default"
bindsym s exec systemctl suspend, mode "default"
bindsym h exec systemctl hibernate, mode "default"
@@ -200,6 +201,7 @@ for_window [class="^.*"] border pixel 4
# i3bar and system info from i3status
bar {
+ # mode hide
status_command i3status | my-i3status
tray_output primary
}
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index c3c9d1e..0d8852b 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -913,7 +913,58 @@ for all frames."
(add-to-list 'load-path (b/lisp "ffs"))
(run-with-idle-timer 0.5 nil #'require 'ffs)
(with-eval-after-load 'ffs
+ (setq ffs-default-face-height 250)
(global-set-key (kbd "C-c f s") #'ffs))
+(add-hook 'ffs-start-hook
+ (lambda ()
+ (mapc
+ (lambda (mode) (funcall mode 1)) ; enable
+ '(ffs--no-mode-line-minor-mode
+ ffs--no-cursor-minor-mode))
+ (mapc
+ (lambda (mode) (funcall mode -1)) ; disable
+ '(show-paren-local-mode
+ display-battery-mode
+ display-fill-column-indicator-mode
+ flyspell-mode
+ tool-bar-mode
+ menu-bar-mode
+ scroll-bar-mode))
+ (fringe-mode 0)))
+(add-hook 'ffs-quit-hook
+ (lambda ()
+ (mapc
+ (lambda (mode) (funcall mode -1)) ; disable
+ '(ffs--no-mode-line-minor-mode
+ ffs--no-cursor-minor-mode))
+ (mapc
+ (lambda (mode) (funcall mode 1)) ; enable
+ '(show-paren-local-mode
+ display-battery-mode
+ display-fill-column-indicator-mode
+ flyspell-mode
+ tool-bar-mode
+ menu-bar-mode
+ scroll-bar-mode))
+ (fringe-mode nil)))
+
+;; (defun my-display-centered-paragraph (text)
+;; (let* ((buffer (get-buffer-create "*demo*"))
+;; (window (display-buffer buffer)))
+;; (with-current-buffer buffer
+;; (with-selected-window window
+;; (let ((inhibit-read-only t)
+;; (window-height (window-body-height window t))
+;; content-height)
+;; (delete-region (point-min) (point-max))
+;; (insert text)
+;; (set-window-start window (point-min))
+;; (unless (looking-back "\n$")
+;; (insert "\n"))
+;; (setq content-height (cdr (posn-x-y (posn-at-point))))
+;; (goto-char (point-min))
+;; (insert (propertize "\n" 'line-height
+;; (/ (- window-height content-height) 2))))))))
(add-to-list 'load-path (b/lisp "debian-el"))
(run-with-idle-timer 0.5 nil #'require 'debian-el)
diff --git a/.emacs.d/lisp/bandali-gnus.el b/.emacs.d/lisp/bandali-gnus.el
index b771b78..04b1202 100644
--- a/.emacs.d/lisp/bandali-gnus.el
+++ b/.emacs.d/lisp/bandali-gnus.el
@@ -96,6 +96,10 @@
(from ".+-\\(owner\\|bounces\\)@\\(non\\)?gnu\\.org" "listmod")
;; gnu
(list ".*<\\(.*\\)\\.\\(non\\)?gnu\\.org>.*" "l.\\1")
+ ;; board-eval
+ (|
+ (list ".*<.*\\.board-eval\\.fsf\\.org>.*" "l.board-eval")
+ (from ".*@board-eval\\.fsf\\.org" "l.board-eval"))
;; fsf
(list ".*<\\(.*\\)\\.fsf\\.org>.*" "l.\\1")
;; cfarm
diff --git a/.emacs.d/lisp/bandali-message.el b/.emacs.d/lisp/bandali-message.el
index 3ea8643..f9f0873 100644
--- a/.emacs.d/lisp/bandali-message.el
+++ b/.emacs.d/lisp/bandali-message.el
@@ -50,6 +50,7 @@
message-elide-ellipsis "[...]\n"
;; message-cite-style 'message-cite-style-bandali
message-citation-line-format "%N writes:\n"
+ ;; message-citation-line-format "On %a, %d %b %Y, %N wrote:\n"
message-citation-line-function 'message-insert-formatted-citation-line
message-confirm-send t
message-fill-column 70
diff --git a/.emacs.d/lisp/ffs/ffs.el b/.emacs.d/lisp/ffs/ffs.el
index 99f2097..043fcb4 100644
--- a/.emacs.d/lisp/ffs/ffs.el
+++ b/.emacs.d/lisp/ffs/ffs.el
@@ -1,6 +1,6 @@
;;; ffs.el --- Form Feed Slides mode -*- lexical-binding: t; -*-
-;; Copyright (C) 2022 Amin Bandali <bandali@gnu.org>
+;; Copyright (c) 2022-2023 Amin Bandali <bandali@gnu.org>
;; Author: Amin Bandali <bandali@gnu.org>
;; Version: 0.1.0
@@ -58,6 +58,16 @@ during the ffs presentation."
:type '(choice (const nil)
(integer :value 300)))
+(defcustom ffs-start-hook nil
+ "Hooks to perform when starting presenting."
+ :group 'ffs
+ :type 'hook)
+
+(defcustom ffs-quit-hook nil
+ "Hooks to perform when quitting presenting."
+ :group 'ffs
+ :type 'hook)
+
(defcustom ffs-edit-buffer-name "*ffs-edit*"
"The name of the ffs-edit buffer used when editing a slide."
:group 'ffs
@@ -206,17 +216,13 @@ speaker notes buffer (if any)."
"Start the presentation."
(interactive)
(ffs-minor-mode 1)
- (ffs--no-mode-line-minor-mode 1)
- (ffs--no-cursor-minor-mode 1)
(when (integerp ffs-default-face-height)
(setq-local
ffs--old-default-face-height
(face-attribute 'default :height))
(face-remap-add-relative
'default :height ffs-default-face-height))
- (show-paren-local-mode -1)
- (display-battery-mode -1)
- (flyspell-mode -1)
+ (run-hooks 'ffs-start-hook)
(narrow-to-page))
(defun ffs-quit ()
@@ -227,11 +233,7 @@ speaker notes buffer (if any)."
(when (integerp ffs-default-face-height)
(face-remap-add-relative
'default :height ffs--old-default-face-height))
- (show-paren-local-mode 1)
- (display-battery-mode 1)
- (flyspell-mode 1)
- (ffs--no-mode-line-minor-mode -1)
- (ffs--no-cursor-minor-mode -1)
+ (run-hooks 'ffs-quit-hook)
(if n
(progn
(goto-char (point-min))
@@ -248,6 +250,7 @@ slide will be added above/before the current slide, and if it is
current slide. The logic is implemented in `ffs-edit-done'."
(interactive)
(let* ((b (current-buffer))
+ (fc fill-column)
(m major-mode)
(n (buffer-narrowed-p))
(s (if add-above-or-below ; if we are adding a new slide
@@ -264,7 +267,8 @@ current slide. The logic is implemented in `ffs-edit-done'."
(set-buffer-modified-p nil)
(setq-local
ffs--edit-source-buffer b
- ffs--new-location add-above-or-below)
+ ffs--new-location add-above-or-below
+ fill-column fc)
(message
(substitute-command-keys "Edit, then use `\\[ffs-edit-done]' \
to apply your changes or `\\[ffs-edit-discard]' to discard them."))))
@@ -302,11 +306,11 @@ to apply your changes or `\\[ffs-edit-discard]' to discard them."))))
((eq l 'add-above)
(backward-page)
(insert (format "\n%s " s))
- (setq f #'ffs-previous-slide))
+ (setq f #'ffs-goto-previous))
((eq l 'add-below)
(forward-page)
(insert (format "\n%s " s))
- (setq f #'ffs-next-slide))
+ (setq f #'ffs-goto-next))
((null l)
(narrow-to-page)
(delete-region (point-min) (point-max))