mirror of
https://github.com/weechat/weechat.git
synced 2026-06-13 14:44:46 +02:00
Compare commits
287 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 775b9c9cdf | |||
| 6bc7d6fad3 | |||
| 9aefe4ae09 | |||
| 13a057f0b2 | |||
| 3735397a0f | |||
| 57b2efd82b | |||
| 6468f7761f | |||
| a83121b847 | |||
| 02a05f63d5 | |||
| 408901d772 | |||
| bea9d5a2bf | |||
| feb5ee8886 | |||
| b46ed5a2a2 | |||
| 1d104bb940 | |||
| 4600aeea53 | |||
| 6bd0c63192 | |||
| 879a548bea | |||
| e928bce76c | |||
| 8bd4994ccd | |||
| 360e971b01 | |||
| 0bb5998988 | |||
| b58f704542 | |||
| bcd23ff585 | |||
| 169eecb5cf | |||
| b433afbd26 | |||
| 082ccb05bb | |||
| f72fb3be4b | |||
| 7f0efa3a8f | |||
| c96971eebb | |||
| d6e4e87faf | |||
| 12106ae7ba | |||
| 91bb1ebf5d | |||
| 439410a388 | |||
| 36ab6c3bc7 | |||
| f0e4494205 | |||
| 83dcb84ea6 | |||
| fb00bc1f4b | |||
| 24d2ba3338 | |||
| 63922ca038 | |||
| a5f4c3770b | |||
| 23d3ce7ad8 | |||
| f49810ec0e | |||
| 85b5bacfe3 | |||
| e62ff286ff | |||
| cb680ef9df | |||
| 63fc9aace8 | |||
| a2c3322df7 | |||
| 049e9d23c5 | |||
| 4c3ab508c7 | |||
| 747d6122bc | |||
| aad846583d | |||
| 4e173c1972 | |||
| ef99d544fa | |||
| 684bfd64c6 | |||
| 29c4aa4620 | |||
| d100d62a72 | |||
| 3021b2f9c5 | |||
| 6fcdb50dab | |||
| 54a5815105 | |||
| c4c58e0914 | |||
| 8eb2604704 | |||
| ddd859886e | |||
| ae50f6688e | |||
| 6170ebd396 | |||
| 82372115ae | |||
| 71dfbdc419 | |||
| 79d0a134e3 | |||
| 3882b2e881 | |||
| 6b356d4208 | |||
| a2e9c74b50 | |||
| d9555cc567 | |||
| 9fada89f96 | |||
| 46b76af645 | |||
| b30b492e66 | |||
| 2c251cd285 | |||
| 7fd20269e7 | |||
| 374262a8d7 | |||
| 89739421cf | |||
| 1be5209e9f | |||
| 65e092ab25 | |||
| 5f5f05805f | |||
| 6eb3f5672f | |||
| 1f1416dd50 | |||
| 1ee3bad88b | |||
| 7f0f947667 | |||
| 23d70b5101 | |||
| 2a40743ed0 | |||
| ac8418de8e | |||
| e1ecf992f3 | |||
| cf6ec7657e | |||
| 75c5ccecfa | |||
| 722cb27d04 | |||
| 13ce1147fc | |||
| b7cd446822 | |||
| 5691518e91 | |||
| 2b3fb62065 | |||
| c2b6523d9f | |||
| 620fce4bba | |||
| 8b3311860b | |||
| 58d61cb153 | |||
| 32f52ae236 | |||
| c5ceacd68f | |||
| aa4bc616b9 | |||
| b203c4109b | |||
| a16b3d25ce | |||
| cc2b44a8ec | |||
| 5ecb1adc34 | |||
| d328d7f2b8 | |||
| 711d3afa5c | |||
| 99822fc5e7 | |||
| 181f4c041d | |||
| 3ca4f2d3e5 | |||
| 300adb42fa | |||
| e5e027b9fa | |||
| 9a268ec7cc | |||
| b0ed5b99e9 | |||
| 4a95d78c45 | |||
| dd0c20f6b6 | |||
| 42c925b672 | |||
| ff4596e45c | |||
| cc2bb4b8cf | |||
| 015ff084e3 | |||
| 11943ebaaf | |||
| 2092715ac7 | |||
| 272bcf3c97 | |||
| d14e74ccf6 | |||
| 3a59f2f65e | |||
| 817d1eaf8e | |||
| 6737859330 | |||
| fd07b2888f | |||
| 5d9af29024 | |||
| 965c6ac2ea | |||
| d2d3cd1b46 | |||
| 0c6bcf3e78 | |||
| 303fe6744e | |||
| 3aef8b7292 | |||
| 6aa66b5363 | |||
| c2426e88c9 | |||
| 09eae3e2af | |||
| 25b3f2eae7 | |||
| 9462c87ce5 | |||
| 03927a3283 | |||
| 7afc43901d | |||
| 49f52cc051 | |||
| c0bd12bdf0 | |||
| 0871024eda | |||
| 4566ed2bf9 | |||
| 9591af8be8 | |||
| 28ff9d602a | |||
| a3382f5a09 | |||
| 212741af05 | |||
| 00dbb24658 | |||
| fdebcf690b | |||
| 763e8bd3a0 | |||
| 6950c953a1 | |||
| fd6bdd3b59 | |||
| f098a112a1 | |||
| ce4f4fb3fa | |||
| faf9d1600f | |||
| f4b9cad720 | |||
| 6def0cf502 | |||
| 6969b9b2b8 | |||
| 5ffce90f23 | |||
| 64cb3e6a63 | |||
| 1fe1e1a1e8 | |||
| ed5467c4a9 | |||
| fadfffc0b6 | |||
| 08e110c835 | |||
| 2c8657826f | |||
| b756598070 | |||
| 14334880d8 | |||
| 2ad8a0d868 | |||
| f89d4a60cd | |||
| 5bf78f40e5 | |||
| aac4b38432 | |||
| 41d23a448a | |||
| 274f5f9d53 | |||
| d8bd0b7da8 | |||
| 773013cde7 | |||
| 921b7fc2d3 | |||
| 8b9cdc8329 | |||
| 43d341feac | |||
| 81e09bd6e1 | |||
| 48e6a1e387 | |||
| 41dbcb1a81 | |||
| e94a18268e | |||
| 409bd256a9 | |||
| 17927cc09f | |||
| cfc734b7c5 | |||
| 09e0ffe935 | |||
| 938e9c13cd | |||
| b75c956c02 | |||
| 9727861d66 | |||
| 2829a8ee2b | |||
| 46cea77585 | |||
| 4290876e64 | |||
| 510756935c | |||
| beb93ada1e | |||
| 0bfdaa25bf | |||
| 017f4cca18 | |||
| 2f1de098bd | |||
| d25a4213fe | |||
| 17674f7b11 | |||
| 356712f44d | |||
| c6b18e9654 | |||
| ff41a79aa9 | |||
| 1826decb0b | |||
| 070f0da1c0 | |||
| e0e839e7cc | |||
| e5948b0d44 | |||
| 03daae3059 | |||
| b0549e4d09 | |||
| 8e48503253 | |||
| c198e875ce | |||
| 73439d5a50 | |||
| 36ab9d97e4 | |||
| 8bfd25e2e6 | |||
| 1ffd0a58b9 | |||
| 4fc90b86bf | |||
| 63f9289769 | |||
| 06fa5923e8 | |||
| 13241cdca5 | |||
| 93dfc8b105 | |||
| 874a24956c | |||
| a457e22d57 | |||
| 6b9dd2add3 | |||
| eb71be4219 | |||
| 8cd13ef580 | |||
| 622410a64e | |||
| 7c805aa699 | |||
| 9237852b26 | |||
| f46f759975 | |||
| 5d222c8d5c | |||
| 363d2d5e68 | |||
| ba6f21d910 | |||
| 2a02bb10e5 | |||
| 107f83c923 | |||
| 38f3b40894 | |||
| 3070c12fa3 | |||
| 1d5433485c | |||
| 4c0c7d9adc | |||
| 8985607951 | |||
| 89137552a7 | |||
| 5b2cf75f6e | |||
| 481e8f197d | |||
| 66cb9f6ea2 | |||
| 8f9d88edd0 | |||
| f1e372b5e2 | |||
| 7b6c9328be | |||
| 4fa9ddc6b9 | |||
| d7a6fcba5f | |||
| f811621611 | |||
| 6c8d6eef58 | |||
| 59cdade5f0 | |||
| e5586e14d9 | |||
| b43883a814 | |||
| 20560f0a63 | |||
| e36b066dc8 | |||
| b696e3d67f | |||
| 7340fd1637 | |||
| f03e2ff95c | |||
| 3247974eb4 | |||
| 824cfb6427 | |||
| 7b5585239f | |||
| 92e5696236 | |||
| a80f4c7681 | |||
| 930b42aecf | |||
| c84274cd2b | |||
| b13ed3b816 | |||
| b52047c69e | |||
| b551d6f247 | |||
| 4c9fd4a625 | |||
| fc41ad336d | |||
| 1d4509ddd8 | |||
| b4da825f60 | |||
| ca35b67307 | |||
| f62022e812 | |||
| 54dd19da92 | |||
| bc4294e297 | |||
| 5e0ca4740b | |||
| 70c41f614a | |||
| e0c8f2867d | |||
| 763b8ec050 | |||
| 9d0d8231e8 | |||
| 11177a0967 | |||
| c5a3bbc474 | |||
| 50bb175e7f |
@@ -5,7 +5,7 @@ on:
|
||||
- pull_request
|
||||
|
||||
env:
|
||||
WEECHAT_DEPENDENCIES: devscripts equivs python3-pip cmake ninja-build lcov pkg-config libncursesw5-dev gem2deb libperl-dev python3-dev libaspell-dev liblua5.3-dev tcl8.6-dev guile-3.0-dev libv8-dev libcurl4-gnutls-dev libgcrypt20-dev libgnutls28-dev libzstd-dev zlib1g-dev curl libcpputest-dev php-dev libphp-embed libargon2-dev libsodium-dev flake8 pylint python3-bandit asciidoctor ruby-pygments.rb shellcheck
|
||||
WEECHAT_DEPENDENCIES: devscripts equivs python3-pip cmake ninja-build lcov pkg-config libncurses-dev gem2deb libperl-dev python3-dev libaspell-dev liblua5.3-dev tcl8.6-dev guile-3.0-dev libv8-dev libcurl4-gnutls-dev libgcrypt20-dev libgnutls28-dev libzstd-dev zlib1g-dev curl libcpputest-dev php-dev libphp-embed libargon2-dev libsodium-dev flake8 pylint python3-bandit asciidoctor ruby-pygments.rb shellcheck
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -19,6 +19,7 @@ jobs:
|
||||
- { name: "gcc", cc: "gcc", cxx: "g++", buildargs: "" }
|
||||
- { name: "gcc_ninja", cc: "gcc", cxx: "g++", buildargs: "-G Ninja" }
|
||||
- { name: "gcc_no_nls", cc: "gcc", cxx: "g++", buildargs: "-DENABLE_NLS=OFF -DENABLE_DOC=OFF" }
|
||||
- { name: "gcc_no_zstd", cc: "gcc", cxx: "g++", buildargs: "-DENABLE_ZSTD=OFF -DENABLE_DOC=OFF" }
|
||||
- { name: "gcc_coverage", cc: "gcc", cxx: "g++", buildargs: "-DENABLE_CODE_COVERAGE=ON" }
|
||||
- { name: "clang", cc: "clang", cxx: "clang++", buildargs: "" }
|
||||
|
||||
@@ -92,7 +93,9 @@ jobs:
|
||||
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup Homebrew
|
||||
id: setup-homebrew
|
||||
uses: Homebrew/actions/setup-homebrew@master
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
@@ -112,6 +115,8 @@ jobs:
|
||||
;
|
||||
brew install asciidoctor guile lua pkg-config ruby
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
CC: ${{ matrix.config.cc }}
|
||||
|
||||
@@ -81,10 +81,12 @@ Alphabetically:
|
||||
* Lázaro A.
|
||||
* Leonid Evdokimov
|
||||
* Linus Heckemann
|
||||
* LuK1337
|
||||
* Maarten de Vries
|
||||
* Mantas Mikulėnas (grawity)
|
||||
* Marco Paolone
|
||||
* Marco Sirabella
|
||||
* Mario Campos
|
||||
* Mateusz Poszwa
|
||||
* Matt Robinson
|
||||
* Matthew Horan
|
||||
|
||||
+15
-17
@@ -19,7 +19,7 @@
|
||||
# along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
project(weechat C)
|
||||
|
||||
@@ -29,7 +29,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}")
|
||||
set(CMAKE_SKIP_RPATH ON)
|
||||
|
||||
# compiler options
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsigned-char -fms-extensions -Wall -Wextra -Werror-implicit-function-declaration")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsigned-char -fms-extensions -Wall -Wextra -Werror-implicit-function-declaration -Wformat -Werror=format-security")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char -fms-extensions -Wall -Wextra")
|
||||
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
# extra options specific to gcc/g++
|
||||
@@ -99,6 +99,7 @@ option(ENABLE_NCURSES "Compile the Ncurses interface" ON)
|
||||
option(ENABLE_HEADLESS "Compile the headless binary" ON)
|
||||
option(ENABLE_NLS "Enable Native Language Support" ON)
|
||||
option(ENABLE_LARGEFILE "Enable Large File Support" ON)
|
||||
option(ENABLE_ZSTD "Enable Zstandard compression" ON)
|
||||
option(ENABLE_ALIAS "Enable Alias plugin" ON)
|
||||
option(ENABLE_BUFLIST "Enable Buflist plugin" ON)
|
||||
option(ENABLE_CHARSET "Enable Charset plugin" ON)
|
||||
@@ -200,20 +201,6 @@ if(ENABLE_LARGEFILE)
|
||||
add_definitions(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_LARGE_FILES)
|
||||
endif()
|
||||
|
||||
# Check for Gettext
|
||||
if(ENABLE_NLS)
|
||||
find_package(Gettext)
|
||||
if(GETTEXT_FOUND)
|
||||
add_definitions(-DENABLE_NLS)
|
||||
find_package(Intl)
|
||||
if(Intl_FOUND)
|
||||
list(APPEND EXTRA_LIBS "${Intl_LIBRARIES}")
|
||||
endif()
|
||||
else()
|
||||
message(SEND_ERROR "Gettext not found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Check for libgcrypt
|
||||
find_package(GCRYPT REQUIRED)
|
||||
add_definitions(-DHAVE_GCRYPT)
|
||||
@@ -230,7 +217,10 @@ list(APPEND EXTRA_LIBS gnutls)
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
# Check for zstd
|
||||
pkg_check_modules(LIBZSTD REQUIRED libzstd)
|
||||
if(ENABLE_ZSTD)
|
||||
pkg_check_modules(LIBZSTD REQUIRED libzstd)
|
||||
add_definitions(-DHAVE_ZSTD)
|
||||
endif()
|
||||
|
||||
# Check for iconv
|
||||
find_package(Iconv)
|
||||
@@ -258,7 +248,15 @@ endif()
|
||||
add_subdirectory(icons)
|
||||
|
||||
if(ENABLE_NLS)
|
||||
find_package(Gettext REQUIRED)
|
||||
add_definitions(-DENABLE_NLS)
|
||||
find_package(Intl)
|
||||
if(Intl_FOUND)
|
||||
list(APPEND EXTRA_LIBS "${Intl_LIBRARIES}")
|
||||
endif()
|
||||
add_subdirectory(po)
|
||||
else()
|
||||
add_custom_target(translations COMMAND true)
|
||||
endif()
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
+168
-4
@@ -10,6 +10,169 @@ This document lists all the changes for each version. +
|
||||
For a list of important changes that require manual actions, please look at release notes.
|
||||
|
||||
|
||||
[[v4.1.0]]
|
||||
== Version 4.1.0 (2023-10-15)
|
||||
|
||||
New features::
|
||||
|
||||
* core: add completion "eval_variables", used in completion of `/eval`
|
||||
* core: add command `/sys` to show resource limits/usage and suspend WeeChat process, add key kbd:[Ctrl+z] to suspend WeeChat (issue #985)
|
||||
* core: ignore key bindings with empty command
|
||||
* core: add support of quotes in commands `/key bind` and `/key bindctxt`
|
||||
* core: evaluate command given to `/repeat` with contextual variables (issue #2007)
|
||||
* core: add option `callbacks` in command `/debug`
|
||||
* core: add option type "enum" (issue #1973)
|
||||
* core: add options weechat.buffer.* to save buffer properties set by user, add option `setauto` in command `/buffer` (issue #352)
|
||||
* core: add parameters and key bindings to move to edges of current area with commands `/cursor go` and `/cursor move` (issue #1282)
|
||||
* core: add variables "_chat_focused_line_bol" and "_chat_focused_line_eol" in focus data (issue #1955)
|
||||
* api: add function hook_url, add option `url` in command `/debug` (issue #1723)
|
||||
* api: add support of path to variable and hashtable comparison in function hdata_compare (issue #1066)
|
||||
* api: add infos "nick_color_ignore_case" and "nick_color_name_ignore_case" (issue #194)
|
||||
* api: add info "buffer" (issue #1962)
|
||||
* buflist: add support of item names in command `/buflist refresh`, add completions "buflist_items" and "buflist_items_used"
|
||||
* buflist: increase max number of buflist items from 3 to 5 (issue #1703)
|
||||
* fset: add variable `allowed_values` in options, add options fset.color.allowed_values and fset.color.allowed_values_selected
|
||||
* fset: allow long type name in type filter
|
||||
* irc: add count for all nick modes in output of `/names` (issue #97, issue #2020)
|
||||
* irc: add count and mode filter in command `/names` (issue #98)
|
||||
* irc: compute color in case insensitive way, reintroduce infos "irc_nick_color" and "irc_nick_color_name", add support of server name (issue #194)
|
||||
* irc: add buffer for /list reply, add options irc.color.list_buffer_line_selected, irc.color.list_buffer_line_selected_bg, irc.look.list_buffer_sort, irc.look.list_buffer_scroll_horizontal, irc.look.new_list_position, irc.look.list_buffer_topic_strip_colors (issue #1972)
|
||||
* irc: display commands 716/717 in private buffer (if present) (issue #146)
|
||||
* irc: create default options irc.ctcp.* when file irc.conf is created (issue #1974)
|
||||
* irc: evaluate options irc.ctcp.* (issue #1974)
|
||||
* irc: build dynamically the list of CTCPs supported in reply to "CTCP CLIENTINFO" (issue #1974)
|
||||
* irc: remove Git revision and compilation date from CTCP VERSION reply (issue #1974)
|
||||
* irc: remove default CTCP replies FINGER and USERINFO (issue #1974)
|
||||
* irc, xfer: add support of passive DCC (issue #2004, issue #487)
|
||||
* script: rename parameters up/down/go to -up/-down/-go in command `/script`
|
||||
* script: allow jump to the last script with command `/script -go end`
|
||||
* script: allow commands `/script autoload`, `/script noautoload`, `/script toggleautoload` with scripts not present in the repository (issue #1980)
|
||||
* trigger: add options `-o`, `-ol`, `-i` and `-il` in command `/trigger list` (issue #1953)
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* core: fix zombie processes after fork (hook process or connect) (issue #1994)
|
||||
* core: fix generation of TOTP on Big Endian systems (issue #2021)
|
||||
* core: fix cursor position after `/plugin list -i` or `/plugin list -il`
|
||||
* core: display focus hashtable for debug even if no key is matching
|
||||
* fset: add local key bindings during the buffer creation
|
||||
* fset: remove extra spaces between min and max values when second format is used
|
||||
* fset: fix mouse actions when second format is used
|
||||
* fset: apply option fset.color.help_description (issue #1988)
|
||||
* irc: move value `-all` at the end of completions for command `/ignore del`
|
||||
* irc: fix memory leak when joining channels with keys
|
||||
* irc: fix unexpected message sent to server when part of the second line of an IRC command (issue #1992)
|
||||
* irc: fix display of country code in message 344 received as whois geo info (issue #1736)
|
||||
* irc: add missing "account-tag" in list of supported capabilities
|
||||
* irc: add channel in "autojoin" server option only when the channel is actually joined (issue #1990)
|
||||
* relay: synchronize nick modes with IRC client upon connection (issue #1984)
|
||||
* script: add local key bindings during the buffer creation
|
||||
* script: add parameters up/down/go in `/help script` and command completion
|
||||
* script: fix cursor position after `/script list -i` or `/script list -il`
|
||||
* script: fix buffer used by command `/script list -i|-il|-o|-ol`
|
||||
* xfer: display an error message when opening file for read or write fails (issue #2010)
|
||||
|
||||
Tests::
|
||||
|
||||
* core: add tests on GUI buffer functions
|
||||
|
||||
Build::
|
||||
|
||||
* core: fix build error if CMake option ENABLE_NLS is turned to off or if required dependencies are not found (issue #2026)
|
||||
* core, logger, relay: make zstd dependency optional (issue #2024)
|
||||
|
||||
[[v4.0.5]]
|
||||
== Version 4.0.5 (2023-09-24)
|
||||
|
||||
New features::
|
||||
|
||||
* core: automatically backup config file read if it has an unsupported version (issue #2013)
|
||||
* core: display a message when a configuration file is updated to a newer version
|
||||
* python: make stub (weechat.pyi) compatible with Python 3.8 and 3.9 (issue #2006)
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* irc: add option irc.look.open_pv_buffer_echo_msg to open private buffer on self message when capability echo-message is enabled (issue #2016)
|
||||
* irc: fix title of private buffers wrongly set to own address when capability echo-message is enabled (issue #2016)
|
||||
* irc: fix autojoin of channels when private buffers are opened (issue #2012)
|
||||
* irc: fix string comparison when CASEMAPPING is set to "ascii"
|
||||
* script: fix removal of script in system directory while trying to install a script (issue #2019)
|
||||
* script: fix autoload of multiple scripts at once with `/script autoload` (issue #2018)
|
||||
* script: fix crash when a `/script` command triggers another `/script` command (issue #923)
|
||||
* xfer: fix memory leak on plugin unload
|
||||
|
||||
Tests::
|
||||
|
||||
* irc: add tests on server functions
|
||||
|
||||
[[v4.0.4]]
|
||||
== Version 4.0.4 (2023-08-22)
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* core: fix integer overflow when setting integer option with `++N` or `--N`
|
||||
* core: fix increment/decrement of options weechat.notify.*
|
||||
* irc: add missing tags on multiline messages (issue #1987)
|
||||
* irc: fix redirection of command `/list` when the reply doesn't start with message 321 (start of /list)
|
||||
* irc: fix wrong time displayed for CTCP messages received from self nick (issue #2000)
|
||||
* logger: remove trailing empty line in display of backlog (issue #2002)
|
||||
* perl: fix display of non-ASCII chars after load of a script with Perl >= 5.38 (issue #1996)
|
||||
* script: adjust scroll after command `/script go N`
|
||||
* scripts: fix function string_parse_size on 32-bit systems (python and ruby) (issue #1999)
|
||||
* xfer: fix conversion of string to IPv4 on 32-bit systems (issue #1999)
|
||||
|
||||
Tests::
|
||||
|
||||
* irc: fix tests on function irc_join_compare_join_channel (issue #1997)
|
||||
* scripts: fix tests of functions print_date_tag, print_y_date_tags and hook_timer on 32-bit systems (issue #1999)
|
||||
|
||||
[[v4.0.3]]
|
||||
== Version 4.0.3 (2023-08-08)
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* core: fix input length and crash after delete of line (issue #1989)
|
||||
* irc: fix display of self CTCP message containing bold attribute (issue #1981)
|
||||
* irc: fix memory leak in IRC message parser
|
||||
* irc: fix switch to channel manually joined when server option autojoin_dynamic is on and option irc.look.buffer_switch_autojoin is off (issue #1982)
|
||||
* irc: fix display of outgoing notice with channel when capability "echo-message" is enabled (issue #1991)
|
||||
* relay: fix display of IRC CTCP messages received from client (issue #1986)
|
||||
|
||||
Build::
|
||||
|
||||
* doc: display a warning if a locale is missing with fallback to English for auto-generated content (issue #1985)
|
||||
|
||||
[[v4.0.2]]
|
||||
== Version 4.0.2 (2023-07-12)
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* core: fix renaming of options with command `/item rename` (issue #1978)
|
||||
* core: don't send "key_pressed" signal again for the same key press (issue #1976)
|
||||
* core: don't send "key_combo_*" signals for incomplete keys (issue #1976)
|
||||
* core: add key kbd:[Ctrl+Backspace] in /help key (issue #1975)
|
||||
* core: keep keys `ctrl-H` and `ctrl-?` (in lower case) if they were manually bound to custom commands in a previous version
|
||||
|
||||
Tests::
|
||||
|
||||
* core: fix hdata tests failure on Alpine 3.18
|
||||
* relay: fix crash in tests on Alpine 3.18
|
||||
|
||||
Build::
|
||||
|
||||
* php: fix detection of PHP 8.2 on Alpine 3.18
|
||||
|
||||
[[v4.0.1]]
|
||||
== Version 4.0.1 (2023-06-30)
|
||||
|
||||
* core: force key "return" to command "/input return" when migrating legacy keys
|
||||
* core: display actual key name and command with key kbd:[Alt+k], remove key kbd:[Alt+K] (grab raw key) and associated commands `/input grab_raw_key` and `/input grab_raw_key_command`
|
||||
* core: check for newline characters in string_is_whitespace_char (issue #1968)
|
||||
* api: do not convert option name to lower case in API functions config_set_plugin and config_set_desc_plugin
|
||||
* guile: fix crash on quit with Guile < 3 (issue #1965)
|
||||
* irc: reply to a CTCP request sent to self nick (issue #1966)
|
||||
* irc: sent "QUIT" message to servers connected with TLS on `/upgrade`
|
||||
|
||||
[[v4.0.0]]
|
||||
== Version 4.0.0 (2023-06-24)
|
||||
|
||||
@@ -24,7 +187,7 @@ New features::
|
||||
* core: insert multiple pasted lines in input instead of sending immediately, add keys to move and delete in a single line and whole input, add option weechat.look.input_multiline_lead_linebreak (issue #1502, issue #1503, issue #1504)
|
||||
* core: render newline characters in chat line messages (issue #1908)
|
||||
* core: don't split on newline characters in printf_date_tags when input_multiline is set (issue #1909)
|
||||
* core: add key @kbd:[l] in cursor mode to quote line, add variable "_chat_focused_line" in function hashtable sent to hook_focus callback (issue #1913, issue #1914)
|
||||
* core: add key kbd:[l] (lower `L`) in cursor mode to quote line, add variable "_chat_focused_line" in function hashtable sent to hook_focus callback (issue #1913, issue #1914)
|
||||
* core: add option `split_return` in command `/input` (issue #1916)
|
||||
* core: send all command line parameters not beginning with a dash to all plugins
|
||||
* core: add command `/reset` to reset options to their default values
|
||||
@@ -33,6 +196,7 @@ New features::
|
||||
* core: add access to hashtable properties in evaluation of expressions (issue #1888)
|
||||
* core: display similar command names when a command is unknown (issue #1877)
|
||||
* core: rename option weechat.color.status_name_ssl to weechat.color.status_name_tls
|
||||
* core: add option weechat.color.status_name_insecure to display buffer name with a specific color when not connected with TLS to the server
|
||||
* core, plugins: make many identifiers case sensitive (issue #1872, issue #398, bug #32213)
|
||||
* core: add item "mouse_status" in default status bar, change default color to lightgreen
|
||||
* core, trigger: add options weechat.color.chat_status_disabled and weechat.color.chat_status_enabled, remove options trigger.color.trigger and trigger.color.trigger_disabled, add enabled/disabled status color in output of `/filter list` (issue #1820)
|
||||
@@ -140,7 +304,7 @@ Build::
|
||||
* core: remove obsolete cpack config
|
||||
* core: add "stable-number" and "devel-number" in script version.sh
|
||||
* core: add quotes around paths in CMake files (issue #29)
|
||||
* doc: convert docgen.py to C, remove autogen files from repository, add parameter `--doc-gen` to `weechat-headless` binary, add CMake option `ENABLE_DOC_INCOMPLETE`
|
||||
* doc: convert docgen.py to C, remove autogen files from repository, add parameter `--doc-gen` to `weechat-headless` binary, add CMake option "ENABLE_DOC_INCOMPLETE"
|
||||
|
||||
[[v3.8]]
|
||||
== Version 3.8 (2023-01-08)
|
||||
@@ -1637,7 +1801,7 @@ New features::
|
||||
* core: add option weechat.look.hotlist_add_conditions, remove option weechat.look.hotlist_add_buffer_if_away
|
||||
* core: add option weechat.look.hotlist_remove (issue #99)
|
||||
* core: add options `-beep` and `-current` in command `/print`
|
||||
* core: add bare display mode for easy text selection and click on URLs, new key: kbd:[Alt+l] (`L`), new option "bare" in command `/window`, new options: weechat.look.bare_display_exit_on_input and weechat.look.bare_display_time_format
|
||||
* core: add bare display mode for easy text selection and click on URLs, new key: kbd:[Alt+l] (lower `L`), new option "bare" in command `/window`, new options: weechat.look.bare_display_exit_on_input and weechat.look.bare_display_time_format
|
||||
* core: add signals "key_combo_{default|search|cursor}"
|
||||
* core: add terabyte unit for size displayed
|
||||
* core: display a warning in case of inconsistency between the options weechat.look.save_{config|layout}_on_exit
|
||||
@@ -1961,7 +2125,7 @@ Documentation::
|
||||
Build::
|
||||
|
||||
* core: add CA_FILE option in CMake and configure to setup default value of option weechat.network.gnutls_ca_file (default is "/etc/ssl/certs/ca-certificates.crt") (task #12725)
|
||||
* core: disable build of doc by default, add CMake option ENABLE_MAN to compile man page (off by default)
|
||||
* core: disable build of doc by default, add CMake option "ENABLE_MAN" to compile man page (off by default)
|
||||
* xfer: fix compilation on OpenBSD (bug #39071)
|
||||
|
||||
[[v0.4.1]]
|
||||
|
||||
+184
-31
@@ -11,6 +11,155 @@ It is recommended to read it when upgrading to a new stable version. +
|
||||
For a complete list of changes, please look at ChangeLog.
|
||||
|
||||
|
||||
[[v4.1.0]]
|
||||
== Version 4.1.0 (2023-10-15)
|
||||
|
||||
[[v4.1.0_cursor_mode_keys]]
|
||||
=== New keys to move in cursor mode
|
||||
|
||||
New keys have been added to move in cursor mode, and existing keys to move to
|
||||
another area have been changed: modifier is now kbd:[Alt+Shift] instead of
|
||||
kbd:[Alt].
|
||||
|
||||
You can change existing keys and add new ones with these commands:
|
||||
|
||||
----
|
||||
/key bindctxt cursor meta-up /cursor move edge_top
|
||||
/key bindctxt cursor meta-down /cursor move edge_bottom
|
||||
/key bindctxt cursor meta-left /cursor move edge_left
|
||||
/key bindctxt cursor meta-right /cursor move edge_right
|
||||
/key bindctxt cursor meta-end /cursor move bottom_right
|
||||
/key bindctxt cursor meta-home /cursor move top_left
|
||||
/key bindctxt cursor meta-shift-up /cursor move area_up
|
||||
/key bindctxt cursor meta-shift-down /cursor move area_down
|
||||
/key bindctxt cursor meta-shift-left /cursor move area_left
|
||||
/key bindctxt cursor meta-shift-right /cursor move area_right
|
||||
----
|
||||
|
||||
[[v4.1.0_irc_ctcp_replies]]
|
||||
=== IRC CTCP replies
|
||||
|
||||
IRC CTCP replies are now evaluated, with the same variables available, so now
|
||||
the syntax is for example `${version}` instead of `$version`. +
|
||||
The existing options `irc.ctcp.*` are automatically converted on upgrade.
|
||||
|
||||
In addition, for privacy reasons, these default CTCP replies have been removed:
|
||||
|
||||
- FINGER
|
||||
- USERINFO
|
||||
|
||||
If ever you want that WeeChat replies to these CTCP requests, you can add them
|
||||
back with the two following commands:
|
||||
|
||||
----
|
||||
/set irc.ctcp.finger "WeeChat ${version}"
|
||||
/set irc.ctcp.userinfo "${username} (${realname})"
|
||||
----
|
||||
|
||||
They will then be advertised in reply to "CTCP CLIENTINFO", which is now built
|
||||
dynamically with these options.
|
||||
|
||||
[[v4.1.0_nick_color_infos]]
|
||||
=== Nick color infos
|
||||
|
||||
Two infos to get nick colors have been added: nick_color_ignore_case and
|
||||
nick_color_name_ignore_case. +
|
||||
They are similar to nick_color and nick_color_name, except they take as second
|
||||
argument a range of chars to apply on the nick: the nick is converted to lower
|
||||
case using this range of chars.
|
||||
|
||||
The infos irc_nick_color and irc_nick_color_name, that were deprecated since
|
||||
version 1.5 are now used again, with a change in parameter: the server is now
|
||||
optional before the nick: "server,nick". +
|
||||
The nick is first converted to lower case, following the value of CASEMAPPING
|
||||
on the server, then hashed to compute the color. +
|
||||
That means the color for a nick is now case insensitive (in the way IRC servers
|
||||
are case insensitive, so with a limited range of chars only).
|
||||
|
||||
If a script was using this info with a comma in nickname (which should not happen
|
||||
anyway), this is now interpreted as the server name, and the script must be
|
||||
modified. +
|
||||
Anyway, it is recommended to always give the server name to respect the
|
||||
CASEMAPPING of the server and prevent any issue with a comma in the nickname.
|
||||
|
||||
For example nick color of "alice" and "ALICE" is now always guaranteed to be the
|
||||
same:
|
||||
|
||||
----
|
||||
# with server name (recommended)
|
||||
weechat.info_get("irc_nick_color", "libera,alice") == weechat.info_get("irc_nick_color", "libera,ALICE")
|
||||
weechat.info_get("irc_nick_color_name", "libera,alice") == weechat.info_get("irc_nick_color_name", "libera,ALICE")
|
||||
|
||||
# without server name (allowed but not recommended, kept for compatibility)
|
||||
weechat.info_get("irc_nick_color", "alice") == weechat.info_get("irc_nick_color", "ALICE")
|
||||
weechat.info_get("irc_nick_color_name", "alice") == weechat.info_get("irc_nick_color_name", "ALICE")
|
||||
----
|
||||
|
||||
[[v4.1.0_fset_allowed_values]]
|
||||
=== Allowed values for options on fset buffer
|
||||
|
||||
A new variable `allowed_values` has been added in fset options.
|
||||
|
||||
The default value for the second format has changed. +
|
||||
You can reset it with this command:
|
||||
|
||||
----
|
||||
/reset fset.format.option2
|
||||
----
|
||||
|
||||
[[v4.1.0_fset_mouse]]
|
||||
=== Mouse actions on fset buffer
|
||||
|
||||
Mouse actions on fset buffer has been fixed when option `fset.look.format_number`
|
||||
is set to 2.
|
||||
|
||||
The key for button 1 on fset buffer has been fixed. +
|
||||
You can reset it with this command:
|
||||
|
||||
----
|
||||
/reset weechat.key_mouse.@chat(fset.fset):button1
|
||||
----
|
||||
|
||||
[[v4.0.5]]
|
||||
== Version 4.0.5 (2023-09-24)
|
||||
|
||||
No release notes.
|
||||
|
||||
[[v4.0.4]]
|
||||
== Version 4.0.4 (2023-08-22)
|
||||
|
||||
No release notes.
|
||||
|
||||
[[v4.0.3]]
|
||||
== Version 4.0.3 (2023-08-08)
|
||||
|
||||
No release notes.
|
||||
|
||||
[[v4.0.2]]
|
||||
== Version 4.0.2 (2023-07-12)
|
||||
|
||||
No release notes.
|
||||
|
||||
[[v4.0.1]]
|
||||
== Version 4.0.1 (2023-06-30)
|
||||
|
||||
[[v4.0.1_config_set_plugin]]
|
||||
=== Functions config_set_plugin and config_set_desc_plugin
|
||||
|
||||
The functions link:https://weechat.org/doc/weechat/plugin/#_config_set_plugin[config_set_plugin]
|
||||
and link:https://weechat.org/doc/weechat/plugin/#_config_set_desc_plugin[config_set_desc_plugin]
|
||||
are not converting any more the option name to lower case because since version 4.0.0,
|
||||
the name of options is case sensitive.
|
||||
|
||||
[[v4.0.1_grab_raw_key]]
|
||||
=== Grab raw key and command
|
||||
|
||||
Key kbd:[Alt+K] (upper case) has been removed, as well as commands
|
||||
`/input grab_raw_key` and `/input grab_raw_key_command`.
|
||||
|
||||
Now the key kbd:[Alt+k] displays the actual key name and command, possibly
|
||||
raw key.
|
||||
|
||||
[[v4.0.0]]
|
||||
== Version 4.0.0 (2023-06-24)
|
||||
|
||||
@@ -182,6 +331,10 @@ Alias converted to lower case: "CLOSE" => "close"
|
||||
[[v4.0.0_tls]]
|
||||
=== TLS options and connections
|
||||
|
||||
Option `weechat.color.status_name_insecure` has been added, the buffer name
|
||||
is now displayed with color `lightmagenta` by default if the connection with
|
||||
the server is *NOT* made with TLS.
|
||||
|
||||
Options, commands and documentation have been updated to "TLS" instead of "SSL":
|
||||
|
||||
* core option:
|
||||
@@ -449,7 +602,7 @@ now any return value is ignored (like it has always been in the C API).
|
||||
[[v3.7.1]]
|
||||
== Version 3.7.1 (2022-10-21)
|
||||
|
||||
Bug fix and maintenance release.
|
||||
No release notes.
|
||||
|
||||
[[v3.7]]
|
||||
== Version 3.7 (2022-10-09)
|
||||
@@ -571,7 +724,7 @@ and is now a percentage between `0` and `100`:
|
||||
[[v3.4.1]]
|
||||
== Version 3.4.1 (2022-03-13)
|
||||
|
||||
Bug fix and maintenance release.
|
||||
No release notes.
|
||||
|
||||
[[v3.4]]
|
||||
== Version 3.4 (2021-12-18)
|
||||
@@ -729,7 +882,7 @@ For example:
|
||||
[[v3.2.1]]
|
||||
== Version 3.2.1 (2021-09-04)
|
||||
|
||||
Bug fix and maintenance release.
|
||||
No release notes.
|
||||
|
||||
[[v3.2]]
|
||||
== Version 3.2 (2021-06-13)
|
||||
@@ -959,7 +1112,7 @@ must adjust the value of the new option, which defaults to 1:
|
||||
[[v3.0.1]]
|
||||
== Version 3.0.1 (2021-01-31)
|
||||
|
||||
Bug fix and maintenance release.
|
||||
No release notes.
|
||||
|
||||
[[v3.0]]
|
||||
== Version 3.0 (2020-11-11)
|
||||
@@ -1267,7 +1420,7 @@ version:
|
||||
[[v2.7.1]]
|
||||
== Version 2.7.1 (2020-02-20)
|
||||
|
||||
Bug fix and maintenance release.
|
||||
No release notes.
|
||||
|
||||
[[v2.7]]
|
||||
== Version 2.7 (2019-12-08)
|
||||
@@ -1511,7 +1664,7 @@ Functions removed from C API:
|
||||
[[v2.3]]
|
||||
== Version 2.3 (2018-10-21)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v2.2]]
|
||||
== Version 2.2 (2018-07-14)
|
||||
@@ -1647,7 +1800,7 @@ List of options moved:
|
||||
[[v2.0.1]]
|
||||
== Version 2.0.1 (2017-12-20)
|
||||
|
||||
Bug fix and maintenance release.
|
||||
No release notes.
|
||||
|
||||
[[v2.0]]
|
||||
== Version 2.0 (2017-12-03)
|
||||
@@ -1742,12 +1895,12 @@ to integer before using it, for example in Python: `int(fd)`.
|
||||
[[v1.9.1]]
|
||||
== Version 1.9.1 (2017-09-23)
|
||||
|
||||
Bug fix and maintenance release.
|
||||
No release notes.
|
||||
|
||||
[[v1.9]]
|
||||
== Version 1.9 (2017-06-25)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v1.8]]
|
||||
== Version 1.8 (2017-05-13)
|
||||
@@ -1799,7 +1952,7 @@ Aspell option with color for suggestion on a misspelled word has been renamed:
|
||||
[[v1.7.1]]
|
||||
== Version 1.7.1 (2017-04-22)
|
||||
|
||||
Bug fix and maintenance release.
|
||||
No release notes.
|
||||
|
||||
[[v1.7]]
|
||||
== Version 1.7 (2017-01-15)
|
||||
@@ -2046,7 +2199,7 @@ command:
|
||||
[[v1.1.1]]
|
||||
== Version 1.1.1 (2015-01-25)
|
||||
|
||||
Bug fix and maintenance release.
|
||||
No release notes.
|
||||
|
||||
[[v1.1]]
|
||||
== Version 1.1 (2015-01-11)
|
||||
@@ -2166,7 +2319,7 @@ instead of milliseconds:
|
||||
[[v1.0.1]]
|
||||
== Version 1.0.1 (2014-09-28)
|
||||
|
||||
Bug fix and maintenance release.
|
||||
No release notes.
|
||||
|
||||
[[v1.0]]
|
||||
== Version 1.0 (2014-08-15)
|
||||
@@ -2992,17 +3145,17 @@ This version fixes a major bug: crash with some special chars in IRC messages.
|
||||
[[v0.2.6]]
|
||||
== Version 0.2.6 (2007-09-06)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.2.5]]
|
||||
== Version 0.2.5 (2007-06-07)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.2.4]]
|
||||
== Version 0.2.4 (2007-03-29)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.2.3]]
|
||||
== Version 0.2.3 (2007-01-10)
|
||||
@@ -3061,7 +3214,7 @@ Which gives something like:
|
||||
[[v0.2.1]]
|
||||
== Version 0.2.1 (2006-10-01)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.2.0]]
|
||||
== Version 0.2.0 (2006-08-19)
|
||||
@@ -3175,74 +3328,74 @@ at startup.
|
||||
[[v0.1.5]]
|
||||
== Version 0.1.5 (2005-09-24)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.1.4]]
|
||||
== Version 0.1.4 (2005-07-30)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.1.3]]
|
||||
== Version 0.1.3 (2005-07-02)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.1.2]]
|
||||
== Version 0.1.2 (2005-05-21)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.1.1]]
|
||||
== Version 0.1.1 (2005-03-20)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.1.0]]
|
||||
== Version 0.1.0 (2005-02-12)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.0.9]]
|
||||
== Version 0.0.9 (2005-01-01)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.0.8]]
|
||||
== Version 0.0.8 (2004-10-30)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.0.7]]
|
||||
== Version 0.0.7 (2004-08-08)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.0.6]]
|
||||
== Version 0.0.6 (2004-06-05)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.0.5]]
|
||||
== Version 0.0.5 (2004-02-07)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.0.4]]
|
||||
== Version 0.0.4 (2004-01-01)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.0.3]]
|
||||
== Version 0.0.3 (2003-11-03)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.0.2]]
|
||||
== Version 0.0.2 (2003-10-05)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.0.1]]
|
||||
== Version 0.0.1 (2003-09-27)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ if(NOT PHP_FOUND)
|
||||
execute_process(COMMAND ${PHP_CONFIG_EXECUTABLE} --version OUTPUT_VARIABLE PHP_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(${PHP_VERSION} MATCHES "^[78]")
|
||||
find_library(PHP_LIB
|
||||
NAMES php8.2 php8.1 php8.0 php8 php7.4 php7.3 php7.2 php7.1 php7.0 php7 php
|
||||
NAMES php8.2 php82 php8.1 php81 php8.0 php80 php8 php7.4 php74 php7.3 php73 php7.2 php72 php7.1 php71 php7.0 php70 php7 php
|
||||
HINTS ${PHP_LIB_PREFIX} ${PHP_LIB_PREFIX}/lib ${PHP_LIB_PREFIX}/lib64
|
||||
)
|
||||
if(PHP_LIB)
|
||||
|
||||
@@ -7,7 +7,7 @@ Build-Depends:
|
||||
ruby-pygments.rb,
|
||||
debhelper (>= 12),
|
||||
cmake, pkg-config,
|
||||
libncursesw5-dev,
|
||||
libncurses-dev,
|
||||
gem2deb,
|
||||
libperl-dev,
|
||||
python3-dev,
|
||||
@@ -22,7 +22,7 @@ Build-Depends:
|
||||
libgnutls28-dev,
|
||||
libzstd-dev,
|
||||
zlib1g-dev
|
||||
Standards-Version: 4.6.0.1
|
||||
Standards-Version: 4.6.2
|
||||
Homepage: https://weechat.org/
|
||||
Vcs-Git: https://salsa.debian.org/kolter/weechat.git
|
||||
Vcs-Browser: https://salsa.debian.org/kolter/weechat
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
weechat (2.1-1) unstable; urgency=medium
|
||||
|
||||
This release introduces a new headless client and a new PHP plugin for
|
||||
scripting (respectively weechat-headless and weechat-php binary
|
||||
packages).
|
||||
To avoid at least unnecessary dependencies, each plugin has its own
|
||||
separate binary package:
|
||||
weechat-{perl,python,ruby,lua,guile,javascript,php}
|
||||
Depending on your needs about scripting with weechat you should consider
|
||||
to install the missing packages.
|
||||
|
||||
-- Emmanuel Bouthenot <kolter@debian.org> Wed, 21 Mar 2018 07:53:40 +0100
|
||||
|
||||
weechat (1.1.1-1) unstable; urgency=medium
|
||||
|
||||
Since version 1.1, there is a new format for regexp replacement in
|
||||
triggers. This format is incompatible with version 1.0. The existing
|
||||
triggers will not be automatically updated.
|
||||
See https://weechat.org/files/releasenotes/ReleaseNotes-1.1.html
|
||||
|
||||
-- Emmanuel Bouthenot <kolter@debian.org> Sun, 25 Jan 2015 20:41:50 +0100
|
||||
|
||||
weechat (0.3.1-1) unstable; urgency=low
|
||||
|
||||
This release introduces important changes with the usage of SSL. There
|
||||
are stronger checks while connecting with SSL. By default, if a connection
|
||||
is not fully trusted it will fail.
|
||||
You can find more information on how to handle this new behaviour here:
|
||||
https://blog.weechat.org/post/2009/12/01/SSL-certificates
|
||||
|
||||
-- Emmanuel Bouthenot <kolter@debian.org> Mon, 25 Jan 2010 12:35:11 +0100
|
||||
|
||||
weechat (0.3.0-1) unstable; urgency=low
|
||||
|
||||
This release introduces major changes. Large part of code was
|
||||
rewritten without keeping compatibility with older versions.
|
||||
|
||||
Please refer to the file /usr/share/doc/weechat-core/UPGRADE_0.3
|
||||
for more information on upgrade from a version 0.2.x to 0.3.x.
|
||||
|
||||
-- Emmanuel Bouthenot <kolter@openics.org> Tue, 15 Sep 2009 20:59:42 +0000
|
||||
@@ -1,3 +1,25 @@
|
||||
weechat (4.0.5-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Emmanuel Bouthenot <kolter@debian.org> Sun, 24 Sep 2023 07:49:41 +0000
|
||||
|
||||
weechat (4.0.2-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release (Closes: #1040248)
|
||||
|
||||
-- Emmanuel Bouthenot <kolter@debian.org> Sat, 22 Jul 2023 05:48:35 +0000
|
||||
|
||||
weechat (4.0.1-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release
|
||||
* Remove NEWS file, no longer required
|
||||
* Update build dependency from libncursesw5-dev to libncurses-dev
|
||||
* Bump Standards-Version to 4.6.2
|
||||
* Remove all patches (no longer required)
|
||||
|
||||
-- Emmanuel Bouthenot <kolter@debian.org> Tue, 04 Jul 2023 19:02:41 +0000
|
||||
|
||||
weechat (3.8-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release
|
||||
|
||||
@@ -7,7 +7,7 @@ Build-Depends:
|
||||
ruby-pygments.rb,
|
||||
debhelper (>= 12),
|
||||
cmake, pkg-config,
|
||||
libncursesw5-dev,
|
||||
libncurses-dev,
|
||||
gem2deb,
|
||||
libperl-dev,
|
||||
python3-dev,
|
||||
@@ -22,7 +22,7 @@ Build-Depends:
|
||||
libgnutls28-dev,
|
||||
libzstd-dev,
|
||||
zlib1g-dev
|
||||
Standards-Version: 4.6.1.0
|
||||
Standards-Version: 4.6.2
|
||||
Homepage: https://weechat.org/
|
||||
Vcs-Git: https://salsa.debian.org/kolter/weechat.git
|
||||
Vcs-Browser: https://salsa.debian.org/kolter/weechat
|
||||
|
||||
+54
-24
@@ -613,6 +613,14 @@ Sollte die macOS Terminal Applikation genutzt werden, empfiehlt es sich,
|
||||
die Option "Use option as meta key" in den Menü-Einstellungen zu aktivieren.
|
||||
Dadurch kann man die kbd:[Option] Taste als Meta-Taste verwenden.
|
||||
|
||||
[[enter_key]]
|
||||
=== Einige Tasten, einschließlich Enter, funktionieren nicht. Weshalb?
|
||||
|
||||
Wenn eine WeeChat Version < 4.0.0 mit Konfigurationsdateien ausgeführt wird,
|
||||
die von einer Weechat Version ≥ 4.0.0 erstellt wurde, sind die Tastennamen ungültig und viele Tasten funktionieren überhaupt nicht mehr. +
|
||||
Um dies zu reparieren, muss WeeChat beendet und alle Einträge aus dem Abschnitt `[key*]` innerhalb der weechat.conf entfernt werden.
|
||||
Wenn WeeChat erneut gestartet wird, wird die Standardtastenbelegung neu erstellt.
|
||||
|
||||
[[customize_key_bindings]]
|
||||
=== Wie kann ich die Tastaturbelegung anpassen?
|
||||
|
||||
@@ -643,6 +651,12 @@ werden um dann z.B. mit einem Kurzbefehl `/123` zum Buffer #123 zu springen:
|
||||
/trigger add numberjump modifier "2000|input_text_for_buffer" "${tg_string} =~ ^/[0-9]+$" "=\/([0-9]+)=/buffer *${re:1}=" "" "" "none"
|
||||
----
|
||||
|
||||
Um einfach von einem Buffer zu einem anderen zu springen, kann man das _go.py_ Skript installieren:
|
||||
|
||||
----
|
||||
/script install go.py
|
||||
----
|
||||
|
||||
[[global_history]]
|
||||
=== Wie kann ich den globalen Verlaufsspeicher (anstelle des Buffer eigenen) mit den Up-/Down-Tasten nutzen?
|
||||
|
||||
@@ -987,35 +1001,19 @@ die Buffer-Eigenschaft genutzt werden, um das maximale Hotlist-Level für einige
|
||||
oder pro Gruppe von Buffern (wie IRC-Server).
|
||||
|
||||
Um nun Highlights (Hervorhebungen) für bestimmte Nicks zu deaktivieren, muss
|
||||
man die entsprechende Eigenschaft auf 2 setzen:
|
||||
man die entsprechende Eigenschaft auf 2 setzen.
|
||||
|
||||
Für den aktuellen Buffer:
|
||||
----
|
||||
/buffer set hotlist_max_level_nicks_add joe:2,mike:2
|
||||
/buffer setauto hotlist_max_level_nicks_add joe:2,mike:2
|
||||
----
|
||||
|
||||
Diese Buffereigenschaft wird aber nicht permanent in der Konfiguration
|
||||
gespeichert. Um diese Eigenschaften permanent zu verwenden, muss man
|
||||
das Skript _buffer_autoset.py_ nutzen:
|
||||
Für alle Kanäle auf dem Server "libera":
|
||||
|
||||
----
|
||||
/script install buffer_autoset.py
|
||||
/set weechat.buffer.irc.libera.*.hotlist_max_level_nicks_add joe:2,mike:2
|
||||
----
|
||||
|
||||
Um zum Beispiel Highlights (Hervorhebungen) von Nick "mike" im Kanal
|
||||
#weechat auf dem IRC Server libera zu deaktivieren:
|
||||
|
||||
----
|
||||
/buffer_autoset add irc.libera.#weechat hotlist_max_level_nicks_add mike:2
|
||||
----
|
||||
|
||||
Um dies auf den kompletten libera Server anzuwenden:
|
||||
|
||||
----
|
||||
/buffer_autoset add irc.libera hotlist_max_level_nicks_add mike:2
|
||||
----
|
||||
|
||||
Für weitere Beispiele, siehe `+/help buffer_autoset+`.
|
||||
|
||||
[[irc_target_buffer]]
|
||||
=== Wie kann ich bei zusammengefügten Buffern den Zielbuffer ändern (z.B. bei einem Server-Buffer)?
|
||||
|
||||
@@ -1148,7 +1146,8 @@ Damit WeeChat weniger Speicher benötigt, solltest Du folgende Tipps umsetzen:
|
||||
Man sollte sich die Tipps zum <<memory_usage,Speicherverbrauch>> ansehen
|
||||
und zusätzlich diese Tipps beherzigen:
|
||||
|
||||
* "nicklist"-Bar sollte versteckt werden: `/bar hide nicklist`
|
||||
* "nicklist"-Bar sollte versteckt werden: `/bar hide nicklist` (Taste: kbd:[Alt+Shift+N]).
|
||||
* deaktiviere "buflist": `/buflist disable` (Taste: kbd:[Alt+Shift+B]).
|
||||
* die Sekundenanzeigen in der Statusbar sollte deaktiviert werden:
|
||||
`+/set weechat.look.item_time_format "%H:%M"+` (dies ist die Standardeinstellung)
|
||||
* die Echtzeit Rechtschreibkorrektur sollte deaktiviert werden (falls sie aktiviert wurde):
|
||||
@@ -1170,14 +1169,19 @@ Deaktiviere die automatische Antwort für alle CTCP Anfragen:
|
||||
|
||||
----
|
||||
/set irc.ctcp.clientinfo ""
|
||||
/set irc.ctcp.finger ""
|
||||
/set irc.ctcp.source ""
|
||||
/set irc.ctcp.time ""
|
||||
/set irc.ctcp.userinfo ""
|
||||
/set irc.ctcp.version ""
|
||||
/set irc.ctcp.ping ""
|
||||
----
|
||||
|
||||
Mit WeeChat < 4.1.0 wurden andere CTCP-Anfragen standardmäßig beantwortet und müssen ebenfalls deaktiviert werden:
|
||||
|
||||
----
|
||||
/set irc.ctcp.finger ""
|
||||
/set irc.ctcp.userinfo ""
|
||||
----
|
||||
|
||||
Entferne und deaktiviere das automatische Ausführen der "xfer"-Erweiterung, die beispielsweise für "IRC DCC" verantwortlich ist:
|
||||
|
||||
----
|
||||
@@ -1213,6 +1217,32 @@ Kennwörter (sofern sie nicht mit dem Befehl `/secure` in _sec.conf_ gesichert w
|
||||
Siehe link:weechat_user.de.html#files_and_directories[Benutzerhandbuch / Dateien und Verzeichnisse ^↗^^]
|
||||
für weitere Informationen über Konfigurationsdateien.
|
||||
|
||||
[[move_to_another_device]]
|
||||
=== Ich möchte mein WeeChat auf ein anderes Gerät verschieben und meine Konfiguration behalten. Was muss ich kopieren?
|
||||
|
||||
Überprüfen Sie zunächst die von WeeChat verwendeten Verzeichnisse mit diesem Befehl: `/debug dirs`. +
|
||||
Die Verzeichnisse home/config und home/data müssen kopiert werden (alle Dateien und Unterverzeichnisse).
|
||||
|
||||
Falls beispielsweise XDG-Verzeichnisse verwendet werden (Standard bei WeeChat ≥ 3.2), sollten die
|
||||
Verzeichnisse `$HOME/.config/weechat` und `$HOME/.local/share/weechat` lauten. +
|
||||
Sollte ein einzelnes Verzeichnis verwenden werden (Standard bei WeeChat < 3.2), sollte das Verzeichnis
|
||||
`$HOME/.weechat` lauuten.
|
||||
|
||||
[IMPORTANT]
|
||||
Die WeeChat-Version auf dem Zielgerät muss größer oder gleich der Version sein des Ausganggerätes. +
|
||||
Ein Downgrade der WeeChat-Konfiguration wird *NICHT UNTERSTÜTZT* und kann zu Schäden führen und ein
|
||||
unbrauchbares WeeChat verursachen.
|
||||
|
||||
Schritte:
|
||||
|
||||
. Weechat beenden: `/quit` (oder `/upgrade -quit`, falls eine Sitzung fortgesetzt werden soll,
|
||||
einschließlich des Inhalts aller Buffer).
|
||||
. Kopieren Sie alle Verzeichnisse, Unterverzeichnisse und Dateien auf das neue Gerät und behalten Sie die
|
||||
Namen und Berechtigungen bei.
|
||||
. Optional: Kopieren Sie alle Dateien außerhalb dieser Verzeichnisse, die auf Ihre Konfiguration verweisen
|
||||
(es wird nicht empfohlen, Dateien außerhalb von WeeChat-Verzeichnissen zu verwenden).
|
||||
. WeeChat auf dem neuen Gerät starten: `weechat` (oder `weechat --upgrade`, falls die Sitzung gesichert wurde).
|
||||
|
||||
[[development]]
|
||||
== Entwicklung
|
||||
|
||||
|
||||
+269
-166
@@ -118,7 +118,7 @@ Die folgende Tabelle zeigt eine Auflistung der Pakete, die zum Erstellen von Wee
|
||||
| pkg-config |
|
||||
| entdeckt installierte Bibliotheken.
|
||||
|
||||
| libncursesw5-dev ^(2)^ |
|
||||
| libncurses-dev |
|
||||
| Ncurses Oberfläche.
|
||||
|
||||
| libcurl4-gnutls-dev |
|
||||
@@ -127,7 +127,7 @@ Die folgende Tabelle zeigt eine Auflistung der Pakete, die zum Erstellen von Wee
|
||||
| libgcrypt20-dev |
|
||||
| Geschützte Daten, IRC SASL Authentifikation.
|
||||
|
||||
| libgnutls28-dev | ≥ 2.2.0 ^(3)^
|
||||
| libgnutls28-dev | ≥ 2.2.0 ^(2)^
|
||||
| IRC-Erweiterung: Unterstützung von TLS Verbindungen, IRC SASL Authentifikation (ECDSA-NIST256P-CHALLENGE). +
|
||||
Relay-Erweiterung: Untersützung von TLS Verbindungen.
|
||||
|
||||
@@ -135,20 +135,12 @@ Die folgende Tabelle zeigt eine Auflistung der Pakete, die zum Erstellen von Wee
|
||||
| Logger-Erweitertung: Kompression von rotierenden Protokolldateien (gzip). +
|
||||
Relay-Erweiterung: Kompression von Nachrichten (WeeChat -> client) with https://zlib.net/[zlib ^↗^^] (weechat protocol). +
|
||||
Script-Erweiterung: Lesen der Repository-Indexdatei (gzip).
|
||||
|
||||
| libzstd-dev | ≥ 0.8.1
|
||||
| Logger-Erweiterung: Kompression von rotierenden Protokolldateien. +
|
||||
Relay-Erweiterung: Kompression von Nachrichten (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat protocol).
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ Der Name stammt von der Debian GNU/Linux Bookworm-Distribution,
|
||||
Version und Name können in anderen Distributionen anders lauten. +
|
||||
^(2)^ Es wird empfohlen WeeChat mit libncurses**w**5-dev (das *w* ist
|
||||
entscheidend) zu kompilieren. Eine Kompilierung kann auch mit libncurses5-dev erfolgen,
|
||||
aber dies wird *NICHT* empfohlen:
|
||||
Es können Darstellungsfehler mit breiten Zeichen auftreten. +
|
||||
^(3)^ GnuTLS ≥ 3.0.21 wird benötigt um eine IRC SASL Authentifizierung mittels
|
||||
^(2)^ GnuTLS ≥ 3.0.21 wird benötigt um eine IRC SASL Authentifizierung mittels
|
||||
ECDSA-NIST256P-CHALLENGE durchzuführen.
|
||||
|
||||
Die folgende Tabelle zeigt die Liste der Pakete, die zum Kompilieren von
|
||||
@@ -156,26 +148,68 @@ WeeChat optional sind:
|
||||
|
||||
[width="100%",cols="5,^3,.^15",options="header"]
|
||||
|===
|
||||
| Paket ^(1)^ | Version | Funktionen
|
||||
| {cpp} compiler (pass:[g++ / clang++]) | | zum Erstellen der Binärdatei und um Test auszuführen, JavaScript Erweiterung.
|
||||
| gettext | | Internationalisierung (Übersetzung der Mitteilungen; Hauptsprache ist englisch).
|
||||
| ca-certificates | | Zertifikate für TLS Verbindungen.
|
||||
| libaspell-dev / libenchant-dev | | Spell Erweiterung.
|
||||
| python3-dev | ≥ 3.0 | Python Erweiterung.
|
||||
| libperl-dev | | Perl Erweiterung.
|
||||
| ruby3.1, ruby3.1-dev | ≥ 1.9.1 | Ruby Erweiterung.
|
||||
| liblua5.4-dev | | Lua Erweiterung.
|
||||
| tcl-dev | ≥ 8.5 | Tcl Erweiterung.
|
||||
| guile-3.0-dev | ≥ 2.0 | Guile (scheme) Erweiterung.
|
||||
| libv8-dev | ≤ 3.24.3 | JavaScript Erweiterung.
|
||||
| php-dev | ≥ 7.0 | PHP Erweiterung.
|
||||
| libphp-embed | ≥ 7.0 | PHP Erweiterung.
|
||||
| libxml2-dev | | PHP Erweiterung.
|
||||
| libargon2-dev | | PHP Erweiterung (wenn PHP ≥ 7.2).
|
||||
| libsodium-dev | | PHP Erweiterung (wenn PHP ≥ 7.2).
|
||||
| asciidoctor | ≥ 1.5.4 | zum Erstellen der man page und der Dokumentation.
|
||||
| ruby-pygments.rb | | Build Dokumentation.
|
||||
| libcpputest-dev | ≥ 3.4 | zum Erstellen und um Test auszuführen.
|
||||
| Paket ^(1)^ | Version | Funktionen
|
||||
|
||||
| {cpp} compiler (pass:[g++ / clang++]) |
|
||||
| zum Erstellen der Binärdatei und um Test auszuführen, JavaScript Erweiterung.
|
||||
|
||||
| gettext |
|
||||
| Internationalisierung (Übersetzung der Mitteilungen; Hauptsprache ist englisch).
|
||||
|
||||
| ca-certificates |
|
||||
| Zertifikate für TLS Verbindungen.
|
||||
|
||||
| libzstd-dev | ≥ 0.8.1
|
||||
| Logger-Erweiterung: Kompression von rotierenden Protokolldateien (zstandard). +
|
||||
Relay-Erweiterung: Kompression von Nachrichten (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat protocol).
|
||||
|
||||
| libaspell-dev / libenchant-dev |
|
||||
| Spell Erweiterung.
|
||||
|
||||
| python3-dev | ≥ 3.0
|
||||
| Python Erweiterung.
|
||||
|
||||
| libperl-dev |
|
||||
| Perl Erweiterung.
|
||||
|
||||
| ruby3.1, ruby3.1-dev | ≥ 1.9.1
|
||||
| Ruby Erweiterung.
|
||||
|
||||
| liblua5.4-dev |
|
||||
| Lua Erweiterung.
|
||||
|
||||
| tcl-dev | ≥ 8.5
|
||||
| Tcl Erweiterung.
|
||||
|
||||
| guile-3.0-dev | ≥ 2.0
|
||||
| Guile (scheme) Erweiterung.
|
||||
|
||||
| libv8-dev | ≤ 3.24.3
|
||||
| JavaScript Erweiterung.
|
||||
|
||||
| php-dev | ≥ 7.0
|
||||
| PHP Erweiterung.
|
||||
|
||||
| libphp-embed | ≥ 7.0
|
||||
| PHP Erweiterung.
|
||||
|
||||
| libxml2-dev |
|
||||
| PHP Erweiterung.
|
||||
|
||||
| libargon2-dev |
|
||||
| PHP Erweiterung (wenn PHP ≥ 7.2).
|
||||
|
||||
| libsodium-dev |
|
||||
| PHP Erweiterung (wenn PHP ≥ 7.2).
|
||||
|
||||
| asciidoctor | ≥ 1.5.4
|
||||
| zum Erstellen der man page und der Dokumentation.
|
||||
|
||||
| ruby-pygments.rb |
|
||||
| Build Dokumentation.
|
||||
|
||||
| libcpputest-dev | ≥ 3.4
|
||||
| zum Erstellen und um Test auszuführen.
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -216,7 +250,7 @@ $ make install
|
||||
|
||||
Optionen für CMake können mit dem Format, `-DOPTION=VALUE`, genutzt werden.
|
||||
|
||||
Liste von häufig verwendeten Optionen:
|
||||
Liste der verfügbaren Optionen:
|
||||
|
||||
[width="100%",cols="3m,3,3m,10",options="header"]
|
||||
|===
|
||||
@@ -270,6 +304,9 @@ Liste von häufig verwendeten Optionen:
|
||||
| ENABLE_GUILE | `ON`, `OFF` | ON
|
||||
| kompiliert <<scripting_plugins,Guile Erweiterung>> (Scheme).
|
||||
|
||||
| ENABLE_HEADLESS | `ON`, `OFF` | ON
|
||||
| Kompilieren der headless Binärdatei.
|
||||
|
||||
| ENABLE_IRC | `ON`, `OFF` | ON
|
||||
| kompiliert <<irc,IRC Erweiterung>>.
|
||||
|
||||
@@ -328,6 +365,9 @@ Liste von häufig verwendeten Optionen:
|
||||
| ENABLE_XFER | `ON`, `OFF` | ON
|
||||
| kompiliert <<xfer,Xfer Erweiterung>>.
|
||||
|
||||
| ENABLE_ZSTD | `ON`, `OFF` | ON
|
||||
| aktiviere https://facebook.github.io/zstd/[Zstandard ^↗^^] Kompression.
|
||||
|
||||
| ENABLE_TESTS | `ON`, `OFF` | OFF
|
||||
| kompiliert Testumgebung.
|
||||
|
||||
@@ -903,8 +943,10 @@ andere Items die zur Verfügung stehen (die aber nicht standardmäßig in einer
|
||||
| buffer_nicklist_count_all | `4` | Anzahl der sichtbaren Gruppen und Nicks in der Nickliste.
|
||||
| buffer_nicklist_count_groups | `0` | Anzahl der sichtbaren Gruppen in der Nickliste.
|
||||
| buffer_short_name | `#test` | Kurzname des aktuellen Buffers.
|
||||
| buflist2 | `1.weechat` | List der Buffer, zweites Bar-Item (siehe Option <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
| buflist3 | `1.weechat` | List der Buffer, drittes Bar-Item (siehe Option <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
| buflist2 | `1.weechat` | Liste der Buffer, zweites Bar-Item (siehe Option <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
| buflist3 | `1.weechat` | Liste der Buffer, drittes Bar-Item (siehe Option <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
| buflist4 | `1.weechat` | Liste der Buffer, viertes Bar-Item (siehe Option <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
| buflist5 | `1.weechat` | Liste der Buffer, fünftes Bar-Item (siehe Option <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
| fset | `+buflist.look.sort: …+` | Hilfstext zur aktuell ausgewählten Option im Fset-Buffer.
|
||||
| irc_channel | `#test` | aktueller Name des IRC Kanals.
|
||||
| irc_host | `+user@host.com+` | aktueller IRC Host.
|
||||
@@ -1348,7 +1390,8 @@ Standardmäßig interpretieren WeeChat und seine Standard-Erweitertungen diese V
|
||||
|
||||
| filter
|
||||
| beliebige Zeichenkette
|
||||
| Filter definiert für einige Buffer `/fset`, `/server raw` (irc) und `/script`.
|
||||
| Filter für einige Buffer definiert, zum Beispiel`/fset`, `/list` (irc), `/server raw` (irc)
|
||||
und `/script`.
|
||||
|
||||
| host
|
||||
| beliebige Zeichenkette
|
||||
@@ -1430,7 +1473,8 @@ Externe Erweitertungen und Skripte können andere lokale Variablen definieren un
|
||||
=== Liste der Buffer
|
||||
|
||||
Die Buflist-Erweiterung dient dazu eine Liste der geöffneten Buffer in einer Bar-Item, mit Namen
|
||||
"buflist", darzustellen (zwei weiere Bar-Items "buflist2" und "buflist3" sind zusätzlich verfügbar). +
|
||||
"buflist", darzustellen (vier weitere Bar-Items sind dabei verfügbar "buflist2", "buflist3", "buflist4"
|
||||
und "buflist5"). +
|
||||
Eine Standardbar, "buflist", wird beim Programmstart automatisch mit folgendem Inhalt erstellt.
|
||||
|
||||
[[buflist_commands]]
|
||||
@@ -1454,6 +1498,20 @@ Optionen:
|
||||
|
||||
include::{autogendir}/autogen_user_options.de.adoc[tag=buflist_options]
|
||||
|
||||
[[cursor_mode]]
|
||||
=== Cursor-Modus
|
||||
|
||||
Mit dem Cursormodus können Sie den Cursor frei an eine beliebige Stelle auf dem Bildschirm bewegen,
|
||||
sowohl im Chatbereich als auch in Bars und ermöglicht das Ausführen von Aktionen an der angegebenen Position. +
|
||||
Sie können den Cursormodus entweder mit dem Befehl `/cursor` oder mit der mittleren Maustaste aktivieren
|
||||
(Maus muss mit der Taste kbd:[Alt+m] oder dem Befehl `/mouse enable` aktiviert worden sein).
|
||||
|
||||
Typischer Anwendungszweck ist das Zitieren von Nachrichten (Chat-Bereich) oder die Interaktion mit Nicks (Nicklist-Leiste).
|
||||
|
||||
Siehe Befehl <<command_weechat_cursor,/cursor>> und
|
||||
<<key_bindings_cursor_context,key bindings in cursor context>>, für die Liste
|
||||
der Aktionen, die in diesem Modus ausgeführt werden können.
|
||||
|
||||
[[key_bindings]]
|
||||
== Tastenbelegungen
|
||||
|
||||
@@ -1547,6 +1605,15 @@ Sie können mit dem Befehl <<command_weechat_key,/key>> geändert und neue hinzu
|
||||
| kbd:[Ctrl+↓] | ruft nächsten Befehl/Nachricht aus dem globalen Verlaufsspeicher auf (für alle Buffer). | `+/input history_global_next+`
|
||||
|===
|
||||
|
||||
[[key_bindings_cmdline_system]]
|
||||
==== System
|
||||
|
||||
[width="100%",cols="^.^3,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Taste | Beschreibung | Befehl
|
||||
| kbd:[Ctrl+z] | Breche den Weechat-Prozess ab | `+/sys suspend+`
|
||||
|===
|
||||
|
||||
[[key_bindings_buffers]]
|
||||
=== Buffer
|
||||
|
||||
@@ -1676,31 +1743,38 @@ in einem Buffer nach einem Text zu suchen).
|
||||
[[key_bindings_cursor_context]]
|
||||
=== Cursor-Kontext
|
||||
|
||||
Diese Tasten werden im Kontext "cursor" verwendet (Cursor kann frei auf dem Bildschirm bewegt werden)
|
||||
Diese Tasten werden im Kontext "cursor" verwendet (Cursor kann frei auf dem Bildschirm bewegt werden),
|
||||
see <<cursor_mode,Cursor mode>>.
|
||||
|
||||
[width="100%",cols="^.^3,^.^2,.^7,.^7",options="header"]
|
||||
|===
|
||||
| Taste | Bereich | Beschreibung | Befehl
|
||||
| kbd:[↑] | - | bewegt Cursor eine Zeile nach oben. | `+/cursor move up+`
|
||||
| kbd:[↓] | - | bewegt Cursor eine Zeile nach unten. | `+/cursor move down+`
|
||||
| kbd:[←] | - | bewegt Cursor eine Spalte nach links. | `+/cursor move left+`
|
||||
| kbd:[→] | - | bewegt Cursor eine Spalte nach rechts. | `+/cursor move right+`
|
||||
| kbd:[Alt+↑] | - | bewegt Cursor einen Bereich nach oben. | `+/cursor move area_up+`
|
||||
| kbd:[Alt+↓] | - | bewegt Cursor einen Bereich nach unten. | `+/cursor move area_down+`
|
||||
| kbd:[Alt+←] | - | bewegt Cursor einen Bereich nach links. | `+/cursor move area_left+`
|
||||
| kbd:[Alt+→] | - | bewegt Cursor einen Bereich nach rechts. | `+/cursor move area_right+`
|
||||
| kbd:[m] | Chat | zitiert Nachricht. | `+hsignal:chat_quote_message;/cursor stop+`
|
||||
| kbd:[l] | Chat | zitiert aktuelle Zeile. | `+hsignal:chat_quote_focused_line;/cursor stop+`
|
||||
| kbd:[q] | Chat | zitiert prefix + Nachricht. | `+hsignal:chat_quote_prefix_message;/cursor stop+`
|
||||
| kbd:[Q] | Chat | zitiert Uhrzeit + prefix + Nachricht. | `+hsignal:chat_quote_time_prefix_message;/cursor stop+`
|
||||
| kbd:[b] | Benutzerliste | verbannt nick (Ban). | `+/window ${_window_number};/ban ${nick}+`
|
||||
| kbd:[k] | Benutzerliste | kickt nick. | `+/window ${_window_number};/kick ${nick}+`
|
||||
| kbd:[K] | Benutzerliste | kickt und verbannt nick. | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| kbd:[q] | Benutzerliste | öffnet privaten Chat mit Nick. | `+/window ${_window_number};/query ${nick};/cursor stop+`
|
||||
| kbd:[w] | Benutzerliste | führt einen whois für Nick aus. | `+/window ${_window_number};/whois ${nick}+`
|
||||
| Taste | Bereich | Beschreibung | Befehl
|
||||
| kbd:[↑] | - | bewegt den Cursor eine Zeile nach oben. | `+/cursor move up+`
|
||||
| kbd:[↓] | - | bewegt den Cursor eine Zeile nach unten. | `+/cursor move down+`
|
||||
| kbd:[←] | - | bewegt den Cursor eine Spalte nach links. | `+/cursor move left+`
|
||||
| kbd:[→] | - | bewegt den Cursor eine Spalte nach rechts. | `+/cursor move right+`
|
||||
| kbd:[Alt+↑] | - | bewegt den Cursor zur ersten Zeile des Bereichs. | `+/cursor move edge_top+`
|
||||
| kbd:[Alt+↓] | - | bewegt den Cursor zur letzten Zeile des Bereichs. | `+/cursor move edge_bottom+`
|
||||
| kbd:[Alt+←] | - | bewegt den Cursor zur ersten Spalte des Bereichs. | `+/cursor move edge_left+`
|
||||
| kbd:[Alt+→] | - | bewegt den Cursor zur letzten Spalte des Bereichs. | `+/cursor move edge_right+`
|
||||
| kbd:[Alt+Home] | - | bewegt den Cursor in die obere linke Ecke des Bereichs. | `+/cursor move top_left+`
|
||||
| kbd:[Alt+End] | - | bewegt den Cursor in die untere rechte Ecke des Bereichs. | `+/cursor move bottom_right+`
|
||||
| kbd:[Alt+Shift+↑] | - | bewegt den Cursor einen Bereich nach oben. | `+/cursor move area_up+`
|
||||
| kbd:[Alt+Shift+↓] | - | bewegt den Cursor einen Bereich nach unten. | `+/cursor move area_down+`
|
||||
| kbd:[Alt+Shift+←] | - | bewegt den Cursor einen Bereich nach links. | `+/cursor move area_left+`
|
||||
| kbd:[Alt+Shift+→] | - | bewegt den Cursor einen Bereich nach rechts. | `+/cursor move area_right+`
|
||||
| kbd:[m] | Chat | zitiert Nachricht. | `+hsignal:chat_quote_message;/cursor stop+`
|
||||
| kbd:[l] | Chat | zitiert aktuelle Zeile. | `+hsignal:chat_quote_focused_line;/cursor stop+`
|
||||
| kbd:[q] | Chat | zitiert prefix + Nachricht. | `+hsignal:chat_quote_prefix_message;/cursor stop+`
|
||||
| kbd:[Q] | Chat | zitiert Uhrzeit + prefix + Nachricht. | `+hsignal:chat_quote_time_prefix_message;/cursor stop+`
|
||||
| kbd:[b] | Benutzerliste | verbannt nick (Ban). | `+/window ${_window_number};/ban ${nick}+`
|
||||
| kbd:[k] | Benutzerliste | kickt nick. | `+/window ${_window_number};/kick ${nick}+`
|
||||
| kbd:[K] | Benutzerliste | kickt und verbannt nick. | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| kbd:[q] | Benutzerliste | öffnet privaten Chat mit Nick. | `+/window ${_window_number};/query ${nick};/cursor stop+`
|
||||
| kbd:[w] | Benutzerliste | führt einen whois für Nick aus. | `+/window ${_window_number};/whois ${nick}+`
|
||||
| kbd:[Enter] +
|
||||
kbd:[Ctrl+j] +
|
||||
kbd:[Ctrl+m] | - | beendet den Cursor-Modus. | `+/cursor stop+`
|
||||
kbd:[Ctrl+m] | - | beendet den Cursor-Modus. | `+/cursor stop+`
|
||||
|===
|
||||
|
||||
[[key_bindings_mouse]]
|
||||
@@ -1712,49 +1786,59 @@ wurde (Befehl: `+/mouse toggle+`).
|
||||
[width="100%",cols="^.^3,^.^3,^.^3,.^8,.^8",options="header"]
|
||||
|===
|
||||
| Maustaste/Mausrad ^(1)^ | Mausgeste | Bereich | Beschreibung | Befehl
|
||||
| ◾◽◽ | - | Chat | wechselt zum Fenster. | `+/window ${_window_number}+`
|
||||
| ◾◽◽ | links | Chat | zum vorherigen Buffer springen. | `+/window ${_window_number};/buffer +1+`
|
||||
| ◾◽◽ | rechts | Chat | zum nächsten Buffer springen. | `+/window ${_window_number};/buffer +1+`
|
||||
| ◾◽◽ | links(lang) | Chat | wechselt zum ersten Buffer. | `+/window ${_window_number};/buffer 1+`
|
||||
| ◾◽◽ | rechts(lang) | Chat | wechselt zum letzten Buffer. | `+/window ${_window_number};/buffer ++`
|
||||
| kbd:[■ □ □] | - | Chat | wechselt zum Fenster. | `+/window ${_window_number}+`
|
||||
| kbd:[■ □ □] | links | Chat | zum vorherigen Buffer springen. | `+/window ${_window_number};/buffer +1+`
|
||||
| kbd:[■ □ □] | rechts | Chat | zum nächsten Buffer springen. | `+/window ${_window_number};/buffer +1+`
|
||||
| kbd:[■ □ □] | links(lang) | Chat | wechselt zum ersten Buffer. | `+/window ${_window_number};/buffer 1+`
|
||||
| kbd:[■ □ □] | rechts(lang) | Chat | wechselt zum letzten Buffer. | `+/window ${_window_number};/buffer ++`
|
||||
| kbd:[▲] | - | Chat | mehrere Zeilen im Verlaufsspeicher des Buffer nach oben blättern. | `+/window scroll_up -window ${_window_number}+`
|
||||
| kbd:[▼] | - | Chat | mehrere Zeilen im Verlaufsspeicher des Buffer nach unten blättern. | `+/window scroll_down -window ${_window_number}+`
|
||||
| kbd:[Ctrl+▲] | - | Chat | horizontal, nach links scrollen. | `+/window scroll_horiz -window ${_window_number} -10%+`
|
||||
| kbd:[Ctrl+▼] | - | Chat | horizontal, nach rechts scrollen. | `+/window scroll_horiz -window ${_window_number} +10%+`
|
||||
| kbd:[▲] | - | chat: fset Buffer | Auswahl wird fünf Einträge nach oben bewegt, im fset Buffer. | `+/fset -up 5+`
|
||||
| kbd:[▼] | - | chat: fset buffer | Auswahl wird fünf Einträge nach unten bewegt, im fset Buffer. | `+/fset -down 5+`
|
||||
| ◾◽◽ | - | chat: fset buffer | springt zu einem Eintrag im fset Buffer. | `+/window ${_window_number};/fset -go ${_chat_line_y}+`
|
||||
| ◽◽◾ | - | chat: fset buffer | Boolean-Wert wird umgeschaltet (an/aus) oder editiere den Wert einer Option. | `+hsignal:fset_mouse+`
|
||||
| ◽◽◾ | left | chat: fset buffer | Integer/Farbwerte werden verringert, andere Variabletypen werden in die Eingabezeile kopiert. | `+hsignal:fset_mouse+`
|
||||
| ◽◽◾ | right | chat: fset buffer | Integer/Farbwerte werden erhöht, andere Variabletypen werden in die Eingabezeile kopiert. | `+hsignal:fset_mouse+`
|
||||
| ◽◽◾ | up / down | chat: fset buffer | markieren/demarkieren von mehreren Optionen. | `+hsignal:fset_mouse+`
|
||||
| kbd:[■ □ □] | - | chat: fset buffer | springt zu einem Eintrag im fset Buffer. | `+/window ${_window_number};/fset -go ${fset_option_index}+`
|
||||
| kbd:[□ □ ■] | - | chat: fset buffer | Boolean-Wert wird umgeschaltet (an/aus) oder editiere den Wert einer Option. | `+hsignal:fset_mouse+`
|
||||
| kbd:[□ □ ■] | left | chat: fset buffer | Integer/Farbwerte/Aufzählung werden verringert, andere Variabletypen werden in die Eingabezeile kopiert. | `+hsignal:fset_mouse+`
|
||||
| kbd:[□ □ ■] | right | chat: fset buffer | Integer/Farbwerte/Aufzählung werden erhöht, andere Variabletypen werden in die Eingabezeile kopiert. | `+hsignal:fset_mouse+`
|
||||
| kbd:[□ □ ■] | up / down | chat: fset buffer | markieren/demarkieren von mehreren Optionen. | `+hsignal:fset_mouse+`
|
||||
| kbd:[▲] | - | chat: /list buffer | gehe fünf Zeilen im /list-Buffer nach oben. | `+/list -up 5+`
|
||||
| kbd:[▼] | - | chat: /list buffer | gehe fünf Zeilen im /list-Buffer nach unten. | `+/list -down 5+`
|
||||
| kbd:[■ □ □] | - | chat: /list buffer | Zeile im /list-Buffer auswählen. | `+/window ${_window_number};/list -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat: /list buffer | tritt dem IRC-Kanal, in der ausgewählten Zeile, bei. | `+hsignal:irc_list_mouse+`
|
||||
| kbd:[▲] | - | chat: script buffer | fünf Zeilen nach oben blättern, im Script-Buffer. | `+/script up 5+`
|
||||
| kbd:[▼] | - | chat: script buffer | fünf Zeilen nach unten blättern, im Script-Buffer. | `+/script down 5+`
|
||||
| ◾◽◽ | - | chat: script buffer | wählt einen Eintrag im Script-Buffer aus. | `+/script go ${_chat_line_y}+`
|
||||
| ◽◽◾ | - | chat: script buffer | installiert/entfernt ein Skript. | `+/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| ◾◽◽ | up / left | buflist | verschiebt Buffer in der Reihenfolge nach unten. | Signal `+buflist_mouse+`.
|
||||
| ◾◽◽ | down / right | buflist | verschiebt Buffer in der Reihenfolge nach oben. | Signal `+buflist_mouse+`.
|
||||
| ◾◽◽ | - | buflist | wechselt zum Buffer (oder zum vorherigen Buffer, falls der aktuell genutzte Buffer angewählt wurde). | Signal `+buflist_mouse+`.
|
||||
| ◽◽◾ | - | buflist | wechselt zum nächsten Buffer, falls der aktuell genutzte Buffer angewählt wurde. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | - | chat: script buffer | wählt einen Eintrag im Script-Buffer aus. | `+/script go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat: script buffer | installiert/entfernt ein Skript. | `+/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[■ □ □] | up / left | buflist | verschiebt Buffer in der Reihenfolge nach unten. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | down / right | buflist | verschiebt Buffer in der Reihenfolge nach oben. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | - | buflist | wechselt zum Buffer (oder zum vorherigen Buffer, falls der aktuell genutzte Buffer angewählt wurde). | Signal `+buflist_mouse+`.
|
||||
| kbd:[□ □ ■] | - | buflist | wechselt zum nächsten Buffer, falls der aktuell genutzte Buffer angewählt wurde. | Signal `+buflist_mouse+`.
|
||||
| kbd:[Ctrl+▲] | - | buflist | wechselt zum vorherigen Buffer. | Signal `+buflist_mouse+`.
|
||||
| kbd:[Ctrl+▼] | - | buflist | wechselt zum nächsten Buffer. | Signal `+buflist_mouse+`.
|
||||
| ◾◽◽ | hoch | Benutzerliste | Benutzerliste um eine Seite nach oben blättern. | `+/bar scroll nicklist ${_window_number} -100%+`
|
||||
| ◾◽◽ | runter | Benutzerliste | Benutzerliste um eine Seite nach unten blättern. | `+/bar scroll nicklist ${_window_number} +100%+`
|
||||
| ◾◽◽ | hoch(lang) | Benutzerliste | springt zum Anfang der Benutzerliste. | `+/bar scroll nicklist ${_window_number} b+`
|
||||
| ◾◽◽ | runter(lang) | Benutzerliste | springt zum Ende der Benutzerliste. | `+/bar scroll nicklist ${_window_number} e+`
|
||||
| ◾◽◽ | - | Benutzerliste | öffnet privaten Chat mit Nick. | `+/window ${_window_number};/query ${nick}+`
|
||||
| ◽◽◾ | - | Benutzerliste | führt einen whois für Nick aus. | `+/window ${_window_number};/whois ${nick}+`
|
||||
| ◾◽◽ | links | Benutzerliste | kickt Nick. | `+/window ${_window_number};/kick ${nick}+`
|
||||
| ◾◽◽ | links(lang) | Benutzerliste | kickt und verbannt Nick. | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| ◽◽◾ | links | Benutzerliste | verbannt Nick. | `+/window ${_window_number};/ban ${nick}+`
|
||||
| ◽◽◾ | - | Input | fängt ein Mausereignis und fügt dieses in die Befehlszeile ein. | `+/input grab_mouse_area+`
|
||||
| kbd:[■ □ □] | hoch | Benutzerliste | Benutzerliste um eine Seite nach oben blättern. | `+/bar scroll nicklist ${_window_number} -100%+`
|
||||
| kbd:[■ □ □] | runter | Benutzerliste | Benutzerliste um eine Seite nach unten blättern. | `+/bar scroll nicklist ${_window_number} +100%+`
|
||||
| kbd:[■ □ □] | hoch(lang) | Benutzerliste | springt zum Anfang der Benutzerliste. | `+/bar scroll nicklist ${_window_number} b+`
|
||||
| kbd:[■ □ □] | runter(lang) | Benutzerliste | springt zum Ende der Benutzerliste. | `+/bar scroll nicklist ${_window_number} e+`
|
||||
| kbd:[■ □ □] | - | Benutzerliste | öffnet privaten Chat mit Nick. | `+/window ${_window_number};/query ${nick}+`
|
||||
| kbd:[□ □ ■] | - | Benutzerliste | führt einen whois für Nick aus. | `+/window ${_window_number};/whois ${nick}+`
|
||||
| kbd:[■ □ □] | links | Benutzerliste | kickt Nick. | `+/window ${_window_number};/kick ${nick}+`
|
||||
| kbd:[■ □ □] | links(lang) | Benutzerliste | kickt und verbannt Nick. | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| kbd:[□ □ ■] | links | Benutzerliste | verbannt Nick. | `+/window ${_window_number};/ban ${nick}+`
|
||||
| kbd:[□ □ ■] | - | Input | fängt ein Mausereignis und fügt dieses in die Befehlszeile ein. | `+/input grab_mouse_area+`
|
||||
| kbd:[▲] | - | jede Bar | blättert Bar um 20% nach oben. | `+/bar scroll ${_bar_name} ${_window_number} -20%+`
|
||||
| kbd:[▼] | - | jede Bar | blättert Bar um 20% nach unten. | `+/bar scroll ${_bar_name} ${_window_number} +20%+`
|
||||
| ◽◾◽ | - | überall | aktiviert den Cursor-Modus an dieser Position. | `+/cursor go ${_x},${_y}+`
|
||||
| kbd:[□ ■ □] | - | überall | aktiviert den Cursor-Modus an dieser Position. | `+/cursor go ${_x},${_y}+`
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ kbd:[▲] und kbd:[▼] sind Symbole für Mausrad hoch/runter.
|
||||
^(1)^ Buttons: +
|
||||
kbd:[◼ □ □]: Klicke linke Maustaste +
|
||||
kbd:[□ ◼ □]: Klicke mittlere Maustaste +
|
||||
kbd:[□ □ ◼]: Klicke rechte Maustaste +
|
||||
Mausrad: +
|
||||
kbd:[▲]: Mausrad hoch +
|
||||
kbd:[▼]: Mausrad runter
|
||||
|
||||
[[key_bindings_fset_buffer]]
|
||||
=== Fset Buffer
|
||||
@@ -1773,8 +1857,8 @@ Diese Tasten und Aktionen werden im fset-Buffer verwendet (siehe <<fset,Fset Erw
|
||||
| kbd:[F11] | `pass:[<]` | scrollt horizontal nach links. | `+/fset -left+`
|
||||
| kbd:[F12] | `pass:[>]` | scrollt horizontal nach rechts. | `+/fset -right+`
|
||||
| kbd:[Alt+Space] | `t` | Boolean Wert ein/ausschalten. | `+/fset -toggle+`
|
||||
| kbd:[Alt+-] | `-` | subtrahiert 1 vom Wert bei Integer/Farboptionen, bei anderen Typen kann der Wert editiert werden. | `+/fset -add -1+`
|
||||
| kbd:[Alt++] | `+` | addiert 1 zum Wert bei Integer/Farboptionen, bei anderen Typen kann der Wert editiert werden. | `+/fset -add 1+`
|
||||
| kbd:[Alt+-] | `-` | subtrahiert 1 vom Wert bei Integer/Farboptionen/Aufzählung, bei anderen Typen kann der Wert editiert werden. | `+/fset -add -1+`
|
||||
| kbd:[Alt++] | `+` | addiert 1 zum Wert bei Integer/Farboptionen/Aufzählung, bei anderen Typen kann der Wert editiert werden. | `+/fset -add 1+`
|
||||
| kbd:[Alt+f], kbd:[Alt+r] | `r` | Wert resetten. | `+/fset -reset+`
|
||||
| kbd:[Alt+f], kbd:[Alt+u] | `u` | Wert zurücksetzen. | `+/fset -unset+`
|
||||
| kbd:[Alt+Enter] | `s` | Wert setzen. | `+/fset -set+`
|
||||
@@ -1788,8 +1872,8 @@ Diese Tasten und Aktionen werden im fset-Buffer verwendet (siehe <<fset,Fset Erw
|
||||
| kbd:[Ctrl+l] (`L`) | | der Bildschirm wird neu gezeichnet. | `+/fset -refresh+`
|
||||
| | `$` | Optionen neu einlesen (markierte Optionen werden beibehalten). |
|
||||
| | `$$` | Optionen neu einlesen (Markierungen von Optionen werden dabei gelöscht). |
|
||||
| kbd:[Alt+p] | | Umschalten der Beschreibung von Erweiterungen (`pass:[plugins.desc.*]`). | `+/mute /set fset.look.show_plugins_desc toggle+`
|
||||
| kbd:[Alt+v] | | Hilfe-Bar Ein-/Ausschalten. | `+/bar toggle fset+`
|
||||
| kbd:[Alt+p] | `p` | Umschalten der Beschreibung von Erweiterungen (`pass:[plugins.desc.*]`). | `+/mute /set fset.look.show_plugins_desc toggle+`
|
||||
| kbd:[Alt+v] | `v` | Hilfe-Bar Ein-/Ausschalten. | `+/bar toggle fset+`
|
||||
| | `s:x,y` | sortiert Optionen nach Bereichen x,y (siehe Option <<option_fset.look.sort,fset.look.sort>>). | `+/mute /set fset.look.sort x,y+`
|
||||
| | `s:` | setzt Sortierung wieder auf Standardwerte (siehe Option <<option_fset.look.sort,fset.look.sort>>). | `+/mute /unset fset.look.sort+`
|
||||
| | `w:xxx` | exportiert Optionen in Datei "xxx". | `+/fset -export xxx+`
|
||||
@@ -1802,6 +1886,39 @@ Diese Tasten und Aktionen werden im fset-Buffer verwendet (siehe <<fset,Fset Erw
|
||||
[NOTE]
|
||||
^(1)^ Die Aktion muss als Eingabe in die Befehlszeile eingegeben werden, gefolgt von kbd:[Enter].
|
||||
|
||||
[[key_bindings_irc_list_buffer]]
|
||||
=== IRC /list Buffer
|
||||
|
||||
Diese Tastenbefehle und Aktionen können im IRC /list-Buffer genutzt werden (siehe Befehl <<command_irc_list,/list>>).
|
||||
|
||||
[width="100%",cols="^.^3,^.^2,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Taste | Action ^(1)^ | Beschreibung | Befehl
|
||||
| kbd:[↑] | | einen Eintrag nach oben. | `+/list -up+`
|
||||
| kbd:[↓] | | einen Eintrag nach unten. | `+/list -down+`
|
||||
| kbd:[PgUp] | | eine Seite hoch blättern. | `+/window page_up+`
|
||||
| kbd:[PgDn] | | eine Seite runter blättern. | `+/window page_down+`
|
||||
| kbd:[Alt+Home] | `pass:[<<]` | springt zum ersten Eintrag. | `+/list -go 0+`
|
||||
| kbd:[Alt+End] | `pass:[>>]` | springt zum letzten Eintrag. | `+/list -go end+`
|
||||
| kbd:[F11] | `pass:[<]` | scrollt horizontal nach links. | `+/list -left+`
|
||||
| kbd:[F12] | `pass:[>]` | scrollt horizontal nach rechts. | `+/list -right+`
|
||||
| kbd:[Ctrl+j] | `j` | Join IRC channel on selected line. | `+/list -join+`
|
||||
| | `xxx` | zeigt nur Kanäle an mit "xxx" im Namen oder Thema (Groß- und Kleinschreibung wird ignoriert). |
|
||||
| | `n:xxx` | zeigt nur Kanäle mit im Namen (Groß- und Kleinschreibung wird ignoriert). |
|
||||
| | `t:xxx` | zeigt nur Kanäle mit "xxx" im Thema (Groß- und Kleinschreibung wird ignoriert). |
|
||||
| | `u:n` | zeigt nur Kanäle mit wenigstens "n" Usern. |
|
||||
| | `u:>n` | zeigt nur Kanäle mit mehr als "n" Usern |
|
||||
| | `u:<n` | zeigt nur Kanäle mit weniger als "n" Usern |
|
||||
| | `c:xxx` | zeigt nur Kanäle an, die der ausgewerteten Bedingung, "xxx", entsprechen , unter Verwendung folgender Variablen: name, name2, users, topic |
|
||||
| | `s:x,y` | sortiert Kanäle nach Feldern x,y (siehe Befehl <<command_irc_list,/list>>). |
|
||||
| | `s:` | Sortierung auf den Standardwert zurücksetzen (siehe Befehl <<command_irc_list,/list>>). |
|
||||
| | `$` | Liste aktualisieren (Der Befehl <<command_irc_list,/list>> wird erneut ausgeführt). |
|
||||
| | `q` | Buffer schließen. | `+/buffer close+`
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ Die Aktion muss als Eingabe in die Befehlszeile eingegeben werden, gefolgt von kbd:[Enter].
|
||||
|
||||
[[key_bindings_script_buffer]]
|
||||
=== Skriptbuffer
|
||||
|
||||
@@ -1816,11 +1933,16 @@ Diese Tasten und Aktionen werden im fset-Buffer verwendet (siehe <<script_manage
|
||||
| kbd:[PgDn] | | eine Seite nach unten blättern. | `+/window page_down+`
|
||||
| kbd:[Alt+i] | `i` | Skript installieren. | `+/script install+`
|
||||
| kbd:[Alt+r] | `r` | Skript entfernen. | `+/script remove+`
|
||||
| kbd:[Alt+l] (`L`) | `l` | Skript laden. | `+/script load+`
|
||||
| kbd:[Alt+l] | `l` | Skript laden. | `+/script load+`
|
||||
| kbd:[Alt+L] | `L` | Skript neu laden. | `+/script reload+`
|
||||
| kbd:[Alt+u] | `u` | Skript wird beendet. | `+/script unload+`
|
||||
| kbd:[Alt+Shift+A] | `A` | das Skript wird in das autoload-Verzeichnis eingebunden. | `+/script toggleautoload+`
|
||||
| kbd:[Alt+h] | `h` | Skript wird gehalten bzw. freigegeben. | `+/script hold+`
|
||||
| kbd:[Alt+v] | `v` | Skript Quelltext anzeigen. | `+/script show+`
|
||||
| | `s:x,y` | Sortiert Skrips nach Feldern x,y (siehe Option <<option_script.look.sort,script.look.sort>>). |
|
||||
| | `s:` | Sortierung auf den Standardwert zurücksetzen (siehe Option <<option_script.look.sort,script.look.sort>>). |
|
||||
| | `$` | Liste aktualisieren. |
|
||||
| | `q` | Buffer schließen. | `+/buffer close+`
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -1844,7 +1966,7 @@ Beispiel des fset-Buffer, der Optionen anzeigt, die mit `weechat.look` beginnen
|
||||
│2.fset │weechat.look.bare_display_exit_on_input: exit the bare display mode on any c│
|
||||
│ │hanges in input [default: on] │
|
||||
│ │----------------------------------------------------------------------------│
|
||||
│ │ weechat.look.align_end_of_lines integer message │
|
||||
│ │ weechat.look.align_end_of_lines enum message │
|
||||
│ │ weechat.look.align_multiline_words boolean on │
|
||||
│ │ weechat.look.bar_more_down string "++" │
|
||||
│ │ weechat.look.bar_more_left string "<<" │
|
||||
@@ -1853,12 +1975,12 @@ Beispiel des fset-Buffer, der Optionen anzeigt, die mit `weechat.look` beginnen
|
||||
│ │## weechat.look.bare_display_exit_on_input boolean on ##│
|
||||
│ │ weechat.look.bare_display_time_format string "%H:%M" │
|
||||
│ │ weechat.look.buffer_auto_renumber boolean on │
|
||||
│ │ weechat.look.buffer_notify_default integer all │
|
||||
│ │ weechat.look.buffer_position integer end │
|
||||
│ │ weechat.look.buffer_notify_default enum all │
|
||||
│ │ weechat.look.buffer_position enum end │
|
||||
│ │ weechat.look.buffer_search_case_sensitive boolean off │
|
||||
│ │ weechat.look.buffer_search_force_default boolean off │
|
||||
│ │ weechat.look.buffer_search_regex boolean off │
|
||||
│ │ weechat.look.buffer_search_where integer prefix_message │
|
||||
│ │ weechat.look.buffer_search_where enum prefix_message │
|
||||
│ │ weechat.look.buffer_time_format string "%H:%M:%S" │
|
||||
│ │ weechat.look.buffer_time_same string "" │
|
||||
│ │[12:55] [2] [fset] 2:fset │
|
||||
@@ -2185,15 +2307,9 @@ und für jeden einzelen Nick kann ein maximler Hotlist-Level eingestellt wertden
|
||||
Um zum Beispiel Highlights von "joe" und "mike" im aktuellen Buffer zu deaktivieren:
|
||||
|
||||
----
|
||||
/buffer set hotlist_max_level_nicks_add joe:2,mike:2
|
||||
/buffer setauto hotlist_max_level_nicks_add joe:2,mike:2
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
Die Buffer-Eigenschaft "hotlist_max_level_nicks" ist keine permanente Einstellung und wird nicht
|
||||
in der Konfigurationsdatei gesichert. + Um diese Einstellung persistent zu machen benötigt man
|
||||
das Skript _buffer_autoset.py_: Um das Skript zu installieren `+/script install buffer_autoset.py+`
|
||||
und um eine Hilfe zu erhalten wie man es nutzt: `+/help buffer_autoset+`.
|
||||
|
||||
[[highlights]]
|
||||
=== Hervorhebungen
|
||||
|
||||
@@ -2218,15 +2334,9 @@ Dies kann auch mit der Buffereigenschaft „highlight_disable_regex“ eingestel
|
||||
Gleiches Beispiel, spezifisch für den aktuellen Buffer:
|
||||
|
||||
----
|
||||
/buffer set highlight_disable_regex <flash.*>
|
||||
/buffer setauto highlight_disable_regex <flash.*>
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
Die Buffer-Eigenschaft "highlight_disable_regex" ist keine permanente Einstellung und wird nicht
|
||||
in der Konfigurationsdatei gesichert. + Um diese Einstellung persistent zu machen benötigt man
|
||||
das Skript _buffer_autoset.py_: Um das Skript zu installieren `+/script install buffer_autoset.py+`
|
||||
und um eine Hilfe zu erhalten wie man es nutzt: `+/help buffer_autoset+`.
|
||||
|
||||
[[highlights_words]]
|
||||
==== Worte als Highlights hinzufügen
|
||||
|
||||
@@ -2285,15 +2395,9 @@ die Eigenschaft des Buffers mittels "highlight_regex" anpasst.
|
||||
Um zum Beispiel jede Nachricht im aktuellen Buffer als Highlight-Nachricht einzustufen:
|
||||
|
||||
----
|
||||
/buffer set highlight_regex .*
|
||||
/buffer setauto highlight_regex .*
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
Die Buffer-Eigenschaft "highlight_regex" ist keine permanente Einstellung und wird nicht
|
||||
in der Konfigurationsdatei gesichert. + Um diese Einstellung persistent zu machen benötigt man
|
||||
das Skript _buffer_autoset.py_: Um das Skript zu installieren `+/script install buffer_autoset.py+`
|
||||
und um eine Hilfe zu erhalten wie man es nutzt: `+/help buffer_autoset+`.
|
||||
|
||||
[[buffer_logging]]
|
||||
=== Bufferprotokollierung
|
||||
|
||||
@@ -3200,30 +3304,31 @@ Sektion in Datei _weechat.conf_:
|
||||
|
||||
[width="100%",cols="3m,6m,16",options="header"]
|
||||
|===
|
||||
| Sektion | Steuerbefehl | Beschreibung
|
||||
| debug | <<command_weechat_debug,/debug set>> +
|
||||
/set weechat.debug.* | Debug level, für Core und Erweitertungen (Optionen können in Sektion hinzugefügt/entfernt werden).
|
||||
| startup | /set weechat.startup.* | Optionen die nach dem Programmstart ausgeführt werden.
|
||||
| look | /set weechat.look.* | Erscheinungsbild.
|
||||
| palette | <<command_weechat_color,/color alias>> +
|
||||
/set weechat.palette.* | Alternativnamen für Farben (Optionen können in Sektion hinzugefügt/entfernt werden).
|
||||
| color | /set weechat.color.* | Farben.
|
||||
| completion | /set weechat.completion.* | Optionen für Vervollständigung.
|
||||
| history | /set weechat.history.* | Optionen für Befehlsverlauf (Befehle und Buffer).
|
||||
| proxy | <<command_weechat_proxy,/proxy>> +
|
||||
/set weechat.proxy.* | Proxy Optionen.
|
||||
| network | /set weechat.network.* | Netzwerk/TLS Optionen.
|
||||
| plugin | /set weechat.plugin.* | Optionen für Erweiterungen.
|
||||
| signal | /set weechat.signal.* | Optionen für Signale.
|
||||
| bar | <<command_weechat_bar,/bar>> +
|
||||
/set weechat.bar.* | Optionen für die Bars.
|
||||
| layout | <<command_weechat_layout,/layout>> | Layouts.
|
||||
| notify | <<command_weechat_buffer,/buffer notify>> | Benachrichtigungsstufe für Buffer (Optionen können in Sektion hinzugefügt/entfernt werden).
|
||||
| filter | <<command_weechat_filter,/filter>> | Filter.
|
||||
| key | <<command_weechat_key,/key>> | Tastenbefehle in default context.
|
||||
| key_search | <<command_weechat_key,/key>> | Tastenbefehle in search context.
|
||||
| key_cursor | <<command_weechat_key,/key>> | Tastenbefehle in cursor context.
|
||||
| key_mouse | <<command_weechat_key,/key>> | Tastenbefehle in mouse context.
|
||||
| Sektion | Steuerbefehl | Beschreibung
|
||||
| debug | <<command_weechat_debug,/debug set>> +
|
||||
/set weechat.debug.* | Debug level, für Core und Erweitertungen (Optionen können in Sektion hinzugefügt/entfernt werden).
|
||||
| startup | /set weechat.startup.* | Optionen die nach dem Programmstart ausgeführt werden.
|
||||
| look | /set weechat.look.* | Erscheinungsbild.
|
||||
| palette | <<command_weechat_color,/color alias>> +
|
||||
/set weechat.palette.* | Alternativnamen für Farben (Optionen können in Sektion hinzugefügt/entfernt werden).
|
||||
| color | /set weechat.color.* | Farben.
|
||||
| completion | /set weechat.completion.* | Optionen für Vervollständigung.
|
||||
| history | /set weechat.history.* | Optionen für Befehlsverlauf (Befehle und Buffer).
|
||||
| proxy | <<command_weechat_proxy,/proxy>> +
|
||||
/set weechat.proxy.* | Proxy Optionen.
|
||||
| network | /set weechat.network.* | Netzwerk/TLS Optionen.
|
||||
| plugin | /set weechat.plugin.* | Optionen für Erweiterungen.
|
||||
| signal | /set weechat.signal.* | Optionen für Signale.
|
||||
| bar | <<command_weechat_bar,/bar>> +
|
||||
/set weechat.bar.* | Optionen für die Bars.
|
||||
| layout | <<command_weechat_layout,/layout>> | Layouts.
|
||||
| buffer | <<command_weechat_buffer,/buffer setauto>> | Eigenschaften, die beim Öffnen des Buffers automatisch angewendet werden.
|
||||
| notify | <<command_weechat_buffer,/buffer notify>> | Benachrichtigungsstufe für Buffer (Optionen können in Sektion hinzugefügt/entfernt werden).
|
||||
| filter | <<command_weechat_filter,/filter>> | Filter.
|
||||
| key | <<command_weechat_key,/key>> | Tastenbefehle in default context.
|
||||
| key_search | <<command_weechat_key,/key>> | Tastenbefehle in search context.
|
||||
| key_cursor | <<command_weechat_key,/key>> | Tastenbefehle in cursor context.
|
||||
| key_mouse | <<command_weechat_key,/key>> | Tastenbefehle in mouse context.
|
||||
|===
|
||||
|
||||
Optionen:
|
||||
@@ -3325,7 +3430,7 @@ irc.server.libera.autorejoin_delay integer null -> 30
|
||||
irc.server.libera.away_check integer null -> 0
|
||||
irc.server.libera.away_check_max_nicks integer null -> 25
|
||||
irc.server.libera.capabilities string null -> "*"
|
||||
irc.server.libera.charset_message integer null -> message
|
||||
irc.server.libera.charset_message enum null -> message
|
||||
irc.server.libera.command string null -> ""
|
||||
irc.server.libera.command_delay integer null -> 0
|
||||
irc.server.libera.connection_timeout integer null -> 60
|
||||
@@ -3341,9 +3446,9 @@ irc.server.libera.notify string null -> ""
|
||||
irc.server.libera.password string null -> ""
|
||||
irc.server.libera.proxy string null -> ""
|
||||
irc.server.libera.realname string null -> ""
|
||||
irc.server.libera.sasl_fail integer null -> reconnect
|
||||
irc.server.libera.sasl_fail enum null -> reconnect
|
||||
irc.server.libera.sasl_key string null -> ""
|
||||
irc.server.libera.sasl_mechanism integer null -> plain
|
||||
irc.server.libera.sasl_mechanism enum null -> plain
|
||||
irc.server.libera.sasl_password string "${sec.data.libera}"
|
||||
irc.server.libera.sasl_timeout integer null -> 15
|
||||
irc.server.libera.sasl_username string "alice"
|
||||
@@ -4066,7 +4171,7 @@ Beispiel: Um eine Antwort auf die CTCP Anfrage "VERSION" anzupassen nutzen Sie
|
||||
folgenden Befehl:
|
||||
|
||||
----
|
||||
/set irc.ctcp.version "I'm running WeeChat $version, it rocks!"
|
||||
/set irc.ctcp.version "I'm running WeeChat ${version}, it rocks!"
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
@@ -4091,7 +4196,7 @@ Auch kann man CTCP Antworten für jeden einzelnen Server anpassen. Dazu muss
|
||||
man lediglich den internen Servernamen vor die CTCP Anfrage setzen:
|
||||
|
||||
----
|
||||
/set irc.ctcp.libera.version "WeeChat $version (for libera)"
|
||||
/set irc.ctcp.libera.version "WeeChat ${version} (for libera)"
|
||||
----
|
||||
|
||||
Sollen die CTCP Antworten wieder auf die Standardeinstellungen zurück gesetzt werden
|
||||
@@ -4101,23 +4206,23 @@ dann müssen Sie lediglich die Option löschen:
|
||||
/unset irc.ctcp.version
|
||||
----
|
||||
|
||||
Folgende Platzhalter können in den CTCP-Antworten genutzt werden. Diese werden dann
|
||||
mit dem entsprechenden Wert ersetzt:
|
||||
Die CTCP Antworten sind evaluiert (siehe Befehl <<command_weechat_eval,/eval>>) und
|
||||
die folgenden zusätzlichen Variablen sind verfügbar:
|
||||
|
||||
[width="100%",cols="2l,4,8",options="header"]
|
||||
[width="100%",cols="2,4,8",options="header"]
|
||||
|===
|
||||
| Platzhalter | Beschreibung | Wert/Beispiel
|
||||
| $clientinfo | Liste der CTCP Antworten | `+ACTION DCC CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION+`
|
||||
| $version | WeeChat Version | `+0.4.0-dev+`
|
||||
| $versiongit | WeeChat Version + Git version ^(1)^ | `+0.4.0-dev (git: v0.3.9-104-g7eb5cc4)+`
|
||||
| $git | Git Version ^(1)^ | `+v0.3.9-104-g7eb5cc4+`
|
||||
| $compilation | Datum der Kompilierung | `+Dec 16 2012+`
|
||||
| $osinfo | Info über das genutzte OS | `+Linux 2.6.32-5-amd64 / x86_64+`
|
||||
| $site | WeeChat Seite | `+https://weechat.org/+`
|
||||
| $download | WeeChat, Download Seite | `+https://weechat.org/download/+`
|
||||
| $time | Aktuelle Uhrzeit/Datum | `+Sun, 16 Dec 2012 10:40:48 +0100+`
|
||||
| $username | Username beim IRC Server | `+Name+`
|
||||
| $realname | Realname beim IRC Server | `+John Doe+`
|
||||
| Variable | Beschreibung | Wert/Beispiel
|
||||
| `+${clientinfo}+` | Liste der CTCP Antworten | `+ACTION DCC CLIENTINFO PING SOURCE TIME VERSION+`
|
||||
| `+${version}+` | WeeChat Version | `+4.1.0-dev+`
|
||||
| `+${versiongit}+` | WeeChat Version + Git version ^(1)^ | `+4.1.0-dev (git: v4.0.0-51-g8f98b922a)+`
|
||||
| `+${git}+` | Git Version ^(1)^ | `+v4.0.0-51-g8f98b922a+`
|
||||
| `+${compilation}+` | Datum der Kompilierung | `+Jul 8 2023 20:14:23+`
|
||||
| `+${osinfo}+` | Info über das genutzte OS | `+Linux 5.10.0-23-amd64 / x86_64+`
|
||||
| `+${site}+` | WeeChat Seite | `+https://weechat.org/+`
|
||||
| `+${download}+` | WeeChat, Download Seite | `+https://weechat.org/download/+`
|
||||
| `+${time}+` | Aktuelle Uhrzeit/Datum | `+Sat, 08 Jul 2023 21:11:19 +0200+`
|
||||
| `+${username}+` | Username beim IRC Server | `+Name+`
|
||||
| `+${realname}+` | Realname beim IRC Server | `+John Doe+`
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -4125,17 +4230,15 @@ mit dem entsprechenden Wert ersetzt:
|
||||
Dies erfordert, dass WeeChat aus dem Git Repository heraus kompiliert wurde
|
||||
und das Git überhaupt installiert ist.
|
||||
|
||||
Falls CTCP Optionen nicht festgelegt sind, lauten die CTCP Antworten:
|
||||
Die Standard-CTCP-Antworten sind:
|
||||
|
||||
[width="100%",cols="2,4,8",options="header"]
|
||||
|===
|
||||
| CTCP | Antwortformat | Beispiel
|
||||
| CLIENTINFO | `+$clientinfo+` | `+ACTION DCC CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION+`
|
||||
| FINGER | `+WeeChat $versiongit+` | `+WeeChat 0.4.0-dev (git: v0.3.9-104-g7eb5cc4)+`
|
||||
| SOURCE | `+$download+` | `+https://weechat.org/download/+`
|
||||
| TIME | `+$time+` | `+Sun, 16 Dec 2012 10:40:48 +0100+`
|
||||
| USERINFO | `+$username ($realname)+` | `+Name (John Doe)+`
|
||||
| VERSION | `+WeeChat $versiongit ($compilation)+` | `+WeeChat 0.4.0-dev (git: v0.3.9-104-g7eb5cc4) (Dec 16 2012)+`
|
||||
| CTCP | Antwortformat | Beispiel
|
||||
| CLIENTINFO | `+${clientinfo}+` | `+ACTION DCC CLIENTINFO PING SOURCE TIME VERSION+`
|
||||
| SOURCE | `+${download}+` | `+https://weechat.org/download/+`
|
||||
| TIME | `+${time}+` | `+Sat, 08 Jul 2023 21:11:19 +0200+`
|
||||
| VERSION | `+WeeChat ${version}+` | `+WeeChat 4.1.0-dev+`
|
||||
|===
|
||||
|
||||
[[irc_target_buffer]]
|
||||
|
||||
@@ -140,6 +140,7 @@ WeeChat "core" is located in following directories:
|
||||
| wee-secure-config.c | Secured data options (file sec.conf).
|
||||
| wee-signal.c | Signal functions.
|
||||
| wee-string.c | Functions on strings.
|
||||
| wee-sys.c | System functions.
|
||||
| wee-upgrade-file.c | Internal upgrade system.
|
||||
| wee-upgrade.c | Upgrade for WeeChat core (buffers, lines, history, ...).
|
||||
| wee-url.c | URL transfer (using libcurl).
|
||||
@@ -166,6 +167,7 @@ WeeChat "core" is located in following directories:
|
||||
| wee-hook-process.c | Hook "process".
|
||||
| wee-hook-signal.c | Hook "signal".
|
||||
| wee-hook-timer.c | Hook "timer".
|
||||
| wee-hook-url.c | Hook "url".
|
||||
| gui/ | Functions for buffers, windows, ... (used by all interfaces).
|
||||
| gui-bar-item.c | Bar items.
|
||||
| gui-bar-window.c | Bar windows.
|
||||
@@ -236,6 +238,7 @@ WeeChat "core" is located in following directories:
|
||||
| buflist.c | Main buflist functions.
|
||||
| buflist-bar-item.c | Buflist bar items.
|
||||
| buflist-command.c | Buflist commands.
|
||||
| buflist-completion.c | Buflist completions.
|
||||
| buflist-config.c | Buflist config options (file buflist.conf).
|
||||
| buflist-info.c | Buflist info/infolists/hdata.
|
||||
| buflist-mouse.c | Buflist mouse actions.
|
||||
@@ -281,6 +284,7 @@ WeeChat "core" is located in following directories:
|
||||
| irc-info.c | IRC info/infolists/hdata.
|
||||
| irc-input.c | Input of commands/text.
|
||||
| irc-join.c | Functions for list of channels to join.
|
||||
| irc-list.c | Buffer for reply to /list command.
|
||||
| irc-message.c | Functions to manipulate IRC messages.
|
||||
| irc-mode.c | Functions about channel/nick modes.
|
||||
| irc-modelist.c | IRC channel mode lists (+b, +e, +I, ...).
|
||||
@@ -419,6 +423,7 @@ WeeChat "core" is located in following directories:
|
||||
| test-core-url.cpp | Tests: URLs.
|
||||
| test-core-utf8.cpp | Tests: UTF-8.
|
||||
| test-core-util.cpp | Tests: utility functions.
|
||||
| test-core-sys.cpp | Tests: system functions.
|
||||
| gui/ | Root of unit tests for interfaces.
|
||||
| test-gui-bar-window.cpp | Tests: bar window functions.
|
||||
| test-gui-buffer.cpp | Tests: buffer functions.
|
||||
@@ -436,8 +441,10 @@ WeeChat "core" is located in following directories:
|
||||
| test-irc-channel.cpp | Tests: IRC channels.
|
||||
| test-irc-color.cpp | Tests: IRC colors.
|
||||
| test-irc-config.cpp | Tests: IRC configuration.
|
||||
| test-irc-ctcp.cpp | Tests: IRC CTCP.
|
||||
| test-irc-ignore.cpp | Tests: IRC ignores.
|
||||
| test-irc-join.cpp | Tests: IRC join functions.
|
||||
| test-irc-list.cpp | Tests: IRC buffer for reply to /list command.
|
||||
| test-irc-message.cpp | Tests: IRC messages.
|
||||
| test-irc-mode.cpp | Tests: IRC modes.
|
||||
| test-irc-nick.cpp | Tests: IRC nicks.
|
||||
|
||||
+58
-24
@@ -583,6 +583,14 @@ If you are using the macOS Terminal app, enable the option
|
||||
"Use option as meta key" in menu Settings/Keyboard after which you can use the
|
||||
kbd:[Option] key as meta key.
|
||||
|
||||
[[enter_key]]
|
||||
=== Some keys including Enter are not working, why?
|
||||
|
||||
If you run a WeeChat < 4.0.0 with configuration files created by any
|
||||
version ≥ 4.0.0, the keys names become invalid and many keys won't work at all. +
|
||||
To repair them, exit WeeChat, remove all sections `[key*]` from weechat.conf
|
||||
and start WeeChat again: all default keys will be created.
|
||||
|
||||
[[customize_key_bindings]]
|
||||
=== How can I customize key bindings?
|
||||
|
||||
@@ -612,6 +620,12 @@ commands like `/123` to jump to buffer #123:
|
||||
/trigger add numberjump modifier "2000|input_text_for_buffer" "${tg_string} =~ ^/[0-9]+$" "=\/([0-9]+)=/buffer *${re:1}=" "" "" "none"
|
||||
----
|
||||
|
||||
For an easy jump to buffers, you can also install the _go.py_ script:
|
||||
|
||||
----
|
||||
/script install go.py
|
||||
----
|
||||
|
||||
[[global_history]]
|
||||
=== How to use global history (instead of buffer history) with up and down keys?
|
||||
|
||||
@@ -919,35 +933,20 @@ link:weechat_user.en.html#max_hotlist_level_nicks[hotlist_max_level_nicks_add ^
|
||||
buffer property to set the max hotlist level for some nicks, per buffer,
|
||||
or per group of buffers (like IRC servers).
|
||||
|
||||
To only disable highlights, you'd have to set it to 2:
|
||||
To only disable highlights, you'd have to set it to 2.
|
||||
|
||||
For the current buffer:
|
||||
|
||||
----
|
||||
/buffer set hotlist_max_level_nicks_add joe:2,mike:2
|
||||
/buffer setauto hotlist_max_level_nicks_add joe:2,mike:2
|
||||
----
|
||||
|
||||
This buffer property isn't stored in the configuration though.
|
||||
To automatically reapply these buffer properties, you would need the
|
||||
_buffer_autoset.py_ script:
|
||||
For all channels on server "libera":
|
||||
|
||||
----
|
||||
/script install buffer_autoset.py
|
||||
/set weechat.buffer.irc.libera.*.hotlist_max_level_nicks_add joe:2,mike:2
|
||||
----
|
||||
|
||||
For example, to permanently disable highlights from "mike" on #weechat
|
||||
on the IRC server libera:
|
||||
|
||||
----
|
||||
/buffer_autoset add irc.libera.#weechat hotlist_max_level_nicks_add mike:2
|
||||
----
|
||||
|
||||
To apply it to the entire libera server instead:
|
||||
|
||||
----
|
||||
/buffer_autoset add irc.libera hotlist_max_level_nicks_add mike:2
|
||||
----
|
||||
|
||||
For more examples, see `+/help buffer_autoset+`.
|
||||
|
||||
[[irc_target_buffer]]
|
||||
=== How can I change target buffer for commands on merged buffers (like buffer with servers)?
|
||||
|
||||
@@ -1074,7 +1073,8 @@ You can try following tips to consume less memory:
|
||||
|
||||
You can follow same tips as for <<memory_usage,memory>>, and these ones:
|
||||
|
||||
* Hide "nicklist" bar: `/bar hide nicklist`.
|
||||
* Hide "nicklist" bar: `/bar hide nicklist` (key: kbd:[Alt+Shift+N]).
|
||||
* Disable "buflist": `/buflist disable` (key: kbd:[Alt+Shift+B]).
|
||||
* Remove display of seconds in status bar time:
|
||||
`+/set weechat.look.item_time_format "%H:%M"+` (this is the default value).
|
||||
* Disable real time check of misspelled words in command line (if you enabled it):
|
||||
@@ -1096,14 +1096,20 @@ Disable answers to all CTCP queries:
|
||||
|
||||
----
|
||||
/set irc.ctcp.clientinfo ""
|
||||
/set irc.ctcp.finger ""
|
||||
/set irc.ctcp.source ""
|
||||
/set irc.ctcp.time ""
|
||||
/set irc.ctcp.userinfo ""
|
||||
/set irc.ctcp.version ""
|
||||
/set irc.ctcp.ping ""
|
||||
----
|
||||
|
||||
With WeeChat < 4.1.0, other CTCP queries were replied by default and must be
|
||||
disabled as well:
|
||||
|
||||
----
|
||||
/set irc.ctcp.finger ""
|
||||
/set irc.ctcp.userinfo ""
|
||||
----
|
||||
|
||||
Unload and disable auto-loading of "xfer" plugin (used for IRC DCC):
|
||||
|
||||
----
|
||||
@@ -1138,6 +1144,34 @@ stored in _sec.conf_ with the `/secure` command).
|
||||
See the link:weechat_user.en.html#files_and_directories[User's guide / Files and directories ^↗^^]
|
||||
for more information about configuration files.
|
||||
|
||||
[[move_to_another_device]]
|
||||
=== I want to move my WeeChat to another device and keep my config, what should I copy?
|
||||
|
||||
First check directories used by WeeChat with this command: `/debug dirs`. +
|
||||
Directories home/config and home/data must be copied (all files and sub-directories).
|
||||
|
||||
For example if you're using XDG directories (default with WeeChat ≥ 3.2),
|
||||
the directories should be `$HOME/.config/weechat` and `$HOME/.local/share/weechat`. +
|
||||
If you're using a single directory (default with WeeChat < 3.2), the directory
|
||||
should be `$HOME/.weechat`.
|
||||
|
||||
[IMPORTANT]
|
||||
The WeeChat version on the new device must be greater than or equal to the version
|
||||
on the initial device. +
|
||||
Downgrading WeeChat configuration is *NOT SUPPORTED* and can break it,
|
||||
leading to unusable WeeChat.
|
||||
|
||||
Steps:
|
||||
|
||||
. Quit Weechat: `/quit` (or `/upgrade -quit` if you want to resume the session,
|
||||
which includes content of all buffers).
|
||||
. Copy all directories, sub-directories and files to the new device, keeping
|
||||
same names and permissions.
|
||||
. Optional: copy any file outside these directories that you refer to in your
|
||||
configuration (it's not recommended to use files outside WeeChat directories).
|
||||
. Start WeeChat on the new device: `weechat` (or `weechat --upgrade` if you
|
||||
saved the session).
|
||||
|
||||
[[development]]
|
||||
== Development
|
||||
|
||||
|
||||
@@ -4028,18 +4028,28 @@ Supported hash algorithms:
|
||||
|
||||
[width="100%",cols="2,2,3,6",options="header"]
|
||||
|===
|
||||
| Value | Algorithm | Hash size | Notes
|
||||
| `+crc32+` | CRC32 | 4 bytes (32 bits) | Not a hash algorithm in the cryptographic sense.
|
||||
| `+md5+` | MD5 | 16 bytes (128 bits) | *Weak*, not recommended for cryptography usage.
|
||||
| `+sha1+` | SHA-1 | 20 bytes (160 bits) | *Weak*, not recommended for cryptography usage.
|
||||
| `+sha224+` | SHA-224 | 28 bytes (224 bits) |
|
||||
| `+sha256+` | SHA-256 | 32 bytes (256 bits) |
|
||||
| `+sha384+` | SHA-384 | 48 bytes (384 bits) |
|
||||
| `+sha512+` | SHA-512 | 64 bytes (512 bits) |
|
||||
| `+sha3-224+` | SHA3-224 | 28 bytes (224 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-256+` | SHA3-256 | 32 bytes (256 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-384+` | SHA3-384 | 48 bytes (384 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-512+` | SHA3-512 | 64 bytes (512 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| Value | Algorithm | Hash size | Notes
|
||||
| `+crc32+` | CRC32 | 4 bytes (32 bits) | Not a hash algorithm in the cryptographic sense.
|
||||
| `+md5+` | MD5 | 16 bytes (128 bits) | *Weak*, not recommended for cryptography usage.
|
||||
| `+sha1+` | SHA-1 | 20 bytes (160 bits) | *Weak*, not recommended for cryptography usage.
|
||||
| `+sha224+` | SHA-224 | 28 bytes (224 bits) |
|
||||
| `+sha256+` | SHA-256 | 32 bytes (256 bits) |
|
||||
| `+sha384+` | SHA-384 | 48 bytes (384 bits) |
|
||||
| `+sha512+` | SHA-512 | 64 bytes (512 bits) |
|
||||
| `+sha512-224+` | SHA-512/224 | 28 bytes (224 bits) | Algorithm available with libgcrypt ≥ 1.9.4.
|
||||
| `+sha512-256+` | SHA-512/256 | 32 bytes (256 bits) | Algorithm available with libgcrypt ≥ 1.9.4.
|
||||
| `+sha3-224+` | SHA3-224 | 28 bytes (224 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-256+` | SHA3-256 | 32 bytes (256 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-384+` | SHA3-384 | 48 bytes (384 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-512+` | SHA3-512 | 64 bytes (512 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| `+blake2b-160+` | BLAKE2B-160 | 20 bytes (160 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
| `+blake2b-256+` | BLAKE2B-256 | 32 bytes (256 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
| `+blake2b-384+` | BLAKE2B-384 | 48 bytes (384 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
| `+blake2b-512+` | BLAKE2B-512 | 64 bytes (512 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
| `+blake2s-128+` | BLAKE2S-128 | 16 bytes (128 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
| `+blake2s-160+` | BLAKE2S-160 | 20 bytes (160 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
| `+blake2s-224+` | BLAKE2S-224 | 28 bytes (224 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
| `+blake2s-256+` | BLAKE2S-256 | 32 bytes (256 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
|===
|
||||
|
||||
Return value:
|
||||
@@ -4474,7 +4484,8 @@ Arguments:
|
||||
* _to_: destination file
|
||||
* _compressor_: the compressor to use, one of:
|
||||
** _gzip_: gzip compression
|
||||
** _zstd_: zstandard compression
|
||||
** _zstd_: zstandard compression (available only if zstd was enabled when
|
||||
WeeChat was compiled)
|
||||
* _compression_level_: compression level, between 1 (fast, low compression) to
|
||||
100 (slow, best compression)
|
||||
|
||||
@@ -6796,7 +6807,7 @@ def config_new_section(config_file: str, name: str,
|
||||
callback_delete_option: str, callback_delete_option_data: str) -> str: ...
|
||||
|
||||
# example
|
||||
def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
|
||||
def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: Union[str, None]) -> int:
|
||||
# ...
|
||||
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
|
||||
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
|
||||
@@ -6815,7 +6826,7 @@ def my_section_write_default_cb(data: str, config_file: str, section_name: str)
|
||||
# return weechat.WEECHAT_CONFIG_WRITE_ERROR
|
||||
# return weechat.WEECHAT_CONFIG_WRITE_MEMORY_ERROR
|
||||
|
||||
def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
|
||||
def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: Union[str, None]) -> int:
|
||||
# ...
|
||||
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
|
||||
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
|
||||
@@ -6880,7 +6891,7 @@ section = weechat.config_search_section(config_file, "section")
|
||||
|
||||
==== config_new_option
|
||||
|
||||
_Updated in 1.5._
|
||||
_Updated in 1.5, 4.1.0._
|
||||
|
||||
Create a new option in a section of a configuration file.
|
||||
|
||||
@@ -6928,12 +6939,13 @@ Arguments:
|
||||
"name << file.section.option"
|
||||
* _type_: type of option:
|
||||
** _boolean_: boolean value (on/off)
|
||||
** _integer_: integer value (with optional strings for values)
|
||||
** _integer_: integer value
|
||||
** _string_: string value
|
||||
** _color_: color
|
||||
** _enum_: list of string values (stored as integer internally)
|
||||
* _description_: description of option
|
||||
* _string_values_: values as string (separated by `+|+`), used for type
|
||||
_integer_ (optional)
|
||||
* _string_values_: values as string (separated by `+|+`) (optional, required
|
||||
for type _enum_)
|
||||
* _min_: minimum value (for type _integer_)
|
||||
* _max_: maximum value (for type _integer_)
|
||||
* _default_value_: default value for option (used when option is reset)
|
||||
@@ -6984,8 +6996,8 @@ C example:
|
||||
[source,c]
|
||||
----
|
||||
/* boolean */
|
||||
struct t_config_option *option1 =
|
||||
weechat_config_new_option (config_file, section, "option1", "boolean",
|
||||
struct t_config_option *option_bool =
|
||||
weechat_config_new_option (config_file, section, "option_bool", "boolean",
|
||||
"My option, type boolean",
|
||||
NULL,
|
||||
0, 0,
|
||||
@@ -6997,8 +7009,8 @@ struct t_config_option *option1 =
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* integer */
|
||||
struct t_config_option *option2 =
|
||||
weechat_config_new_option (config_file, section, "option2", "integer",
|
||||
struct t_config_option *option_int =
|
||||
weechat_config_new_option (config_file, section, "option_int", "integer",
|
||||
"My option, type integer",
|
||||
NULL,
|
||||
0, 100,
|
||||
@@ -7009,22 +7021,9 @@ struct t_config_option *option2 =
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* integer (with string values) */
|
||||
struct t_config_option *option3 =
|
||||
weechat_config_new_option (config_file, section, "option3", "integer",
|
||||
"My option, type integer (with string values)",
|
||||
"top|bottom|left|right",
|
||||
0, 0,
|
||||
"bottom",
|
||||
"bottom",
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* string */
|
||||
struct t_config_option *option4 =
|
||||
weechat_config_new_option (config_file, section, "option4", "string",
|
||||
struct t_config_option *option_str =
|
||||
weechat_config_new_option (config_file, section, "option_str", "string",
|
||||
"My option, type string",
|
||||
NULL,
|
||||
0, 0,
|
||||
@@ -7036,8 +7035,8 @@ struct t_config_option *option4 =
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* color */
|
||||
struct t_config_option *option5 =
|
||||
weechat_config_new_option (config_file, section, "option5", "color",
|
||||
struct t_config_option *option_col =
|
||||
weechat_config_new_option (config_file, section, "option_col", "color",
|
||||
"My option, type color",
|
||||
NULL,
|
||||
0, 0,
|
||||
@@ -7047,6 +7046,19 @@ struct t_config_option *option5 =
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* enum */
|
||||
struct t_config_option *option_enum =
|
||||
weechat_config_new_option (config_file, section, "option_enum", "enum",
|
||||
"My option, type enum",
|
||||
"top|bottom|left|right",
|
||||
0, 0,
|
||||
"bottom",
|
||||
"bottom",
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
@@ -7056,55 +7068,55 @@ Script (Python):
|
||||
# prototype
|
||||
def config_new_option(config_file: str, section: str, name: str, type: str, description: str,
|
||||
string_values: str, min: int, max: int,
|
||||
default_value: str | None, value: str | None, null_value_allowed: int,
|
||||
default_value: Union[str, None], value: Union[str, None], null_value_allowed: int,
|
||||
callback_check_value: str, callback_check_value_data: str,
|
||||
callback_change: str, callback_change_data: str,
|
||||
callback_delete: str, callback_delete_data: str) -> str: ...
|
||||
|
||||
# example
|
||||
def option4_check_value_cb(data: str, option: str, value: str) -> int:
|
||||
def option_str_check_value_cb(data: str, option: str, value: str) -> int:
|
||||
# ...
|
||||
return 1
|
||||
# return 0
|
||||
|
||||
def option4_change_cb(data: str, option: str) -> None:
|
||||
def option_str_change_cb(data: str, option: str) -> None:
|
||||
# ...
|
||||
|
||||
def option4_delete_cb(data: str, option: str) -> None:
|
||||
def option_str_delete_cb(data: str, option: str) -> None:
|
||||
# ...
|
||||
|
||||
option1 = weechat.config_new_option(config_file, section, "option1", "boolean",
|
||||
option_bool = weechat.config_new_option(config_file, section, "option_bool", "boolean",
|
||||
"My option, type boolean",
|
||||
"", 0, 0, "on", "on", 0,
|
||||
"", "",
|
||||
"", "",
|
||||
"", "")
|
||||
|
||||
option2 = weechat.config_new_option(config_file, section, "option2", "integer",
|
||||
option_int = weechat.config_new_option(config_file, section, "option_int", "integer",
|
||||
"My option, type integer",
|
||||
"", 0, 100, "15", "15", 0,
|
||||
"", "",
|
||||
"", "",
|
||||
"", "")
|
||||
|
||||
option3 = weechat.config_new_option(config_file, section, "option3", "integer",
|
||||
"My option, type integer (with string values)",
|
||||
"top|bottom|left|right",
|
||||
0, 0, "bottom", "bottom", 0,
|
||||
option_str = weechat.config_new_option(config_file, section, "option_str", "string",
|
||||
"My option, type string",
|
||||
"", 0, 0, "test", "test", 1,
|
||||
"option_str_check_value_cb", "",
|
||||
"option_str_change_cb", "",
|
||||
"option_str_delete_cb", "")
|
||||
|
||||
option_col = weechat.config_new_option(config_file, section, "option_col", "color",
|
||||
"My option, type color",
|
||||
"", 0, 0, "lightblue", "lightblue", 0,
|
||||
"", "",
|
||||
"", "",
|
||||
"", "")
|
||||
|
||||
option4 = weechat.config_new_option(config_file, section, "option4", "string",
|
||||
"My option, type string",
|
||||
"", 0, 0, "test", "test", 1,
|
||||
"option4_check_value_cb", "",
|
||||
"option4_change_cb", "",
|
||||
"option4_delete_cb", "")
|
||||
|
||||
option5 = weechat.config_new_option(config_file, section, "option5", "color",
|
||||
"My option, type color",
|
||||
"", 0, 0, "lightblue", "lightblue", 0,
|
||||
option_enum = weechat.config_new_option(config_file, section, "option_enum", "enum",
|
||||
"My option, type enum",
|
||||
"top|bottom|left|right",
|
||||
0, 0, "bottom", "bottom", 0,
|
||||
"", "",
|
||||
"", "",
|
||||
"", "")
|
||||
@@ -7387,7 +7399,7 @@ Arguments:
|
||||
type of option:
|
||||
** _boolean_:
|
||||
*** `toggle`: toggle the current value
|
||||
** _integer_ or _color_:
|
||||
** _integer_, _color_ or _enum_:
|
||||
*** `++N`: add `N` (any integer) to the current value
|
||||
*** `--N`: subtract `N` (any integer) from the current value
|
||||
* _run_callback_: 1 for calling change callback if value of option is changed,
|
||||
@@ -7621,6 +7633,7 @@ Arguments:
|
||||
*** _integer_
|
||||
*** _string_
|
||||
*** _color_
|
||||
*** _enum_
|
||||
** _description_: option description
|
||||
|
||||
Return value:
|
||||
@@ -7794,6 +7807,7 @@ Return value, depending on the option type:
|
||||
* _integer_: 0
|
||||
* _string_: 0
|
||||
* _color_: 0
|
||||
* _enum_: 0
|
||||
|
||||
C example:
|
||||
|
||||
@@ -7844,6 +7858,7 @@ Return value, depending on the option type:
|
||||
* _integer_: 0
|
||||
* _string_: 0
|
||||
* _color_: 0
|
||||
* _enum_: 0
|
||||
|
||||
C example:
|
||||
|
||||
@@ -7894,6 +7909,7 @@ Return value, depending on the option type:
|
||||
* _integer_: integer value of option
|
||||
* _string_: 0
|
||||
* _color_: color index
|
||||
* _enum_: integer value of option (index of enum value)
|
||||
|
||||
C example:
|
||||
|
||||
@@ -7936,6 +7952,7 @@ Return value, depending on the option type:
|
||||
* _integer_: default integer value of option
|
||||
* _string_: 0
|
||||
* _color_: default color index
|
||||
* _enum_: default integer value of option (index of enum value)
|
||||
|
||||
C example:
|
||||
|
||||
@@ -7975,10 +7992,10 @@ Arguments:
|
||||
Return value, depending on the option type:
|
||||
|
||||
* _boolean_: "on" if value is true, otherwise "off"
|
||||
* _integer_: string value if the option is an integer with string values,
|
||||
otherwise NULL
|
||||
* _integer_: NULL
|
||||
* _string_: string value of option
|
||||
* _color_: name of color
|
||||
* _enum_: string value of option
|
||||
|
||||
C example:
|
||||
|
||||
@@ -8018,10 +8035,10 @@ Arguments:
|
||||
Return value, depending on the option type:
|
||||
|
||||
* _boolean_: "on" if default value is true, otherwise "off"
|
||||
* _integer_: default string value if the option is an integer with string
|
||||
values, otherwise NULL
|
||||
* _integer_: NULL
|
||||
* _string_: default string value of option
|
||||
* _color_: name of default color
|
||||
* _enum_: default string value of option
|
||||
|
||||
C example:
|
||||
|
||||
@@ -8064,6 +8081,7 @@ Return value, depending on the option type:
|
||||
* _integer_: NULL
|
||||
* _string_: NULL
|
||||
* _color_: name of color
|
||||
* _enum_: NULL
|
||||
|
||||
C example:
|
||||
|
||||
@@ -8106,6 +8124,7 @@ Return value, depending on the option type:
|
||||
* _integer_: NULL
|
||||
* _string_: NULL
|
||||
* _color_: name of default color
|
||||
* _enum_: NULL
|
||||
|
||||
C example:
|
||||
|
||||
@@ -8127,6 +8146,96 @@ option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_color_default(option)
|
||||
----
|
||||
|
||||
==== config_enum
|
||||
|
||||
_WeeChat ≥ 4.1.0._
|
||||
|
||||
Return enum value of option, as integer.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int weechat_config_enum (struct t_config_option *option);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
||||
* _option_: option pointer
|
||||
|
||||
Return value, depending on the option type:
|
||||
|
||||
* _boolean_: boolean value of option (0 or 1)
|
||||
* _integer_: integer value of option
|
||||
* _string_: 0
|
||||
* _color_: color index
|
||||
* _enum_: integer value of option (index of enum value)
|
||||
|
||||
C example:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_config_option *option = weechat_config_get ("plugin.section.option");
|
||||
int value = weechat_config_enum (option);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def config_enum(option: str) -> int: ...
|
||||
|
||||
# example
|
||||
option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_enum(option)
|
||||
----
|
||||
|
||||
==== config_enum_default
|
||||
|
||||
_WeeChat ≥ 4.1.0._
|
||||
|
||||
Return default enum value of option, as integer.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int weechat_config_enum_default (struct t_config_option *option);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
||||
* _option_: option pointer
|
||||
|
||||
Return value, depending on the option type:
|
||||
|
||||
* _boolean_: default boolean value of option (0 or 1)
|
||||
* _integer_: default integer value of option
|
||||
* _string_: 0
|
||||
* _color_: default color index
|
||||
* _enum_: integer value of option (index of enum value)
|
||||
|
||||
C example:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_config_option *option = weechat_config_get ("plugin.section.option");
|
||||
int value = weechat_config_enum_default (option);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def config_enum_default(option: str) -> int: ...
|
||||
|
||||
# example
|
||||
option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_enum_default(option)
|
||||
----
|
||||
|
||||
==== config_write_option
|
||||
|
||||
Write a line in a configuration file with option and its value (this function
|
||||
@@ -9917,7 +10026,6 @@ struct t_hook *weechat_hook_process (const char *command,
|
||||
void *callback_data);
|
||||
----
|
||||
|
||||
|
||||
Arguments:
|
||||
|
||||
* _command_: command to launch in child process, URL _(WeeChat ≥ 0.3.7)_ or
|
||||
@@ -10169,22 +10277,7 @@ available:
|
||||
_/dev/null_.
|
||||
|===
|
||||
|
||||
For command "url:...", following options are available (see
|
||||
`+man curl_easy_setopt+` for a description of each option):
|
||||
|
||||
include::{autogendir}/autogen_api_url_options.en.adoc[tag=url_options]
|
||||
|
||||
[NOTE]
|
||||
^(1)^ For options with type "mask", format is: "value1+value2+value3";
|
||||
for options with type "list", the list items must be separated by a newline
|
||||
(`\n`). +
|
||||
^(2)^ When constants are available they must be used as value for option.
|
||||
|
||||
For URL, two extra options (strings) are allowed for input/output file:
|
||||
|
||||
* _file_in_: file to read and send with URLs (post file)
|
||||
* _file_out_: write downloaded URL/file in this file (instead of standard
|
||||
output)
|
||||
For command "url:...", see available options in function <<_hook_url,hook_url>>.
|
||||
|
||||
Return value:
|
||||
|
||||
@@ -10344,6 +10437,156 @@ hook4 = weechat.hook_process_hashtable("sh",
|
||||
20000, "my_process_cb", "")
|
||||
----
|
||||
|
||||
==== hook_url
|
||||
|
||||
_WeeChat ≥ 4.1.0._
|
||||
|
||||
URL transfer.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_hook *weechat_hook_url (const char *url,
|
||||
struct t_hashtable *options,
|
||||
int timeout,
|
||||
int (*callback)(const void *pointer,
|
||||
void *data,
|
||||
const char *url,
|
||||
struct t_hashtable *options,
|
||||
struct t_hashtable *output),
|
||||
const void *callback_pointer,
|
||||
void *callback_data);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
||||
* _url_: URL
|
||||
* _options_: options for URL transfer (see below); the hashtable is duplicated in
|
||||
function, so it's safe to free it after this call
|
||||
* _timeout_: timeout for URL transfer (in milliseconds): after this timeout,
|
||||
the transfer is stopped (0 means no timeout)
|
||||
* _callback_: function called when the transfer has ended, arguments and return
|
||||
value:
|
||||
** _const void *pointer_: pointer
|
||||
** _void *data_: pointer
|
||||
** _const char *url_: URL
|
||||
** _struct t_hashtable *options_: options
|
||||
** _struct t_hashtable *output_: result (keys and values are strings), which may
|
||||
contain the following keys:
|
||||
*** _response_code_: HTTP response code
|
||||
*** _headers_: HTTP headers in response
|
||||
*** _output_: standard output (set only if _file_out_ was not set in options)
|
||||
*** _error_: error message (set only in case of error)
|
||||
** return value:
|
||||
*** _WEECHAT_RC_OK_
|
||||
*** _WEECHAT_RC_ERROR_
|
||||
* _callback_pointer_: pointer given to callback when it is called by WeeChat
|
||||
* _callback_data_: pointer given to callback when it is called by WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
The following Curl options are available (see `+man curl_easy_setopt+` for
|
||||
a description of each option):
|
||||
|
||||
include::{autogendir}/autogen_api_url_options.en.adoc[tag=url_options]
|
||||
|
||||
[NOTE]
|
||||
^(1)^ For options with type "mask", format is: "value1+value2+value3";
|
||||
for options with type "list", the list items must be separated by a newline
|
||||
(`\n`). +
|
||||
^(2)^ When constants are available they must be used as value for option.
|
||||
|
||||
These two extra options (strings) are allowed for input/output file:
|
||||
|
||||
[width="100%",cols="2,^1,7",options="header"]
|
||||
|===
|
||||
| Option | Type | Description
|
||||
| file_in | string | file to read and send with URLs (post file)
|
||||
| file_out | string | write downloaded URL/file in this file (instead of standard output)
|
||||
|===
|
||||
|
||||
Return value:
|
||||
|
||||
* pointer to new hook, NULL if error occurred
|
||||
|
||||
C example:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int
|
||||
my_url_cb (const void *pointer, void *data, const char *url,
|
||||
struct t_hashtable *options, struct t_hashtable *output)
|
||||
{
|
||||
weechat_printf (NULL, "response_code: %s", weechat_hashtable_get (output, "response_code"));
|
||||
weechat_printf (NULL, "headers: %s", weechat_hashtable_get (output, "headers"));
|
||||
weechat_printf (NULL, "output: %s", weechat_hashtable_get (output, "output"));
|
||||
weechat_printf (NULL, "error: %s", weechat_hashtable_get (output, "error"));
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/* example 1: output to a file */
|
||||
struct t_hashtable *options_url1 = weechat_hashtable_new (8,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL,
|
||||
NULL);
|
||||
if (options_url1)
|
||||
{
|
||||
weechat_hashtable_set (options_url1, "file_out", "/tmp/weechat.org.html");
|
||||
struct t_hook *my_url_hook = weechat_hook_url ("https://weechat.org/",
|
||||
options_url1,
|
||||
20000,
|
||||
&my_url_cb, NULL, NULL);
|
||||
weechat_hashtable_free (options_url1);
|
||||
}
|
||||
|
||||
/* example 2: custom HTTP headers, output sent to callback */
|
||||
struct t_hashtable *options_url2 = weechat_hashtable_new (8,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL,
|
||||
NULL);
|
||||
if (options_url2)
|
||||
{
|
||||
weechat_hashtable_set (options_url2, "httpheader",
|
||||
"Header1: value1\n"
|
||||
"Header2: value2");
|
||||
struct t_hook *my_url_hook = weechat_hook_url ("http://localhost:8080/",
|
||||
options_url2,
|
||||
20000,
|
||||
&my_url_cb, NULL, NULL);
|
||||
weechat_hashtable_free (options_url2);
|
||||
}
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def hook_url(url: str, options: Dict[str, str], timeout: int, callback: str, callback_data: str) -> str: ...
|
||||
|
||||
# example
|
||||
def my_url_cb(data: str, url: str, options: Dict[str, str], output: Dict[str, str]) -> int:
|
||||
weechat.prnt("", "output: %s" % output)
|
||||
return weechat.WEECHAT_RC_OK
|
||||
|
||||
# example 1: output to a file
|
||||
hook1 = weechat.hook_url("https://weechat.org/",
|
||||
{"file_out": "/tmp/weechat.org.html"},
|
||||
20000, "my_url_cb", "")
|
||||
|
||||
# example 2: custom HTTP headers, output sent to callback
|
||||
options = {
|
||||
"httpheader": "\n".join([
|
||||
"Header1: value1",
|
||||
"Header2: value2",
|
||||
]),
|
||||
}
|
||||
hook2 = weechat.hook_url("http://localhost:8080/", options, 20000, "my_url_cb", "")
|
||||
----
|
||||
|
||||
==== hook_connect
|
||||
|
||||
_Updated in 1.5, 2.0._
|
||||
@@ -12902,7 +13145,7 @@ This function is not available in scripting API.
|
||||
|
||||
==== hook_focus
|
||||
|
||||
_Updated in 1.5._
|
||||
_Updated in 1.5, 4.0.0, 4.1.0._
|
||||
|
||||
Hook a focus: mouse event or key pressed in cursor mode (free movement of
|
||||
cursor).
|
||||
@@ -13017,16 +13260,22 @@ Content of hashtable sent to callback (keys and values are of type "string"):
|
||||
| _chat_line_message | Message of line.
|
||||
| "Hello world!" | ""
|
||||
|
||||
| _chat_focused_line | Line at (x,y) _(WeeChat ≥ 4.0.0)_.
|
||||
| _chat_focused_line | Line at (x, y) _(WeeChat ≥ 4.0.0)_.
|
||||
| "Hello world!" | ""
|
||||
|
||||
| _chat_focused_line_bol | Text from beginning of line to (x-1, y) _(WeeChat ≥ 4.1.0)_.
|
||||
| "Hello" | ""
|
||||
|
||||
| _chat_focused_line_eol | Text from (x, y) to end of line _(WeeChat ≥ 4.1.0)_.
|
||||
| "llo world!" | ""
|
||||
|
||||
| _chat_word | Word at (x,y).
|
||||
| "Hello" | ""
|
||||
|
||||
| _chat_bol | Text from beginning of line to (x-1, y).
|
||||
| _chat_bol | Text from beginning of message to (x-1, y).
|
||||
| "He" | ""
|
||||
|
||||
| _chat_eol | Text from (x, y) to the end of line.
|
||||
| _chat_eol | Text from (x, y) to the end of message.
|
||||
| "llo world!" | ""
|
||||
|
||||
| _bar_name | Name of bar.
|
||||
@@ -17575,7 +17824,7 @@ Arguments:
|
||||
|
||||
Return value:
|
||||
|
||||
* variable offset, 0 if an error occurred
|
||||
* variable offset, -1 if an error occurred
|
||||
|
||||
C example:
|
||||
|
||||
@@ -18485,7 +18734,7 @@ for key in hash:
|
||||
|
||||
==== hdata_compare
|
||||
|
||||
_WeeChat ≥ 1.9._
|
||||
_WeeChat ≥ 1.9, updated in 4.1.0._
|
||||
|
||||
Compare a hdata variable of two objects.
|
||||
|
||||
@@ -18501,8 +18750,8 @@ Arguments:
|
||||
* _hdata_: hdata pointer
|
||||
* _pointer1_: pointer to first WeeChat/plugin object
|
||||
* _pointer2_: pointer to second WeeChat/plugin object
|
||||
* _name_: variable name; for arrays, the name can be "N|name" where N is
|
||||
the index in array (starting at 0), for example: "2|name"
|
||||
* _name_: variable name or path to a variable name; for arrays, the name can be
|
||||
"N|name" where N is the index in array (starting at 0), for example: "2|name"
|
||||
* _case_sensitive_: 1 for case sensitive comparison of strings, otherwise 0
|
||||
|
||||
Return value:
|
||||
@@ -18518,8 +18767,12 @@ C example:
|
||||
struct t_hdata *hdata = weechat_hdata_get ("buffer");
|
||||
struct t_gui_buffer *buffer1 = weechat_buffer_search ("irc", "libera.#weechat");
|
||||
struct t_gui_buffer *buffer2 = weechat_buffer_search ("irc", "libera.#weechat-fr");
|
||||
weechat_printf (NULL, "number comparison = %d",
|
||||
weechat_printf (NULL, "comparison of buffer number = %d",
|
||||
weechat_hdata_compare (hdata, buffer1, buffer2, "number", 0));
|
||||
weechat_printf (NULL, "comparison of number of lines = %d",
|
||||
weechat_hdata_compare (hdata, buffer1, buffer2, "own_lines.lines_count", 0));
|
||||
weechat_printf (NULL, "comparison of local variable = %d",
|
||||
weechat_hdata_compare (hdata, buffer1, buffer2, "local_variables.myvar", 0));
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
@@ -18533,7 +18786,9 @@ def hdata_compare(hdata: str, pointer1: str, pointer2: str, name: str, case_sens
|
||||
hdata = weechat.hdata_get("buffer")
|
||||
buffer1 = weechat.buffer_search("irc", "libera.#weechat")
|
||||
buffer2 = weechat.buffer_search("irc", "libera.#weechat-fr")
|
||||
weechat.prnt("", "number comparison = %d" % weechat.hdata_compare(hdata, buffer1, buffer2, "number", 0))
|
||||
weechat.prnt("", "comparison of buffer number = %d" % weechat.hdata_compare(hdata, buffer1, buffer2, "number", 0))
|
||||
weechat.prnt("", "comparison of number of lines = %d" % weechat.hdata_compare(hdata, buffer1, buffer2, "own_lines.lines_count", 0))
|
||||
weechat.prnt("", "comparison of local variable = %d" % weechat.hdata_compare(hdata, buffer1, buffer2, "local_variables.myvar", 0))
|
||||
----
|
||||
|
||||
==== hdata_set
|
||||
|
||||
+268
-163
@@ -113,7 +113,7 @@ WeeChat:
|
||||
| pkg-config |
|
||||
| Detect installed libraries.
|
||||
|
||||
| libncursesw5-dev ^(2)^ |
|
||||
| libncurses-dev |
|
||||
| Ncurses interface.
|
||||
|
||||
| libcurl4-gnutls-dev |
|
||||
@@ -122,7 +122,7 @@ WeeChat:
|
||||
| libgcrypt20-dev |
|
||||
| Secured data, IRC SASL authentication.
|
||||
|
||||
| libgnutls28-dev | ≥ 2.2.0 ^(3)^
|
||||
| libgnutls28-dev | ≥ 2.2.0 ^(2)^
|
||||
| IRC plugin: support of TLS connections, IRC SASL authentication (ECDSA-NIST256P-CHALLENGE). +
|
||||
Relay plugin: support of TLS connections.
|
||||
|
||||
@@ -130,19 +130,12 @@ WeeChat:
|
||||
| Logger plugin: compression of rotated log files (gzip). +
|
||||
Relay plugin: compression of messages (WeeChat -> client) with https://zlib.net/[zlib ^↗^^] (weechat protocol). +
|
||||
Script plugin: read of repository index file (gzip).
|
||||
|
||||
| libzstd-dev | ≥ 0.8.1
|
||||
| Logger plugin: compression of rotated log files. +
|
||||
Relay plugin: compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat protocol).
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ Name comes from the Debian GNU/Linux Bookworm distribution, version and
|
||||
name can be different in other distributions. +
|
||||
^(2)^ It is recommended to compile with libncurses**w**5-dev (the *w* is
|
||||
important). WeeChat can compile with libncurses5-dev, but it is *NOT* recommended:
|
||||
you may experience display bugs with wide chars. +
|
||||
^(3)^ GnuTLS ≥ 3.0.21 is required for IRC SASL authentication with mechanism
|
||||
^(2)^ GnuTLS ≥ 3.0.21 is required for IRC SASL authentication with mechanism
|
||||
ECDSA-NIST256P-CHALLENGE.
|
||||
|
||||
The following table shows the list of packages that are optional to compile
|
||||
@@ -150,26 +143,68 @@ WeeChat:
|
||||
|
||||
[width="100%",cols="5,^3,.^15",options="header"]
|
||||
|===
|
||||
| Package ^(1)^ | Version | Features
|
||||
| {cpp} compiler (pass:[g++ / clang++]) | | Build and run tests, JavaScript plugin.
|
||||
| gettext | | Internationalization (translation of messages; base language is English).
|
||||
| ca-certificates | | Certificates for TLS connections.
|
||||
| libaspell-dev / libenchant-dev | | Spell plugin.
|
||||
| python3-dev | ≥ 3.0 | Python plugin.
|
||||
| libperl-dev | | Perl plugin.
|
||||
| ruby3.1, ruby3.1-dev | ≥ 1.9.1 | Ruby plugin.
|
||||
| liblua5.4-dev | | Lua plugin.
|
||||
| tcl-dev | ≥ 8.5 | Tcl plugin.
|
||||
| guile-3.0-dev | ≥ 2.0 | Guile (scheme) plugin.
|
||||
| libv8-dev | ≤ 3.24.3 | JavaScript plugin.
|
||||
| php-dev | ≥ 7.0 | PHP plugin.
|
||||
| libphp-embed | ≥ 7.0 | PHP plugin.
|
||||
| libxml2-dev | | PHP plugin.
|
||||
| libargon2-dev | | PHP plugin (if PHP ≥ 7.2).
|
||||
| libsodium-dev | | PHP plugin (if PHP ≥ 7.2).
|
||||
| asciidoctor | ≥ 1.5.4 | Build man page and documentation.
|
||||
| ruby-pygments.rb | | Build documentation.
|
||||
| libcpputest-dev | ≥ 3.4 | Build and run tests.
|
||||
| Package ^(1)^ | Version | Features
|
||||
|
||||
| {cpp} compiler (pass:[g++ / clang++]) |
|
||||
| Build and run tests, JavaScript plugin.
|
||||
|
||||
| gettext |
|
||||
| Internationalization (translation of messages; base language is English).
|
||||
|
||||
| ca-certificates |
|
||||
| Certificates for TLS connections.
|
||||
|
||||
| libzstd-dev | ≥ 0.8.1
|
||||
| Logger plugin: compression of rotated log files (zstandard). +
|
||||
Relay plugin: compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat protocol).
|
||||
|
||||
| libaspell-dev / libenchant-dev |
|
||||
| Spell plugin.
|
||||
|
||||
| python3-dev | ≥ 3.0
|
||||
| Python plugin.
|
||||
|
||||
| libperl-dev |
|
||||
| Perl plugin.
|
||||
|
||||
| ruby3.1, ruby3.1-dev | ≥ 1.9.1
|
||||
| Ruby plugin.
|
||||
|
||||
| liblua5.4-dev |
|
||||
| Lua plugin.
|
||||
|
||||
| tcl-dev | ≥ 8.5
|
||||
| Tcl plugin.
|
||||
|
||||
| guile-3.0-dev | ≥ 2.0
|
||||
| Guile (scheme) plugin.
|
||||
|
||||
| libv8-dev | ≤ 3.24.3
|
||||
| JavaScript plugin.
|
||||
|
||||
| php-dev | ≥ 7.0
|
||||
| PHP plugin.
|
||||
|
||||
| libphp-embed | ≥ 7.0
|
||||
| PHP plugin.
|
||||
|
||||
| libxml2-dev |
|
||||
| PHP plugin.
|
||||
|
||||
| libargon2-dev |
|
||||
| PHP plugin (if PHP ≥ 7.2).
|
||||
|
||||
| libsodium-dev |
|
||||
| PHP plugin (if PHP ≥ 7.2).
|
||||
|
||||
| asciidoctor | ≥ 1.5.4
|
||||
| Build man page and documentation.
|
||||
|
||||
| ruby-pygments.rb |
|
||||
| Build documentation.
|
||||
|
||||
| libcpputest-dev | ≥ 3.4
|
||||
| Build and run tests.
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -209,7 +244,7 @@ $ make install
|
||||
|
||||
Options can be used for CMake, with format: `-DOPTION=VALUE`.
|
||||
|
||||
List of commonly used options:
|
||||
List of available options:
|
||||
|
||||
[width="100%",cols="3m,3,3m,10",options="header"]
|
||||
|===
|
||||
@@ -263,6 +298,9 @@ List of commonly used options:
|
||||
| ENABLE_GUILE | `ON`, `OFF` | ON
|
||||
| Compile <<scripting_plugins,Guile plugin>> (Scheme).
|
||||
|
||||
| ENABLE_HEADLESS | `ON`, `OFF` | ON
|
||||
| Compile headless binary.
|
||||
|
||||
| ENABLE_IRC | `ON`, `OFF` | ON
|
||||
| Compile <<irc,IRC plugin>>.
|
||||
|
||||
@@ -321,6 +359,9 @@ List of commonly used options:
|
||||
| ENABLE_XFER | `ON`, `OFF` | ON
|
||||
| Compile <<xfer,Xfer plugin>>.
|
||||
|
||||
| ENABLE_ZSTD | `ON`, `OFF` | ON
|
||||
| Enable https://facebook.github.io/zstd/[Zstandard ^↗^^] compression.
|
||||
|
||||
| ENABLE_TESTS | `ON`, `OFF` | OFF
|
||||
| Compile tests.
|
||||
|
||||
@@ -898,6 +939,8 @@ Other items available (not used in bars by default):
|
||||
| buffer_short_name | `#test` | Current buffer short name.
|
||||
| buflist2 | `1.weechat` | List of buffers, second bar item (see option <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
| buflist3 | `1.weechat` | List of buffers, third bar item (see option <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
| buflist4 | `1.weechat` | List of buffers, fourth bar item (see option <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
| buflist5 | `1.weechat` | List of buffers, fifth bar item (see option <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
| fset | `+buflist.look.sort: …+` | Help on currently selected option on fset buffer.
|
||||
| irc_channel | `#test` | Current IRC channel name.
|
||||
| irc_host | `+user@host.com+` | Current IRC host.
|
||||
@@ -1332,7 +1375,8 @@ By default WeeChat and its default plugins interpret these variables:
|
||||
|
||||
| filter
|
||||
| any string
|
||||
| Filter defined on some buffers like `/fset`, `/server raw` (irc) and `/script`.
|
||||
| Filter defined on some buffers like `/fset`, `/list` (irc), `/server raw` (irc)
|
||||
and `/script`.
|
||||
|
||||
| host
|
||||
| any string
|
||||
@@ -1415,7 +1459,8 @@ External plugins and scripts can define and use other local variables.
|
||||
=== List of buffers
|
||||
|
||||
Buflist plugin displays a list of buffers in a bar item called "buflist"
|
||||
(two other bar items "buflist2" and "buflist3" are available as well). +
|
||||
(four other bar items "buflist2", "buflist3", "buflist4" and "buflist5" are
|
||||
available as well). +
|
||||
A default bar "buflist" is created on startup with this item.
|
||||
|
||||
[[buflist_commands]]
|
||||
@@ -1439,6 +1484,21 @@ Options:
|
||||
|
||||
include::{autogendir}/autogen_user_options.en.adoc[tag=buflist_options]
|
||||
|
||||
[[cursor_mode]]
|
||||
=== Cursor mode
|
||||
|
||||
The cursor mode allows you to move freely the cursor anywhere on screen, in chat
|
||||
area and bars, and lets you perform actions at the given position. +
|
||||
You can enter in cursor mode either with the command `/cursor` or with a mouse
|
||||
middle click (mouse must have been enabled with key kbd:[Alt+m] or command
|
||||
`/mouse enable`).
|
||||
|
||||
Typical use is to quote messages (chat area) or interact with nicks (nicklist bar).
|
||||
|
||||
See command <<command_weechat_cursor,/cursor>> and
|
||||
<<key_bindings_cursor_context,key bindings in cursor context>> for the list
|
||||
of actions you can perform in this mode.
|
||||
|
||||
[[key_bindings]]
|
||||
== Key bindings
|
||||
|
||||
@@ -1532,6 +1592,15 @@ They can be changed and new ones can be added with the <<command_weechat_key,/ke
|
||||
| kbd:[Ctrl+↓] | Call next command/message in global history (common for all buffers). | `+/input history_global_next+`
|
||||
|===
|
||||
|
||||
[[key_bindings_cmdline_system]]
|
||||
==== System
|
||||
|
||||
[width="100%",cols="^.^3,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Key | Description | Command
|
||||
| kbd:[Ctrl+z] | Suspend WeeChat process. | `+/sys suspend+`
|
||||
|===
|
||||
|
||||
[[key_bindings_buffers]]
|
||||
=== Buffers
|
||||
|
||||
@@ -1661,31 +1730,38 @@ text in buffer).
|
||||
[[key_bindings_cursor_context]]
|
||||
=== Cursor context
|
||||
|
||||
These keys are used in context "cursor" (free movement of cursor on screen).
|
||||
These keys are used in context "cursor" (free movement of cursor on screen),
|
||||
see <<cursor_mode,Cursor mode>>.
|
||||
|
||||
[width="100%",cols="^.^3,^.^2,.^7,.^7",options="header"]
|
||||
|===
|
||||
| Key | Area | Description | Command
|
||||
| kbd:[↑] | - | Move cursor one line up. | `+/cursor move up+`
|
||||
| kbd:[↓] | - | Move cursor one line down. | `+/cursor move down+`
|
||||
| kbd:[←] | - | Move cursor one column left. | `+/cursor move left+`
|
||||
| kbd:[→] | - | Move cursor one column right. | `+/cursor move right+`
|
||||
| kbd:[Alt+↑] | - | Move cursor one area up. | `+/cursor move area_up+`
|
||||
| kbd:[Alt+↓] | - | Move cursor one area down. | `+/cursor move area_down+`
|
||||
| kbd:[Alt+←] | - | Move cursor one area left. | `+/cursor move area_left+`
|
||||
| kbd:[Alt+→] | - | Move cursor one area right. | `+/cursor move area_right+`
|
||||
| kbd:[m] | chat | Quote message. | `+hsignal:chat_quote_message;/cursor stop+`
|
||||
| kbd:[l] | chat | Quote focused line. | `+hsignal:chat_quote_focused_line;/cursor stop+`
|
||||
| kbd:[q] | chat | Quote prefix + message. | `+hsignal:chat_quote_prefix_message;/cursor stop+`
|
||||
| kbd:[Q] | chat | Quote time + prefix + message. | `+hsignal:chat_quote_time_prefix_message;/cursor stop+`
|
||||
| kbd:[b] | nicklist | Ban nick. | `+/window ${_window_number};/ban ${nick}+`
|
||||
| kbd:[k] | nicklist | Kick nick. | `+/window ${_window_number};/kick ${nick}+`
|
||||
| kbd:[K] | nicklist | Kick and ban nick. | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| kbd:[q] | nicklist | Open query with nick. | `+/window ${_window_number};/query ${nick};/cursor stop+`
|
||||
| kbd:[w] | nicklist | Do a whois on nick. | `+/window ${_window_number};/whois ${nick}+`
|
||||
| Key | Area | Description | Command
|
||||
| kbd:[↑] | - | Move cursor one line up. | `+/cursor move up+`
|
||||
| kbd:[↓] | - | Move cursor one line down. | `+/cursor move down+`
|
||||
| kbd:[←] | - | Move cursor one column left. | `+/cursor move left+`
|
||||
| kbd:[→] | - | Move cursor one column right. | `+/cursor move right+`
|
||||
| kbd:[Alt+↑] | - | Move cursor to the first line of the area. | `+/cursor move edge_top+`
|
||||
| kbd:[Alt+↓] | - | Move cursor to the last line of the area. | `+/cursor move edge_bottom+`
|
||||
| kbd:[Alt+←] | - | Move cursor to the first column of the area. | `+/cursor move edge_left+`
|
||||
| kbd:[Alt+→] | - | Move cursor to the last column of the area. | `+/cursor move edge_right+`
|
||||
| kbd:[Alt+Home] | - | Move cursor to the top left corner of the area. | `+/cursor move top_left+`
|
||||
| kbd:[Alt+End] | - | Move cursor to the bottom right corner of the area. | `+/cursor move bottom_right+`
|
||||
| kbd:[Alt+Shift+↑] | - | Move cursor one area up. | `+/cursor move area_up+`
|
||||
| kbd:[Alt+Shift+↓] | - | Move cursor one area down. | `+/cursor move area_down+`
|
||||
| kbd:[Alt+Shift+←] | - | Move cursor one area left. | `+/cursor move area_left+`
|
||||
| kbd:[Alt+Shift+→] | - | Move cursor one area right. | `+/cursor move area_right+`
|
||||
| kbd:[m] | chat | Quote message. | `+hsignal:chat_quote_message;/cursor stop+`
|
||||
| kbd:[l] | chat | Quote focused line. | `+hsignal:chat_quote_focused_line;/cursor stop+`
|
||||
| kbd:[q] | chat | Quote prefix + message. | `+hsignal:chat_quote_prefix_message;/cursor stop+`
|
||||
| kbd:[Q] | chat | Quote time + prefix + message. | `+hsignal:chat_quote_time_prefix_message;/cursor stop+`
|
||||
| kbd:[b] | nicklist | Ban nick. | `+/window ${_window_number};/ban ${nick}+`
|
||||
| kbd:[k] | nicklist | Kick nick. | `+/window ${_window_number};/kick ${nick}+`
|
||||
| kbd:[K] | nicklist | Kick and ban nick. | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| kbd:[q] | nicklist | Open query with nick. | `+/window ${_window_number};/query ${nick};/cursor stop+`
|
||||
| kbd:[w] | nicklist | Do a whois on nick. | `+/window ${_window_number};/whois ${nick}+`
|
||||
| kbd:[Enter] +
|
||||
kbd:[Ctrl+j] +
|
||||
kbd:[Ctrl+m] | - | Stop cursor mode | `/cursor stop`
|
||||
kbd:[Ctrl+m] | - | Stop cursor mode | `/cursor stop`
|
||||
|===
|
||||
|
||||
[[key_bindings_mouse]]
|
||||
@@ -1697,49 +1773,59 @@ These mouse actions are possible only if mouse is enabled with key kbd:[Alt+m]
|
||||
[width="100%",cols="^.^3,^.^3,^.^3,.^8,.^8",options="header"]
|
||||
|===
|
||||
| Button/Wheel ^(1)^ | Gesture | Area | Description | Command
|
||||
| ◾◽◽ | - | chat | Switch to window. | `+/window ${_window_number}+`
|
||||
| ◾◽◽ | left | chat | Switch to previous buffer. | `+/window ${_window_number};/buffer +1+`
|
||||
| ◾◽◽ | right | chat | Switch to next buffer. | `+/window ${_window_number};/buffer +1+`
|
||||
| ◾◽◽ | left (long) | chat | Switch to first buffer. | `+/window ${_window_number};/buffer 1+`
|
||||
| ◾◽◽ | right (long) | chat | Switch to last buffer. | `+/window ${_window_number};/buffer ++`
|
||||
| kbd:[■ □ □] | - | chat | Switch to window. | `+/window ${_window_number}+`
|
||||
| kbd:[■ □ □] | left | chat | Switch to previous buffer. | `+/window ${_window_number};/buffer +1+`
|
||||
| kbd:[■ □ □] | right | chat | Switch to next buffer. | `+/window ${_window_number};/buffer +1+`
|
||||
| kbd:[■ □ □] | left (long) | chat | Switch to first buffer. | `+/window ${_window_number};/buffer 1+`
|
||||
| kbd:[■ □ □] | right (long) | chat | Switch to last buffer. | `+/window ${_window_number};/buffer ++`
|
||||
| kbd:[▲] | - | chat | Scroll up a few lines in buffer history. | `+/window scroll_up -window ${_window_number}+`
|
||||
| kbd:[▼] | - | chat | Scroll down a few lines in buffer history. | `+/window scroll_down -window ${_window_number}+`
|
||||
| kbd:[Ctrl+▲] | - | chat | Scroll horizontally to the left. | `+/window scroll_horiz -window ${_window_number} -10%+`
|
||||
| kbd:[Ctrl+▼] | - | chat | Scroll horizontally to the right. | `+/window scroll_horiz -window ${_window_number} +10%+`
|
||||
| kbd:[▲] | - | chat: fset buffer | Move five lines up in fset buffer. | `+/fset -up 5+`
|
||||
| kbd:[▼] | - | chat: fset buffer | Move five lines down in fset buffer. | `+/fset -down 5+`
|
||||
| ◾◽◽ | - | chat: fset buffer | Select line in fset buffer. | `+/window ${_window_number};/fset -go ${_chat_line_y}+`
|
||||
| ◽◽◾ | - | chat: fset buffer | Toggle boolean (on/off) or edit the option value. | `+hsignal:fset_mouse+`
|
||||
| ◽◽◾ | left | chat: fset buffer | Decrease value for integer/color, set/append to value for other types. | `+hsignal:fset_mouse+`
|
||||
| ◽◽◾ | right | chat: fset buffer | Increase value for integer/color, set/append to value for other types. | `+hsignal:fset_mouse+`
|
||||
| ◽◽◾ | up / down | chat: fset buffer | Mark/unmark multiple options. | `+hsignal:fset_mouse+`
|
||||
| kbd:[■ □ □] | - | chat: fset buffer | Select line in fset buffer. | `+/window ${_window_number};/fset -go ${fset_option_index}+`
|
||||
| kbd:[□ □ ■] | - | chat: fset buffer | Toggle boolean (on/off) or edit the option value. | `+hsignal:fset_mouse+`
|
||||
| kbd:[□ □ ■] | left | chat: fset buffer | Decrease value for integer/color/enum, set/append to value for other types. | `+hsignal:fset_mouse+`
|
||||
| kbd:[□ □ ■] | right | chat: fset buffer | Increase value for integer/color/enum, set/append to value for other types. | `+hsignal:fset_mouse+`
|
||||
| kbd:[□ □ ■] | up / down | chat: fset buffer | Mark/unmark multiple options. | `+hsignal:fset_mouse+`
|
||||
| kbd:[▲] | - | chat: /list buffer | Move five lines up in /list buffer. | `+/list -up 5+`
|
||||
| kbd:[▼] | - | chat: /list buffer | Move five lines down in /list buffer. | `+/list -down 5+`
|
||||
| kbd:[■ □ □] | - | chat: /list buffer | Select line in /list buffer. | `+/window ${_window_number};/list -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat: /list buffer | Join IRC channel on selected line. | `+hsignal:irc_list_mouse+`
|
||||
| kbd:[▲] | - | chat: script buffer | Move five lines up in script buffer. | `+/script up 5+`
|
||||
| kbd:[▼] | - | chat: script buffer | Move five lines down in script buffer. | `+/script down 5+`
|
||||
| ◾◽◽ | - | chat: script buffer | Select line in script buffer. | `+/script go ${_chat_line_y}+`
|
||||
| ◽◽◾ | - | chat: script buffer | Install/remove script. | `+/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| ◾◽◽ | up / left | buflist | Move buffer to a lower number. | Signal `+buflist_mouse+`.
|
||||
| ◾◽◽ | down / right | buflist | Move buffer to a higher number. | Signal `+buflist_mouse+`.
|
||||
| ◾◽◽ | - | buflist | Switch to buffer (previously visited buffer if the buffer is the current one). | Signal `+buflist_mouse+`.
|
||||
| ◽◽◾ | - | buflist | Switch to next visited buffer if the buffer is the current one. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | - | chat: script buffer | Select line in script buffer. | `+/script go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat: script buffer | Install/remove script. | `+/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[■ □ □] | up / left | buflist | Move buffer to a lower number. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | down / right | buflist | Move buffer to a higher number. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | - | buflist | Switch to buffer (previously visited buffer if the buffer is the current one). | Signal `+buflist_mouse+`.
|
||||
| kbd:[□ □ ■] | - | buflist | Switch to next visited buffer if the buffer is the current one. | Signal `+buflist_mouse+`.
|
||||
| kbd:[Ctrl+▲] | - | buflist | Switch to previous buffer. | Signal `+buflist_mouse+`.
|
||||
| kbd:[Ctrl+▼] | - | buflist | Switch to next buffer. | Signal `+buflist_mouse+`.
|
||||
| ◾◽◽ | up | nicklist | Scroll up one page in nicklist. | `+/bar scroll nicklist ${_window_number} -100%+`
|
||||
| ◾◽◽ | down | nicklist | Scroll down one page in nicklist. | `+/bar scroll nicklist ${_window_number} +100%+`
|
||||
| ◾◽◽ | up (long) | nicklist | Go to the beginning of nicklist. | `+/bar scroll nicklist ${_window_number} b+`
|
||||
| ◾◽◽ | down (long) | nicklist | Go to the end of nicklist. | `+/bar scroll nicklist ${_window_number} e+`
|
||||
| ◾◽◽ | - | nicklist | Open query with nick. | `+/window ${_window_number};/query ${nick}+`
|
||||
| ◽◽◾ | - | nicklist | Do a whois on nick. | `+/window ${_window_number};/whois ${nick}+`
|
||||
| ◾◽◽ | left | nicklist | Kick nick. | `+/window ${_window_number};/kick ${nick}+`
|
||||
| ◾◽◽ | left (long) | nicklist | Kick and ban nick. | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| ◽◽◾ | left | nicklist | Ban nick. | `+/window ${_window_number};/ban ${nick}+`
|
||||
| ◽◽◾ | - | input | Grab a mouse event and insert its code in command line. | `+/input grab_mouse_area+`
|
||||
| kbd:[■ □ □] | up | nicklist | Scroll up one page in nicklist. | `+/bar scroll nicklist ${_window_number} -100%+`
|
||||
| kbd:[■ □ □] | down | nicklist | Scroll down one page in nicklist. | `+/bar scroll nicklist ${_window_number} +100%+`
|
||||
| kbd:[■ □ □] | up (long) | nicklist | Go to the beginning of nicklist. | `+/bar scroll nicklist ${_window_number} b+`
|
||||
| kbd:[■ □ □] | down (long) | nicklist | Go to the end of nicklist. | `+/bar scroll nicklist ${_window_number} e+`
|
||||
| kbd:[■ □ □] | - | nicklist | Open query with nick. | `+/window ${_window_number};/query ${nick}+`
|
||||
| kbd:[□ □ ■] | - | nicklist | Do a whois on nick. | `+/window ${_window_number};/whois ${nick}+`
|
||||
| kbd:[■ □ □] | left | nicklist | Kick nick. | `+/window ${_window_number};/kick ${nick}+`
|
||||
| kbd:[■ □ □] | left (long) | nicklist | Kick and ban nick. | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| kbd:[□ □ ■] | left | nicklist | Ban nick. | `+/window ${_window_number};/ban ${nick}+`
|
||||
| kbd:[□ □ ■] | - | input | Grab a mouse event and insert its code in command line. | `+/input grab_mouse_area+`
|
||||
| kbd:[▲] | - | any bar | Scroll bar by -20%. | `+/bar scroll ${_bar_name} ${_window_number} -20%+`
|
||||
| kbd:[▼] | - | any bar | Scroll bar by +20%. | `+/bar scroll ${_bar_name} ${_window_number} +20%+`
|
||||
| ◽◾◽ | - | anywhere | Start cursor mode at this point. | `+/cursor go ${_x},${_y}+`
|
||||
| kbd:[□ ■ □] | - | anywhere | Start cursor mode at this point. | `+/cursor go ${_x},${_y}+`
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ kbd:[▲] and kbd:[▼] are wheel up and down.
|
||||
^(1)^ Buttons: +
|
||||
kbd:[◼ □ □]: click on left button +
|
||||
kbd:[□ ◼ □]: click on middle button +
|
||||
kbd:[□ □ ◼]: click on right button +
|
||||
Wheel: +
|
||||
kbd:[▲]: wheel up +
|
||||
kbd:[▼]: wheel down
|
||||
|
||||
[[key_bindings_fset_buffer]]
|
||||
=== Fset buffer
|
||||
@@ -1758,8 +1844,8 @@ These keys and actions are used on the fset buffer (see <<fset,Fset plugin>>).
|
||||
| kbd:[F11] | `pass:[<]` | Scroll horizontally on the left. | `+/fset -left+`
|
||||
| kbd:[F12] | `pass:[>]` | Scroll horizontally on the right. | `+/fset -right+`
|
||||
| kbd:[Alt+Space] | `t` | Toggle boolean value. | `+/fset -toggle+`
|
||||
| kbd:[Alt+-] | `-` | Subtract 1 from value for integer/color, set value for other types. | `+/fset -add -1+`
|
||||
| kbd:[Alt++] | `+` | Add 1 to value for integer/color, append to value for other types. | `+/fset -add 1+`
|
||||
| kbd:[Alt+-] | `-` | Subtract 1 from value for integer/color/enum, set value for other types. | `+/fset -add -1+`
|
||||
| kbd:[Alt++] | `+` | Add 1 to value for integer/color/enum, append to value for other types. | `+/fset -add 1+`
|
||||
| kbd:[Alt+f], kbd:[Alt+r] | `r` | Reset value. | `+/fset -reset+`
|
||||
| kbd:[Alt+f], kbd:[Alt+u] | `u` | Unset value. | `+/fset -unset+`
|
||||
| kbd:[Alt+Enter] | `s` | Set value. | `+/fset -set+`
|
||||
@@ -1773,8 +1859,8 @@ These keys and actions are used on the fset buffer (see <<fset,Fset plugin>>).
|
||||
| kbd:[Ctrl+l] (`L`) | | Refresh options and whole screen. | `+/fset -refresh+`
|
||||
| | `$` | Refresh options (keep marked options). |
|
||||
| | `$$` | Refresh options (unmark all options). |
|
||||
| kbd:[Alt+p] | | Toggle plugin description options (`pass:[plugins.desc.*]`). | `+/mute /set fset.look.show_plugins_desc toggle+`
|
||||
| kbd:[Alt+v] | | Toggle help bar. | `+/bar toggle fset+`
|
||||
| kbd:[Alt+p] | `p` | Toggle plugin description options (`pass:[plugins.desc.*]`). | `+/mute /set fset.look.show_plugins_desc toggle+`
|
||||
| kbd:[Alt+v] | `v` | Toggle help bar. | `+/bar toggle fset+`
|
||||
| | `s:x,y` | Sort options by fields x,y (see option <<option_fset.look.sort,fset.look.sort>>). | `+/mute /set fset.look.sort x,y+`
|
||||
| | `s:` | Reset sort to its default value (see option <<option_fset.look.sort,fset.look.sort>>). | `+/mute /unset fset.look.sort+`
|
||||
| | `w:xxx` | Export options in file "xxx". | `+/fset -export xxx+`
|
||||
@@ -1787,6 +1873,39 @@ These keys and actions are used on the fset buffer (see <<fset,Fset plugin>>).
|
||||
[NOTE]
|
||||
^(1)^ The action must be entered as input on the command line, followed by kbd:[Enter].
|
||||
|
||||
[[key_bindings_irc_list_buffer]]
|
||||
=== IRC /list buffer
|
||||
|
||||
These keys and actions are used on the IRC /list buffer (see command <<command_irc_list,/list>>).
|
||||
|
||||
[width="100%",cols="^.^3,^.^2,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Key | Action ^(1)^ | Description | Command
|
||||
| kbd:[↑] | | Move one line up. | `+/list -up+`
|
||||
| kbd:[↓] | | Move one line down. | `+/list -down+`
|
||||
| kbd:[PgUp] | | Move one page up. | `+/window page_up+`
|
||||
| kbd:[PgDn] | | Move one page down. | `+/window page_down+`
|
||||
| kbd:[Alt+Home] | `pass:[<<]` | Move to first line. | `+/list -go 0+`
|
||||
| kbd:[Alt+End] | `pass:[>>]` | Move to last line. | `+/list -go end+`
|
||||
| kbd:[F11] | `pass:[<]` | Scroll horizontally on the left. | `+/list -left+`
|
||||
| kbd:[F12] | `pass:[>]` | Scroll horizontally on the right. | `+/list -right+`
|
||||
| kbd:[Ctrl+j] | `j` | Join IRC channel on selected line. | `+/list -join+`
|
||||
| | `xxx` | Show only channels with "xxx" in name or topic (case insensitive). |
|
||||
| | `n:xxx` | Show only channels with "xxx" in name (case insensitive). |
|
||||
| | `t:xxx` | Show only channels with "xxx" in topic (case insensitive). |
|
||||
| | `u:n` | Show only channels with at least "n" users. |
|
||||
| | `u:>n` | Show only channels with more than "n" users. |
|
||||
| | `u:<n` | Show only channels with less than "n" users. |
|
||||
| | `c:xxx` | Show only channels matching the evaluated condition "xxx", using following variables: name, name2, users, topic. |
|
||||
| | `s:x,y` | Sort channels by fields x,y (see command <<command_irc_list,/list>>). |
|
||||
| | `s:` | Reset sort to its default value (see command <<command_irc_list,/list>>). |
|
||||
| | `$` | Refresh list (run again command <<command_irc_list,/list>>). |
|
||||
| | `q` | Close buffer. | `+/buffer close+`
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ The action must be entered as input on the command line, followed by kbd:[Enter].
|
||||
|
||||
[[key_bindings_script_buffer]]
|
||||
=== Script buffer
|
||||
|
||||
@@ -1801,11 +1920,16 @@ These keys and actions are used on the script buffer (see <<script_manager,scrip
|
||||
| kbd:[PgDn] | | Move one page down. | `+/window page_down+`
|
||||
| kbd:[Alt+i] | `i` | Install script. | `+/script install+`
|
||||
| kbd:[Alt+r] | `r` | Remove script. | `+/script remove+`
|
||||
| kbd:[Alt+l] (`L`) | `l` | Load script. | `+/script load+`
|
||||
| kbd:[Alt+l] | `l` | Load script. | `+/script load+`
|
||||
| kbd:[Alt+L] | `L` | Reload script. | `+/script reload+`
|
||||
| kbd:[Alt+u] | `u` | Unload script. | `+/script unload+`
|
||||
| kbd:[Alt+Shift+A] | `A` | Autoload script. | `+/script toggleautoload+`
|
||||
| kbd:[Alt+h] | `h` | Hold/unhold script. | `+/script hold+`
|
||||
| kbd:[Alt+v] | `v` | View script. | `+/script show+`
|
||||
| | `s:x,y` | Sort scripts by fields x,y (see option <<option_script.look.sort,script.look.sort>>). |
|
||||
| | `s:` | Reset sort to its default value (see option <<option_script.look.sort,script.look.sort>>). |
|
||||
| | `$` | Refresh list. |
|
||||
| | `q` | Close buffer. | `+/buffer close+`
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -1829,7 +1953,7 @@ Example of fset buffer displaying options starting with `weechat.look` :
|
||||
│2.fset │weechat.look.bare_display_exit_on_input: exit the bare display mode on any c│
|
||||
│ │hanges in input [default: on] │
|
||||
│ │----------------------------------------------------------------------------│
|
||||
│ │ weechat.look.align_end_of_lines integer message │
|
||||
│ │ weechat.look.align_end_of_lines enum message │
|
||||
│ │ weechat.look.align_multiline_words boolean on │
|
||||
│ │ weechat.look.bar_more_down string "++" │
|
||||
│ │ weechat.look.bar_more_left string "<<" │
|
||||
@@ -1838,12 +1962,12 @@ Example of fset buffer displaying options starting with `weechat.look` :
|
||||
│ │## weechat.look.bare_display_exit_on_input boolean on ##│
|
||||
│ │ weechat.look.bare_display_time_format string "%H:%M" │
|
||||
│ │ weechat.look.buffer_auto_renumber boolean on │
|
||||
│ │ weechat.look.buffer_notify_default integer all │
|
||||
│ │ weechat.look.buffer_position integer end │
|
||||
│ │ weechat.look.buffer_notify_default enum all │
|
||||
│ │ weechat.look.buffer_position enum end │
|
||||
│ │ weechat.look.buffer_search_case_sensitive boolean off │
|
||||
│ │ weechat.look.buffer_search_force_default boolean off │
|
||||
│ │ weechat.look.buffer_search_regex boolean off │
|
||||
│ │ weechat.look.buffer_search_where integer prefix_message │
|
||||
│ │ weechat.look.buffer_search_where enum prefix_message │
|
||||
│ │ weechat.look.buffer_time_format string "%H:%M:%S" │
|
||||
│ │ weechat.look.buffer_time_same string "" │
|
||||
│ │[12:55] [2] [fset] 2:fset │
|
||||
@@ -2158,15 +2282,9 @@ and for each nick the max hotlist level to trigger, possible levels are:
|
||||
For example to disable highlights from "joe" and "mike" on current buffer:
|
||||
|
||||
----
|
||||
/buffer set hotlist_max_level_nicks_add joe:2,mike:2
|
||||
/buffer setauto hotlist_max_level_nicks_add joe:2,mike:2
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
The buffer property "hotlist_max_level_nicks" is not saved in configuration. +
|
||||
You can easily save it with the script _buffer_autoset.py_: you can install it
|
||||
with `+/script install buffer_autoset.py+` and get help with
|
||||
`+/help buffer_autoset+`.
|
||||
|
||||
[[highlights]]
|
||||
=== Highlights
|
||||
|
||||
@@ -2191,15 +2309,9 @@ This can also be set with the buffer property "highlight_disable_regex".
|
||||
Same example, specific to the current buffer:
|
||||
|
||||
----
|
||||
/buffer set highlight_disable_regex <flash.*>
|
||||
/buffer setauto highlight_disable_regex <flash.*>
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
The buffer property "highlight_disable_regex" is not saved in configuration. +
|
||||
You can easily save it with the script _buffer_autoset.py_: you can install it
|
||||
with `+/script install buffer_autoset.py+` and get help with
|
||||
`+/help buffer_autoset+`.
|
||||
|
||||
[[highlights_words]]
|
||||
==== Add words to highlight
|
||||
|
||||
@@ -2254,15 +2366,9 @@ You can force highlight using a regular expression with the buffer property
|
||||
For example to force the highlight on all messages in the current buffer:
|
||||
|
||||
----
|
||||
/buffer set highlight_regex .*
|
||||
/buffer setauto highlight_regex .*
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
The buffer property "highlight_regex" is not saved in configuration. +
|
||||
You can easily save it with the script _buffer_autoset.py_: you can install it
|
||||
with `+/script install buffer_autoset.py+` and get help with
|
||||
`+/help buffer_autoset+`.
|
||||
|
||||
[[buffer_logging]]
|
||||
=== Buffer logging
|
||||
|
||||
@@ -3141,30 +3247,31 @@ Sections in file _weechat.conf_:
|
||||
|
||||
[width="100%",cols="3m,6m,16",options="header"]
|
||||
|===
|
||||
| Section | Control command | Description
|
||||
| debug | <<command_weechat_debug,/debug set>> +
|
||||
/set weechat.debug.* | Debug level, for core and plugins (options can be added/removed in section).
|
||||
| startup | /set weechat.startup.* | Startup options.
|
||||
| look | /set weechat.look.* | Look and feel.
|
||||
| palette | <<command_weechat_color,/color alias>> +
|
||||
/set weechat.palette.* | Color aliases (options can be added/removed in section).
|
||||
| color | /set weechat.color.* | Colors.
|
||||
| completion | /set weechat.completion.* | Completion options.
|
||||
| history | /set weechat.history.* | History options (commands and buffers).
|
||||
| proxy | <<command_weechat_proxy,/proxy>> +
|
||||
/set weechat.proxy.* | Proxy options.
|
||||
| network | /set weechat.network.* | Network/TLS options.
|
||||
| plugin | /set weechat.plugin.* | Options on plugins.
|
||||
| signal | /set weechat.signal.* | Options on signals.
|
||||
| bar | <<command_weechat_bar,/bar>> +
|
||||
/set weechat.bar.* | Bar options.
|
||||
| layout | <<command_weechat_layout,/layout>> | Layouts.
|
||||
| notify | <<command_weechat_buffer,/buffer notify>> | Notify levels for buffers (options can be added/removed in section).
|
||||
| filter | <<command_weechat_filter,/filter>> | Filters.
|
||||
| key | <<command_weechat_key,/key>> | Keys in default context.
|
||||
| key_search | <<command_weechat_key,/key>> | Keys in search context.
|
||||
| key_cursor | <<command_weechat_key,/key>> | Keys in cursor context.
|
||||
| key_mouse | <<command_weechat_key,/key>> | Keys in mouse context.
|
||||
| Section | Control command | Description
|
||||
| debug | <<command_weechat_debug,/debug set>> +
|
||||
/set weechat.debug.* | Debug level, for core and plugins (options can be added/removed in section).
|
||||
| startup | /set weechat.startup.* | Startup options.
|
||||
| look | /set weechat.look.* | Look and feel.
|
||||
| palette | <<command_weechat_color,/color alias>> +
|
||||
/set weechat.palette.* | Color aliases (options can be added/removed in section).
|
||||
| color | /set weechat.color.* | Colors.
|
||||
| completion | /set weechat.completion.* | Completion options.
|
||||
| history | /set weechat.history.* | History options (commands and buffers).
|
||||
| proxy | <<command_weechat_proxy,/proxy>> +
|
||||
/set weechat.proxy.* | Proxy options.
|
||||
| network | /set weechat.network.* | Network/TLS options.
|
||||
| plugin | /set weechat.plugin.* | Options on plugins.
|
||||
| signal | /set weechat.signal.* | Options on signals.
|
||||
| bar | <<command_weechat_bar,/bar>> +
|
||||
/set weechat.bar.* | Bar options.
|
||||
| layout | <<command_weechat_layout,/layout>> | Layouts.
|
||||
| buffer | <<command_weechat_buffer,/buffer setauto>> | Properties auto-applied on buffers when they are opened.
|
||||
| notify | <<command_weechat_buffer,/buffer notify>> | Notify levels for buffers (options can be added/removed in section).
|
||||
| filter | <<command_weechat_filter,/filter>> | Filters.
|
||||
| key | <<command_weechat_key,/key>> | Keys in default context.
|
||||
| key_search | <<command_weechat_key,/key>> | Keys in search context.
|
||||
| key_cursor | <<command_weechat_key,/key>> | Keys in cursor context.
|
||||
| key_mouse | <<command_weechat_key,/key>> | Keys in mouse context.
|
||||
|===
|
||||
|
||||
Options:
|
||||
@@ -3264,7 +3371,7 @@ irc.server.libera.autorejoin_delay integer null -> 30
|
||||
irc.server.libera.away_check integer null -> 0
|
||||
irc.server.libera.away_check_max_nicks integer null -> 25
|
||||
irc.server.libera.capabilities string null -> "*"
|
||||
irc.server.libera.charset_message integer null -> message
|
||||
irc.server.libera.charset_message enum null -> message
|
||||
irc.server.libera.command string null -> ""
|
||||
irc.server.libera.command_delay integer null -> 0
|
||||
irc.server.libera.connection_timeout integer null -> 60
|
||||
@@ -3280,9 +3387,9 @@ irc.server.libera.notify string null -> ""
|
||||
irc.server.libera.password string null -> ""
|
||||
irc.server.libera.proxy string null -> ""
|
||||
irc.server.libera.realname string null -> ""
|
||||
irc.server.libera.sasl_fail integer null -> reconnect
|
||||
irc.server.libera.sasl_fail enum null -> reconnect
|
||||
irc.server.libera.sasl_key string null -> ""
|
||||
irc.server.libera.sasl_mechanism integer null -> plain
|
||||
irc.server.libera.sasl_mechanism enum null -> plain
|
||||
irc.server.libera.sasl_password string "${sec.data.libera}"
|
||||
irc.server.libera.sasl_timeout integer null -> 15
|
||||
irc.server.libera.sasl_username string "alice"
|
||||
@@ -3992,7 +4099,7 @@ reply).
|
||||
For example, to customize reply to CTCP "VERSION", use following command:
|
||||
|
||||
----
|
||||
/set irc.ctcp.version "I'm running WeeChat $version, it rocks!"
|
||||
/set irc.ctcp.version "I'm running WeeChat ${version}, it rocks!"
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
@@ -4017,7 +4124,7 @@ It is possible to customize CTCP for one server only, using its internal name
|
||||
before CTCP name:
|
||||
|
||||
----
|
||||
/set irc.ctcp.libera.version "WeeChat $version (for libera)"
|
||||
/set irc.ctcp.libera.version "WeeChat ${version} (for libera)"
|
||||
----
|
||||
|
||||
If you want to restore standard CTCP reply, then remove option:
|
||||
@@ -4026,40 +4133,38 @@ If you want to restore standard CTCP reply, then remove option:
|
||||
/unset irc.ctcp.version
|
||||
----
|
||||
|
||||
Following codes can be used in strings and are automatically expanded by WeeChat
|
||||
when replying to CTCP:
|
||||
The CTCP replies are evaluated (see command <<command_weechat_eval,/eval>>) and
|
||||
the following extra variables are available:
|
||||
|
||||
[width="100%",cols="2l,4,8",options="header"]
|
||||
[width="100%",cols="2,4,8",options="header"]
|
||||
|===
|
||||
| Code | Description | Value/example
|
||||
| $clientinfo | List of supported CTCP | `+ACTION DCC CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION+`
|
||||
| $version | WeeChat version | `+0.4.0-dev+`
|
||||
| $versiongit | WeeChat version + Git version ^(1)^ | `+0.4.0-dev (git: v0.3.9-104-g7eb5cc4)+`
|
||||
| $git | Git version ^(1)^ | `+v0.3.9-104-g7eb5cc4+`
|
||||
| $compilation | WeeChat compilation date | `+Dec 16 2012+`
|
||||
| $osinfo | Info about OS | `+Linux 2.6.32-5-amd64 / x86_64+`
|
||||
| $site | WeeChat site | `+https://weechat.org/+`
|
||||
| $download | WeeChat site, download page | `+https://weechat.org/download/+`
|
||||
| $time | Current date/time | `+Sun, 16 Dec 2012 10:40:48 +0100+`
|
||||
| $username | User name on IRC server | `+name+`
|
||||
| $realname | Real name on IRC server | `+John Doe+`
|
||||
| Variable | Description | Value/example
|
||||
| `+${clientinfo}+` | List of supported CTCP | `+ACTION DCC CLIENTINFO PING SOURCE TIME VERSION+`
|
||||
| `+${version}+` | WeeChat version | `+4.1.0-dev+`
|
||||
| `+${versiongit}+` | WeeChat version + Git version ^(1)^ | `+4.1.0-dev (git: v4.0.0-51-g8f98b922a)+`
|
||||
| `+${git}+` | Git version ^(1)^ | `+v4.0.0-51-g8f98b922a+`
|
||||
| `+${compilation}+` | WeeChat compilation date | `+Jul 8 2023 20:14:23+`
|
||||
| `+${osinfo}+` | Info about OS | `+Linux 5.10.0-23-amd64 / x86_64+`
|
||||
| `+${site}+` | WeeChat site | `+https://weechat.org/+`
|
||||
| `+${download}+` | WeeChat site, download page | `+https://weechat.org/download/+`
|
||||
| `+${time}+` | Current date/time | `+Sat, 08 Jul 2023 21:11:19 +0200+`
|
||||
| `+${username}+` | User name on IRC server | `+name+`
|
||||
| `+${realname}+` | Real name on IRC server | `+John Doe+`
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ The Git version is the output of command `git describe`. It is known only
|
||||
if WeeChat has been compiled inside the Git repository and if Git was installed.
|
||||
|
||||
If CTCP options are not defined (by default), CTCP replies are:
|
||||
The default CTCP replies are:
|
||||
|
||||
[width="100%",cols="2,4,8",options="header"]
|
||||
|===
|
||||
| CTCP | Reply format | Example
|
||||
| CLIENTINFO | `+$clientinfo+` | `+ACTION DCC CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION+`
|
||||
| FINGER | `+WeeChat $versiongit+` | `+WeeChat 0.4.0-dev (git: v0.3.9-104-g7eb5cc4)+`
|
||||
| SOURCE | `+$download+` | `+https://weechat.org/download/+`
|
||||
| TIME | `+$time+` | `+Sun, 16 Dec 2012 10:40:48 +0100+`
|
||||
| USERINFO | `+$username ($realname)+` | `+name (John Doe)+`
|
||||
| VERSION | `+WeeChat $versiongit ($compilation)+` | `+WeeChat 0.4.0-dev (git: v0.3.9-104-g7eb5cc4) (Dec 16 2012)+`
|
||||
| CTCP | Reply format | Example
|
||||
| CLIENTINFO | `+${clientinfo}+` | `+ACTION DCC CLIENTINFO PING SOURCE TIME VERSION+`
|
||||
| SOURCE | `+${download}+` | `+https://weechat.org/download/+`
|
||||
| TIME | `+${time}+` | `+Sat, 08 Jul 2023 21:11:19 +0200+`
|
||||
| VERSION | `+WeeChat ${version}+` | `+WeeChat 4.1.0-dev+`
|
||||
|===
|
||||
|
||||
[[irc_target_buffer]]
|
||||
|
||||
+66
-24
@@ -598,6 +598,15 @@ Si está utilizando aplicación Terminal de macOS, habilite la opción
|
||||
"Use option as meta key" en el menú Settings/Keyboard después de la cual puede utilizar la tecla
|
||||
kbd:[Option] como tecla meta.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[enter_key]]
|
||||
=== Some keys including Enter are not working, why?
|
||||
|
||||
If you run a WeeChat < 4.0.0 with configuration files created by any
|
||||
version ≥ 4.0.0, the keys names become invalid and many keys won't work at all. +
|
||||
To repair them, exit WeeChat, remove all sections `[key*]` from weechat.conf
|
||||
and start WeeChat again: all default keys will be created.
|
||||
|
||||
[[customize_key_bindings]]
|
||||
=== ¿Cómo puedo personalizar los atajos de teclado?
|
||||
|
||||
@@ -627,6 +636,13 @@ comandos como `/123` para saltar al buffer #123:
|
||||
/trigger add numberjump modifier "2000|input_text_for_buffer" "${tg_string} =~ ^/[0-9]+$" "=\/([0-9]+)=/buffer *${re:1}=" "" "" "none"
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
For an easy jump to buffers, you can also install the _go.py_ script:
|
||||
|
||||
----
|
||||
/script install go.py
|
||||
----
|
||||
|
||||
[[global_history]]
|
||||
=== ¿Cómo utilizar el historial global (en vez del historial del buffer) con las teclas de las flechas arriba y abajo?
|
||||
|
||||
@@ -947,35 +963,22 @@ link:weechat_user.en.html#max_hotlist_level_nicks[hotlist_max_level_nicks_add ^
|
||||
buffer property to set the max hotlist level for some nicks, per buffer,
|
||||
or per group of buffers (like IRC servers).
|
||||
|
||||
Para únicamente inhabilitar las notificaciones, debería establecerlo a 2:
|
||||
Para únicamente inhabilitar las notificaciones, debería establecerlo a 2.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
For the current buffer:
|
||||
|
||||
----
|
||||
/buffer set hotlist_max_level_nicks_add joe:2,mike:2
|
||||
/buffer setauto hotlist_max_level_nicks_add joe:2,mike:2
|
||||
----
|
||||
|
||||
Esta propiedad del buffer no es almacenada en la configuración.
|
||||
Para volver a aplicar automáticamente estas propiedades del buffer, necesitaría el script
|
||||
_buffer_autoset.py_:
|
||||
// TRANSLATION MISSING
|
||||
For all channels on server "libera":
|
||||
|
||||
----
|
||||
/script install buffer_autoset.py
|
||||
/set weechat.buffer.irc.libera.*.hotlist_max_level_nicks_add joe:2,mike:2
|
||||
----
|
||||
|
||||
Por ejemplo, para inhabilitar automáticamente las menciones de "mike" en #weechat
|
||||
en el servidor IRC de libera:
|
||||
|
||||
----
|
||||
/buffer_autoset add irc.libera.#weechat hotlist_max_level_nicks_add mike:2
|
||||
----
|
||||
|
||||
Para aplicarlo al servidor completo de libera:
|
||||
|
||||
----
|
||||
/buffer_autoset add irc.libera hotlist_max_level_nicks_add mike:2
|
||||
----
|
||||
|
||||
Para más ejemplos, vea `+/help buffer_autoset+`.
|
||||
|
||||
[[irc_target_buffer]]
|
||||
=== ¿Cómo puedo cambiar el objetivo del buffer para comandos en buffers unidos (como en un buffer con servidores)?
|
||||
|
||||
@@ -1105,7 +1108,10 @@ Puede intentar estos trucos para consumir menos memoria:
|
||||
|
||||
Puede seguir los mismos consejo que para la <<memory_usage,memoria>> y estos otros:
|
||||
|
||||
* Oculte la barra de la lista de apodos: `/bar hide nicklist`.
|
||||
// TRANSLATION MISSING
|
||||
* Oculte la barra de la lista de apodos: `/bar hide nicklist` (key: kbd:[Alt+Shift+N]).
|
||||
// TRANSLATION MISSING
|
||||
* Disable "buflist": `/buflist disable` (key: kbd:[Alt+Shift+B]).
|
||||
* Elimine que se muestren los segundos en la hora de la barra de estado:
|
||||
`+/set weechat.look.item_time_format "%H:%M"+` (este es el valor predeterminado).
|
||||
* Inhabilite la comprobación en tiempo real de palabras erróneas en la línea de comandos (si lo había habilitado previamente):
|
||||
@@ -1127,14 +1133,21 @@ Inhabilite las respuestas a todas las peticiones CTCP:
|
||||
|
||||
----
|
||||
/set irc.ctcp.clientinfo ""
|
||||
/set irc.ctcp.finger ""
|
||||
/set irc.ctcp.source ""
|
||||
/set irc.ctcp.time ""
|
||||
/set irc.ctcp.userinfo ""
|
||||
/set irc.ctcp.version ""
|
||||
/set irc.ctcp.ping ""
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
With WeeChat < 4.1.0, other CTCP queries were replied by default and must be
|
||||
disabled as well:
|
||||
|
||||
----
|
||||
/set irc.ctcp.finger ""
|
||||
/set irc.ctcp.userinfo ""
|
||||
----
|
||||
|
||||
Elimine de la memoria e inhabilite la carga automática del complemento "xfer" (utilizdo para IRC DCC):
|
||||
|
||||
----
|
||||
@@ -1169,6 +1182,35 @@ almacenadas en _sec.conf_ con el comando `/secure`).
|
||||
Vea la link:weechat_user.en.html#files_and_directories[Guía del usuario / Archivos y directorios ^↗^^]
|
||||
para más información relacionada con los archivos de configuración.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[move_to_another_device]]
|
||||
=== I want to move my WeeChat to another device and keep my config, what should I copy?
|
||||
|
||||
First check directories used by WeeChat with this command: `/debug dirs`. +
|
||||
Directories home/config and home/data must be copied (all files and sub-directories).
|
||||
|
||||
For example if you're using XDG directories (default with WeeChat ≥ 3.2),
|
||||
the directories should be `$HOME/.config/weechat` and `$HOME/.local/share/weechat`. +
|
||||
If you're using a single directory (default with WeeChat < 3.2), the directory
|
||||
should be `$HOME/.weechat`.
|
||||
|
||||
[IMPORTANT]
|
||||
The WeeChat version on the new device must be greater than or equal to the version
|
||||
on the initial device. +
|
||||
Downgrading WeeChat configuration is *NOT SUPPORTED* and can break it,
|
||||
leading to unusable WeeChat.
|
||||
|
||||
Steps:
|
||||
|
||||
. Quit Weechat: `/quit` (or `/upgrade -quit` if you want to resume the session,
|
||||
which includes content of all buffers).
|
||||
. Copy all directories, sub-directories and files to the new device, keeping
|
||||
same names and permissions.
|
||||
. Optional: copy any file outside these directories that you refer to in your
|
||||
configuration (it's not recommended to use files outside WeeChat directories).
|
||||
. Start WeeChat on the new device: `weechat` (or `weechat --upgrade` if you
|
||||
saved the session).
|
||||
|
||||
[[development]]
|
||||
== Desarrollo
|
||||
|
||||
|
||||
@@ -142,6 +142,7 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|
||||
| wee-secure-config.c | Options des données sécurisées (fichier sec.conf).
|
||||
| wee-signal.c | Fonctions sur les signaux.
|
||||
| wee-string.c | Fonctions sur les chaînes de caractères.
|
||||
| wee-sys.c | Fonctions système.
|
||||
| wee-upgrade-file.c | Système de mise à jour interne.
|
||||
| wee-upgrade.c | Mise à jour du cœur de WeeChat (tampons, lignes, historique, ...).
|
||||
| wee-url.c | Transfert d'URL (en utilisant libcurl).
|
||||
@@ -168,6 +169,7 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|
||||
| wee-hook-process.c | Hook "process".
|
||||
| wee-hook-signal.c | Hook "signal".
|
||||
| wee-hook-timer.c | Hook "timer".
|
||||
| wee-hook-url.c | Hook "url".
|
||||
| gui/ | Fonctions pour les tampons, fenêtres, ... (utilisées par toutes les interfaces).
|
||||
| gui-bar-item.c | Objets de barre.
|
||||
| gui-bar-window.c | Fenêtres de barre.
|
||||
@@ -238,6 +240,7 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|
||||
| buflist.c | Fonctions principales de Buflist.
|
||||
| buflist-bar-item.c | Objets de barre Buflist.
|
||||
| buflist-command.c | Commandes pour Buflist.
|
||||
| buflist-completion.c | Complétions pour Buflist.
|
||||
| buflist-config.c | Options de configuration pour Buflist (fichier buflist.conf).
|
||||
| buflist-info.c | Info/infolists/hdata pour Buflist.
|
||||
| buflist-mouse.c | Actions souris pour Buflist.
|
||||
@@ -283,6 +286,7 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|
||||
| irc-info.c | Info/infolists/hdata pour IRC.
|
||||
| irc-input.c | Entrée de commandes/texte.
|
||||
| irc-join.c | Fonctions pour les listes de canaux à rejoindre.
|
||||
| irc-list.c | Tampon pour la réponse à la commande /list.
|
||||
| irc-message.c | Fonctions pour manipuler les messages IRC.
|
||||
| irc-mode.c | Fonctions pour les modes de canal/pseudo.
|
||||
| irc-modelist.c | Listes de modes de canaux IRC (+b, +e, +I, ...).
|
||||
@@ -421,6 +425,7 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|
||||
| test-core-url.cpp | Tests : URLs.
|
||||
| test-core-utf8.cpp | Tests : UTF-8.
|
||||
| test-core-util.cpp | Tests : fonctions utiles.
|
||||
| test-core-sys.cpp | Tests : fonctions système.
|
||||
| gui/ | Racine des tests unitaires pour les interfaces.
|
||||
| test-gui-bar-window.cpp | Tests : fonctions de fenêtres de barre.
|
||||
| test-gui-buffer.cpp | Tests : fonctions de tampons.
|
||||
@@ -438,8 +443,10 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|
||||
| test-irc-channel.cpp | Tests : canaux IRC.
|
||||
| test-irc-color.cpp | Tests : couleurs IRC.
|
||||
| test-irc-config.cpp | Tests : configuration IRC.
|
||||
| test-irc-ctcp.cpp | Tests : CTCP IRC.
|
||||
| test-irc-ignore.cpp | Tests : ignores IRC.
|
||||
| test-irc-join.cpp | Tests : fonctions de join IRC.
|
||||
| test-irc-list.cpp | Tests : tampon IRC pour la réponse à la commande /list.
|
||||
| test-irc-message.cpp | Tests : messages IRC.
|
||||
| test-irc-mode.cpp | Tests : modes IRC.
|
||||
| test-irc-nick.cpp | Tests : pseudos IRC.
|
||||
|
||||
+63
-24
@@ -601,6 +601,16 @@ Si vous utilisez l'application Terminal sous macOS, activez l'option
|
||||
"Use option as meta key" dans le menu Réglages/Clavier. Vous pouvez alors
|
||||
utiliser la touche kbd:[Option] comme touche meta.
|
||||
|
||||
[[enter_key]]
|
||||
=== Quelques touches comme Entrée ne fonctionnent pas, pourquoi ?
|
||||
|
||||
Si vous lancez WeeChat < 4.0.0 avec des fichiers de configuration créés par toute
|
||||
version ≥ 4.0.0, les noms des touches sont invalides et de nombreuses touches
|
||||
ne fonctionneront plus. +
|
||||
Pour les réparer, quittez WeeChat, supprimez toutes les sections `[key*]` de
|
||||
weechat.conf et démarrez WeeChat à nouveau : toutes les touches par défaut
|
||||
seront recréées.
|
||||
|
||||
[[customize_key_bindings]]
|
||||
=== Comment puis-je configurer les raccourcis clavier ?
|
||||
|
||||
@@ -631,6 +641,12 @@ et utiliser les commandes comme `/123` pour sauter au tampon n°123 :
|
||||
/trigger add numberjump modifier "2000|input_text_for_buffer" "${tg_string} =~ ^/[0-9]+$" "=\/([0-9]+)=/buffer *${re:1}=" "" "" "none"
|
||||
----
|
||||
|
||||
Pour un saut facile vers les tampons, vous pouvez aussi installer le script _go.py_ :
|
||||
|
||||
----
|
||||
/script install go.py
|
||||
----
|
||||
|
||||
[[global_history]]
|
||||
=== Comment utiliser l'historique global (au lieu de l'historique du tampon) avec les touches haut et bas ?
|
||||
|
||||
@@ -949,35 +965,20 @@ link:weechat_user.fr.html#max_hotlist_level_nicks[hotlist_max_level_nicks_add ^
|
||||
pour définir le niveau maximum de hotlist pour certains pseudos, par tampon,
|
||||
ou groupe de tampons (comme des serveurs IRC).
|
||||
|
||||
Pour désactiver seulement les highlights, vous pouvez positionner la valeur à 2 :
|
||||
Pour désactiver seulement les highlights, vous pouvez positionner la valeur à 2.
|
||||
|
||||
Pour le tampon courant :
|
||||
|
||||
----
|
||||
/buffer set hotlist_max_level_nicks_add joe:2,mike:2
|
||||
/buffer setauto hotlist_max_level_nicks_add joe:2,mike:2
|
||||
----
|
||||
|
||||
Cependant, cette propriété de tampon n'est pas sauvegardée dans la configuration.
|
||||
Pour automatiquement réappliquer ces propriétés de tampons, vous aurez besoin
|
||||
du script _buffer_autoset.py_ :
|
||||
Pour tous les canaux sur le serveur "libera":
|
||||
|
||||
----
|
||||
/script install buffer_autoset.py
|
||||
/set weechat.buffer.irc.libera.*.hotlist_max_level_nicks_add joe:2,mike:2
|
||||
----
|
||||
|
||||
Par exemple, pour désactiver de manière permanente les highlights de "mike" sur
|
||||
#weechat sur le serveur IRC libera :
|
||||
|
||||
----
|
||||
/buffer_autoset add irc.libera.#weechat hotlist_max_level_nicks_add mike:2
|
||||
----
|
||||
|
||||
Pour l'appliquer à l'ensemble du serveur libera :
|
||||
|
||||
----
|
||||
/buffer_autoset add irc.libera hotlist_max_level_nicks_add mike:2
|
||||
----
|
||||
|
||||
Pour plus d'exemples, voir `+/help buffer_autoset+`.
|
||||
|
||||
[[irc_target_buffer]]
|
||||
=== Comment puis-je changer le serveur cible pour les commandes avec des tampons mélangés (comme le tampon avec les serveurs) ?
|
||||
|
||||
@@ -1114,7 +1115,8 @@ Vous pouvez essayer les astuces suivantes pour consommer moins de mémoire :
|
||||
Vous pouvez suivre les mêmes astuces que pour la <<memory_usage,mémoire>>, et
|
||||
celles-ci :
|
||||
|
||||
* Cacher la barre "nicklist" : `/bar hide nicklist`.
|
||||
* Cacher la barre "nicklist" : `/bar hide nicklist` (touche : kbd:[Alt+Shift+N]).
|
||||
* Désactiver "buflist" : `/buflist disable` (touche : kbd:[Alt+Shift+B]).
|
||||
* Supprimer l'affichage des secondes dans l'heure de la barre de statut :
|
||||
`+/set weechat.look.item_time_format "%H:%M"+` (ceci est la valeur par défaut).
|
||||
* Désactiver la vérification en temps réel des mots mal orthographiés dans la
|
||||
@@ -1136,14 +1138,20 @@ Désactivez les réponses à toutes les demandes CTCP :
|
||||
|
||||
----
|
||||
/set irc.ctcp.clientinfo ""
|
||||
/set irc.ctcp.finger ""
|
||||
/set irc.ctcp.source ""
|
||||
/set irc.ctcp.time ""
|
||||
/set irc.ctcp.userinfo ""
|
||||
/set irc.ctcp.version ""
|
||||
/set irc.ctcp.ping ""
|
||||
----
|
||||
|
||||
Avec WeeChat < 4.1.0, d'autres demandes CTCP étaient répondues par défaut et
|
||||
doivent être désactivées également :
|
||||
|
||||
----
|
||||
/set irc.ctcp.finger ""
|
||||
/set irc.ctcp.userinfo ""
|
||||
----
|
||||
|
||||
Déchargez et désactivez le chargement automatique de l'extension "xfer"
|
||||
(utilisée pour le DCC IRC) :
|
||||
|
||||
@@ -1182,6 +1190,37 @@ des mots de passes (s'ils ne sont pas stockés dans _sec.conf_ avec la commande
|
||||
Voir le link:weechat_user.fr.html#files_and_directories[Guide utilisateur / Fichiers et répertoires ^↗^^]
|
||||
pour plus d'informations sur les fichiers de configuration.
|
||||
|
||||
[[move_to_another_device]]
|
||||
=== Je souhaite déplacer mon WeeChat vers une autre machine et garder ma configuration, que dois-je copier ?
|
||||
|
||||
Premièrement, vérifiez les répertoires utilisés par WeeChat avec cette commande :
|
||||
`/debug dirs`. +
|
||||
Les répertoires home/config et home/data doivent être copiés (tous les fichiers
|
||||
et sous-répertoires).
|
||||
|
||||
Par exemple si vous utilisez les répertoires XDG (par défaut avec WeeChat ≥ 3.2),
|
||||
les répertoires devraient être `$HOME/.config/weechat` et `$HOME/.local/share/weechat`. +
|
||||
Si vous utilisez un répertoire unique (par défaut avec WeeChat < 3.2), le répertoire
|
||||
devrait être `$HOME/.weechat`.
|
||||
|
||||
[IMPORTANT]
|
||||
La version de WeeChat sur la nouvelle machine doit être supérieure ou égale
|
||||
à celle de la machine initiale. +
|
||||
La rétrogradation de la configuration n'est *PAS SUPPORTÉE* et pourrait la casser,
|
||||
rendant WeeChat inutilisable.
|
||||
|
||||
Étapes :
|
||||
|
||||
. Quitter Weechat : `/quit` (ou `/upgrade -quit` si vous souhaitez restaurer
|
||||
la session, qui inclut le contenu de tous les tampons).
|
||||
. Copier tous les répertoires, fichiers et sous-répertoires vers la nouvelle machine
|
||||
au même endroit, en préservant les noms et les permissions.
|
||||
. Facultatif : copier tout fichier en dehors de ces répertoires que vous référencez
|
||||
dans votre configuration (il n'est pas recommandé d'utiliser des fichiers en
|
||||
dehors des répertoires WeeChat).
|
||||
. Démarrer WeeChat sur la nouvelle machine : `weechat` (ou `weechat --upgrade`
|
||||
si vous avez sauvé la session).
|
||||
|
||||
[[development]]
|
||||
== Développement
|
||||
|
||||
|
||||
+363
-100
@@ -4100,18 +4100,28 @@ Algorithmes de hachage supportés :
|
||||
|
||||
[width="100%",cols="2,2,3,6",options="header"]
|
||||
|===
|
||||
| Valeur | Algorithme | Taille du haché | Notes
|
||||
| `+crc32+` | CRC32 | 4 octets (32 bits) | Pas un algorithme de hachage au sens cryptographique.
|
||||
| `+md5+` | MD5 | 16 octets (128 bits) | *Faible*, non recommandé pour un usage cryptographique.
|
||||
| `+sha1+` | SHA-1 | 20 octets (160 bits) | *Faible*, non recommandé pour un usage cryptographique.
|
||||
| `+sha224+` | SHA-224 | 28 octets (224 bits) |
|
||||
| `+sha256+` | SHA-256 | 32 octets (256 bits) |
|
||||
| `+sha384+` | SHA-384 | 48 octets (384 bits) |
|
||||
| `+sha512+` | SHA-512 | 64 octets (512 bits) |
|
||||
| `+sha3-224+` | SHA3-224 | 28 octets (224 bits) | Algorithme disponible avec libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-256+` | SHA3-256 | 32 octets (256 bits) | Algorithme disponible avec libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-384+` | SHA3-384 | 48 octets (384 bits) | Algorithme disponible avec libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-512+` | SHA3-512 | 64 octets (512 bits) | Algorithme disponible avec libgcrypt ≥ 1.7.0.
|
||||
| Valeur | Algorithme | Taille du haché | Notes
|
||||
| `+crc32+` | CRC32 | 4 octets (32 bits) | Pas un algorithme de hachage au sens cryptographique.
|
||||
| `+md5+` | MD5 | 16 octets (128 bits) | *Faible*, non recommandé pour un usage cryptographique.
|
||||
| `+sha1+` | SHA-1 | 20 octets (160 bits) | *Faible*, non recommandé pour un usage cryptographique.
|
||||
| `+sha224+` | SHA-224 | 28 octets (224 bits) |
|
||||
| `+sha256+` | SHA-256 | 32 octets (256 bits) |
|
||||
| `+sha384+` | SHA-384 | 48 octets (384 bits) |
|
||||
| `+sha512+` | SHA-512 | 64 octets (512 bits) |
|
||||
| `+sha512-224+` | SHA-512/224 | 28 octets (224 bits) | Algorithme disponible avec libgcrypt ≥ 1.9.4.
|
||||
| `+sha512-256+` | SHA-512/256 | 32 octets (256 bits) | Algorithme disponible avec libgcrypt ≥ 1.9.4.
|
||||
| `+sha3-224+` | SHA3-224 | 28 octets (224 bits) | Algorithme disponible avec libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-256+` | SHA3-256 | 32 octets (256 bits) | Algorithme disponible avec libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-384+` | SHA3-384 | 48 octets (384 bits) | Algorithme disponible avec libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-512+` | SHA3-512 | 64 octets (512 bits) | Algorithme disponible avec libgcrypt ≥ 1.7.0.
|
||||
| `+blake2b-160+` | BLAKE2B-160 | 20 octets (160 bits) | Algorithme disponible avec libgcrypt ≥ 1.8.0.
|
||||
| `+blake2b-256+` | BLAKE2B-256 | 32 octets (256 bits) | Algorithme disponible avec libgcrypt ≥ 1.8.0.
|
||||
| `+blake2b-384+` | BLAKE2B-384 | 48 octets (384 bits) | Algorithme disponible avec libgcrypt ≥ 1.8.0.
|
||||
| `+blake2b-512+` | BLAKE2B-512 | 64 octets (512 bits) | Algorithme disponible avec libgcrypt ≥ 1.8.0.
|
||||
| `+blake2s-128+` | BLAKE2S-128 | 16 octets (128 bits) | Algorithme disponible avec libgcrypt ≥ 1.8.0.
|
||||
| `+blake2s-160+` | BLAKE2S-160 | 20 octets (160 bits) | Algorithme disponible avec libgcrypt ≥ 1.8.0.
|
||||
| `+blake2s-224+` | BLAKE2S-224 | 28 octets (224 bits) | Algorithme disponible avec libgcrypt ≥ 1.8.0.
|
||||
| `+blake2s-256+` | BLAKE2S-256 | 32 octets (256 bits) | Algorithme disponible avec libgcrypt ≥ 1.8.0.
|
||||
|===
|
||||
|
||||
Valeur de retour :
|
||||
@@ -4552,7 +4562,8 @@ Paramètres :
|
||||
* _to_ : fichier cible
|
||||
* _compressor_ : le compresseur à utiliser, un parmi :
|
||||
** _gzip_ : compression gzip
|
||||
** _zstd_ : compression zstandard
|
||||
** _zstd_ : compression zstandard (disponible seulement si zstd a été activé
|
||||
lors de la compilation de WeeChat)
|
||||
* _compression_level_ : niveau de compression, entre 1 (rapide, peu de
|
||||
compression) à 100 (lent, meilleure compression)
|
||||
|
||||
@@ -6819,9 +6830,10 @@ my_section_read_cb (const void *pointer, void *data,
|
||||
{
|
||||
/* ... */
|
||||
|
||||
return WEECHAT_CONFIG_READ_OK;
|
||||
/* return WEECHAT_CONFIG_READ_MEMORY_ERROR; */
|
||||
/* return WEECHAT_CONFIG_READ_FILE_NOT_FOUND; */
|
||||
return WEECHAT_CONFIG_OPTION_SET_OK_CHANGED;
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE; */
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_ERROR; */
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND; */
|
||||
}
|
||||
|
||||
int
|
||||
@@ -6911,7 +6923,7 @@ def config_new_section(config_file: str, name: str,
|
||||
callback_delete_option: str, callback_delete_option_data: str) -> str: ...
|
||||
|
||||
# exemple
|
||||
def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
|
||||
def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: Union[str, None]) -> int:
|
||||
# ...
|
||||
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
|
||||
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
|
||||
@@ -6930,7 +6942,7 @@ def my_section_write_default_cb(data: str, config_file: str, section_name: str)
|
||||
# return weechat.WEECHAT_CONFIG_WRITE_ERROR
|
||||
# return weechat.WEECHAT_CONFIG_WRITE_MEMORY_ERROR
|
||||
|
||||
def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
|
||||
def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: Union[str, None]) -> int:
|
||||
# ...
|
||||
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
|
||||
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
|
||||
@@ -6995,7 +7007,7 @@ section = weechat.config_search_section(config_file, "section")
|
||||
|
||||
==== config_new_option
|
||||
|
||||
_Mis à jour dans la 1.5._
|
||||
_Mis à jour dans la 1.5, 4.1.0._
|
||||
|
||||
Créer une nouvelle option dans une section d'un fichier de configuration.
|
||||
|
||||
@@ -7043,12 +7055,14 @@ Paramètres :
|
||||
"name << file.section.option"
|
||||
* _type_ : type de l'option :
|
||||
** _boolean_ : valeur booléenne (on/off)
|
||||
** _integer_ : valeur entière (avec en option une chaîne pour chaque valeur)
|
||||
** _integer_ : valeur entière
|
||||
** _string_ : une chaîne de caractères
|
||||
** _color_ : une couleur
|
||||
** _enum_ : liste de valeurs sous forme de chaînes (stocké comme nombre entier
|
||||
en interne)
|
||||
* _description_ : description de l'option
|
||||
* _string_values_ : valeurs sous forme de chaîne (séparées par `+|+`), utilisées
|
||||
pour le type _integer_ (optionnel)
|
||||
* _string_values_ : valeurs sous forme de chaîne (séparées par `+|+`) (optionnel,
|
||||
requis pour le type _enum_)
|
||||
* _min_ : valeur minimum (pour le type _integer_)
|
||||
* _max_ : valeur maximum (pour le type _integer_)
|
||||
* _default_value_ : valeur par défaut de l'option (utilisée quand l'option est
|
||||
@@ -7103,8 +7117,8 @@ Exemple en C :
|
||||
[source,c]
|
||||
----
|
||||
/* booléen */
|
||||
struct t_config_option *option1 =
|
||||
weechat_config_new_option (config_file, section, "option1", "boolean",
|
||||
struct t_config_option *option1_bool =
|
||||
weechat_config_new_option (config_file, section, "option_bool", "boolean",
|
||||
"Mon option, type booléen",
|
||||
NULL,
|
||||
0, 0,
|
||||
@@ -7116,8 +7130,8 @@ struct t_config_option *option1 =
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* entier */
|
||||
struct t_config_option *option2 =
|
||||
weechat_config_new_option (config_file, section, "option2", "integer",
|
||||
struct t_config_option *option_int =
|
||||
weechat_config_new_option (config_file, section, "option_int", "integer",
|
||||
"Mon option, type entier",
|
||||
NULL,
|
||||
0, 100,
|
||||
@@ -7128,23 +7142,9 @@ struct t_config_option *option2 =
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* entier (avec valeurs sous forme de chaînes) */
|
||||
struct t_config_option *option3 =
|
||||
weechat_config_new_option (config_file, section, "option3", "integer",
|
||||
"Mon option, type entier "
|
||||
"(avec valeurs sous forme de chaînes)",
|
||||
"top|bottom|left|right",
|
||||
0, 0,
|
||||
"bottom",
|
||||
"bottom",
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* chaîne */
|
||||
struct t_config_option *option4 =
|
||||
weechat_config_new_option (config_file, section, "option4", "string",
|
||||
struct t_config_option *option_str =
|
||||
weechat_config_new_option (config_file, section, "option_str", "string",
|
||||
"Mon option, type chaîne",
|
||||
NULL,
|
||||
0, 0,
|
||||
@@ -7156,8 +7156,8 @@ struct t_config_option *option4 =
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* couleur */
|
||||
struct t_config_option *option5 =
|
||||
weechat_config_new_option (config_file, section, "option5", "color",
|
||||
struct t_config_option *option_col =
|
||||
weechat_config_new_option (config_file, section, "option_col", "color",
|
||||
"Mon option, type couleur",
|
||||
NULL,
|
||||
0, 0,
|
||||
@@ -7167,6 +7167,19 @@ struct t_config_option *option5 =
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* énuméré */
|
||||
struct t_config_option *option_enum =
|
||||
weechat_config_new_option (config_file, section, "option_enum", "enum",
|
||||
"Mon option, type énuméré",
|
||||
"top|bottom|left|right",
|
||||
0, 0,
|
||||
"bottom",
|
||||
"bottom",
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
----
|
||||
|
||||
Script (Python) :
|
||||
@@ -7176,55 +7189,55 @@ Script (Python) :
|
||||
# prototype
|
||||
def config_new_option(config_file: str, section: str, name: str, type: str, description: str,
|
||||
string_values: str, min: int, max: int,
|
||||
default_value: str | None, value: str | None, null_value_allowed: int,
|
||||
default_value: Union[str, None], value: Union[str, None], null_value_allowed: int,
|
||||
callback_check_value: str, callback_check_value_data: str,
|
||||
callback_change: str, callback_change_data: str,
|
||||
callback_delete: str, callback_delete_data: str) -> str: ...
|
||||
|
||||
# exemple
|
||||
def option4_check_value_cb(data: str, option: str, value: str) -> int:
|
||||
def option_str_check_value_cb(data: str, option: str, value: str) -> int:
|
||||
# ...
|
||||
return 1
|
||||
# return 0
|
||||
|
||||
def option4_change_cb(data: str, option: str) -> None:
|
||||
def option_str_change_cb(data: str, option: str) -> None:
|
||||
# ...
|
||||
|
||||
def option4_delete_cb(data: str, option: str) -> None:
|
||||
def option_str_delete_cb(data: str, option: str) -> None:
|
||||
# ...
|
||||
|
||||
option1 = weechat.config_new_option(config_file, section, "option1", "boolean",
|
||||
option_bool = weechat.config_new_option(config_file, section, "option_bool", "boolean",
|
||||
"Mon option, type booléen",
|
||||
"", 0, 0, "on", "on", 0,
|
||||
"", "",
|
||||
"", "",
|
||||
"", "")
|
||||
|
||||
option2 = weechat.config_new_option(config_file, section, "option2", "integer",
|
||||
option_int = weechat.config_new_option(config_file, section, "option_int", "integer",
|
||||
"Mon option, type entier",
|
||||
"", 0, 100, "15", "15", 0,
|
||||
"", "",
|
||||
"", "",
|
||||
"", "")
|
||||
|
||||
option3 = weechat.config_new_option(config_file, section, "option3", "integer",
|
||||
"Mon option, type entier (avec valeurs sous forme de chaînes)",
|
||||
"top|bottom|left|right",
|
||||
0, 0, "bottom", "bottom", 0,
|
||||
option_str = weechat.config_new_option(config_file, section, "option_str", "string",
|
||||
"Mon option, type chaîne",
|
||||
"", 0, 0, "test", "test", 1,
|
||||
"option_str_check_value_cb", "",
|
||||
"option_str_change_cb", "",
|
||||
"option_str_delete_cb", "")
|
||||
|
||||
option_col = weechat.config_new_option(config_file, section, "option_col", "color",
|
||||
"Mon option, type couleur",
|
||||
"", 0, 0, "lightblue", "lightblue", 0,
|
||||
"", "",
|
||||
"", "",
|
||||
"", "")
|
||||
|
||||
option4 = weechat.config_new_option(config_file, section, "option4", "string",
|
||||
"Mon option, type chaîne",
|
||||
"", 0, 0, "test", "test", 1,
|
||||
"option4_check_value_cb", "",
|
||||
"option4_change_cb", "",
|
||||
"option4_delete_cb", "")
|
||||
|
||||
option5 = weechat.config_new_option(config_file, section, "option5", "color",
|
||||
"Mon option, type couleur",
|
||||
"", 0, 0, "lightblue", "lightblue", 0,
|
||||
option_enum = weechat.config_new_option(config_file, section, "option_enum", "enum",
|
||||
"Mon option, type énuméré",
|
||||
"top|bottom|left|right",
|
||||
0, 0, "bottom", "bottom", 0,
|
||||
"", "",
|
||||
"", "",
|
||||
"", "")
|
||||
@@ -7512,7 +7525,7 @@ Paramètres :
|
||||
selon le type de l'option :
|
||||
** _boolean_ :
|
||||
*** `toggle` : basculer la valeur courante
|
||||
** _integer_ ou _color_ :
|
||||
** _integer_, _color_ ou _enum_ :
|
||||
*** `++N` : ajouter `N` (un entier) à la valeur courante
|
||||
*** `--N` : soustraire `N` (un entier) de la valeur courante
|
||||
* _run_callback_ : 1 pour appeler la fonction de rappel si la valeur de
|
||||
@@ -7748,6 +7761,7 @@ Paramètres :
|
||||
*** _integer_
|
||||
*** _string_
|
||||
*** _color_
|
||||
*** _enum_
|
||||
** _description_ : description de l'option
|
||||
|
||||
Valeur de retour :
|
||||
@@ -7924,6 +7938,7 @@ Valeur de retour, selon le type de l'option :
|
||||
* _integer_ : 0
|
||||
* _string_ : 0
|
||||
* _color_ : 0
|
||||
* _enum_ : 0
|
||||
|
||||
Exemple en C :
|
||||
|
||||
@@ -7974,6 +7989,7 @@ Valeur de retour, selon le type de l'option :
|
||||
* _integer_ : 0
|
||||
* _string_ : 0
|
||||
* _color_ : 0
|
||||
* _enum_ : 0
|
||||
|
||||
Exemple en C :
|
||||
|
||||
@@ -8024,6 +8040,7 @@ Valeur de retour, selon le type de l'option :
|
||||
* _integer_ : valeur entière de l'option
|
||||
* _string_ : 0
|
||||
* _color_ : index de la couleur
|
||||
* _enum_ : valeur entière de l'option (index de la valeur de l'énuméré)
|
||||
|
||||
Exemple en C :
|
||||
|
||||
@@ -8066,6 +8083,7 @@ Valeur de retour, selon le type de l'option :
|
||||
* _integer_ : valeur entière par défaut de l'option
|
||||
* _string_ : 0
|
||||
* _color_ : index de la couleur par défaut
|
||||
* _enum_ : valeur entière par défaut de l'option (index de la valeur de l'énuméré)
|
||||
|
||||
Exemple en C :
|
||||
|
||||
@@ -8105,10 +8123,10 @@ Paramètres :
|
||||
Valeur de retour, selon le type de l'option :
|
||||
|
||||
* _boolean_ : "on" si la valeur est vraie, sinon "off"
|
||||
* _integer_ : valeur de l'option sous forme de chaîne si l'option est un entier
|
||||
avec des valeurs sous forme de chaînes, sinon NULL
|
||||
* _integer_ : NULL
|
||||
* _string_ : valeur de l'option sous forme de chaîne
|
||||
* _color_ : nom de la couleur
|
||||
* _enum_ : valeur de l'option sous forme de chaîne
|
||||
|
||||
Exemple en C :
|
||||
|
||||
@@ -8148,10 +8166,10 @@ Paramètres :
|
||||
Valeur de retour, selon le type de l'option :
|
||||
|
||||
* _boolean_ : "on" si la valeur par défaut est vraie, sinon "off"
|
||||
* _integer_ : valeur par défaut de l'option sous forme de chaîne si l'option
|
||||
est un entier avec des valeurs sous forme de chaînes, sinon NULL
|
||||
* _integer_ : NULL
|
||||
* _string_ : valeur par défaut de l'option sous forme de chaîne
|
||||
* _color_ : nom de la couleur par défaut
|
||||
* _enum_ : valeur par défaut de l'option sous forme de chaîne
|
||||
|
||||
Exemple en C :
|
||||
|
||||
@@ -8194,6 +8212,7 @@ Valeur de retour, selon le type de l'option :
|
||||
* _integer_ : NULL
|
||||
* _string_ : NULL
|
||||
* _color_ : nom de la couleur
|
||||
* _enum_ : NULL
|
||||
|
||||
Exemple en C :
|
||||
|
||||
@@ -8236,6 +8255,7 @@ Valeur de retour, selon le type de l'option :
|
||||
* _integer_ : NULL
|
||||
* _string_ : NULL
|
||||
* _color_ : nom de la couleur par défaut
|
||||
* _enum_ : NULL
|
||||
|
||||
Exemple en C :
|
||||
|
||||
@@ -8257,6 +8277,96 @@ option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_color_default(option)
|
||||
----
|
||||
|
||||
==== config_enum
|
||||
|
||||
_WeeChat ≥ 4.1.0._
|
||||
|
||||
Retourner la valeur de l'option, sous forme d'entier.
|
||||
|
||||
Prototype :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int weechat_config_enum (struct t_config_option *option);
|
||||
----
|
||||
|
||||
Paramètres :
|
||||
|
||||
* _option_ : pointeur vers l'option
|
||||
|
||||
Valeur de retour, selon le type de l'option :
|
||||
|
||||
* _boolean_ : valeur booléenne de l'option (0 ou 1)
|
||||
* _integer_ : valeur entière de l'option
|
||||
* _string_ : 0
|
||||
* _color_ : index de la couleur
|
||||
* _enum_ : valeur entière de l'option (index de la valeur de l'énuméré)
|
||||
|
||||
Exemple en C :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_config_option *option = weechat_config_get ("plugin.section.option");
|
||||
int value = weechat_config_enum (option);
|
||||
----
|
||||
|
||||
Script (Python) :
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def config_enum(option: str) -> int: ...
|
||||
|
||||
# exemple
|
||||
option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_enum(option)
|
||||
----
|
||||
|
||||
==== config_enum_default
|
||||
|
||||
_WeeChat ≥ 4.1.0._
|
||||
|
||||
Retourner la valeur par défaut de l'option, sous forme d'entier.
|
||||
|
||||
Prototype :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int weechat_config_enum_default (struct t_config_option *option);
|
||||
----
|
||||
|
||||
Paramètres :
|
||||
|
||||
* _option_ : pointeur vers l'option
|
||||
|
||||
Valeur de retour, selon le type de l'option :
|
||||
|
||||
* _boolean_ : valeur booléenne par défaut de l'option (0 ou 1)
|
||||
* _integer_ : valeur entière par défaut de l'option
|
||||
* _string_ : 0
|
||||
* _color_ : index de la couleur par défaut
|
||||
* _enum_ : valeur entière par défaut de l'option (index de la valeur de l'énuméré)
|
||||
|
||||
Exemple en C :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_config_option *option = weechat_config_get ("plugin.section.option");
|
||||
int value = weechat_config_enum_default (option);
|
||||
----
|
||||
|
||||
Script (Python) :
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def config_enum_default(option: str) -> int: ...
|
||||
|
||||
# example
|
||||
option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_enum_default(option)
|
||||
----
|
||||
|
||||
==== config_write_option
|
||||
|
||||
Écrire une ligne dans le fichier de configuration avec l'option et sa valeur
|
||||
@@ -10098,7 +10208,6 @@ struct t_hook *weechat_hook_process (const char *command,
|
||||
void *callback_data);
|
||||
----
|
||||
|
||||
|
||||
Paramètres :
|
||||
|
||||
* _command_ : commande à lancer dans le processus fils, URL _(WeeChat ≥ 0.3.7)_
|
||||
@@ -10332,7 +10441,7 @@ struct t_hook *weechat_hook_process_hashtable (const char *command,
|
||||
Les paramètres sont les mêmes que ceux de la fonction
|
||||
<<_hook_process,hook_process>>, avec un paramètre supplémentaire :
|
||||
|
||||
* _options_ : options pour la commande exécutée; la table de hachage est
|
||||
* _options_ : options pour la commande exécutée ; la table de hachage est
|
||||
dupliquée dans la fonction, donc il est possible de la supprimer après cet
|
||||
appel
|
||||
|
||||
@@ -10362,25 +10471,8 @@ sont disponibles :
|
||||
_/dev/null_.
|
||||
|===
|
||||
|
||||
Pour la commande "url:...", les options suivantes sont disponibles (voir
|
||||
`+man curl_easy_setopt+` pour une description de chaque option) :
|
||||
|
||||
include::{autogendir}/autogen_api_url_options.fr.adoc[tag=url_options]
|
||||
|
||||
[NOTE]
|
||||
^(1)^ Pour les options avec le type "mask", le format est :
|
||||
"value1+value2+value3" ;
|
||||
pour les options avec le type "list", les éléments de la liste doivent être
|
||||
séparés par un retour à la ligne (`\n`). +
|
||||
^(2)^ Lorsque des constantes sont disponibles, elles doivent être utilisées
|
||||
comme valeur pour l'option.
|
||||
|
||||
Pour l'URL, deux options supplémentaires (chaînes) sont autorisées, pour le
|
||||
fichier en entrée/sortie :
|
||||
|
||||
* _file_in_ : fichier à lire pour envoyer avec l'URL (envoi de fichier "post")
|
||||
* _file_out_ : écrire l'URL/fichier dans ce fichier (au lieu de la sortie
|
||||
standard)
|
||||
Pour la commande "url:...", voir les options disponibles dans la fonction
|
||||
<<_hook_url,hook_url>>.
|
||||
|
||||
Valeur de retour :
|
||||
|
||||
@@ -10540,6 +10632,163 @@ hook4 = weechat.hook_process_hashtable("sh",
|
||||
20000, "my_process_cb", "")
|
||||
----
|
||||
|
||||
==== hook_url
|
||||
|
||||
_WeeChat ≥ 4.1.0._
|
||||
|
||||
Transfert d'URL.
|
||||
|
||||
Prototype :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_hook *weechat_hook_url (const char *url,
|
||||
struct t_hashtable *options,
|
||||
int timeout,
|
||||
int (*callback)(const void *pointer,
|
||||
void *data,
|
||||
const char *url,
|
||||
struct t_hashtable *options,
|
||||
struct t_hashtable *output),
|
||||
const void *callback_pointer,
|
||||
void *callback_data);
|
||||
----
|
||||
|
||||
Paramètres :
|
||||
|
||||
* _url_ : URL
|
||||
* _options_ : options pour le transfert d'URL (voir ci-dessous) ; la table de
|
||||
hachage est dupliquée dans la fonction, donc il est possible de la supprimer
|
||||
après cet appel
|
||||
* _timeout_ : timeout pour le transfert d'URL (en millisecondes) : après de délai,
|
||||
le transfert est stoppé (0 signifie pas de limite)
|
||||
* _callback_ : fonction appelée lorsque le transfert est terminé, paramètres et
|
||||
valeur de retour :
|
||||
** _const void *pointer_ : pointeur
|
||||
** _void *data_ : pointeur
|
||||
** _const char *url_ : URL
|
||||
** _struct t_hashtable *options_ : options
|
||||
** _struct t_hashtable *output_ : résultat (les clés et valeurs sont des chaînes),
|
||||
qui peut contenir les clés suivantes :
|
||||
*** _response_code_ : code réponse HTTP
|
||||
*** _headers_ : en-têtes HTTP dans la réponse
|
||||
*** _output_ : sortie standard (défini seulement si _file_out_ n'était pas défini
|
||||
dans les options)
|
||||
*** _error_ : message d'erreur (défini seulement en cas d'erreur)
|
||||
** valeur de retour :
|
||||
*** _WEECHAT_RC_OK_
|
||||
*** _WEECHAT_RC_ERROR_
|
||||
* _callback_pointer_ : pointeur donné à la fonction de rappel lorsqu'elle est
|
||||
appelée par WeeChat
|
||||
* _callback_data_ : pointeur donné à la fonction de rappel lorsqu'elle est
|
||||
appelée par WeeChat; si non NULL, doit avoir été alloué par malloc (ou une
|
||||
fonction similaire) et est automatiquement libéré (par free) lorsque le
|
||||
"hook" est supprimé
|
||||
|
||||
Les options Curl suivantes sont disponibles (voir `+man curl_easy_setopt+` pour
|
||||
une description de chaque option) :
|
||||
|
||||
include::{autogendir}/autogen_api_url_options.fr.adoc[tag=url_options]
|
||||
|
||||
[NOTE]
|
||||
^(1)^ Pour les options avec le type "mask", le format est :
|
||||
"value1+value2+value3" ;
|
||||
pour les options avec le type "list", les éléments de la liste doivent être
|
||||
séparés par un retour à la ligne (`\n`). +
|
||||
^(2)^ Lorsque des constantes sont disponibles, elles doivent être utilisées
|
||||
comme valeur pour l'option.
|
||||
|
||||
Ces deux options supplémentaires (chaînes) sont autorisées, pour le fichier en
|
||||
entrée/sortie :
|
||||
|
||||
[width="100%",cols="2,^1,7",options="header"]
|
||||
|===
|
||||
| Option | Type | Description
|
||||
| file_in | string | fichier à lire pour envoyer avec l'URL (envoi de fichier "post")
|
||||
| file_out | string | écrire l'URL/fichier dans ce fichier (au lieu de la sortie standard)
|
||||
|===
|
||||
|
||||
Valeur de retour :
|
||||
|
||||
* pointeur vers le nouveau "hook", NULL en cas d'erreur
|
||||
|
||||
Exemple en C :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int
|
||||
my_url_cb (const void *pointer, void *data, const char *url,
|
||||
struct t_hashtable *options, struct t_hashtable *output)
|
||||
{
|
||||
weechat_printf (NULL, "response_code : %s", weechat_hashtable_get (output, "response_code"));
|
||||
weechat_printf (NULL, "headers : %s", weechat_hashtable_get (output, "headers"));
|
||||
weechat_printf (NULL, "output : %s", weechat_hashtable_get (output, "output"));
|
||||
weechat_printf (NULL, "error : %s", weechat_hashtable_get (output, "error"));
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/* example 1: sortie dans un fichier */
|
||||
struct t_hashtable *options_url1 = weechat_hashtable_new (8,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL,
|
||||
NULL);
|
||||
if (options_url1)
|
||||
{
|
||||
weechat_hashtable_set (options_url1, "file_out", "/tmp/weechat.org.html");
|
||||
struct t_hook *my_url_hook = weechat_hook_url ("https://weechat.org/",
|
||||
options_url1,
|
||||
20000,
|
||||
&my_url_cb, NULL, NULL);
|
||||
weechat_hashtable_free (options_url1);
|
||||
}
|
||||
|
||||
/* example 2: en-têtes HTTP personnalisés, sortie envoyée à la fonction de rappel */
|
||||
struct t_hashtable *options_url2 = weechat_hashtable_new (8,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL,
|
||||
NULL);
|
||||
if (options_url2)
|
||||
{
|
||||
weechat_hashtable_set (options_url2, "httpheader",
|
||||
"Header1: valeur1\n"
|
||||
"Header2: valeur2");
|
||||
struct t_hook *my_url_hook = weechat_hook_url ("http://localhost:8080/",
|
||||
options_url2,
|
||||
20000,
|
||||
&my_url_cb, NULL, NULL);
|
||||
weechat_hashtable_free (options_url2);
|
||||
}
|
||||
----
|
||||
|
||||
Script (Python) :
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def hook_url(url: str, options: Dict[str, str], timeout: int, callback: str, callback_data: str) -> str: ...
|
||||
|
||||
# exemple
|
||||
def my_url_cb(data: str, url: str, options: Dict[str, str], output: Dict[str, str]) -> int:
|
||||
weechat.prnt("", "output: %s" % output)
|
||||
return weechat.WEECHAT_RC_OK
|
||||
|
||||
# exemple 1 : sortie dans un fichier
|
||||
hook1 = weechat.hook_url("https://weechat.org/",
|
||||
{"file_out": "/tmp/weechat.org.html"},
|
||||
20000, "my_url_cb", "")
|
||||
|
||||
# exemple 2 : en-têtes HTTP personnalisés, sortie envoyée à la fonction de rappel
|
||||
options = {
|
||||
"httpheader": "\n".join([
|
||||
"Header1: valeur1",
|
||||
"Header2: valeur2",
|
||||
]),
|
||||
}
|
||||
hook2 = weechat.hook_url("http://localhost:8080/", options, 20000, "my_url_cb", "")
|
||||
----
|
||||
|
||||
==== hook_connect
|
||||
|
||||
_Mis à jour dans la 1.5, 2.0._
|
||||
@@ -13192,7 +13441,7 @@ Cette fonction n'est pas disponible dans l'API script.
|
||||
|
||||
==== hook_focus
|
||||
|
||||
_Mis à jour dans la 1.5._
|
||||
_Mis à jour dans la 1.5, 4.0.0, 4.1.0._
|
||||
|
||||
Accrocher un focus : évènement souris ou touche du clavier pressée dans le mode
|
||||
"curseur" (mouvement libre du curseur).
|
||||
@@ -13312,16 +13561,22 @@ valeurs sont de type "string") :
|
||||
| _chat_line_message | Message de la ligne.
|
||||
| "Hello world!" | ""
|
||||
|
||||
| _chat_focused_line | Ligne à la position (x,y) _(WeeChat ≥ 4.0.0)_.
|
||||
| _chat_focused_line | Ligne à la position (x, y) _(WeeChat ≥ 4.0.0)_.
|
||||
| "Hello world!" | ""
|
||||
|
||||
| _chat_focused_line_bol | Texte du début de la ligne jusqu'à (x-1, y) _(WeeChat ≥ 4.1.0)_.
|
||||
| "Hello" | ""
|
||||
|
||||
| _chat_focused_line_eol | Texte de (x, y) jusqu'à la fin de la ligne _(WeeChat ≥ 4.1.0)_.
|
||||
| "llo world!" | ""
|
||||
|
||||
| _chat_word | Mot à la position (x,y).
|
||||
| "Hello" | ""
|
||||
|
||||
| _chat_bol | Texte du début de ligne jusqu'à (x-1, y).
|
||||
| _chat_bol | Texte du début du message jusqu'à (x-1, y).
|
||||
| "He" | ""
|
||||
|
||||
| _chat_eol | Texte de (x, y) jusqu'à la fin de la ligne.
|
||||
| _chat_eol | Texte de (x, y) jusqu'à la fin du message.
|
||||
| "llo world!" | ""
|
||||
|
||||
| _bar_name | Nom de la barre.
|
||||
@@ -17949,7 +18204,7 @@ Paramètres :
|
||||
|
||||
Valeur de retour :
|
||||
|
||||
* position (offset) de la variable, 0 en cas d'erreur
|
||||
* position (offset) de la variable, -1 en cas d'erreur
|
||||
|
||||
Exemple en C :
|
||||
|
||||
@@ -18878,7 +19133,7 @@ for key in hash:
|
||||
|
||||
==== hdata_compare
|
||||
|
||||
_WeeChat ≥ 1.9._
|
||||
_WeeChat ≥ 1.9, mis à jour dans la 4.1.0._
|
||||
|
||||
Comparer une variable hdata de deux objets.
|
||||
|
||||
@@ -18894,8 +19149,9 @@ Paramètres :
|
||||
* _hdata_ : pointeur vers le hdata
|
||||
* _pointer1_ : pointeur vers le premier objet WeeChat ou d'une extension
|
||||
* _pointer2_ : pointeur vers le second objet WeeChat ou d'une extension
|
||||
* _name_ : nom de la variable ; pour les tableaux, le nom peut être "N|name" où N
|
||||
est un index dans le tableau (démarrant à 0), par exemple : "2|name"
|
||||
* _name_ : nom de la variable ou chemin vers le nom de la variable ; pour les
|
||||
tableaux, le nom peut être "N|name" où N est un index dans le tableau
|
||||
(démarrant à 0), par exemple : "2|name"
|
||||
* _case_sensitive_ : 1 pour une comparaison tenant compte de la casse pour les chaînes,
|
||||
sinon 0
|
||||
|
||||
@@ -18912,7 +19168,12 @@ Exemple en C :
|
||||
struct t_hdata *hdata = weechat_hdata_get ("buffer");
|
||||
struct t_gui_buffer *buffer1 = weechat_buffer_search ("irc", "libera.#weechat");
|
||||
struct t_gui_buffer *buffer2 = weechat_buffer_search ("irc", "libera.#weechat-fr");
|
||||
weechat_printf (NULL, "comparaison de numéro = %d", weechat_hdata_compare (hdata, buffer1, buffer2, "number", 0));
|
||||
weechat_printf (NULL, "comparaison de numéro de tampon = %d",
|
||||
weechat_hdata_compare (hdata, buffer1, buffer2, "number", 0));
|
||||
weechat_printf (NULL, "comparaison du nombre de lignes = %d",
|
||||
weechat_hdata_compare (hdata, buffer1, buffer2, "own_lines.lines_count", 0));
|
||||
weechat_printf (NULL, "comparaison de variable locale = %d",
|
||||
weechat_hdata_compare (hdata, buffer1, buffer2, "local_variables.myvar", 0));
|
||||
----
|
||||
|
||||
Script (Python) :
|
||||
@@ -18926,7 +19187,9 @@ def hdata_compare(hdata: str, pointer1: str, pointer2: str, name: str, case_sens
|
||||
hdata = weechat.hdata_get("buffer")
|
||||
buffer1 = weechat.buffer_search("irc", "libera.#weechat")
|
||||
buffer2 = weechat.buffer_search("irc", "libera.#weechat-fr")
|
||||
weechat.prnt("", "comparaison de numéro = %d" % weechat.hdata_compare(hdata, buffer1, buffer2, "number", 0))
|
||||
weechat.prnt("", "comparaison de numéro de tampon = %d" % weechat.hdata_compare(hdata, buffer1, buffer2, "number", 0))
|
||||
weechat.prnt("", "comparaison du nombre de lignes = %d" % weechat.hdata_compare(hdata, buffer1, buffer2, "own_lines.lines_count", 0))
|
||||
weechat.prnt("", "comparaison de variable locale = %d" % weechat.hdata_compare(hdata, buffer1, buffer2, "local_variables.myvar", 0))
|
||||
----
|
||||
|
||||
==== hdata_set
|
||||
|
||||
+294
-193
@@ -113,7 +113,7 @@ Le tableau suivant liste les paquets *requis* pour construire WeeChat :
|
||||
| pkg-config |
|
||||
| Détection des bibliothèques installées.
|
||||
|
||||
| libncursesw5-dev ^(2)^ |
|
||||
| libncurses-dev |
|
||||
| Interface ncurses.
|
||||
|
||||
| libcurl4-gnutls-dev |
|
||||
@@ -122,7 +122,7 @@ Le tableau suivant liste les paquets *requis* pour construire WeeChat :
|
||||
| libgcrypt20-dev |
|
||||
| Données sécurisées, authentification IRC SASL.
|
||||
|
||||
| libgnutls28-dev | ≥ 2.2.0 ^(3)^
|
||||
| libgnutls28-dev | ≥ 2.2.0 ^(2)^
|
||||
| Extension IRC : support des connexions TLS, authentification IRC SASL (ECDSA-NIST256P-CHALLENGE). +
|
||||
Extension Relay : support des connexions TLS.
|
||||
|
||||
@@ -130,46 +130,80 @@ Le tableau suivant liste les paquets *requis* pour construire WeeChat :
|
||||
| Extension Logger : compression des fichiers de log qui tournent (gzip). +
|
||||
Extention Relay : compression des messages (WeeChat -> client) avec https://zlib.net/[zlib ^↗^^] (protocole weechat). +
|
||||
Extension Script : lecture du fichier d'index du dépôt (gzip).
|
||||
|
||||
| libzstd-dev | ≥ 0.8.1
|
||||
| Extension Logger : compression des fichiers de log qui tournent. +
|
||||
Extension Relay : compression des messages (WeeChat -> client) avec https://facebook.github.io/zstd/[Zstandard ^↗^^] (protocole weechat).
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ Le nom provient de la distribution GNU/Linux Debian Bookworm, la version
|
||||
et le nom peuvent être différents dans les autres distributions.
|
||||
^(2)^ Il est recommandé de compiler avec libncurses**w**5-dev (le *w* est
|
||||
important). WeeChat peut compiler avec libncurses5-dev, mais ce n'est *PAS*
|
||||
recommandé : vous pourriez avoir des problèmes d'affichage avec les caractères
|
||||
larges. +
|
||||
^(3)^ GnuTLS ≥ 3.0.21 est requis pour l'authentification SASL avec le mécanisme
|
||||
et le nom peuvent être différents dans les autres distributions. +
|
||||
^(2)^ GnuTLS ≥ 3.0.21 est requis pour l'authentification SASL avec le mécanisme
|
||||
ECDSA-NIST256P-CHALLENGE.
|
||||
|
||||
Le tableau suivant liste les paquets optionnels pour compiler WeeChat :
|
||||
|
||||
[width="100%",cols="5,^3,.^15",options="header"]
|
||||
|===
|
||||
| Paquet ^(1)^ | Version | Fonctionnalités
|
||||
| compilateur {cpp} (pass:[g++ / clang++]) | | Construction et lancement des tests, extension JavaScript.
|
||||
| gettext | | Internationalisation (traduction des messages ; la langue de base est l'anglais).
|
||||
| ca-certificates | | Certificats pour les connexions TLS.
|
||||
| libaspell-dev / libenchant-dev | | Extension spell.
|
||||
| python3-dev | ≥ 3.0 | Extension python.
|
||||
| libperl-dev | | Extension perl.
|
||||
| ruby3.1, ruby3.1-dev | ≥ 1.9.1 | Extension ruby.
|
||||
| liblua5.4-dev | | Extension lua.
|
||||
| tcl-dev | ≥ 8.5 | Extension tcl.
|
||||
| guile-3.0-dev | ≥ 2.0 | Extension guile (scheme).
|
||||
| libv8-dev | ≤ 3.24.3 | Extension javascript.
|
||||
| php-dev | ≥ 7.0 | Extension PHP.
|
||||
| libphp-embed | ≥ 7.0 | Extension PHP.
|
||||
| libxml2-dev | | Extension PHP.
|
||||
| libargon2-dev | | Extension PHP (si PHP ≥ 7.2).
|
||||
| libsodium-dev | | Extension PHP (si PHP ≥ 7.2).
|
||||
| asciidoctor | ≥ 1.5.4 | Construction de la page man et de la documentation.
|
||||
| ruby-pygments.rb | | Construction de la documentation.
|
||||
| libcpputest-dev | ≥ 3.4 | Construction et lancement des tests.
|
||||
| Paquet ^(1)^ | Version | Fonctionnalités
|
||||
|
||||
| compilateur {cpp} (pass:[g++ / clang++]) |
|
||||
| Construction et lancement des tests, extension JavaScript.
|
||||
|
||||
| gettext |
|
||||
| Internationalisation (traduction des messages ; la langue de base est l'anglais).
|
||||
|
||||
| ca-certificates |
|
||||
| Certificats pour les connexions TLS.
|
||||
|
||||
| libzstd-dev | ≥ 0.8.1
|
||||
| Extension Logger : compression des fichiers de log qui tournent (zstandard). +
|
||||
Extension Relay : compression des messages (WeeChat -> client) avec https://facebook.github.io/zstd/[Zstandard ^↗^^] (protocole weechat).
|
||||
|
||||
| libaspell-dev / libenchant-dev |
|
||||
| Extension spell.
|
||||
|
||||
| python3-dev | ≥ 3.0
|
||||
| Extension python.
|
||||
|
||||
| libperl-dev |
|
||||
| Extension perl.
|
||||
|
||||
| ruby3.1, ruby3.1-dev | ≥ 1.9.1
|
||||
| Extension ruby.
|
||||
|
||||
| liblua5.4-dev |
|
||||
| Extension lua.
|
||||
|
||||
| tcl-dev | ≥ 8.5
|
||||
| Extension tcl.
|
||||
|
||||
| guile-3.0-dev | ≥ 2.0
|
||||
| Extension guile (scheme).
|
||||
|
||||
| libv8-dev | ≤ 3.24.3
|
||||
| Extension javascript.
|
||||
|
||||
| php-dev | ≥ 7.0
|
||||
| Extension PHP.
|
||||
|
||||
| libphp-embed | ≥ 7.0
|
||||
| Extension PHP.
|
||||
|
||||
| libxml2-dev |
|
||||
| Extension PHP.
|
||||
|
||||
| libargon2-dev |
|
||||
| Extension PHP (si PHP ≥ 7.2).
|
||||
|
||||
| libsodium-dev |
|
||||
| Extension PHP (si PHP ≥ 7.2).
|
||||
|
||||
| asciidoctor | ≥ 1.5.4
|
||||
| Construction de la page man et de la documentation.
|
||||
|
||||
| ruby-pygments.rb |
|
||||
| Construction de la documentation.
|
||||
|
||||
| libcpputest-dev | ≥ 3.4
|
||||
| Construction et lancement des tests.
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -209,7 +243,7 @@ $ make install
|
||||
|
||||
Des options peuvent être utilisées pour CMake, avec le format : `-DOPTION=VALUE`.
|
||||
|
||||
Liste des options couramment utilisées :
|
||||
Liste des options disponibles :
|
||||
|
||||
[width="100%",cols="3m,3,3m,10",options="header"]
|
||||
|===
|
||||
@@ -263,6 +297,9 @@ Liste des options couramment utilisées :
|
||||
| ENABLE_GUILE | `ON`, `OFF` | ON
|
||||
| Compiler <<scripting_plugins,l'extension Guile>> (Scheme).
|
||||
|
||||
| ENABLE_HEADLESS | `ON`, `OFF` | ON
|
||||
| Compiler le binaire sans interface (« headless »).
|
||||
|
||||
| ENABLE_IRC | `ON`, `OFF` | ON
|
||||
| Compiler <<irc,l'extension IRC>>.
|
||||
|
||||
@@ -321,6 +358,9 @@ Liste des options couramment utilisées :
|
||||
| ENABLE_XFER | `ON`, `OFF` | ON
|
||||
| Compiler <<xfer,l'extension Xfer>>.
|
||||
|
||||
| ENABLE_ZSTD | `ON`, `OFF` | ON
|
||||
| Activer la compression https://facebook.github.io/zstd/[Zstandard ^↗^^].
|
||||
|
||||
| ENABLE_TESTS | `ON`, `OFF` | OFF
|
||||
| Compiler les tests.
|
||||
|
||||
@@ -913,6 +953,8 @@ Autres objets (non utilisés dans des barres par défaut) :
|
||||
| buffer_short_name | `#test` | Nom court du tampon courant.
|
||||
| buflist2 | `1.weechat` | Liste des tampons, deuxième objet de barre (voir l'option <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
| buflist3 | `1.weechat` | Liste des tampons, troisième objet de barre (voir l'option <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
| buflist4 | `1.weechat` | Liste des tampons, quatrième objet de barre (voir l'option <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
| buflist5 | `1.weechat` | Liste des tampons, cinquième objet de barre (voir l'option <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
| fset | `+buflist.look.sort: …+` | Aide sur l'option sélectionnée dans le tampon fset.
|
||||
| irc_channel | `#test` | Nom de canal IRC courant.
|
||||
| irc_host | `+user@host.com+` | Hôte sur IRC.
|
||||
@@ -1358,8 +1400,8 @@ Par défaut WeeChat et ses extensions par défaut interprètent ces variables :
|
||||
|
||||
| filter
|
||||
| toute chaîne
|
||||
| Filtre défini sur certains tampons comme `/fset`, `/server raw` (irc) et
|
||||
`/script`.
|
||||
| Filtre défini sur certains tampons comme `/fset`, `/list` (irc),
|
||||
`/server raw` (irc) et `/script`.
|
||||
|
||||
| host
|
||||
| toute chaîne
|
||||
@@ -1448,8 +1490,8 @@ variables locales.
|
||||
=== Liste des tampons
|
||||
|
||||
L'extension Buflist affiche une liste des tampons dans un objet de barre appelé
|
||||
"buflist" (deux autres objets de barre "buflist2" et "buflist3" sont également
|
||||
disponibles). +
|
||||
"buflist" (quatre autres objets de barre "buflist2", "buflist3", "buflist4" et
|
||||
"buflist5" sont également disponibles). +
|
||||
Une barre par défaut "buflist" est créée au démarrage avec cet objet de barre.
|
||||
|
||||
[[buflist_commands]]
|
||||
@@ -1473,6 +1515,23 @@ Options :
|
||||
|
||||
include::{autogendir}/autogen_user_options.fr.adoc[tag=buflist_options]
|
||||
|
||||
[[cursor_mode]]
|
||||
=== Mode curseur
|
||||
|
||||
Le mode curseur vous permet de déplacer librement le curseur partout sur l'écran,
|
||||
dans la zone de discussion et les barres, et vous permet d'effectuer des actions
|
||||
à la position donnée. +
|
||||
Vous pouvez entrer dans le mode curseur avec la commande `/cursor` ou avec un
|
||||
clic du milieu sur la souris (la souris doit avoir été activée avec la touche
|
||||
kbd:[Alt+m] ou la commande `/mouse enable`).
|
||||
|
||||
L'utilisation typique est de citer des messages (zone de discussion) ou d'interagir
|
||||
avec des pseudos (barre avec la liste de pseudos).
|
||||
|
||||
Voir la commande <<command_weechat_cursor,/cursor>> et
|
||||
<<key_bindings_cursor_context,les touches du contexte curseur>> pour la liste
|
||||
des actions que vous pouvez effectuer dans ce mode.
|
||||
|
||||
[[key_bindings]]
|
||||
== Raccourcis clavier
|
||||
|
||||
@@ -1568,6 +1627,15 @@ Ils peuvent être modifiés et de nouveaux peuvent être ajoutés avec la comman
|
||||
| kbd:[Ctrl+↓] | Rappeler la commande suivante dans l'historique global (commun à tous les tampons). | `+/input history_global_next+`
|
||||
|===
|
||||
|
||||
[[key_bindings_cmdline_system]]
|
||||
==== Système
|
||||
|
||||
[width="100%",cols="^.^3,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Touche | Description | Commande
|
||||
| kbd:[Ctrl+z] | Suspendre le processus WeeChat. | `+/sys suspend+`
|
||||
|===
|
||||
|
||||
[[key_bindings_buffers]]
|
||||
=== Tampons
|
||||
|
||||
@@ -1698,31 +1766,37 @@ pressé pour chercher du texte dans le tampon).
|
||||
=== Contexte curseur
|
||||
|
||||
Ces touches sont utilisées dans le contexte "cursor" (mouvement libre du curseur
|
||||
à l'écran).
|
||||
à l'écran), voir le <<cursor_mode,Mode curseur>>.
|
||||
|
||||
[width="100%",cols="^.^3,^.^2,.^7,.^7",options="header"]
|
||||
|===
|
||||
| Touche | Zone | Description | Commande
|
||||
| kbd:[↑] | - | Déplacer le curseur d'une ligne vers le haut. | `+/cursor move up+`
|
||||
| kbd:[↓] | - | Déplacer le curseur d'une ligne vers le bas. | `+/cursor move down+`
|
||||
| kbd:[←] | - | Déplacer le curseur d'une colonne vers la gauche. | `+/cursor move left+`
|
||||
| kbd:[→] | - | Déplacer le curseur d'une colonne vers la droite. | `+/cursor move right+`
|
||||
| kbd:[Alt+↑] | - | Déplacer le curseur vers la zone au dessus. | `+/cursor move area_up+`
|
||||
| kbd:[Alt+↓] | - | Déplacer le curseur vers la zone en dessous. | `+/cursor move area_down+`
|
||||
| kbd:[Alt+←] | - | Déplacer le curseur vers la zone sur la gauche. | `+/cursor move area_left+`
|
||||
| kbd:[Alt+→] | - | Déplacer le curseur vers la zone sur la droite. | `+/cursor move area_right+`
|
||||
| kbd:[m] | chat | Citer le message. | `+hsignal:chat_quote_message;/cursor stop+`
|
||||
| kbd:[l] | chat | Citer la ligne ciblée. | `+hsignal:chat_quote_focused_line;/cursor stop+`
|
||||
| kbd:[q] | chat | Citer le préfixe + le message. | `+hsignal:chat_quote_prefix_message;/cursor stop+`
|
||||
| kbd:[Q] | chat | Citer l'heure + le préfixe + le message. | `+hsignal:chat_quote_time_prefix_message;/cursor stop+`
|
||||
| kbd:[b] | liste des pseudos | Bannir le pseudo. | `+/window ${_window_number};/ban ${nick}+`
|
||||
| kbd:[k] | liste des pseudos | Retirer par la force le pseudo. | `+/window ${_window_number};/kick ${nick}+`
|
||||
| kbd:[K] | liste des pseudos | Retirer par la force et bannir le pseudo. | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| kbd:[q] | liste des pseudos | Ouvrir une discussion avec le pseudo. | `+/window ${_window_number};/query ${nick};/cursor stop+`
|
||||
| kbd:[w] | liste des pseudos | Effectuer un whois sur le pseudo. | `+/window ${_window_number};/whois ${nick}+`
|
||||
| Touche | Zone | Description | Commande
|
||||
| kbd:[↑] | - | Déplacer le curseur d'une ligne vers le haut. | `+/cursor move up+`
|
||||
| kbd:[↓] | - | Déplacer le curseur d'une ligne vers le bas. | `+/cursor move down+`
|
||||
| kbd:[←] | - | Déplacer le curseur d'une colonne vers la gauche. | `+/cursor move left+`
|
||||
| kbd:[→] | - | Déplacer le curseur d'une colonne vers la droite. | `+/cursor move right+`
|
||||
| kbd:[Alt+↑] | - | Déplacer le curseur vers la première ligne de la zone. | `+/cursor move edge_top+`
|
||||
| kbd:[Alt+↓] | - | Déplacer le curseur vers la dernière ligne de la zone. | `+/cursor move edge_bottom+`
|
||||
| kbd:[Alt+←] | - | Déplacer le curseur vers la première colonne de la zone. | `+/cursor move edge_left+`
|
||||
| kbd:[Alt+→] | - | Déplacer le curseur vers la dernière colonne de la zone. | `+/cursor move edge_right+`
|
||||
| kbd:[Alt+Home] | - | Déplacer le curseur vers le coin supérieur gauche de la zone. | `+/cursor move top_left+`
|
||||
| kbd:[Alt+End] | - | Déplacer le curseur vers la coin inférieur droit de la zone. | `+/cursor move bottom_right+`
|
||||
| kbd:[Alt+Shift+↑] | - | Déplacer le curseur vers la zone au dessus. | `+/cursor move area_up+`
|
||||
| kbd:[Alt+Shift+↓] | - | Déplacer le curseur vers la zone en dessous. | `+/cursor move area_down+`
|
||||
| kbd:[Alt+Shift+←] | - | Déplacer le curseur vers la zone sur la gauche. | `+/cursor move area_left+`
|
||||
| kbd:[Alt+Shift+→] | - | Déplacer le curseur vers la zone sur la droite. | `+/cursor move area_right+`
|
||||
| kbd:[m] | chat | Citer le message. | `+hsignal:chat_quote_message;/cursor stop+`
|
||||
| kbd:[l] | chat | Citer la ligne ciblée. | `+hsignal:chat_quote_focused_line;/cursor stop+`
|
||||
| kbd:[q] | chat | Citer le préfixe + le message. | `+hsignal:chat_quote_prefix_message;/cursor stop+`
|
||||
| kbd:[Q] | chat | Citer l'heure + le préfixe + le message. | `+hsignal:chat_quote_time_prefix_message;/cursor stop+`
|
||||
| kbd:[b] | liste des pseudos | Bannir le pseudo. | `+/window ${_window_number};/ban ${nick}+`
|
||||
| kbd:[k] | liste des pseudos | Retirer par la force le pseudo. | `+/window ${_window_number};/kick ${nick}+`
|
||||
| kbd:[K] | liste des pseudos | Retirer par la force et bannir le pseudo. | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| kbd:[q] | liste des pseudos | Ouvrir une discussion avec le pseudo. | `+/window ${_window_number};/query ${nick};/cursor stop+`
|
||||
| kbd:[w] | liste des pseudos | Effectuer un whois sur le pseudo. | `+/window ${_window_number};/whois ${nick}+`
|
||||
| kbd:[Enter] +
|
||||
kbd:[Ctrl+j] +
|
||||
kbd:[Ctrl+m] | - | Arrêter le mode curseur ("cursor"). | `+/cursor stop+`
|
||||
kbd:[Ctrl+m] | - | Arrêter le mode curseur ("cursor"). | `+/cursor stop+`
|
||||
|===
|
||||
|
||||
[[key_bindings_mouse]]
|
||||
@@ -1733,50 +1807,60 @@ avec la touche kbd:[Alt+m] (commande : `+/mouse toggle+`).
|
||||
|
||||
[width="100%",cols="^.^3,^.^3,^.^3,.^8,.^8",options="header"]
|
||||
|===
|
||||
| Bouton/Roulette ^(1)^ | Geste | Zone | Description | Commande
|
||||
| ◾◽◽ | - | chat | Aller à la fenêtre. | `+/window ${_window_number}+`
|
||||
| ◾◽◽ | left | chat | Aller au tampon précédent. | `+/window ${_window_number};/buffer +1+`
|
||||
| ◾◽◽ | right | chat | Aller au tampon suivant. | `+/window ${_window_number};/buffer +1+`
|
||||
| ◾◽◽ | left (long) | chat | Aller au premier tampon. | `+/window ${_window_number};/buffer 1+`
|
||||
| ◾◽◽ | right (long) | chat | Aller au dernier tampon. | `+/window ${_window_number};/buffer ++`
|
||||
| kbd:[▲] | - | chat | Monter de quelques lignes dans l'historique du tampon. | `+/window scroll_up -window ${_window_number}+`
|
||||
| kbd:[▼] | - | chat | Descendre de quelques lignes dans l'historique du tampon. | `+/window scroll_down -window ${_window_number}+`
|
||||
| kbd:[Ctrl+▲] | - | chat | Faire défiler horizontalement vers la gauche. | `+/window scroll_horiz -window ${_window_number} -10%+`
|
||||
| kbd:[Ctrl+▼] | - | chat | Faire défiler horizontalement vers la droite. | `+/window scroll_horiz -window ${_window_number} +10%+`
|
||||
| kbd:[▲] | - | chat : tampon fset | Monter de cinq lignes dans le tampon fset. | `+/fset -up 5+`
|
||||
| kbd:[▼] | - | chat : tampon fset | Descendre de cinq lignes dans le tampon fset. | `+/fset -down 5+`
|
||||
| ◾◽◽ | - | chat : tampon fset | Sélectionner la ligne dans le tampon fset. | `+/window ${_window_number};/fset -go ${_chat_line_y}+`
|
||||
| ◽◽◾ | - | chat : tampon fset | Basculer le booléen (on/off) ou éditer la valeur de l'option. | `+hsignal:fset_mouse+`
|
||||
| ◽◽◾ | left | chat : tampon fset | Décrémenter la valeur de l'entier/couleur, définir/ajouter à la valeur pour les autres types. | `+hsignal:fset_mouse+`
|
||||
| ◽◽◾ | right | chat : tampon fset | Incrémenter la valeur de l'entier/couleur, définir/ajouter à la valeur pour les autres types. | `+hsignal:fset_mouse+`
|
||||
| ◽◽◾ | up / down | chat : tampon fset | Marquer/démarquer de multiples options. | `+hsignal:fset_mouse+`
|
||||
| kbd:[▲] | - | chat : tampon script | Monter de 5 lignes dans le tampon script. | `+/script up 5+`
|
||||
| kbd:[▼] | - | chat : tampon script | Descendre de 5 lignes dans le tampon script. | `+/script down 5+`
|
||||
| ◾◽◽ | - | chat : tampon script | Sélectionner la ligne dans le tampon script. | `+/script go ${_chat_line_y}+`
|
||||
| ◽◽◾ | - | chat : tampon script | Installer/supprimer un script. | `+/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| ◾◽◽ | up / left | buflist | Déplacer le tampon vers un numéro inférieur. | Signal `+buflist_mouse+`.
|
||||
| ◾◽◽ | down / right | buflist | Déplacer le tampon vers un numéro supérieur. | Signal `+buflist_mouse+`.
|
||||
| ◾◽◽ | - | buflist | Aller au tampon (tampon précédent dans la liste des tampons visités si le tampon est le courant). | Signal `+buflist_mouse+`.
|
||||
| ◽◽◾ | - | buflist | Aller au tampon suivant dans la liste des tampons visités si le tampon est le courant. | Signal `+buflist_mouse+`.
|
||||
| kbd:[Ctrl+▲] | - | buflist | Aller au tampon précédent. | Signal `+buflist_mouse+`.
|
||||
| kbd:[Ctrl+▼] | - | buflist | Aller au tampon suivant. | Signal `+buflist_mouse+`.
|
||||
| ◾◽◽ | up | liste des pseudos | Monter d'une page dans la liste des pseudos. | `+/bar scroll nicklist ${_window_number} -100%+`
|
||||
| ◾◽◽ | down | liste des pseudos | Descendre d'une page dans la liste des pseudos. | `+/bar scroll nicklist ${_window_number} +100%+`
|
||||
| ◾◽◽ | up (long) | liste des pseudos | Aller au début de la liste des pseudos. | `+/bar scroll nicklist ${_window_number} b+`
|
||||
| ◾◽◽ | down (long) | liste des pseudos | Aller à la fin de la liste des pseudos. | `+/bar scroll nicklist ${_window_number} e+`
|
||||
| ◾◽◽ | - | liste des pseudos | Ouvrir une discussion avec le pseudo. | `+/window ${_window_number};/query ${nick}+`
|
||||
| ◽◽◾ | - | liste des pseudos | Effectuer un whois sur le pseudo. | `+/window ${_window_number};/whois ${nick}+`
|
||||
| ◾◽◽ | left | liste des pseudos | Retirer par la force le pseudo. | `+/window ${_window_number};/kick ${nick}+`
|
||||
| ◾◽◽ | left (long) | liste des pseudos | Retirer par la force et bannir le pseudo. | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| ◽◽◾ | left | liste des pseudos | Bannir le pseudo. | `+/window ${_window_number};/ban ${nick}+`
|
||||
| ◽◽◾ | - | ligne de commande | Capturer un évènement de la souris et insérer son code sur la ligne de commande. | `+/input grab_mouse_area+`
|
||||
| kbd:[▲] | - | toute barre | Faire défiler la barre de -20%. | `+/bar scroll ${_bar_name} ${_window_number} -20%+`
|
||||
| kbd:[▼] | - | toute barre | Faire défiler la barre de +20%. | `+/bar scroll ${_bar_name} ${_window_number} +20%+`
|
||||
| ◽◾◽ | - | n'importe où | Démarrer le mode curseur ("cursor") à ce point. | `+/cursor go ${_x},${_y}+`
|
||||
| Bouton/Roulette ^(1)^ | Geste | Zone | Description | Commande
|
||||
| kbd:[■ □ □] | - | chat | Aller à la fenêtre. | `+/window ${_window_number}+`
|
||||
| kbd:[■ □ □] | gauche | chat | Aller au tampon précédent. | `+/window ${_window_number};/buffer +1+`
|
||||
| kbd:[■ □ □] | droit | chat | Aller au tampon suivant. | `+/window ${_window_number};/buffer +1+`
|
||||
| kbd:[■ □ □] | gauche (long) | chat | Aller au premier tampon. | `+/window ${_window_number};/buffer 1+`
|
||||
| kbd:[■ □ □] | droit (long) | chat | Aller au dernier tampon. | `+/window ${_window_number};/buffer ++`
|
||||
| kbd:[▲] | - | chat | Monter de quelques lignes dans l'historique du tampon. | `+/window scroll_up -window ${_window_number}+`
|
||||
| kbd:[▼] | - | chat | Descendre de quelques lignes dans l'historique du tampon. | `+/window scroll_down -window ${_window_number}+`
|
||||
| kbd:[Ctrl+▲] | - | chat | Faire défiler horizontalement vers la gauche. | `+/window scroll_horiz -window ${_window_number} -10%+`
|
||||
| kbd:[Ctrl+▼] | - | chat | Faire défiler horizontalement vers la droite. | `+/window scroll_horiz -window ${_window_number} +10%+`
|
||||
| kbd:[▲] | - | chat : tampon fset | Monter de cinq lignes dans le tampon fset. | `+/fset -up 5+`
|
||||
| kbd:[▼] | - | chat : tampon fset | Descendre de cinq lignes dans le tampon fset. | `+/fset -down 5+`
|
||||
| kbd:[■ □ □] | - | chat : tampon fset | Sélectionner la ligne dans le tampon fset. | `+/window ${_window_number};/fset -go ${fset_option_index}+`
|
||||
| kbd:[□ □ ■] | - | chat : tampon fset | Basculer le booléen (on/off) ou éditer la valeur de l'option. | `+hsignal:fset_mouse+`
|
||||
| kbd:[□ □ ■] | gauche | chat : tampon fset | Décrémenter la valeur de l'entier/couleur/énuméré, définir/ajouter à la valeur pour les autres types. | `+hsignal:fset_mouse+`
|
||||
| kbd:[□ □ ■] | droit | chat : tampon fset | Incrémenter la valeur de l'entier/couleur/énuméré, définir/ajouter à la valeur pour les autres types. | `+hsignal:fset_mouse+`
|
||||
| kbd:[□ □ ■] | haut / bas | chat : tampon fset | Marquer/démarquer de multiples options. | `+hsignal:fset_mouse+`
|
||||
| kbd:[▲] | - | chat : tampon /list | Monter de cinq lignes dans le tampon /list. | `+/list -up 5+`
|
||||
| kbd:[▼] | - | chat : tampon /list | Descendre de cinq lignes dans le tampon /list. | `+/list -down 5+`
|
||||
| kbd:[■ □ □] | - | chat : tampon /list | Sélectionner la ligne dans le tampon /list. | `+/window ${_window_number};/list -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat : tampon /list | Rejoindre le canal IRC sur la ligne sélectionnée. | `+hsignal:irc_list_mouse+`
|
||||
| kbd:[▲] | - | chat : tampon script | Monter de 5 lignes dans le tampon script. | `+/script up 5+`
|
||||
| kbd:[▼] | - | chat : tampon script | Descendre de 5 lignes dans le tampon script. | `+/script down 5+`
|
||||
| kbd:[■ □ □] | - | chat : tampon script | Sélectionner la ligne dans le tampon script. | `+/script go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat : tampon script | Installer/supprimer un script. | `+/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[■ □ □] | haut / gauche | buflist | Déplacer le tampon vers un numéro inférieur. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | bas / droit | buflist | Déplacer le tampon vers un numéro supérieur. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | - | buflist | Aller au tampon (tampon précédent dans la liste des tampons visités si le tampon est le courant). | Signal `+buflist_mouse+`.
|
||||
| kbd:[□ □ ■] | - | buflist | Aller au tampon suivant dans la liste des tampons visités si le tampon est le courant. | Signal `+buflist_mouse+`.
|
||||
| kbd:[Ctrl+▲] | - | buflist | Aller au tampon précédent. | Signal `+buflist_mouse+`.
|
||||
| kbd:[Ctrl+▼] | - | buflist | Aller au tampon suivant. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | haut | liste des pseudos | Monter d'une page dans la liste des pseudos. | `+/bar scroll nicklist ${_window_number} -100%+`
|
||||
| kbd:[■ □ □] | bas | liste des pseudos | Descendre d'une page dans la liste des pseudos. | `+/bar scroll nicklist ${_window_number} +100%+`
|
||||
| kbd:[■ □ □] | haut (long) | liste des pseudos | Aller au début de la liste des pseudos. | `+/bar scroll nicklist ${_window_number} b+`
|
||||
| kbd:[■ □ □] | bas (long) | liste des pseudos | Aller à la fin de la liste des pseudos. | `+/bar scroll nicklist ${_window_number} e+`
|
||||
| kbd:[■ □ □] | - | liste des pseudos | Ouvrir une discussion avec le pseudo. | `+/window ${_window_number};/query ${nick}+`
|
||||
| kbd:[□ □ ■] | - | liste des pseudos | Effectuer un whois sur le pseudo. | `+/window ${_window_number};/whois ${nick}+`
|
||||
| kbd:[■ □ □] | gauche | liste des pseudos | Retirer par la force le pseudo. | `+/window ${_window_number};/kick ${nick}+`
|
||||
| kbd:[■ □ □] | gauche (long) | liste des pseudos | Retirer par la force et bannir le pseudo. | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| kbd:[□ □ ■] | gauche | liste des pseudos | Bannir le pseudo. | `+/window ${_window_number};/ban ${nick}+`
|
||||
| kbd:[□ □ ■] | - | ligne de commande | Capturer un évènement de la souris et insérer son code sur la ligne de commande. | `+/input grab_mouse_area+`
|
||||
| kbd:[▲] | - | toute barre | Faire défiler la barre de -20%. | `+/bar scroll ${_bar_name} ${_window_number} -20%+`
|
||||
| kbd:[▼] | - | toute barre | Faire défiler la barre de +20%. | `+/bar scroll ${_bar_name} ${_window_number} +20%+`
|
||||
| kbd:[□ ■ □] | - | n'importe où | Démarrer le mode curseur ("cursor") à ce point. | `+/cursor go ${_x},${_y}+`
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ kbd:[▲] et kbd:[▼] sont la roulette vers le haut et le bas.
|
||||
^(1)^ Boutons : +
|
||||
kbd:[◼ □ □] : clic sur le bouton de gauche +
|
||||
kbd:[□ ◼ □] : clic sur le bouton du milieu +
|
||||
kbd:[□ □ ◼] : clic sur le bouton de droite +
|
||||
Roulette : +
|
||||
kbd:[▲] : roulette vers le haut +
|
||||
kbd:[▼] : roulette vers le bas
|
||||
|
||||
[[key_bindings_fset_buffer]]
|
||||
=== Tampon fset
|
||||
@@ -1796,8 +1880,8 @@ Ces touches et actions sont utilisées sur le tampon fset
|
||||
| kbd:[F11] | `pass:[<]` | Faire défiler horizontalement vers la gauche. | `+/fset -left+`
|
||||
| kbd:[F12] | `pass:[>]` | Faire défiler horizontalement vers la droite. | `+/fset -right+`
|
||||
| kbd:[Alt+Space] | `t` | Basculer la valeur booléenne. | `+/fset -toggle+`
|
||||
| kbd:[Alt+-] | `-` | Soustraire 1 de la valeur de l'entier/couleur, définir la valeur pour les autres types. | `+/fset -add -1+`
|
||||
| kbd:[Alt++] | `+` | Ajouter 1 à la valeur de l'entier/couleur, ajouter à la valeur pour les autres types. | `+/fset -add 1+`
|
||||
| kbd:[Alt+-] | `-` | Soustraire 1 de la valeur de l'entier/couleur/énuméré, définir la valeur pour les autres types. | `+/fset -add -1+`
|
||||
| kbd:[Alt++] | `+` | Ajouter 1 à la valeur de l'entier/couleur/énuméré, ajouter à la valeur pour les autres types. | `+/fset -add 1+`
|
||||
| kbd:[Alt+f], kbd:[Alt+r] | `r` | Réinitialiser la valeur. | `+/fset -reset+`
|
||||
| kbd:[Alt+f], kbd:[Alt+u] | `u` | Supprimer/réinitialiser la valeur. | `+/fset -unset+`
|
||||
| kbd:[Alt+Enter] | `s` | Définir la valeur. | `+/fset -set+`
|
||||
@@ -1811,8 +1895,8 @@ Ces touches et actions sont utilisées sur le tampon fset
|
||||
| kbd:[Ctrl+l] (`L`) | | Rafraîchir les options et l'écran entier. | `+/fset -refresh+`
|
||||
| | `$` | Rafraîchir les options (garder les options marquées). |
|
||||
| | `$$` | Rafraîchir les options (démarquer toutes les options). |
|
||||
| kbd:[Alt+p] | | Activer/désactiver la description des options d'extensions (`pass:[plugins.desc.*]`). | `+/mute /set fset.look.show_plugins_desc toggle+`
|
||||
| kbd:[Alt+v] | | Activer/désactiver la barre d'aide. | `+/bar toggle fset+`
|
||||
| kbd:[Alt+p] | `p` | Activer/désactiver la description des options d'extensions (`pass:[plugins.desc.*]`). | `+/mute /set fset.look.show_plugins_desc toggle+`
|
||||
| kbd:[Alt+v] | `v` | Activer/désactiver la barre d'aide. | `+/bar toggle fset+`
|
||||
| | `s:x,y` | Trier les options par les champs x,y (voir l'option <<option_fset.look.sort,fset.look.sort>>). | `+/mute /set fset.look.sort x,y+`
|
||||
| | `s:` | Réinitialiser le tri à sa valeur par défaut (voir l'option <<option_fset.look.sort,fset.look.sort>>). | `+/mute /unset fset.look.sort+`
|
||||
| | `w:xxx` | Exporter les options dans le fichier "xxx". | `+/fset -export xxx+`
|
||||
@@ -1825,6 +1909,40 @@ Ces touches et actions sont utilisées sur le tampon fset
|
||||
[NOTE]
|
||||
^(1)^ L'action doit être tapée comme entrée dans la ligne de commande, suivie de kbd:[Enter].
|
||||
|
||||
[[key_bindings_irc_list_buffer]]
|
||||
=== Tampon IRC /list
|
||||
|
||||
Ces touches et actions sont utilisées sur le tampon IRC /list
|
||||
(voir la commande <<command_irc_list,/list>>).
|
||||
|
||||
[width="100%",cols="^.^3,^.^2,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Touche | Action ^(1)^ | Description | Commande
|
||||
| kbd:[↑] | | Monter d'une ligne. | `+/list -up+`
|
||||
| kbd:[↓] | | Descendre d'une ligne. | `+/list -down+`
|
||||
| kbd:[PgUp] | | Monter d'une page. | `+/window page_up+`
|
||||
| kbd:[PgDn] | | Descendre d'une page. | `+/window page_down+`
|
||||
| kbd:[Alt+Home] | `pass:[<<]` | Aller à la première ligne. | `+/list -go 0+`
|
||||
| kbd:[Alt+End] | `pass:[>>]` | Aller à la dernière ligne. | `+/list -go end+`
|
||||
| kbd:[F11] | `pass:[<]` | Faire défiler horizontalement vers la gauche. | `+/list -left+`
|
||||
| kbd:[F12] | `pass:[>]` | Faire défiler horizontalement vers la droite. | `+/list -right+`
|
||||
| kbd:[Ctrl+j] | `j` | Rejoindre le canal IRC sur la ligne sélectionnée. | `+/list -join+`
|
||||
| | `xxx` | Afficher seulement les canaux avec "xxx" dans le nom ou le titre (insensible à la casse). |
|
||||
| | `n:xxx` | Afficher seulement les canaux avec "xxx" dans le nom (insensible à la casse). |
|
||||
| | `t:xxx` | Afficher seulement les canaux avec "xxx" dans le titre (insensible à la casse). |
|
||||
| | `u:n` | Afficher seulement les canaux avec au moins "n" utilisateurs. |
|
||||
| | `u:>n` | Afficher seulement les canaux avec plus de "n" utilisateurs. |
|
||||
| | `u:<n` | Afficher seulement les canaux avec moins de "n" utilisateurs. |
|
||||
| | `c:xxx` | Afficher seulement les canaux qui correspondent à la condition évaluée "xxx", en utilisant les variables suivantes : name, name2, users, topic. |
|
||||
| | `s:x,y` | Trier les canaux par les champs x,y (voir la commande <<command_irc_list,/list>>). |
|
||||
| | `s:` | Réinitialiser le tri à sa valeur par défaut (voir la commande <<command_irc_list,/list>>). |
|
||||
| | `$` | Rafraîchir la liste (relancer la commande <<command_irc_list,/list>>). |
|
||||
| | `q` | Fermer le tampon. | `+/buffer close+`
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ L'action doit être tapée comme entrée dans la ligne de commande, suivie de kbd:[Enter].
|
||||
|
||||
[[key_bindings_script_buffer]]
|
||||
=== Tampon script
|
||||
|
||||
@@ -1834,17 +1952,22 @@ Ces touches et actions sont utilisées sur le tampon script
|
||||
[width="100%",cols="^.^3,^.^2,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Touche | Action ^(1)^ | Description | Commande
|
||||
| kbd:[↑] | | Move one line up. | `+/script up+`
|
||||
| kbd:[↓] | | Move one line down. | `+/script down+`
|
||||
| kbd:[PgUp] | | Move one page up. | `+/window page_up+`
|
||||
| kbd:[PgDn] | | Move one page down. | `+/window page_down+`
|
||||
| kbd:[Alt+i] | `i` | Install script. | `+/script install+`
|
||||
| kbd:[Alt+r] | `r` | Remove script. | `+/script remove+`
|
||||
| kbd:[Alt+l] (`L`) | `l` | Load script. | `+/script load+`
|
||||
| kbd:[Alt+u] | `u` | Unload script. | `+/script unload+`
|
||||
| kbd:[Alt+Shift+A] | `A` | Autoload script. | `+/script toggleautoload+`
|
||||
| kbd:[Alt+h] | `h` | Hold/unhold script. | `+/script hold+`
|
||||
| kbd:[Alt+v] | `v` | View script. | `+/script show+`
|
||||
| kbd:[↑] | | Monter d'une ligne. | `+/script up+`
|
||||
| kbd:[↓] | | Descendre d'une ligne. | `+/script down+`
|
||||
| kbd:[PgUp] | | Monter d'une page. | `+/window page_up+`
|
||||
| kbd:[PgDn] | | Descendre d'une page. | `+/window page_down+`
|
||||
| kbd:[Alt+i] | `i` | Installer le script. | `+/script install+`
|
||||
| kbd:[Alt+r] | `r` | Supprimer le script. | `+/script remove+`
|
||||
| kbd:[Alt+l] | `l` | Charger le script. | `+/script load+`
|
||||
| kbd:[Alt+L] | `L` | Recharger le script. | `+/script reload+`
|
||||
| kbd:[Alt+u] | `u` | Décharger le script. | `+/script unload+`
|
||||
| kbd:[Alt+Shift+A] | `A` | Charger automatiquement le script. | `+/script toggleautoload+`
|
||||
| kbd:[Alt+h] | `h` | Figer/défiger le script. | `+/script hold+`
|
||||
| kbd:[Alt+v] | `v` | Voir le script. | `+/script show+`
|
||||
| | `s:x,y` | Trier les scripts par les champs x,y (voir l'option <<option_script.look.sort,script.look.sort>>). |
|
||||
| | `s:` | Reset sort to its default value (voir l'option <<option_script.look.sort,script.look.sort>>). |
|
||||
| | `$` | Rafraîchir la liste. |
|
||||
| | `q` | Fermer le tampon. | `+/buffer close+`
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -1868,7 +1991,7 @@ Exemple de tampon fset affichant les options commençant par `weechat.look` :
|
||||
│2.fset │weechat.look.bare_display_exit_on_input: exit the bare display mode on any c│
|
||||
│ │hanges in input [default: on] │
|
||||
│ │----------------------------------------------------------------------------│
|
||||
│ │ weechat.look.align_end_of_lines integer message │
|
||||
│ │ weechat.look.align_end_of_lines enum message │
|
||||
│ │ weechat.look.align_multiline_words boolean on │
|
||||
│ │ weechat.look.bar_more_down string "++" │
|
||||
│ │ weechat.look.bar_more_left string "<<" │
|
||||
@@ -1877,12 +2000,12 @@ Exemple de tampon fset affichant les options commençant par `weechat.look` :
|
||||
│ │## weechat.look.bare_display_exit_on_input boolean on ##│
|
||||
│ │ weechat.look.bare_display_time_format string "%H:%M" │
|
||||
│ │ weechat.look.buffer_auto_renumber boolean on │
|
||||
│ │ weechat.look.buffer_notify_default integer all │
|
||||
│ │ weechat.look.buffer_position integer end │
|
||||
│ │ weechat.look.buffer_notify_default enum all │
|
||||
│ │ weechat.look.buffer_position enum end │
|
||||
│ │ weechat.look.buffer_search_case_sensitive boolean off │
|
||||
│ │ weechat.look.buffer_search_force_default boolean off │
|
||||
│ │ weechat.look.buffer_search_regex boolean off │
|
||||
│ │ weechat.look.buffer_search_where integer prefix_message │
|
||||
│ │ weechat.look.buffer_search_where enum prefix_message │
|
||||
│ │ weechat.look.buffer_time_format string "%H:%M:%S" │
|
||||
│ │ weechat.look.buffer_time_same string "" │
|
||||
│ │[12:55] [2] [fset] 2:fset │
|
||||
@@ -2213,16 +2336,9 @@ Par exemple pour désactiver les « highlights » de "joe" et "mike" sur le ta
|
||||
courant :
|
||||
|
||||
----
|
||||
/buffer set hotlist_max_level_nicks_add joe:2,mike:2
|
||||
/buffer setauto hotlist_max_level_nicks_add joe:2,mike:2
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
La propriété de tampon "hotlist_max_level_nicks" n'est pas sauvegardée dans la
|
||||
configuration. +
|
||||
Vous pouvez facilement la sauvegarder avec le script _buffer_autoset.py_ : vous
|
||||
pouvez l'installer avec `+/script install buffer_autoset.py+` et obtenir de l'aide
|
||||
avec `+/help buffer_autoset+`.
|
||||
|
||||
[[highlights]]
|
||||
=== Highlights
|
||||
|
||||
@@ -2247,16 +2363,9 @@ Ceci peut aussi être défini avec la propriété de tampon "highlight_disable_r
|
||||
Même exemple, spécifique au tampon courant :
|
||||
|
||||
----
|
||||
/buffer set highlight_disable_regex <flash.*>
|
||||
/buffer setauto highlight_disable_regex <flash.*>
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
La propriété de tampon "highlight_disable_regex" n'est pas sauvegardée dans la
|
||||
configuration. +
|
||||
Vous pouvez facilement la sauvegarder avec le script _buffer_autoset.py_ : vous
|
||||
pouvez l'installer avec `+/script install buffer_autoset.py+` et obtenir de l'aide
|
||||
avec `+/help buffer_autoset+`.
|
||||
|
||||
[[highlights_words]]
|
||||
==== Ajouter des mots pour le « highlight »
|
||||
|
||||
@@ -2314,16 +2423,9 @@ Par exemple pour forcer le highlight sur tous les messages dans le canal
|
||||
courant :
|
||||
|
||||
----
|
||||
/buffer set highlight_regex .*
|
||||
/buffer setauto highlight_regex .*
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
La propriété de tampon "highlight_regex" n'est pas sauvegardée dans la
|
||||
configuration. +
|
||||
Vous pouvez facilement la sauvegarder avec le script _buffer_autoset.py_ : vous
|
||||
pouvez l'installer avec `+/script install buffer_autoset.py+` et obtenir de l'aide
|
||||
avec `+/help buffer_autoset+`.
|
||||
|
||||
[[buffer_logging]]
|
||||
=== Enregistrement des tampons
|
||||
|
||||
@@ -3239,30 +3341,31 @@ Sections dans le fichier _weechat.conf_ :
|
||||
|
||||
[width="100%",cols="3m,6m,16",options="header"]
|
||||
|===
|
||||
| Section | Commande de contrôle | Description
|
||||
| debug | <<command_weechat_debug,/debug set>> +
|
||||
/set weechat.debug.* | Niveau de debug, pour le cœur et les extensions (les options peuvent être ajoutées/supprimées dans la section).
|
||||
| startup | /set weechat.startup.* | Options de démarrage.
|
||||
| look | /set weechat.look.* | Aspect/présentation.
|
||||
| palette | <<command_weechat_color,/color alias>> +
|
||||
/set weechat.palette.* | Alias de couleurs (les options peuvent être ajoutées/supprimées dans la section).
|
||||
| color | /set weechat.color.* | Couleurs.
|
||||
| completion | /set weechat.completion.* | Options de complétion.
|
||||
| history | /set weechat.history.* | Options d'historique (commandes et tampons).
|
||||
| proxy | <<command_weechat_proxy,/proxy>> +
|
||||
/set weechat.proxy.* | Options des proxies.
|
||||
| network | /set weechat.network.* | Options réseau/TLS.
|
||||
| plugin | /set weechat.plugin.* | Options sur les extensions.
|
||||
| signal | /set weechat.signal.* | Options sur les signaux.
|
||||
| bar | <<command_weechat_bar,/bar>> +
|
||||
/set weechat.bar.* | Options des barres.
|
||||
| layout | <<command_weechat_layout,/layout>> | Dispositions.
|
||||
| notify | <<command_weechat_buffer,/buffer notify>> | Niveaux de notification des tampons (les options peuvent être ajoutées/supprimées dans la section).
|
||||
| filter | <<command_weechat_filter,/filter>> | Filtres.
|
||||
| key | <<command_weechat_key,/key>> | Touches pour le contexte "default".
|
||||
| key_search | <<command_weechat_key,/key>> | Touches pour le contexte "search".
|
||||
| key_cursor | <<command_weechat_key,/key>> | Touches pour le contexte "cursor".
|
||||
| key_mouse | <<command_weechat_key,/key>> | Touches pour le contexte "mouse".
|
||||
| Section | Commande de contrôle | Description
|
||||
| debug | <<command_weechat_debug,/debug set>> +
|
||||
/set weechat.debug.* | Niveau de debug, pour le cœur et les extensions (les options peuvent être ajoutées/supprimées dans la section).
|
||||
| startup | /set weechat.startup.* | Options de démarrage.
|
||||
| look | /set weechat.look.* | Aspect/présentation.
|
||||
| palette | <<command_weechat_color,/color alias>> +
|
||||
/set weechat.palette.* | Alias de couleurs (les options peuvent être ajoutées/supprimées dans la section).
|
||||
| color | /set weechat.color.* | Couleurs.
|
||||
| completion | /set weechat.completion.* | Options de complétion.
|
||||
| history | /set weechat.history.* | Options d'historique (commandes et tampons).
|
||||
| proxy | <<command_weechat_proxy,/proxy>> +
|
||||
/set weechat.proxy.* | Options des proxies.
|
||||
| network | /set weechat.network.* | Options réseau/TLS.
|
||||
| plugin | /set weechat.plugin.* | Options sur les extensions.
|
||||
| signal | /set weechat.signal.* | Options sur les signaux.
|
||||
| bar | <<command_weechat_bar,/bar>> +
|
||||
/set weechat.bar.* | Options des barres.
|
||||
| layout | <<command_weechat_layout,/layout>> | Dispositions.
|
||||
| buffer | <<command_weechat_buffer,/buffer setauto>> | Propriétés appliquées automatiquement sur les tampons lorsqu'ils sont ouverts.
|
||||
| notify | <<command_weechat_buffer,/buffer notify>> | Niveaux de notification des tampons (les options peuvent être ajoutées/supprimées dans la section).
|
||||
| filter | <<command_weechat_filter,/filter>> | Filtres.
|
||||
| key | <<command_weechat_key,/key>> | Touches pour le contexte "default".
|
||||
| key_search | <<command_weechat_key,/key>> | Touches pour le contexte "search".
|
||||
| key_cursor | <<command_weechat_key,/key>> | Touches pour le contexte "cursor".
|
||||
| key_mouse | <<command_weechat_key,/key>> | Touches pour le contexte "mouse".
|
||||
|===
|
||||
|
||||
Options :
|
||||
@@ -3366,7 +3469,7 @@ irc.server.libera.autorejoin_delay integer null -> 30
|
||||
irc.server.libera.away_check integer null -> 0
|
||||
irc.server.libera.away_check_max_nicks integer null -> 25
|
||||
irc.server.libera.capabilities string null -> "*"
|
||||
irc.server.libera.charset_message integer null -> message
|
||||
irc.server.libera.charset_message enum null -> message
|
||||
irc.server.libera.command string null -> ""
|
||||
irc.server.libera.command_delay integer null -> 0
|
||||
irc.server.libera.connection_timeout integer null -> 60
|
||||
@@ -3382,9 +3485,9 @@ irc.server.libera.notify string null -> ""
|
||||
irc.server.libera.password string null -> ""
|
||||
irc.server.libera.proxy string null -> ""
|
||||
irc.server.libera.realname string null -> ""
|
||||
irc.server.libera.sasl_fail integer null -> reconnect
|
||||
irc.server.libera.sasl_fail enum null -> reconnect
|
||||
irc.server.libera.sasl_key string null -> ""
|
||||
irc.server.libera.sasl_mechanism integer null -> plain
|
||||
irc.server.libera.sasl_mechanism enum null -> plain
|
||||
irc.server.libera.sasl_password string "${sec.data.libera}"
|
||||
irc.server.libera.sasl_timeout integer null -> 15
|
||||
irc.server.libera.sasl_username string "alice"
|
||||
@@ -4116,7 +4219,7 @@ Par exemple, pour personnaliser la réponse au CTCP "VERSION", utilisez la
|
||||
commande suivante :
|
||||
|
||||
----
|
||||
/set irc.ctcp.version "Je suis sous WeeChat $version, ça déchire !"
|
||||
/set irc.ctcp.version "Je suis sous WeeChat ${version}, ça déchire !"
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
@@ -4141,7 +4244,7 @@ Il est possible de personnaliser le CTCP pour un seul serveur, en utilisant son
|
||||
nom interne avant le nom du CTCP :
|
||||
|
||||
----
|
||||
/set irc.ctcp.libera.version "WeeChat $version (pour libera)"
|
||||
/set irc.ctcp.libera.version "WeeChat ${version} (pour libera)"
|
||||
----
|
||||
|
||||
Si vous voulez restaurer la réponse CTCP standard, alors supprimez l'option :
|
||||
@@ -4150,23 +4253,23 @@ Si vous voulez restaurer la réponse CTCP standard, alors supprimez l'option :
|
||||
/unset irc.ctcp.version
|
||||
----
|
||||
|
||||
Les codes suivants peuvent être utilisés dans les chaînes et sont
|
||||
automatiquement remplacées par WeeChat lors de la réponse au CTCP :
|
||||
Les réponses CTCP sont évaluées (voir la commande <<command_weechat_eval,/eval>>)
|
||||
et les variables supplémentaires suivantes sont disponibles :
|
||||
|
||||
[width="100%",cols="2l,4,8",options="header"]
|
||||
[width="100%",cols="2,4,8",options="header"]
|
||||
|===
|
||||
| Code | Description | Valeur / exemple
|
||||
| $clientinfo | Liste des CTCP supportés | `+ACTION DCC CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION+`
|
||||
| $version | Version de WeeChat | `+0.4.0-dev+`
|
||||
| $versiongit | Version de WeeChat + version Git ^(1)^ | `+0.4.0-dev (git: v0.3.9-104-g7eb5cc4)+`
|
||||
| $git | Version Git ^(1)^ | `+v0.3.9-104-g7eb5cc4+`
|
||||
| $compilation | Date de compilation WeeChat | `+Dec 16 2012+`
|
||||
| $osinfo | Information sur l'OS | `+Linux 2.6.32-5-amd64 / x86_64+`
|
||||
| $site | Site WeeChat | `+https://weechat.org/+`
|
||||
| $download | Site WeeChat, page téléchargement | `+https://weechat.org/download/+`
|
||||
| $time | Date/heure courante | `+Sun, 16 Dec 2012 10:40:48 +0100+`
|
||||
| $username | Nom d'utilisateur sur le serveur | `+nom+`
|
||||
| $realname | Nom réel sur le serveur | `+John Doe+`
|
||||
| Variable | Description | Valeur / exemple
|
||||
| `+${clientinfo}+` | Liste des CTCP supportés | `+ACTION DCC CLIENTINFO PING SOURCE TIME VERSION+`
|
||||
| `+${version}+` | Version de WeeChat | `+4.1.0-dev+`
|
||||
| `+${versiongit}+` | Version de WeeChat + version Git ^(1)^ | `+4.1.0-dev (git: v4.0.0-51-g8f98b922a)+`
|
||||
| `+${git}+` | Version Git ^(1)^ | `+v4.0.0-51-g8f98b922a+`
|
||||
| `+${compilation}+` | Date de compilation WeeChat | `+Jul 8 2023 20:14:23+`
|
||||
| `+${osinfo}+` | Information sur l'OS | `+Linux 5.10.0-23-amd64 / x86_64+`
|
||||
| `+${site}+` | Site WeeChat | `+https://weechat.org/+`
|
||||
| `+${download}+` | Site WeeChat, page téléchargement | `+https://weechat.org/download/+`
|
||||
| `+${time}+` | Date/heure courante | `+Sat, 08 Jul 2023 21:11:19 +0200+`
|
||||
| `+${username}+` | Nom d'utilisateur sur le serveur | `+nom+`
|
||||
| `+${realname}+` | Nom réel sur le serveur | `+John Doe+`
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -4174,17 +4277,15 @@ automatiquement remplacées par WeeChat lors de la réponse au CTCP :
|
||||
connue seulement si WeeChat a été compilé dans le dépôt Git et si Git était
|
||||
installé.
|
||||
|
||||
Si les options CTCP ne sont pas définies (par défaut), les réponses CTCP sont :
|
||||
Les réponses CTCP par défaut sont :
|
||||
|
||||
[width="100%",cols="2,4,8",options="header"]
|
||||
|===
|
||||
| CTCP | Format de réponse | Exemple
|
||||
| CLIENTINFO | `+$clientinfo+` | `+ACTION DCC CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION+`
|
||||
| FINGER | `+WeeChat $versiongit+` | `+WeeChat 0.4.0-dev (git: v0.3.9-104-g7eb5cc4)+`
|
||||
| SOURCE | `+$download+` | `+https://weechat.org/download/+`
|
||||
| TIME | `+$time+` | `+Sun, 16 Dec 2012 10:40:48 +0100+`
|
||||
| USERINFO | `+$username ($realname)+` | `+nom (John Doe)+`
|
||||
| VERSION | `+WeeChat $versiongit ($compilation)+` | `+WeeChat 0.4.0-dev (git: v0.3.9-104-g7eb5cc4) (Dec 16 2012)+`
|
||||
| CTCP | Format de réponse | Exemple
|
||||
| CLIENTINFO | `+${clientinfo}+` | `+ACTION DCC CLIENTINFO PING SOURCE TIME VERSION+`
|
||||
| SOURCE | `+${download}+` | `+https://weechat.org/download/+`
|
||||
| TIME | `+${time}+` | `+Sat, 08 Jul 2023 21:11:19 +0200+`
|
||||
| VERSION | `+WeeChat ${version}+` | `+WeeChat 4.1.0-dev+`
|
||||
|===
|
||||
|
||||
[[irc_target_buffer]]
|
||||
|
||||
+64
-25
@@ -644,6 +644,15 @@ If you are using the macOS Terminal app, enable the option
|
||||
"Use option as meta key" in menu Settings/Keyboard. And then you can use the
|
||||
kbd:[Option] key as meta key.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[enter_key]]
|
||||
=== Some keys including Enter are not working, why?
|
||||
|
||||
If you run a WeeChat < 4.0.0 with configuration files created by any
|
||||
version ≥ 4.0.0, the keys names become invalid and many keys won't work at all. +
|
||||
To repair them, exit WeeChat, remove all sections `[key*]` from weechat.conf
|
||||
and start WeeChat again: all default keys will be created.
|
||||
|
||||
[[customize_key_bindings]]
|
||||
=== Come posso personalizzare le associazioni dei tasti?
|
||||
|
||||
@@ -676,6 +685,13 @@ commands like `/123` to jump to buffer #123:
|
||||
/trigger add numberjump modifier "2000|input_text_for_buffer" "${tg_string} =~ ^/[0-9]+$" "=\/([0-9]+)=/buffer *${re:1}=" "" "" "none"
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
For an easy jump to buffers, you can also install the _go.py_ script:
|
||||
|
||||
----
|
||||
/script install go.py
|
||||
----
|
||||
|
||||
[[global_history]]
|
||||
=== Come si può usare la cronologia globale (invece di quella del buffer) con i tasti su e giù?
|
||||
|
||||
@@ -1005,41 +1021,25 @@ Altri script correlati:
|
||||
[[disable_highlights_for_specific_nicks]]
|
||||
=== How can I disable highlights for specific nicks?
|
||||
|
||||
// TRANSLATION MISSING
|
||||
You can use the
|
||||
link:weechat_user.it.html#max_hotlist_level_nicks[hotlist_max_level_nicks_add ^↗^^]
|
||||
buffer property to set the max hotlist level for some nicks, per buffer,
|
||||
or per group of buffers (like IRC servers).
|
||||
|
||||
To only disable highlights, you'd have to set it to 2:
|
||||
To only disable highlights, you'd have to set it to 2.
|
||||
|
||||
For the current buffer:
|
||||
|
||||
----
|
||||
/buffer set hotlist_max_level_nicks_add joe:2,mike:2
|
||||
/buffer setauto hotlist_max_level_nicks_add joe:2,mike:2
|
||||
----
|
||||
|
||||
This buffer property isn't stored in the configuration though.
|
||||
To automatically reapply these buffer properties, you would need the
|
||||
_buffer_autoset.py_ script:
|
||||
For all channels on server "libera":
|
||||
|
||||
----
|
||||
/script install buffer_autoset.py
|
||||
/set weechat.buffer.irc.libera.*.hotlist_max_level_nicks_add joe:2,mike:2
|
||||
----
|
||||
|
||||
For example, to permanently disable highlights from "mike" on #weechat
|
||||
on the IRC server libera:
|
||||
|
||||
----
|
||||
/buffer_autoset add irc.libera.#weechat hotlist_max_level_nicks_add mike:2
|
||||
----
|
||||
|
||||
To apply it to the entire libera server instead:
|
||||
|
||||
----
|
||||
/buffer_autoset add irc.libera hotlist_max_level_nicks_add mike:2
|
||||
----
|
||||
|
||||
For more examples, see `+/help buffer_autoset+`.
|
||||
|
||||
[[irc_target_buffer]]
|
||||
=== Come si può modificare il buffer destinazione per i comandi sui buffer uniti (come i buffer con i server)?
|
||||
|
||||
@@ -1179,7 +1179,10 @@ Esistono diversi trucchi per ottimizzare l'uso della memoria:
|
||||
// TRANSLATION MISSING
|
||||
You can follow same tips as for <<memory_usage,memory>>, and these ones:
|
||||
|
||||
* hide "nicklist" bar: `/bar hide nicklist`
|
||||
// TRANSLATION MISSING
|
||||
* hide "nicklist" bar: `/bar hide nicklist` (key: kbd:[Alt+Shift+N]).
|
||||
// TRANSLATION MISSING
|
||||
* Disable "buflist": `/buflist disable` (key: kbd:[Alt+Shift+B]).
|
||||
* remove display of seconds in status bar time:
|
||||
`+/set weechat.look.item_time_format "%H:%M"+` (this is the default value)
|
||||
// TRANSLATION MISSING
|
||||
@@ -1205,14 +1208,21 @@ Disable answers to all CTCP queries:
|
||||
|
||||
----
|
||||
/set irc.ctcp.clientinfo ""
|
||||
/set irc.ctcp.finger ""
|
||||
/set irc.ctcp.source ""
|
||||
/set irc.ctcp.time ""
|
||||
/set irc.ctcp.userinfo ""
|
||||
/set irc.ctcp.version ""
|
||||
/set irc.ctcp.ping ""
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
With WeeChat < 4.1.0, other CTCP queries were replied by default and must be
|
||||
disabled as well:
|
||||
|
||||
----
|
||||
/set irc.ctcp.finger ""
|
||||
/set irc.ctcp.userinfo ""
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
Unload and disable auto-loading of "xfer" plugin (used for IRC DCC):
|
||||
|
||||
@@ -1250,6 +1260,35 @@ stored in _sec.conf_ with the `/secure` command).
|
||||
See the link:weechat_user.it.html#files_and_directories[User's guide / Files and directories ^↗^^]
|
||||
for more information about configuration files.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[move_to_another_device]]
|
||||
=== I want to move my WeeChat to another device and keep my config, what should I copy?
|
||||
|
||||
First check directories used by WeeChat with this command: `/debug dirs`. +
|
||||
Directories home/config and home/data must be copied (all files and sub-directories).
|
||||
|
||||
For example if you're using XDG directories (default with WeeChat ≥ 3.2),
|
||||
the directories should be `$HOME/.config/weechat` and `$HOME/.local/share/weechat`. +
|
||||
If you're using a single directory (default with WeeChat < 3.2), the directory
|
||||
should be `$HOME/.weechat`.
|
||||
|
||||
[IMPORTANT]
|
||||
The WeeChat version on the new device must be greater than or equal to the version
|
||||
on the initial device. +
|
||||
Downgrading WeeChat configuration is *NOT SUPPORTED* and can break it,
|
||||
leading to unusable WeeChat.
|
||||
|
||||
Steps:
|
||||
|
||||
. Quit Weechat: `/quit` (or `/upgrade -quit` if you want to resume the session,
|
||||
which includes content of all buffers).
|
||||
. Copy all directories, sub-directories and files to the new device, keeping
|
||||
same names and permissions.
|
||||
. Optional: copy any file outside these directories that you refer to in your
|
||||
configuration (it's not recommended to use files outside WeeChat directories).
|
||||
. Start WeeChat on the new device: `weechat` (or `weechat --upgrade` if you
|
||||
saved the session).
|
||||
|
||||
[[development]]
|
||||
== Sviluppo
|
||||
|
||||
|
||||
@@ -4219,18 +4219,28 @@ Supported hash algorithms:
|
||||
|
||||
[width="100%",cols="2,2,3,6",options="header"]
|
||||
|===
|
||||
| Value | Algorithm | Hash size | Notes
|
||||
| `+crc32+` | CRC32 | 4 bytes (32 bits) | Not a hash algorithm in the cryptographic sense.
|
||||
| `+md5+` | MD5 | 16 bytes (128 bits) | *Weak*, not recommended for cryptography usage.
|
||||
| `+sha1+` | SHA-1 | 20 bytes (160 bits) | *Weak*, not recommended for cryptography usage.
|
||||
| `+sha224+` | SHA-224 | 28 bytes (224 bits) |
|
||||
| `+sha256+` | SHA-256 | 32 bytes (256 bits) |
|
||||
| `+sha384+` | SHA-384 | 48 bytes (384 bits) |
|
||||
| `+sha512+` | SHA-512 | 64 bytes (512 bits) |
|
||||
| `+sha3-224+` | SHA3-224 | 28 bytes (224 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-256+` | SHA3-256 | 32 bytes (256 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-384+` | SHA3-384 | 48 bytes (384 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-512+` | SHA3-512 | 64 bytes (512 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| Value | Algorithm | Hash size | Notes
|
||||
| `+crc32+` | CRC32 | 4 bytes (32 bits) | Not a hash algorithm in the cryptographic sense.
|
||||
| `+md5+` | MD5 | 16 bytes (128 bits) | *Weak*, not recommended for cryptography usage.
|
||||
| `+sha1+` | SHA-1 | 20 bytes (160 bits) | *Weak*, not recommended for cryptography usage.
|
||||
| `+sha224+` | SHA-224 | 28 bytes (224 bits) |
|
||||
| `+sha256+` | SHA-256 | 32 bytes (256 bits) |
|
||||
| `+sha384+` | SHA-384 | 48 bytes (384 bits) |
|
||||
| `+sha512+` | SHA-512 | 64 bytes (512 bits) |
|
||||
| `+sha512-224+` | SHA-512/224 | 28 bytes (224 bits) | Algorithm available with libgcrypt ≥ 1.9.4.
|
||||
| `+sha512-256+` | SHA-512/256 | 32 bytes (256 bits) | Algorithm available with libgcrypt ≥ 1.9.4.
|
||||
| `+sha3-224+` | SHA3-224 | 28 bytes (224 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-256+` | SHA3-256 | 32 bytes (256 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-384+` | SHA3-384 | 48 bytes (384 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-512+` | SHA3-512 | 64 bytes (512 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| `+blake2b-160+` | BLAKE2B-160 | 20 bytes (160 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
| `+blake2b-256+` | BLAKE2B-256 | 32 bytes (256 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
| `+blake2b-384+` | BLAKE2B-384 | 48 bytes (384 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
| `+blake2b-512+` | BLAKE2B-512 | 64 bytes (512 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
| `+blake2s-128+` | BLAKE2S-128 | 16 bytes (128 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
| `+blake2s-160+` | BLAKE2S-160 | 20 bytes (160 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
| `+blake2s-224+` | BLAKE2S-224 | 28 bytes (224 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
| `+blake2s-256+` | BLAKE2S-256 | 32 bytes (256 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
|===
|
||||
|
||||
Valore restituito:
|
||||
@@ -4675,7 +4685,8 @@ Argomenti:
|
||||
* _to_: destination file
|
||||
* _compressor_: the compressor to use, one of:
|
||||
** _gzip_: gzip compression
|
||||
** _zstd_: zstandard compression
|
||||
** _zstd_: zstandard compression (available only if zstd was enabled when
|
||||
WeeChat was compiled)
|
||||
* _compression_level_: compression level, between 1 (fast, low compression) to
|
||||
100 (slow, best compression)
|
||||
|
||||
@@ -6980,9 +6991,10 @@ my_section_read_cb (const void *pointer, void *data,
|
||||
{
|
||||
/* ... */
|
||||
|
||||
return WEECHAT_CONFIG_READ_OK;
|
||||
/* return WEECHAT_CONFIG_READ_MEMORY_ERROR; */
|
||||
/* return WEECHAT_CONFIG_READ_FILE_NOT_FOUND; */
|
||||
return WEECHAT_CONFIG_OPTION_SET_OK_CHANGED;
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE; */
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_ERROR; */
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND; */
|
||||
}
|
||||
|
||||
int
|
||||
@@ -7072,7 +7084,7 @@ def config_new_section(config_file: str, name: str,
|
||||
callback_delete_option: str, callback_delete_option_data: str) -> str: ...
|
||||
|
||||
# esempio
|
||||
def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
|
||||
def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: Union[str, None]) -> int:
|
||||
# ...
|
||||
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
|
||||
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
|
||||
@@ -7091,7 +7103,7 @@ def my_section_write_default_cb(data: str, config_file: str, section_name: str)
|
||||
# return weechat.WEECHAT_CONFIG_WRITE_ERROR
|
||||
# return weechat.WEECHAT_CONFIG_WRITE_MEMORY_ERROR
|
||||
|
||||
def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
|
||||
def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: Union[str, None]) -> int:
|
||||
# ...
|
||||
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
|
||||
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
|
||||
@@ -7157,7 +7169,7 @@ section = weechat.config_search_section(config_file, "section")
|
||||
==== config_new_option
|
||||
|
||||
// TRANSLATION MISSING
|
||||
_Updated in 1.5._
|
||||
_Updated in 1.5, 4.1.0._
|
||||
|
||||
Crea una nuova opzione nella sezione di un file di configurazione.
|
||||
|
||||
@@ -7206,12 +7218,15 @@ Argomenti:
|
||||
"name << file.section.option"
|
||||
* _type_: tipo dell'opzione:
|
||||
** _boolean_: valore booleano (on/off)
|
||||
** _integer_: valore intero (con stringhe opzionali per i valori)
|
||||
** _integer_: valore intero
|
||||
** _string_: valore stringa
|
||||
** _color_: colore
|
||||
// TRANSLATION MISSING
|
||||
** _enum_: list of string values (stored as integer internally)
|
||||
* _description_: descrizione dell'opzione
|
||||
* _string_values_: valori come stringa (separati da `+|+`), usato dal tipo _integer_
|
||||
(opzionale)
|
||||
// TRANSLATION MISSING
|
||||
* _string_values_: valori come stringa (separati da `+|+`) (optional, required
|
||||
for type _enum_)
|
||||
* _min_: valore minimo (per il tipo _integer_)
|
||||
* _max_: valore massimo (per il tipo _integer_)
|
||||
* _default_value_: valore predefinito per l'opzione (usato per il reset dell'opzione)
|
||||
@@ -7265,8 +7280,8 @@ Esempio in C:
|
||||
[source,c]
|
||||
----
|
||||
/* booleano */
|
||||
struct t_config_option *option1 =
|
||||
weechat_config_new_option (config_file, section, "option1", "boolean",
|
||||
struct t_config_option *option_bool =
|
||||
weechat_config_new_option (config_file, section, "option_bool", "boolean",
|
||||
"My option, type boolean",
|
||||
NULL,
|
||||
0, 0,
|
||||
@@ -7278,8 +7293,8 @@ struct t_config_option *option1 =
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* intero */
|
||||
struct t_config_option *option2 =
|
||||
weechat_config_new_option (config_file, section, "option2", "integer",
|
||||
struct t_config_option *option_int =
|
||||
weechat_config_new_option (config_file, section, "option_int", "integer",
|
||||
"My option, type integer",
|
||||
NULL,
|
||||
0, 100,
|
||||
@@ -7290,22 +7305,9 @@ struct t_config_option *option2 =
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* intero (con valori stringa) */
|
||||
struct t_config_option *option3 =
|
||||
weechat_config_new_option (config_file, section, "option3", "integer",
|
||||
"My option, type integer (with string values)",
|
||||
"top|bottom|left|right",
|
||||
0, 0,
|
||||
"bottom",
|
||||
"bottom",
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* stringa */
|
||||
struct t_config_option *option4 =
|
||||
weechat_config_new_option (config_file, section, "option4", "string",
|
||||
struct t_config_option *option_str =
|
||||
weechat_config_new_option (config_file, section, "option_str", "string",
|
||||
"My option, type string",
|
||||
NULL,
|
||||
0, 0,
|
||||
@@ -7317,8 +7319,8 @@ struct t_config_option *option4 =
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* colore */
|
||||
struct t_config_option *option5 =
|
||||
weechat_config_new_option (config_file, section, "option5", "color",
|
||||
struct t_config_option *option_col =
|
||||
weechat_config_new_option (config_file, section, "option_col", "color",
|
||||
"My option, type color",
|
||||
NULL,
|
||||
0, 0,
|
||||
@@ -7328,6 +7330,19 @@ struct t_config_option *option5 =
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* enum */
|
||||
struct t_config_option *option_enum =
|
||||
weechat_config_new_option (config_file, section, "option_enum", "enum",
|
||||
"My option, type enum",
|
||||
"top|bottom|left|right",
|
||||
0, 0,
|
||||
"bottom",
|
||||
"bottom",
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
@@ -7337,55 +7352,55 @@ Script (Python):
|
||||
# prototipo
|
||||
def config_new_option(config_file: str, section: str, name: str, type: str, description: str,
|
||||
string_values: str, min: int, max: int,
|
||||
default_value: str | None, value: str | None, null_value_allowed: int,
|
||||
default_value: Union[str, None], value: Union[str, None], null_value_allowed: int,
|
||||
callback_check_value: str, callback_check_value_data: str,
|
||||
callback_change: str, callback_change_data: str,
|
||||
callback_delete: str, callback_delete_data: str) -> str: ...
|
||||
|
||||
# esempio
|
||||
def option4_check_value_cb(data: str, option: str, value: str) -> int:
|
||||
def option_str_check_value_cb(data: str, option: str, value: str) -> int:
|
||||
# ...
|
||||
return 1
|
||||
# return 0
|
||||
|
||||
def option4_change_cb(data: str, option: str) -> None:
|
||||
def option_str_change_cb(data: str, option: str) -> None:
|
||||
# ...
|
||||
|
||||
def option4_delete_cb(data: str, option: str) -> None:
|
||||
def option_str_delete_cb(data: str, option: str) -> None:
|
||||
# ...
|
||||
|
||||
option1 = weechat.config_new_option(config_file, section, "option1", "boolean",
|
||||
option_bool = weechat.config_new_option(config_file, section, "option_bool", "boolean",
|
||||
"My option, type boolean",
|
||||
"", 0, 0, "on", "on", 0,
|
||||
"", "",
|
||||
"", "",
|
||||
"", "")
|
||||
|
||||
option2 = weechat.config_new_option(config_file, section, "option2", "integer",
|
||||
option_int = weechat.config_new_option(config_file, section, "option_int", "integer",
|
||||
"My option, type integer",
|
||||
"", 0, 100, "15", "15", 0,
|
||||
"", "",
|
||||
"", "",
|
||||
"", "")
|
||||
|
||||
option3 = weechat.config_new_option(config_file, section, "option3", "integer",
|
||||
"My option, type integer (with string values)",
|
||||
"top|bottom|left|right",
|
||||
0, 0, "bottom", "bottom", 0,
|
||||
option_str = weechat.config_new_option(config_file, section, "option_str", "string",
|
||||
"My option, type string",
|
||||
"", 0, 0, "test", "test", 1,
|
||||
"option_str_check_value_cb", "",
|
||||
"option_str_change_cb", "",
|
||||
"option_str_delete_cb", "")
|
||||
|
||||
option_col = weechat.config_new_option(config_file, section, "option_col", "color",
|
||||
"My option, type color",
|
||||
"", 0, 0, "lightblue", "lightblue", 0,
|
||||
"", "",
|
||||
"", "",
|
||||
"", "")
|
||||
|
||||
option4 = weechat.config_new_option(config_file, section, "option4", "string",
|
||||
"My option, type string",
|
||||
"", 0, 0, "test", "test", 1,
|
||||
"option4_check_value_cb", "",
|
||||
"option4_change_cb", "",
|
||||
"option4_delete_cb", "")
|
||||
|
||||
option5 = weechat.config_new_option(config_file, section, "option5", "color",
|
||||
"My option, type color",
|
||||
"", 0, 0, "lightblue", "lightblue", 0,
|
||||
option_enum = weechat.config_new_option(config_file, section, "option_enum", "enum",
|
||||
"My option, type enum",
|
||||
"top|bottom|left|right",
|
||||
0, 0, "bottom", "bottom", 0,
|
||||
"", "",
|
||||
"", "",
|
||||
"", "")
|
||||
@@ -7677,7 +7692,7 @@ Argomenti:
|
||||
// TRANSLATION MISSING
|
||||
*** `toggle`: toggle the current value
|
||||
// TRANSLATION MISSING
|
||||
** _integer_ or _color_:
|
||||
** _integer_, _color_ or _enum_:
|
||||
// TRANSLATION MISSING
|
||||
*** `++N`: add `N` (any integer) to the current value
|
||||
// TRANSLATION MISSING
|
||||
@@ -7919,6 +7934,7 @@ Argomenti:
|
||||
*** _integer_
|
||||
*** _string_
|
||||
*** _color_
|
||||
*** _enum_
|
||||
** _description_: option description
|
||||
|
||||
Valore restituito:
|
||||
@@ -8095,6 +8111,7 @@ Return value, depending on the option type:
|
||||
* _integer_: 0
|
||||
* _string_: 0
|
||||
* _color_: 0
|
||||
* _enum_: 0
|
||||
|
||||
Esempio in C:
|
||||
|
||||
@@ -8146,6 +8163,7 @@ Return value, depending on the option type:
|
||||
* _integer_: 0
|
||||
* _string_: 0
|
||||
* _color_: 0
|
||||
* _enum_: 0
|
||||
|
||||
Esempio in C:
|
||||
|
||||
@@ -8197,6 +8215,7 @@ Return value, depending on the option type:
|
||||
* _integer_: integer value of option
|
||||
* _string_: 0
|
||||
* _color_: color index
|
||||
* _enum_: integer value of option (index of enum value)
|
||||
|
||||
Esempio in C:
|
||||
|
||||
@@ -8240,6 +8259,7 @@ Return value, depending on the option type:
|
||||
* _integer_: default integer value of option
|
||||
* _string_: 0
|
||||
* _color_: default color index
|
||||
* _enum_: default integer value of option (index of enum value)
|
||||
|
||||
Esempio in C:
|
||||
|
||||
@@ -8280,10 +8300,10 @@ Argomenti:
|
||||
Return value, depending on the option type:
|
||||
|
||||
* _boolean_: "on" if value is true, otherwise "off"
|
||||
* _integer_: string value if the option is an integer with string values,
|
||||
otherwise NULL
|
||||
* _integer_: NULL
|
||||
* _string_: string value of option
|
||||
* _color_: name of color
|
||||
* _enum_: string value of option
|
||||
|
||||
Esempio in C:
|
||||
|
||||
@@ -8324,10 +8344,10 @@ Argomenti:
|
||||
Return value, depending on the option type:
|
||||
|
||||
* _boolean_: "on" if default value is true, otherwise "off"
|
||||
* _integer_: default string value if the option is an integer with string
|
||||
values, otherwise NULL
|
||||
* _integer_: NULL
|
||||
* _string_: default string value of option
|
||||
* _color_: name of default color
|
||||
* _enum_: default string value of option
|
||||
|
||||
Esempio in C:
|
||||
|
||||
@@ -8371,6 +8391,7 @@ Return value, depending on the option type:
|
||||
* _integer_: NULL
|
||||
* _string_: NULL
|
||||
* _color_: name of color
|
||||
* _enum_: NULL
|
||||
|
||||
Esempio in C:
|
||||
|
||||
@@ -8414,6 +8435,7 @@ Return value, depending on the option type:
|
||||
* _integer_: NULL
|
||||
* _string_: NULL
|
||||
* _color_: name of default color
|
||||
* _enum_: NULL
|
||||
|
||||
Esempio in C:
|
||||
|
||||
@@ -8435,6 +8457,98 @@ option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_color_default(option)
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
==== config_enum
|
||||
|
||||
_WeeChat ≥ 4.1.0._
|
||||
|
||||
Return enum value of option, as integer.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int weechat_config_enum (struct t_config_option *option);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
||||
* _option_: option pointer
|
||||
|
||||
Return value, depending on the option type:
|
||||
|
||||
* _boolean_: boolean value of option (0 or 1)
|
||||
* _integer_: integer value of option
|
||||
* _string_: 0
|
||||
* _color_: color index
|
||||
* _enum_: integer value of option (index of enum value)
|
||||
|
||||
C example:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_config_option *option = weechat_config_get ("plugin.section.option");
|
||||
int value = weechat_config_enum (option);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def config_enum(option: str) -> int: ...
|
||||
|
||||
# example
|
||||
option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_enum(option)
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
==== config_enum_default
|
||||
|
||||
_WeeChat ≥ 4.1.0._
|
||||
|
||||
Return default enum value of option, as integer.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int weechat_config_enum_default (struct t_config_option *option);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
||||
* _option_: option pointer
|
||||
|
||||
Return value, depending on the option type:
|
||||
|
||||
* _boolean_: default boolean value of option (0 or 1)
|
||||
* _integer_: default integer value of option
|
||||
* _string_: 0
|
||||
* _color_: default color index
|
||||
* _enum_: integer value of option (index of enum value)
|
||||
|
||||
C example:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_config_option *option = weechat_config_get ("plugin.section.option");
|
||||
int value = weechat_config_enum_default (option);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def config_enum_default(option: str) -> int: ...
|
||||
|
||||
# example
|
||||
option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_enum_default(option)
|
||||
----
|
||||
|
||||
==== config_write_option
|
||||
|
||||
Scrive una riga nel file di configurazione con l'opzione ed il suo valore
|
||||
@@ -10272,7 +10386,6 @@ struct t_hook *weechat_hook_process (const char *command,
|
||||
void *callback_data);
|
||||
----
|
||||
|
||||
|
||||
Argomenti:
|
||||
|
||||
// TRANSLATION MISSING
|
||||
@@ -10542,25 +10655,8 @@ available:
|
||||
_/dev/null_.
|
||||
|===
|
||||
|
||||
Per il comando "url:..." sono disponibili le seguenti opzioni (consultare
|
||||
`+man curl_easy_setopt+` per la descrizione di ogni opzione):
|
||||
|
||||
include::{autogendir}/autogen_api_url_options.it.adoc[tag=url_options]
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[NOTE]
|
||||
^(1)^ Per le opzioni con il tipo "mask" il formato è: "value1+value2+value3";
|
||||
for options with type "list", the list items must be separated by a newline
|
||||
(`\n`). +
|
||||
^(2)^ Quando sono disponibili le costanti, esse vanno usate come valore per
|
||||
l'opzione.
|
||||
|
||||
Per un URL, sono consentite due opzioni aggiuntive (stringhe) per il file in
|
||||
input/output:
|
||||
|
||||
* _file_in_: file da leggere e inviare con gli URL (invio del file "post")
|
||||
* _file_out_: scrive URL scaricato/file in questo file (invece dello standard
|
||||
* output)
|
||||
For command "url:...", see available options in function <<_hook_url,hook_url>>.
|
||||
|
||||
Valore restituito:
|
||||
|
||||
@@ -10720,6 +10816,159 @@ hook4 = weechat.hook_process_hashtable("sh",
|
||||
20000, "my_process_cb", "")
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
==== hook_url
|
||||
|
||||
_WeeChat ≥ 4.1.0._
|
||||
|
||||
URL transfer.
|
||||
|
||||
Prototipo:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_hook *weechat_hook_url (const char *url,
|
||||
struct t_hashtable *options,
|
||||
int timeout,
|
||||
int (*callback)(const void *pointer,
|
||||
void *data,
|
||||
const char *url,
|
||||
struct t_hashtable *options,
|
||||
struct t_hashtable *output),
|
||||
const void *callback_pointer,
|
||||
void *callback_data);
|
||||
----
|
||||
|
||||
Argomenti:
|
||||
|
||||
* _url_: URL
|
||||
* _options_: options for URL transfer (see below); la tabella hash è duplicata
|
||||
nella funzione, per cui è possibile liberarla dopo questa chiamata
|
||||
* _timeout_: timeout for URL transfer (in milliseconds): after this timeout,
|
||||
the transfer is stopped (0 means no timeout)
|
||||
* _callback_: function called when the transfer has ended, arguments and return
|
||||
value:
|
||||
** _const void *pointer_: pointer
|
||||
** _void *data_: pointer
|
||||
** _const char *url_: URL
|
||||
** _struct t_hashtable *options_: options
|
||||
** _struct t_hashtable *output_: result (keys and values are strings), which may
|
||||
contain the following keys:
|
||||
*** _response_code_: HTTP response code
|
||||
*** _headers_: HTTP headers in response
|
||||
*** _output_: standard output (set only if _file_out_ was not set in options)
|
||||
*** _error_: error message (set only in case of error)
|
||||
** return value:
|
||||
*** _WEECHAT_RC_OK_
|
||||
*** _WEECHAT_RC_ERROR_
|
||||
* _callback_pointer_: puntatore fornito alla callback quando chiamata da WeeChat
|
||||
* _callback_data_: puntatore fornito alla callback quando chiamata da WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
The following Curl options are available (see `+man curl_easy_setopt+` for
|
||||
a description of each option):
|
||||
|
||||
include::{autogendir}/autogen_api_url_options.it.adoc[tag=url_options]
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[NOTE]
|
||||
^(1)^ Per le opzioni con il tipo "mask" il formato è: "value1+value2+value3";
|
||||
for options with type "list", the list items must be separated by a newline
|
||||
(`\n`). +
|
||||
^(2)^ Quando sono disponibili le costanti, esse vanno usate come valore per
|
||||
l'opzione.
|
||||
|
||||
These two extra options (strings) are allowed for input/output file:
|
||||
|
||||
[width="100%",cols="2,^1,7",options="header"]
|
||||
|===
|
||||
| Option | Type | Description
|
||||
| file_in | string | file da leggere e inviare con gli URL (invio del file "post")
|
||||
| file_out | string | scrive URL scaricato/file in questo file (invece dello standard output)
|
||||
|===
|
||||
|
||||
Valore restituito:
|
||||
|
||||
* puntatore al nuovo hook, NULL in caso di errore
|
||||
|
||||
Esempio in C:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int
|
||||
my_url_cb (const void *pointer, void *data, const char *url,
|
||||
struct t_hashtable *options, struct t_hashtable *output)
|
||||
{
|
||||
weechat_printf (NULL, "response_code: %s", weechat_hashtable_get (output, "response_code"));
|
||||
weechat_printf (NULL, "headers: %s", weechat_hashtable_get (output, "headers"));
|
||||
weechat_printf (NULL, "output: %s", weechat_hashtable_get (output, "output"));
|
||||
weechat_printf (NULL, "error: %s", weechat_hashtable_get (output, "error"));
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/* example 1: output to a file */
|
||||
struct t_hashtable *options_url1 = weechat_hashtable_new (8,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL,
|
||||
NULL);
|
||||
if (options_url1)
|
||||
{
|
||||
weechat_hashtable_set (options_url1, "file_out", "/tmp/weechat.org.html");
|
||||
struct t_hook *my_url_hook = weechat_hook_url ("https://weechat.org/",
|
||||
options_url1,
|
||||
20000,
|
||||
&my_url_cb, NULL, NULL);
|
||||
weechat_hashtable_free (options_url1);
|
||||
}
|
||||
|
||||
/* example 2: custom HTTP headers, output sent to callback */
|
||||
struct t_hashtable *options_url2 = weechat_hashtable_new (8,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL,
|
||||
NULL);
|
||||
if (options_url2)
|
||||
{
|
||||
weechat_hashtable_set (options_url2, "httpheader",
|
||||
"Header1: value1\n"
|
||||
"Header2: value2");
|
||||
struct t_hook *my_url_hook = weechat_hook_url ("http://localhost:8080/",
|
||||
options_url2,
|
||||
20000,
|
||||
&my_url_cb, NULL, NULL);
|
||||
weechat_hashtable_free (options_url2);
|
||||
}
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototipo
|
||||
def hook_url(url: str, options: Dict[str, str], timeout: int, callback: str, callback_data: str) -> str: ...
|
||||
|
||||
# esempio
|
||||
def my_url_cb(data: str, url: str, options: Dict[str, str], output: Dict[str, str]) -> int:
|
||||
weechat.prnt("", "output: %s" % output)
|
||||
return weechat.WEECHAT_RC_OK
|
||||
|
||||
# example 1: output to a file
|
||||
hook1 = weechat.hook_url("https://weechat.org/",
|
||||
{"file_out": "/tmp/weechat.org.html"},
|
||||
20000, "my_url_cb", "")
|
||||
|
||||
# example 2: custom HTTP headers, output sent to callback
|
||||
options = {
|
||||
"httpheader": "\n".join([
|
||||
"Header1: value1",
|
||||
"Header2: value2",
|
||||
]),
|
||||
}
|
||||
hook2 = weechat.hook_url("http://localhost:8080/", options, 20000, "my_url_cb", "")
|
||||
----
|
||||
|
||||
==== hook_connect
|
||||
|
||||
// TRANSLATION MISSING
|
||||
@@ -13486,7 +13735,7 @@ Questa funzione non è disponibile nelle API per lo scripting.
|
||||
==== hook_focus
|
||||
|
||||
// TRANSLATION MISSING
|
||||
_Updated in 1.5._
|
||||
_Updated in 1.5, 4.0.0, 4.1.0._
|
||||
|
||||
Hook sul foucus: evento del mouse o tasto premuto nella modalità cursore
|
||||
(movimento libero del cursore).
|
||||
@@ -13606,18 +13855,26 @@ Contenuto della tabella hash inviata alla callback (tasti e valori sono di tipo
|
||||
| "Hello world!" | ""
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| _chat_focused_line | Line at (x,y) _(WeeChat ≥ 4.0.0)_.
|
||||
| _chat_focused_line | Line at (x, y) _(WeeChat ≥ 4.0.0)_.
|
||||
| "Hello world!" | ""
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| _chat_focused_line_bol | Text from beginning of line to (x-1, y) _(WeeChat ≥ 4.1.0)_.
|
||||
| "Hello" | ""
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| _chat_focused_line_eol | Text from (x, y) to end of line _(WeeChat ≥ 4.1.0)_.
|
||||
| "llo world!" | ""
|
||||
|
||||
| _chat_word | Parola a (x,y).
|
||||
| "Hello" | ""
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| _chat_bol | Text from beginning of line to (x-1, y).
|
||||
| _chat_bol | Text from beginning of message to (x-1, y).
|
||||
| "He" | ""
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| _chat_eol | Text from (x, y) to the end of line.
|
||||
| _chat_eol | Text from (x, y) to the end of message.
|
||||
| "llo world!" | ""
|
||||
|
||||
| _bar_name | Nome della barra.
|
||||
@@ -18354,7 +18611,7 @@ Argomenti:
|
||||
|
||||
Valore restituito:
|
||||
|
||||
* offset della variabile, 0 in caso di errore
|
||||
* offset della variabile, -1 in caso di errore
|
||||
|
||||
Esempio in C:
|
||||
|
||||
@@ -19298,7 +19555,7 @@ for key in hash:
|
||||
// TRANSLATION MISSING
|
||||
==== hdata_compare
|
||||
|
||||
_WeeChat ≥ 1.9._
|
||||
_WeeChat ≥ 1.9, updated in 4.1.0._
|
||||
|
||||
Compare a hdata variable of two objects.
|
||||
|
||||
@@ -19314,8 +19571,8 @@ Argomenti:
|
||||
* _hdata_: hdata pointer
|
||||
* _pointer1_: pointer to first WeeChat/plugin object
|
||||
* _pointer2_: pointer to second WeeChat/plugin object
|
||||
* _name_: variable name; for arrays, the name can be "N|name" where N is
|
||||
the index in array (starting at 0), for example: "2|name"
|
||||
* _name_: variable name or path to a variable name; for arrays, the name can be
|
||||
"N|name" where N is the index in array (starting at 0), for example: "2|name"
|
||||
* _case_sensitive_: 1 for case sensitive comparison of strings, otherwise 0
|
||||
|
||||
Valore restituito:
|
||||
@@ -19331,8 +19588,12 @@ Esempio in C:
|
||||
struct t_hdata *hdata = weechat_hdata_get ("buffer");
|
||||
struct t_gui_buffer *buffer1 = weechat_buffer_search ("irc", "libera.#weechat");
|
||||
struct t_gui_buffer *buffer2 = weechat_buffer_search ("irc", "libera.#weechat-fr");
|
||||
weechat_printf (NULL, "number comparison = %d",
|
||||
weechat_printf (NULL, "comparison of buffer number = %d",
|
||||
weechat_hdata_compare (hdata, buffer1, buffer2, "number", 0));
|
||||
weechat_printf (NULL, "comparison of number of lines = %d",
|
||||
weechat_hdata_compare (hdata, buffer1, buffer2, "own_lines.lines_count", 0));
|
||||
weechat_printf (NULL, "comparison of local variable = %d",
|
||||
weechat_hdata_compare (hdata, buffer1, buffer2, "local_variables.myvar", 0));
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
@@ -19346,7 +19607,9 @@ def hdata_compare(hdata: str, pointer1: str, pointer2: str, name: str, case_sens
|
||||
hdata = weechat.hdata_get("buffer")
|
||||
buffer1 = weechat.buffer_search("irc", "libera.#weechat")
|
||||
buffer2 = weechat.buffer_search("irc", "libera.#weechat-fr")
|
||||
weechat.prnt("", "number comparison = %d" % weechat.hdata_compare(hdata, buffer1, buffer2, "number", 0))
|
||||
weechat.prnt("", "comparison of buffer number = %d" % weechat.hdata_compare(hdata, buffer1, buffer2, "number", 0))
|
||||
weechat.prnt("", "comparison of number of lines = %d" % weechat.hdata_compare(hdata, buffer1, buffer2, "own_lines.lines_count", 0))
|
||||
weechat.prnt("", "comparison of local variable = %d" % weechat.hdata_compare(hdata, buffer1, buffer2, "local_variables.myvar", 0))
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
|
||||
+292
-169
@@ -139,7 +139,7 @@ WeeChat:
|
||||
| pkg-config |
|
||||
| Detect installed libraries.
|
||||
|
||||
| libncursesw5-dev ^(2)^ |
|
||||
| libncurses-dev |
|
||||
| Interfaccia ncurses.
|
||||
|
||||
| libcurl4-gnutls-dev |
|
||||
@@ -150,7 +150,7 @@ WeeChat:
|
||||
| Secured data, IRC SASL authentication.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| libgnutls28-dev | ≥ 2.2.0 ^(3)^
|
||||
| libgnutls28-dev | ≥ 2.2.0 ^(2)^
|
||||
| IRC plugin: support of TLS connections, IRC SASL authentication (ECDSA-NIST256P-CHALLENGE). +
|
||||
Relay plugin: support of TLS connections.
|
||||
|
||||
@@ -159,11 +159,6 @@ WeeChat:
|
||||
| Logger plugin: compression of rotated log files (gzip). +
|
||||
Relay plugin: compression of messages (WeeChat -> client) with https://zlib.net/[zlib ^↗^^] (weechat protocol). +
|
||||
Script plugin: read of repository index file (gzip).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| libzstd-dev | ≥ 0.8.1
|
||||
| Logger plugin: compression of rotated log files. +
|
||||
Relay plugin: compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat protocol).
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -171,11 +166,7 @@ WeeChat:
|
||||
^(1)^ Name comes from the Debian GNU/Linux Bookworm distribution, version and
|
||||
name can be different in other distributions. +
|
||||
// TRANSLATION MISSING
|
||||
^(2)^ It is recommended to compile with libncurses**w**5-dev (the *w* is
|
||||
important). WeeChat can compile with libncurses5-dev, but it is *NOT* recommended:
|
||||
you may experience display bugs with wide chars. +
|
||||
// TRANSLATION MISSING
|
||||
^(3)^ GnuTLS ≥ 3.0.21 is required for IRC SASL authentication with mechanism
|
||||
^(2)^ GnuTLS ≥ 3.0.21 is required for IRC SASL authentication with mechanism
|
||||
ECDSA-NIST256P-CHALLENGE.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
@@ -185,32 +176,75 @@ WeeChat:
|
||||
[width="100%",cols="5,^3,.^15",options="header"]
|
||||
|===
|
||||
// TRANSLATION MISSING
|
||||
| Pacchetto ^(1)^ | Versione | Features
|
||||
| Pacchetto ^(1)^ | Versione | Features
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| {cpp} compiler (pass:[g++ / clang++]) | | Build and run tests, plugin JavaScript.
|
||||
| gettext | | Internazionalizzazione (traduzione dei messaggi; la lingua base è l'inglese).
|
||||
| ca-certificates | | Certificati per le connessioni TLS.
|
||||
| libaspell-dev / libenchant-dev | | Plugin spell.
|
||||
| python3-dev | ≥ 3.0 | Plugin python.
|
||||
| libperl-dev | | Plugin perl.
|
||||
| ruby3.1, ruby3.1-dev | ≥ 1.9.1 | Plugin ruby.
|
||||
| liblua5.4-dev | | Plugin lua.
|
||||
| tcl-dev | ≥ 8.5 | Plugin tcl.
|
||||
| guile-3.0-dev | ≥ 2.0 | Plugin guile (scheme).
|
||||
| libv8-dev | ≤ 3.24.3 | Plugin javascript.
|
||||
| php-dev | ≥ 7.0 | Plugin php.
|
||||
| libphp-embed | ≥ 7.0 | Plugin php.
|
||||
| libxml2-dev | | Plugin php.
|
||||
| {cpp} compiler (pass:[g++ / clang++]) |
|
||||
| Build and run tests, plugin JavaScript.
|
||||
|
||||
| gettext |
|
||||
| Internazionalizzazione (traduzione dei messaggi; la lingua base è l'inglese).
|
||||
|
||||
| ca-certificates |
|
||||
| Certificati per le connessioni TLS.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| libargon2-dev | | Plugin php (if PHP ≥ 7.2).
|
||||
| libzstd-dev | ≥ 0.8.1
|
||||
| Logger plugin: compression of rotated log files (zstandard). +
|
||||
Relay plugin: compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat protocol).
|
||||
|
||||
| libaspell-dev / libenchant-dev |
|
||||
| Plugin spell.
|
||||
|
||||
| python3-dev | ≥ 3.0
|
||||
| Plugin python.
|
||||
|
||||
| libperl-dev |
|
||||
| Plugin perl.
|
||||
|
||||
| ruby3.1, ruby3.1-dev | ≥ 1.9.1
|
||||
| Plugin ruby.
|
||||
|
||||
| liblua5.4-dev |
|
||||
| Plugin lua.
|
||||
|
||||
| tcl-dev | ≥ 8.5
|
||||
| Plugin tcl.
|
||||
|
||||
| guile-3.0-dev | ≥ 2.0
|
||||
| Plugin guile (scheme).
|
||||
|
||||
| libv8-dev | ≤ 3.24.3
|
||||
| Plugin javascript.
|
||||
|
||||
| php-dev | ≥ 7.0
|
||||
| Plugin php.
|
||||
|
||||
| libphp-embed | ≥ 7.0
|
||||
| Plugin php.
|
||||
|
||||
| libxml2-dev |
|
||||
| Plugin php.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| libsodium-dev | | Plugin php (if PHP ≥ 7.2).
|
||||
| libargon2-dev |
|
||||
| Plugin php (if PHP ≥ 7.2).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| asciidoctor | ≥ 1.5.4 | Build man page and documentation.
|
||||
| libsodium-dev |
|
||||
| Plugin php (if PHP ≥ 7.2).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| ruby-pygments.rb | | Build documentation.
|
||||
| asciidoctor | ≥ 1.5.4
|
||||
| Build man page and documentation.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| libcpputest-dev | ≥ 3.4 | Build and run tests.
|
||||
| ruby-pygments.rb |
|
||||
| Build documentation.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| libcpputest-dev | ≥ 3.4
|
||||
| Build and run tests.
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -256,7 +290,7 @@ $ make install
|
||||
Options can be used for CMake, with format: `-DOPTION=VALUE`.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
List of commonly used options:
|
||||
List of available options:
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[width="100%",cols="3m,3,3m,10",options="header"]
|
||||
@@ -270,7 +304,6 @@ List of commonly used options:
|
||||
| CMAKE_INSTALL_PREFIX | directory | /usr/local
|
||||
| The directory where WeeChat will be installed.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| WEECHAT_HOME | directory | (empty string)
|
||||
| The default home directory when running WeeChat. +
|
||||
With an empty value (recommended), XDG directories are used by default.
|
||||
@@ -293,7 +326,6 @@ List of commonly used options:
|
||||
| ENABLE_DOC | `ON`, `OFF` | OFF
|
||||
| Build HTML documentation.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| ENABLE_DOC_INCOMPLETE | `ON`, `OFF` | OFF
|
||||
| Force build of documentation even if some plugins are not compiled
|
||||
(not recommended: docs will be incomplete).
|
||||
@@ -313,6 +345,9 @@ List of commonly used options:
|
||||
| ENABLE_GUILE | `ON`, `OFF` | ON
|
||||
| Compile <<scripting_plugins,Guile plugin>> (Scheme).
|
||||
|
||||
| ENABLE_HEADLESS | `ON`, `OFF` | ON
|
||||
| Compile headless binary.
|
||||
|
||||
| ENABLE_IRC | `ON`, `OFF` | ON
|
||||
| Compile <<irc,IRC plugin>>.
|
||||
|
||||
@@ -371,6 +406,10 @@ List of commonly used options:
|
||||
| ENABLE_XFER | `ON`, `OFF` | ON
|
||||
| Compile <<xfer,Xfer plugin>>.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| ENABLE_ZSTD | `ON`, `OFF` | ON
|
||||
| Enable https://facebook.github.io/zstd/[Zstandard ^↗^^] compression.
|
||||
|
||||
| ENABLE_TESTS | `ON`, `OFF` | OFF
|
||||
| Compile tests.
|
||||
|
||||
@@ -992,6 +1031,10 @@ Other items available (not used in bars by default):
|
||||
| buffer_short_name | `#test` | Current buffer short name.
|
||||
| buflist2 | `1.weechat` | List of buffers, second bar item (see option <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
| buflist3 | `1.weechat` | List of buffers, third bar item (see option <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
// TRANSLATION MISSING
|
||||
| buflist4 | `1.weechat` | List of buffers, fourth bar item (see option <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
// TRANSLATION MISSING
|
||||
| buflist5 | `1.weechat` | List of buffers, fifth bar item (see option <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
| fset | `+buflist.look.sort: …+` | Help on currently selected option on fset buffer.
|
||||
| irc_channel | `#test` | Current IRC channel name.
|
||||
| irc_host | `+user@host.com+` | Current IRC host.
|
||||
@@ -1450,7 +1493,8 @@ By default WeeChat and its default plugins interpret these variables:
|
||||
|
||||
| filter
|
||||
| any string
|
||||
| Filter defined on some buffers like `/fset`, `/server raw` (irc) and `/script`.
|
||||
| Filter defined on some buffers like `/fset`, `/list` (irc), `/server raw` (irc)
|
||||
and `/script`.
|
||||
|
||||
| host
|
||||
| any string
|
||||
@@ -1535,7 +1579,8 @@ External plugins and scripts can define and use other local variables.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
Buflist plugin displays a list of buffers in a bar item called "buflist"
|
||||
(two other bar items "buflist2" and "buflist3" are available as well). +
|
||||
(four other bar items "buflist2", "buflist3", "buflist4" and "buflist5" are
|
||||
available as well). +
|
||||
A default bar "buflist" is created on startup with this item.
|
||||
|
||||
[[buflist_commands]]
|
||||
@@ -1562,6 +1607,22 @@ Options:
|
||||
|
||||
include::{autogendir}/autogen_user_options.it.adoc[tag=buflist_options]
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[cursor_mode]]
|
||||
=== Cursor mode
|
||||
|
||||
The cursor mode allows you to move freely the cursor anywhere on screen, in chat
|
||||
area and bars, and lets you perform actions at the given position. +
|
||||
You can enter in cursor mode either with the command `/cursor` or with a mouse
|
||||
middle click (mouse must have been enabled with key kbd:[Alt+m] or command
|
||||
`/mouse enable`).
|
||||
|
||||
Typical use is to quote messages (chat area) or interact with nicks (nicklist bar).
|
||||
|
||||
See command <<command_weechat_cursor,/cursor>> and
|
||||
<<key_bindings_cursor_context,key bindings in cursor context>> for the list
|
||||
of actions you can perform in this mode.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[key_bindings]]
|
||||
== Key bindings
|
||||
@@ -1678,6 +1739,16 @@ They can be changed and new ones can be added with the <<command_weechat_key,/ke
|
||||
| kbd:[Ctrl+↓] | Chiama il comando/messaggio successivo nella cronologia globale (identico per tutti i buffer). | `+/input history_global_next+`
|
||||
|===
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[key_bindings_cmdline_system]]
|
||||
==== System
|
||||
|
||||
[width="100%",cols="^.^3,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Tasti | Descrizione | Comando
|
||||
| kbd:[Ctrl+z] | Suspend WeeChat process. | `+/sys suspend+`
|
||||
|===
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[key_bindings_buffers]]
|
||||
=== Buffers
|
||||
@@ -1832,33 +1903,46 @@ kbd:[Ctrl+r] per cercare del testo nel buffer).
|
||||
[[key_bindings_cursor_context]]
|
||||
=== Cursor context
|
||||
|
||||
// TRANSLATION MISSING
|
||||
Questi tasti sono usati nel contesto "cursor" (movimento libero del cursore
|
||||
sullo schermo.
|
||||
sullo schermo, see <<cursor_mode,Cursor mode>>.
|
||||
|
||||
[width="100%",cols="^.^3,^.^2,.^7,.^7",options="header"]
|
||||
|===
|
||||
| Tasto | Zona | Descrizione | Comando
|
||||
| kbd:[↑] | - | Sposta il cursore di una riga in alto. | `+/cursor move up+`
|
||||
| kbd:[↓] | - | Sposta il cursore di una riga in basso. | `+/cursor move down+`
|
||||
| kbd:[←] | - | Sposta il cursore di una colonna a sinistra. | `+/cursor move left+`
|
||||
| kbd:[→] | - | Sposta il cursore di una colonna a destra. | `+/cursor move right+`
|
||||
| kbd:[Alt+↑] | - | Sposta il cursore nell'area in alto. | `+/cursor move area_up+`
|
||||
| kbd:[Alt+↓] | - | Sposta il cursore nell'area in basso. | `+/cursor move area_down+`
|
||||
| kbd:[Alt+←] | - | Sposta il cursore nell'area a sinistra. | `+/cursor move area_left+`
|
||||
| kbd:[Alt+→] | - | Sposta il cursore nell'area a destra. | `+/cursor move area_right+`
|
||||
| kbd:[m] | chat | Cita messaggio. | `+hsignal:chat_quote_message;/cursor stop+`
|
||||
| Tasto | Zona | Descrizione | Comando
|
||||
| kbd:[↑] | - | Sposta il cursore di una riga in alto. | `+/cursor move up+`
|
||||
| kbd:[↓] | - | Sposta il cursore di una riga in basso. | `+/cursor move down+`
|
||||
| kbd:[←] | - | Sposta il cursore di una colonna a sinistra. | `+/cursor move left+`
|
||||
| kbd:[→] | - | Sposta il cursore di una colonna a destra. | `+/cursor move right+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[l] | chat | Quote focused line. | `+hsignal:chat_quote_focused_line;/cursor stop+`
|
||||
| kbd:[q] | chat | Cita prefisso + messaggio. | `+hsignal:chat_quote_prefix_message;/cursor stop+`
|
||||
| kbd:[Q] | chat | Cita ora + prefisso + messaggio. | `+hsignal:chat_quote_time_prefix_message;/cursor stop+`
|
||||
| kbd:[b] | lista nick | Ban di un nick. | `+/window ${_window_number};/ban ${nick}+`
|
||||
| kbd:[k] | lista nick | Kick di un nick. | `+/window ${_window_number};/kick ${nick}+`
|
||||
| kbd:[K] | lista nick | Kick e ban di un nick. | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| kbd:[q] | lista nick | Apri query con il nick. | `+/window ${_window_number};/query ${nick};/cursor stop+`
|
||||
| kbd:[w] | lista nick | Effettua un whois sul nick. | `+/window ${_window_number};/whois ${nick}+`
|
||||
| kbd:[Alt+↑] | - | Move cursor to the first line of the area. | `+/cursor move edge_top+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[Alt+↓] | - | Move cursor to the last line of the area. | `+/cursor move edge_bottom+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[Alt+←] | - | Move cursor to the first column of the area. | `+/cursor move edge_left+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[Alt+→] | - | Move cursor to the last column of the area. | `+/cursor move edge_right+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[Alt+Home] | - | Move cursor to the top left corner of the area. | `+/cursor move top_left+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[Alt+End] | - | Move cursor to the bottom right corner of the area. | `+/cursor move bottom_right+`
|
||||
| kbd:[Alt+Shift+↑] | - | Sposta il cursore nell'area in alto. | `+/cursor move area_up+`
|
||||
| kbd:[Alt+Shift+↓] | - | Sposta il cursore nell'area in basso. | `+/cursor move area_down+`
|
||||
| kbd:[Alt+Shift+←] | - | Sposta il cursore nell'area a sinistra. | `+/cursor move area_left+`
|
||||
| kbd:[Alt+Shift+→] | - | Sposta il cursore nell'area a destra. | `+/cursor move area_right+`
|
||||
| kbd:[m] | chat | Cita messaggio. | `+hsignal:chat_quote_message;/cursor stop+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[l] | chat | Quote focused line. | `+hsignal:chat_quote_focused_line;/cursor stop+`
|
||||
| kbd:[q] | chat | Cita prefisso + messaggio. | `+hsignal:chat_quote_prefix_message;/cursor stop+`
|
||||
| kbd:[Q] | chat | Cita ora + prefisso + messaggio. | `+hsignal:chat_quote_time_prefix_message;/cursor stop+`
|
||||
| kbd:[b] | lista nick | Ban di un nick. | `+/window ${_window_number};/ban ${nick}+`
|
||||
| kbd:[k] | lista nick | Kick di un nick. | `+/window ${_window_number};/kick ${nick}+`
|
||||
| kbd:[K] | lista nick | Kick e ban di un nick. | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| kbd:[q] | lista nick | Apri query con il nick. | `+/window ${_window_number};/query ${nick};/cursor stop+`
|
||||
| kbd:[w] | lista nick | Effettua un whois sul nick. | `+/window ${_window_number};/whois ${nick}+`
|
||||
| kbd:[Enter] +
|
||||
kbd:[Ctrl+j] +
|
||||
kbd:[Ctrl+m] | - | Ferma la modalità cursore. | `+/cursor stop+`
|
||||
kbd:[Ctrl+m] | - | Ferma la modalità cursore. | `+/cursor stop+`
|
||||
|===
|
||||
|
||||
// TRANSLATION MISSING
|
||||
@@ -1874,11 +1958,11 @@ These mouse actions are possible only if mouse is enabled with key kbd:[Alt+m]
|
||||
|===
|
||||
// TRANSLATION MISSING
|
||||
| Tasto/Wheel ^(1)^ | Azione | Zona | Descrizione | Comando
|
||||
| ◾◽◽ | - | chat | Passa alla finestra. | `+/window ${_window_number}+`
|
||||
| ◾◽◽ | sinistra | chat | Passa al buffer precedente. | `+/window ${_window_number};/buffer +1+`
|
||||
| ◾◽◽ | destra | chat | Passa al buffer successivo. | `+/window ${_window_number};/buffer +1+`
|
||||
| ◾◽◽ | sinistra (lungo) | chat | Switch to first buffer. | `+/window ${_window_number};/buffer 1+`
|
||||
| ◾◽◽ | destra (lungo) | chat | Passa all'ultimo buffer. | `+/window ${_window_number};/buffer ++`
|
||||
| kbd:[■ □ □] | - | chat | Passa alla finestra. | `+/window ${_window_number}+`
|
||||
| kbd:[■ □ □] | sinistra | chat | Passa al buffer precedente. | `+/window ${_window_number};/buffer +1+`
|
||||
| kbd:[■ □ □] | destra | chat | Passa al buffer successivo. | `+/window ${_window_number};/buffer +1+`
|
||||
| kbd:[■ □ □] | sinistra (lungo) | chat | Switch to first buffer. | `+/window ${_window_number};/buffer 1+`
|
||||
| kbd:[■ □ □] | destra (lungo) | chat | Passa all'ultimo buffer. | `+/window ${_window_number};/buffer ++`
|
||||
| kbd:[▲] | - | chat | Scorre di qualche riga in alto nella cronologia del buffer. | `+/window scroll_up -window ${_window_number}+`
|
||||
| kbd:[▼] | - | chat | Scorre di qualche riga in basso nella cronologia del buffer. | `+/window scroll_down -window ${_window_number}+`
|
||||
| kbd:[Ctrl+▲] | - | chat | Scroll horizontally to the left. | `+/window scroll_horiz -window ${_window_number} -10%+`
|
||||
@@ -1888,53 +1972,67 @@ These mouse actions are possible only if mouse is enabled with key kbd:[Alt+m]
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[▼] | - | chat: fset buffer | Move five lines down in fset buffer. | `+/fset -down 5+`
|
||||
// TRANSLATION MISSING
|
||||
| ◾◽◽ | - | chat: fset buffer | Select line in fset buffer. | `+/window ${_window_number};/fset -go ${_chat_line_y}+`
|
||||
| kbd:[■ □ □] | - | chat: fset buffer | Select line in fset buffer. | `+/window ${_window_number};/fset -go ${fset_option_index}+`
|
||||
// TRANSLATION MISSING
|
||||
| ◽◽◾ | - | chat: fset buffer | Toggle boolean (on/off) or edit the option value. | `+hsignal:fset_mouse+`
|
||||
| kbd:[□ □ ■] | - | chat: fset buffer | Toggle boolean (on/off) or edit the option value. | `+hsignal:fset_mouse+`
|
||||
// TRANSLATION MISSING
|
||||
| ◽◽◾ | left | chat: fset buffer | Decrease value for integer/color, set/append to value for other types. | `+hsignal:fset_mouse+`
|
||||
| kbd:[□ □ ■] | left | chat: fset buffer | Decrease value for integer/color/enum, set/append to value for other types. | `+hsignal:fset_mouse+`
|
||||
// TRANSLATION MISSING
|
||||
| ◽◽◾ | right | chat: fset buffer | Increase value for integer/color, set/append to value for other types. | `+hsignal:fset_mouse+`
|
||||
| kbd:[□ □ ■] | right | chat: fset buffer | Increase value for integer/color/enum, set/append to value for other types. | `+hsignal:fset_mouse+`
|
||||
// TRANSLATION MISSING
|
||||
| ◽◽◾ | up / down | chat: fset buffer | Mark/unmark multiple options. | `+hsignal:fset_mouse+`
|
||||
| kbd:[□ □ ■] | up / down | chat: fset buffer | Mark/unmark multiple options. | `+hsignal:fset_mouse+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[▲] | - | chat: /list buffer | Move five lines up in /list buffer. | `+/list -up 5+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[▼] | - | chat: /list buffer | Move five lines down in /list buffer. | `+/list -down 5+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[■ □ □] | - | chat: /list buffer | Select line in /list buffer. | `+/window ${_window_number};/list -go ${_chat_line_y}+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[□ □ ■] | - | chat: /list buffer | Join IRC channel on selected line. | `+hsignal:irc_list_mouse+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[▲] | - | chat: script buffer | Move 5 lines up in script buffer. | `+/script up 5+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[▼] | - | chat: script buffer | Move 5 lines down in script buffer. | `+/script down 5+`
|
||||
// TRANSLATION MISSING
|
||||
| ◾◽◽ | - | chat: script buffer | Select line in script buffer. | `+/script go ${_chat_line_y}+`
|
||||
| kbd:[■ □ □] | - | chat: script buffer | Select line in script buffer. | `+/script go ${_chat_line_y}+`
|
||||
// TRANSLATION MISSING
|
||||
| ◽◽◾ | - | chat: script buffer | Install/remove script. | `+/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[□ □ ■] | - | chat: script buffer | Install/remove script. | `+/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
// TRANSLATION MISSING
|
||||
| ◾◽◽ | up / left | buflist | Move buffer to a lower number. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | up / left | buflist | Move buffer to a lower number. | Signal `+buflist_mouse+`.
|
||||
// TRANSLATION MISSING
|
||||
| ◾◽◽ | down / right | buflist | Move buffer to a higher number. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | down / right | buflist | Move buffer to a higher number. | Signal `+buflist_mouse+`.
|
||||
// TRANSLATION MISSING
|
||||
| ◾◽◽ | - | buflist | Switch to buffer (previously visited buffer if the buffer is the current one). | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | - | buflist | Switch to buffer (previously visited buffer if the buffer is the current one). | Signal `+buflist_mouse+`.
|
||||
// TRANSLATION MISSING
|
||||
| ◽◽◾ | - | buflist | Switch to next visited buffer if the buffer is the current one. | Signal `+buflist_mouse+`.
|
||||
| kbd:[□ □ ■] | - | buflist | Switch to next visited buffer if the buffer is the current one. | Signal `+buflist_mouse+`.
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[Ctrl+▲] | - | buflist | Switch to previous buffer. | Signal `+buflist_mouse+`.
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[Ctrl+▼] | - | buflist | Switch to next buffer. | Signal `+buflist_mouse+`.
|
||||
| ◾◽◽ | su | lista nick | Scorre di una pagina in alto nella lista nick. | `+/bar scroll nicklist ${_window_number} -100%+`
|
||||
| ◾◽◽ | giù | lista nick | Scorre di una pagina in basso nella lista nick. | `+/bar scroll nicklist ${_window_number} +100%+`
|
||||
| ◾◽◽ | up (lungo) | lista nick | Sposta all'inizio della lista nick. | `+/bar scroll nicklist ${_window_number} b+`
|
||||
| ◾◽◽ | giù (lungo) | lista nick | Sposta alla fine della lista nick. | `+/bar scroll nicklist ${_window_number} e+`
|
||||
| ◾◽◽ | - | lista nick | Apre una query con un nick. | `+/window ${_window_number};/query ${nick}+`
|
||||
| ◽◽◾ | - | lista nick | Effettua un whois su un nick. | `+/window ${_window_number};/whois ${nick}+`
|
||||
| ◾◽◽ | sinistra | lista nick | Kick di un nick. | `+/window ${_window_number};/kick ${nick}+`
|
||||
| ◾◽◽ | sinistra (lungo) | lista nick | Kick e ban di un nick. | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| ◽◽◾ | sinistra | lista nick | Ban di un nick. | `+/window ${_window_number};/ban ${nick}+`
|
||||
| ◽◽◾ | - | input | Cattura un evento del mouse e inserisce il codice nella riga di comando. | `+/input grab_mouse_area+`
|
||||
| kbd:[■ □ □] | su | lista nick | Scorre di una pagina in alto nella lista nick. | `+/bar scroll nicklist ${_window_number} -100%+`
|
||||
| kbd:[■ □ □] | giù | lista nick | Scorre di una pagina in basso nella lista nick. | `+/bar scroll nicklist ${_window_number} +100%+`
|
||||
| kbd:[■ □ □] | up (lungo) | lista nick | Sposta all'inizio della lista nick. | `+/bar scroll nicklist ${_window_number} b+`
|
||||
| kbd:[■ □ □] | giù (lungo) | lista nick | Sposta alla fine della lista nick. | `+/bar scroll nicklist ${_window_number} e+`
|
||||
| kbd:[■ □ □] | - | lista nick | Apre una query con un nick. | `+/window ${_window_number};/query ${nick}+`
|
||||
| kbd:[□ □ ■] | - | lista nick | Effettua un whois su un nick. | `+/window ${_window_number};/whois ${nick}+`
|
||||
| kbd:[■ □ □] | sinistra | lista nick | Kick di un nick. | `+/window ${_window_number};/kick ${nick}+`
|
||||
| kbd:[■ □ □] | sinistra (lungo) | lista nick | Kick e ban di un nick. | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| kbd:[□ □ ■] | sinistra | lista nick | Ban di un nick. | `+/window ${_window_number};/ban ${nick}+`
|
||||
| kbd:[□ □ ■] | - | input | Cattura un evento del mouse e inserisce il codice nella riga di comando. | `+/input grab_mouse_area+`
|
||||
| kbd:[▲] | - | ogni barra | Scorre la barra del -20%. | `+/bar scroll ${_bar_name} ${_window_number} -20%+`
|
||||
| kbd:[▼] | - | ogni barra | Scorre la barra del +20%. | `+/bar scroll ${_bar_name} ${_window_number} +20%+`
|
||||
| ◽◾◽ | - | ovunque | Avvia la modalità cursore in questo punto. | `+/cursor go ${_x},${_y}+`
|
||||
| kbd:[□ ■ □] | - | ovunque | Avvia la modalità cursore in questo punto. | `+/cursor go ${_x},${_y}+`
|
||||
|===
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[NOTE]
|
||||
^(1)^ kbd:[▲] and kbd:[▼] are wheel up and down.
|
||||
// TRANSLATION MISSING
|
||||
^(1)^ Buttons: +
|
||||
kbd:[◼ □ □]: click on left button +
|
||||
kbd:[□ ◼ □]: click on middle button +
|
||||
kbd:[□ □ ◼]: click on right button +
|
||||
Wheel: +
|
||||
kbd:[▲]: wheel up +
|
||||
kbd:[▼]: wheel down
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[key_bindings_fset_buffer]]
|
||||
@@ -1956,8 +2054,8 @@ These keys and actions are used on the fset buffer (see <<fset,Fset plugin>>).
|
||||
| kbd:[F11] | `pass:[<]` | Scroll horizontally on the left. | `+/fset -left+`
|
||||
| kbd:[F12] | `pass:[>]` | Scroll horizontally on the right. | `+/fset -right+`
|
||||
| kbd:[Alt+Space] | `t` | Toggle boolean value. | `+/fset -toggle+`
|
||||
| kbd:[Alt+-] | `-` | Subtract 1 from value for integer/color, set value for other types. | `+/fset -add -1+`
|
||||
| kbd:[Alt++] | `+` | Add 1 to value for integer/color, append to value for other types. | `+/fset -add 1+`
|
||||
| kbd:[Alt+-] | `-` | Subtract 1 from value for integer/color/enum, set value for other types. | `+/fset -add -1+`
|
||||
| kbd:[Alt++] | `+` | Add 1 to value for integer/color/enum, append to value for other types. | `+/fset -add 1+`
|
||||
| kbd:[Alt+f], kbd:[Alt+r] | `r` | Reset value. | `+/fset -reset+`
|
||||
| kbd:[Alt+f], kbd:[Alt+u] | `u` | Unset value. | `+/fset -unset+`
|
||||
| kbd:[Alt+Enter] | `s` | Set value. | `+/fset -set+`
|
||||
@@ -1971,8 +2069,8 @@ These keys and actions are used on the fset buffer (see <<fset,Fset plugin>>).
|
||||
| kbd:[Ctrl+l] (`L`) | | Refresh options and whole screen. | `+/fset -refresh+`
|
||||
| | `$` | Refresh options (keep marked options). |
|
||||
| | `$$` | Refresh options (unmark all options). |
|
||||
| kbd:[Alt+p] | | Toggle plugin description options (`pass:[plugins.desc.*]`). | `+/mute /set fset.look.show_plugins_desc toggle+`
|
||||
| kbd:[Alt+v] | | Toggle help bar. | `+/bar toggle fset+`
|
||||
| kbd:[Alt+p] | `p` | Toggle plugin description options (`pass:[plugins.desc.*]`). | `+/mute /set fset.look.show_plugins_desc toggle+`
|
||||
| kbd:[Alt+v] | `v` | Toggle help bar. | `+/bar toggle fset+`
|
||||
| | `s:x,y` | Sort options by fields x,y (see option <<option_fset.look.sort,fset.look.sort>>). | `+/mute /set fset.look.sort x,y+`
|
||||
| | `s:` | Reset sort to its default value (see option <<option_fset.look.sort,fset.look.sort>>). | `+/mute /unset fset.look.sort+`
|
||||
| | `w:xxx` | Export options in file "xxx". | `+/fset -export xxx+`
|
||||
@@ -1986,6 +2084,40 @@ These keys and actions are used on the fset buffer (see <<fset,Fset plugin>>).
|
||||
[NOTE]
|
||||
^(1)^ The action must be entered as input on the command line, followed by kbd:[Enter].
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[key_bindings_irc_list_buffer]]
|
||||
=== IRC /list buffer
|
||||
|
||||
These keys and actions are used on the IRC /list buffer (see command <<command_irc_list,/list>>).
|
||||
|
||||
[width="100%",cols="^.^3,^.^2,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Key | Action ^(1)^ | Description | Command
|
||||
| kbd:[↑] | | Move one line up. | `+/list -up+`
|
||||
| kbd:[↓] | | Move one line down. | `+/list -down+`
|
||||
| kbd:[PgUp] | | Move one page up. | `+/window page_up+`
|
||||
| kbd:[PgDn] | | Move one page down. | `+/window page_down+`
|
||||
| kbd:[Alt+Home] | `pass:[<<]` | Move to first line. | `+/list -go 0+`
|
||||
| kbd:[Alt+End] | `pass:[>>]` | Move to last line. | `+/list -go end+`
|
||||
| kbd:[F11] | `pass:[<]` | Scroll horizontally on the left. | `+/list -left+`
|
||||
| kbd:[F12] | `pass:[>]` | Scroll horizontally on the right. | `+/list -right+`
|
||||
| kbd:[Ctrl+j] | `j` | Join IRC channel on selected line. | `+/list -join+`
|
||||
| | `xxx` | Show only channels with "xxx" in name or topic (case insensitive). |
|
||||
| | `n:xxx` | Show only channels with "xxx" in name (case insensitive). |
|
||||
| | `t:xxx` | Show only channels with "xxx" in topic (case insensitive). |
|
||||
| | `u:n` | Show only channels with at least "n" users. |
|
||||
| | `u:>n` | Show only channels with more than "n" users. |
|
||||
| | `u:<n` | Show only channels with less than "n" users. |
|
||||
| | `c:xxx` | Show only channels matching the evaluated condition "xxx", using following variables: name, name2, users, topic. |
|
||||
| | `s:x,y` | Sort channels by fields x,y (see command <<command_irc_list,/list>>). |
|
||||
| | `s:` | Reset sort to its default value (see command <<command_irc_list,/list>>). |
|
||||
| | `$` | Refresh list (run again command <<command_irc_list,/list>>). |
|
||||
| | `q` | Close buffer. | `+/buffer close+`
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ The action must be entered as input on the command line, followed by kbd:[Enter].
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[key_bindings_script_buffer]]
|
||||
=== Script buffer
|
||||
@@ -2003,11 +2135,16 @@ These keys and actions are used on the script buffer (see <<script_manager,scrip
|
||||
| kbd:[PgDn] | | Move one page down. | `+/window page_down+`
|
||||
| kbd:[Alt+i] | `i` | Install script. | `+/script install+`
|
||||
| kbd:[Alt+r] | `r` | Remove script. | `+/script remove+`
|
||||
| kbd:[Alt+l] (`L`) | `l` | Load script. | `+/script load+`
|
||||
| kbd:[Alt+l] | `l` | Load script. | `+/script load+`
|
||||
| kbd:[Alt+L] | `L` | Reload script. | `+/script reload+`
|
||||
| kbd:[Alt+u] | `u` | Unload script. | `+/script unload+`
|
||||
| kbd:[Alt+Shift+A] | `A` | Autoload script. | `+/script toggleautoload+`
|
||||
| kbd:[Alt+h] | `h` | Hold/unhold script. | `+/script hold+`
|
||||
| kbd:[Alt+v] | `v` | View script. | `+/script show+`
|
||||
| | `s:x,y` | Sort scripts by fields x,y (see option <<option_script.look.sort,script.look.sort>>). |
|
||||
| | `s:` | Reset sort to its default value (see option <<option_script.look.sort,script.look.sort>>). |
|
||||
| | `$` | Refresh list. |
|
||||
| | `q` | Close buffer. | `+/buffer close+`
|
||||
|===
|
||||
|
||||
// TRANSLATION MISSING
|
||||
@@ -2035,7 +2172,7 @@ Example of fset buffer displaying options starting with `weechat.look` :
|
||||
│2.fset │weechat.look.bare_display_exit_on_input: exit the bare display mode on any c│
|
||||
│ │hanges in input [default: on] │
|
||||
│ │----------------------------------------------------------------------------│
|
||||
│ │ weechat.look.align_end_of_lines integer message │
|
||||
│ │ weechat.look.align_end_of_lines enum message │
|
||||
│ │ weechat.look.align_multiline_words boolean on │
|
||||
│ │ weechat.look.bar_more_down string "++" │
|
||||
│ │ weechat.look.bar_more_left string "<<" │
|
||||
@@ -2044,12 +2181,12 @@ Example of fset buffer displaying options starting with `weechat.look` :
|
||||
│ │## weechat.look.bare_display_exit_on_input boolean on ##│
|
||||
│ │ weechat.look.bare_display_time_format string "%H:%M" │
|
||||
│ │ weechat.look.buffer_auto_renumber boolean on │
|
||||
│ │ weechat.look.buffer_notify_default integer all │
|
||||
│ │ weechat.look.buffer_position integer end │
|
||||
│ │ weechat.look.buffer_notify_default enum all │
|
||||
│ │ weechat.look.buffer_position enum end │
|
||||
│ │ weechat.look.buffer_search_case_sensitive boolean off │
|
||||
│ │ weechat.look.buffer_search_force_default boolean off │
|
||||
│ │ weechat.look.buffer_search_regex boolean off │
|
||||
│ │ weechat.look.buffer_search_where integer prefix_message │
|
||||
│ │ weechat.look.buffer_search_where enum prefix_message │
|
||||
│ │ weechat.look.buffer_time_format string "%H:%M:%S" │
|
||||
│ │ weechat.look.buffer_time_same string "" │
|
||||
│ │[12:55] [2] [fset] 2:fset │
|
||||
@@ -2386,14 +2523,9 @@ and for each nick the max hotlist level to trigger, possible levels are:
|
||||
For example to disable highlights from "joe" and "mike" on current buffer:
|
||||
|
||||
----
|
||||
/buffer set hotlist_max_level_nicks_add joe:2,mike:2
|
||||
/buffer setauto hotlist_max_level_nicks_add joe:2,mike:2
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
The buffer property "hotlist_max_level_nicks" is not saved in configuration. +
|
||||
You can easily save it with the script _buffer_autoset.py_: you can install it
|
||||
with `+/script install buffer_autoset.py+` and get help with `+/help buffer_autoset+`.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[highlights]]
|
||||
=== Highlights
|
||||
@@ -2420,15 +2552,9 @@ This can also be set with the buffer property "highlight_disable_regex".
|
||||
Same example, specific to the current buffer:
|
||||
|
||||
----
|
||||
/buffer set highlight_disable_regex <flash.*>
|
||||
/buffer setauto highlight_disable_regex <flash.*>
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
The buffer property "highlight_disable_regex" is not saved in configuration. +
|
||||
You can easily save it with the script _buffer_autoset.py_: you can install it
|
||||
with `+/script install buffer_autoset.py+` and get help with
|
||||
`+/help buffer_autoset+`.
|
||||
|
||||
[[highlights_words]]
|
||||
==== Add words to highlight
|
||||
|
||||
@@ -2483,14 +2609,9 @@ You can force highlight using a regular expression with the buffer property
|
||||
For example to force the highlight on all messages in the current buffer:
|
||||
|
||||
----
|
||||
/buffer set highlight_regex .*
|
||||
/buffer setauto highlight_regex .*
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
The buffer property "highlight_regex" is not saved in configuration. +
|
||||
You can easily save it with the script _buffer_autoset.py_: you can install it
|
||||
with `+/script install buffer_autoset.py+` and get help with `+/help buffer_autoset+`.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[buffer_logging]]
|
||||
=== Buffer logging
|
||||
@@ -3415,32 +3536,34 @@ Sections in file _weechat.conf_:
|
||||
// TRANSLATION MISSING
|
||||
[width="100%",cols="3m,6m,16",options="header"]
|
||||
|===
|
||||
| Section | Control command | Description
|
||||
| debug | <<command_weechat_debug,/debug set>> +
|
||||
/set weechat.debug.* | Debug level, for core and plugins (options can be added/removed in section).
|
||||
| startup | /set weechat.startup.* | Startup options.
|
||||
| look | /set weechat.look.* | Look and feel.
|
||||
| palette | <<command_weechat_color,/color alias>> +
|
||||
/set weechat.palette.* | Color aliases (options can be added/removed in section).
|
||||
| color | /set weechat.color.* | Colors.
|
||||
| completion | /set weechat.completion.* | Completion options.
|
||||
| history | /set weechat.history.* | History options (commands and buffers).
|
||||
| proxy | <<command_weechat_proxy,/proxy>> +
|
||||
/set weechat.proxy.* | Proxy options.
|
||||
| network | /set weechat.network.* | Network/TLS options.
|
||||
| Section | Control command | Description
|
||||
| debug | <<command_weechat_debug,/debug set>> +
|
||||
/set weechat.debug.* | Debug level, for core and plugins (options can be added/removed in section).
|
||||
| startup | /set weechat.startup.* | Startup options.
|
||||
| look | /set weechat.look.* | Look and feel.
|
||||
| palette | <<command_weechat_color,/color alias>> +
|
||||
/set weechat.palette.* | Color aliases (options can be added/removed in section).
|
||||
| color | /set weechat.color.* | Colors.
|
||||
| completion | /set weechat.completion.* | Completion options.
|
||||
| history | /set weechat.history.* | History options (commands and buffers).
|
||||
| proxy | <<command_weechat_proxy,/proxy>> +
|
||||
/set weechat.proxy.* | Proxy options.
|
||||
| network | /set weechat.network.* | Network/TLS options.
|
||||
// TRANSLATION MISSING
|
||||
| plugin | /set weechat.plugin.* | Options on plugins.
|
||||
| plugin | /set weechat.plugin.* | Options on plugins.
|
||||
// TRANSLATION MISSING
|
||||
| signal | /set weechat.signal.* | Options on signals.
|
||||
| bar | <<command_weechat_bar,/bar>> +
|
||||
/set weechat.bar.* | Bar options.
|
||||
| layout | <<command_weechat_layout,/layout>> | Layouts.
|
||||
| notify | <<command_weechat_buffer,/buffer notify>> | Notify levels for buffers (options can be added/removed in section).
|
||||
| filter | <<command_weechat_filter,/filter>> | Filters.
|
||||
| key | <<command_weechat_key,/key>> | Keys in default context.
|
||||
| key_search | <<command_weechat_key,/key>> | Keys in search context.
|
||||
| key_cursor | <<command_weechat_key,/key>> | Keys in cursor context.
|
||||
| key_mouse | <<command_weechat_key,/key>> | Keys in mouse context.
|
||||
| signal | /set weechat.signal.* | Options on signals.
|
||||
| bar | <<command_weechat_bar,/bar>> +
|
||||
/set weechat.bar.* | Bar options.
|
||||
| layout | <<command_weechat_layout,/layout>> | Layouts.
|
||||
// TRANSLATION MISSING
|
||||
| buffer | <<command_weechat_buffer,/buffer setauto>> | Properties auto-applied on buffers when they are opened.
|
||||
| notify | <<command_weechat_buffer,/buffer notify>> | Notify levels for buffers (options can be added/removed in section).
|
||||
| filter | <<command_weechat_filter,/filter>> | Filters.
|
||||
| key | <<command_weechat_key,/key>> | Keys in default context.
|
||||
| key_search | <<command_weechat_key,/key>> | Keys in search context.
|
||||
| key_cursor | <<command_weechat_key,/key>> | Keys in cursor context.
|
||||
| key_mouse | <<command_weechat_key,/key>> | Keys in mouse context.
|
||||
|===
|
||||
|
||||
// TRANSLATION MISSING
|
||||
@@ -3542,7 +3665,7 @@ irc.server.libera.autorejoin_delay integer null -> 30
|
||||
irc.server.libera.away_check integer null -> 0
|
||||
irc.server.libera.away_check_max_nicks integer null -> 25
|
||||
irc.server.libera.capabilities string null -> "*"
|
||||
irc.server.libera.charset_message integer null -> message
|
||||
irc.server.libera.charset_message enum null -> message
|
||||
irc.server.libera.command string null -> ""
|
||||
irc.server.libera.command_delay integer null -> 0
|
||||
irc.server.libera.connection_timeout integer null -> 60
|
||||
@@ -3558,9 +3681,9 @@ irc.server.libera.notify string null -> ""
|
||||
irc.server.libera.password string null -> ""
|
||||
irc.server.libera.proxy string null -> ""
|
||||
irc.server.libera.realname string null -> ""
|
||||
irc.server.libera.sasl_fail integer null -> reconnect
|
||||
irc.server.libera.sasl_fail enum null -> reconnect
|
||||
irc.server.libera.sasl_key string null -> ""
|
||||
irc.server.libera.sasl_mechanism integer null -> plain
|
||||
irc.server.libera.sasl_mechanism enum null -> plain
|
||||
irc.server.libera.sasl_password string "${sec.data.libera}"
|
||||
irc.server.libera.sasl_timeout integer null -> 15
|
||||
irc.server.libera.sasl_username string "alice"
|
||||
@@ -4302,7 +4425,7 @@ Ad esempio, per personalizzare la richiesta CTCP "VERSIONE", utilizzare il
|
||||
seguente comando:
|
||||
|
||||
----
|
||||
/set irc.ctcp.version "Uso WeeChat $version, fico!"
|
||||
/set irc.ctcp.version "Uso WeeChat ${version}, fico!"
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
@@ -4328,7 +4451,7 @@ può rispondere "BLABLA":
|
||||
interno prima del nome CTCP:
|
||||
|
||||
----
|
||||
/set irc.ctcp.libera.version "WeeChat $version (per libera)"
|
||||
/set irc.ctcp.libera.version "WeeChat ${version} (per libera)"
|
||||
----
|
||||
|
||||
Se si desidera ripristinare la risposta CTCP standard, allora disabilitare
|
||||
@@ -4338,24 +4461,27 @@ l'opzione:
|
||||
/unset irc.ctcp.version
|
||||
----
|
||||
|
||||
I codici seguenti possono essere utilizzati nelle stringhe e vengono estese
|
||||
automaticamente da WeeChat quando si risponde alle CTCP
|
||||
// TRANSLATION MISSING
|
||||
The CTCP replies are evaluated (see command <<command_weechat_eval,/eval>>) and
|
||||
the following extra variables are available:
|
||||
|
||||
// TRANSLATION MISSING ($versiongit + $git + $username (name))
|
||||
[width="100%",cols="2l,4,8",options="header"]
|
||||
[width="100%",cols="2,4,8",options="header"]
|
||||
|===
|
||||
| Codice | Descrizione | Valore/esempio
|
||||
| $clientinfo | Elenco di CTCP supportate | `+ACTION DCC CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION+`
|
||||
| $version | Versione di WeeChat | `+0.4.0-dev+`
|
||||
| $versiongit | Versione di WeeChat + Git version ^(1)^ | `+0.4.0-dev (git: v0.3.9-104-g7eb5cc4)+`
|
||||
| $git | Git version ^(1)^ | `+v0.3.9-104-g7eb5cc4+`
|
||||
| $compilation | Data di compilazione di WeeChat | `+Dec 16 2012+`
|
||||
| $osinfo | Informazioni sull'OS | `+Linux 2.6.32-5-amd64 / x86_64+`
|
||||
| $site | Sito di WeeChat | `+https://weechat.org/+`
|
||||
| $download | Sito di WeeChat, pagina di download | `+https://weechat.org/download/+`
|
||||
| $time | Data/ora correnti | `+Sun, 16 Dec 2012 10:40:48 +0100+`
|
||||
| $username | Nome utente sul server IRC | `+name+`
|
||||
| $realname | Nome reale sul server IRC | `+John Doe+`
|
||||
// TRANSLATION MISSING
|
||||
| Variable | Descrizione | Valore/esempio
|
||||
| `+${clientinfo}+` | Elenco di CTCP supportate | `+ACTION DCC CLIENTINFO PING SOURCE TIME VERSION+`
|
||||
| `+${version}+` | Versione di WeeChat | `+4.1.0-dev+`
|
||||
// TRANSLATION MISSING
|
||||
| `+${versiongit}+` | Versione di WeeChat + Git version ^(1)^ | `+4.1.0-dev (git: v4.0.0-51-g8f98b922a)+`
|
||||
// TRANSLATION MISSING
|
||||
| `+${git}+` | Git version ^(1)^ | `+v4.0.0-51-g8f98b922a+`
|
||||
| `+${compilation}+` | Data di compilazione di WeeChat | `+Jul 8 2023 20:14:23+`
|
||||
| `+${osinfo}+` | Informazioni sull'OS | `+Linux 5.10.0-23-amd64 / x86_64+`
|
||||
| `+${site}+` | Sito di WeeChat | `+https://weechat.org/+`
|
||||
| `+${download}+` | Sito di WeeChat, pagina di download | `+https://weechat.org/download/+`
|
||||
| `+${time}+` | Data/ora correnti | `+Sat, 08 Jul 2023 21:11:19 +0200+`
|
||||
| `+${username}+` | Nome utente sul server IRC | `+name+`
|
||||
| `+${realname}+` | Nome reale sul server IRC | `+John Doe+`
|
||||
|===
|
||||
|
||||
// TRANSLATION MISSING
|
||||
@@ -4363,19 +4489,16 @@ automaticamente da WeeChat quando si risponde alle CTCP
|
||||
^(1)^ The Git version is the output of command `git describe`. It is known only
|
||||
if WeeChat has been compiled inside the Git repository and if Git was installed.
|
||||
|
||||
Se le opzioni CTCP non sono definite (comportamento predefinito),
|
||||
le risposte CTCP sono:
|
||||
// TRANSLATION MISSING
|
||||
The default CTCP replies are:
|
||||
|
||||
// TRANSLATION MISSING ($username (name))
|
||||
[width="100%",cols="2,4,8",options="header"]
|
||||
|===
|
||||
| CTCP | Formato risposta | Esempio
|
||||
| CLIENTINFO | `+$clientinfo+` | `+ACTION DCC CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION+`
|
||||
| FINGER | `+WeeChat $versiongit+` | `+WeeChat 0.4.0-dev (git: v0.3.9-104-g7eb5cc4)+`
|
||||
| SOURCE | `+$download+` | `+https://weechat.org/download/+`
|
||||
| TIME | `+$time+` | `+Sun, 16 Dec 2012 10:40:48 +0100+`
|
||||
| USERINFO | `+$username ($realname)+` | `+name (John Doe)+`
|
||||
| VERSION | `+WeeChat $versiongit ($compilation)+` | `+WeeChat 0.4.0-dev (git: v0.3.9-104-g7eb5cc4) (Dec 16 2012)+`
|
||||
| CTCP | Formato risposta | Esempio
|
||||
| CLIENTINFO | `+${clientinfo}+` | `+ACTION DCC CLIENTINFO PING SOURCE TIME VERSION+`
|
||||
| SOURCE | `+${download}+` | `+https://weechat.org/download/+`
|
||||
| TIME | `+${time}+` | `+Sat, 08 Jul 2023 21:11:19 +0200+`
|
||||
| VERSION | `+WeeChat ${version}+` | `+WeeChat 4.1.0-dev+`
|
||||
|===
|
||||
|
||||
[[irc_target_buffer]]
|
||||
|
||||
@@ -152,6 +152,8 @@ WeeChat "core" は以下のディレクトリに配置されています:
|
||||
// TRANSLATION MISSING
|
||||
| wee-signal.c | Signal functions.
|
||||
| wee-string.c | 文字列関数
|
||||
// TRANSLATION MISSING
|
||||
| wee-sys.c | System functions.
|
||||
| wee-upgrade-file.c | 内部アップグレードシステム
|
||||
| wee-upgrade.c | WeeChat コアのアップグレード (バッファ、行、履歴、...)
|
||||
| wee-url.c | URL 転送 (libcurl を使う)
|
||||
@@ -178,6 +180,7 @@ WeeChat "core" は以下のディレクトリに配置されています:
|
||||
| wee-hook-process.c | "process" フック
|
||||
| wee-hook-signal.c | "signal" フック
|
||||
| wee-hook-timer.c | "timer" フック
|
||||
| wee-hook-url.c | "url" フック
|
||||
| gui/ | バッファ、ウィンドウなどの関数 (全てのインターフェースで利用)
|
||||
| gui-bar-item.c | バー要素
|
||||
| gui-bar-window.c | バーウィンドウ
|
||||
@@ -248,6 +251,8 @@ WeeChat "core" は以下のディレクトリに配置されています:
|
||||
| buflist.c | buflist の主要関数
|
||||
| buflist-bar-item.c | buflist バー要素
|
||||
| buflist-command.c | buflist コマンド
|
||||
// TRANSLATION MISSING
|
||||
| buflist-completion.c | Buflist completions.
|
||||
| buflist-config.c | buflist 設定オプション (buflist.conf ファイル)
|
||||
| buflist-info.c | buflist の情報/インフォリスト/hdata
|
||||
| buflist-mouse.c | buflist マウス動作
|
||||
@@ -295,6 +300,8 @@ WeeChat "core" は以下のディレクトリに配置されています:
|
||||
| irc-input.c | コマンドおよびテキストの入力
|
||||
// TRANSLATION MISSING
|
||||
| irc-join.c | Functions for list of channels to join.
|
||||
// TRANSLATION MISSING
|
||||
| irc-list.c | Buffer for reply to /list command.
|
||||
| irc-message.c | IRC メッセージを操作する関数
|
||||
| irc-mode.c | チャンネルおよびニックネームのモードを操作する関数
|
||||
| irc-modelist.c | IRC チャンネルモードリスト (+b、+e、+I、...).
|
||||
@@ -450,6 +457,8 @@ WeeChat "core" は以下のディレクトリに配置されています:
|
||||
| test-core-url.cpp | テスト: URL
|
||||
| test-core-utf8.cpp | テスト: UTF-8
|
||||
| test-core-util.cpp | テスト: ユーティリティ関数
|
||||
// TRANSLATION MISSING
|
||||
| test-core-sys.cpp | Tests: system functions.
|
||||
| gui/ | インターフェースの単体テストを収める最上位ディレクトリ
|
||||
// TRANSLATION MISSING
|
||||
| test-gui-bar-window.cpp | Tests: bar window functions.
|
||||
@@ -479,10 +488,14 @@ WeeChat "core" は以下のディレクトリに配置されています:
|
||||
| test-irc-color.cpp | Tests: IRC colors.
|
||||
| test-irc-config.cpp | テスト: IRC 設定
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-ctcp.cpp | Tests: IRC CTCP.
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-ignore.cpp | Tests: IRC ignores.
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-join.cpp | Tests: IRC join functions.
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-list.cpp | Tests: IRC buffer for reply to /list command.
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-message.cpp | Tests: IRC messages.
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-mode.cpp | Tests: IRC modes.
|
||||
|
||||
+66
-23
@@ -598,6 +598,15 @@ macOS のターミナル.app を使っている場合、設定メニューのキ
|
||||
キーを使用」を有効化してください。こうすることで、kbd:[Option]
|
||||
キーをメタキーとして使うことが可能です。
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[enter_key]]
|
||||
=== Some keys including Enter are not working, why?
|
||||
|
||||
If you run a WeeChat < 4.0.0 with configuration files created by any
|
||||
version ≥ 4.0.0, the keys names become invalid and many keys won't work at all. +
|
||||
To repair them, exit WeeChat, remove all sections `[key*]` from weechat.conf
|
||||
and start WeeChat again: all default keys will be created.
|
||||
|
||||
[[customize_key_bindings]]
|
||||
=== どうすればキー割り当てをカスタマイズできますか。
|
||||
|
||||
@@ -626,6 +635,13 @@ macOS のターミナル.app を使っている場合、設定メニューのキ
|
||||
/trigger add numberjump modifier "2000|input_text_for_buffer" "${tg_string} =~ ^/[0-9]+$" "=\/([0-9]+)=/buffer *${re:1}=" "" "" "none"
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
For an easy jump to buffers, you can also install the _go.py_ script:
|
||||
|
||||
----
|
||||
/script install go.py
|
||||
----
|
||||
|
||||
[[global_history]]
|
||||
=== どうすればグローバルヒストリを (バッファヒストリの代わりに) 上下矢印キーで使えますか。
|
||||
|
||||
@@ -946,34 +962,22 @@ link:weechat_user.ja.html#max_hotlist_level_nicks[hotlist_max_level_nicks_add ^
|
||||
buffer property to set the max hotlist level for some nicks, per buffer,
|
||||
or per group of buffers (like IRC servers).
|
||||
|
||||
ハイライトを無効化するだけなら、このプロパティを 2 に設定してください:
|
||||
ハイライトを無効化するだけなら、このプロパティを 2 に設定してください.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
For the current buffer:
|
||||
|
||||
----
|
||||
/buffer set hotlist_max_level_nicks_add joe:2,mike:2
|
||||
/buffer setauto hotlist_max_level_nicks_add joe:2,mike:2
|
||||
----
|
||||
|
||||
このバッファプロパティは設定に保存されません。このバッファプロパティを自動的に適用するには、_buffer_autoset.py_
|
||||
スクリプトが必要です:
|
||||
// TRANSLATION MISSING
|
||||
For all channels on server "libera":
|
||||
|
||||
----
|
||||
/script install buffer_autoset.py
|
||||
/set weechat.buffer.irc.libera.*.hotlist_max_level_nicks_add joe:2,mike:2
|
||||
----
|
||||
|
||||
例えば、IRC サーバ libera のチャンネル #weechat に参加している "mike"
|
||||
の発言に対してハイライトを永久的に無効化するには以下のように設定します:
|
||||
|
||||
----
|
||||
/buffer_autoset add irc.libera.#weechat hotlist_max_level_nicks_add mike:2
|
||||
----
|
||||
|
||||
この設定をすべての libera サーバのバッファに対して適用するには以下のように設定します:
|
||||
|
||||
----
|
||||
/buffer_autoset add irc.libera hotlist_max_level_nicks_add mike:2
|
||||
----
|
||||
|
||||
これ以外の例は `+/help buffer_autoset+` を参照してください。
|
||||
|
||||
[[irc_target_buffer]]
|
||||
=== どうすればマージされたバッファ内であるコマンドを発行するターゲットバッファを変更できますか。
|
||||
|
||||
@@ -1104,7 +1108,10 @@ spell プラグインをリロードしてください:
|
||||
|
||||
以下に挙げる <<memory_usage,memory>> に関するヒントに従ってください:
|
||||
|
||||
* "nicklist" バーを非表示にする: `/bar hide nicklist`
|
||||
// TRANSLATION MISSING
|
||||
* "nicklist" バーを非表示にする: `/bar hide nicklist` (key: kbd:[Alt+Shift+N]).
|
||||
// TRANSLATION MISSING
|
||||
* Disable "buflist": `/buflist disable` (key: kbd:[Alt+Shift+B]).
|
||||
* ステータスバー時間に秒の表示を止める:
|
||||
`+/set weechat.look.item_time_format "%H:%M"+` (これはデフォルト値です)
|
||||
* コマンドライン内の単語スペルミスのリアルタイムチェックを無効にする (有効にしていた場合):
|
||||
@@ -1126,14 +1133,21 @@ IRC の退出および終了メッセージを無効化します:
|
||||
|
||||
----
|
||||
/set irc.ctcp.clientinfo ""
|
||||
/set irc.ctcp.finger ""
|
||||
/set irc.ctcp.source ""
|
||||
/set irc.ctcp.time ""
|
||||
/set irc.ctcp.userinfo ""
|
||||
/set irc.ctcp.version ""
|
||||
/set irc.ctcp.ping ""
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
With WeeChat < 4.1.0, other CTCP queries were replied by default and must be
|
||||
disabled as well:
|
||||
|
||||
----
|
||||
/set irc.ctcp.finger ""
|
||||
/set irc.ctcp.userinfo ""
|
||||
----
|
||||
|
||||
"xfer" プラグイン (これは IRC DCC 機能を使うためのものです) をアンロードして自動ロードを無効化します:
|
||||
|
||||
----
|
||||
@@ -1169,6 +1183,35 @@ stored in _sec.conf_ with the `/secure` command).
|
||||
|
||||
設定ファイルに関する詳しい情報はlink:weechat_user.ja.html#files_and_directories[ユーザーズガイド / ファイルとディレクトリ ^↗^^]を参照してください。
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[move_to_another_device]]
|
||||
=== I want to move my WeeChat to another device and keep my config, what should I copy?
|
||||
|
||||
First check directories used by WeeChat with this command: `/debug dirs`. +
|
||||
Directories home/config and home/data must be copied (all files and sub-directories).
|
||||
|
||||
For example if you're using XDG directories (default with WeeChat ≥ 3.2),
|
||||
the directories should be `$HOME/.config/weechat` and `$HOME/.local/share/weechat`. +
|
||||
If you're using a single directory (default with WeeChat < 3.2), the directory
|
||||
should be `$HOME/.weechat`.
|
||||
|
||||
[IMPORTANT]
|
||||
The WeeChat version on the new device must be greater than or equal to the version
|
||||
on the initial device. +
|
||||
Downgrading WeeChat configuration is *NOT SUPPORTED* and can break it,
|
||||
leading to unusable WeeChat.
|
||||
|
||||
Steps:
|
||||
|
||||
. Quit Weechat: `/quit` (or `/upgrade -quit` if you want to resume the session,
|
||||
which includes content of all buffers).
|
||||
. Copy all directories, sub-directories and files to the new device, keeping
|
||||
same names and permissions.
|
||||
. Optional: copy any file outside these directories that you refer to in your
|
||||
configuration (it's not recommended to use files outside WeeChat directories).
|
||||
. Start WeeChat on the new device: `weechat` (or `weechat --upgrade` if you
|
||||
saved the session).
|
||||
|
||||
[[development]]
|
||||
== 開発
|
||||
|
||||
|
||||
@@ -2430,7 +2430,6 @@ _WeeChat バージョン 2.4 以上で利用可。_
|
||||
|
||||
base 16、32、64 で文字列をエンコード。
|
||||
|
||||
|
||||
プロトタイプ:
|
||||
|
||||
[source,c]
|
||||
@@ -4141,18 +4140,28 @@ Supported hash algorithms:
|
||||
|
||||
[width="100%",cols="2,2,3,6",options="header"]
|
||||
|===
|
||||
| Value | Algorithm | Hash size | Notes
|
||||
| `+crc32+` | CRC32 | 4 bytes (32 bits) | Not a hash algorithm in the cryptographic sense.
|
||||
| `+md5+` | MD5 | 16 bytes (128 bits) | *Weak*, not recommended for cryptography usage.
|
||||
| `+sha1+` | SHA-1 | 20 bytes (160 bits) | *Weak*, not recommended for cryptography usage.
|
||||
| `+sha224+` | SHA-224 | 28 bytes (224 bits) |
|
||||
| `+sha256+` | SHA-256 | 32 bytes (256 bits) |
|
||||
| `+sha384+` | SHA-384 | 48 bytes (384 bits) |
|
||||
| `+sha512+` | SHA-512 | 64 bytes (512 bits) |
|
||||
| `+sha3-224+` | SHA3-224 | 28 bytes (224 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-256+` | SHA3-256 | 32 bytes (256 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-384+` | SHA3-384 | 48 bytes (384 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-512+` | SHA3-512 | 64 bytes (512 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| Value | Algorithm | Hash size | Notes
|
||||
| `+crc32+` | CRC32 | 4 bytes (32 bits) | Not a hash algorithm in the cryptographic sense.
|
||||
| `+md5+` | MD5 | 16 bytes (128 bits) | *Weak*, not recommended for cryptography usage.
|
||||
| `+sha1+` | SHA-1 | 20 bytes (160 bits) | *Weak*, not recommended for cryptography usage.
|
||||
| `+sha224+` | SHA-224 | 28 bytes (224 bits) |
|
||||
| `+sha256+` | SHA-256 | 32 bytes (256 bits) |
|
||||
| `+sha384+` | SHA-384 | 48 bytes (384 bits) |
|
||||
| `+sha512+` | SHA-512 | 64 bytes (512 bits) |
|
||||
| `+sha512-224+` | SHA-512/224 | 28 bytes (224 bits) | Algorithm available with libgcrypt ≥ 1.9.4.
|
||||
| `+sha512-256+` | SHA-512/256 | 32 bytes (256 bits) | Algorithm available with libgcrypt ≥ 1.9.4.
|
||||
| `+sha3-224+` | SHA3-224 | 28 bytes (224 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-256+` | SHA3-256 | 32 bytes (256 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-384+` | SHA3-384 | 48 bytes (384 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-512+` | SHA3-512 | 64 bytes (512 bits) | Algorithm available with libgcrypt ≥ 1.7.0.
|
||||
| `+blake2b-160+` | BLAKE2B-160 | 20 bytes (160 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
| `+blake2b-256+` | BLAKE2B-256 | 32 bytes (256 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
| `+blake2b-384+` | BLAKE2B-384 | 48 bytes (384 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
| `+blake2b-512+` | BLAKE2B-512 | 64 bytes (512 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
| `+blake2s-128+` | BLAKE2S-128 | 16 bytes (128 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
| `+blake2s-160+` | BLAKE2S-160 | 20 bytes (160 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
| `+blake2s-224+` | BLAKE2S-224 | 28 bytes (224 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
| `+blake2s-256+` | BLAKE2S-256 | 32 bytes (256 bits) | Algorithm available with libgcrypt ≥ 1.8.0.
|
||||
|===
|
||||
|
||||
戻り値:
|
||||
@@ -4592,7 +4601,8 @@ int weechat_file_compress (const char *from, const char *to,
|
||||
* _to_: destination file
|
||||
* _compressor_: the compressor to use, one of:
|
||||
** _gzip_: gzip compression
|
||||
** _zstd_: zstandard compression
|
||||
** _zstd_: zstandard compression (available only if zstd was enabled when
|
||||
WeeChat was compiled)
|
||||
* _compression_level_: compression level, between 1 (fast, low compression) to
|
||||
100 (slow, best compression)
|
||||
|
||||
@@ -6784,9 +6794,10 @@ my_section_read_cb (const void *pointer, void *data,
|
||||
{
|
||||
/* ... */
|
||||
|
||||
return WEECHAT_CONFIG_READ_OK;
|
||||
/* return WEECHAT_CONFIG_READ_MEMORY_ERROR; */
|
||||
/* return WEECHAT_CONFIG_READ_FILE_NOT_FOUND; */
|
||||
return WEECHAT_CONFIG_OPTION_SET_OK_CHANGED;
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE; */
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_ERROR; */
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND; */
|
||||
}
|
||||
|
||||
int
|
||||
@@ -6876,7 +6887,7 @@ def config_new_section(config_file: str, name: str,
|
||||
callback_delete_option: str, callback_delete_option_data: str) -> str: ...
|
||||
|
||||
# 例
|
||||
def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
|
||||
def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: Union[str, None]) -> int:
|
||||
# ...
|
||||
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
|
||||
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
|
||||
@@ -6895,7 +6906,7 @@ def my_section_write_default_cb(data: str, config_file: str, section_name: str)
|
||||
# return weechat.WEECHAT_CONFIG_WRITE_ERROR
|
||||
# return weechat.WEECHAT_CONFIG_WRITE_MEMORY_ERROR
|
||||
|
||||
def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
|
||||
def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: Union[str, None]) -> int:
|
||||
# ...
|
||||
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
|
||||
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
|
||||
@@ -6960,7 +6971,8 @@ section = weechat.config_search_section(config_file, "section")
|
||||
|
||||
==== config_new_option
|
||||
|
||||
_WeeChat バージョン 1.5 で更新。_
|
||||
// TRANSLATION MISSING
|
||||
_Updated in 1.5, 4.1.0._
|
||||
|
||||
設定ファイルのあるセクションに新しいオプションを作成。
|
||||
|
||||
@@ -7008,12 +7020,15 @@ struct t_config_option *weechat_config_new_option (
|
||||
"name << file.section.option"
|
||||
* _type_: オプションの型:
|
||||
** _boolean_: ブール値 (on/off)
|
||||
** _integer_: 整数値 (任意で文字列を受けるようにすることも可)
|
||||
** _integer_: 整数値
|
||||
** _string_: 文字列
|
||||
** _color_: 色
|
||||
// TRANSLATION MISSING
|
||||
** _enum_: list of string values (stored as integer internally)
|
||||
* _description_: オプションの説明
|
||||
// TRANSLATION MISSING
|
||||
* _string_values_: 文字列で値を受ける
|
||||
(`+|+` で区切る)、_integer_ 型の場合に使う (任意)
|
||||
(`+|+` で区切る) (optional, required for type _enum_)
|
||||
* _min_: 最小値 (_integer_ 型で有効)
|
||||
* _max_: 最大値 (_integer_ 型で有効)
|
||||
* _default_value_: オプションのデフォルト値 (オプションをリセットした際に使われる)
|
||||
@@ -7064,8 +7079,8 @@ C 言語での使用例:
|
||||
[source,c]
|
||||
----
|
||||
/* boolean */
|
||||
struct t_config_option *option1 =
|
||||
weechat_config_new_option (config_file, section, "option1", "boolean",
|
||||
struct t_config_option *option_bool =
|
||||
weechat_config_new_option (config_file, section, "option_bool", "boolean",
|
||||
"My option, type boolean",
|
||||
NULL,
|
||||
0, 0,
|
||||
@@ -7077,8 +7092,8 @@ struct t_config_option *option1 =
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* integer */
|
||||
struct t_config_option *option2 =
|
||||
weechat_config_new_option (config_file, section, "option2", "integer",
|
||||
struct t_config_option *option_int =
|
||||
weechat_config_new_option (config_file, section, "option_int", "integer",
|
||||
"My option, type integer",
|
||||
NULL,
|
||||
0, 100,
|
||||
@@ -7089,22 +7104,9 @@ struct t_config_option *option2 =
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* integer (with string values) */
|
||||
struct t_config_option *option3 =
|
||||
weechat_config_new_option (config_file, section, "option3", "integer",
|
||||
"My option, type integer (with string values)",
|
||||
"top|bottom|left|right",
|
||||
0, 0,
|
||||
"bottom",
|
||||
"bottom",
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* string */
|
||||
struct t_config_option *option4 =
|
||||
weechat_config_new_option (config_file, section, "option4", "string",
|
||||
struct t_config_option *option_str =
|
||||
weechat_config_new_option (config_file, section, "option_str", "string",
|
||||
"My option, type string",
|
||||
NULL,
|
||||
0, 0,
|
||||
@@ -7116,8 +7118,8 @@ struct t_config_option *option4 =
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* color */
|
||||
struct t_config_option *option5 =
|
||||
weechat_config_new_option (config_file, section, "option5", "color",
|
||||
struct t_config_option *option_col =
|
||||
weechat_config_new_option (config_file, section, "option_col", "color",
|
||||
"My option, type color",
|
||||
NULL,
|
||||
0, 0,
|
||||
@@ -7127,6 +7129,19 @@ struct t_config_option *option5 =
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* enum */
|
||||
struct t_config_option *option_enum =
|
||||
weechat_config_new_option (config_file, section, "option_enum", "enum",
|
||||
"My option, type enum",
|
||||
"top|bottom|left|right",
|
||||
0, 0,
|
||||
"bottom",
|
||||
"bottom",
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
----
|
||||
|
||||
スクリプト (Python) での使用例:
|
||||
@@ -7136,55 +7151,55 @@ struct t_config_option *option5 =
|
||||
# プロトタイプ
|
||||
def config_new_option(config_file: str, section: str, name: str, type: str, description: str,
|
||||
string_values: str, min: int, max: int,
|
||||
default_value: str | None, value: str | None, null_value_allowed: int,
|
||||
default_value: Union[str, None], value: Union[str, None], null_value_allowed: int,
|
||||
callback_check_value: str, callback_check_value_data: str,
|
||||
callback_change: str, callback_change_data: str,
|
||||
callback_delete: str, callback_delete_data: str) -> str: ...
|
||||
|
||||
# 例
|
||||
def option4_check_value_cb(data: str, option: str, value: str) -> int:
|
||||
def option_str_check_value_cb(data: str, option: str, value: str) -> int:
|
||||
# ...
|
||||
return 1
|
||||
# return 0
|
||||
|
||||
def option4_change_cb(data: str, option: str) -> None:
|
||||
def option_str_change_cb(data: str, option: str) -> None:
|
||||
# ...
|
||||
|
||||
def option4_delete_cb(data: str, option: str) -> None:
|
||||
def option_str_delete_cb(data: str, option: str) -> None:
|
||||
# ...
|
||||
|
||||
option1 = weechat.config_new_option(config_file, section, "option1", "boolean",
|
||||
option_bool = weechat.config_new_option(config_file, section, "option_bool", "boolean",
|
||||
"My option, type boolean",
|
||||
"", 0, 0, "on", "on", 0,
|
||||
"", "",
|
||||
"", "",
|
||||
"", "")
|
||||
|
||||
option2 = weechat.config_new_option(config_file, section, "option2", "integer",
|
||||
option_int = weechat.config_new_option(config_file, section, "option_int", "integer",
|
||||
"My option, type integer",
|
||||
"", 0, 100, "15", "15", 0,
|
||||
"", "",
|
||||
"", "",
|
||||
"", "")
|
||||
|
||||
option3 = weechat.config_new_option(config_file, section, "option3", "integer",
|
||||
"My option, type integer (with string values)",
|
||||
"top|bottom|left|right",
|
||||
0, 0, "bottom", "bottom", 0,
|
||||
option_str = weechat.config_new_option(config_file, section, "option_str", "string",
|
||||
"My option, type string",
|
||||
"", 0, 0, "test", "test", 1,
|
||||
"option_str_check_value_cb", "",
|
||||
"option_str_change_cb", "",
|
||||
"option_str_delete_cb", "")
|
||||
|
||||
option_col = weechat.config_new_option(config_file, section, "option_col", "color",
|
||||
"My option, type color",
|
||||
"", 0, 0, "lightblue", "lightblue", 0,
|
||||
"", "",
|
||||
"", "",
|
||||
"", "")
|
||||
|
||||
option4 = weechat.config_new_option(config_file, section, "option4", "string",
|
||||
"My option, type string",
|
||||
"", 0, 0, "test", "test", 1,
|
||||
"option4_check_value_cb", "",
|
||||
"option4_change_cb", "",
|
||||
"option4_delete_cb", "")
|
||||
|
||||
option5 = weechat.config_new_option(config_file, section, "option5", "color",
|
||||
"My option, type color",
|
||||
"", 0, 0, "lightblue", "lightblue", 0,
|
||||
option_enum = weechat.config_new_option(config_file, section, "option_enum", "enum",
|
||||
"My option, type enum",
|
||||
"top|bottom|left|right",
|
||||
0, 0, "bottom", "bottom", 0,
|
||||
"", "",
|
||||
"", "",
|
||||
"", "")
|
||||
@@ -7196,7 +7211,6 @@ Ruby では、3 組のコールバックとデータ (6 つの文字列変数)
|
||||
link:++weechat_scripting.ja.html#_ruby++[WeeChat スクリプト作成ガイド ^↗^^]を参照してください
|
||||
_(WeeChat バージョン 0.4.1 で修正済み)_。
|
||||
|
||||
|
||||
==== config_search_option
|
||||
|
||||
設定ファイルのセクションからオプションを検索。
|
||||
@@ -7468,7 +7482,8 @@ int weechat_config_option_set (struct t_config_option *option,
|
||||
オプションの新しい値、オプションのタイプによって以下の特殊値を取ることも可能です:
|
||||
** _ブール型_:
|
||||
*** `toggle`: 現在の値を切り替える
|
||||
** _整数型_ または _色_:
|
||||
// TRANSLATION MISSING
|
||||
** _integer_, _color_ or _enum_:
|
||||
*** `++N`: 現在の値に `N` (任意の整数) を加える
|
||||
*** `--N`: 現在の値から `N` (任意の整数) を引く
|
||||
* _run_callback_: オプションが変更された際に、_callback_change_ コールバックを呼び出す場合は
|
||||
@@ -7702,6 +7717,7 @@ const char *weechat_config_option_get_string (struct t_config_option *option,
|
||||
*** _integer_
|
||||
*** _string_
|
||||
*** _color_
|
||||
*** _enum_
|
||||
** _description_: オプションの説明
|
||||
|
||||
戻り値:
|
||||
@@ -7875,6 +7891,7 @@ int weechat_config_boolean (struct t_config_option *option);
|
||||
* _integer_: 0
|
||||
* _string_: 0
|
||||
* _color_: 0
|
||||
* _enum_: 0
|
||||
|
||||
C 言語での使用例:
|
||||
|
||||
@@ -7925,6 +7942,7 @@ int weechat_config_boolean_default (struct t_config_option *option);
|
||||
* _integer_: 0
|
||||
* _string_: 0
|
||||
* _color_: 0
|
||||
* _enum_: 0
|
||||
|
||||
C 言語での使用例:
|
||||
|
||||
@@ -7975,6 +7993,8 @@ int weechat_config_integer (struct t_config_option *option);
|
||||
* _integer_: オプションの整数値
|
||||
* _string_: 0
|
||||
* _color_: 色インデックス
|
||||
// TRANSLATION MISSING
|
||||
* _enum_: integer value of option (index of enum value)
|
||||
|
||||
C 言語での使用例:
|
||||
|
||||
@@ -8017,6 +8037,8 @@ int weechat_config_integer_default (struct t_config_option *option);
|
||||
* _integer_: オプションのデフォルト整数値
|
||||
* _string_: 0
|
||||
* _color_: デフォルト色インデックス
|
||||
// TRANSLATION MISSING
|
||||
* _enum_: default integer value of option (index of enum value)
|
||||
|
||||
C 言語での使用例:
|
||||
|
||||
@@ -8056,10 +8078,11 @@ const char *weechat_config_string (struct t_config_option *option);
|
||||
戻り値、オプションの型に依存:
|
||||
|
||||
* _boolean_: 値が真の場合は "on"、それ以外の場合は "off"
|
||||
* _integer_: 値が文字列に対応付けられている場合はその文字列値、それ以外の場合は
|
||||
NULL
|
||||
* _integer_: NULL
|
||||
* _string_: オプションの文字列値
|
||||
* _color_: 色名
|
||||
// TRANSLATION MISSING
|
||||
* _enum_: string value of option
|
||||
|
||||
C 言語での使用例:
|
||||
|
||||
@@ -8099,10 +8122,11 @@ const char *weechat_config_string_default (struct t_config_option *option);
|
||||
戻り値、オプションの型に依存:
|
||||
|
||||
* _boolean_: デフォルト値が真の場合は "on"、それ以外の場合は "off"
|
||||
* _integer_: デフォルト値が文字列に対応付けられている場合はその文字列値、それ以外の場合は
|
||||
NULL
|
||||
* _integer_: NULL
|
||||
* _string_: オプションのデフォルト文字列値
|
||||
* _color_: デフォルト色名
|
||||
// TRANSLATION MISSING
|
||||
* _enum_: default string value of option
|
||||
|
||||
C 言語での使用例:
|
||||
|
||||
@@ -8145,6 +8169,7 @@ const char *weechat_config_color (struct t_config_option *option);
|
||||
* _integer_: NULL
|
||||
* _string_: NULL
|
||||
* _color_: 色名
|
||||
* _enum_: NULL
|
||||
|
||||
C 言語での使用例:
|
||||
|
||||
@@ -8187,6 +8212,7 @@ const char *weechat_config_color_default (struct t_config_option *option);
|
||||
* _integer_: NULL
|
||||
* _string_: NULL
|
||||
* _color_: デフォルト色名
|
||||
* _enum_: NULL
|
||||
|
||||
C 言語での使用例:
|
||||
|
||||
@@ -8208,6 +8234,98 @@ option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_color_default(option)
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
==== config_enum
|
||||
|
||||
_WeeChat ≥ 4.1.0._
|
||||
|
||||
Return enum value of option, as integer.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int weechat_config_enum (struct t_config_option *option);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
||||
* _option_: option pointer
|
||||
|
||||
Return value, depending on the option type:
|
||||
|
||||
* _boolean_: boolean value of option (0 or 1)
|
||||
* _integer_: integer value of option
|
||||
* _string_: 0
|
||||
* _color_: color index
|
||||
* _enum_: integer value of option (index of enum value)
|
||||
|
||||
C example:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_config_option *option = weechat_config_get ("plugin.section.option");
|
||||
int value = weechat_config_enum (option);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def config_enum(option: str) -> int: ...
|
||||
|
||||
# example
|
||||
option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_enum(option)
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
==== config_enum_default
|
||||
|
||||
_WeeChat ≥ 4.1.0._
|
||||
|
||||
Return default enum value of option, as integer.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int weechat_config_enum_default (struct t_config_option *option);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
||||
* _option_: option pointer
|
||||
|
||||
Return value, depending on the option type:
|
||||
|
||||
* _boolean_: default boolean value of option (0 or 1)
|
||||
* _integer_: default integer value of option
|
||||
* _string_: 0
|
||||
* _color_: default color index
|
||||
* _enum_: integer value of option (index of enum value)
|
||||
|
||||
C example:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_config_option *option = weechat_config_get ("plugin.section.option");
|
||||
int value = weechat_config_enum_default (option);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def config_enum_default(option: str) -> int: ...
|
||||
|
||||
# example
|
||||
option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_enum_default(option)
|
||||
----
|
||||
|
||||
==== config_write_option
|
||||
|
||||
設定ファイルにオプションとその値を収めた行を書き込む (この関数をセクションの
|
||||
@@ -10015,7 +10133,6 @@ struct t_hook *weechat_hook_process (const char *command,
|
||||
void *callback_data);
|
||||
----
|
||||
|
||||
|
||||
引数:
|
||||
|
||||
* _command_: 子プロセスで実行するコマンド、URL _(WeeChat バージョン 0.3.7 以上で利用可)_
|
||||
@@ -10271,22 +10388,8 @@ struct t_hook *weechat_hook_process_hashtable (const char *command,
|
||||
_/dev/null_ にリダイレクトする
|
||||
|===
|
||||
|
||||
"url:..." 型のコマンドでは、以下のコマンドを使うことができます
|
||||
(それぞれのオプションについては `+man curl_easy_setopt+` を参照):
|
||||
|
||||
include::{autogendir}/autogen_api_url_options.ja.adoc[tag=url_options]
|
||||
|
||||
[NOTE]
|
||||
^(1)^ "mask" タイプのオプションでは、フォーマットは "value1+value2+value3" です。
|
||||
"list" タイプのオプションでは、リスト要素を改行で区切ってください。
|
||||
(`\n`). +
|
||||
^(2)^ 定数が利用可能な場合、定数は必ずオプションの値に含めてください。
|
||||
|
||||
URL では、入力/出力ファイル用に 2 つのオプション (文字列) を使うことができます:
|
||||
|
||||
* _file_in_: 読み込んで URL に送信するファイル (ファイルを送信)
|
||||
* _file_out_: ダウンロードした URL/ファイルをこのファイルに書き込む
|
||||
(標準出力を使わない)
|
||||
// TRANSLATION MISSING
|
||||
For command "url:...", see available options in function <<_hook_url,hook_url>>.
|
||||
|
||||
戻り値:
|
||||
|
||||
@@ -10446,6 +10549,157 @@ hook4 = weechat.hook_process_hashtable("sh",
|
||||
20000, "my_process_cb", "")
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
==== hook_url
|
||||
|
||||
_WeeChat ≥ 4.1.0._
|
||||
|
||||
URL transfer.
|
||||
|
||||
プロトタイプ:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_hook *weechat_hook_url (const char *url,
|
||||
struct t_hashtable *options,
|
||||
int timeout,
|
||||
int (*callback)(const void *pointer,
|
||||
void *data,
|
||||
const char *url,
|
||||
struct t_hashtable *options,
|
||||
struct t_hashtable *output),
|
||||
const void *callback_pointer,
|
||||
void *callback_data);
|
||||
----
|
||||
|
||||
引数:
|
||||
|
||||
* _url_: URL
|
||||
* _options_: options for URL transfer (see below);
|
||||
ハッシュテーブルは関数の中で複製されるため、この関数を呼び出した後にハッシュテーブルを安全に開放できます。
|
||||
* _timeout_: timeout for URL transfer (in milliseconds): after this timeout,
|
||||
the transfer is stopped (0 means no timeout)
|
||||
* _callback_: function called when the transfer has ended, arguments and return
|
||||
value:
|
||||
** _const void *pointer_: pointer
|
||||
** _void *data_: pointer
|
||||
** _const char *url_: URL
|
||||
** _struct t_hashtable *options_: options
|
||||
** _struct t_hashtable *output_: result (keys and values are strings), which may
|
||||
contain the following keys:
|
||||
*** _response_code_: HTTP response code
|
||||
*** _headers_: HTTP headers in response
|
||||
*** _output_: standard output (set only if _file_out_ was not set in options)
|
||||
*** _error_: error message (set only in case of error)
|
||||
** return value:
|
||||
*** _WEECHAT_RC_OK_
|
||||
*** _WEECHAT_RC_ERROR_
|
||||
* _callback_pointer_: WeeChat が _callback_ コールバックを呼び出す際にコールバックに渡すポインタ
|
||||
* _callback_data_: WeeChat が _callback_ コールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
このポインタが NULL でない場合、このポインタは malloc (または類似の関数)
|
||||
によって割り当てられたものでなければいけません。さらに、このポインタはここで作成したフックが削除された時点で自動的に開放されます
|
||||
|
||||
The following Curl options are available (see `+man curl_easy_setopt+` for
|
||||
a description of each option):
|
||||
|
||||
include::{autogendir}/autogen_api_url_options.ja.adoc[tag=url_options]
|
||||
|
||||
[NOTE]
|
||||
^(1)^ "mask" タイプのオプションでは、フォーマットは "value1+value2+value3" です。
|
||||
"list" タイプのオプションでは、リスト要素を改行で区切ってください。
|
||||
(`\n`). +
|
||||
^(2)^ 定数が利用可能な場合、定数は必ずオプションの値に含めてください。
|
||||
|
||||
These two extra options (strings) are allowed for input/output file:
|
||||
|
||||
[width="100%",cols="2,^1,7",options="header"]
|
||||
|===
|
||||
| Option | Type | Description
|
||||
| file_in | string | 読み込んで URL に送信するファイル (ファイルを送信)
|
||||
| file_out | string | ダウンロードした URL/ファイルをこのファイルに書き込む (標準出力を使わない)
|
||||
|===
|
||||
|
||||
戻り値:
|
||||
|
||||
* 新しいフックへのポインタ、エラーが起きた場合は NULL
|
||||
|
||||
C 言語での使用例:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int
|
||||
my_url_cb (const void *pointer, void *data, const char *url,
|
||||
struct t_hashtable *options, struct t_hashtable *output)
|
||||
{
|
||||
weechat_printf (NULL, "response_code: %s", weechat_hashtable_get (output, "response_code"));
|
||||
weechat_printf (NULL, "headers: %s", weechat_hashtable_get (output, "headers"));
|
||||
weechat_printf (NULL, "output: %s", weechat_hashtable_get (output, "output"));
|
||||
weechat_printf (NULL, "error: %s", weechat_hashtable_get (output, "error"));
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/* example 1: output to a file */
|
||||
struct t_hashtable *options_url1 = weechat_hashtable_new (8,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL,
|
||||
NULL);
|
||||
if (options_url1)
|
||||
{
|
||||
weechat_hashtable_set (options_url1, "file_out", "/tmp/weechat.org.html");
|
||||
struct t_hook *my_url_hook = weechat_hook_url ("https://weechat.org/",
|
||||
options_url1,
|
||||
20000,
|
||||
&my_url_cb, NULL, NULL);
|
||||
weechat_hashtable_free (options_url1);
|
||||
}
|
||||
|
||||
/* example 2: custom HTTP headers, output sent to callback */
|
||||
struct t_hashtable *options_url2 = weechat_hashtable_new (8,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL,
|
||||
NULL);
|
||||
if (options_url2)
|
||||
{
|
||||
weechat_hashtable_set (options_url2, "httpheader",
|
||||
"Header1: value1\n"
|
||||
"Header2: value2");
|
||||
struct t_hook *my_url_hook = weechat_hook_url ("http://localhost:8080/",
|
||||
options_url2,
|
||||
20000,
|
||||
&my_url_cb, NULL, NULL);
|
||||
weechat_hashtable_free (options_url2);
|
||||
}
|
||||
----
|
||||
|
||||
スクリプト (Python) での使用例:
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# プロトタイプ
|
||||
def hook_url(url: str, options: Dict[str, str], timeout: int, callback: str, callback_data: str) -> str: ...
|
||||
|
||||
# 例
|
||||
def my_url_cb(data: str, url: str, options: Dict[str, str], output: Dict[str, str]) -> int:
|
||||
weechat.prnt("", "output: %s" % output)
|
||||
return weechat.WEECHAT_RC_OK
|
||||
|
||||
# example 1: output to a file
|
||||
hook1 = weechat.hook_url("https://weechat.org/",
|
||||
{"file_out": "/tmp/weechat.org.html"},
|
||||
20000, "my_url_cb", "")
|
||||
|
||||
# example 2: custom HTTP headers, output sent to callback
|
||||
options = {
|
||||
"httpheader": "\n".join([
|
||||
"Header1: value1",
|
||||
"Header2: value2",
|
||||
]),
|
||||
}
|
||||
hook2 = weechat.hook_url("http://localhost:8080/", options, 20000, "my_url_cb", "")
|
||||
----
|
||||
|
||||
==== hook_connect
|
||||
|
||||
_WeeChat バージョン 1.5 と 2.0 で更新。_
|
||||
@@ -13051,7 +13305,7 @@ struct t_hook *my_hdata = weechat_hook_hdata ("my_hdata",
|
||||
|
||||
==== hook_focus
|
||||
|
||||
_WeeChat バージョン 1.5 で更新。_
|
||||
_WeeChat バージョン 1.5, 4.0.0, 4.1.0 で更新。_
|
||||
|
||||
フォーカス (マウスイベントやカーソルモード
|
||||
(カーソルが自由に移動出来る状態) でキーが押されたこと) をフック。
|
||||
@@ -13168,18 +13422,26 @@ info を使う前にエリアが一致していることを確認して下さい
|
||||
| "Hello world!" | ""
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| _chat_focused_line | Line at (x,y) _(WeeChat ≥ 4.0.0)_.
|
||||
| _chat_focused_line | Line at (x, y) _(WeeChat ≥ 4.0.0)_.
|
||||
| "Hello world!" | ""
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| _chat_focused_line_bol | Text from beginning of line to (x-1, y) _(WeeChat ≥ 4.1.0)_.
|
||||
| "Hello" | ""
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| _chat_focused_line_eol | Text from (x, y) to end of line _(WeeChat ≥ 4.1.0)_.
|
||||
| "llo world!" | ""
|
||||
|
||||
| _chat_word | (x,y) の位置にある単語
|
||||
| "Hello" | ""
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| _chat_bol | Text from beginning of line to (x-1, y).
|
||||
| _chat_bol | Text from beginning of message to (x-1, y).
|
||||
| "He" | ""
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| _chat_eol | Text from (x, y) to the end of line.
|
||||
| _chat_eol | Text from (x, y) to the end of message.
|
||||
| "llo world!" | ""
|
||||
|
||||
| _bar_name | バーの名前
|
||||
@@ -16614,7 +16876,6 @@ if (hashtable_in)
|
||||
"irc_message_parse" の出力に関するより詳しい情報は
|
||||
link:weechat_scripting.ja.html#irc_message_parse[WeeChat スクリプト作成ガイド / メッセージの構文解析 ^↗^^]を参照してください。
|
||||
|
||||
|
||||
スクリプト (Python) での使用例:
|
||||
|
||||
[source,python]
|
||||
@@ -17752,7 +18013,7 @@ int weechat_hdata_get_var_offset (struct t_hdata *hdata, const char *name);
|
||||
|
||||
戻り値:
|
||||
|
||||
* オフセットの値、エラーが起きた場合は 0
|
||||
* オフセットの値、エラーが起きた場合は -1
|
||||
|
||||
C 言語での使用例:
|
||||
|
||||
@@ -18662,7 +18923,8 @@ for key in hash:
|
||||
|
||||
==== hdata_compare
|
||||
|
||||
_WeeChat バージョン 1.9 以上で利用可。_
|
||||
// TRANSLATION MISSING
|
||||
_WeeChat ≥ 1.9, updated in 4.1.0._
|
||||
|
||||
2 つのオブジェクトの hdata 変数を比較。
|
||||
|
||||
@@ -18678,8 +18940,9 @@ int weechat_hdata_compare (struct t_hdata *hdata, void *pointer1, void *pointer2
|
||||
* _hdata_: hdata へのポインタ
|
||||
* _pointer1_: 1 番目の WeeChat およびプラグインオブジェクトへのポインタ
|
||||
* _pointer2_: 2 番目の WeeChat およびプラグインオブジェクトへのポインタ
|
||||
* _name_: 変数名; 配列の場合、変数名を "N|name" のように指定できます。ここで
|
||||
N は配列のインデックス番号です (番号は 0 から始まります)。例: "2|name"
|
||||
// TRANSLATION MISSING
|
||||
* _name_: variable name or path to a variable name; 配列の場合、変数名を "N|name"
|
||||
のように指定できます。ここで N は配列のインデックス番号です (番号は 0 から始まります)。例: "2|name"
|
||||
* _case_sensitive_: 大文字小文字を区別する場合 1、それ以外の場合 0
|
||||
|
||||
戻り値:
|
||||
@@ -18695,8 +18958,12 @@ C 言語での使用例:
|
||||
struct t_hdata *hdata = weechat_hdata_get ("buffer");
|
||||
struct t_gui_buffer *buffer1 = weechat_buffer_search ("irc", "libera.#weechat");
|
||||
struct t_gui_buffer *buffer2 = weechat_buffer_search ("irc", "libera.#weechat-fr");
|
||||
weechat_printf (NULL, "number comparison = %d",
|
||||
weechat_printf (NULL, "comparison of buffer number = %d",
|
||||
weechat_hdata_compare (hdata, buffer1, buffer2, "number", 0));
|
||||
weechat_printf (NULL, "comparison of number of lines = %d",
|
||||
weechat_hdata_compare (hdata, buffer1, buffer2, "own_lines.lines_count", 0));
|
||||
weechat_printf (NULL, "comparison of local variable = %d",
|
||||
weechat_hdata_compare (hdata, buffer1, buffer2, "local_variables.myvar", 0));
|
||||
----
|
||||
|
||||
スクリプト (Python) での使用例:
|
||||
@@ -18710,7 +18977,9 @@ def hdata_compare(hdata: str, pointer1: str, pointer2: str, name: str, case_sens
|
||||
hdata = weechat.hdata_get("buffer")
|
||||
buffer1 = weechat.buffer_search("irc", "libera.#weechat")
|
||||
buffer2 = weechat.buffer_search("irc", "libera.#weechat-fr")
|
||||
weechat.prnt("", "number comparison = %d" % weechat.hdata_compare(hdata, buffer1, buffer2, "number", 0))
|
||||
weechat.prnt("", "comparison of buffer number = %d" % weechat.hdata_compare(hdata, buffer1, buffer2, "number", 0))
|
||||
weechat.prnt("", "comparison of number of lines = %d" % weechat.hdata_compare(hdata, buffer1, buffer2, "own_lines.lines_count", 0))
|
||||
weechat.prnt("", "comparison of local variable = %d" % weechat.hdata_compare(hdata, buffer1, buffer2, "local_variables.myvar", 0))
|
||||
----
|
||||
|
||||
==== hdata_set
|
||||
|
||||
+306
-173
@@ -127,7 +127,7 @@ WeeChat:
|
||||
| pkg-config |
|
||||
| インストール済みライブラリを検出
|
||||
|
||||
| libncursesw5-dev ^(2)^ |
|
||||
| libncurses-dev |
|
||||
| ncurses インターフェース
|
||||
|
||||
| libcurl4-gnutls-dev |
|
||||
@@ -137,7 +137,7 @@ WeeChat:
|
||||
| 保護データ、IRC SASL 認証
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| libgnutls28-dev | ≥ 2.2.0 ^(3)^
|
||||
| libgnutls28-dev | ≥ 2.2.0 ^(2)^
|
||||
| IRC plugin: support of TLS connections, IRC SASL authentication (ECDSA-NIST256P-CHALLENGE). +
|
||||
Relay plugin: support of TLS connections.
|
||||
|
||||
@@ -146,21 +146,13 @@ WeeChat:
|
||||
| Logger plugin: compression of rotated log files (gzip). +
|
||||
Relay plugin: compression of messages (WeeChat -> client) with https://zlib.net/[zlib ^↗^^] (weechat protocol). +
|
||||
Script plugin: read of repository index file (gzip).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| libzstd-dev | ≥ 0.8.1
|
||||
| Logger plugin: compression of rotated log files. +
|
||||
Relay plugin: compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat protocol).
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
// TRANSLATION MISSING
|
||||
^(1)^ Name comes from the Debian GNU/Linux Bookworm distribution, version and
|
||||
name can be different in other distributions. +
|
||||
^(2)^ WeeChat は libncurses**w**5-dev でコンパイルすることを推奨します
|
||||
(*w* が重要です)。libncurses5-dev でもコンパイル可能ですが、これは推奨
|
||||
*されません* (ワイドキャラクタの表示にバグを生じるでしょう)。 +
|
||||
^(3)^ IRC SASL 認証で ECDSA-NIST256P-CHALLENGE を使うには、GnuTLS
|
||||
^(2)^ IRC SASL 認証で ECDSA-NIST256P-CHALLENGE を使うには、GnuTLS
|
||||
バージョン 3.0.21 以上が必要です。
|
||||
|
||||
// TRANSLATION MISSING
|
||||
@@ -170,27 +162,70 @@ WeeChat:
|
||||
[width="100%",cols="5,^3,.^15",options="header"]
|
||||
|===
|
||||
// TRANSLATION MISSING
|
||||
| パッケージ ^(1)^ | バージョン | Features
|
||||
| {cpp} コンパイラ (pass:[g++ / clang++]) | | ビルドとテストの実行、JavaScript プラグイン
|
||||
| gettext | | 国際化 (メッセージの翻訳; ベース言語は英語です)
|
||||
| ca-certificates | | TLS 接続に必要な証明書、relay プラグインで TLS サポート
|
||||
| libaspell-dev / libenchant-dev | | spell プラグイン
|
||||
| python3-dev | 3.0 以上 | python プラグイン
|
||||
| libperl-dev | | perl プラグイン
|
||||
| ruby3.1, ruby3.1-dev | 1.9.1 以上 | ruby プラグイン
|
||||
| liblua5.4-dev | | lua プラグイン
|
||||
| tcl-dev | 8.5 以上 | tcl プラグイン
|
||||
| guile-3.0-dev | 2.0 以上 | guile (scheme) プラグイン
|
||||
| libv8-dev | 3.24.3 以下 | javascript プラグイン
|
||||
| php-dev | 7.0 以上 | PHP プラグイン
|
||||
| libphp-embed | 7.0 以上 | PHP プラグイン
|
||||
| libxml2-dev | | PHP プラグイン
|
||||
| libargon2-dev | | PHP プラグイン (PHP 7.2 以上の場合)
|
||||
| libsodium-dev | | PHP プラグイン (PHP 7.2 以上の場合)
|
||||
| asciidoctor | 1.5.4 以上 | man ページと文書のビルド
|
||||
| パッケージ ^(1)^ | バージョン | Features
|
||||
|
||||
| {cpp} コンパイラ (pass:[g++ / clang++]) |
|
||||
| ビルドとテストの実行、JavaScript プラグイン
|
||||
|
||||
| gettext |
|
||||
| 国際化 (メッセージの翻訳; ベース言語は英語です)
|
||||
|
||||
| ca-certificates |
|
||||
| TLS 接続に必要な証明書、relay プラグインで TLS サポート
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| ruby-pygments.rb | | Build documentation.
|
||||
| libcpputest-dev | 3.4 以上 | ビルドとテストの実行
|
||||
| libzstd-dev | ≥ 0.8.1
|
||||
| Logger plugin: compression of rotated log files (zstandard). +
|
||||
Relay plugin: compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat protocol).
|
||||
|
||||
| libaspell-dev / libenchant-dev |
|
||||
| spell プラグイン
|
||||
|
||||
| python3-dev | 3.0 以上
|
||||
| python プラグイン
|
||||
|
||||
| libperl-dev |
|
||||
| perl プラグイン
|
||||
|
||||
| ruby3.1, ruby3.1-dev | 1.9.1 以上
|
||||
| ruby プラグイン
|
||||
|
||||
| liblua5.4-dev |
|
||||
| lua プラグイン
|
||||
|
||||
| tcl-dev | 8.5 以上
|
||||
| tcl プラグイン
|
||||
|
||||
| guile-3.0-dev | 2.0 以上
|
||||
| guile (scheme) プラグイン
|
||||
|
||||
| libv8-dev | 3.24.3 以下
|
||||
| javascript プラグイン
|
||||
|
||||
| php-dev | 7.0 以上
|
||||
| PHP プラグイン
|
||||
|
||||
| libphp-embed | 7.0 以上
|
||||
| PHP プラグイン
|
||||
|
||||
| libxml2-dev |
|
||||
| PHP プラグイン
|
||||
|
||||
| libargon2-dev |
|
||||
| PHP プラグイン (PHP 7.2 以上の場合)
|
||||
|
||||
| libsodium-dev |
|
||||
| PHP プラグイン (PHP 7.2 以上の場合)
|
||||
|
||||
| asciidoctor | 1.5.4 以上
|
||||
| man ページと文書のビルド
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| ruby-pygments.rb |
|
||||
| Build documentation.
|
||||
|
||||
| libcpputest-dev | 3.4 以上
|
||||
| ビルドとテストの実行
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -232,7 +267,8 @@ $ make install
|
||||
|
||||
CMake に対するオプションを指定するには、以下の書式を使ってください: `-DOPTION=VALUE`。
|
||||
|
||||
よく利用されるオプションのリスト:
|
||||
// TRANSLATION MISSING
|
||||
List of available options:
|
||||
|
||||
[width="100%",cols="3m,3,3m,10",options="header"]
|
||||
|===
|
||||
@@ -288,6 +324,10 @@ CMake に対するオプションを指定するには、以下の書式を使
|
||||
| ENABLE_GUILE | `ON`, `OFF` | ON
|
||||
| <<scripting_plugins,Guile プラグイン>> (Scheme) のコンパイル。
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| ENABLE_HEADLESS | `ON`, `OFF` | ON
|
||||
| Compile headless binary.
|
||||
|
||||
| ENABLE_IRC | `ON`, `OFF` | ON
|
||||
| <<irc,IRC プラグイン>>のコンパイル
|
||||
|
||||
@@ -346,6 +386,10 @@ CMake に対するオプションを指定するには、以下の書式を使
|
||||
| ENABLE_XFER | `ON`, `OFF` | ON
|
||||
| <<xfer,Xfer プラグイン>>のコンパイル。
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| ENABLE_ZSTD | `ON`, `OFF` | ON
|
||||
| Enable https://facebook.github.io/zstd/[Zstandard ^↗^^] compression.
|
||||
|
||||
| ENABLE_TESTS | `ON`, `OFF` | OFF
|
||||
| コンパイルテスト。
|
||||
|
||||
@@ -957,6 +1001,10 @@ By default, the screen is divided up into the following areas:
|
||||
// TRANSLATION MISSING
|
||||
| buflist3 | `1.weechat` | List of buffers, third bar item (see option <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
// TRANSLATION MISSING
|
||||
| buflist4 | `1.weechat` | List of buffers, fourth bar item (see option <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
// TRANSLATION MISSING
|
||||
| buflist5 | `1.weechat` | List of buffers, fifth bar item (see option <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
// TRANSLATION MISSING
|
||||
| fset | `+buflist.look.sort: …+` | Help on currently selected option on fset buffer.
|
||||
| irc_channel | `#test` | 現在の IRC チャンネル名
|
||||
// TRANSLATION MISSING
|
||||
@@ -1412,7 +1460,8 @@ By default WeeChat and its default plugins interpret these variables:
|
||||
|
||||
| filter
|
||||
| any string
|
||||
| Filter defined on some buffers like `/fset`, `/server raw` (irc) and `/script`.
|
||||
| Filter defined on some buffers like `/fset`, `/list` (irc), `/server raw` (irc)
|
||||
and `/script`.
|
||||
|
||||
| host
|
||||
| any string
|
||||
@@ -1495,8 +1544,10 @@ External plugins and scripts can define and use other local variables.
|
||||
[[buflist]]
|
||||
=== List of buffers
|
||||
|
||||
// TRANSLATION MISSING
|
||||
Buflist プラグインを使うことで、"buflist" と呼ばれるバー要素の中にバッファリストを表示させることが可能になります
|
||||
(それ以外に "buflist2" と "buflist3" と呼ばれるバー要素も利用可能です)。 +
|
||||
(four other bar items "buflist2", "buflist3", "buflist4" and "buflist5" are
|
||||
available as well)。 +
|
||||
プラグインは開始時にバー要素 "buflist" を持つデフォルトバー "buflist" を作成します。
|
||||
|
||||
[[buflist_commands]]
|
||||
@@ -1520,6 +1571,22 @@ _buflist.conf_ ファイル内のセクション:
|
||||
|
||||
include::{autogendir}/autogen_user_options.ja.adoc[tag=buflist_options]
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[cursor_mode]]
|
||||
=== Cursor mode
|
||||
|
||||
The cursor mode allows you to move freely the cursor anywhere on screen, in chat
|
||||
area and bars, and lets you perform actions at the given position. +
|
||||
You can enter in cursor mode either with the command `/cursor` or with a mouse
|
||||
middle click (mouse must have been enabled with key kbd:[Alt+m] or command
|
||||
`/mouse enable`).
|
||||
|
||||
Typical use is to quote messages (chat area) or interact with nicks (nicklist bar).
|
||||
|
||||
See command <<command_weechat_cursor,/cursor>> and
|
||||
<<key_bindings_cursor_context,key bindings in cursor context>> for the list
|
||||
of actions you can perform in this mode.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[key_bindings]]
|
||||
== Key bindings
|
||||
@@ -1633,6 +1700,16 @@ They can be changed and new ones can be added with the <<command_weechat_key,/ke
|
||||
| kbd:[Ctrl+↓] | グローバル履歴から次のコマンド/メッセージを呼び出す (すべてのバッファに対して共通の履歴) | `+/input history_global_next+`
|
||||
|===
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[key_bindings_cmdline_system]]
|
||||
==== System
|
||||
|
||||
[width="100%",cols="^.^3,.^8,.^5",options="header"]
|
||||
|===
|
||||
| キー | 説明 | コマンド
|
||||
| kbd:[Ctrl+z] | Suspend WeeChat process. | `+/sys suspend+`
|
||||
|===
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[key_bindings_buffers]]
|
||||
=== Buffers
|
||||
@@ -1777,32 +1854,46 @@ kbd:[Ctrl+r] が押された状態) でのみ有効です。
|
||||
[[key_bindings_cursor_context]]
|
||||
=== Cursor context
|
||||
|
||||
以下のキーは「カーソル」モード (画面上でカーソルを自由に動かせる状態) でのみ有効です。
|
||||
// TRANSLATION MISSING
|
||||
以下のキーは「カーソル」モード (画面上でカーソルを自由に動かせる状態) でのみ有効です,
|
||||
see <<cursor_mode,Cursor mode>>.
|
||||
|
||||
[width="100%",cols="^.^3,^.^2,.^7,.^7",options="header"]
|
||||
|===
|
||||
| キー | エリア | 説明 | コマンド
|
||||
| kbd:[↑] | - | カーソルを上の行に移動 | `+/cursor move up+`
|
||||
| kbd:[↓] | - | カーソルを下の行に移動 | `+/cursor move down+`
|
||||
| kbd:[←] | - | カーソルを左の列に移動 | `+/cursor move left+`
|
||||
| kbd:[→] | - | カーソルを右の列に移動 | `+/cursor move right+`
|
||||
| kbd:[Alt+↑] | - | カーソルを上のエリアに移動 | `+/cursor move area_up+`
|
||||
| kbd:[Alt+↓] | - | カーソルを下のエリアに移動 | `+/cursor move area_down+`
|
||||
| kbd:[Alt+←] | - | カーソルを左のエリアに移動 | `+/cursor move area_left+`
|
||||
| kbd:[Alt+→] | - | カーソルを右のエリアに移動 | `+/cursor move area_right+`
|
||||
| kbd:[m] | チャット | メッセージを引用 | `+hsignal:chat_quote_message;/cursor stop+`
|
||||
| キー | エリア | 説明 | コマンド
|
||||
| kbd:[↑] | - | カーソルを上の行に移動 | `+/cursor move up+`
|
||||
| kbd:[↓] | - | カーソルを下の行に移動 | `+/cursor move down+`
|
||||
| kbd:[←] | - | カーソルを左の列に移動 | `+/cursor move left+`
|
||||
| kbd:[→] | - | カーソルを右の列に移動 | `+/cursor move right+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[l] | チャット | Quote focused line. | `+hsignal:chat_quote_focused_line;/cursor stop+`
|
||||
| kbd:[q] | チャット | プレフィックスとメッセージを引用 | `+hsignal:chat_quote_prefix_message;/cursor stop+`
|
||||
| kbd:[Q] | チャット | 時間、プレフィックス、メッセージを引用 | `+hsignal:chat_quote_time_prefix_message;/cursor stop+`
|
||||
| kbd:[b] | ニックネームリスト| ニックネームをバンする | `+/window ${_window_number};/ban ${nick}+`
|
||||
| kbd:[k] | ニックネームリスト| ニックネームをキックする | `+/window ${_window_number};/kick ${nick}+`
|
||||
| kbd:[K] | ニックネームリスト| ニックネームをバンとキックする | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| kbd:[q] | ニックネームリスト| ニックネームに対するクエリを開く | `+/window ${_window_number};/query ${nick};/cursor stop+`
|
||||
| kbd:[w] | ニックネームリスト| ニックネームに対して whois を行う | `+/window ${_window_number};/whois ${nick}+`
|
||||
| kbd:[Alt+↑] | - | Move cursor to the first line of the area. | `+/cursor move edge_top+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[Alt+↓] | - | Move cursor to the last line of the area. | `+/cursor move edge_bottom+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[Alt+←] | - | Move cursor to the first column of the area. | `+/cursor move edge_left+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[Alt+→] | - | Move cursor to the last column of the area. | `+/cursor move edge_right+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[Alt+Home] | - | Move cursor to the top left corner of the area. | `+/cursor move top_left+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[Alt+End] | - | Move cursor to the bottom right corner of the area. | `+/cursor move bottom_right+`
|
||||
| kbd:[Alt+Shift+↑] | - | カーソルを上のエリアに移動 | `+/cursor move area_up+`
|
||||
| kbd:[Alt+Shift+↓] | - | カーソルを下のエリアに移動 | `+/cursor move area_down+`
|
||||
| kbd:[Alt+Shift+←] | - | カーソルを左のエリアに移動 | `+/cursor move area_left+`
|
||||
| kbd:[Alt+Shift+→] | - | カーソルを右のエリアに移動 | `+/cursor move area_right+`
|
||||
| kbd:[m] | チャット | メッセージを引用 | `+hsignal:chat_quote_message;/cursor stop+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[l] | チャット | Quote focused line. | `+hsignal:chat_quote_focused_line;/cursor stop+`
|
||||
| kbd:[q] | チャット | プレフィックスとメッセージを引用 | `+hsignal:chat_quote_prefix_message;/cursor stop+`
|
||||
| kbd:[Q] | チャット | 時間、プレフィックス、メッセージを引用 | `+hsignal:chat_quote_time_prefix_message;/cursor stop+`
|
||||
| kbd:[b] | ニックネームリスト | ニックネームをバンする | `+/window ${_window_number};/ban ${nick}+`
|
||||
| kbd:[k] | ニックネームリスト | ニックネームをキックする | `+/window ${_window_number};/kick ${nick}+`
|
||||
| kbd:[K] | ニックネームリスト | ニックネームをバンとキックする | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| kbd:[q] | ニックネームリスト | ニックネームに対するクエリを開く | `+/window ${_window_number};/query ${nick};/cursor stop+`
|
||||
| kbd:[w] | ニックネームリスト | ニックネームに対して whois を行う | `+/window ${_window_number};/whois ${nick}+`
|
||||
| kbd:[Enter] +
|
||||
kbd:[Ctrl+j] +
|
||||
kbd:[Ctrl+m] | - | カーソルモードを終了 | `+/cursor stop+`
|
||||
kbd:[Ctrl+m] | - | カーソルモードを終了 | `+/cursor stop+`
|
||||
|===
|
||||
|
||||
// TRANSLATION MISSING
|
||||
@@ -1816,56 +1907,71 @@ These mouse actions are possible only if mouse is enabled with key kbd:[Alt+m]
|
||||
[width="100%",cols="^.^3,^.^3,^.^3,.^8,.^8",options="header"]
|
||||
|===
|
||||
| ボタン/ホイール ^(1)^ | ジェスチャー | エリア | 説明 | コマンド
|
||||
| ◾◽◽ | - | チャット | ウィンドウに移動 | `+/window ${_window_number}+`
|
||||
| ◾◽◽ | 左 | チャット | 前のバッファに移動 | `+/window ${_window_number};/buffer +1+`
|
||||
| ◾◽◽ | 右 | チャット | 次のバッファに移動 | `+/window ${_window_number};/buffer +1+`
|
||||
| ◾◽◽ | 左 (長く) | チャット | 最初のバッファに移動 | `+/window ${_window_number};/buffer 1+`
|
||||
| ◾◽◽ | 右 (長く) | チャット | 最後のバッファに移動 | `+/window ${_window_number};/buffer ++`
|
||||
| kbd:[▲] | - | チャット | バッファ履歴を上方向にスクロール | `+/window scroll_up -window ${_window_number}+`
|
||||
| kbd:[▼] | - | チャット | バッファ履歴を下方向にスクロール | `+/window scroll_down -window ${_window_number}+`
|
||||
| kbd:[Ctrl+▲] | - | チャット | 水平左方向にスクロール | `+/window scroll_horiz -window ${_window_number} -10%+`
|
||||
| kbd:[Ctrl+▼] | - | チャット | 水平右方向にスクロール | `+/window scroll_horiz -window ${_window_number} +10%+`
|
||||
| kbd:[■ □ □] | - | チャット | ウィンドウに移動 | `+/window ${_window_number}+`
|
||||
| kbd:[■ □ □] | 左 | チャット | 前のバッファに移動 | `+/window ${_window_number};/buffer +1+`
|
||||
| kbd:[■ □ □] | 右 | チャット | 次のバッファに移動 | `+/window ${_window_number};/buffer +1+`
|
||||
| kbd:[■ □ □] | 左 (長く) | チャット | 最初のバッファに移動 | `+/window ${_window_number};/buffer 1+`
|
||||
| kbd:[■ □ □] | 右 (長く) | チャット | 最後のバッファに移動 | `+/window ${_window_number};/buffer ++`
|
||||
| kbd:[▲] | - | チャット | バッファ履歴を上方向にスクロール | `+/window scroll_up -window ${_window_number}+`
|
||||
| kbd:[▼] | - | チャット | バッファ履歴を下方向にスクロール | `+/window scroll_down -window ${_window_number}+`
|
||||
| kbd:[Ctrl+▲] | - | チャット | 水平左方向にスクロール | `+/window scroll_horiz -window ${_window_number} -10%+`
|
||||
| kbd:[Ctrl+▼] | - | チャット | 水平右方向にスクロール | `+/window scroll_horiz -window ${_window_number} +10%+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[▲] | - | chat: fset buffer | Move five lines up in fset buffer. | `+/fset -up 5+`
|
||||
| kbd:[▲] | - | chat: fset buffer | Move five lines up in fset buffer. | `+/fset -up 5+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[▼] | - | chat: fset buffer | Move five lines down in fset buffer. | `+/fset -down 5+`
|
||||
| kbd:[▼] | - | chat: fset buffer | Move five lines down in fset buffer. | `+/fset -down 5+`
|
||||
// TRANSLATION MISSING
|
||||
| ◾◽◽ | - | chat: fset buffer | Select line in fset buffer. | `+/window ${_window_number};/fset -go ${_chat_line_y}+`
|
||||
| kbd:[■ □ □] | - | chat: fset buffer | Select line in fset buffer. | `+/window ${_window_number};/fset -go ${fset_option_index}+`
|
||||
// TRANSLATION MISSING
|
||||
| ◽◽◾ | - | chat: fset buffer | Toggle boolean (on/off) or edit the option value. | `+hsignal:fset_mouse+`
|
||||
| kbd:[□ □ ■] | - | chat: fset buffer | Toggle boolean (on/off) or edit the option value. | `+hsignal:fset_mouse+`
|
||||
// TRANSLATION MISSING
|
||||
| ◽◽◾ | left | chat: fset buffer | Decrease value for integer/color, set/append to value for other types. | `+hsignal:fset_mouse+`
|
||||
| kbd:[□ □ ■] | left | chat: fset buffer | Decrease value for integer/color/enum, set/append to value for other types. | `+hsignal:fset_mouse+`
|
||||
// TRANSLATION MISSING
|
||||
| ◽◽◾ | right | chat: fset buffer | Increase value for integer/color, set/append to value for other types. | `+hsignal:fset_mouse+`
|
||||
| kbd:[□ □ ■] | right | chat: fset buffer | Increase value for integer/color/enum, set/append to value for other types. | `+hsignal:fset_mouse+`
|
||||
// TRANSLATION MISSING
|
||||
| ◽◽◾ | up / down | chat: fset buffer | Mark/unmark multiple options. | `+hsignal:fset_mouse+`
|
||||
| kbd:[▲] | - | チャット: スクリプトバッファ | スクリプトバッファを 5 行上方向にスクロール | `+/script up 5+`
|
||||
| kbd:[▼] | - | チャット: スクリプトバッファ | スクリプトバッファで 5 行下方向にスクロール | `+/script down 5+`
|
||||
| ◾◽◽ | - | チャット: スクリプトバッファ | スクリプトバッファで行選択 | `+/script go ${_chat_line_y}+`
|
||||
| ◽◽◾ | - | チャット: スクリプトバッファ | スクリプトのインストール `+/ 削除 | /script go ${_chat_line_y};/script installremove ${script_name_with_extension}+`
|
||||
| ◾◽◽ | 上 / 左 | バッファリスト | 指定したバッファを下の番号に移動 | `+buflist_mouse+` シグナル
|
||||
| ◾◽◽ | 下 / 右 | バッファリスト | 指定したバッファを上の番号に移動 | `+buflist_mouse+` シグナル
|
||||
| ◾◽◽ | - | バッファリスト | 指定したバッファに切り替える (現在のバッファを指定した場合、バッファ切り替え履歴で前のバッファに切り替える) | `+buflist_mouse+` シグナル
|
||||
| ◽◽◾ | - | バッファリスト | 現在のバッファを指定した場合、バッファ切り替え履歴で次のバッファに切り替える | `+buflist_mouse+` シグナル
|
||||
| kbd:[Ctrl+▲] | - | バッファリスト | バッファ切り替え履歴で前のバッファに切り替える | `+buflist_mouse+` シグナル
|
||||
| kbd:[Ctrl+▼] | - | バッファリスト | バッファ切り替え履歴で次のバッファに切り替える | `+buflist_mouse+` シグナル
|
||||
| ◾◽◽ | 上 | ニックネームリスト | ニックネームリストを 1 ページ分上方向にスクロール | `+/bar scroll nicklist ${_window_number} -100%+`
|
||||
| ◾◽◽ | 下 | ニックネームリスト | ニックネームリストを 1 ページ分下方向にスクロール | `+/bar scroll nicklist ${_window_number} +100%+`
|
||||
| ◾◽◽ | 上 (長く) | ニックネームリスト | ニックネームリストの最初に移動 | `+/bar scroll nicklist ${_window_number} b+`
|
||||
| ◾◽◽ | 下 (長く) | ニックネームリスト | ニックネームリストの最後に移動 | `+/bar scroll nicklist ${_window_number} e+`
|
||||
| ◾◽◽ | - | ニックネームリスト | ニックネームに対するクエリを開く | `+/window ${_window_number};/query ${nick}+`
|
||||
| ◽◽◾ | - | ニックネームリスト | ニックネームに対する whois を行う | `+/window ${_window_number};/whois ${nick}+`
|
||||
| ◾◽◽ | 左 | ニックネームリスト | ニックネームをキックする | `+/window ${_window_number};/kick ${nick}+`
|
||||
| ◾◽◽ | 左 (長く) | ニックネームリスト | ニックネームをキックとバンする | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| ◽◽◾ | 左 | ニックネームリスト | ニックネームをバンする | `+/window ${_window_number};/ban ${nick}+`
|
||||
| ◽◽◾ | - | 入力 | マウスイベントを奪ってコマンドラインにコードを入力 | `+/input grab_mouse_area+`
|
||||
| kbd:[▲] | - | 任意のバー | バーを -20% スクロール | `+/bar scroll ${_bar_name} ${_window_number} -20%+`
|
||||
| kbd:[▼] | - | 任意のバー | バーを +20% スクロール | `+/bar scroll ${_bar_name} ${_window_number} +20%+`
|
||||
| ◽◾◽ | - | 任意の場所 | この場所でカーソルモードを開始 | `+/cursor go ${_x},${_y}+`
|
||||
| kbd:[□ □ ■] | up / down | chat: fset buffer | Mark/unmark multiple options. | `+hsignal:fset_mouse+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[▲] | - | chat: /list buffer | Move five lines up in /list buffer. | `+/list -up 5+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[▼] | - | chat: /list buffer | Move five lines down in /list buffer. | `+/list -down 5+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[■ □ □] | - | chat: /list buffer | Select line in /list buffer. | `+/window ${_window_number};/list -go ${_chat_line_y}+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[□ □ ■] | - | chat: /list buffer | Join IRC channel on selected line. | `+hsignal:irc_list_mouse+`
|
||||
| kbd:[▲] | - | チャット: スクリプトバッファ | スクリプトバッファを 5 行上方向にスクロール | `+/script up 5+`
|
||||
| kbd:[▼] | - | チャット: スクリプトバッファ | スクリプトバッファで 5 行下方向にスクロール | `+/script down 5+`
|
||||
| kbd:[■ □ □] | - | チャット: スクリプトバッファ | スクリプトバッファで行選択 | `+/script go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | チャット: スクリプトバッファ | スクリプトのインストール `+/ 削除 | /script go ${_chat_line_y};/script installremove ${script_name_with_extension}+`
|
||||
| kbd:[■ □ □] | 上 / 左 | バッファリスト | 指定したバッファを下の番号に移動 | `+buflist_mouse+` シグナル
|
||||
| kbd:[■ □ □] | 下 / 右 | バッファリスト | 指定したバッファを上の番号に移動 | `+buflist_mouse+` シグナル
|
||||
| kbd:[■ □ □] | - | バッファリスト | 指定したバッファに切り替える (現在のバッファを指定した場合、バッファ切り替え履歴で前のバッファに切り替える) | `+buflist_mouse+` シグナル
|
||||
| kbd:[□ □ ■] | - | バッファリスト | 現在のバッファを指定した場合、バッファ切り替え履歴で次のバッファに切り替える | `+buflist_mouse+` シグナル
|
||||
| kbd:[Ctrl+▲] | - | バッファリスト | バッファ切り替え履歴で前のバッファに切り替える | `+buflist_mouse+` シグナル
|
||||
| kbd:[Ctrl+▼] | - | バッファリスト | バッファ切り替え履歴で次のバッファに切り替える | `+buflist_mouse+` シグナル
|
||||
| kbd:[■ □ □] | 上 | ニックネームリスト | ニックネームリストを 1 ページ分上方向にスクロール | `+/bar scroll nicklist ${_window_number} -100%+`
|
||||
| kbd:[■ □ □] | 下 | ニックネームリスト | ニックネームリストを 1 ページ分下方向にスクロール | `+/bar scroll nicklist ${_window_number} +100%+`
|
||||
| kbd:[■ □ □] | 上 (長く) | ニックネームリスト | ニックネームリストの最初に移動 | `+/bar scroll nicklist ${_window_number} b+`
|
||||
| kbd:[■ □ □] | 下 (長く) | ニックネームリスト | ニックネームリストの最後に移動 | `+/bar scroll nicklist ${_window_number} e+`
|
||||
| kbd:[■ □ □] | - | ニックネームリスト | ニックネームに対するクエリを開く | `+/window ${_window_number};/query ${nick}+`
|
||||
| kbd:[□ □ ■] | - | ニックネームリスト | ニックネームに対する whois を行う | `+/window ${_window_number};/whois ${nick}+`
|
||||
| kbd:[■ □ □] | 左 | ニックネームリスト | ニックネームをキックする | `+/window ${_window_number};/kick ${nick}+`
|
||||
| kbd:[■ □ □] | 左 (長く) | ニックネームリスト | ニックネームをキックとバンする | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| kbd:[□ □ ■] | 左 | ニックネームリスト | ニックネームをバンする | `+/window ${_window_number};/ban ${nick}+`
|
||||
| kbd:[□ □ ■] | - | 入力 | マウスイベントを奪ってコマンドラインにコードを入力 | `+/input grab_mouse_area+`
|
||||
| kbd:[▲] | - | 任意のバー | バーを -20% スクロール | `+/bar scroll ${_bar_name} ${_window_number} -20%+`
|
||||
| kbd:[▼] | - | 任意のバー | バーを +20% スクロール | `+/bar scroll ${_bar_name} ${_window_number} +20%+`
|
||||
| kbd:[□ ■ □] | - | 任意の場所 | この場所でカーソルモードを開始 | `+/cursor go ${_x},${_y}+`
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ kbd:[▲] と kbd:[▼] はホイールの上方向回転と下方向回転に対応します。
|
||||
// TRANSLATION MISSING
|
||||
^(1)^ Buttons: +
|
||||
kbd:[◼ □ □]: click on left button +
|
||||
kbd:[□ ◼ □]: click on middle button +
|
||||
kbd:[□ □ ◼]: click on right button +
|
||||
Wheel: +
|
||||
kbd:[▲]: wheel up +
|
||||
kbd:[▼]: wheel down
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[key_bindings_fset_buffer]]
|
||||
@@ -1887,8 +1993,8 @@ These keys and actions are used on the fset buffer (see <<fset,Fset plugin>>).
|
||||
| kbd:[F11] | `pass:[<]` | Scroll horizontally on the left. | `+/fset -left+`
|
||||
| kbd:[F12] | `pass:[>]` | Scroll horizontally on the right. | `+/fset -right+`
|
||||
| kbd:[Alt+Space] | `t` | Toggle boolean value. | `+/fset -toggle+`
|
||||
| kbd:[Alt+-] | `-` | Subtract 1 from value for integer/color, set value for other types. | `+/fset -add -1+`
|
||||
| kbd:[Alt++] | `+` | Add 1 to value for integer/color, append to value for other types. | `+/fset -add 1+`
|
||||
| kbd:[Alt+-] | `-` | Subtract 1 from value for integer/color/enum, set value for other types. | `+/fset -add -1+`
|
||||
| kbd:[Alt++] | `+` | Add 1 to value for integer/color/enum, append to value for other types. | `+/fset -add 1+`
|
||||
| kbd:[Alt+f], kbd:[Alt+r] | `r` | Reset value. | `+/fset -reset+`
|
||||
| kbd:[Alt+f], kbd:[Alt+u] | `u` | Unset value. | `+/fset -unset+`
|
||||
| kbd:[Alt+Enter] | `s` | Set value. | `+/fset -set+`
|
||||
@@ -1902,8 +2008,8 @@ These keys and actions are used on the fset buffer (see <<fset,Fset plugin>>).
|
||||
| kbd:[Ctrl+l] (`L`) | | Refresh options and whole screen. | `+/fset -refresh+`
|
||||
| | `$` | Refresh options (keep marked options). |
|
||||
| | `$$` | Refresh options (unmark all options). |
|
||||
| kbd:[Alt+p] | | Toggle plugin description options (`pass:[plugins.desc.*]`). | `+/mute /set fset.look.show_plugins_desc toggle+`
|
||||
| kbd:[Alt+v] | | Toggle help bar. | `+/bar toggle fset+`
|
||||
| kbd:[Alt+p] | `p` | Toggle plugin description options (`pass:[plugins.desc.*]`). | `+/mute /set fset.look.show_plugins_desc toggle+`
|
||||
| kbd:[Alt+v] | `v` | Toggle help bar. | `+/bar toggle fset+`
|
||||
| | `s:x,y` | Sort options by fields x,y (see option <<option_fset.look.sort,fset.look.sort>>). | `+/mute /set fset.look.sort x,y+`
|
||||
| | `s:` | Reset sort to its default value (see option <<option_fset.look.sort,fset.look.sort>>). | `+/mute /unset fset.look.sort+`
|
||||
| | `w:xxx` | Export options in file "xxx". | `+/fset -export xxx+`
|
||||
@@ -1917,6 +2023,40 @@ These keys and actions are used on the fset buffer (see <<fset,Fset plugin>>).
|
||||
[NOTE]
|
||||
^(1)^ The action must be entered as input on the command line, followed by kbd:[Enter].
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[key_bindings_irc_list_buffer]]
|
||||
=== IRC /list buffer
|
||||
|
||||
These keys and actions are used on the IRC /list buffer (see command <<command_irc_list,/list>>).
|
||||
|
||||
[width="100%",cols="^.^3,^.^2,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Key | Action ^(1)^ | Description | Command
|
||||
| kbd:[↑] | | Move one line up. | `+/list -up+`
|
||||
| kbd:[↓] | | Move one line down. | `+/list -down+`
|
||||
| kbd:[PgUp] | | Move one page up. | `+/window page_up+`
|
||||
| kbd:[PgDn] | | Move one page down. | `+/window page_down+`
|
||||
| kbd:[Alt+Home] | `pass:[<<]` | Move to first line. | `+/list -go 0+`
|
||||
| kbd:[Alt+End] | `pass:[>>]` | Move to last line. | `+/list -go end+`
|
||||
| kbd:[F11] | `pass:[<]` | Scroll horizontally on the left. | `+/list -left+`
|
||||
| kbd:[F12] | `pass:[>]` | Scroll horizontally on the right. | `+/list -right+`
|
||||
| kbd:[Ctrl+j] | `j` | Join IRC channel on selected line. | `+/list -join+`
|
||||
| | `xxx` | Show only channels with "xxx" in name or topic (case insensitive). |
|
||||
| | `n:xxx` | Show only channels with "xxx" in name (case insensitive). |
|
||||
| | `t:xxx` | Show only channels with "xxx" in topic (case insensitive). |
|
||||
| | `u:n` | Show only channels with at least "n" users. |
|
||||
| | `u:>n` | Show only channels with more than "n" users. |
|
||||
| | `u:<n` | Show only channels with less than "n" users. |
|
||||
| | `c:xxx` | Show only channels matching the evaluated condition "xxx", using following variables: name, name2, users, topic. |
|
||||
| | `s:x,y` | Sort channels by fields x,y (see command <<command_irc_list,/list>>). |
|
||||
| | `s:` | Reset sort to its default value (see command <<command_irc_list,/list>>). |
|
||||
| | `$` | Refresh list (run again command <<command_irc_list,/list>>). |
|
||||
| | `q` | Close buffer. | `+/buffer close+`
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ The action must be entered as input on the command line, followed by kbd:[Enter].
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[key_bindings_script_buffer]]
|
||||
=== Script buffer
|
||||
@@ -1934,11 +2074,16 @@ These keys and actions are used on the script buffer (see <<script_manager,scrip
|
||||
| kbd:[PgDn] | | Move one page down. | `+/window page_down+`
|
||||
| kbd:[Alt+i] | `i` | Install script. | `+/script install+`
|
||||
| kbd:[Alt+r] | `r` | Remove script. | `+/script remove+`
|
||||
| kbd:[Alt+l] (`L`) | `l` | Load script. | `+/script load+`
|
||||
| kbd:[Alt+l] | `l` | Load script. | `+/script load+`
|
||||
| kbd:[Alt+L] | `L` | Reload script. | `+/script reload+`
|
||||
| kbd:[Alt+u] | `u` | Unload script. | `+/script unload+`
|
||||
| kbd:[Alt+Shift+A] | `A` | Autoload script. | `+/script toggleautoload+`
|
||||
| kbd:[Alt+h] | `h` | Hold/unhold script. | `+/script hold+`
|
||||
| kbd:[Alt+v] | `v` | View script. | `+/script show+`
|
||||
| | `s:x,y` | Sort scripts by fields x,y (see option <<option_script.look.sort,script.look.sort>>). |
|
||||
| | `s:` | Reset sort to its default value (see option <<option_script.look.sort,script.look.sort>>). |
|
||||
| | `$` | Refresh list. |
|
||||
| | `q` | Close buffer. | `+/buffer close+`
|
||||
|===
|
||||
|
||||
// TRANSLATION MISSING
|
||||
@@ -1965,7 +2110,7 @@ Example of fset buffer displaying options starting with `weechat.look` :
|
||||
│2.fset │weechat.look.bare_display_exit_on_input: exit the bare display mode on any c│
|
||||
│ │hanges in input [default: on] │
|
||||
│ │----------------------------------------------------------------------------│
|
||||
│ │ weechat.look.align_end_of_lines integer message │
|
||||
│ │ weechat.look.align_end_of_lines enum message │
|
||||
│ │ weechat.look.align_multiline_words boolean on │
|
||||
│ │ weechat.look.bar_more_down string "++" │
|
||||
│ │ weechat.look.bar_more_left string "<<" │
|
||||
@@ -1974,12 +2119,12 @@ Example of fset buffer displaying options starting with `weechat.look` :
|
||||
│ │## weechat.look.bare_display_exit_on_input boolean on ##│
|
||||
│ │ weechat.look.bare_display_time_format string "%H:%M" │
|
||||
│ │ weechat.look.buffer_auto_renumber boolean on │
|
||||
│ │ weechat.look.buffer_notify_default integer all │
|
||||
│ │ weechat.look.buffer_position integer end │
|
||||
│ │ weechat.look.buffer_notify_default enum all │
|
||||
│ │ weechat.look.buffer_position enum end │
|
||||
│ │ weechat.look.buffer_search_case_sensitive boolean off │
|
||||
│ │ weechat.look.buffer_search_force_default boolean off │
|
||||
│ │ weechat.look.buffer_search_regex boolean off │
|
||||
│ │ weechat.look.buffer_search_where integer prefix_message │
|
||||
│ │ weechat.look.buffer_search_where enum prefix_message │
|
||||
│ │ weechat.look.buffer_time_format string "%H:%M:%S" │
|
||||
│ │ weechat.look.buffer_time_same string "" │
|
||||
│ │[12:55] [2] [fset] 2:fset │
|
||||
@@ -2296,14 +2441,9 @@ irc サーバ "libera" に含まれる全てのバッファに対して設定す
|
||||
例えば現在のバッファで "joe" と "mike" からのメッセージに対するハイライトを無効化するには以下のように設定します:
|
||||
|
||||
----
|
||||
/buffer set hotlist_max_level_nicks_add joe:2,mike:2
|
||||
/buffer setauto hotlist_max_level_nicks_add joe:2,mike:2
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
バッファプロパティ "hotlist_max_level_nicks" は設定ファイルに保存されません。 +
|
||||
これを保存するには _buffer_autoset.py_ スクリプトを使ってください: このスクリプトをインストールするには
|
||||
`+/script install buffer_autoset.py+` コマンドを使い、ヘルプを見るには `+/help buffer_autoset+` コマンドを使ってください。
|
||||
|
||||
[[highlights]]
|
||||
=== ハイライト
|
||||
|
||||
@@ -2329,14 +2469,9 @@ This can also be set with the buffer property "highlight_disable_regex".
|
||||
Same example, specific to the current buffer:
|
||||
|
||||
----
|
||||
/buffer set highlight_disable_regex <flash.*>
|
||||
/buffer setauto highlight_disable_regex <flash.*>
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
バッファプロパティ "highlight_disable_regex" は設定ファイルに保存されません。 +
|
||||
これを保存するには _buffer_autoset.py_ スクリプトを使ってください: このスクリプトをインストールするには
|
||||
`+/script install buffer_autoset.py+` コマンドを使い、ヘルプを見るには `+/help buffer_autoset+` コマンドを使ってください。
|
||||
|
||||
[[highlights_words]]
|
||||
==== ハイライトする単語の追加
|
||||
|
||||
@@ -2391,14 +2526,9 @@ Same example, specific to the current buffer:
|
||||
例えば現在のバッファ宛のすべてのメッセージをハイライトするには以下のように設定します:
|
||||
|
||||
----
|
||||
/buffer set highlight_regex .*
|
||||
/buffer setauto highlight_regex .*
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
バッファプロパティ "highlight_regex" は設定ファイルに保存されません。 +
|
||||
これを保存するには _buffer_autoset.py_ スクリプトを使ってください: このスクリプトをインストールするには
|
||||
`+/script install buffer_autoset.py+` コマンドを使い、ヘルプを見るには `+/help buffer_autoset+` コマンドを使ってください。
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[buffer_logging]]
|
||||
=== Buffer logging
|
||||
@@ -3288,32 +3418,34 @@ _weechat.conf_ ファイル内のセクション:
|
||||
|
||||
[width="100%",cols="3m,6m,16",options="header"]
|
||||
|===
|
||||
| セクション | 操作コマンド | 説明
|
||||
| debug | <<command_weechat_debug,/debug set>> +
|
||||
/set weechat.debug.* | core とプラグインのデバッグレベル (オプションをセクションに追加/削除出来ます)
|
||||
| startup | /set weechat.startup.* | 起動オプション
|
||||
| look | /set weechat.look.* | 外観
|
||||
| palette | <<command_weechat_color,/color alias>> +
|
||||
/set weechat.palette.* | 色の別名 (オプションをセクションに追加/削除出来ます)
|
||||
| color | /set weechat.color.* | 色
|
||||
| completion | /set weechat.completion.* | 補完オプション
|
||||
| history | /set weechat.history.* | 履歴オプション (コマンドとバッファ)
|
||||
| proxy | <<command_weechat_proxy,/proxy>> +
|
||||
/set weechat.proxy.* | プロキシオプション
|
||||
| network | /set weechat.network.* | ネットワーク/TLS オプション
|
||||
| セクション | 操作コマンド | 説明
|
||||
| debug | <<command_weechat_debug,/debug set>> +
|
||||
/set weechat.debug.* | core とプラグインのデバッグレベル (オプションをセクションに追加/削除出来ます)
|
||||
| startup | /set weechat.startup.* | 起動オプション
|
||||
| look | /set weechat.look.* | 外観
|
||||
| palette | <<command_weechat_color,/color alias>> +
|
||||
/set weechat.palette.* | 色の別名 (オプションをセクションに追加/削除出来ます)
|
||||
| color | /set weechat.color.* | 色
|
||||
| completion | /set weechat.completion.* | 補完オプション
|
||||
| history | /set weechat.history.* | 履歴オプション (コマンドとバッファ)
|
||||
| proxy | <<command_weechat_proxy,/proxy>> +
|
||||
/set weechat.proxy.* | プロキシオプション
|
||||
| network | /set weechat.network.* | ネットワーク/TLS オプション
|
||||
// TRANSLATION MISSING
|
||||
| plugin | /set weechat.plugin.* | Options on plugins.
|
||||
| plugin | /set weechat.plugin.* | Options on plugins.
|
||||
// TRANSLATION MISSING
|
||||
| signal | /set weechat.signal.* | Options on signals.
|
||||
| bar | <<command_weechat_bar,/bar>> +
|
||||
/set weechat.bar.* | バーオプション
|
||||
| layout | <<command_weechat_layout,/layout>> | レイアウト
|
||||
| notify | <<command_weechat_buffer,/buffer notify>> | バッファに対する通知レベル (オプションをセクションに追加/削除出来ます)
|
||||
| filter | <<command_weechat_filter,/filter>> | フィルタ
|
||||
| key | <<command_weechat_key,/key>> | デフォルトコンテキストのキー
|
||||
| key_search | <<command_weechat_key,/key>> | 検索コンテキストのキー
|
||||
| key_cursor | <<command_weechat_key,/key>> | カーソルコンテキストのキー
|
||||
| key_mouse | <<command_weechat_key,/key>> | マウスコンテキストのキー
|
||||
| signal | /set weechat.signal.* | Options on signals.
|
||||
| bar | <<command_weechat_bar,/bar>> +
|
||||
/set weechat.bar.* | バーオプション
|
||||
| layout | <<command_weechat_layout,/layout>> | レイアウト
|
||||
// TRANSLATION MISSING
|
||||
| buffer | <<command_weechat_buffer,/buffer setauto>> | Properties auto-applied on buffers when they are opened.
|
||||
| notify | <<command_weechat_buffer,/buffer notify>> | バッファに対する通知レベル (オプションをセクションに追加/削除出来ます)
|
||||
| filter | <<command_weechat_filter,/filter>> | フィルタ
|
||||
| key | <<command_weechat_key,/key>> | デフォルトコンテキストのキー
|
||||
| key_search | <<command_weechat_key,/key>> | 検索コンテキストのキー
|
||||
| key_cursor | <<command_weechat_key,/key>> | カーソルコンテキストのキー
|
||||
| key_mouse | <<command_weechat_key,/key>> | マウスコンテキストのキー
|
||||
|===
|
||||
|
||||
オプション:
|
||||
@@ -3414,7 +3546,7 @@ irc.server.libera.autorejoin_delay integer null -> 30
|
||||
irc.server.libera.away_check integer null -> 0
|
||||
irc.server.libera.away_check_max_nicks integer null -> 25
|
||||
irc.server.libera.capabilities string null -> "*"
|
||||
irc.server.libera.charset_message integer null -> message
|
||||
irc.server.libera.charset_message enum null -> message
|
||||
irc.server.libera.command string null -> ""
|
||||
irc.server.libera.command_delay integer null -> 0
|
||||
irc.server.libera.connection_timeout integer null -> 60
|
||||
@@ -3430,9 +3562,9 @@ irc.server.libera.notify string null -> ""
|
||||
irc.server.libera.password string null -> ""
|
||||
irc.server.libera.proxy string null -> ""
|
||||
irc.server.libera.realname string null -> ""
|
||||
irc.server.libera.sasl_fail integer null -> reconnect
|
||||
irc.server.libera.sasl_fail enum null -> reconnect
|
||||
irc.server.libera.sasl_key string null -> ""
|
||||
irc.server.libera.sasl_mechanism integer null -> plain
|
||||
irc.server.libera.sasl_mechanism enum null -> plain
|
||||
irc.server.libera.sasl_password string "${sec.data.libera}"
|
||||
irc.server.libera.sasl_timeout integer null -> 15
|
||||
irc.server.libera.sasl_username string "alice"
|
||||
@@ -4161,7 +4293,7 @@ CTCP 応答をカスタマイズしたり、いくつかの CTCP
|
||||
例えば、CTCP "VERSION" 要求に対する応答をカスタマイズするには、以下のコマンドを使ってください:
|
||||
|
||||
----
|
||||
/set irc.ctcp.version "I'm running WeeChat $version, it rocks!"
|
||||
/set irc.ctcp.version "I'm running WeeChat ${version}, it rocks!"
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
@@ -4187,7 +4319,7 @@ CTCP "BLABLA" 要求に対する応答を以下のように設定できます:
|
||||
名の前に内部サーバ名をつけてください:
|
||||
|
||||
----
|
||||
/set irc.ctcp.libera.version "WeeChat $version (for libera)"
|
||||
/set irc.ctcp.libera.version "WeeChat ${version} (for libera)"
|
||||
----
|
||||
|
||||
標準の CTCP 応答を復元するには、オプションを削除してください:
|
||||
@@ -4196,40 +4328,41 @@ CTCP "BLABLA" 要求に対する応答を以下のように設定できます:
|
||||
/unset irc.ctcp.version
|
||||
----
|
||||
|
||||
以下のコードを設定値に含めることが可能です。これらのコードは
|
||||
CTCP 応答時に自動的に WeeChat によって展開されます:
|
||||
// TRANSLATION MISSING
|
||||
The CTCP replies are evaluated (see command <<command_weechat_eval,/eval>>) and
|
||||
the following extra variables are available:
|
||||
|
||||
[width="100%",cols="2l,4,8",options="header"]
|
||||
[width="100%",cols="2,4,8",options="header"]
|
||||
|===
|
||||
| コード | 説明 | 値/例
|
||||
| $clientinfo | サポートしている CTCP オプションのリスト | `+ACTION DCC CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION+`
|
||||
| $version | WeeChat バージョン | `+0.4.0-dev+`
|
||||
| $versiongit | WeeChat バージョン + Git バージョン ^(1)^ | `+0.4.0-dev (git: v0.3.9-104-g7eb5cc4)+`
|
||||
| $git | Git バージョン ^(1)^ | `+v0.3.9-104-g7eb5cc4+`
|
||||
| $compilation | WeeChat コンパイル日時 | `+Dec 16 2012+`
|
||||
| $osinfo | OS に関する情報 | `+Linux 2.6.32-5-amd64 / x86_64+`
|
||||
| $site | WeeChat ウェブサイト | `+https://weechat.org/+`
|
||||
| $download | WeeChat ウェブサイトのダウンロードページ | `+https://weechat.org/download/+`
|
||||
| $time | 現在の日時 | `+Sun, 16 Dec 2012 10:40:48 +0100+`
|
||||
| $username | IRC サーバ上で使うユーザ名 | `+name+`
|
||||
| $realname | IRC サーバ上で使う実名 | `+John Doe+`
|
||||
// TRANSLATION MISSING
|
||||
| Variable | 説明 | 値/例
|
||||
| `+${clientinfo}+` | サポートしている CTCP オプションのリスト | `+ACTION DCC CLIENTINFO PING SOURCE TIME VERSION+`
|
||||
| `+${version}+` | WeeChat バージョン | `+4.1.0-dev+`
|
||||
| `+${versiongit}+` | WeeChat バージョン + Git バージョン ^(1)^ | `+4.1.0-dev (git: v4.0.0-51-g8f98b922a)+`
|
||||
| `+${git}+` | Git バージョン ^(1)^ | `+v4.0.0-51-g8f98b922a+`
|
||||
| `+${compilation}+` | WeeChat コンパイル日時 | `+Jul 8 2023 20:14:23+`
|
||||
| `+${osinfo}+` | OS に関する情報 | `+Linux 5.10.0-23-amd64 / x86_64+`
|
||||
| `+${site}+` | WeeChat ウェブサイト | `+https://weechat.org/+`
|
||||
| `+${download}+` | WeeChat ウェブサイトのダウンロードページ | `+https://weechat.org/download/+`
|
||||
| `+${time}+` | 現在の日時 | `+Sat, 08 Jul 2023 21:11:19 +0200+`
|
||||
| `+${username}+` | IRC サーバ上で使うユーザ名 | `+name+`
|
||||
| `+${realname}+` | IRC サーバ上で使う実名 | `+John Doe+`
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ git バージョンとは `git describe` コマンドの出力です。Git リポジトリで
|
||||
WeeChat をコンパイルし、Git がインストールされている場合のみ値が設定されます。
|
||||
|
||||
CTCP オプションが設定されていない (デフォルトの) 場合、CTCP 応答は以下のようになります:
|
||||
// TRANSLATION MISSING
|
||||
The default CTCP replies are:
|
||||
|
||||
[width="100%",cols="2,4,8",options="header"]
|
||||
|===
|
||||
| CTCP | 応答書式 | 例
|
||||
| CLIENTINFO | `+$clientinfo+` | `+ACTION DCC CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION+`
|
||||
| FINGER | `+WeeChat $versiongit+` | `+WeeChat 0.4.0-dev (git: v0.3.9-104-g7eb5cc4)+`
|
||||
| SOURCE | `+$download+` | `+https://weechat.org/download/+`
|
||||
| TIME | `+$time+` | `+Sun, 16 Dec 2012 10:40:48 +0100+`
|
||||
| USERINFO | `+$username ($realname)+` | `+name (John Doe)+`
|
||||
| VERSION | `+WeeChat $versiongit ($compilation)+` | `+WeeChat 0.4.0-dev (git: v0.3.9-104-g7eb5cc4) (Dec 16 2012)+`
|
||||
| CTCP | 応答書式 | 例
|
||||
| CLIENTINFO | `+${clientinfo}+` | `+ACTION DCC CLIENTINFO PING SOURCE TIME VERSION+`
|
||||
| SOURCE | `+${download}+` | `+https://weechat.org/download/+`
|
||||
| TIME | `+${time}+` | `+Sat, 08 Jul 2023 21:11:19 +0200+`
|
||||
| VERSION | `+WeeChat ${version}+` | `+WeeChat 4.1.0-dev+`
|
||||
|===
|
||||
|
||||
[[irc_target_buffer]]
|
||||
|
||||
+74
-36
@@ -39,15 +39,12 @@ https://weechat.org/about/interfaces/[zdalnym interfejsom ^↗^^].
|
||||
[[compile_git]]
|
||||
=== Nie mogę skompilować WeeChat po sklonowaniu repozytorium git, dlaczego?
|
||||
|
||||
// TRANSLATION MISSING
|
||||
WeeChat must be compiled with CMake.
|
||||
WeeChat musi być kompilowany przy użyciu CMake.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
Please follow link:weechat_user.en.html#source_package[build instructions ^↗^^]
|
||||
and ensure all required dependencies are installed.
|
||||
Postępuj zgodnie z link:weechat_user.en.html#source_package[instrukcjami kompilacji ^↗^^]
|
||||
w celu upewnienia się, że wszystkie wymagane zależności są zainstalowane.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
If you still have issues, please report them to the developers.
|
||||
Jeśli nadal występują jakieś problemy zgłoś je do developerów.
|
||||
|
||||
[[compile_macos]]
|
||||
=== Jak zainstalować WeeChat na macOS?
|
||||
@@ -585,6 +582,15 @@ Jeśli używasz aplikacji Terminal na macOS włącz opcję
|
||||
"Use option as meta key" w menu Settings/Keyboard. Następnie możesz używać klawisza
|
||||
kbd:[Option] jako klawisza meta.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[enter_key]]
|
||||
=== Some keys including Enter are not working, why?
|
||||
|
||||
If you run a WeeChat < 4.0.0 with configuration files created by any
|
||||
version ≥ 4.0.0, the keys names become invalid and many keys won't work at all. +
|
||||
To repair them, exit WeeChat, remove all sections `[key*]` from weechat.conf
|
||||
and start WeeChat again: all default keys will be created.
|
||||
|
||||
[[customize_key_bindings]]
|
||||
=== Jak mogę zmienić przypisania klawiszy?
|
||||
|
||||
@@ -615,6 +621,13 @@ komendy w stylu `/123` żeby przejść do bufora #123:
|
||||
/trigger add numberjump modifier "2000|input_text_for_buffer" "${tg_string} =~ ^/[0-9]+$" "=\/([0-9]+)=/buffer *${re:1}=" "" "" "none"
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
For an easy jump to buffers, you can also install the _go.py_ script:
|
||||
|
||||
----
|
||||
/script install go.py
|
||||
----
|
||||
|
||||
[[global_history]]
|
||||
=== Jak używać globalnej historii (zamiast historii buforu) za pomocą strzałek góra/dół?
|
||||
|
||||
@@ -628,9 +641,8 @@ Przykład:
|
||||
/key bind down /input history_global_next
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
With WeeChat ≤ 3.8, you must use the raw key code (press kbd:[Alt+k] then key
|
||||
to display its code):
|
||||
Dla wersji WeeChat ≤ 3.8, należy podać kody klawiszy (naciśnij kbd:[Alt+k] następnie kombinacje
|
||||
klawiszy, aby zobaczyć ich kod):
|
||||
|
||||
----
|
||||
/key bind meta2-A /input history_global_previous
|
||||
@@ -823,11 +835,10 @@ regularnych dla przedrostków i zawartości linii.
|
||||
Filtrowane linie są tylko ukrywane, nie usuwane, można je zobaczyć wyłączając
|
||||
filtry (domyślnie kbd:[Alt+=] zmienia stan filtrów).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[filter_irc_join_part_quit]]
|
||||
=== How can I filter join/part/quit and other annoying messages on IRC channels?
|
||||
=== Jak odfiltrować informację o join/part/quit i inne uciążliwe wiadomości na kanałach IRC?
|
||||
|
||||
See link:weechat_user.pl.html#irc_smart_filter[User's guide / IRC smart filter ^↗^^].
|
||||
Zobacz link:weechat_user.pl.html#irc_smart_filter[Poradnik użytkownika / Inteligentny filtr ^↗^^].
|
||||
|
||||
[[filter_irc_join_channel_messages]]
|
||||
=== Jak mogę filtrować wyświetlane wiadomości podczas wejścia na kanał IRC?
|
||||
@@ -925,34 +936,22 @@ link:weechat_user.pl.html#max_hotlist_level_nicks[hotlist_max_level_nicks_add ^
|
||||
do ustawienia maksymalnego poziomu hotlisty dla niektórych nicków, dla buforów
|
||||
lub grup buforów (jak serwery IRC).
|
||||
|
||||
W celu wyłączenia tylko podświetleń wystarczy ustawić ja na 2:
|
||||
W celu wyłączenia tylko podświetleń wystarczy ustawić ja na 2.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
For the current buffer:
|
||||
|
||||
----
|
||||
/buffer set hotlist_max_level_nicks_add joe:2,mike:2
|
||||
/buffer setauto hotlist_max_level_nicks_add joe:2,mike:2
|
||||
----
|
||||
|
||||
To utawienie nie jest zapisywane jednak w konfiguracji.
|
||||
W celu automatycznego ustawiania tej właściwości należy użyć skryptu _buffer_autoset.py_:
|
||||
// TRANSLATION MISSING
|
||||
For all channels on server "libera":
|
||||
|
||||
----
|
||||
/script install buffer_autoset.py
|
||||
/set weechat.buffer.irc.libera.*.hotlist_max_level_nicks_add joe:2,mike:2
|
||||
----
|
||||
|
||||
Na przykład w celu wyłączenia powiadomień od "mike" na #weechat w sieci libera:
|
||||
on the IRC server libera:
|
||||
|
||||
----
|
||||
/buffer_autoset add irc.libera.#weechat hotlist_max_level_nicks_add mike:2
|
||||
----
|
||||
|
||||
Dla całego serwera libera:
|
||||
|
||||
----
|
||||
/buffer_autoset add irc.libera hotlist_max_level_nicks_add mike:2
|
||||
----
|
||||
|
||||
Więcej przykładów można znaleźć wykonując komende `+/help buffer_autoset+`.
|
||||
|
||||
[[irc_target_buffer]]
|
||||
=== Jak mogę zmienić docelowy bufor dla komendy w połączonym buforze (jak bufor z serwerami)?
|
||||
|
||||
@@ -1081,7 +1080,10 @@ W celu zmniejszenia używanej pamięci możesz zastosować się do poniższych r
|
||||
|
||||
Możesz skorzystać z tych samych porad jak dla <<memory_usage,memory>>, oraz tych:
|
||||
|
||||
* schowaj pasek "nicklist": `/bar hide nicklist`
|
||||
// TRANSLATION MISSING
|
||||
* schowaj pasek "nicklist": `/bar hide nicklist` (key: kbd:[Alt+Shift+N]).
|
||||
// TRANSLATION MISSING
|
||||
* Disable "buflist": `/buflist disable` (key: kbd:[Alt+Shift+B]).
|
||||
* usuń wyświetlanie sekund w czasie na pasku statusu:
|
||||
`+/set weechat.look.item_time_format "%H:%M"+` (domyślna wartość)
|
||||
* wyłącz automatyczne sprawdzanie poprawności wpisywanych słów w linii poleceń (o ile je włączyłeś):
|
||||
@@ -1103,14 +1105,21 @@ Wyłącz odpowiedzi na wszystkie zapytania CTCP:
|
||||
|
||||
----
|
||||
/set irc.ctcp.clientinfo ""
|
||||
/set irc.ctcp.finger ""
|
||||
/set irc.ctcp.source ""
|
||||
/set irc.ctcp.time ""
|
||||
/set irc.ctcp.userinfo ""
|
||||
/set irc.ctcp.version ""
|
||||
/set irc.ctcp.ping ""
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
With WeeChat < 4.1.0, other CTCP queries were replied by default and must be
|
||||
disabled as well:
|
||||
|
||||
----
|
||||
/set irc.ctcp.finger ""
|
||||
/set irc.ctcp.userinfo ""
|
||||
----
|
||||
|
||||
Wyładuj i wyłącz automatyczne ładowanie wtyczki "xfer" (używanej przez IRC DCC):
|
||||
----
|
||||
/plugin unload xfer
|
||||
@@ -1145,6 +1154,35 @@ w _sec.conf_ za pomocą komendy `/secure`).
|
||||
Przejrzyj link:weechat_user.pl.html#files_and_directories[Poradnik użytkownika / Pliki i foldery ^↗^^],
|
||||
gdzie znajdziesz więcej informacji o plikach konfiguracyjnych.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[move_to_another_device]]
|
||||
=== I want to move my WeeChat to another device and keep my config, what should I copy?
|
||||
|
||||
First check directories used by WeeChat with this command: `/debug dirs`. +
|
||||
Directories home/config and home/data must be copied (all files and sub-directories).
|
||||
|
||||
For example if you're using XDG directories (default with WeeChat ≥ 3.2),
|
||||
the directories should be `$HOME/.config/weechat` and `$HOME/.local/share/weechat`. +
|
||||
If you're using a single directory (default with WeeChat < 3.2), the directory
|
||||
should be `$HOME/.weechat`.
|
||||
|
||||
[IMPORTANT]
|
||||
The WeeChat version on the new device must be greater than or equal to the version
|
||||
on the initial device. +
|
||||
Downgrading WeeChat configuration is *NOT SUPPORTED* and can break it,
|
||||
leading to unusable WeeChat.
|
||||
|
||||
Steps:
|
||||
|
||||
. Quit Weechat: `/quit` (or `/upgrade -quit` if you want to resume the session,
|
||||
which includes content of all buffers).
|
||||
. Copy all directories, sub-directories and files to the new device, keeping
|
||||
same names and permissions.
|
||||
. Optional: copy any file outside these directories that you refer to in your
|
||||
configuration (it's not recommended to use files outside WeeChat directories).
|
||||
. Start WeeChat on the new device: `weechat` (or `weechat --upgrade` if you
|
||||
saved the session).
|
||||
|
||||
[[development]]
|
||||
== Rozwój
|
||||
|
||||
|
||||
+376
-264
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -37,7 +37,7 @@ STUB_HEADER = """\
|
||||
# DO NOT EDIT BY HAND!
|
||||
#
|
||||
|
||||
from typing import Dict
|
||||
from typing import Dict, Union
|
||||
"""
|
||||
|
||||
CONSTANT_RE = (
|
||||
|
||||
@@ -142,10 +142,11 @@ WeeChat „језгро” се налази у следећим директо
|
||||
| wee-secure-buffer.c | Бафер обезбеђених података.
|
||||
| wee-secure-config.c | Опције обезбеђених података (фајл sec.conf).
|
||||
| wee-string.c | Функције над стринговима.
|
||||
| wee-sys.c | Системске функције.
|
||||
| wee-upgrade-file.c | Интерни систем ажурирања.
|
||||
| wee-upgrade.c | Ажурирање за WeeChat језгро (бафери, линије, историја, ...).
|
||||
| wee-url.c | URL трансфер (помоћу libcurl).
|
||||
| wee-utf8.c | UTF-8 фунцкије.
|
||||
| wee-utf8.c | UTF-8 функције.
|
||||
| wee-util.c | Неке друге функције.
|
||||
| wee-version.c | Функције за WeeChat верзију.
|
||||
| weechat.c | Основне функције: опције командне линије, покретање.
|
||||
@@ -168,6 +169,7 @@ WeeChat „језгро” се налази у следећим директо
|
||||
| wee-hook-process.c | Кука "process".
|
||||
| wee-hook-signal.c | Кука "signal".
|
||||
| wee-hook-timer.c | Кука "timer".
|
||||
| wee-hook-url.c | Кука "url".
|
||||
| gui/ | Функције за бафере, прозоре, ... (користе их сви интерфејси).
|
||||
| gui-bar-item.c | Ставке трака.
|
||||
| gui-bar-window.c | Прозори трака.
|
||||
@@ -238,6 +240,8 @@ WeeChat „језгро” се налази у следећим директо
|
||||
| buflist.c | Главне buflist функције.
|
||||
| buflist-bar-item.c | Buflist ставке траке.
|
||||
| buflist-command.c | Buflist команде.
|
||||
// TRANSLATION MISSING
|
||||
| buflist-completion.c | Buflist completions.
|
||||
| buflist-config.c | Buflist опције кофиг (фајл buflist.conf).
|
||||
| buflist-info.c | Buflist info/infolists/hdata.
|
||||
| buflist-mouse.c | Buflist акције мишем.
|
||||
@@ -283,6 +287,7 @@ WeeChat „језгро” се налази у следећим директо
|
||||
| irc-info.c | IRC info/infolists/hdata.
|
||||
| irc-input.c | Унос команди/текста.
|
||||
| irc-join.c | Функције за листе канала којима се приступа.
|
||||
| irc-list.c | Бафер за одговор на /list команду.
|
||||
| irc-message.c | Функције за манипулисање IRC порукама.
|
||||
| irc-mode.c | Функције у вези режима канала/надимка.
|
||||
| irc-modelist.c | Листе режима IRC канала (+b, +e, +I, ...).
|
||||
@@ -421,6 +426,7 @@ WeeChat „језгро” се налази у следећим директо
|
||||
| test-core-url.cpp | Тестови: URL адресе.
|
||||
| test-core-utf8.cpp | Тестови: UTF-8.
|
||||
| test-core-util.cpp | Тестови: помоћне функције.
|
||||
| test-core-sys.cpp | Тестови: системске функције.
|
||||
| gui/ | Корен unit тестова интерфејса.
|
||||
| test-gui-bar-window.cpp | Тестови: функције прозора траке.
|
||||
| test-gui-buffer.cpp | Тестови: бафер функције.
|
||||
@@ -438,8 +444,10 @@ WeeChat „језгро” се налази у следећим директо
|
||||
| test-irc-channel.cpp | Тестови: IRC канали.
|
||||
| test-irc-color.cpp | Тестови: IRC боје.
|
||||
| test-irc-config.cpp | Тестови: IRC конфигурација.
|
||||
| test-irc-ctcp.cpp | Тестови: IRC CTCP.
|
||||
| test-irc-ignore.cpp | Тестови: IRC игнорисања.
|
||||
| test-irc-join.cpp | Тестови: IRC функције приступања.
|
||||
| test-irc-list.cpp | Тестови: IRC бафер за одговор на /list команду.
|
||||
| test-irc-message.cpp | Тестови: IRC поруке.
|
||||
| test-irc-mode.cpp | Тестови: IRC режими.
|
||||
| test-irc-nick.cpp | Тестови: IRC надимци.
|
||||
@@ -450,8 +458,7 @@ WeeChat „језгро” се налази у следећим директо
|
||||
| logger/ | Корен unit тестива за logger додатак.
|
||||
| test-logger.cpp | Тестови: logger.
|
||||
| test-logger-backlog.cpp | Тестови: logger заостатак.
|
||||
// TRANSLATION MISSING
|
||||
| test-logger-tail.cpp | Tests: logger tail functions.
|
||||
| test-logger-tail.cpp | Тестови: logger tail фунцкије.
|
||||
| trigger/ | Корен unit тестова за окидач додатак.
|
||||
| test-trigger.cpp | Тестови: окидачи.
|
||||
| test-trigger-config.cpp | Тестови: конфигурација окидача.
|
||||
@@ -460,10 +467,8 @@ WeeChat „језгро” се налази у следећим директо
|
||||
| test-typing-status.cpp | Тестови: typing статус.
|
||||
| relay/ | Корен unit тестова за Релеј додатак.
|
||||
| test-relay-auth.cpp | Тестови: аутентификација клијената.
|
||||
// TRANSLATION MISSING
|
||||
| irc/ | Root of unit tests for Relay "irc" protocol.
|
||||
// TRANSLATION MISSING
|
||||
| test-relay-irc.cpp | Tests: Relay "irc" protocol.
|
||||
| irc/ | Корен unit тестова за Релеј „irc” протокол.
|
||||
| test-relay-irc.cpp | Тестови: РЕлеј „irc” протокол.
|
||||
| xfer/ | Корен unit тестова за Xfer додатак.
|
||||
| test-xfer-file.cpp | Тестови: фајл функције.
|
||||
| test-xfer-network.cpp | Тестови: мрежне функције.
|
||||
|
||||
+60
-21
@@ -517,6 +517,15 @@ UXTerm*metaSendsEscape: true
|
||||
|
||||
Ако користите macOS Terminal апликацију, укључите опцију „Use option as meta key” у менију Settings/Keyboard након чега можете користити тастер kbd:[Option] као meta тастер.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[enter_key]]
|
||||
=== Some keys including Enter are not working, why?
|
||||
|
||||
If you run a WeeChat < 4.0.0 with configuration files created by any
|
||||
version ≥ 4.0.0, the keys names become invalid and many keys won't work at all. +
|
||||
To repair them, exit WeeChat, remove all sections `[key*]` from weechat.conf
|
||||
and start WeeChat again: all default keys will be created.
|
||||
|
||||
[[customize_key_bindings]]
|
||||
=== Како могу да прилагодим тастерске пречице?
|
||||
|
||||
@@ -543,6 +552,12 @@ UXTerm*metaSendsEscape: true
|
||||
/trigger add numberjump modifier "2000|input_text_for_buffer" "${tg_string} =~ ^/[0-9]+$" "=\/([0-9]+)=/buffer *${re:1}=" "" "" "none"
|
||||
----
|
||||
|
||||
За једноставно скакање на бафере, можете такође да инсталирате и _go.py_ скрипту:
|
||||
|
||||
----
|
||||
/script install go.py
|
||||
----
|
||||
|
||||
[[global_history]]
|
||||
=== Како да се тастерима горе и доле користи глобална историја (уместо историје бафера)?
|
||||
|
||||
@@ -815,32 +830,20 @@ link:weechat_user.sr.html#max_hotlist_level_nicks[hotlist_max_level_nicks_add ^
|
||||
можете користити да за неке надимке подесите максимални ниво вруће листе, по баферу, или по
|
||||
групи бафера (као на пример IRC сервери).
|
||||
|
||||
Ако само желите да искључите истицања, треба да је поставите на 2:
|
||||
Ако само желите да искључите истицања, треба да је поставите на 2.
|
||||
|
||||
За текући бафер:
|
||||
|
||||
----
|
||||
/buffer set hotlist_max_level_nicks_add joe:2,mike:2
|
||||
/buffer setauto hotlist_max_level_nicks_add пера:2,мика:2
|
||||
----
|
||||
|
||||
Међутим, ова особина бафера се не чува у конфигурацији. Ако желите да се ове особине бафера аутоматски поново примене, биће вам потребна скрипта _buffer_autoset.py_:
|
||||
За све канале на серверу „libera”:
|
||||
|
||||
----
|
||||
/script install buffer_autoset.py
|
||||
/set weechat.buffer.irc.libera.*.hotlist_max_level_nicks_add пера:2,мика:2
|
||||
----
|
||||
|
||||
На пример, ако за стално желите да искључите истицања од надимка „mike” са #weechat на IRC серверу libera:
|
||||
|
||||
----
|
||||
/buffer_autoset add irc.libera.#weechat hotlist_max_level_nicks_add mike:2
|
||||
----
|
||||
|
||||
Ако уместо овога желите да се примени на комплетан libera сервер:
|
||||
|
||||
----
|
||||
/buffer_autoset add irc.libera hotlist_max_level_nicks_add mike:2
|
||||
----
|
||||
|
||||
За још примера, погледајте `+/help buffer_autoset+`.
|
||||
|
||||
[[irc_target_buffer]]
|
||||
=== Како могу да променим циљни бафер за команде над спојеним баферима (као што је бафер са серверима)?
|
||||
|
||||
@@ -957,7 +960,8 @@ export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
|
||||
|
||||
Можете да следите исте савете као за <<memory_usage,меморију>>, као и следеће:
|
||||
|
||||
* Сакријте „nicklist” траку: `/bar hide nicklist`.
|
||||
* Сакријте „nicklist” траку: `/bar hide nicklist` (тастер: kbd:[Alt+Shift+N]).
|
||||
* Искључите „buflist”: `/buflist disable` (тастер: kbd:[Alt+Shift+B]).
|
||||
* Уклоните приказ секунди из времена у статусној траци: `+/set weechat.look.item_time_format "%H:%M"+` (ово је и подразумевана вредност).
|
||||
* Искључите проверу неисправно написаних речи у командној линији у реалном времену (ако сте је укључили): `+/set spell.check.real_time off+`.
|
||||
* Поставите променљиву _TZ_ (на пример: `export TZ="Europe/Paris"`), тиме спречавате чест приступ фајлу _/etc/localtime_.
|
||||
@@ -976,14 +980,20 @@ export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
|
||||
|
||||
----
|
||||
/set irc.ctcp.clientinfo ""
|
||||
/set irc.ctcp.finger ""
|
||||
/set irc.ctcp.source ""
|
||||
/set irc.ctcp.time ""
|
||||
/set irc.ctcp.userinfo ""
|
||||
/set irc.ctcp.version ""
|
||||
/set irc.ctcp.ping ""
|
||||
----
|
||||
|
||||
Са WeeChat < 4.1.0, на остале CTCP упите се подразумевано одговарало и такође морају
|
||||
да се искључе:
|
||||
|
||||
----
|
||||
/set irc.ctcp.finger ""
|
||||
/set irc.ctcp.userinfo ""
|
||||
----
|
||||
|
||||
Уклоните из меморије и искључите ауто учитавање „xfer” додатка (користи се за IRC DCC):
|
||||
|
||||
----
|
||||
@@ -1012,6 +1022,35 @@ export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
|
||||
|
||||
Погледајте link:weechat_user.sr.html#files_and_directories[Корисничко упутство / Фајлови и директоријуми ^↗^^] за више информација о конфигурационим фајловима.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[move_to_another_device]]
|
||||
=== I want to move my WeeChat to another device and keep my config, what should I copy?
|
||||
|
||||
First check directories used by WeeChat with this command: `/debug dirs`. +
|
||||
Directories home/config and home/data must be copied (all files and sub-directories).
|
||||
|
||||
For example if you're using XDG directories (default with WeeChat ≥ 3.2),
|
||||
the directories should be `$HOME/.config/weechat` and `$HOME/.local/share/weechat`. +
|
||||
If you're using a single directory (default with WeeChat < 3.2), the directory
|
||||
should be `$HOME/.weechat`.
|
||||
|
||||
[IMPORTANT]
|
||||
The WeeChat version on the new device must be greater than or equal to the version
|
||||
on the initial device. +
|
||||
Downgrading WeeChat configuration is *NOT SUPPORTED* and can break it,
|
||||
leading to unusable WeeChat.
|
||||
|
||||
Steps:
|
||||
|
||||
. Quit Weechat: `/quit` (or `/upgrade -quit` if you want to resume the session,
|
||||
which includes content of all buffers).
|
||||
. Copy all directories, sub-directories and files to the new device, keeping
|
||||
same names and permissions.
|
||||
. Optional: copy any file outside these directories that you refer to in your
|
||||
configuration (it's not recommended to use files outside WeeChat directories).
|
||||
. Start WeeChat on the new device: `weechat` (or `weechat --upgrade` if you
|
||||
saved the session).
|
||||
|
||||
[[development]]
|
||||
== Развој
|
||||
|
||||
|
||||
+365
-106
@@ -3901,18 +3901,28 @@ int weechat_crypto_hash (const void *data, int data_size, const char *hash_algo,
|
||||
|
||||
[width="100%", cols="2,2,3,6", options="header"]
|
||||
|===
|
||||
| Вредност | Алгоритам | Величина хеша | Напомене
|
||||
| `+crc32+` | CRC32 | 4 бајта (32 бита) | Није хеш алгоритам у криптографском смислу.
|
||||
| `+md5+` | MD5 | 16 бајтова (128 бита) | *Слаб*, не препоручује се за криптографску употребу.
|
||||
| `+sha1+` | SHA-1 | 20 бајтова (160 бита) | *Слаб*, не препоручује се за криптографску употребу.
|
||||
| `+sha224+` | SHA-224 | 28 бајтова (224 бита) |
|
||||
| `+sha256+` | SHA-256 | 32 бајта (256 бита) |
|
||||
| `+sha384+` | SHA-384 | 48 бајтова (384 бита) |
|
||||
| `+sha512+` | SHA-512 | 64 бајта (512 бита) |
|
||||
| `+sha3-224+` | SHA3-224 | 28 бајтова (224 бита) | Алгоритам је доступан у libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-256+` | SHA3-256 | 32 бајта (256 бита) | Алгоритам је доступан у libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-384+` | SHA3-384 | 48 бајтова (384 бита) | Алгоритам је доступан у libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-512+` | SHA3-512 | 64 бајта (512 бита) | Алгоритам је доступан у libgcrypt ≥ 1.7.0.
|
||||
| Вредност | Алгоритам | Величина хеша | Напомене
|
||||
| `+crc32+` | CRC32 | 4 бајта (32 бита) | Није хеш алгоритам у криптографском смислу.
|
||||
| `+md5+` | MD5 | 16 бајтова (128 бита) | *Слаб*, не препоручује се за криптографску употребу.
|
||||
| `+sha1+` | SHA-1 | 20 бајтова (160 бита) | *Слаб*, не препоручује се за криптографску употребу.
|
||||
| `+sha224+` | SHA-224 | 28 бајтова (224 бита) |
|
||||
| `+sha256+` | SHA-256 | 32 бајта (256 бита) |
|
||||
| `+sha384+` | SHA-384 | 48 бајтова (384 бита) |
|
||||
| `+sha512+` | SHA-512 | 64 бајта (512 бита) |
|
||||
| `+sha512-224+` | SHA-512/224 | 28 бајтова (224 бита) | Алгоритам је доступан у libgcrypt ≥ 1.9.4.
|
||||
| `+sha512-256+` | SHA-512/256 | 32 бајта (256 бита) | Алгоритам је доступан у libgcrypt ≥ 1.9.4.
|
||||
| `+sha3-224+` | SHA3-224 | 28 бајтова (224 бита) | Алгоритам је доступан у libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-256+` | SHA3-256 | 32 бајта (256 бита) | Алгоритам је доступан у libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-384+` | SHA3-384 | 48 бајтова (384 бита) | Алгоритам је доступан у libgcrypt ≥ 1.7.0.
|
||||
| `+sha3-512+` | SHA3-512 | 64 бајта (512 бита) | Алгоритам је доступан у libgcrypt ≥ 1.7.0.
|
||||
| `+blake2b-160+` | BLAKE2B-160 | 20 бајтова (160 бита) | Алгоритам је доступан у libgcrypt ≥ 1.8.0.
|
||||
| `+blake2b-256+` | BLAKE2B-256 | 32 бајта (256 бита) | Алгоритам је доступан у libgcrypt ≥ 1.8.0.
|
||||
| `+blake2b-384+` | BLAKE2B-384 | 48 бајтова (384 бита) | Алгоритам је доступан у libgcrypt ≥ 1.8.0.
|
||||
| `+blake2b-512+` | BLAKE2B-512 | 64 бајта (512 бита) | Алгоритам је доступан у libgcrypt ≥ 1.8.0.
|
||||
| `+blake2s-128+` | BLAKE2S-128 | 16 бајтова (128 бита) | Алгоритам је доступан у libgcrypt ≥ 1.8.0.
|
||||
| `+blake2s-160+` | BLAKE2S-160 | 20 бајтова (160 бита) | Алгоритам је доступан у libgcrypt ≥ 1.8.0.
|
||||
| `+blake2s-224+` | BLAKE2S-224 | 28 бајтова (224 бита) | Алгоритам је доступан у libgcrypt ≥ 1.8.0.
|
||||
| `+blake2s-256+` | BLAKE2S-256 | 32 бајта (256 бита) ) | Алгоритам је доступан у libgcrypt ≥ 1.8.0.
|
||||
|===
|
||||
|
||||
Повратна вредност:
|
||||
@@ -4316,11 +4326,6 @@ if (weechat_file_copy ("/tmp/test.txt", "/path/to/test2.txt"))
|
||||
[NOTE]
|
||||
Ова функција није доступна у API скриптовања.
|
||||
|
||||
[[util]]
|
||||
=== Алати
|
||||
|
||||
Неке корисне функције.
|
||||
|
||||
==== file_compress
|
||||
|
||||
_WeeChat ≥ 3.7._
|
||||
@@ -4341,7 +4346,9 @@ int weechat_file_compress (const char *from, const char *to,
|
||||
* _to_: одредишни фајл
|
||||
* _compressor_: компресор који треба да се користи, једно од:
|
||||
** _gzip_: gzip компресија
|
||||
** _zstd_: zstandard компресија
|
||||
// TRANSLATION MISSING
|
||||
** _zstd_: zstandard компресија (available only if zstd was enabled when
|
||||
WeeChat was compiled)
|
||||
* _compression_level_: ниво компресије, између 1 (брзо, ниска компресија) и
|
||||
100 (споро, најбоља компресија)
|
||||
|
||||
@@ -4362,6 +4369,11 @@ if (weechat_file_compress ("/tmp/test.txt", "/tmp/test.txt.zst", "zstd", 50))
|
||||
[NOTE]
|
||||
Ова функција није доступна у API скриптовања.
|
||||
|
||||
[[util]]
|
||||
=== Алати
|
||||
|
||||
Неке корисне функције.
|
||||
|
||||
==== util_timeval_cmp
|
||||
|
||||
Пореди две „timeval” структуре.
|
||||
@@ -6509,9 +6521,10 @@ my_section_read_cb (const void *pointer, void *data,
|
||||
{
|
||||
/* ... */
|
||||
|
||||
return WEECHAT_CONFIG_READ_OK;
|
||||
/* return WEECHAT_CONFIG_READ_MEMORY_ERROR; */
|
||||
/* return WEECHAT_CONFIG_READ_FILE_NOT_FOUND; */
|
||||
return WEECHAT_CONFIG_OPTION_SET_OK_CHANGED;
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE; */
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_ERROR; */
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND; */
|
||||
}
|
||||
|
||||
int
|
||||
@@ -6601,7 +6614,7 @@ def config_new_section(config_file: str, name: str,
|
||||
callback_delete_option: str, callback_delete_option_data: str) -> str: ...
|
||||
|
||||
# пример
|
||||
def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
|
||||
def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: Union[str, None]) -> int:
|
||||
# ...
|
||||
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
|
||||
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
|
||||
@@ -6620,7 +6633,7 @@ def my_section_write_default_cb(data: str, config_file: str, section_name: str)
|
||||
# return weechat.WEECHAT_CONFIG_WRITE_ERROR
|
||||
# return weechat.WEECHAT_CONFIG_WRITE_MEMORY_ERROR
|
||||
|
||||
def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
|
||||
def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: Union[str, None]) -> int:
|
||||
# ...
|
||||
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
|
||||
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
|
||||
@@ -6685,7 +6698,7 @@ section = weechat.config_search_section(config_file, "section")
|
||||
|
||||
==== config_new_option
|
||||
|
||||
_Ажурирано у верзији 1.5._
|
||||
_Ажурирано у верзији 1.5, 4.1.0._
|
||||
|
||||
Креира нову опцију у одељку конфигурационог фајла.
|
||||
|
||||
@@ -6730,11 +6743,13 @@ struct t_config_option *weechat_config_new_option (
|
||||
* _name_: име опције; у програм у WeeChat верзије ≥ 1.4, име може да укључи и име родитељске опције (у случају да је ова опција „null”, вредност родитељске опције ће се приказати у излазу команде `/set`), тада је синтакса: „име << фајл.одељак.опција”
|
||||
* _type_: тип опције:
|
||||
** _boolean_: логичка вредност (on/off)
|
||||
** _integer_: целобројна вредност (са стринговима за вредности који нису обавезни)
|
||||
** _integer_: целобројна вредност
|
||||
** _string_: стринг вредност
|
||||
** _color_: боја
|
||||
** _enum_: листа стринг вредности (интерно се чува као цео број)
|
||||
* _description_: опис опције
|
||||
* _string_values_: вредности као стринг (раздвојене са `+|+`), користе се за _integer_ тип (није обавезно)
|
||||
* _string_values_: вредности као стринг (раздвојене са `+|+`) (није обавезно, потребно је
|
||||
за тип _enum_)
|
||||
* _min_: минимална вредност (за _integer_ тип)
|
||||
* _max_: максимална вредност (за _integer_ тип)
|
||||
* _default_value_: подразумевана вредност опције (користи се када се опција ресетује)
|
||||
@@ -6772,8 +6787,8 @@ C пример:
|
||||
[source,c]
|
||||
----
|
||||
/* логичка */
|
||||
struct t_config_option *option1 =
|
||||
weechat_config_new_option (config_file, section, "option1", "boolean",
|
||||
struct t_config_option *option_bool =
|
||||
weechat_config_new_option (config_file, section, "option_bool", "boolean",
|
||||
"My option, type boolean",
|
||||
NULL,
|
||||
0, 0,
|
||||
@@ -6785,8 +6800,8 @@ struct t_config_option *option1 =
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* целобројна */
|
||||
struct t_config_option *option2 =
|
||||
weechat_config_new_option (config_file, section, "option2", "integer",
|
||||
struct t_config_option *option_int =
|
||||
weechat_config_new_option (config_file, section, "option_int", "integer",
|
||||
"My option, type integer",
|
||||
NULL,
|
||||
0, 100,
|
||||
@@ -6797,22 +6812,9 @@ struct t_config_option *option2 =
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* целобројна (са стринг вредностима) */
|
||||
struct t_config_option *option3 =
|
||||
weechat_config_new_option (config_file, section, "option3", "integer",
|
||||
"My option, type integer (with string values)",
|
||||
"top|bottom|left|right",
|
||||
0, 0,
|
||||
"bottom",
|
||||
"bottom",
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* стринг */
|
||||
struct t_config_option *option4 =
|
||||
weechat_config_new_option (config_file, section, "option4", "string",
|
||||
struct t_config_option *option_str =
|
||||
weechat_config_new_option (config_file, section, "option_str", "string",
|
||||
"My option, type string",
|
||||
NULL,
|
||||
0, 0,
|
||||
@@ -6824,8 +6826,8 @@ struct t_config_option *option4 =
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* боја */
|
||||
struct t_config_option *option5 =
|
||||
weechat_config_new_option (config_file, section, "option5", "color",
|
||||
struct t_config_option *option_col =
|
||||
weechat_config_new_option (config_file, section, "option_col", "color",
|
||||
"My option, type color",
|
||||
NULL,
|
||||
0, 0,
|
||||
@@ -6835,6 +6837,19 @@ struct t_config_option *option5 =
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* целобројна (са стринг вредностима) */
|
||||
struct t_config_option *option_enum =
|
||||
weechat_config_new_option (config_file, section, "option_enum", "enum",
|
||||
"My option, type enum",
|
||||
"top|bottom|left|right",
|
||||
0, 0,
|
||||
"bottom",
|
||||
"bottom",
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
----
|
||||
|
||||
Скрипта (Python):
|
||||
@@ -6844,55 +6859,55 @@ struct t_config_option *option5 =
|
||||
# прототип
|
||||
def config_new_option(config_file: str, section: str, name: str, type: str, description: str,
|
||||
string_values: str, min: int, max: int,
|
||||
default_value: str | None, value: str | None, null_value_allowed: int,
|
||||
default_value: Union[str, None], value: Union[str, None], null_value_allowed: int,
|
||||
callback_check_value: str, callback_check_value_data: str,
|
||||
callback_change: str, callback_change_data: str,
|
||||
callback_delete: str, callback_delete_data: str) -> str: ...
|
||||
|
||||
# пример
|
||||
def option4_check_value_cb(data: str, option: str, value: str) -> int:
|
||||
def option_str_check_value_cb(data: str, option: str, value: str) -> int:
|
||||
# ...
|
||||
return 1
|
||||
# return 0
|
||||
|
||||
def option4_change_cb(data: str, option: str) -> None:
|
||||
def option_str_change_cb(data: str, option: str) -> None:
|
||||
# ...
|
||||
|
||||
def option4_delete_cb(data: str, option: str) -> None:
|
||||
def option_str_delete_cb(data: str, option: str) -> None:
|
||||
# ...
|
||||
|
||||
option1 = weechat.config_new_option(config_file, section, "option1", "boolean",
|
||||
option_bool = weechat.config_new_option(config_file, section, "option_bool", "boolean",
|
||||
"My option, type boolean",
|
||||
"", 0, 0, "on", "on", 0,
|
||||
"", "",
|
||||
"", "",
|
||||
"", "")
|
||||
|
||||
option2 = weechat.config_new_option(config_file, section, "option2", "integer",
|
||||
option_int = weechat.config_new_option(config_file, section, "option_int", "integer",
|
||||
"My option, type integer",
|
||||
"", 0, 100, "15", "15", 0,
|
||||
"", "",
|
||||
"", "",
|
||||
"", "")
|
||||
|
||||
option3 = weechat.config_new_option(config_file, section, "option3", "integer",
|
||||
"My option, type integer (with string values)",
|
||||
"top|bottom|left|right",
|
||||
0, 0, "bottom", "bottom", 0,
|
||||
option_str = weechat.config_new_option(config_file, section, "option_str", "string",
|
||||
"My option, type string",
|
||||
"", 0, 0, "test", "test", 1,
|
||||
"option_str_check_value_cb", "",
|
||||
"option_str_change_cb", "",
|
||||
"option_str_delete_cb", "")
|
||||
|
||||
option_col = weechat.config_new_option(config_file, section, "option_col", "color",
|
||||
"My option, type color",
|
||||
"", 0, 0, "lightblue", "lightblue", 0,
|
||||
"", "",
|
||||
"", "",
|
||||
"", "")
|
||||
|
||||
option4 = weechat.config_new_option(config_file, section, "option4", "string",
|
||||
"My option, type string",
|
||||
"", 0, 0, "test", "test", 1,
|
||||
"option4_check_value_cb", "",
|
||||
"option4_change_cb", "",
|
||||
"option4_delete_cb", "")
|
||||
|
||||
option5 = weechat.config_new_option(config_file, section, "option5", "color",
|
||||
"My option, type color",
|
||||
"", 0, 0, "lightblue", "lightblue", 0,
|
||||
option_enum = weechat.config_new_option(config_file, section, "option_enum", "enum",
|
||||
"My option, type enum",
|
||||
"top|bottom|left|right",
|
||||
0, 0, "bottom", "bottom", 0,
|
||||
"", "",
|
||||
"", "",
|
||||
"", "")
|
||||
@@ -7164,7 +7179,7 @@ int weechat_config_option_set (struct t_config_option *option,
|
||||
* _value_: нова вредност опције, могуће су и специјалне вредности које зависе од типа опције:
|
||||
** _boolean_:
|
||||
*** `toggle`: пребацује текућу вредност
|
||||
** _integer_ или _color_:
|
||||
** _integer_, _color_ или _enum_:
|
||||
*** `++N`: додаје `N` (било који цео број) на текућу вредност
|
||||
*** `--N`: одузима `N` (било који цео број) од текуће вредности
|
||||
* _run_callback_: 1 за позив change функције повратног позива ако је вредност измењена, у супротном 0
|
||||
@@ -7395,6 +7410,7 @@ const char *weechat_config_option_get_string (struct t_config_option *option,
|
||||
*** _integer_
|
||||
*** _string_
|
||||
*** _color_
|
||||
*** _enum_
|
||||
** _description_: опис опције
|
||||
|
||||
Повратна вредност:
|
||||
@@ -7569,6 +7585,7 @@ int weechat_config_boolean (struct t_config_option *option);
|
||||
* _integer_: 0
|
||||
* _string_: 0
|
||||
* _color_: 0
|
||||
* _enum_: 0
|
||||
|
||||
C пример:
|
||||
|
||||
@@ -7619,6 +7636,7 @@ int weechat_config_boolean_default (struct t_config_option *option);
|
||||
* _integer_: 0
|
||||
* _string_: 0
|
||||
* _color_: 0
|
||||
* _enum_: 0
|
||||
|
||||
C пример:
|
||||
|
||||
@@ -7669,6 +7687,7 @@ int weechat_config_integer (struct t_config_option *option);
|
||||
* _integer_: целобројна вредност опције
|
||||
* _string_: 0
|
||||
* _color_: индекс боје
|
||||
* _enum_: целобројна вредност опције (индекс enum вредности)
|
||||
|
||||
C пример:
|
||||
|
||||
@@ -7711,6 +7730,7 @@ int weechat_config_integer_default (struct t_config_option *option);
|
||||
* _integer_: подразумевана целобројна вредност опције
|
||||
* _string_: 0
|
||||
* _color_: подразумевани индекс боје
|
||||
* _enum_: подразумевана целобројна вредност опције (индекс enum вредности)
|
||||
|
||||
C пример:
|
||||
|
||||
@@ -7750,9 +7770,10 @@ const char *weechat_config_string (struct t_config_option *option);
|
||||
Повратна вредност, зависи од типа опције:
|
||||
|
||||
* _boolean_: „on” ако је вредност истинита, у супротном „off”
|
||||
* _integer_: стринг вредност опције је цео број са стринг вредностима, у супротном је NULL
|
||||
* _integer_: NULL
|
||||
* _string_: стринг вредност опције
|
||||
* _color_: име боје
|
||||
* _enum_: стринг вредност опције
|
||||
|
||||
C пример:
|
||||
|
||||
@@ -7792,9 +7813,10 @@ const char *weechat_config_string_default (struct t_config_option *option);
|
||||
Повратна вредност, зависи од типа опције:
|
||||
|
||||
* _boolean_: „on” ако је подразумевана вредност истинита, у супротном „off”
|
||||
* _integer_: подразумевана стринг вредност опције је цео број са стринг вредностима, у супротном је NULL
|
||||
* _integer_: NULL
|
||||
* _string_: подразумевана стринг вредност опције
|
||||
* _color_: име подразумеване боје
|
||||
* _enum_: подразумевана стринг вредност опције
|
||||
|
||||
C пример:
|
||||
|
||||
@@ -7837,6 +7859,7 @@ const char *weechat_config_color (struct t_config_option *option);
|
||||
* _integer_: NULL
|
||||
* _string_: NULL
|
||||
* _color_: име боје
|
||||
* _enum_: NULL
|
||||
|
||||
C пример:
|
||||
|
||||
@@ -7879,6 +7902,7 @@ const char *weechat_config_color_default (struct t_config_option *option);
|
||||
* _integer_: NULL
|
||||
* _string_: NULL
|
||||
* _color_: име подразумеване боје
|
||||
* _enum_: NULL
|
||||
|
||||
C пример:
|
||||
|
||||
@@ -7900,6 +7924,96 @@ option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_color_default(option)
|
||||
----
|
||||
|
||||
==== config_enum
|
||||
|
||||
_WeeChat ≥ 4.1.0._
|
||||
|
||||
Враћа enum вредност опције, као цео број.
|
||||
|
||||
Прототип:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int weechat_config_enum (struct t_config_option *option);
|
||||
----
|
||||
|
||||
Аргументи:
|
||||
|
||||
* _option_: показивач на опцију
|
||||
|
||||
Враћена вредност, у зависности од типа опције:
|
||||
|
||||
* _boolean_: логичка вредност опције (0 или 1)
|
||||
* _integer_: целобројна вредност опције
|
||||
* _string_: 0
|
||||
* _color_: индекс боје
|
||||
* _enum_: целобројна вредност опције (индекс enum вредности)
|
||||
|
||||
C пример:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_config_option *option = weechat_config_get ("plugin.section.option");
|
||||
int value = weechat_config_enum (option);
|
||||
----
|
||||
|
||||
Скрипта (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# прототип
|
||||
def config_enum(option: str) -> int: ...
|
||||
|
||||
# пример
|
||||
option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_enum(option)
|
||||
----
|
||||
|
||||
==== config_enum_default
|
||||
|
||||
_WeeChat ≥ 4.1.0._
|
||||
|
||||
Враћа подразумевану enum вредност опције, као цео број.
|
||||
|
||||
Прототип:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int weechat_config_enum_default (struct t_config_option *option);
|
||||
----
|
||||
|
||||
Аргументи:
|
||||
|
||||
* _option_: показивач на опцију
|
||||
|
||||
Повратна вредност, у зависности од типа опције:
|
||||
|
||||
* _boolean_: подразумевана логичка вредност опције (0 или 1)
|
||||
* _integer_: подразумевана целобројна вредност опције
|
||||
* _string_: 0
|
||||
* _color_: подразумевани индекс боје
|
||||
* _enum_: подразумевана целобројна вредност опције (индекс enum вредности)
|
||||
|
||||
C пример:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_config_option *option = weechat_config_get ("plugin.section.option");
|
||||
int value = weechat_config_enum_default (option);
|
||||
----
|
||||
|
||||
Скрипта (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# прототип
|
||||
def config_enum_default(option: str) -> int: ...
|
||||
|
||||
# пример
|
||||
option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_enum_default(option)
|
||||
----
|
||||
|
||||
==== config_write_option
|
||||
|
||||
Уписује линију у конфигурациони фајл са опцијом и њеном вредности (ова функција би требало да се позове само у „write” или „write_default” функцијама повратног позива за одељак).
|
||||
@@ -9613,7 +9727,6 @@ struct t_hook *weechat_hook_process (const char *command,
|
||||
void *callback_data);
|
||||
----
|
||||
|
||||
|
||||
Аргументи:
|
||||
|
||||
* _command_: команда која се покреће у дете процесу, URL _(WeeChat ≥ 0.3.7)_ или функција _(WeeChat ≥ 1.5)_ (погледајте испод)
|
||||
@@ -9844,18 +9957,8 @@ struct t_hook *weechat_hook_process_hashtable (const char *command,
|
||||
_/dev/null_.
|
||||
|===
|
||||
|
||||
За команду „url:...” су доступне следеће опције (за опис сваке опције погледајте `+man curl_easy_setopt+`):
|
||||
|
||||
include::{autogendir}/autogen_api_url_options.sr.adoc[tag=url_options]
|
||||
|
||||
[NOTE]
|
||||
^(1)^ За опције типа „mask”, формат је: „вредност1+вредност2+вредност3”; за опције типа „list”, ставке листе морају да се раздвоје преломом линије (`\n`). +
|
||||
^(2)^ Ако су доступне константе, оне морају да се користе као вредност опције.
|
||||
|
||||
За URL су дозвољене две додатне опције (стрингови) за улазни/излазни фајл:
|
||||
|
||||
* _file_in_: фајл који се чита и шаље URL адресама (post фајл)
|
||||
* _file_out_: преузети URL/фајл се уписује у овај фајл (уместо на стандардни излаз)
|
||||
// TRANSLATION MISSING
|
||||
For command "url:...", see available options in function <<_hook_url,hook_url>>.
|
||||
|
||||
Повратна вредност:
|
||||
|
||||
@@ -10015,6 +10118,152 @@ hook4 = weechat.hook_process_hashtable("sh",
|
||||
20000, "my_process_cb", "")
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
==== hook_url
|
||||
|
||||
_WeeChat ≥ 4.1.0._
|
||||
|
||||
URL transfer.
|
||||
|
||||
Прототип:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_hook *weechat_hook_url (const char *url,
|
||||
struct t_hashtable *options,
|
||||
int timeout,
|
||||
int (*callback)(const void *pointer,
|
||||
void *data,
|
||||
const char *url,
|
||||
struct t_hashtable *options,
|
||||
struct t_hashtable *output),
|
||||
const void *callback_pointer,
|
||||
void *callback_data);
|
||||
----
|
||||
|
||||
Аргументи:
|
||||
|
||||
* _url_: URL
|
||||
* _options_: options for URL transfer (see below); хеш табела се дуплира у функцији, тако да након овог позива безбедно можете да ослободите меморију коју заузима
|
||||
* _timeout_: timeout for URL transfer (in milliseconds): after this timeout,
|
||||
the transfer is stopped (0 means no timeout)
|
||||
* _callback_: function called when the transfer has ended, arguments and return
|
||||
value:
|
||||
** _const void *pointer_: pointer
|
||||
** _void *data_: pointer
|
||||
** _const char *url_: URL
|
||||
** _struct t_hashtable *options_: options
|
||||
** _struct t_hashtable *output_: result (keys and values are strings), which may
|
||||
contain the following keys:
|
||||
*** _response_code_: HTTP response code
|
||||
*** _headers_: HTTP headers in response
|
||||
*** _output_: standard output (set only if _file_out_ was not set in options)
|
||||
*** _error_: error message (set only in case of error)
|
||||
** return value:
|
||||
*** _WEECHAT_RC_OK_
|
||||
*** _WEECHAT_RC_ERROR_
|
||||
* _callback_pointer_: показивач који се прослеђује функцији повратног позива када је позове програм WeeChat
|
||||
* _callback_data_: показивач који се прослеђује функцији повратног позива када је позове програм WeeChat; ако није NULL, алоцирала га је malloc (или нека слична функција) и аутоматски се ослобађа када се кука обрише
|
||||
|
||||
The following Curl options are available (see `+man curl_easy_setopt+` for
|
||||
a description of each option):
|
||||
|
||||
include::{autogendir}/autogen_api_url_options.sr.adoc[tag=url_options]
|
||||
|
||||
[NOTE]
|
||||
^(1)^ За опције типа „mask”, формат је: „вредност1+вредност2+вредност3”; за опције типа „list”, ставке листе морају да се раздвоје преломом линије (`\n`). +
|
||||
^(2)^ Ако су доступне константе, оне морају да се користе као вредност опције.
|
||||
|
||||
These two extra options (strings) are allowed for input/output file:
|
||||
|
||||
[width="100%",cols="2,^1,7",options="header"]
|
||||
|===
|
||||
| Option | Type | Description
|
||||
| file_in | string | фајл који се чита и шаље URL адресама (post фајл)
|
||||
| file_out | string | преузети URL/фајл се уписује у овај фајл (уместо на стандардни излаз)
|
||||
|===
|
||||
|
||||
Повратна вредност:
|
||||
|
||||
* показивач на нову куку, NULL у случају грешке
|
||||
|
||||
C пример:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int
|
||||
my_url_cb (const void *pointer, void *data, const char *url,
|
||||
struct t_hashtable *options, struct t_hashtable *output)
|
||||
{
|
||||
weechat_printf (NULL, "response_code: %s", weechat_hashtable_get (output, "response_code"));
|
||||
weechat_printf (NULL, "headers: %s", weechat_hashtable_get (output, "headers"));
|
||||
weechat_printf (NULL, "output: %s", weechat_hashtable_get (output, "output"));
|
||||
weechat_printf (NULL, "error: %s", weechat_hashtable_get (output, "error"));
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/* example 1: output to a file */
|
||||
struct t_hashtable *options_url1 = weechat_hashtable_new (8,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL,
|
||||
NULL);
|
||||
if (options_url1)
|
||||
{
|
||||
weechat_hashtable_set (options_url1, "file_out", "/tmp/weechat.org.html");
|
||||
struct t_hook *my_url_hook = weechat_hook_url ("https://weechat.org/",
|
||||
options_url1,
|
||||
20000,
|
||||
&my_url_cb, NULL, NULL);
|
||||
weechat_hashtable_free (options_url1);
|
||||
}
|
||||
|
||||
/* example 2: custom HTTP headers, output sent to callback */
|
||||
struct t_hashtable *options_url2 = weechat_hashtable_new (8,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL,
|
||||
NULL);
|
||||
if (options_url2)
|
||||
{
|
||||
weechat_hashtable_set (options_url2, "httpheader",
|
||||
"Header1: value1\n"
|
||||
"Header2: value2");
|
||||
struct t_hook *my_url_hook = weechat_hook_url ("http://localhost:8080/",
|
||||
options_url2,
|
||||
20000,
|
||||
&my_url_cb, NULL, NULL);
|
||||
weechat_hashtable_free (options_url2);
|
||||
}
|
||||
----
|
||||
|
||||
Скрипта (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# прототип
|
||||
def hook_url(url: str, options: Dict[str, str], timeout: int, callback: str, callback_data: str) -> str: ...
|
||||
|
||||
# пример
|
||||
def my_url_cb(data: str, url: str, options: Dict[str, str], output: Dict[str, str]) -> int:
|
||||
weechat.prnt("", "output: %s" % output)
|
||||
return weechat.WEECHAT_RC_OK
|
||||
|
||||
# example 1: output to a file
|
||||
hook1 = weechat.hook_url("https://weechat.org/",
|
||||
{"file_out": "/tmp/weechat.org.html"},
|
||||
20000, "my_url_cb", "")
|
||||
|
||||
# example 2: custom HTTP headers, output sent to callback
|
||||
options = {
|
||||
"httpheader": "\n".join([
|
||||
"Header1: value1",
|
||||
"Header2: value2",
|
||||
]),
|
||||
}
|
||||
hook2 = weechat.hook_url("http://localhost:8080/", options, 20000, "my_url_cb", "")
|
||||
----
|
||||
|
||||
==== hook_connect
|
||||
|
||||
_Ажурирано у верзијама 1.5, 2.0._
|
||||
@@ -11960,25 +12209,22 @@ struct t_hook *weechat_hook_modifier (const char *modifier,
|
||||
(да стане у 512 подразумевано).
|
||||
| Нови садржај поруке.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| [[hook_modifier_relay_client_irc_in]] relay_client_irc_in | 4.0.0
|
||||
| String with relay client pointer (eg: "0x1234abcd")
|
||||
| Content of message received from relay IRC client.
|
||||
| New content of message.
|
||||
| Стринг са показивачем на релеј клијента (нпр. "0x1234abcd")
|
||||
| Садржај поруке примљене од релеј IRC клијента.
|
||||
| Нови садржај поруке.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| [[hook_modifier_relay_client_irc_out1]] relay_client_irc_out1 | 4.0.0
|
||||
| String with relay client pointer (eg: "0x1234abcd")
|
||||
| Content of message about to be sent to relay IRC client before automatic split
|
||||
(to fit in 512 bytes by default).
|
||||
| New content of message.
|
||||
| Стринг са показивачем на релеј клијента (нпр. "0x1234abcd")
|
||||
| Садржај поруке која треба да се пошаље релеј IRC клијенту пре аутоматске поделе
|
||||
(тако да стане у подразумевано 512 бајтова).
|
||||
| Нови садржај поруке.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| [[hook_modifier_relay_client_irc_out]] relay_client_irc_out | 4.0.0
|
||||
| String with relay client pointer (eg: "0x1234abcd")
|
||||
| Content of message about to be sent to relay IRC client after automatic split
|
||||
(to fit in 512 bytes by default).
|
||||
| New content of message.
|
||||
| Стринг са показивачем на релеј клијента (нпр. "0x1234abcd")
|
||||
| Садржај поруке која треба да се пошаље релеј IRC клијенту након аутоматске поделе
|
||||
(тако да стане у подразумевано 512 бајтова).
|
||||
| Нови садржај поруке.
|
||||
|
||||
| [[hook_modifier_bar_condition_yyy]] bar_condition_yyy ^(2)^ |
|
||||
| Стринг са показивачем на прозор (нпр: "0x1234abcd")
|
||||
@@ -12482,7 +12728,7 @@ struct t_hook *my_hdata = weechat_hook_hdata ("my_hdata",
|
||||
|
||||
==== hook_focus
|
||||
|
||||
_Ажурирано у верзији 1.5._
|
||||
_Ажурирано у верзији 1.5, 4.0.0, 4.1.0._
|
||||
|
||||
Качи се на фокус: догађај миша или тастер притиснут у режиму померања курсора.
|
||||
|
||||
@@ -12584,16 +12830,22 @@ struct t_hook *weechat_hook_focus (const char *area,
|
||||
| _chat_line_message | Порука линије.
|
||||
| "Hello world!" | ""
|
||||
|
||||
| _chat_focused_line | Линија на (x,y) _(WeeChat ≥ 4.0.0)_.
|
||||
| _chat_focused_line | Линија на (x, y) _(WeeChat ≥ 4.0.0)_.
|
||||
| "Здраво свима!" | ""
|
||||
|
||||
| _chat_focused_line_bol | Текст од почетка линије до (x-1, y) _(WeeChat ≥ 4.1.0)_.
|
||||
| "Здраво" | ""
|
||||
|
||||
| _chat_focused_line_eol | Текст од (x, y) до краја линије _(WeeChat ≥ 4.1.0)_.
|
||||
| "аво свима!" | ""
|
||||
|
||||
| _chat_word | Реч на (x,y).
|
||||
| "Здраво" | ""
|
||||
|
||||
| _chat_bol | Текст од почетка линије до (x-1, y).
|
||||
| _chat_bol | Текст од почетка поруке до (x-1, y).
|
||||
| "Зд" | ""
|
||||
|
||||
| _chat_eol | Тест од (x, y) до краја линије.
|
||||
| _chat_eol | Текст од (x, y) до краја поруке.
|
||||
| "раво свете!" | ""
|
||||
|
||||
| _bar_name | Име траке.
|
||||
@@ -17018,7 +17270,7 @@ int weechat_hdata_get_var_offset (struct t_hdata *hdata, const char *name);
|
||||
|
||||
Повратна вредност:
|
||||
|
||||
* померај променљиве, 0 у случају да је дошло до грешке
|
||||
* померај променљиве, -1 у случају да је дошло до грешке
|
||||
|
||||
C пример:
|
||||
|
||||
@@ -17907,7 +18159,7 @@ for key in hash:
|
||||
|
||||
==== hdata_compare
|
||||
|
||||
_WeeChat ≥ 1.9._
|
||||
_WeeChat ≥ 1.9, ажурирано у верзији 4.1.0._
|
||||
|
||||
Пореди hdata променљиву два објекта.
|
||||
|
||||
@@ -17923,7 +18175,8 @@ int weechat_hdata_compare (struct t_hdata *hdata, void *pointer1, void *pointer2
|
||||
* _hdata_: показивач на hdata
|
||||
* _pointer1_: показивач на први објекат програма WeeChat/додатка
|
||||
* _pointer2_: показивач на други објекат програма WeeChat/додатка
|
||||
* _name_: име променљиве; у случају низова, име може бити „N|име” где је N индекс низа (који почиње од 0), на пример: „2|име”
|
||||
* _name_: назив променљиве или путања до назива променљиве; у случају низова, име може
|
||||
бити „N|име” где је N индекс низа (који почиње од 0), на пример: „2|име”
|
||||
* _case_sensitive_: 1 за поређење стрингова које разликује величину слова, у супротном 0
|
||||
|
||||
Повратна вредност:
|
||||
@@ -17939,8 +18192,12 @@ C пример:
|
||||
struct t_hdata *hdata = weechat_hdata_get ("buffer");
|
||||
struct t_gui_buffer *buffer1 = weechat_buffer_search ("irc", "libera.#weechat");
|
||||
struct t_gui_buffer *buffer2 = weechat_buffer_search ("irc", "libera.#weechat-fr");
|
||||
weechat_printf (NULL, "number comparison = %d",
|
||||
weechat_printf (NULL, "comparison of buffer number = %d",
|
||||
weechat_hdata_compare (hdata, buffer1, buffer2, "number", 0));
|
||||
weechat_printf (NULL, "comparison of number of lines = %d",
|
||||
weechat_hdata_compare (hdata, buffer1, buffer2, "own_lines.lines_count", 0));
|
||||
weechat_printf (NULL, "comparison of local variable = %d",
|
||||
weechat_hdata_compare (hdata, buffer1, buffer2, "local_variables.myvar", 0));
|
||||
----
|
||||
|
||||
Скрипта (Python):
|
||||
@@ -17954,7 +18211,9 @@ def hdata_compare(hdata: str, pointer1: str, pointer2: str, name: str, case_sens
|
||||
hdata = weechat.hdata_get("buffer")
|
||||
buffer1 = weechat.buffer_search("irc", "libera.#weechat")
|
||||
buffer2 = weechat.buffer_search("irc", "libera.#weechat-fr")
|
||||
weechat.prnt("", "бројно поређење = %d" % weechat.hdata_compare(hdata, buffer1, buffer2, "number", 0))
|
||||
weechat.prnt("", "comparison of buffer number = %d" % weechat.hdata_compare(hdata, buffer1, buffer2, "number", 0))
|
||||
weechat.prnt("", "comparison of number of lines = %d" % weechat.hdata_compare(hdata, buffer1, buffer2, "own_lines.lines_count", 0))
|
||||
weechat.prnt("", "comparison of local variable = %d" % weechat.hdata_compare(hdata, buffer1, buffer2, "local_variables.myvar", 0))
|
||||
----
|
||||
|
||||
==== hdata_set
|
||||
|
||||
@@ -92,8 +92,7 @@ _клијенти_ су повезани са _релејем_ као што ј
|
||||
[[command_handshake]]
|
||||
=== handshake
|
||||
|
||||
// TRANSLATION MISSING
|
||||
_WeeChat ≥ 2.9, updated in versions 3.5, 4.0.0._
|
||||
_WeeChat ≥ 2.9, ажурирано у верзијама 3.5, 4.0.0._
|
||||
|
||||
Извршава руковање између клијента и програма WeeChat: ово је у већини случајева неопходно како би се сазнале поставке сесије и припремила аутентификација командом _init_.
|
||||
|
||||
@@ -123,11 +122,10 @@ _WeeChat ≥ 2.9, updated in versions 3.5, 4.0.0._
|
||||
*** _zstd_: компресија са https://facebook.github.io/zstd/[Zstandard ^↗^^]: боља
|
||||
компресија, као и много бржа компресија и декомпресија у односу на _zlib_
|
||||
_(WeeChat ≥ 3.5)_
|
||||
// TRANSLATION MISSING
|
||||
** _escape_commands_: commands sent by the client to relay must be escaped:
|
||||
all backslashes are interpreted and a single backslash must be escaped (`\\`);
|
||||
this allows for example the client to send multiline messages (chars `\n` are
|
||||
converted to newlines, see <<command_input,input command>>)
|
||||
** _escape_commands_: команде које клијент шаље релеју морају да се означе:
|
||||
све обрнуте косе црте се интерпретирају и једна обрнута коса црта мора да се означи (`\\`);
|
||||
на овај начин клијент, на пример, може да шаље вишелинијске поруке (карактери `\n` се
|
||||
претварају у преломе редова, погледајте <<command_input,input команду>>)
|
||||
_(WeeChat ≥ 4.0.0)_
|
||||
|
||||
Напомене у вези опције _password_hash_algo_:
|
||||
@@ -158,10 +156,9 @@ _WeeChat ≥ 2.9, updated in versions 3.5, 4.0.0._
|
||||
** _off_: поруке се не компресују
|
||||
** _zlib_: поруке су компресоване са https://zlib.net/[zlib ^↗^^]
|
||||
** _zstd_: поруке су компресоване са https://facebook.github.io/zstd/[Zstandard ^↗^^]
|
||||
// TRANSLATION MISSING
|
||||
* _escape_commands_:
|
||||
** _on_: all backslashes are interpreted in the client messages
|
||||
** _off_: backslashes are *NOT* interpreted in the client messages and used as-is
|
||||
** _on_: све обрнуте косе црте у порукама клијента се интерпретирају
|
||||
** _off_: обрнуте косе црте у порукама клијента се *НЕ* интерпретирају и користе се онакве какве су
|
||||
|
||||
[TIP]
|
||||
У програму WeeChat верзије ≤ 2.8, команда _handshake_ није имплементирана, програм WeeChat једноставно игнорише ову команду, чак и ако се пошаље пре _init_ команде. +
|
||||
@@ -947,9 +944,8 @@ input core.weechat /help filter
|
||||
input irc.libera.#weechat здраво!
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
* Send multiline message to #test channel (option _escape_commands_ must have
|
||||
been enabled in <<command_handshake,handshake command>> and requires
|
||||
* Шаље вишелинијску поруку на #test канал (опција _escape_commands_ мора да буде
|
||||
укључена у <<command_handshake,handshake команди>> и потребан је
|
||||
WeeChat ≥ 4.0.0):
|
||||
|
||||
----
|
||||
|
||||
+297
-178
@@ -112,7 +112,7 @@ WeeChat мора да се изгради са CMake.
|
||||
| pkg-config |
|
||||
| Детекција инсталираних библиотека.
|
||||
|
||||
| libncursesw5-dev ^(2)^ |
|
||||
| libncurses-dev |
|
||||
| Ncurses интерфејс.
|
||||
|
||||
| libcurl4-gnutls-dev |
|
||||
@@ -121,7 +121,7 @@ WeeChat мора да се изгради са CMake.
|
||||
| libgcrypt20-dev |
|
||||
| Обезбеђени подаци, IRC SASL аутентификација.
|
||||
|
||||
| libgnutls28-dev | ≥ 2.2.0 ^(3)^
|
||||
| libgnutls28-dev | ≥ 2.2.0 ^(2)^
|
||||
| IRC додатак: подршка за TLS везе, IRC SASL аутентификацију (ECDSA-NIST256P-CHALLENGE). +
|
||||
Relay додатак: подршка за TLS везе.
|
||||
|
||||
@@ -129,42 +129,79 @@ WeeChat мора да се изгради са CMake.
|
||||
| Logger додатак: компресија ротирајућих лог фајлова (gzip). +
|
||||
Relay додатак: компресија порука (WeeChat -> клијент) са https://zlib.net/[zlib ^↗^^] (weechat протокол). +
|
||||
Script додатак: читање индекс фајла репозиторијума (gzip).
|
||||
|
||||
| libzstd-dev | ≥ 0.8.1
|
||||
| Logger додатак: компресија ротирајућих лог фајлова. +
|
||||
Relay додатак: компресија порука (WeeChat -> клијент) са https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat протокол).
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ Име долази из Debian GNU/Linux Bookworm дистрибуције, верзија и
|
||||
име могу да буду другачији у осталим дитрибуцијама. +
|
||||
^(2)^ Препоручује се компајлирање са libncurses**w**5-dev (битно је *w*). Програм WeeChat може да се компајлира са libncurses5-dev, али се то *НЕ* препоручује: можете имати багове код приказа широких карактера. +
|
||||
^(3)^ GnuTLS ≥ 3.0.21 је неопходан за IRC SASL аутентификацију механизмом ECDSA-NIST256P-CHALLENGE.
|
||||
^(2)^ GnuTLS ≥ 3.0.21 је неопходан за IRC SASL аутентификацију механизмом ECDSA-NIST256P-CHALLENGE.
|
||||
|
||||
Следећа табела приказује листу пакета који нису обавезни за компајлирање програма WeeChat:
|
||||
|
||||
[width="100%", cols="5,^3,.^15", options="header"]
|
||||
|===
|
||||
| Пакет ^(1)^ | Верзија | Могућности
|
||||
| {cpp} компајлер (pass:[g++ / clang++]) | | Изградња и покретање тестова, JavaScript додатак.
|
||||
| gettext | | Интернационализација (превод порука; основни језик је енглески).
|
||||
| ca-certificates | | Сертификати за TLS везе.
|
||||
| libaspell-dev / libenchant-dev | | Spell додатак.
|
||||
| python3-dev | ≥ 3.0 | Python додатак.
|
||||
| libperl-dev | | Perl додатак.
|
||||
| ruby3.1, ruby3.1-dev | ≥ 1.9.1 | Ruby додатак.
|
||||
| liblua5.4-dev | | Lua додатак.
|
||||
| tcl-dev | ≥ 8.5 | Tcl додатак.
|
||||
| guile-3.0-dev | ≥ 2.0 | Guile (scheme) додатак.
|
||||
| libv8-dev | ≤ 3.24.3 | JavaScript додатак.
|
||||
| php-dev | ≥ 7.0 | PHP додатак.
|
||||
| libphp-embed | ≥ 7.0 | PHP додатак.
|
||||
| libxml2-dev | | PHP додатак.
|
||||
| libargon2-dev | | PHP додатак (ако је PHP ≥ 7.2).
|
||||
| libsodium-dev | | PHP додатак (ако је PHP ≥ 7.2).
|
||||
| asciidoctor | ≥ 1.5.4 | Изградња man странице и документације.
|
||||
| ruby-pygments.rb | | Документација изградње.
|
||||
| libcpputest-dev | ≥ 3.4 | Изградња и покретање тестова.
|
||||
| Пакет ^(1)^ | Верзија | Могућности
|
||||
|
||||
| {cpp} компајлер (pass:[g++ / clang++]) |
|
||||
| Изградња и покретање тестова, JavaScript додатак.
|
||||
|
||||
| gettext |
|
||||
| Интернационализација (превод порука; основни језик је енглески).
|
||||
|
||||
| ca-certificates |
|
||||
| Сертификати за TLS везе.
|
||||
|
||||
| libzstd-dev | ≥ 0.8.1
|
||||
| Logger додатак: компресија ротирајућих лог фајлова (zstandard). +
|
||||
Relay додатак: компресија порука (WeeChat -> клијент) са https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat протокол).
|
||||
|
||||
| libaspell-dev / libenchant-dev |
|
||||
| Spell додатак.
|
||||
|
||||
| python3-dev | ≥ 3.0
|
||||
| Python додатак.
|
||||
|
||||
| libperl-dev |
|
||||
| Perl додатак.
|
||||
|
||||
| ruby3.1, ruby3.1-dev | ≥ 1.9.1
|
||||
| Ruby додатак.
|
||||
|
||||
| liblua5.4-dev |
|
||||
| Lua додатак.
|
||||
|
||||
| tcl-dev | ≥ 8.5
|
||||
| Tcl додатак.
|
||||
|
||||
| guile-3.0-dev | ≥ 2.0
|
||||
| Guile (scheme) додатак.
|
||||
|
||||
| libv8-dev | ≤ 3.24.3
|
||||
| JavaScript додатак.
|
||||
|
||||
| php-dev | ≥ 7.0
|
||||
| PHP додатак.
|
||||
|
||||
| libphp-embed | ≥ 7.0
|
||||
| PHP додатак.
|
||||
|
||||
| libxml2-dev |
|
||||
| PHP додатак.
|
||||
|
||||
| libargon2-dev |
|
||||
| PHP додатак (ако је PHP ≥ 7.2).
|
||||
|
||||
| libsodium-dev |
|
||||
| PHP додатак (ако је PHP ≥ 7.2).
|
||||
|
||||
| asciidoctor | ≥ 1.5.4
|
||||
| Изградња man странице и документације.
|
||||
|
||||
| ruby-pygments.rb |
|
||||
| Документација изградње.
|
||||
|
||||
| libcpputest-dev | ≥ 3.4
|
||||
| Изградња и покретање тестова.
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -202,7 +239,8 @@ $ make install
|
||||
|
||||
Можете да користите опције за CMake, у формату: `-DОПЦИЈА=ВРЕДНОСТ`.
|
||||
|
||||
Листа често коришћених опција:
|
||||
// TRANSLATION MISSING
|
||||
List of available options:
|
||||
|
||||
[width="100%", cols="3m,3,3m,10", options="header"]
|
||||
|===
|
||||
@@ -256,6 +294,10 @@ $ make install
|
||||
| ENABLE_GUILE | `ON`, `OFF` | ON
|
||||
| Компајлира <<scripting_plugins,Guile додатак>> (Scheme).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| ENABLE_HEADLESS | `ON`, `OFF` | ON
|
||||
| Compile headless binary.
|
||||
|
||||
| ENABLE_IRC | `ON`, `OFF` | ON
|
||||
| Компајлира <<irc,IRC додатак>>.
|
||||
|
||||
@@ -314,6 +356,10 @@ $ make install
|
||||
| ENABLE_XFER | `ON`, `OFF` | ON
|
||||
| Компајлира <<xfer,Xfer додатак>>.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| ENABLE_ZSTD | `ON`, `OFF` | ON
|
||||
| Enable https://facebook.github.io/zstd/[Zstandard ^↗^^] compression.
|
||||
|
||||
| ENABLE_TESTS | `ON`, `OFF` | OFF
|
||||
| Компајлира тестове.
|
||||
|
||||
@@ -844,6 +890,10 @@ _nicklist_ трака садржи следеће подразумеване с
|
||||
| buffer_short_name | `#test` | Кратко име текућег бафера.
|
||||
| buflist2 | `1.weechat` | Листа бафера, друга ставка траке (погледајте опцију <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
| buflist3 | `1.weechat` | Листа бафера, трећа ставка траке (погледајте опцију <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
// TRANSLATION MISSING
|
||||
| buflist4 | `1.weechat` | List of buffers, fourth bar item (see option <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
// TRANSLATION MISSING
|
||||
| buflist5 | `1.weechat` | List of buffers, fifth bar item (see option <<option_buflist.look.use_items,buflist.look.use_items>>).
|
||||
| fset | `+buflist.look.sort: …+` | Помоћ у вези тренутно изабране опције у fset баферу.
|
||||
| irc_channel | `#test` | Име тренутног IRC канала.
|
||||
| irc_host | `+user@host.com+` | Име тренутног IRC хоста.
|
||||
@@ -1246,7 +1296,8 @@ _прозор_ је површина екрана која приказује б
|
||||
|
||||
| filter
|
||||
| било који стринг
|
||||
| Филтер дефинисан за неке бафере, као што су `/fset`, `/server raw` (irc) и `/script`.
|
||||
| Филтер дефинисан у неким баферима као што су `/fset`, `/list` (irc), `/server raw` (irc)
|
||||
и `/script`.
|
||||
|
||||
| host
|
||||
| било који стринг
|
||||
@@ -1328,7 +1379,10 @@ _прозор_ је површина екрана која приказује б
|
||||
[[buflist]]
|
||||
=== Листа бафера
|
||||
|
||||
Buflist додатак приказује листу бафера у ставки траке која се зове „buflist” (такође су доступне још две ставке траке „buflist2” и „buflist3”). +
|
||||
// TRANSLATION MISSING
|
||||
Buflist додатак приказује листу бафера у ставки траке која се зове „buflist”
|
||||
(four other bar items "buflist2", "buflist3", "buflist4" and "buflist5" are
|
||||
available as well). +
|
||||
Подразумевана трака „buflist” са овом ставком се креира током покретања програма.
|
||||
|
||||
[[buflist_commands]]
|
||||
@@ -1352,6 +1406,20 @@ include::{autogendir}/autogen_user_commands.sr.adoc[tag=buflist_commands]
|
||||
|
||||
include::{autogendir}/autogen_user_options.sr.adoc[tag=buflist_options]
|
||||
|
||||
[[cursor_mode]]
|
||||
=== Режим курсора
|
||||
|
||||
Режим курсора вам омогућава да курсор слободно померате по целом екрану, у чет
|
||||
површини и тракама, тако да на одређеној опцији можете да обављате акције. +
|
||||
У режим курсора можете да уђете било командом `/cursor`, било средњим кликом
|
||||
(потребно је да миш буде укључен тастером kbd:[Alt+m] или командом `/mouse enable`).
|
||||
|
||||
Типична употреба је за цитирање порука (чет површина) или интеракција са надимцима (трака листе надимака).
|
||||
|
||||
За листу акција које можете да извршите у овом режим погледајте погледајте
|
||||
команду <<command_weechat_cursor,/cursor>> и
|
||||
<<key_bindings_cursor_context,везивања тастера у контексту курсора.>>
|
||||
|
||||
[[key_bindings]]
|
||||
== Тастерске пречице
|
||||
|
||||
@@ -1445,6 +1513,15 @@ WeeChat нуди доста подразумеваних тастерских п
|
||||
| kbd:[Ctrl+↓] | Позив наредне команде/поруке у глобалној историји (заједничкој за све бафере). | `+/input history_global_next+`
|
||||
|===
|
||||
|
||||
[[key_bindings_cmdline_system]]
|
||||
==== Систем
|
||||
|
||||
[width="100%",cols="^.^3,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Тастер | Опис | Команда
|
||||
| kbd:[Ctrl+z] | Суспендује WeeChat процес. | `+/sys suspend+`
|
||||
|===
|
||||
|
||||
[[key_bindings_buffers]]
|
||||
=== Бафери
|
||||
|
||||
@@ -1567,38 +1644,44 @@ WeeChat нуди доста подразумеваних тастерских п
|
||||
| kbd:[Enter] +
|
||||
kbd:[Ctrl+j] +
|
||||
kbd:[Ctrl+m] | Заустављање претраге на текућој позицији. | `+/input search_stop_here+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[Ctrl+q] | Stop search and reset scroll to pre-text search state. | `+/input search_stop+`
|
||||
| kbd:[Ctrl+q] | Заустављање претраге и ресетовање скрола на стање пре почетка претраге текста. | `+/input search_stop+`
|
||||
|===
|
||||
|
||||
[[key_bindings_cursor_context]]
|
||||
=== Контекст курсора
|
||||
|
||||
Ови тастери се користе у „cursor” контексту (слободно померање курсора по екрану).
|
||||
Ови тастери се користе у „cursor” контексту (слободно померање курсора по екрану),
|
||||
погледајте <<cursor_mode,Режим курсора>>.
|
||||
|
||||
[width="100%", cols="^.^3,^.^2,.^7,.^7", options="header"]
|
||||
|===
|
||||
| Тастер | Површина | Опис | Команда
|
||||
| kbd:[↑] | - | Помера курсор једну линију навише. | `+/cursor move up+`
|
||||
| kbd:[↓] | - | Помера курсор једну линију наниже. | `+/cursor move down+`
|
||||
| kbd:[←] | - | Помера курсор једну колони у лево. | `+/cursor move left+`
|
||||
| kbd:[→] | - | Помера курсор једну колону у десно. | `+/cursor move right+`
|
||||
| kbd:[Alt+↑] | - | Помера курсор једну површину навише. | `+/cursor move area_up+`
|
||||
| kbd:[Alt+↓] | - | Помера курсор једну површину наниже. | `+/cursor move area_down+`
|
||||
| kbd:[Alt+←] | - | Помера курсор једну површину у лево. | `+/cursor move area_left+`
|
||||
| kbd:[Alt+→] | - | Помера курсор једну површину у десно. | `+/cursor move area_right+`
|
||||
| kbd:[m] | чет | Цитирање поруке. | `+hsignal:chat_quote_message;/cursor stop+`
|
||||
| kbd:[l] | чет | Цитирање фокусиране линије. | `+hsignal:chat_quote_focused_line;/cursor stop+`
|
||||
| kbd:[q] | чет | Цитирање префикса + поруке. | `+hsignal:chat_quote_prefix_message;/cursor stop+`
|
||||
| kbd:[Q] | чет | Цитирање времена + префикса + поруке. | `+hsignal:chat_quote_time_prefix_message;/cursor stop+`
|
||||
| kbd:[b] | листа надимака | Забрањује надимак. | `+/window ${_window_number};/ban ${nick}+`
|
||||
| kbd:[k] | листа надимака | Избацује надимак. | `+/window ${_window_number};/kick ${nick}+`
|
||||
| kbd:[K] | листа надимака | Избацује и забрањује надимак. | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| kbd:[q] | листа надимака | Отвара упит са надимком. | `+/window ${_window_number};/query ${nick};/cursor stop+`
|
||||
| kbd:[w] | листа надимака | Извршава whois над надимком. | `+/window ${_window_number};/whois ${nick}+`
|
||||
| Тастер | Површина | Опис | Команда
|
||||
| kbd:[↑] | - | Помера курсор једну линију навише. | `+/cursor move up+`
|
||||
| kbd:[↓] | - | Помера курсор једну линију наниже. | `+/cursor move down+`
|
||||
| kbd:[←] | - | Помера курсор једну колони у лево. | `+/cursor move left+`
|
||||
| kbd:[→] | - | Помера курсор једну колону у десно. | `+/cursor move right+`
|
||||
| kbd:[Alt+↑] | - | Помера курсор на прву линију површине. | `+/cursor move edge_top+`
|
||||
| kbd:[Alt+↓] | - | Помера курсор на последњу линију површине. | `+/cursor move edge_bottom+`
|
||||
| kbd:[Alt+←] | - | Помера курсор на прву колону површине. | `+/cursor move edge_left+`
|
||||
| kbd:[Alt+→] | - | Помера курсор на последњу колону површине. | `+/cursor move edge_right+`
|
||||
| kbd:[Alt+Home] | - | Помера курсор на горњи леви угао површине. | `+/cursor move top_left+`
|
||||
| kbd:[Alt+End] | - | Помера курсор на доњи десни угао површине. | `+/cursor move bottom_right+`
|
||||
| kbd:[Alt+Shift+↑] | - | Помера курсор једну површину навише. | `+/cursor move area_up+`
|
||||
| kbd:[Alt+Shift+↓] | - | Помера курсор једну површину наниже. | `+/cursor move area_down+`
|
||||
| kbd:[Alt+Shift+←] | - | Помера курсор једну површину у лево. | `+/cursor move area_left+`
|
||||
| kbd:[Alt+Shift+→] | - | Помера курсор једну површину у десно. | `+/cursor move area_right+`
|
||||
| kbd:[m] | чет | Цитирање поруке. | `+hsignal:chat_quote_message;/cursor stop+`
|
||||
| kbd:[l] | чет | Цитирање фокусиране линије. | `+hsignal:chat_quote_focused_line;/cursor stop+`
|
||||
| kbd:[q] | чет | Цитирање префикса + поруке. | `+hsignal:chat_quote_prefix_message;/cursor stop+`
|
||||
| kbd:[Q] | чет | Цитирање времена + префикса + поруке. | `+hsignal:chat_quote_time_prefix_message;/cursor stop+`
|
||||
| kbd:[b] | листа надимака | Забрањује надимак. | `+/window ${_window_number};/ban ${nick}+`
|
||||
| kbd:[k] | листа надимака | Избацује надимак. | `+/window ${_window_number};/kick ${nick}+`
|
||||
| kbd:[K] | листа надимака | Избацује и забрањује надимак. | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| kbd:[q] | листа надимака | Отвара упит са надимком. | `+/window ${_window_number};/query ${nick};/cursor stop+`
|
||||
| kbd:[w] | листа надимака | Извршава whois над надимком. | `+/window ${_window_number};/whois ${nick}+`
|
||||
| kbd:[Enter] +
|
||||
kbd:[Ctrl+j] +
|
||||
kbd:[Ctrl+m] | - | Зауставља режим померања курсора | `/cursor stop`
|
||||
kbd:[Ctrl+m] | - | Зауставља режим померања курсора | `/cursor stop`
|
||||
|===
|
||||
|
||||
[[key_bindings_mouse]]
|
||||
@@ -1609,50 +1692,60 @@ WeeChat нуди доста подразумеваних тастерских п
|
||||
|
||||
[width="100%", cols="^.^3,^.^3,^.^3,.^8,.^8", options="header"]
|
||||
|===
|
||||
| Тастер/Точкић ^(1)^ | Гестикулација | Површина | Опис | Команда
|
||||
| ◾◽◽ | - | чет | Пребацивање на прозор. | `+/window ${_window_number}+`
|
||||
| ◾◽◽ | лево | чет | Пребацивање на претходни бафер. | `+/window ${_window_number};/buffer +1+`
|
||||
| ◾◽◽ | десно | чет | Пребацивање на наредни бафер. | `+/window ${_window_number};/buffer +1+`
|
||||
| ◾◽◽ | лево (дуго) | чет | Пребацивање на први бафер. | `+/window ${_window_number};/buffer 1+`
|
||||
| ◾◽◽ | десно (дуго) | чет | Пребацивање на последњи бафер. | `+/window ${_window_number};/buffer ++`
|
||||
| kbd:[▲] | - | чет | Скролује навише неколико линија у историји бафера. | `+/window scroll_up -window ${_window_number}+`
|
||||
| kbd:[▼] | - | чет | Скролује наниже неколико линија у историји бафера. | `+/window scroll_down -window ${_window_number}+`
|
||||
| kbd:[Ctrl+▲] | - | чет | Скролује хоризонтално у лево. | `+/window scroll_horiz -window ${_window_number} -10%+`
|
||||
| kbd:[Ctrl+▼] | - | чет | Скролује хоризонтално у десно. | `+/window scroll_horiz -window ${_window_number} +10%+`
|
||||
| kbd:[▲] | - | чет: fset бафер | Помера за пет линија навише у fset баферу. | `+/fset -up 5+`
|
||||
| kbd:[▼] | - | чет: fset бафер | Помера за пет линија наниже у fset баферу. | `+/fset -down 5+`
|
||||
| ◾◽◽ | - | чет: fset бафер | Бира линију у fset баферу. | `+/window ${_window_number};/fset -go ${_chat_line_y}+`
|
||||
| ◽◽◾ | - | чет: fset бафер | Пребацује логичку вредност (on/off) или уређује вредност опције. | `+hsignal:fset_mouse+`
|
||||
| ◽◽◾ | лево | чет: fset бафер | Умањује вредност за цео број/боју, поставља/надовезује вредност за остале типове. | `+hsignal:fset_mouse+`
|
||||
| ◽◽◾ | десно | чет: fset бафер | Увећава вредност за цео број/боју, поставља/надовезује вредност за остале типове. | `+hsignal:fset_mouse+`
|
||||
| ◽◽◾ | горе / доле | чет: fset бафер | Маркира/уклања маркер са више опција. | `+hsignal:fset_mouse+`
|
||||
| kbd:[▲] | - | чет: script бафер | Помера за пет линија навише у script баферу. | `+/script up 5+`
|
||||
| kbd:[▼] | - | чет: script бафер | Помера за пет линија наниже у script баферу. | `+/script down 5+`
|
||||
| ◾◽◽ | - | chat: script бафер | Бира линију у script баферу. | `+/script go ${_chat_line_y}+`
|
||||
| ◽◽◾ | - | chat: script бафер | Инсталира/уклања скрипту. | `+/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| ◾◽◽ | горе / лево | листа бафера | Помера бафер на нижи број. | Signal `+buflist_mouse+`.
|
||||
| ◾◽◽ | доле / десно | листа бафера | Помера бафер на виши број. | Signal `+buflist_mouse+`.
|
||||
| ◾◽◽ | - | листа бафера | Пребацивање на бафер (претходно посећени багер ако је бафер текући). | Signal `+buflist_mouse+`.
|
||||
| ◽◽◾ | - | листа бафера | Пребацивање на наредни посећени бафер ако је бафер текући. | Signal `+buflist_mouse+`.
|
||||
| kbd:[Ctrl+▲] | - | листа бафера | Пребацивање на претходни бафер. | Signal `+buflist_mouse+`.
|
||||
| kbd:[Ctrl+▼] | - | листа бафера | Пребацивање на наредни бафер. | Signal `+buflist_mouse+`.
|
||||
| ◾◽◽ | горе | листа надимака | Скроловање једне стране навише у листи надимака. | `+/bar scroll nicklist ${_window_number} -100%+`
|
||||
| ◾◽◽ | доле | листа надимака | Скроловање једне стране наниже у листи надимака. | `+/bar scroll nicklist ${_window_number} +100%+`
|
||||
| ◾◽◽ | горе (дуго) | листа надимака | Скок на почетак листе надимака. | `+/bar scroll nicklist ${_window_number} b+`
|
||||
| ◾◽◽ | доле (дуго) | листа надимака | Скок на крај листе надимака. | `+/bar scroll nicklist ${_window_number} e+`
|
||||
| ◾◽◽ | - | листа надимака | Отварање упита са надимком. | `+/window ${_window_number};/query ${nick}+`
|
||||
| ◽◽◾ | - | листа надимака | Извршавање whois над надимком. | `+/window ${_window_number};/whois ${nick}+`
|
||||
| ◾◽◽ | лево | листа надимака | Избацивање надимка. | `+/window ${_window_number};/kick ${nick}+`
|
||||
| ◾◽◽ | лево (дуго) | листа надимака | Избацивање и забрана надимка. | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| ◽◽◾ | лево | листа надимака | Забрана надимка. | `+/window ${_window_number};/ban ${nick}+`
|
||||
| ◽◽◾ | - | унос | Хвата догађај миша и умеће његов кôд у командну линију. | `+/input grab_mouse_area+`
|
||||
| kbd:[▲] | - | било која трака | Скролује траку за -20%. | `+/bar scroll ${_bar_name} ${_window_number} -20%+`
|
||||
| kbd:[▼] | - | било која трака | Скролује траку за +20%. | `+/bar scroll ${_bar_name} ${_window_number} +20%+`
|
||||
| ◽◾◽ | - | било где | Започиње режим померања курсора на овој тачки. | `+/cursor go ${_x},${_y}+`
|
||||
| Тастер/Точкић ^(1)^ | Гестикулација | Површина | Опис | Команда
|
||||
| kbd:[■ □ □] | - | чет | Пребацивање на прозор. | `+/window ${_window_number}+`
|
||||
| kbd:[■ □ □] | лево | чет | Пребацивање на претходни бафер. | `+/window ${_window_number};/buffer +1+`
|
||||
| kbd:[■ □ □] | десно | чет | Пребацивање на наредни бафер. | `+/window ${_window_number};/buffer +1+`
|
||||
| kbd:[■ □ □] | лево (дуго) | чет | Пребацивање на први бафер. | `+/window ${_window_number};/buffer 1+`
|
||||
| kbd:[■ □ □] | десно (дуго) | чет | Пребацивање на последњи бафер. | `+/window ${_window_number};/buffer ++`
|
||||
| kbd:[▲] | - | чет | Скролује навише неколико линија у историји бафера. | `+/window scroll_up -window ${_window_number}+`
|
||||
| kbd:[▼] | - | чет | Скролује наниже неколико линија у историји бафера. | `+/window scroll_down -window ${_window_number}+`
|
||||
| kbd:[Ctrl+▲] | - | чет | Скролује хоризонтално у лево. | `+/window scroll_horiz -window ${_window_number} -10%+`
|
||||
| kbd:[Ctrl+▼] | - | чет | Скролује хоризонтално у десно. | `+/window scroll_horiz -window ${_window_number} +10%+`
|
||||
| kbd:[▲] | - | чет: fset бафер | Помера за пет линија навише у fset баферу. | `+/fset -up 5+`
|
||||
| kbd:[▼] | - | чет: fset бафер | Помера за пет линија наниже у fset баферу. | `+/fset -down 5+`
|
||||
| kbd:[■ □ □] | - | чет: fset бафер | Бира линију у fset баферу. | `+/window ${_window_number};/fset -go ${fset_option_index}+`
|
||||
| kbd:[□ □ ■] | - | чет: fset бафер | Пребацује логичку вредност (on/off) или уређује вредност опције. | `+hsignal:fset_mouse+`
|
||||
| kbd:[□ □ ■] | лево | чет: fset бафер | Умањује вредност за цео број/боју/набрајање, поставља/надовезује вредност за остале типове. | `+hsignal:fset_mouse+`
|
||||
| kbd:[□ □ ■] | десно | чет: fset бафер | Увећава вредност за цео број/боју/набрајање, поставља/надовезује вредност за остале типове. | `+hsignal:fset_mouse+`
|
||||
| kbd:[□ □ ■] | горе / доле | чет: fset бафер | Маркира/уклања маркер са више опција. | `+hsignal:fset_mouse+`
|
||||
| kbd:[▲] | - | чет: /list бафер | Помера за пет линија навише у /list баферу. | `+/list -up 5+`
|
||||
| kbd:[▼] | - | чет: /list бафер | Помера за пет линија наниже у /list баферу. | `+/list -down 5+`
|
||||
| kbd:[■ □ □] | - | чет: /list бафер | Бира линију у /list баферу. | `+/window ${_window_number};/list -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | чет: /list бафер | Приступа IRC каналу на изабраној линији. | `+hsignal:irc_list_mouse+`
|
||||
| kbd:[▲] | - | чет: script бафер | Помера за пет линија навише у script баферу. | `+/script up 5+`
|
||||
| kbd:[▼] | - | чет: script бафер | Помера за пет линија наниже у script баферу. | `+/script down 5+`
|
||||
| kbd:[■ □ □] | - | чет: script бафер | Бира линију у script баферу. | `+/script go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | чет: script бафер | Инсталира/уклања скрипту. | `+/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[■ □ □] | горе / лево | листа бафера | Помера бафер на нижи број. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | доле / десно | листа бафера | Помера бафер на виши број. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | - | листа бафера | Пребацивање на бафер (претходно посећени багер ако је бафер текући). | Signal `+buflist_mouse+`.
|
||||
| kbd:[□ □ ■] | - | листа бафера | Пребацивање на наредни посећени бафер ако је бафер текући. | Signal `+buflist_mouse+`.
|
||||
| kbd:[Ctrl+▲] | - | листа бафера | Пребацивање на претходни бафер. | Signal `+buflist_mouse+`.
|
||||
| kbd:[Ctrl+▼] | - | листа бафера | Пребацивање на наредни бафер. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | горе | листа надимака | Скроловање једне стране навише у листи надимака. | `+/bar scroll nicklist ${_window_number} -100%+`
|
||||
| kbd:[■ □ □] | доле | листа надимака | Скроловање једне стране наниже у листи надимака. | `+/bar scroll nicklist ${_window_number} +100%+`
|
||||
| kbd:[■ □ □] | горе (дуго) | листа надимака | Скок на почетак листе надимака. | `+/bar scroll nicklist ${_window_number} b+`
|
||||
| kbd:[■ □ □] | доле (дуго) | листа надимака | Скок на крај листе надимака. | `+/bar scroll nicklist ${_window_number} e+`
|
||||
| kbd:[■ □ □] | - | листа надимака | Отварање упита са надимком. | `+/window ${_window_number};/query ${nick}+`
|
||||
| kbd:[□ □ ■] | - | листа надимака | Извршавање whois над надимком. | `+/window ${_window_number};/whois ${nick}+`
|
||||
| kbd:[■ □ □] | лево | листа надимака | Избацивање надимка. | `+/window ${_window_number};/kick ${nick}+`
|
||||
| kbd:[■ □ □] | лево (дуго) | листа надимака | Избацивање и забрана надимка. | `+/window ${_window_number};/kickban ${nick}+`
|
||||
| kbd:[□ □ ■] | лево | листа надимака | Забрана надимка. | `+/window ${_window_number};/ban ${nick}+`
|
||||
| kbd:[□ □ ■] | - | унос | Хвата догађај миша и умеће његов кôд у командну линију. | `+/input grab_mouse_area+`
|
||||
| kbd:[▲] | - | било која трака | Скролује траку за -20%. | `+/bar scroll ${_bar_name} ${_window_number} -20%+`
|
||||
| kbd:[▼] | - | било која трака | Скролује траку за +20%. | `+/bar scroll ${_bar_name} ${_window_number} +20%+`
|
||||
| kbd:[□ ■ □] | - | било где | Започиње режим померања курсора на овој тачки. | `+/cursor go ${_x},${_y}+`
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ kbd:[▲] и kbd:[▼] значе точкић навише и наниже.
|
||||
^(1)^ Тастери: +
|
||||
kbd:[◼ □ □]: клик на леви тастер +
|
||||
kbd:[□ ◼ □]: клик на средњи тастер +
|
||||
kbd:[□ □ ◼]: клик на десни тастер +
|
||||
Точкић: +
|
||||
kbd:[▲]: точкић горе +
|
||||
kbd:[▼]: точкић доле
|
||||
|
||||
[[key_bindings_fset_buffer]]
|
||||
=== Fset бафер
|
||||
@@ -1671,8 +1764,8 @@ WeeChat нуди доста подразумеваних тастерских п
|
||||
| kbd:[F11] | `pass:[<]` | Скролује хоризонтално у лево. | `+/fset -left+`
|
||||
| kbd:[F12] | `pass:[>]` | Скролује хоризонтално у десно. | `+/fset -right+`
|
||||
| kbd:[Alt+Space] | `t` | Пребацује стање логичке вредности. | `+/fset -toggle+`
|
||||
| kbd:[Alt+-] | `-` | Одузима 1 од вредности за цео број/боју, поставља вредност за остале типове. | `+/fset -add -1+`
|
||||
| kbd:[Alt++] | `+` | Додаје 1 на вредност за цео број/боју, надовезује вредност за остале типове. | `+/fset -add 1+`
|
||||
| kbd:[Alt+-] | `-` | Одузима 1 од вредности за цео број/боју/набрајање, поставља вредност за остале типове. | `+/fset -add -1+`
|
||||
| kbd:[Alt++] | `+` | Додаје 1 на вредност за цео број/боју/набрајање, надовезује вредност за остале типове. | `+/fset -add 1+`
|
||||
| kbd:[Alt+f], kbd:[Alt+r] | `r` | Ресетује вредност. | `+/fset -reset+`
|
||||
| kbd:[Alt+f], kbd:[Alt+u] | `u` | Поставља да је вредност празна. | `+/fset -unset+`
|
||||
| kbd:[Alt+Enter] | `s` | Поставља вредност. | `+/fset -set+`
|
||||
@@ -1686,8 +1779,8 @@ WeeChat нуди доста подразумеваних тастерских п
|
||||
| kbd:[Ctrl+l] (`L`) | | Освежава опције и цео екран. | `+/fset -refresh+`
|
||||
| | `$` | Освежава опције (маркиране опције остају маркиране). |
|
||||
| | `$$` | Освежава опције (уклања се маркирање са свих опција). |
|
||||
| kbd:[Alt+p] | | Пребацује стање опција описа додатка (`pass:[plugins.desc.*]`). | `+/mute /set fset.look.show_plugins_desc toggle+`
|
||||
| kbd:[Alt+v] | | Пребацује стање видљивости траке помоћи. | `+/bar toggle fset+`
|
||||
| kbd:[Alt+p] | `p` | Пребацује стање опција описа додатка (`pass:[plugins.desc.*]`). | `+/mute /set fset.look.show_plugins_desc toggle+`
|
||||
| kbd:[Alt+v] | `v` | Пребацује стање видљивости траке помоћи. | `+/bar toggle fset+`
|
||||
| | `s:x,y` | Сортира опције по пољима x,y (погледајте опцију <<option_fset.look.sort,fset.look.sort>>). | `+/mute /set fset.look.sort x,y+`
|
||||
| | `s:` | Ресетује сортирање на подразумевану вредност (погледајте опцију <<option_fset.look.sort,fset.look.sort>>). | `+/mute /unset fset.look.sort+`
|
||||
| | `w:xxx` | Извози опције у фајл „xxx”. | `+/fset -export xxx+`
|
||||
@@ -1700,6 +1793,39 @@ WeeChat нуди доста подразумеваних тастерских п
|
||||
[NOTE]
|
||||
^(1)^ Акција мора да се унесе као унос у командну линију, након чега се притисне kbd:[Ентер].
|
||||
|
||||
[[key_bindings_irc_list_buffer]]
|
||||
=== IRC /list бафер
|
||||
|
||||
Следећи тастери и акције се користе у IRC /list баферу (погледајте команду <<command_irc_list,/list>>).
|
||||
|
||||
[width="100%",cols="^.^3,^.^2,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Тастер | Акција ^(1)^ | Опис | Команда
|
||||
| kbd:[↑] | | Помера једну линију навише. | `+/list -up+`
|
||||
| kbd:[↓] | | Помера једну линију наниже. | `+/list -down+`
|
||||
| kbd:[PgUp] | | Помера једну страну навише. | `+/window page_up+`
|
||||
| kbd:[PgDn] | | Помера једну страну наниже. | `+/window page_down+`
|
||||
| kbd:[Alt+Home] | `pass:[<<]` | Скок на прву линију. | `+/list -go 0+`
|
||||
| kbd:[Alt+End] | `pass:[>>]` | Скок на последњу линију. | `+/list -go end+`
|
||||
| kbd:[F11] | `pass:[<]` | Скролује хоризонтално у лево. | `+/list -left+`
|
||||
| kbd:[F12] | `pass:[>]` | Скролује хоризонтално у десно. | `+/list -right+`
|
||||
| kbd:[Ctrl+j] | `j` | Приступа IRC каналу на изабраној линији. | `+/list -join+`
|
||||
| | `xxx` | Приказује само канале са „xxx” у имену или теми (величина слова се не разликује). |
|
||||
| | `n:xxx` | Приказује само канале са „xxx” у имену (величина слова се не разликује). |
|
||||
| | `t:xxx` | Приказује само канале са „xxx” у теми (величина слова се не разликује). |
|
||||
| | `u:n` | Приказује само канале са барем "n" users. |
|
||||
| | `u:>n` | Приказује само канале са више од „n” корисника. |
|
||||
| | `u:<n` | Приказује само канале са мање од „n” корисника. |
|
||||
| | `c:xxx` | Приказује само канале који задовољавају израчунати услов „xxx”, користећи следеће променљиве: name, name2, users, topic. |
|
||||
| | `s:x,y` | Сортира канале по пољима x,y (погледајте команду <<command_irc_list,/list>>). |
|
||||
| | `s:` | Ресетује сортирање на подразумевану вредност (погледајте команду <<command_irc_list,/list>>). |
|
||||
| | `$` | Освежава листу (поново извршава команду <<command_irc_list,/list>>). |
|
||||
| | `q` | Затвара бафер. | `+/buffer close+`
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ Акција мора да се унесе као унос у командну линију, након чега се притисне kbd:[Ентер].
|
||||
|
||||
[[key_bindings_script_buffer]]
|
||||
=== Script бафер
|
||||
|
||||
@@ -1714,11 +1840,18 @@ WeeChat нуди доста подразумеваних тастерских п
|
||||
| kbd:[PgDn] | | Помера једну страну наниже. | `+/window page_down+`
|
||||
| kbd:[Alt+i] | `i` | Инсталира скрипту. | `+/script install+`
|
||||
| kbd:[Alt+r] | `r` | Брише скрипту. | `+/script remove+`
|
||||
| kbd:[Alt+l] (`L`) | `l` | Учитава скрипту. | `+/script load+`
|
||||
| kbd:[Alt+l] | `l` | Учитава скрипту. | `+/script load+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[Alt+L] | `L` | Reload script. | `+/script reload+`
|
||||
| kbd:[Alt+u] | `u` | Уклања скрипту из меморије. | `+/script unload+`
|
||||
| kbd:[Alt+Shift+A] | `A` | Аутоучитавање скрипте. | `+/script toggleautoload+`
|
||||
| kbd:[Alt+h] | `h` | Задржава/отпушта скрипту. | `+/script hold+`
|
||||
| kbd:[Alt+v] | `v` | Преглед скрипте. | `+/script show+`
|
||||
// TRANSLATION MISSING
|
||||
| | `s:x,y` | Sort scripts by fields x,y (погледајте опцију <<option_script.look.sort,script.look.sort>>). |
|
||||
| | `s:` | Ресетује сортирање на подразумевану вредност (погледајте опцију <<option_script.look.sort,script.look.sort>>). |
|
||||
| | `$` | Освежава листу. |
|
||||
| | `q` | Затвара бафер. | `+/buffer close+`
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -1741,7 +1874,7 @@ Fast Set додатак приказује листу опција у бафер
|
||||
│2.fset │weechat.look.bare_display_exit_on_input: exit the bare display mode on any c│
|
||||
│ │hanges in input [default: on] │
|
||||
│ │----------------------------------------------------------------------------│
|
||||
│ │ weechat.look.align_end_of_lines integer message │
|
||||
│ │ weechat.look.align_end_of_lines enum message │
|
||||
│ │ weechat.look.align_multiline_words boolean on │
|
||||
│ │ weechat.look.bar_more_down string "++" │
|
||||
│ │ weechat.look.bar_more_left string "<<" │
|
||||
@@ -1750,12 +1883,12 @@ Fast Set додатак приказује листу опција у бафер
|
||||
│ │## weechat.look.bare_display_exit_on_input boolean on ##│
|
||||
│ │ weechat.look.bare_display_time_format string "%H:%M" │
|
||||
│ │ weechat.look.buffer_auto_renumber boolean on │
|
||||
│ │ weechat.look.buffer_notify_default integer all │
|
||||
│ │ weechat.look.buffer_position integer end │
|
||||
│ │ weechat.look.buffer_notify_default enum all │
|
||||
│ │ weechat.look.buffer_position enum end │
|
||||
│ │ weechat.look.buffer_search_case_sensitive boolean off │
|
||||
│ │ weechat.look.buffer_search_force_default boolean off │
|
||||
│ │ weechat.look.buffer_search_regex boolean off │
|
||||
│ │ weechat.look.buffer_search_where integer prefix_message │
|
||||
│ │ weechat.look.buffer_search_where enum prefix_message │
|
||||
│ │ weechat.look.buffer_time_format string "%H:%M:%S" │
|
||||
│ │ weechat.look.buffer_time_same string "" │
|
||||
│ │[12:55] [2] [fset] 2:fset │
|
||||
@@ -2048,13 +2181,9 @@ include::{autogendir}/autogen_user_options.sr.adoc[tag=charset_options]
|
||||
На пример, ако желите да искључите истицања од „joe” и „mike” у текућем баферу:
|
||||
|
||||
----
|
||||
/buffer set hotlist_max_level_nicks_add joe:2,mike:2
|
||||
/buffer setauto hotlist_max_level_nicks_add joe:2,mike:2
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
Особина бафера „hotlist_max_level_nicks” се не чува у конфигурацији. +
|
||||
Лако можете да је сачувате скриптом _buffer_autoset.py_: инсталирате је командом `+/script install buffer_autoset.py+`, а помоћ добијате са `+/help buffer_autoset+`.
|
||||
|
||||
[[highlights]]
|
||||
=== Истицања
|
||||
|
||||
@@ -2078,13 +2207,9 @@ include::{autogendir}/autogen_user_options.sr.adoc[tag=charset_options]
|
||||
Исти пример, који функционише само на текућем баферу:
|
||||
|
||||
----
|
||||
/buffer set highlight_disable_regex <flash.*>
|
||||
/buffer setauto highlight_disable_regex <flash.*>
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
Особина бафера „highlight_disable_regex” се не чува у конфигурацији. +
|
||||
Лако можете да је сачувате скриптом _buffer_autoset.py_: инсталирате је командом `+/script install buffer_autoset.py+`, а помоћ добијате са `+/help buffer_autoset+`.
|
||||
|
||||
[[highlights_words]]
|
||||
==== Додавање речи које се истичу
|
||||
|
||||
@@ -2126,13 +2251,9 @@ include::{autogendir}/autogen_user_options.sr.adoc[tag=charset_options]
|
||||
На пример, да форсирате истицање свих порука у текућем баферу:
|
||||
|
||||
----
|
||||
/buffer set highlight_regex .*
|
||||
/buffer setauto highlight_regex .*
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
Особина бафера „highlight_regex” се не чува у конфигурацији. +
|
||||
Лако можете да је сачувате скриптом _buffer_autoset.py_: инсталирате је командом `+/script install buffer_autoset.py+`, а помоћ добијате са `+/help buffer_autoset+`.
|
||||
|
||||
[[buffer_logging]]
|
||||
=== Логовање бафера
|
||||
|
||||
@@ -2944,30 +3065,31 @@ include::{autogendir}/autogen_user_options.sr.adoc[tag=sec_options]
|
||||
|
||||
[width="100%", cols="3m,6m,16", options="header"]
|
||||
|===
|
||||
| Одељак | Команда за контролу | Опис
|
||||
| debug | <<command_weechat_debug,/debug set>> +
|
||||
/set weechat.debug.* | Дибаг ниво, за језгро и додатке (у одељку је могуће додавање/уклањање опција).
|
||||
| startup | /set weechat.startup.* | Опције покретања програма.
|
||||
| look | /set weechat.look.* | Изглед и осећај.
|
||||
| palette | <<command_weechat_color,/color alias>> +
|
||||
/set weechat.palette.* | Алијаси боја (у одељку је могуће додавање/уклањање опција).
|
||||
| color | /set weechat.color.* | Боје.
|
||||
| completion | /set weechat.completion.* | Опције довршавања.
|
||||
| history | /set weechat.history.* | Опције историје (команди и бафера).
|
||||
| proxy | <<command_weechat_proxy,/proxy>> +
|
||||
/set weechat.proxy.* | Прокси опције.
|
||||
| network | /set weechat.network.* | Мрежне/TLS опције.
|
||||
| plugin | /set weechat.plugin.* | Опције додатака.
|
||||
| signal | /set weechat.signal.* | Опције сигнала.
|
||||
| bar | <<command_weechat_bar,/bar>> +
|
||||
/set weechat.bar.* | Опције трака.
|
||||
| layout | <<command_weechat_layout,/layout>> | Распореди.
|
||||
| notify | <<command_weechat_buffer,/buffer notify>> | Нивои обавештавања за бафере (у одељку је могуће додавање/уклањање опција).
|
||||
| filter | <<command_weechat_filter,/filter>> | Филтери.
|
||||
| key | <<command_weechat_key,/key>> | Тастери у подразумеваном контексту.
|
||||
| key_search | <<command_weechat_key,/key>> | Тастери у search контексту.
|
||||
| key_cursor | <<command_weechat_key,/key>> | Тастери у cursor контексту.
|
||||
| key_mouse | <<command_weechat_key,/key>> | Тастери у mouse конексту.
|
||||
| Одељак | Команда за контролу | Опис
|
||||
| debug | <<command_weechat_debug,/debug set>> +
|
||||
/set weechat.debug.* | Дибаг ниво, за језгро и додатке (у одељку је могуће додавање/уклањање опција).
|
||||
| startup | /set weechat.startup.* | Опције покретања програма.
|
||||
| look | /set weechat.look.* | Изглед и осећај.
|
||||
| palette | <<command_weechat_color,/color alias>> +
|
||||
/set weechat.palette.* | Алијаси боја (у одељку је могуће додавање/уклањање опција).
|
||||
| color | /set weechat.color.* | Боје.
|
||||
| completion | /set weechat.completion.* | Опције довршавања.
|
||||
| history | /set weechat.history.* | Опције историје (команди и бафера).
|
||||
| proxy | <<command_weechat_proxy,/proxy>> +
|
||||
/set weechat.proxy.* | Прокси опције.
|
||||
| network | /set weechat.network.* | Мрежне/TLS опције.
|
||||
| plugin | /set weechat.plugin.* | Опције додатака.
|
||||
| signal | /set weechat.signal.* | Опције сигнала.
|
||||
| bar | <<command_weechat_bar,/bar>> +
|
||||
/set weechat.bar.* | Опције трака.
|
||||
| layout | <<command_weechat_layout,/layout>> | Распореди.
|
||||
| buffer | <<command_weechat_buffer,/buffer setauto>> | Особине које се аутоматски примењују на бафере када се отварају.
|
||||
| notify | <<command_weechat_buffer,/buffer notify>> | Нивои обавештавања за бафере (у одељку је могуће додавање/уклањање опција).
|
||||
| filter | <<command_weechat_filter,/filter>> | Филтери.
|
||||
| key | <<command_weechat_key,/key>> | Тастери у подразумеваном контексту.
|
||||
| key_search | <<command_weechat_key,/key>> | Тастери у search контексту.
|
||||
| key_cursor | <<command_weechat_key,/key>> | Тастери у cursor контексту.
|
||||
| key_mouse | <<command_weechat_key,/key>> | Тастери у mouse конексту.
|
||||
|===
|
||||
|
||||
Опције:
|
||||
@@ -3065,7 +3187,7 @@ irc.server.libera.autorejoin_delay integer null -> 30
|
||||
irc.server.libera.away_check integer null -> 0
|
||||
irc.server.libera.away_check_max_nicks integer null -> 25
|
||||
irc.server.libera.capabilities string null -> "*"
|
||||
irc.server.libera.charset_message integer null -> message
|
||||
irc.server.libera.charset_message enum null -> message
|
||||
irc.server.libera.command string null -> ""
|
||||
irc.server.libera.command_delay integer null -> 0
|
||||
irc.server.libera.connection_timeout integer null -> 60
|
||||
@@ -3081,9 +3203,9 @@ irc.server.libera.notify string null -> ""
|
||||
irc.server.libera.password string null -> ""
|
||||
irc.server.libera.proxy string null -> ""
|
||||
irc.server.libera.realname string null -> ""
|
||||
irc.server.libera.sasl_fail integer null -> reconnect
|
||||
irc.server.libera.sasl_fail enum null -> reconnect
|
||||
irc.server.libera.sasl_key string null -> ""
|
||||
irc.server.libera.sasl_mechanism integer null -> plain
|
||||
irc.server.libera.sasl_mechanism enum null -> plain
|
||||
irc.server.libera.sasl_password string "${sec.data.libera}"
|
||||
irc.server.libera.sasl_timeout integer null -> 15
|
||||
irc.server.libera.sasl_username string "alice"
|
||||
@@ -3772,7 +3894,7 @@ CTCP одговори могу да се прилагоде, или неки CTC
|
||||
На пример, ако желите да прилагодите одговор на CTCP „VERSION”, употребите следећу команду:
|
||||
|
||||
----
|
||||
/set irc.ctcp.version "Користим WeeChat $version, одличан је!"
|
||||
/set irc.ctcp.version "Користим WeeChat ${version}, одличан је!"
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
@@ -3794,7 +3916,7 @@ CTCP одговори могу да се прилагоде, или неки CTC
|
||||
CTCP може да се прилагоди само за један сервер, употребом његовог интерног имена испред CTCP имена:
|
||||
|
||||
----
|
||||
/set irc.ctcp.libera.version "WeeChat $version (за libera)"
|
||||
/set irc.ctcp.libera.version "WeeChat ${version} (за libera)"
|
||||
----
|
||||
|
||||
Ако желите да вратите стандардни CTCP одговор, уклоните опцију:
|
||||
@@ -3803,38 +3925,37 @@ CTCP може да се прилагоди само за један сервер
|
||||
/unset irc.ctcp.version
|
||||
----
|
||||
|
||||
У стринговима је могућа употреба следећих кодова и они се аутоматски развијају када програм WeeChat одговара на CTCP:
|
||||
CTCP одговори се израчунавају (погледајте команду <<command_weechat_eval,/eval>>) и
|
||||
доступне су следеће додатне променљиве:
|
||||
|
||||
[width="100%", cols="2l,4,8", options="header"]
|
||||
[width="100%", cols="2,4,8", options="header"]
|
||||
|===
|
||||
| Кôд | Опис | Вредност/пример
|
||||
| $clientinfo | Листа подржаних CTCP | `+ACTION DCC CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION+`
|
||||
| $version | Верзија програма WeeChat | `+0.4.0-dev+`
|
||||
| $versiongit | WeeChat верзија + Git верзија ^(1)^ | `+0.4.0-dev (git: v0.3.9-104-g7eb5cc4)+`
|
||||
| $git | Git верзија ^(1)^ | `+v0.3.9-104-g7eb5cc4+`
|
||||
| $compilation | Датум компајлирања програма WeeChat | `+Dec 16 2012+`
|
||||
| $osinfo | Инфо о ОС | `+Linux 2.6.32-5-amd64 / x86_64+`
|
||||
| $site | WeeChat вебсајт | `+https://weechat.org/+`
|
||||
| $download | WeeChat сајт, страна за преузимање | `+https://weechat.org/download/+`
|
||||
| $time | Текући датум/време | `+Sun, 16 Dec 2012 10:40:48 +0100+`
|
||||
| $username | Корисничко име на IRC серверу | `+name+`
|
||||
| $realname | Реално име на IRC серверу | `+John Doe+`
|
||||
| Променљива | Опис | Вредност/пример
|
||||
| `+${clientinfo}+` | Листа подржаних CTCP | `+ACTION DCC CLIENTINFO PING SOURCE TIME VERSION+`
|
||||
| `+${version}+` | Верзија програма WeeChat | `+4.1.0-dev+`
|
||||
| `+${versiongit}+` | WeeChat верзија + Git верзија ^(1)^ | `+4.1.0-dev (git: v4.0.0-51-g8f98b922a)+`
|
||||
| `+${git}+` | Git верзија ^(1)^ | `+v4.0.0-51-g8f98b922a+`
|
||||
| `+${compilation}+` | Датум компајлирања програма WeeChat | `+Jul 8 2023 20:14:23+`
|
||||
| `+${osinfo}+` | Инфо о ОС | `+Linux 5.10.0-23-amd64 / x86_64+`
|
||||
| `+${site}+` | WeeChat вебсајт | `+https://weechat.org/+`
|
||||
| `+${download}+` | WeeChat сајт, страна за преузимање | `+https://weechat.org/download/+`
|
||||
| `+${time}+` | Текући датум/време | `+Суб, 08 јул 2023 21:11:19 +0200+`
|
||||
| `+${username}+` | Корисничко име на IRC серверу | `+име+`
|
||||
| `+${realname}+` | Реално име на IRC серверу | `+Пера Перић+`
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ Git верзија је излаз команде `git describe`. Позната је само ако је програм WeeChat компајлиран унутар Git репозиторијума и ако је Git инсталиран.
|
||||
|
||||
Ако CTCP опције нису дефинисане (што је подразумевано), CTCP одговори су следећи:
|
||||
Подразумевани CTCP осговори су:
|
||||
|
||||
[width="100%", cols="2,4,8", options="header"]
|
||||
|===
|
||||
| CTCP | Формат одговора | Пример
|
||||
| CLIENTINFO | `+$clientinfo+` | `+ACTION DCC CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION+`
|
||||
| FINGER | `+WeeChat $versiongit+` | `+WeeChat 0.4.0-dev (git: v0.3.9-104-g7eb5cc4)+`
|
||||
| SOURCE | `+$download+` | `+https://weechat.org/download/+`
|
||||
| TIME | `+$time+` | `+нед, 16 дец 2012 10:40:48 +0100+`
|
||||
| USERINFO | `+$username ($realname)+` | `+име (Пера Перић)+`
|
||||
| VERSION | `+WeeChat $versiongit ($compilation)+` | `+WeeChat 0.4.0-dev (git: v0.3.9-104-g7eb5cc4) (Dec 16 2012)+`
|
||||
| CTCP | Формат одговора | Пример
|
||||
| CLIENTINFO | `+${clientinfo}+` | `+ACTION DCC CLIENTINFO PING SOURCE TIME VERSION+`
|
||||
| SOURCE | `+${download}+` | `+https://weechat.org/download/+`
|
||||
| TIME | `+${time}+` | `+Суб, 08 Јул 2023 21:11:19 +0200+`
|
||||
| VERSION | `+WeeChat ${version}+` | `+WeeChat 4.1.0-dev+`
|
||||
|===
|
||||
|
||||
[[irc_target_buffer]]
|
||||
@@ -4341,13 +4462,12 @@ FIFO пајп се налази у WeeChat директоријуму за вр
|
||||
*овде иде текст или команда
|
||||
....
|
||||
|
||||
// TRANSLATION MISSING
|
||||
Backslashes can be interpreted with this format, where `*` is replaced by `\`,
|
||||
allowing for example to send multiline messages:
|
||||
Овим форматом могу да се интерпретирају обрнуте косе црте, где је `*` замењено са `\`,
|
||||
чиме се омогућава слање вишелинијских порука, на пример:
|
||||
|
||||
....
|
||||
plugin.buffer \text or command here
|
||||
\text or command here
|
||||
plugin.buffer \овде иде текст или команда
|
||||
\овде иде текст или команда
|
||||
....
|
||||
|
||||
Неки примери:
|
||||
@@ -4364,12 +4484,11 @@ $ echo 'irc.server.libera */nick newnick' >/run/user/1000/weechat/weechat_fifo_1
|
||||
$ echo 'irc.libera.#weechat *hello!' >/run/user/1000/weechat/weechat_fifo_12345
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
* Send a multiline message on IRC #test channel, if capability "draft/multiline"
|
||||
is enabled on the ergo server:
|
||||
* Слање вишелинијске поруке на IRC канал #test, у случају да је могуност „draft/multiline”
|
||||
укључена на ergo серверу:
|
||||
|
||||
----
|
||||
$ echo 'irc.ergo.#test \hello\n...on two lines!' >/run/user/1000/weechat/weechat_fifo_12345
|
||||
$ echo 'irc.ergo.#test \здраво\n...на две линије!' >/run/user/1000/weechat/weechat_fifo_12345
|
||||
----
|
||||
|
||||
* Слање поруке у текући бафер:
|
||||
|
||||
+52
-56
@@ -17,6 +17,11 @@
|
||||
# along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Check for programs xgettext, msgmerge and msgfmt
|
||||
find_program(XGETTEXT_EXECUTABLE xgettext REQUIRED)
|
||||
find_program(MSGMERGE_EXECUTABLE msgmerge REQUIRED)
|
||||
find_program(MSGFMT_EXECUTABLE msgfmt REQUIRED)
|
||||
|
||||
set(PO_FILES
|
||||
cs.po
|
||||
de.po
|
||||
@@ -39,70 +44,61 @@ set(POT_FILE_PATH "${CMAKE_CURRENT_BINARY_DIR}/${POT_FILE}")
|
||||
|
||||
include(srcfiles.cmake)
|
||||
|
||||
# Looking for xgettext, msgmerge and msgfmt
|
||||
find_program(XGETTEXT_EXECUTABLE xgettext)
|
||||
find_program(MSGMERGE_EXECUTABLE msgmerge)
|
||||
find_program(MSGFMT_EXECUTABLE msgfmt)
|
||||
# Create PO template file weechat.pot
|
||||
set(SRC_FILES)
|
||||
set(POT_DEPENDS)
|
||||
|
||||
if(XGETTEXT_EXECUTABLE AND MSGMERGE_EXECUTABLE AND MSGFMT_EXECUTABLE)
|
||||
foreach(srcfile ${WEECHAT_SOURCES})
|
||||
set(SRC_FILES ${SRC_FILES} ${srcfile})
|
||||
set(POT_DEPENDS ${POT_DEPENDS} "${CMAKE_SOURCE_DIR}/${srcfile}")
|
||||
endforeach()
|
||||
|
||||
# Create PO template file weechat.pot
|
||||
set(SRC_FILES)
|
||||
set(POT_DEPENDS)
|
||||
add_custom_command(
|
||||
OUTPUT "${POT_FILE_PATH}"
|
||||
COMMAND "${XGETTEXT_EXECUTABLE}"
|
||||
ARGS -o "${POT_FILE_PATH}" --add-comments='TRANSLATORS:' --keyword='_' --keyword='weechat_gettext' --keyword='N_' --keyword='NG_:1,2' --keyword='weechat_ngettext:1,2' --no-location --from-code=UTF-8 --directory="${CMAKE_SOURCE_DIR}" --package-name='WeeChat' --package-version=${VERSION} --msgid-bugs-address=${BUGS_ADDRESS} --copyright-holder='NAME' ${SRC_FILES}
|
||||
DEPENDS ${POT_DEPENDS}
|
||||
COMMENT "Generating ${POT_FILE}"
|
||||
)
|
||||
|
||||
foreach(srcfile ${WEECHAT_SOURCES})
|
||||
set(SRC_FILES ${SRC_FILES} ${srcfile})
|
||||
set(POT_DEPENDS ${POT_DEPENDS} "${CMAKE_SOURCE_DIR}/${srcfile}")
|
||||
endforeach()
|
||||
set(MO_FILES)
|
||||
set(UPDATE_PO_TARGETS)
|
||||
foreach(pofile ${PO_FILES})
|
||||
get_filename_component(polang ${pofile} NAME_WE)
|
||||
|
||||
# Compile .po files in build directory (to binary .mo files)
|
||||
set(modir "${CMAKE_CURRENT_BINARY_DIR}/${polang}/LC_MESSAGES")
|
||||
file(MAKE_DIRECTORY "${modir}")
|
||||
set(mofile "${modir}/${PROJECT_NAME}.mo")
|
||||
add_custom_command(
|
||||
OUTPUT "${POT_FILE_PATH}"
|
||||
COMMAND "${XGETTEXT_EXECUTABLE}"
|
||||
ARGS -o "${POT_FILE_PATH}" --add-comments='TRANSLATORS:' --keyword='_' --keyword='weechat_gettext' --keyword='N_' --keyword='NG_:1,2' --keyword='weechat_ngettext:1,2' --no-location --from-code=UTF-8 --directory="${CMAKE_SOURCE_DIR}" --package-name='WeeChat' --package-version=${VERSION} --msgid-bugs-address=${BUGS_ADDRESS} --copyright-holder='NAME' ${SRC_FILES}
|
||||
DEPENDS ${POT_DEPENDS}
|
||||
COMMENT "Generating ${POT_FILE}"
|
||||
OUTPUT "${mofile}"
|
||||
COMMAND "${MSGMERGE_EXECUTABLE}" ARGS --quiet -o "${CMAKE_CURRENT_BINARY_DIR}/${pofile}" "${CMAKE_CURRENT_SOURCE_DIR}/${pofile}" ${POT_FILE_PATH}
|
||||
COMMAND "${MSGFMT_EXECUTABLE}" ARGS -o "${mofile}" "${CMAKE_CURRENT_BINARY_DIR}/${pofile}"
|
||||
COMMAND "${MSGFMT_EXECUTABLE}" ARGS -c --statistics --verbose --output-file=/dev/null "${CMAKE_CURRENT_BINARY_DIR}/${pofile}"
|
||||
DEPENDS "${POT_FILE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/${pofile}"
|
||||
COMMENT "Compiling ${polang}.po"
|
||||
)
|
||||
|
||||
set(MO_FILES)
|
||||
set(UPDATE_PO_TARGETS)
|
||||
foreach(pofile ${PO_FILES})
|
||||
get_filename_component(polang ${pofile} NAME_WE)
|
||||
|
||||
# Compile .po files in build directory (to binary .mo files)
|
||||
set(modir "${CMAKE_CURRENT_BINARY_DIR}/${polang}/LC_MESSAGES")
|
||||
file(MAKE_DIRECTORY "${modir}")
|
||||
set(mofile "${modir}/${PROJECT_NAME}.mo")
|
||||
add_custom_command(
|
||||
OUTPUT "${mofile}"
|
||||
COMMAND "${MSGMERGE_EXECUTABLE}" ARGS --quiet -o "${CMAKE_CURRENT_BINARY_DIR}/${pofile}" "${CMAKE_CURRENT_SOURCE_DIR}/${pofile}" ${POT_FILE_PATH}
|
||||
COMMAND "${MSGFMT_EXECUTABLE}" ARGS -o "${mofile}" "${CMAKE_CURRENT_BINARY_DIR}/${pofile}"
|
||||
COMMAND "${MSGFMT_EXECUTABLE}" ARGS -c --statistics --verbose --output-file=/dev/null "${CMAKE_CURRENT_BINARY_DIR}/${pofile}"
|
||||
DEPENDS "${POT_FILE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/${pofile}"
|
||||
COMMENT "Compiling ${polang}.po"
|
||||
)
|
||||
|
||||
# Update .po files in source directory (if needed)
|
||||
add_custom_target(
|
||||
update-${pofile}
|
||||
COMMAND "${MSGMERGE_EXECUTABLE}" --quiet --update --previous --backup=none "${CMAKE_CURRENT_SOURCE_DIR}/${pofile}" "${POT_FILE_PATH}"
|
||||
COMMENT "Updating ${polang}.po"
|
||||
)
|
||||
set(UPDATE_PO_TARGETS ${UPDATE_PO_TARGETS} update-${pofile})
|
||||
|
||||
install(FILES "${mofile}" DESTINATION "${LOCALEDIR}/${polang}/LC_MESSAGES")
|
||||
set(MO_FILES ${MO_FILES} ${mofile})
|
||||
endforeach()
|
||||
|
||||
add_custom_target(translations ALL DEPENDS ${MO_FILES})
|
||||
|
||||
# Update weechat.pot in source directory (if needed)
|
||||
# Update .po files in source directory (if needed)
|
||||
add_custom_target(
|
||||
update-${POT_FILE}
|
||||
COMMAND "${MSGMERGE_EXECUTABLE}" --quiet --update --backup=none "${CMAKE_CURRENT_SOURCE_DIR}/${POT_FILE}" "${POT_FILE_PATH}"
|
||||
COMMENT "Updating ${POT_FILE}"
|
||||
update-${pofile}
|
||||
COMMAND "${MSGMERGE_EXECUTABLE}" --quiet --update --previous --backup=none "${CMAKE_CURRENT_SOURCE_DIR}/${pofile}" "${POT_FILE_PATH}"
|
||||
COMMENT "Updating ${polang}.po"
|
||||
)
|
||||
set(UPDATE_PO_TARGETS ${UPDATE_PO_TARGETS} update-${pofile})
|
||||
|
||||
# Update all .po and weechat.pot in source directory (if needed)
|
||||
add_custom_target(update-po DEPENDS update-${POT_FILE} ${UPDATE_PO_TARGETS})
|
||||
install(FILES "${mofile}" DESTINATION "${LOCALEDIR}/${polang}/LC_MESSAGES")
|
||||
set(MO_FILES ${MO_FILES} ${mofile})
|
||||
endforeach()
|
||||
|
||||
endif()
|
||||
add_custom_target(translations ALL DEPENDS ${MO_FILES})
|
||||
|
||||
# Update weechat.pot in source directory (if needed)
|
||||
add_custom_target(
|
||||
update-${POT_FILE}
|
||||
COMMAND "${MSGMERGE_EXECUTABLE}" --quiet --update --backup=none "${CMAKE_CURRENT_SOURCE_DIR}/${POT_FILE}" "${POT_FILE_PATH}"
|
||||
COMMENT "Updating ${POT_FILE}"
|
||||
)
|
||||
|
||||
# Update all .po and weechat.pot in source directory (if needed)
|
||||
add_custom_target(update-po DEPENDS update-${POT_FILE} ${UPDATE_PO_TARGETS})
|
||||
|
||||
+735
-155
File diff suppressed because it is too large
Load Diff
@@ -35,6 +35,8 @@ SET(WEECHAT_SOURCES
|
||||
./src/core/hook/wee-hook-signal.h
|
||||
./src/core/hook/wee-hook-timer.c
|
||||
./src/core/hook/wee-hook-timer.h
|
||||
./src/core/hook/wee-hook-url.c
|
||||
./src/core/hook/wee-hook-url.h
|
||||
./src/core/wee-arraylist.c
|
||||
./src/core/wee-arraylist.h
|
||||
./src/core/wee-backtrace.c
|
||||
@@ -89,6 +91,8 @@ SET(WEECHAT_SOURCES
|
||||
./src/core/wee-signal.h
|
||||
./src/core/wee-string.c
|
||||
./src/core/wee-string.h
|
||||
./src/core/wee-sys.c
|
||||
./src/core/wee-sys.h
|
||||
./src/core/wee-upgrade.c
|
||||
./src/core/wee-upgrade-file.c
|
||||
./src/core/wee-upgrade-file.h
|
||||
@@ -179,6 +183,8 @@ SET(WEECHAT_SOURCES
|
||||
./src/plugins/buflist/buflist.c
|
||||
./src/plugins/buflist/buflist-command.c
|
||||
./src/plugins/buflist/buflist-command.h
|
||||
./src/plugins/buflist/buflist-completion.c
|
||||
./src/plugins/buflist/buflist-completion.h
|
||||
./src/plugins/buflist/buflist-config.c
|
||||
./src/plugins/buflist/buflist-config.h
|
||||
./src/plugins/buflist/buflist.h
|
||||
@@ -258,6 +264,8 @@ SET(WEECHAT_SOURCES
|
||||
./src/plugins/irc/irc-input.h
|
||||
./src/plugins/irc/irc-join.c
|
||||
./src/plugins/irc/irc-join.h
|
||||
./src/plugins/irc/irc-list.c
|
||||
./src/plugins/irc/irc-list.h
|
||||
./src/plugins/irc/irc-message.c
|
||||
./src/plugins/irc/irc-message.h
|
||||
./src/plugins/irc/irc-mode.c
|
||||
|
||||
+637
-139
File diff suppressed because it is too large
Load Diff
@@ -47,6 +47,7 @@ set(LIB_CORE_SRC
|
||||
wee-secure-config.c wee-secure-config.h
|
||||
wee-signal.c wee-signal.h
|
||||
wee-string.c wee-string.h
|
||||
wee-sys.c wee-sys.h
|
||||
wee-upgrade.c wee-upgrade.h
|
||||
wee-upgrade-file.c wee-upgrade-file.h
|
||||
wee-url.c wee-url.h
|
||||
@@ -71,6 +72,7 @@ set(LIB_CORE_SRC
|
||||
hook/wee-hook-process.c hook/wee-hook-process.h
|
||||
hook/wee-hook-signal.c hook/wee-hook-signal.h
|
||||
hook/wee-hook-timer.c hook/wee-hook-timer.h
|
||||
hook/wee-hook-url.c hook/wee-hook-url.h
|
||||
)
|
||||
|
||||
# Check for flock support
|
||||
@@ -89,7 +91,9 @@ include_directories(${GNUTLS_INCLUDE_PATH})
|
||||
|
||||
include_directories(${CURL_INCLUDE_DIRS})
|
||||
|
||||
include_directories(${ZSTD_INCLUDE_DIRS})
|
||||
if(ENABLE_ZSTD)
|
||||
include_directories(${ZSTD_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
include_directories("${CMAKE_BINARY_DIR}")
|
||||
add_library(weechat_core STATIC ${LIB_CORE_SRC})
|
||||
|
||||
@@ -101,6 +101,7 @@ int
|
||||
hook_command_run_exec (struct t_gui_buffer *buffer, const char *command)
|
||||
{
|
||||
struct t_hook *ptr_hook, *next_hook;
|
||||
struct t_hook_exec_cb hook_exec_cb;
|
||||
int rc, hook_matching, length;
|
||||
char *command2;
|
||||
const char *ptr_string, *ptr_command;
|
||||
@@ -149,13 +150,13 @@ hook_command_run_exec (struct t_gui_buffer *buffer, const char *command)
|
||||
|
||||
if (hook_matching)
|
||||
{
|
||||
ptr_hook->running = 1;
|
||||
hook_callback_start (ptr_hook, &hook_exec_cb);
|
||||
rc = (HOOK_COMMAND_RUN(ptr_hook, callback)) (
|
||||
ptr_hook->callback_pointer,
|
||||
ptr_hook->callback_data,
|
||||
buffer,
|
||||
ptr_command);
|
||||
ptr_hook->running = 0;
|
||||
hook_callback_end (ptr_hook, &hook_exec_cb);
|
||||
if (rc == WEECHAT_RC_OK_EAT)
|
||||
{
|
||||
if (command2)
|
||||
|
||||
@@ -364,6 +364,7 @@ hook_command_exec (struct t_gui_buffer *buffer, int any_plugin,
|
||||
struct t_hook *ptr_hook, *next_hook;
|
||||
struct t_hook *hook_plugin, *hook_other_plugin, *hook_other_plugin2;
|
||||
struct t_hook *hook_incomplete_command;
|
||||
struct t_hook_exec_cb hook_exec_cb;
|
||||
char **argv, **argv_eol;
|
||||
const char *ptr_command_name;
|
||||
int argc, rc, length_command_name, allow_incomplete_commands;
|
||||
@@ -500,7 +501,7 @@ hook_command_exec (struct t_gui_buffer *buffer, int any_plugin,
|
||||
else
|
||||
{
|
||||
/* execute the command! */
|
||||
ptr_hook->running++;
|
||||
hook_callback_start (ptr_hook, &hook_exec_cb);
|
||||
rc = (int) (HOOK_COMMAND(ptr_hook, callback))
|
||||
(ptr_hook->callback_pointer,
|
||||
ptr_hook->callback_data,
|
||||
@@ -508,7 +509,7 @@ hook_command_exec (struct t_gui_buffer *buffer, int any_plugin,
|
||||
argc,
|
||||
argv,
|
||||
argv_eol);
|
||||
ptr_hook->running--;
|
||||
hook_callback_end (ptr_hook, &hook_exec_cb);
|
||||
if (rc == WEECHAT_RC_ERROR)
|
||||
rc = HOOK_COMMAND_EXEC_ERROR;
|
||||
else
|
||||
|
||||
@@ -107,6 +107,7 @@ hook_completion_exec (struct t_weechat_plugin *plugin,
|
||||
struct t_gui_completion *completion)
|
||||
{
|
||||
struct t_hook *ptr_hook, *next_hook;
|
||||
struct t_hook_exec_cb hook_exec_cb;
|
||||
const char *pos;
|
||||
char *item;
|
||||
|
||||
@@ -134,14 +135,14 @@ hook_completion_exec (struct t_weechat_plugin *plugin,
|
||||
&& !ptr_hook->running
|
||||
&& (strcmp (HOOK_COMPLETION(ptr_hook, completion_item), item) == 0))
|
||||
{
|
||||
ptr_hook->running = 1;
|
||||
hook_callback_start (ptr_hook, &hook_exec_cb);
|
||||
(void) (HOOK_COMPLETION(ptr_hook, callback))
|
||||
(ptr_hook->callback_pointer,
|
||||
ptr_hook->callback_data,
|
||||
completion_item,
|
||||
buffer,
|
||||
completion);
|
||||
ptr_hook->running = 0;
|
||||
hook_callback_end (ptr_hook, &hook_exec_cb);
|
||||
}
|
||||
|
||||
ptr_hook = next_hook;
|
||||
|
||||
@@ -98,6 +98,7 @@ void
|
||||
hook_config_exec (const char *option, const char *value)
|
||||
{
|
||||
struct t_hook *ptr_hook, *next_hook;
|
||||
struct t_hook_exec_cb hook_exec_cb;
|
||||
|
||||
hook_exec_start ();
|
||||
|
||||
@@ -111,13 +112,13 @@ hook_config_exec (const char *option, const char *value)
|
||||
&& (!HOOK_CONFIG(ptr_hook, option)
|
||||
|| (string_match (option, HOOK_CONFIG(ptr_hook, option), 0))))
|
||||
{
|
||||
ptr_hook->running = 1;
|
||||
hook_callback_start (ptr_hook, &hook_exec_cb);
|
||||
(void) (HOOK_CONFIG(ptr_hook, callback))
|
||||
(ptr_hook->callback_pointer,
|
||||
ptr_hook->callback_data,
|
||||
option,
|
||||
value);
|
||||
ptr_hook->running = 0;
|
||||
hook_callback_end (ptr_hook, &hook_exec_cb);
|
||||
}
|
||||
|
||||
ptr_hook = next_hook;
|
||||
|
||||
@@ -270,7 +270,7 @@ hook_connect_free_data (struct t_hook *hook)
|
||||
if (HOOK_CONNECT(hook, child_pid) > 0)
|
||||
{
|
||||
kill (HOOK_CONNECT(hook, child_pid), SIGKILL);
|
||||
waitpid (HOOK_CONNECT(hook, child_pid), NULL, 0);
|
||||
hook_schedule_clean_children ();
|
||||
HOOK_CONNECT(hook, child_pid) = 0;
|
||||
}
|
||||
if (HOOK_CONNECT(hook, child_read) != -1)
|
||||
|
||||
@@ -203,8 +203,9 @@ hook_fd (struct t_weechat_plugin *plugin, int fd, int flag_read,
|
||||
void
|
||||
hook_fd_exec ()
|
||||
{
|
||||
int i, num_fd, timeout, ready, found;
|
||||
struct t_hook *ptr_hook, *next_hook;
|
||||
struct t_hook_exec_cb hook_exec_cb;
|
||||
int i, num_fd, timeout, ready, found;
|
||||
|
||||
if (!weechat_hooks[HOOK_TYPE_FD])
|
||||
return;
|
||||
@@ -279,12 +280,12 @@ hook_fd_exec ()
|
||||
}
|
||||
if (found)
|
||||
{
|
||||
ptr_hook->running = 1;
|
||||
hook_callback_start (ptr_hook, &hook_exec_cb);
|
||||
(void) (HOOK_FD(ptr_hook, callback)) (
|
||||
ptr_hook->callback_pointer,
|
||||
ptr_hook->callback_data,
|
||||
HOOK_FD(ptr_hook, fd));
|
||||
ptr_hook->running = 0;
|
||||
hook_callback_end (ptr_hook, &hook_exec_cb);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -153,6 +153,7 @@ hook_focus_get_data (struct t_hashtable *hashtable_focus1,
|
||||
struct t_hashtable *hashtable_focus2)
|
||||
{
|
||||
struct t_hook *ptr_hook, *next_hook;
|
||||
struct t_hook_exec_cb hook_exec_cb;
|
||||
struct t_hashtable *hashtable1, *hashtable2, *hashtable_ret;
|
||||
const char *focus1_chat, *focus1_bar_item_name, *keys;
|
||||
char **list_keys, *new_key;
|
||||
@@ -185,12 +186,12 @@ hook_focus_get_data (struct t_hashtable *hashtable_focus1,
|
||||
&& (strcmp (HOOK_FOCUS(ptr_hook, area), focus1_bar_item_name) == 0))))
|
||||
{
|
||||
/* run callback for focus #1 */
|
||||
ptr_hook->running = 1;
|
||||
hook_callback_start (ptr_hook, &hook_exec_cb);
|
||||
hashtable_ret = (HOOK_FOCUS(ptr_hook, callback))
|
||||
(ptr_hook->callback_pointer,
|
||||
ptr_hook->callback_data,
|
||||
hashtable1);
|
||||
ptr_hook->running = 0;
|
||||
hook_callback_end (ptr_hook, &hook_exec_cb);
|
||||
if (hashtable_ret)
|
||||
{
|
||||
if (hashtable_ret != hashtable1)
|
||||
@@ -209,12 +210,12 @@ hook_focus_get_data (struct t_hashtable *hashtable_focus1,
|
||||
/* run callback for focus #2 */
|
||||
if (hashtable2)
|
||||
{
|
||||
ptr_hook->running = 1;
|
||||
hook_callback_start (ptr_hook, &hook_exec_cb);
|
||||
hashtable_ret = (HOOK_FOCUS(ptr_hook, callback))
|
||||
(ptr_hook->callback_pointer,
|
||||
ptr_hook->callback_data,
|
||||
hashtable2);
|
||||
ptr_hook->running = 0;
|
||||
hook_callback_end (ptr_hook, &hook_exec_cb);
|
||||
if (hashtable_ret)
|
||||
{
|
||||
if (hashtable_ret != hashtable2)
|
||||
|
||||
@@ -102,6 +102,7 @@ struct t_hdata *
|
||||
hook_hdata_get (struct t_weechat_plugin *plugin, const char *hdata_name)
|
||||
{
|
||||
struct t_hook *ptr_hook, *next_hook;
|
||||
struct t_hook_exec_cb hook_exec_cb;
|
||||
struct t_hdata *value;
|
||||
|
||||
/* make C compiler happy */
|
||||
@@ -128,12 +129,12 @@ hook_hdata_get (struct t_weechat_plugin *plugin, const char *hdata_name)
|
||||
&& !ptr_hook->running
|
||||
&& (strcmp (HOOK_HDATA(ptr_hook, hdata_name), hdata_name) == 0))
|
||||
{
|
||||
ptr_hook->running = 1;
|
||||
hook_callback_start (ptr_hook, &hook_exec_cb);
|
||||
value = (HOOK_HDATA(ptr_hook, callback))
|
||||
(ptr_hook->callback_pointer,
|
||||
ptr_hook->callback_data,
|
||||
HOOK_HDATA(ptr_hook, hdata_name));
|
||||
ptr_hook->running = 0;
|
||||
hook_callback_end (ptr_hook, &hook_exec_cb);
|
||||
|
||||
hook_exec_end ();
|
||||
return value;
|
||||
|
||||
@@ -129,6 +129,7 @@ int
|
||||
hook_hsignal_send (const char *signal, struct t_hashtable *hashtable)
|
||||
{
|
||||
struct t_hook *ptr_hook, *next_hook;
|
||||
struct t_hook_exec_cb hook_exec_cb;
|
||||
int rc;
|
||||
|
||||
rc = WEECHAT_RC_OK;
|
||||
@@ -144,13 +145,13 @@ hook_hsignal_send (const char *signal, struct t_hashtable *hashtable)
|
||||
&& !ptr_hook->running
|
||||
&& (hook_hsignal_match (signal, ptr_hook)))
|
||||
{
|
||||
ptr_hook->running = 1;
|
||||
hook_callback_start (ptr_hook, &hook_exec_cb);
|
||||
rc = (HOOK_HSIGNAL(ptr_hook, callback))
|
||||
(ptr_hook->callback_pointer,
|
||||
ptr_hook->callback_data,
|
||||
signal,
|
||||
hashtable);
|
||||
ptr_hook->running = 0;
|
||||
hook_callback_end (ptr_hook, &hook_exec_cb);
|
||||
|
||||
if (rc == WEECHAT_RC_OK_EAT)
|
||||
break;
|
||||
|
||||
@@ -106,6 +106,7 @@ hook_info_get_hashtable (struct t_weechat_plugin *plugin, const char *info_name,
|
||||
struct t_hashtable *hashtable)
|
||||
{
|
||||
struct t_hook *ptr_hook, *next_hook;
|
||||
struct t_hook_exec_cb hook_exec_cb;
|
||||
struct t_hashtable *value;
|
||||
|
||||
/* make C compiler happy */
|
||||
@@ -125,13 +126,13 @@ hook_info_get_hashtable (struct t_weechat_plugin *plugin, const char *info_name,
|
||||
&& !ptr_hook->running
|
||||
&& (strcmp (HOOK_INFO_HASHTABLE(ptr_hook, info_name), info_name) == 0))
|
||||
{
|
||||
ptr_hook->running = 1;
|
||||
hook_callback_start (ptr_hook, &hook_exec_cb);
|
||||
value = (HOOK_INFO_HASHTABLE(ptr_hook, callback))
|
||||
(ptr_hook->callback_pointer,
|
||||
ptr_hook->callback_data,
|
||||
info_name,
|
||||
hashtable);
|
||||
ptr_hook->running = 0;
|
||||
hook_callback_end (ptr_hook, &hook_exec_cb);
|
||||
|
||||
hook_exec_end ();
|
||||
return value;
|
||||
|
||||
@@ -105,6 +105,7 @@ hook_info_get (struct t_weechat_plugin *plugin, const char *info_name,
|
||||
const char *arguments)
|
||||
{
|
||||
struct t_hook *ptr_hook, *next_hook;
|
||||
struct t_hook_exec_cb hook_exec_cb;
|
||||
char *value;
|
||||
|
||||
/* make C compiler happy */
|
||||
@@ -124,13 +125,13 @@ hook_info_get (struct t_weechat_plugin *plugin, const char *info_name,
|
||||
&& !ptr_hook->running
|
||||
&& (strcmp (HOOK_INFO(ptr_hook, info_name), info_name) == 0))
|
||||
{
|
||||
ptr_hook->running = 1;
|
||||
hook_callback_start (ptr_hook, &hook_exec_cb);
|
||||
value = (HOOK_INFO(ptr_hook, callback))
|
||||
(ptr_hook->callback_pointer,
|
||||
ptr_hook->callback_data,
|
||||
info_name,
|
||||
arguments);
|
||||
ptr_hook->running = 0;
|
||||
hook_callback_end (ptr_hook, &hook_exec_cb);
|
||||
|
||||
hook_exec_end ();
|
||||
return value;
|
||||
|
||||
@@ -106,6 +106,7 @@ hook_infolist_get (struct t_weechat_plugin *plugin, const char *infolist_name,
|
||||
void *pointer, const char *arguments)
|
||||
{
|
||||
struct t_hook *ptr_hook, *next_hook;
|
||||
struct t_hook_exec_cb hook_exec_cb;
|
||||
struct t_infolist *value;
|
||||
|
||||
/* make C compiler happy */
|
||||
@@ -125,14 +126,14 @@ hook_infolist_get (struct t_weechat_plugin *plugin, const char *infolist_name,
|
||||
&& !ptr_hook->running
|
||||
&& (strcmp (HOOK_INFOLIST(ptr_hook, infolist_name), infolist_name) == 0))
|
||||
{
|
||||
ptr_hook->running = 1;
|
||||
hook_callback_start (ptr_hook, &hook_exec_cb);
|
||||
value = (HOOK_INFOLIST(ptr_hook, callback))
|
||||
(ptr_hook->callback_pointer,
|
||||
ptr_hook->callback_data,
|
||||
infolist_name,
|
||||
pointer,
|
||||
arguments);
|
||||
ptr_hook->running = 0;
|
||||
hook_callback_end (ptr_hook, &hook_exec_cb);
|
||||
|
||||
hook_exec_end ();
|
||||
return value;
|
||||
|
||||
@@ -125,6 +125,7 @@ void
|
||||
hook_line_exec (struct t_gui_line *line)
|
||||
{
|
||||
struct t_hook *ptr_hook, *next_hook;
|
||||
struct t_hook_exec_cb hook_exec_cb;
|
||||
struct t_hashtable *hashtable, *hashtable2;
|
||||
char str_value[128], *str_tags;
|
||||
|
||||
@@ -182,12 +183,12 @@ hook_line_exec (struct t_gui_line *line)
|
||||
HASHTABLE_SET_STR_NOT_NULL("message", line->data->message);
|
||||
|
||||
/* run callback */
|
||||
ptr_hook->running = 1;
|
||||
hook_callback_start (ptr_hook, &hook_exec_cb);
|
||||
hashtable2 = (HOOK_LINE(ptr_hook, callback))
|
||||
(ptr_hook->callback_pointer,
|
||||
ptr_hook->callback_data,
|
||||
hashtable);
|
||||
ptr_hook->running = 0;
|
||||
hook_callback_end (ptr_hook, &hook_exec_cb);
|
||||
|
||||
if (hashtable2)
|
||||
{
|
||||
|
||||
@@ -100,6 +100,7 @@ hook_modifier_exec (struct t_weechat_plugin *plugin, const char *modifier,
|
||||
const char *modifier_data, const char *string)
|
||||
{
|
||||
struct t_hook *ptr_hook, *next_hook;
|
||||
struct t_hook_exec_cb hook_exec_cb;
|
||||
char *new_msg, *message_modified;
|
||||
|
||||
/* make C compiler happy */
|
||||
@@ -125,14 +126,14 @@ hook_modifier_exec (struct t_weechat_plugin *plugin, const char *modifier,
|
||||
&& (string_strcasecmp (HOOK_MODIFIER(ptr_hook, modifier),
|
||||
modifier) == 0))
|
||||
{
|
||||
ptr_hook->running = 1;
|
||||
hook_callback_start (ptr_hook, &hook_exec_cb);
|
||||
new_msg = (HOOK_MODIFIER(ptr_hook, callback))
|
||||
(ptr_hook->callback_pointer,
|
||||
ptr_hook->callback_data,
|
||||
modifier,
|
||||
modifier_data,
|
||||
message_modified);
|
||||
ptr_hook->running = 0;
|
||||
hook_callback_end (ptr_hook, &hook_exec_cb);
|
||||
|
||||
/* empty string returned => message dropped */
|
||||
if (new_msg && !new_msg[0])
|
||||
|
||||
@@ -121,6 +121,7 @@ void
|
||||
hook_print_exec (struct t_gui_buffer *buffer, struct t_gui_line *line)
|
||||
{
|
||||
struct t_hook *ptr_hook, *next_hook;
|
||||
struct t_hook_exec_cb hook_exec_cb;
|
||||
char *prefix_no_color, *message_no_color;
|
||||
|
||||
if (!weechat_hooks[HOOK_TYPE_PRINT])
|
||||
@@ -161,7 +162,7 @@ hook_print_exec (struct t_gui_buffer *buffer, struct t_gui_line *line)
|
||||
HOOK_PRINT(ptr_hook, tags_array))))
|
||||
{
|
||||
/* run callback */
|
||||
ptr_hook->running = 1;
|
||||
hook_callback_start (ptr_hook, &hook_exec_cb);
|
||||
(void) (HOOK_PRINT(ptr_hook, callback))
|
||||
(ptr_hook->callback_pointer,
|
||||
ptr_hook->callback_data,
|
||||
@@ -172,7 +173,7 @@ hook_print_exec (struct t_gui_buffer *buffer, struct t_gui_line *line)
|
||||
(int)line->data->displayed, (int)line->data->highlight,
|
||||
(HOOK_PRINT(ptr_hook, strip_colors)) ? prefix_no_color : line->data->prefix,
|
||||
(HOOK_PRINT(ptr_hook, strip_colors)) ? message_no_color : line->data->message);
|
||||
ptr_hook->running = 0;
|
||||
hook_callback_end (ptr_hook, &hook_exec_cb);
|
||||
}
|
||||
|
||||
ptr_hook = next_hook;
|
||||
|
||||
@@ -278,7 +278,9 @@ hook_process_child (struct t_hook *hook_process)
|
||||
{
|
||||
ptr_url++;
|
||||
}
|
||||
rc = weeurl_download (ptr_url, HOOK_PROCESS(hook_process, options));
|
||||
rc = weeurl_download (ptr_url,
|
||||
HOOK_PROCESS(hook_process, options),
|
||||
NULL); /* output */
|
||||
}
|
||||
else if (strncmp (HOOK_PROCESS(hook_process, command), "func:", 5) == 0)
|
||||
{
|
||||
@@ -596,12 +598,11 @@ hook_process_timer_cb (const void *pointer, void *data, int remaining_calls)
|
||||
if (weechat_debug_core >= 1)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("End of command '%s', timeout reached (%.1fs)"),
|
||||
_("End of command '%s', timeout reached (%.3fs)"),
|
||||
HOOK_PROCESS(hook_process, command),
|
||||
((float)HOOK_PROCESS(hook_process, timeout)) / 1000);
|
||||
}
|
||||
kill (HOOK_PROCESS(hook_process, child_pid), SIGKILL);
|
||||
usleep (1000);
|
||||
unhook (hook_process);
|
||||
}
|
||||
else
|
||||
@@ -792,6 +793,7 @@ void
|
||||
hook_process_exec ()
|
||||
{
|
||||
struct t_hook *ptr_hook, *next_hook;
|
||||
struct t_hook_exec_cb hook_exec_cb;
|
||||
|
||||
hook_exec_start ();
|
||||
|
||||
@@ -804,9 +806,9 @@ hook_process_exec ()
|
||||
&& !ptr_hook->running
|
||||
&& (HOOK_PROCESS(ptr_hook, child_pid) == 0))
|
||||
{
|
||||
ptr_hook->running = 1;
|
||||
hook_callback_start (ptr_hook, &hook_exec_cb);
|
||||
hook_process_run (ptr_hook);
|
||||
ptr_hook->running = 0;
|
||||
hook_callback_end (ptr_hook, &hook_exec_cb);
|
||||
}
|
||||
|
||||
ptr_hook = next_hook;
|
||||
@@ -860,7 +862,7 @@ hook_process_free_data (struct t_hook *hook)
|
||||
if (HOOK_PROCESS(hook, child_pid) > 0)
|
||||
{
|
||||
kill (HOOK_PROCESS(hook, child_pid), SIGKILL);
|
||||
waitpid (HOOK_PROCESS(hook, child_pid), NULL, 0);
|
||||
hook_schedule_clean_children ();
|
||||
HOOK_PROCESS(hook, child_pid) = 0;
|
||||
}
|
||||
if (HOOK_PROCESS(hook, child_read[HOOK_PROCESS_STDIN]) != -1)
|
||||
|
||||
@@ -129,6 +129,7 @@ int
|
||||
hook_signal_send (const char *signal, const char *type_data, void *signal_data)
|
||||
{
|
||||
struct t_hook *ptr_hook, *next_hook;
|
||||
struct t_hook_exec_cb hook_exec_cb;
|
||||
int rc;
|
||||
|
||||
rc = WEECHAT_RC_OK;
|
||||
@@ -144,14 +145,14 @@ hook_signal_send (const char *signal, const char *type_data, void *signal_data)
|
||||
&& !ptr_hook->running
|
||||
&& hook_signal_match (signal, ptr_hook))
|
||||
{
|
||||
ptr_hook->running = 1;
|
||||
hook_callback_start (ptr_hook, &hook_exec_cb);
|
||||
rc = (HOOK_SIGNAL(ptr_hook, callback))
|
||||
(ptr_hook->callback_pointer,
|
||||
ptr_hook->callback_data,
|
||||
signal,
|
||||
type_data,
|
||||
signal_data);
|
||||
ptr_hook->running = 0;
|
||||
hook_callback_end (ptr_hook, &hook_exec_cb);
|
||||
|
||||
if (rc == WEECHAT_RC_OK_EAT)
|
||||
break;
|
||||
|
||||
@@ -302,8 +302,9 @@ end:
|
||||
void
|
||||
hook_timer_exec ()
|
||||
{
|
||||
struct timeval tv_time;
|
||||
struct t_hook *ptr_hook, *next_hook;
|
||||
struct t_hook_exec_cb hook_exec_cb;
|
||||
struct timeval tv_time;
|
||||
|
||||
if (!weechat_hooks[HOOK_TYPE_TIMER])
|
||||
return;
|
||||
@@ -324,13 +325,13 @@ hook_timer_exec ()
|
||||
&& (util_timeval_cmp (&HOOK_TIMER(ptr_hook, next_exec),
|
||||
&tv_time) <= 0))
|
||||
{
|
||||
ptr_hook->running = 1;
|
||||
hook_callback_start (ptr_hook, &hook_exec_cb);
|
||||
(void) (HOOK_TIMER(ptr_hook, callback))
|
||||
(ptr_hook->callback_pointer,
|
||||
ptr_hook->callback_data,
|
||||
(HOOK_TIMER(ptr_hook, remaining_calls) > 0) ?
|
||||
HOOK_TIMER(ptr_hook, remaining_calls) - 1 : -1);
|
||||
ptr_hook->running = 0;
|
||||
hook_callback_end (ptr_hook, &hook_exec_cb);
|
||||
if (!ptr_hook->deleted)
|
||||
{
|
||||
HOOK_TIMER(ptr_hook, last_exec).tv_sec = tv_time.tv_sec;
|
||||
|
||||
@@ -0,0 +1,461 @@
|
||||
/*
|
||||
* wee-hook-url.c - WeeChat URL hook
|
||||
*
|
||||
* Copyright (C) 2023 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
* WeeChat is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* WeeChat is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <sys/wait.h>
|
||||
#include <poll.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "../weechat.h"
|
||||
#include "../wee-hashtable.h"
|
||||
#include "../wee-hook.h"
|
||||
#include "../wee-infolist.h"
|
||||
#include "../wee-log.h"
|
||||
#include "../wee-string.h"
|
||||
#include "../wee-url.h"
|
||||
#include "../../gui/gui-chat.h"
|
||||
#include "../../plugins/plugin.h"
|
||||
|
||||
|
||||
/*
|
||||
* Returns description of hook.
|
||||
*
|
||||
* Note: result must be freed after use.
|
||||
*/
|
||||
|
||||
char *
|
||||
hook_url_get_description (struct t_hook *hook)
|
||||
{
|
||||
char str_desc[1024];
|
||||
|
||||
snprintf (str_desc, sizeof (str_desc),
|
||||
"URL: \"%s\", thread id: %d",
|
||||
HOOK_URL(hook, url),
|
||||
0);
|
||||
|
||||
return strdup (str_desc);
|
||||
}
|
||||
|
||||
/*
|
||||
* Displays keys and values of a hashtable.
|
||||
*/
|
||||
|
||||
void
|
||||
hook_url_hashtable_map_cb (void *data, struct t_hashtable *hashtable,
|
||||
const void *key, const void *value)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
(void) hashtable;
|
||||
|
||||
gui_chat_printf (NULL, " %s: \"%s\"",
|
||||
(const char *)key,
|
||||
(const char *)value);
|
||||
}
|
||||
|
||||
/*
|
||||
* Runs callback of url hook.
|
||||
*/
|
||||
|
||||
void
|
||||
hook_url_run_callback (struct t_hook *hook)
|
||||
{
|
||||
if (url_debug)
|
||||
{
|
||||
gui_chat_printf (NULL, "Running hook_url callback for URL \"%s\":",
|
||||
HOOK_URL(hook, url));
|
||||
gui_chat_printf (NULL, " options:");
|
||||
hashtable_map (HOOK_URL(hook, options), &hook_url_hashtable_map_cb, NULL);
|
||||
gui_chat_printf (NULL, " output:");
|
||||
hashtable_map (HOOK_URL(hook, output), &hook_url_hashtable_map_cb, NULL);
|
||||
}
|
||||
|
||||
(void) (HOOK_URL(hook, callback))
|
||||
(hook->callback_pointer,
|
||||
hook->callback_data,
|
||||
HOOK_URL(hook, url),
|
||||
HOOK_URL(hook, options),
|
||||
HOOK_URL(hook, output));
|
||||
}
|
||||
|
||||
/*
|
||||
* Thread cleanup function: mark thread as not running any more.
|
||||
*/
|
||||
|
||||
void
|
||||
hook_url_thread_cleanup (void *hook_pointer)
|
||||
{
|
||||
struct t_hook *hook;
|
||||
|
||||
hook = (struct t_hook *)hook_pointer;
|
||||
|
||||
HOOK_URL(hook, thread_running) = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* URL transfer (in a separate thread).
|
||||
*/
|
||||
|
||||
void *
|
||||
hook_url_transfer_thread (void *hook_pointer)
|
||||
{
|
||||
struct t_hook *hook;
|
||||
int url_rc;
|
||||
char str_error_code[12];
|
||||
|
||||
hook = (struct t_hook *)hook_pointer;
|
||||
|
||||
pthread_cleanup_push (&hook_url_thread_cleanup, hook);
|
||||
|
||||
url_rc = weeurl_download (HOOK_URL(hook, url),
|
||||
HOOK_URL(hook, options),
|
||||
HOOK_URL(hook, output));
|
||||
|
||||
if (url_rc != 0)
|
||||
{
|
||||
snprintf (str_error_code, sizeof (str_error_code), "%d", url_rc);
|
||||
hashtable_set (HOOK_URL(hook, output), "error_code", str_error_code);
|
||||
}
|
||||
|
||||
pthread_cleanup_pop (1);
|
||||
|
||||
pthread_exit (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks if thread is still alive.
|
||||
*/
|
||||
|
||||
int
|
||||
hook_url_timer_cb (const void *pointer, void *data, int remaining_calls)
|
||||
{
|
||||
struct t_hook *hook;
|
||||
const char *ptr_error;
|
||||
char str_error[1024], str_error_code[12];
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
(void) remaining_calls;
|
||||
|
||||
hook = (struct t_hook *)pointer;
|
||||
|
||||
if (hook->deleted)
|
||||
return WEECHAT_RC_OK;
|
||||
|
||||
if (!HOOK_URL(hook, thread_running))
|
||||
{
|
||||
hook_url_run_callback (hook);
|
||||
ptr_error = hashtable_get (HOOK_URL(hook, output), "error");
|
||||
if ((weechat_debug_core >= 1) && ptr_error && ptr_error[0])
|
||||
{
|
||||
gui_chat_printf (
|
||||
NULL,
|
||||
_("%sURL transfer error: %s (URL: \"%s\")"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
ptr_error,
|
||||
HOOK_URL(hook, url));
|
||||
}
|
||||
unhook (hook);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
if (remaining_calls == 0)
|
||||
{
|
||||
if (!hashtable_has_key (HOOK_URL(hook, output), "error_code"))
|
||||
{
|
||||
snprintf (str_error, sizeof (str_error),
|
||||
"transfer timeout reached (%.3fs)",
|
||||
((float)HOOK_URL(hook, timeout)) / 1000);
|
||||
snprintf (str_error_code, sizeof (str_error_code), "6");
|
||||
hashtable_set (HOOK_URL(hook, output), "error", str_error);
|
||||
hashtable_set (HOOK_URL(hook, output), "error_code", str_error_code);
|
||||
}
|
||||
hook_url_run_callback (hook);
|
||||
if (weechat_debug_core >= 1)
|
||||
{
|
||||
gui_chat_printf (
|
||||
NULL,
|
||||
_("End of URL transfer '%s', timeout reached (%.3fs)"),
|
||||
HOOK_URL(hook, url),
|
||||
((float)HOOK_URL(hook, timeout)) / 1000);
|
||||
}
|
||||
pthread_cancel (HOOK_URL(hook, thread_id));
|
||||
usleep (1000);
|
||||
unhook (hook);
|
||||
}
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Starts transfer for an URL hook.
|
||||
*/
|
||||
|
||||
void
|
||||
hook_url_transfer (struct t_hook *hook)
|
||||
{
|
||||
int rc, timeout, max_calls;
|
||||
long interval;
|
||||
char str_error[1024], str_error_code[12], str_error_code_pthread[12];
|
||||
|
||||
HOOK_URL(hook, thread_running) = 1;
|
||||
|
||||
/* create thread */
|
||||
rc = pthread_create (&(HOOK_URL(hook, thread_id)), NULL,
|
||||
&hook_url_transfer_thread, hook);
|
||||
if (rc != 0)
|
||||
{
|
||||
snprintf (str_error, sizeof (str_error),
|
||||
"error calling pthread_create (%d)", rc);
|
||||
snprintf (str_error_code, sizeof (str_error_code), "5");
|
||||
snprintf (str_error_code_pthread, sizeof (str_error_code_pthread),
|
||||
"%d", rc);
|
||||
hashtable_set (HOOK_URL(hook, output), "error", str_error);
|
||||
hashtable_set (HOOK_URL(hook, output), "error_code", str_error_code);
|
||||
hashtable_set (HOOK_URL(hook, output), "error_code_pthread",
|
||||
str_error_code_pthread);
|
||||
hook_url_run_callback (hook);
|
||||
|
||||
if (weechat_debug_core >= 1)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("%sError running thread in hook_url: %s (URL: \"%s\")"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
strerror (rc),
|
||||
HOOK_URL(hook, url));
|
||||
}
|
||||
unhook (hook);
|
||||
return;
|
||||
}
|
||||
|
||||
/* main thread */
|
||||
HOOK_URL(hook, thread_created) = 1;
|
||||
timeout = HOOK_URL(hook, timeout);
|
||||
interval = 100;
|
||||
max_calls = 0;
|
||||
if (timeout > 0)
|
||||
{
|
||||
if (timeout <= 100)
|
||||
{
|
||||
interval = timeout;
|
||||
max_calls = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
interval = 100;
|
||||
max_calls = timeout / 100;
|
||||
if (timeout % 100 == 0)
|
||||
max_calls++;
|
||||
}
|
||||
}
|
||||
HOOK_URL(hook, hook_timer) = hook_timer (hook->plugin,
|
||||
interval, 0, max_calls,
|
||||
&hook_url_timer_cb,
|
||||
hook,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Hooks a URL.
|
||||
*
|
||||
* Returns pointer to new hook, NULL if error.
|
||||
*/
|
||||
|
||||
struct t_hook *
|
||||
hook_url (struct t_weechat_plugin *plugin,
|
||||
const char *url,
|
||||
struct t_hashtable *options,
|
||||
int timeout,
|
||||
t_hook_callback_url *callback,
|
||||
const void *callback_pointer,
|
||||
void *callback_data)
|
||||
{
|
||||
struct t_hook *new_hook;
|
||||
struct t_hook_url *new_hook_url;
|
||||
|
||||
new_hook = NULL;
|
||||
new_hook_url = NULL;
|
||||
|
||||
if (!url || !url[0] || !callback)
|
||||
goto error;
|
||||
|
||||
new_hook = malloc (sizeof (*new_hook));
|
||||
if (!new_hook)
|
||||
goto error;
|
||||
|
||||
new_hook_url = malloc (sizeof (*new_hook_url));
|
||||
if (!new_hook_url)
|
||||
goto error;
|
||||
|
||||
hook_init_data (new_hook, plugin, HOOK_TYPE_URL, HOOK_PRIORITY_DEFAULT,
|
||||
callback_pointer, callback_data);
|
||||
|
||||
new_hook->hook_data = new_hook_url;
|
||||
new_hook_url->callback = callback;
|
||||
new_hook_url->url = strdup (url);
|
||||
new_hook_url->options = (options) ? hashtable_dup (options) : NULL;
|
||||
new_hook_url->timeout = timeout;
|
||||
new_hook_url->thread_id = 0;
|
||||
new_hook_url->thread_created = 0;
|
||||
new_hook_url->thread_running = 0;
|
||||
new_hook_url->hook_timer = NULL;
|
||||
new_hook_url->output = hashtable_new (32,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL, NULL);
|
||||
hook_add_to_list (new_hook);
|
||||
|
||||
if (weechat_debug_core >= 1)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
"debug: hook_url: url=\"%s\", "
|
||||
"options=\"%s\", timeout=%d",
|
||||
new_hook_url->url,
|
||||
hashtable_get_string (new_hook_url->options,
|
||||
"keys_values"),
|
||||
new_hook_url->timeout);
|
||||
}
|
||||
|
||||
hook_url_transfer (new_hook);
|
||||
|
||||
return new_hook;
|
||||
|
||||
error:
|
||||
if (new_hook)
|
||||
free (new_hook);
|
||||
if (new_hook_url)
|
||||
free (new_hook_url);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Frees data in a url hook.
|
||||
*/
|
||||
|
||||
void
|
||||
hook_url_free_data (struct t_hook *hook)
|
||||
{
|
||||
void *retval;
|
||||
|
||||
if (!hook || !hook->hook_data)
|
||||
return;
|
||||
|
||||
if (HOOK_URL(hook, url))
|
||||
{
|
||||
free (HOOK_URL(hook, url));
|
||||
HOOK_URL(hook, url) = NULL;
|
||||
}
|
||||
if (HOOK_URL(hook, options))
|
||||
{
|
||||
hashtable_free (HOOK_URL(hook, options));
|
||||
HOOK_URL(hook, options) = NULL;
|
||||
}
|
||||
if (HOOK_URL(hook, hook_timer))
|
||||
{
|
||||
unhook (HOOK_URL(hook, hook_timer));
|
||||
HOOK_URL(hook, hook_timer) = NULL;
|
||||
}
|
||||
if (HOOK_URL(hook, thread_running))
|
||||
{
|
||||
pthread_cancel (HOOK_URL(hook, thread_id));
|
||||
HOOK_URL(hook, thread_running) = 0;
|
||||
}
|
||||
if (HOOK_URL(hook, thread_created))
|
||||
pthread_join (HOOK_URL(hook, thread_id), &retval);
|
||||
if (HOOK_URL(hook, output))
|
||||
{
|
||||
hashtable_free (HOOK_URL(hook, output));
|
||||
HOOK_URL(hook, output) = NULL;
|
||||
}
|
||||
|
||||
free (hook->hook_data);
|
||||
hook->hook_data = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Adds url hook data in the infolist item.
|
||||
*
|
||||
* Returns:
|
||||
* 1: OK
|
||||
* 0: error
|
||||
*/
|
||||
|
||||
int
|
||||
hook_url_add_to_infolist (struct t_infolist_item *item,
|
||||
struct t_hook *hook)
|
||||
{
|
||||
if (!item || !hook || !hook->hook_data)
|
||||
return 0;
|
||||
|
||||
if (!infolist_new_var_pointer (item, "callback", HOOK_URL(hook, callback)))
|
||||
return 0;
|
||||
if (!infolist_new_var_string (item, "url", HOOK_URL(hook, url)))
|
||||
return 0;
|
||||
if (!infolist_new_var_string (item, "options", hashtable_get_string (HOOK_URL(hook, options), "keys_values")))
|
||||
return 0;
|
||||
if (!infolist_new_var_integer (item, "timeout", (int)(HOOK_URL(hook, timeout))))
|
||||
return 0;
|
||||
if (!infolist_new_var_integer (item, "thread_created", (int)(HOOK_URL(hook, thread_created))))
|
||||
return 0;
|
||||
if (!infolist_new_var_integer (item, "thread_running", (int)(HOOK_URL(hook, thread_running))))
|
||||
return 0;
|
||||
if (!infolist_new_var_pointer (item, "hook_timer", HOOK_URL(hook, hook_timer)))
|
||||
return 0;
|
||||
if (!infolist_new_var_string (item, "output", hashtable_get_string (HOOK_URL(hook, output), "keys_values")))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Prints url hook data in WeeChat log file (usually for crash dump).
|
||||
*/
|
||||
|
||||
void
|
||||
hook_url_print_log (struct t_hook *hook)
|
||||
{
|
||||
if (!hook || !hook->hook_data)
|
||||
return;
|
||||
|
||||
log_printf (" url data:");
|
||||
log_printf (" callback. . . . . . . : 0x%lx", HOOK_URL(hook, callback));
|
||||
log_printf (" url . . . . . . . . . : '%s'", HOOK_URL(hook, url));
|
||||
log_printf (" options . . . . . . . : 0x%lx (hashtable: '%s')",
|
||||
HOOK_URL(hook, options),
|
||||
hashtable_get_string (HOOK_URL(hook, options),
|
||||
"keys_values"));
|
||||
log_printf (" timeout . . . . . . . : %ld", HOOK_URL(hook, timeout));
|
||||
log_printf (" thread_created. . . . : %d", (int)HOOK_URL(hook, thread_created));
|
||||
log_printf (" thread_running. . . . : %d", (int)HOOK_URL(hook, thread_running));
|
||||
log_printf (" hook_timer. . . . . . : 0x%lx", HOOK_URL(hook, hook_timer));
|
||||
log_printf (" output. . . . . . . . : 0x%lx (hashtable: '%s')",
|
||||
HOOK_URL(hook, output),
|
||||
hashtable_get_string (HOOK_URL(hook, output),
|
||||
"keys_values"));
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
* WeeChat is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* WeeChat is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef WEECHAT_HOOK_URL_H
|
||||
#define WEECHAT_HOOK_URL_H
|
||||
|
||||
struct t_weechat_plugin;
|
||||
struct t_infolist_item;
|
||||
struct t_hashtable;
|
||||
|
||||
#define HOOK_URL(hook, var) (((struct t_hook_url *)hook->hook_data)->var)
|
||||
|
||||
typedef int (t_hook_callback_url)(const void *pointer, void *data,
|
||||
const char *url,
|
||||
struct t_hashtable *options,
|
||||
struct t_hashtable *output);
|
||||
|
||||
struct t_hook_url
|
||||
{
|
||||
t_hook_callback_url *callback; /* URL callback */
|
||||
char *url; /* URL */
|
||||
struct t_hashtable *options; /* URL options (see doc) */
|
||||
long timeout; /* timeout (ms) (0 = no timeout) */
|
||||
pthread_t thread_id; /* thread id */
|
||||
int thread_created; /* thread created */
|
||||
int thread_running; /* 1 if thread is running */
|
||||
struct t_hook *hook_timer; /* timer to check if thread has ended*/
|
||||
struct t_hashtable *output; /* URL transfer output data */
|
||||
};
|
||||
|
||||
extern char *hook_url_get_description (struct t_hook *hook);
|
||||
extern struct t_hook *hook_url (struct t_weechat_plugin *plugin,
|
||||
const char *url,
|
||||
struct t_hashtable *options,
|
||||
int timeout,
|
||||
t_hook_callback_url *callback,
|
||||
const void *callback_pointer,
|
||||
void *callback_data);
|
||||
extern void hook_url_free_data (struct t_hook *hook);
|
||||
extern int hook_url_add_to_infolist (struct t_infolist_item *item,
|
||||
struct t_hook *hook);
|
||||
extern void hook_url_print_log (struct t_hook *hook);
|
||||
|
||||
#endif /* WEECHAT_HOOK_URL_H */
|
||||
+510
-197
File diff suppressed because it is too large
Load Diff
+10
-1
@@ -21,6 +21,8 @@
|
||||
#ifndef WEECHAT_COMMAND_H
|
||||
#define WEECHAT_COMMAND_H
|
||||
|
||||
struct t_gui_buffer;
|
||||
|
||||
#define COMMAND_CALLBACK(__command) \
|
||||
int \
|
||||
command_##__command (const void *pointer, void *data, \
|
||||
@@ -80,7 +82,14 @@
|
||||
return WEECHAT_RC_ERROR; \
|
||||
}
|
||||
|
||||
struct t_gui_buffer;
|
||||
struct t_command_repeat
|
||||
{
|
||||
char *buffer_name; /* full buffer name */
|
||||
char *command; /* cmd to exec (or text for buffer) */
|
||||
char *commands_allowed; /* commands currently allowed */
|
||||
int count; /* number of times the cmd is exec. */
|
||||
int index; /* current index (starts at 1) */
|
||||
};
|
||||
|
||||
extern const char *command_help_option_color_values ();
|
||||
extern void command_version_display (struct t_gui_buffer *buffer,
|
||||
|
||||
+230
-45
@@ -489,6 +489,76 @@ completion_list_add_buffer_properties_set_cb (const void *pointer, void *data,
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Adds a buffer local variable to completions list (for `/buffer setauto`).
|
||||
*/
|
||||
|
||||
void
|
||||
completion_list_map_buffer_local_variable_setauto_cb (void *data,
|
||||
struct t_hashtable *hashtable,
|
||||
const void *key,
|
||||
const void *value)
|
||||
{
|
||||
char str_localvar[4096];
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) hashtable;
|
||||
(void) value;
|
||||
|
||||
snprintf (str_localvar, sizeof (str_localvar),
|
||||
"localvar_set_%s", (const char *)key);
|
||||
gui_completion_list_add ((struct t_gui_completion *)data,
|
||||
str_localvar,
|
||||
0, WEECHAT_LIST_POS_SORT);
|
||||
}
|
||||
|
||||
/*
|
||||
* Adds buffer properties (that can be set), local variables and key bindings
|
||||
* to completion list.
|
||||
*/
|
||||
|
||||
int
|
||||
completion_list_add_buffer_properties_setauto_cb (const void *pointer, void *data,
|
||||
const char *completion_item,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_gui_completion *completion)
|
||||
{
|
||||
struct t_gui_key *ptr_key;
|
||||
char str_key[1024];
|
||||
int i;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) pointer;
|
||||
(void) data;
|
||||
(void) completion_item;
|
||||
(void) buffer;
|
||||
|
||||
/* add buffer properties */
|
||||
for (i = 0; gui_buffer_properties_set[i]; i++)
|
||||
{
|
||||
gui_completion_list_add (completion,
|
||||
gui_buffer_properties_set[i],
|
||||
0, WEECHAT_LIST_POS_SORT);
|
||||
}
|
||||
|
||||
/* add buffer local variables */
|
||||
hashtable_map (completion->buffer->local_variables,
|
||||
&completion_list_map_buffer_local_variable_setauto_cb,
|
||||
completion);
|
||||
|
||||
/* add buffer keys */
|
||||
for (ptr_key = completion->buffer->keys; ptr_key;
|
||||
ptr_key = ptr_key->next_key)
|
||||
{
|
||||
snprintf (str_key, sizeof (str_key), "key_bind_%s", ptr_key->key);
|
||||
gui_completion_list_add (completion, str_key, 0, WEECHAT_LIST_POS_SORT);
|
||||
snprintf (str_key, sizeof (str_key), "key_unbind_%s", ptr_key->key);
|
||||
gui_completion_list_add (completion, str_key, 0, WEECHAT_LIST_POS_SORT);
|
||||
}
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Adds buffer properties (that can be read) to completion list.
|
||||
*/
|
||||
@@ -1461,59 +1531,31 @@ completion_list_add_config_option_values_cb (const void *pointer, void *data,
|
||||
}
|
||||
break;
|
||||
case CONFIG_OPTION_TYPE_INTEGER:
|
||||
if (option_found->string_values)
|
||||
{
|
||||
for (i = 0; option_found->string_values[i]; i++)
|
||||
{
|
||||
gui_completion_list_add (completion,
|
||||
option_found->string_values[i],
|
||||
0, WEECHAT_LIST_POS_SORT);
|
||||
}
|
||||
gui_completion_list_add (completion, "++1",
|
||||
0, WEECHAT_LIST_POS_END);
|
||||
if (option_found->value && CONFIG_INTEGER(option_found) > option_found->min)
|
||||
gui_completion_list_add (completion, "--1",
|
||||
0, WEECHAT_LIST_POS_END);
|
||||
if (option_found->value)
|
||||
0, WEECHAT_LIST_POS_BEGINNING);
|
||||
if (option_found->value && CONFIG_INTEGER(option_found) < option_found->max)
|
||||
gui_completion_list_add (completion, "++1",
|
||||
0, WEECHAT_LIST_POS_BEGINNING);
|
||||
if (option_found->value)
|
||||
{
|
||||
length = 64;
|
||||
value_string = malloc (length);
|
||||
if (value_string)
|
||||
{
|
||||
snprintf (value_string, length,
|
||||
"%d", CONFIG_INTEGER(option_found));
|
||||
gui_completion_list_add (completion,
|
||||
option_found->string_values[CONFIG_INTEGER(option_found)],
|
||||
0, WEECHAT_LIST_POS_BEGINNING);
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_completion_list_add (completion,
|
||||
WEECHAT_CONFIG_OPTION_NULL,
|
||||
value_string,
|
||||
0, WEECHAT_LIST_POS_BEGINNING);
|
||||
free (value_string);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (option_found->value && CONFIG_INTEGER(option_found) > option_found->min)
|
||||
gui_completion_list_add (completion, "--1",
|
||||
0, WEECHAT_LIST_POS_BEGINNING);
|
||||
if (option_found->value && CONFIG_INTEGER(option_found) < option_found->max)
|
||||
gui_completion_list_add (completion, "++1",
|
||||
0, WEECHAT_LIST_POS_BEGINNING);
|
||||
if (option_found->value)
|
||||
{
|
||||
length = 64;
|
||||
value_string = malloc (length);
|
||||
if (value_string)
|
||||
{
|
||||
snprintf (value_string, length,
|
||||
"%d", CONFIG_INTEGER(option_found));
|
||||
gui_completion_list_add (completion,
|
||||
value_string,
|
||||
0, WEECHAT_LIST_POS_BEGINNING);
|
||||
free (value_string);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_completion_list_add (completion,
|
||||
WEECHAT_CONFIG_OPTION_NULL,
|
||||
0, WEECHAT_LIST_POS_BEGINNING);
|
||||
}
|
||||
gui_completion_list_add (completion,
|
||||
WEECHAT_CONFIG_OPTION_NULL,
|
||||
0, WEECHAT_LIST_POS_BEGINNING);
|
||||
}
|
||||
break;
|
||||
case CONFIG_OPTION_TYPE_STRING:
|
||||
@@ -1567,6 +1609,30 @@ completion_list_add_config_option_values_cb (const void *pointer, void *data,
|
||||
0, WEECHAT_LIST_POS_BEGINNING);
|
||||
}
|
||||
break;
|
||||
case CONFIG_OPTION_TYPE_ENUM:
|
||||
for (i = 0; option_found->string_values[i]; i++)
|
||||
{
|
||||
gui_completion_list_add (completion,
|
||||
option_found->string_values[i],
|
||||
0, WEECHAT_LIST_POS_SORT);
|
||||
}
|
||||
gui_completion_list_add (completion, "++1",
|
||||
0, WEECHAT_LIST_POS_END);
|
||||
gui_completion_list_add (completion, "--1",
|
||||
0, WEECHAT_LIST_POS_END);
|
||||
if (option_found->value)
|
||||
{
|
||||
gui_completion_list_add (completion,
|
||||
option_found->string_values[CONFIG_ENUM(option_found)],
|
||||
0, WEECHAT_LIST_POS_BEGINNING);
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_completion_list_add (completion,
|
||||
WEECHAT_CONFIG_OPTION_NULL,
|
||||
0, WEECHAT_LIST_POS_BEGINNING);
|
||||
}
|
||||
break;
|
||||
case CONFIG_NUM_OPTION_TYPES:
|
||||
break;
|
||||
}
|
||||
@@ -2005,6 +2071,119 @@ completion_list_add_env_value_cb (const void *pointer, void *data,
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Adds a buffer local variable for /eval to completions list.
|
||||
*/
|
||||
|
||||
void
|
||||
completion_list_map_eval_buffer_local_variable_cb (void *data,
|
||||
struct t_hashtable *hashtable,
|
||||
const void *key, const void *value)
|
||||
{
|
||||
char *name;
|
||||
int length;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) hashtable;
|
||||
(void) value;
|
||||
|
||||
length = strlen (key) + 3 + 1;
|
||||
name = malloc (length);
|
||||
if (name)
|
||||
{
|
||||
snprintf (name, length, "${%s}", (const char *)key);
|
||||
gui_completion_list_add ((struct t_gui_completion *)data,
|
||||
name, 0, WEECHAT_LIST_POS_SORT);
|
||||
free (name);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Adds /eval variables to completion list.
|
||||
*/
|
||||
|
||||
int
|
||||
completion_list_add_eval_variables_cb (const void *pointer, void *data,
|
||||
const char *completion_item,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_gui_completion *completion)
|
||||
{
|
||||
char *eval_variables[] = {
|
||||
"${\\xxx}",
|
||||
"${base_decode:base,xxx}",
|
||||
"${base_encode:base,xxx}",
|
||||
"${calc:xxx}",
|
||||
"${chars:range}",
|
||||
"${color:xxx}",
|
||||
"${cut:+max,suffix,string}",
|
||||
"${cut:max,suffix,string}",
|
||||
"${cutscr:+max,suffix,string}",
|
||||
"${cutscr:max,suffix,string}",
|
||||
"${date:format}",
|
||||
"${date}",
|
||||
"${define:name,value}",
|
||||
"${env:XXX}",
|
||||
"${esc:xxx}",
|
||||
"${eval:xxx}",
|
||||
"${eval_cond:xxx}",
|
||||
"${file.section.option}",
|
||||
"${hdata.var1.var2}",
|
||||
"${hdata[list].var1.var2}",
|
||||
"${hdata[ptr].var1.var2}",
|
||||
"${hdata[ptr_name].var1.var2}",
|
||||
"${hide:char,string}",
|
||||
"${if:condition?value_if_true:value_if_false}",
|
||||
"${info:name,arguments}",
|
||||
"${length:xxx}",
|
||||
"${lengthscr:xxx}",
|
||||
"${lower:xxx}",
|
||||
"${modifier:name,data,xxx}",
|
||||
"${random:min,max}",
|
||||
"${raw:xxx}",
|
||||
"${re:+}",
|
||||
"${re:N}",
|
||||
"${repeat:count,string}",
|
||||
"${rev:xxx}",
|
||||
"${revscr:xxx}",
|
||||
"${sec.data.xxx}",
|
||||
"${split:count,separators,flags,xxx}",
|
||||
"${split:number,separators,flags,xxx}",
|
||||
"${split:random,separators,flags,xxx}",
|
||||
"${split_shell:count,xxx}",
|
||||
"${split_shell:number,xxx}",
|
||||
"${split_shell:random,xxx}",
|
||||
"${translate:xxx}",
|
||||
"${upper:xxx}",
|
||||
"${weechat_cache_dir}",
|
||||
"${weechat_config_dir}",
|
||||
"${weechat_data_dir}",
|
||||
"${weechat_runtime_dir}",
|
||||
"${window}",
|
||||
"${window.buffer}",
|
||||
"${window.buffer.xxx}",
|
||||
NULL,
|
||||
};
|
||||
int i;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) pointer;
|
||||
(void) data;
|
||||
(void) completion_item;
|
||||
(void) buffer;
|
||||
|
||||
for (i = 0; eval_variables[i]; i++)
|
||||
{
|
||||
gui_completion_list_add (completion, eval_variables[i],
|
||||
0, WEECHAT_LIST_POS_SORT);
|
||||
}
|
||||
|
||||
hashtable_map (completion->buffer->local_variables,
|
||||
&completion_list_map_eval_buffer_local_variable_cb,
|
||||
completion);
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Adds hooks for completions done by WeeChat core.
|
||||
*/
|
||||
@@ -2030,6 +2209,9 @@ completion_init ()
|
||||
hook_completion (NULL, "buffer_properties_set",
|
||||
N_("properties that can be set on a buffer"),
|
||||
&completion_list_add_buffer_properties_set_cb, NULL, NULL);
|
||||
hook_completion (NULL, "buffer_properties_setauto",
|
||||
N_("properties that can be automatically set on a buffer"),
|
||||
&completion_list_add_buffer_properties_setauto_cb, NULL, NULL);
|
||||
hook_completion (NULL, "buffer_properties_get",
|
||||
N_("properties that can be read on a buffer"),
|
||||
&completion_list_add_buffer_properties_get_cb, NULL, NULL);
|
||||
@@ -2146,4 +2328,7 @@ completion_init ()
|
||||
hook_completion (NULL, "env_value",
|
||||
N_("value of an environment variable"),
|
||||
&completion_list_add_env_value_cb, NULL, NULL);
|
||||
hook_completion (NULL, "eval_variables",
|
||||
N_("variables that can be used in /eval command"),
|
||||
&completion_list_add_eval_variables_cb, NULL, NULL);
|
||||
}
|
||||
|
||||
+570
-382
File diff suppressed because it is too large
Load Diff
@@ -39,6 +39,9 @@
|
||||
#define CONFIG_COLOR(option) (*((int *)((option)->value)))
|
||||
#define CONFIG_COLOR_DEFAULT(option) (*((int *)((option)->default_value)))
|
||||
|
||||
#define CONFIG_ENUM(option) (*((int *)((option)->value)))
|
||||
#define CONFIG_ENUM_DEFAULT(option) (*((int *)((option)->default_value)))
|
||||
|
||||
#define CONFIG_BOOLEAN_FALSE 0
|
||||
#define CONFIG_BOOLEAN_TRUE 1
|
||||
|
||||
@@ -136,6 +139,7 @@ enum t_config_option_type
|
||||
CONFIG_OPTION_TYPE_INTEGER,
|
||||
CONFIG_OPTION_TYPE_STRING,
|
||||
CONFIG_OPTION_TYPE_COLOR,
|
||||
CONFIG_OPTION_TYPE_ENUM,
|
||||
/* number of option types */
|
||||
CONFIG_NUM_OPTION_TYPES,
|
||||
};
|
||||
@@ -317,6 +321,8 @@ extern const char *config_file_option_string (struct t_config_option *option);
|
||||
extern const char *config_file_option_string_default (struct t_config_option *option);
|
||||
extern const char *config_file_option_color (struct t_config_option *option);
|
||||
extern const char *config_file_option_color_default (struct t_config_option *option);
|
||||
extern int config_file_option_enum (struct t_config_option *option);
|
||||
extern int config_file_option_enum_default (struct t_config_option *option);
|
||||
extern int config_file_write_option (struct t_config_file *config_file,
|
||||
struct t_config_option *option);
|
||||
extern int config_file_write_line (struct t_config_file *config_file,
|
||||
|
||||
+216
-30
@@ -36,6 +36,7 @@
|
||||
#include <regex.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-arraylist.h"
|
||||
#include "wee-config.h"
|
||||
#include "wee-eval.h"
|
||||
#include "wee-hashtable.h"
|
||||
@@ -43,10 +44,10 @@
|
||||
#include "wee-log.h"
|
||||
#include "wee-network.h"
|
||||
#include "wee-utf8.h"
|
||||
#include "wee-util.h"
|
||||
#include "wee-list.h"
|
||||
#include "wee-proxy.h"
|
||||
#include "wee-string.h"
|
||||
#include "wee-sys.h"
|
||||
#include "wee-version.h"
|
||||
#include "../gui/gui-bar.h"
|
||||
#include "../gui/gui-bar-item.h"
|
||||
@@ -84,6 +85,7 @@ struct t_config_section *weechat_config_section_signal = NULL;
|
||||
struct t_config_section *weechat_config_section_bar = NULL;
|
||||
struct t_config_section *weechat_config_section_custom_bar_item = NULL;
|
||||
struct t_config_section *weechat_config_section_layout = NULL;
|
||||
struct t_config_section *weechat_config_section_buffer = NULL;
|
||||
struct t_config_section *weechat_config_section_notify = NULL;
|
||||
struct t_config_section *weechat_config_section_filter = NULL;
|
||||
struct t_config_section *weechat_config_section_key[GUI_KEY_NUM_CONTEXTS] = {
|
||||
@@ -380,7 +382,7 @@ config_change_sys_rlimit (const void *pointer, void *data,
|
||||
(void) option;
|
||||
|
||||
if (gui_init_ok)
|
||||
util_setrlimit ();
|
||||
sys_setrlimit ();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -391,7 +393,7 @@ void
|
||||
config_change_save_config_layout_on_exit ()
|
||||
{
|
||||
if (gui_init_ok && !CONFIG_BOOLEAN(config_look_save_config_on_exit)
|
||||
&& (CONFIG_INTEGER(config_look_save_layout_on_exit) != CONFIG_LOOK_SAVE_LAYOUT_ON_EXIT_NONE))
|
||||
&& (CONFIG_ENUM(config_look_save_layout_on_exit) != CONFIG_LOOK_SAVE_LAYOUT_ON_EXIT_NONE))
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("Warning: option weechat.look.save_config_on_exit "
|
||||
@@ -1480,7 +1482,7 @@ config_weechat_init_after_read ()
|
||||
{
|
||||
int context;
|
||||
|
||||
util_setrlimit ();
|
||||
sys_setrlimit ();
|
||||
|
||||
gui_buffer_notify_set_all ();
|
||||
|
||||
@@ -1601,7 +1603,24 @@ config_weechat_update_cb (const void *pointer, void *data,
|
||||
}
|
||||
else
|
||||
{
|
||||
new_option = gui_key_legacy_to_alias (ptr_option);
|
||||
/*
|
||||
* if backspace or ctrl-backspace was manually bound to a
|
||||
* different command, keep the key as-is (in lower case) ;
|
||||
* in all other cases, convert the key to the new name
|
||||
*/
|
||||
if (ptr_section
|
||||
&& (strcmp (ptr_section, "key") == 0)
|
||||
&& ((strcmp (ptr_option, "ctrl-H") == 0)
|
||||
|| (strcmp (ptr_option, "ctrl-?") == 0))
|
||||
&& (ptr_value
|
||||
&& (strcmp (ptr_value, "/input delete_previous_char") != 0)))
|
||||
{
|
||||
new_option = string_tolower (ptr_option);
|
||||
}
|
||||
else
|
||||
{
|
||||
new_option = gui_key_legacy_to_alias (ptr_option);
|
||||
}
|
||||
if (new_option)
|
||||
{
|
||||
if (strcmp (ptr_option, new_option) != 0)
|
||||
@@ -1612,6 +1631,18 @@ config_weechat_update_cb (const void *pointer, void *data,
|
||||
ptr_option, new_option);
|
||||
hashtable_set (data_read, "option", new_option);
|
||||
changes++;
|
||||
if (ptr_section
|
||||
&& (strcmp (ptr_section, "key") == 0)
|
||||
&& (strcmp (new_option, "return") == 0)
|
||||
&& (!ptr_value
|
||||
|| (strcmp (ptr_value, "/input return") != 0)))
|
||||
{
|
||||
gui_chat_printf (
|
||||
NULL,
|
||||
_("Command converted for key \"%s\": \"%s\" => \"%s\""),
|
||||
"return", ptr_value, "/input return");
|
||||
hashtable_set (data_read, "value", "/input return");
|
||||
}
|
||||
}
|
||||
free (new_option);
|
||||
}
|
||||
@@ -2438,24 +2469,168 @@ config_weechat_layout_write_cb (const void *pointer, void *data,
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks notify option value.
|
||||
*
|
||||
* Returns:
|
||||
* 1: value OK
|
||||
* 0: invalid value
|
||||
* Applies a buffer option to all matching buffers.
|
||||
*/
|
||||
|
||||
int
|
||||
config_weechat_notify_check_cb (const void *pointer, void *data,
|
||||
struct t_config_option *option,
|
||||
const char *value)
|
||||
void
|
||||
config_weechat_buffer_apply_option (struct t_config_option *option)
|
||||
{
|
||||
struct t_arraylist *all_buffers;
|
||||
struct t_gui_buffer *ptr_buffer;
|
||||
int i, list_size;
|
||||
|
||||
if (!option)
|
||||
return;
|
||||
|
||||
all_buffers = arraylist_new (gui_buffers_count, 0, 0,
|
||||
NULL, NULL, NULL, NULL);
|
||||
if (!all_buffers)
|
||||
return;
|
||||
|
||||
for (ptr_buffer = gui_buffers; ptr_buffer;
|
||||
ptr_buffer = ptr_buffer->next_buffer)
|
||||
{
|
||||
arraylist_add (all_buffers, ptr_buffer);
|
||||
}
|
||||
|
||||
list_size = arraylist_size (all_buffers);
|
||||
for (i = 0; i < list_size; i++)
|
||||
{
|
||||
ptr_buffer = (struct t_gui_buffer *)arraylist_get (all_buffers, i);
|
||||
if (gui_buffer_valid (ptr_buffer))
|
||||
gui_buffer_apply_config_option_property (ptr_buffer, option);
|
||||
}
|
||||
|
||||
arraylist_free (all_buffers);
|
||||
}
|
||||
|
||||
/*
|
||||
* Callback for changes on a buffer option.
|
||||
*/
|
||||
|
||||
void
|
||||
config_weechat_buffer_change_cb (const void *pointer, void *data,
|
||||
struct t_config_option *option)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
(void) pointer;
|
||||
(void) data;
|
||||
(void) option;
|
||||
|
||||
return (gui_buffer_search_notify (value) >= 0) ? 1 : 0;
|
||||
config_weechat_buffer_apply_option (option);
|
||||
}
|
||||
|
||||
/*
|
||||
* Callback called when an option is created in section "buffer".
|
||||
*/
|
||||
|
||||
int
|
||||
config_weechat_buffer_create_option_cb (const void *pointer, void *data,
|
||||
struct t_config_file *config_file,
|
||||
struct t_config_section *section,
|
||||
const char *option_name,
|
||||
const char *value)
|
||||
{
|
||||
struct t_config_option *ptr_option;
|
||||
const char *pos;
|
||||
char *buffer_mask, description[4096];
|
||||
int rc;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) pointer;
|
||||
(void) data;
|
||||
|
||||
rc = WEECHAT_CONFIG_OPTION_SET_ERROR;
|
||||
|
||||
if (!option_name)
|
||||
return rc;
|
||||
|
||||
ptr_option = config_file_search_option (config_file, section,
|
||||
option_name);
|
||||
if (ptr_option)
|
||||
{
|
||||
rc = config_file_option_set (ptr_option, value, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
pos = strrchr (option_name, '.');
|
||||
if (pos)
|
||||
{
|
||||
buffer_mask = strndup (option_name, pos - option_name);
|
||||
if (buffer_mask)
|
||||
{
|
||||
snprintf (description, sizeof (description),
|
||||
_("set property \"%s\" on any buffer matching "
|
||||
"mask \"%s\"; "
|
||||
"content is evaluated (see /help eval) for all "
|
||||
"properties except \"key_bind_xxx\" and "
|
||||
"\"key_unbind_xxx\"; when evaluation is done, "
|
||||
"${buffer} is a pointer to the buffer being opened, "
|
||||
"${property} is the name of the property being set"),
|
||||
pos + 1,
|
||||
buffer_mask);
|
||||
ptr_option = config_file_new_option (
|
||||
config_file, section,
|
||||
option_name, "string",
|
||||
description,
|
||||
"",
|
||||
0, 0, "", value, 0,
|
||||
NULL, NULL, NULL,
|
||||
&config_weechat_buffer_change_cb, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
rc = (ptr_option) ?
|
||||
WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE : WEECHAT_CONFIG_OPTION_SET_ERROR;
|
||||
free (buffer_mask);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ptr_option)
|
||||
config_weechat_buffer_apply_option (ptr_option);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets a buffer property.
|
||||
*
|
||||
* Returns:
|
||||
* 1: OK
|
||||
* 0: error
|
||||
*/
|
||||
|
||||
int
|
||||
config_weechat_buffer_set (struct t_gui_buffer *buffer,
|
||||
const char *property, const char *value)
|
||||
{
|
||||
char option_name[4096];
|
||||
int rc;
|
||||
|
||||
if (!buffer || !property || !property[0])
|
||||
return 0;
|
||||
|
||||
snprintf (option_name, sizeof (option_name),
|
||||
"%s.%s",
|
||||
buffer->full_name,
|
||||
property);
|
||||
|
||||
/* create/update option */
|
||||
rc = config_weechat_buffer_create_option_cb (
|
||||
NULL, NULL,
|
||||
weechat_config_file,
|
||||
weechat_config_section_buffer,
|
||||
option_name,
|
||||
(value) ? value : "");
|
||||
|
||||
if (rc != WEECHAT_CONFIG_OPTION_SET_ERROR)
|
||||
{
|
||||
gui_chat_printf (
|
||||
NULL,
|
||||
_("Option \"weechat.buffer.%s\" has been set to \"%s\""),
|
||||
option_name,
|
||||
(value) ? value : "");
|
||||
}
|
||||
|
||||
return (rc != WEECHAT_CONFIG_OPTION_SET_ERROR) ? 1 : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2517,10 +2692,11 @@ config_weechat_notify_create_option_cb (const void *pointer, void *data,
|
||||
{
|
||||
ptr_option = config_file_new_option (
|
||||
config_file, section,
|
||||
option_name, "integer", _("Notify level for buffer"),
|
||||
option_name, "enum",
|
||||
_("Notify level for buffer"),
|
||||
"none|highlight|message|all",
|
||||
0, 0, "", value, 0,
|
||||
&config_weechat_notify_check_cb, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
&config_weechat_notify_change_cb, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
rc = (ptr_option) ?
|
||||
@@ -2872,7 +3048,7 @@ config_weechat_init_options ()
|
||||
{
|
||||
config_look_align_end_of_lines = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
"align_end_of_lines", "integer",
|
||||
"align_end_of_lines", "enum",
|
||||
N_("alignment for end of lines (all lines after the first): they "
|
||||
"are starting under this data (time, buffer, prefix, suffix, "
|
||||
"message (default))"),
|
||||
@@ -2955,7 +3131,7 @@ config_weechat_init_options ()
|
||||
NULL, NULL, NULL);
|
||||
config_look_buffer_notify_default = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
"buffer_notify_default", "integer",
|
||||
"buffer_notify_default", "enum",
|
||||
N_("default notify level for buffers (used to tell WeeChat if "
|
||||
"buffer must be displayed in hotlist or not, according to "
|
||||
"importance of message): all=all messages (default), "
|
||||
@@ -2967,7 +3143,7 @@ config_weechat_init_options ()
|
||||
NULL, NULL, NULL);
|
||||
config_look_buffer_position = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
"buffer_position", "integer",
|
||||
"buffer_position", "enum",
|
||||
N_("position of a new buffer: end = after the end of list (number = "
|
||||
"last number + 1) (default), first_gap = at first available "
|
||||
"number in the list (after the end of list if no number is "
|
||||
@@ -2997,7 +3173,7 @@ config_weechat_init_options ()
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
config_look_buffer_search_where = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
"buffer_search_where", "integer",
|
||||
"buffer_search_where", "enum",
|
||||
N_("default text search in buffer: in message, prefix, prefix and "
|
||||
"message"),
|
||||
"prefix|message|prefix_message", 0, 0, "prefix_message",
|
||||
@@ -3363,7 +3539,7 @@ config_weechat_init_options ()
|
||||
NULL, NULL, NULL);
|
||||
config_look_hotlist_remove = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
"hotlist_remove", "integer",
|
||||
"hotlist_remove", "enum",
|
||||
N_("remove buffers in hotlist: buffer = remove buffer by buffer, "
|
||||
"merged = remove all visible merged buffers at once"),
|
||||
"buffer|merged",
|
||||
@@ -3380,7 +3556,7 @@ config_weechat_init_options ()
|
||||
NULL, NULL, NULL);
|
||||
config_look_hotlist_sort = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
"hotlist_sort", "integer",
|
||||
"hotlist_sort", "enum",
|
||||
N_("sort of hotlist: group_time_*: group by notify level "
|
||||
"(highlights first) then sort by time, group_number_*: group "
|
||||
"by notify level (highlights first) then sort by number, "
|
||||
@@ -3431,7 +3607,7 @@ config_weechat_init_options ()
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
config_look_input_share = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
"input_share", "integer",
|
||||
"input_share", "enum",
|
||||
N_("share commands, text, or both in input for all buffers (there "
|
||||
"is still local history for each buffer)"),
|
||||
"none|commands|text|all",
|
||||
@@ -3563,7 +3739,7 @@ config_weechat_init_options ()
|
||||
NULL, NULL, NULL);
|
||||
config_look_nick_color_hash = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
"nick_color_hash", "integer",
|
||||
"nick_color_hash", "enum",
|
||||
N_("hash algorithm used to find the color for a nick: djb2 = variant "
|
||||
"of djb2 (position of letters matters: anagrams of a nick have "
|
||||
"different color), djb2_32 = variant of djb2 using 32-bit instead "
|
||||
@@ -3692,7 +3868,7 @@ config_weechat_init_options ()
|
||||
NULL, NULL, NULL);
|
||||
config_look_prefix_align = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
"prefix_align", "integer",
|
||||
"prefix_align", "enum",
|
||||
N_("prefix alignment (none, left, right (default))"),
|
||||
"none|left|right", 0, 0, "right", NULL, 0,
|
||||
NULL, NULL, NULL,
|
||||
@@ -3735,7 +3911,7 @@ config_weechat_init_options ()
|
||||
NULL, NULL, NULL);
|
||||
config_look_prefix_buffer_align = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
"prefix_buffer_align", "integer",
|
||||
"prefix_buffer_align", "enum",
|
||||
N_("prefix alignment for buffer name, when many buffers are merged "
|
||||
"with same number (none, left, right (default))"),
|
||||
"none|left|right", 0, 0, "right", NULL, 0,
|
||||
@@ -3823,7 +3999,7 @@ config_weechat_init_options ()
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
config_look_read_marker = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
"read_marker", "integer",
|
||||
"read_marker", "enum",
|
||||
N_("use a marker (line or char) on buffers to show first unread "
|
||||
"line"),
|
||||
"none|line|char",
|
||||
@@ -3873,7 +4049,7 @@ config_weechat_init_options ()
|
||||
NULL, NULL, NULL);
|
||||
config_look_save_layout_on_exit = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
"save_layout_on_exit", "integer",
|
||||
"save_layout_on_exit", "enum",
|
||||
N_("save layout on exit (buffers, windows, or both)"),
|
||||
"none|buffers|windows|all", 0, 0, "none", NULL, 0,
|
||||
NULL, NULL, NULL,
|
||||
@@ -4973,6 +5149,16 @@ config_weechat_init_options ()
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* buffer */
|
||||
weechat_config_section_buffer = config_file_new_section (
|
||||
weechat_config_file, "buffer",
|
||||
1, 1,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
&config_weechat_buffer_create_option_cb, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* notify */
|
||||
weechat_config_section_notify = config_file_new_section (
|
||||
weechat_config_file, "notify",
|
||||
|
||||
@@ -142,6 +142,7 @@ extern struct t_config_section *weechat_config_section_signal;
|
||||
extern struct t_config_section *weechat_config_section_bar;
|
||||
extern struct t_config_section *weechat_config_section_custom_bar_item;
|
||||
extern struct t_config_section *weechat_config_section_layout;
|
||||
extern struct t_config_section *weechat_config_section_buffer;
|
||||
extern struct t_config_section *weechat_config_section_notify;
|
||||
extern struct t_config_section *weechat_config_section_filter;
|
||||
extern struct t_config_section *weechat_config_section_key[];
|
||||
@@ -400,6 +401,8 @@ extern struct t_config_option *config_weechat_debug_get (const char *plugin_name
|
||||
extern int config_weechat_debug_set (const char *plugin_name,
|
||||
const char *value);
|
||||
extern void config_weechat_debug_set_all ();
|
||||
extern int config_weechat_buffer_set (struct t_gui_buffer *buffer,
|
||||
const char *property, const char *value);
|
||||
extern int config_weechat_notify_set (struct t_gui_buffer *buffer,
|
||||
const char *notify);
|
||||
extern void config_get_item_time (char *text_time, int max_length);
|
||||
|
||||
+145
-37
@@ -42,9 +42,29 @@ char *weecrypto_hash_algo_string[] = {
|
||||
"crc32",
|
||||
"md5",
|
||||
"sha1",
|
||||
"sha224", "sha256", "sha384", "sha512",
|
||||
"sha224",
|
||||
"sha256",
|
||||
"sha384",
|
||||
"sha512",
|
||||
#if GCRYPT_VERSION_NUMBER >= 0x010700
|
||||
"sha3-224", "sha3-256", "sha3-384", "sha3-512",
|
||||
"sha3-224",
|
||||
"sha3-256",
|
||||
"sha3-384",
|
||||
"sha3-512",
|
||||
#endif
|
||||
#if GCRYPT_VERSION_NUMBER >= 0x010800
|
||||
"blake2b-160",
|
||||
"blake2b-256",
|
||||
"blake2b-384",
|
||||
"blake2b-512",
|
||||
"blake2s-128",
|
||||
"blake2s-160",
|
||||
"blake2s-224",
|
||||
"blake2s-256",
|
||||
#endif
|
||||
#if GCRYPT_VERSION_NUMBER >= 0x010904
|
||||
"sha512-224",
|
||||
"sha512-256",
|
||||
#endif
|
||||
NULL,
|
||||
};
|
||||
@@ -52,10 +72,42 @@ int weecrypto_hash_algo[] = {
|
||||
GCRY_MD_CRC32,
|
||||
GCRY_MD_MD5,
|
||||
GCRY_MD_SHA1,
|
||||
GCRY_MD_SHA224, GCRY_MD_SHA256, GCRY_MD_SHA384, GCRY_MD_SHA512,
|
||||
GCRY_MD_SHA224,
|
||||
GCRY_MD_SHA256,
|
||||
GCRY_MD_SHA384,
|
||||
GCRY_MD_SHA512,
|
||||
#if GCRYPT_VERSION_NUMBER >= 0x010700
|
||||
GCRY_MD_SHA3_224, GCRY_MD_SHA3_256, GCRY_MD_SHA3_384, GCRY_MD_SHA3_512,
|
||||
GCRY_MD_SHA3_224,
|
||||
GCRY_MD_SHA3_256,
|
||||
GCRY_MD_SHA3_384,
|
||||
GCRY_MD_SHA3_512,
|
||||
#endif
|
||||
#if GCRYPT_VERSION_NUMBER >= 0x010800
|
||||
GCRY_MD_BLAKE2B_160,
|
||||
GCRY_MD_BLAKE2B_256,
|
||||
GCRY_MD_BLAKE2B_384,
|
||||
GCRY_MD_BLAKE2B_512,
|
||||
GCRY_MD_BLAKE2S_128,
|
||||
GCRY_MD_BLAKE2S_160,
|
||||
GCRY_MD_BLAKE2S_224,
|
||||
GCRY_MD_BLAKE2S_256,
|
||||
#endif
|
||||
#if GCRYPT_VERSION_NUMBER >= 0x010904
|
||||
GCRY_MD_SHA512_224,
|
||||
GCRY_MD_SHA512_256,
|
||||
#endif
|
||||
};
|
||||
|
||||
char *weecrypto_cipher_string[] = {
|
||||
"aes128",
|
||||
"aes192",
|
||||
"aes256",
|
||||
NULL,
|
||||
};
|
||||
int weecrypto_cipher[] = {
|
||||
GCRY_CIPHER_AES128,
|
||||
GCRY_CIPHER_AES192,
|
||||
GCRY_CIPHER_AES256,
|
||||
};
|
||||
|
||||
|
||||
@@ -80,22 +132,53 @@ weecrypto_get_hash_algo (const char *hash_algo)
|
||||
return GCRY_MD_NONE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the cipher with the name, or GCRY_CIPHER_NONE if not found.
|
||||
*/
|
||||
|
||||
int
|
||||
weecrypto_get_cipher (const char *cipher)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!cipher)
|
||||
return GCRY_CIPHER_NONE;
|
||||
|
||||
for (i = 0; weecrypto_cipher_string[i]; i++)
|
||||
{
|
||||
if (strcmp (weecrypto_cipher_string[i], cipher) == 0)
|
||||
return weecrypto_cipher[i];
|
||||
}
|
||||
|
||||
return GCRY_CIPHER_NONE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Computes hash of data using the given hash algorithm.
|
||||
*
|
||||
* The hash size depends on the algorithm, common ones are:
|
||||
*
|
||||
* GCRY_MD_CRC32 32 bits == 4 bytes
|
||||
* GCRY_MD_MD5 128 bits == 16 bytes
|
||||
* GCRY_MD_SHA1 160 bits == 20 bytes
|
||||
* GCRY_MD_SHA224 224 bits == 28 bytes
|
||||
* GCRY_MD_SHA256 256 bits == 32 bytes
|
||||
* GCRY_MD_SHA384 384 bits == 48 bytes
|
||||
* GCRY_MD_SHA512 512 bits == 64 bytes
|
||||
* GCRY_MD_SHA3_224 224 bits == 28 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_SHA3_256 256 bits == 32 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_SHA3_384 384 bits == 48 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_SHA3_512 512 bits == 64 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_CRC32 32 bits == 4 bytes
|
||||
* GCRY_MD_MD5 128 bits == 16 bytes
|
||||
* GCRY_MD_SHA1 160 bits == 20 bytes
|
||||
* GCRY_MD_SHA224 224 bits == 28 bytes
|
||||
* GCRY_MD_SHA256 256 bits == 32 bytes
|
||||
* GCRY_MD_SHA384 384 bits == 48 bytes
|
||||
* GCRY_MD_SHA512 512 bits == 64 bytes
|
||||
* GCRY_MD_SHA512_256 256 bits == 32 bytes (libgcrypt ≥ 1.9.4)
|
||||
* GCRY_MD_SHA512_224 224 bits == 28 bytes (libgcrypt ≥ 1.9.4)
|
||||
* GCRY_MD_SHA3_224 224 bits == 28 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_SHA3_256 256 bits == 32 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_SHA3_384 384 bits == 48 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_SHA3_512 512 bits == 64 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_BLAKE2B_160 160 bits == 20 bytes (libgcrypt ≥ 1.8.0)
|
||||
* GCRY_MD_BLAKE2B_256 256 bits == 32 bytes (libgcrypt ≥ 1.8.0)
|
||||
* GCRY_MD_BLAKE2B_384 384 bits == 48 bytes (libgcrypt ≥ 1.8.0)
|
||||
* GCRY_MD_BLAKE2B_512 512 bits == 64 bytes (libgcrypt ≥ 1.8.0)
|
||||
* GCRY_MD_BLAKE2S_128 128 bits == 16 bytes (libgcrypt ≥ 1.8.0)
|
||||
* GCRY_MD_BLAKE2S_160 160 bits == 20 bytes (libgcrypt ≥ 1.8.0)
|
||||
* GCRY_MD_BLAKE2S_224 224 bits == 28 bytes (libgcrypt ≥ 1.8.0)
|
||||
* GCRY_MD_BLAKE2S_256 256 bits == 32 bytes (libgcrypt ≥ 1.8.0)
|
||||
*
|
||||
* The result hash is stored in "hash" (the buffer must be large enough).
|
||||
*
|
||||
@@ -165,17 +248,27 @@ hash_end:
|
||||
*
|
||||
* The hash size depends on the algorithm, common ones are:
|
||||
*
|
||||
* GCRY_MD_CRC32 32 bits == 4 bytes
|
||||
* GCRY_MD_MD5 128 bits == 16 bytes
|
||||
* GCRY_MD_SHA1 160 bits == 20 bytes
|
||||
* GCRY_MD_SHA224 224 bits == 28 bytes
|
||||
* GCRY_MD_SHA256 256 bits == 32 bytes
|
||||
* GCRY_MD_SHA384 384 bits == 48 bytes
|
||||
* GCRY_MD_SHA512 512 bits == 64 bytes
|
||||
* GCRY_MD_SHA3_224 224 bits == 28 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_SHA3_256 256 bits == 32 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_SHA3_384 384 bits == 48 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_SHA3_512 512 bits == 64 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_CRC32 32 bits == 4 bytes
|
||||
* GCRY_MD_MD5 128 bits == 16 bytes
|
||||
* GCRY_MD_SHA1 160 bits == 20 bytes
|
||||
* GCRY_MD_SHA224 224 bits == 28 bytes
|
||||
* GCRY_MD_SHA256 256 bits == 32 bytes
|
||||
* GCRY_MD_SHA384 384 bits == 48 bytes
|
||||
* GCRY_MD_SHA512 512 bits == 64 bytes
|
||||
* GCRY_MD_SHA512_224 224 bits == 28 bytes (libgcrypt ≥ 1.9.4)
|
||||
* GCRY_MD_SHA512_256 256 bits == 32 bytes (libgcrypt ≥ 1.9.4)
|
||||
* GCRY_MD_SHA3_224 224 bits == 28 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_SHA3_256 256 bits == 32 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_SHA3_384 384 bits == 48 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_SHA3_512 512 bits == 64 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_BLAKE2B_160 160 bits == 20 bytes (libgcrypt ≥ 1.8.0)
|
||||
* GCRY_MD_BLAKE2B_256 256 bits == 32 bytes (libgcrypt ≥ 1.8.0)
|
||||
* GCRY_MD_BLAKE2B_384 384 bits == 48 bytes (libgcrypt ≥ 1.8.0)
|
||||
* GCRY_MD_BLAKE2B_512 512 bits == 64 bytes (libgcrypt ≥ 1.8.0)
|
||||
* GCRY_MD_BLAKE2S_128 128 bits == 16 bytes (libgcrypt ≥ 1.8.0)
|
||||
* GCRY_MD_BLAKE2S_160 160 bits == 20 bytes (libgcrypt ≥ 1.8.0)
|
||||
* GCRY_MD_BLAKE2S_224 224 bits == 28 bytes (libgcrypt ≥ 1.8.0)
|
||||
* GCRY_MD_BLAKE2S_256 256 bits == 32 bytes (libgcrypt ≥ 1.8.0)
|
||||
*
|
||||
* The result hash is stored in "hash" (the buffer must be large enough).
|
||||
*
|
||||
@@ -322,17 +415,27 @@ hash_pbkdf2_end:
|
||||
*
|
||||
* The hash size depends on the algorithm, common ones are:
|
||||
*
|
||||
* GCRY_MD_CRC32 32 bits == 4 bytes
|
||||
* GCRY_MD_MD5 128 bits == 16 bytes
|
||||
* GCRY_MD_SHA1 160 bits == 20 bytes
|
||||
* GCRY_MD_SHA224 224 bits == 28 bytes
|
||||
* GCRY_MD_SHA256 256 bits == 32 bytes
|
||||
* GCRY_MD_SHA384 384 bits == 48 bytes
|
||||
* GCRY_MD_SHA512 512 bits == 64 bytes
|
||||
* GCRY_MD_SHA3_224 224 bits == 28 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_SHA3_256 256 bits == 32 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_SHA3_384 384 bits == 48 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_SHA3_512 512 bits == 64 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_CRC32 32 bits == 4 bytes
|
||||
* GCRY_MD_MD5 128 bits == 16 bytes
|
||||
* GCRY_MD_SHA1 160 bits == 20 bytes
|
||||
* GCRY_MD_SHA224 224 bits == 28 bytes
|
||||
* GCRY_MD_SHA256 256 bits == 32 bytes
|
||||
* GCRY_MD_SHA384 384 bits == 48 bytes
|
||||
* GCRY_MD_SHA512 512 bits == 64 bytes
|
||||
* GCRY_MD_SHA512_224 224 bits == 28 bytes (libgcrypt ≥ 1.9.4)
|
||||
* GCRY_MD_SHA512_256 256 bits == 32 bytes (libgcrypt ≥ 1.9.4)
|
||||
* GCRY_MD_SHA3_224 224 bits == 28 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_SHA3_256 256 bits == 32 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_SHA3_384 384 bits == 48 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_SHA3_512 512 bits == 64 bytes (libgcrypt ≥ 1.7.0)
|
||||
* GCRY_MD_BLAKE2B_160 160 bits == 20 bytes (libgcrypt ≥ 1.8.0)
|
||||
* GCRY_MD_BLAKE2B_256 256 bits == 32 bytes (libgcrypt ≥ 1.8.0)
|
||||
* GCRY_MD_BLAKE2B_384 384 bits == 48 bytes (libgcrypt ≥ 1.8.0)
|
||||
* GCRY_MD_BLAKE2B_512 512 bits == 64 bytes (libgcrypt ≥ 1.8.0)
|
||||
* GCRY_MD_BLAKE2S_128 128 bits == 16 bytes (libgcrypt ≥ 1.8.0)
|
||||
* GCRY_MD_BLAKE2S_160 160 bits == 20 bytes (libgcrypt ≥ 1.8.0)
|
||||
* GCRY_MD_BLAKE2S_224 224 bits == 28 bytes (libgcrypt ≥ 1.8.0)
|
||||
* GCRY_MD_BLAKE2S_256 256 bits == 32 bytes (libgcrypt ≥ 1.8.0)
|
||||
*
|
||||
* The result hash is stored in "hash" (the buffer must be large enough).
|
||||
*
|
||||
@@ -421,6 +524,10 @@ weecrypto_totp_generate_internal (const char *secret, int length_secret,
|
||||
int rc, offset, length;
|
||||
unsigned long bin_code;
|
||||
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
/* Big endian does not need to swap bytes here! */
|
||||
moving_factor_swapped = moving_factor;
|
||||
#else
|
||||
moving_factor_swapped = (moving_factor >> 56)
|
||||
| ((moving_factor << 40) & 0x00FF000000000000)
|
||||
| ((moving_factor << 24) & 0x0000FF0000000000)
|
||||
@@ -429,6 +536,7 @@ weecrypto_totp_generate_internal (const char *secret, int length_secret,
|
||||
| ((moving_factor >> 24) & 0x0000000000FF0000)
|
||||
| ((moving_factor >> 40) & 0x000000000000FF00)
|
||||
| (moving_factor << 56);
|
||||
#endif
|
||||
|
||||
rc = weecrypto_hmac (secret, length_secret,
|
||||
&moving_factor_swapped, sizeof (moving_factor_swapped),
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#define WEECRYPTO_TOTP_MAX_DIGITS 10
|
||||
|
||||
extern int weecrypto_get_hash_algo (const char *hash_algo);
|
||||
extern int weecrypto_get_cipher (const char *cipher);
|
||||
extern int weecrypto_hash (const void *data, int data_size, int hash_algo,
|
||||
void *hash, int *hash_size);
|
||||
extern int weecrypto_hash_file (const char *filename, int hash_algo,
|
||||
|
||||
+17
-10
@@ -33,7 +33,9 @@
|
||||
#include <gcrypt.h>
|
||||
#include <curl/curl.h>
|
||||
#include <zlib.h>
|
||||
#ifdef HAVE_ZSTD
|
||||
#include <zstd.h>
|
||||
#endif
|
||||
|
||||
#include <gnutls/gnutls.h>
|
||||
|
||||
@@ -67,6 +69,9 @@
|
||||
|
||||
int debug_dump_active = 0;
|
||||
|
||||
long long debug_long_callbacks = 0; /* callbacks taking more than */
|
||||
/* N microseconds will be traced */
|
||||
|
||||
|
||||
/*
|
||||
* Writes dump of data to WeeChat log file.
|
||||
@@ -680,11 +685,13 @@ debug_libs_cb (const void *pointer, void *data,
|
||||
gui_chat_printf (NULL, " zlib: (?)");
|
||||
#endif /* ZLIB_VERSION */
|
||||
|
||||
#ifdef HAVE_ZSTD
|
||||
/* display zstd version */
|
||||
gui_chat_printf (NULL, " zstd: %d.%d.%d",
|
||||
ZSTD_VERSION_MAJOR,
|
||||
ZSTD_VERSION_MINOR,
|
||||
ZSTD_VERSION_RELEASE);
|
||||
#endif /* HAVE_ZSTD */
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
@@ -736,29 +743,29 @@ debug_display_time_elapsed (struct timeval *time1, struct timeval *time2,
|
||||
const char *message, int display)
|
||||
{
|
||||
struct timeval debug_timeval_end;
|
||||
long long diff, diff_hour, diff_min, diff_sec, diff_usec;
|
||||
char *str_diff;
|
||||
long long diff;
|
||||
|
||||
gettimeofday (&debug_timeval_end, NULL);
|
||||
diff = util_timeval_diff (time1, time2);
|
||||
|
||||
diff_usec = diff % 1000000;
|
||||
diff_sec = (diff / 1000000) % 60;
|
||||
diff_min = ((diff / 1000000) / 60) % 60;
|
||||
diff_hour = (diff / 1000000) / 3600;
|
||||
str_diff = util_get_microseconds_string (diff);
|
||||
|
||||
if (display)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
"debug: time[%s] -> %lld:%02lld:%02lld.%06lld",
|
||||
"debug: time[%s] -> %s",
|
||||
(message) ? message : "?",
|
||||
diff_hour, diff_min, diff_sec, diff_usec);
|
||||
(str_diff) ? str_diff : "?");
|
||||
}
|
||||
else
|
||||
{
|
||||
log_printf ("debug: time[%s] -> %lld:%02lld:%02lld.%06lld",
|
||||
log_printf ("debug: time[%s] -> %s",
|
||||
(message) ? message : "?",
|
||||
diff_hour, diff_min, diff_sec, diff_usec);
|
||||
(str_diff) ? str_diff : "?");
|
||||
}
|
||||
|
||||
if (str_diff)
|
||||
free (str_diff);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
|
||||
struct t_gui_window_tree;
|
||||
|
||||
extern long long debug_long_callbacks;
|
||||
|
||||
extern void debug_sigsegv_cb ();
|
||||
extern void debug_windows_tree ();
|
||||
extern void debug_memory ();
|
||||
|
||||
+12
-1
@@ -45,7 +45,9 @@
|
||||
#include <dirent.h>
|
||||
#include <ftw.h>
|
||||
#include <zlib.h>
|
||||
#ifdef HAVE_ZSTD
|
||||
#include <zstd.h>
|
||||
#endif
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-config.h"
|
||||
@@ -1135,6 +1137,7 @@ int
|
||||
dir_file_compress_zstd (const char *from, const char *to,
|
||||
int compression_level)
|
||||
{
|
||||
#ifdef HAVE_ZSTD
|
||||
FILE *source, *dest;
|
||||
void *buffer_in, *buffer_out;
|
||||
size_t buffer_in_size, buffer_out_size, num_read, remaining;
|
||||
@@ -1297,6 +1300,14 @@ end:
|
||||
fclose (dest);
|
||||
|
||||
return rc;
|
||||
#else
|
||||
/* make C compiler happy */
|
||||
(void) from;
|
||||
(void) to;
|
||||
(void) compression_level;
|
||||
|
||||
return 0;
|
||||
#endif /* HAVE_ZSTD */
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1306,7 +1317,7 @@ end:
|
||||
*
|
||||
* Supported values for parameter "compressor":
|
||||
* - "gzip": gzip compression (via zlib)
|
||||
* - "zstd": zstandard compression
|
||||
* - "zstd": zstandard compression (it must be enabled at build time)
|
||||
*
|
||||
* Parameter "compression_level" is the compression level as percentage:
|
||||
* from 1 (fast, low compression) to 100 (slow, best compression).
|
||||
|
||||
+120
-90
@@ -30,6 +30,7 @@
|
||||
#include <libintl.h>
|
||||
#include <locale.h>
|
||||
#include <gcrypt.h>
|
||||
#include <regex.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-arraylist.h"
|
||||
@@ -46,7 +47,8 @@
|
||||
#include "wee-utf8.h"
|
||||
#include "../plugins/plugin.h"
|
||||
|
||||
#define ESCAPE(msg) (doc_gen_escape (msg))
|
||||
#define ESCAPE_TABLE(msg) (doc_gen_escape_table (msg))
|
||||
#define ESCAPE_ANCHOR(msg) (doc_gen_escape_anchor_link (msg))
|
||||
#define TRANS(msg) ((msg && msg[0]) ? _(msg) : msg)
|
||||
#define TRANS_DEF(msg, def) ((msg && msg[0]) ? _(msg) : def)
|
||||
#define PLUGIN(plugin) ((plugin) ? plugin->name : "weechat")
|
||||
@@ -62,7 +64,7 @@ char *string_escaped[32];
|
||||
*/
|
||||
|
||||
char *
|
||||
doc_gen_escape (const char *message)
|
||||
doc_gen_escape_table (const char *message)
|
||||
{
|
||||
index_string_escaped = (index_string_escaped + 1) % 32;
|
||||
|
||||
@@ -74,6 +76,31 @@ doc_gen_escape (const char *message)
|
||||
return string_escaped[index_string_escaped];
|
||||
}
|
||||
|
||||
/*
|
||||
* Escapes a string to be used as anchor link: replace ",", "@" and "*" by "-".
|
||||
*/
|
||||
|
||||
char *
|
||||
doc_gen_escape_anchor_link (const char *message)
|
||||
{
|
||||
regex_t regex;
|
||||
|
||||
if (string_regcomp (®ex, "[,@*():&|]+", REG_EXTENDED) != 0)
|
||||
return NULL;
|
||||
|
||||
index_string_escaped = (index_string_escaped + 1) % 32;
|
||||
|
||||
if (string_escaped[index_string_escaped])
|
||||
free (string_escaped[index_string_escaped]);
|
||||
|
||||
string_escaped[index_string_escaped] = string_replace_regex (
|
||||
message, ®ex, "-", '$', NULL, NULL);
|
||||
|
||||
regfree (®ex);
|
||||
|
||||
return string_escaped[index_string_escaped];
|
||||
}
|
||||
|
||||
/*
|
||||
* Opens a file for write using:
|
||||
* - path
|
||||
@@ -99,7 +126,7 @@ doc_gen_open_file (const char *path, const char *doc, const char *name,
|
||||
if (!file)
|
||||
{
|
||||
string_fprintf (stderr,
|
||||
"doc generator: ERROR: unable to write file \"%s\"",
|
||||
"doc generator: ERROR: unable to write file \"%s\"\n",
|
||||
filename);
|
||||
return NULL;
|
||||
}
|
||||
@@ -117,7 +144,7 @@ doc_gen_open_file (const char *path, const char *doc, const char *name,
|
||||
|
||||
/*
|
||||
* Closes the file and renames it without ".temp" suffix, if the target name
|
||||
* does not exist of if it exists with a different (obsolete) content.
|
||||
* does not exist or if it exists with a different (obsolete) content.
|
||||
*
|
||||
* If the target name exists with same content it's kept as-is (so the
|
||||
* timestamp does not change) and the temporary file is just deleted.
|
||||
@@ -290,7 +317,7 @@ doc_gen_user_commands (const char *path, const char *lang)
|
||||
HOOK_COMMAND(ptr_hook, command),
|
||||
TRANS(HOOK_COMMAND(ptr_hook, description)));
|
||||
|
||||
length = 1 + utf8_strlen (HOOK_COMMAND(ptr_hook, command)) + 2;
|
||||
length = 1 + utf8_strlen_screen (HOOK_COMMAND(ptr_hook, command)) + 2;
|
||||
snprintf (format, sizeof (format), "%%-%ds%%s\n", length);
|
||||
ptr_args = TRANS(HOOK_COMMAND(ptr_hook, args));
|
||||
first_line = 1;
|
||||
@@ -435,7 +462,7 @@ doc_gen_user_options (const char *path, const char *lang)
|
||||
struct t_config_option *ptr_option;
|
||||
struct t_arraylist *list_options;
|
||||
int i, list_size, index_option;
|
||||
char *name_escaped, *desc_escaped, *values, str_values[256];
|
||||
char *desc_escaped, *values, str_values[256];
|
||||
char *default_value, *tmp;
|
||||
|
||||
file = doc_gen_open_file (path, "user", "options", lang);
|
||||
@@ -489,15 +516,14 @@ doc_gen_user_options (const char *path, const char *lang)
|
||||
}
|
||||
if (index_option > 0)
|
||||
string_fprintf (file, "\n");
|
||||
name_escaped = string_replace (ptr_option->name, ",", "_");
|
||||
desc_escaped = (ptr_option->description) ?
|
||||
string_replace (TRANS(ptr_option->description), "]", "\\]") :
|
||||
strdup ("");
|
||||
string_fprintf (file,
|
||||
"* [[option_%s.%s.%s]] *%s.%s.%s*\n",
|
||||
"* [[option_%s.%s.%s]] *pass:none[%s.%s.%s]*\n",
|
||||
ptr_option->config_file->name,
|
||||
ptr_option->section->name,
|
||||
name_escaped,
|
||||
ESCAPE_ANCHOR(ptr_option->name),
|
||||
ptr_option->config_file->name,
|
||||
ptr_option->section->name,
|
||||
ptr_option->name);
|
||||
@@ -515,19 +541,11 @@ doc_gen_user_options (const char *path, const char *lang)
|
||||
values = strdup ("on, off");
|
||||
break;
|
||||
case CONFIG_OPTION_TYPE_INTEGER:
|
||||
if (ptr_option->string_values)
|
||||
{
|
||||
values = string_rebuild_split_string (
|
||||
(const char **)ptr_option->string_values, ", ", 0, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf (str_values, sizeof (str_values),
|
||||
"%d .. %d",
|
||||
ptr_option->min,
|
||||
ptr_option->max);
|
||||
values = strdup (str_values);
|
||||
}
|
||||
snprintf (str_values, sizeof (str_values),
|
||||
"%d .. %d",
|
||||
ptr_option->min,
|
||||
ptr_option->max);
|
||||
values = strdup (str_values);
|
||||
break;
|
||||
case CONFIG_OPTION_TYPE_STRING:
|
||||
if (ptr_option->max <= 0)
|
||||
@@ -547,6 +565,10 @@ doc_gen_user_options (const char *path, const char *lang)
|
||||
case CONFIG_OPTION_TYPE_COLOR:
|
||||
values = strdup (command_help_option_color_values ());
|
||||
break;
|
||||
case CONFIG_OPTION_TYPE_ENUM:
|
||||
values = string_rebuild_split_string (
|
||||
(const char **)ptr_option->string_values, ", ", 0, -1);
|
||||
break;
|
||||
default:
|
||||
values = NULL;
|
||||
break;
|
||||
@@ -568,8 +590,6 @@ doc_gen_user_options (const char *path, const char *lang)
|
||||
(ptr_option->type == CONFIG_OPTION_TYPE_STRING) ? "\"" : "",
|
||||
default_value,
|
||||
(ptr_option->type == CONFIG_OPTION_TYPE_STRING) ? "\"" : "");
|
||||
if (name_escaped)
|
||||
free (name_escaped);
|
||||
if (desc_escaped)
|
||||
free (desc_escaped);
|
||||
if (values)
|
||||
@@ -614,9 +634,9 @@ doc_gen_user_default_aliases (const char *path, const char *lang)
|
||||
"[width=\"100%\",cols=\"2m,5m,5\",options=\"header\"]\n"
|
||||
"|===\n"
|
||||
"| %s | %s | %s\n",
|
||||
ESCAPE(_("Alias")),
|
||||
ESCAPE(_("Command")),
|
||||
ESCAPE(_("Completion")));
|
||||
ESCAPE_TABLE(_("Alias")),
|
||||
ESCAPE_TABLE(_("Command")),
|
||||
ESCAPE_TABLE(_("Completion")));
|
||||
|
||||
ptr_infolist = hook_infolist_get (NULL, "alias_default", NULL, NULL);
|
||||
while (infolist_next (ptr_infolist))
|
||||
@@ -624,10 +644,10 @@ doc_gen_user_default_aliases (const char *path, const char *lang)
|
||||
ptr_completion = infolist_string(ptr_infolist, "completion");
|
||||
string_fprintf (file,
|
||||
"| /%s | /%s | %s\n",
|
||||
ESCAPE(infolist_string(ptr_infolist, "name")),
|
||||
ESCAPE(infolist_string(ptr_infolist, "command")),
|
||||
ESCAPE_TABLE(infolist_string(ptr_infolist, "name")),
|
||||
ESCAPE_TABLE(infolist_string(ptr_infolist, "command")),
|
||||
(ptr_completion && ptr_completion[0]) ?
|
||||
ESCAPE(ptr_completion) : "-");
|
||||
ESCAPE_TABLE(ptr_completion) : "-");
|
||||
}
|
||||
infolist_free (ptr_infolist);
|
||||
|
||||
@@ -663,8 +683,8 @@ doc_gen_user_irc_colors (const char *path, const char *lang)
|
||||
"[width=\"50%\",cols=\"^2m,3\",options=\"header\"]\n"
|
||||
"|===\n"
|
||||
"| %s | %s\n",
|
||||
ESCAPE(_("IRC color")),
|
||||
ESCAPE(_("WeeChat color")));
|
||||
ESCAPE_TABLE(_("IRC color")),
|
||||
ESCAPE_TABLE(_("WeeChat color")));
|
||||
|
||||
ptr_infolist = hook_infolist_get (NULL, "irc_color_weechat", NULL, NULL);
|
||||
while (infolist_next (ptr_infolist))
|
||||
@@ -672,8 +692,8 @@ doc_gen_user_irc_colors (const char *path, const char *lang)
|
||||
string_fprintf (
|
||||
file,
|
||||
"| %s | %s\n",
|
||||
ESCAPE(infolist_string(ptr_infolist, "color_irc")),
|
||||
ESCAPE(infolist_string(ptr_infolist, "color_weechat")));
|
||||
ESCAPE_TABLE(infolist_string(ptr_infolist, "color_irc")),
|
||||
ESCAPE_TABLE(infolist_string(ptr_infolist, "color_weechat")));
|
||||
}
|
||||
infolist_free (ptr_infolist);
|
||||
|
||||
@@ -737,10 +757,10 @@ doc_gen_api_infos (const char *path, const char *lang)
|
||||
"[width=\"100%\",cols=\"^1,^2,6,6\",options=\"header\"]\n"
|
||||
"|===\n"
|
||||
"| %s | %s | %s | %s\n",
|
||||
ESCAPE(_("Plugin")),
|
||||
ESCAPE(_("Name")),
|
||||
ESCAPE(_("Description")),
|
||||
ESCAPE(_("Arguments")));
|
||||
ESCAPE_TABLE(_("Plugin")),
|
||||
ESCAPE_TABLE(_("Name")),
|
||||
ESCAPE_TABLE(_("Description")),
|
||||
ESCAPE_TABLE(_("Arguments")));
|
||||
|
||||
list_hooks = arraylist_new (64, 1, 0,
|
||||
&doc_gen_hook_info_cmp_cb, NULL,
|
||||
@@ -758,10 +778,10 @@ doc_gen_api_infos (const char *path, const char *lang)
|
||||
string_fprintf (
|
||||
file,
|
||||
"| %s | %s | %s | %s\n",
|
||||
ESCAPE(PLUGIN(ptr_hook->plugin)),
|
||||
ESCAPE(HOOK_INFO(ptr_hook, info_name)),
|
||||
ESCAPE(TRANS(HOOK_INFO(ptr_hook, description))),
|
||||
ESCAPE(TRANS_DEF(HOOK_INFO(ptr_hook, args_description), "-")));
|
||||
ESCAPE_TABLE(PLUGIN(ptr_hook->plugin)),
|
||||
ESCAPE_TABLE(HOOK_INFO(ptr_hook, info_name)),
|
||||
ESCAPE_TABLE(TRANS(HOOK_INFO(ptr_hook, description))),
|
||||
ESCAPE_TABLE(TRANS_DEF(HOOK_INFO(ptr_hook, args_description), "-")));
|
||||
}
|
||||
|
||||
arraylist_free (list_hooks);
|
||||
@@ -826,11 +846,11 @@ doc_gen_api_infos_hashtable (const char *path, const char *lang)
|
||||
"[width=\"100%\",cols=\"^1,^2,6,6,8\",options=\"header\"]\n"
|
||||
"|===\n"
|
||||
"| %s | %s | %s | %s | %s\n",
|
||||
ESCAPE(_("Plugin")),
|
||||
ESCAPE(_("Name")),
|
||||
ESCAPE(_("Description")),
|
||||
ESCAPE(_("Hashtable (input)")),
|
||||
ESCAPE(_("Hashtable (output)")));
|
||||
ESCAPE_TABLE(_("Plugin")),
|
||||
ESCAPE_TABLE(_("Name")),
|
||||
ESCAPE_TABLE(_("Description")),
|
||||
ESCAPE_TABLE(_("Hashtable (input)")),
|
||||
ESCAPE_TABLE(_("Hashtable (output)")));
|
||||
|
||||
list_hooks = arraylist_new (64, 1, 0,
|
||||
&doc_gen_hook_info_hashtable_cmp_cb, NULL,
|
||||
@@ -848,10 +868,10 @@ doc_gen_api_infos_hashtable (const char *path, const char *lang)
|
||||
string_fprintf (
|
||||
file,
|
||||
"| %s | %s | %s | %s | %s\n",
|
||||
ESCAPE(PLUGIN(ptr_hook->plugin)),
|
||||
ESCAPE(HOOK_INFO(ptr_hook, info_name)),
|
||||
ESCAPE(TRANS(HOOK_INFO_HASHTABLE(ptr_hook, description))),
|
||||
ESCAPE(TRANS_DEF(HOOK_INFO_HASHTABLE(ptr_hook, args_description), "-")),
|
||||
ESCAPE_TABLE(PLUGIN(ptr_hook->plugin)),
|
||||
ESCAPE_TABLE(HOOK_INFO(ptr_hook, info_name)),
|
||||
ESCAPE_TABLE(TRANS(HOOK_INFO_HASHTABLE(ptr_hook, description))),
|
||||
ESCAPE_TABLE(TRANS_DEF(HOOK_INFO_HASHTABLE(ptr_hook, args_description), "-")),
|
||||
TRANS_DEF(HOOK_INFO_HASHTABLE(ptr_hook, output_description), "-"));
|
||||
}
|
||||
|
||||
@@ -917,11 +937,11 @@ doc_gen_api_infolists (const char *path, const char *lang)
|
||||
"[width=\"100%\",cols=\"^1,^2,5,5,5\",options=\"header\"]\n"
|
||||
"|===\n"
|
||||
"| %s | %s | %s | %s | %s\n",
|
||||
ESCAPE(_("Plugin")),
|
||||
ESCAPE(_("Name")),
|
||||
ESCAPE(_("Description")),
|
||||
ESCAPE(_("Pointer")),
|
||||
ESCAPE(_("Arguments")));
|
||||
ESCAPE_TABLE(_("Plugin")),
|
||||
ESCAPE_TABLE(_("Name")),
|
||||
ESCAPE_TABLE(_("Description")),
|
||||
ESCAPE_TABLE(_("Pointer")),
|
||||
ESCAPE_TABLE(_("Arguments")));
|
||||
|
||||
list_hooks = arraylist_new (64, 1, 0,
|
||||
&doc_gen_hook_infolist_cmp_cb, NULL,
|
||||
@@ -939,11 +959,11 @@ doc_gen_api_infolists (const char *path, const char *lang)
|
||||
string_fprintf (
|
||||
file,
|
||||
"| %s | %s | %s | %s | %s\n",
|
||||
ESCAPE(PLUGIN(ptr_hook->plugin)),
|
||||
ESCAPE(HOOK_INFOLIST(ptr_hook, infolist_name)),
|
||||
ESCAPE(TRANS(HOOK_INFOLIST(ptr_hook, description))),
|
||||
ESCAPE(TRANS_DEF(HOOK_INFOLIST(ptr_hook, pointer_description), "-")),
|
||||
ESCAPE(TRANS_DEF(HOOK_INFOLIST(ptr_hook, args_description), "-")));
|
||||
ESCAPE_TABLE(PLUGIN(ptr_hook->plugin)),
|
||||
ESCAPE_TABLE(HOOK_INFOLIST(ptr_hook, infolist_name)),
|
||||
ESCAPE_TABLE(TRANS(HOOK_INFOLIST(ptr_hook, description))),
|
||||
ESCAPE_TABLE(TRANS_DEF(HOOK_INFOLIST(ptr_hook, pointer_description), "-")),
|
||||
ESCAPE_TABLE(TRANS_DEF(HOOK_INFOLIST(ptr_hook, args_description), "-")));
|
||||
}
|
||||
|
||||
arraylist_free (list_hooks);
|
||||
@@ -1203,11 +1223,11 @@ doc_gen_api_hdata (const char *path, const char *lang)
|
||||
"[width=\"100%\",cols=\"^1,^2,2,2,5\",options=\"header\"]\n"
|
||||
"|===\n"
|
||||
"| %s | %s | %s | %s | %s\n\n",
|
||||
ESCAPE(_("Plugin")),
|
||||
ESCAPE(_("Name")),
|
||||
ESCAPE(_("Description")),
|
||||
ESCAPE(_("Lists")),
|
||||
ESCAPE(_("Variables")));
|
||||
ESCAPE_TABLE(_("Plugin")),
|
||||
ESCAPE_TABLE(_("Name")),
|
||||
ESCAPE_TABLE(_("Description")),
|
||||
ESCAPE_TABLE(_("Lists")),
|
||||
ESCAPE_TABLE(_("Variables")));
|
||||
|
||||
list_hooks = arraylist_new (64, 1, 0,
|
||||
&doc_gen_hook_hdata_cmp_cb, NULL,
|
||||
@@ -1227,15 +1247,15 @@ doc_gen_api_hdata (const char *path, const char *lang)
|
||||
HOOK_HDATA(ptr_hook, hdata_name));
|
||||
string_fprintf (file,
|
||||
"| %s\n",
|
||||
ESCAPE(PLUGIN(ptr_hook->plugin)));
|
||||
ESCAPE_TABLE(PLUGIN(ptr_hook->plugin)));
|
||||
string_fprintf (file,
|
||||
"| [[%s]]<<%s,%s>>\n",
|
||||
ESCAPE(str_anchor),
|
||||
ESCAPE(str_anchor),
|
||||
ESCAPE(HOOK_HDATA(ptr_hook, hdata_name)));
|
||||
ESCAPE_TABLE(str_anchor),
|
||||
ESCAPE_TABLE(str_anchor),
|
||||
ESCAPE_TABLE(HOOK_HDATA(ptr_hook, hdata_name)));
|
||||
string_fprintf (file,
|
||||
"| %s\n",
|
||||
ESCAPE(TRANS(HOOK_HDATA(ptr_hook, description))));
|
||||
ESCAPE_TABLE(TRANS(HOOK_HDATA(ptr_hook, description))));
|
||||
ptr_hdata = hook_hdata_get (NULL, HOOK_HDATA(ptr_hook, hdata_name));
|
||||
if (ptr_hdata)
|
||||
doc_gen_api_hdata_content (file, ptr_hdata);
|
||||
@@ -1303,9 +1323,9 @@ doc_gen_api_completions (const char *path, const char *lang)
|
||||
"[width=\"100%\",cols=\"^1,^2,7\",options=\"header\"]\n"
|
||||
"|===\n"
|
||||
"| %s | %s | %s\n",
|
||||
ESCAPE(_("Plugin")),
|
||||
ESCAPE(_("Name")),
|
||||
ESCAPE(_("Description")));
|
||||
ESCAPE_TABLE(_("Plugin")),
|
||||
ESCAPE_TABLE(_("Name")),
|
||||
ESCAPE_TABLE(_("Description")));
|
||||
|
||||
list_hooks = arraylist_new (64, 1, 0,
|
||||
&doc_gen_hook_completion_cmp_cb, NULL,
|
||||
@@ -1323,9 +1343,9 @@ doc_gen_api_completions (const char *path, const char *lang)
|
||||
string_fprintf (
|
||||
file,
|
||||
"| %s | %s | %s\n",
|
||||
ESCAPE(PLUGIN(ptr_hook->plugin)),
|
||||
ESCAPE(HOOK_COMPLETION(ptr_hook, completion_item)),
|
||||
ESCAPE(TRANS(HOOK_COMPLETION(ptr_hook, description))));
|
||||
ESCAPE_TABLE(PLUGIN(ptr_hook->plugin)),
|
||||
ESCAPE_TABLE(HOOK_COMPLETION(ptr_hook, completion_item)),
|
||||
ESCAPE_TABLE(TRANS(HOOK_COMPLETION(ptr_hook, description))));
|
||||
}
|
||||
|
||||
arraylist_free (list_hooks);
|
||||
@@ -1363,9 +1383,9 @@ doc_gen_api_url_options (const char *path, const char *lang)
|
||||
"[width=\"100%\",cols=\"2,^1,7\",options=\"header\"]\n"
|
||||
"|===\n"
|
||||
"| %s | %s ^(1)^ | %s ^(2)^\n",
|
||||
ESCAPE(_("Option")),
|
||||
ESCAPE(_("Type")),
|
||||
ESCAPE(_("Constants")));
|
||||
ESCAPE_TABLE(_("Option")),
|
||||
ESCAPE_TABLE(_("Type")),
|
||||
ESCAPE_TABLE(_("Constants")));
|
||||
|
||||
for (i = 0; url_options[i].name; i++)
|
||||
{
|
||||
@@ -1373,8 +1393,8 @@ doc_gen_api_url_options (const char *path, const char *lang)
|
||||
string_fprintf (
|
||||
file,
|
||||
"| %s | %s |",
|
||||
ESCAPE(name),
|
||||
ESCAPE(url_type_string[url_options[i].type]));
|
||||
ESCAPE_TABLE(name),
|
||||
ESCAPE_TABLE(url_type_string[url_options[i].type]));
|
||||
if (name)
|
||||
free (name);
|
||||
if (url_options[i].constants)
|
||||
@@ -1450,9 +1470,9 @@ doc_gen_api_plugins_priority (const char *path, const char *lang)
|
||||
"[width=\"30%\",cols=\"1,3,2\",options=\"header\"]\n"
|
||||
"|===\n"
|
||||
"| %s | %s | %s\n",
|
||||
ESCAPE(_("Rank")),
|
||||
ESCAPE(_("Plugin")),
|
||||
ESCAPE(_("Priority")));
|
||||
ESCAPE_TABLE(_("Rank")),
|
||||
ESCAPE_TABLE(_("Plugin")),
|
||||
ESCAPE_TABLE(_("Priority")));
|
||||
|
||||
list_plugins = arraylist_new (64, 1, 0,
|
||||
&doc_gen_plugin_cmp_cb, NULL,
|
||||
@@ -1536,9 +1556,9 @@ doc_gen_api_config_priority (const char *path, const char *lang)
|
||||
"[width=\"30%\",cols=\"1,3,2\",options=\"header\"]\n"
|
||||
"|===\n"
|
||||
"| %s | %s | %s\n",
|
||||
ESCAPE(_("Rank")),
|
||||
ESCAPE(_("File")),
|
||||
ESCAPE(_("Priority")));
|
||||
ESCAPE_TABLE(_("Rank")),
|
||||
ESCAPE_TABLE(_("File")),
|
||||
ESCAPE_TABLE(_("Priority")));
|
||||
|
||||
list_configs = arraylist_new (64, 1, 0,
|
||||
&doc_gen_config_cmp_cb, NULL,
|
||||
@@ -1628,7 +1648,7 @@ doc_generate (const char *path)
|
||||
{
|
||||
string_fprintf (
|
||||
stderr,
|
||||
"doc generator: ERROR: failed to create directory \"%s\")",
|
||||
"doc generator: ERROR: failed to create directory \"%s\")\n",
|
||||
path);
|
||||
goto end;
|
||||
}
|
||||
@@ -1645,7 +1665,17 @@ doc_generate (const char *path)
|
||||
for (i = 0; locales[i]; i++)
|
||||
{
|
||||
setenv ("LANGUAGE", locales[i], 1);
|
||||
setlocale (LC_ALL, locales[i]);
|
||||
if (!setlocale (LC_ALL, locales[i]))
|
||||
{
|
||||
/* warning on missing locale */
|
||||
string_fprintf (
|
||||
stderr,
|
||||
"doc generator: WARNING: failed to set locale \"%s\", "
|
||||
"docs will include auto-generated English content\n",
|
||||
locales[i]);
|
||||
/* fallback to English */
|
||||
setlocale (LC_ALL, "C");
|
||||
}
|
||||
memcpy (lang, locales[i], 2);
|
||||
lang[2] = '\0';
|
||||
for (j = 0; doc_gen_functions[j]; j++)
|
||||
|
||||
+13
-15
@@ -1167,7 +1167,7 @@ char *
|
||||
eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path,
|
||||
struct t_eval_context *eval_context)
|
||||
{
|
||||
char *value, *old_value, *var_name, str_value[128], *pos, *property;
|
||||
char *value, *var_name, str_value[128], *pos, *property;
|
||||
const char *ptr_value, *hdata_name, *ptr_var_name, *pos_open_paren;
|
||||
int type, debug_id;
|
||||
struct t_hashtable *hashtable;
|
||||
@@ -1272,7 +1272,8 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path,
|
||||
property = string_strndup (pos + 1,
|
||||
pos_open_paren - pos - 1);
|
||||
ptr_value = hashtable_get_string (hashtable, property);
|
||||
free (property);
|
||||
if (property)
|
||||
free (property);
|
||||
value = (ptr_value) ? strdup (ptr_value) : NULL;
|
||||
break;
|
||||
}
|
||||
@@ -1326,13 +1327,12 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path,
|
||||
goto end;
|
||||
|
||||
hdata = hook_hdata_get (NULL, hdata_name);
|
||||
old_value = value;
|
||||
if (value)
|
||||
free (value);
|
||||
value = eval_hdata_get_value (hdata,
|
||||
pointer,
|
||||
(pos) ? pos + 1 : NULL,
|
||||
pos + 1,
|
||||
eval_context);
|
||||
if (old_value)
|
||||
free (old_value);
|
||||
}
|
||||
|
||||
end:
|
||||
@@ -1463,7 +1463,7 @@ end:
|
||||
* - a string to evaluate (format: eval:xxx)
|
||||
* - a condition to evaluate (format: eval_cond:xxx)
|
||||
* - a string with escaped chars (format: esc:xxx or \xxx)
|
||||
* - a string with a range of chars (format: chars:xxx)
|
||||
* - a string with a range of chars (format: chars:range)
|
||||
* - a string converted to lower case (format: lower:xxx)
|
||||
* - a string converted to upper case (format: upper:xxx)
|
||||
* - a string with chars to hide (format: hide:char,string)
|
||||
@@ -1478,15 +1478,15 @@ end:
|
||||
* - split string (format: split:number,separators,flags,xxx
|
||||
* or split:count,separators,flags,xxx
|
||||
* or split:random,separators,flags,xxx)
|
||||
* - split shell arguments (format: split:number,xxx or split:count,xxx
|
||||
* or split:random,xxx)
|
||||
* - split shell arguments (format: split_shell:number,xxx or
|
||||
* split_shell:count,xxx or split_shell:random,xxx)
|
||||
* - a regex group captured (format: re:N (0.99) or re:+)
|
||||
* - a color (format: color:xxx)
|
||||
* - a modifier (format: modifier:name,data,xxx)
|
||||
* - an info (format: info:name,arguments)
|
||||
* - a base 16/32/64 encoded/decoded string (format: base_encode:base,xxx
|
||||
* or base_decode:base,xxx)
|
||||
* - current date/time (format: date or date:xxx)
|
||||
* - current date/time (format: date or date:format)
|
||||
* - an environment variable (format: env:XXX)
|
||||
* - a ternary operator (format: if:condition?value_if_true:value_if_false)
|
||||
* - calculate result of an expression (format: calc:xxx)
|
||||
@@ -1832,11 +1832,6 @@ eval_replace_vars_cb (void *data, const char *text)
|
||||
EVAL_STR_TRUE : EVAL_STR_FALSE);
|
||||
goto end;
|
||||
case CONFIG_OPTION_TYPE_INTEGER:
|
||||
if (ptr_option->string_values)
|
||||
{
|
||||
value = strdup (ptr_option->string_values[CONFIG_INTEGER(ptr_option)]);
|
||||
goto end;
|
||||
}
|
||||
snprintf (str_value, sizeof (str_value),
|
||||
"%d", CONFIG_INTEGER(ptr_option));
|
||||
value = strdup (str_value);
|
||||
@@ -1847,6 +1842,9 @@ eval_replace_vars_cb (void *data, const char *text)
|
||||
case CONFIG_OPTION_TYPE_COLOR:
|
||||
value = strdup (gui_color_get_name (CONFIG_COLOR(ptr_option)));
|
||||
goto end;
|
||||
case CONFIG_OPTION_TYPE_ENUM:
|
||||
value = strdup (ptr_option->string_values[CONFIG_ENUM(ptr_option)]);
|
||||
goto end;
|
||||
case CONFIG_NUM_OPTION_TYPES:
|
||||
value = strdup ("");
|
||||
goto end;
|
||||
|
||||
+139
-19
@@ -28,6 +28,7 @@
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-hdata.h"
|
||||
#include "wee-hook.h"
|
||||
#include "wee-eval.h"
|
||||
#include "wee-hashtable.h"
|
||||
#include "wee-log.h"
|
||||
@@ -955,12 +956,14 @@ int
|
||||
hdata_compare (struct t_hdata *hdata, void *pointer1, void *pointer2,
|
||||
const char *name, int case_sensitive)
|
||||
{
|
||||
int rc, int_value1, int_value2;
|
||||
int rc, type, type1, type2, int_value1, int_value2;
|
||||
long long_value1, long_value2;
|
||||
char char_value1, char_value2;
|
||||
const char *ptr_name, *str_value1, *str_value2;
|
||||
char *var_name, *property, char_value1, char_value2;
|
||||
const char *ptr_var_name, *pos, *pos_open_paren, *hdata_name;
|
||||
const char *str_value1, *str_value2;
|
||||
void *ptr_value1, *ptr_value2;
|
||||
time_t time_value1, time_value2;
|
||||
struct t_hashtable *hashtable1, *hashtable2;
|
||||
|
||||
if (!hdata || !name)
|
||||
return 0;
|
||||
@@ -973,32 +976,47 @@ hdata_compare (struct t_hdata *hdata, void *pointer1, void *pointer2,
|
||||
return 0;
|
||||
|
||||
rc = 0;
|
||||
ptr_value1 = NULL;
|
||||
ptr_value2 = NULL;
|
||||
|
||||
hdata_get_index_and_name (name, NULL, &ptr_name);
|
||||
switch (hdata_get_var_type (hdata, ptr_name))
|
||||
pos = strchr (name, '.');
|
||||
if (pos > name)
|
||||
var_name = string_strndup (name, pos - name);
|
||||
else
|
||||
var_name = strdup (name);
|
||||
|
||||
if (!var_name)
|
||||
goto end;
|
||||
|
||||
hdata_get_index_and_name (var_name, NULL, &ptr_var_name);
|
||||
type = hdata_get_var_type (hdata, ptr_var_name);
|
||||
if (type < 0)
|
||||
goto end;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case WEECHAT_HDATA_CHAR:
|
||||
char_value1 = hdata_char (hdata, pointer1, name);
|
||||
char_value2 = hdata_char (hdata, pointer2, name);
|
||||
char_value1 = hdata_char (hdata, pointer1, var_name);
|
||||
char_value2 = hdata_char (hdata, pointer2, var_name);
|
||||
rc = (char_value1 < char_value2) ?
|
||||
-1 : ((char_value1 > char_value2) ? 1 : 0);
|
||||
break;
|
||||
case WEECHAT_HDATA_INTEGER:
|
||||
int_value1 = hdata_integer (hdata, pointer1, name);
|
||||
int_value2 = hdata_integer (hdata, pointer2, name);
|
||||
int_value1 = hdata_integer (hdata, pointer1, var_name);
|
||||
int_value2 = hdata_integer (hdata, pointer2, var_name);
|
||||
rc = (int_value1 < int_value2) ?
|
||||
-1 : ((int_value1 > int_value2) ? 1 : 0);
|
||||
break;
|
||||
case WEECHAT_HDATA_LONG:
|
||||
long_value1 = hdata_long (hdata, pointer1, name);
|
||||
long_value2 = hdata_long (hdata, pointer2, name);
|
||||
long_value1 = hdata_long (hdata, pointer1, var_name);
|
||||
long_value2 = hdata_long (hdata, pointer2, var_name);
|
||||
rc = (long_value1 < long_value2) ?
|
||||
-1 : ((long_value1 > long_value2) ? 1 : 0);
|
||||
break;
|
||||
case WEECHAT_HDATA_STRING:
|
||||
case WEECHAT_HDATA_SHARED_STRING:
|
||||
str_value1 = hdata_string (hdata, pointer1, name);
|
||||
str_value2 = hdata_string (hdata, pointer2, name);
|
||||
str_value1 = hdata_string (hdata, pointer1, var_name);
|
||||
str_value2 = hdata_string (hdata, pointer2, var_name);
|
||||
if (!str_value1 && !str_value2)
|
||||
rc = 0;
|
||||
else if (str_value1 && !str_value2)
|
||||
@@ -1018,20 +1036,105 @@ hdata_compare (struct t_hdata *hdata, void *pointer1, void *pointer2,
|
||||
}
|
||||
break;
|
||||
case WEECHAT_HDATA_POINTER:
|
||||
ptr_value1 = hdata_pointer (hdata, pointer1, name);
|
||||
ptr_value2 = hdata_pointer (hdata, pointer2, name);
|
||||
ptr_value1 = hdata_pointer (hdata, pointer1, var_name);
|
||||
ptr_value2 = hdata_pointer (hdata, pointer2, var_name);
|
||||
rc = (ptr_value1 < ptr_value2) ?
|
||||
-1 : ((ptr_value1 > ptr_value2) ? 1 : 0);
|
||||
break;
|
||||
case WEECHAT_HDATA_TIME:
|
||||
time_value1 = hdata_time (hdata, pointer1, name);
|
||||
time_value2 = hdata_time (hdata, pointer2, name);
|
||||
time_value1 = hdata_time (hdata, pointer1, var_name);
|
||||
time_value2 = hdata_time (hdata, pointer2, var_name);
|
||||
rc = (time_value1 < time_value2) ?
|
||||
-1 : ((time_value1 > time_value2) ? 1 : 0);
|
||||
break;
|
||||
case WEECHAT_HDATA_HASHTABLE:
|
||||
/* no comparison for hashtables */
|
||||
rc = 0;
|
||||
ptr_value1 = hdata_hashtable (hdata, pointer1, var_name);
|
||||
ptr_value2 = hdata_hashtable (hdata, pointer2, var_name);
|
||||
if (pos)
|
||||
{
|
||||
/*
|
||||
* for a hashtable, if there is a "." after name of hdata:
|
||||
* 1) If "()" is at the end, it is a function call to
|
||||
* hashtable_get_string().
|
||||
* 2) Otherwise, get the value for this key in hashtable.
|
||||
*/
|
||||
hashtable1 = ptr_value1;
|
||||
hashtable2 = ptr_value2;
|
||||
|
||||
pos_open_paren = strchr (pos, '(');
|
||||
if (pos_open_paren
|
||||
&& (pos_open_paren > pos + 1)
|
||||
&& (pos_open_paren[1] == ')'))
|
||||
{
|
||||
property = string_strndup (pos + 1,
|
||||
pos_open_paren - pos - 1);
|
||||
ptr_value1 = (void *)hashtable_get_string (hashtable1, property);
|
||||
ptr_value2 = (void *)hashtable_get_string (hashtable2, property);
|
||||
if (property)
|
||||
free (property);
|
||||
type1 = HASHTABLE_STRING;
|
||||
type2 = HASHTABLE_STRING;
|
||||
}
|
||||
else
|
||||
{
|
||||
ptr_value1 = hashtable_get (hashtable1, pos + 1);
|
||||
ptr_value2 = hashtable_get (hashtable2, pos + 1);
|
||||
type1 = hashtable1->type_values;
|
||||
type2 = hashtable2->type_values;
|
||||
}
|
||||
|
||||
if (!ptr_value1 && ptr_value2)
|
||||
rc = -1;
|
||||
else if (ptr_value1 && !ptr_value2)
|
||||
rc = 1;
|
||||
else if (!ptr_value1 && !ptr_value2)
|
||||
rc = 0;
|
||||
else if (type1 != type2)
|
||||
rc = 0;
|
||||
else
|
||||
{
|
||||
switch (type1)
|
||||
{
|
||||
case HASHTABLE_INTEGER:
|
||||
int_value1 = *((int *)ptr_value1);
|
||||
int_value2 = *((int *)ptr_value2);
|
||||
rc = (int_value1 < int_value2) ?
|
||||
-1 : ((int_value1 > int_value2) ? 1 : 0);
|
||||
break;
|
||||
case HASHTABLE_STRING:
|
||||
if (case_sensitive)
|
||||
rc = strcmp ((const char *)ptr_value1,
|
||||
(const char *)ptr_value2);
|
||||
else
|
||||
rc = string_strcasecmp ((const char *)ptr_value1,
|
||||
(const char *)ptr_value2);
|
||||
if (rc < 0)
|
||||
rc = -1;
|
||||
else if (rc > 0)
|
||||
rc = 1;
|
||||
break;
|
||||
case HASHTABLE_POINTER:
|
||||
case HASHTABLE_BUFFER:
|
||||
rc = (ptr_value1 < ptr_value2) ?
|
||||
-1 : ((ptr_value1 > ptr_value2) ? 1 : 0);
|
||||
break;
|
||||
case HASHTABLE_TIME:
|
||||
time_value1 = (long long)(*((time_t *)ptr_value1));
|
||||
time_value2 = (long long)(*((time_t *)ptr_value2));
|
||||
rc = (time_value1 < time_value2) ?
|
||||
-1 : ((time_value1 > time_value2) ? 1 : 0);
|
||||
break;
|
||||
case HASHTABLE_NUM_TYPES:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* compare hashtables by pointer */
|
||||
rc = (ptr_value1 < ptr_value2) ?
|
||||
-1 : ((ptr_value1 > ptr_value2) ? 1 : 0);
|
||||
}
|
||||
break;
|
||||
case WEECHAT_HDATA_OTHER:
|
||||
/* no comparison for other types */
|
||||
@@ -1039,6 +1142,23 @@ hdata_compare (struct t_hdata *hdata, void *pointer1, void *pointer2,
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* if we are on a pointer and that something else is in path (after "."),
|
||||
* go on with this pointer and remaining path
|
||||
*/
|
||||
if ((type == WEECHAT_HDATA_POINTER) && pos)
|
||||
{
|
||||
hdata_name = hdata_get_var_hdata (hdata, var_name);
|
||||
if (!hdata_name)
|
||||
goto end;
|
||||
hdata = hook_hdata_get (NULL, hdata_name);
|
||||
rc = hdata_compare (hdata, ptr_value1, ptr_value2, pos + 1,
|
||||
case_sensitive);
|
||||
}
|
||||
|
||||
end:
|
||||
if (var_name)
|
||||
free (var_name);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
+180
-39
@@ -31,12 +31,15 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-debug.h"
|
||||
#include "wee-hook.h"
|
||||
#include "wee-hashtable.h"
|
||||
#include "wee-infolist.h"
|
||||
#include "wee-log.h"
|
||||
#include "wee-signal.h"
|
||||
#include "wee-string.h"
|
||||
#include "wee-sys.h"
|
||||
#include "wee-util.h"
|
||||
#include "../gui/gui-chat.h"
|
||||
#include "../plugins/plugin.h"
|
||||
|
||||
@@ -44,7 +47,7 @@
|
||||
char *hook_type_string[HOOK_NUM_TYPES] =
|
||||
{ "command", "command_run", "timer", "fd", "process", "connect", "line",
|
||||
"print", "signal", "hsignal", "config", "completion", "modifier",
|
||||
"info", "info_hashtable", "infolist", "hdata", "focus" };
|
||||
"info", "info_hashtable", "infolist", "hdata", "focus", "url" };
|
||||
struct t_hook *weechat_hooks[HOOK_NUM_TYPES]; /* list of hooks */
|
||||
struct t_hook *last_weechat_hook[HOOK_NUM_TYPES]; /* last hook */
|
||||
int hooks_count[HOOK_NUM_TYPES]; /* number of hooks */
|
||||
@@ -57,50 +60,98 @@ int hook_socketpair_ok = 0; /* 1 if socketpair() is OK */
|
||||
/* hook callbacks */
|
||||
t_callback_hook *hook_callback_add[HOOK_NUM_TYPES] =
|
||||
{ NULL, NULL, NULL, &hook_fd_add_cb, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL };
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL };
|
||||
t_callback_hook *hook_callback_remove[HOOK_NUM_TYPES] =
|
||||
{ NULL, NULL, NULL, &hook_fd_remove_cb, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL };
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL };
|
||||
t_callback_hook *hook_callback_free_data[HOOK_NUM_TYPES] =
|
||||
{ &hook_command_free_data, &hook_command_run_free_data,
|
||||
&hook_timer_free_data, &hook_fd_free_data,
|
||||
&hook_process_free_data, &hook_connect_free_data,
|
||||
&hook_line_free_data, &hook_print_free_data,
|
||||
&hook_signal_free_data, &hook_hsignal_free_data,
|
||||
&hook_config_free_data, &hook_completion_free_data,
|
||||
&hook_modifier_free_data, &hook_info_free_data,
|
||||
&hook_info_hashtable_free_data, &hook_infolist_free_data,
|
||||
&hook_hdata_free_data, &hook_focus_free_data };
|
||||
{
|
||||
&hook_command_free_data,
|
||||
&hook_command_run_free_data,
|
||||
&hook_timer_free_data,
|
||||
&hook_fd_free_data,
|
||||
&hook_process_free_data,
|
||||
&hook_connect_free_data,
|
||||
&hook_line_free_data,
|
||||
&hook_print_free_data,
|
||||
&hook_signal_free_data,
|
||||
&hook_hsignal_free_data,
|
||||
&hook_config_free_data,
|
||||
&hook_completion_free_data,
|
||||
&hook_modifier_free_data,
|
||||
&hook_info_free_data,
|
||||
&hook_info_hashtable_free_data,
|
||||
&hook_infolist_free_data,
|
||||
&hook_hdata_free_data,
|
||||
&hook_focus_free_data,
|
||||
&hook_url_free_data,
|
||||
};
|
||||
t_callback_hook_get_desc *hook_callback_get_desc[HOOK_NUM_TYPES] =
|
||||
{ &hook_command_get_description, &hook_command_run_get_description,
|
||||
&hook_timer_get_description, &hook_fd_get_description,
|
||||
&hook_process_get_description, &hook_connect_get_description,
|
||||
&hook_line_get_description, &hook_print_get_description,
|
||||
&hook_signal_get_description, &hook_hsignal_get_description,
|
||||
&hook_config_get_description, &hook_completion_get_description,
|
||||
&hook_modifier_get_description, &hook_info_get_description,
|
||||
&hook_info_hashtable_get_description, &hook_infolist_get_description,
|
||||
&hook_hdata_get_description, &hook_focus_get_description };
|
||||
{
|
||||
&hook_command_get_description,
|
||||
&hook_command_run_get_description,
|
||||
&hook_timer_get_description,
|
||||
&hook_fd_get_description,
|
||||
&hook_process_get_description,
|
||||
&hook_connect_get_description,
|
||||
&hook_line_get_description,
|
||||
&hook_print_get_description,
|
||||
&hook_signal_get_description,
|
||||
&hook_hsignal_get_description,
|
||||
&hook_config_get_description,
|
||||
&hook_completion_get_description,
|
||||
&hook_modifier_get_description,
|
||||
&hook_info_get_description,
|
||||
&hook_info_hashtable_get_description,
|
||||
&hook_infolist_get_description,
|
||||
&hook_hdata_get_description,
|
||||
&hook_focus_get_description,
|
||||
&hook_url_get_description,
|
||||
};
|
||||
t_callback_hook_infolist *hook_callback_add_to_infolist[HOOK_NUM_TYPES] =
|
||||
{ &hook_command_add_to_infolist, &hook_command_run_add_to_infolist,
|
||||
&hook_timer_add_to_infolist, &hook_fd_add_to_infolist,
|
||||
&hook_process_add_to_infolist, &hook_connect_add_to_infolist,
|
||||
&hook_line_add_to_infolist, &hook_print_add_to_infolist,
|
||||
&hook_signal_add_to_infolist, &hook_hsignal_add_to_infolist,
|
||||
&hook_config_add_to_infolist, &hook_completion_add_to_infolist,
|
||||
&hook_modifier_add_to_infolist, &hook_info_add_to_infolist,
|
||||
&hook_info_hashtable_add_to_infolist, &hook_infolist_add_to_infolist,
|
||||
&hook_hdata_add_to_infolist, &hook_focus_add_to_infolist };
|
||||
{
|
||||
&hook_command_add_to_infolist,
|
||||
&hook_command_run_add_to_infolist,
|
||||
&hook_timer_add_to_infolist,
|
||||
&hook_fd_add_to_infolist,
|
||||
&hook_process_add_to_infolist,
|
||||
&hook_connect_add_to_infolist,
|
||||
&hook_line_add_to_infolist,
|
||||
&hook_print_add_to_infolist,
|
||||
&hook_signal_add_to_infolist,
|
||||
&hook_hsignal_add_to_infolist,
|
||||
&hook_config_add_to_infolist,
|
||||
&hook_completion_add_to_infolist,
|
||||
&hook_modifier_add_to_infolist,
|
||||
&hook_info_add_to_infolist,
|
||||
&hook_info_hashtable_add_to_infolist,
|
||||
&hook_infolist_add_to_infolist,
|
||||
&hook_hdata_add_to_infolist,
|
||||
&hook_focus_add_to_infolist,
|
||||
&hook_url_add_to_infolist,
|
||||
};
|
||||
t_callback_hook *hook_callback_print_log[HOOK_NUM_TYPES] =
|
||||
{ &hook_command_print_log, &hook_command_run_print_log,
|
||||
&hook_timer_print_log, &hook_fd_print_log,
|
||||
&hook_process_print_log, &hook_connect_print_log,
|
||||
&hook_line_print_log, &hook_print_print_log,
|
||||
&hook_signal_print_log, &hook_hsignal_print_log,
|
||||
&hook_config_print_log, &hook_completion_print_log,
|
||||
&hook_modifier_print_log, &hook_info_print_log,
|
||||
&hook_info_hashtable_print_log, &hook_infolist_print_log,
|
||||
&hook_hdata_print_log, &hook_focus_print_log };
|
||||
{
|
||||
&hook_command_print_log,
|
||||
&hook_command_run_print_log,
|
||||
&hook_timer_print_log,
|
||||
&hook_fd_print_log,
|
||||
&hook_process_print_log,
|
||||
&hook_connect_print_log,
|
||||
&hook_line_print_log,
|
||||
&hook_print_print_log,
|
||||
&hook_signal_print_log,
|
||||
&hook_hsignal_print_log,
|
||||
&hook_config_print_log,
|
||||
&hook_completion_print_log,
|
||||
&hook_modifier_print_log,
|
||||
&hook_info_print_log,
|
||||
&hook_info_hashtable_print_log,
|
||||
&hook_infolist_print_log,
|
||||
&hook_hdata_print_log,
|
||||
&hook_focus_print_log,
|
||||
&hook_url_print_log,
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
@@ -426,6 +477,67 @@ hook_exec_end ()
|
||||
hook_remove_deleted ();
|
||||
}
|
||||
|
||||
/*
|
||||
* Starts execution of a hook callback.
|
||||
*/
|
||||
|
||||
void
|
||||
hook_callback_start (struct t_hook *hook, struct t_hook_exec_cb *hook_exec_cb)
|
||||
{
|
||||
if (hook->type == HOOK_TYPE_COMMAND)
|
||||
hook->running++;
|
||||
else
|
||||
hook->running = 1;
|
||||
|
||||
if (debug_long_callbacks > 0)
|
||||
{
|
||||
gettimeofday (&hook_exec_cb->start_time, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
hook_exec_cb->start_time.tv_sec = 0;
|
||||
hook_exec_cb->start_time.tv_usec = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Ends execution of a hook callback.
|
||||
*/
|
||||
|
||||
void
|
||||
hook_callback_end (struct t_hook *hook, struct t_hook_exec_cb *hook_exec_cb)
|
||||
{
|
||||
struct timeval end_time;
|
||||
long long time_diff;
|
||||
char *str_diff;
|
||||
|
||||
if (hook->type == HOOK_TYPE_COMMAND)
|
||||
hook->running--;
|
||||
else
|
||||
hook->running = 0;
|
||||
|
||||
if ((debug_long_callbacks > 0)
|
||||
&& (hook_exec_cb->start_time.tv_sec > 0))
|
||||
{
|
||||
gettimeofday (&end_time, NULL);
|
||||
time_diff = util_timeval_diff (&hook_exec_cb->start_time, &end_time);
|
||||
if (time_diff >= debug_long_callbacks)
|
||||
{
|
||||
str_diff = util_get_microseconds_string (time_diff);
|
||||
log_printf (
|
||||
_("debug: long callback: hook %s (%s), plugin: %s, "
|
||||
"subplugin: %s, time elapsed: %s"),
|
||||
hook_type_string[hook->type],
|
||||
hook_get_description (hook),
|
||||
plugin_get_name (hook->plugin),
|
||||
(hook->subplugin) ? hook->subplugin : "-",
|
||||
str_diff);
|
||||
if (str_diff)
|
||||
free (str_diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns description of hook.
|
||||
*
|
||||
@@ -516,6 +628,35 @@ hook_set (struct t_hook *hook, const char *property, const char *value)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Callback used to clean all children (forked processes) by acknowledging
|
||||
* their end.
|
||||
*/
|
||||
|
||||
int
|
||||
hook_timer_clean_children_cb (const void *pointer, void *data,
|
||||
int remaining_calls)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
(void) pointer;
|
||||
(void) data;
|
||||
(void) remaining_calls;
|
||||
|
||||
sys_waitpid ();
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Schedule a cleanup timer to clean children (forked processes).
|
||||
*/
|
||||
|
||||
void
|
||||
hook_schedule_clean_children ()
|
||||
{
|
||||
hook_timer (NULL, 100, 0, 1, &hook_timer_clean_children_cb, NULL, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Unhooks something.
|
||||
*/
|
||||
|
||||
@@ -40,6 +40,7 @@ struct t_hook;
|
||||
#include "hook/wee-hook-process.h"
|
||||
#include "hook/wee-hook-signal.h"
|
||||
#include "hook/wee-hook-timer.h"
|
||||
#include "hook/wee-hook-url.h"
|
||||
|
||||
struct t_gui_bar;
|
||||
struct t_gui_buffer;
|
||||
@@ -73,6 +74,7 @@ enum t_hook_type
|
||||
HOOK_TYPE_INFOLIST, /* get some info as infolist */
|
||||
HOOK_TYPE_HDATA, /* get hdata pointer */
|
||||
HOOK_TYPE_FOCUS, /* focus event (mouse/key) */
|
||||
HOOK_TYPE_URL, /* URL transfer */
|
||||
/* number of hook types */
|
||||
HOOK_NUM_TYPES,
|
||||
};
|
||||
@@ -110,6 +112,12 @@ struct t_hook
|
||||
struct t_hook *next_hook; /* link to next hook */
|
||||
};
|
||||
|
||||
struct t_hook_exec_cb
|
||||
{
|
||||
struct timeval start_time; /* callback exec star time (to trace */
|
||||
/* long running callbacks) */
|
||||
};
|
||||
|
||||
/* hook variables */
|
||||
|
||||
extern char *hook_type_string[];
|
||||
@@ -118,6 +126,7 @@ extern struct t_hook *last_weechat_hook[];
|
||||
extern int hooks_count[];
|
||||
extern int hooks_count_total;
|
||||
extern int hook_socketpair_ok;
|
||||
extern long long hook_debug_long_callbacks;
|
||||
|
||||
/* hook functions */
|
||||
|
||||
@@ -130,9 +139,14 @@ extern void hook_init_data (struct t_hook *hook,
|
||||
extern int hook_valid (struct t_hook *hook);
|
||||
extern void hook_exec_start ();
|
||||
extern void hook_exec_end ();
|
||||
extern void hook_callback_start (struct t_hook *hook,
|
||||
struct t_hook_exec_cb *hook_exec_cb);
|
||||
extern void hook_callback_end (struct t_hook *hook,
|
||||
struct t_hook_exec_cb *hook_exec_cb);
|
||||
extern char *hook_get_description (struct t_hook *hook);
|
||||
extern void hook_set (struct t_hook *hook, const char *property,
|
||||
const char *value);
|
||||
extern void hook_schedule_clean_children ();
|
||||
extern void unhook (struct t_hook *hook);
|
||||
extern void unhook_all_plugin (struct t_weechat_plugin *plugin,
|
||||
const char *subplugin);
|
||||
|
||||
@@ -337,11 +337,11 @@ network_is_ip_address (const char *address)
|
||||
return 0;
|
||||
|
||||
/* valid IPv4? */
|
||||
if (inet_pton (AF_INET, address, &server_addr.sin_addr))
|
||||
if (inet_pton (AF_INET, address, &server_addr.sin_addr) == 1)
|
||||
return 1;
|
||||
|
||||
/* valid IPv6? */
|
||||
if (inet_pton (AF_INET6, address, &server_addr6.sin6_addr))
|
||||
if (inet_pton (AF_INET6, address, &server_addr6.sin6_addr) == 1)
|
||||
return 1;
|
||||
|
||||
/* not a valid IP address */
|
||||
@@ -554,11 +554,13 @@ network_pass_socks4proxy (struct t_proxy *proxy, int sock, const char *address,
|
||||
socks4.method = 1;
|
||||
socks4.port = htons (port);
|
||||
network_resolve (address, ip_addr, NULL);
|
||||
socks4.address = inet_addr (ip_addr);
|
||||
strncpy (socks4.user, username, sizeof (socks4.user) - 1);
|
||||
|
||||
free (username);
|
||||
|
||||
if (inet_pton (AF_INET, ip_addr, &socks4.address) != 1)
|
||||
return 0;
|
||||
|
||||
length = 8 + strlen (socks4.user) + 1;
|
||||
if (network_send_with_retry (sock, (char *) &socks4, length, 0) != length)
|
||||
return 0;
|
||||
@@ -767,7 +769,7 @@ network_pass_proxy (const char *proxy, int sock, const char *address, int port)
|
||||
ptr_proxy = proxy_search (proxy);
|
||||
if (ptr_proxy)
|
||||
{
|
||||
switch (CONFIG_INTEGER(ptr_proxy->options[PROXY_OPTION_TYPE]))
|
||||
switch (CONFIG_ENUM(ptr_proxy->options[PROXY_OPTION_TYPE]))
|
||||
{
|
||||
case PROXY_TYPE_HTTP:
|
||||
rc = network_pass_httpproxy (ptr_proxy, sock, address, port);
|
||||
|
||||
@@ -272,7 +272,7 @@ proxy_create_option (const char *proxy_name, int index_option,
|
||||
case PROXY_OPTION_TYPE:
|
||||
ptr_option = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_proxy,
|
||||
option_name, "integer",
|
||||
option_name, "enum",
|
||||
N_("proxy type (http (default), socks4, socks5)"),
|
||||
"http|socks4|socks5", 0, 0, value, NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
@@ -633,9 +633,9 @@ proxy_add_to_infolist (struct t_infolist *infolist, struct t_proxy *proxy)
|
||||
|
||||
if (!infolist_new_var_string (ptr_item, "name", proxy->name))
|
||||
return 0;
|
||||
if (!infolist_new_var_integer (ptr_item, "type", CONFIG_INTEGER(proxy->options[PROXY_OPTION_TYPE])))
|
||||
if (!infolist_new_var_integer (ptr_item, "type", CONFIG_ENUM(proxy->options[PROXY_OPTION_TYPE])))
|
||||
return 0;
|
||||
if (!infolist_new_var_string (ptr_item, "type_string", proxy_type_string[CONFIG_INTEGER(proxy->options[PROXY_OPTION_TYPE])]))
|
||||
if (!infolist_new_var_string (ptr_item, "type_string", proxy_type_string[CONFIG_ENUM(proxy->options[PROXY_OPTION_TYPE])]))
|
||||
return 0;
|
||||
if (!infolist_new_var_integer (ptr_item, "ipv6", CONFIG_INTEGER(proxy->options[PROXY_OPTION_IPV6])))
|
||||
return 0;
|
||||
@@ -667,8 +667,8 @@ proxy_print_log ()
|
||||
log_printf ("[proxy (addr:0x%lx)]", ptr_proxy);
|
||||
log_printf (" name . . . . . . . . . : '%s'", ptr_proxy->name);
|
||||
log_printf (" type . . . . . . . . . : %d (%s)",
|
||||
CONFIG_INTEGER(ptr_proxy->options[PROXY_OPTION_TYPE]),
|
||||
proxy_type_string[CONFIG_INTEGER(ptr_proxy->options[PROXY_OPTION_TYPE])]);
|
||||
CONFIG_ENUM(ptr_proxy->options[PROXY_OPTION_TYPE]),
|
||||
proxy_type_string[CONFIG_ENUM(ptr_proxy->options[PROXY_OPTION_TYPE])]);
|
||||
log_printf (" ipv6 . . . . . . . . . : %d", CONFIG_INTEGER(ptr_proxy->options[PROXY_OPTION_IPV6]));
|
||||
log_printf (" address. . . . . . . . : '%s'", CONFIG_STRING(ptr_proxy->options[PROXY_OPTION_ADDRESS]));
|
||||
log_printf (" port . . . . . . . . . : %d", CONFIG_INTEGER(ptr_proxy->options[PROXY_OPTION_PORT]));
|
||||
|
||||
@@ -26,9 +26,11 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <gcrypt.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-config-file.h"
|
||||
#include "wee-crypto.h"
|
||||
#include "wee-hashtable.h"
|
||||
#include "wee-secure.h"
|
||||
#include "wee-secure-buffer.h"
|
||||
@@ -85,7 +87,8 @@ secure_buffer_display_data (void *data,
|
||||
void
|
||||
secure_buffer_display ()
|
||||
{
|
||||
int line, count, count_encrypted;
|
||||
int line, count, count_encrypted, hash_algo;
|
||||
char str_supported[1024];
|
||||
|
||||
if (!secure_buffer)
|
||||
return;
|
||||
@@ -99,10 +102,22 @@ secure_buffer_display ()
|
||||
|
||||
line = 0;
|
||||
|
||||
str_supported[0] = '\0';
|
||||
hash_algo = weecrypto_get_hash_algo (
|
||||
config_file_option_string (secure_config_crypt_hash_algo));
|
||||
if (hash_algo == GCRY_MD_NONE)
|
||||
{
|
||||
snprintf (str_supported, sizeof (str_supported),
|
||||
" (%s)",
|
||||
/* TRANSLATORS: "hash algorithm not supported" */
|
||||
_("not supported"));
|
||||
}
|
||||
|
||||
gui_chat_printf_y (secure_buffer, line++,
|
||||
"Hash algo: %s Cipher: %s Salt: %s",
|
||||
secure_hash_algo_string[CONFIG_INTEGER(secure_config_crypt_hash_algo)],
|
||||
secure_cipher_string[CONFIG_INTEGER(secure_config_crypt_cipher)],
|
||||
"Hash algo: %s%s Cipher: %s Salt: %s",
|
||||
config_file_option_string (secure_config_crypt_hash_algo),
|
||||
str_supported,
|
||||
config_file_option_string (secure_config_crypt_cipher),
|
||||
(CONFIG_BOOLEAN(secure_config_crypt_salt)) ? _("on") : _("off"));
|
||||
|
||||
/* display passphrase */
|
||||
|
||||
+128
-14
@@ -26,9 +26,11 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <gcrypt.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-config-file.h"
|
||||
#include "wee-crypto.h"
|
||||
#include "wee-hashtable.h"
|
||||
#include "wee-secure.h"
|
||||
#include "wee-secure-config.h"
|
||||
@@ -48,6 +50,8 @@ struct t_config_option *secure_config_crypt_hash_algo = NULL;
|
||||
struct t_config_option *secure_config_crypt_passphrase_command = NULL;
|
||||
struct t_config_option *secure_config_crypt_salt = NULL;
|
||||
|
||||
int secure_config_loading = 0;
|
||||
|
||||
|
||||
/*
|
||||
* Gets passphrase from user and puts it in variable "secure_passphrase".
|
||||
@@ -172,6 +176,39 @@ secure_config_reload_cb (const void *pointer, void *data,
|
||||
return config_file_reload (config_file);
|
||||
}
|
||||
|
||||
/*
|
||||
* Callback for changes on some options "weechat.crypt.*" (that can not be
|
||||
* changed if there are encrypted data.
|
||||
*/
|
||||
|
||||
int
|
||||
secure_config_check_crypt_option_cb (const void *pointer, void *data,
|
||||
struct t_config_option *option,
|
||||
const char *value)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
(void) pointer;
|
||||
(void) data;
|
||||
(void) value;
|
||||
|
||||
/* any value allowed while reading config */
|
||||
if (secure_config_loading)
|
||||
return 1;
|
||||
|
||||
/* no encrypted data => changes allowed */
|
||||
if (secure_hashtable_data_encrypted->items_count == 0)
|
||||
return 1;
|
||||
|
||||
gui_chat_printf (NULL,
|
||||
_("%sOption %s.%s.%s can not be changed because there "
|
||||
"are still encrypted data"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
option->config_file->name,
|
||||
option->section->name,
|
||||
option->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Reads a data option in secured data configuration file.
|
||||
*/
|
||||
@@ -183,7 +220,7 @@ secure_config_data_read_cb (const void *pointer, void *data,
|
||||
const char *option_name, const char *value)
|
||||
{
|
||||
char *buffer, *decrypted, str_error[1024];
|
||||
int length_buffer, length_decrypted, rc;
|
||||
int length_buffer, length_decrypted, rc, hash_algo, cipher;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) pointer;
|
||||
@@ -237,6 +274,38 @@ secure_config_data_read_cb (const void *pointer, void *data,
|
||||
return WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE;
|
||||
}
|
||||
|
||||
/* get hash algorithm */
|
||||
hash_algo = weecrypto_get_hash_algo (
|
||||
config_file_option_string (secure_config_crypt_hash_algo));
|
||||
if (hash_algo == GCRY_MD_NONE)
|
||||
{
|
||||
gui_chat_printf (
|
||||
NULL,
|
||||
_("%sFailed to decrypt data \"%s\": hash algorithm \"%s\" is not "
|
||||
"available (ligbcrypt version is too old?)"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
option_name,
|
||||
config_file_option_string (secure_config_crypt_hash_algo));
|
||||
hashtable_set (secure_hashtable_data_encrypted, option_name, value);
|
||||
return WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE;
|
||||
}
|
||||
|
||||
/* get cipher */
|
||||
cipher = weecrypto_get_cipher (
|
||||
config_file_option_string (secure_config_crypt_cipher));
|
||||
if (cipher == GCRY_CIPHER_NONE)
|
||||
{
|
||||
gui_chat_printf (
|
||||
NULL,
|
||||
_("%sFailed to decrypt data \"%s\": cipher \"%s\" is not "
|
||||
"available (ligbcrypt version is too old?)"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
option_name,
|
||||
config_file_option_string (secure_config_crypt_cipher));
|
||||
hashtable_set (secure_hashtable_data_encrypted, option_name, value);
|
||||
return WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE;
|
||||
}
|
||||
|
||||
/* decrypt data */
|
||||
buffer = malloc (strlen (value) + 1);
|
||||
if (!buffer)
|
||||
@@ -250,8 +319,8 @@ secure_config_data_read_cb (const void *pointer, void *data,
|
||||
rc = secure_decrypt_data (
|
||||
buffer,
|
||||
length_buffer,
|
||||
secure_hash_algo[CONFIG_INTEGER(secure_config_crypt_hash_algo)],
|
||||
secure_cipher[CONFIG_INTEGER(secure_config_crypt_cipher)],
|
||||
hash_algo,
|
||||
cipher,
|
||||
secure_passphrase,
|
||||
&decrypted,
|
||||
&length_decrypted);
|
||||
@@ -311,13 +380,41 @@ secure_config_data_write_map_cb (void *data,
|
||||
{
|
||||
struct t_config_file *config_file;
|
||||
char *buffer, *buffer_base16;
|
||||
int length_buffer, rc;
|
||||
int length_buffer, rc, hash_algo, cipher;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) hashtable;
|
||||
|
||||
config_file = (struct t_config_file *)data;
|
||||
|
||||
hash_algo = weecrypto_get_hash_algo (
|
||||
config_file_option_string (secure_config_crypt_hash_algo));
|
||||
if (hash_algo == GCRY_MD_NONE)
|
||||
{
|
||||
gui_chat_printf (
|
||||
NULL,
|
||||
_("%sFailed to encrypt data \"%s\": hash algorithm \"%s\" is not "
|
||||
"available (ligbcrypt version is too old?)"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
key,
|
||||
config_file_option_string (secure_config_crypt_hash_algo));
|
||||
return;
|
||||
}
|
||||
|
||||
cipher = weecrypto_get_cipher (
|
||||
config_file_option_string (secure_config_crypt_cipher));
|
||||
if (cipher == GCRY_CIPHER_NONE)
|
||||
{
|
||||
gui_chat_printf (
|
||||
NULL,
|
||||
_("%sFailed to encrypt data \"%s\": cipher \"%s\" is not "
|
||||
"available (ligbcrypt version is too old?)"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
key,
|
||||
config_file_option_string (secure_config_crypt_cipher));
|
||||
return;
|
||||
}
|
||||
|
||||
buffer = NULL;
|
||||
length_buffer = 0;
|
||||
|
||||
@@ -326,8 +423,8 @@ secure_config_data_write_map_cb (void *data,
|
||||
/* encrypt password using passphrase */
|
||||
rc = secure_encrypt_data (
|
||||
value, strlen (value) + 1,
|
||||
secure_hash_algo[CONFIG_INTEGER(secure_config_crypt_hash_algo)],
|
||||
secure_cipher[CONFIG_INTEGER(secure_config_crypt_cipher)],
|
||||
hash_algo,
|
||||
cipher,
|
||||
secure_passphrase,
|
||||
&buffer,
|
||||
&length_buffer);
|
||||
@@ -352,7 +449,7 @@ secure_config_data_write_map_cb (void *data,
|
||||
else
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("%sError encrypting data \"%s\" (%d)"),
|
||||
_("%sFailed to encrypt data \"%s\" (%d)"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
key, rc);
|
||||
}
|
||||
@@ -465,17 +562,30 @@ secure_config_init_options ()
|
||||
{
|
||||
secure_config_crypt_cipher = config_file_new_option (
|
||||
secure_config_file, secure_config_section_crypt,
|
||||
"cipher", "integer",
|
||||
"cipher", "enum",
|
||||
N_("cipher used to crypt data (the number after algorithm is the "
|
||||
"size of the key in bits)"),
|
||||
"aes128|aes192|aes256", 0, 0, "aes256", NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
&secure_config_check_crypt_option_cb, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
secure_config_crypt_hash_algo = config_file_new_option (
|
||||
secure_config_file, secure_config_section_crypt,
|
||||
"hash_algo", "integer",
|
||||
N_("hash algorithm used to check the decrypted data"),
|
||||
"sha224|sha256|sha384|sha512", 0, 0, "sha256", NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
"hash_algo", "enum",
|
||||
N_("hash algorithm used to check the decrypted data; "
|
||||
"some of them require a specific libgcrypt version: "
|
||||
"sha3-*: libgcrypt >= 1.7.0, "
|
||||
"blake2*: libgcrypt >= 1.8.0, "
|
||||
"sha512-*: libgcrypt >= 1.9.4"),
|
||||
"sha224|sha256|sha384|sha512"
|
||||
"|sha512-224|sha512-256"
|
||||
"|sha3-224|sha3-256|sha3-384|sha3-512"
|
||||
"|blake2b-160|blake2b-256|blake2b-384|blake2b-512"
|
||||
"|blake2s-128|blake2s-160|blake2s-224|blake2s-256",
|
||||
0, 0, "sha256", NULL, 0,
|
||||
&secure_config_check_crypt_option_cb, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
secure_config_crypt_passphrase_command = config_file_new_option (
|
||||
secure_config_file, secure_config_section_crypt,
|
||||
"passphrase_command", "string",
|
||||
@@ -500,7 +610,9 @@ secure_config_init_options ()
|
||||
"then you can turn off this option to have always same content "
|
||||
"in file"),
|
||||
NULL, 0, 0, "on", NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
&secure_config_check_crypt_option_cb, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
/* data */
|
||||
@@ -532,7 +644,9 @@ secure_config_read ()
|
||||
|
||||
secure_data_encrypted = 0;
|
||||
|
||||
secure_config_loading = 1;
|
||||
rc = config_file_read (secure_config_file);
|
||||
secure_config_loading = 0;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
+19
-17
@@ -46,17 +46,6 @@ struct t_hashtable *secure_hashtable_data = NULL;
|
||||
/* data still encrypted (if passphrase not set) */
|
||||
struct t_hashtable *secure_hashtable_data_encrypted = NULL;
|
||||
|
||||
/* hash algorithms */
|
||||
char *secure_hash_algo_string[] = { "sha224", "sha256", "sha384", "sha512",
|
||||
NULL };
|
||||
int secure_hash_algo[] = { GCRY_MD_SHA224, GCRY_MD_SHA256, GCRY_MD_SHA384,
|
||||
GCRY_MD_SHA512 };
|
||||
|
||||
/* ciphers */
|
||||
char *secure_cipher_string[] = { "aes128", "aes192", "aes256", NULL };
|
||||
int secure_cipher[] = { GCRY_CIPHER_AES128, GCRY_CIPHER_AES192,
|
||||
GCRY_CIPHER_AES256 };
|
||||
|
||||
char *secure_decrypt_error[] = { "memory", "buffer", "key", "cipher", "setkey",
|
||||
"decrypt", "hash", "hash mismatch" };
|
||||
|
||||
@@ -427,8 +416,10 @@ decrypt_end:
|
||||
* secured data configuration file (because no passphrase was given).
|
||||
*
|
||||
* Returns:
|
||||
* > 0: number of decrypted data
|
||||
* 0: error decrypting data
|
||||
* >= 0: number of decrypted data
|
||||
* -1: error decrypting data (bad passphrase)
|
||||
* -2: unsupported hash algorithm
|
||||
* -3: unsupported cipher
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -436,11 +427,22 @@ secure_decrypt_data_not_decrypted (const char *passphrase)
|
||||
{
|
||||
char **keys, *buffer, *decrypted;
|
||||
const char *value;
|
||||
int num_ok, num_keys, i, length_buffer, length_decrypted, rc;
|
||||
int num_ok, num_keys, i, hash_algo, cipher, rc;
|
||||
int length_buffer, length_decrypted;
|
||||
|
||||
/* we need a passphrase to decrypt data! */
|
||||
if (!passphrase || !passphrase[0])
|
||||
return 0;
|
||||
return -1;
|
||||
|
||||
hash_algo = weecrypto_get_hash_algo (
|
||||
config_file_option_string (secure_config_crypt_hash_algo));
|
||||
if (hash_algo == GCRY_MD_NONE)
|
||||
return -2;
|
||||
|
||||
cipher = weecrypto_get_cipher (
|
||||
config_file_option_string (secure_config_crypt_cipher));
|
||||
if (cipher == GCRY_CIPHER_NONE)
|
||||
return -3;
|
||||
|
||||
num_ok = 0;
|
||||
|
||||
@@ -469,8 +471,8 @@ secure_decrypt_data_not_decrypted (const char *passphrase)
|
||||
rc = secure_decrypt_data (
|
||||
buffer,
|
||||
length_buffer,
|
||||
secure_hash_algo[CONFIG_INTEGER(secure_config_crypt_hash_algo)],
|
||||
secure_cipher[CONFIG_INTEGER(secure_config_crypt_cipher)],
|
||||
hash_algo,
|
||||
cipher,
|
||||
passphrase,
|
||||
&decrypted,
|
||||
&length_decrypted);
|
||||
|
||||
@@ -28,28 +28,9 @@
|
||||
#define SECURE_DATA_PASSPHRASE_FLAG "__passphrase__"
|
||||
#define SECURE_SALT_SIZE 8
|
||||
|
||||
enum t_secure_config_hash_algo
|
||||
{
|
||||
SECURE_CONFIG_HASH_SHA224 = 0,
|
||||
SECURE_CONFIG_HASH_SHA256,
|
||||
SECURE_CONFIG_HASH_SHA384,
|
||||
SECURE_CONFIG_HASH_SHA512,
|
||||
};
|
||||
|
||||
enum t_secure_config_cipher
|
||||
{
|
||||
SECURE_CONFIG_CIPHER_AES128 = 0,
|
||||
SECURE_CONFIG_CIPHER_AES192,
|
||||
SECURE_CONFIG_CIPHER_AES256,
|
||||
};
|
||||
|
||||
extern char *secure_passphrase;
|
||||
extern struct t_hashtable *secure_hashtable_data;
|
||||
extern struct t_hashtable *secure_hashtable_data_encrypted;
|
||||
extern char *secure_hash_algo_string[];
|
||||
extern int secure_hash_algo[];
|
||||
extern char *secure_cipher_string[];
|
||||
extern int secure_cipher[];
|
||||
extern int secure_data_encrypted;
|
||||
extern char *secure_decrypt_error[];
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
|
||||
@@ -37,6 +38,7 @@
|
||||
#include "wee-log.h"
|
||||
#include "wee-string.h"
|
||||
#include "../gui/gui-buffer.h"
|
||||
#include "../gui/gui-window.h"
|
||||
#include "../plugins/plugin.h"
|
||||
|
||||
|
||||
@@ -293,6 +295,17 @@ signal_handle ()
|
||||
signal_sigterm_count = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Suspends WeeChat process.
|
||||
*/
|
||||
|
||||
void
|
||||
signal_suspend ()
|
||||
{
|
||||
kill (getpid (), SIGTSTP);
|
||||
gui_window_ask_refresh (2);
|
||||
}
|
||||
|
||||
/*
|
||||
* Initializes signal.
|
||||
*/
|
||||
|
||||
@@ -32,6 +32,7 @@ extern int signal_search_number (int signal_number);
|
||||
extern int signal_search_name (const char *name);
|
||||
extern void signal_catch (int signum, void (*handler)(int));
|
||||
extern void signal_handle ();
|
||||
extern void signal_suspend ();
|
||||
extern void signal_init ();
|
||||
|
||||
#endif /* WEECHAT_SIGNAL_H */
|
||||
|
||||
+70
-2
@@ -394,6 +394,70 @@ string_toupper (const char *string)
|
||||
return string_dyn_free (result, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Converts string to lower case (using a range of chars).
|
||||
*
|
||||
* Note: result must be freed after use.
|
||||
*/
|
||||
|
||||
char *
|
||||
string_tolower_range (const char *string, int range)
|
||||
{
|
||||
char *result, *ptr_result;
|
||||
|
||||
if (!string)
|
||||
return NULL;
|
||||
|
||||
if (range <= 0)
|
||||
return string_tolower (string);
|
||||
|
||||
result = strdup (string);
|
||||
if (!result)
|
||||
return NULL;
|
||||
|
||||
ptr_result = result;
|
||||
while (ptr_result && ptr_result[0])
|
||||
{
|
||||
if ((ptr_result[0] >= 'A') && (ptr_result[0] < 'A' + range))
|
||||
ptr_result[0] += ('a' - 'A');
|
||||
ptr_result = (char *)utf8_next_char (ptr_result);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* Converts string to upper case (using a range of char).
|
||||
*
|
||||
* Note: result must be freed after use.
|
||||
*/
|
||||
|
||||
char *
|
||||
string_toupper_range (const char *string, int range)
|
||||
{
|
||||
char *result, *ptr_result;
|
||||
|
||||
if (!string)
|
||||
return NULL;
|
||||
|
||||
if (range <= 0)
|
||||
return string_toupper (string);
|
||||
|
||||
result = strdup (string);
|
||||
if (!result)
|
||||
return NULL;
|
||||
|
||||
ptr_result = result;
|
||||
while (ptr_result && ptr_result[0])
|
||||
{
|
||||
if ((ptr_result[0] >= 'a') && (ptr_result[0] < 'a' + range))
|
||||
ptr_result[0] -= ('a' - 'A');
|
||||
ptr_result = (char *)utf8_next_char (ptr_result);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* Compares two chars (case sensitive).
|
||||
*
|
||||
@@ -1312,7 +1376,7 @@ string_convert_escaped_chars (const char *string)
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks if first char of string is a whitespace (space or tab).
|
||||
* Checks if first char of string is a whitespace (space, tab, newline or carriage return).
|
||||
*
|
||||
* Returns:
|
||||
* 1: first char is whitespace
|
||||
@@ -1322,7 +1386,11 @@ string_convert_escaped_chars (const char *string)
|
||||
int
|
||||
string_is_whitespace_char (const char *string)
|
||||
{
|
||||
return (string && ((string[0] == ' ') || string[0] == '\t')) ? 1 : 0;
|
||||
return (string && (
|
||||
(string[0] == ' ')
|
||||
|| (string[0] == '\t')
|
||||
|| (string[0] == '\n')
|
||||
|| (string[0] == '\r'))) ? 1 : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -44,6 +44,8 @@ extern char *string_reverse_screen (const char *string);
|
||||
extern char *string_repeat (const char *string, int count);
|
||||
extern char *string_tolower (const char *string);
|
||||
extern char *string_toupper (const char *string);
|
||||
extern char *string_tolower_range (const char *string, int range);
|
||||
extern char *string_toupper_range (const char *string, int range);
|
||||
extern int string_charcmp (const char *string1, const char *string2);
|
||||
extern int string_charcasecmp (const char *string1, const char *string2);
|
||||
extern int string_charcasecmp_range (const char *string1, const char *string2,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user