Commit Graph

69 Commits

Author SHA1 Message Date
Kovid Goyal
0fb1f17af9 Have --hold wait at a shell prompt 2023-06-26 11:21:57 +05:30
Kovid Goyal
5ff1dadf0d Allow using --session=none to override startup_session
Fixes #6131
2023-03-25 10:44:34 +05:30
Kovid Goyal
de188faf55 Fix #6048 2023-02-22 19:51:33 +05:30
pagedown
ba83ce7b10 macOS: Display the newly created OS window in specified state
Fix the maximized window can't occupy full screen space when window
decoration or title bar is hidden.
Fix resize_in_steps being applied even when window is maximized.
Allows to specify `os_window_state` in startup session file.
2023-02-18 14:02:19 +08:00
Kovid Goyal
60791bb57b Session files: Expand environment variables 2023-01-23 17:34:53 +05:30
Kovid Goyal
6b8e5ea225 Rename kitty-tool to kitten
It's easier to type, and cuter.

Also, most, if not all of the TUI parts of
kitty's kittens will eventually be re-written into kitten.

The only downside I can see is that we cant tab complete kitty
anymore, but hopefully there will be less reason to run kitty
from the shell as command line tools migrate to kitten.

Meowrrrr!!!
2023-01-14 15:44:52 +05:30
Kovid Goyal
7fe5d7b58f Replace isort with ruff 2023-01-09 16:47:42 +05:30
Kovid Goyal
f5d2c35755 Move implementation of +hold to Go
No need to pay python interpreter startup cost for --hold
2022-12-01 22:34:56 +05:30
Kovid Goyal
6741ac2087 Sessions: Allow controlling which OS Window is active via the focus_os_window directive 2022-09-10 08:27:36 +05:30
Kovid Goyal
f15a2f0c1f Change --session to resolve relative paths from the kitty config dir 2022-08-09 12:36:16 +05:30
Kovid Goyal
646a524c8e Sort imports 2022-06-14 20:06:12 +05:30
Kovid Goyal
f8d01d2c4f Use the same parser for resize_window actions and session setting 2022-06-14 20:03:21 +05:30
Kovid Goyal
1d846f3744 Cleanup previous PR
Merge branch 'session-resize-window' of https://github.com/sirno/kitty
2022-06-14 19:59:01 +05:30
Nicolas Ochsner
6bbe58f876 Change to pass window specs. 2022-06-14 12:28:41 +02:00
Nicolas Ochsner
36719fb086 Cleanup. 2022-06-14 11:23:35 +02:00
Nicolas Ochsner
78fd7a8458 Enable resizing in session files. 2022-06-14 11:09:26 +02:00
Kovid Goyal
c9ef4aa8c8 Sessions: Fix os_window_size and os_window_class not applying to the first OS Window
Fixes #4957
2022-04-12 21:38:29 +05:30
Kovid Goyal
72b1996423 Allow different kinds of cwd requests 2022-03-17 10:24:34 +05:30
Kovid Goyal
8f77cc65e2 Use a full window object rather than a child PID to get cwd
This allows implementation of more sophisticated algorithmhs
for getting the cwd
2022-03-15 07:58:57 +05:30
Kovid Goyal
6546c1da9b run pyupgrade to upgrade the codebase to python3.6 2021-10-21 12:43:55 +05:30
Kovid Goyal
166ea9deb9 A new watcher option for kitty.conf that replaces the old --watcher cli flag
Applies to all windows, not just initial ones.
2021-09-29 14:01:30 +05:30
Kovid Goyal
2d7032973c Change the semantics of --title slightly
Now it no longer overrides the titles of windows/tabs created in the
session. This allows windows/tabs to have their own titles while fixing
the OS Window's title.
2021-08-03 09:51:53 +05:30
Kovid Goyal
6d7df1c5e8 Refactor configuration file parsing
Now the time for importing the kitty.config module has been halved, from
16ms from 32ms on my machine. Also, the new architecture will eventually
allow for auto generating a bunch of python-to-C boilerplate code.
2021-05-31 17:40:49 +05:30
Kovid Goyal
5470dd74bd Move options code into its own directory 2021-05-31 17:40:48 +05:30
Kovid Goyal
d7aa9952d8 Fix a regression that caused using the `title` command in session files to stop working
Fixes #3676
2021-05-31 09:31:29 +05:30
Kovid Goyal
fe94f4cbb4 Move type parsers for config into own module 2021-05-24 22:29:28 +05:30
Kovid Goyal
cbf33fa14b Fix #3523 2021-04-23 16:23:13 +05:30
Kovid Goyal
35517d3e6f Allow using the full launch command in session files
Note this is slightly backward incompatible.
2021-01-31 11:37:00 +05:30
Kovid Goyal
26974b1f3a Dont ignore --title when using an empty session
Fixes #3055
2020-10-25 18:53:57 +05:30
Kovid Goyal
392c31f5fe Allow specifying watchers in session files and via a command line argument 2020-08-23 10:41:36 +05:30
Kovid Goyal
4b0724530e Fix #2912 2020-08-11 14:19:32 +05:30
Kovid Goyal
55e15dc79e Properly type check os window initial size function
Also use the sizes specified int he session file in preference to those
specified on the command line. Fixes #2909
2020-08-11 09:28:53 +05:30
Kovid Goyal
f6ece6522e Fix a regression that broke specifying OS window size in the session file
Fixes #2908
2020-08-10 21:55:54 +05:30
Kovid Goyal
8093d70643 Allow setting the class for new OS windows in a session file 2020-07-18 12:11:41 +05:30
Kovid Goyal
50d9718c68 Start work on refactoring management of windows 2020-05-12 22:43:53 +05:30
Kovid Goyal
c69b8870d2 Allow individually setting margins and padding for each edge (left, right, top, bottom) 2020-04-19 09:36:26 +05:30
Kovid Goyal
1f1b52b580 Fix specifying options for layouts in the startup session file not working
Fixes #2520
2020-04-09 12:40:09 +05:30
Kovid Goyal
382c31ddf2 Use a stub rather than TYPE_CHECKING 2020-03-15 13:27:40 +05:30
Kovid Goyal
d3f37eeba4 more typing work 2020-03-14 11:42:05 +05:30
Kovid Goyal
3b36470e84 When resolving scrollback pager if it is not present in system PATH try using shell PATH 2020-02-03 08:03:35 +05:30
Luflosi
527ff0238a Replace all instances of EnvironmentError with OSError
According to the text just above https://docs.python.org/3/library/exceptions.html#EnvironmentError, `EnvironmentError` has been an alias of `OSError` since Python 3.3. Replacing it makes the code more consistent since `OSError` is used in other places in the code too.
2020-01-11 16:47:36 +01:00
Kovid Goyal
70c2765a6e Allow reading session file from STDIN 2019-09-08 15:20:37 +05:30
Kovid Goyal
bdade7e151 Use a new controlling terminal when reading shell environment
This is because some people do things in their rc files based
on checking the name of the controlling terminal.
2019-07-31 11:34:54 +05:30
Luflosi
a792c94ccf Use python3 shebang for all python scripts
Fixes #1624.
Use python3 shebang for all python scripts as python still defaults to python2 on many systems.
2019-05-20 14:44:24 +02:00
Kovid Goyal
dbeac923ed oops 2019-04-13 18:37:06 +05:30
Kovid Goyal
96f5c66755 Allow setting OS window size in session files 2019-04-02 20:20:39 +05:30
Kovid Goyal
4baf7b5bba Allow creating new OS windows in session files
Fixes #1514
2019-04-02 19:57:09 +05:30
Kovid Goyal
1f63ff1d41 Have the kitty --title flag apply to all windows created using kitty --session
Fixes #921
2018-09-09 10:49:20 +05:30
Daniel Hahler
2cc2f803f1 create_session: handle args=None
Fixes `new_os_window`:

    scancode: 0x39 release: 0 clean_sym: n composed_sym: N mods: ctrl+shift glfw_key: N
    Traceback (most recent call last):
      File "…/Vcs/kitty/kitty/boss.py", line 431, in dispatch_special_key
        return self.dispatch_action(key_action)
      File "…/Vcs/kitty/kitty/boss.py", line 487, in dispatch_action
        passthrough = f(*key_action.args)
      File "…/Vcs/kitty/kitty/boss.py", line 199, in new_os_window
        self._new_os_window(args)
      File "…/Vcs/kitty/kitty/boss.py", line 195, in _new_os_window
        startup_session = create_session(self.opts, special_window=sw, cwd_from=cwd_from)
      File "…/Vcs/kitty/kitty/session.py", line 127, in create_session
        if args.hold:
2018-06-23 02:57:47 +02:00
Kovid Goyal
aba84581f5 When running kitty from within kitty, use a full path
Fixes inability to run kitty from the shell when the users shell scripts
reset PATH. See #668
2018-06-22 15:33:07 +05:30