sites

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

index.md (4552B)


      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.8.3**
     56 - [Version 1 (attached)](st-focus-20200731-43a395a.diff)
     57 - Most recent release: [st-focus-20200530-43a395a.diff Github](https://github.com/juliusHuelsmann/st/releases/download/v2/st-focus-20200731-43a395a.diff)
     58 
     59 ---
     60 
     61 Patch: focus
     62 ------------
     63 
     64 **st-0.8.3**
     65 - [Version 1 (attached)](st-focus-20200731-patch_alpha.diff)
     66 - Most recent release: [st-focus-20200530-patch_alpha.diff (Github)](https://github.com/juliusHuelsmann/st/releases/download/v2/st-focus-20200731-patch_alpha.diff)
     67 
     68 
     69 MISC
     70 ----
     71 **Note:** The benefit of the `alpha` patch and the `Alpha Focus Highlight` patch are the ability to
     72 restrict the transparency only to the background color currently in use, hence keeping the font in
     73 the foreground solid and readable.
     74 
     75 If the goal is to apply transparency independent on the content, you do not require any patch for
     76 `st`, instead add
     77 `
     78 inactive-opacity = 0.2;
     79 active-opacity = 0.8;
     80 `
     81 to your `picom` configuration file and keep a vanilla `st` build.
     82 
     83 If you want to configure `inactive-opacity` and `active-opacity` rules in order to apply opacity to
     84 other applications, but keep the benefits of the st alpha patches, have a look at
     85 [this picom configuration
     86 file](https://github.com/juliusHuelsmann/Config/blob/master/.config/picom/picom.conf),
     87 in which opacity management configured to be performed by `st`.
     88 
     89 Authors / Contributors
     90 ----------------------
     91 * Julius Hülsmann - <juliusHuelsmann [at] gmail [dot] com>
     92 * [glpub](https://github.com/glpub): Fix: erroneous color reset
     93 * [Milos Stojanovic](https://github.com/M4444): Code Formatting
     94 * [Yui](https://github.com/yuwui): Fix spelling errors
     95 * 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)