50 Commits

Author SHA1 Message Date
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
Kovid Goyal
82f6fbff77
Add a --hold command line option to stay open after the child process exits
Fixes #667
2018-06-22 13:52:03 +05:30
Kovid Goyal
12cbcf1c17
Add an option to kitty.conf to specify a default startup session
Fixes #641
2018-06-16 08:14:11 +05:30
Kovid Goyal
2be45eeca3
More conf docs 2018-06-05 07:52:29 +05:30
Kovid Goyal
3fdf47c535
Allow specifying the width of the tall window in the Tall layout as a percentage of available space
Also remove the --window-layout option as it was redundant. Same effect
can be achieved using -o enabled_layouts=some_layout,*
2018-05-16 14:02:58 +05:30
Kovid Goyal
ce0db16479
Fix using kitty --single-instance to open a new window in a running kitty instance, not respecting the --directory flag. Fixes #429 2018-04-01 12:39:33 +05:30
Kovid Goyal
96d241e9f3
Fix enabled_layouts in session files not being respected 2018-02-20 10:01:41 +05:30
Kovid Goyal
6ad49bd7fb
Add an option to override the default shell 2018-01-09 16:28:46 +05:30
Kovid Goyal
d2fdb1c1eb
DRYer 2018-01-08 13:57:43 +05:30
Kovid Goyal
db92af68e9
Fix a couple of typos 2018-01-08 13:54:08 +05:30
Kovid Goyal
85a3da057f
Session file: Allow setting the title for windows 2018-01-08 12:47:47 +05:30
Kovid Goyal
c551384369
Session file: Allow specifying multiple cd directives per tab to have different windows launched with different working directories 2018-01-08 12:38:01 +05:30
Kovid Goyal
c5acd94456
Add new actions to open tabs/windows with the working directory set to the working directory of the current window
Fixes #237
2017-12-21 11:29:21 +05:30
Kovid Goyal
3cce9b1c38
... 2017-12-16 08:54:55 +05:30
Kovid Goyal
a0702f4a97
Add an option to set the window title
Fixes #201
2017-12-01 12:16:17 +05:30
Kovid Goyal
5a5d27077c
Shortcut to open new OSWindow
Note that rendering is still pretty buggy with multiple windows.
2017-12-01 12:15:34 +05:30
Kovid Goyal
1b67195b7c Allow naming of session tabs 2016-12-07 09:39:43 +05:30
Kovid Goyal
2a57eed39a Ensure there are no empty tabs in a startup session 2016-12-07 08:57:39 +05:30
Kovid Goyal
1b7e1d1504 Fix various bugs in the startup session code 2016-12-07 08:28:57 +05:30
Kovid Goyal
33d58fd7bc Implement startup sessions 2016-12-06 11:19:40 +05:30