Initial commit: Geminux 0.1.0 (helio) for Planet Computers Gemini PDA (MT6797X)

This commit is contained in:
Luxferre committed 2026-11-22 10:49:59 +02:00
commit 034c1f61b1
816 files changed
+223435

No files matched your search

+49
View File
@@ -0,0 +1,49 @@
# Auto-generated by geminux-sync-dunst-theme from active .Xresources theme
[global]
monitor = 0
follow = mouse
width = 560
height = (0, 220)
origin = top-right
offset = (16, 48)
notification_limit = 5
progress_bar = true
padding = 12
horizontal_padding = 16
text_icon_padding = 12
frame_width = 2
frame_color = "#59c2ff"
separator_color = "#283444"
corner_radius = 6
idle_threshold = 120
font = Fira Code 12.1
markup = full
format = "<b>%s</b>\n%b"
alignment = left
vertical_alignment = center
show_age_threshold = 60
word_wrap = yes
icon_position = left
max_icon_size = 48
dmenu = /usr/bin/dmenu -p dunst:
mouse_left_click = do_action, close_current
mouse_middle_click = close_current
mouse_right_click = close_all
[urgency_low]
background = "#0f1419"
foreground = "#7b8898"
frame_color = "#283444"
timeout = 5
[urgency_normal]
background = "#161d26"
foreground = "#e6e1cf"
frame_color = "#59c2ff"
timeout = 8
[urgency_critical]
background = "#4c1d24"
foreground = "#ffffff"
frame_color = "#f07178"
timeout = 0
BIN
View File
Binary file not shown.
+247
View File
@@ -0,0 +1,247 @@
#!/bin/sh
set -eu
DBUS_NAME="org.freedesktop.Notifications"
DBUS_PATH="/org/freedesktop/Notifications"
DBUS_IFAC_DUNST="org.dunstproject.cmd0"
DBUS_IFAC_PROP="org.freedesktop.DBus.Properties"
DBUS_IFAC_FDN="org.freedesktop.Notifications"
die() {
printf "%s\n" "${1}" >&2
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
echo "DBUS_SESSION_BUS_ADDRESS is blank. Is the D-Bus session configured correctly?" >&2
fi
exit 1
}
show_help() {
# Below, each line starts with a tab character
cat <<-EOH
Usage: dunstctl <command> [parameters]
Commands:
action Perform the default action, or open the
context menu of the notification at the
given position
close [ID] Close the last notification or the
notification with given ID
close-all Close all the notifications
context Open context menu
count [displayed|history|waiting] Show the number of notifications
history Display notification history (in JSON)
history-clear Delete all notifications from history
history-pop [ID] Pop the latest notification from
history or optionally the
notification with given ID
history-rm ID Remove the notification from
history with given ID.
is-paused [-e|--exit-code] Check if pause level is greater than 0, optionally with exit code instead of text output
set-paused true|false|toggle Set the pause status
get-pause-level Get the current pause level
set-pause-level level Set the pause level
rule name enable|disable|toggle Enable or disable a rule by its name
rules [--json] Displays configured rules (optionally
in JSON)
reload [dunstrc ...] Reload the settings of the running
instance, optionally with specific
config files (space/comma-separated)
debug Print debugging information
help Show help
EOH
}
busctl_checked() {
command -v busctl >/dev/null 2>/dev/null || die "Command busctl not found"
busctl --user --json=pretty --no-pager call "${DBUS_NAME}" "${DBUS_PATH}" "${DBUS_IFAC_DUNST}" "$@"
}
dbus_send_checked() {
dbus-send "$@" \
|| die "Failed to communicate with dunst, is it running? Or maybe the version is outdated. You can try 'dunstctl debug' as a next debugging step."
}
method_call() {
dbus_send_checked --print-reply=literal --dest="${DBUS_NAME}" "${DBUS_PATH}" "$@"
}
property_get() {
dbus_send_checked --print-reply=literal --dest="${DBUS_NAME}" "${DBUS_PATH}" "${DBUS_IFAC_PROP}.Get" "string:${DBUS_IFAC_DUNST}" "string:${1}"
}
property_set() {
dbus_send_checked --print-reply=literal --dest="${DBUS_NAME}" "${DBUS_PATH}" "${DBUS_IFAC_PROP}.Set" "string:${DBUS_IFAC_DUNST}" "string:${1}" "${2}"
}
command -v dbus-send >/dev/null 2>/dev/null || die "Command dbus-send not found"
case "${1:-}" in
"action")
method_call "${DBUS_IFAC_DUNST}.NotificationAction" "uint32:${2:-0}" >/dev/null
;;
"close")
if [ $# -eq 1 ]; then
method_call "${DBUS_IFAC_DUNST}.NotificationCloseLast" >/dev/null
elif [ $# -eq 2 ]; then
method_call "${DBUS_IFAC_FDN}.CloseNotification" "uint32:$2" >/dev/null
else
die "Please pass the right number of arguments. Close takes 0 or 1 arguments"
fi
;;
"close-all")
method_call "${DBUS_IFAC_DUNST}.NotificationCloseAll" >/dev/null
;;
"context")
method_call "${DBUS_IFAC_DUNST}.ContextMenuCall" >/dev/null
;;
"count")
[ $# -eq 1 ] || [ "${2}" = "displayed" ] || [ "${2}" = "history" ] || [ "${2}" = "waiting" ] \
|| die "Please give either 'displayed', 'history', 'waiting' or none as count parameter."
if [ $# -eq 1 ]; then
property_get waitingLength | ( read -r _ _ waiting; printf " Waiting: %s\n" "${waiting}" )
property_get displayedLength | ( read -r _ _ displayed; printf " Currently displayed: %s\n" "${displayed}" )
property_get historyLength | ( read -r _ _ history; printf " History: %s\n" "${history}")
else
property_get ${2}Length | ( read -r _ _ notifications; printf "%s\n" "${notifications}"; )
fi
;;
"history-clear")
method_call "${DBUS_IFAC_DUNST}.NotificationClearHistory" >/dev/null
;;
"history-pop")
if [ "$#" -eq 1 ]
then
method_call "${DBUS_IFAC_DUNST}.NotificationShow" >/dev/null
elif [ "$#" -eq 2 ]
then
method_call "${DBUS_IFAC_DUNST}.NotificationPopHistory" "uint32:${2:-0}" >/dev/null
else
die "Please pass the right number of arguments. History-pop takes 0 or 1 arguments"
fi
;;
"history-rm")
if [ $# -eq 2 ]; then
method_call "${DBUS_IFAC_DUNST}.NotificationRemoveFromHistory" "uint32:${2}" >/dev/null
else
die "Please pass the right number of arguments. History-rm takes 1 arguments"
fi
;;
"is-paused")
exit=false
case "${2:-}" in
-e | --exit-code)
exit=true
;;
esac
property_get paused | {
read -r _ _ paused
if [ "$exit" = "false" ]; then
printf "%s\n" "${paused}"
elif [ "${paused}" = "false" ]; then
exit 1
fi
}
;;
"set-paused")
[ "${2:-}" ] \
|| die "No status parameter specified. Please give either 'true', 'false' or 'toggle' as paused parameter."
[ "${2}" = "true" ] || [ "${2}" = "false" ] || [ "${2}" = "toggle" ] \
|| die "Please give either 'true', 'false' or 'toggle' as paused parameter."
if [ "${2}" = "toggle" ]; then
paused=$(property_get paused | ( read -r _ _ paused; printf "%s\n" "${paused}"; ))
if [ "${paused}" = "true" ]; then
property_set paused variant:boolean:false
else
property_set paused variant:boolean:true
fi
else
property_set paused variant:boolean:"$2"
fi
;;
"rules")
case "${2:-}" in
"" | --json)
busctl_checked RuleList \
| {
if [ "${2:-}" = '--json' ]
then
cat
else
command -v jq >/dev/null 2>/dev/null || die "Command jq not found"
jq --raw-output '.data[][] | ["[\(.name.data)]"], [to_entries[] | select(.key != "name") | " \(.key) = \(.value.data)"] | join("\n")'
fi
} \
|| die "Dunst is unreachable or the version is too old."
;;
*)
die "Unknown format \"${2}\". Please use either \"--json\" or no option at all."
;;
esac
;;
"rule")
[ "${2:-}" ] \
|| die "No rule name parameter specified. Please give the rule name"
case "${3:-}" in
"disable")
state=0
;;
"enable")
state=1
;;
"toggle")
state=2
;;
*)
die "No valid rule state parameter specified. Please give either 'enable', 'disable' or 'toggle'"
;;
esac
method_call "${DBUS_IFAC_DUNST}.RuleEnable" "string:${2:-1}" "int32:${state}" >/dev/null
;;
"get-pause-level")
property_get pauseLevel | ( read -r _ _ paused; printf "%s\n" "${paused}"; )
;;
"set-pause-level")
[ "${2:-}" ] \
|| die "No status parameter specified. Please give a number as paused parameter."
case "$2" in
(*[!0123456789]*)
die "Please give a number as paused level parameter." ;;
('')
die "Please give a number as paused level parameter." ;;
esac
property_set pauseLevel variant:uint32:"$2"
;;
"help"|"--help"|"-h")
show_help
;;
"debug")
dbus-send --print-reply=literal --dest="${DBUS_NAME}" "${DBUS_PATH}" "${DBUS_IFAC_FDN}.GetServerInformation" >/dev/null 2>/dev/null \
|| die "No notification manager is running."
dbus-send --print-reply=literal --dest="${DBUS_NAME}" "${DBUS_PATH}" "${DBUS_IFAC_FDN}.GetServerInformation" \
| (
read -r name _ version _
[ "${name}" = "dunst" ]
printf "dunst version: %s\n" "${version}"
) \
|| die "Another notification manager is running. It's not dunst"
dbus-send --print-reply=literal --dest="${DBUS_NAME}" "${DBUS_PATH}" "${DBUS_IFAC_DUNST}.Ping" >/dev/null 2>/dev/null \
|| die "Dunst controlling interface not available. Is the version too old?"
;;
"history")
busctl_checked NotificationListHistory \
|| die "Dunst is not running or unreachable."
;;
"reload")
shift
method_call "${DBUS_IFAC_DUNST}.ConfigReload" "array:string:$(IFS=','; echo "$*")" >/dev/null
;;
"")
die "dunstctl: No command specified. Use dunstctl help"
;;
*)
die "dunstctl: unrecognized command '${1:-}'. Please consult the usage."
;;
esac
# vim: noexpandtab
+1
View File
@@ -0,0 +1 @@
notify-send
BIN
View File
Binary file not shown.
@@ -0,0 +1,3 @@
[D-BUS Service]
Name=org.freedesktop.Notifications
Exec=/usr/bin/dunst
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+168
View File
@@ -0,0 +1,168 @@
/*
* Geminux UI Toolkit (libgemui)
* Pure C11 X11 + Cairo + Pango/HarfBuzz landscape HiDPI UI library with live .Xresources theming.
*/
#ifndef GEMUI_H
#define GEMUI_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <X11/Xlib.h>
#include <X11/keysym.h>
#include <cairo/cairo.h>
#ifdef __cplusplus
extern "C" {
#endif
#define GEMUI_ALIGN_LEFT 0
#define GEMUI_ALIGN_CENTER 1
#define GEMUI_ALIGN_RIGHT 2
#define GEMUI_PTR_DOWN 0
#define GEMUI_PTR_MOVE 1
#define GEMUI_PTR_UP 2
#define GEMUI_PTR_SCROLL_UP 3
#define GEMUI_PTR_SCROLL_DOWN 4
#define GEMUI_MAX_HITS 192
#define GEMUI_MAX_FDS 16
typedef struct {
double r;
double g;
double b;
double a;
uint32_t argb;
} gemui_color_t;
typedef struct {
int x;
int y;
int w;
int h;
} gemui_rect_t;
typedef struct {
gemui_rect_t r;
int id;
int val;
} gemui_hit_t;
typedef struct {
char name[64];
char font_face[96];
char icon_font_face[96];
int base_font_size;
int dpi;
gemui_color_t bg_main;
gemui_color_t bg_bar;
gemui_color_t bg_header;
gemui_color_t bg_footer;
gemui_color_t bg_overlay;
gemui_color_t bg_alt_even;
gemui_color_t bg_alt_odd;
gemui_color_t bg_input;
gemui_color_t bg_input_focus;
gemui_color_t bg_button;
gemui_color_t bg_search;
gemui_color_t bg_bubble_in;
gemui_color_t bg_bubble_out;
gemui_color_t bg_toast;
gemui_color_t fg_main;
gemui_color_t fg_bright;
gemui_color_t fg_muted;
gemui_color_t sel_bg;
gemui_color_t sel_fg;
gemui_color_t accent;
gemui_color_t accent_alt;
gemui_color_t highlight;
gemui_color_t border;
gemui_color_t divider;
gemui_color_t success;
gemui_color_t info;
gemui_color_t warning;
gemui_color_t danger;
gemui_color_t danger_bg;
} gemui_theme_t;
typedef struct gemui_app gemui_app_t;
typedef void (*gemui_fd_cb)(gemui_app_t *app, int fd, void *ud);
typedef void (*gemui_timer_cb)(gemui_app_t *app, void *ud);
typedef struct {
void (*on_draw)(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud);
void (*on_key)(gemui_app_t *app, KeySym ks, unsigned int state, const char *utf8, void *ud);
void (*on_ptr)(gemui_app_t *app, int type, int x, int y, unsigned int btn, void *ud);
void (*on_theme)(gemui_app_t *app, void *ud);
void (*on_resize)(gemui_app_t *app, int w, int h, void *ud);
} gemui_handlers_t;
bool gemui_color_parse(const char *hex, gemui_color_t *out);
void gemui_theme_defaults(gemui_theme_t *t);
bool gemui_theme_load_file(const char *path, gemui_theme_t *out);
void gemui_theme_reload(gemui_app_t *app);
gemui_app_t *gemui_create(const char *res_name, const char *title,
int w, int h, bool fullscreen_override);
void gemui_destroy(gemui_app_t *app);
void gemui_set_handlers(gemui_app_t *app, const gemui_handlers_t *h, void *userdata);
void gemui_set_title(gemui_app_t *app, const char *title);
Display *gemui_display(const gemui_app_t *app);
Window gemui_window(const gemui_app_t *app);
const gemui_theme_t *gemui_theme(const gemui_app_t *app);
int gemui_width(const gemui_app_t *app);
int gemui_height(const gemui_app_t *app);
int gemui_scale_px(const gemui_app_t *app, int logical_px);
int gemui_add_fd(gemui_app_t *app, int fd, gemui_fd_cb cb, void *userdata);
void gemui_del_fd(gemui_app_t *app, int fd);
void gemui_set_timer_ms(gemui_app_t *app, int interval_ms, gemui_timer_cb cb, void *userdata);
void gemui_request_redraw(gemui_app_t *app);
void gemui_show_toast(gemui_app_t *app, const char *msg, int duration_ms);
int gemui_run(gemui_app_t *app);
void gemui_quit(gemui_app_t *app, int code);
bool gemui_grab_input(gemui_app_t *app);
void gemui_ungrab_input(gemui_app_t *app);
void gemui_hits_clear(gemui_app_t *app);
void gemui_hit_add(gemui_app_t *app, gemui_rect_t r, int id, int val);
const gemui_hit_t *gemui_hit_test(const gemui_app_t *app, int x, int y);
void gemui_set_source(cairo_t *cr, gemui_color_t c);
void gemui_rounded_rect(cairo_t *cr, gemui_rect_t r, double radius);
void gemui_fill_rect(cairo_t *cr, gemui_rect_t r, gemui_color_t c);
void gemui_fill_round(cairo_t *cr, gemui_rect_t r, double radius, gemui_color_t c);
void gemui_stroke_round(cairo_t *cr, gemui_rect_t r, double radius, double lw, gemui_color_t c);
int gemui_draw_text(cairo_t *cr, const gemui_theme_t *t, gemui_rect_t r,
const char *text, int pt_delta, bool bold, int align, gemui_color_t c);
int gemui_draw_icon(cairo_t *cr, const gemui_theme_t *t, gemui_rect_t r,
const char *icon_utf8, int pt_delta, int align, gemui_color_t c);
void gemui_draw_header(gemui_app_t *app, cairo_t *cr, const char *icon,
const char *title, const char *right_badge);
void gemui_draw_button(gemui_app_t *app, cairo_t *cr, gemui_rect_t r,
const char *label, int hit_id, int hit_val,
bool primary, bool active, bool focused);
void gemui_draw_toggle(gemui_app_t *app, cairo_t *cr, gemui_rect_t r,
const char *label, bool on, int hit_id, int hit_val, bool focused);
void gemui_draw_slider(gemui_app_t *app, cairo_t *cr, gemui_rect_t r,
const char *label, double norm_val, const char *val_text,
int hit_id, int hit_val, bool focused);
void gemui_draw_input(gemui_app_t *app, cairo_t *cr, gemui_rect_t r,
const char *placeholder, const char *text, bool mask_bullets,
bool focused, int hit_id, int hit_val);
void gemui_draw_toast(gemui_app_t *app, cairo_t *cr);
int gemui_unix_cmd(const char *sock_path, const char *cmd, char *resp, size_t resp_sz);
int gemui_read_file_line(const char *path, char *buf, size_t sz);
int gemui_run_cmd_capture(const char *const argv[], char *out, size_t out_sz);
int gemui_spawn_detached(const char *const argv[]);
void gemui_utf8_pop_char(char *buf);
#ifdef __cplusplus
}
#endif
#endif /* GEMUI_H */
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large. Load diff
Binary file not shown.
@@ -0,0 +1,91 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
* UAPI definitions for MediaTek MT6797 staged CCCI/CLDMA driver.
*/
#ifndef _UAPI_LINUX_MT6797_CCCI_H
#define _UAPI_LINUX_MT6797_CCCI_H
#include <linux/ioctl.h>
#include <linux/types.h>
#define MT6797_CCCI_MAGIC 'C'
/* CCCI 16-byte hardware framing header */
struct mt6797_ccci_header {
__u32 data0;
__u32 data1;
__u32 channel;
__u32 reserved;
} __attribute__((packed));
/* Verified MT6797 CCCI channel IDs */
#define MT6797_CCCI_CH_CONTROL_RX 0
#define MT6797_CCCI_CH_CONTROL_TX 1
#define MT6797_CCCI_CH_SYSTEM_RX 2
#define MT6797_CCCI_CH_SYSTEM_TX 3
#define MT6797_CCCI_CH_PCM_RX 4
#define MT6797_CCCI_CH_PCM_TX 5
#define MT6797_CCCI_CH_UART1_RX 6
#define MT6797_CCCI_CH_UART1_TX 8
#define MT6797_CCCI_CH_UART2_RX 10
#define MT6797_CCCI_CH_UART2_TX 12
#define MT6797_CCCI_CH_FS_RX 14
#define MT6797_CCCI_CH_FS_TX 15
#define MT6797_CCCI_CH_CCMNI1_RX 20
#define MT6797_CCCI_CH_CCMNI1_TX 22
#define MT6797_CCCI_CH_CCMNI2_RX 24
#define MT6797_CCCI_CH_CCMNI2_TX 26
#define MT6797_CCCI_CH_CCMNI3_RX 28
#define MT6797_CCCI_CH_CCMNI3_TX 30
#define MT6797_CCCI_CH_RPC_RX 32
#define MT6797_CCCI_CH_RPC_TX 33
#define MT6797_CCCI_CH_IPC_UART_RX 38
#define MT6797_CCCI_CH_IPC_UART_TX 40
#define MT6797_CCCI_CH_MD_LOG_RX 42
#define MT6797_CCCI_CH_MD_LOG_TX 43
#define MT6797_CCCI_CH_ICUSB_RX 60
#define MT6797_CCCI_CH_ICUSB_TX 61
#define MT6797_CCCI_CH_STATUS_RX 67
#define MT6797_CCCI_CH_STATUS_TX 68
/* Control message IDs on CCCI_CONTROL_RX/TX */
#define MT6797_CCCI_MSG_MD_INIT_START_BOOT 0xB0000001U
#define MT6797_CCCI_MSG_NORMAL_BOOT_READY 0xB0000002U
#define MT6797_CCCI_MSG_META_BOOT_READY 0xB0000003U
#define MT6797_CCCI_MSG_MD_EX 0xB0000004U
#define MT6797_CCCI_MSG_MD_EX_REC_OK 0xB0000006U
#define MT6797_CCCI_MSG_HS1 0xFFFFFFFFU
enum mt6797_ccci_md_state {
MT6797_MD_STATE_INVALID = 0,
MT6797_MD_STATE_GATED = 1,
MT6797_MD_STATE_BOOTING = 2,
MT6797_MD_STATE_HS1 = 3,
MT6797_MD_STATE_READY = 4,
MT6797_MD_STATE_EXCEPTION = 5,
MT6797_MD_STATE_RESET = 6,
};
struct mt6797_ccci_status {
__u32 stage;
__u32 md_state;
__u32 boot_stats0;
__u32 boot_stats1;
__u64 md_mem_phys;
__u64 md_mem_size;
__u64 smem_phys;
__u64 smem_size;
__u32 tx_packets;
__u32 rx_packets;
__u32 handoff_valid;
__u32 reserved;
};
#define CCCI_IOC_MD_RESET _IO(MT6797_CCCI_MAGIC, 0)
#define CCCI_IOC_GET_MD_STATE _IOR(MT6797_CCCI_MAGIC, 1, __u32)
#define CCCI_IOC_SET_STAGE _IOW(MT6797_CCCI_MAGIC, 3, __u32)
#define CCCI_IOC_GET_STATUS _IOR(MT6797_CCCI_MAGIC, 4, struct mt6797_ccci_status)
#define CCCI_IOC_ENTER_DEEP_FLIGHT _IO(MT6797_CCCI_MAGIC, 14)
#define CCCI_IOC_LEAVE_DEEP_FLIGHT _IO(MT6797_CCCI_MAGIC, 15)
#endif /* _UAPI_LINUX_MT6797_CCCI_H */
Loaded 100 of 816 files, more files were not shown because too many files have changed in this diff. Show more