12

maxframe.elを使用して Emacs フレームを最大化します。

私のデュアルヘッド Mac セットアップ (23 インチモニターを備えた Macbook Pro 15 インチラップトップ) を除いて、3 つの主要なプラットフォームすべてでうまく機能します。

Emacs フレームを最大化すると、フレームが拡張されて、両方のモニターの幅と大きい方のモニターの高さがいっぱいになります。

明らかに、フレームを最大化して、それがオンになっているモニターのみを埋めたいと思います。elisp を使用して 2 つの個別のモニターの解像度を検出するにはどうすればよいですか?

ありがとう、ジェイコブ

編集: Denis が指摘するように、 mf-max-width を設定することは合理的な回避策です。しかし、(私が言及すべきだったように) 私は、両方のモニターと任意の解像度で機能するソリューションを望んでいました. Windows固有のw32-send-sys-commandのスタイルでOSX固有のものかもしれません。

4

3 に答える 3

8

私はあなたが提供した参照をすばやくスキャンしましたが、あなたが私が使用しているのと同じ手法を使用しているとは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))))))
于 2008-09-19T14:27:40.867 に答える
4

`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."
于 2008-09-18T15:09:56.620 に答える
-2

この種のことは、emacs の仕事ではなく、ウィンドウ マネージャーの仕事です。(たとえば、Xmonad はフルスクリーンの emacs を問題なく処理します。)

于 2009-07-01T10:10:24.300 に答える