mirror of
https://github.com/tmux/tmux.git
synced 2024-11-05 10:28:48 +00:00
641191ab20
This adds two new options, window-size and default-size, and a new command, resize-window. The force-width and force-height options, and the session_width and session_height formats have been removed. The new window-size option tells tmux how to work out the size of windows: largest means it picks the size of the largest session, smallest the smallest session (similar to the old behaviour) and manual means that it does not automatically resize windows. aggressive-resize modifies the choice of session for largest and smallest as it did before. If a window is in a session attached to a client that is too small, only part of the window is shown. tmux attempts to keep the cursor visible, so the part of the window displayed is changed as the cursor moves (with a small delay, to try and avoid excess redrawing when applications redraw status lines or similar that are not currently visible). Drawing windows which are larger than the client is not as efficient as those which fit, particularly when the cursor moves, so it is recommended to avoid using this on slow machines or networks (set window-size to smallest or manual). The resize-window command can be used to resize a window manually. If it is used, the window-size option is automatically set to manual for the window (undo this with "setw -u window-size"). resize-window works in a similar way to resize-pane (-U -D -L -R -x -y flags) but also has -a and -A flags. -a sets the window to the size of the smallest client (what it would be if window-size was smallest) and -A the largest. For the same behaviour as force-width or force-height, use resize-width -x or -y. If the global window-size option is set to manual, the default-size option is used for new windows. If -x or -y is used with new-session, that sets the default-size option for the new session. The maximum size of a window is 10000x10000. But expect applications to complain and higher memory use if you make a window that big. The minimum size is the size required for the current layout including borders. This change allows some code improvements, most notably that since windows can now never be cropped, that code can be removed from the layout code, and since panes can now never be outside the size of the window, window_pane_visible can be removed.
204 lines
4.0 KiB
Makefile
204 lines
4.0 KiB
Makefile
# Makefile.am
|
|
|
|
# Obvious program stuff.
|
|
bin_PROGRAMS = tmux
|
|
CLEANFILES = tmux.1.mdoc tmux.1.man
|
|
|
|
# Distribution tarball options.
|
|
EXTRA_DIST = \
|
|
CHANGES README README.ja COPYING example_tmux.conf compat/*.[ch] \
|
|
osdep-*.c mdoc2man.awk tmux.1
|
|
|
|
# Preprocessor flags.
|
|
AM_CPPFLAGS += @XOPEN_DEFINES@ -DTMUX_CONF="\"$(sysconfdir)/tmux.conf\""
|
|
|
|
# Additional object files.
|
|
LDADD = $(LIBOBJS)
|
|
|
|
# Set flags for gcc.
|
|
if IS_GCC
|
|
AM_CFLAGS += -std=gnu99 -O2
|
|
if IS_DEBUG
|
|
AM_CFLAGS += -g
|
|
AM_CFLAGS += -Wno-long-long -Wall -W -Wformat=2
|
|
AM_CFLAGS += -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations
|
|
AM_CFLAGS += -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare
|
|
AM_CFLAGS += -Wundef -Wbad-function-cast -Winline -Wcast-align
|
|
AM_CFLAGS += -Wdeclaration-after-statement -Wno-pointer-sign -Wno-attributes
|
|
AM_CFLAGS += -Wno-unused-result
|
|
AM_CPPFLAGS += -DDEBUG
|
|
endif
|
|
AM_CPPFLAGS += -iquote.
|
|
endif
|
|
|
|
# Set flags for Solaris.
|
|
if IS_SUNOS
|
|
if IS_GCC
|
|
AM_CPPFLAGS += -D_XPG6
|
|
else
|
|
AM_CPPFLAGS += -D_XPG4_2
|
|
endif
|
|
endif
|
|
|
|
# Set flags for Sun CC.
|
|
if IS_SUNCC
|
|
AM_CFLAGS += -erroff=E_EMPTY_DECLARATION
|
|
endif
|
|
|
|
# Set _LINUX_SOURCE_COMPAT for AIX for malloc(0).
|
|
if IS_AIX
|
|
AM_CPPFLAGS += -D_LINUX_SOURCE_COMPAT=1
|
|
endif
|
|
|
|
# Set flags for NetBSD.
|
|
if IS_NETBSD
|
|
AM_CPPFLAGS += -D_OPENBSD_SOURCE
|
|
endif
|
|
|
|
# List of sources.
|
|
dist_tmux_SOURCES = \
|
|
alerts.c \
|
|
arguments.c \
|
|
attributes.c \
|
|
cfg.c \
|
|
client.c \
|
|
cmd-attach-session.c \
|
|
cmd-bind-key.c \
|
|
cmd-break-pane.c \
|
|
cmd-capture-pane.c \
|
|
cmd-choose-tree.c \
|
|
cmd-command-prompt.c \
|
|
cmd-confirm-before.c \
|
|
cmd-copy-mode.c \
|
|
cmd-detach-client.c \
|
|
cmd-display-message.c \
|
|
cmd-display-panes.c \
|
|
cmd-find-window.c \
|
|
cmd-find.c \
|
|
cmd-if-shell.c \
|
|
cmd-join-pane.c \
|
|
cmd-kill-pane.c \
|
|
cmd-kill-server.c \
|
|
cmd-kill-session.c \
|
|
cmd-kill-window.c \
|
|
cmd-list-buffers.c \
|
|
cmd-list-clients.c \
|
|
cmd-list-keys.c \
|
|
cmd-list-panes.c \
|
|
cmd-list-sessions.c \
|
|
cmd-list-windows.c \
|
|
cmd-list.c \
|
|
cmd-load-buffer.c \
|
|
cmd-lock-server.c \
|
|
cmd-move-window.c \
|
|
cmd-new-session.c \
|
|
cmd-new-window.c \
|
|
cmd-paste-buffer.c \
|
|
cmd-pipe-pane.c \
|
|
cmd-queue.c \
|
|
cmd-refresh-client.c \
|
|
cmd-rename-session.c \
|
|
cmd-rename-window.c \
|
|
cmd-resize-pane.c \
|
|
cmd-resize-window.c \
|
|
cmd-respawn-pane.c \
|
|
cmd-respawn-window.c \
|
|
cmd-rotate-window.c \
|
|
cmd-run-shell.c \
|
|
cmd-save-buffer.c \
|
|
cmd-select-layout.c \
|
|
cmd-select-pane.c \
|
|
cmd-select-window.c \
|
|
cmd-send-keys.c \
|
|
cmd-set-buffer.c \
|
|
cmd-set-environment.c \
|
|
cmd-set-hook.c \
|
|
cmd-set-option.c \
|
|
cmd-show-environment.c \
|
|
cmd-show-messages.c \
|
|
cmd-show-options.c \
|
|
cmd-source-file.c \
|
|
cmd-split-window.c \
|
|
cmd-string.c \
|
|
cmd-swap-pane.c \
|
|
cmd-swap-window.c \
|
|
cmd-switch-client.c \
|
|
cmd-unbind-key.c \
|
|
cmd-wait-for.c \
|
|
cmd.c \
|
|
colour.c \
|
|
compat.h \
|
|
control-notify.c \
|
|
control.c \
|
|
environ.c \
|
|
format.c \
|
|
grid-view.c \
|
|
grid.c \
|
|
hooks.c \
|
|
input-keys.c \
|
|
input.c \
|
|
job.c \
|
|
key-bindings.c \
|
|
key-string.c \
|
|
layout-custom.c \
|
|
layout-set.c \
|
|
layout.c \
|
|
log.c \
|
|
mode-tree.c \
|
|
names.c \
|
|
notify.c \
|
|
options-table.c \
|
|
options.c \
|
|
paste.c \
|
|
proc.c \
|
|
resize.c \
|
|
screen-redraw.c \
|
|
screen-write.c \
|
|
screen.c \
|
|
server-client.c \
|
|
server-fn.c \
|
|
server.c \
|
|
session.c \
|
|
status.c \
|
|
style.c \
|
|
tmux.c \
|
|
tmux.h \
|
|
tty-acs.c \
|
|
tty-keys.c \
|
|
tty-term.c \
|
|
tty.c \
|
|
utf8.c \
|
|
window-buffer.c \
|
|
window-client.c \
|
|
window-clock.c \
|
|
window-copy.c \
|
|
window-tree.c \
|
|
window.c \
|
|
xmalloc.c \
|
|
xmalloc.h \
|
|
xterm-keys.c
|
|
nodist_tmux_SOURCES = osdep-@PLATFORM@.c
|
|
|
|
# Add compat file for forkpty.
|
|
if NEED_FORKPTY
|
|
nodist_tmux_SOURCES += compat/forkpty-@PLATFORM@.c
|
|
endif
|
|
|
|
# Add compat file for utf8proc.
|
|
if HAVE_UTF8PROC
|
|
nodist_tmux_SOURCES += compat/utf8proc.c
|
|
endif
|
|
|
|
# Install tmux.1 in the right format.
|
|
install-exec-hook:
|
|
if test x@MANFORMAT@ = xmdoc; then \
|
|
sed -e "s|@SYSCONFDIR@|$(sysconfdir)|g" $(srcdir)/tmux.1 \
|
|
>$(srcdir)/tmux.1.mdoc; \
|
|
else \
|
|
sed -e "s|@SYSCONFDIR@|$(sysconfdir)|g" $(srcdir)/tmux.1| \
|
|
$(AWK) -f$(srcdir)/mdoc2man.awk >$(srcdir)/tmux.1.man; \
|
|
fi
|
|
$(mkdir_p) $(DESTDIR)$(mandir)/man1
|
|
$(INSTALL_DATA) $(srcdir)/tmux.1.@MANFORMAT@ \
|
|
$(DESTDIR)$(mandir)/man1/tmux.1
|