kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
24.62k stars 987 forks source link

Open GUI from kitty not a standalone window #4389

Closed NextAlone closed 2 years ago

NextAlone commented 2 years ago

Describe the bug When exec some python scripts, open gui like figures, it shows inside kitty, not a new standalone window, so that cant see the output in kitty, cause it replaced with figures, but other terminal open a new window to show that. Is there some config that i didn't notice or you design it like this.

Environment details

kitty 0.23.1 (f9af273150) created by Kovid Goyal
Linux next 5.15.11-arch2-1 #1 SMP PREEMPT Wed, 22 Dec 2021 09:23:54 +0000 x86_64
Arch Linux 5.15.11-arch2-1 (/dev/tty2)

LSB_VERSION=1.4
DISTRIB_ID=Arch
DISTRIB_RELEASE=rolling
DISTRIB_DESCRIPTION="Arch Linux"
Running under:X11
Frozen: False
Paths:
  kitty: /usr/bin/kitty
  base dir: /usr/lib/kitty
  extensions dir: /usr/lib/kitty/kitty
  system shell: /usr/bin/fish
Loaded config files:
  /home/nextalone/.config/kitty/kitty.conf

Config options different from defaults:
allow_remote_control       y
copy_on_select             clipboard
cursor                     None
cursor_blink_interval      0.0
cursor_shape               3
cursor_stop_blinking_after 0
enable_audio_bell          False
font_family                Victor Mono Medium
font_features:
{'VictorMono-Medium': ('+ss01',)}
font_size                  12.0
linux_display_server       x11
listen_on                  unix:@mykitty
mouse_hide_wait            -1.0
remember_window_size       False
scrollback_lines           4294967295
selection_background       None
shell_integration          frozenset({'no-cursor'})
strip_trailing_spaces      smart
update_check_interval      24.0
window_padding_width       FloatEdges(left=5.0, top=5.0, right=5.0, bottom=5.0)
Added shortcuts:
    shift+super+w close_os_window
Colors:
    background                 #2e3440   
    color0                     #3b4252   
    color1                     #bf616a   
    color10                    #a3be8c   
    color11                    #ebcb8b   
    color12                    #81a1c1   
    color13                    #b48ead   
    color14                    #8fbcbb   
    color15                    #eceff4   
    color2                     #a3be8c   
    color3                     #ebcb8b   
    color4                     #81a1c1   
    color5                     #b48ead   
    color6                     #88c0d0   
    color7                     #e5e9f0   
    color8                     #4c566a   
    color9                     #bf616a   
    foreground                 #d8dee9   

Additional context Works the same when ==config NONE

kovidgoyal commented 2 years ago

What opens where is entirely dependent on your shell and what commands you are running, not the terminal emulator.

NextAlone commented 2 years ago

but the same commands works differently in other terminal like alaricity

kovidgoyal commented 2 years ago

I dont see how that's possible. When you run a command it is executed by your shell not the terminal. In any case it would help if you posted a command you are running.

NextAlone commented 2 years ago

just like this simple python script it open figure in kitty not a new window

update: test in xterm and alaritty works correctly, but wrongly in kitty

#!/usr/bin/env python
# -*- coding: utf-8 -*-

from pylab import figure, axes, pie, title, show

figure(1, figsize=(6, 6))
ax = axes([0.1, 0.1, 0.8, 0.8])

labels = 'Frogs', 'Hogs', 'Dogs', 'Logs'
fracs = [15, 30, 45, 10]

explode = (0, 0.05, 0, 0)
pie(fracs, explode=explode, labels=labels, autopct='%1.1f%%', shadow=True)
title('Raining Hogs and Dogs', bbox={'facecolor': '0.8', 'pad': 5})

show()  
kovidgoyal commented 2 years ago

that will be because pylab is taking advantage of kittys graphics support to draw the image inline. If you dont want it to, configure it not to do that.

NextAlone commented 2 years ago

that will be because pylab is taking advantage of kittys graphics support to draw the image inline. If you dont want it to, configure it not to do that.

and other programs, like android emulator, ros(robort system) qt gragh

but it shows gui, not a simple image

kovidgoyal commented 2 years ago

There is no way A Qt program is displaying inside a terminal.

NextAlone commented 2 years ago

https://user-images.githubusercontent.com/12210746/147310937-62b2650f-b311-4331-ba72-29f5df65031f.mp4

just see this record

NextAlone commented 2 years ago

this is the same command in alacritty and xterm https://user-images.githubusercontent.com/12210746/147311086-0f430ce4-0fa5-4d39-acb0-0c72f759d497.mp4

https://user-images.githubusercontent.com/12210746/147311141-22066c8f-5916-4072-b503-5434e5dfd5e0.mp4

NextAlone commented 2 years ago

rosrun rqt_image_view rqt_image_view in ros-noetic-rqt-image-view

NextAlone commented 2 years ago

rosrun rqt_image_view rqt_image_view in ros-noetic-rqt-image-view

and other like mpv (a video player), all show in kitty instead of a new window

kovidgoyal commented 2 years ago

I dont see anything showing in kitty in your video. Your window manager is simply overlaying the GUI on top of the kitty. indow.

NextAlone commented 2 years ago

I dont see anything showing in kitty in your video. Your window manager is simply overlaying the GUI on top of the kitty. indow.

no, its in tile mode, not on the top of kitty

NextAlone commented 2 years ago

I dont see anything showing in kitty in your video. Your window manager is simply overlaying the GUI on top of the kitty. indow.

see the above video in xterm and alacritty show what diff with kitty

NextAlone commented 2 years ago

I dont see anything showing in kitty in your video. Your window manager is simply overlaying the GUI on top of the kitty. indow.

no, its in tile mode, not on the top of kitty

https://user-images.githubusercontent.com/12210746/147312237-864c212c-f6b2-4eaa-840f-6b8b098a24f0.mp4

NextAlone commented 2 years ago

i'll find if it's affacted by my window manager to swallow window

NextAlone commented 2 years ago

sorry for distubing, and i found it's my dwm's setting, it swallow new windows open by kitty. thanks for your work