oops many changes
This commit is contained in:
12 files changed
+1582
-1122
No files matched your search
@@ -0,0 +1,16 @@
|
||||
#ifndef KEYVIBE_CONFIG_IO_H
|
||||
#define KEYVIBE_CONFIG_IO_H
|
||||
#include <stddef.h>
|
||||
|
||||
// Resolve user config path: returns buffer on success, NULL on failure
|
||||
char *get_user_config_path(char *buffer, size_t buflen);
|
||||
|
||||
// Write ~/.keyvibe.json in new format
|
||||
int write_user_config(const char *path, const char *keyboard_sound, const char *mouse_sound, int keyboard_volume, int mouse_volume);
|
||||
|
||||
// Read ~/.keyvibe.json supporting new and legacy formats
|
||||
int read_user_config(const char *path, char **out_keyboard_sound, char **out_mouse_sound, int *out_keyboard_volume, int *out_mouse_volume);
|
||||
|
||||
#endif // KEYVIBE_CONFIG_IO_H
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef KEYVIBE_MUTE_H
|
||||
#define KEYVIBE_MUTE_H
|
||||
|
||||
int read_runtime_mute_file(void);
|
||||
void write_runtime_mute_file(int mute);
|
||||
void write_runtime_keyboard_mute_file(int mute);
|
||||
void write_runtime_mouse_mute_file(int mute);
|
||||
|
||||
#endif // KEYVIBE_MUTE_H
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#ifndef KEYVIBE_SOUNDPACKS_H
|
||||
#define KEYVIBE_SOUNDPACKS_H
|
||||
#include <stddef.h>
|
||||
|
||||
int resolve_keyboard_sound_base_dir(const char *sound_name, char *out_basedir, size_t out_sz);
|
||||
int resolve_mouse_sound_base_dir(const char *sound_name, char *out_basedir, size_t out_sz);
|
||||
int build_paths_for_keyboard_sound(const char *sound_name, char *out_config_path, size_t out_config_sz, char *out_sound_dir, size_t out_sound_sz);
|
||||
int build_paths_for_mouse_sound(const char *sound_name, char *out_config_path, size_t out_config_sz, char *out_sound_dir, size_t out_sound_sz);
|
||||
int validate_keyboard_sound_pack(const char *sound_name);
|
||||
int validate_mouse_sound_pack(const char *sound_name);
|
||||
int list_sound_packs(void);
|
||||
|
||||
#endif // KEYVIBE_SOUNDPACKS_H
|
||||
|
||||
|
||||
@@ -17,5 +17,11 @@ int read_pidfile(const char *path, pid_t *out_pid);
|
||||
int write_pidfile(const char *path, pid_t pid);
|
||||
int process_is_running(pid_t pid);
|
||||
|
||||
// Runtime mute helpers
|
||||
int read_runtime_mute_file(void);
|
||||
void write_runtime_mute_file(int mute);
|
||||
void write_runtime_keyboard_mute_file(int mute);
|
||||
void write_runtime_mouse_mute_file(int mute);
|
||||
|
||||
#endif // KEYVIBE_UTILS_H
|
||||
|
||||
Reference in new issue
Block a user