Commit graph

42 commits

Author SHA1 Message Date
Ryan Farley
5d71ccc174 enhanced bell configuration
Add a separate section for bell configuration, with a bell-specific
command option and a setting to allow that command to run without regard
to keyboard focus (for those of us who enjoy being beeped at at all
times, for example). The actions are also no longer mutually exclusive;
this is primarily anticipating urgency support which cannot be
replicated outside the process (in server mode anyway) and would thus be
complementary to any notification or arbitrary command.
2021-05-07 03:12:27 -05:00
Daniel Eklöf
7ce767ab87
config: add ‘beam-thickness’ option
* Rename cursor.style value ‘bar’ to ‘beam’. ‘bar’ remains recognized,
  but should eventually be deprecated and then removed.
* Add ‘cursor.beam-thickness’ option, a pt-or-px value specifying the
  thickness of the beam cursor. Defaults to 1.5pt.
* Rename (and export) pt_or_px_as_pixels() to
  term_pt_or_px_as_pixels()
* Change term_pt_or_px_as_pixels() to round point values instead of
  truncating them.
2021-04-30 20:36:16 +02:00
Daniel Eklöf
0713ab45c6
config: add box-drawings-uses-font-glyphs=no|yes option
When disabled, we render box drawing characters ourselves. This is the
default.

When enabled, we instead use font glyphs. I.e. no special treatment.

Closes #430
2021-04-09 23:21:20 +02:00
Daniel Eklöf
be00de4849
foot.ini: lower case Shift+X default bindings 2021-03-04 09:43:44 +01:00
Daniel Eklöf
c0be074348
doc: use ‘fuzzel’ instead of ‘bemenu’ in examples 2021-02-26 09:24:40 +01:00
Daniel Eklöf
2074f8b656
urls: OSC-8 URLs can now optionally be underlined outside of url-mode
This patch adds a new configuration option,
‘osc8-underline=url-mode|always’.

When set to ‘url-mode’, OSC-8 URLs are only
highlighted (i.e. underlined) in url-mode, just like auto-detected
URLs.

When set to ‘always’, they are always underlined, regardless of mode,
and regardless of their other attributes.

This is implemented by tagging collected URLs with a boolean,
instructing urls_render() and urls_reset() whether they should update
the cells’ ‘url’ attribute or not.

The OSC-8 collecter sets this based on the value of ‘osc8-underline’.

Finally, when closing an OSC-8 URL, the cells are immediately tagged
with the ‘url’ attribute if ‘osc8-underline’ is set to ‘always’.
2021-02-21 20:15:32 +01:00
Daniel Eklöf
4ff5154cb8
config: change default key binding for toggle-url-visible to ‘t’ 2021-02-21 20:15:31 +01:00
Daniel Eklöf
06a9ffa763
urls: add key binding that toggles whether URLs are displayed on jump-label
By default, the URL isn’t shown on the jump-label. For auto-detect
URLs, doing so is virtually always useless, as the URL is already
visible in the grid.

For OSC-8 URLs however, the URL is often _not_ visible in the
grid. Many times, seeing the URL is still not needed (if you’re doing
‘ls --hyperlink’, you already know what the URIs are).

But it is still useful to have a way to show the URLs.

This patch adds a new key binding action that can be used in url-mode
to toggle the URL on and off in the jump label.

It is bound to ctrl+t by default.
2021-02-21 20:15:31 +01:00
Daniel Eklöf
fe8e6f6cdb
foot.ini: add default value of jump-label-letters 2021-02-13 11:42:51 +01:00
Daniel Eklöf
bdc5810ff4
meson: convert -Dterminfo from a boolean to a feature option
Patch from Jan Beich
2021-02-09 19:42:55 +01:00
Daniel Eklöf
e9c3d03837
config: add colors.jump_labels and colors.urls
* colors.jump_labels configures the foreground and background colors
  used when rendering URL jump labels. Defaults to “regular0
  regular3” (i.e. black on yellow).

* colors.urls configures the color to use when highlighting URLs in
  URL mode. Note that we aren’t currently doing any
  highlighting... Defaults to regular3 (i.e. yellow).
