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

Can't use remote control to set background opacity to 0 #7483

Closed
hectorBrown opened this issue May 28, 2024 · 2 comments
Closed

Can't use remote control to set background opacity to 0 #7483

hectorBrown opened this issue May 28, 2024 · 2 comments
Labels

Comments

@hectorBrown
Copy link

hectorBrown commented May 28, 2024

Describe the bug
When using kitty @ set-background-opacity 0, receive an error instead of the intended behaviour. All other background values work as normal. This seems to be just since version 0.35.0.

To reproduce

  1. Start kitty with minimal config:
allow_remote_control  yes
dynamic_background_opacity  yes
  1. Run kitty @ set-background opacity 0.
  2. Receive error message:
Traceback (most recent call last):
  File "/usr/bin/../lib/kitty/kitty/boss.py", line 707, in _execute_remote_command
    response = handle_cmd(self, window, pcmd, peer_id, self_window)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/../lib/kitty/kitty/remote_control.py", line 247, in handle_cmd
    ans = c.response_from_kitty(boss, self_window or window, PayloadGetter(c, payload))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/../lib/kitty/kitty/rc/set_background_opacity.py", line 75, in response_from_kitty
    boss._set_os_window_background_opacity(os_window_id, val)
  File "/usr/bin/../lib/kitty/kitty/boss.py", line 1328, in _set_os_window_background_opacity
    change_background_opacity(os_window_id, max(0.1, min(opacity, 1.0)))
                                                     ^^^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'float' and 'NoneType'

Error: '<' not supported between instances of 'float' and 'NoneType'

Environment details

kitty 0.35.0 created by Kovid Goyal
Linux hexdesk 6.6.32-1-lts #1 SMP PREEMPT_DYNAMIC Sat, 25 May 2024 20:20:51 +0000 x86_64
Arch Linux 6.6.32-1-lts (/dev/tty)

DISTRIB_ID="Arch"
DISTRIB_RELEASE="rolling"
DISTRIB_DESCRIPTION="Arch Linux"
Running under: X11
OpenGL: '4.6 (Core Profile) Mesa 24.0.8-arch1.1' Detected version: 4.6
Frozen: False
Paths:
  kitty: /usr/bin/kitty
  base dir: /usr/lib/kitty
  extensions dir: /usr/lib/kitty/kitty
  system shell: /usr/bin/zsh
Loaded config files:
  /etc/xdg/kitty/kitty.conf
  kitty.conf

Config options different from defaults:
allow_remote_control       yes
dynamic_background_opacity True

Important environment variables seen by the kitty process:
	PATH                                /home/hex/.pyenv/shims:/home/hex/.local/share/nvim/mason/bin:/home/hex/.local/share/gem/ruby/3.0.0/bin:/home/hex/.cabal/bin:/home/hex/.ghcup/bin:/home/hex/.local/bin:/usr/local/texlive/2022/bin/x86_64-linux:/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin:/bin:/home/hex/.go/bin:/home/hex/.spicetify
	LANG                                en_GB.UTF-8
	EDITOR                              /home/hex/.local/bin/no-padding nvim
	SHELL                               /usr/bin/zsh
	DISPLAY                             :0
	USER                                hex
	XDG_SEAT                            seat0
	XDG_SESSION_DESKTOP                 i3
	XDG_SESSION_TYPE                    x11
	XDG_SESSION_CLASS                   user
	XDG_VTNR                            2
	XDG_SESSION_ID                      1
	XDG_RUNTIME_DIR                     /run/user/1000
	XDG_DATA_DIRS                       /home/hex/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
@hectorBrown hectorBrown changed the title Can't use remote control to set opacity to 0 Can't use remote control to set background opacity to 0 May 28, 2024
@hectorBrown
Copy link
Author

For a temporary (kind of) fix, setting background opacity to some really small value (0.0000001) still works and has the same effect.

@hectorBrown
Copy link
Author

Thanks for the great terminal!

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

1 participant