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

Improved/Fixed kitty support #397

Merged
merged 5 commits into from May 3, 2019

Conversation

@Djent-
Copy link
Contributor

Djent- commented Mar 22, 2019

Pywal's method of updating kitty's colors does not work properly.

The first issue is that changes would not happen due to kitty @ * not working from Python's os.Popen. This was solved by using os.call. Another issue arose from this fix - calling wal from a non-kitty terminal would hang and error out due to lack of access to kitty commands (this was also likely silently happening with Popen). The additional clause and os.getenv('TERM') == 'xterm-kitty' was added to correct for this.

The second issue is that running kitty @ set-colors --all doesn't do anything without additional arguments. os.path.join(CACHE_DIR, "colors-kitty.conf") is passed to this kitty command to apply the new colors.

The third issue is that changes only take affect in the window wal is run in, due to kitty's remote control support - this is not an issue that can be solved with pywal; recommendations should be made to open kitty terminals with the commandline options --single-instance or -1, and with allow_remote_control yes in kitty.conf. These additional settings allow all kitty terminals to be synchronized, but there may be security implications.

This pull request also features an update to colors-kitty.conf which configures additional kitty colors.

djent- added 2 commits Mar 22, 2019
…stance to affect all open kitty windows. Only works when wal is run from kitty.
@WillEccles

This comment has been minimized.

Copy link
Contributor

WillEccles commented Apr 4, 2019

I would recommend not making that change to the colors-kitty.conf, mainly because some users (me, for example) wouldn't want the border colors to be set to those specific ones. I think the best approach is settings background, foreground, etc. and then if the user wants, they can add those other things after importing from colors-kitty.conf. Just my two cents.

@WillEccles

This comment has been minimized.

Copy link
Contributor

WillEccles commented Apr 4, 2019

Actually, I take that back. Upon further consideration, this makes more sense.

Djent- added 3 commits May 2, 2019
@Djent-

This comment has been minimized.

Copy link
Contributor Author

Djent- commented May 2, 2019

With all checks passing, this pull request is ready to be merged.

This pull request, in short, allows pywal to update the tab bar and window border colors in the kitty terminal.

Please test in kitty version >=0.12.2.

@dylanaraps dylanaraps merged commit b63e4f2 into dylanaraps:master May 3, 2019
1 check passed
1 check passed
Travis CI - Pull Request Build Passed
Details
@dylanaraps

This comment has been minimized.

Copy link
Owner

dylanaraps commented May 3, 2019

LGTM 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.