Skip to content

Commit

Permalink
Add Colored Man Pages app
Browse files Browse the repository at this point in the history
  • Loading branch information
Botspot committed Nov 23, 2024
1 parent 391b491 commit f3c6827
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/Colored Man Pages/credits
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Botspot
9 changes: 9 additions & 0 deletions apps/Colored Man Pages/description
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Add a bit of color coding to the documentation for linux commands.
You may have used the man command before.
man grep
man sudo
man ffmpeg
These are the manuals for all your linux commands, but everything is black and white. This script adds a red color to the program flag options, and gives a green color to any underlined text in the document. Result: more easily readible and digestable manpages.

To customize the colors, go familiarize yourself with the shell color codes here: https://misc.flogisoft.com/bash/tip_colors_and_formatting
Then, as root, go edit this file: /usr/local/bin/man
Binary file added apps/Colored Man Pages/icon-24.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 apps/Colored Man Pages/icon-64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions apps/Colored Man Pages/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

#adapted from https://www.howtogeek.com/683134/how-to-display-man-pages-in-color-on-linux/

sudo mkdir -p /usr/local/bin

status "Creating /usr/local/bin/man"
echo "#!/bin/bash
LESS_TERMCAP_md=$'\e[01;31m' \
LESS_TERMCAP_me=$'\e[0m' \
LESS_TERMCAP_us=$'\e[01;32m' \
LESS_TERMCAP_ue=$'\e[0m' \
LESS_TERMCAP_so=$'\e[46;30m' \
LESS_TERMCAP_se=$'\e[0m' \
/usr/bin/man "\""$@"\" | sudo tee /usr/local/bin/man >/dev/null

status "Making executable: /usr/local/bin/man"
sudo chmod +x /usr/local/bin/man
3 changes: 3 additions & 0 deletions apps/Colored Man Pages/uninstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

sudo rm -f /usr/local/bin/man
1 change: 1 addition & 0 deletions etc/categories
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ ckb-next|Tools
Clam Antivirus|System Management
CloudBuddy|Internet
Codex|Programming
Colored Man Pages|Appearance
Color Emoji font|Appearance
CommanderPi|System Management
Conky|Appearance
Expand Down

0 comments on commit f3c6827

Please sign in to comment.