Alacritty opacity not working

Hello.

I changed the opacity line under window in the config to 0.0 for example, saved and exited, relaunched and it still has full opacity

.config/alacritty/alacritty.yml:

# Configuration for Alacritty, the GPU enhanced terminal emulator.

# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
env:
  # TERM variable
  #
  # This value is used to set the `$TERM` environment variable for
  # each instance of Alacritty. If it is not present, alacritty will
  # check the local terminfo database and use `alacritty` if it is
  # available, otherwise `xterm-256color` is used.
  TERM: xterm-256color

window:
  # Window dimensions (changes require restart)
  #
  # Specified in number of columns/lines, not pixels.
  # If both are `0`, this setting is ignored.
  dimensions:
    columns: 100
    lines: 30

  # Window position (changes require restart)
  #
  # Specified in number of pixels.
  # If the position is not set, the window manager will handle the placement.
  #position:
  #  x: 0
  #  y: 0

  # Window padding (changes require restart)
  #
  # Blank space added around the window in pixels. This padding is scaled
  # by DPI and the specified value is always added at both opposing sides.
  #padding:
  #  x: 0
  #  y: 0

  # Spread additional padding evenly around the terminal content.
  dynamic_padding: true

  # Window decorations
  #
  # Values for `decorations`:
  #     - full: Borders and title bar
  #     - none: Neither borders nor title bar
  #
  # Values for `decorations` (macOS only):
  #     - transparent: Title bar, transparent background and title bar buttons
  #     - buttonless: Title bar, transparent background, but no title bar buttons
  decorations: full

  # Startup Mode (changes require restart)
  #
  # Values for `startup_mode`:
  #   - Windowed
  #   - Maximized
  #   - Fullscreen
  #
  # Values for `startup_mode` (macOS only):
  #   - SimpleFullscreen
  #startup_mode: Windowed

  # Window title
  title: [email protected]

  # Opacity
  opacity: 0.0
  
  # Window class (Linux/BSD only):
  class:
    # Application instance name
    instance: Alacritty
    # General application class
    general: Alacritty

  # GTK theme variant (Linux/BSD only)
  #
  # Override the variant of the GTK theme. Commonly supported values are `dark` and `light`.
  # Set this to `None` to use the default theme variant.
  gtk_theme_variant: dark
inxi
inxi -Faz
System:    Kernel: 5.15.1-216-tkg-pds x86_64 bits: 64 compiler: gcc v: 11.1.0
           parameters: intel_pstate=passive BOOT_IMAGE=/@/boot/vmlinuz-linux-tkg-pds-generic_v3
           root=UUID=ef15347e-a4da-4628-afc3-2bff20cbb710 rw [email protected] quiet nvidia-drm.modeset=1 splash
           rd.udev.log_priority=3 vt.global_cursor_default=0 systemd.unified_cgroup_hierarchy=1
           resume=UUID=e7745511-30a0-4b3d-93c1-4bc3daa8b2b8 loglevel=3 sysrq_always_enabled=1 nowatchdog
           Desktop: KDE Plasma 5.23.3 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux
           base: Arch Linux
Machine:   Type: Desktop Mobo: ASRock model: X470 Taichi serial: <filter> UEFI: American Megatrends v: P4.20
           date: 07/22/2020
Battery:   Device-1: hidpp_battery_0 model: Logitech Wireless Mouse MX Master 3 serial: <filter>
           charge: 100% (should be ignored) rechargeable: yes status: Discharging
           Device-2: ps-controller-battery-a0:ab:51:90:7e:70 model: N/A serial: N/A charge: N/A status: Charging
CPU:       Info: 6-Core model: AMD Ryzen 5 2600X bits: 64 type: MT MCP arch: Zen+ family: 17 (23) model-id: 8 stepping: 2
           microcode: 800820D cache: L2: 3 MiB
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 86488
           Speed: 4047 MHz min/max: 2200/3600 MHz boost: enabled Core speeds (MHz): 1: 4047 2: 4106 3: 4116 4: 4124 5: 4117
           6: 4078 7: 4065 8: 4080 9: 4124 10: 4120 11: 4125 12: 4125
           Vulnerabilities: Type: itlb_multihit status: Not affected
           Type: l1tf status: Not affected
           Type: mds status: Not affected
           Type: meltdown status: Not affected
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
           Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional, STIBP: disabled, RSB filling
           Type: srbds status: Not affected
           Type: tsx_async_abort status: Not affected
