feat: kernel network statistics reporting, new Network configuration applet
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
#include <montauk/syscall.h>
|
||||
#include <montauk/string.h>
|
||||
#include <montauk/heap.h>
|
||||
#include <montauk/config.h>
|
||||
#include <gui/gui.hpp>
|
||||
#include <gui/mtk/settings.hpp>
|
||||
#include <gui/truetype.hpp>
|
||||
#include <gui/svg.hpp>
|
||||
|
||||
@@ -199,33 +199,7 @@ static void music_set_accent(Color accent) {
|
||||
}
|
||||
|
||||
static void music_load_accent() {
|
||||
music_set_accent(colors::ACCENT);
|
||||
|
||||
char user[64];
|
||||
montauk::memset(user, 0, sizeof(user));
|
||||
if (montauk::getuser(user, sizeof(user)) > 0 && user[0]) {
|
||||
auto doc = montauk::config::load_user(user, "desktop");
|
||||
int64_t accent = doc.get_int("appearance.accent_color", -1);
|
||||
if (accent >= 0) {
|
||||
music_set_accent(Color::from_rgb(
|
||||
(uint8_t)((accent >> 16) & 0xFF),
|
||||
(uint8_t)((accent >> 8) & 0xFF),
|
||||
(uint8_t)(accent & 0xFF)));
|
||||
doc.destroy();
|
||||
return;
|
||||
}
|
||||
doc.destroy();
|
||||
}
|
||||
|
||||
auto doc = montauk::config::load("desktop");
|
||||
int64_t accent = doc.get_int("appearance.accent_color", -1);
|
||||
if (accent >= 0) {
|
||||
music_set_accent(Color::from_rgb(
|
||||
(uint8_t)((accent >> 16) & 0xFF),
|
||||
(uint8_t)((accent >> 8) & 0xFF),
|
||||
(uint8_t)(accent & 0xFF)));
|
||||
}
|
||||
doc.destroy();
|
||||
music_set_accent(mtk::load_system_accent());
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user