update mutt and joplin
This commit is contained in:
parent
75fad5050b
commit
e6afa0199e
5 changed files with 63 additions and 16 deletions
|
@ -49,7 +49,7 @@
|
|||
hardware.opengl = {
|
||||
enable = true;
|
||||
extraPackages = [ pkgs.vaapiIntel ];
|
||||
driSupoort = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
nixpkgs.config.packageOverrides = pkgs: {
|
||||
|
|
|
@ -185,7 +185,7 @@ let
|
|||
}
|
||||
{
|
||||
query = "from:data-treuhand.de";
|
||||
tags = [ "+mindcurv" "+work" "-inbox" "-unread" ];
|
||||
tags = [ "+mindcurv" "+work" "-inbox" "-unread" "-junk" ];
|
||||
}
|
||||
{
|
||||
query = "from:immocation.de";
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
{ pkgs, lib, ... }: {
|
||||
desktopFile = bin:
|
||||
{ longName ? "Script", command ? "${bin}/bin/${bin.name}", ... }:
|
||||
{ comment ? "No Comment", longName ? "Script", command ? "${bin}/bin/${bin.name}", ... }:
|
||||
pkgs.writeTextFile {
|
||||
name = "${bin.name}.desktop";
|
||||
destination = "/share/applications/${bin.name}.desktop";
|
||||
text = ''
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Exec=${bin}/bin/${command} %U
|
||||
Comment=An open source web browser from Google
|
||||
Exec=${command} %U
|
||||
Comment=${comment}
|
||||
Terminal=false
|
||||
Name=${bin.name}
|
||||
GenericName=${longName}
|
||||
|
|
|
@ -226,7 +226,7 @@ in {
|
|||
|
||||
set index_format="${index_format} %r |"
|
||||
|
||||
virtual-mailboxes "INBOX" "notmuch://?query=(tag:inbox or (tag:sent and not tag:archive)) AND NOT tag:discourse AND NOT tag:muted AND NOT tag:list AND NOT tag:spam AND NOT tag:fraud"
|
||||
virtual-mailboxes "INBOX" "notmuch://?query=(tag:inbox or (tag:sent and not tag:archive)) AND NOT tag:discourse AND NOT tag:muted AND NOT tag:list AND NOT tag:fraud AND NOT tag:junk"
|
||||
virtual-mailboxes "Unread" "notmuch://?query=(tag:unread AND NOT tag:muted)"
|
||||
virtual-mailboxes "Space left" "notmuch://?query=((tag:spaceleft OR tag:space-lef) AND NOT tag:muted)"
|
||||
virtual-mailboxes "Sononym" "notmuch://?query=(tag:sononym AND NOT tag:muted)"
|
||||
|
@ -245,13 +245,12 @@ in {
|
|||
virtual-mailboxes "Archive" "notmuch://?query=tag:archive"
|
||||
virtual-mailboxes "Sent" "notmuch://?query=tag:sent"
|
||||
virtual-mailboxes "Fraud" "notmuch://?query=(tag:fraud)"
|
||||
virtual-mailboxes "Junk" "notmuch://?query=(tag:junk OR tag:spam OR tag:fraud)"
|
||||
virtual-mailboxes "Junk" "notmuch://?query=(tag:junk)"
|
||||
virtual-mailboxes "All" "notmuch://?query=*"
|
||||
|
||||
tag-transforms "junk" "k" \
|
||||
"unread" "u" \
|
||||
"replied" "↻" \
|
||||
"TODO" "T"
|
||||
|
||||
# notmuch bindings
|
||||
bind index \\\\ noop
|
||||
|
@ -273,18 +272,23 @@ in {
|
|||
|
||||
# keys bindings
|
||||
# -------------
|
||||
#killed
|
||||
bind index d noop
|
||||
bind index D noop
|
||||
bind pager d noop
|
||||
bind pager D noop
|
||||
macro index D "<modify-labels-then-hide>-inbox -unread +deleted\n" # tag as deleted mail
|
||||
macro index d "<modify-labels>-deleted\n" # tag as deleted mail
|
||||
macro pager D "<modify-labels-then-hide>-inbox -unread +deleted\n" # tag as deleted mail
|
||||
macro pager d "<modify-labels>-deleted\n" # tag as deleted mail
|
||||
|
||||
bind index S noop
|
||||
bind index s noop
|
||||
bind pager S noop
|
||||
bind pager s noop
|
||||
macro index S "<modify-labels-then-hide>-inbox -unread +junk\n" # tag as Junk mail
|
||||
macro index s "<modify-labels>-junk\n" # tag as Junk mail
|
||||
macro pager S "<modify-labels-then-hide>-inbox -unread +junk\n" # tag as Junk mail
|
||||
macro pager s "<modify-labels>-junk\n" # tag as Junk mail
|
||||
macro index S "<modify-labels-then-hide>-inbox -unread +junk\n" # tag as junk mail
|
||||
macro index s "<modify-labels>-junk\n" # tag as junk mail
|
||||
macro pager S "<modify-labels-then-hide>-inbox -unread +junk\n" # tag as junk mail
|
||||
macro pager s "<modify-labels>-junk\n" # tag as junk mail
|
||||
|
||||
bind index r noop
|
||||
bind index R noop
|
||||
|
@ -301,9 +305,9 @@ in {
|
|||
bind pager A noop
|
||||
bind pager a noop
|
||||
macro index A "<modify-labels>+archive -unread -inbox\n" # tag as Archived
|
||||
macro index a "<modify-labels>-archive\n" # tag as Archived
|
||||
macro index a "<modify-labels>-archive\n" # tag as Archived
|
||||
macro pager A "<modify-labels>+archive -unread -inbox\n" # tag as Archived
|
||||
macro pager a "<modify-labels>-archive\n" # tag as Archived
|
||||
macro pager a "<modify-labels>-archive\n" # tag as Archived
|
||||
|
||||
bind index U noop
|
||||
bind index u noop
|
||||
|
@ -328,7 +332,7 @@ in {
|
|||
bind pager T noop
|
||||
macro index T "<pipe-message>${
|
||||
pkgs.writers.writeDash "mutt2task" ''
|
||||
${pkgs.taskwarrior}/bin/task add +email E-mail: $( ${pkgs.gnugrep}/bin/grep 'Subject' $* | awk -F: '{print $2}' )
|
||||
${pkgs.taskwarrior}/bin/task add +email scheduled:today E-mail: $( ${pkgs.gnugrep}/bin/grep 'Subject' $* | awk -F: '{print $2}' )
|
||||
''
|
||||
}<enter>"
|
||||
|
||||
|
@ -376,6 +380,34 @@ in {
|
|||
${mailSend}/bin/mail-send
|
||||
${mailSync}/bin/mail-sync
|
||||
'';
|
||||
mailDelete = let
|
||||
notmuch = "${pkgs.notmuch}/bin/notmuch"
|
||||
;
|
||||
in
|
||||
pkgs.writers.writeBashBin "mail-delete" ''
|
||||
set -efu
|
||||
set -o pipefail
|
||||
|
||||
if ! ${notmuch} search --exclude=false tag:deleted | tac ; then
|
||||
echo 'No killed mail.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf 'want do rm this mail? \[y/N\] '
|
||||
read REPLY
|
||||
|
||||
case "$REPLY" in
|
||||
y|Y) :;; # continue
|
||||
*)
|
||||
echo 'abort.'
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
${notmuch} search --output=files --exclude=false tag:deleted | while read line; do rm -v "$line" ; done
|
||||
${notmuch} new
|
||||
'';
|
||||
|
||||
in [
|
||||
pkgs.notmuch
|
||||
pkgs.muchsync
|
||||
|
@ -385,6 +417,7 @@ in {
|
|||
mailSend
|
||||
pkgs.neomutt
|
||||
mutt
|
||||
mailDelete
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
@ -15,6 +15,17 @@ let
|
|||
in pkgs.writers.writeBashBin "all-licenses"
|
||||
(lib.concatStringsSep "\n" licenses);
|
||||
|
||||
#joplin = pkgs.joplin-desktop;
|
||||
#joplin = pkgs.joplin-desktop;
|
||||
joplin = pkgs.writers.writeBashBin "joplin" ''
|
||||
if [[ ! -x "$HOME/programs/Joplin.AppImage" ]]
|
||||
then
|
||||
echo "$HOME/programs/Joplin.AppImage does not exist or is not executable";
|
||||
exit 1
|
||||
fi
|
||||
exec ${pkgs.appimage-run}/bin/appimage-run "$HOME/programs/Joplin.AppImage"
|
||||
'';
|
||||
|
||||
zettlr = pkgs.writers.writeBashBin "zettlr" ''
|
||||
if [[ ! -x "$HOME/programs/Zettlr.AppImage" ]]
|
||||
then
|
||||
|
@ -153,6 +164,9 @@ in {
|
|||
in [
|
||||
|
||||
zettlr
|
||||
(library.desktopFile zettlr { longName = "Zettlr"; })
|
||||
joplin
|
||||
(library.desktopFile joplin { longName = "Joplin"; })
|
||||
zim
|
||||
|
||||
weight
|
||||
|
|
Loading…
Reference in a new issue