Skip to content

About

A simple analog clock

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AnalogClock

A simple analog clock built using C and SDL2 library. The clock displays the current time with hour, minute, and second hand. You can use it as a desktop widget or a terminal application to check the time in a visually appealing way.

Screenshot-03
This is just a gif demonstration of the clock.

Live Demo

You can try the live demo of the AnalogClock running in your web browser using WebAssembly. Live Demo

Compilation and Execution

To compile and run the AnalogClock program, follow these steps:

  1. Ensure you have the SDL2 and SDL2_ttf libraries installed on your system.
  2. Clone the repository or download the source code.
git clone https://github.com/mertyuks3l/AnalogClock.git
  1. Navigate to the directory containing the source code.
cd AnalogClock
  1. Compile the program using the following command:
make build
  1. After successful compilation, run the program with:
./AnalogClock 

Usage

  • You can change the clock's size with the -s option followed by the desired size in pixels. For example:
./AnalogClock -s 400
  • To toggle the sweeping second hand, use the -w option:
./AnalogClock -w
  • You can switch between the clock's color theme with the -l or -d options for light and dark themes, respectively. For example:
./AnalogClock -l
  • To toggle the visibility of the numbers on the clock face, use the -n option:
./AnalogClock -n
  • To display the current time in the terminal, use the -t option:
./AnalogClock -t
  • To run the clock in the background as a daemon, use the -b option:
./AnalogClock -b
  • For help and more options, use the -h option:
./AnalogClock -h

Screenshots

Screenshot-01 Screenshot-02 Screenshot-03

About

A simple analog clock

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages