Skip to content

maachue/ametokei

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ametokei(雨時計)

[unofficial fork from Tenki(天気)]

tty-clock with customizable configuration & weather effect written in Rust and powered by ratatui

demo

Credits

  • ckaznable - async, weather background, struct.

Roadmap

  • Improve configuration
  • Improve not enough size
  • Clean & modular code

Installation

Install from Cargo

cargo install --git https://github.com/maachue/ametokei.git

Build from source

Ametokei is written in Rust, so you'll need to grab a Rust installation in order to compile it.

git clone https://github.com/maachue/ametokei.git
cd ametokei
cargo build --release
./target/release/ametokei[.exe] -V

Usage

configuration

[general]
show_seconds = false
format_date = "%Y-%m-%d"
blink_colon = false
color = "White"
center = false
hour12h = false
utc = false
hide_date = false
font = "FONTNAME"
# default: `tenki` (default, from tenki), `digital` (from tty-clock)

[general.meridiem]
am = " [AM]"
pm = " [PM]"

[general.weather]
wind = "Disable"
mode = "Rain"

[performance]
tps = 60
fps = 60

[fontconfig]
spacing_horizontal = 1
spacing_vertical = 1

# Custom font
[font.FONTNAME]
colon_width = 4
num_width = 6
height = 5
symbol_1 = ''

colon = [
0,0,0,0,
0,1,1,0,
0,0,0,0,
0,1,1,0,
0,0,0,0
]

zero = [
1,1,1,1,1,1,
1,1,0,0,1,1,
1,1,0,0,1,1,
1,1,0,0,1,1,
1,1,1,1,1,1
]
one = [
0,0,0,0,1,1,
0,0,0,0,1,1,
0,0,0,0,1,1,
0,0,0,0,1,1,
0,0,0,0,1,1
]
two = [
1,1,1,1,1,1,
0,0,0,0,1,1,
1,1,1,1,1,1,
1,1,0,0,0,0,
1,1,1,1,1,1
]
three = [
1,1,1,1,1,1,
0,0,0,0,1,1,
1,1,1,1,1,1,
0,0,0,0,1,1,
1,1,1,1,1,1
]
four = [
1,1,0,0,1,1,
1,1,0,0,1,1,
1,1,1,1,1,1,
0,0,0,0,1,1,
0,0,0,0,1,1
]
five = [
1,1,1,1,1,1,
0,0,0,0,1,1,
1,1,1,1,1,1,
1,1,0,0,0,0,
1,1,1,1,1,1
]
six = [
1,1,1,1,1,1,
1,1,0,0,0,0,
1,1,1,1,1,1,
1,1,0,0,1,1,
1,1,1,1,1,1
]
seven = [
1,1,1,1,1,1,
0,0,0,0,1,1,
0,0,0,0,1,1,
0,0,0,0,1,1,
0,0,0,0,1,1
]
eight = [
1,1,1,1,1,1,
1,1,0,0,1,1,
1,1,1,1,1,1,
1,1,0,0,1,1,
1,1,1,1,1,1
]
nine = [
1,1,1,1,1,1,
1,1,0,0,1,1,
1,1,1,1,1,1,
0,0,0,0,1,1,
1,1,1,1,1,1
]

Wants to see an example? Here

CLI

Usage: ametokei [OPTIONS]

Options:
  -f, --fps <FPS>
          frame per seconds [default: 60]
  -t, --tps <TPS>
          tick per seconds [default: 60]
      --hour12 <HOUR12>
          set the hour in 12h format [possible values: true, false]
  -c, --center <CENTER>
          center of the terminal [possible values: true, false]
      --utc <UTC>
          use UTC time [possible values: true, false]
      --show-seconds <SHOW_SECONDS>
          show seconds [possible values: true, false]
      --blink-colon <BLINK_COLON>
          blink colon of timer [possible values: true, false]
      --format-date <FORMAT_DATE>
          set the date format [default: "%Y-%m-%d"]
      --hide-date
          hide date
      --timer-color <TIMER_COLOR>
          color of the clock
      --timer-mode <TIMER_MODE>
          [possible values: dvd]
      --font <FONT>
          font name
      --wind <WIND>
          wind mode [possible values: random, disable, only-right, only-left]
      --level <LEVEL>
          effect level, The lower, the stronger
      --bg-mode <BG_MODE>
          [possible values: rain, snow, meteor, disable]
      --config <CONFIG>
          custom config path
      --no-config
          no-config mode
      --generate-config [<GENERATE_CONFIG>]
          create config
  -h, --help
          Print help
  -V, --version
          Print version

LICENSE

MIT

About

tty-clock with customizable configuration

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages