Skip to content

Commit 248316a

Browse files
committed
Initial commit
1 parent 618b81a commit 248316a

File tree

5 files changed

+475
-2
lines changed

5 files changed

+475
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.vscode

README.md

Lines changed: 127 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,127 @@
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+
![License](https://img.shields.io/github/license/xeyossr/terminalwrap?style=for-the-badge)
12+
![Commits](https://img.shields.io/github/commit-activity/m/xeyossr/terminalwrap?style=for-the-badge)
13+
![AUR](https://img.shields.io/aur/version/terminalwrap?style=for-the-badge)
14+
![GitHub Repo stars](https://img.shields.io/github/stars/xeyossr/terminalwrap?style=for-the-badge)
15+
![GitHub issues](https://img.shields.io/github/issues/xeyossr/terminalwrap?style=for-the-badge)
16+
![GitHub pull requests](https://img.shields.io/github/issues-pr/xeyossr/terminalwrap?style=for-the-badge)
17+
18+
![GitHub release (latest by date)](https://img.shields.io/github/v/release/xeyossr/terminalwrap?style=for-the-badge)
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)

compile.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
g++ -O3 -march=native -flto -funroll-loops -ftree-vectorize -std=c++17 -o dist/terminalwrap terminalwrap.cpp

dist/terminalwrap

244 KB
Binary file not shown.

0 commit comments

Comments
 (0)