Graphics:  Device-1: NVIDIA GP104 [GeForce GTX 1080] vendor: Gigabyte driver: nvidia v: 495.44
           alternate: nouveau,nvidia_drm bus-ID: 0e:00.0 chip-ID: 10de:1b80 class-ID: 0300
           Display: x11 server: X.Org 1.21.1.1 compositor: kwin_x11 driver: loaded: nvidia display-ID: :0 screens: 1
           Screen-1: 0 s-res: 6400x2160 s-dpi: 102 s-size: 1594x543mm (62.8x21.4") s-diag: 1684mm (66.3")
           Monitor-1: HDMI-0 res: 3840x2160 hz: 60 dpi: 52 size: 1872x1053mm (73.7x41.5") diag: 2148mm (84.6")
           Monitor-2: DP-0 res: 2560x1080 dpi: 81 size: 798x334mm (31.4x13.1") diag: 865mm (34.1")
           OpenGL: renderer: NVIDIA GeForce GTX 1080/PCIe/SSE2 v: 4.6.0 NVIDIA 495.44 direct render: Yes
Audio:     Device-1: NVIDIA GP104 High Definition Audio vendor: Gigabyte driver: snd_hda_intel v: kernel bus-ID: 0e:00.1
           chip-ID: 10de:10f0 class-ID: 0403
           Device-2: Advanced Micro Devices [AMD] Family 17h HD Audio vendor: ASRock driver: snd_hda_intel v: kernel
           bus-ID: 10:00.3 chip-ID: 1022:1457 class-ID: 0403
           Device-3: Sony Wireless Controller type: USB driver: playstation,snd-usb-audio,usbhid bus-ID: 1-1.3:6
           chip-ID: 054c:0ce6 class-ID: 0300
           Sound Server-1: ALSA v: k5.15.1-216-tkg-pds running: yes
           Sound Server-2: sndio v: N/A running: no
           Sound Server-3: JACK v: 1.9.19 running: no
           Sound Server-4: PulseAudio v: 15.0 running: no
           Sound Server-5: PipeWire v: 0.3.40 running: yes
Network:   Device-1: Intel Dual Band Wireless-AC 3168NGW [Stone Peak] driver: iwlwifi v: kernel bus-ID: 08:00.0
           chip-ID: 8086:24fb class-ID: 0280
           IF: wlp8s0 state: down mac: <filter>
           Device-2: Intel I211 Gigabit Network vendor: ASRock driver: igb v: kernel port: d000 bus-ID: 0a:00.0
           chip-ID: 8086:1539 class-ID: 0200
           IF: enp10s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
           Device-3: Sony Wireless Controller type: USB driver: playstation,snd-usb-audio,usbhid bus-ID: 1-1.3:6
           chip-ID: 054c:0ce6 class-ID: 0300
           IF-ID-1: virbr0 state: down mac: <filter>
Bluetooth: Device-1: Intel Wireless-AC 3168 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 1-9:7 chip-ID: 8087:0aa7
           class-ID: e001
           Report: bt-adapter ID: hci0 rfk-id: 1 state: up address: N/A
Drives:    Local Storage: total: 2.27 TiB used: 2.81 TiB (123.7%)
           SMART Message: Unable to run smartctl. Root privileges required.
           ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 970 EVO 250GB size: 232.89 GiB block-size:
           physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: 2B2QEXE7 temp: 41.9 C
           scheme: GPT
           ID-2: /dev/nvme1n1 maj-min: 259:1 vendor: Samsung model: SSD 960 EVO 250GB size: 232.89 GiB block-size:
           physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: 3B7QCXE7 temp: 33.9 C
           scheme: GPT
           ID-3: /dev/sda maj-min: 8:0 vendor: Seagate model: ST2000DX002-2DV164 size: 1.82 TiB block-size:
           physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter> rev: CC41 scheme: GPT
