summaryrefslogtreecommitdiffstats
path: root/.local
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-x.local/bin/fetch_mail.sh34
-rwxr-xr-x.local/bin/linkview12
-rwxr-xr-x.local/bin/ndate4
-rw-r--r--.local/state/w3m/history19
4 files changed, 26 insertions, 43 deletions
diff --git a/.local/bin/fetch_mail.sh b/.local/bin/fetch_mail.sh
index ed3da4a..061232d 100755
--- a/.local/bin/fetch_mail.sh
+++ b/.local/bin/fetch_mail.sh
@@ -1,9 +1,5 @@
#!/bin/sh
-set -f
-set +f
-set -m
-
export GNUPGHOME=$HOME/.local/share/gnupg
export PASSWORD_STORE_DIR=$HOME/.local/share/pass
@@ -11,31 +7,35 @@ mc_file="/tmp/newmailcount"
if [ -f $mc_file ]; then
pre_count=$(cat $mc_file)
else
- pre_count="$(ls "${MAIL:-/var/mail/jozan}"/gmail_br/INBOX/new | wc -l 2>/dev/null)"
- mb1="$(ls "${MAIL:-/var/mail/jozan}"/gmail_oon/INBOX/new | wc -l 2>/dev/null)"
- mb2="$(ls "${MAIL:-/var/mail/jozan}"/gmail_tos/INBOX/new | wc -l 2>/dev/null)"
- pre_count="$((pre_count + mb1 + mb2))"
+ pre_count="$(ls "${MAIL:-/var/mail/jozan}"/gmx_rbo/INBOX/new | wc -l 2>/dev/null)"
+ mb1="$(ls "${MAIL:-/var/mail/jozan}"/gmx_shop/INBOX/new | wc -l 2>/dev/null)"
+ #pre_count="$(ls "${MAIL:-/var/mail/jozan}"/gmail_br/INBOX/new | wc -l 2>/dev/null)"
+ #mb1="$(ls "${MAIL:-/var/mail/jozan}"/gmail_oon/INBOX/new | wc -l 2>/dev/null)"
+ #mb2="$(ls "${MAIL:-/var/mail/jozan}"/gmail_tos/INBOX/new | wc -l 2>/dev/null)"
+ pre_count="$((pre_count + mb1))"
fi
if ! echo test | gpg2 --sign --batch --no-tty --pinentry-mode error -o /dev/null >/dev/null 2>&1; then
- notify-send -u low -t 6000 'mbsync' ' GPG locked'
+ notify-send -u critical -t 6000 'mbsync' ' GPG locked'
exit 1
fi
killall mbsync >/dev/null 2>&1
-notify-send -u low -t 3000 'mbsync' ' fetching mail...' >/dev/null 2>&1
+notify-send -u critical -t 3000 'mbsync' ' fetching mail' >/dev/null 2>&1
# {
-mbsync -a -c /usr/home/jozan/.config/mbsync/mbsyncrc ||
- notify-send -u low -t 6000 'mbsync' ' failed to fetch mail' >/dev/null 2>&1
+mbsync -a ||
+ notify-send -u critical -t 6000 'mbsync' ' failed to fetch mail' >/dev/null 2>&1
# }&
# gsleep 0.2
# kill -74 $(pidof dwmblocks) >/dev/null 2>&1
# fg
-pre_count="$(ls "${MAIL:-/var/mail/jozan}"/gmail_br/INBOX/new | wc -l 2>/dev/null)"
-mb1="$(ls "${MAIL:-/var/mail/jozan}"/gmail_oon/INBOX/new | wc -l 2>/dev/null)"
-mb2="$(ls "${MAIL:-/var/mail/jozan}"/gmail_tos/INBOX/new | wc -l 2>/dev/null)"
-post_count="$((post_count + mb1 + mb2))"
+post_count="$(ls "${MAIL:-/var/mail/jozan}"/gmx_rbo/INBOX/new | wc -l 2>/dev/null)"
+mb1="$(ls "${MAIL:-/var/mail/jozan}"/gmx_shop/INBOX/new | wc -l 2>/dev/null)"
+# pre_count="$(ls "${MAIL:-/var/mail/jozan}"/gmail_br/INBOX/new | wc -l 2>/dev/null)"
+# mb1="$(ls "${MAIL:-/var/mail/jozan}"/gmail_oon/INBOX/new | wc -l 2>/dev/null)"
+# mb2="$(ls "${MAIL:-/var/mail/jozan}"/gmail_tos/INBOX/new | wc -l 2>/dev/null)"
+post_count="$((post_count + mb1))"
if [ $post_count -gt $pre_count ]; then
- notify-send -u normal 'NeoMutt' ' '$post_count' new mail(s)'
+ notify-send -u normal 'neomutt' ' '$post_count' new mail(s)'
fi
echo $post_count >$mc_file
# sleep 1
diff --git a/.local/bin/linkview b/.local/bin/linkview
index dea342f..605e0b7 100755
--- a/.local/bin/linkview
+++ b/.local/bin/linkview
@@ -12,8 +12,6 @@ use Capture::Tiny qw(capture);
use POSIX qw(setsid);
use Data::UUID;
-my $menu = "fzf";
-
use constant {
TERMINAL_PATH => $TERMINAL,
MPV_PATH => 'mpv',
@@ -34,6 +32,11 @@ my @func_refs = ( \&vid, \&img_pdf, \&dl, \&audio, \&img_pdf, \&w3m, \&web, \&cl
my %func_list;
@func_list{@keys} = @func_refs;
+my $menu = "fzf --prompt ";
+for (@ARGV) {
+ $menu = "dmenu -i -l " . scalar @keys . " -p " if $_ eq "--dmenu";
+}
+
use constant QUAL_LIST => "" .
"uncap" . "\n" .
"1440" . "\n" .
@@ -174,7 +177,7 @@ sub dl
if (is_yt($url) != 0) {
$list = QUAL_LIST;
- $quality = `printf "$list" | $menu --prompt 'quality > '`;
+ $quality = `printf "$list" | $menu 'quality > '`;
if (not $quality) {
return;
}
@@ -489,7 +492,7 @@ sub fzf_prompt
my $list;
$list = join("\n", @keys);
- $answer = `printf "$list\n" | $menu --prompt '$url > '`;
+ $answer = `printf "$list\n" | $menu '$url >'`;
chomp $answer;
return $answer;
}
@@ -504,6 +507,7 @@ sub linkview
}
$answer = fzf_prompt($ARGV[0]);
+ $ARGV[1] = undef if (exists $ARGV[1] and $ARGV[1] eq '--dmenu');
return unless exists $func_list{$answer};
$func_list{$answer}->($ARGV[0], $ARGV[1], $answer);
return;
diff --git a/.local/bin/ndate b/.local/bin/ndate
index 323be43..79c20b7 100755
--- a/.local/bin/ndate
+++ b/.local/bin/ndate
@@ -50,7 +50,7 @@ use Capture::Tiny qw(capture);
use constant {
DATE_PATH => 'date',
- NOTIFYSEND_PATH => 'notify-send'
+ NOTIFYSEND_PATH => 'herbe'
};
sub main
@@ -69,8 +69,6 @@ sub main
$date = scalar reverse $date;
system(
NOTIFYSEND_PATH,
- '-t', '4000',
- 'date',
$date
);
return;
diff --git a/.local/state/w3m/history b/.local/state/w3m/history
deleted file mode 100644
index c8fc99c..0000000
--- a/.local/state/w3m/history
+++ /dev/null
@@ -1,19 +0,0 @@
-https://www.google.com/
-https://www.google.com/search?ie=ISO-8859-1&hl=fr&source=hp&q=cours+du+bitcoin&btnG=Recherche+Google&iflsig=AO6bgOgAAAAAZY1Cs3AMLLjrqqFlzuOFHPgJsUMgl45-&gbv=1
-file:///home/r_bousset/atlas.nuabee.fr
-https://atlas.nuabee.fr/account/login/
-https://atlas.nuabee.fr/
-file:///tmp/tmpmail/tmpmail.html
-file:///home/r_bousset/nuabee.fr
-https://nuabee.fr/
-https://jozan.org/
-https://paste.linux.chat/?fe7de19db307af0f#BQyp2fmwMS7JdMp7rjMy3AnupQeJ77Gwnvmor1AvbSZB
-file:///home/jozan/suckless.org/rocks
-http://marmaro.de/prog/mmh/
-https://www.nongnu.org/nmh/
-https://savannah.nongnu.org/projects/nmh/
-http://suckless.org/rocks/
-https://github.com/dudik/herbe
-https://github.com/Sweets/tiramisu
-https://blog.cloudflare.com/http-3-vs-http-2/
-https://lite.duckduckgo.com/lite/