macvim-dev / macvim-dev/macvim
Get the current window's screen info
Personne n'a encore pris cette issue.
- Langage dominant
- Vim Script
- Étoiles
- 7.9k
- Forks
- 691
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Aucun fichier ni test n’est nommé. Commencez par localiser l’intégration des fenêtres et des écrans de MacVim, puis examinez comment les fonctions de Vim et les événements de fenêtre sont exposés ; l’implémentation devrait inclure un moyen appelable de récupérer les détails de l’écran de la fenêtre actuelle et, si possible, une notification lorsque son écran change.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- macos, vim
- Domaine
- desktop
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100