-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetMail
executable file
·51 lines (43 loc) · 2.11 KB
/
getMail
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env bash
#
# ############################################################################
# Project: scripts (none)
# File...: getMail
# Created: Tuesday, 2023/04/25 - 20:11:57
# Author.: fbnmtz, ([email protected])
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Last Modified: Monday, 2024/12/09 - 17:39:08
# Modified By..: @fbnmtz, ([email protected])
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Version: 0.0.3.63
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Description:
# >
# ############################################################################
# HISTORY:
#
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~
# shellcheck disable=SC1090,SC2154
# * SC1090: Can't follow non-constant source. Use a directive to specify location.
# -> cant follow or source usage
# * SC2154: var is referenced but not assigned.
# -> variables created by or library system (don't worry)
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~
source "$xSHELL_INIT"
xrequirements rofi:dmenu
use args getMail.lib
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~
xarg --id -m,--menu --var action:menu --desc "select a email with a dmenu"
xarg --id -n,--new --var action:new,email+r --desc "save new email"
xarg --id -e,--edit --var action:edit,editor+o --desc "edit email list"
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~
# arguments will be checked/validated here (use --xhelp arg for more info)
xrun --xreject-unknow --xrequire-one --xcolors "$@"
[ -n "$editor" ] && _EDITOR=$editor
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~
# now put your code below
case "$action" in
menu) xMenu ;;
new ) xNew "$email" ;;
edit) xrequirements "$_EDITOR"; $_EDITOR "$MAILSTORE" ;;
esac