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.
This is just a gif demonstration of the clock.
You can try the live demo of the AnalogClock running in your web browser using WebAssembly. Live Demo
To compile and run the AnalogClock program, follow these steps:
- Ensure you have the SDL2 and SDL2_ttf libraries installed on your system.
- Clone the repository or download the source code.
git clone https://github.com/mertyuks3l/AnalogClock.git- Navigate to the directory containing the source code.
cd AnalogClock
- Compile the program using the following command:
make build- After successful compilation, run the program with:
./AnalogClock - You can change the clock's size with the
-soption followed by the desired size in pixels. For example:
./AnalogClock -s 400- To toggle the sweeping second hand, use the
-woption:
./AnalogClock -w
- You can switch between the clock's color theme with the
-lor-doptions for light and dark themes, respectively. For example:
./AnalogClock -l- To toggle the visibility of the numbers on the clock face, use the
-noption:
./AnalogClock -n- To display the current time in the terminal, use the
-toption:
./AnalogClock -t- To run the clock in the background as a daemon, use the
-boption:
./AnalogClock -b- For help and more options, use the
-hoption:
./AnalogClock -h

