Commit graph

2053 commits

Author SHA1 Message Date
Daniel Eklöf
51a9ff6b04
quirks: weston_csd_{on,off}: don't do anything in fullscreen mode 2020-03-12 09:39:53 +01:00
Daniel Eklöf
65ff582358
bindings: add minimize/maximize/fullscreen actions
These actions are by default not bound to anything.
2020-03-12 09:34:09 +01:00
Daniel Eklöf
1f904fc257
quirks: weston_csd_{on,off}: don't do anything in fullscreen mode 2020-03-12 09:31:25 +01:00
Daniel Eklöf
7ed90e3ec4
changelog: mention fix for #5 2020-03-11 20:18:47 +01:00
Daniel Eklöf
acecab1c8b
term: use logical DPI+scale factor when scaling fonts
This fixes an issue where the fonts were rendered too small when the
output had fractional scaling.

For integral scaling, using the logical (scaled) DPI multiplied with
the scaling factor results in the same final DPI value as if we had
used the physical DPI.

But for fractional scaling, this works around the fact that the
compositor downscales the surface after we've rendered it.

Closes #5
2020-03-11 16:10:55 +01:00
Daniel Eklöf
5a89ac67eb
config: add str_to_bool() 2020-03-11 16:10:14 +01:00
Daniel Eklöf
2be999a752
Merge branch 'master' into bindings 2020-03-10 18:21:48 +01:00
Daniel Eklöf
57fe26955f
changelog: updated to mention fix for #3
I really need to learn to update the changelog **with** the fix...
2020-03-10 18:17:14 +01:00
Daniel Eklöf
aa1aa0c09d
terminal: appky scale factor when force-resizing on font reload
If we don't, we'll end up e.g. increasing the window size when moving
the window between outputs with different scaling.

