문제

나는 사용한다 maxframe.el 내 Emacs 프레임을 최대화합니다.

듀얼 헤드 Mac 설정(23인치 모니터가 장착된 Macbook Pro 15인치 노트북)을 제외하고 세 가지 주요 플랫폼 모두에서 훌륭하게 작동합니다.

Emacs 프레임을 최대화하면 프레임이 다음 너비를 채우기 위해 확장됩니다. 둘 다 모니터와 더 큰 모니터의 높이.

분명히, 프레임이 켜져 있는 모니터만 채우도록 프레임을 최대화하고 싶습니다.elisp를 사용하여 두 개의 개별 모니터의 해상도를 어떻게 감지할 수 있습니까?

감사합니다, 야곱

편집하다:Denis가 지적했듯이 mf-max-width를 설정하는 것이 합리적인 해결 방법입니다.그러나 (제가 언급했어야 했지만) 저는 두 모니터와 모든 해상도에서 작동하는 솔루션을 원했습니다.Windows 관련 w32-send-sys-command 스타일의 OSX 관련 것일 수도 있습니다.

도움이 되었습니까?

해결책

귀하가 제공한 참조 자료를 빠르게 스캔했습니다. maxframe.el 그리고 나는 생각하지 않는다 당신은 내가 사용하는 것과 동일한 기술을 사용하고 있다는 것입니다.다음 코드 조각이 도움이 됩니까?


(defun toggle-fullscreen ()
  "toggles whether the currently selected frame consumes the entire display or is decorated with a window border"
  (interactive)
  (let ((f (selected-frame)))
    (modify-frame-parameters f `((fullscreen . ,(if (eq nil (frame-parameter f 'fullscreen)) 'fullboth nil))))))

다른 팁

`mf-max-width' 사용자 정의가 작동합니까?해당 문서:

"*The maximum display width to support.  This helps better support the true
nature of display-pixel-width.  Since multiple monitors will result in a
very large display pixel width, this value is used to set the stop point for
maximizing the frame.  This could also be used to set a fixed frame size
without going over the display dimensions."

이런 종류의 일은 emacs의 일이 아니라 창 관리자의 일입니다.(예를 들어 Xmonad는 전체 화면 Emacs를 잘 처리합니다.)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top