How to maximize Emacs on Windows at startup?

后端 未结 15 1272
天命终不由人
天命终不由人 2020-12-13 03:45

This is driving me crazy: I simply want Emacs to maximize to whatever screen resolution I have at startup. Ideally I like a cross-platform (Windows & Linux) solution tha

15条回答
  •  我在风中等你
    2020-12-13 04:18

    On X.org the system call is (since you asked originally for a cross-platform solution):

    (defun x11-maximize-frame ()
      "Maximize the current frame (to full screen)"
      (interactive)
      (x-send-client-message nil 0 nil "_NET_WM_STATE" 32 '(2 "_NET_WM_STATE_MAXIMIZED_HORZ" 0))
      (x-send-client-message nil 0 nil "_NET_WM_STATE" 32 '(2 "_NET_WM_STATE_MAXIMIZED_VERT" 0)))
    

提交回复
热议问题