mirror of
https://github.com/tmux/tmux.git
synced 2025-01-10 01:58:51 +00:00
Set default lock command to vlock on Linux if present at build time, from Josh
Boyer in GitHub issue 3527.
This commit is contained in:
parent
15c70e562c
commit
0ff991b25f
@ -14,6 +14,7 @@ dist_EXTRA_tmux_SOURCES = compat/*.[ch]
|
|||||||
AM_CPPFLAGS += @XOPEN_DEFINES@ \
|
AM_CPPFLAGS += @XOPEN_DEFINES@ \
|
||||||
-DTMUX_VERSION='"@VERSION@"' \
|
-DTMUX_VERSION='"@VERSION@"' \
|
||||||
-DTMUX_CONF='"$(sysconfdir)/tmux.conf:~/.tmux.conf:$$XDG_CONFIG_HOME/tmux/tmux.conf:~/.config/tmux/tmux.conf"' \
|
-DTMUX_CONF='"$(sysconfdir)/tmux.conf:~/.tmux.conf:$$XDG_CONFIG_HOME/tmux/tmux.conf:~/.config/tmux/tmux.conf"' \
|
||||||
|
-DTMUX_LOCK_CMD='"@DEFAULT_LOCK_CMD@"' \
|
||||||
-DTMUX_TERM='"@DEFAULT_TERM@"'
|
-DTMUX_TERM='"@DEFAULT_TERM@"'
|
||||||
|
|
||||||
# Additional object files.
|
# Additional object files.
|
||||||
|
13
configure.ac
13
configure.ac
@ -936,6 +936,19 @@ AM_CONDITIONAL(IS_HPUX, test "x$PLATFORM" = xhpux)
|
|||||||
AM_CONDITIONAL(IS_HAIKU, test "x$PLATFORM" = xhaiku)
|
AM_CONDITIONAL(IS_HAIKU, test "x$PLATFORM" = xhaiku)
|
||||||
AM_CONDITIONAL(IS_UNKNOWN, test "x$PLATFORM" = xunknown)
|
AM_CONDITIONAL(IS_UNKNOWN, test "x$PLATFORM" = xunknown)
|
||||||
|
|
||||||
|
# Set the default lock command
|
||||||
|
DEFAULT_LOCK_CMD="lock -np"
|
||||||
|
AC_MSG_CHECKING(lock-command)
|
||||||
|
if test "x$PLATFORM" = xlinux; then
|
||||||
|
AC_CHECK_PROG(found_vlock, vlock, yes, no)
|
||||||
|
if test "x$found_vlock" = xyes; then
|
||||||
|
DEFAULT_LOCK_CMD="vlock"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT($DEFAULT_LOCK_CMD)
|
||||||
|
AC_SUBST(DEFAULT_LOCK_CMD)
|
||||||
|
|
||||||
|
|
||||||
# Save our CFLAGS/CPPFLAGS/LDFLAGS for the Makefile and restore the old user
|
# Save our CFLAGS/CPPFLAGS/LDFLAGS for the Makefile and restore the old user
|
||||||
# variables.
|
# variables.
|
||||||
AC_SUBST(AM_CPPFLAGS)
|
AC_SUBST(AM_CPPFLAGS)
|
||||||
|
@ -530,7 +530,7 @@ const struct options_table_entry options_table[] = {
|
|||||||
{ .name = "lock-command",
|
{ .name = "lock-command",
|
||||||
.type = OPTIONS_TABLE_STRING,
|
.type = OPTIONS_TABLE_STRING,
|
||||||
.scope = OPTIONS_TABLE_SESSION,
|
.scope = OPTIONS_TABLE_SESSION,
|
||||||
.default_str = "lock -np",
|
.default_str = TMUX_LOCK_CMD,
|
||||||
.text = "Shell command to run to lock a client."
|
.text = "Shell command to run to lock a client."
|
||||||
},
|
},
|
||||||
|
|
||||||
|
3
tmux.h
3
tmux.h
@ -81,6 +81,9 @@ struct winlink;
|
|||||||
#ifndef TMUX_TERM
|
#ifndef TMUX_TERM
|
||||||
#define TMUX_TERM "screen"
|
#define TMUX_TERM "screen"
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef TMUX_LOCK_CMD
|
||||||
|
#define TMUX_LOCK_CMD "lock -np"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Minimum layout cell size, NOT including border lines. */
|
/* Minimum layout cell size, NOT including border lines. */
|
||||||
#define PANE_MINIMUM 1
|
#define PANE_MINIMUM 1
|
||||||
|
Loading…
Reference in New Issue
Block a user