summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2023-01-31 15:44:23 -0800
committerXiao Pan <gky44px1999@gmail.com>2023-01-31 15:44:23 -0800
commit8b99f9b8808434d6f212d358592591c27ccfb85e (patch)
treeff1bb03b69800d9db0525feeb5e66da168595eb6 /home
parent115be03a0b88fb11a2e81f6cfcdff724ed8d3cee (diff)
update
Diffstat (limited to 'home')
-rwxr-xr-xhome/xyz/.local/bin/news36
1 files changed, 27 insertions, 9 deletions
diff --git a/home/xyz/.local/bin/news b/home/xyz/.local/bin/news
index 5d20752a..60703687 100755
--- a/home/xyz/.local/bin/news
+++ b/home/xyz/.local/bin/news
@@ -1,11 +1,29 @@
#!/bin/sh
-o "$BROWSER" https://github.com/notifications https://mail.google.com https://archlinuxarm.org/forum/viewforum.php?f=3
-# --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 rate xmr@1w
-o alacritty --hold -e wtr
-o alacritty -e newsboat
-o alacritty -e weechat
-o telegram-desktop
+daily () {
+ o "$BROWSER" https://github.com/notifications https://mail.google.com
+ # 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 -e weechat
+ o telegram-desktop
+}
+
+monthly () {
+ o "$BROWSER" --new-window https://archlinuxarm.org/forum/viewforum.php?f=3
+ o alacritty --hold -e rate xmr@60d
+ daily
+}
+
+if [ $# -eq 0 ]; then
+ daily
+else
+ while getopts m opt; do
+ case $opt in
+ m) monthly;;
+ \?) exit 1;;
+ esac
+ done
+fi