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 = {
|
hardware.opengl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPackages = [ pkgs.vaapiIntel ];
|
extraPackages = [ pkgs.vaapiIntel ];
|
||||||
driSupoort = true;
|
driSupport = true;
|
||||||
driSupport32Bit = true;
|
driSupport32Bit = true;
|
||||||
};
|
};
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
nixpkgs.config.packageOverrides = pkgs: {
|
||||||
|
|
|
@ -185,7 +185,7 @@ let
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
query = "from:data-treuhand.de";
|
query = "from:data-treuhand.de";
|
||||||
tags = [ "+mindcurv" "+work" "-inbox" "-unread" ];
|
tags = [ "+mindcurv" "+work" "-inbox" "-unread" "-junk" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
query = "from:immocation.de";
|
query = "from:immocation.de";
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
{ pkgs, lib, ... }: {
|
{ pkgs, lib, ... }: {
|
||||||
desktopFile = bin:
|
desktopFile = bin:
|
||||||
{ longName ? "Script", command ? "${bin}/bin/${bin.name}", ... }:
|
{ comment ? "No Comment", longName ? "Script", command ? "${bin}/bin/${bin.name}", ... }:
|
||||||
pkgs.writeTextFile {
|
pkgs.writeTextFile {
|
||||||
name = "${bin.name}.desktop";
|
name = "${bin.name}.desktop";
|
||||||
destination = "/share/applications/${bin.name}.desktop";
|
destination = "/share/applications/${bin.name}.desktop";
|
||||||
text = ''
|
text = ''
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Type=Application
|
Type=Application
|
||||||
Exec=${bin}/bin/${command} %U
|
Exec=${command} %U
|
||||||
Comment=An open source web browser from Google
|
Comment=${comment}
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Name=${bin.name}
|
Name=${bin.name}
|
||||||
GenericName=${longName}
|
GenericName=${longName}
|
||||||
|
|
|
@ -226,7 +226,7 @@ in {
|
||||||
|
|
||||||
set index_format="${index_format} %r |"
|
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 "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 "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)"
|
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 "Archive" "notmuch://?query=tag:archive"
|
||||||
virtual-mailboxes "Sent" "notmuch://?query=tag:sent"
|
virtual-mailboxes "Sent" "notmuch://?query=tag:sent"
|
||||||
virtual-mailboxes "Fraud" "notmuch://?query=(tag:fraud)"
|
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=*"
|
virtual-mailboxes "All" "notmuch://?query=*"
|
||||||
|
|
||||||
tag-transforms "junk" "k" \
|
tag-transforms "junk" "k" \
|
||||||
"unread" "u" \
|
"unread" "u" \
|
||||||
"replied" "↻" \
|
"replied" "↻" \
|
||||||
"TODO" "T"
|
|
||||||
|
|
||||||
# notmuch bindings
|
# notmuch bindings
|
||||||
bind index \\\\ noop
|
bind index \\\\ noop
|
||||||
|
@ -273,18 +272,23 @@ in {
|
||||||
|
|
||||||
# keys bindings
|
# keys bindings
|
||||||
# -------------
|
# -------------
|
||||||
#killed
|
|
||||||
bind index d noop
|
bind index d noop
|
||||||
|
bind index D noop
|
||||||
bind pager 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 index s noop
|
bind index s noop
|
||||||
bind pager S noop
|
bind pager 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-then-hide>-inbox -unread +junk\n" # tag as junk mail
|
||||||
macro index s "<modify-labels>-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-then-hide>-inbox -unread +junk\n" # tag as junk mail
|
||||||
macro pager s "<modify-labels>-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
|
||||||
bind index R noop
|
bind index R noop
|
||||||
|
@ -328,7 +332,7 @@ in {
|
||||||
bind pager T noop
|
bind pager T noop
|
||||||
macro index T "<pipe-message>${
|
macro index T "<pipe-message>${
|
||||||
pkgs.writers.writeDash "mutt2task" ''
|
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>"
|
}<enter>"
|
||||||
|
|
||||||
|
@ -376,6 +380,34 @@ in {
|
||||||
${mailSend}/bin/mail-send
|
${mailSend}/bin/mail-send
|
||||||
${mailSync}/bin/mail-sync
|
${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 [
|
in [
|
||||||
pkgs.notmuch
|
pkgs.notmuch
|
||||||
pkgs.muchsync
|
pkgs.muchsync
|
||||||
|
@ -385,6 +417,7 @@ in {
|
||||||
mailSend
|
mailSend
|
||||||
pkgs.neomutt
|
pkgs.neomutt
|
||||||
mutt
|
mutt
|
||||||
|
mailDelete
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,17 @@ let
|
||||||
in pkgs.writers.writeBashBin "all-licenses"
|
in pkgs.writers.writeBashBin "all-licenses"
|
||||||
(lib.concatStringsSep "\n" 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" ''
|
zettlr = pkgs.writers.writeBashBin "zettlr" ''
|
||||||
if [[ ! -x "$HOME/programs/Zettlr.AppImage" ]]
|
if [[ ! -x "$HOME/programs/Zettlr.AppImage" ]]
|
||||||
then
|
then
|
||||||
|
@ -153,6 +164,9 @@ in {
|
||||||
in [
|
in [
|
||||||
|
|
||||||
zettlr
|
zettlr
|
||||||
|
(library.desktopFile zettlr { longName = "Zettlr"; })
|
||||||
|
joplin
|
||||||
|
(library.desktopFile joplin { longName = "Joplin"; })
|
||||||
zim
|
zim
|
||||||
|
|
||||||
weight
|
weight
|
||||||
|
|
Loading…
Reference in a new issue