2021-02-07 16:33:33 +01:00
Daniel Eklöf
0d17fd6a5d
foot.ini: fix default values for csd.button-*-color 2021-02-07 16:33:33 +01:00
Daniel Eklöf
93181649b3
config: add show-urls-copy action
This works just like show-urls-launch, except that instead of opening
the URL (typically using xdg-open), it is placed in the clipboard when
activated.
2021-02-07 16:33:32 +01:00
Daniel Eklöf
b17a392b8c
config: show-urls-launch: change default key binding to ctrl+shift+u 2021-02-07 16:33:32 +01:00
Daniel Eklöf
0a1c5e44c4
config: rename ‘show-urls’ to ‘show-urls-launch’ 2021-02-07 16:33:32 +01:00
Daniel Eklöf
82e2541760
config: add ctrl+d as (yet another) default binding url-bindings.cancel 2021-02-07 16:33:32 +01:00
Daniel Eklöf
4233c806c3
config: add ‘url-launch’ option, defaulting to “xdg-open ${url}” 2021-02-07 16:33:31 +01:00
Daniel Eklöf
ee39966ded
config: add infrastructure to handle URL mode specific key bindings
* Add “show-urls” action to regular key bindings
* Add url-bindings section to foot.ini
* Add “cancel” action to URL mode key bindings
2021-02-07 16:33:31 +01:00
Daniel Eklöf
3a7588bc99
config: promote tweak.resize-delay-ms to a real, supported option 2021-01-26 19:32:21 +01:00
Daniel Eklöf
e69ca255b0
config: add new option ‘selection-target’
This option controls the clipboard target that selected text should be
copied to.
2021-01-23 10:43:59 +01:00
Jan Beich
15f2bebdcb
meson: optionalize terminfo dependency
ncurses on FreeBSD still uses termcap(5) while foot works fine with
xterm-256color sans status line and visible bell. Having more than
one ncurses version installed may break other applications.

Document -Dterminfo=false uses --term=xterm-256color by default
2021-01-23 09:52:42 +01:00
Daniel Eklöf
767bd4f1db
config: add ‘select-extend-character-wise’ bind action
This forces the (new) selection mode to be character-wise when
extending a word- or line-wise selection.

Default key binding is ctrl+RMB.
2021-01-14 16:29:29 +01:00
Daniel Eklöf
70cfcf11fb
config: letter-spacing: make this a relative value
0, the default, means no additional spacing; the cell width is defined
by the font metrics.

A positive value *adds* to the width from the font metrics, while a
negative value *subtracts*.
2021-01-11 09:31:06 +01:00
Daniel Eklöf
428b5ef27c
foot.ini: add new options: line-height, letter-spacing and *-letter-offset 2021-01-11 09:31:06 +01:00
Daniel Eklöf
e14c592f39
config: add optional ‘center’ argument to ‘pad’
When set, the grid contents is centered in the window. I.e. the
left/right and top/bottom margins are equal (+- 1px).

This causes the content to “jump” while doing an interactive resize,
but may still be preferred in e.g. a tiling WM.

Closes #273
2021-01-06 11:17:29 +01:00
Daniel Eklöf
20d1596c37
foot.ini: add (default) size to font 2020-12-31 12:48:20 +01:00
Daniel Eklöf
21cc68d49e
osc: implement urxvt’s “OSC 777;notify”
OSC 777 is URxvt’s generic escape to send commands to its perl
extensions. The first parameter is the name of the extension, followed
by its arguments.

OSC 777;notify is a, if not well established, at least a fairly well
known escape sequence to request a (desktop) notification. The syntax
is:

  \e]777;notify;<title>;<body>\e\\

Neither title nor body is escaped in any way, meaning they should not
contain a ‘;’.

Foot will split title from body at the *first* ‘;’. Any remaining ‘;’
characters are treated as part of ‘body’.

Instead of adding built-in support for the freedesktop notification
specification (which would require us to link against at least dbus),
add a new config option to foot.ini: ‘notify’.

This option specifies the command to execute when a notification is
received. ‘${title}’ and ‘${body}’ can be used anywhere, in any
combination, and as many times as you want, in any of the command
arguments.

