From 5eb0dbf136a9ad582192e003b7573a080514f063 Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Tue, 9 Jan 2024 04:09:59 -0800 Subject: init from config_local_arch personal shell scripts git log history see https://git.flylightning.xyz/config_local_arch/tree/home/xyz/.local/bin?id=d266c511cffb7eeb20bf1e4610d9d32557b7d0e6 --- news | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 news (limited to 'news') diff --git a/news b/news new file mode 100755 index 0000000..e0d2ffa --- /dev/null +++ b/news @@ -0,0 +1,31 @@ +#!/bin/sh + +daily () { + # mail.yahoo.com/d/folders/6 is spam folder + o "$BROWSER" https://github.com/notifications https://mail.google.com 'https://mail.google.com/mail/u/0/#spam' https://mail.yahoo.com https://mail.yahoo.com/d/folders/6 https://en.wikipedia.org/wiki/Portal:Current_events + # alacritty --hold must be before -e + # full window: -w156, am and pm in one line: -w114 + o alacritty --hold -e rem -cu+2 -@ -w114 + o alacritty --hold -e wtr + o alacritty -e newsboat + o alacritty --hold -e pass practice_password0 +} + +monthly () { + o "$BROWSER" https://smtp.cheogram.com/ http://download.huzheng.org + o alacritty --hold -e rate + # Show 3 months' remind. I use 3 months because it is better to know I20 deadline 3 months earlier so I have 2 months to prepare the money for extension. + # (2*31+30+6)/7=14. Consider month 1 day 1 is on Sunday and make sure month 3 day 31 is shown. Tested with `rem -cu+14 -@ -w114 2025-03-01` + o alacritty --hold -e sh -c 'rem -cu+14 -@ -w114 | $PAGER' +} + +if [ $# -eq 0 ]; then + daily +else + while getopts m opt; do + case $opt in + m) monthly;; + \?) exit 1;; + esac + done +fi -- cgit v1.2.3-70-g09d2