Closes #3
2020-03-10 18:07:12 +01:00
Daniel Eklöf
9049488acc
client: log path we actually tried to connect to (and failed) 2020-03-10 18:06:10 +01:00
Daniel Eklöf
1c42fadcf7
client: update --server-socket usage to mention XDG_SESSION_ID 2020-03-10 18:06:10 +01:00
Daniel Eklöf
270604b318
wayland: remove empty line 2020-03-10 18:06:10 +01:00
Daniel Eklöf
8a6cfb738b
shm: we don't really handle SHM failures, so just abort() 2020-03-10 18:06:10 +01:00
Daniel Eklöf
cf5da1039f
shm: mmap returns MAP_FAILED, so use that as guard value 2020-03-10 18:06:10 +01:00
Daniel Eklöf
867dc836ab
shm: set pool_fd=1 after closing it, to avoid double-closing on error 2020-03-10 18:06:10 +01:00
Daniel Eklöf
7efe2c6c97
shm: try to mmap with MAP_UNINITIALIZED
This flag is expected to be ignored on most systems, but can't hurt to
try.
2020-03-10 18:06:10 +01:00
Daniel Eklöf
1581143b0b
shm: log errno error message too 2020-03-10 18:06:09 +01:00
Daniel Eklöf
39571a32c6
changelog: update 2020-03-09 21:11:41 +01:00
Daniel Eklöf
214ef146a2
doc/foot.1: keyboard shortcuts: add pointer to foot(5) 2020-03-09 20:32:15 +01:00
Daniel Eklöf
dba880a088
doc/foot.5: document key bindings 2020-03-09 20:22:04 +01:00
Daniel Eklöf
c993148635
main: free config if we fail to load the config 2020-03-09 20:04:25 +01:00
Daniel Eklöf
048edc58f1
config: load custom key bindings
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.
2020-03-09 20:03:04 +01:00
Daniel Eklöf
0c72128405
input: parse_key_binding_for_action: export function 2020-03-09 19:47:22 +01:00
Daniel Eklöf
f78a8a77ed
input: parse_key_binding_for_action: repair LOG_DBG statement 2020-03-09 19:47:01 +01:00
Daniel Eklöf
fc7b3b2d85
Merge branch 'master' into bindings 2020-03-09 18:49:44 +01:00
Daniel Eklöf
25792a7e8c
server/client: add XDG_SESSION_ID to the default socket path
This allows multiple foot servers to run in multiple sessions.
2020-03-09 18:47:10 +01:00
Daniel Eklöf
6c6e3da7e2
term: init: no need to roundtrip 2020-03-09 18:46:50 +01:00
Daniel Eklöf
3e5f011f75
wayland: make a missing presentation time interface an error
If the user wanted to do presentation timing, and the interface isn't
there, then this is an error.
2020-03-09 18:46:09 +01:00
Daniel Eklöf
404365ec56
wayland: register FDM hook early, to avoid unregister errors when failing 2020-03-09 18:45:43 +01:00
Daniel Eklöf
217f16e434
.desktop: 'terminal' is not a common icon name
Not all icon themes have a 'terminal' icon. 'utilities-terminal' on
the other hand is a standardized icon name.
2020-03-09 18:44:43 +01:00
Daniel Eklöf
9e985cc358
footrc: add default key bindings
Note that we still don't parse this section.
2020-03-08 15:36:30 +01:00
Daniel Eklöf
cb21ede020
wayland: free 'search' key bindings on destroy 2020-03-08 15:30:05 +01:00
Daniel Eklöf
0d188895c3
search: add support for user configurable key bindings
No default bindings defined yet, though.
2020-03-08 15:28:47 +01:00
Daniel Eklöf
fcf4832775
input: convert the rest of the normal key bindings to configurable bindings
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.
2020-03-08 15:17:57 +01:00
Daniel Eklöf
18313dcbec
config: csd: error out on invalid key 2020-03-08 14:08:48 +01:00
Daniel Eklöf
3bc6db1e8c
scripts/generate-alt-random-writes: use TIOCGWINSZ instead of shutil 2020-03-08 13:52:59 +01:00
Daniel Eklöf
b22bb30976
wip: initial framework for dealing with key/mouse bindings in different modes
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.
2020-03-08 12:08:46 +01:00
Daniel Eklöf
8cf3cec920
README: only the bundled PKGBUILD requires tllist+fcft to be installed system-wide 2020-03-06 23:22:42 +01:00
Daniel Eklöf
d30449a36f
README: font size adjustments are in half point steps 2020-03-06 23:12:45 +01:00
Daniel Eklöf
b7959859f2
README: space separate AUR packages 2020-03-06 21:41:48 +01:00
Daniel Eklöf
bab11a3d38
README: fix markdown markup of AUR links 2020-03-06 21:41:17 +01:00
Daniel Eklöf
c02cde6401
README: add links to Arch AUR packages 2020-03-06 21:40:10 +01:00
Daniel Eklöf
52784c51ea
PKGBUILD: add '-git' postfix to package names 2020-03-06 21:36:36 +01:00
Daniel Eklöf
c33c7e6607
Merge branch 'releases/1.2' 2020-03-06 21:28:50 +01:00
Daniel Eklöf
07002bb941
meson/PKGBUILD/changelog: bump to 1.2.1 2020-03-06 21:21:34 +01:00
Daniel Eklöf
f5ceb958cd
generate-version: check for .git directory in *src* dir
Instead of trying to run `git --rev-parse --is-inside-work-tree`,
check if there's a .git directory under the source directory.

This should fix an issue where we incorrectly decided we where in a
foot git clone when we're just a subdirectory under another
repository.
2020-03-06 21:18:31 +01:00
Daniel Eklöf
c1e996c06c
README: add link to keyboard+mouse bindings issue 2020-03-06 20:25:49 +01:00
Daniel Eklöf
4c56c8c63d
meson/PKGBUILD/changelog: prepare for 1.2.0 2020-03-06 20:11:50 +01:00
Daniel Eklöf
6bc6bf4fb4
changelog: add all major changes for 1.2.0 2020-03-06 20:10:27 +01:00
Daniel Eklöf
f1c6ca8338
README: fix backtick 2020-03-06 20:10:04 +01:00