macvim-dev / macvim-dev/macvim
Get the current window's screen info
まだ誰も着手していません。
- 主要言語
- Vim Script
- スター
- 7.9k
- フォーク
- 691
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Is your feature request about something that is currently impossible or hard to do? Please describe the problem.
Background: I have multiple machines and two screens on one of them. On my main machine, on the secondary screen where I usually run MacVim, I have my font to :h16, but I need it at :h12 (or so) on my main laptop screen (or on my secondary machine where there is no secondary screen).
Describe the solution you'd like
I would like to be able to have a function in MacVim return the current window's screen information—screen width / height in pixels, screen name, other details; similar to the output of system_profiler SPDisplaysDataType:
Graphics/Displays:
Apple M4 Pro:
Chipset Model: Apple M4 Pro
Type: GPU
Bus: Built-In
Total Number of Cores: 16
Vendor: Apple (0x106b)
Metal Support: Metal 3
Displays:
Color LCD:
Display Type: Built-in Liquid Retina XDR Display
Resolution: 3024 x 1964 Retina
Main Display: Yes
Mirror: Off
Online: Yes
Automatically Adjust Brightness: Yes
Connection Type: Internal
If possible, it would be nice to have an event (WindowScreenChanged or something like that) which could be used to trigger when the window has been moved to a different screen or the screen has been resized or something.
Describe alternatives you've considered
I don't think that there are alternatives which let me know which screen the current window is on, even if some of this could be executed via osascript.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ファイルやテストは指定されていません。まず MacVim のウィンドウと画面の統合箇所を見つけ、次に Vim の関数とウィンドウイベントがどのように公開されているかを確認してください。実装には、現在のウィンドウの画面の詳細を取得できる呼び出し可能な手段を含め、可能であれば画面が変わったときの通知も含める必要があります。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- macos, vim
- 領域
- desktop
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100