添加状态栏和调整音量的快捷键

This commit is contained in:
2025-08-27 06:51:07 +08:00
parent 96629c3045
commit c5e2b4c081
10 changed files with 552 additions and 9 deletions

View File

@@ -119,3 +119,44 @@ typedef struct color_set_t {
color_t border_color;
color_t active_border_color;
} color_set_t;
typedef struct {
char mem_used_text[32];
char swap_used_text[32];
float mem_percent;
float swap_percent;
uint64_t mem_used;
uint64_t swap_used;
uint64_t mem_total;
uint64_t mem_free;
uint64_t buffers;
uint64_t cached;
uint64_t swap_total;
uint64_t swap_free;
uint64_t s_reclaimable;
} memory_usage_t;
typedef struct {
uint64_t rx_bytes;
uint64_t tx_bytes;
char up[128];
char down[128];
} net_speed_t;
typedef struct {
uint32_t index;
int mute;
int avg_volume; /* 各通道平均音量(百分比) */
int volumes[5]; /* 各通道音量(百分比) */
char device[512]; /* 音频设备名称 */
} pulse_t;
typedef struct {
pulse_t pulse;
net_speed_t net_speed;
memory_usage_t mem_usage;
double cpu_usage_percent;
char time[256];
} status_t;