Skip to content

edskeye/tint2-executors

 
 

Repository files navigation

Tint2 executors collection

While playing with Openbox, we often need a script to perform some actions not included OOTB. Having to search the same answers again and again on each new machine, I thought it was worth documenting them somewhere for further use.

The Tint2 panel - a brilliant and flexible piece of software - allows to execute scripts every certain period of time. At least some of these scripts should also be useful in other applications (panels?), however.

If you find the project useful, feel free to contribute. Many thanks to PackRat, Head_on_a_Stick, Nathaniel, edskeye, johanmalm for advices and support.

The project is being developed and tested on Arch Linux. Dependencies, shell references or something else (?), may (and probably will) be invalid be on other Linux distributions.


Installation (Arch Linux)

The most useful part of the scripts was gathered in three AUR packages, which contain recent improvement and bug fixes:

  • psuinfo - a separate project, which contains python-psutil-based commands of common syntax (AUR);
  • t2ec - a folder in this project, containing selected scripts, given a common command, published in (AUR);
  • rof - a separate project: a helper script, which is a launcher allowing to avoid running multiple instances of the same window (AUR).

Scripts in action

Take a look at a sample psuinfo and t2ec usage on a laptop:

scripts in action


Attention: all the content described below this point concerns development versions, which may not contain latest changes. Use of packages named above is strongly recommended.


Displays an icon according to the current Bumblebee status. If NVIDIA graphics turned on, it'll also display the GPU temperature.

bbswitch-status-temperature

Command: ~/tint2-executors/bbswitch-status-temp.sh

Wiki: dependencies, sample executor

This script displays an appropriate brightness icon, according to the current brightness level. Assign scroll up/down command to increase/decrease level. Use -l argument to display level as text next to the icon.

brightness icon

Command: ~/tint2-executors/brightness-icon.sh

Wiki: dependencies, sample executor

This script displays an appropriate volume icon, according to the current volume level. Assign scroll up/down command to increase/decrease level. Use -l argument to display level as text next to the icon.

volume icon

Command: ~/tint2-executors/volume-icon.sh

Wiki: dependencies, sample executor

This script displays an appropriate battery icon, according to the current charge level and charging state. It has mainly aesthetic values: it should rather be used next to the built-in Tint2 battery indicator, not instead of it. However, you may use -l argument to display level as text next to the icon.

battery icon

Command: ~/tint2-executors/battery-icon.sh

Wiki: dependencies, sample executor

This Python script displays current desktop indicator. Assign scroll up/down command with n | p (next | previous) argument to switch desktops.

desktop icon

Wiki: dependencies, optional arguments, sample executor

Bash script to display the name of Wi-Fi network currently in use, labeled with an icon or text.

wi-fi name

Command: ~/tint2-executors/wifi-name.sh

Wiki: optional agruments, sample executor

This script displays an icon to indicate Arch / AUR package updates available. Likely to need some customization to work well on each machine, as it depends on the terminal and AUR helper you use. Check Wiki for details.

Arch update notifier

Command: ~/tint2-executors/./arch-update.sh

Wiki: dependencies, customization, sample executor

Opens a Zenity box to set the brightness level. Could be used e.g. as the left click action with the brightness icon.

brightness zenity box

Command: ~/tint2-executors/zenity-set-brightness.sh

Wiki: dependencies

Opens a Zenity box to set the volume level. Could be used e.g. as the left click action with the volume icon.

volume zenity box

Command: ~/tint2-executors/zenity-set-volume.sh

Wiki: dependencies

Lately I needed to prove that my Internet connection sucks. And not as fast as the provider claims it does. To collect data on the speed over time, I used this bash script in a Tint2 executor. It saves Ping [ms] Download and Upload speed [Mbit/s] every a certain interval to ~/speedtest.txt.

speedtest-cli >> txt

Command: ~/tint2-executors/speedtest.sh

Wiki: dependencies, sample executor and output

cpu-fan-mem.py (deprecated)


Important note: the cpu-fan-mem.py script has been turned into a separate project and also AUR package, and will no longer be updated here. The description below, Wiki and the script itself are out of date. Please check the project site.


This script uses the python-psutil module to display the CPU load (graph or percentage per core or average percentage), frequency (current/max), the temperature sensor reading, the fan speed and memory usage (used/total).

Command: python ~/tint2-executors/cpu-fan-mem.py [-C{components}] [-F] [-T]

Wiki: options, sample executor

Installation (all-in-one):

Clone the repository to your home directory:

$ git clone https://github.com/nwg-piotr/tint2-executors.git

To install all dependencies in one step, you may use the tint2-executors dummy package. Attention: just added, not yet really tested, so some dependencies may still be missing.

Check Wiki for more details and sample Tint2 executors.

About

Collection of executors for Tint2 panel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Python 54.7%
  • Shell 45.3%