updated folder structure once more

This commit is contained in:
2025-09-23 22:03:24 +02:00
parent e3e10a67c8
commit 853c9003f4
73 changed files with 6 additions and 2901 deletions

View File

@@ -0,0 +1,57 @@
/**
* countdown_timer.h
* Header for focus timer functionality
*/
#ifndef COUNTDOWN_TIMER_H
#define COUNTDOWN_TIMER_H
#include "common.h"
/**
* Start a new countdown timer
*
* @param seconds Total duration in seconds
* @param name Optional name for the timer session
* @return 1 if successful, 0 on failure
*/
int start_countdown_timer(int seconds, const char *name);
/**
* Stop the current countdown timer
*/
void stop_countdown_timer();
/**
* Check if a timer is currently active
*
* @return TRUE if timer is active, FALSE otherwise
*/
BOOL is_timer_active();
/**
* Get the current timer display text
*
* @return Pointer to the display text string
*/
const char *get_timer_display();
/**
* Temporarily hide the timer display (used when running external programs)
*/
void hide_timer_display(void);
/**
* Restore the timer display after it was hidden
*/
void show_timer_display(void);
/**
* Command handler for the "timer" command
*
* @param args Command arguments
* @return 1 to continue shell, 0 to exit
*/
int lsh_focus_timer(char **args);
#endif // COUNTDOWN_TIMER_H

38
include/utils/timer.h Normal file
View File

@@ -0,0 +1,38 @@
/**
* timer.h
* Header for command execution timer functionality
*/
#ifndef TIMER_H
#define TIMER_H
#include "common.h"
/**
* Format a time interval in milliseconds to a readable string
*
* @param ms Time in milliseconds
* @param buffer Buffer to store formatted time
* @param buffer_size Size of the buffer
*/
void format_time(double ms, char *buffer, size_t buffer_size);
/**
* Implementation of the timer command
* Usage: timer COMMAND [ARGS...]
*
* @param args Command arguments
* @return 1 to continue, 0 to exit
*/
int lsh_timer(char **args);
/**
* Implementation of the time command (alias for timer)
* Usage: time COMMAND [ARGS...]
*
* @param args Command arguments
* @return 1 to continue, 0 to exit
*/
int lsh_time(char **args);
#endif // TIMER_H

8
include/utils/weather.h Normal file
View File

@@ -0,0 +1,8 @@
#ifndef WEATHER_H
#define WEATHER_H
#include "common.h"
int lsh_weather(char **args);
#endif // WEATHER_H