Skip to content
This repository was archived by the owner on Jul 17, 2026. It is now read-only.

Commit 6c865d9

Browse files
Steven CybinskiStevenCyb
authored andcommitted
feat: mvp
1 parent e639c11 commit 6c865d9

12 files changed

Lines changed: 645 additions & 0 deletions

File tree

.editorconfig

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
; https://editorconfig.org/
2+
3+
root = true
4+
5+
[*]
6+
insert_final_newline = true
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
indent_style = space
10+
indent_size = 2
11+
12+
[{Makefile,go.mod,go.sum,*.go,.gitmodules}]
13+
indent_style = tab
14+
indent_size = 2
15+
16+
[*.md]
17+
indent_size = 2
18+
trim_trailing_whitespace = false
19+
20+
eclint_indent_style = unset
21+
22+
[Dockerfile]
23+
indent_size = 2

.github/workflows/release.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
runs-on: macos-latest
14+
strategy:
15+
matrix:
16+
include:
17+
- goarch: arm64
18+
label: arm64
19+
- goarch: amd64
20+
label: intel
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- uses: actions/setup-go@v5
25+
with:
26+
go-version-file: go.mod
27+
28+
- name: Build
29+
env:
30+
GOOS: darwin
31+
GOARCH: ${{ matrix.goarch }}
32+
CGO_ENABLED: 1
33+
run: go build -o FluentMacWallpaper .
34+
35+
- name: Bundle app
36+
run: |
37+
set -euo pipefail
38+
VERSION="${GITHUB_REF_NAME#v}"
39+
APP=FluentMacWallpaper.app
40+
mkdir -p "$APP/Contents/MacOS"
41+
cp FluentMacWallpaper "$APP/Contents/MacOS/"
42+
sed "s/__VERSION__/$VERSION/g" packaging/Info.plist > "$APP/Contents/Info.plist"
43+
# ad-hoc signature only: no Apple Developer cert configured, so Gatekeeper
44+
# will still warn on first launch (right-click Open, or `xattr -d
45+
# com.apple.quarantine`); this just avoids a "damaged" false positive.
46+
codesign --force --sign - "$APP"
47+
48+
- name: Create dmg
49+
run: |
50+
set -euo pipefail
51+
mkdir dmg-root
52+
cp -R FluentMacWallpaper.app dmg-root/
53+
ln -s /Applications dmg-root/Applications
54+
hdiutil create -volname FluentMacWallpaper -srcfolder dmg-root -ov -format UDZO \
55+
"FluentMacWallpaper-${{ matrix.label }}.dmg"
56+
57+
- uses: actions/upload-artifact@v4
58+
with:
59+
name: dmg-${{ matrix.label }}
60+
path: FluentMacWallpaper-${{ matrix.label }}.dmg
61+
62+
release:
63+
needs: build
64+
runs-on: ubuntu-latest
65+
steps:
66+
- uses: actions/download-artifact@v4
67+
with:
68+
path: dmgs
69+
merge-multiple: true
70+
71+
- name: Publish release
72+
env:
73+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
run: |
75+
set -euo pipefail
76+
gh release create "$GITHUB_REF_NAME" dmgs/*.dmg \
77+
--repo "$GITHUB_REPOSITORY" --title "$GITHUB_REF_NAME" --generate-notes \
78+
|| gh release upload "$GITHUB_REF_NAME" dmgs/*.dmg --repo "$GITHUB_REPOSITORY" --clobber

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# If you prefer the allow list template instead of the deny list, see community template:
2+
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
3+
#
4+
# Binaries for programs and plugins
5+
*.exe
6+
*.exe~
7+
*.dll
8+
*.so
9+
*.dylib
10+
11+
# Test binary, built with `go test -c`
12+
*.test
13+
14+
# Code coverage profiles and other test artifacts
15+
*.out
16+
coverage.*
17+
*.coverprofile
18+
profile.cov
19+
20+
# Dependency directories (remove the comment below to include it)
21+
# vendor/
22+
23+
# Go workspace file
24+
go.work
25+
go.work.sum
26+
27+
# env file
28+
.env
29+
30+
# Editor/IDE
31+
# .idea/
32+
# .vscode/
33+
34+
# MacOS
35+
.DS_Store
36+
37+
# SSH keys
38+
.ssh
39+
ca_key
40+
admin_key*
41+
42+
# Binary
43+
FluentMacWallpaper

.golangci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# cSpell:disable
2+
version: "2"
3+
4+
output:
5+
formats:
6+
text:
7+
path: stdout
8+
9+
linters:
10+
default: all
11+
disable:
12+
- gochecknoglobals
13+
- godot
14+
- noinlineerr
15+
- nlreturn
16+
- gomodguard
17+
- wsl
18+
enable:
19+
- gomodguard_v2
20+
- wsl_v5
21+
settings:
22+
depguard:
23+
rules:
24+
Main:
25+
allow:
26+
- $gostd
27+
- github.com/progrium/darwinkit
28+
gomoddirectives:
29+
replace-allow-list:
30+
- github.com/progrium/darwinkit
31+
wsl_v5:
32+
allow-first-in-block: true
33+
allow-whole-block: false
34+
branch-max-lines: 2

README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# FluentMacWallpaper
2+
3+
macOS menu bar app that loops a local video (`.mp4`, `.mov`, `.m4v`) as your desktop wallpaper.
4+
5+
- Runs as a menu bar item — no dock icon
6+
- Borderless fullscreen window at the native desktop window level: sits **behind** desktop icons, clicks pass through
7+
- Hardware-accelerated playback via AVFoundation (`AVQueuePlayer` + `AVPlayerLooper` for gapless looping) — low CPU and battery usage
8+
- Menu: **Select Video…**, **Pause/Play**, **Quit**
9+
10+
<img src="demo.gif" width="450px" alt="Demo GIF" />
11+
12+
<sup><a href="#wallpaper-sources">1</a></sup> Wallpapers Source
13+
14+
## Disclaimer
15+
16+
I created this application for personal use, and I am not a macOS developer. It is provided as-is, without warranty of any kind. Use at your own risk and if you want to contribute, feel free to submit a pull request.
17+
18+
## Requirements
19+
20+
- macOS (Apple Silicon or Intel)
21+
- Go 1.22+ and Xcode Command Line Tools (`xcode-select --install`)
22+
23+
## Install
24+
25+
```sh
26+
git clone https://github.com/StevenCyb/FluentMacWallpaper.git
27+
cd FluentMacWallpaper
28+
go install .
29+
```
30+
31+
This puts the `FluentMacWallpaper` binary into `$(go env GOPATH)/bin` (make sure it is on your `PATH`).
32+
33+
> **Note:** `go install github.com/StevenCyb/FluentMacWallpaper@latest` does not work, because
34+
> `go.mod` contains a `replace` directive pointing [progrium/darwinkit](https://github.com/progrium/darwinkit)
35+
> to a [purego-based fork](https://github.com/gysddn/darwinkit/tree/purego). Upstream darwinkit
36+
> crashes with `SIGABRT` in its libffi bridge on Go ≥ 1.25
37+
> ([darwinkit#286](https://github.com/progrium/darwinkit/issues/286)); the replace can be dropped
38+
> once [darwinkit#276](https://github.com/progrium/darwinkit/pull/276) is merged and released.
39+
40+
## Usage
41+
42+
```sh
43+
FluentMacWallpaper # start, then pick a video via the tray icon
44+
FluentMacWallpaper ~/Movies/bg.mp4 # start and play this video immediately
45+
```
46+
47+
A tray icon appears in the menu bar:
48+
49+
| Menu item | Action |
50+
|---|---|
51+
| Select Video… | Open a file picker and start looping the chosen video |
52+
| Pause / Play | Toggle playback |
53+
| Quit | Exit and restore your normal wallpaper |
54+
55+
Video is muted and scaled to fill the screen (aspect-fill).
56+
57+
## Wallpaper sources
58+
Video sources used in the demo:
59+
60+
1. Demo footage credits.
61+
2. Midnight Fuel Stop. MotionBGS. https://motionbgs.com/midnight-fuel-stop
62+
3. Tayamayamada: Midnight Thoughts. MotionBGS. https://motionbgs.com/tayamayamada-midnight-thoughts
63+
4. Frostfang Barioth Armor (MHW Iceborne). MotionBGS. https://motionbgs.com/frostfang-barioth-armor-mhw-iceborne
64+
5. Morning Serenity. MotionBGS. https://motionbgs.com/morning-serenity

demo.gif

33 MB
Loading

go.mod

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module github.com/StevenCyb/FluentMacWallpaper
2+
3+
go 1.26.4
4+
5+
require github.com/progrium/darwinkit v0.0.0-00010101000000-000000000000
6+
7+
require github.com/ebitengine/purego v0.10.1 // indirect
8+
9+
replace github.com/progrium/darwinkit => github.com/gysddn/darwinkit v0.0.0-20250116163834-ed09efd73eea

go.sum

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
github.com/ebitengine/purego v0.10.1 h1:dewVBCBT2GaMu1SrNTYxQhgQBethzfhiwvZiLGP/qyY=
2+
github.com/ebitengine/purego v0.10.1/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
3+
github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg=
4+
github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
5+
github.com/gysddn/darwinkit v0.0.0-20250116163834-ed09efd73eea h1:43nw7HoCPieGN1fHwWTfIhOpopKyMD4YtheezfqY8EA=
6+
github.com/gysddn/darwinkit v0.0.0-20250116163834-ed09efd73eea/go.mod h1:PxQhZuftnALLkCVaR8LaHtUOfoo4pm8qUDG+3C/sXNs=

icon.png

2.54 KB
Loading

0 commit comments

Comments
 (0)