Skip to content

Commit

Permalink
Updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
umutsevdi committed Aug 28, 2022
1 parent 27318f6 commit 6947c30
Show file tree
Hide file tree
Showing 4 changed files with 161 additions and 24 deletions.
142 changes: 140 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,140 @@
# Rofi-Applets
Various useful applets developed with Rofi and shell-scripts.
<h3 align="center"> Rofi Applets</h3>
<p align="center"> Bundle of easy to configure useful Rofi Applets <br />
<i>Developed by <a href="https://github.com/umutsevdi"> Umutcan Sevdi</a></i>

<details open="open">
<summary>Table of Contents</summary>
<ol>
<li><a href="#project">Project</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#how-to">How To Use</a></li>
<li><a href="#customization">Customization</a></li>
<li><a href="LICENSE">License</a></li>
<li><a href="#contact">Contact</a></li>
</ol>
</details>

<section id="project">

## 1- Project

Rofi is an amazing tool to create pop-ups and small applications. Here I built a CLI and
bunch of useful applets.
<img src="screenshots/launcher.png">

</section>

<section id="installation">
## 2- Installation

This project requires [Rofi](https://github.com/davatorium/rofi). It's a very powerful
pop-up/switcher that allows anyone to create powerful menus. You can download
it from the package manager of your choice.

```sh
$sudo dnf install rofi
```

You can then clone this repository any directory of your choice.

```sh
$git clone https://github.com/umutsevdi/rofi-applets.git
```

By default the `applet` CLI checks the `$HOME/.dotfiles/applets` directory for available
applets. However you can change this by overwriting the `ROFI_APPLETS_PATH` variable.

```sh
$export ROFI_APPLETS_PATH=/path/to/rofi-applets
```

Now link the CLI to a directory where your binaries are.

```sh
$ln -s /path/to/rofi-applets/applet ~/bin
```

You are ready to go! You can now run any applet either by calling their launchers
directly or by using the CLI.

</section>
<section id="how-to">

## 3- How To Use

After installation run the applet command.

```sh
$applet
applet.sh - Applet Launcher Interface
──────────────────────────────────────────────
Command line interface to run Rofi Applets

Syntax: [-r]
Options:
┌────────────────────────────────────────────┐
│ -h/--help Prints this menu. │
│ -r/--run $app Runs selected applet │
└────────────────────────────────────────────┘
Available Applets:
- emoji
- filebrowser
- launcher
- player
- powermenu
- tab
```

If the applet can not detect any applet, it will prompt an error like this. It means
you made a mistake while defining the `ROFI_APPLETS_PATH` variable.

```sh
$applet
ls: cannot access '/home/user/applets/*/': No such file or directory
error: No applet were found at /home/user directory.
Either move applets to the /home/user or define $ROFI_APPLETS_PATH at .bashrc
applet.sh - Applet Launcher Interface
──────────────────────────────────────────────
Command line interface to run Rofi Applets
```

If there are no errors you can simply run any available applet using `applet -r`.

<img src="screenshots/switcher.png">

</section>

<section id="customization">

## 4- Customization

You can customize or build new applets easily.

- All applets read color values from `applets/global.rasi`. Editing color hexcodes
will update all existing applets.
- You can make your own applets with following logic. Create a directory at
`ROFI_APPLETS_PATH`. Then open two files. `config.rasi` and `launch.sh`. Instead
of defining your own color values, import all of them from global.rasi for
consistency. Develop rest like any other rofi applet. Write your launch script
to the `launch.sh`. Applet CLI will automatically recognize your applet on the
next run.

</section>
<section id="license">

## 5- License

Distributed under the MIT License. See `LICENSE` for more information.

</section>
<section id="contact">

## 6- Contact

You can contact to me for any suggestion or information.

Project: [umutsevdi/rofi-applets](https://github.com/umutsevdi/rofi-applets)

Developed by [Umutcan Sevdi](https://github.com/umutsevdi)

</section>
43 changes: 21 additions & 22 deletions applets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,26 @@ This directory contains my <a href="https://github.com/davatorium/rofi">Rofi</a>

```sh
applets/
├── global.rasi
├── emoji
│   ├── config.rasi
│   └── launch.sh
├── launcher
│   ├── config.rasi
│   └── launcher.sh
├── music
│   ├── config.rasi
│   └── player.sh
└── powermenu
   ├── config.rasi
   └── powermenu.sh
├── global.rasi
├── emoji
│   ├── config.rasi
│   └── launch.sh
├── filebrowser
│   ├── config.rasi
│   └── launch.sh
├── launcher
│   ├── config.rasi
│   └── launch.sh
├── player
│   ├── config.rasi
│   └── launch.sh
├── powermenu
│   ├── config.rasi
│   └── launch.sh
└── tab
├── config.rasi
└── launch.sh
```
Each Rofi applet get's it's color values from `global.rasi` file. So any change
on colors affect rest of the applets. There is also an <a href="../bin/applet">Applet Launcher</a>.

- <a href="emoji/launch.sh">Emoji Picker</a> is a graphical application that copies
selected emoji to the clipboard.
- <a href="launcher/launch.sh">Launcher</a> is a simple app launcher.
- <a href="powermenu/launch.sh">Powermenu</a> is user session program that allows
user to logout, reboot or shutdown.
- <a href="music/launch.sh">Music Player</a> is menu that allows user to switch,
stop or pause playing music.
Each Rofi applet get's it's color values from `global.rasi` file. So any change
on colors affect rest of the applets. There is also an [Applet CLI](../applet).
Binary file added screenshots/launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/switcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6947c30

Please sign in to comment.