Commit Graph

2070 Commits

Author SHA1 Message Date
Kovid Goyal
f067e9cd92 Make various goroutines panic-safe 2025-10-09 07:17:53 +05:30
Kovid Goyal
49d8b1a9d0 More work on image preview rendering 2025-10-08 22:00:12 +05:30
Kovid Goyal
a6335777d9 disk cache: add a path based API
This allows maintaining only a single cache entry per path when the
path's contents change.
2025-10-08 06:41:12 +05:30
Kovid Goyal
9f9216457e Only showing metadata needs to be in the interface 2025-10-07 14:12:40 +05:30
Kovid Goyal
f0040edff2 More work on image previews 2025-10-07 13:30:28 +05:30
Kovid Goyal
4af95b3c51 choose_files: start work on image previews 2025-10-07 11:11:42 +05:30
Kovid Goyal
9a4b52f8b9 diff kitten: Fix wheel_scroll_multiplier not being respected
Fixes #9054
2025-10-01 17:07:47 +05:30
Kovid Goyal
460d10902f Cleanup previous PR
The overrides were not being passed to the askpass kitten.
And we dont need to support backward compatibility for secrets with no
backend, since this feature has never been released.
2025-09-30 20:38:44 +05:30
NightWatcher
d02c63ac86 ssh kitten: add optional password and TOTP auto-fill via ssh.conf
Motivation: Some environments disallow or do not reliably accept one-way
pubkey-only auth, or require keyboard-interactive password + TOTP. This adds an
optional, host-scoped automation via kitty's native askpass to reduce repetitive
manual entry while preserving the ssh kitten UX.

- Add auth_config.go to parse password/totp_* from ssh.conf by host block
- Ignore these keys in main ssh.conf parser to avoid bad-line warnings
- Pass host/user to askpass for host-aware lookup
- Auto-answer password and OTP prompts in askpass; fallback to UI otherwise

Security: Secrets in ssh.conf are plain text; users should enforce strict
permissions or avoid storing passwords if unacceptable. Only login password/OTP
prompts are auto-answered; passphrases and host key confirmations are not.

feat(ssh): add secret backend support for auth passwords and TOTP secrets

Introduce support for specifying secret backends in SSH auth config, currently supporting only the "text" backend for storing secrets directly. This allows for future extensibility while maintaining backward compatibility by treating values without a backend as "text:<value>".

The changes include new fields in AuthEntry for backends, updated parsing logic in lineHandler, error handling for invalid backends, and normalization for existing configs. A new parseBackendSecret function handles the parsing with validation.
2025-09-30 17:31:16 +05:30
Kovid Goyal
ba96fa06fe Allow using defer in KittenMain 2025-09-30 11:20:37 +05:30
Kovid Goyal
7dae6e3945 ... 2025-09-30 08:40:30 +05:30
Kovid Goyal
d8b524c692 Cache parsing of command line specifications
Change option specification from dict to tuple for better performance
and immutability and better type checking.
2025-09-29 12:31:10 +05:30
alex-huff
a1e63ee87c hints: make default regex ignore trailing whitespace 2025-09-28 11:54:44 -05:00
Josh Frankel
a8aed5abeb Update documentation for kitty_override kitten quick_access_terminal 2025-09-27 14:38:12 -04:00
Kovid Goyal
8b8918ee4b Have toggling the quick access terminal via the kitten also move it to the active monitor 2025-09-23 07:31:42 +05:30
Kovid Goyal
41f6b443e6 Fix #9007 2025-09-22 13:20:41 +05:30
alex-huff
508df554ce fix 'incrementally_update_layer_shell_config' 2025-09-22 02:09:53 -05:00
Kovid Goyal
b9a8b64b32 Refactor previous PR
Move code to incrementally update lsc config into the kitten module do
that it is more likely to stay in sync with any future changes to the
kitten cli.
2025-09-22 11:54:23 +05:30
alex-huff
0daab6ab43 resize-os-window: fix '--incremental' option of 'os-panel' action
This commit addresses a few issues with the implementation of
'--incremental':
    - Unspecified settings are reset to their default value, which
      defeats the purpose of the option.
    - It is assumed that the names of options in 'LayerCLIOptions' map
      one to one with the names of fields in 'LayerShellConfig' but this
      isn't true. For example: The 'margin_top' cli option sets the
      'requested_top_margin' layer shell config.
    - When some options are set to a certain value, they force other
      options to be some value. The current implementation doesn't
      account for this.
    - The documentation is contradictory.
