Commit 0cc77016 authored by Protesilaos Stavrou's avatar Protesilaos Stavrou
Browse files

BREAKING CHANGE Merge branch 'mateTerminalDefault'

This is a major review of my dotfiles.  It intends to replace my default
choice of terminal emulator.

Below is an excerpt of the commit message that signalled the start of
this process.

---

Context: after extensive testing, I have decided to change my default
choice of terminal emulator to MT.  The previous default was my custom
build of the Simple Terminal (ST), by the Suckless community. Here is
the reasoning, in outline form:

* MT is already installed on my system, because MATE is my fallback
  option for a fully fledged desktop environment.

* ST has build dependencies, meaning that a user of my dotfiles must
  first follow the instructions in the README that is bundled with ST's
  source code.  Without these dependencies, ST will fail to build when
  performing an environment theme update (using either my `tempusmenu`
  or `own_script_update_environment_theme`).

* ST needs to be recompiled for a theme change to occur.  MT updates
  faster (courtesy of `own_script_mate_terminal_setup`) and is less
  taxing on system resources in this specific instance (my laptop's fan
  is not activated).

* ST has major problems drawing box characters without extensive
  patching.  Only at specific point sizes, does the selected font draw
  continuous lines.  Whereas MT has no such issues.

* ST cannot draw emoji characters, while it requires an extra package
  for symbolic fonts (see its README) in order not to segfault when
  trying to display them.  MT supports emoji.  Now, it may seem
  superfluous to have such a feature, but it is important once you
  consider that people add emoji in emails or blog posts that can
  ultimately be read through the terminal (such as via `neomutt` and
  `newsboat` respectively).  While the font problems are not major, they
  do add up (terminals are all about text, after all).

* From an aesthetic perspective, ST is not very well suited to the
  dynamic size adjustments that happen in a tiling WM.  It tends to
  create an inner padding when set at specific window sizes.  This is
  most noticeable while running tmux (which I do all the time), where
  the status line will have a large distance from the bottom and right
  sides.  Admittedly, MT is not perfect in this regard, though it is
  better.

* MT does not expose its theming options via a typical dotfile, but
  still is easy to configure programmatically using dconf (what
  `own_script_mate_terminal_setup` does).

* Other terminals that use the VTE widget (this is actually the terminal
  emulator part, while MT is the implementation/framework) such as
  {GNOME,Xfce} Terminal and Tilix, would also have the same advantages
  as MT.  However, they are not installed by default, while Tilix has
  a ton of other features that I do not need (thanks to tmux).

* URxvt (Rxvt-Unicode), which is a popular choice for minimalist window
  managers, exhibits similar problems to ST when it comes to font
  drawing.  It also is not installed by default.  Furthermore, I am not
  sure whether it is still maintained or not as version 9.22 is the one
  available across Stretch, Buster, Sid.

* Konsole on its own is an excellent choice, but not for my particular
  use case.  It pulls in what seems like half the KDE-related package
  list.

* I am writing a book on how anyone can reproduce my custom desktop
  session on Debian 10 'buster' (planned for publication in late April,
  early May 2019).  Any kind of friction, is a hit on usability.
