Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ on:
jobs:
build-packages:
runs-on: ubuntu-latest
if: github.event.inputs.version != ''
strategy:
matrix:
architecture: ${{ fromJSON(format('["{0}"]', join(split(inputs.architectures, ','), '","'))) }}
Expand Down Expand Up @@ -81,6 +82,7 @@ jobs:
create-release:
needs: build-packages
runs-on: ubuntu-latest
if: github.event.inputs.version != ''
permissions:
contents: write

Expand Down
Binary file added data/icons/sound-icon-inverted.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 24 additions & 3 deletions src/volmix.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ static void on_tray_icon_popup_menu(GtkStatusIcon *status_icon, guint button,
gtk_menu_popup_at_pointer(GTK_MENU(menu), NULL);
}


static gboolean on_scroll_event(GtkStatusIcon *status_icon, GdkEventScroll *event,
gpointer user_data)
{
Expand Down Expand Up @@ -292,9 +293,29 @@ static void setup_tray_icon(volmix_app_t *app)
{
app->tray_icon = gtk_status_icon_new();

// Use a standard icon name for volume
gtk_status_icon_set_from_icon_name(GTK_STATUS_ICON(app->tray_icon),
"audio-volume-high");
// Load the inverted sound icon PNG (white speaker)
gchar *icon_path = g_build_filename("data", "icons", "sound-icon-inverted.png", NULL);
GError *error = NULL;
GdkPixbuf *icon_pixbuf = NULL;

if (g_file_test(icon_path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) {
icon_pixbuf = gdk_pixbuf_new_from_file_at_size(icon_path, 22, 22, &error);
}

if (icon_pixbuf) {
gtk_status_icon_set_from_pixbuf(GTK_STATUS_ICON(app->tray_icon), icon_pixbuf);
g_object_unref(icon_pixbuf);
g_print("Loaded inverted sound icon PNG\n");
} else {
// Fallback to system icon if file not found
g_warning("Could not load sound icon (%s), using system icon",
error ? error->message : "file not found");
if (error) g_error_free(error);
gtk_status_icon_set_from_icon_name(GTK_STATUS_ICON(app->tray_icon),
"audio-volume-high");
}

g_free(icon_path);

gtk_status_icon_set_tooltip_text(GTK_STATUS_ICON(app->tray_icon),
"volmix - Per-Application Audio Control");
Expand Down