The default value is ‘notify-send -a foot -i foot ${title} ${body}’
2020-12-09 20:54:51 +01:00
Daniel Eklöf
8e7658a135
config: add ‘dpi-aware’ option, defaulting to enabled
When disabled, foot no longers uses outputs’ DPI to scale the
font. Instead, it uses the outputs’ scaling factor.

That is, instead of appending “:dpi=123” to the fontconfig string,
modify the “:pixelsize” or “:size” attribute.

Closes #206
2020-11-19 19:25:48 +01:00
Daniel Eklöf
34abf665e2
config: add default.bold-text-in-bright option 2020-11-14 11:22:19 +01:00
Daniel Eklöf
2af65471a6
readme/doc:foot.1: document the (new) keypad behavior 2020-11-11 18:37:28 +01:00
Daniel Eklöf
f3e6941c9a
search: add {clipboard,primary}-paste key bindings
These bindings copy from the clipboard or primary selection into the
search buffer.

Default bindings:

* clipboard-paste: ctrl+v, ctrl+y
* primary-paste: shift+insert
2020-11-01 12:39:57 +01:00
Daniel Eklöf
2c101a21ee
config: add font-bold, font-italic and font-bold-italic options
These options lets the user configure custom fonts and styles, to use
with the bold and italic cell attributes.

By default, they are unset, meaning we use the bold/italic variants of
the regular font.

Closes #169.
2020-10-20 21:04:47 +02:00
Daniel Eklöf
e54adbfa7c
Merge branch 'bind-shift+insert-to-primary-paste' into master 2020-10-10 13:05:55 +02:00
Daniel Eklöf
afafe12d5b
config: bind shift+insert to primary-paste by default 2020-10-10 10:27:42 +02:00
Daniel Eklöf
49f4b3da64
config: add ‘[default].word-delimiters’
This option lets the user configure which characters act as word
delimiters when selecting text.

This affects both “double clicking”, and ‘ctrl-w’ in scrollback search
mode.

Closes #156
2020-10-09 19:44:23 +02:00
Daniel Eklöf
7c6686221f
bell: optionally render margins in red when receiving BEL
Add anew config option, ‘bell=none|set-urgency’. When set to
‘set-urgency’, the margins will be painted in red (if the window did
not have keyboard focus).

This is intended as a cheap replacement for the ‘urgency’ hint, that
doesn’t (yet) exist on Wayland.

Closes #157
2020-10-08 19:55:32 +02:00
Daniel Eklöf
ebd1476baf
config: change default multiplier from 1.0 -> 3.0 2020-09-29 19:42:50 +02:00
Daniel Eklöf
f2497320c6
config: add mouse.alternate-scroll-mode option
This option controls the initial state of the Alternate Scroll Mode,
and defaults to ‘enabled’.
2020-09-15 19:12:29 +02:00
Daniel Eklöf
4d13429235
key-binding: deprecate scrollback-up/down, add scrollback-up/down-line
This deprecates/renames scrollback-up/down to scrollback-up/down-page.

It also renames scrollback-up/down-half to
scrollback-up/down-half-page, and adds the new bindings
scrollback-up/down-line.
2020-09-10 18:17:47 +02:00
Daniel Eklöf
2e3bd5e23c
config: add scrollback-{up,down}-half key bindings
These new bindings scroll up/down half a page in the
scrollback (instead of the full page scrolled by
‘scrollback-{up,down}’).

Closes #128.
2020-09-09 19:40:48 +02:00
Daniel Eklöf
eb6737ca25
Add -W,--window-size-chars, and foot.ini:initial-window-size-chars
* Add -W,--window-size-chars command line option
* Add initial-window-size-chars foot.ini option
* Add -w,--window-size-pixels command line option
* Add initial-window-size-pixels foot.ini option
* Deprecate -g,--geometry command line option in favor of
  -w,--window-size-pixels
* Deprecate geometry option in foot.ini in favor of
  initial-window-size-pixels
2020-09-08 19:41:00 +02:00
Daniel Eklöf
865127d836
footrc: move to foot.ini 2020-08-27 19:53:31 +02:00
Renamed from footrc (Browse further)