Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to open new tab after set-color --reset #1326

Closed
sandervankasteel opened this issue Jan 22, 2019 · 3 comments
Closed

Unable to open new tab after set-color --reset #1326

sandervankasteel opened this issue Jan 22, 2019 · 3 comments

Comments

@sandervankasteel
Copy link

I've setup some shell scripts that hook in to SSH, for example; when I'm logging in as root to a particular set of servers, then I set the background of my kitty tab to red using: kitty @ set-colors background=#8B0000 and that's all working fine. However once I quit my SSH session a small little script get's executed which does the following;

#!/bin/bash

kitty @ set-colors --reset
kitty @ set-tab-title

That should reset the title of the tab and reset the colors to their values defined in kitty.conf. However once I run that script, I am unable to open new tabs and I'm getting the following Traceback:

Traceback (most recent call last):
  File "/usr/bin/../lib/kitty/kitty/boss.py", line 507, in dispatch_special_key
    return self.dispatch_action(key_action)
  File "/usr/bin/../lib/kitty/kitty/boss.py", line 567, in dispatch_action
    passthrough = f(*key_action.args)
  File "/usr/bin/../lib/kitty/kitty/boss.py", line 922, in new_tab
    self._create_tab(args)
  File "/usr/bin/../lib/kitty/kitty/boss.py", line 919, in _create_tab
    self._new_tab(args, as_neighbor=as_neighbor, cwd_from=cwd_from)
  File "/usr/bin/../lib/kitty/kitty/boss.py", line 912, in _new_tab
    return tm.new_tab(special_window=special_window, cwd_from=cwd_from, as_neighbor=as_neighbor)
  File "/usr/bin/../lib/kitty/kitty/tabs.py", line 524, in new_tab
    self._add_tab(Tab(self, special_window=special_window, cwd_from=cwd_from))
  File "/usr/bin/../lib/kitty/kitty/tabs.py", line 66, in __init__
    self.new_window(cwd_from=cwd_from)
  File "/usr/bin/../lib/kitty/kitty/tabs.py", line 238, in new_window
    window = Window(self, child, self.opts, self.args, override_title=override_title)
  File "/usr/bin/../lib/kitty/kitty/window.py", line 151, in __init__
    setup_colors(self.screen, opts)
  File "/usr/bin/../lib/kitty/kitty/window.py", line 100, in setup_colors
    opts.selection_foreground, opts.selection_background)
  File "/usr/bin/../lib/kitty/kitty/utils.py", line 55, in color_as_int
    return val[0] << 16 | val[1] << 8 | val[2]
TypeError: 'int' object is not subscriptable
@sandervankasteel
Copy link
Author

@kovidgoyal Can you explain to me why you closed the issue ?

@kovidgoyal
Copy link
Owner

because it is fixed byt he commit which closed this issue.

@sandervankasteel
Copy link
Author

Sorry, I totally missed that. My bad! Thanks for the awesome work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants