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

Problems running a shell in a kitty window less than 4c high #3233

Closed
BitJam opened this issue Jan 11, 2021 · 4 comments
Closed

Problems running a shell in a kitty window less than 4c high #3233

BitJam opened this issue Jan 11, 2021 · 4 comments
Labels

Comments

@BitJam
Copy link

BitJam commented Jan 11, 2021

Describe the bug
I'm trying to create a terminal window 1c high to use as a powerful command launcher. I've been doing this for years with urxvt. If the kitty terminal window is less than 4c high then the prompt and the text I type in are not visible.

To Reproduce
Steps to reproduce the behavior:

  1. set initial_window_height to 1c in kitty.conf
  2. launch kitty with a shell that has a simple prompt
  3. the prompt and typed text don't appear but the command does execute
  4. Or just try to shrink a kitty window down to one line.

Expected behavior
I expect my shell prompt and typed text to appear in a terminal window that is 1c high.

Environment details
Linux, Gentoo stable, 5.4.83 kernel, e16-1.0.21 Enlightenment desktop, kitty-0.19.2.

Output of kitty --debug-config
kitty 0.19.2 created by Kovid Goyal
Linux xxxxxxxxxxxx 5.4.83 #1 SMP Fri Dec 11 15:34:48 -00 2020 x86_64
This is \n.\O (\s \m \r) \t
Loaded config files: /home/XXXXXXXXXX/.config/kitty/kitty.conf
Running under: X11

Config options different from defaults:
allow_remote_control y
background Color(red=28, green=40, blue=54)
color1 Color(red=249, green=85, blue=95)
color10 Color(red=52, green=187, blue=153)
color11 Color(red=255, green=255, blue=85)
color12 Color(red=88, green=156, blue=245)
color13 Color(red=231, green=85, blue=152)
color14 Color(red=57, green=120, blue=187)
color2 Color(red=32, green=175, blue=137)
color3 Color(red=253, green=240, blue=41)
color4 Color(red=88, green=156, blue=245)
color5 Color(red=147, green=77, blue=149)
color6 Color(red=30, green=158, blue=230)
color7 Color(red=187, green=187, blue=187)
color8 Color(red=84, green=84, blue=84)
color9 Color(red=250, green=139, blue=142)
cursor Color(red=187, green=187, blue=187)
dynamic_background_opacity True
enable_audio_bell False
font_size 12.5
foreground Color(red=255, green=255, blue=255)
initial_window_height (40, 'cells')
initial_window_width (100, 'cells')
remember_window_size False
selection_background Color(red=180, green=213, blue=255)
selection_foreground Color(red=28, green=40, blue=54)
tab_bar_edge 1
tab_bar_style separator
tab_separator |
update_check_interval 24.0

FWIW: here is the command line that gets executed to launch the kitty window (for the --debug-config above):

kitty --detach --title runbox-zsh --class=run-box
--config /home/xxxxxxxx/.config/kitty/kitty.conf
--config /home/xxxxxxxx/.config/kitty/run-box.conf bash --norc

The run-box.conf sets the initial_window_{height,width}

Additional context
I have the same problems with both bash and zsh as the shell. If I shrink a kitty window down to 1c height then the background gets screwed up sometimes and sometimes the font shrinks and usually the active line is not visible.

I've been doing this for many years using urxvt. I've fallen in love with kitty and I'm trying to convert all my terminal window tricks over to kitty. I'm fine with using urxvt for this particular trick indefinitely. Perhaps this is an edge case you don't want to deal with. It seemed like strange behavior so I thought you might like to know. It's as if kitty is trying to compensate for stupid user behavior but IMO wanting a 1c tall terminal window is more useful than stupid. YMMV.

@BitJam BitJam added the bug label Jan 11, 2021
@kovidgoyal
Copy link
Owner

works fine for me, in fact I use a one line kitty window as a desktop
panel https://sw.kovidgoyal.net/kitty/kittens/panel.html

@kovidgoyal
Copy link
Owner

kovidgoyal commented Jan 11, 2021

Have your shell rc file output a few newlines, the internal kitty buffer is always at least 4 lines high.

@BitJam
Copy link
Author

BitJam commented Jan 11, 2021

Thank you! I added a printf "\n\n\n\n\n" and that makes the prompt visible but the one line kitty window is still rather broken after I start typing. The background goes transparent and I get unwanted newlines showing up as I type. Really not usable.

OTOH, what did work was running a shell in a panel:

kitty +kitten panel sh -c 'printf "\n\n\n\n\n"; env ZDOTDIR=$HOME/.config/runbox-zsh zsh'

I glossed over panel mode when I first read the docs ("I'll never need that"). Is there some documentation you could point me to? I'm already using kitty terminals to run several different commands in transparent windows that are on the bottom layer on my desktop. I identify them by --class so e16 can place them and set the border style (borderless) and so on.

But there is still one sticking point using a shell in a panel. I really need to set the class and/or name of the shell panel so the e16 WM/DE can set the border style and other things. Using --title or --class doesn't work either before or after "+kitten panel". I can set the title in the custom .${SHELL}rc file but e16 really needs the class and/or the name to be set.

Also, I've been unable to set the width of the horizontal panel. Pulling in config files before "+kitten" didn't work. Adding "-o initial_window_width=80c" after "+kitten panel" didn't work either. If I can set the class then I can have e16 resize the window but I'd rather have the window open with the correct size to begin with. I'm sorry if this all seems nitpicky. Kitty is by far the best new-to-me program from the previous few years. It's a joy to discover all the wonderful things it can do.

kovidgoyal added a commit that referenced this issue Jan 11, 2021
@kovidgoyal
Copy link
Owner

kovidgoyal commented Jan 11, 2021 via email

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

No branches or pull requests

2 participants