From 2680c77ca9130a81c89d32b228b71f8b216d299c Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Mon, 28 Oct 2024 13:25:17 -0500 Subject: Add icon Signed-off-by: Matt Strapp --- .gitattributes | 4 ---- .gitignore | 4 +++- main.go | 1 + run_host.go | 5 +++++ winres/icon.png | 3 +++ winres/icon16.png | 3 +++ winres/winres.json | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 76 insertions(+), 5 deletions(-) create mode 100644 winres/icon.png create mode 100644 winres/icon16.png create mode 100644 winres/winres.json diff --git a/.gitattributes b/.gitattributes index 1a52498..24a8e87 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1 @@ -*.mp4 filter=lfs diff=lfs merge=lfs -text -*.webm filter=lfs diff=lfs merge=lfs -text -*.webp filter=lfs diff=lfs merge=lfs -text *.png filter=lfs diff=lfs merge=lfs -text -*.jpg filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore index 26a2fff..2239716 100644 --- a/.gitignore +++ b/.gitignore @@ -25,4 +25,6 @@ go.work.sum .env config.toml -wsl-tui \ No newline at end of file +wsl-tui + +/*.syso \ No newline at end of file diff --git a/main.go b/main.go index ea3c821..3220553 100644 --- a/main.go +++ b/main.go @@ -1,3 +1,4 @@ +//go:generate go-winres make --product-version=git-tag package main import ( diff --git a/run_host.go b/run_host.go index 4a74a7b..be7c158 100644 --- a/run_host.go +++ b/run_host.go @@ -10,5 +10,10 @@ import ( func command(distribution Distribution, config Config) (*exec.Cmd, error) { // Append the additional arguments to the command args := append([]string{"-d", distribution.Name}, config.WslArgs...) + // Set the title of the terminal window + err := exec.Command("cmd", "/c", "title", distribution.Name).Run() + if err != nil { + return nil, err + } return exec.Command("wsl", args...), nil } diff --git a/winres/icon.png b/winres/icon.png new file mode 100644 index 0000000..a5411bb --- /dev/null +++ b/winres/icon.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05fbfa2787c5fa5da724d3da8be448cba7fb1b18307f4c621f754665c6271f25 +size 33315 diff --git a/winres/icon16.png b/winres/icon16.png new file mode 100644 index 0000000..4c528df --- /dev/null +++ b/winres/icon16.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c1e4f1dfa08152c33e856d1ddb8e097aa3b1c691150aecb0c475a42166bd0a8 +size 2231 diff --git a/winres/winres.json b/winres/winres.json new file mode 100644 index 0000000..f71520c --- /dev/null +++ b/winres/winres.json @@ -0,0 +1,61 @@ +{ + "RT_GROUP_ICON": { + "APP": { + "0000": [ + "icon.png", + "icon16.png" + ] + } + }, + "RT_MANIFEST": { + "#1": { + "0409": { + "identity": { + "name": "", + "version": "" + }, + "description": "", + "minimum-os": "win7", + "execution-level": "as invoker", + "ui-access": false, + "auto-elevate": false, + "dpi-awareness": "system", + "disable-theming": false, + "disable-window-filtering": false, + "high-resolution-scrolling-aware": false, + "ultra-high-resolution-scrolling-aware": false, + "long-path-aware": false, + "printer-driver-isolation": false, + "gdi-scaling": false, + "segment-heap": false, + "use-common-controls-v6": false + } + } + }, + "RT_VERSION": { + "#1": { + "0000": { + "fixed": { + "file_version": "0.0.0.0", + "product_version": "0.0.0.0" + }, + "info": { + "0409": { + "Comments": "", + "CompanyName": "", + "FileDescription": "", + "FileVersion": "", + "InternalName": "", + "LegalCopyright": "", + "LegalTrademarks": "", + "OriginalFilename": "", + "PrivateBuild": "", + "ProductName": "", + "ProductVersion": "", + "SpecialBuild": "" + } + } + } + } + } +} \ No newline at end of file -- cgit v1.2.3