hikarin522 / GlassIt-VSC

VS Code Extension to set window to transparent on Windows platform.
https://marketplace.visualstudio.com/items?itemName=s-nlf-fh.glassit
MIT License
203 stars 21 forks source link

Add support for sway #44

Closed ckcr4lyf closed 1 year ago

ckcr4lyf commented 1 year ago

Sway is a DE based on Wayland, so the xorg / xprop technique doesn't work.

Instead, we can directly call swaymsg with the opacity, between 0 & 1.

I just added a boolean config which sway users can turn on. This will bypass all xorg/xprop checks.

image

Tested on my machine with following specs ``` $ neofetch -` raghu@arch .o+` ---------- `ooo/ OS: Arch Linux x86_64 `+oooo: Host: 20Q0S05E00 ThinkPad X390 `+oooooo: Kernel: 6.1.4-arch1-1 -+oooooo+: Uptime: 2 days, 5 hours, 32 mins `/:-:++oooo+: Packages: 1039 (pacman) `/++++/+++++++: Shell: bash 5.1.16 `/++++++++++++++: Resolution: 2560x1440 `/+++ooooooooooooo/` WM: sway ./ooosssso++osssssso+` Theme: Adwaita [GTK2/3] .oossssso-````/ossssss+` Icons: Adwaita [GTK2/3] -osssssso. :ssssssso. Terminal: alacritty :osssssss/ osssso+++. Terminal Font: TerminessTTF Nerd Font Mono /ossssssss/ +ssssooo/- CPU: Intel i7-8565U (8) @ 4.600GHz `/ossssso+/:- -:/+osssso+- GPU: Intel WhiskeyLake-U GT2 [UHD Graphics 620] `+sso+:-` `.-/+oso: Memory: 8935MiB / 15686MiB `++:. `-/+/ .` `/ ```

Note: I had to remove all reference to SVG files, otherwise I couldn't compile the extension.

Edit: Fixes #43

ckcr4lyf commented 1 year ago

This is a demo of the transparency in action:

image

hikarin522 commented 1 year ago

LGTM

thanks