Launcher centric workflow

No mater which GNU/Linux distro I’m using, I always use the same way to access my applications. A launcher.

For several months I used ULauncher, a python based launcher. A launcher is a graphical utility that allows you to quickly open any app of your system.

Ulauncher in action

You can use the same launcher to do quick math operations.

Ulauncher in action

Later I switched to Rofi. Which is pretty similar but allows to create launcher of any type of lists.

So I have a custom list to reduce the brightness of the monitors.

Rofi for monitor

And another to launch custom actions in a time tracking software.

Ulauncher in action

How does this work?

You will need a list of commands in a CSV file. For example this is my config for the monitor brightness:

Power On,xrandr --output DP1 --auto && xrandr --output DP2 --auto --right-of DP1
Power Off,xrandr --output DP1 --off && xrandr --output DP2 --off
100%,xrandr --output DP1 --brightness 1.0 && xrandr --output DP2 --brightness 1.0
 90%,xrandr --output DP1 --brightness 0.9 && xrandr --output DP2 --brightness 0.9
 80%,xrandr --output DP1 --brightness 0.8 && xrandr --output DP2 --brightness 0.8
 70%,xrandr --output DP1 --brightness 0.7 && xrandr --output DP2 --brightness 0.7

Then Use the script to load this CSV with Rofi:

#!/bin/bash

WORKINGDIR="$HOME/.config/rofi/"
MAP="$WORKINGDIR/brigthness.csv"

cat "$MAP" \
    | cut -d ',' -f 1 \
    | rofi -dmenu -p "Util " \
    | head -n 1 \
    | xargs -i --no-run-if-empty grep "{}" "$MAP" \
    | cut -d ',' -f 2 \
    | head -n 1 \
    | xargs -i --no-run-if-empty /bin/bash -c "{}"

exit 0

This was taken from: rofi as a launcher for arbitrary shell scripts

📕 Read more dev content.