aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: cc42c2e45536f1119b4e208564972b681b94d0f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# HyperTerm

Custom Prompt Shell Settings for Bash

## Requirements

- wget
- curl
- git
- less
- coreutils

## Features
- Show Git information (branch, tag, or where you did `git checkout`)
- It allows knowing the status (*exit status*) of the Prompt Shell after executing one/some command(s).
- Makes source to `/usr/share/doc/pkgfile/command-not-found.bash` automatically (requires `pkgfile`).
- Source `/usr/share/bash-completion/bash_completion` automatically (requires `bash-completion`).
- Includes a `hyperterm/_custom.sh` for customizations in HyperTerm, separately.

    >Your changes must be in `$HOME/.hyperterm/_custom.sh`, so that are not deleted when it is updated.

- Special functions like:

    * `activate` to activate virtualenv in python
    * `cex` compress files and/or directories
    * `ex` extract files
    * `ii` general system information
    * `proxy_on` enables proxy in terminal or tty
    * `sagent_start` and `sangent_stop` to enable or disable the SSH agent (password is remembered for 432000 seconds)
    * `rar2zip` convert RAR files to ZIP, use `unar` and `7z`

- Aliases like:

    * `clean` clears the bash history
    * `df` shows information about the partitions of the S.O.
    * `pastebin` allows you to quickly generate a paste for example: `cat/etc/*release | pastebin` or `sensors | pastebin`
    * `ep` open a PKGBUILD with emacs
    * `free` shows RAM and SWAP information
    * `grep` skips its colors by default
    * `la` short of `ls -la --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F`
    * `ll` short of `ls -l --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F`
    * `ls` short of `ls --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F`
    * `np` open a PKGBUILD with nano

- Look at [tools](hyperterm/tools) directory for more functions.
- Run `screenfetch` if installed (included in the `hyperterm/_custom.sh` template).

## Installation

### Semi-automatic

1. Download file `install.sh`:

        $ curl -Ls https://c.fridu.us/software/hyperterm.git/plain/install.sh -o "$HOME/install.sh"

2. Run file `install.sh`

        $ bash "$HOME/install.sh"

    or in silent mode:

        $ bash "$HOME/install.sh" -s

    use -h to show help:

        $ bash "$HOME/install.sh" -h

3. Delete file `install.sh`:

        $ rm -v "$HOME/install.sh"

### Manual

1. As a suggestion, make a backup of your Prompt Shell.

        $ for f in .bashrc .bash_aliases .bash_profile; do cp -v "$HOME/$f" "$HOME/$f.bak"; done

2. Clone the HyperTerm repository:

    - Mirror 1: `git clone https://git.sr.ht/~heckyel/hyperterm.git "$HOME/bash"`
    - Mirror 2: `git clone https://notabug.org/heckyel/hyperterm.git "$HOME/bash"`

3. Copy the HyperTerm files to your Local Directory

        $ install -d -m755 "$HOME/.hyperterm"

        $ cp -rv $HOME/bash/hyperterm/* "$HOME/.hyperterm"

        $ cp -v $HOME/bash/.bash* "$HOME"

        $ cp -v $HOME/bash/hyperterm/_custom.sh "$HOME/.hyperterm"

        $ install -m644 $HOME/bash/template/bash_profile.template.bash "$HOME/.bashrc"

4. Open your terminal again or execute the next instruction

        $ . $HOME/.bashrc*

5. Delete the repository if you are not interested in having it stored

        $ rm -rfv bash

6. Done!

## Post-installation

* Optionally you can install trash-cli, pkgfile, bind-tools, bash-completion

        $ pacman -S trash-cli

        $ pacman -S pkgfile

        $ pacman -S bind-tools

        $ pacman -S bash-completion

> [trash-cli](https://github.com/andreafrancia/trash-cli): is a utility to prevent accidental deletion when using the rm -rf command

> [pkgfile](https://github.com/falconindy/pkgfile): allows you to search for the command executed in the repository database

> [bind-tools](https://www.isc.org/downloads/bind/): allows to get ISP, running 'ii' in terminal

> [bash-completion](https://github.com/scop/bash-completion): allows bash autocomplete

## Upgrade

- To update just open the terminal and run:

    `updbashrc` to update HyperTerm

    `updbashrc_custom` just to update file `hyperterm/_custom.sh`

## Screenshots

### Git

![Alt git preview](images/git-preview.png?raw=true "git-preview")

### Themes

#### default

![Alt Bash por defecto](images/default.png?raw=true "default")

#### joy

![Alt Joy](images/joy.png?raw=true "joy")

#### light_theme

![Alt Light theme](images/light_theme.png?raw=true "light_theme")

#### minterm

![Alt Min term](images/minterm.png?raw=true "minterm")

#### pure

![Alt Pure](images/pure.png?raw=true "pure")

#### simple

![Alt Simple](images/simple.png?raw=true "simple")

#### special

![Alt Special](images/special.png?raw=true "special")

> The theme is configurable from file `$HOME/.hyperterm/_custom.sh`

## Uninstall

### Semi-automatic

1. Download file `uninstall.sh`:

        $ curl -Ls https://git.sr.ht/~heckyel/hyperterm/blob/master/uninstall.sh -o "$HOME/uninstall.sh"

    or

        $ curl -Ls https://notabug.org/heckyel/hyperterm/raw/master/uninstall.sh -o "$HOME/uninstall.sh"

2. Run file `uninstall.sh`:

        $ bash "$HOME/uninstall.sh"

3. Delete file `uninstall.sh`:

        $ rm -v "$HOME/uninstall.sh"

### Manual

If you want to leave your computer as it was, delete the files copied from step 3 with:

    $ rm -vrf "$HOME/{.hyperterm/,.bashrc}"

and restore the ***.bak** files from step 1 by running:

    $ for f in .bashrc .bash_aliases .bash_profile; do cp -v "$HOME/$f.bak" "$HOME/$f"; done

## Hacking

See [HACKING.md](HACKING.md)

## Contributors

   **HyperTerm** contributors can be found in the [AUTHORS](AUTHORS) file

## License

This work is licensed under the [GNU GPLv3+](LICENSE)