From 20b58f4d603c55b1aba42cc375a97b8708f725ba Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Sun, 8 Jan 2023 10:28:25 -0500 Subject: [PATCH 01/16] * .emacs.d/init.el: Show system volumes in mode-line. Uses pamixer to get or set the output (speakers or headphones) and input (microphone) volumes. --- .emacs.d/init.el | 55 +++++++++++++++++++++++++++++++++++ .emacs.d/lisp/bandali-exwm.el | 47 +++++++++++++++++++++++++----- 2 files changed, 95 insertions(+), 7 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index d9ec432..94f1ccb 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -210,6 +210,61 @@ (setq battery-mode-line-format " [%p%% %t]") (display-battery-mode)) +(progn ; display system volume in mode-line + (defun b/get-volume-level (&optional mic) + "Returns the current system sound volume. +If MIC is non-nil, it returns the microphone volume instead." + (string-to-number + (string-trim + (shell-command-to-string + (mapconcat + #'identity + `("pamixer" ,(when mic "--default-source") "--get-volume") + " "))))) + + (defun b/set-volume-level (level &optional mic) + "Set the system sound volume to LEVEL. +If MIC is non-nil, set the volume level for the microphone +instead." + (let ((v (if mic 'b/volume-level-mic 'b/volume-level))) + (eval `(setq ,v ,level)))) + + (defun b/get-volume-mute (&optional mic) + "Returns t if system sound is currently muted. +If MIC is non-nil, it instead returns t if the microphone is +muted." + (string= + "true" + (string-trim + (shell-command-to-string + (mapconcat + #'identity + `("pamixer" ,(when mic "--default-source") "--get-mute") + " "))))) + + (defun b/set-volume-mute (mute &optional mic) + "Set the system sound mutedness to MUTE. +If MIC is non-nil, set the mutedness for the microphone instead." + (let ((v (if mic 'b/volume-mute-mic 'b/volume-mute))) + (eval `(setq ,v ,mute)))) + + (defvar b/volume-level (b/get-volume-level)) + (defvar b/volume-mute (b/get-volume-mute)) + (defvar b/volume-level-mic (b/get-volume-level 'mic)) + (defvar b/volume-mute-mic (b/get-volume-mute 'mic)) + + (setq-default + mode-line-format + (append + mode-line-format + '((:eval + (format + " [%s%%%%%s %s%%%%%s]" + (number-to-string b/volume-level) + (if b/volume-mute "-" "+") + (number-to-string b/volume-level-mic) + (if b/volume-mute-mic "-" "+"))))))) + ;; (with-eval-after-load 'fringe ;; ;; smaller fringe ;; (fringe-mode '(3 . 1))) diff --git a/.emacs.d/lisp/bandali-exwm.el b/.emacs.d/lisp/bandali-exwm.el index 3072765..4cd2d1c 100644 --- a/.emacs.d/lisp/bandali-exwm.el +++ b/.emacs.d/lisp/bandali-exwm.el @@ -181,30 +181,63 @@ around if needed." ([?\s-\;] . (lambda () (interactive) (start-process-shell-command - "dmneu-pamixer" nil "dmenu-pamixer"))) + "dmneu-pamixer" nil "dmenu-pamixer") + (b/set-volume-level (b/get-volume-level)) + (force-mode-line-update))) ([XF86AudioMute] . ; borken on my X200 :-( (lambda () (interactive) - (start-process "" nil "pamixer" "--toggle-mute"))) + (start-process "" nil "pamixer" "--toggle-mute") + (b/set-volume-mute (b/get-volume-mute)) + (force-mode-line-update))) + ([\s-XF86AudioMute] . ; toggle mic mute + (lambda () + (interactive) + (start-process + "" nil "pamixer" "--default-source" "--toggle-mute") + (b/set-volume-mute (b/get-volume-mute 'mic) 'mic) + (force-mode-line-update))) ([XF86Launch1] . (lambda () (interactive) - (start-process "" nil "pamixer" "--toggle-mute"))) + (start-process "" nil "pamixer" "--toggle-mute") + (b/set-volume-mute (b/get-volume-mute)) + (force-mode-line-update))) ([\s-XF86Launch1] . ; toggle mic mute (lambda () (interactive) (start-process - "" nil "pamixer" "--default-source" "--toggle-mute"))) + "" nil "pamixer" "--default-source" "--toggle-mute") + (b/set-volume-mute (b/get-volume-mute 'mic) 'mic) + (force-mode-line-update))) ([XF86AudioLowerVolume] . (lambda () (interactive) (start-process - "" nil "pamixer" "--allow-boost" "--decrease" "5"))) + "" nil "pamixer" "--allow-boost" "--decrease" "5") + (b/set-volume-level (b/get-volume-level)) + (force-mode-line-update))) ([XF86AudioRaiseVolume] . (lambda () (interactive) (start-process - "" nil "pamixer" "--allow-boost" "--increase" "5"))) + "" nil "pamixer" "--allow-boost" "--increase" "5") + (b/set-volume-level (b/get-volume-level)) + (force-mode-line-update))) + ([\s-XF86AudioLowerVolume] . + (lambda () + (interactive) + (start-process + "" nil "pamixer" "--default-source" "--decrease" "5") + (b/set-volume-level (b/get-volume-level 'mic) 'mic) + (force-mode-line-update))) + ([\s-XF86AudioRaiseVolume] . + (lambda () + (interactive) + (start-process + "" nil "pamixer" "--default-source" "--increase" "5") + (b/set-volume-level (b/get-volume-level 'mic) 'mic) + (force-mode-line-update))) ([XF86AudioPlay] . (lambda () (interactive) @@ -319,7 +352,7 @@ around if needed." '((:eval (format " [%s]" (number-to-string - exwm-workspace-current-index))))))) + exwm-workspace-current-index))))))) (with-eval-after-load 'exwm-layout (setq exwm-layout-show-all-buffers t)) -- 2.20.1 From 81b33a828705837b380db3147fbff3e313da4e27 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Mon, 9 Jan 2023 01:49:21 -0500 Subject: [PATCH 02/16] Clean up the system volume in mode-line display code --- .emacs.d/init.el | 90 +++++++++++++++++++---------------- .emacs.d/lisp/bandali-exwm.el | 29 ++++------- 2 files changed, 58 insertions(+), 61 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 94f1ccb..ad9b091 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -1,6 +1,6 @@ ;;; init.el --- bandali's emacs configuration -*- lexical-binding: t -*- -;; Copyright (C) 2018-2022 Amin Bandali +;; Copyright (c) 2018-2023 Amin Bandali ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -211,47 +211,53 @@ (display-battery-mode)) (progn ; display system volume in mode-line - (defun b/get-volume-level (&optional mic) - "Returns the current system sound volume. -If MIC is non-nil, it returns the microphone volume instead." - (string-to-number - (string-trim - (shell-command-to-string - (mapconcat - #'identity - `("pamixer" ,(when mic "--default-source") "--get-volume") - " "))))) - - (defun b/set-volume-level (level &optional mic) - "Set the system sound volume to LEVEL. -If MIC is non-nil, set the volume level for the microphone -instead." - (let ((v (if mic 'b/volume-level-mic 'b/volume-level))) - (eval `(setq ,v ,level)))) - - (defun b/get-volume-mute (&optional mic) - "Returns t if system sound is currently muted. -If MIC is non-nil, it instead returns t if the microphone is -muted." - (string= - "true" - (string-trim - (shell-command-to-string - (mapconcat - #'identity - `("pamixer" ,(when mic "--default-source") "--get-mute") - " "))))) - - (defun b/set-volume-mute (mute &optional mic) - "Set the system sound mutedness to MUTE. -If MIC is non-nil, set the mutedness for the microphone instead." - (let ((v (if mic 'b/volume-mute-mic 'b/volume-mute))) - (eval `(setq ,v ,mute)))) - - (defvar b/volume-level (b/get-volume-level)) - (defvar b/volume-mute (b/get-volume-mute)) - (defvar b/volume-level-mic (b/get-volume-level 'mic)) - (defvar b/volume-mute-mic (b/get-volume-mute 'mic)) + (defvar b/volume-level 0) + (defvar b/volume-mute nil) + (defvar b/volume-level-mic 0) + (defvar b/volume-mute-mic nil) + + (defun b/volume-get (&optional use-default-source) + "Get the default sink volume and mute state. +If USE-DEFAULT-SOURCE is non-nill, use the default source (e.g. a +microphone) instead of the default sink." + (pcase (split-string ; expecting: (e.g. true 15) + (string-trim + (shell-command-to-string + (mapconcat + #'identity + `("pamixer" + ,(when use-default-source "--default-source") + "--get-volume" + "--get-mute") + " ")))) + (`(,m ,v) + (let ((mute (string= "true" m)) + (volume (string-to-number v))) + `(,mute ,volume))))) + + (defun b/volume-update () + "Update system sound volume as displayed in mode-line." + (let ((changed)) + (pcase (b/volume-get) + (`(,mute ,volume) + (unless (eq mute b/volume-mute) + (setq b/volume-mute mute + changed t)) + (unless (= volume b/volume-level) + (setq b/volume-level volume + changed t)))) + (pcase (b/volume-get 'mic) + (`(,mute ,volume) + (unless (eq mute b/volume-mute-mic) + (setq b/volume-mute-mic mute + changed t)) + (unless (= volume b/volume-level-mic) + (setq b/volume-level-mic volume + changed t)))) + (when changed + (force-mode-line-update)))) + + (defvar b/volume-timer (run-at-time nil 5 #'b/volume-update)) (setq-default mode-line-format diff --git a/.emacs.d/lisp/bandali-exwm.el b/.emacs.d/lisp/bandali-exwm.el index 4cd2d1c..e7f83ce 100644 --- a/.emacs.d/lisp/bandali-exwm.el +++ b/.emacs.d/lisp/bandali-exwm.el @@ -1,6 +1,6 @@ ;;; bandali-exwm.el --- bandali's EXWM configuration -*- lexical-binding: t; -*- -;; Copyright (C) 2018-2022 Amin Bandali +;; Copyright (c) 2018-2023 Amin Bandali ;; Author: Amin Bandali ;; Keywords: tools @@ -182,62 +182,53 @@ around if needed." (interactive) (start-process-shell-command "dmneu-pamixer" nil "dmenu-pamixer") - (b/set-volume-level (b/get-volume-level)) - (force-mode-line-update))) + (b/volume-update))) ([XF86AudioMute] . ; borken on my X200 :-( (lambda () (interactive) (start-process "" nil "pamixer" "--toggle-mute") - (b/set-volume-mute (b/get-volume-mute)) - (force-mode-line-update))) + (b/volume-update))) ([\s-XF86AudioMute] . ; toggle mic mute (lambda () (interactive) (start-process "" nil "pamixer" "--default-source" "--toggle-mute") - (b/set-volume-mute (b/get-volume-mute 'mic) 'mic) - (force-mode-line-update))) + (b/volume-update))) ([XF86Launch1] . (lambda () (interactive) (start-process "" nil "pamixer" "--toggle-mute") - (b/set-volume-mute (b/get-volume-mute)) - (force-mode-line-update))) + (b/volume-update))) ([\s-XF86Launch1] . ; toggle mic mute (lambda () (interactive) (start-process "" nil "pamixer" "--default-source" "--toggle-mute") - (b/set-volume-mute (b/get-volume-mute 'mic) 'mic) - (force-mode-line-update))) + (b/volume-update))) ([XF86AudioLowerVolume] . (lambda () (interactive) (start-process "" nil "pamixer" "--allow-boost" "--decrease" "5") - (b/set-volume-level (b/get-volume-level)) - (force-mode-line-update))) + (b/volume-update))) ([XF86AudioRaiseVolume] . (lambda () (interactive) (start-process "" nil "pamixer" "--allow-boost" "--increase" "5") - (b/set-volume-level (b/get-volume-level)) - (force-mode-line-update))) + (b/volume-update))) ([\s-XF86AudioLowerVolume] . (lambda () (interactive) (start-process "" nil "pamixer" "--default-source" "--decrease" "5") - (b/set-volume-level (b/get-volume-level 'mic) 'mic) - (force-mode-line-update))) + (b/volume-update))) ([\s-XF86AudioRaiseVolume] . (lambda () (interactive) (start-process "" nil "pamixer" "--default-source" "--increase" "5") - (b/set-volume-level (b/get-volume-level 'mic) 'mic) - (force-mode-line-update))) + (b/volume-update))) ([XF86AudioPlay] . (lambda () (interactive) -- 2.20.1 From b48b85f71dd27154283b539f0e774eb4fa31774f Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Mon, 16 Jan 2023 21:07:29 -0500 Subject: [PATCH 03/16] * .emacs.d/init.el: Use "Sahel WOL" for Persian text. --- .emacs.d/init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index ad9b091..ba8b70d 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -148,7 +148,7 @@ (when (display-graphic-p) ;; (set-frame-font "Source Code Pro-10.5:weight=medium" nil t) ;; (set-frame-font "FreeSans" nil t) - (set-fontset-font t 'arabic "Vazir")) + (set-fontset-font t 'arabic "Sahel WOL")) ;;;; Elisp-level customizations -- 2.20.1 From 1f9233dcb3c2ce6b9a6efae20ea1355bc0fe48b5 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Mon, 16 Jan 2023 21:09:45 -0500 Subject: [PATCH 04/16] Update redshift config --- .config/{ => redshift}/redshift.conf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename .config/{ => redshift}/redshift.conf (95%) diff --git a/.config/redshift.conf b/.config/redshift/redshift.conf similarity index 95% rename from .config/redshift.conf rename to .config/redshift/redshift.conf index d574809..2a5515f 100644 --- a/.config/redshift.conf +++ b/.config/redshift/redshift.conf @@ -9,7 +9,8 @@ temp-day=6200 ;temp-night=4800 ;temp-night=5000 ;temp-night=4500 -temp-night=4000 +;temp-night=4000 +temp-night=2000 ; Enable/Disable a smooth transition between day and night ; 0 will cause a direct change from day to night screen temperature. @@ -35,8 +36,8 @@ transition=1 ; Set the location-provider: 'geoclue2' or 'manual' ; type 'redshift -l list' to see possible values. ; The location provider settings are in a different section. -;location-provider=manual -location-provider=geoclue2 +location-provider=manual +;location-provider=geoclue2 ; Set the adjustment-method: 'randr', 'vidmode' ; type 'redshift -m list' to see all possible values. -- 2.20.1 From bd3fd3691b694c80dca5ed4de737d702fdb3b007 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Mon, 16 Jan 2023 21:10:09 -0500 Subject: [PATCH 05/16] Update Jami config --- .config/jami.net/Jami.conf | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.config/jami.net/Jami.conf b/.config/jami.net/Jami.conf index 7f415dc..0c2d0b4 100644 --- a/.config/jami.net/Jami.conf +++ b/.config/jami.net/Jami.conf @@ -1,9 +1,10 @@ [General] AcceptTransferBelow=20 AllowFromUntrusted=false +AppTheme=System AutoAcceptFiles=true AutoUpdate=true -BaseZoom=1.1 +BaseZoom=1.2 DisplayHyperlinkPreviews=true DisplayImagesChatview=false DownloadPath=/home/bandali/usr/dl @@ -12,9 +13,20 @@ EnableExperimentalSwarm=false EnableNotifications=true EnableReadReceipt=true EnableTypingIndicator=true +FontFamily=Ubuntu +FontSize=10 +FontStyle=0 +FontWeight=400 +HiddenTips=@Invalid() +HideAudioOnly=false +HideSelf=false +HideSpectators=false LANG=SYSTEM MinimizeOnClose=true NeverShowMeAgain=false +ParticipantsSide=false +PositionShareDuration=15 +PositionShareLimit=true ShowChatviewHorizontally=true StartMinimized=false WindowGeometry=@Variant(\0\0\0\x14\x7f\xf8\0\0\0\0\0\0\x7f\xf8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0) -- 2.20.1 From 0603d31d2f1e4b760a7bf95df475ea9409eee38a Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Mon, 16 Jan 2023 21:23:25 -0500 Subject: [PATCH 06/16] Add dpkg-dev-el Contains useful utilities for working on Debian packages. --- .emacs.d/init.el | 5 +++++ .emacs.d/lisp/dpkg-dev-el | 1 + .gitmodules | 3 +++ 3 files changed, 9 insertions(+) create mode 160000 .emacs.d/lisp/dpkg-dev-el diff --git a/.emacs.d/init.el b/.emacs.d/init.el index ba8b70d..0749809 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -947,4 +947,9 @@ for all frames." (with-eval-after-load 'ffs (global-set-key (kbd "C-c f s") #'ffs)) +(add-to-list 'load-path (b/lisp "dpkg-dev-el")) +(run-with-idle-timer 0.5 nil #'require 'dpkg-dev-el) +(with-eval-after-load 'dpkg-dev-el + (require 'debian-changelog-mode)) + ;;; init.el ends here diff --git a/.emacs.d/lisp/dpkg-dev-el b/.emacs.d/lisp/dpkg-dev-el new file mode 160000 index 0000000..458f523 --- /dev/null +++ b/.emacs.d/lisp/dpkg-dev-el @@ -0,0 +1 @@ +Subproject commit 458f5230d02b15c94e94eca1af4eabaec30f45db diff --git a/.gitmodules b/.gitmodules index 69e8a9a..25dd0d0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,3 +19,6 @@ [submodule "cmake-font-lock"] path = .emacs.d/lisp/cmake-font-lock url = https://github.com/Lindydancer/cmake-font-lock +[submodule "dpkg-dev-el"] + path = .emacs.d/lisp/dpkg-dev-el + url = https://salsa.debian.org/emacsen-team/dpkg-dev-el.git -- 2.20.1 From 49ec21e975bb2334141479c28081524a00497f46 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Mon, 16 Jan 2023 21:26:05 -0500 Subject: [PATCH 07/16] * .emacs.d/lisp/bandali-org.el: Add ox-md export backend. --- .emacs.d/lisp/bandali-org.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.emacs.d/lisp/bandali-org.el b/.emacs.d/lisp/bandali-org.el index 9ffa538..87dbb85 100644 --- a/.emacs.d/lisp/bandali-org.el +++ b/.emacs.d/lisp/bandali-org.el @@ -58,6 +58,9 @@ (add-hook 'org-mode-hook #'auto-fill-mode) (add-hook 'org-mode-hook #'flyspell-mode) + ;; additional export backends + (require 'ox-md) + ;; asynchronous tangle, using emacs-async to asynchronously tangle an ;; org file. closely inspired by ;; https://github.com/dieggsy/dotfiles/tree/cc10edf7701958eff1cd94d4081da544d882a28c/emacs.d#dotfiles -- 2.20.1 From 2ac0936f15983ca9ce5cfc1846c2f1f45c231ac3 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Tue, 17 Jan 2023 23:48:58 -0500 Subject: [PATCH 08/16] Add debian-el Contains helpers specific to Debian users. --- .emacs.d/init.el | 3 +++ .emacs.d/lisp/debian-el | 1 + .gitmodules | 3 +++ 3 files changed, 7 insertions(+) create mode 160000 .emacs.d/lisp/debian-el diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 0749809..f98d16b 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -947,6 +947,9 @@ for all frames." (with-eval-after-load 'ffs (global-set-key (kbd "C-c f s") #'ffs)) +(add-to-list 'load-path (b/lisp "debian-el")) +(run-with-idle-timer 0.5 nil #'require 'debian-el) + (add-to-list 'load-path (b/lisp "dpkg-dev-el")) (run-with-idle-timer 0.5 nil #'require 'dpkg-dev-el) (with-eval-after-load 'dpkg-dev-el diff --git a/.emacs.d/lisp/debian-el b/.emacs.d/lisp/debian-el new file mode 160000 index 0000000..a3ef20c --- /dev/null +++ b/.emacs.d/lisp/debian-el @@ -0,0 +1 @@ +Subproject commit a3ef20c269b9192710567571b20718f572942bc4 diff --git a/.gitmodules b/.gitmodules index 25dd0d0..958025b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,3 +22,6 @@ [submodule "dpkg-dev-el"] path = .emacs.d/lisp/dpkg-dev-el url = https://salsa.debian.org/emacsen-team/dpkg-dev-el.git +[submodule "debian-el"] + path = .emacs.d/lisp/debian-el + url = https://salsa.debian.org/emacsen-team/debian-el.git -- 2.20.1 From 702404f7838fd3cc8f73ae00d363099a7fcdbc03 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Mon, 20 Feb 2023 11:09:25 -0500 Subject: [PATCH 09/16] * .emacs.d/init.el: Require a few more Debian things. --- .emacs.d/init.el | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index f98d16b..f4d7259 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -949,10 +949,22 @@ for all frames." (add-to-list 'load-path (b/lisp "debian-el")) (run-with-idle-timer 0.5 nil #'require 'debian-el) +(with-eval-after-load 'debian-el + (require 'apt-sources) + (require 'apt-utils) + (require 'debian-bug) + (require 'deb-view) + (require 'gnus-BTS) + (require 'preseed)) (add-to-list 'load-path (b/lisp "dpkg-dev-el")) (run-with-idle-timer 0.5 nil #'require 'dpkg-dev-el) (with-eval-after-load 'dpkg-dev-el - (require 'debian-changelog-mode)) + (require 'debian-changelog-mode) + (require 'debian-bts-control) + (require 'debian-changelog-mode) + (require 'debian-control-mode) + (require 'debian-copyright) + (require 'readme-debian)) ;;; init.el ends here -- 2.20.1 From 7598435441b039065b9384cab29f8c3cae308ae8 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Mon, 20 Feb 2023 11:10:19 -0500 Subject: [PATCH 10/16] Update primary Canonical mail and a few other small tweaks --- .config/darya.profile | 4 ++-- .config/dovecot/canonical.sieve | 4 +++- .config/git/config.canonical | 2 +- .emacs.d/lisp/bandali-gnus.el | 7 ++++++- .emacs.d/lisp/bandali-message.el | 10 +++++++++- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.config/darya.profile b/.config/darya.profile index 84135a6..8ef422d 100644 --- a/.config/darya.profile +++ b/.config/darya.profile @@ -1,6 +1,6 @@ # -*- mode: sh; sh-shell: sh -*- export DEBFULLNAME="Amin Bandali" -export DEBEMAIL="amin.bandali@canonical.com" -export UBUMAIL="Amin Bandali " +export DEBEMAIL="bandali@canonical.com" +export UBUMAIL="Amin Bandali " export UBUNTUTOOLS_BUILDER=sbuild diff --git a/.config/dovecot/canonical.sieve b/.config/dovecot/canonical.sieve index 70ffe5f..ef510a4 100644 --- a/.config/dovecot/canonical.sieve +++ b/.config/dovecot/canonical.sieve @@ -41,7 +41,9 @@ if address :is "from" "notifications@github.com" { stop; } -if header :regex "list-id" "<([a-z_0-9-]+)[.@]" { +if allof (header :regex "list-id" "<([a-z_0-9-]+)[.@]", + not address :regex :localpart "from" "^(no)?reply") +{ set :lower "listname" "${1}"; fileinto :create "l.${listname}"; stop; diff --git a/.config/git/config.canonical b/.config/git/config.canonical index d88fe03..6d276f5 100644 --- a/.config/git/config.canonical +++ b/.config/git/config.canonical @@ -1,2 +1,2 @@ [user] - email = amin.bandali@canonical.com + email = bandali@canonical.com diff --git a/.emacs.d/lisp/bandali-gnus.el b/.emacs.d/lisp/bandali-gnus.el index e09fa30..63c7c00 100644 --- a/.emacs.d/lisp/bandali-gnus.el +++ b/.emacs.d/lisp/bandali-gnus.el @@ -257,6 +257,8 @@ (setq gnus-thread-sort-functions '(gnus-thread-sort-by-number gnus-thread-sort-by-subject gnus-thread-sort-by-date)) + (with-eval-after-load 'message + (setq gnus-ignored-from-addresses message-dont-reply-to-names)) ;; local key bindings (define-key gnus-summary-mode-map (kbd "M-L") #'org-store-link) ;; (define-key gnus-summary-mode-map (kbd "r") @@ -311,7 +313,7 @@ ("X-Message-SMTP-Method" "smtp mail.shemshak.org 587") (gcc "nnimap+shemshak:Sent")) ("nnimap\\+canonical:.*" - (address "amin.bandali@canonical.com") + (address "bandali@canonical.com") ("X-Message-SMTP-Method" "smtp smtp.canonical.com 587") (signature nil) (gcc "nnimap+canonical:Sent")) @@ -366,6 +368,9 @@ 'mm-archive-decoders '("application/gzip" nil "gunzip" "-S" ".zip" "-kd" "%f" "-r"))) +(with-eval-after-load 'gnus-start + (add-hook 'gnus-after-getting-new-news-hook #'gnus-notifications)) + (with-eval-after-load 'mm-decode (setq ;; mm-attachment-override-types `("text/x-diff" "text/x-patch" diff --git a/.emacs.d/lisp/bandali-message.el b/.emacs.d/lisp/bandali-message.el index 137e3b3..8e13d73 100644 --- a/.emacs.d/lisp/bandali-message.el +++ b/.emacs.d/lisp/bandali-message.el @@ -59,7 +59,15 @@ message-subscribed-address-functions '(gnus-find-subscribed-addresses) message-dont-reply-to-names - "\\(\\(bandali@kelar\\.org\\)\\|\\(amin@shemshak\\.org\\)\\|\\(\\(bandali\\|mab\\|aminb?\\)@gnu\\.org\\)\\|\\(a?bandali@\\(csclub\\.\\)?uwaterloo\\.ca\\)\\|amin\\.bandali@\\(canonical\\|savoirfairelinux\\)\\.com\\)") + (mapconcat + #'identity + '("\\(bandali\\|mab\\|aminb?\\)@gnu\\.org" + "bandali@kelar\\.org" + "amin@shemshak\\.org" + "a?bandali@\\(csclub\\.\\)?uwaterloo\\.ca" + "amin\\.bandali@savoirfairelinux\\.com" + "\\(amin\\.\\)?bandali@canonical\\.com") + "\\|")) ;; (custom-set-faces ;; '(message-header-subject ;; ((t (:foreground "#111" :weight semi-bold)))) -- 2.20.1 From 8d2509621f333e2fd04b936ac48954c464bf6570 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Mon, 20 Feb 2023 11:43:27 -0500 Subject: [PATCH 11/16] * .emacs.d/lisp/dpkg-dev-el: Bump. --- .emacs.d/lisp/dpkg-dev-el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.emacs.d/lisp/dpkg-dev-el b/.emacs.d/lisp/dpkg-dev-el index 458f523..af9aad7 160000 --- a/.emacs.d/lisp/dpkg-dev-el +++ b/.emacs.d/lisp/dpkg-dev-el @@ -1 +1 @@ -Subproject commit 458f5230d02b15c94e94eca1af4eabaec30f45db +Subproject commit af9aad721cb263e495e2f77df458e9496549c04b -- 2.20.1 From 9d3e290041382bd77f3e58d75dfd760420fe4d57 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Sun, 26 Feb 2023 23:31:27 -0500 Subject: [PATCH 12/16] * .emacs.d/lisp/bandali-gnus.el: Restore gnus-user-agent to its former glory. --- .emacs.d/lisp/bandali-gnus.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.emacs.d/lisp/bandali-gnus.el b/.emacs.d/lisp/bandali-gnus.el index 63c7c00..445fe84 100644 --- a/.emacs.d/lisp/bandali-gnus.el +++ b/.emacs.d/lisp/bandali-gnus.el @@ -185,6 +185,8 @@ '(list . "list-id\\|list-post\\|x-mailing-list\\|x-beenthere\\|x-loop") t))) + (setq gnus-user-agent '(emacs gnus type)) + ;; (require 'gnus-registry) ;; (setq gnus-registry-max-entries 2500) ;; (setq gnus-registry-ignored-groups -- 2.20.1 From bf276d61dbf7f9f9ccb6d22b921274887208d4df Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Thu, 2 Mar 2023 11:25:16 -0500 Subject: [PATCH 13/16] * .config/matterircd/matterircd.toml: Add. Import a copy of matterircd.toml.example from github:42wim/matterircd at d6583b6fcae40355a2c57f9670952b8252f7113b. --- .config/matterircd/matterircd.toml | 242 +++++++++++++++++++++++++++++ 1 file changed, 242 insertions(+) create mode 100644 .config/matterircd/matterircd.toml diff --git a/.config/matterircd/matterircd.toml b/.config/matterircd/matterircd.toml new file mode 100644 index 0000000..2754424 --- /dev/null +++ b/.config/matterircd/matterircd.toml @@ -0,0 +1,242 @@ +#interface:port to bind to. (default "127.0.0.1:6667") +bind = "127.0.0.1:6667" + +#enable debug logging (default false) +debug = false + +#enable trace logging (default false) +trace = false + +#enable gops agent (https://github.com/google/gops) +#used to track down memory leaks/cpu profiling +#default false +gops = false + +#TLS interface:port to bind to. (e.g 127.0.0.1:6697) (deault "") +# +#TLSBind = "127.0.0.1:6697" + +#directory to look for key.pem and cert.pem. (default ".") +# +#TLSDir = "/etc/pki/tls/matterircd/" + +# Specify the full path for your key and cert +#TLSKey = "/etc/pki/tls/matterircd/key.pem" +#TLSCert = "/etc/pki/tls/matterircd/cer.pem" + +# Override handshake timeout (in seconds) +#HandshakeTimeout = 10 +# Override client timeout (in seconds) +#ClientTimeout = 10 + +#PasteBufferTimeout specifies the amount of time in milliseconds that +#messages get kept in matterircd internal buffer before being sent to +#mattermost or slack. +#Messages that will be received in this time will be concatenated together +#So this can be used to paste stuff like ansi-art or code. +#Default 0 (is disabled) +#Depending on how fast you type 2500 is a good number +PasteBufferTimeout = 2500 + +################################## +##### MATTERMOST EXAMPLE ######### +################################## +[mattermost] +#specify default mattermost server/instance (default "") +# +#DefaultServer = "chat.mycompany.com" + +#specify default mattermost team (default "") +# +#DefaultTeam = "mycompany" + +#use http connection to mattermost (default false) +Insecure = false + +#an array of channels that only will be joined on IRC. JoinExlude and JoinInclude will not be checked +#regexp is supported +#If it's empty, it means all channels get joined (except those defined in JoinExclude) +#Messages that get sent to unjoined channels (but you're joined on mattermost) will +#get sent to the &messages channel. +#default "" +# +#JoinOnly = ["#onlythischannel"] + +#an array of channels that won't be joined on IRC. +#regexp is supported +#Messages that get sent to unjoined channels (but you're joined on mattermost) will +#get sent to the &messages channel. +#You can still /JOIN exclude channels. +#default "" +# +#JoinExclude = ["#town-square","#boringchannel","#.*marketing.*"] + +#an array of channels that will override the settings in JoinExclude +#regexp is supported +#If it's empty, it means all channels get joined (except those defined in JoinExclude) +#Messages that get sent to unjoined channels (but you're joined on mattermost) will +#get sent to the &messages channel. +#default "" +# +#JoinInclude = ["#devops","#myteam-marketing"] + +#PartFake: a bool that defines if you do a /LEAVE or /PART on IRC it will also +#actually leave the channel on mattermost. +#if false it actually leaves the channel on mattermost +#if true it removes the channel from irc, but you're still joined on mattermost, messages +#of this channel will be sent to &messages channel +#Default false +# +PartFake = true + +#only allow connection to specified mattermost server/instances. +#Array, default empty +# +#Restrict = ["chat.mycompany.com"] + +#skip verification of mattermost certificate chain and hostname (default false) +SkipTLSVerify = false + +#also add the main team prefix to the channel name #team/channel (default false) +PrefixMainTeam = false + +#Only mark a conversation as viewed when you reply to that conversation or +#channel. This prevents Mattermost from clearing mobile app notifications +#instantly. Note that this prevents you from always appearing as online +#(anti-idle support is turned off unless ForceAntiIdle) (default false) +DisableAutoView = false +# Force and enable anti-idle. Useful for when DisableAutoView. +# ForceAntiIdle = true +# AntiIdleChannel = "town-square" +# AntiIdleInterval = 60 + +# If users set a Nickname, matterircd could either choose that or the Username +# to display in the IRC client. The option PreferNickname controls that, the +# default being to show the Username. (default false) +PreferNickname = false + +# Disable showing parent post / replies +HideReplies = false +# Shorten replies to approximately this length +ShortenRepliesTo = 0 +# Enable Unicode. +Unicode = false +# Disable showing reactions +HideReactions = false + +#Only join direct/group messages when someone talks. This stops from cluttering your +#irc client with lots of windows. +#If set to true dm/group messages will be joined on startup and not only on talk in the channel. +JoinDM = false + +#This will add a number between 000 and fff to each message +#This number will be referenced when a message is edited/deleted/threaded/reaction +#For more information see prefixcontext.md +PrefixContext = false +# Same as PrefixContext but with the message context at the end. +SuffixContext = false +# If either PrefixContext or SuffixContext specify which thread ID to use. Default is the +# matterircd generated @@([0-9][a-f]){3}. Uncomment to use Mattermost's message/parent thread IDs instead. +#ThreadContext = "mattermost" +# Similar to the above, but also show the message post IDs in addition to the parent thread ID. +#ThreadContext = "mattermost+post" +#Show Context for multi-line messages and only show it at the end. +ShowContextMulti = false + +#This will show (mention yournick) after a message if it contains one of the words configured +#in your mattermost "word that trigger mentions" notifications. +ShowMentions = false +# Channel wide default mentions @channel, @all, and @here are shown as IRC NOTICEs. +# This disables that making them appear as normal PRIVMSGs. +#DisableDefaultMentions = true + +# Enable syntax highlighting for code blocks. +# Formatter and Style are passed through to the chroma v2 package. +# https://github.com/alecthomas/chroma/blob/master/formatters/tty_indexed.go#L262 +# terminal/terminal8 for 8-colors, terminal16, terminal256, terminal16m (16M true-colour). +# https://github.com/alecthomas/chroma/tree/master/styles +# These are different colour schemes/styles. E.g. pygments, emacs, autumn, etc. +SyntaxHighlighting = "terminal256:pygments" + +# Path to file to store last viewed information. This is useful for replying only +# the messages missed. +LastViewedSaveFile = "matterircd-lastsaved.db" + +############################# +##### SLACK EXAMPLE ######### +############################# +[slack] +#deny specific users from connecting. +#As we only connect using tokens, this will first do a ccnnection to see what username the token is from. If this +#username is on the DenyUsers the user will be disconnected. +#Array, default empty +# +#DenyUsers = ["username"] + +#https://get.slack.help/hc/en-us/articles/212281468-Direct-messages-and-group-DMs +#Only join direct/group messages when someone talks. This stops from cluttering your +#irc client with lots of windows. +#If set to true dm/group messages will be joined on startup and not only on talk in the channel. +JoinDM = false + +#only allow connection to specific slack sites. (eg for myslack.slack.com just specify myslack) +#As we only connect using tokens, this will first do a ccnnection to see what team the token is from. If this +#team isn't in the Restrict list, the user will be disconnected. +#Array, default empty +# +#Restrict = ["myslack"] + +# This will add the slack DisplayName as prefix to every message if the DisplayName differs from the Username +# More info about username/displayname see https://api.slack.com/changelog/2017-09-the-one-about-usernames +# Default false +UseDisplayName = false + +#an array of channels that only will be joined on IRC. JoinExlude and JoinInclude will not be checked +#regexp is supported +#If it's empty, it means all channels get joined (except those defined in JoinExclude) +#Messages that get sent to unjoined channels (but you're joined on mattermost) will +#get sent to the &messages channel. +#default "" +# +#JoinOnly = ["#onlythischannel"] + +#an array of channels that won't be joined on IRC. +#regexp is supported +#Messages that get sent to unjoined channels (but you're joined on mattermost) will +#get sent to the &messages channel. +#You can still /JOIN exclude channels. +#default "" +# +#JoinExclude = ["#town-square","#boringchannel","#.*marketing.*"] + +#an array of channels that will override the settings in JoinExclude +#regexp is supported +#If it's empty, it means all channels get joined (except those defined in JoinExclude) +#Messages that get sent to unjoined channels (but you're joined on mattermost) will +#get sent to the &messages channel. +#default "" +# +#JoinInclude = ["#devops","#myteam-marketing"] + +#This will add a number between 000 and fff to each message +#This number will be referenced when a message is edited/deleted/threaded/reaction +PrefixContext = false + + +############################# +##### MASTODON EXAMPLE ###### +############################# +[mastodon] +#Go to https://yourmastodonserver/settings/applications/new +#Use matterircd as application name (default read/write/follow scopes are ok) +#Click on submit +#After submitting it'll show you the Client Key (we call it clientID), +#the client secret and Your access token +# +#Fill those in below with your server +#Connect to matterircd and /msg mastodon login +# +#server="https://mastodon.social" +#clientID="clientidstring" +#clientSecret="clientsecretstring" +#accessToken="accesstokenstring" -- 2.20.1 From e5010376d2c3d3dfde8cdc7e26a764296d7aaa62 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Thu, 20 Apr 2023 17:11:46 -0400 Subject: [PATCH 14/16] * .config/git/config: Don't set core.autocrlf = input. This can change line-endings in PO files for merge commits, which will be problematic when dealing with git merges with Debian tools (for git-based Debian packaging). --- .config/git/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/git/config b/.config/git/config index 535ced4..f1ac520 100644 --- a/.config/git/config +++ b/.config/git/config @@ -10,7 +10,7 @@ # signoff = true [core] - autocrlf = input # CRLF -> LF on commit +# autocrlf = input # CRLF -> LF on commit editor = emacsclient -t pager = "less" -- 2.20.1 From 1c7519c13d77659d28a1a63b1f5f6837e6d63109 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Thu, 20 Apr 2023 17:12:55 -0400 Subject: [PATCH 15/16] * .config/dovecot/canonical.sieve: Add bugzilla and gnome-releases. --- .config/dovecot/canonical.sieve | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.config/dovecot/canonical.sieve b/.config/dovecot/canonical.sieve index ef510a4..5b32d11 100644 --- a/.config/dovecot/canonical.sieve +++ b/.config/dovecot/canonical.sieve @@ -36,6 +36,16 @@ if address :is "from" "gitlab@salsa.debian.org" { stop; } +if address :is "from" "bugzilla-daemon@mozilla.org" { + fileinto :create "bugzilla"; + stop; +} + +if address :is "to" "ftp-release-notifications@gnome.org" { + fileinto :create "gnome-releases"; + stop; +} + if address :is "from" "notifications@github.com" { keep; stop; -- 2.20.1 From e5cb5c0eb43b74241217b258b23fac56e9c0e258 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Thu, 20 Apr 2023 17:14:31 -0400 Subject: [PATCH 16/16] Add and use @ubuntu.com address in a few places --- .config/darya.profile | 4 ++-- .emacs.d/lisp/bandali-gnus.el | 3 +++ .emacs.d/lisp/bandali-message.el | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.config/darya.profile b/.config/darya.profile index 8ef422d..f15f926 100644 --- a/.config/darya.profile +++ b/.config/darya.profile @@ -1,6 +1,6 @@ # -*- mode: sh; sh-shell: sh -*- export DEBFULLNAME="Amin Bandali" -export DEBEMAIL="bandali@canonical.com" -export UBUMAIL="Amin Bandali " +export DEBEMAIL="bandali@ubuntu.com" +export UBUMAIL="Amin Bandali " export UBUNTUTOOLS_BUILDER=sbuild diff --git a/.emacs.d/lisp/bandali-gnus.el b/.emacs.d/lisp/bandali-gnus.el index 445fe84..9516447 100644 --- a/.emacs.d/lisp/bandali-gnus.el +++ b/.emacs.d/lisp/bandali-gnus.el @@ -319,6 +319,9 @@ ("X-Message-SMTP-Method" "smtp smtp.canonical.com 587") (signature nil) (gcc "nnimap+canonical:Sent")) + ((header "list-id" ".*\\.lists.ubuntu.com") + (address "bandali@ubuntu.com") + ("X-Message-SMTP-Method" "smtp mail.kelar.org 587")) ("nnimap\\+csc:.*" (address "bandali@csclub.uwaterloo.ca") ("X-Message-SMTP-Method" "smtp mail.csclub.uwaterloo.ca 587") diff --git a/.emacs.d/lisp/bandali-message.el b/.emacs.d/lisp/bandali-message.el index 8e13d73..3ea8643 100644 --- a/.emacs.d/lisp/bandali-message.el +++ b/.emacs.d/lisp/bandali-message.el @@ -66,7 +66,8 @@ "amin@shemshak\\.org" "a?bandali@\\(csclub\\.\\)?uwaterloo\\.ca" "amin\\.bandali@savoirfairelinux\\.com" - "\\(amin\\.\\)?bandali@canonical\\.com") + "\\(amin\\.\\)?bandali@canonical\\.com" + "bandali@ubuntu\\.com") "\\|")) ;; (custom-set-faces ;; '(message-header-subject -- 2.20.1