How do I set the size of Emacs' window?

前端 未结 10 1452
陌清茗
陌清茗 2020-12-04 06:19

I\'m trying to detect the size of the screen I\'m starting emacs on, and adjust the size and position the window it is starting in (I guess that\'s the frame in emacs-speak)

10条回答
  •  南方客
    南方客 (楼主)
    2020-12-04 06:42

    On ubuntu do:

    (defun toggle-fullscreen ()
      (interactive)
      (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
                     '(2 "_NET_WM_STATE_MAXIMIZED_VERT" 0))
      (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
                     '(2 "_NET_WM_STATE_MAXIMIZED_HORZ" 0))
    )
    (toggle-fullscreen)
    

提交回复
热议问题