From 90c6a1bf38083bcdbe0c7f6edb3f8bad890cb075 Mon Sep 17 00:00:00 2001 From: Vico Shortman Date: Fri, 11 Apr 2025 02:59:12 +0200 Subject: [PATCH] Updated README --- README.md | 104 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 81 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index d995d3a..fb25d0b 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,89 @@ -# shrtrun +# ๐Ÿš€ shrtrun -**shrtrun** is a lightweight shell-based launcher utility that lets you execute commands or trigger custom actions (like searches) using a prefix system. It uses `rofi` for user input and supports configurable settings via a simple `.conf` file. - ---- +**shrtrun** is a lightweight command launcher script for Linux, powered by `rofi`. It supports quick access to web search engines, YouTube searches, and execution of shell commands through a simple and customizable interface. ## โœจ Features -- Run arbitrary shell commands -- Google and YouTube search with prefix commands -- Configurable browser and search engines -- Uses `rofi` as the input interface -- Minimal logging for debugging -- Notification support (via `notify-send`) +- โšก Launch custom shell commands +- ๐ŸŒ Search the web using your preferred search engine +- ๐Ÿ“บ Search YouTube directly +- ๐Ÿ› ๏ธ Configurable via `~/.config/shrtrun/config.conf` +- ๐Ÿ•˜ Command history for fast re-use + +## ๐Ÿ“ฆ Installation + +1. Save the script (e.g., as `shrtrun.sh`) and make it executable: + +```bash +chmod +x shrtrun.sh +``` + +2. (Optional) Move it somewhere in your `$PATH`: + +```bash +mv shrtrun.sh ~/.local/bin/shrtrun +``` + +3. Run it via a keybinding or launcher + +```bash +shrtrun +``` + +Or use the full path if not in your `$PATH` (e.g., `/path/to/shrtrun.sh`). + +## โš™๏ธ Configuration + +On first run, the script creates a config file at: + +``` +~/.config/shrtrun/config.conf +``` + +### ๐Ÿ“ Example config: + +``` +log_file: /logs/shrtrun.log +browser: firefox +search_engine: https://duckduckgo.com/?q= +youtube_search: https://www.youtube.com/results?search_query= +``` + +## ๐Ÿง‘โ€๐Ÿ’ป Usage + +- ๐Ÿ’ฌ **Regular Commands:** Type any shell command and hit Enter to execute it. +- ๐Ÿง  **Special Prefixes:** + - `!g your search` โ€” Searches the web via your configured search engine ๐ŸŒ + - `!y your search` โ€” Searches YouTube ๐Ÿ“น + +## ๐Ÿ“œ Command History + +shrtrun keeps a history file at: + +``` +~/.config/shrtrun/history.txt +``` + +This lets you recall previous commands easily when relaunching shrtrun. Only successful or valid commands are saved. + +## ๐Ÿ”ง Requirements + +- `rofi` +- `awk`, `bash`, `xdg-open` (most likely pre-installed) +- Optional: `notify-send` for desktop notifications ๐Ÿ”” + +### ๐Ÿ“ฅ Install dependencies +- ๐Ÿง **Debian/Ubuntu:** `sudo apt install rofi xdg-utils libnotify-bin` +- ๐Ÿง **Arch/Manjaro:** `sudo pacman -S rofi xdg-utils libnotify` +- ๐Ÿง **Fedora:** `sudo dnf install rofi xdg-utils libnotify` + +## ๐ŸŽจ Customization Ideas + +- โž• Add new command prefixes (e.g., `!r` for Reddit) +- ๐ŸŽจ Change styling in `rofi` config +- ๐ŸŒ Sync history across machines --- -## ๐Ÿ“ฆ Requirements +๐Ÿ“ **GPL License** โ€“ This project is licensed under the GNU General Public License. See the LICENSE file for more details. ๐Ÿงพ -Make sure the following dependencies are installed: - -- `bash` (default on most systems) -- `rofi` โ€“ for the graphical input menu -- `xdg-open` โ€“ to open URLs with the default browser -- `notify-send` (optional) โ€“ for desktop notifications - -**Install on Debian/Ubuntu:** - -```bash -sudo apt update -sudo apt install rofi xdg-utils libnotify-bin