Add hot corners, media keys, orionshot, orionclip, notification history, autostart, GTK accent update, wallpaper slideshow, ISO build
- wm: hot corner polling via select()-based wm_run loop; TL=Exposé, TR=show desktop, BL=launcher, BR=lock - wm: XF86 media key grabs (volume, brightness, playback) + Super+V for clipboard - wm: autostart reads ~/.config/orionos/autostart on startup - events: media key dispatch (amixer/brightnessctl/playerctl); Super+V → orionclip --show; Print → orionshot - orionshot: new X11 screenshot tool, full-screen and rubber-band region modes, saves PNG to ~/Pictures/Screenshots/ - orionclip: new clipboard manager daemon; polls clipboard, stores 20 entries, popup via Super+V IPC - orionnotify: append-only notification history log at ~/.local/share/orionos/notif-history.log - themes: GTK accent updated from #3A6898 to #1E58A8 to match WM/deskbar - themes: orionwallpaper gains --slideshow DIR [SECS] mode using feh + sleep loop - iso: Docker-based archiso builder, live-session xinitrc, profiledef.sh - Makefile: add orionshot and orionclip to all/clean/install; Docker-based iso target
This commit is contained in:
15 files changed
+957
-84
No files matched your search
@@ -12,6 +12,7 @@
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#define DESKBAR_W 200
|
||||
#define NOTIF_W 320
|
||||
@@ -124,6 +125,26 @@ static void notif_close(int idx) {
|
||||
notif_restack();
|
||||
}
|
||||
|
||||
static void notif_log(const char *summary, const char *body) {
|
||||
const char *home = getenv("HOME");
|
||||
if (!home) return;
|
||||
char dir[512], path[560];
|
||||
snprintf(dir, sizeof(dir), "%s/.local/share/orionos", home);
|
||||
snprintf(path, sizeof(path), "%s/notif-history.log", dir);
|
||||
mkdir(dir, 0755);
|
||||
FILE *f = fopen(path, "a");
|
||||
if (!f) return;
|
||||
time_t t = time(NULL);
|
||||
/* sanitise: replace tabs and newlines with spaces */
|
||||
char sum[128], bod[256];
|
||||
strncpy(sum, summary ? summary : "", 127); sum[127] = '\0';
|
||||
strncpy(bod, body ? body : "", 255); bod[255] = '\0';
|
||||
for (char *p = sum; *p; p++) if (*p == '\t' || *p == '\n') *p = ' ';
|
||||
for (char *p = bod; *p; p++) if (*p == '\t' || *p == '\n') *p = ' ';
|
||||
fprintf(f, "%ld\t%s\t%s\n", (long)t, sum, bod);
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
static unsigned int notif_add(const char *summary, const char *body, int expire_ms) {
|
||||
if (n_notifs >= NOTIF_MAX) {
|
||||
/* evict oldest */
|
||||
@@ -145,6 +166,7 @@ static unsigned int notif_add(const char *summary, const char *body, int expire_
|
||||
clock_gettime(CLOCK_MONOTONIC, &n->show_time);
|
||||
n->active = 1;
|
||||
n_notifs++;
|
||||
notif_log(summary, body);
|
||||
|
||||
int nx = notif_x();
|
||||
int ny = notif_y(n_notifs - 1);
|
||||
|
||||
Reference in new issue
Block a user