Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change the statusbar commands so that no accidential status bars are created #858

Merged
merged 7 commits into from
Apr 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 32 additions & 19 deletions docs/help/in/statusbar.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,35 @@

%9Parameters:%9

ENABLE: Adds a statusbar to the list of statusbars.
DISABLE: Removes a statusbar from the list. Note that for
built-in statusbars they can be enabled again should the
user wish to add back the default statusbars.
ADD: Adds a statusbar to the list of statusbars.
MODIFY: Modifies the configuration of a statusbar.
RESET: Restores the default statusbar configuration.
TYPE: Sets the type of statusbar, for each split window or only
ADDITEM: Adds an item to the specified statusbar. It can be set to
appear before/after another item and left/right aligned
to a specified position on the screen.
MODIFYITEM: Changes an item position inside a bar.
REMOVEITEM: Removes an item from the specified statusbar.
INFO: List the current details and items of the specified
statusbar.

-disable: Removes a statusbar from the list.
-type: Sets the type of statusbar, for each split window or only
for the current root screen.
PLACEMENT: Sets the placement of the statusbar, either at the top or
-placement: Sets the placement of the statusbar, either at the top or
the bottom of the screen.
POSITION: Sets the position of the statusbar. Represented as a
-position: Sets the position of the statusbar. Represented as a
number, with 0 implying the first position.
VISIBLE: Sets the visibility of the statusbar or item. If set to
-visible: Sets the visibility of the statusbar or item. If set to
always it is visible on all screens, otherwise if set to
inactive or active then it is only visible on inactive
or active screens, respectively.
ADD: Adds an item to the specified statusbar. It can be set to
appear before/after another item and left/right aligned
to a specified position on the screen.
REMOVE: Removes an item from the specified statusbar.
-before: This item is added before the other item.
-after: This item is added after the other item.
-priority: When the statusbar items overflow, the item with the
lowest priority is removed first
-alignment: Display the item on the right side.

Where name refers to the name of the statusbar; if no argument is
Where statusbar refers to the name of the statusbar; if no argument is
given, the entire list of statusbars will be displayed.

%9Description:%9
Expand All @@ -36,12 +44,17 @@
%9Examples:%9

/STATUSBAR
/STATUSBAR window
/STATUSBAR window REMOVE time
/STATUSBAR window ADD time
/STATUSBAR window RESET
/STATUSBAR topic DISABLE
/STATUSBAR topic ENABLE
/STATUSBAR INFO window
/STATUSBAR REMOVEITEM time window
/STATUSBAR ADDITEM time window
/STATUSBAR RESET window
/STATUSBAR MODIFY -disable topic
/STATUSBAR MODIFY -nodisable topic

%9Remarks:%9

Statusbar syntax was changed in Irssi 1.2. The old syntax is still
accepted for backward compatibility, but no longer documented.

%9See also:%9 WINDOW

2 changes: 1 addition & 1 deletion src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define IRSSI_GLOBAL_CONFIG "irssi.conf" /* config file name in /etc/ */
#define IRSSI_HOME_CONFIG "config" /* config file name in ~/.irssi/ */

#define IRSSI_ABI_VERSION 15
#define IRSSI_ABI_VERSION 16

#define DEFAULT_SERVER_ADD_PORT 6667
#define DEFAULT_SERVER_ADD_TLS_PORT 6697
Expand Down
1 change: 1 addition & 0 deletions src/fe-text/module-formats.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ FORMAT_REC gui_text_formats[] =
{ "statusbar_info_item_footer", "", 0 },
{ "statusbar_info_item_name", "%# : $[35]0 $[9]1 $2", 3, { 0, 1, 0 } },
{ "statusbar_not_found", "Statusbar doesn't exist: $0", 1, { 0 } },
{ "statusbar_not_found", "Statusbar is disabled: $0", 1, { 0 } },
{ "statusbar_item_not_found", "Statusbar item doesn't exist: $0", 1, { 0 } },
{ "statusbar_unknown_command", "Unknown statusbar command: $0", 1, { 0 } },
{ "statusbar_unknown_type", "Statusbar type must be 'window' or 'root'", 1, { 0 } },
Expand Down
17 changes: 9 additions & 8 deletions src/fe-text/module-formats.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,24 @@ enum {

TXT_FILL_3,

TXT_STATUSBAR_LIST_HEADER,
TXT_STATUSBAR_LIST_HEADER,
TXT_STATUSBAR_LIST_FOOTER,
TXT_STATUSBAR_LIST,
TXT_STATUSBAR_INFO_NAME,
TXT_STATUSBAR_INFO_TYPE,
TXT_STATUSBAR_INFO_PLACEMENT,
TXT_STATUSBAR_INFO_PLACEMENT,
TXT_STATUSBAR_INFO_POSITION,
TXT_STATUSBAR_INFO_VISIBLE,
TXT_STATUSBAR_INFO_ITEM_HEADER,
TXT_STATUSBAR_INFO_ITEM_HEADER,
TXT_STATUSBAR_INFO_ITEM_FOOTER,
TXT_STATUSBAR_INFO_ITEM_NAME,
TXT_STATUSBAR_NOT_FOUND,
TXT_STATUSBAR_ITEM_NOT_FOUND,
TXT_STATUSBAR_INFO_ITEM_NAME,
TXT_STATUSBAR_NOT_FOUND,
TXT_STATUSBAR_NOT_ENABLED,
TXT_STATUSBAR_ITEM_NOT_FOUND,
TXT_STATUSBAR_UNKNOWN_COMMAND,
TXT_STATUSBAR_UNKNOWN_TYPE,
TXT_STATUSBAR_UNKNOWN_TYPE,
TXT_STATUSBAR_UNKNOWN_PLACEMENT,
TXT_STATUSBAR_UNKNOWN_VISIBILITY,
TXT_STATUSBAR_UNKNOWN_VISIBILITY,

TXT_FILL_4,

Expand Down
Loading