aboutsummaryrefslogtreecommitdiff
path: root/config.c (follow)
Commit message (Collapse)AuthorAgeLines
...
* term: add capability to print warnings *inside* the terminalDaniel Eklöf2020-07-29-0/+6
| | | | | This is intended to be used to print e.g. deprecation warnings inside the terminal, *before* the shell is started.
* config: add scrollback sectionDaniel Eklöf2020-07-29-4/+30
| | | | | | | | | * Move 'scrollback' to 'scrollback.lines' * Move (the new) 'scrollback-indicator-*' options to 'scrollback.indicator-*' Log a deprecation warning when the old 'scrollback' option is used, but don't remove it, yet.
* search/config: configurable key bindings for (scrollback) search modeDaniel Eklöf2020-07-29-9/+124
|
* config: fix check for scrollback-indicator-format=percentageDaniel Eklöf2020-07-28-1/+1
|
* config: add free-form text variant to 'scrollback-indicator-format'Daniel Eklöf2020-07-28-5/+14
| | | | And make the empty string the new default.
* config: handle trailing comments and empty valuesDaniel Eklöf2020-07-28-16/+32
|
* config: rename scrollback-indicator-style to scrollback-indicator-positionDaniel Eklöf2020-07-27-6/+6
|
* config: scrollback-indicator-format: percent -> percentageDaniel Eklöf2020-07-26-6/+8
|
* config: fix error message for 'scrollback-indicator-style'Daniel Eklöf2020-07-26-1/+1
|
* config: fix key check for 'scrollback-indicator-style'Daniel Eklöf2020-07-26-1/+1
|
* config: rename scrollback-indicator-style value 'static' to 'fixed'Daniel Eklöf2020-07-25-3/+3
|
* config: rename scrollback-indicator-style value 'moving' to 'relative'Daniel Eklöf2020-07-25-2/+2
|
* config: rename scrollback-indicator to scrollback-indicator-styleDaniel Eklöf2020-07-25-11/+26
| | | | | | | | And turn it from a boolean to an enum. It can be set to: * `none` - disables the indicator * `static` - always rendered near the top of the window * `moving` - position reflects the scrollback position
* config: add 'scrollback-indicator-format' optionDaniel Eklöf2020-07-24-0/+14
| | | | | The value of this option must be either 'percent', or 'line', and determines _how_ we render the scrollback indicator.
* config: rename show-scrollback-position to scrollback-indicatorDaniel Eklöf2020-07-24-3/+3
|
* config: add 'show-scrollback-position' option to footrcDaniel Eklöf2020-07-24-0/+4
|
* config: oopsie, need to use strndup() on the pipe commandDaniel Eklöf2020-07-15-1/+1
| | | | Since it isn't NULL-terminated.
* config: change syntax for pipe-command in key bindingDaniel Eklöf2020-07-15-7/+18
| | | | | | | | | | | | | | | | | | | The pipe command can contain almost all printable characters. In particular, we can expect it to contain '='. Having the pipe command as part of the key breaks the key/value splitting. Change it so that it is instead an optional initial part of the value, enclosed in '[]'. I.e. instead of pipe-visible:cmd=binding we now need to write pipe-visible=[cmd] binding
* conf: bindings: allow several mappings for the same actionDaniel Eklöf2020-07-15-66/+137
| | | | | If the bindings has different pipe command associated with them, treat them as different actions.
* config: add support for appending a 'spawn' argument to key bindingsDaniel Eklöf2020-07-15-3/+16
| | | | | | | | | | | | A key binding may now have an optional ':<cmd>' string appended to the key. This is intended to be used like so: pipe-scrollback:sh -c "cat > file"=Print TODO: we still only allow one *action*. Meaning you still cannot specify multiple pipe-scrollback bindings, for example.
* conf: add definitions for pipe-{scrollback,view} bindingsDaniel Eklöf2020-07-15-0/+2
|
* term: don't use deprecated fcft_size_adjust()Daniel Eklöf2020-07-07-3/+39
| | | | | | | | | | | | | | | | | | | | | | | | | When resizing the font on-the-fly, we now do a complete font-reload (this is basically what fcft_size_adjust() did anyway). To get the correct size, we maintain the current size ourselves. We get the initial size from the user-provided font pattern, by converting the string to an FcPattern, and using FcPatternGet() to retrieve both the FC_SIZE and FC_PIXEL_SIZE attributes. These attributes are then removed from the pattern, and the pattern is converted back to a string. The terminal struct maintains a copy of the font sizes. These are initially set to the sizes from the config. When the user resizes the font, the terminal-local sizes are adjusted. To ensure the primary and user-configured fallback fonts are resizes equally much, convert any pixel sizes to point sizes at this point. When the font size is reset, we reload the font sizes from the config (thus once again returning actual pixel-sizes, if that's what the user has configured).
* config: add 'blink' option to cursor section in footrcDaniel Eklöf2020-06-30-0/+4
| | | | | This option controls whether the default cursor should blink or not. The default is to *not* blink.
* util.h: new header file defining commonly used macrosDaniel Eklöf2020-05-01-3/+1
|
* misc: replace all explicit zero-initializers with empty initializersDaniel Eklöf2020-04-13-1/+1
|
* config: use an unsigned constant, since we're shifting 31 bitsDaniel Eklöf2020-04-09-2/+2
|
* conf: add 'title' conf option and --title command line optionDaniel Eklöf2020-04-01-0/+7
|
* conf: add app-id config option and --app-id command line optionDaniel Eklöf2020-04-01-0/+7
|
* Merge branch 'scroll-damage-performance'Daniel Eklöf2020-03-29-0/+14
|\
| * Merge branch 'master' into scroll-damage-performanceDaniel Eklöf2020-03-27-1/+17
| |\
| * | shm: make max pool size user configurable (via a 'tweak' setting)Daniel Eklöf2020-03-25-0/+14
| | |
* | | conf: rename 'startup-mode' to 'initial-window-mode'Daniel Eklöf2020-03-28-1/+1
| |/ |/|
* | config: add 'startup-mode' optionDaniel Eklöf2020-03-26-1/+17
|/ | | | | This option controls the initial window mode: windowed, maximized or fullscreen. The default is windowed.
* search: replace hard-coded key bindings with "user configurable" onesDaniel Eklöf2020-03-18-9/+25
| | | | | | | | They aren't really user configurable. At least not yet. However, with this, we now handle raw key codes just like the normal key bindings. Meaning, e.g. ctrl+g, ctrl+a, ctrl+e etc now works while searching with e.g. a russian layout.
* conf: bindings: case insensitive matching against 'none'Daniel Eklöf2020-03-18-1/+1
|
* conf: change default key binding for spawn-terminal to ctrl+shift+nDaniel Eklöf2020-03-17-1/+1
|
* conf: make delayed rendering timeouts configurableDaniel Eklöf2020-03-17-0/+52
| | | | | | | | | | | This adds an undocumented 'tweak' section to footrc, with two new options: * delayed-render-lower * delayed-render-upper Both takes an integer value, representing the lower/upper timeout values (in nano seconds) for delayed rendering.
* Merge branch 'master' into bindingsDaniel Eklöf2020-03-12-5/+10
|\
| * config: add str_to_bool()Daniel Eklöf2020-03-11-5/+10
| |
* | config: key-bindings: verify key combo isn't already mapped to another actionDaniel Eklöf2020-03-12-11/+47
| |
* | config: mouse-bindings: verify button isn't already mappedDaniel Eklöf2020-03-12-1/+25
| | | | | | | | | | | | | | | | | | A button may only be mapped to a single action. Detect when the user tried to map the same button to multiple actions and error out. To clear a binding (for example, to free up a button from the default bindings), one can set the action it is bound to to `NONE` (e.g. `primary-paste=NONE`).
* | config/input: implement mouse bindingsDaniel Eklöf2020-03-12-10/+51
| | | | | | | | | | | | | | | | | | | | * New config section, "mouse-bindings", where bindings are defined on the form "action=BTN_<name> * pointer_button() handler now scans the bindings list instead of hardcoding primary-paste to BTN_MIDDLE. * The implementation handles single- double- and triple clicks in the bindings, but there is currently no way to define anything but a single-click binding in the configuration.
* | config: 'invalid key' is always an error, not a warningDaniel Eklöf2020-03-12-4/+3
| |
* | bindings: add minimize/maximize/fullscreen actionsDaniel Eklöf2020-03-12-0/+6
| | | | | | | | These actions are by default not bound to anything.
* | config: load custom key bindingsDaniel Eklöf2020-03-09-22/+74
| | | | | | | | | | | | | | | | This adds parsing of a new section - "key-bindings" - where the user can configure the key bindings on the form "action=combo1 .. comboN" The validity of the key combinations are checked with the default XKB keymap.
* | Merge branch 'master' into bindingsDaniel Eklöf2020-03-09-2/+12
|\|
| * server/client: add XDG_SESSION_ID to the default socket pathDaniel Eklöf2020-03-09-2/+6
| | | | | | | | This allows multiple foot servers to run in multiple sessions.
| * config: csd: error out on invalid keyDaniel Eklöf2020-03-08-0/+6
| |
* | input: convert the rest of the normal key bindings to configurable bindingsDaniel Eklöf2020-03-08-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New actions defined and implemented: * scrollback up/down * font size up/down/reset * spawn terminal Break out key combo parsing to a new function, parse_key_binding_for_action(). This function parses a string containing one or more space separated key combo definitions on the form (mod1+mod2+...+key), where key is a XKB key name (e.g. KP_Add). Convert all hardcoded key bindings to configuration based bindings. These still cannot actually be configured by the user, but at least lives in the conf struct.
* | wip: initial framework for dealing with key/mouse bindings in different modesDaniel Eklöf2020-03-08-0/+19
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds initial support for defining key and mouse bindings that are applied in different terminal modes/states. For example, there are two arrays dealing with key and mouse bindings in the "normal" mode. Most bindings will go here. There's also an array for "search" mode. These bindings will be used when the user has started a scrollback search. In the future, there may be a model selection mode as well. Or maybe "search" and "modal selection" will be combined into a single "keyboard" mode. We'll see. Since the keyboard bindings depend on the current XKB keymap, translation from the user specified key combination string cannot be done when loading the configuration, but must be done when we've received a keymap from the wayland server. We should explore if it's possible to load some kind of default keymap just to be able to verify the validity of the key combination strings at configuration load time, to be able to reject the configuration at startup. A couple of key bindings have been added as proof of concept. Mouse bindings aren't handled at all yet, and is likely to be re-written. For example, we can probably translate the configuration strings at configuration load time.
* config: change default CSD button width from 22 -> 26Daniel Eklöf2020-03-06-1/+1
|
* config: CSD borders are always invisibleDaniel Eklöf2020-03-03-27/+2
| | | | | That is, remove all configuration options and always draw them fully transparent.
* csd: initial implementation of minimize/maximize/close buttonsDaniel Eklöf2020-03-02-2/+45
|
* config: no need to free 'line' between each call to getline()Daniel Eklöf2020-03-02-14/+6
| | | | | | getline() will re-use the allocated line if it large enough, or resize it otherwise. Thus there's no need to free it and set it to NULL between each call.
* config: prefer $SHELL over /etc/passwdDaniel Eklöf2020-03-02-6/+10
| | | | | If the user hasn't configured a shell in footrc, use $SHELL. Only if that variable isn't set do we use the shell from /etc/passwd.
* config: make CSD user configurableDaniel Eklöf2020-03-02-5/+85
| | | | | | | | | | | | | | The user can now configure the following: * Whether to prefer CSDs or SSDs. But note that this is only a hint to the compositor - it may deny our request. Furthermore, not all compositors implement the decoration manager protocol, meaning CSDs will be used regardless of the user configuration (GNOME/mutter being the most prominent one). * Title bar size and color, including transparency * Border size and color, including transparency Also drop support for rendering the CSDs inside the main surface.
* config: change default geometry from 800x600 -> 700x500Daniel Eklöf2020-02-29-2/+2
| | | | | | | | If the display resolution *is* 800x600, using this size is bad since there will typically be panels and other things on the screen too. Not that 800x600 is something we expect to see in real life, but may happen on virtual displays.
* config: add default font when using the default configDaniel Eklöf2020-02-28-1/+1
| | | | | | When there is no configuration file, and we're using the default configuration, we accidentally jumped pasted the code that ensures we have at least "monospace" in the font list.
* main: geometry defaults to 800x600 pixelsDaniel Eklöf2020-02-25-2/+2
|
* config: add 'login-shell' optionDaniel Eklöf2020-02-20-0/+8
|
* config: add 'pad' option, default to 2Daniel Eklöf2020-02-15-0/+15
|
* Implement --holdDaniel Eklöf2020-02-03-0/+2
| | | | When specified, we don't exit when the slave/client process exits.
* config: enable user to specify path to configuration fileDaniel Eklöf2019-12-17-13/+20
|
* config: add 'server_socket_path' and set a default valueDaniel Eklöf2019-12-14-0/+14
|
* config: trim leading spaces from fontsDaniel Eklöf2019-12-05-2/+7
| | | | | | | | When splitting the font configuration into multiple font specifications, we now trim leading spaces. This makes no actual difference; fontconfig matched the fonts just fine anyway, but this looks better in the logs.
* config: change default bright5 and bright 6 colorsDaniel Eklöf2019-09-21-2/+2
| | | | | | | They where previously identical to the corresponding 'regular' colors. Now, we've done a saturated add with 0x202020 (which seems to be roughly the difference between the other regular and bright colors).
* config: change default 'regular0' colorDaniel Eklöf2019-09-21-1/+1
| | | | | 0x222222 appears to be more visible against the default background (0x111111) than 0x000000.
* config: turn info log message into a debug log messageDaniel Eklöf2019-08-23-1/+1
|
* colors: change default 'bright0' from 000000 -> 666666Daniel Eklöf2019-08-23-1/+1
|
* add config + command line option for setting initial window width/heightDaniel Eklöf2019-08-23-0/+15
|
* render: replace all usage of cairo with pixmanDaniel Eklöf2019-08-16-2/+2
|
* Add background alpha supportDaniel Eklöf2019-08-15-0/+25
|
* config: set to NULL before calling getline()Daniel Eklöf2019-08-12-0/+1
| | | | This fixes a crash on musl-based distros
* config: don't log a NULL pathDaniel Eklöf2019-08-12-2/+2
|
* config: remove old, commented out codeDaniel Eklöf2019-08-08-1/+0
|
* conf: make number of scrollback lines configurableDaniel Eklöf2019-08-01-0/+10
|
* config: remove commented out codeDaniel Eklöf2019-07-30-2/+0
|
* font: add support for fallback fontsDaniel Eklöf2019-07-30-4/+10
| | | | | | | | | | | | | | | A top-level font now has a list of fallback fonts. When a glyph cannot be found, we try each fallback font in turn, until we either find one that has the glyph, or until we've exhausted the list. To make this actually work in practise (read: to make performance acceptable), the cache is re-worked and is now populated on demand. It also supports non-ASCII characters, by using the 4-byte unicode character as index instead. Since having an array that can be indexed by a 4-byte value isn't really viable, we now have a simple hash table instead of an array.
* wip: initial multithreaded rendererDaniel Eklöf2019-07-29-9/+22
|
* conf: allow the user to configure a fixed cursor colorDaniel Eklöf2019-07-23-13/+51
| | | | | | | | | | | | | | | | | | | The default is to reverse the foreground/background colors in the cell with the cursor. But, if the user configures a specific set of cursor colors, those will always be used, regardless of other cell attributes (dim, reverse etc). The cursor color is specified as two color values, 'text' and 'cursor'. The block cursor uses the 'cursor' color as background, and the 'text' color for the glyph. All other cursor styles uses the 'cursor' color for the cursor, but uses the cell's foreground color for the glyph (meaning, dim/reverse/etc applies).
* conf: make cursor's default style configurableDaniel Eklöf2019-07-22-0/+35
|
* conf: don't fail to start when there's no configuration fileDaniel Eklöf2019-07-22-0/+1
|
* conf: remove debug loggingDaniel Eklöf2019-07-21-2/+0
|
* conf: misc valgrind fixesDaniel Eklöf2019-07-21-22/+44
|
* conf: fg/bg and all regular + bright colors are now configurableDaniel Eklöf2019-07-21-4/+70
|
* conf: config now provides the colors (though still only hardcoded colors)Daniel Eklöf2019-07-21-0/+50
|
* conf: TERM can now be set in footrcDaniel Eklöf2019-07-18-3/+9
|
* conf: repair debug build when LOG_ENABLE_DBG=0 in config.cDaniel Eklöf2019-07-17-1/+1
|
* conf: improve configuration file parsingDaniel Eklöf2019-07-17-14/+60
| | | | | | | * Strip whitespaces from keys and values * Detect (and ignore) comments * Detect syntax errors (no value specified etc) * Error out on syntax errors and invalid keys
* conf: add support for overriding shellDaniel Eklöf2019-07-17-0/+5
|
* conf: get user's shellDaniel Eklöf2019-07-17-0/+17
|
* conf: initial support for configuration fileDaniel Eklöf2019-07-16-0/+178
* Look for configuration file in (in this order): - XDG_CONFIG_HOME/footrc - ~/.config/footrc * Currently supports setting the font