Partition: ID-1: / raw-size: 215.45 GiB size: 215.45 GiB (100.00%) used: 126.76 GiB (58.8%) fs: btrfs dev: /dev/nvme0n1p2
           maj-min: 259:7
           ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.46%) used: 563 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1
           maj-min: 259:6
           ID-3: /home raw-size: 215.45 GiB size: 215.45 GiB (100.00%) used: 126.76 GiB (58.8%) fs: btrfs
           dev: /dev/nvme0n1p2 maj-min: 259:7
           ID-4: /var/log raw-size: 215.45 GiB size: 215.45 GiB (100.00%) used: 126.76 GiB (58.8%) fs: btrfs
           dev: /dev/nvme0n1p2 maj-min: 259:7
           ID-5: /var/tmp raw-size: 215.45 GiB size: 215.45 GiB (100.00%) used: 126.76 GiB (58.8%) fs: btrfs
           dev: /dev/nvme0n1p2 maj-min: 259:7
Swap:      Kernel: swappiness: 133 (default 60) cache-pressure: 50 (default 100)
           ID-1: swap-1 type: partition size: 17.18 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:8
           ID-2: swap-2 type: zram size: 15.61 GiB used: 390.5 MiB (2.4%) priority: 100 dev: /dev/zram0
Sensors:   System Temperatures: cpu: 50.5 C mobo: 36.0 C gpu: nvidia temp: 49 C
           Fan Speeds (RPM): fan-1: 0 fan-2: 1302 fan-3: 1307 fan-4: 1477 fan-5: 1203 gpu: nvidia fan: 16%
           Power: 12v: N/A 5v: N/A 3.3v: 3.28 vbat: 3.28
Info:      Processes: 451 Uptime: 1h 18m wakeups: 5 Memory: 15.61 GiB used: 10.13 GiB (64.9%) Init: systemd v: 249
           tool: systemctl Compilers: gcc: 11.1.0 clang: 13.0.0 Packages: pacman: 2161 lib: 564 flatpak: 0 Shell: fish
           v: 3.3.1 default: Bash v: 5.1.8 running-in: alacritty inxi: 3.3.08

Which file did you edit?

sorry should have mentioned that .config/alacritty/alacritty.yml

1 Like

There's nothing obviously wrong with the config file itself, so the only thing I can think of is that your compositor is disabled... :thinking:

my compositor is enabled as blur and other effects are working elsewhere something I also neglected to mention is this happened after doing a full config reset in garuda-assistant and this was working before then.

1 Like

Another user seems to have solved it with alacritty-git. There is still a pending problem on maximized window but the opacity seems ok.

EDIT:
Which version of alacritty do you have?
I have community/alacritty 0.9.0-1 which works fine but uses a different parameter:
background_opacity: 0.6 works fine for me.
chaotic-aur/alacritty-git 1:0.10.0.1891.ge648aae0-1 should, I think, work with opacity (as per your config file above)
The issue might occur because I see, at least in my system, that
/etc/skel/.config/alacritty/alacritty.yml
which is used for the reset, includes the value window.opacity, which is the one used by alacritty-git 1:0.10 and not background_opacity, used by alacritty 0.9.0-1.
So, in my opinion, if you install alacritty-git you should be fine.
Alternatively you could keep the non git version by try starting from scratch (it is all commented) copying /usr/share/doc/alacritty/example/alacritty.yml (which should have background_opacity, to be checked) into your .config/alacritty/alacritty.yml

4 Likes

To make it simpler, and avoid moving to alacritty-git, it looks like you could just edit .config/alacritty/alacritty.yml, comment opacity: 0.0 and add background_opacity: 0.6 (or whatever value).
That should be the only important difference.

3 Likes

strangely it still wouldnt work on the non git alacritty with background_opacity: 0.6 but upgrading to the git package and using opacity: 0.6 did work (my guess is that there was something else in the config from /etc/skel/ that was causing issues?

1 Like

Could be.
I think that the starting, but blank (everything commented), configuration was the one in /usr/share/doc/alacritty/example/alacritty.yml (see the wiki). Now overwritten by the new one from the -git package.
So, theoretically, you should have checked each single parameter there with your configuration file.
Therefore, if it works with -git now, just forget about it :slight_smile:

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.