add new termcap stuff

parent cfb505b6
......@@ -31,7 +31,7 @@ export_result ()
echo -e "MODE=\"$MODE\"\
\nPREFIX=\"$PREFIX\"\
\nDATADIR=\"$DATADIR/bashstyle-ng/\"\
\nDATADIR_LIST=( bin ui rc/{,ascii,dirinfo,functions,internal,settings,styles} terminfo/{,b,m,n} vim/{,colors} )\
\nDATADIR_LIST=( bin ui rc/{,ascii,dirinfo,functions,internal,settings,styles} termcap/{bar,body} vim/{,colors} )\
\nPROFILEDIR=\"$PROFILEDIR/\"\
\nBINDIR=\"$BINDIR\"\
\nLOCALEDIR=\"$DATADIR/locale/\"\
......
#!/bin/bash
TERM_FILES=( bold mostlike nebula )
TERM_NUM=${#TERM_FILES[@]}
generate_terminfo () {
local CUR_NUM=1
echo -e "\t${WHITE}+ ${WHITE} terminfos${CYAN} (${TERM_FILES[@]})"
for term in ${TERM_FILES[@]}; do
if [[ $VERBOSE == "true" ]]; then
echo -e "\t${WHITE} * ${SMOOTHBLUE}[$CUR_NUM/$TERM_NUM]${WHITE} ${term}"
local CUR_NUM=$(($CUR_NUM+1))
fi
tic data/terminfo/${term}.terminfo -o data/terminfo/
done
}
build() {
generate_terminfo
generate_mo
}
......@@ -5,7 +5,7 @@ clean () {
echo -e "\n${SMOOTHBLUE} cleaning up\n"
REMOVE_FILES=( data/bashstyle data/bashstyle-ng.pc ui/bashstyle?.ui.h
data/bashstyle.sh rc/nx-rc i18n/??/*.mo i18n/*.pot
data/terminfo/?/* .configure/results .make/build_done )
.configure/results .make/build_done )
if [[ $VERBOSE == "true" ]]; then
RM_NUM=${#REMOVE_FILES[@]}
......
......@@ -7,17 +7,16 @@ DATA_FILES=( ui/*.{py,ui}:${DATADIR}/ui
rc/internal/*:${DATADIR}/rc/internal
rc/settings/*:${DATADIR}/rc/settings
rc/styles/*:${DATADIR}/rc/styles
data/terminfo/b/*:${DATADIR}/terminfo/b
data/terminfo/m/*:${DATADIR}/terminfo/m
data/terminfo/n/*:${DATADIR}/terminfo/n
data/termcap/bar/*:${DATADIR}/termcap/bar
data/termcap/body/*:${DATADIR}/termcap/body
data/vim/colors/*:${DATADIR}/vim/colors
data/CharName.pm:${DATADIR}
data/*.ini:${DATADIR} )
LOCALE_FILES=( i18n/de/*.mo:${LOCALEDIR}/de/LC_MESSAGES/
i18n/es/*.mo:${LOCALEDIR}/es/LC_MESSAGES/
i18n/it/*.mo:${LOCALEDIR}/it/LC_MESSAGES/
i18n/ru/*.mo:${LOCALEDIR}/ru/LC_MESSAGES/ )
LOCALE_FILES=( i18n/de/*.mo:${LOCALEDIR}/de/LC_MESSAGES
i18n/es/*.mo:${LOCALEDIR}/es/LC_MESSAGES
i18n/it/*.mo:${LOCALEDIR}/it/LC_MESSAGES
i18n/ru/*.mo:${LOCALEDIR}/ru/LC_MESSAGES )
BIN_FILES=( data/bashstyle:${BINDIR}
bin-extra/*:${DATADIR}/bin
......
......@@ -6,7 +6,7 @@ I. Check the dependencies:
(see documentation/chapter00.html for more infos)
II. Generate the terminfo/translation files:
II. Generate the translation files:
./make build
......
ini_version = 8
ini_version = 9
[Style]
use_bashstyle = False
......@@ -6,7 +6,6 @@ enable_colors = False
colored_ls = False
color_style = normal
colored_man = True
man_style = mostlike
colored_grep = False
grep_color = 01;38;5;111
random_style = False
......@@ -30,6 +29,8 @@ mem = none
processes = False
tty = False
uptime = False
termcap_bar = black-white
termcap_body = blue-magenta
[Alias]
alias_one = ""
......
export LESS_TERMCAP_so=$(tput bold; tput setaf 0; tput setab 7) # black on white
export LESS_TERMCAP_se=$(tput rmso; tput sgr0)
export LESS_TERMCAP_se=$'\E[0m' # end standout-mode
export LESS_TERMCAP_so=$(tput bold; tput setaf 8; tput setab 3) # begin standout-mode - info box
export LESS_TERMCAP_so=$(tput bold; tput setaf 3; tput setab 4) # yellow on blue
export LESS_TERMCAP_se=$(tput rmso; tput sgr0)
### source: tuxarena.com
export LESS_TERMCAP_mb=$(printf '\e[01;31m') # enter blinking mode
export LESS_TERMCAP_md=$(printf '\e[01;38;5;75m') # enter double-bright mode
export LESS_TERMCAP_me=$(printf '\e[0m') # turn off all appearance modes (mb, md, so, us)
export LESS_TERMCAP_ue=$(printf '\e[0m') # leave underline mode
export LESS_TERMCAP_us=$(printf '\e[04;38;5;200m') # enter underline mode
### source: tuxarena.com
export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking
export LESS_TERMCAP_md=$'\E[01;38;5;74m' # begin bold
export LESS_TERMCAP_me=$'\E[0m' # end mode
export LESS_TERMCAP_ue=$'\E[0m' # end underline
export LESS_TERMCAP_us=$'\E[04;38;5;146m' # begin underline
### source: tuxarena.com
export LESS_TERMCAP_mb=$(printf '\e[01;31m') # enter blinking mode – red
export LESS_TERMCAP_md=$(printf '\e[01;35m') # enter double-bright mode – bold, magenta
export LESS_TERMCAP_me=$(printf '\e[0m') # turn off all appearance modes (mb, md, so, us)
export LESS_TERMCAP_ue=$(printf '\e[0m') # leave underline mode
export LESS_TERMCAP_us=$(printf '\e[04;36m') # enter underline mode – cyan
export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking
export LESS_TERMCAP_md=$'\E[01;31m' # begin bold
export LESS_TERMCAP_me=$'\E[0m' # end mode
export LESS_TERMCAP_ue=$'\E[0m' # end underline
export LESS_TERMCAP_us=$'\E[01;32m' # begin underline
export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking
export LESS_TERMCAP_md=$'\E[01;31m' # begin bold
export LESS_TERMCAP_me=$'\E[0m' # end mode
export LESS_TERMCAP_ue=$'\E[0m' # end underline
export LESS_TERMCAP_us=$'\E[01;32m' # begin underline
#########################################################
# #
# This is BashStyle-NG #
# #
# Licensed under GNU GENERAL PUBLIC LICENSE v3 #
# #
# Copyright 2007 - 2014 Christopher Bratusek #
# #
#########################################################
bold|manpages with bright colors,
am, hs, km, mir, msgr, xenl,
cols#80, it#8, lines#24, wsl#40,
acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, bold=\E[1m\E[38;5;111m, clear=\E[H\E[2J, cr=^M,
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
dsl=\E]0;\007, ed=\E[J, el=\E[K, enacs=\E)0, fsl=^G,
home=\E[H, ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[L, ind=^J,
is2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>, kbs=^H,
kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
kdch1=\E[3~, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~,
kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~,
kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~,
kf2=\E[12~, kf20=\E[34~, kf3=\E[13~, kf4=\E[14~,
kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
kfnd=\E[1~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~,
kslt=\E[4~, rc=\E8, rev=\E[7m\E[34m, ri=\EM, rmacs=^O,
rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E[?1l\E>,
rmso=\E[1m\E[37m, rmul=\E[1m\E[37m,
rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>, sc=\E7,
sgr0=\E[1m\E[37m, smacs=^N, smcup=\E7\E[?47h, smir=\E[4h,
smkx=\E[?1h\E[1;37m, smso=\E[1;33m, smul=\E[1m\E[38;5;42m,
tbc=\E[3g, tsl=\E]0;, u6=\E[%i%d;%dR, u7=\E[6n,
u8=\E[?1;2c, u9=\E[c,
#########################################################
# #
# This is BashStyle-NG #
# #
# Licensed under GNU GENERAL PUBLIC LICENSE v3 #
# #
# Copyright 2007 - 2014 Christopher Bratusek #
# #
#########################################################
mostlike|manpages with color looking like most,
am, hs, km, mir, msgr, xenl,
cols#80, it#8, lines#24, wsl#40,
acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, bold=\E[1m\E[31m, clear=\E[H\E[2J, cr=^M,
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
dsl=\E]0;\007, ed=\E[J, el=\E[K, enacs=\E)0, fsl=^G,
home=\E[H, ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[L, ind=^J,
is2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>, kbs=^H,
kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
kdch1=\E[3~, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~,
kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~,
kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~,
kf2=\E[12~, kf20=\E[34~, kf3=\E[13~, kf4=\E[14~,
kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
kfnd=\E[1~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~,
kslt=\E[4~, rc=\E8, rev=\E[7m\E[34m, ri=\EM, rmacs=^O,
rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E[?1l\E>,
rmso=\E[m, rmul=\E[m,
rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>, sc=\E7,
sgr0=\E[m, smacs=^N, smcup=\E7\E[?47h, smir=\E[4h,
smkx=\E[?1h\E=, smso=\E[1;30m\E[47m, smul=\E[32m,
tbc=\E[3g, tsl=\E]0;, u6=\E[%i%d;%dR, u7=\E[6n,
u8=\E[?1;2c, u9=\E[c,
#########################################################
# #
# This is BashStyle-NG #
# #
# Licensed under GNU GENERAL PUBLIC LICENSE v3 #
# #
# Copyright 2007 - 2014 Christopher Bratusek #
# #
#########################################################
nebula|manpages with very bright colors,
am, hs, km, mir, msgr, xenl,
cols#80, it#8, lines#24, wsl#40,
acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, bold=\E[1m\E[38;5;45m, clear=\E[H\E[2J, cr=^M,
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
dsl=\E]0;\007, ed=\E[J, el=\E[K, enacs=\E)0, fsl=^G,
home=\E[H, ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[L, ind=^J,
is2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>, kbs=^H,
kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
kdch1=\E[3~, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~,
kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~,
kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~,
kf2=\E[12~, kf20=\E[34~, kf3=\E[13~, kf4=\E[14~,
kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
kfnd=\E[1~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~,
kslt=\E[4~, rc=\E8, rev=\E[7m\E[34m, ri=\EM, rmacs=^O,
rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E[?1l\E>,
rmso=\E[1m\E[37m, rmul=\E[1m\E[37m,
rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>, sc=\E7,
sgr0=\E[1m\E[37m, smacs=^N, smcup=\E7\E[?47h, smir=\E[4h,
smkx=\E[?1h\E[1;37m, smso=\E[1;33m, smul=\E[1m\E[38;5;50m,
tbc=\E[3g, tsl=\E]0;, u6=\E[%i%d;%dR, u7=\E[6n,
u8=\E[?1;2c, u9=\E[c,
ini_version = 8
ini_version = 9
[Style]
use_bashstyle = True
......@@ -6,7 +6,6 @@ enable_colors = True
colored_ls = True
color_style = bright
colored_man = True
man_style = nebula
colored_grep = True
grep_color = 01;38;5;111
random_style = False
......@@ -30,6 +29,8 @@ mem = none
processes = False
tty = True
uptime = True
termcap_bar = yellow-blue
termcap_body = blue-magenta
[Alias]
alias_one = ""
......
......@@ -18,7 +18,7 @@ export BSNG_RC_DIR=$BSNG_DATA_DIR/bashstyle-ng/rc
export BSNG_BIN_DIR=$BSNG_RC_DIR/bin
export BSNG_LOCKFILE=$HOME/.bashstyle.lock
export BSNG_VERSION=@VERSION@
INI_VERSION=8
INI_VERSION=9
if [[ ! -f ${HOME}/.bs-ng.ini ]]; then
if [[ -f /etc/bs-ng_vendor.ini && $(grep ini_version /etc/bs-ng_vendor.ini) == *${INI_VERSION} ]]; then
......
......@@ -11,14 +11,13 @@
if [[ $enabcol == True ]]; then
if [[ $(ini_get man_style) == mostlike ]]; then \
dbg_msg $"BashStyle-NG Setting:" $"Terminfo Mostlike"
db_log alias man="TERMINFO=$BSNG_DATA_DIR/bashstyle-ng/terminfo TERM=mostlike LESS=C PAGER=less man"
elif [[ $(ini_get man_style) == bold ]]; then \
dbg_msg $"BashStyle-NG Setting:" $"Terminfo Bold"
dbg_log alias man="TERMINFO=$BSNG_DATA_DIR/bashstyle-ng/terminfo TERM=bold LESS=C PAGER=less man"
elif [[ $(ini_get man_style) == nebula ]]; then \
dbg_msg $"BashStyle-NG Setting:" $"Terminfo Nebula"
dbg_log alias man="TERMINFO=$BSNG_DATA_DIR/bashstyle-ng/terminfo TERM=nebula LESS=C PAGER=less man"
if [[ -f ${BSNG_DATA_DIR}/bashstyle-ng/termcap/bar/$(ini_get termcap_bar).termcap ]]; then
dbg_msg $"BashStyle-NG Setting: Termcap (bar)" $(ini_get termcap_bar)
dbg_log source ${BSNG_DATA_DIR}/bashstyle-ng/termcap/bar/$(ini_get termcap_bar).termcap
fi
if [[ -f ${BSNG_DATA_DIR}/bashstyle-ng/termcap/body/$(ini_get termcap_body).termcap ]]; then
dbg_msg $"BashStyle-NG Setting: Termcap (body)" $(ini_get termcap_body)
dbg_log source ${BSNG_DATA_DIR}/bashstyle-ng/termcap/body/$(ini_get termcap_body).termcap
fi
fi
This diff is collapsed.
......@@ -69,7 +69,8 @@ class BashStyleNG(object):
WidgetHandler.InitWidget("random_style", "Style", "random_style", "bool", None)
WidgetHandler.InitWidget("prompt_style", "Style", "prompt_style", "combo", dicts.prompt_styles)
WidgetHandler.InitWidget("color_style", "Style", "color_style", "combo", dicts.color_styles)
WidgetHandler.InitWidget("terminfo", "Style", "man_style", "combo", dicts.man_styles)
WidgetHandler.InitWidget("termcap_bar", "Style", "termcap_bar", "combo", dicts.termcap_bars)
WidgetHandler.InitWidget("termcap_body", "Style", "termcap_body", "combo", dicts.termcap_bodys)
WidgetHandler.InitWidget("grep_colour", "Style", "grep_color", "combo", dicts.grep_colors)
WidgetHandler.InitWidget("colorshell", "Style", "colorshell", "bool", None)
WidgetHandler.InitWidget("colorshell_reset", "Style", "colorshell_reset", "bool", None)
......
......@@ -32,7 +32,7 @@ USER_DEFAULTS_SAVE = (os.getenv('HOME') + '/.bs-ng.ini.save')
FACTORY_DEFAULTS = (DATADIR + '/bashstyle-ng/bs-ng.ini')
VENDOR_DEFAULTS = ('/etc/bs-ng_vendor.ini')
app_ini_version = 8
app_ini_version = 9
class Config(object):
def InitConfig(self):
......
......@@ -28,11 +28,19 @@ color_styles = {
3 : "inverted",
4 : "underlined",
}
man_styles = {
0 : "mostlike",
1 : "bold",
2 : "nebula",
termcap_bars = {
0 : "black-white",
1 : "white-yellow",
2 : "yellow-blue",
}
termcap_bodys = {
0 : "blueish",
1 : "blue-magenta",
2 : "magenta-cyan",
3 : "mostlike",
4 : "yellow-green",
}
grep_colors = {
......@@ -122,7 +130,7 @@ bell_styles = {
1 : "visible",
2 : "none",
}
edit_modes = {
0 : "emacs",
1 : "vi",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment