๐ cal-hl: colorful yearly calendar in console
๐ก Newskategorie: Linux Tipps
๐ Quelle: reddit.com
For years I used paper calendars with color pencils to mark passed days with red/green or red/green/yellow etc. Finally it got me bored so I've made a bash script to do it without paper. Here is how it looks.
There is a detailed readme in the repo. Below are some usage examples.
Mark 'green' some dates:
cal-hl.sh -s green # Current day cal-hl.sh -s green 12 # Current month, 12 cal-hl.sh -s green 03-09 # Current year, March 9 cal-hl.sh -s green 2020-12-21 # Dec 21 2020
Multiple dates can be marked with a single command:
cal-hl.sh -s red 12 03-09 2020-12-21
Unmark the above and the current day:
cal-hl.sh -u 12 03-09 2020-12-21 cal-hl.sh -u
Accepted date formats are 20YYMMDD, 20YY-MM-DD, MMDD, MM-DD, DD, D.
Print calendar with marks:
cal-hl.sh # Current year, week start based on locale cal-hl.sh -S # Current year, week start on Sunday cal-hl.sh -y 2020 -M # 2020, week start on Monday
By default marks are loaded from and saved into ~/.config/cal-hl
. You can use any file with -f
option:
cal-hl.sh -f my1.txt -s red # Mark current day 'red' in my1.txt cal-hl.sh -f my1.txt # Show current year with marks from # my1.txt
Marks like 'green' and 'red' are fully customizable, both their names and colors they produce. With a custom config in ~/.config/cal-hl-rc
you could get A/B/C or virgin/chad whatever. You could also alias marks and another aliases. Aliases are treated the same as marks with -s
option.
Default marks are c0
to c7
corresponding to ANSI colors 0 to 7. Those are aliased to black, red, green, yellow, blue, magenta, cyan, white. Actual color depends on the color scheme in your terminal. With -c
option you could dump the current config and see the colors your terminal produces for the marks.
[link] [comments] ...