Function: hycontrol-frame-resize-to-top

hycontrol-frame-resize-to-top is an interactive and byte-compiled function defined in hycontrol.el.

Signature

(hycontrol-frame-resize-to-top &optional ARG)

Documentation

Expand the selected frame to the top of the screen.

Allow for hycontrol-screen-*-offsets. If already at the top, adjust its height to ARG percent of the screen (50% by default if ARG is 1 or nil) but keep it at the top of the screen.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hycontrol.el
(defun hycontrol-frame-resize-to-top (&optional arg)
  "Expand the selected frame to the top of the screen.
Allow for hycontrol-screen-*-offsets.  If already at the top,
adjust its height to ARG percent of the screen (50% by default if
ARG is 1 or nil) but keep it at the top of the screen."
  (interactive "p")
  (setq arg (hycontrol-frame-resize-percentage arg))
  (let ((frame-resize-pixelwise t))
    (if (hycontrol-frame-at-top-p)
	;; Reduce frame height to ARG percent, keeping top side fixed.
	(set-frame-height nil (floor (* (frame-pixel-height) arg)) nil t)
      ;; Expand frame height all the way to the top, keeping bottom side fixed.
      (set-frame-height nil (- (+ (cdr (frame-position)) (hycontrol-frame-height)) hycontrol-screen-top-offset)
			nil t))
    (hycontrol-frame-to-top))
  (hycontrol-frame-resize-arg arg))