├── src-tauri ├── src │ ├── lib │ │ └── lib.rs │ ├── helper.rs │ ├── plugins.rs │ └── main.rs ├── build.rs ├── icons │ ├── icon.ico │ ├── icon.png │ ├── line.png │ ├── 128x128.png │ ├── 32x32.png │ ├── icon.icns │ ├── StoreLogo.png │ ├── 128x128@2x.png │ ├── Square107x107Logo.png │ ├── Square142x142Logo.png │ ├── Square150x150Logo.png │ ├── Square284x284Logo.png │ ├── Square30x30Logo.png │ ├── Square310x310Logo.png │ ├── Square44x44Logo.png │ ├── Square71x71Logo.png │ └── Square89x89Logo.png ├── .gitignore ├── Cargo.toml └── tauri.conf.json ├── .npmrc ├── public └── icon.png ├── updater ├── .gitignore ├── README.md ├── Cargo.toml ├── src │ ├── updatefile.rs │ ├── main.rs │ └── ghdata.rs └── Cargo.lock ├── .vscode └── extensions.json ├── .typesafe-i18n.json ├── src ├── router.ts ├── styles │ ├── overrides.scss │ └── global.scss ├── polyfill.ts ├── constants.ts ├── root.tsx ├── hooks │ └── useTranslation.ts ├── app.css.ts ├── pages │ ├── preferences │ │ ├── styles.css.ts │ │ └── preferences.tsx │ ├── about │ │ ├── styles.css.ts │ │ └── about.tsx │ └── main │ │ ├── styles.css.ts │ │ └── main.tsx ├── lib │ ├── cmd.ts │ ├── tauri.ts │ ├── dom.ts │ ├── enum.ts │ ├── config.ts │ └── utils.ts ├── components │ ├── title │ │ ├── styles.css.ts │ │ └── title.tsx │ └── button │ │ └── button.tsx ├── i18n │ ├── zh-CN │ │ └── index.ts │ ├── ko │ │ └── index.ts │ ├── zh-TW │ │ └── index.ts │ ├── formatters.ts │ ├── ja │ │ └── index.ts │ ├── tr │ │ └── index.ts │ ├── it │ │ └── index.ts │ ├── en │ │ └── index.ts │ ├── es │ │ └── index.ts │ ├── pt │ │ └── index.ts │ ├── fr │ │ └── index.ts │ ├── ru │ │ └── index.ts │ ├── de │ │ └── index.ts │ ├── i18n-node.ts │ ├── i18n-util.sync.ts │ ├── i18n-util.async.ts │ ├── i18n-util.ts │ └── i18n-types.ts ├── config.ts ├── types │ └── index.ts ├── main.ts ├── theme │ ├── vars.css.ts │ └── mantine.config.ts ├── app.tsx └── atoms.ts ├── .editorconfig ├── .gitignore ├── scripts └── update_version.ts ├── tsconfig.node.json ├── tsconfig.base.json ├── tsconfig.json ├── dprint.json ├── cspell.json ├── LICENSE ├── THIRD-PARTY-LICENSE ├── README.md ├── vite.config.ts ├── .eslintrc.cjs ├── index.html ├── package.json ├── .github └── workflows │ ├── check.yml │ ├── beta.yml │ └── release.yml └── CHANGELOG.md /src-tauri/src/lib/lib.rs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers = true 2 | -------------------------------------------------------------------------------- /src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /public/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rel1cx/sensi-mouse/HEAD/public/icon.png -------------------------------------------------------------------------------- /src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rel1cx/sensi-mouse/HEAD/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rel1cx/sensi-mouse/HEAD/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /src-tauri/icons/line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rel1cx/sensi-mouse/HEAD/src-tauri/icons/line.png -------------------------------------------------------------------------------- /src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rel1cx/sensi-mouse/HEAD/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rel1cx/sensi-mouse/HEAD/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rel1cx/sensi-mouse/HEAD/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /updater/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | -------------------------------------------------------------------------------- /src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | -------------------------------------------------------------------------------- /src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rel1cx/sensi-mouse/HEAD/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rel1cx/sensi-mouse/HEAD/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rel1cx/sensi-mouse/HEAD/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rel1cx/sensi-mouse/HEAD/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rel1cx/sensi-mouse/HEAD/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rel1cx/sensi-mouse/HEAD/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rel1cx/sensi-mouse/HEAD/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rel1cx/sensi-mouse/HEAD/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rel1cx/sensi-mouse/HEAD/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rel1cx/sensi-mouse/HEAD/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rel1cx/sensi-mouse/HEAD/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "tauri-apps.tauri-vscode", 4 | "rust-lang.rust-analyzer" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /updater/README.md: -------------------------------------------------------------------------------- 1 | # updater 2 | 3 | this is a utility that generates the latest.json file that is used to tell apps when an update is available 4 | -------------------------------------------------------------------------------- /.typesafe-i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/typesafe-i18n@5.26.2/schema/typesafe-i18n.json", 3 | "adapter": "node", 4 | "esmImports": true 5 | } 6 | -------------------------------------------------------------------------------- /src/router.ts: -------------------------------------------------------------------------------- 1 | import { createRouter } from "@swan-io/chicane"; 2 | 3 | export const Router = createRouter({ 4 | About: "/about", 5 | Main: "/", 6 | Preferences: "/preferences", 7 | }); 8 | -------------------------------------------------------------------------------- /src/styles/overrides.scss: -------------------------------------------------------------------------------- 1 | // Fix for Mantine Slider label rendering issue in webkit 2 | .mantine-Slider-label { 3 | transform: translate3d(0, 0, 0); 4 | } 5 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /src/polyfill.ts: -------------------------------------------------------------------------------- 1 | import "core-js/features/array/at"; 2 | import "core-js/features/object/has-own"; 3 | 4 | import { enableMapSet, setAutoFreeze } from "immer"; 5 | 6 | enableMapSet(); 7 | setAutoFreeze(true); 8 | -------------------------------------------------------------------------------- /src/constants.ts: -------------------------------------------------------------------------------- 1 | import { type Locales } from "./i18n/i18n-types"; 2 | 3 | export const DEFAULT_LOCALE: Locales = "en"; 4 | 5 | export const DEFAULT_SEN = 90; 6 | 7 | export const DEFAULT_ACC_ENABLED = false; 8 | -------------------------------------------------------------------------------- /src/root.tsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from "react"; 2 | 3 | import { App } from "./app"; 4 | 5 | export function Root() { 6 | return ( 7 | 8 | 9 | 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /src/hooks/useTranslation.ts: -------------------------------------------------------------------------------- 1 | import { useAtom } from "jotai"; 2 | 3 | import { localeAtom } from "@/atoms"; 4 | import L from "@/i18n/i18n-node"; 5 | 6 | export const useTranslation = () => { 7 | return L[useAtom(localeAtom)[0]]; 8 | }; 9 | -------------------------------------------------------------------------------- /src/app.css.ts: -------------------------------------------------------------------------------- 1 | import { style } from "@vanilla-extract/css"; 2 | 3 | export const appShellScreen = style({ 4 | display: "flex", 5 | flexDirection: "column", 6 | width: "100%", 7 | maxWidth: "100vw", 8 | minHeight: "100vh", 9 | }); 10 | -------------------------------------------------------------------------------- /src/pages/preferences/styles.css.ts: -------------------------------------------------------------------------------- 1 | import { style } from "@vanilla-extract/css"; 2 | 3 | export const container = style({ 4 | display: "flex", 5 | flexDirection: "column", 6 | alignItems: "stretch", 7 | gap: "0.5rem", 8 | padding: "1rem 12px", 9 | }); 10 | -------------------------------------------------------------------------------- /src/lib/cmd.ts: -------------------------------------------------------------------------------- 1 | import { invoke } from "./tauri"; 2 | 3 | export const getMouseCfg = () => { 4 | return invoke<[number, boolean]>("get_mouse_cfg"); 5 | }; 6 | 7 | export const setMouseCfg = (sen: number, accEnabled: boolean) => { 8 | return invoke("set_mouse_cfg", { accEnabled, sen }); 9 | }; 10 | -------------------------------------------------------------------------------- /updater/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "updater" 3 | version = "0.0.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | serde_json = "1.0" 8 | serde = { version = "1.0", features = ["derive"] } 9 | reqwest = { version = "0.11", features = ["json"] } 10 | tokio = { version = "1.32.0", features = ["full"] } 11 | regex = "1.9.5" 12 | -------------------------------------------------------------------------------- /src/lib/tauri.ts: -------------------------------------------------------------------------------- 1 | import { Result } from "@swan-io/boxed"; 2 | import { invoke as tauriInvoke } from "@tauri-apps/api"; 3 | import { type InvokeArgs } from "@tauri-apps/api/tauri"; 4 | 5 | export const invoke = (cmd: string, payload?: InvokeArgs) => { 6 | return Result.fromPromise(tauriInvoke(cmd, payload)); 7 | }; 8 | -------------------------------------------------------------------------------- /src/lib/dom.ts: -------------------------------------------------------------------------------- 1 | export const on = (terget: EventTarget) => (event: string, handler: EventListenerOrEventListenerObject) => { 2 | terget.addEventListener(event, handler); 3 | }; 4 | 5 | export const off = (terget: EventTarget) => (event: string, handler: EventListenerOrEventListenerObject) => { 6 | terget.removeEventListener(event, handler); 7 | }; 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /src/components/title/styles.css.ts: -------------------------------------------------------------------------------- 1 | import { style } from "@vanilla-extract/css"; 2 | 3 | export const title = style({ 4 | margin: "0", 5 | padding: "0", 6 | color: "rgb(18, 18, 18)", 7 | fontWeight: "500", 8 | fontSize: "15px", 9 | 10 | "@media": { 11 | "(prefers-color-scheme: dark)": { 12 | color: "rgb(240, 240, 240)", 13 | }, 14 | }, 15 | }); 16 | -------------------------------------------------------------------------------- /src/components/title/title.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | import * as css from "./styles.css"; 4 | 5 | type TitleProps = { 6 | children?: React.ReactNode; 7 | }; 8 | 9 | export const Title = React.memo(function Title({ children, ...rest }: TitleProps) { 10 | return ( 11 |
12 | {children} 13 |
14 | ); 15 | }); 16 | -------------------------------------------------------------------------------- /src/pages/about/styles.css.ts: -------------------------------------------------------------------------------- 1 | import { style } from "@vanilla-extract/css"; 2 | 3 | export const container = style({ 4 | display: "flex", 5 | flexFlow: "column", 6 | justifyContent: "space-between", 7 | alignItems: "center", 8 | gap: "0.5rem", 9 | padding: "16px", 10 | height: "100%", 11 | }); 12 | 13 | export const link = style({ 14 | cursor: "pointer", 15 | textDecoration: "underline", 16 | }); 17 | -------------------------------------------------------------------------------- /scripts/update_version.ts: -------------------------------------------------------------------------------- 1 | import fs from "fs"; 2 | 3 | const packageJson = JSON.parse(fs.readFileSync("./package.json").toString()); 4 | 5 | const tauriConfig = JSON.parse(fs.readFileSync("./src-tauri/tauri.conf.json").toString()); 6 | 7 | const { version } = packageJson; 8 | 9 | tauriConfig.package.version = version; 10 | 11 | fs.writeFileSync("./src-tauri/tauri.conf.json", JSON.stringify(tauriConfig, null, 4)); 12 | -------------------------------------------------------------------------------- /src/i18n/zh-CN/index.ts: -------------------------------------------------------------------------------- 1 | import { type Translation } from "../i18n-types.js"; 2 | 3 | export default { 4 | ABOUT: "关于", 5 | ACCELERATION: "加速度", 6 | DARK: "深色", 7 | GENERAL: "通用", 8 | INTERFACE: "界面", 9 | LANGUAGE: "语言", 10 | LIGHT: "浅色", 11 | PREFERENCES: "偏好", 12 | QUIT: "退出", 13 | RESET: "重置", 14 | SENSITIVITY: "灵敏度", 15 | START_AT_LOGIN: "开机启动", 16 | THEME: "主题", 17 | VERSION: "版本", 18 | } satisfies Translation; 19 | -------------------------------------------------------------------------------- /src/i18n/ko/index.ts: -------------------------------------------------------------------------------- 1 | import { type Translation } from "../i18n-types.js"; 2 | 3 | export default { 4 | ABOUT: "정보", 5 | ACCELERATION: "가속도", 6 | DARK: "다크", 7 | GENERAL: "일반", 8 | INTERFACE: "인터페이스", 9 | LANGUAGE: "언어", 10 | LIGHT: "라이트", 11 | PREFERENCES: "설정", 12 | QUIT: "종료", 13 | RESET: "재설정", 14 | SENSITIVITY: "민감도", 15 | START_AT_LOGIN: "로그인 시 시작", 16 | THEME: "테마", 17 | VERSION: "버전", 18 | } satisfies Translation; 19 | -------------------------------------------------------------------------------- /src/i18n/zh-TW/index.ts: -------------------------------------------------------------------------------- 1 | import { type Translation } from "../i18n-types.js"; 2 | 3 | export default { 4 | ABOUT: "關於", 5 | ACCELERATION: "加速度", 6 | DARK: "暗色", 7 | GENERAL: "一般", 8 | INTERFACE: "介面", 9 | LANGUAGE: "語言", 10 | LIGHT: "亮色", 11 | PREFERENCES: "偏好設定", 12 | QUIT: "離開", 13 | RESET: "重設", 14 | SENSITIVITY: "靈敏度", 15 | START_AT_LOGIN: "開機自動啟動", 16 | THEME: "主題", 17 | VERSION: "版本", 18 | } satisfies Translation; 19 | -------------------------------------------------------------------------------- /src/i18n/formatters.ts: -------------------------------------------------------------------------------- 1 | import { type FormattersInitializer } from "typesafe-i18n"; 2 | 3 | import { type Formatters, type Locales } from "./i18n-types.js"; 4 | 5 | // eslint-disable-next-line @typescript-eslint/no-unused-vars 6 | export const initFormatters: FormattersInitializer = (locale: Locales) => { 7 | const formatters: Formatters = { 8 | // add your formatter functions here 9 | }; 10 | 11 | return formatters; 12 | }; 13 | -------------------------------------------------------------------------------- /src/i18n/ja/index.ts: -------------------------------------------------------------------------------- 1 | import { type Translation } from "../i18n-types.js"; 2 | 3 | export default { 4 | ABOUT: "情報", 5 | ACCELERATION: "加速度", 6 | DARK: "ダーク", 7 | GENERAL: "一般", 8 | INTERFACE: "インターフェース", 9 | LANGUAGE: "言語", 10 | LIGHT: "ライト", 11 | PREFERENCES: "設定", 12 | QUIT: "終了", 13 | RESET: "リセット", 14 | SENSITIVITY: "感度", 15 | START_AT_LOGIN: "ログイン時に開始", 16 | THEME: "テーマ", 17 | VERSION: "バージョン", 18 | } satisfies Translation; 19 | -------------------------------------------------------------------------------- /src/i18n/tr/index.ts: -------------------------------------------------------------------------------- 1 | import { type Translation } from "../i18n-types"; 2 | 3 | export default { 4 | ABOUT: "Hakkında", 5 | ACCELERATION: "Hızlandırma", 6 | DARK: "Karanlık", 7 | GENERAL: "Genel", 8 | INTERFACE: "Arayüz", 9 | LANGUAGE: "Dil", 10 | LIGHT: "Açık", 11 | PREFERENCES: "Tercihler", 12 | QUIT: "Çıkış", 13 | RESET: "Sıfırla", 14 | SENSITIVITY: "Hassasiyet", 15 | START_AT_LOGIN: "Girişte başlat", 16 | THEME: "Tema", 17 | VERSION: "Sürüm", 18 | } satisfies Translation; 19 | -------------------------------------------------------------------------------- /tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "eslint-config-with-tsconfig/tsconfig.base.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "target": "ES2022", 6 | "module": "ESNext", 7 | "lib": ["ESNext"], 8 | "moduleResolution": "Node", 9 | "experimentalDecorators": true, 10 | "allowSyntheticDefaultImports": true, 11 | "types": ["@types/node"], 12 | "noEmit": true 13 | }, 14 | "include": ["scripts/**/*.ts", ".eslintrc.cjs", "*.config.js", "*.config.ts"] 15 | } 16 | -------------------------------------------------------------------------------- /src/i18n/it/index.ts: -------------------------------------------------------------------------------- 1 | import { type Translation } from "../i18n-types.js"; 2 | 3 | export default { 4 | ABOUT: "Tentang", 5 | ACCELERATION: "Akselerasi", 6 | DARK: "Gelap", 7 | GENERAL: "Umum", 8 | INTERFACE: "Antarmuka", 9 | LANGUAGE: "Bahasa", 10 | LIGHT: "Terang", 11 | PREFERENCES: "Preferensi", 12 | QUIT: "Keluar", 13 | RESET: "Reset", 14 | SENSITIVITY: "Sensitivitas", 15 | START_AT_LOGIN: "Mulai saat masuk", 16 | THEME: "Tema", 17 | VERSION: "Versi", 18 | } satisfies Translation; 19 | -------------------------------------------------------------------------------- /src/i18n/en/index.ts: -------------------------------------------------------------------------------- 1 | import { type BaseTranslation } from "../i18n-types.js"; 2 | 3 | export default { 4 | ABOUT: "About", 5 | ACCELERATION: "Acceleration", 6 | DARK: "Dark", 7 | GENERAL: "General", 8 | INTERFACE: "Interface", 9 | LANGUAGE: "Language", 10 | LIGHT: "Light", 11 | PREFERENCES: "Preferences", 12 | QUIT: "Quit", 13 | RESET: "Reset", 14 | SENSITIVITY: "Sensitivity", 15 | START_AT_LOGIN: "Start at login", 16 | THEME: "Theme", 17 | VERSION: "Version", 18 | } satisfies BaseTranslation; 19 | -------------------------------------------------------------------------------- /src/i18n/es/index.ts: -------------------------------------------------------------------------------- 1 | import { type Translation } from "../i18n-types.js"; 2 | 3 | export default { 4 | ABOUT: "Acerca de", 5 | ACCELERATION: "Aceleración", 6 | DARK: "Oscuro", 7 | GENERAL: "General", 8 | INTERFACE: "Interfaz", 9 | LANGUAGE: "Idioma", 10 | LIGHT: "Claro", 11 | PREFERENCES: "Preferencias", 12 | QUIT: "Salir", 13 | RESET: "Restablecer", 14 | SENSITIVITY: "Sensibilidad", 15 | START_AT_LOGIN: "Iniciar sesión", 16 | THEME: "Tema", 17 | VERSION: "Versión", 18 | } satisfies Translation; 19 | -------------------------------------------------------------------------------- /src/i18n/pt/index.ts: -------------------------------------------------------------------------------- 1 | import { type Translation } from "../i18n-types"; 2 | 3 | export default { 4 | ABOUT: "Sobre", 5 | ACCELERATION: "Aceleração", 6 | DARK: "Escuro", 7 | GENERAL: "Geral", 8 | INTERFACE: "Interface", 9 | LANGUAGE: "Idioma", 10 | LIGHT: "Claro", 11 | PREFERENCES: "Preferências", 12 | QUIT: "Sair", 13 | RESET: "Redefinir", 14 | SENSITIVITY: "Sensibilidade", 15 | START_AT_LOGIN: "Iniciar ao fazer login", 16 | THEME: "Tema", 17 | VERSION: "Versão", 18 | } satisfies Translation; 19 | -------------------------------------------------------------------------------- /src/i18n/fr/index.ts: -------------------------------------------------------------------------------- 1 | import { type Translation } from "../i18n-types.js"; 2 | 3 | export default { 4 | ABOUT: "À propos", 5 | ACCELERATION: "Accélération", 6 | DARK: "Sombre", 7 | GENERAL: "Général", 8 | INTERFACE: "Interface", 9 | LANGUAGE: "Langue", 10 | LIGHT: "Clair", 11 | PREFERENCES: "Préférences", 12 | QUIT: "Quitter", 13 | RESET: "Réinitialiser", 14 | SENSITIVITY: "Sensibilité", 15 | START_AT_LOGIN: "Démarrage au lancement", 16 | THEME: "Thème", 17 | VERSION: "Version", 18 | } satisfies Translation; 19 | -------------------------------------------------------------------------------- /src/i18n/ru/index.ts: -------------------------------------------------------------------------------- 1 | import { type Translation } from "../i18n-types.js"; 2 | 3 | export default { 4 | ABOUT: "О программе", 5 | ACCELERATION: "Ускорение", 6 | DARK: "Темная", 7 | GENERAL: "Общее", 8 | INTERFACE: "Интерфейс", 9 | LANGUAGE: "Язык", 10 | LIGHT: "Светлая", 11 | PREFERENCES: "Настройки", 12 | QUIT: "Выход", 13 | RESET: "Сбросить", 14 | SENSITIVITY: "Чувствительность", 15 | START_AT_LOGIN: "Запускать при входе в систему", 16 | THEME: "Тема", 17 | VERSION: "Версия", 18 | } satisfies Translation; 19 | -------------------------------------------------------------------------------- /src/i18n/de/index.ts: -------------------------------------------------------------------------------- 1 | import { type Translation } from "../i18n-types.js"; 2 | 3 | export default { 4 | ABOUT: "Über", 5 | ACCELERATION: "Beschleunigung", 6 | DARK: "Dunkel", 7 | GENERAL: "Allgemein", 8 | INTERFACE: "Schnittstelle", 9 | LANGUAGE: "Sprache", 10 | LIGHT: "Hell", 11 | PREFERENCES: "Einstellungen", 12 | QUIT: "Beenden", 13 | RESET: "Zurücksetzen", 14 | SENSITIVITY: "Empfindlichkeit", 15 | START_AT_LOGIN: "Beim Starten ausführen", 16 | THEME: "Thema", 17 | VERSION: "Version", 18 | } satisfies Translation; 19 | -------------------------------------------------------------------------------- /src/i18n/i18n-node.ts: -------------------------------------------------------------------------------- 1 | // This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten. 2 | /* eslint-disable */ 3 | 4 | import { i18n } from './i18n-util.js' 5 | import { loadAllLocales } from './i18n-util.sync.js' 6 | import type { LocaleTranslationFunctions } from 'typesafe-i18n' 7 | import type { Locales, Translations, TranslationFunctions } from './i18n-types.js' 8 | 9 | loadAllLocales() 10 | 11 | export const L: LocaleTranslationFunctions = i18n() 12 | 13 | export default L 14 | -------------------------------------------------------------------------------- /src/config.ts: -------------------------------------------------------------------------------- 1 | import { Config } from "@/types"; 2 | 3 | import { DEFAULT_ACC_ENABLED, DEFAULT_LOCALE, DEFAULT_SEN } from "./constants"; 4 | import { type Locales } from "./i18n/i18n-types"; 5 | import { ConfigManager } from "./lib/config"; 6 | 7 | export const defaultConfig: Config & { 8 | locale: Locales; 9 | } = { 10 | sen: DEFAULT_SEN, 11 | accEnabled: DEFAULT_ACC_ENABLED, 12 | locale: DEFAULT_LOCALE, 13 | theme: "light", 14 | }; 15 | 16 | export const configManager = ConfigManager.make({ name: ".config.dat", parse: (data) => Config.parse(data) }); 17 | -------------------------------------------------------------------------------- /src/lib/enum.ts: -------------------------------------------------------------------------------- 1 | import type { UnionFromTuple } from "./utils"; 2 | 3 | export type Enum = T[keyof T]; 4 | 5 | export function Enum(...args: T) { 6 | type Ret = { [P in UnionFromTuple]: P }; 7 | return Object.freeze( 8 | args.reduce((acc, next) => { 9 | return { 10 | ...acc, 11 | [next]: next, 12 | }; 13 | // eslint-disable-next-line @typescript-eslint/no-unsafe-argument 14 | }, Object.create(null)), 15 | ); 16 | } 17 | 18 | export function isKeyOfEnum(e: T, value: unknown): value is Enum { 19 | return Object.values(e).includes(value); 20 | } 21 | -------------------------------------------------------------------------------- /src/components/button/button.tsx: -------------------------------------------------------------------------------- 1 | import { Button as MTButton, type ButtonProps as MTButtonProps } from "@mantine/core"; 2 | import React from "react"; 3 | 4 | type ButtonProps = 5 | & MTButtonProps 6 | & React.PropsWithChildren 7 | & { 8 | onClick?: () => void; 9 | }; 10 | 11 | export const Button = React.memo(function Button({ children, ...rest }: ButtonProps) { 12 | return ( 13 | 22 | {children} 23 | 24 | ); 25 | }); 26 | -------------------------------------------------------------------------------- /src/types/index.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod"; 2 | 3 | import { Enum } from "@/lib/enum"; 4 | 5 | export const Config = z.object({ 6 | accEnabled: z.boolean().default(false).describe("Acceleration enabled"), 7 | locale: z.string().default("en").describe("Language"), 8 | sen: z.number().min(0).max(100).default(90).describe("Sensitivity"), 9 | theme: z 10 | .union([ 11 | z.literal( 12 | "light", 13 | ), 14 | z.literal( 15 | "dark", 16 | ), 17 | ]) 18 | .default("light") 19 | .describe("Theme"), 20 | }); 21 | 22 | export type Config = z.infer; 23 | 24 | export const Theme = Enum("light", "dark"); 25 | 26 | export type Theme = Enum; 27 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import "ress/ress.css"; 2 | import "@mantine/core/styles.css"; 3 | import "@/styles/global.scss"; 4 | import "@/styles/overrides.scss"; 5 | import "@total-typescript/ts-reset"; 6 | import "./polyfill"; 7 | 8 | import React from "react"; 9 | import { createRoot } from "react-dom/client"; 10 | 11 | import { loadConfig, loadDefaultConfig } from "./atoms"; 12 | import { Root } from "./root"; 13 | 14 | const main = async () => { 15 | await loadConfig().catch(loadDefaultConfig); 16 | 17 | const root = document.querySelector("#root"); 18 | 19 | if (!root) { 20 | throw new Error( 21 | "Root element not found", 22 | ); 23 | } 24 | 25 | createRoot(root).render(React.createElement(Root)); 26 | }; 27 | 28 | void main(); 29 | -------------------------------------------------------------------------------- /tsconfig.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@tsconfig/strictest/tsconfig.json", 4 | "@tsconfig/node20/tsconfig.json" 5 | ], 6 | "compilerOptions": { 7 | "module": "ESNext", 8 | "moduleResolution": "Bundler", 9 | "isolatedModules": true, 10 | "verbatimModuleSyntax": true, 11 | "resolveJsonModule": true, 12 | "allowJs": false, 13 | "checkJs": false, 14 | "strict": true, 15 | "noImplicitAny": true, 16 | "noImplicitThis": true, 17 | "noUnusedLocals": false, 18 | "noUnusedParameters": false, 19 | "exactOptionalPropertyTypes": true, 20 | "composite": false, 21 | "stripInternal": false 22 | }, 23 | "exclude": [ 24 | "node_modules", 25 | "**/dist", 26 | "test/fixtures" 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.base.json", 3 | "compilerOptions": { 4 | "target": "ESNext", 5 | "useDefineForClassFields": true, 6 | "lib": [ 7 | "DOM", 8 | "DOM.Iterable", 9 | "ESNext" 10 | ], 11 | "types": [ 12 | "core-dts", 13 | "vite/client" 14 | ], 15 | "skipLibCheck": true, 16 | "esModuleInterop": false, 17 | "allowSyntheticDefaultImports": true, 18 | "module": "ESNext", 19 | "moduleResolution": "Node", 20 | "resolveJsonModule": true, 21 | "isolatedModules": true, 22 | "noEmit": true, 23 | "jsx": "preserve", 24 | "baseUrl": ".", 25 | "paths": { 26 | "@/*": [ 27 | "./src/*" 28 | ] 29 | } 30 | }, 31 | "include": ["src"] 32 | } 33 | -------------------------------------------------------------------------------- /dprint.json: -------------------------------------------------------------------------------- 1 | { 2 | "lineWidth": 120, 3 | "typescript": { 4 | "indentWidth": 2, 5 | "quoteStyle": "preferDouble", 6 | "quoteProps": "asNeeded", 7 | "importDeclaration.sortNamedImports": "maintain", 8 | "exportDeclaration.sortNamedExports": "maintain", 9 | "module.sortImportDeclarations": "maintain", 10 | "module.sortExportDeclarations": "maintain" 11 | }, 12 | "json": { 13 | "indentWidth": 2 14 | }, 15 | "markdown": {}, 16 | "excludes": [ 17 | "**/node_modules", 18 | "**/*-lock.json", 19 | "bun.lockb", 20 | "**/test/fixtures", 21 | "dist", 22 | "src-tauri" 23 | ], 24 | "plugins": [ 25 | "https://plugins.dprint.dev/typescript-0.88.1.wasm", 26 | "https://plugins.dprint.dev/json-0.17.4.wasm", 27 | "https://plugins.dprint.dev/markdown-0.16.1.wasm" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /src-tauri/src/helper.rs: -------------------------------------------------------------------------------- 1 | use mac_mouse_sys::*; 2 | 3 | const MAX_SEN: i32 = 199; 4 | const DEFAULT_ACC: i32 = 57344; 5 | 6 | pub fn res_to_sen(res: i32) -> i32 { 7 | (2000 - (res / 65536)) / 10 8 | } 9 | 10 | pub fn sen_to_res(sen: i32) -> i32 { 11 | (2000 - (sen * 10)) * 65536 12 | } 13 | 14 | pub fn read_mouse_cfg() -> Result<(i32, bool), String> { 15 | let sen = res_to_sen(get_pointer_resolution()?); 16 | let acc = get_mouse_acceleration()?; 17 | let acc_enabled = acc != 0; 18 | 19 | Ok((sen, acc_enabled)) 20 | } 21 | 22 | pub fn write_mouse_cfg(sen: i32, acc_enabled: bool) -> Result<(), String> { 23 | if !(0..=MAX_SEN).contains(&sen) { 24 | return Err(format!("Invalid sensitivity value: {}", sen)); 25 | } 26 | let acc = if acc_enabled { DEFAULT_ACC } else { 0 }; 27 | 28 | set_pointer_resolution(sen_to_res(sen))?; 29 | set_mouse_acceleration(acc)?; 30 | 31 | Ok(()) 32 | } 33 | -------------------------------------------------------------------------------- /src/pages/main/styles.css.ts: -------------------------------------------------------------------------------- 1 | import { style } from "@vanilla-extract/css"; 2 | 3 | export const container = style({ 4 | display: "flex", 5 | flexFlow: "column nowrap", 6 | justifyContent: "space-between", 7 | padding: "0.5rem 16px 6px 16px", 8 | width: "100%", 9 | height: "100%", 10 | }); 11 | 12 | export const title = style({ 13 | margin: "0", 14 | padding: "0", 15 | color: "rgb(18, 18, 18)", 16 | fontWeight: "500", 17 | fontSize: "15px", 18 | }); 19 | 20 | export const content = style({ 21 | display: "flex", 22 | flexDirection: "column", 23 | gap: "0.5rem", 24 | padding: "0.5rem 0", 25 | }); 26 | 27 | export const xSlider = style({ 28 | marginBottom: "12px", 29 | }); 30 | 31 | export const xSwitch = style({ 32 | cursor: "pointer", 33 | marginTop: "4px", 34 | }); 35 | 36 | export const footer = style({ 37 | display: "flex", 38 | flexFlow: "row nowrap", 39 | justifyContent: "flex-end", 40 | alignItems: "center", 41 | gap: "0.5rem", 42 | opacity: "0.95", 43 | fontSize: "12px", 44 | }); 45 | -------------------------------------------------------------------------------- /updater/src/updatefile.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 4 | #[serde(rename_all = "camelCase")] 5 | pub struct UpdateFile { 6 | pub version: String, 7 | pub notes: String, 8 | #[serde(rename = "pub_date")] 9 | pub pub_date: String, 10 | pub platforms: Platforms, 11 | } 12 | 13 | #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 14 | #[serde(rename_all = "camelCase")] 15 | pub struct Platforms { 16 | #[serde(rename = "darwin-x86_64")] 17 | pub darwin_x86_64: OsArch, 18 | #[serde(rename = "darwin-aarch64")] 19 | pub darwin_aarch64: OsArch, 20 | // #[serde(rename = "linux-x86_64")] 21 | // pub linux_x86_64: OsArch, 22 | // #[serde(rename = "windows-x86_64")] 23 | // pub windows_x86_64: OsArch, 24 | } 25 | 26 | #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 27 | #[serde(rename_all = "camelCase")] 28 | pub struct OsArch { 29 | pub signature: String, 30 | pub url: String, 31 | } 32 | -------------------------------------------------------------------------------- /src/pages/about/about.tsx: -------------------------------------------------------------------------------- 1 | import { Text } from "@mantine/core"; 2 | import { getName, getVersion } from "@tauri-apps/api/app"; 3 | import React from "react"; 4 | import { suspend } from "suspend-react"; 5 | 6 | import * as css from "./styles.css"; 7 | 8 | const About = React.memo(function App() { 9 | const name = suspend(getName); 10 | const version = suspend(getVersion); 11 | 12 | return ( 13 |
14 | logo 15 | 16 | {name} 17 | Version: {version} 18 | 19 | 20 | Copyright © 2023 Eva1ent{" | "} 21 | 27 | MIT License 28 | 29 | 30 |
31 | ); 32 | }); 33 | 34 | export default About; 35 | -------------------------------------------------------------------------------- /cspell.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://cdn.jsdelivr.net/gh/streetsidesoftware/cspell/cspell.schema.json", 3 | "dictionaries": [ 4 | "softwareTerms", 5 | "node", 6 | "html", 7 | "typescript", 8 | "misc" 9 | ], 10 | "ignorePaths": [ 11 | "**/*.spec.ts", 12 | "**/*.svg", 13 | "**/*/docs/**/*", 14 | ".vscode/**/*", 15 | "assets/**/*", 16 | "bun.lockb", 17 | "package.json", 18 | "pnpm-lock.yaml", 19 | "test/fixtures", 20 | "THIRD-PARTY-LICENSE" 21 | ], 22 | "useGitignore": true, 23 | "words": [ 24 | "TSES", 25 | "TSESAST", 26 | "bimap", 27 | "birecord", 28 | "declarators", 29 | "deepmerge", 30 | "dprint", 31 | "innerhtml", 32 | "knip", 33 | "lockb", 34 | "pathe", 35 | "pattycake", 36 | "preact", 37 | "quasis", 38 | "rambda", 39 | "rizzzse", 40 | "setstate", 41 | "sonarjs", 42 | "tanstack", 43 | "taze", 44 | "textnode", 45 | "textnodes", 46 | "todos", 47 | "treeshake", 48 | "tsup", 49 | "typeclass", 50 | "weakref", 51 | "tascript" 52 | ] 53 | } 54 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Eva1ent 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /THIRD-PARTY-LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 lightquantum 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SensiMouse 2 | 3 |

