@Override public Integer getNumericCapability(Capability capability) { return terminal.getNumericCapability(capability); }
@Override public Integer getNumericCapability(Capability capability) { return terminal.getNumericCapability(capability); }
@Override public Integer getNumericCapability(InfoCmp.Capability capability) { return delegate().getNumericCapability(capability); }
@Override public Integer getNumericCapability(InfoCmp.Capability capability) { return delegate().getNumericCapability(capability); }
public Tmux(Terminal terminal, PrintStream err, Consumer<Terminal> runner) throws IOException { this.terminal = terminal; this.err = err; this.runner = runner; display = new Display(terminal, true); // Find terminal to use Integer colors = terminal.getNumericCapability(Capability.max_colors); term = (colors != null && colors >= 256) ? "screen-256color" : "screen"; // Setup defaults bindings serverOptions.put(OPT_PREFIX, "`"); keyMap = createKeyMap(serverOptions.get(OPT_PREFIX)); }
public Tmux(Terminal terminal, PrintStream err, Consumer<Terminal> runner) throws IOException { this.terminal = terminal; this.err = err; this.runner = runner; display = new Display(terminal, true); // Find terminal to use Integer colors = terminal.getNumericCapability(Capability.max_colors); term = (colors != null && colors >= 256) ? "screen-256color" : "screen"; // Setup defaults bindings serverOptions.put(OPT_PREFIX, "`"); keyMap = createKeyMap(serverOptions.get(OPT_PREFIX)); }
public String toAnsi(Terminal terminal) { if (terminal != null && Terminal.TYPE_DUMB.equals(terminal.getType())) { return toString(); } int colors = 256; boolean force256colors = false; String alternateIn = null, alternateOut = null; if (terminal != null) { Integer max_colors = terminal.getNumericCapability(Capability.max_colors); if (max_colors != null) { colors = max_colors; } force256colors = AbstractWindowsTerminal.TYPE_WINDOWS_256_COLOR.equals(terminal.getType()); if (!DISABLE_ALTERNATE_CHARSET) { alternateIn = Curses.tputs(terminal.getStringCapability(Capability.enter_alt_charset_mode)); alternateOut = Curses.tputs(terminal.getStringCapability(Capability.exit_alt_charset_mode)); } } return toAnsi(colors, force256colors, alternateIn, alternateOut); }
Integer cols = terminal.getNumericCapability(Capability.max_colors); if (cols == null || cols < 8) { newLines = newLines.stream().map(s -> new AttributedString(s.toString()))