-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
navigating multiple tabs and windows with kitty @ ls output #6502
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
Comments
Thanks for the lightening new enhancement! It looks like the enhancement updates kitty @ ls to print out user defined variables for kitty windows (but not tabs). Does that imply that kitty already supports some or all of the function in https://iterm2.com/documentation-scripting-fundamentals.html#setting-user-defined-variables? If there is no documentation (as opposed to the more likely case of me being unable to find the docs), I'm fine with trying to read the source to figure out how kitty implements user defined variables. |
Yes it supports that escape sequence. |
I tried the nightly build along with printf "\033]1337;SetUserVar=%s=%s\007" user.foo Edit: set-user-vars looks like a VERY good idea! To be able to set user variables remotely opens up all sorts of integration potential! It also doesn't seem to be in the nightly build yet. Do I have to wait for 30.0 or build from source to get the function? Thanks so much! |
yes, it is and you dont need to use the escape codes, nightly has kitten @ set-user-var and --match var:x=y |
kitty @ set-user-var "var1=val1" showed up in kitty @ ls worked once I fully qualified the kitty command to actually pick up the nightly build! Initial thoughts: I may now move to running with the tab bar hidden so I can accumulate open ended amounts of tabs and can experiment with switching between them programatically. I run a lot of scripts and I'm hoping the user variables will allow me to automate a lot of window changes. I think user variables for tabs are not needed since I can determine what else is in the tab from the kitty @ ls output - probably better than by maintaining user defined variables at the tab level. Super! It will take me a while to work through all the potential benefits... |
I came to kitty from gnome-terminal and have retained gedit for convenience editing. With the kitty window user variables enabling me to accumulate windows without relying on visible tabs, it occurred to me that integrating the gedit script or recipe notes into the kitty tabs that contain the related command lines would considerably reduce unproductive changes between os windows. btw this was partly inspired by one of your introductory videos where you showed "less" running in kitty. I've selected kakoune as it's designed to run within terminal windows. This has considerably streamlined my editing/testing. In addition, after some kakoune learning curve, I think kakoune will be far more effective for me than gedit. You truly are helping to move the Linux terminal ecosystem forward so I've just contributed to support your work. |
You're welcome and thanks for the support
…On Sat, Aug 12, 2023 at 06:53:16PM -0700, gknittl wrote:
I came to kitty from gnome-terminal and have retained gedit for convenience editing. With the kitty window user variables enabling me to accumulate windows without relying on visible tabs, it occurred to me that integrating the gedit script or recipe notes into the kitty tabs that contain the related command lines would considerably reduce unproductive changes between os windows. btw this was partly inspired by one of your introductory videos where you showed "less" running in kitty. I've selected kakoune as it's designed to run within terminal windows. This has considerably streamlined my editing/testing. In addition, after some kakoune learning curve, I think kakoune will be far more effective for me than gedit.
You truly are helping to move the Linux terminal ecosystem forward so I've just contributed to support your work.
--
Reply to this email directly or view it on GitHub:
#6502 (comment)
You are receiving this because you modified the open/close state.
Message ID: ***@***.***>
--
_____________________________________
Dr. Kovid Goyal
https://www.kovidgoyal.net
https://calibre-ebook.com
_____________________________________
|
Is your feature request related to a problem? Please describe.
I typically run a dozen tabs with multiple kitty windows in many tabs. It gets to be challenging to find any given window, especially as tabs/windows are manually added/deleted/rearranged during usage. It would be helpful to have additional user fields to identify and classify the tab in the kitty @ ls JSON output beyond the tab "title":. It does seem to be possible to add user environment variables that show up in the kitty @ ls "env": object at the window (not tab) level.
Describe the solution you'd like
Ability to assign kitty JSON user variables (not shell environment variables) to a kitty tab, other than just the title. KItty environment variables look promising at a window level but it's not clear how to update them. I'd like to be able to run kitty @ ls and print a map of all the shells under the OS window and what they are being used for. I'd like to switch programatically to the shell associated with the specific task I want to work on next. It would be nice to be able to update the user fields that appear in kitty @ ls as tabs and shells are repurposed.
Describe alternatives you've considered
kitty @ launch --env var1=val1
does create var1 in the shell process of new window and var1 does show up in kitty @ ls
This looks like it could be used to identify/classify kitty windows and by extension their tabs.
However
running export var2=val2 in the new window
kitty @ ls "env": even with --all-env-vars does not list var2
cd to a new directory in the new window does show up in $PWD and PWD
kitty @ ls "env": continues to show the intial value of PWD
Is it possible to update the kitty @ ls "env": object after creating the window?
kitty @ ls "env": could store information about the parent tab, but not sure how to handle deleting, adding, rearranging windows under a tab. It seems that it would be helpful to have the ability to add user fields to the kitty @ ls JSON at the tab level as well as the windows level. Since the tab is not directly a shell process there don't need to be and perhaps can't be corresponding shell environment variables. At the tab level this would be just purely user JSON fields in the kitty data structure.
Presumably kitty already keeps the data that appears in kitty @ ls in some structure. Is there already an interface to update this structure? perhaps via a kitten?
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: