diff --git a/Taskfile.yml b/Taskfile.yml index d6c24df..9412488 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -193,23 +193,9 @@ tasks: - wails build -clean package-default-skin: - desc: Zip folder into ./skin/default-skin.zip + desc: "Zips all files in SRC_DIR (excluding the folder itself) using Compress-Archive" vars: - SRC_DIR: '{{.SRC_DIR}}' - ZIP_PATH: "./skin/default-skin.zip" - + SRC_DIR: '{{.SRC_DIR | default ""}}' cmds: - - cmd: | - set -e - mkdir -p "$(dirname "{{.ZIP_PATH}}")" - parent="$(cd "$(dirname "{{.SRC_DIR}}")" && pwd)" - base="$(basename "{{.SRC_DIR}}")" - (cd "$parent" && zip -r "$OLDPWD/{{.ZIP_PATH}}" "$base") - platforms: [ linux, darwin ] - - - cmd: > - powershell -NoProfile -Command - "New-Item -ItemType Directory -Force -Path (Split-Path -Parent '{{.ZIP_PATH}}') | Out-Null; - if (Test-Path -LiteralPath '{{.ZIP_PATH}}') { Remove-Item '{{.ZIP_PATH}}' -Force }; - Compress-Archive -LiteralPath '{{.SRC_DIR}}' -DestinationPath '{{.ZIP_PATH}}' -Force" - platforms: [ windows ] + - powershell -Command "Compress-Archive -Path '{{.SRC_DIR}}\\*' -DestinationPath '.\skin\default-skin.zip' -Force" + diff --git a/frontend/.idea/workspace.xml b/frontend/.idea/workspace.xml new file mode 100644 index 0000000..8384ed4 --- /dev/null +++ b/frontend/.idea/workspace.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1770860806828 + + + + + + \ No newline at end of file diff --git a/hotkeys/darwin/provider_darwin.m b/hotkeys/darwin/provider_darwin.m index efad784..ca7f865 100644 --- a/hotkeys/darwin/provider_darwin.m +++ b/hotkeys/darwin/provider_darwin.m @@ -123,7 +123,7 @@ static CGEventRef tapCallback(CGEventTapProxy proxy, CGEventType type, CGEventRe CGEventMask mask = (CGEventMaskBit(kCGEventKeyDown)); gEventTap = CGEventTapCreate(kCGSessionEventTap, kCGHeadInsertEventTap, - kCGEventTapOptionDefault, mask, tapCallback, NULL); + kCGEventTapOptionListenOnly, mask, tapCallback, NULL); if (!gEventTap) { pthread_mutex_lock(&gMu); gRunning = false; diff --git a/skin/default-skin.zip b/skin/default-skin.zip index 5b10854..e61bcf9 100644 Binary files a/skin/default-skin.zip and b/skin/default-skin.zip differ diff --git a/skin/service.go b/skin/service.go index 9efae3a..434cd07 100644 --- a/skin/service.go +++ b/skin/service.go @@ -91,7 +91,7 @@ func (s *Service) Startup() error { return err } - err := os.MkdirAll(target, 0o755) + err := os.MkdirAll(filepath.Join(target, "default"), 0o755) if err != nil { return err } @@ -102,7 +102,7 @@ func (s *Service) Startup() error { } for _, f := range r.File { - p := filepath.Join(target, f.Name) + p := filepath.Join(target, "default", f.Name) // Prevent ZipSlip if !strings.HasPrefix(filepath.Clean(p)+string(os.PathSeparator), filepath.Clean(target)+string(os.PathSeparator)) {