4 | 5 |

6 | 7 | > Easily change macOS (Ventura and earlier versions) system-wide mouse sensitivity and acceleration settings 8 | 9 | ## Benefits 10 | 11 | - Modify mouse settings globally, regardless of the connected mouse device. 12 | - No need for accessibility permissions. 13 | - Does not interfere with or take over the mouse input events. 14 | - Compatible with other apps that customize mouse scrolling or gestures. 15 | 16 | ## Releases 17 | 18 | Download the latest release from [here](https://github.com/Rel1cx/sensi-mouse/releases) 19 | 20 | ## CLI Version 21 | 22 | [sensi-mouse-cli](https://github.com/Rel1cx/sensi-mouse-cli) 23 | 24 | ## License 25 | 26 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details 27 | 28 | ## Credits 29 | 30 | - [tmexclude](https://github.com/PhotonQuantum/tmexclude) - Exclude undesired files (node_modules, target, etc) from your TimeMachine backup. 31 | 32 | ## THIRD-PARTY-LICENSE 33 | 34 | This project uses code from following third-party projects: 35 | 36 | - tmexclude (MIT) 37 | 38 | Licenses are list in [THIRD-PARTY-LICENSE](THIRD-PARTY-LICENSE) 39 | -------------------------------------------------------------------------------- /src/theme/vars.css.ts: -------------------------------------------------------------------------------- 1 | import { createGlobalTheme } from "@vanilla-extract/css"; 2 | 3 | export const vars = createGlobalTheme(":root", { 4 | font: { 5 | family: { 6 | fontFamilyBody: "var(--base-font-family)", 7 | // fontFamilyHeading: 'Source Serif Pro' 8 | }, 9 | size: { 10 | fontSize0: "0.8rem", 11 | fontSize1: "1rem", 12 | fontSize2: "1.25rem", 13 | fontSize3: "1.563rem", 14 | fontSize4: "1.953rem", 15 | fontSize5: "2.441rem", 16 | fontSize6: "3.052rem", 17 | fontSize7: "3.815rem", 18 | fontSizeRoot: "16px", 19 | }, 20 | weight: { 21 | fontWeightBlack: "900", 22 | fontWeightBold: "700", 23 | }, 24 | }, 25 | colors: { 26 | background: "#f1f2f2", 27 | blue: "#00B8FF", 28 | hover: "#ececec", 29 | overlay: "rgba(0, 0, 0, 0.15)", 30 | primary: "#00B8FF", 31 | secondary: "#654ea3", 32 | selected: "rgba(66, 133, 244, 1.000)", 33 | text: "#333333", 34 | warn: "rgba(255, 100, 100, 1)", 35 | }, 36 | spacing: { 37 | spacing0: "0", 38 | spacing1: "0.25rem", 39 | spacing2: "0.5rem", 40 | spacing3: "0.75rem", 41 | spacing4: "1rem", 42 | spacing5: "1.25rem", 43 | spacing6: "1.5rem", 44 | spacing8: "2.0rem", 45 | spacing12: "3.0rem", 46 | spacingPx: "1px", 47 | }, 48 | }); 49 | -------------------------------------------------------------------------------- /src/theme/mantine.config.ts: -------------------------------------------------------------------------------- 1 | import { type MantineThemeOverride } from "@mantine/core"; 2 | 3 | export const colors = { 4 | // each color is an array of 10 shades 5 | pink: [ 6 | "#FF7DB4", 7 | "#FF6CA3", 8 | "#FF5B92", 9 | "#FF4A81", 10 | "#FF3970", 11 | "#FF285F", 12 | "#FF174E", 13 | "#FF063D", 14 | "#FF002C", 15 | "#FF001B", 16 | ], 17 | blue: [ 18 | "#00B8FF", 19 | "#00A7FF", 20 | "#0096FF", 21 | "#0085FF", 22 | "#0074FF", 23 | "#0063FF", 24 | "#0052FF", 25 | "#0041FF", 26 | "#0030FF", 27 | "#001FFF", 28 | ], 29 | purple: [ 30 | "#654ea3", 31 | "#5f47a1", 32 | "#59409f", 33 | "#53389d", 34 | "#4d308b", 35 | "#47287a", 36 | "#412069", 37 | "#3b1857", 38 | "#350f46", 39 | "#2f0634", 40 | ], 41 | lightgray: [ 42 | "#959595", 43 | "#8c8c8c", 44 | "#838383", 45 | "#7a7a7a", 46 | "#717171", 47 | "#686868", 48 | "#5f5f5f", 49 | "#565656", 50 | "#4d4d4d", 51 | "#444444", 52 | ], 53 | } satisfies MantineThemeOverride["colors"]; 54 | 55 | export const mantineTheme: MantineThemeOverride = { 56 | fontFamily: "var(--base-font-family)", 57 | headings: { 58 | fontFamily: "var(--base-font-family)", 59 | }, 60 | colors, 61 | primaryColor: "blue", 62 | primaryShade: 0, 63 | }; 64 | -------------------------------------------------------------------------------- /src-tauri/src/plugins.rs: -------------------------------------------------------------------------------- 1 | use tauri::plugin::Plugin; 2 | use tauri::{AppHandle, RunEvent, Window, WindowEvent, Wry}; 3 | 4 | pub struct EnvironmentPlugin; 5 | 6 | impl Plugin for EnvironmentPlugin { 7 | fn name(&self) -> &'static str { 8 | "environment" 9 | } 10 | fn initialization_script(&self) -> Option { 11 | #[cfg(debug_assertions)] 12 | return Some("window.__TAURI__.environment = \"development\"".to_string()); 13 | #[cfg(not(debug_assertions))] 14 | return Some("window.__TAURI__.environment = \"production\"".to_string()); 15 | } 16 | } 17 | 18 | pub struct BackgroundPlugin; 19 | 20 | impl Plugin for BackgroundPlugin { 21 | fn name(&self) -> &'static str { 22 | "background" 23 | } 24 | fn created(&mut self, window: Window) { 25 | window.on_window_event({ 26 | let window = window.clone(); 27 | move |ev| { 28 | if let WindowEvent::CloseRequested { api, .. } = ev { 29 | window.hide().expect("unable to hide window"); 30 | api.prevent_close(); 31 | } 32 | } 33 | }); 34 | } 35 | fn on_event(&mut self, _app: &AppHandle, event: &RunEvent) { 36 | if let RunEvent::ExitRequested { api, .. } = event { 37 | api.prevent_exit(); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/i18n/i18n-util.sync.ts: -------------------------------------------------------------------------------- 1 | // This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten. 2 | /* eslint-disable */ 3 | 4 | import { initFormatters } from './formatters.js' 5 | import type { Locales, Translations } from './i18n-types.js' 6 | import { loadedFormatters, loadedLocales, locales } from './i18n-util.js' 7 | 8 | import de from './de/index.js' 9 | import en from './en/index.js' 10 | import es from './es/index.js' 11 | import fr from './fr/index.js' 12 | import it from './it/index.js' 13 | import ja from './ja/index.js' 14 | import ko from './ko/index.js' 15 | import pt from './pt/index.js' 16 | import ru from './ru/index.js' 17 | import tr from './tr/index.js' 18 | import zh_CN from './zh-CN/index.js' 19 | import zh_TW from './zh-TW/index.js' 20 | 21 | const localeTranslations = { 22 | de, 23 | en, 24 | es, 25 | fr, 26 | it, 27 | ja, 28 | ko, 29 | pt, 30 | ru, 31 | tr, 32 | 'zh-CN': zh_CN, 33 | 'zh-TW': zh_TW, 34 | } 35 | 36 | export const loadLocale = (locale: Locales): void => { 37 | if (loadedLocales[locale]) return 38 | 39 | loadedLocales[locale] = localeTranslations[locale] as unknown as Translations 40 | loadFormatters(locale) 41 | } 42 | 43 | export const loadAllLocales = (): void => locales.forEach(loadLocale) 44 | 45 | export const loadFormatters = (locale: Locales): void => 46 | void (loadedFormatters[locale] = initFormatters(locale)) 47 | -------------------------------------------------------------------------------- /src/app.tsx: -------------------------------------------------------------------------------- 1 | import { MantineProvider } from "@mantine/core"; 2 | import { useColorScheme } from "@mantine/hooks"; 3 | import React, { lazy, Suspense, useMemo } from "react"; 4 | import { match } from "ts-pattern"; 5 | 6 | import { Router } from "@/router"; 7 | import { mantineTheme } from "@/theme/mantine.config"; 8 | 9 | import * as css from "./app.css"; 10 | 11 | const Main = lazy(() => import("./pages/main/main")); 12 | const About = lazy(() => import("./pages/about/about")); 13 | const Preferences = lazy(() => import("./pages/preferences/preferences")); 14 | 15 | export const App = React.memo(function App() { 16 | const preferredColorScheme = useColorScheme(); 17 | 18 | const theme = useMemo(() => ({ ...mantineTheme, colorScheme: preferredColorScheme }), [preferredColorScheme]); 19 | 20 | const route = Router.useRoute(["Main", "About", "Preferences"]); 21 | 22 | return ( 23 | 24 |
25 | 26 | {useMemo( 27 | () => 28 | match(route) 29 | .with({ name: "Main" }, () =>
) 30 | .with({ name: "About" }, () => ) 31 | .with({ name: "Preferences" }, () => ) 32 | .otherwise(() => null), 33 | [route], 34 | )} 35 | 36 |
37 | 38 | ); 39 | }); 40 | -------------------------------------------------------------------------------- /vite.config.ts: -------------------------------------------------------------------------------- 1 | import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin"; 2 | import react from "@vitejs/plugin-react-swc"; 3 | import { resolve } from "path"; 4 | import { defineConfig } from "vite"; 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | plugins: [react({ tsDecorators: true }), vanillaExtractPlugin()], 9 | resolve: { 10 | alias: { 11 | "@": resolve( 12 | __dirname, 13 | "src", 14 | ), 15 | }, 16 | }, 17 | // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build` 18 | // prevent vite from obscuring rust errors 19 | clearScreen: false, 20 | // tauri expects a fixed port, fail if that port is not available 21 | server: { 22 | port: 1420, 23 | strictPort: true, 24 | }, 25 | // to make use of `TAURI_DEBUG` and other env variables 26 | // https://tauri.studio/v1/api/config#buildconfig.beforedevcommand 27 | envPrefix: ["VITE_", "TAURI_"], 28 | build: { 29 | // Tauri supports es2021 30 | target: process 31 | .env 32 | .TAURI_PLATFORM 33 | === "windows" 34 | ? "chrome105" 35 | : "safari13", 36 | // don't minify for debug builds 37 | minify: process.env.TAURI_DEBUG 38 | ? false 39 | : "esbuild", 40 | rollupOptions: { 41 | treeshake: "recommended", 42 | }, 43 | // produce sourcemaps for debug builds 44 | sourcemap: !!process.env 45 | .TAURI_DEBUG, 46 | }, 47 | }); 48 | -------------------------------------------------------------------------------- /src/lib/config.ts: -------------------------------------------------------------------------------- 1 | import { Option as O, Result as R } from "@swan-io/boxed"; 2 | import { Store } from "tauri-plugin-store-api"; 3 | 4 | export type ConfigManagerProps = { 5 | name: string; 6 | parse: (data: unknown) => T; 7 | }; 8 | 9 | export class ConfigManager { 10 | public parse: (data: unknown) => T; 11 | 12 | readonly #store: Store; 13 | 14 | private constructor({ name, parse }: ConfigManagerProps) { 15 | this.#store = new Store(name); 16 | this.parse = parse; 17 | } 18 | 19 | public static make(props: ConfigManagerProps) { 20 | return new ConfigManager(props); 21 | } 22 | 23 | public async loadConfig() { 24 | const result = await R.fromPromise( 25 | this.#store.entries(), 26 | ); 27 | return result 28 | .map( 29 | Object.fromEntries, 30 | ) 31 | .map( 32 | this 33 | .parse, 34 | ); 35 | } 36 | 37 | public resetConfig() { 38 | return R.fromPromise( 39 | this.#store.reset(), 40 | ); 41 | } 42 | 43 | public async setConfig>( 44 | key: K, 45 | value: T[K], 46 | ) { 47 | const result = await R.fromPromise( 48 | this.#store.set( 49 | key, 50 | value, 51 | ), 52 | ); 53 | result.tap(() => this.#store.save()); 54 | return result; 55 | } 56 | 57 | public async getConfig>(key: K) { 58 | return O.fromNullable( 59 | await this.#store.get< 60 | T[K] 61 | >( 62 | key, 63 | ), 64 | ); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | const { defineConfig } = require("eslint-define-config"); 3 | 4 | module.exports = defineConfig({ 5 | root: true, 6 | extends: [ 7 | "with-tsconfig", 8 | "plugin:react-hooks/recommended", 9 | "plugin:@eslint-react/all-legacy", 10 | ], 11 | rules: { 12 | "no-console": [ 13 | "warn", 14 | { 15 | allow: [ 16 | "info", 17 | "warn", 18 | "error", 19 | ], 20 | }, 21 | ], 22 | "sonarjs/no-duplicate-string": "warn", 23 | "@typescript-eslint/no-redeclare": "off", 24 | "@typescript-eslint/explicit-module-boundary-types": "off", 25 | "tailwindcss/no-custom-classname": "off", 26 | "security/detect-object-injection": "off", 27 | }, 28 | ignorePatterns: ["node_modules/", "dist/", "src-tauri", "updater"], 29 | overrides: [ 30 | { 31 | files: [ 32 | "scripts/**/*.ts", 33 | "./*.config.ts", 34 | ".eslintrc.cjs", 35 | ], 36 | rules: { 37 | "@typescript-eslint/no-unsafe-assignment": "off", 38 | "@typescript-eslint/no-unsafe-member-access": "off", 39 | }, 40 | parserOptions: { 41 | project: "tsconfig.node.json", 42 | }, 43 | }, 44 | { 45 | files: [ 46 | "src/i18n/i18n-*.@(ts|tsx)", 47 | ], 48 | rules: { 49 | "unicorn/no-abusive-eslint-disable": "off", 50 | }, 51 | }, 52 | { 53 | files: [ 54 | "src/**/*.css.ts", 55 | ], 56 | rules: { 57 | "sonarjs/no-duplicate-string": "off", 58 | }, 59 | }, 60 | ], 61 | }); 62 | -------------------------------------------------------------------------------- /src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-explicit-any */ 2 | 3 | export type Remap = 4 | & { 5 | [P in keyof T]: T[P]; 6 | } 7 | & {}; 8 | 9 | export type UnionFromTuple = T extends (infer U)[] ? U : never; 10 | 11 | export type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; 12 | 13 | /** 14 | * Infers embedded primitive type of any type 15 | * 16 | * @param T - Type to infer 17 | * @returns Embedded type of {@link TType} 18 | * 19 | * @example 20 | * type Result = Narrow<['foo', 'bar', 1]> 21 | */ 22 | // s/o https://twitter.com/hd_nvim/status/1578567206190780417 23 | export type Narrow = 24 | // eslint-disable-next-line @typescript-eslint/ban-types 25 | | (TType extends Function ? TType : never) 26 | | (TType extends string | number | boolean | bigint ? TType : never) 27 | | (TType extends [] ? [] : never) 28 | | { 29 | [K in keyof TType]: Narrow< 30 | TType[K] 31 | >; 32 | }; 33 | 34 | // eslint-disable-next-line @typescript-eslint/no-empty-function 35 | export const noop = () => {}; 36 | 37 | export const identity = (a: T) => a; 38 | 39 | export const asConst = (a: T) => a; 40 | 41 | /** 42 | * Infers embedded primitive type of any type 43 | * Same as `as const` but without setting the object as readonly and without needing the user to use it. 44 | * 45 | * @param value - Value to infer 46 | * @returns Value with embedded type inferred 47 | * 48 | * @example 49 | * const result = narrow(['foo', 'bar', 1]) 50 | */ 51 | export const narrow = (a: Narrow) => a; 52 | -------------------------------------------------------------------------------- /src/i18n/i18n-util.async.ts: -------------------------------------------------------------------------------- 1 | // This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten. 2 | /* eslint-disable */ 3 | 4 | import { initFormatters } from './formatters.js' 5 | import type { Locales, Translations } from './i18n-types.js' 6 | import { loadedFormatters, loadedLocales, locales } from './i18n-util.js' 7 | 8 | const localeTranslationLoaders = { 9 | de: () => import('./de/index.js'), 10 | en: () => import('./en/index.js'), 11 | es: () => import('./es/index.js'), 12 | fr: () => import('./fr/index.js'), 13 | it: () => import('./it/index.js'), 14 | ja: () => import('./ja/index.js'), 15 | ko: () => import('./ko/index.js'), 16 | pt: () => import('./pt/index.js'), 17 | ru: () => import('./ru/index.js'), 18 | tr: () => import('./tr/index.js'), 19 | 'zh-CN': () => import('./zh-CN/index.js'), 20 | 'zh-TW': () => import('./zh-TW/index.js'), 21 | } 22 | 23 | const updateDictionary = (locale: Locales, dictionary: Partial): Translations => 24 | loadedLocales[locale] = { ...loadedLocales[locale], ...dictionary } 25 | 26 | export const importLocaleAsync = async (locale: Locales): Promise => 27 | (await localeTranslationLoaders[locale]()).default as unknown as Translations 28 | 29 | export const loadLocaleAsync = async (locale: Locales): Promise => { 30 | updateDictionary(locale, await importLocaleAsync(locale)) 31 | loadFormatters(locale) 32 | } 33 | 34 | export const loadAllLocalesAsync = (): Promise => Promise.all(locales.map(loadLocaleAsync)) 35 | 36 | export const loadFormatters = (locale: Locales): void => 37 | void (loadedFormatters[locale] = initFormatters(locale)) 38 | -------------------------------------------------------------------------------- /src-tauri/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "sensi-mouse" 3 | version = "0.0.0" 4 | description = "" 5 | authors = ["Eva1ent"] 6 | license = "" 7 | repository = "" 8 | edition = "2021" 9 | rust-version = "1.72.0" 10 | 11 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 12 | 13 | [[bin]] 14 | name = "sensi-mouse" 15 | path = "src/main.rs" 16 | 17 | # [lib] 18 | # name = "sensi-mouse_lib" 19 | # path = "src/lib/lib.rs" 20 | 21 | [build-dependencies] 22 | tauri-build = { version = "1.5.0", features = [] } 23 | 24 | [dependencies] 25 | anyhow = "1.0" 26 | typeshare = "1.0" 27 | serde_json = "1.0" 28 | serde = { version = "1.0", features = ["derive", "rc"] } 29 | tauri = { version = "1.5.2", features = [ 30 | "macos-private-api", 31 | "shell-open", 32 | "system-tray", 33 | "updater", 34 | "window-show", 35 | ] } 36 | tracing = "0.1" 37 | tracing-subscriber = "0.3" 38 | tauri-plugin-store = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" } 39 | tauri-plugin-positioner = { version = "1.0.4", features = ["system-tray"] } 40 | tauri-plugin-autostart = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" } 41 | window-vibrancy = "0.4.2" 42 | mac-mouse-sys = "0.0.9" 43 | 44 | [features] 45 | # by default Tauri runs in production mode 46 | # when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL 47 | default = ["custom-protocol"] 48 | # this feature is used used for production builds where `devPath` points to the filesystem 49 | # DO NOT remove this 50 | custom-protocol = ["tauri/custom-protocol"] 51 | 52 | [profile.release] 53 | lto = true 54 | strip = true 55 | opt-level = "z" 56 | -------------------------------------------------------------------------------- /src/styles/global.scss: -------------------------------------------------------------------------------- 1 | html, 2 | body, 3 | #root { 4 | width: 100%; 5 | height: 100%; 6 | background: transparent !important; 7 | } 8 | 9 | html { 10 | width: 100%; 11 | height: 100%; 12 | color: #53534f; 13 | font-size: 16px; 14 | font-family: var(--base-font-family); 15 | 16 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 17 | 18 | --base-font-family: ui-sans-serif, system-ui, -apple-system, 19 | "Apple Color Emoji", 20 | "Segoe UI Emoji", "Segoe UI Symbol", 21 | "Noto Color Emoji"; 22 | 23 | --mono-font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 24 | "Liberation Mono", monospace; 25 | } 26 | 27 | *, 28 | *:before, 29 | *:after { 30 | margin: 0; 31 | padding: 0; 32 | cursor: default; 33 | -webkit-user-select: none; 34 | user-select: none; 35 | -webkit-user-drag: none; 36 | user-drag: none; 37 | } 38 | -------------------------------------------------------------------------------- /src/i18n/i18n-util.ts: -------------------------------------------------------------------------------- 1 | // This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten. 2 | /* eslint-disable */ 3 | 4 | import { i18n as initI18n, i18nObject as initI18nObject, i18nString as initI18nString } from 'typesafe-i18n' 5 | import type { LocaleDetector } from 'typesafe-i18n/detectors' 6 | import type { LocaleTranslationFunctions, TranslateByString } from 'typesafe-i18n' 7 | import { detectLocale as detectLocaleFn } from 'typesafe-i18n/detectors' 8 | import { initExtendDictionary } from 'typesafe-i18n/utils' 9 | import type { Formatters, Locales, Translations, TranslationFunctions } from './i18n-types.js' 10 | 11 | export const baseLocale: Locales = 'en' 12 | 13 | export const locales: Locales[] = [ 14 | 'de', 15 | 'en', 16 | 'es', 17 | 'fr', 18 | 'it', 19 | 'ja', 20 | 'ko', 21 | 'pt', 22 | 'ru', 23 | 'tr', 24 | 'zh-CN', 25 | 'zh-TW' 26 | ] 27 | 28 | export const isLocale = (locale: string): locale is Locales => locales.includes(locale as Locales) 29 | 30 | export const loadedLocales: Record = {} as Record 31 | 32 | export const loadedFormatters: Record = {} as Record 33 | 34 | export const extendDictionary = initExtendDictionary() 35 | 36 | export const i18nString = (locale: Locales): TranslateByString => initI18nString(locale, loadedFormatters[locale]) 37 | 38 | export const i18nObject = (locale: Locales): TranslationFunctions => 39 | initI18nObject( 40 | locale, 41 | loadedLocales[locale], 42 | loadedFormatters[locale] 43 | ) 44 | 45 | export const i18n = (): LocaleTranslationFunctions => 46 | initI18n(loadedLocales, loadedFormatters) 47 | 48 | export const detectLocale = (...detectors: LocaleDetector[]): Locales => detectLocaleFn(baseLocale, locales, ...detectors) 49 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 14 | SensiMouse 15 | 16 | 17 | 18 |
19 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/pages/preferences/preferences.tsx: -------------------------------------------------------------------------------- 1 | import { Checkbox, NativeSelect } from "@mantine/core"; 2 | import { useAtom, useSetAtom } from "jotai"; 3 | import React from "react"; 4 | 5 | import { launchAtLoginAtom, localeAtom } from "@/atoms"; 6 | import { Title } from "@/components/title/title"; 7 | import { useTranslation } from "@/hooks/useTranslation"; 8 | import { type Locales } from "@/i18n/i18n-types"; 9 | import { isLocale } from "@/i18n/i18n-util"; 10 | import { Theme } from "@/types"; 11 | 12 | import * as css from "./styles.css"; 13 | 14 | const themes: { label: string; value: Theme }[] = [ 15 | { label: "Light", value: Theme.light }, 16 | { label: "Dark", value: Theme.dark }, 17 | ]; 18 | 19 | const languages: { label: string; value: Locales }[] = [ 20 | { label: "Deutsch", value: "de" }, 21 | { label: "English", value: "en" }, 22 | { label: "Español", value: "es" }, 23 | { label: "Français", value: "fr" }, 24 | { label: "Italiano", value: "it" }, 25 | { label: "日本語", value: "ja" }, 26 | { label: "한국어", value: "ko" }, 27 | { label: "Português", value: "pt" }, 28 | { label: "Русский", value: "ru" }, 29 | { label: "Türkçe", value: "tr" }, 30 | { label: "简体中文", value: "zh-CN" }, 31 | { label: "繁體中文", value: "zh-TW" }, 32 | ]; 33 | 34 | const Preferences = React.memo(function Preferences() { 35 | const T = useTranslation(); 36 | 37 | const [locale, setLocale] = useAtom(localeAtom); 38 | 39 | const [launchAtLogin] = useAtom(launchAtLoginAtom); 40 | const setLaunchAtLogin = useSetAtom(launchAtLoginAtom); 41 | 42 | return ( 43 |
44 | {T.THEME()} 45 | 46 | {T.LANGUAGE()} 47 | ) => { 51 | const { value } = event.target; 52 | if (!value || !isLocale(value)) { 53 | return; 54 | } 55 | setLocale(value); 56 | }} 57 | /> 58 | {T.GENERAL()} 59 | { 63 | setLaunchAtLogin(e.target.checked); 64 | }} 65 | /> 66 |
67 | ); 68 | }); 69 | 70 | export default Preferences; 71 | -------------------------------------------------------------------------------- /src/atoms.ts: -------------------------------------------------------------------------------- 1 | import { atom, getDefaultStore } from "jotai"; 2 | import * as autostart from "tauri-plugin-autostart-api"; 3 | 4 | import { type Locales } from "@/i18n/i18n-types"; 5 | 6 | import { configManager, defaultConfig } from "./config"; 7 | import { isLocale } from "./i18n/i18n-util"; 8 | import { setMouseCfg } from "./lib/cmd"; 9 | import { type Theme } from "./types"; 10 | 11 | const store = getDefaultStore(); 12 | 13 | export const senAtom = atom(defaultConfig.sen); 14 | 15 | export const accEnabledAtom = atom(defaultConfig.accEnabled); 16 | 17 | export const setSenAtom = atom(null, async (get, set, sen: number) => { 18 | set(senAtom, sen); 19 | await setMouseCfg(sen, get(accEnabledAtom)); 20 | await configManager.setConfig("sen", sen); 21 | }); 22 | 23 | export const setAccEnabledAtom = atom(null, async (get, set, accEnabled: boolean) => { 24 | set(accEnabledAtom, accEnabled); 25 | await setMouseCfg(get(senAtom), accEnabled); 26 | await configManager.setConfig("accEnabled", accEnabled); 27 | }); 28 | 29 | export const localeAtom = atom(defaultConfig.locale, (get, set, locale: Locales) => { 30 | set(localeAtom, locale); 31 | void configManager.setConfig("locale", locale); 32 | }); 33 | 34 | export const themeAtom = atom(defaultConfig.theme, (get, set, theme: Theme) => { 35 | set(themeAtom, theme); 36 | void configManager.setConfig("theme", theme); 37 | }); 38 | 39 | export const launchAtLoginAtom = atom(false); 40 | 41 | export const setLaunchAtLoginAtom = atom(null, async (get, set, launchAtLogin: boolean) => { 42 | await (launchAtLogin ? autostart.enable : autostart.disable)(); 43 | set(launchAtLoginAtom, launchAtLogin); 44 | }); 45 | 46 | export const loadConfig = async () => { 47 | const config = await configManager.loadConfig(); 48 | const launchAtLogin = await autostart.isEnabled(); 49 | 50 | if (!config.isOk()) { 51 | return; 52 | } 53 | 54 | const { accEnabled, locale, sen, theme } = config.get(); 55 | store.set(senAtom, sen); 56 | store.set(accEnabledAtom, accEnabled); 57 | store.set(localeAtom, isLocale(locale) ? locale : defaultConfig.locale); 58 | store.set(themeAtom, theme); 59 | store.set(launchAtLoginAtom, launchAtLogin); 60 | await setMouseCfg(sen, accEnabled); 61 | }; 62 | 63 | export const loadDefaultConfig = async () => { 64 | await configManager.resetConfig(); 65 | store.set(senAtom, defaultConfig.sen); 66 | store.set(accEnabledAtom, defaultConfig.accEnabled); 67 | store.set(localeAtom, defaultConfig.locale); 68 | store.set(themeAtom, defaultConfig.theme); 69 | store.set(launchAtLoginAtom, false); 70 | await setMouseCfg(defaultConfig.sen, defaultConfig.accEnabled); 71 | }; 72 | -------------------------------------------------------------------------------- /src/pages/main/main.tsx: -------------------------------------------------------------------------------- 1 | import { Divider, Input, Slider, Switch } from "@mantine/core"; 2 | import { exit } from "@tauri-apps/api/process"; 3 | import { WebviewWindow } from "@tauri-apps/api/window"; 4 | import { useAtom, useSetAtom } from "jotai"; 5 | import React from "react"; 6 | 7 | import { accEnabledAtom, loadDefaultConfig, senAtom, setAccEnabledAtom, setSenAtom } from "@/atoms"; 8 | import { Button } from "@/components/button/button"; 9 | import { Title } from "@/components/title/title"; 10 | import { useTranslation } from "@/hooks/useTranslation"; 11 | 12 | import * as css from "./styles.css"; 13 | 14 | const marks = [ 15 | { label: "0", value: 0 }, 16 | { label: "25", value: 25 }, 17 | { label: "50", value: 50 }, 18 | { label: "75", value: 75 }, 19 | { label: "100", value: 100 }, 20 | ]; 21 | 22 | const handleOpenPreferences = async () => { 23 | const window = WebviewWindow.getByLabel("preferences"); 24 | 25 | if (window) { 26 | await window.show(); 27 | await window.setFocus(); 28 | return; 29 | } 30 | 31 | console.error("Failed to get preferences window"); 32 | }; 33 | 34 | const Main = React.memo(function Main() { 35 | const T = useTranslation(); 36 | 37 | const [sen] = useAtom(senAtom); 38 | const setSen = useSetAtom(setSenAtom); 39 | 40 | const [accEnabled] = useAtom(accEnabledAtom); 41 | const setAccEnabled = useSetAtom(setAccEnabledAtom); 42 | 43 | return ( 44 |
45 | SensiMouse 46 |
47 | 48 | 57 | 58 | 59 | { 65 | const { checked } = event.target; 66 | await setAccEnabled(checked); 67 | }} 68 | onLabel="ON" 69 | /> 70 | 71 |
72 | 73 |
74 | 75 | 76 | 77 |
78 |
79 | ); 80 | }); 81 | 82 | export default Main; 83 | -------------------------------------------------------------------------------- /src/i18n/i18n-types.ts: -------------------------------------------------------------------------------- 1 | // This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten. 2 | /* eslint-disable */ 3 | import type { BaseTranslation as BaseTranslationType, LocalizedString } from 'typesafe-i18n' 4 | 5 | export type BaseTranslation = BaseTranslationType 6 | export type BaseLocale = 'en' 7 | 8 | export type Locales = 9 | | 'de' 10 | | 'en' 11 | | 'es' 12 | | 'fr' 13 | | 'it' 14 | | 'ja' 15 | | 'ko' 16 | | 'pt' 17 | | 'ru' 18 | | 'tr' 19 | | 'zh-CN' 20 | | 'zh-TW' 21 | 22 | export type Translation = RootTranslation 23 | 24 | export type Translations = RootTranslation 25 | 26 | type RootTranslation = { 27 | /** 28 | * A​b​o​u​t 29 | */ 30 | ABOUT: string 31 | /** 32 | * A​c​c​e​l​e​r​a​t​i​o​n 33 | */ 34 | ACCELERATION: string 35 | /** 36 | * D​a​r​k 37 | */ 38 | DARK: string 39 | /** 40 | * G​e​n​e​r​a​l 41 | */ 42 | GENERAL: string 43 | /** 44 | * I​n​t​e​r​f​a​c​e 45 | */ 46 | INTERFACE: string 47 | /** 48 | * L​a​n​g​u​a​g​e 49 | */ 50 | LANGUAGE: string 51 | /** 52 | * L​i​g​h​t 53 | */ 54 | LIGHT: string 55 | /** 56 | * P​r​e​f​e​r​e​n​c​e​s 57 | */ 58 | PREFERENCES: string 59 | /** 60 | * Q​u​i​t 61 | */ 62 | QUIT: string 63 | /** 64 | * R​e​s​e​t 65 | */ 66 | RESET: string 67 | /** 68 | * S​e​n​s​i​t​i​v​i​t​y 69 | */ 70 | SENSITIVITY: string 71 | /** 72 | * S​t​a​r​t​ ​a​t​ ​l​o​g​i​n 73 | */ 74 | START_AT_LOGIN: string 75 | /** 76 | * T​h​e​m​e 77 | */ 78 | THEME: string 79 | /** 80 | * V​e​r​s​i​o​n 81 | */ 82 | VERSION: string 83 | } 84 | 85 | export type TranslationFunctions = { 86 | /** 87 | * About 88 | */ 89 | ABOUT: () => LocalizedString 90 | /** 91 | * Acceleration 92 | */ 93 | ACCELERATION: () => LocalizedString 94 | /** 95 | * Dark 96 | */ 97 | DARK: () => LocalizedString 98 | /** 99 | * General 100 | */ 101 | GENERAL: () => LocalizedString 102 | /** 103 | * Interface 104 | */ 105 | INTERFACE: () => LocalizedString 106 | /** 107 | * Language 108 | */ 109 | LANGUAGE: () => LocalizedString 110 | /** 111 | * Light 112 | */ 113 | LIGHT: () => LocalizedString 114 | /** 115 | * Preferences 116 | */ 117 | PREFERENCES: () => LocalizedString 118 | /** 119 | * Quit 120 | */ 121 | QUIT: () => LocalizedString 122 | /** 123 | * Reset 124 | */ 125 | RESET: () => LocalizedString 126 | /** 127 | * Sensitivity 128 | */ 129 | SENSITIVITY: () => LocalizedString 130 | /** 131 | * Start at login 132 | */ 133 | START_AT_LOGIN: () => LocalizedString 134 | /** 135 | * Theme 136 | */ 137 | THEME: () => LocalizedString 138 | /** 139 | * Version 140 | */ 141 | VERSION: () => LocalizedString 142 | } 143 | 144 | export type Formatters = {} 145 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sensi-mouse", 3 | "version": "1.1.0", 4 | "type": "module", 5 | "scripts": { 6 | "build": "typesafe-i18n --no-watch && tsc && vite build", 7 | "check": "pnpm run i18n && concurrently -n tsc,eslint,deps pnpm:typecheck pnpm:lint pnpm:lint-deps", 8 | "clean": "rm -rf dist node_modules pnpm-lock.yaml && cd src-tauri && cargo clean", 9 | "dev": "vite", 10 | "format:check": "dprint check", 11 | "format:write": "dprint fmt", 12 | "i18n": "typesafe-i18n --no-watch", 13 | "lint": "pnpm run /^lint:/", 14 | "lint:deps": "pnpm skott -m graph -e .ts,.tsx -s", 15 | "lint:types": "tsc --noEmit -p .", 16 | "list:unused": "ts-unused-exports ./tsconfig.json --excludePathsFromReport=src/i18n", 17 | "preview": "vite preview", 18 | "tauri": "tauri", 19 | "todo": "leasot 'src/**/*.ts' 'src/**/*.tsx' 'scripts/**/*.ts'", 20 | "update-version": "bun run --bun ./scripts/update_version.ts" 21 | }, 22 | "dependencies": { 23 | "@mantine/core": "7.3.0", 24 | "@mantine/hooks": "7.3.0", 25 | "@mantine/utils": "6.0.21", 26 | "@swan-io/boxed": "1.2.0", 27 | "@swan-io/chicane": "1.4.1", 28 | "@tauri-apps/api": "1.5.1", 29 | "@total-typescript/ts-reset": "0.5.1", 30 | "core-js": "3.34.0", 31 | "immer": "10.0.3", 32 | "jotai": "2.6.0", 33 | "jotai-immer": "0.2.0", 34 | "react": "18.2.0", 35 | "react-dom": "18.2.0", 36 | "ress": "5.0.2", 37 | "suspend-react": "0.1.3", 38 | "tauri-plugin-autostart-api": "git://github.com/tauri-apps/tauri-plugin-autostart", 39 | "tauri-plugin-store-api": "git://github.com/tauri-apps/tauri-plugin-store", 40 | "throttle-debounce": "5.0.0", 41 | "tiny-invariant": "1.3.1", 42 | "ts-pattern": "5.0.6", 43 | "zod": "3.22.4" 44 | }, 45 | "devDependencies": { 46 | "@eslint-react/eslint-plugin": "0.9.2", 47 | "@tauri-apps/cli": "1.5.7", 48 | "@tsconfig/node20": "20.1.2", 49 | "@tsconfig/strictest": "2.0.2", 50 | "@types/node": "20.10.3", 51 | "@types/react": "18.2.42", 52 | "@types/react-dom": "18.2.17", 53 | "@types/throttle-debounce": "5.0.2", 54 | "@vanilla-extract/css": "1.14.0", 55 | "@vanilla-extract/vite-plugin": "3.9.2", 56 | "@vitejs/plugin-react-swc": "3.5.0", 57 | "bun": "1.0.15", 58 | "concurrently": "8.2.2", 59 | "core-dts": "0.0.3", 60 | "dprint": "0.43.2", 61 | "eslint": "8.55.0", 62 | "eslint-config-with-tsconfig": "2.9.120", 63 | "leasot": "13.3.0", 64 | "prettier": "3.1.0", 65 | "sass": "1.69.5", 66 | "skott": "0.31.3", 67 | "ts-essentials": "9.4.1", 68 | "typesafe-i18n": "5.26.2", 69 | "typescript": "5.3.2", 70 | "vite": "5.0.6", 71 | "zx": "7.2.3" 72 | }, 73 | "packageManager": "pnpm@8.10.5", 74 | "pnpm": { 75 | "overrides": { 76 | "@mantine/core": "latest", 77 | "@mantine/hooks": "latest", 78 | "@mantine/utils": "latest", 79 | "react": "18.2.0", 80 | "react-dom": "18.2.0", 81 | "typescript": "latest", 82 | "hasown": "npm:@nolyfill/hasown@latest" 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /updater/src/main.rs: -------------------------------------------------------------------------------- 1 | use crate::ghdata::Root; 2 | use crate::updatefile::UpdateFile; 3 | use regex::Regex; 4 | use std::error::Error; 5 | 6 | mod ghdata; 7 | mod updatefile; 8 | 9 | #[tokio::main] 10 | async fn main() -> Result<(), Box> { 11 | let client = reqwest::Client::new(); 12 | let response: Root = client 13 | .get("https://api.github.com/repos/Rel1cx/sensi-mouse/releases/latest") 14 | .header("user-agent", "updater/0.0.1") 15 | .send() 16 | .await? 17 | .json() 18 | .await?; 19 | 20 | let mut update_file = UpdateFile { 21 | version: response.name, 22 | notes: response.body, 23 | pub_date: response.published_at, 24 | ..Default::default() 25 | }; 26 | 27 | let darwin = Regex::new(r"^.+.app.tar.gz$").unwrap(); 28 | let darwin_sig = Regex::new(r"^.+.app.tar.gz.sig$").unwrap(); 29 | // let windows = Regex::new(r"^.+_\d+.\d+.\d+_x64_en-US.msi.zip$").unwrap(); 30 | // let windows_sig = Regex::new(r"^.+_\d+.\d+.\d+_x64_en-US.msi.zip.sig$").unwrap(); 31 | // let appimage = Regex::new(r"^.+_\d+.\d+.\d+_amd64.AppImage.tar.gz$").unwrap(); 32 | // let appimage_sig = Regex::new(r"^.+_\d+.\d+.\d+_amd64.AppImage.tar.gz.sig$").unwrap(); 33 | 34 | for asset in response.assets.iter() { 35 | if darwin.is_match(&asset.name) { 36 | update_file.platforms.darwin_x86_64.url = asset.browser_download_url.clone(); 37 | update_file.platforms.darwin_aarch64.url = asset.browser_download_url.clone(); 38 | continue; 39 | } 40 | // if windows.is_match(&asset.name) { 41 | // update_file.platforms.windows_x86_64.url = asset.browser_download_url.clone(); 42 | // continue; 43 | // } 44 | // if appimage.is_match(&asset.name) { 45 | // update_file.platforms.linux_x86_64.url = asset.browser_download_url.clone(); 46 | // continue; 47 | // } 48 | if darwin_sig.is_match(&asset.name) { 49 | let signature_bytes = client 50 | .get(asset.browser_download_url.clone()) 51 | .header("user-agent", "updater/0.0.1") 52 | .send() 53 | .await? 54 | .bytes() 55 | .await?; 56 | 57 | update_file.platforms.darwin_x86_64.signature = 58 | String::from_utf8_lossy(&signature_bytes).to_string(); 59 | update_file.platforms.darwin_aarch64.signature = 60 | String::from_utf8_lossy(&signature_bytes).to_string(); 61 | 62 | continue; 63 | } 64 | // if windows_sig.is_match(&asset.name) { 65 | // let signature_bytes = client 66 | // .get(asset.browser_download_url.clone()) 67 | // .header("user-agent", "updater/0.0.1") 68 | // .send() 69 | // .await? 70 | // .bytes() 71 | // .await?; 72 | // update_file.platforms.windows_x86_64.signature = 73 | // String::from_utf8_lossy(&signature_bytes).to_string(); 74 | // continue; 75 | // } 76 | // if appimage_sig.is_match(&asset.name) { 77 | // let signature_bytes = client 78 | // .get(asset.browser_download_url.clone()) 79 | // .header("user-agent", "updater/0.0.1") 80 | // .send() 81 | // .await? 82 | // .bytes() 83 | // .await?; 84 | // update_file.platforms.linux_x86_64.signature = 85 | // String::from_utf8_lossy(&signature_bytes).to_string(); 86 | // continue; 87 | // } 88 | } 89 | let x = serde_json::to_string(&update_file)?; 90 | println!("{}", x); 91 | Ok(()) 92 | } 93 | -------------------------------------------------------------------------------- /src-tauri/tauri.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": { 3 | "beforeDevCommand": "pnpm dev", 4 | "beforeBuildCommand": "pnpm build && pnpm update-version", 5 | "devPath": "http://localhost:1420", 6 | "distDir": "../dist", 7 | "withGlobalTauri": false 8 | }, 9 | "package": { 10 | "productName": "SensiMouse", 11 | "version": "1.1.0" 12 | }, 13 | "tauri": { 14 | "allowlist": { 15 | "window": { 16 | "show": true 17 | }, 18 | "shell": { 19 | "open": "^https?://(github.com|raw.githubusercontent.com)" 20 | } 21 | }, 22 | "bundle": { 23 | "active": true, 24 | "category": "Utility", 25 | "copyright": "", 26 | "deb": { 27 | "depends": [] 28 | }, 29 | "externalBin": [], 30 | "icon": [ 31 | "icons/32x32.png", 32 | "icons/128x128.png", 33 | "icons/128x128@2x.png", 34 | "icons/icon.icns", 35 | "icons/icon.ico" 36 | ], 37 | "identifier": "me.relicx.sensi-mouse", 38 | "longDescription": "", 39 | "macOS": { 40 | "entitlements": null, 41 | "exceptionDomain": "", 42 | "frameworks": [], 43 | "providerShortName": null, 44 | "signingIdentity": null 45 | }, 46 | "resources": [], 47 | "shortDescription": "", 48 | "targets": "all", 49 | "windows": { 50 | "certificateThumbprint": null, 51 | "digestAlgorithm": "sha256", 52 | "timestampUrl": "" 53 | } 54 | }, 55 | "security": { 56 | "csp": null 57 | }, 58 | "updater": { 59 | "active": true, 60 | "dialog": true, 61 | "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE5Q0JGQzE1RDlCRjc2NzMKUldSemRyL1pGZnpMR1pYYk5GQTNHM2pMWEZ2bnNRZ3oyU29YSTZvc3RTRVI2bTZTQUQ0ZWxSSHUK", 62 | "endpoints": [ 63 | "https://github.com/Rel1cx/sensi-mouse/releases/latest/download/latest.json" 64 | ] 65 | }, 66 | "macOSPrivateApi": true, 67 | "windows": [ 68 | { 69 | "label": "main", 70 | "title": "SensiMouse", 71 | "fullscreen": false, 72 | "width": 300, 73 | "height": 200, 74 | "resizable": false, 75 | "visible": false, 76 | "hiddenTitle": true, 77 | "decorations": false, 78 | "focus": false, 79 | "transparent": true, 80 | "skipTaskbar": true, 81 | "alwaysOnTop": true 82 | }, 83 | { 84 | "label": "preferences", 85 | "title": "Preferences", 86 | "url": "/preferences", 87 | "fullscreen": false, 88 | "center": true, 89 | "resizable": false, 90 | "visible": false, 91 | "width": 500, 92 | "height": 296, 93 | "alwaysOnTop": false 94 | }, 95 | { 96 | "label": "about", 97 | "title": "About", 98 | "url": "/about", 99 | "fullscreen": false, 100 | "center": true, 101 | "resizable": false, 102 | "visible": false, 103 | "width": 240, 104 | "height": 180, 105 | "alwaysOnTop": true 106 | } 107 | ], 108 | "systemTray": { 109 | "iconPath": "icons/line.png", 110 | "iconAsTemplate": true, 111 | "menuOnLeftClick": false 112 | } 113 | } 114 | } -------------------------------------------------------------------------------- /updater/src/ghdata.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 4 | #[serde(rename_all = "camelCase")] 5 | pub struct Root { 6 | pub url: String, 7 | #[serde(rename = "assets_url")] 8 | pub assets_url: String, 9 | #[serde(rename = "upload_url")] 10 | pub upload_url: String, 11 | #[serde(rename = "html_url")] 12 | pub html_url: String, 13 | pub id: i64, 14 | pub author: Author, 15 | #[serde(rename = "node_id")] 16 | pub node_id: String, 17 | #[serde(rename = "tag_name")] 18 | pub tag_name: String, 19 | #[serde(rename = "target_commitish")] 20 | pub target_commitish: String, 21 | pub name: String, 22 | pub draft: bool, 23 | pub prerelease: bool, 24 | #[serde(rename = "created_at")] 25 | pub created_at: String, 26 | #[serde(rename = "published_at")] 27 | pub published_at: String, 28 | pub assets: Vec, 29 | #[serde(rename = "tarball_url")] 30 | pub tarball_url: String, 31 | #[serde(rename = "zipball_url")] 32 | pub zipball_url: String, 33 | pub body: String, 34 | } 35 | 36 | #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 37 | #[serde(rename_all = "camelCase")] 38 | pub struct Author { 39 | pub login: String, 40 | pub id: i64, 41 | #[serde(rename = "node_id")] 42 | pub node_id: String, 43 | #[serde(rename = "avatar_url")] 44 | pub avatar_url: String, 45 | #[serde(rename = "gravatar_id")] 46 | pub gravatar_id: String, 47 | pub url: String, 48 | #[serde(rename = "html_url")] 49 | pub html_url: String, 50 | #[serde(rename = "followers_url")] 51 | pub followers_url: String, 52 | #[serde(rename = "following_url")] 53 | pub following_url: String, 54 | #[serde(rename = "gists_url")] 55 | pub gists_url: String, 56 | #[serde(rename = "starred_url")] 57 | pub starred_url: String, 58 | #[serde(rename = "subscriptions_url")] 59 | pub subscriptions_url: String, 60 | #[serde(rename = "organizations_url")] 61 | pub organizations_url: String, 62 | #[serde(rename = "repos_url")] 63 | pub repos_url: String, 64 | #[serde(rename = "events_url")] 65 | pub events_url: String, 66 | #[serde(rename = "received_events_url")] 67 | pub received_events_url: String, 68 | #[serde(rename = "type")] 69 | pub type_field: String, 70 | #[serde(rename = "site_admin")] 71 | pub site_admin: bool, 72 | } 73 | 74 | #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 75 | #[serde(rename_all = "camelCase")] 76 | pub struct Asset { 77 | pub url: String, 78 | pub id: i64, 79 | #[serde(rename = "node_id")] 80 | pub node_id: String, 81 | pub name: String, 82 | pub label: String, 83 | pub uploader: Uploader, 84 | #[serde(rename = "content_type")] 85 | pub content_type: String, 86 | pub state: String, 87 | pub size: i64, 88 | #[serde(rename = "download_count")] 89 | pub download_count: i64, 90 | #[serde(rename = "created_at")] 91 | pub created_at: String, 92 | #[serde(rename = "updated_at")] 93 | pub updated_at: String, 94 | #[serde(rename = "browser_download_url")] 95 | pub browser_download_url: String, 96 | } 97 | 98 | #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 99 | #[serde(rename_all = "camelCase")] 100 | pub struct Uploader { 101 | pub login: String, 102 | pub id: i64, 103 | #[serde(rename = "node_id")] 104 | pub node_id: String, 105 | #[serde(rename = "avatar_url")] 106 | pub avatar_url: String, 107 | #[serde(rename = "gravatar_id")] 108 | pub gravatar_id: String, 109 | pub url: String, 110 | #[serde(rename = "html_url")] 111 | pub html_url: String, 112 | #[serde(rename = "followers_url")] 113 | pub followers_url: String, 114 | #[serde(rename = "following_url")] 115 | pub following_url: String, 116 | #[serde(rename = "gists_url")] 117 | pub gists_url: String, 118 | #[serde(rename = "starred_url")] 119 | pub starred_url: String, 120 | #[serde(rename = "subscriptions_url")] 121 | pub subscriptions_url: String, 122 | #[serde(rename = "organizations_url")] 123 | pub organizations_url: String, 124 | #[serde(rename = "repos_url")] 125 | pub repos_url: String, 126 | #[serde(rename = "events_url")] 127 | pub events_url: String, 128 | #[serde(rename = "received_events_url")] 129 | pub received_events_url: String, 130 | #[serde(rename = "type")] 131 | pub type_field: String, 132 | #[serde(rename = "site_admin")] 133 | pub site_admin: bool, 134 | } 135 | -------------------------------------------------------------------------------- /src-tauri/src/main.rs: -------------------------------------------------------------------------------- 1 | use tauri::{ 2 | ActivationPolicy, CustomMenuItem, Manager, SystemTray, SystemTrayEvent, SystemTrayMenu, 3 | SystemTrayMenuItem, 4 | }; 5 | use tauri_plugin_positioner::{Position, WindowExt}; 6 | use window_vibrancy::NSVisualEffectMaterial; 7 | 8 | use helper::write_mouse_cfg; 9 | use plugins::{BackgroundPlugin, EnvironmentPlugin}; 10 | use tauri_plugin_autostart::MacosLauncher; 11 | 12 | mod helper; 13 | mod plugins; 14 | 15 | #[tauri::command] 16 | fn get_mouse_cfg() -> (usize, bool) { 17 | let (sen, acc_enabled) = helper::read_mouse_cfg().unwrap(); 18 | (sen as usize - 100, acc_enabled) 19 | } 20 | 21 | #[tauri::command] 22 | fn set_mouse_cfg(sen: usize, acc_enabled: bool) { 23 | let sen = std::cmp::min(sen, 99); 24 | write_mouse_cfg(sen as i32 + 100, acc_enabled).unwrap(); 25 | } 26 | 27 | fn system_tray() -> SystemTray { 28 | let preferences = CustomMenuItem::new("preferences", "Preferences"); 29 | let about = CustomMenuItem::new("about", "About"); 30 | let quit = CustomMenuItem::new("quit", "Quit"); 31 | let tray_menu = SystemTrayMenu::new() 32 | .add_item(preferences) 33 | .add_item(about) 34 | .add_native_item(SystemTrayMenuItem::Separator) 35 | .add_item(quit); 36 | SystemTray::new().with_menu(tray_menu) 37 | } 38 | 39 | fn main() { 40 | let context = tauri::generate_context!(); 41 | 42 | tauri::Builder::default() 43 | .plugin(tauri_plugin_positioner::init()) 44 | .plugin(BackgroundPlugin) 45 | .plugin(EnvironmentPlugin) 46 | .plugin(tauri_plugin_store::Builder::default().build()) 47 | .plugin(tauri_plugin_autostart::init( 48 | MacosLauncher::LaunchAgent, 49 | Some(vec![]), 50 | )) 51 | .system_tray(system_tray()) 52 | .on_system_tray_event(|app, event| { 53 | tauri_plugin_positioner::on_tray_event(app, &event); 54 | match event { 55 | SystemTrayEvent::LeftClick { 56 | position: _, 57 | size: _, 58 | .. 59 | } => { 60 | let window = app.get_window("main").unwrap(); 61 | let _ = window.move_window(Position::TrayCenter); 62 | 63 | if window.is_visible().unwrap() { 64 | window.hide().unwrap(); 65 | } else { 66 | window.show().unwrap(); 67 | window.set_focus().unwrap(); 68 | } 69 | } 70 | SystemTrayEvent::RightClick { 71 | position: _, 72 | size: _, 73 | .. 74 | } => { 75 | println!("system tray received a right click"); 76 | } 77 | SystemTrayEvent::DoubleClick { 78 | position: _, 79 | size: _, 80 | .. 81 | } => { 82 | println!("system tray received a double click"); 83 | } 84 | SystemTrayEvent::MenuItemClick { id, .. } => match id.as_str() { 85 | "quit" => { 86 | std::process::exit(0); 87 | } 88 | "about" => { 89 | let about_window = app.get_window("about").unwrap(); 90 | about_window.show().unwrap(); 91 | about_window.set_focus().unwrap(); 92 | } 93 | "preferences" => { 94 | let preferences_window = app.get_window("preferences").unwrap(); 95 | preferences_window.show().unwrap(); 96 | preferences_window.set_focus().unwrap(); 97 | } 98 | _ => {} 99 | }, 100 | _ => {} 101 | } 102 | }) 103 | .on_window_event(|event| match event.event() { 104 | tauri::WindowEvent::Focused(is_focused) => { 105 | if !is_focused && event.window().label() == "main" { 106 | event.window().hide().unwrap(); 107 | } 108 | } 109 | tauri::WindowEvent::CloseRequested { .. } => { 110 | event.window().hide().unwrap(); 111 | } 112 | tauri::WindowEvent::ThemeChanged(theme) => { 113 | println!("theme changed: {:?}", theme); 114 | } 115 | _ => {} 116 | }) 117 | .invoke_handler(tauri::generate_handler![get_mouse_cfg, set_mouse_cfg]) 118 | .setup(move |app| { 119 | let main_window = app.get_window("main").unwrap(); 120 | 121 | window_vibrancy::apply_vibrancy( 122 | &main_window, 123 | NSVisualEffectMaterial::Sidebar, 124 | None, 125 | Some(16f64), 126 | ) 127 | .expect("unable to apply vibrancy"); 128 | app.set_activation_policy(ActivationPolicy::Accessory); 129 | Ok(()) 130 | }) 131 | .run(context) 132 | .expect("error while running tauri application"); 133 | } 134 | -------------------------------------------------------------------------------- /.github/workflows/check.yml: -------------------------------------------------------------------------------- 1 | name: Check 2 | on: 3 | push: 4 | branches: 5 | - main 6 | jobs: 7 | check: 8 | runs-on: macos-12 9 | steps: 10 | - uses: actions/checkout@v3 11 | - name: Setup node 12 | uses: actions/setup-node@v3 13 | with: 14 | node-version: 18 15 | - uses: pnpm/action-setup@v2 16 | name: Install pnpm 17 | id: pnpm-install 18 | with: 19 | version: 7 20 | run_install: false 21 | - name: Get pnpm store directory 22 | id: pnpm-cache 23 | shell: bash 24 | run: 25 | | 26 | echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT 27 | - uses: actions/cache@v3 28 | name: Setup pnpm cache 29 | with: 30 | path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} 31 | key: ${{ runner.os }}-pnpm-store-release-${{ hashFiles('**/pnpm-lock.yaml') }} 32 | restore-keys: 33 | | 34 | ${{ runner.os }}-pnpm-store-release- 35 | - name: Install Rust stable 36 | uses: dtolnay/rust-toolchain@stable 37 | with: 38 | targets: aarch64-apple-darwin 39 | - name: Install front-end dependencies 40 | run: pnpm i 41 | - name: Build front-end assets 42 | run: pnpm run build 43 | - name: Check 44 | run: pnpm run lint 45 | - uses: Swatinem/rust-cache@v2 46 | with: 47 | workspaces: src-tauri 48 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [1.1.0](https://github.com/Rel1cx/sensi-mouse/compare/v1.0.17...v1.1.0) (2023-09-29) 4 | 5 | ### Features 6 | 7 | - 1.0.18 ([f663430](https://github.com/Rel1cx/sensi-mouse/commit/f66343025fcb9a2a2c87e8925d438d36ed40e32c)) 8 | 9 | ## [1.0.17](https://github.com/Rel1cx/sensi-mouse/compare/v1.0.16...v1.0.17) (2023-07-09) 10 | 11 | ### Bug Fixes 12 | 13 | - Remove ipad-cursor ([7c3c4d7](https://github.com/Rel1cx/sensi-mouse/commit/7c3c4d7495b3d02b8d6c97d30005fd3db4c59fd4)) 14 | 15 | ## [1.0.16](https://github.com/Rel1cx/sensi-mouse/compare/v1.0.15...v1.0.16) (2023-07-09) 16 | 17 | ### Bug Fixes 18 | 19 | - **deps:** update rust crate regex to 1.9.1 ([f93b7e9](https://github.com/Rel1cx/sensi-mouse/commit/f93b7e9cd67da5087cdc4200b1ef26a694fbc717)) 20 | - **deps:** update rust crate window-vibrancy to 0.4 ([a109781](https://github.com/Rel1cx/sensi-mouse/commit/a109781fdb129ce05a66c95c7b65f13c9ddaf30c)) 21 | 22 | ## [1.0.15](https://github.com/Rel1cx/sensi-mouse/compare/v1.0.14...v1.0.15) (2023-07-06) 23 | 24 | ### Bug Fixes 25 | 26 | - **deps:** update dependency jotai to v2.2.2 ([90f64c5](https://github.com/Rel1cx/sensi-mouse/commit/90f64c57278bdac29e0b59f5ee464eba20a7b306)) 27 | - **deps:** update rust crate regex to 1.9.0 ([a8d93ab](https://github.com/Rel1cx/sensi-mouse/commit/a8d93aba68f20bc80556d9dc134c55ef0d942482)) 28 | 29 | ## [1.0.14](https://github.com/Rel1cx/sensi-mouse/compare/v1.0.13...v1.0.14) (2023-06-17) 30 | 31 | ### Bug Fixes 32 | 33 | - **deps:** update rust crate tauri to 1.4.1 ([a5c1c43](https://github.com/Rel1cx/sensi-mouse/commit/a5c1c43b89d3286c5a032181876bb0e05b6c94e4)) 34 | 35 | ## [1.0.13](https://github.com/Rel1cx/sensi-mouse/compare/v1.0.12...v1.0.13) (2023-06-10) 36 | 37 | ### Bug Fixes 38 | 39 | - **deps:** update dependency ftld to v0.58.3 ([7e57910](https://github.com/Rel1cx/sensi-mouse/commit/7e57910e2d9a57f246b09699715cd9ee2f444e63)) 40 | - **deps:** update rust crate regex to 1.8.4 ([2127722](https://github.com/Rel1cx/sensi-mouse/commit/2127722d3f26d0da984036ce92c73e966a200db1)) 41 | 42 | ## [1.0.12](https://github.com/Rel1cx/sensi-mouse/compare/v1.0.11...v1.0.12) (2023-06-05) 43 | 44 | ### Bug Fixes 45 | 46 | - Fix version not update ([c1f33d7](https://github.com/Rel1cx/sensi-mouse/commit/c1f33d7d65527df2671e174d0d965a868e8b198c)) 47 | 48 | ## [1.0.11](https://github.com/Rel1cx/sensi-mouse/compare/v1.0.10...v1.0.11) (2023-06-03) 49 | 50 | ### Bug Fixes 51 | 52 | - **deps:** update rust crate regex to 1.8.3 ([04f513c](https://github.com/Rel1cx/sensi-mouse/commit/04f513c93f0af3dd9ec79eb151de8a2c0afdd0ba)) 53 | 54 | ## [1.0.10](https://github.com/Rel1cx/sensi-mouse/compare/v1.0.9...v1.0.10) (2023-05-17) 55 | 56 | ### Bug Fixes 57 | 58 | - **deps:** update dependency ts-pattern to v4.3.0 ([3881c9f](https://github.com/Rel1cx/sensi-mouse/commit/3881c9f0bedad53823b7d834bd7ff1b9973841cf)) 59 | - **deps:** update rust crate tokio to 1.28.1 ([16f44c2](https://github.com/Rel1cx/sensi-mouse/commit/16f44c241725d17b832ba74afd8d32d2c1db163f)) 60 | 61 | ## [1.0.9](https://github.com/Rel1cx/sensi-mouse/compare/v1.0.8...v1.0.9) (2023-05-08) 62 | 63 | ### Bug Fixes 64 | 65 | - optimize code and simplify multi-window state synchronization. ([567a5ea](https://github.com/Rel1cx/sensi-mouse/commit/567a5ea1cfe0cbcb6af453b1ad4791a877867a7e)) 66 | 67 | ## [1.0.8](https://github.com/Rel1cx/sensi-mouse/compare/v1.0.7...v1.0.8) (2023-05-03) 68 | 69 | ### Bug Fixes 70 | 71 | - **deps:** update rust crate mac-mouse-sys to 0.0.9 ([a0ddf81](https://github.com/Rel1cx/sensi-mouse/commit/a0ddf81f1525f02d0ffe0023885e2a4a2f8be1a1)) 72 | 73 | ## [1.0.7](https://github.com/Rel1cx/sensi-mouse/compare/v1.0.6...v1.0.7) (2023-04-16) 74 | 75 | ### Bug Fixes 76 | 77 | - refactor configManager to improve synchronization with store ([50aee98](https://github.com/Rel1cx/sensi-mouse/commit/50aee98cfd056aaa264fb9b810d6bc13f57dcf9d)) 78 | 79 | ## [1.0.6](https://github.com/Rel1cx/sensi-mouse/compare/v1.0.5...v1.0.6) (2023-04-14) 80 | 81 | ### Features 82 | 83 | - add more i18n languages ([3d119ec](https://github.com/Rel1cx/sensi-mouse/commit/3d119ecafbf495b046a8bd5315185bf13ff75019)) 84 | 85 | ## [1.0.5](https://github.com/Rel1cx/sensi-mouse/compare/v1.0.4...v1.0.5) (2023-04-12) 86 | 87 | ### Bug Fixes 88 | 89 | - window not focus after open ([e344b27](https://github.com/Rel1cx/sensi-mouse/commit/e344b2792c4bd497a2bcc55a84b5745090b71a50)) 90 | 91 | ## [1.0.4](https://github.com/Rel1cx/sensi-mouse/compare/v1.0.3...v1.0.4) (2023-04-11) 92 | 93 | ### Bug Fixes 94 | 95 | - **deps:** update dependency jotai to v2.0.4 ([209f0b0](https://github.com/Rel1cx/sensi-mouse/commit/209f0b0eee6efe72c49e0556c894ccc60f861d7c)) 96 | - fix default theme in drak mode ([ba28728](https://github.com/Rel1cx/sensi-mouse/commit/ba287282fb0dbf8c21202a5dd12999caaf4ab163)) 97 | - fix default theme in drak mode ([8891c9c](https://github.com/Rel1cx/sensi-mouse/commit/8891c9cf552f1c88cfc6f1994e18162997d77a5f)) 98 | - Save, Restore and Reapply Settings ([c533cf1](https://github.com/Rel1cx/sensi-mouse/commit/c533cf1d2382350fc8dbd452dad049ae43b7a314)) 99 | - settings save and reapply ([3b8d9cb](https://github.com/Rel1cx/sensi-mouse/commit/3b8d9cb4d3ae32d729ec3bcd543174f847ce0fcc)) 100 | 101 | ## [1.0.3](https://github.com/Rel1cx/sensi-mouse/compare/v1.0.2...v1.0.3) (2023-04-08) 102 | 103 | ### Bug Fixes 104 | 105 | - fix default theme in drak mode ([1ce2e10](https://github.com/Rel1cx/sensi-mouse/commit/1ce2e10b9cc5bfa36affe9ef03e410c00c902c22)) 106 | 107 | ## [1.0.2](https://github.com/Rel1cx/sensi-mouse/compare/v1.0.1...v1.0.2) (2023-04-06) 108 | 109 | ### Bug Fixes 110 | 111 | - update header text in Main component from "SensiMouse (beta)" to "SensiMouse". ([85f21b5](https://github.com/Rel1cx/sensi-mouse/commit/85f21b58af1b9ae8d69724fab5f12502d19e00d1)) 112 | 113 | ## [1.0.2](https://github.com/Rel1cx/sensi-mouse/compare/v1.0.1...v1.0.2) (2023-04-06) 114 | 115 | ### Bug Fixes 116 | 117 | - update header text in Main component from "SensiMouse (beta)" to "SensiMouse". ([85f21b5](https://github.com/Rel1cx/sensi-mouse/commit/85f21b58af1b9ae8d69724fab5f12502d19e00d1)) 118 | 119 | ## [1.0.1](https://github.com/Rel1cx/sensi-mouse/compare/v1.0.0...v1.0.1) (2023-04-06) 120 | 121 | ### Bug Fixes 122 | 123 | - Update version number and allow opening of raw.githubusercontent.com in Tauri configuration file ([2fb7019](https://github.com/Rel1cx/sensi-mouse/commit/2fb70196bcc3bb79efce12a7a362078aea9209d7)) 124 | 125 | ## [1.0.0](https://github.com/Rel1cx/sensi-mouse/compare/v0.0.11...v1.0.0) (2023-04-06) 126 | 127 | ### ⚠ BREAKING CHANGES 128 | 129 | - Add auto update 130 | 131 | ### Features 132 | 133 | - Add auto update ([57866a1](https://github.com/Rel1cx/sensi-mouse/commit/57866a10c41554f4991429da62ce336f25e6f28a)) 134 | 135 | ## [0.0.11](https://github.com/Rel1cx/sensi-mouse/compare/v0.0.10...v0.0.11) (2023-04-06) 136 | 137 | ### Features 138 | 139 | - Add updater initial version with GitHub API integration and update file generation ([17581df](https://github.com/Rel1cx/sensi-mouse/commit/17581df45a28879d1a246d28c7c9d41d37b1eac9)) 140 | 141 | ## [0.0.10](https://github.com/Rel1cx/sensi-mouse/compare/v0.0.9...v0.0.10) (2023-04-06) 142 | 143 | ### Features 144 | 145 | - Add "updater" feature to tauri dependency in Cargo.toml ([62313a4](https://github.com/Rel1cx/sensi-mouse/commit/62313a4bd180653411e36ffe45c3dd816a7417e3)) 146 | -------------------------------------------------------------------------------- /.github/workflows/beta.yml: -------------------------------------------------------------------------------- 1 | name: Beta 2 | on: 3 | push: 4 | branches: 5 | - dev 6 | tags: 7 | - "v*-beta.*" 8 | jobs: 9 | release: 10 | runs-on: macos-12 11 | steps: 12 | - uses: actions/checkout@v3 13 | - name: Setup node 14 | uses: actions/setup-node@v3 15 | with: 16 | node-version: 18 17 | - uses: pnpm/action-setup@v2 18 | name: Install pnpm 19 | id: pnpm-install 20 | with: 21 | version: 8 22 | run_install: false 23 | - name: Get pnpm store directory 24 | id: pnpm-cache 25 | shell: bash 26 | run: 27 | | 28 | echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT 29 | - uses: actions/cache@v3 30 | name: Setup pnpm cache 31 | with: 32 | path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} 33 | key: ${{ runner.os }}-pnpm-store-release-${{ hashFiles('**/pnpm-lock.yaml') }} 34 | restore-keys: 35 | | 36 | ${{ runner.os }}-pnpm-store-release- 37 | - name: Install Rust stable 38 | uses: dtolnay/rust-toolchain@stable 39 | with: 40 | targets: aarch64-apple-darwin 41 | - name: Install front-end dependencies 42 | run: pnpm i 43 | - uses: Swatinem/rust-cache@v2 44 | with: 45 | workspaces: src-tauri 46 | - name: Update version 47 | run: pnpm run update-version 48 | - uses: tauri-apps/tauri-action@dev 49 | env: 50 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 51 | TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} 52 | TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} 53 | with: 54 | tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version 55 | releaseName: "v__VERSION__" 56 | releaseBody: "See the assets to download this version and install." 57 | releaseDraft: false 58 | prerelease: true 59 | args: --target universal-apple-darwin 60 | permissions: 61 | contents: write 62 | pull-requests: read 63 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | on: 3 | push: 4 | branches: 5 | - main 6 | jobs: 7 | # Job that allows the creation of the release 8 | release_please: 9 | name: Release Please 10 | runs-on: ubuntu-latest 11 | outputs: 12 | tag_name: ${{ steps.release.outputs.tag_name }} 13 | release_id: ${{ steps.release.outputs.id }} 14 | upload_url: ${{ steps.release.outputs.upload_url }} 15 | release_created: ${{ steps.release.outputs.release_created }} 16 | steps: 17 | - uses: google-github-actions/release-please-action@v3 18 | id: release 19 | with: 20 | token: ${{ secrets.GITHUB_TOKEN }} 21 | release-type: node 22 | 23 | # Job that builds the executables 24 | build_tauri: 25 | name: "Build and upload release binaries" 26 | needs: release_please 27 | if: ${{ needs.release_please.outputs.release_created }} 28 | permissions: 29 | contents: write 30 | strategy: 31 | fail-fast: false 32 | matrix: 33 | platform: 34 | [ 35 | macos-latest, 36 | ] 37 | 38 | runs-on: ${{ matrix.platform }} 39 | steps: 40 | - uses: actions/checkout@v3 41 | - name: Setup node 42 | uses: actions/setup-node@v3 43 | with: 44 | node-version: 18 45 | - uses: pnpm/action-setup@v2 46 | name: Install pnpm 47 | id: pnpm-install 48 | with: 49 | version: 8 50 | run_install: false 51 | - name: Get pnpm store directory 52 | id: pnpm-cache 53 | shell: bash 54 | run: 55 | | 56 | echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT 57 | - uses: actions/cache@v3 58 | name: Setup pnpm cache 59 | with: 60 | path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} 61 | key: ${{ runner.os }}-pnpm-store-release-${{ hashFiles('**/pnpm-lock.yaml') }} 62 | restore-keys: 63 | | 64 | ${{ runner.os }}-pnpm-store-release- 65 | - name: Install Rust stable 66 | uses: dtolnay/rust-toolchain@stable 67 | with: 68 | targets: aarch64-apple-darwin 69 | - name: Install front-end dependencies 70 | run: pnpm i 71 | - uses: Swatinem/rust-cache@v2 72 | with: 73 | workspaces: src-tauri 74 | - name: Update version 75 | run: pnpm run update-version 76 | - uses: tauri-apps/tauri-action@dev 77 | env: 78 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 79 | TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} 80 | TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} 81 | with: 82 | args: --target universal-apple-darwin 83 | releaseId: ${{ needs.release_please.outputs.release_id }} 84 | 85 | create_update_json: 86 | name: "Create latest.json file" 87 | needs: [release_please, build_tauri] 88 | permissions: 89 | contents: write 90 | runs-on: ubuntu-latest 91 | steps: 92 | - name: Checkout 93 | uses: actions/checkout@v3 94 | 95 | - run: mkdir -p _output 96 | 97 | - uses: Swatinem/rust-cache@v2 98 | with: 99 | workspaces: updater 100 | 101 | - name: install rust stable 102 | uses: dtolnay/rust-toolchain@stable 103 | 104 | - name: Generate update.json 105 | run: cargo run > ../_output/latest.json 106 | working-directory: updater 107 | 108 | - name: remove old latest.json 109 | uses: flcdrg/remove-release-asset-action@v2 110 | env: 111 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 112 | with: 113 | release_id: ${{ needs.release_please.outputs.release_id }} 114 | asset_name: latest.json 115 | 116 | - name: upload new latest.json 117 | id: upload-release-asset 118 | uses: actions/upload-release-asset@v1 119 | env: 120 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 121 | with: 122 | upload_url: ${{ needs.release_please.outputs.upload_url }} 123 | asset_path: _output/latest.json 124 | asset_name: latest.json 125 | asset_content_type: application/json 126 | -------------------------------------------------------------------------------- /updater/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "addr2line" 7 | version = "0.20.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" 10 | dependencies = [ 11 | "gimli", 12 | ] 13 | 14 | [[package]] 15 | name = "adler" 16 | version = "1.0.2" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 19 | 20 | [[package]] 21 | name = "aho-corasick" 22 | version = "1.0.2" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" 25 | dependencies = [ 26 | "memchr", 27 | ] 28 | 29 | [[package]] 30 | name = "autocfg" 31 | version = "1.1.0" 32 | source = "registry+https://github.com/rust-lang/crates.io-index" 33 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 34 | 35 | [[package]] 36 | name = "backtrace" 37 | version = "0.3.68" 38 | source = "registry+https://github.com/rust-lang/crates.io-index" 39 | checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" 40 | dependencies = [ 41 | "addr2line", 42 | "cc", 43 | "cfg-if", 44 | "libc", 45 | "miniz_oxide", 46 | "object", 47 | "rustc-demangle", 48 | ] 49 | 50 | [[package]] 51 | name = "base64" 52 | version = "0.21.2" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" 55 | 56 | [[package]] 57 | name = "bitflags" 58 | version = "1.3.2" 59 | source = "registry+https://github.com/rust-lang/crates.io-index" 60 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 61 | 62 | [[package]] 63 | name = "bumpalo" 64 | version = "3.13.0" 65 | source = "registry+https://github.com/rust-lang/crates.io-index" 66 | checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" 67 | 68 | [[package]] 69 | name = "bytes" 70 | version = "1.4.0" 71 | source = "registry+https://github.com/rust-lang/crates.io-index" 72 | checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" 73 | 74 | [[package]] 75 | name = "cc" 76 | version = "1.0.79" 77 | source = "registry+https://github.com/rust-lang/crates.io-index" 78 | checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" 79 | 80 | [[package]] 81 | name = "cfg-if" 82 | version = "1.0.0" 83 | source = "registry+https://github.com/rust-lang/crates.io-index" 84 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 85 | 86 | [[package]] 87 | name = "core-foundation" 88 | version = "0.9.3" 89 | source = "registry+https://github.com/rust-lang/crates.io-index" 90 | checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" 91 | dependencies = [ 92 | "core-foundation-sys", 93 | "libc", 94 | ] 95 | 96 | [[package]] 97 | name = "core-foundation-sys" 98 | version = "0.8.4" 99 | source = "registry+https://github.com/rust-lang/crates.io-index" 100 | checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" 101 | 102 | [[package]] 103 | name = "encoding_rs" 104 | version = "0.8.32" 105 | source = "registry+https://github.com/rust-lang/crates.io-index" 106 | checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" 107 | dependencies = [ 108 | "cfg-if", 109 | ] 110 | 111 | [[package]] 112 | name = "errno" 113 | version = "0.3.1" 114 | source = "registry+https://github.com/rust-lang/crates.io-index" 115 | checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" 116 | dependencies = [ 117 | "errno-dragonfly", 118 | "libc", 119 | "windows-sys", 120 | ] 121 | 122 | [[package]] 123 | name = "errno-dragonfly" 124 | version = "0.1.2" 125 | source = "registry+https://github.com/rust-lang/crates.io-index" 126 | checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" 127 | dependencies = [ 128 | "cc", 129 | "libc", 130 | ] 131 | 132 | [[package]] 133 | name = "fastrand" 134 | version = "1.9.0" 135 | source = "registry+https://github.com/rust-lang/crates.io-index" 136 | checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" 137 | dependencies = [ 138 | "instant", 139 | ] 140 | 141 | [[package]] 142 | name = "fnv" 143 | version = "1.0.7" 144 | source = "registry+https://github.com/rust-lang/crates.io-index" 145 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 146 | 147 | [[package]] 148 | name = "foreign-types" 149 | version = "0.3.2" 150 | source = "registry+https://github.com/rust-lang/crates.io-index" 151 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 152 | dependencies = [ 153 | "foreign-types-shared", 154 | ] 155 | 156 | [[package]] 157 | name = "foreign-types-shared" 158 | version = "0.1.1" 159 | source = "registry+https://github.com/rust-lang/crates.io-index" 160 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 161 | 162 | [[package]] 163 | name = "form_urlencoded" 164 | version = "1.2.0" 165 | source = "registry+https://github.com/rust-lang/crates.io-index" 166 | checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" 167 | dependencies = [ 168 | "percent-encoding", 169 | ] 170 | 171 | [[package]] 172 | name = "futures-channel" 173 | version = "0.3.28" 174 | source = "registry+https://github.com/rust-lang/crates.io-index" 175 | checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" 176 | dependencies = [ 177 | "futures-core", 178 | ] 179 | 180 | [[package]] 181 | name = "futures-core" 182 | version = "0.3.28" 183 | source = "registry+https://github.com/rust-lang/crates.io-index" 184 | checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" 185 | 186 | [[package]] 187 | name = "futures-sink" 188 | version = "0.3.28" 189 | source = "registry+https://github.com/rust-lang/crates.io-index" 190 | checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" 191 | 192 | [[package]] 193 | name = "futures-task" 194 | version = "0.3.28" 195 | source = "registry+https://github.com/rust-lang/crates.io-index" 196 | checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" 197 | 198 | [[package]] 199 | name = "futures-util" 200 | version = "0.3.28" 201 | source = "registry+https://github.com/rust-lang/crates.io-index" 202 | checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" 203 | dependencies = [ 204 | "futures-core", 205 | "futures-task", 206 | "pin-project-lite", 207 | "pin-utils", 208 | ] 209 | 210 | [[package]] 211 | name = "gimli" 212 | version = "0.27.3" 213 | source = "registry+https://github.com/rust-lang/crates.io-index" 214 | checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" 215 | 216 | [[package]] 217 | name = "h2" 218 | version = "0.3.20" 219 | source = "registry+https://github.com/rust-lang/crates.io-index" 220 | checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" 221 | dependencies = [ 222 | "bytes", 223 | "fnv", 224 | "futures-core", 225 | "futures-sink", 226 | "futures-util", 227 | "http", 228 | "indexmap", 229 | "slab", 230 | "tokio", 231 | "tokio-util", 232 | "tracing", 233 | ] 234 | 235 | [[package]] 236 | name = "hashbrown" 237 | version = "0.12.3" 238 | source = "registry+https://github.com/rust-lang/crates.io-index" 239 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 240 | 241 | [[package]] 242 | name = "hermit-abi" 243 | version = "0.3.2" 244 | source = "registry+https://github.com/rust-lang/crates.io-index" 245 | checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" 246 | 247 | [[package]] 248 | name = "http" 249 | version = "0.2.9" 250 | source = "registry+https://github.com/rust-lang/crates.io-index" 251 | checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" 252 | dependencies = [ 253 | "bytes", 254 | "fnv", 255 | "itoa", 256 | ] 257 | 258 | [[package]] 259 | name = "http-body" 260 | version = "0.4.5" 261 | source = "registry+https://github.com/rust-lang/crates.io-index" 262 | checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" 263 | dependencies = [ 264 | "bytes", 265 | "http", 266 | "pin-project-lite", 267 | ] 268 | 269 | [[package]] 270 | name = "httparse" 271 | version = "1.8.0" 272 | source = "registry+https://github.com/rust-lang/crates.io-index" 273 | checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" 274 | 275 | [[package]] 276 | name = "httpdate" 277 | version = "1.0.2" 278 | source = "registry+https://github.com/rust-lang/crates.io-index" 279 | checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" 280 | 281 | [[package]] 282 | name = "hyper" 283 | version = "0.14.27" 284 | source = "registry+https://github.com/rust-lang/crates.io-index" 285 | checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" 286 | dependencies = [ 287 | "bytes", 288 | "futures-channel", 289 | "futures-core", 290 | "futures-util", 291 | "h2", 292 | "http", 293 | "http-body", 294 | "httparse", 295 | "httpdate", 296 | "itoa", 297 | "pin-project-lite", 298 | "socket2 0.4.9", 299 | "tokio", 300 | "tower-service", 301 | "tracing", 302 | "want", 303 | ] 304 | 305 | [[package]] 306 | name = "hyper-tls" 307 | version = "0.5.0" 308 | source = "registry+https://github.com/rust-lang/crates.io-index" 309 | checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" 310 | dependencies = [ 311 | "bytes", 312 | "hyper", 313 | "native-tls", 314 | "tokio", 315 | "tokio-native-tls", 316 | ] 317 | 318 | [[package]] 319 | name = "idna" 320 | version = "0.4.0" 321 | source = "registry+https://github.com/rust-lang/crates.io-index" 322 | checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" 323 | dependencies = [ 324 | "unicode-bidi", 325 | "unicode-normalization", 326 | ] 327 | 328 | [[package]] 329 | name = "indexmap" 330 | version = "1.9.3" 331 | source = "registry+https://github.com/rust-lang/crates.io-index" 332 | checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" 333 | dependencies = [ 334 | "autocfg", 335 | "hashbrown", 336 | ] 337 | 338 | [[package]] 339 | name = "instant" 340 | version = "0.1.12" 341 | source = "registry+https://github.com/rust-lang/crates.io-index" 342 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 343 | dependencies = [ 344 | "cfg-if", 345 | ] 346 | 347 | [[package]] 348 | name = "io-lifetimes" 349 | version = "1.0.11" 350 | source = "registry+https://github.com/rust-lang/crates.io-index" 351 | checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" 352 | dependencies = [ 353 | "hermit-abi", 354 | "libc", 355 | "windows-sys", 356 | ] 357 | 358 | [[package]] 359 | name = "ipnet" 360 | version = "2.8.0" 361 | source = "registry+https://github.com/rust-lang/crates.io-index" 362 | checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" 363 | 364 | [[package]] 365 | name = "itoa" 366 | version = "1.0.8" 367 | source = "registry+https://github.com/rust-lang/crates.io-index" 368 | checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" 369 | 370 | [[package]] 371 | name = "js-sys" 372 | version = "0.3.64" 373 | source = "registry+https://github.com/rust-lang/crates.io-index" 374 | checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" 375 | dependencies = [ 376 | "wasm-bindgen", 377 | ] 378 | 379 | [[package]] 380 | name = "lazy_static" 381 | version = "1.4.0" 382 | source = "registry+https://github.com/rust-lang/crates.io-index" 383 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 384 | 385 | [[package]] 386 | name = "libc" 387 | version = "0.2.149" 388 | source = "registry+https://github.com/rust-lang/crates.io-index" 389 | checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" 390 | 391 | [[package]] 392 | name = "linux-raw-sys" 393 | version = "0.3.8" 394 | source = "registry+https://github.com/rust-lang/crates.io-index" 395 | checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" 396 | 397 | [[package]] 398 | name = "lock_api" 399 | version = "0.4.10" 400 | source = "registry+https://github.com/rust-lang/crates.io-index" 401 | checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" 402 | dependencies = [ 403 | "autocfg", 404 | "scopeguard", 405 | ] 406 | 407 | [[package]] 408 | name = "log" 409 | version = "0.4.19" 410 | source = "registry+https://github.com/rust-lang/crates.io-index" 411 | checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" 412 | 413 | [[package]] 414 | name = "memchr" 415 | version = "2.6.4" 416 | source = "registry+https://github.com/rust-lang/crates.io-index" 417 | checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" 418 | 419 | [[package]] 420 | name = "mime" 421 | version = "0.3.17" 422 | source = "registry+https://github.com/rust-lang/crates.io-index" 423 | checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 424 | 425 | [[package]] 426 | name = "miniz_oxide" 427 | version = "0.7.1" 428 | source = "registry+https://github.com/rust-lang/crates.io-index" 429 | checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" 430 | dependencies = [ 431 | "adler", 432 | ] 433 | 434 | [[package]] 435 | name = "mio" 436 | version = "0.8.8" 437 | source = "registry+https://github.com/rust-lang/crates.io-index" 438 | checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" 439 | dependencies = [ 440 | "libc", 441 | "wasi", 442 | "windows-sys", 443 | ] 444 | 445 | [[package]] 446 | name = "native-tls" 447 | version = "0.2.11" 448 | source = "registry+https://github.com/rust-lang/crates.io-index" 449 | checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" 450 | dependencies = [ 451 | "lazy_static", 452 | "libc", 453 | "log", 454 | "openssl", 455 | "openssl-probe", 456 | "openssl-sys", 457 | "schannel", 458 | "security-framework", 459 | "security-framework-sys", 460 | "tempfile", 461 | ] 462 | 463 | [[package]] 464 | name = "num_cpus" 465 | version = "1.16.0" 466 | source = "registry+https://github.com/rust-lang/crates.io-index" 467 | checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" 468 | dependencies = [ 469 | "hermit-abi", 470 | "libc", 471 | ] 472 | 473 | [[package]] 474 | name = "object" 475 | version = "0.31.1" 476 | source = "registry+https://github.com/rust-lang/crates.io-index" 477 | checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" 478 | dependencies = [ 479 | "memchr", 480 | ] 481 | 482 | [[package]] 483 | name = "once_cell" 484 | version = "1.18.0" 485 | source = "registry+https://github.com/rust-lang/crates.io-index" 486 | checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" 487 | 488 | [[package]] 489 | name = "openssl" 490 | version = "0.10.55" 491 | source = "registry+https://github.com/rust-lang/crates.io-index" 492 | checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" 493 | dependencies = [ 494 | "bitflags", 495 | "cfg-if", 496 | "foreign-types", 497 | "libc", 498 | "once_cell", 499 | "openssl-macros", 500 | "openssl-sys", 501 | ] 502 | 503 | [[package]] 504 | name = "openssl-macros" 505 | version = "0.1.1" 506 | source = "registry+https://github.com/rust-lang/crates.io-index" 507 | checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" 508 | dependencies = [ 509 | "proc-macro2", 510 | "quote", 511 | "syn", 512 | ] 513 | 514 | [[package]] 515 | name = "openssl-probe" 516 | version = "0.1.5" 517 | source = "registry+https://github.com/rust-lang/crates.io-index" 518 | checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" 519 | 520 | [[package]] 521 | name = "openssl-sys" 522 | version = "0.9.90" 523 | source = "registry+https://github.com/rust-lang/crates.io-index" 524 | checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" 525 | dependencies = [ 526 | "cc", 527 | "libc", 528 | "pkg-config", 529 | "vcpkg", 530 | ] 531 | 532 | [[package]] 533 | name = "parking_lot" 534 | version = "0.12.1" 535 | source = "registry+https://github.com/rust-lang/crates.io-index" 536 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 537 | dependencies = [ 538 | "lock_api", 539 | "parking_lot_core", 540 | ] 541 | 542 | [[package]] 543 | name = "parking_lot_core" 544 | version = "0.9.8" 545 | source = "registry+https://github.com/rust-lang/crates.io-index" 546 | checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" 547 | dependencies = [ 548 | "cfg-if", 549 | "libc", 550 | "redox_syscall", 551 | "smallvec", 552 | "windows-targets", 553 | ] 554 | 555 | [[package]] 556 | name = "percent-encoding" 557 | version = "2.3.0" 558 | source = "registry+https://github.com/rust-lang/crates.io-index" 559 | checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" 560 | 561 | [[package]] 562 | name = "pin-project-lite" 563 | version = "0.2.13" 564 | source = "registry+https://github.com/rust-lang/crates.io-index" 565 | checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" 566 | 567 | [[package]] 568 | name = "pin-utils" 569 | version = "0.1.0" 570 | source = "registry+https://github.com/rust-lang/crates.io-index" 571 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 572 | 573 | [[package]] 574 | name = "pkg-config" 575 | version = "0.3.27" 576 | source = "registry+https://github.com/rust-lang/crates.io-index" 577 | checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" 578 | 579 | [[package]] 580 | name = "proc-macro2" 581 | version = "1.0.63" 582 | source = "registry+https://github.com/rust-lang/crates.io-index" 583 | checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" 584 | dependencies = [ 585 | "unicode-ident", 586 | ] 587 | 588 | [[package]] 589 | name = "quote" 590 | version = "1.0.29" 591 | source = "registry+https://github.com/rust-lang/crates.io-index" 592 | checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" 593 | dependencies = [ 594 | "proc-macro2", 595 | ] 596 | 597 | [[package]] 598 | name = "redox_syscall" 599 | version = "0.3.5" 600 | source = "registry+https://github.com/rust-lang/crates.io-index" 601 | checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" 602 | dependencies = [ 603 | "bitflags", 604 | ] 605 | 606 | [[package]] 607 | name = "regex" 608 | version = "1.10.2" 609 | source = "registry+https://github.com/rust-lang/crates.io-index" 610 | checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" 611 | dependencies = [ 612 | "aho-corasick", 613 | "memchr", 614 | "regex-automata", 615 | "regex-syntax", 616 | ] 617 | 618 | [[package]] 619 | name = "regex-automata" 620 | version = "0.4.3" 621 | source = "registry+https://github.com/rust-lang/crates.io-index" 622 | checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" 623 | dependencies = [ 624 | "aho-corasick", 625 | "memchr", 626 | "regex-syntax", 627 | ] 628 | 629 | [[package]] 630 | name = "regex-syntax" 631 | version = "0.8.2" 632 | source = "registry+https://github.com/rust-lang/crates.io-index" 633 | checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" 634 | 635 | [[package]] 636 | name = "reqwest" 637 | version = "0.11.18" 638 | source = "registry+https://github.com/rust-lang/crates.io-index" 639 | checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" 640 | dependencies = [ 641 | "base64", 642 | "bytes", 643 | "encoding_rs", 644 | "futures-core", 645 | "futures-util", 646 | "h2", 647 | "http", 648 | "http-body", 649 | "hyper", 650 | "hyper-tls", 651 | "ipnet", 652 | "js-sys", 653 | "log", 654 | "mime", 655 | "native-tls", 656 | "once_cell", 657 | "percent-encoding", 658 | "pin-project-lite", 659 | "serde", 660 | "serde_json", 661 | "serde_urlencoded", 662 | "tokio", 663 | "tokio-native-tls", 664 | "tower-service", 665 | "url", 666 | "wasm-bindgen", 667 | "wasm-bindgen-futures", 668 | "web-sys", 669 | "winreg", 670 | ] 671 | 672 | [[package]] 673 | name = "rustc-demangle" 674 | version = "0.1.23" 675 | source = "registry+https://github.com/rust-lang/crates.io-index" 676 | checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" 677 | 678 | [[package]] 679 | name = "rustix" 680 | version = "0.37.23" 681 | source = "registry+https://github.com/rust-lang/crates.io-index" 682 | checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" 683 | dependencies = [ 684 | "bitflags", 685 | "errno", 686 | "io-lifetimes", 687 | "libc", 688 | "linux-raw-sys", 689 | "windows-sys", 690 | ] 691 | 692 | [[package]] 693 | name = "ryu" 694 | version = "1.0.14" 695 | source = "registry+https://github.com/rust-lang/crates.io-index" 696 | checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" 697 | 698 | [[package]] 699 | name = "schannel" 700 | version = "0.1.22" 701 | source = "registry+https://github.com/rust-lang/crates.io-index" 702 | checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" 703 | dependencies = [ 704 | "windows-sys", 705 | ] 706 | 707 | [[package]] 708 | name = "scopeguard" 709 | version = "1.1.0" 710 | source = "registry+https://github.com/rust-lang/crates.io-index" 711 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 712 | 713 | [[package]] 714 | name = "security-framework" 715 | version = "2.9.1" 716 | source = "registry+https://github.com/rust-lang/crates.io-index" 717 | checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" 718 | dependencies = [ 719 | "bitflags", 720 | "core-foundation", 721 | "core-foundation-sys", 722 | "libc", 723 | "security-framework-sys", 724 | ] 725 | 726 | [[package]] 727 | name = "security-framework-sys" 728 | version = "2.9.0" 729 | source = "registry+https://github.com/rust-lang/crates.io-index" 730 | checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" 731 | dependencies = [ 732 | "core-foundation-sys", 733 | "libc", 734 | ] 735 | 736 | [[package]] 737 | name = "serde" 738 | version = "1.0.166" 739 | source = "registry+https://github.com/rust-lang/crates.io-index" 740 | checksum = "d01b7404f9d441d3ad40e6a636a7782c377d2abdbe4fa2440e2edcc2f4f10db8" 741 | dependencies = [ 742 | "serde_derive", 743 | ] 744 | 745 | [[package]] 746 | name = "serde_derive" 747 | version = "1.0.166" 748 | source = "registry+https://github.com/rust-lang/crates.io-index" 749 | checksum = "5dd83d6dde2b6b2d466e14d9d1acce8816dedee94f735eac6395808b3483c6d6" 750 | dependencies = [ 751 | "proc-macro2", 752 | "quote", 753 | "syn", 754 | ] 755 | 756 | [[package]] 757 | name = "serde_json" 758 | version = "1.0.100" 759 | source = "registry+https://github.com/rust-lang/crates.io-index" 760 | checksum = "0f1e14e89be7aa4c4b78bdbdc9eb5bf8517829a600ae8eaa39a6e1d960b5185c" 761 | dependencies = [ 762 | "itoa", 763 | "ryu", 764 | "serde", 765 | ] 766 | 767 | [[package]] 768 | name = "serde_urlencoded" 769 | version = "0.7.1" 770 | source = "registry+https://github.com/rust-lang/crates.io-index" 771 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 772 | dependencies = [ 773 | "form_urlencoded", 774 | "itoa", 775 | "ryu", 776 | "serde", 777 | ] 778 | 779 | [[package]] 780 | name = "signal-hook-registry" 781 | version = "1.4.1" 782 | source = "registry+https://github.com/rust-lang/crates.io-index" 783 | checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" 784 | dependencies = [ 785 | "libc", 786 | ] 787 | 788 | [[package]] 789 | name = "slab" 790 | version = "0.4.8" 791 | source = "registry+https://github.com/rust-lang/crates.io-index" 792 | checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" 793 | dependencies = [ 794 | "autocfg", 795 | ] 796 | 797 | [[package]] 798 | name = "smallvec" 799 | version = "1.11.0" 800 | source = "registry+https://github.com/rust-lang/crates.io-index" 801 | checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" 802 | 803 | [[package]] 804 | name = "socket2" 805 | version = "0.4.9" 806 | source = "registry+https://github.com/rust-lang/crates.io-index" 807 | checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" 808 | dependencies = [ 809 | "libc", 810 | "winapi", 811 | ] 812 | 813 | [[package]] 814 | name = "socket2" 815 | version = "0.5.5" 816 | source = "registry+https://github.com/rust-lang/crates.io-index" 817 | checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" 818 | dependencies = [ 819 | "libc", 820 | "windows-sys", 821 | ] 822 | 823 | [[package]] 824 | name = "syn" 825 | version = "2.0.23" 826 | source = "registry+https://github.com/rust-lang/crates.io-index" 827 | checksum = "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737" 828 | dependencies = [ 829 | "proc-macro2", 830 | "quote", 831 | "unicode-ident", 832 | ] 833 | 834 | [[package]] 835 | name = "tempfile" 836 | version = "3.6.0" 837 | source = "registry+https://github.com/rust-lang/crates.io-index" 838 | checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" 839 | dependencies = [ 840 | "autocfg", 841 | "cfg-if", 842 | "fastrand", 843 | "redox_syscall", 844 | "rustix", 845 | "windows-sys", 846 | ] 847 | 848 | [[package]] 849 | name = "tinyvec" 850 | version = "1.6.0" 851 | source = "registry+https://github.com/rust-lang/crates.io-index" 852 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 853 | dependencies = [ 854 | "tinyvec_macros", 855 | ] 856 | 857 | [[package]] 858 | name = "tinyvec_macros" 859 | version = "0.1.1" 860 | source = "registry+https://github.com/rust-lang/crates.io-index" 861 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 862 | 863 | [[package]] 864 | name = "tokio" 865 | version = "1.33.0" 866 | source = "registry+https://github.com/rust-lang/crates.io-index" 867 | checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" 868 | dependencies = [ 869 | "backtrace", 870 | "bytes", 871 | "libc", 872 | "mio", 873 | "num_cpus", 874 | "parking_lot", 875 | "pin-project-lite", 876 | "signal-hook-registry", 877 | "socket2 0.5.5", 878 | "tokio-macros", 879 | "windows-sys", 880 | ] 881 | 882 | [[package]] 883 | name = "tokio-macros" 884 | version = "2.1.0" 885 | source = "registry+https://github.com/rust-lang/crates.io-index" 886 | checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" 887 | dependencies = [ 888 | "proc-macro2", 889 | "quote", 890 | "syn", 891 | ] 892 | 893 | [[package]] 894 | name = "tokio-native-tls" 895 | version = "0.3.1" 896 | source = "registry+https://github.com/rust-lang/crates.io-index" 897 | checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" 898 | dependencies = [ 899 | "native-tls", 900 | "tokio", 901 | ] 902 | 903 | [[package]] 904 | name = "tokio-util" 905 | version = "0.7.8" 906 | source = "registry+https://github.com/rust-lang/crates.io-index" 907 | checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" 908 | dependencies = [ 909 | "bytes", 910 | "futures-core", 911 | "futures-sink", 912 | "pin-project-lite", 913 | "tokio", 914 | "tracing", 915 | ] 916 | 917 | [[package]] 918 | name = "tower-service" 919 | version = "0.3.2" 920 | source = "registry+https://github.com/rust-lang/crates.io-index" 921 | checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" 922 | 923 | [[package]] 924 | name = "tracing" 925 | version = "0.1.37" 926 | source = "registry+https://github.com/rust-lang/crates.io-index" 927 | checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" 928 | dependencies = [ 929 | "cfg-if", 930 | "pin-project-lite", 931 | "tracing-core", 932 | ] 933 | 934 | [[package]] 935 | name = "tracing-core" 936 | version = "0.1.31" 937 | source = "registry+https://github.com/rust-lang/crates.io-index" 938 | checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" 939 | dependencies = [ 940 | "once_cell", 941 | ] 942 | 943 | [[package]] 944 | name = "try-lock" 945 | version = "0.2.4" 946 | source = "registry+https://github.com/rust-lang/crates.io-index" 947 | checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" 948 | 949 | [[package]] 950 | name = "unicode-bidi" 951 | version = "0.3.13" 952 | source = "registry+https://github.com/rust-lang/crates.io-index" 953 | checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" 954 | 955 | [[package]] 956 | name = "unicode-ident" 957 | version = "1.0.10" 958 | source = "registry+https://github.com/rust-lang/crates.io-index" 959 | checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" 960 | 961 | [[package]] 962 | name = "unicode-normalization" 963 | version = "0.1.22" 964 | source = "registry+https://github.com/rust-lang/crates.io-index" 965 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 966 | dependencies = [ 967 | "tinyvec", 968 | ] 969 | 970 | [[package]] 971 | name = "updater" 972 | version = "0.0.0" 973 | dependencies = [ 974 | "regex", 975 | "reqwest", 976 | "serde", 977 | "serde_json", 978 | "tokio", 979 | ] 980 | 981 | [[package]] 982 | name = "url" 983 | version = "2.4.0" 984 | source = "registry+https://github.com/rust-lang/crates.io-index" 985 | checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" 986 | dependencies = [ 987 | "form_urlencoded", 988 | "idna", 989 | "percent-encoding", 990 | ] 991 | 992 | [[package]] 993 | name = "vcpkg" 994 | version = "0.2.15" 995 | source = "registry+https://github.com/rust-lang/crates.io-index" 996 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 997 | 998 | [[package]] 999 | name = "want" 1000 | version = "0.3.1" 1001 | source = "registry+https://github.com/rust-lang/crates.io-index" 1002 | checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" 1003 | dependencies = [ 1004 | "try-lock", 1005 | ] 1006 | 1007 | [[package]] 1008 | name = "wasi" 1009 | version = "0.11.0+wasi-snapshot-preview1" 1010 | source = "registry+https://github.com/rust-lang/crates.io-index" 1011 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1012 | 1013 | [[package]] 1014 | name = "wasm-bindgen" 1015 | version = "0.2.87" 1016 | source = "registry+https://github.com/rust-lang/crates.io-index" 1017 | checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" 1018 | dependencies = [ 1019 | "cfg-if", 1020 | "wasm-bindgen-macro", 1021 | ] 1022 | 1023 | [[package]] 1024 | name = "wasm-bindgen-backend" 1025 | version = "0.2.87" 1026 | source = "registry+https://github.com/rust-lang/crates.io-index" 1027 | checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" 1028 | dependencies = [ 1029 | "bumpalo", 1030 | "log", 1031 | "once_cell", 1032 | "proc-macro2", 1033 | "quote", 1034 | "syn", 1035 | "wasm-bindgen-shared", 1036 | ] 1037 | 1038 | [[package]] 1039 | name = "wasm-bindgen-futures" 1040 | version = "0.4.37" 1041 | source = "registry+https://github.com/rust-lang/crates.io-index" 1042 | checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" 1043 | dependencies = [ 1044 | "cfg-if", 1045 | "js-sys", 1046 | "wasm-bindgen", 1047 | "web-sys", 1048 | ] 1049 | 1050 | [[package]] 1051 | name = "wasm-bindgen-macro" 1052 | version = "0.2.87" 1053 | source = "registry+https://github.com/rust-lang/crates.io-index" 1054 | checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" 1055 | dependencies = [ 1056 | "quote", 1057 | "wasm-bindgen-macro-support", 1058 | ] 1059 | 1060 | [[package]] 1061 | name = "wasm-bindgen-macro-support" 1062 | version = "0.2.87" 1063 | source = "registry+https://github.com/rust-lang/crates.io-index" 1064 | checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" 1065 | dependencies = [ 1066 | "proc-macro2", 1067 | "quote", 1068 | "syn", 1069 | "wasm-bindgen-backend", 1070 | "wasm-bindgen-shared", 1071 | ] 1072 | 1073 | [[package]] 1074 | name = "wasm-bindgen-shared" 1075 | version = "0.2.87" 1076 | source = "registry+https://github.com/rust-lang/crates.io-index" 1077 | checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" 1078 | 1079 | [[package]] 1080 | name = "web-sys" 1081 | version = "0.3.64" 1082 | source = "registry+https://github.com/rust-lang/crates.io-index" 1083 | checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" 1084 | dependencies = [ 1085 | "js-sys", 1086 | "wasm-bindgen", 1087 | ] 1088 | 1089 | [[package]] 1090 | name = "winapi" 1091 | version = "0.3.9" 1092 | source = "registry+https://github.com/rust-lang/crates.io-index" 1093 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1094 | dependencies = [ 1095 | "winapi-i686-pc-windows-gnu", 1096 | "winapi-x86_64-pc-windows-gnu", 1097 | ] 1098 | 1099 | [[package]] 1100 | name = "winapi-i686-pc-windows-gnu" 1101 | version = "0.4.0" 1102 | source = "registry+https://github.com/rust-lang/crates.io-index" 1103 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1104 | 1105 | [[package]] 1106 | name = "winapi-x86_64-pc-windows-gnu" 1107 | version = "0.4.0" 1108 | source = "registry+https://github.com/rust-lang/crates.io-index" 1109 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1110 | 1111 | [[package]] 1112 | name = "windows-sys" 1113 | version = "0.48.0" 1114 | source = "registry+https://github.com/rust-lang/crates.io-index" 1115 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 1116 | dependencies = [ 1117 | "windows-targets", 1118 | ] 1119 | 1120 | [[package]] 1121 | name = "windows-targets" 1122 | version = "0.48.1" 1123 | source = "registry+https://github.com/rust-lang/crates.io-index" 1124 | checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" 1125 | dependencies = [ 1126 | "windows_aarch64_gnullvm", 1127 | "windows_aarch64_msvc", 1128 | "windows_i686_gnu", 1129 | "windows_i686_msvc", 1130 | "windows_x86_64_gnu", 1131 | "windows_x86_64_gnullvm", 1132 | "windows_x86_64_msvc", 1133 | ] 1134 | 1135 | [[package]] 1136 | name = "windows_aarch64_gnullvm" 1137 | version = "0.48.0" 1138 | source = "registry+https://github.com/rust-lang/crates.io-index" 1139 | checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" 1140 | 1141 | [[package]] 1142 | name = "windows_aarch64_msvc" 1143 | version = "0.48.0" 1144 | source = "registry+https://github.com/rust-lang/crates.io-index" 1145 | checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" 1146 | 1147 | [[package]] 1148 | name = "windows_i686_gnu" 1149 | version = "0.48.0" 1150 | source = "registry+https://github.com/rust-lang/crates.io-index" 1151 | checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" 1152 | 1153 | [[package]] 1154 | name = "windows_i686_msvc" 1155 | version = "0.48.0" 1156 | source = "registry+https://github.com/rust-lang/crates.io-index" 1157 | checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" 1158 | 1159 | [[package]] 1160 | name = "windows_x86_64_gnu" 1161 | version = "0.48.0" 1162 | source = "registry+https://github.com/rust-lang/crates.io-index" 1163 | checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" 1164 | 1165 | [[package]] 1166 | name = "windows_x86_64_gnullvm" 1167 | version = "0.48.0" 1168 | source = "registry+https://github.com/rust-lang/crates.io-index" 1169 | checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" 1170 | 1171 | [[package]] 1172 | name = "windows_x86_64_msvc" 1173 | version = "0.48.0" 1174 | source = "registry+https://github.com/rust-lang/crates.io-index" 1175 | checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" 1176 | 1177 | [[package]] 1178 | name = "winreg" 1179 | version = "0.10.1" 1180 | source = "registry+https://github.com/rust-lang/crates.io-index" 1181 | checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" 1182 | dependencies = [ 1183 | "winapi", 1184 | ] 1185 | --------------------------------------------------------------------------------