Git Product home page Git Product logo

st-focus's Introduction

Alpha Focus Highlight

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. This enables the user to spot the focused window at a glance. The patch is based on the alpha patch; i.e. is to be applied after applying the alpha patch.

The patch is released on this release page and on the suckless page. Please leave a star.

Contributions & Bug Reports

Building, customizing and installing the patch

1. Optional Dependencies The opacity functionality of this patch requires an X composite manager (e.g. picom, compton, xcompmgr), which can for instance be installed via sudo pacman -S picom on Arch Linux and launched via picom -b. The composite manager has to be relaunched after booting.

2. Applying the patch Apply the patch to st's source code and build code via patch < [PATCH_NAME]

3. Customization This patch performs changes in the config.def.h file, which need to be manually merged into a pre-existing custom config.h file. The following four variables can be adapted:

  • alpha/alphaUnfocused opacity of the terminal when focused / not focused.
  • bg/bgUnfocused background color when focused / not focused.

4. Build & install make; sudo make install

Download

If you want to try out the current version of the patch before patching your own build, check out this repository, which contains a merged version of this patch with a reasonable configuration.

The patch comes

  1. merged into the alpha patch (alpha + focus) or
  2. for patching on top of an already applied alpha patch (focus)

I recommend downloading the alpha patch from the alpha patch page and using Patch: focus, that way you make sure that you apply the latest version of the alpha patch.

Note that patch errors can occur when the code in the st repo is updated. Please report an Issue or contribute a merged patch in that case.

Patch: alpha + focus

st-0.9

st-0.8.3


Patch: focus

st-0.8.3

MISC

Note: The benefit of the alpha patch and the Alpha Focus Highlight patch are the ability to restrict the transparency only to the background color currently in use, hence keeping the font in the foreground solid and readable.

If the goal is to apply transparency independent on the content, you do not require any patch for st, instead add inactive-opacity = 0.2; active-opacity = 0.8; to your picom configuration file and keep a vanilla st build.

If you want to configure inactive-opacity and active-opacity rules in order to apply opacity to other applications, but keep the benefits of the st alpha patches, have a look at this picom configuration file, in which opacity management configured to be performed by st.

Authors / Contributors

st-focus's People

Contributors

aaptel avatar agonrex avatar avih avatar bennofs avatar blackbit42 avatar brandoninvergo avatar colona avatar djpohly avatar electronicru avatar ericpruitt avatar esjeon avatar frign avatar garbeam avatar hiltjo avatar jceb avatar juliushuelsmann avatar k0gamsx avatar lotheac avatar medgar123 avatar michaelforney avatar mihailzenkov avatar mvdan avatar osandov avatar pickfire avatar pilona avatar radare avatar schachmat avatar suiginsoft avatar v4hn avatar wengxt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

8-i

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.