sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

index.md (4855B)


      1 Alpha Focus Highlight
      2 =====================
      3 Patch for suckless' simple terminal (`st`), which allows the user to specify two distinct opacity values / background colors; one for the focused- and one for unfocused windows' background.
      4 This enables the user to spot the focused window at a glance.
      5 The patch is based on the [alpha patch](https://st.suckless.org/patches/alpha/); i.e. is to be
      6 applied after applying the alpha patch.
      7 
      8 The patch is released [on this release page](https://github.com/juliusHuelsmann/st/releases) and
      9 [on the suckless page](https://st.suckless.org/patches/alpha_focus_highlight/).
     10 Please [leave a star](https://github.com/juliusHuelsmann/st-focus).
     11 
     12 Contributions & Bug Reports
     13 ---------------------------
     14 * [Report / Solve Patching issues](https://github.com/juliusHuelsmann/st) with a new version of `st`
     15 * [Contributions and Bug reports](https://github.com/juliusHuelsmann/st-focus)
     16 
     17 Building, customizing and installing the patch
     18 ----------------------------------------------
     19 **1. Optional Dependencies**
     20 The opacity functionality of this patch requires an `X composite manager` (e.g. `picom`, `compton`,
     21 `xcompmgr`), which can for instance be installed via `sudo pacman -S picom` on Arch Linux and
     22 launched via `picom -b`.  *The composite manager has to be relaunched after booting*.
     23 
     24 **2. Applying the patch**
     25 Apply the patch to `st`'s source code and build code via `patch < [PATCH_NAME]`
     26 
     27 **3. Customization**
     28 This patch performs changes in the `config.def.h` file, which need to be manually merged into a
     29 pre-existing custom `config.h` file. The following four variables can be adapted:
     30 - `alpha`/`alphaUnfocused` opacity of the terminal when focused / not focused.
     31 - `bg`/`bgUnfocused` background color when focused / not focused.
     32 
     33 **4. Build & install** `make; sudo make install`
     34 
     35 Download
     36 --------
     37 If you want to try out the current version of the patch before patching your own build,
     38 check out [this repository](https://github.com/juliusHuelsmann/st), which contains a
     39 merged version of this patch with a reasonable configuration.
     40 
     41 The patch comes
     42 1. merged into the alpha patch (`alpha + focus`) or
     43 2. for patching on top of an already applied alpha patch (`focus`)
     44 
     45 I recommend downloading the alpha patch from the
     46 [alpha patch](https://st.suckless.org/patches/alpha/) page and using `Patch: focus`, that way you
     47 make sure that you apply the latest version of the alpha patch.
     48 
     49 Note that patch errors can occur when the code in the st repo is updated.
     50 Please report an Issue or contribute a merged patch in that case.
     51 
     52 Patch: alpha + focus
     53 --------------------
     54 
     55 **st-0.9**
     56 - [Version 2(attached)](st-focus-20230610-68d1ad9.diff)
     57 - Most recent release [st-focus-20230610-68d1ad9.diff Github](https://github.com/juliusHuelsmann/st/releases/download/alpha_09/st-focus-20230610-68d1ad9.diff)
     58 
     59 **st-0.8.3**
     60 - [Version 1 (attached)](st-focus-20200731-43a395a.diff)
     61 - Most recent release: [st-focus-20200530-43a395a.diff Github](https://github.com/juliusHuelsmann/st/releases/download/v2/st-focus-20200731-43a395a.diff)
     62 
     63 ---
     64 
     65 Patch: focus
     66 ------------
     67 
     68 **st-0.8.3**
     69 - [Version 1 (attached)](st-focus-20200731-patch_alpha.diff)
     70 - Most recent release: [st-focus-20200530-patch_alpha.diff (Github)](https://github.com/juliusHuelsmann/st/releases/download/v2/st-focus-20200731-patch_alpha.diff)
     71 
     72 
     73 MISC
     74 ----
     75 **Note:** The benefit of the `alpha` patch and the `Alpha Focus Highlight` patch are the ability to
     76 restrict the transparency only to the background color currently in use, hence keeping the font in
     77 the foreground solid and readable.
     78 
     79 If the goal is to apply transparency independent on the content, you do not require any patch for
     80 `st`, instead add
     81 `
     82 inactive-opacity = 0.2;
     83 active-opacity = 0.8;
     84 `
     85 to your `picom` configuration file and keep a vanilla `st` build.
     86 
     87 If you want to configure `inactive-opacity` and `active-opacity` rules in order to apply opacity to
     88 other applications, but keep the benefits of the st alpha patches, have a look at
     89 [this picom configuration
     90 file](https://github.com/juliusHuelsmann/Config/blob/master/.config/picom/picom.conf),
     91 in which opacity management configured to be performed by `st`.
     92 
     93 Authors / Contributors
     94 ----------------------
     95 * Julius Hülsmann - <juliusHuelsmann [at] gmail [dot] com>
     96 * [Wim Stockman](https://github.com/wimstockman): Fix erroneous color reset
     97 * [glpub](https://github.com/glpub): Fix: erroneous color reset
     98 * [Milos Stojanovic](https://github.com/M4444): Code Formatting
     99 * [Yui](https://github.com/yuwui): Fix spelling errors
    100 * Authors of the shipped alpha patch: [Eon S. Jeon](mailto:esjeon@hyunmu.am), [pr](mailto:protodev@gmx.net), [Laslo Hunhold](mailto:dev@frign.de), [Ivan J.](mailto:parazyd@dyne.org), [Matthew Parnell](mailto:matt@parnmatt.co.uk), [Johannes Mayrhofer](mailto:jm.spam@gmx.net), [Àlex Ramírez](mailto:aramirez@posteo.net)