index.md - sites - public wiki contents of suckless.org
 (HTM) git clone git://git.suckless.org/sites
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
       index.md (2180B)
       ---
            1 # Change Alpha
            2 
            3 A patch that allows for updating terminal transparency natively.
            4 
            5 ### Description
            6 
            7 This patch is an extension to the [alpha](https://st.suckless.org/patches/alpha) patch,
            8 which _must_ be applied prior.
            9 
           10 ### Notes
           11 
           12 * This patch assumes that the alpha variable is a float, which was only updated in alpha
           13 patch version 0.8.2 i.e., 0.8.2 is the minimum compatible version.
           14 * Don't forget to append "config.h" to the end of the rm command under the clean rule in
           15 Makefile if you are having issues running make install.
           16 
           17 ### Purpose
           18 
           19 Later versions of the default alpha patch provide a method of changing window opacity via
           20 the -A flag, however, with no method of querying the current alpha level, it is difficult
           21 to write scripts which increment or decrement this value. It is typically possible to update
           22 the opacity via your compositor, but not all compositors support this, and even if they do,
           23 your setup is still less portable at the end of the day. The
           24 [transset-df](https://aur.archlinux.org/packages/transset-df) package
           25 located in the AUR is the closest I've come to changing opacity on a per-window basis,
           26 however, it still requires writing a script and binding that script to some keys using a
           27 keybinding manager of some sort. Not to mention, it's fatal flaw - you cannot increase the
           28 opacity beyond the default value set with the alpha patch.
           29 
           30 ### Changelog
           31 * **20251027-0.9.3**: Fixes a bug where increasing opacity from certain alpha values (e.g. 0.85 → 0.95 → 1.05) caused the terminal to become fully transparent instead of opaque.
           32 The patch clamps alpha between 0.1 and 1.0 to prevent overflow and compositor misbehavior.
           33 
           34 ### Download
           35 
           36 #### Patch: alpha (0.8.5) + changealpha
           37 
           38 * [st-alpha-changealpha-0.1.diff](st-alpha-changealpha-20230519-b44f2ad.diff)
           39 * [st-alpha-changealpha-20251027-0.9.3.diff](st-alpha-changealpha-20251027-0.9.3.diff)
           40 
           41 #### Patch: changealpha
           42 
           43 * [st-changealpha-0.1.diff](st-changealpha-20230519-b44f2ad.diff)
           44 * [st-changealpha-20251027-0.9.3.diff](st-changealpha-20251027-0.9.3.diff)
           45 
           46 ### Author
           47 
           48 * Neil Kingdom - <neil@neilkingdom.xyz>
           49 * Abhishek Kumar - <abhiiishekparmar@gmail.com> (fixed transparency overflow issue)