1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-01 19:18:28 -04:00

core: migrate to dankgo shared go modules, embed quickshell in DMS

binary to mount at runtime, -c or DMS_SHELL_DIR overrides required to
explicitly override embedded configuration
This commit is contained in:
bbedward
2026-07-18 14:51:09 -04:00
parent 2114ece0df
commit 0cdb065739
114 changed files with 1009 additions and 3024 deletions
+36
View File
@@ -0,0 +1,36 @@
// Package shellembed carries the quickshell UI inside the dms binary and
// materializes it at runtime via dankgo/shellapp/shellfs, since quickshell
// needs a real filesystem path. Customization goes through -c /
// DMS_SHELL_DIR instead of editing the extraction.
package shellembed
import (
"io/fs"
"path"
"github.com/AvengeMedia/dankgo/shellapp/shellfs"
)
const (
distRoot = "dist"
shellEntry = "shell.qml"
)
// Available reports whether this binary was built with the embedded UI
// (the withshell build tag).
func Available() bool {
info, err := fs.Stat(distFS, path.Join(distRoot, shellEntry))
return err == nil && !info.IsDir()
}
func Extract(baseDir string) (string, error) {
sub, err := fs.Sub(distFS, distRoot)
if err != nil {
return "", err
}
return shellfs.Extract(sub, baseDir)
}
func Prune(baseDir, keep string) {
shellfs.Prune(baseDir, keep)
}