parents 717d3746 ad9a27df
#!/bin/bash
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Description {{{
# ---------------
#
# Configures the MATE Terminal (default terminal emulator for MATE
# Desktop Environment) to my liking. This script is part of my dotfiles
# and is meant to make the MATE Terminal useful within the context of my
# custom desktop session running BSPWM. Part of this integration is the
# ability to dynamically switch themes for the entire environment
# (terminals, GUIs, icons, wallpapers, etc.). See my dotfiles:
# https://gitlab.com/protesilaos/dotfiles
#
# Written on 2019-03-31 and tested on an up-to-date Debian Buster/Sid
# machine. In need of review.
#
# }}}
# TODO improve documentation, especially in the "conditional commands"
# section.
# Theme settings {{{
# ------------------
#
# You do not need to run this script manually, just for the sake of
# updating the terminals' colours. If you are using my `tempusmenu` (or
# `own_script_update_environment_theme`), the script shall be executed
# automatically as part of the overall theme change.
# Get the relevant variables from the active Tempus theme
source "$HOME/.local/share/my_colours/active-tempus-theme.sh"
# Path to the default MATE terminal profile
dconf_path='/org/mate/terminal/profiles/default'
# This concerns only a few global settings
dconf_path_global='/org/mate/terminal/global'
# For custom key bindings
dconf_path_keys='/org/mate/terminal/keybindings'
# Define colours
dconf write "$dconf_path/foreground-color" "'$foreground'"
dconf write "$dconf_path/bold-color" "'$foreground'"
dconf write "$dconf_path/background-color" "'$background'"
dconf write "$dconf_path/palette" "'$color0:$color1:$color2:$color3:$color4:$color5:$color6:$color7:$color8:$color9:$color10:$color11:$color12:$color13:$color14:$color15'"
# }}}
# Conditional commands {{{
# ------------------------
#
# We define these in a conditional way because the idea is they will
# remain constant over the long run. The idea is that this script will
# be executed whenever a theme change occurs, so the colour values need
# no conditional logic.
dconf_read_write_boolean() {
if [ "$(dconf read $dconf_path/$1)" == $2 ]; then
dconf write $dconf_path/$1 $3
elif [ -z "$(dconf read $dconf_path/$1)" ]; then
dconf write $dconf_path/$1 $3
fi
}
dconf_read_write_string() {
if [ "$(dconf read $dconf_path/$1)" != "'$2'" ]; then
dconf write $dconf_path/$1 "'$2'"
elif [ -z "$(dconf read $dconf_path/$1)" ]; then
dconf write $dconf_path/$1 "'$2'"
fi
}
dconf_read_write_integer() {
if [ "$(dconf read $dconf_path/$1)" != $2 ]; then
dconf write $dconf_path/$1 $2
elif [ -z "$(dconf read $dconf_path/$1)" ]; then
dconf write $dconf_path/$1 $2
fi
}
dconf_read_write_boolean_global() {
if [ "$(dconf read $dconf_path_global/$1)" == $2 ]; then
dconf write $dconf_path_global/$1 $3
elif [ -z "$(dconf read $dconf_path_global/$1)" ]; then
dconf write $dconf_path_global/$1 $3
fi
}
dconf_read_write_string_keys() {
if [ "$(dconf read $dconf_path_keys/$1)" != "'$2'" ]; then
dconf write $dconf_path_keys/$1 "'$2'"
elif [ -z "$(dconf read $dconf_path_keys/$1)" ]; then
dconf write $dconf_path_keys/$1 "'$2'"
fi
}
# Profile settings
### Boolean types
dconf_read_write_boolean 'allow-bold' 'false' 'true'
dconf_read_write_boolean 'bold-color-same-as-fg' 'false' 'true'
dconf_read_write_boolean 'copy-selection' 'false' 'true'
dconf_read_write_boolean 'default-show-menubar' 'true' 'false'
dconf_read_write_boolean 'use-system-font' 'true' 'false'
dconf_read_write_boolean 'use-theme-colors' 'true' 'false'
### String types
dconf_read_write_string 'font' 'Monospace 10'
dconf_read_write_string 'cursor-blink-mode' 'off'
dconf_read_write_string 'scrollbar-position' 'hidden'
#### Integer types
dconf_read_write_integer 'scrollback-lines' '9999'
# Global settings
dconf_read_write_boolean_global 'use-menu-accelerators' 'true' 'false'
dconf_read_write_boolean_global 'use-mnemonics' 'true' 'false'
# Key bindings
# NOTE this is very opinionated because I either use the terminal to
# launch a tmux session, or as a standalone container for CLI tools,
# such as neomutt. Either way, I do not want the terminal's key
# bindings to ever interfere with any of my own. Furthermore, I NEVER
# use tabs, multiple profiles, etc.
### Redefine
dconf_read_write_string_keys 'toggle-menubar' '<Ctrl><Shift>m'
dconf_read_write_string_keys 'zoom-in' '<Ctrl><Shift>Page_Up'
dconf_read_write_string_keys 'zoom-out' '<Ctrl><Shift>Page_Down'
dconf_read_write_string_keys 'zoom-normal' '<Ctrl><Shift>Home'
### Disable
dconf_read_write_string_keys 'detach-tab' 'disabled'
dconf_read_write_string_keys 'move-tab-left' 'disabled'
dconf_read_write_string_keys 'move-tab-right' 'disabled'
dconf_read_write_string_keys 'new-tab' 'disabled'
dconf_read_write_string_keys 'new-window' 'disabled'
dconf_read_write_string_keys 'next-profile' 'disabled'
dconf_read_write_string_keys 'next-tab' 'disabled'
dconf_read_write_string_keys 'prev-profile' 'disabled'
dconf_read_write_string_keys 'prev-tab' 'disabled'
dconf_read_write_string_keys 'reset' 'disabled'
dconf_read_write_string_keys 'reset-and-clear' 'disabled'
dconf_read_write_string_keys 'save-contents' 'disabled'
dconf_read_write_string_keys 'search-find' 'disabled'
dconf_read_write_string_keys 'search-find-next' 'disabled'
dconf_read_write_string_keys 'search-find-previous' 'disabled'
dconf_read_write_string_keys 'select-all' 'disabled'
dconf_read_write_string_keys 'set-terminal-title' 'disabled'
dconf_read_write_string_keys 'switch-to-tab-1' 'disabled'
dconf_read_write_string_keys 'switch-to-tab-2' 'disabled'
dconf_read_write_string_keys 'switch-to-tab-3' 'disabled'
dconf_read_write_string_keys 'switch-to-tab-4' 'disabled'
dconf_read_write_string_keys 'switch-to-tab-5' 'disabled'
dconf_read_write_string_keys 'switch-to-tab-6' 'disabled'
dconf_read_write_string_keys 'switch-to-tab-7' 'disabled'
dconf_read_write_string_keys 'switch-to-tab-8' 'disabled'
dconf_read_write_string_keys 'switch-to-tab-9' 'disabled'
dconf_read_write_string_keys 'switch-to-tab-10' 'disabled'
dconf_read_write_string_keys 'switch-to-tab-11' 'disabled'
dconf_read_write_string_keys 'switch-to-tab-12' 'disabled'
# }}}
# vi:foldmethod=marker
......@@ -265,20 +265,13 @@ modify_vim() {
# }}}
# Set theme for st {{{
# --------------------
# DEPENDENCY: My soft fork of the Simple Terminal by suckless. The
# source code is bundled with my dotfiles and should already be
# installed on the system if you have used `stow st`. Please see the
# README.md in advance for all the build dependencies:
# https://gitlab.com/protesilaos/st
modify_st() {
if [ -x "$HOME/bin/st" ]; then
echo "Recompiling st - suckless terminal"
notify-send -i terminal "Environment theme" "Recompiling st"
sed --follow-symlinks -i -e "s/_[a-z]*\\./_$tempus_scheme./g" "$dotfiles_dir/st/st/active-tempus-theme.h"
cd "$dotfiles_dir/st/st" && rm -f config.h && make clean install
# Set theme for MATE Terminal {{{
# ------------------------------
# TODO add documentation (this is intended to replace the Simple
# Terminal)
modify_mate_terminal() {
if [ -x /usr/bin/mate-terminal ]; then
own_script_mate_terminal_setup
fi
}
......@@ -681,10 +674,7 @@ update_environment_theme() {
modify_bspwm
modify_dunst
melonpanel # this re-runs my lemonbar to get the new colours
# modify st last because it requires recompilation
# running instances are updated via ANSI sequences
# see my dotfiles for `own_script_update_running_terminals`
modify_st
modify_mate_terminal
}
# }}}
......@@ -721,10 +711,7 @@ update_environment_theme_de() {
source "$HOME/.local/share/my_colours/active-tempus-theme.sh"
modify_tmux
modify_dunst
# modify st last because it requires recompilation
# running instances are updated via ANSI sequences
# see my dotfiles for `own_script_update_running_terminals`
modify_st
modify_mate_terminal
}
# }}}
......
......@@ -18,9 +18,9 @@
#
# Use ANSI codes to apply theme change to all active terminals. This is
# particularly useful for programs that source their colours at startup,
# requiring a restart to apply a new theme. However, all terminals
# I have tested respond to the live theme change. Tried with xterm,
# rxvt-unicode, st, {gnome,mate,xfce4}-terminal, kitty, tilix.
# requiring a restart to apply a new theme. All terminals I have tested
# respond to the live theme change. Tried with xterm, rxvt-unicode,
# {gnome,mate,xfce4}-terminal, kitty, tilix.
#
# Adapted from
# https://www.reddit.com/r/unixporn/comments/80nidw/bspwm_script_to_change_all_themes_on_demand/duxjw1e/
......@@ -36,7 +36,8 @@ if [ -f "$active_theme" ]; then
# capture all active colours
col_array="$(grep '^.*=' $active_theme)"
else
echo "There is file at $active_theme"
echo "ERROR. There is no file at $active_theme"
echo "Aborting"
exit 1
fi
......@@ -68,19 +69,6 @@ ansi_sequences+="\\033]10;$(get_hex_value foreground)\\007"
ansi_sequences+="\\033]11;$(get_hex_value background)\\007"
ansi_sequences+="\\033]17;$(get_hex_value foreground)\\007"
# My Tempus themes use custom colours for `st` base values (numbers
# 256-259). This is to enable smooth transitions between dark and light
# themes. See the inline comments in my `st` theme files, which are
# included with my dotfiles inside the "st" directory.
# my dotfiles: https://gitlab.com/protesilaos/dotfiles
# my st build: https://gitlab.com/protesilaos/st
if [ -x "$HOME/bin/st" ]; then
ansi_sequences+="\\033]4;256;$(get_hex_value background)\\007"
ansi_sequences+="\\033]4;257;$(get_hex_value foreground)\\007"
ansi_sequences+="\\033]4;258;$(get_hex_value cursorColor)\\007"
ansi_sequences+="\\033]4;259;$(get_hex_value cursorColor2)\\007"
fi
# Apply ANSI sequences to running terminals.
for term in /dev/pts/[0-9]*; do
printf "%b" "$ansi_sequences" > "$term" &
......
File deleted
......@@ -12,7 +12,8 @@
# Most commands are derived from `man bspc|bspwm` and `man sxhkd`. Each
# action is preceded by comments which explain what it does.
#
# Last reviewed on 2018-11-07
# Last full review on 2018-11-07
# Last major edit on 2019-04-01
#
# }}}
......@@ -90,21 +91,16 @@ ctrl + alt + {Home,End,Delete}
# Main programs
# -------------
# Terminal emulator with and without tmux. Bear in mind that my `st`
# build does not try to replicate multiplexing features, including
# scroll back. As such, `super + shift + Return` should be used when
# you need a very basic terminal emulator. I usually use this to test
# how various actions affect running nodes (e.g. test the script that
# resizes nodes, or the key chords that balance/equalise node splits).
# I normally use `tmux` which is ideal for working on multiple
# terminals, switching sessions, and the like. You should really give
# this a fair try. I think it fits perfectly into a console-based
# workflow and complements the features of a tiling WM.
# Terminal emulator with and without tmux. I normally use `tmux` which
# is ideal for working on multiple terminals, switching sessions, and
# the like. You should really give this a fair try. I think it fits
# perfectly into a console-based workflow and complements the features
# of a tiling WM.
#
# NOTE `@` means until key is released, though I cannot confirm it works
# properly. It is kept here for reference and future review.
super + {_, shift + } @Return
{st -e tmux new-session -A -s 'Default', st}
{mate-terminal --disable-factory -x tmux new-session -A -s 'Default', mate-terminal}
# GUI programs. Where these are alternatives to common CLI tools they
# are mapped to the same number as their counterparts, but prepended
......@@ -117,16 +113,25 @@ super + g ; {1,2,3}
}
# CLI programs. Any browser and/or file manager should be assigned the
# numbers 1 and 2 respectively, in order to bkeep consistency with the
# numbers 1 and 2 respectively, in order to keep consistency with the
# above-defined GUIs.
#
# Note that, by default, all instances of `mate-terminal` run in
# a single process. So killing one (bspc node -k), will bring down all
# terminals. Pass option "--disable-factory" to run each terminal as
# its own process (I only do this for special occasions, as seen
# elsewhere in this file).
super + x ; {3-7}
st -e {neomutt,newsboat,rtv,ncmpcpp,podboat -a}
mate-terminal -x {neomutt,newsboat,rtv,ncmpcpp,podboat -a}
# I use "my_float_window" as an application name or class for those rare
# occasions where I prefer a floating window at launch. Note that
# `calc` is found in the Debian repos as `apcalc`.
# occasions where I prefer a floating window at launch. The option
# --disable-factory is necessary to run the terminal in its own process,
# so as to inherit the class we pass to it.
#
# Note that `calc` is found in the Debian repos as `apcalc`.
super + x ; 0
st -c 'my_float_window' -e calc
mate-terminal --disable-factory --class=my_float_window -x calc
# sbgmenu: dmenu interface for browsing images from my "Pictures"
# directory. There is an option to just display the selected file, or
......
......@@ -10,7 +10,3 @@ set mark-symlinked-directories On
set colored-completion-prefix On
# Color the common prefix in menu-complete
set menu-complete-display-prefix On
# Fixes issues with some keys on `st`
# As per the Arch Wiki
set enable-keypad on
[Desktop Entry]
Name=Simple Terminal
GenericName=st
Comment=Standard terminal emulator for the X window system
Exec=st -t "Suckless Terminal"
Terminal=false
Type=Application
Encoding=UTF-8
Icon=terminal
Categories=System;TerminalEmulator;
Keywords=shell;prompt;command;commandline;cmd;
[Desktop Entry]
Name=Simple Terminal (Tmux)
GenericName=st-256color
Comment=Standard terminal emulator for the X window system
Exec=st -t "Suckless Terminal" -e tmux
Terminal=false
Type=Application
Encoding=UTF-8
Icon=terminal
Categories=System;TerminalEmulator;
Keywords=shell;prompt;command;commandline;cmd;
## Why does st not handle utmp entries?
Use the excellent tool of [utmp](http://git.suckless.org/utmp/) for this task.
## Some _random program_ complains that st is unknown/not recognised/unsupported/whatever!
It means that st doesn’t have any terminfo entry on your system. Chances are
you did not `make install`. If you just want to test it without installing it,
you can manually run `tic -sx st.info`.
## Nothing works, and nothing is said about an unknown terminal!
* Some programs just assume they’re running in xterm i.e. they don’t rely on
terminfo. What you see is the current state of the “xterm compliance”.
* Some programs don’t complain about the lacking st description and default to
another terminal. In that case see the question about terminfo.
## I get some weird glitches/visual bug on _random program_!
Try launching it with a different TERM: $ TERM=xterm myapp. toe(1) will give
you a list of available terminals, but you’ll most likely switch between xterm,
st or st-256color. The default value for TERM can be changed in config.h
(TNAME).
## How do I scroll back up?
Using a terminal multiplexer.
* `st -e tmux` using C-b [
* `st -e screen` using C-a ESC
## Why doesn't the Del key work in some programs?
Taken from the terminfo manpage:
If the terminal has a keypad that transmits codes when the keys
are pressed, this information can be given. Note that it is not
possible to handle terminals where the keypad only works in
local (this applies, for example, to the unshifted HP 2621 keys).
If the keypad can be set to transmit or not transmit, give these
codes as smkx and rmkx. Otherwise the keypad is assumed to
always transmit.
In the st case smkx=E[?1hE= and rmkx=E[?1lE>, so it is mandatory that
applications which want to test against keypad keys send these
sequences.
But buggy applications (like bash and irssi, for example) don't do this. A fast
solution for them is to use the following command:
$ printf '\033[?1h\033=' >/dev/tty
or
$ tput smkx
In the case of bash, readline is used. Readline has a different note in its
manpage about this issue:
enable-keypad (Off)
When set to On, readline will try to enable the
application keypad when it is called. Some systems
need this to enable arrow keys.
Adding this option to your .inputrc will fix the keypad problem for all
applications using readline.
If you are using zsh, then read the zsh FAQ
<http://zsh.sourceforge.net/FAQ/zshfaq03.html#l25>:
It should be noted that the O / [ confusion can occur with other keys
such as Home and End. Some systems let you query the key sequences
sent by these keys from the system's terminal database, terminfo.
Unfortunately, the key sequences given there typically apply to the
mode that is not the one zsh uses by default (it's the "application"
mode rather than the "raw" mode). Explaining the use of terminfo is
outside of the scope of this FAQ, but if you wish to use the key
sequences given there you can tell the line editor to turn on
"application" mode when it starts and turn it off when it stops:
function zle-line-init () { echoti smkx }
function zle-line-finish () { echoti rmkx }
zle -N zle-line-init
zle -N zle-line-finish
Putting these lines into your .zshrc will fix the problems.
## How can I use meta in 8bit mode?
St supports meta in 8bit mode, but the default terminfo entry doesn't
use this capability. If you want it, you have to use the 'st-meta' value
in TERM.
## I cannot compile st in OpenBSD
OpenBSD lacks librt, despite it being mandatory in POSIX
<http://pubs.opengroup.org/onlinepubs/9699919799/utilities/c99.html#tag_20_11_13>.
If you want to compile st for OpenBSD you have to remove -lrt from config.mk, and
st will compile without any loss of functionality, because all the functions are
included in libc on this platform.
## The Backspace Case
St is emulating the Linux way of handling backspace being delete and delete being
backspace.
This is an issue that was discussed in suckless mailing list
<http://lists.suckless.org/dev/1404/20697.html>. Here is why some old grumpy
terminal users wants its backspace to be how he feels it:
Well, I am going to comment why I want to change the behaviour
of this key. When ASCII was defined in 1968, communication
with computers was done using punched cards, or hardcopy
terminals (basically a typewriter machine connected with the
computer using a serial port). ASCII defines DELETE as 7F,
because, in punched-card terms, it means all the holes of the
card punched; it is thus a kind of 'physical delete'. In the
same way, the BACKSPACE key was a non-destructive backspace,
as on a typewriter. So, if you wanted to delete a character,
you had to BACKSPACE and then DELETE. Another use of BACKSPACE
was to type accented characters, for example 'a BACKSPACE `'.
The VT100 had no BACKSPACE key; it was generated using the
CONTROL key as another control character (CONTROL key sets to
0 b7 b6 b5, so it converts H (code 0x48) into BACKSPACE (code
0x08)), but it had a DELETE key in a similar position where
the BACKSPACE key is located today on common PC keyboards.
All the terminal emulators emulated the difference between
these keys correctly: the backspace key generated a BACKSPACE
(^H) and delete key generated a DELETE (^?).
But a problem arose when Linus Torvalds wrote Linux. Unlike
earlier terminals, the Linux virtual terminal (the terminal
emulator integrated in the kernel) returned a DELETE when
backspace was pressed, due to the VT100 having a DELETE key in
the same position. This created a lot of problems (see [1]
and [2]). Since Linux has become the king, a lot of terminal
emulators today generate a DELETE when the backspace key is
pressed in order to avoid problems with Linux. The result is
that the only way of generating a BACKSPACE on these systems
is by using CONTROL + H. (I also think that emacs had an
important point here because the CONTROL + H prefix is used
in emacs in some commands (help commands).)
From point of view of the kernel, you can change the key
for deleting a previous character with stty erase. When you
connect a real terminal into a machine you describe the type
of terminal, so getty configures the correct value of stty
erase for this terminal. In the case of terminal emulators,
however, you don't have any getty that can set the correct
value of stty erase, so you always get the default value.
For this reason, it is necessary to add 'stty erase ^H' to your
profile if you have changed the value of the backspace key.
Of course, another solution is for st itself to modify the
value of stty erase. I usually have the inverse problem:
when I connect to non-Unix machines, I have to press CONTROL +
h to get a BACKSPACE. The inverse problem occurs when a user
connects to my Unix machines from a different system with a
correct backspace key.
[1] http://www.ibb.net/~anne/keyboard.html
[2] http://www.tldp.org/HOWTO/Keyboard-and-Console-HOWTO-5.html
## But I really want the old grumpy behaviour of my terminal
Apply [1].
[1] http://st.suckless.org/patches/delkey
A STATEMENT ON LEGACY SUPPORT
In the terminal world there is much cruft that comes from old and unsup‐
ported terminals that inherit incompatible modes and escape sequences
which noone is able to know, except when he/she comes from that time and
developed a graphical vt100 emulator at that time.
One goal of st is to only support what is really needed. When you en‐
counter a sequence which you really need, implement it. But while you
are at it, do not add the other cruft you might encounter while sneek‐
ing at other terminal emulators. History has bloated them and there is
no real evidence that most of the sequences are used today.
Christoph Lohmann <20h@r-36.net>
2012-09-13T07:00:36.081271045+02:00
MIT/X Consortium License
© 2014-2018 Hiltjo Posthuma <hiltjo at codemadness dot org>
© 2018 Devin J. Pohly <djpohly at gmail dot com>
© 2014-2017 Quentin Rameau <quinq at fifth dot space>
© 2009-2012 Aurélien APTEL <aurelien dot aptel at gmail dot com>
© 2008-2017 Anselm R Garbe <garbeam at gmail dot com>
© 2012-2017 Roberto E. Vargas Caballero <k0ga at shike2 dot com>
© 2012-2016 Christoph Lohmann <20h at r-36 dot net>
© 2013 Eon S. Jeon <esjeon at hyunmu dot am>
© 2013 Alexander Sedov <alex0player at gmail dot com>
© 2013 Mark Edgar <medgar123 at gmail dot com>
© 2013-2014 Eric Pruitt <eric.pruitt at gmail dot com>
© 2013 Michael Forney <mforney at mforney dot org>
© 2013-2014 Markus Teich <markus dot teich at stusta dot mhn dot de>
© 2014-2015 Laslo Hunhold <dev at frign dot de>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
# st - simple terminal
# See LICENSE file for copyright and license details.
.POSIX:
include config.mk
SRC = st.c x.c
OBJ = $(SRC:.c=.o)
all: options st
options:
@echo st build options:
@echo "CFLAGS = $(STCFLAGS)"
@echo "LDFLAGS = $(STLDFLAGS)"
@echo "CC = $(CC)"
config.h:
cp config.def.h config.h
.c.o:
$(CC) $(STCFLAGS) -c $<
st.o: config.h st.h win.h
x.o: arg.h config.h st.h win.h
$(OBJ): config.h config.mk
st: $(OBJ)
$(CC) -o $@ $(OBJ) $(STLDFLAGS)