New Nano options:

- enable_mouse: enable full mouse support (copy, select ...)
- no_wrap: disable wrapping of long lines
- log_position: remember position in file when exiting and restore when opening the file again
- tab_size: column-width of [TAB]s
- tab_to_spaces: convert a [TAB]  into [SPACE]s
- set_uicolors: master option to enable the following options
++ function_color_fg: text color for function descriptions
++ function_color_bg: background color for function descriptions
++ key_color_fg: text color for key bindings in help
++ key_color_bg: background color for key bindings in help
++ status_color_fg: text color for status messages
++ status_color_bg: background color for status messages
++ title_color_fg: text color for titlebar
++ title_color_bg: background color for titlebar
- major restructuring of widgets in Nano and Style categories
parent 79368675
......@@ -37,6 +37,25 @@ Overview of changes in v9.1 "Dial T for TNT"
- foldmethod: method to determine when to fold either indet (default),
marker, manual, expression, syntax or diff
=== Nano ===
* New Nano options:
- enable_mouse: enable full mouse support (copy, select ...)
- no_wrap: disable wrapping of long lines
- log_position: remember position in file when exiting and restore when
opening the file again
- tab_size: column-width of [TAB]s
- tab_to_spaces: convert a [TAB] into [SPACE]s
- set_uicolors: master option to enable the following options
- function_color_fg: text color for function descriptions
- function_color_bg: background color for function descriptions
- key_color_fg: text color for key bindings in help
- key_color_bg: background color for key bindings in help
- status_color_fg: text color for status messages
- status_color_bg: background color for status messages
- title_color_fg: text color for titlebar
- title_color_bg: background color for titlebar
=== Translations ===
* updated German translation
......
ini_version = 12
ini_version = 13
[Style]
use_bashstyle = False
......@@ -147,6 +147,20 @@ bold_text = True
more_space = True
rebind_delete = False
rebind_keypad = False
enable_mouse = False
no_wrap = False
log_position = False
tab_size = 8
tab_to_spaces = False
set_uicolors = False
function_color_fg = white
function_color_bg = black
key_color_fg = white
key_color_bg = black
status_color_fg = white
status_color_bg = black
title_color_fg = white
title_color_bg = black
[LSColors]
use_lscolors = False
......
......@@ -94,6 +94,48 @@ if [[ ! -e $HOME/.nanorc.bs-ng.* ]]; then
rc_add "unset rebindkeypad"
fi
if [[ $(ini_get enable_mouse) == True ]]; then
dbg_msg $"NanoCFG Setting:" $"Enable Mouse:" $"On"
rc_add "set mouse"
else
dbg_msg $"NanoCFG Setting:" $"Enable Mouse:" $"Off"
rc_add "unset mouse"
fi
if [[ $(ini_get no_wrap) == True ]]; then
dbg_msg $"NanoCFG Setting:" $"No Wrap" $"On"
rc_add "set nowrap"
else
dbg_msg $"NanoCFG Setting:" $"No Wrap" $"Off"
rc_add "unset nowrap"
fi
if [[ $(ini_get log_position) == True ]]; then
dbg_msg $"NanoCFG Setting:" $"Log Position" $"On"
rc_add "set poslog"
else
dbg_msg $"NanoCFG Setting:" $"Log Position" $"Off"
rc_add "unset poslog"
fi
dbg_msg $"NanoCFG Setting:" $"Tab Width" $(ini_get tab_size)
rc_add "set tabsize $(ini_get tab_size)"
if [[ $(ini_get tab_to_spaces) == True ]]; then
dbg_msg $"NanoCFG Setting:" $"Tab to spaces" $"On"
rc_add "set tabtospaces"
else
dbg_msg $"NanoCFG Setting:" $"Tab to spaces" $"Off"
rc_add "unset tabtospaces"
fi
if [[ $(ini_get set_uicolors) == True ]]; then
for uipart in function key status title; do
dbg_msg $"NanoCFG Setting:" $"UI Color" ${uipart} ":" $(ini_get ${uipart}_color_fg,${uipart}_color_bg)
rc_add "set ${uipart}color $(ini_get ${uipart}_color_fg,${uipart}_color_bg)"
done
fi
if [[ $(ini_get syntax_highlight) == True ]]; then
dbg_msg $"NanoCFG Setting:" $"Colors" $"On"
for file in /usr/share/nano/*.nanorc; \
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -225,6 +225,20 @@ class BashStyleNG(object):
WidgetHandler.InitWidget("nano_history", "Nano", "history", "bool", None)
WidgetHandler.InitWidget("nano_rbdel", "Nano", "rebind_delete", "bool", None)
WidgetHandler.InitWidget("nano_rbkp", "Nano", "rebind_keypad", "bool", None)
WidgetHandler.InitWidget("nano_mouse", "Nano", "enable_mouse", "bool", None)
WidgetHandler.InitWidget("nano_logpos", "Nano", "log_position", "bool", None)
WidgetHandler.InitWidget("nano_nowrap", "Nano", "no_wrap", "bool", None)
WidgetHandler.InitWidget("nano_tabspace", "Nano", "tab_to_spaces", "bool", None)
WidgetHandler.InitWidget("nano_tabwidth", "Nano", "tab_size", "int", None)
WidgetHandler.InitWidget("nano_colorui", "Nano", "set_uicolors", "bool", None)
WidgetHandler.InitWidget("nano_functions_fg", "Nano", "function_color_fg", "combo", dicts.nano_colors)
WidgetHandler.InitWidget("nano_functions_bg", "Nano", "function_color_bg", "combo", dicts.nano_colors)
WidgetHandler.InitWidget("nano_keys_fg", "Nano", "key_color_fg", "combo", dicts.nano_colors)
WidgetHandler.InitWidget("nano_keys_bg", "Nano", "key_color_bg", "combo", dicts.nano_colors)
WidgetHandler.InitWidget("nano_status_fg", "Nano", "status_color_fg", "combo", dicts.nano_colors)
WidgetHandler.InitWidget("nano_status_bg", "Nano", "status_color_bg", "combo", dicts.nano_colors)
WidgetHandler.InitWidget("nano_title_fg", "Nano", "title_color_fg", "combo", dicts.nano_colors)
WidgetHandler.InitWidget("nano_title_bg", "Nano", "title_color_bg", "combo", dicts.nano_colors)
######################## LS Colors Stuff ###########################################
WidgetHandler.InitWidget("ls_custom", "LSColors", "custom", "text", None)
......
......@@ -31,7 +31,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 = 12
app_ini_version = 13
class Config(object):
def InitConfig(self):
......
......@@ -166,6 +166,17 @@ vim_foldmethods = {
5 : "diff",
}
nano_colors = {
0 : "white",
1 : "black",
2 : "red",
3 : "blue",
4 : "green",
5 : "yellow",
6 : "magenta",
7 : "cyan",
}
ls_colors = {
0 : "$lblack",
1 : "$lred",
......
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