{"id":13563555,"url":"https://github.com/xzhih/one-key-hidpi","last_synced_at":"2025-05-14T00:07:33.461Z","repository":{"id":37470700,"uuid":"127782653","full_name":"xzhih/one-key-hidpi","owner":"xzhih","description":"Enable macOS HiDPI and have a native setting.","archived":false,"fork":false,"pushed_at":"2025-04-05T17:37:24.000Z","size":3604,"stargazers_count":9556,"open_issues_count":88,"forks_count":1048,"subscribers_count":97,"default_branch":"master","last_synced_at":"2025-04-09T02:11:12.112Z","etag":null,"topics":["hidpi","macos-hidpi"],"latest_commit_sha":null,"homepage":"https://zhih.me/one-key-hidpi/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xzhih.png","metadata":{"files":{"readme":"README-zh.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-04-02T16:30:45.000Z","updated_at":"2025-04-09T01:43:38.000Z","dependencies_parsed_at":"2024-03-25T08:52:42.870Z","dependency_job_id":"3b1ad4cb-7f07-4b87-9382-fb3350d4e8ba","html_url":"https://github.com/xzhih/one-key-hidpi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xzhih%2Fone-key-hidpi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xzhih%2Fone-key-hidpi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xzhih%2Fone-key-hidpi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xzhih%2Fone-key-hidpi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xzhih","download_url":"https://codeload.github.com/xzhih/one-key-hidpi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254043791,"owners_count":22005017,"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":["hidpi","macos-hidpi"],"created_at":"2024-08-01T13:01:20.568Z","updated_at":"2025-05-14T00:07:33.444Z","avatar_url":"https://github.com/xzhih.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# 一键开启 macOS HiDPI\n\n## 说明\n\n[English](README.md) | [中文](README-zh.md)\n\n 此脚本的目的是为中低分辨率的屏幕开启 HiDPI 选项，并且具有原生的 HiDPI 设置，不需要 RDM 软件即可在系统显示器设置中设置\n\nmacOS 的 DPI 机制和 Windows 下不一样，比如 1080p 的屏幕在 Windows 下有 125%、150% 这样的缩放选项，而同样的屏幕在 macOS 下，缩放选项里只是单纯的调节分辨率，这就使得在默认分辨率下字体和UI看起来很小，降低分辨率又显得模糊\n\n同时，此脚本也可以通过注入修补后的 EDID 修复闪屏，或者睡眠唤醒后的闪屏问题，当然这个修复因人而异\n\n开机的第二阶段 logo 总是会稍微放大，因为分辨率是仿冒的\n\n设置：\n\n![设置](./img/preferences.jpg)\n\n![设置](./img/hidpi.gif)\n\n## 使用方法\n\n1.远程模式: 在终端输入以下命令回车即可\n\n```bash\nbash -c \"$(curl -fsSL https://raw.githubusercontent.com/xzhih/one-key-hidpi/master/hidpi.sh)\"\n```\n\n2.本地模式: 下载项目解压,双击 `hidpi.command` 运行\n\n![运行](./img/run-zh.jpg)\n\n## 恢复\n\n### 命令恢复\n\n如果还能进系统，就再次运行命令选择选项 3 关闭 HIDPI。\n\n### 恢复模式\n\n如果使用此脚本后，开机无法进入系统，请到 macos 恢复模式，打开终端\n\n这里有两种方式进行关闭，建议选第一种\n\n1. 快捷恢复\n    \n\n```bash\nls /Volumes/\n```\n\n你会看到你的系统盘\n\n```bash\ncd /Volumes/你的系统盘/Users/\n\nls\n```\n\n你可以看到所有用户的家目录\n\n```bash\ncd 你的用户名\n\n./.hidpi-disable\n```\n\n2. 手动恢复\n\n使用终端删除 `Library/Displays/Contents/Resources/Overrides` 下删除所有通过外部注入的显示器配置文件夹\n\n具体命令如下：\n\n```bash\nls /Volumes/\nrm -rf /Volumes/你的系统盘/Library/Displays/Contents/Resources/Overrides\n```\n\n## 从以下得到启发\n\nhttps://www.tonymacx86.com/threads/solved-black-screen-with-gtx-1070-lg-ultrafine-5k-sierra-10-12-4.219872/page-4#post-1644805\n\nhttps://github.com/syscl/Enable-HiDPI-OSX\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxzhih%2Fone-key-hidpi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxzhih%2Fone-key-hidpi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxzhih%2Fone-key-hidpi/lists"}