Skip to content

Commit

Permalink
feat: auto start with os start (#33)
Browse files Browse the repository at this point in the history
* feat: auto start with os start

* feat: shortcut default value enable
  • Loading branch information
tu6ge authored Nov 30, 2024
1 parent 30ae1c4 commit fed9288
Show file tree
Hide file tree
Showing 7 changed files with 342 additions and 94 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"dependencies": {
"@headlessui/react": "^2.1.10",
"@tauri-apps/api": ">=2.0.0",
"@tauri-apps/plugin-autostart": "~2",
"@tauri-apps/plugin-global-shortcut": "~2",
"@tauri-apps/plugin-http": "~2.0.1",
"@tauri-apps/plugin-shell": ">=2.0.0",
"@tauri-apps/plugin-websocket": "~2",
Expand Down
20 changes: 20 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

99 changes: 94 additions & 5 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@ lto = true # Enables link-time-optimizations.
opt-level = "s" # Prioritizes small binary size. Use `3` if you prefer speed.
panic = "abort" # Higher performance by disabling panic handlers.
strip = true # Ensures debug symbols are removed.

[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
tauri-plugin-autostart = "2"
tauri-plugin-global-shortcut = "2"
14 changes: 14 additions & 0 deletions src-tauri/capabilities/desktop.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"identifier": "desktop-capability",
"platforms": [
"macOS",
"windows",
"linux"
],
"permissions": [
"autostart:allow-enable",
"autostart:allow-disable",
"autostart:allow-is-enabled",
"global-shortcut:default"
]
}
Loading

0 comments on commit fed9288

Please # to comment.