Skip to content

Commit 225cb6e

Browse files
author
kriollo
committed
Add new 64x64 icon for Linux application build
This commit introduces a new PNG icon file (icon-64x64.png) for the Linux version of the application. The icon is designed to enhance the visual representation of the application in the Linux environment.
1 parent b5b69c6 commit 225cb6e

24 files changed

Lines changed: 3126 additions & 2994 deletions

app/badge_darwin.go

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
//go:build darwin
2-
3-
package main
4-
5-
import (
6-
"context"
7-
"fmt"
8-
"log"
9-
"os/exec"
10-
)
11-
12-
// SetTaskbarBadge sets the dock badge on macOS using AppleScript
13-
func SetTaskbarBadge(ctx context.Context, count int) {
14-
log.Printf("[Badge] Setting macOS dock badge to: %d", count)
15-
16-
var script string
17-
if count <= 0 {
18-
// Clear the badge
19-
script = `tell application "System Events" to tell process "app" to set badge of dock tile to ""`
20-
} else {
21-
// Set the badge number
22-
badgeText := fmt.Sprintf("%d", count)
23-
if count > 99 {
24-
badgeText = "99+"
25-
}
26-
script = fmt.Sprintf(`tell application "System Events" to tell process "app" to set badge of dock tile to "%s"`, badgeText)
27-
}
28-
29-
// Execute AppleScript
30-
cmd := exec.Command("osascript", "-e", script)
31-
if err := cmd.Run(); err != nil {
32-
// Fallback: Try using the app's bundle identifier if available
33-
log.Printf("[Badge] Failed to set badge via AppleScript: %v", err)
34-
}
35-
}
1+
//go:build darwin
2+
3+
package main
4+
5+
import (
6+
"context"
7+
"fmt"
8+
"log"
9+
"os/exec"
10+
)
11+
12+
// SetTaskbarBadge sets the dock badge on macOS using AppleScript
13+
func SetTaskbarBadge(ctx context.Context, count int) {
14+
log.Printf("[Badge] Setting macOS dock badge to: %d", count)
15+
16+
var script string
17+
if count <= 0 {
18+
// Clear the badge
19+
script = `tell application "System Events" to tell process "app" to set badge of dock tile to ""`
20+
} else {
21+
// Set the badge number
22+
badgeText := fmt.Sprintf("%d", count)
23+
if count > 99 {
24+
badgeText = "99+"
25+
}
26+
script = fmt.Sprintf(`tell application "System Events" to tell process "app" to set badge of dock tile to "%s"`, badgeText)
27+
}
28+
29+
// Execute AppleScript
30+
cmd := exec.Command("osascript", "-e", script)
31+
if err := cmd.Run(); err != nil {
32+
// Fallback: Try using the app's bundle identifier if available
33+
log.Printf("[Badge] Failed to set badge via AppleScript: %v", err)
34+
}
35+
}

app/badge_unix.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
//go:build linux || freebsd || openbsd || netbsd
2-
3-
package main
4-
5-
import "context"
6-
7-
// SetTaskbarBadge on Unix-like systems: best-effort. Many DEs don't support overlay icons.
8-
func SetTaskbarBadge(ctx context.Context, count int) {
9-
// TODO: implement tray icon update or libappindicator integration if desired
10-
}
1+
//go:build linux || freebsd || openbsd || netbsd
2+
3+
package main
4+
5+
import "context"
6+
7+
// SetTaskbarBadge on Unix-like systems: best-effort. Many DEs don't support overlay icons.
8+
func SetTaskbarBadge(ctx context.Context, count int) {
9+
// TODO: implement tray icon update or libappindicator integration if desired
10+
}

0 commit comments

Comments
 (0)