{"id":24407336,"url":"https://github.com/liaoyanqing666/time_floating_window","last_synced_at":"2025-04-23T04:37:20.614Z","repository":{"id":272690956,"uuid":"915356214","full_name":"liaoyanqing666/Time_Floating_Window","owner":"liaoyanqing666","description":"Windows上的时间悬浮窗, Time floating window on Windows","archived":false,"fork":false,"pushed_at":"2025-02-08T08:29:02.000Z","size":5886,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T22:11:18.079Z","etag":null,"topics":["app","application","exe","executable","pyinstaller","python","software","software-engineering","time-windows","tkinter","windows","windows-10","windows-11"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liaoyanqing666.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-11T16:27:48.000Z","updated_at":"2025-03-18T00:19:39.000Z","dependencies_parsed_at":"2025-01-16T03:36:57.319Z","dependency_job_id":null,"html_url":"https://github.com/liaoyanqing666/Time_Floating_Window","commit_stats":null,"previous_names":["liaoyanqing666/time_floating_window"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liaoyanqing666%2FTime_Floating_Window","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liaoyanqing666%2FTime_Floating_Window/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liaoyanqing666%2FTime_Floating_Window/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liaoyanqing666%2FTime_Floating_Window/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liaoyanqing666","download_url":"https://codeload.github.com/liaoyanqing666/Time_Floating_Window/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250372599,"owners_count":21419719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["app","application","exe","executable","pyinstaller","python","software","software-engineering","time-windows","tkinter","windows","windows-10","windows-11"],"created_at":"2025-01-20T05:05:25.756Z","updated_at":"2025-04-23T04:37:20.576Z","avatar_url":"https://github.com/liaoyanqing666.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Time_Floating_Window\nWindows上的时间悬浮窗, Time floating window on Windows\n\n使用Python，Tkinter和pyinstaller, made with Python, Tkinter, and pyinstaller\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"images/gif_1.gif\" alt=\"GIF\" width=\"200\"/\u003e\n\u003c/p\u003e\n\n**English Introduction:**\n\nWhen you need to grab tickets, coupons, watch movies, or just focus on work, you might need a simple floating clock to stay on top of things. This project was created to solve that problem. Windows doesn't natively support floating clocks, and setting up a clock that updates every second is pretty tricky, so that's how this project came to life. It's inspired by an app I often use on Android called \"Time Window.\"\n\nBelow, I'll give you a detailed overview of the app, with instructions in both **English** and **Chinese**. If you're just looking to use it, simply head to the right-hand side and click on **Releases** to download the latest version (exe). Settings can be opened by right-clicking.\n\n**Chinese Introduction:**\n\n当你需要抢票，抢券，看电影，或者需要专心工作时，你可能会需要一个简单的时间悬浮窗，这个项目就是为了解决这个问题而诞生的。而Windows并不支持原生时间悬浮窗，且设置秒级显示时间也很麻烦，因此这个项目就诞生了。此项目受到Android上我个人常用的“时间窗”APP的启示。\n\n下面，我将告诉你详细介绍这个应用程序，包括**英语**和**中文**说明。如果你只是想使用，只需要点击右侧**Releases**，下载最新版本（exe）即可（支持中文），注意可以右键打开设置。\n\n想要获得更加详细的中文介绍，可以的访问[*功能详解*](https://blog.csdn.net/m0_61718615/article/details/145261677)，和[*开发代码介绍*](https://blog.csdn.net/m0_61718615/article/details/145265002)。\n\n**Examples**:\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"images/img_1.png\" alt=\"Movie\" width=\"600\" /\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003eWatching a movie (left lower)\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"images/gif_2.gif\" alt=\"Movie\" width=\"600\" /\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003eMove and lock the window\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"images/img_2.png\" alt=\"Movie\" width=\"600\" /\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003eRemove the system time and use Time Window instead\u003c/p\u003e\n\n---\n\n## **Time Floating Window (English)**\n\n### **Features**\n- **Real-Time Display**: Shows the current time in seconds or milliseconds.\n- **Customizable Appearance**:\n  - Change the clock's background and text colors.\n  - Adjust the opacity.\n  - Choose your preferred font and font size.\n- **Resizable Window**: Dynamically adjust the clock's width and height.\n- **Lock and Unlock**: Move the clock freely when unlocked, or lock it in place.\n- **Set Delay**: Manually set the time increment or automatically sync with the network.\n- **Language Support**: Automatically detects system language and allows manual language switching. Now supports English and Chinese, and you are welcome to add more languages.\n- **Settings Persistence**: Automatically saves all settings (colors, position, size) to `TimeWindowSettings.json` and restores them on restart.\n- **Context Menu**: Right-click to access settings, lock/unlock, and quit options.\n- **First Launch**: Determine whether it is the first launch by reading whether there is a json file. When it is the first launch, it will ask if you need to add related shortcuts.\n- **Auto-Start**: Choose whether to start automatically when the computer starts.\n\n### Usage\n\n1. **Open Settings**:\n   - Right-click the floating clock and select \"Settings\" from the context menu.\n   - Adjust background color, text color, opacity, font size, and more.\n   - Changes are applied immediately and saved automatically.\n\n2. **Move and Lock**:\n   - Click the lock/unlock button (🔒/🔓) to toggle between movable and locked states.\n   - Drag the clock when unlocked to reposition it.\n\n3. **Close**:\n   - Click the X button or select \"Close\" from the context menu to exit.\n\n### Configuration File\n\nThe application saves all settings in a `TimeWindowSettings.json` file located in the same directory. Key settings include:\n- Language.\n- Colors (`bg_color`, `text_color`).\n- Window size and position (`width`, `height`, `last_position`).\n- Time precision (`seconds` or `milliseconds`).\n- Font settings (`font`, `font_size`).\n- Many more settings.\n\nOf course, you can delete this file to reset all settings to default.\n\n### Installation (Developer content)\n\n### Install (English)\n\nTo install and run the Time Floating Window, follow these steps:\n\n#### 1. Clone the repository\nFirst, clone this repository to your local machine using `git`:\n\n```bash\ngit clone https://github.com/liaoyanqing666/Time_Floating_Window.git\n```\n\n#### 2. Install dependencies\nThis project uses `Tkinter` (comes pre-installed with Python). If you are using simplified version of python without `Tkinter`, you can install it using:\n\n```bash\npip install python-tk\n```\n\n#### 3. Build with PyInstaller\nOnce all dependencies are installed, you can package the app as an executable for Windows using `PyInstaller`. To do this, run:\n\n```bash\npip install pyinstaller\n```\n\nThen, to create the executable, run:\n\n```bash\npyinstaller --onefile --noconsole --icon=images/icon.ico --name TimeWindow .\\Time_Floating_Window.py\n```\n\nHere are some common `PyInstaller` flags you might use:\n- `--onefile`: Optional. Package everything into a single executable file.\n- `--noconsole`: Prevent the console window from showing (useful for GUI-only apps).\n- `--icon`: Specify the icon for the application.\n- `--name`: Specify the name of the generated executable.\n\nThe executable (`.exe`) will be located in the `dist` folder.\n\n\n#### Feel free to fork this repository and make improvements. If you find bugs, want to add new language translation, or have ideas for new features, open an issue or submit a pull request.\n\n---\n\n## 时间悬浮窗 (Chinese)\n\n### 功能\n\n- **实时显示**：以1秒，100毫秒，10毫秒，1毫秒为单位显示当前时间。\n- **可自定义外观**：\n  - 更改时钟的背景和文字颜色。\n  - 调整透明度。\n  - 选择你喜欢的字体和字体大小。\n- **可调整窗口大小**：动态调整时钟的宽度和高度。\n- **锁定和解锁**：解锁时可以自由移动时钟，或者锁定位置。\n- **可设置延迟**：可以手动设置时间更改量，也可以通过网络同步自动设置。\n- **语言支持**：自动检测系统语言，并允许手动切换语言。现支持英语和中文，你也可以添加更多语言。\n- **设置持久化**：自动保存所有设置（颜色、位置、大小）到 `TimeWindowSettings.json` 文件，并在重启时恢复。\n- **右键菜单**：右键点击可访问设置、锁定/解锁和关闭选项。\n- **首次启动**：通过读取是否有json文件判断是否为首次启动。首次启动时，会询问是否需要添加相关快捷方式。\n- **自启动**：可以选择是否开机自启动。\n\n### 使用方法\n\n1. **打开设置**：\n   - 右键点击悬浮窗，选择右键菜单中的“设置”。\n   - 调整背景色、文字颜色、透明度、字体大小等设置。\n   - 设置会立即生效并自动保存。\n\n2. **移动和锁定**：\n   - 点击锁定/解锁按钮（🔒/🔓）切换时钟的可移动和锁定状态。\n   - 在解锁状态下，拖动时钟可以重新定位它。\n\n3. **关闭**：\n   - 点击右上角的 X 按钮，或在右键菜单中选择“关闭”来退出应用。\n\n### 配置文件\n\n该应用会将所有设置保存在 `TimeWindowSettings.json` 文件中，文件位置与应用程序相同。主要的设置包括：\n- 语言。\n- 颜色 (`bg_color`, `text_color`)。\n- 窗口大小和位置 (`width`, `height`, `last_position`)。\n- 时间精度（`seconds` 或 `milliseconds`）。\n- 字体设置（`font`, `font_size`）。\n- 其他设置。\n\n当然，你也可以删除该文件来重置所有设置为默认值。\n\n### 安装 (开发者内容)\n\n要安装并运行时间悬浮窗，按以下步骤进行：\n\n#### 1. 克隆代码库\n首先，使用 `git` 克隆这个仓库到本地：\n\n```bash\ngit clone https://github.com/liaoyanqing666/Time_Floating_Window.git\n```\n\n#### 2. **安装依赖**\n本项目使用了 `Tkinter`（Python自带）。如果你的Python版本不包含 `Tkinter`，你可以使用以下命令安装：\n\n```bash\npip install python-tk\n```\n\n#### 3. 使用PyInstaller打包\n安装好所有依赖后，你可以使用 `pyinstaller` 将应用打包成Windows可执行文件。首先安装 `pyinstaller`：\n\n```bash\npip install pyinstaller\n```\n\n然后，使用以下命令创建可执行文件：\n\n```bash\npyinstaller --onefile --noconsole --icon=images/icon.ico --name TimeWindow .\\Time_Floating_Window.py\n```\n\n`PyInstaller` 参数介绍：\n- `--onefile`：将所有文件打包成一个单独的可执行文件。\n- `--noconsole`：不显示控制台窗口（对于GUI应用很有用）。\n- `--icon`：指定应用程序图标。\n- `--name`：指定生成的可执行文件的名称。\n\n可执行文件（`.exe`）将位于 `dist` 文件夹内。\n\n#### 你可以随意fork这个存储库并进行改进。如果你发现了bug，想要添加新的语言翻译，或者对新功能有想法，请提issue或提交pull request。\n\n---\n\n#### If you have any questions or suggestions, feel free to contact my Email: *1793706453@qq.com*\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliaoyanqing666%2Ftime_floating_window","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliaoyanqing666%2Ftime_floating_window","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliaoyanqing666%2Ftime_floating_window/lists"}