|
1 |
| -# terminalwrap |
2 |
| -A terminal wrap tool inspired by Spotify Wrapped |
| 1 | +<div align="center"> |
| 2 | + |
| 3 | +# Terminal Wrap |
| 4 | +🧑💻 Which command do you use the most in the terminal? Let's find out the fun way! |
| 5 | + |
| 6 | +<h3> |
| 7 | +Terminal wrap tool written in <code>👑 C++ 👑</code> |
| 8 | +</h3> |
| 9 | +<br> |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | +</div> |
| 22 | + |
| 23 | +## 💫 Features |
| 24 | +- Supports all popular shells! |
| 25 | + - bash |
| 26 | + - zsh |
| 27 | + - fish |
| 28 | + - csh |
| 29 | + |
| 30 | +- Shows you motivational messages according to the command you use most. Show me your most used command and I'll tell you who you are 😀 |
| 31 | +- Yo, what more are you waiting for? lol |
| 32 | + |
| 33 | +## 💻 Installing |
| 34 | +--- |
| 35 | +### Installation |
| 36 | + |
| 37 | +There are 2 ways to install TerminalWrap: |
| 38 | +1. Compile it on your own system (don't worry, this is much easier than you think) |
| 39 | +2. Download the compiled version (not recommended) |
| 40 | + |
| 41 | +If you don't want to compile it, all you need to do is install TerminalWrap from the [releases](https://github.com/xeyossr/terminalwrap/releases) page and then add it to PATH. |
| 42 | +But if you want to compile it (recommended method) follow the steps below: |
| 43 | + |
| 44 | +#### Compile yourself |
| 45 | + |
| 46 | +1. Clone the repository: |
| 47 | + |
| 48 | +```bash |
| 49 | +$ git clone https://github.com/xeyossr/terminalwrap.git |
| 50 | +$ cd terminalwrap |
| 51 | +``` |
| 52 | + |
| 53 | +2. Dependencies: |
| 54 | + |
| 55 | +You are expected to install the dependencies required to build TerminalWrap: |
| 56 | + |
| 57 | +```bash |
| 58 | +# Debian/Ubuntu |
| 59 | +$ sudo apt install g++ libstdc++-dev |
| 60 | + |
| 61 | +# RHEL/CentOs/Fedora |
| 62 | +$ sudo dnf install gcc-c++ libstdc++-devel |
| 63 | + |
| 64 | +# Arch |
| 65 | +$ sudo pacman -S gcc |
| 66 | +``` |
| 67 | + |
| 68 | +3. Compile the source code: |
| 69 | + |
| 70 | +```bash |
| 71 | +$ g++ -std=c++17 -o dist/terminalwrap terminalwrap.cpp |
| 72 | +``` |
| 73 | + |
| 74 | +If you want the tool to run faster, you can also compile it with the following flags (because if your history file is too big, this may cause the tool to run slowly; recommended): |
| 75 | + |
| 76 | +```bash |
| 77 | +$ g++ -O3 -march=native -flto -funroll-loops -ftree-vectorize -std=c++17 -o dist/terminalwrap terminalwrap.cpp |
| 78 | +``` |
| 79 | + |
| 80 | +4. Move the compiled file to PATH |
| 81 | + |
| 82 | +To use TerminalWrap you need to add the compiled file to PATH (`/usr/bin/` on Linux systems): |
| 83 | + |
| 84 | +```bash |
| 85 | +$ sudo cp dist/terminalwrap /usr/bin/terminalwrap |
| 86 | +``` |
| 87 | + |
| 88 | +5. Now you can run TerminalWrap with a single command! |
| 89 | +```bash |
| 90 | +$ terminalwrap |
| 91 | +``` |
| 92 | + |
| 93 | +### Installation on Arch-based distros |
| 94 | +You can easily install TerminalWrap via [AUR](https://aur.archlinux.org/packages/terminalwrap) for Arch Linux-based systems. |
| 95 | + |
| 96 | +1. Install TerminalWrap via `yay`. |
| 97 | + |
| 98 | +```bash |
| 99 | +$ yay -S terminalwrap |
| 100 | +``` |
| 101 | + |
| 102 | +2. Now you can easily run TerminalWrap with a simple command! |
| 103 | +```bash |
| 104 | +$ terminalwrap |
| 105 | +``` |
| 106 | + |
| 107 | +## Usage |
| 108 | + |
| 109 | +```bash |
| 110 | +Usage: terminalwrap [OPTION] |
| 111 | + |
| 112 | +Options: |
| 113 | + --help, -h Show this help message. |
| 114 | + --fish Force using Fish |
| 115 | + --zsh Force using ZSH |
| 116 | + --csh Force using CSH |
| 117 | + --bash Force using BASH |
| 118 | + (default) Detect the shell from the environment. |
| 119 | +``` |
| 120 | + |
| 121 | +## License |
| 122 | + |
| 123 | +This project is licensed under the GNU General Public License v3.0. You are free to use, modify, and distribute the software under the terms of this license. For more details, please refer to the [LICENSE](LICENSE) file. |
| 124 | + |
| 125 | + |
| 126 | +## Thanks for idea & example 💬 |
| 127 | +- [islemci/cliwrap](https://github.com/islemci/cliwrap) |
0 commit comments