From 77538381c28e4de8fa7d3f3731412c97699bb889 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 19 Jul 2025 16:37:04 +0300 Subject: feat: add app icon and change default output directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add custom app icon with memory/brain theme - Icon now displays in GNOME app menu, window title bar, and process list - Change default output directory to ~/.local/state/totalrecall/ - Make output directory configurable via CLI flag, config file, or env var - Add desktop entry file for GNOME integration - Add install script for easy icon installation - Update README with icon display and default directory information - Bump version to 0.5.1 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- internal/gui/app.go | 6 +++++- internal/gui/icon.go | 17 +++++++++++++++++ internal/gui/totalrecall_256.png | Bin 0 -> 62217 bytes 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 internal/gui/icon.go create mode 100644 internal/gui/totalrecall_256.png (limited to 'internal/gui') diff --git a/internal/gui/app.go b/internal/gui/app.go index 31d2460..2226eb1 100644 --- a/internal/gui/app.go +++ b/internal/gui/app.go @@ -112,8 +112,11 @@ func New(config *Config) *Application { ctx, cancel := context.WithCancel(context.Background()) + myApp := app.New() + myApp.SetIcon(GetAppIcon()) + app := &Application{ - app: app.New(), + app: myApp, config: config, ctx: ctx, cancel: cancel, @@ -152,6 +155,7 @@ func New(config *Config) *Application { // setupUI creates the main user interface func (a *Application) setupUI() { a.window = a.app.NewWindow(fmt.Sprintf("TotalRecall v%s - Bulgarian Flashcard Generator", internal.Version)) + a.window.SetIcon(GetAppIcon()) a.window.Resize(fyne.NewSize(800, 700)) // Create input section with navigation diff --git a/internal/gui/icon.go b/internal/gui/icon.go new file mode 100644 index 0000000..f778225 --- /dev/null +++ b/internal/gui/icon.go @@ -0,0 +1,17 @@ +package gui + +import ( + _ "embed" + "fyne.io/fyne/v2" +) + +//go:embed totalrecall_256.png +var iconData []byte + +// GetAppIcon returns the application icon as a Fyne resource +func GetAppIcon() fyne.Resource { + return &fyne.StaticResource{ + StaticName: "totalrecall.png", + StaticContent: iconData, + } +} \ No newline at end of file diff --git a/internal/gui/totalrecall_256.png b/internal/gui/totalrecall_256.png new file mode 100644 index 0000000..1d5c297 Binary files /dev/null and b/internal/gui/totalrecall_256.png differ -- cgit v1.2.3