Commit graph

116 commits

Author SHA1 Message Date
Mattias Eriksson
3919f87a75 Add back simple shade to unfocused windows 2024-01-17 18:44:40 +01:00
Mattias Eriksson
945581f515 Shading the background didn't work as expected, so not using that 2024-01-17 17:08:26 +01:00
Mattias Eriksson
0d1a2d2bc6 Cleanup not-needed terminal ids, when a pane is closed 2024-01-17 16:54:42 +01:00
Mattias Eriksson
9ed2dc45c4 Re-focus teminal after context drawer is closed 2024-01-17 16:48:15 +01:00
Mattias Eriksson
d3afe3f6bc Merge branch 'master_jammy' into split 2024-01-17 16:41:35 +01:00
Mattias Eriksson
1940f2c056 Support splitting of terminals using a Pane Grid 2024-01-17 16:09:56 +01:00
Mohammad AlSaleh
4e0e84a4b1 ansi-colors.sh: Add underlines
Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2024-01-16 11:36:05 -07:00
Mohammad AlSaleh
7a707c20aa ansi-colors.sh: Add dim colors
Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2024-01-16 11:36:05 -07:00
Mohammad AlSaleh
60b55a076d Support STRIKEOUT, UNDERCURL, and all underline styles
* Add `Metadata` struct to pass bg, underline_color, and flags info via
   metadata.
 * Keep and `IndexSet` of `Metadata` info in Terminal.
 * Use `Metadata` info to render STRIKEOUT, UNDERCURL, and all underline
   styles via `BgRect`.

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2024-01-16 11:36:05 -07:00
Jeremy Soller
7f37ede453
Allow specifying startup command with -e, --command, or -- 2024-01-14 12:33:28 -07:00
VandaLHJ
7fc962b93a Update cosmic_term.ftl PL translation
Added new functionality to match EN locale in this basic translation.
2024-01-13 14:26:06 -07:00
FAlexei
cc78404d24 Russian translation update 2024-01-13 14:22:28 -07:00
Mohammad AlSaleh
5159b130f9 Fix broken UI if font not found at startup
Change was not reflected in settings.

 Noticed while investigating #46.

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2024-01-12 12:42:51 -07:00
Jeremy Soller
c5c78b04f0
Update dependencies 2024-01-12 10:42:13 -07:00
Mohammad AlSaleh
e56e582f90 Add option for setting dim font weight
Allows users to set this to a value lower than default font weight.

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2024-01-12 10:40:10 -07:00
Mohammad AlSaleh
f34116f3f7 Support DIM
* Add a color deriver and derive dim colors for all themes.
 * Derive actual bright colors for the OneHalfDark theme while at it.
 * Use dim colors when the DIM flag is set.

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2024-01-12 10:40:10 -07:00
Jeremy Soller
679e7ee4f5
Fix searching for a single character 2024-01-11 16:20:15 -07:00
Jeremy Soller
b38927364c
Clear terminal selection on escape 2024-01-11 14:37:18 -07:00
Jeremy Soller
ac4472e45e
Fix warnings 2024-01-11 14:32:11 -07:00
Jeremy Soller
9b2ab1202a
Implement search 2024-01-11 14:31:20 -07:00
Jeremy Soller
928269a239
Add find stub 2024-01-11 13:20:16 -07:00
Jeremy Soller
8766819ea8
Update dependencies 2024-01-11 11:50:52 -07:00
Jeremy Soller
2a679ab96f
Fix warnings 2024-01-11 11:40:22 -07:00
Jeremy Soller
3f09e17156
Normalize scrollbar style with figma designs 2024-01-11 11:33:39 -07:00
Mohammad AlSaleh
0eea366410 Add LEFT‑TO‑RIGHT ISOLATE character to the beginning of lines
This zero-width char will force the shaper to treat detected RTL
 lines as LTR.

 RTL text would still be rendered correctly. But this fixes the wrong
 behavior of it being displayed aligned to the right.

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2024-01-11 10:00:04 -07:00
Mohammad AlSaleh
b161db94d1 Add a disabled-by-default toggle for using bright colors for bold text
Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2024-01-11 09:58:18 -07:00
Mohammad AlSaleh
fc6e2de78b Hide cursor if TermMode::SHOW_CURSOR is not set
Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2024-01-11 09:58:18 -07:00
Mohammad AlSaleh
bb95e28899 Support HIDDEN cells
Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2024-01-11 09:58:18 -07:00
Mohammad AlSaleh
7f5736f56a Use bright colors if bold
Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2024-01-11 09:58:18 -07:00
Mohammad AlSaleh
9188f3c0bf Use log::warn!() instead of println!()
This causes a functional change that may not be obvious.

 When running `cosmic-term` from a shell prompt as a detached
 process, `stdout`/`stderr` descriptors get deleted, and a `println!()`
 message would take the `cosmic-term` process down.

 No such an issue with log messages.

 This can be tested by running `htop` then exiting the tool, which
 would trigger a "TODO: CursorBlinkingChange" message.

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2024-01-10 17:07:32 -07:00
Mohammad AlSaleh
9b185c9610 Sleep for 50ms before sending first Message::TabNew
This fixes the issue of two tabs being created at startup.

 Should fix #36.

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2024-01-10 17:07:32 -07:00
Jeremy Soller
4bde45bcdc
Improve scrollbar 2024-01-10 16:17:52 -07:00
W
81a529bd5d i18n(sr-Cyrl): Update translation 2024-01-10 08:35:13 -07:00
W
7f94b02f56 i18n(sr-Latn): Update translation 2024-01-10 08:35:13 -07:00
Jeremy Soller
892dfb530a
Lower update-alternatives x-terminal-emulator priority to 40 2024-01-10 07:48:35 -07:00
Mohammad AlSaleh
4ec3e5b2f3 Consider stretch/weight settings advanced and hide them with a toggle
Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2024-01-09 17:18:04 -07:00
Mohammad AlSaleh
59804dc8ab Handle the case where configured font name is not available
This can happen if configured font name is uninstalled for example.

 Pick the first font name available if that's the case.

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2024-01-09 17:18:04 -07:00
Mohammad AlSaleh
5eba6eb4d6 Configurable font stretch, font weight, and bold font weight
* Store a font name => font faces map

 * Only list font names that have `NORMAL` and `BOLD` faces with
   `Normal` stretch. This will give us defaults and fall-backs that are
   guaranteed to always exist.

 * Filter by stretch first, with `Normal` chosen as the always existing
   default.

 * Then only list font weights supported by the font name stretch
   selected, for the normal and bold cases.

 * When changing the font name selected, the stretch/weight options
   will stay the same if supported by the new font name, or revert to
   the always existing fall-backs.

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2024-01-09 17:18:04 -07:00
Jeremy Soller
c74d5d6f56
Remove extra items from header 2024-01-09 13:48:12 -07:00
Mohammad AlSaleh
dfb86e4ce2 Handle Ctrl+key_code
`tmux` in `cosmic-term` is now usable.

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2024-01-09 10:23:19 -07:00
Jeremy Soller
db738371ac
Add menu 2024-01-09 10:16:32 -07:00
Jeremy Soller
a342ff266d Add x-terminal-emulator alternative 2024-01-07 08:20:43 -07:00
Jeremy Soller
46e1c82d41 Update dependencies 2024-01-06 20:56:26 -07:00
W
d9c2ab72eb i18n(sr-Cyrl): improvement to wording 2024-01-05 18:40:10 -07:00
W
c3d59ac46f i18n(sr-Latn): improvement to wording 2024-01-05 18:40:10 -07:00
Jeremy Soller
8f23044237
Update dependencies 2024-01-04 15:08:10 -07:00
Jeremy Soller
412acc2b70
Just set needs_update flag on mouse drag 2024-01-04 14:27:18 -07:00
Jeremy Soller
556c32e33f
Use flag to determine when terminal needs update, only update once before draw 2024-01-04 14:25:31 -07:00
VandaLHJ
bb0d11180d Add cosmic_term.ftl PL translation
There are no Polish translation, so i thought basic one would be welcome.
2024-01-03 13:28:04 -07:00
Mohammad AlSaleh
ff5c46cd19 Move zoom_adj to App so it doesn't persist between runs
Addresses comments from #22.

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2024-01-03 11:29:49 -07:00