2025-09-22 00:10:42 -05:00
Kovid Goyal
7b0caaa491 ... 2025-09-21 10:26:37 +05:30
Kovid Goyal
591473d9c1 Fix #8997 2025-09-21 10:25:00 +05:30
Kovid Goyal
508ca700d8 Fix #8998 2025-09-21 10:10:51 +05:30
Kovid Goyal
e7514c68ae Fix updating panel configuration on visibility toggle and via remote control not working
Fixes #8984
2025-09-20 05:15:50 +05:30
Kovid Goyal
f98d5fce16 Remove multiple copies of imaging package
Move to an exiffix fork that does not depend on disintegration/imaging
Now we have only one copy of kovidgoyal/imaging package.
2025-09-19 21:41:23 +05:30
Kovid Goyal
9393eeb442 Fix #8984 2025-09-19 12:50:00 +05:30
Kovid Goyal
0d2b44ce17 Make go vet happy 2025-09-08 10:08:37 +05:30
Kovid Goyal
ecf7f0cab0 kitten diff: Fix incorrect rendering if diff completes before terminal responds to capabilities query 2025-09-02 11:29:55 +05:30
Kovid Goyal
7ff25fd77c Add an extra linenum-action so that the callback can use remote control without needing to turn it on globally 2025-08-29 17:13:56 +05:30
TomJGooding
bec29467c1 fix(show_key): fix typo in python exit message 2025-08-27 21:07:21 +01:00
Kovid Goyal
ba0cc0fa2c save_as_session: Implement saving of foreground process for remote shells run via ssh kitten 2025-08-22 21:14:33 +05:30
Kovid Goyal
1a25ca1545 Fix setting env vars in kssh cmdline that has no kitten directives 2025-08-22 20:56:41 +05:30
Kovid Goyal
e156a33543 Fix completion for paths starting with / 2025-08-16 06:43:41 +05:30
Kovid Goyal
23d8648f5d Add a new "file" mode to the ask kitten 2025-08-15 21:18:25 +05:30
Kovid Goyal
1544cab96f Fix #8901 2025-08-14 19:33:43 +05:30
Kovid Goyal
08f9c0c100 ... 2025-08-14 18:58:53 +05:30
Kovid Goyal
7ae0e8da62 ... 2025-08-12 20:50:09 +05:30
Kovid Goyal
be63598355 desktop-ui: Add config to control file chooser popup size
Fixes #8894
2025-08-12 20:47:26 +05:30
Kovid Goyal
c0c3a48b4a Cleanup previous PR 2025-08-04 20:31:31 +05:30
Nathan Monfils
dd7fa6b25a kitten desktop-ui: Do not create an empty *-portals.conf file
In the case where a portals.conf file does not exist in the user
configuration, there is nothing to patch; we should default to defining
the relevant portals for kitty.
2025-08-04 16:44:08 +02:00
Nathan Monfils
ff1c8ab917 kitten desktop-ui portal.go: Compat with XDG spec
1. Make sure we coalesce XDG_DATA_HOME as per the spec
  On my machine /etc/profile.d/flatpak.sh sets
  XDG_DATA_DIRS=$HOME/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
  but XDG_DATA_HOME is unset.

2. Update directory creation logic to find-or-create
   `enable_portal`'s current behavior is to first find a writable directory and
   write the portal definition to it, then fall back to creating a directory
   in the first available configuration directory.
   This is incorrect in the case where one of the locations in
   XDG_DATA_DIRS already has a directory, we should still prioritize
   XDG_DATA_HOME.
2025-08-04 16:41:58 +02:00
Kovid Goyal
0382463bcb Grab keyboard when running file chooser kitten via portal 2025-07-30 07:52:19 +05:30
Kovid Goyal
0f67ff37df Allow accepting the currently displayed parent directory by pressing ctrl+enter 2025-07-24 08:20:43 +05:30
Kovid Goyal
fd5876b94e Use SIMD to replace C0 control codes in Go code 2025-07-21 08:54:22 +05:30
Kovid Goyal
b980eb2726 Fix sort by dates initial application 2025-07-20 21:44:29 +05:30
Kovid Goyal
92988c19c0 ... 2025-07-20 19:30:26 +05:30
Kovid Goyal
bd0f55531f Implement previews for plain text files 2025-07-20 19:24:17 +05:30
Kovid Goyal
28fce006d6 Make highlight code fully re-useable 2025-07-20 15:37:03 +05:30
Kovid Goyal
2bdbbd909c Handle color scheme changes in choose-files kitten 2025-07-20 13:43:59 +05:30
Kovid Goyal
9068bbaba9 Make code to highlight file re-useable 2025-07-20 10:32:31 +05:30
Kovid Goyal
2e92d610d5 Implement metadata based previews in choose-files 2025-07-20 09:31:17 +05:30