From 69eb4339dbe86b25deaaa0c44c69314c0e4e1484 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Sat, 20 Oct 2018 23:14:10 +0200 Subject: [PATCH] Enable manpages color --- .config/xorg/Xresources | 5 +++++ .config/zsh/.zshrc | 7 ++++--- .scripts/alias.sh | 14 ++++++++++++-- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/.config/xorg/Xresources b/.config/xorg/Xresources index 5ac0a6e..79b94cb 100644 --- a/.config/xorg/Xresources +++ b/.config/xorg/Xresources @@ -55,6 +55,11 @@ URxvt*letterSpace: -1 URxvt*scrollBar: false URxvt*saveLines: 2000 +! Terminal text colors +URxvt.colorIT: #8c9440 +URxvt.colorBD: #c5c8c6 +URxvt.colorUL: #81a2be + ! Extensions URxvt.perl-ext-common: default,matcher,eval URxvt.url-launcher: /usr/bin/xdg-open diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 0620e0b..3389c2e 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -109,11 +109,11 @@ alias cache='sudo paccache -r' alias depend="$HOME/.scripts/alias.sh depend" # Programming +alias jdoc="$HOME/.scripts/alias.sh java-doc" +alias jr="$HOME/.scripts/alias.sh java-run" alias raspbian="$HOME/.scripts/alias.sh raspbian" -alias jdoc="$HOME/.scripts/alias.sh jdoc" -alias jr="$HOME/.scripts/alias.sh jr" -alias upl='pio run -t upload' alias ser='pio serialports monitor -b 9600' +alias upl='pio run -t upload' alias qmake='qmake -makefile ../ && make' # Git @@ -137,6 +137,7 @@ alias offtouchpad='sudo rmmod i2c_hid' alias ontouchpad="sudo modprobe i2c_hid && $HOME/.scripts/touchscreen.sh 0" # Other +alias man="$HOME/.scripts/alias.sh man" alias mysql-workbench="GDK_SCALE=1 GDK_DPI_SCALE=1 mysql-workbench 1>/dev/null 2>&1 &; disown" alias weather="curl -s 'http://wttr.in/dordrecht?q&n&p' | head -n -3" diff --git a/.scripts/alias.sh b/.scripts/alias.sh index 690736b..8801c93 100755 --- a/.scripts/alias.sh +++ b/.scripts/alias.sh @@ -1,15 +1,25 @@ #!/bin/bash +man() { + LESS_TERMCAP_md=$'\e[01;31m' \ + LESS_TERMCAP_me=$'\e[0m' \ + LESS_TERMCAP_se=$'\e[0m' \ + LESS_TERMCAP_so=$'\e[01;44;33m' \ + LESS_TERMCAP_ue=$'\e[0m' \ + LESS_TERMCAP_us=$'\e[01;32m' \ + command man "$@" +} + depend() { pactree -u -d 1 $1 | tail -n +2 } -jdoc() { +java-doc() { mkdir -p './doc'; javadoc -d './doc' *.java } -jr() { +java-run() { mkdir -p './out'; javac -d './out' "$1.java"; java -cp './out' "$1"