/1.md
Last active
February 15, 2025 06:38
-
Star
(639)
You must be signed in to star a gist -
Fork
(95)
You must be signed in to fork a gist
Revisions
-
pascalpoitras revised this gist
Feb 14, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ This configuration is not maintained anymore. You should think twice before using it, Breaking change and security issue will likely eventually happens as any abandonned project. -
pascalpoitras revised this gist
Feb 14, 2025 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ This configuration is not maintainend anymore. You should think twice before using it, Breaking change and security issue will likely eventually happens as any abandonned project. -
pascalpoitras revised this gist
Aug 6, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1301,7 +1301,7 @@ Dependencies: /alias addreplace logo_xmas /logo color "" "34 46 40 124 160 196 white" /alias addreplace logo_config /logo color "" "24 31 121 163 229 white" totally useless --- --- -
pascalpoitras revised this gist
Aug 4, 2024 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -294,6 +294,7 @@ ___ Dependencies: - Plugins: trigger - Triggers: utils_rot13 <!-- ending list --> *** -
pascalpoitras revised this gist
Aug 4, 2024 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -285,6 +285,8 @@ Dependencies: /trigger addreplace utils_rot13 info "rot13" /trigger set utils_rot13 regex "/.*/a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,a,b,c,d,e,f,g,h,i,j,k,l,m/my_lowercase /.*/${my_lowercase}/my_uppercase /[^,]/${upper:${re:0}}/my_uppercase /.*/${tg_arguments}/tg_info /./${if:${re:0}!~[${chars:alpha}]?${re:0}:${define:my_case,${if:${re:0}==${upper:${re:0}}?upper:lower}}${split:${calc:${length:${chars:a-${lower:${re:0}}}}+13},,,${my_${my_case}case}}}/tg_info" This trigger transform text using rot13 ___ ### utils_rot13_csv @@ -299,6 +301,8 @@ Dependencies: /trigger addreplace utils_rot13_csv info "rot13_csv" /trigger set utils_rot13_csv regex "/.*/${tg_arguments}/tg_info /[^,]+/${info:rot13,${re:0}}/tg_info" This trigger transform CSV using rot13 ___ *** -
pascalpoitras revised this gist
Aug 4, 2024 . 1 changed file with 30 additions and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -273,6 +273,36 @@ ___ *** ### utils_rot13 Dependencies: - Plugins: trigger <!-- ending list --> *** /trigger addreplace utils_rot13 info "rot13" /trigger set utils_rot13 regex "/.*/a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,a,b,c,d,e,f,g,h,i,j,k,l,m/my_lowercase /.*/${my_lowercase}/my_uppercase /[^,]/${upper:${re:0}}/my_uppercase /.*/${tg_arguments}/tg_info /./${if:${re:0}!~[${chars:alpha}]?${re:0}:${define:my_case,${if:${re:0}==${upper:${re:0}}?upper:lower}}${split:${calc:${length:${chars:a-${lower:${re:0}}}}+13},,,${my_${my_case}case}}}/tg_info" ___ ### utils_rot13_csv Dependencies: - Plugins: trigger <!-- ending list --> *** /trigger addreplace utils_rot13_csv info "rot13_csv" /trigger set utils_rot13_csv regex "/.*/${tg_arguments}/tg_info /[^,]+/${info:rot13,${re:0}}/tg_info" ___ *** ### utils_date_calc_days Dependencies: -
pascalpoitras revised this gist
Aug 3, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -459,7 +459,7 @@ Dependencies: *** /trigger addreplace favorite_buffer_refresh_signals signal "buffer_opened;buffer_closed;buffer_switch;buffer_renamed" /trigger set favorite_buffer_refresh_signals command "/item refresh favorite_buffer" refresh the favorite_buffer item on these three signals -
pascalpoitras revised this gist
Aug 1, 2024 . 1 changed file with 17 additions and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -256,6 +256,23 @@ ___ *** ### utils_base_csv Dependencies: - Plugins: trigger <!-- ending list --> *** /trigger addreplace utils_base_csv info "base_encode_csv;base_decode_csv" /trigger set utils_base_csv conditions "${tg_arguments} =~ ^(16|32|64),[^,]" /trigger set utils_base_csv regex "/.*/${split:2,_,,${tg_info_name}}/my_action /.*/${split:1,,,${tg_arguments}}/my_base /.*/${split:2,,keep_eol,${tg_arguments}}/tg_info /[^,]+/${base_${my_action}:${my_base},${re:0}}/tg_info" ___ *** ### utils_date_calc_days Dependencies: -
pascalpoitras revised this gist
Aug 1, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -454,7 +454,7 @@ refresh the favorite_buffer if any option of a favorite_buffer group is changed /trigger addreplace favorite_buffer_draw info "favorite_buffer_draw" /trigger set favorite_buffer_draw conditions "${tg_arguments} =~ ^[1-9][0-9]*,((([${chars:alnum}+/]{4})*([${chars:alnum}+/]{2}==|[${chars:alnum}+/]{3}=|[${chars:alnum}+/]{4})),)*([${chars:alnum}+/]{4})*([${chars:alnum}+/]{2}==|[${chars:alnum}+/]{3}=|[${chars:alnum}+/]{4})$" /trigger set favorite_buffer_draw regex "/.*/${info:window,${split:1,,,${tg_arguments}}}/my_window /.*/${split:1,,,${tg_arguments}}/my_group /.*/${split:2,,keep_eol,${tg_arguments}},/tg_info /.*/${if:${plugins.var.group_tools.favorite_buffer_common.all.general.complete}!=?complete:open}/my_display_mode /.*/plugins.var.group_tools.favorite_buffer_${my_group}.tab.visual/my_opt_prefix /.*/${${my_opt_prefix}.fg}/my_tab_fg /.*/${${my_opt_prefix}.active_fg}/my_active_tab_fg /.*/${${my_opt_prefix}.missing_fg}/my_missing_tab_fg /.*/${${my_opt_prefix}.bg}/my_tab_bg /.*/${${my_opt_prefix}.active_bg}/my_active_tab_bg /.*/${${my_opt_prefix}.missing_bg}/my_missing_tab_bg /.*/${${my_opt_prefix}.min}/my_tab_min /.*/${${my_opt_prefix}.max}/my_tab_max /.*/${${my_opt_prefix}.prefix}/my_tab_prefix /.*/${${my_opt_prefix}.suffix}/my_tab_suffix /([^,]+),/${define:my_buffer_full_name,${base_decode:64,${re:1}}}${define:my_buffer,${info:buffer,${my_buffer_full_name}}}${if:${my_display_mode}==complete||${my_buffer}!=?${define:my_buffer_state,${if:${my_buffer}!=?${if:${my_buffer}==${window[${my_window}].buffer}?active_}:missing_}}${define:my_name,${if:${my_buffer_state}==missing_?${if:${my_buffer_full_name}==*irc.*?${split:-1,.,,${my_buffer_full_name}}:${my_buffer_full_name}}:${buffer[${my_buffer}].short_name}}}${define:my_name,${cutscr:+${if:${my_tab_max}==0?${calc:${lengthscr:${my_name}}+1}:${my_tab_max}},…,${my_name}}${repeat:${calc:${my_tab_min}-${lengthscr:${my_name}}}, }}${color:${my_${my_buffer_state}tab_bg}}${my_tab_prefix}${color:${my_${my_buffer_state}tab_fg},${my_${my_buffer_state}tab_bg}} ${my_name} ${color:reset}${color:${my_${my_buffer_state}tab_bg}}${my_tab_suffix}\n}/tg_info" Redraw the favorite_buffer item -
pascalpoitras revised this gist
Aug 1, 2024 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -453,8 +453,8 @@ refresh the favorite_buffer item on these three signals refresh the favorite_buffer if any option of a favorite_buffer group is changed /trigger addreplace favorite_buffer_draw info "favorite_buffer_draw" /trigger set favorite_buffer_draw conditions "${tg_arguments} =~ ^[1-9][0-9]*,((([${chars:alnum}+/]{4})*([${chars:alnum}+/]{2}==|[${chars:alnum}+/]{3}=|[${chars:alnum}+/]{4})),)*([${chars:alnum}+/]{4})*([${chars:alnum}+/]{2}==|[${chars:alnum}+/]{3}=|[${chars:alnum}+/]{4})$" /trigger set favorite_buffer_draw regex "/.*/${info:window,${split:1,,,${tg_arguments}}}/my_window /.*/${window[${my_window}].number}/my_group /.*/${split:2,,keep_eol,${tg_arguments}},/tg_info /.*/${if:${plugins.var.group_tools.favorite_buffer_common.all.general.complete}!=?complete:open}/my_display_mode /.*/plugins.var.group_tools.favorite_buffer_${my_group}.tab.visual/my_opt_prefix /.*/${${my_opt_prefix}.fg}/my_tab_fg /.*/${${my_opt_prefix}.active_fg}/my_active_tab_fg /.*/${${my_opt_prefix}.missing_fg}/my_missing_tab_fg /.*/${${my_opt_prefix}.bg}/my_tab_bg /.*/${${my_opt_prefix}.active_bg}/my_active_tab_bg /.*/${${my_opt_prefix}.missing_bg}/my_missing_tab_bg /.*/${${my_opt_prefix}.min}/my_tab_min /.*/${${my_opt_prefix}.max}/my_tab_max /.*/${${my_opt_prefix}.prefix}/my_tab_prefix /.*/${${my_opt_prefix}.suffix}/my_tab_suffix /([^,]+),/${define:my_buffer_full_name,${base_decode:64,${re:1}}}${define:my_buffer,${info:buffer,${my_buffer_full_name}}}${if:${my_display_mode}==complete||${my_buffer}!=?${define:my_buffer_state,${if:${my_buffer}!=?${if:${my_buffer}==${window[${my_window}].buffer}?active_}:missing_}}${define:my_name,${if:${my_buffer_state}==missing_?${if:${my_buffer_full_name}==*irc.*?${split:-1,.,,${my_buffer_full_name}}:${my_buffer_full_name}}:${buffer[${my_buffer}].short_name}}}${define:my_name,${cutscr:+${if:${my_tab_max}==0?${calc:${lengthscr:${my_name}}+1}:${my_tab_max}},…,${my_name}}${repeat:${calc:${my_tab_min}-${lengthscr:${my_name}}}, }}${color:${my_${my_buffer_state}tab_bg}}${my_tab_prefix}${color:${my_${my_buffer_state}tab_fg},${my_${my_buffer_state}tab_bg}} ${my_name} ${color:reset}${color:${my_${my_buffer_state}tab_bg}}${my_tab_suffix}\n}/tg_info" Redraw the favorite_buffer item @@ -505,7 +505,7 @@ this trigger allow the toggling of a buffer in cursor mode using a digit from 1 set the apparence of the tab/bubble of the first three favorite_buffer groups /item addreplace favorite_buffer "" "${info:favorite_buffer_draw,${window.number},${plugins.var.group_tools.favorite_buffer_${window.number}.list.buffers.list}}" this is our favorite_buffer item -
pascalpoitras revised this gist
Jul 18, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -248,7 +248,7 @@ Dependencies: /trigger addreplace utils_search_server_buffer_ptr info "search_server_buffer_ptr" /trigger set utils_search_server_buffer_ptr conditions "${tg_arguments} != && (${buffer[${tg_arguments}].local_variables.script_name} =~ ^(matrix|slack)$ || ${buffer[${tg_arguments}].local_variables.plugin} =~ ^(irc|matrix))$" /trigger set utils_search_server_buffer_ptr regex "/.*/${buffer[${tg_arguments}].local_variables.plugin}/my_plugin /.*/${buffer[${tg_arguments}].local_variables.script_name}/my_script /.*/${buffer[${tg_arguments}].local_variables.server}/my_server /.*/${info:script_info,slack.py,version}/my_slack_version /.*/${info:buffer,${my_plugin}.${if:${my_script}==slack?${if:${split:1,.,,${my_slack_version}}<3?:slack.server.}:server.}${my_server}}/tg_info" This trigger create an info named search_server_buffer_ptr which receive a buffer pointer and return the buffer pointer of the corresponding server (works with IRC, Slack and matrix) -
pascalpoitras revised this gist
Jul 18, 2024 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -240,7 +240,7 @@ ___ Dependencies: - WeeChat: 4.4.0 - Plugins: trigger <!-- ending list --> @@ -437,7 +437,7 @@ Dependencies: - WeeChat: 4.4.0 - Plugins: trigger - Triggers: utils_group_tools <!-- ending list --> *** @@ -1168,7 +1168,7 @@ ___ Dependencies: - WeeChat: 4.4.0 - Plugins: exec, trigger - Programs: translate-shell - Triggers: utils_search_server_buffer_ptr -
pascalpoitras revised this gist
Jul 18, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -248,7 +248,7 @@ Dependencies: /trigger addreplace utils_search_server_buffer_ptr info "search_server_buffer_ptr" /trigger set utils_search_server_buffer_ptr conditions "${tg_arguments} != && (${buffer[${tg_arguments}].local_variables.script_name} =~ ^(matrix|slack)$ || ${buffer[${tg_arguments}].local_variables.plugin} =~ ^(irc|matrix))$" /trigger set utils_search_server_buffer_ptr regex "/.*/${buffer[${tg_arguments}].local_variables.plugin}/my_plugin /.*/${buffer[${tg_arguments}].local_variables.script_name}/my_script /.*/${buffer[${tg_arguments}].local_variables.server}/my_server /.*/${info:script_info,slack.py,version}/my_slack_version /.*/${info:buffer,${my_plugin}.${if:${my_script}==slack?${if:${my_slack_version}!~^3?:slack.server.}:server.}${my_server}}/tg_info" This trigger create an info named search_server_buffer_ptr which receive a buffer pointer and return the buffer pointer of the corresponding server (works with IRC, Slack and matrix) -
pascalpoitras revised this gist
Jul 5, 2024 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -557,8 +557,8 @@ Dependencies: /bar set titlenosep conditions ${window.number} =~ ^[23]$ /bar set titlenosep color_fg white /bar set titlenosep color_delim white /bar set titlenosep color_bg 24 /bar set titlenosep color_bg_inactive 24 ___ @@ -578,8 +578,8 @@ Dependencies: /bar set titlesep conditions ${window.number} !~ ^[23]$ /bar set titlesep color_fg white /bar set titlesep color_delim white /bar set titlesep color_bg 24 /bar set titlesep color_bg_inactive 24 ___ -
pascalpoitras revised this gist
Jul 5, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -939,7 +939,7 @@ The triggers above redraw the powerline_items_weechat_info and powerline_items_s THe previous group_tools commands create 7 segments for us to use /group_tools set powerline_items list weechat_info list time,symbol,buffer_plugin_server,buffer_info /item addreplace powerline_items_weechat_info "" "${info:powerline_items_draw,weechat_info,${window.number}}" -
pascalpoitras revised this gist
Jul 5, 2024 . 1 changed file with 41 additions and 41 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@  ## Mouse @@ -397,19 +397,19 @@ Change the priority of the buflist bar Use only one buflist item, sort by buffer number, add an additional signal to the list of signals that cause the buflist to be refresh and finally the condition for a buffer to be included in the buflist /set buflist.format.buffer "${define:my_left_section_contents,${format_number}${eval:${plugins.var.group_tools.buflist.element.fold.format}}${indent}${format_nick_prefix}${format_name}${format_lag}${eval:${plugins.var.group_tools.buflist.element.filter.format}}}${define:my_left_section_contents_length,${lengthscr:${my_left_section_contents}}}${define:my_right_section_contents,${format_hotlist}}${define:my_right_section_contents_length,${lengthscr:${my_right_section_contents}}}${if:${type}==server?${color:,24}:${color:default}}${if:${my_left_section_contents_length} > ${plugins.var.group_tools.buflist.section.left.size}?${cutscr:+${plugins.var.group_tools.buflist.section.left.size},${if:${type}==server?${color:white}:${color:${weechat.color.chat_prefix_more}}}${weechat.look.prefix_align_more},${my_left_section_contents}}:${my_left_section_contents}${repeat:${calc:${plugins.var.group_tools.buflist.section.left.size} - ${my_left_section_contents_length}}, }}${if:${my_right_section_contents_length} > ${plugins.var.group_tools.buflist.section.right.size}?${cutscr:+${plugins.var.group_tools.buflist.section.right.size},${if:${type}==server?${color:white}:${color:${weechat.color.chat_prefix_more}}}${weechat.look.prefix_align_more},${my_right_section_contents}}:${repeat:${calc:${plugins.var.group_tools.buflist.section.right.size} - ${my_right_section_contents_length}}, }${my_right_section_contents}}" /set buflist.format.buffer_current "${format_buffer}" /set buflist.format.hotlist_highlight "${color:163}" /set buflist.format.hotlist_message "${color:229}" /set buflist.format.hotlist_private "${color:121}" /set buflist.format.number "${if:${plugins.var.group_tools.buflist.element.number.enabled}!=?${if:${current_buffer}!=?${color:*white}${hide:>,${number}} :${if:${type}==server?${color:*white}}${number} }}" /set buflist.format.indent "${if:${plugins.var.group_tools.buflist.element.indent.enabled}!=?${if:${plugins.var.group_tools.buflist.feature.indent_tree.enabled}!=?${color:24}${if:${buffer.next_buffer}==0x0?┗:${if:(${buffer.next_buffer.hidden}==||${plugins.var.group_tools.buflist.feature.show_hidden_buffers.enabled}!=)&&(${buffer.next_buffer.local_variables.type}!~^(channel|list|private)$||${buffer.next_buffer.local_variables.type}=~^(channel|list|private)$&&${buffer[${info:search_server_buffer_ptr,${buffer.next_buffer}}].local_variables.buflist_fold}==)?${if:${buffer.next_buffer.local_variables.server}==${server}&&${buffer.next_buffer.local_variables.type}!=server?┣:┗}:${if:${info:buflist_is_next_visible_buffer_part_of_same_server_as,${buffer.full_name}}!=?┣:┗}}}━: }}" /set buflist.format.name "${if:${plugins.var.group_tools.buflist.element.name.enabled}!=?${define:my_name,${if:${type}==server?${if:${plugins.var.group_tools.buflist.feature.real_net_name.enabled}!=&&${info:irc_server_isupport_value,${name},NETWORK}!=?${info:irc_server_isupport_value,${name},NETWORK}:${name}}:${name}}}${define:my_name_length,${lengthscr:${my_name}}}${define:my_name,${if:${buffer.local_variables.buflist_start_at}!=?${revscr:${cutscr:+${calc:${my_name_length}-${buffer.local_variables.buflist_start_at}},…,${revscr:${my_name}}}}:${my_name}}}${if:${type}==server?${color:*white}:${eval:${color_hotlist}}}${my_name}}" /set buflist.format.hotlist "${if:${plugins.var.group_tools.buflist.element.hotlist.enabled}!=?${if:${plugins.var.group_tools.buflist.section.right.size}==1? :${hotlist}}}" /set buflist.format.nick_prefix "${if:${plugins.var.group_tools.buflist.element.nick_prefix.enabled}!=&&${buflist.look.nick_prefix}!=?${color:24}${nick_prefix}}" /set buflist.format.lag "${if:${plugins.var.group_tools.buflist.element.lag.enabled}!=?${color:white} [${lag}]}" /set plugins.var.group_tools.buflist.element.fold.format "${if:${plugins.var.group_tools.buflist.element.fold.enabled}!=&&${type}==server?${color:*white}${if:${buffer.local_variables.buflist_fold}==?⊟:⊞} }" /set plugins.var.group_tools.buflist.element.filter.format "${if:${plugins.var.group_tools.buflist.element.filter.enabled}!=&&${buffer.local_variables.filter}!=? ${if:${type}==server?${color:black}:${color:24}}${buffer.local_variables.filter}}" The formats for the different buflist elements @@ -499,9 +499,9 @@ this trigger allow the toggling of a buffer in cursor mode using a digit from 1 5. Create numeric bind <!-- ending list --> /group_tools add favorite_buffer_1 tab visual fg "white" active_fg "white" missing_fg "250" bg "236" active_bg "24" missing_bg "238" min "5" max "5" prefix "" suffix "" /group_tools add favorite_buffer_2 tab visual fg "white" active_fg "white" missing_fg "250" bg "236" active_bg "24" missing_bg "238" min "7" max "7" prefix "" suffix "" /group_tools add favorite_buffer_3 tab visual fg "white" active_fg "white" missing_fg "250" bg "236" active_bg "24" missing_bg "238" min "7" max "7" prefix "" suffix "" set the apparence of the tab/bubble of the first three favorite_buffer groups @@ -638,7 +638,7 @@ Dependencies: /trigger addreplace chanmon_monitor print "*;irc_privmsg,matrix_message,matrix_text" /trigger set chanmon_monitor conditions "${buffer.local_variables.type} == channel && ${buffer.local_variables.no_chanmon_like} == && (${plugins.var.group_tools.chanmon.feature.allow_filtered_lines.enabled} != || ${tg_displayed} !=) && (${plugins.var.group_tools.chanmon.feature.allow_hidden_channels.enabled} != || ${buffer.hidden} ==)" /trigger set chanmon_monitor regex "/.*/${plugins.var.group_tools.chanmon.list.header.list}/my_list /[^,]+/${if:${re:0}=~^[abcdefghijklmnopqrstuvwxyz0-9_]+$?${re:0}}/my_list /[^,]+/plugins.var.group_tools.chanmon.segment.${re:0}/my_list /[^,]+/${if:${length:${${re:0}.conditions}}==||${eval_cond:${${re:0}.conditions}}?${re:0}}/my_list /,+/,/my_list /^,|,$//my_list /.*/${my_list}/my_bgs /[^,]+/${base_encode:16,${eval:${${re:0}.bg}}}/my_bgs /$/,${base_encode:16,default}/my_bgs /([^,]+)(,|$)/${define:my_fg,${eval:${${re:1}.fg}}}${define:my_bg,${base_decode:16,${split:${re:repl_index},,,${my_bgs}}}}${define:my_sep,${eval:${${re:1}.sep}}}${define:my_min,${eval:${${re:1}.min}}}${define:my_max,${eval:${${re:1}.max}}}${define:my_max,${if:${my_max}!~^[1-9][0-9]*$?0:${my_max}}}${define:my_no_space,${eval_cond:${${re:1}.no_space}}}${define:my_no_space_before,${eval_cond:${${re:1}.no_space_before}}}${define:my_no_space_after,${eval_cond:${${re:1}.no_space_after}}}${define:my_content,${eval:${${re:1}.content}}}${define:my_content,${cutscr:+${if:${my_max}==0?${calc:${lengthscr:${my_content}}+1}:${my_max}},…,${my_content}}${repeat:${calc:${my_min}-${lengthscr:${my_content}}}, }}${define:my_next_bg,${base_decode:16,${split:${calc:${re:repl_index}+1},,,${my_bgs}}}}${define:my_symbol,${if:${plugins.var.group_tools.chanmon.feature.powerline.disabled}==?${if:${color:${my_bg}}==${color:${my_next_bg}}?${color:${my_sep}}:${color:${my_bg},${my_next_bg}}}:${if:${color:${my_bg}}==${color:${my_next_bg}}?${color:${my_sep}}│}}}${color:${my_fg},${my_bg}}${if:${my_no_space}==&&${my_no_space_before}==? }${my_content}${color:${my_fg},${my_bg}}${if:${my_no_space}==&&${my_no_space_after}==? }${my_symbol}${color:reset}/my_list /.+/${re:0} /my_list /.*/${tg_tags}/my_tags / //my_tags /.*/${my_list}${tg_message}/my_message" /trigger set chanmon_monitor command "/print -newbuffer chanmon -tags ${my_tags} \t${my_message}" this trigger create the chanmon monitor @@ -654,15 +654,13 @@ this trigger create the chanmon monitor the commands above set some buffer properties for our new monitor buffer /group_tools add chanmon segment date min "5" max "5" fg "white" bg "233" sep "246" content "${cut:5,,${split:-1,T ,,${tg_date}}}" no_space_before "1" conditions "1" /group_tools add chanmon segment symbol min "0" max "0" fg "white" bg "white" sep "246" content "" no_space "1" conditions "1" /group_tools add chanmon segment serv min "2" max "2" fg "white" bg "24" sep "246" content "${server}" conditions "1" /group_tools add chanmon segment chan min "4" max "4" fg "white" bg "24" sep "246" content "${split:1,#,keep_eol+strip_left,${channel}}" conditions "1" /group_tools add chanmon segment nick min "5" max "5" fg "white" bg "24" sep "246" content "${if:${tg_tags}=~,irc_action,? *:${tg_tag_nick}}" conditions "1" /group_tools add chanmon segment symbol min "0" max "0" fg "white" bg "white" sep "246" content "" no_space "1" conditions "1" /group_tools set chanmon list header list date,symbol,serv,chan,nick the commands above create a powerline bar to be displayed in front of the messages in the monitor buffer @@ -685,7 +683,7 @@ Dependencies: /trigger addreplace highmon_monitor print "*;irc_privmsg,matrix_message,matrix_text" /trigger set highmon_monitor conditions "${tg_highlight} == 1 && ${buffer.local_variables.type} == channel && ${buffer.local_variables.no_highmon_like} == && (${plugins.var.group_tools.highmon.feature.allow_filtered_lines.enabled} != || ${tg_displayed} !=) && (${plugins.var.group_tools.highmon.feature.allow_hidden_channels.enabled} != || ${buffer.hidden} ==)" /trigger set highmon_monitor regex "/.*/${plugins.var.group_tools.highmon.list.header.list}/my_list /[^,]+/${if:${re:0}=~^[abcdefghijklmnopqrstuvwxyz0-9_]+$?${re:0}}/my_list /[^,]+/plugins.var.group_tools.highmon.segment.${re:0}/my_list /[^,]+/${if:${length:${${re:0}.conditions}}==||${eval_cond:${${re:0}.conditions}}?${re:0}}/my_list /,+/,/my_list /^,|,$//my_list /.*/${my_list}/my_bgs /[^,]+/${base_encode:16,${eval:${${re:0}.bg}}}/my_bgs /$/,${base_encode:16,default}/my_bgs /([^,]+)(,|$)/${define:my_fg,${eval:${${re:1}.fg}}}${define:my_bg,${base_decode:16,${split:${re:repl_index},,,${my_bgs}}}}${define:my_sep,${eval:${${re:1}.sep}}}${define:my_min,${eval:${${re:1}.min}}}${define:my_max,${eval:${${re:1}.max}}}${define:my_max,${if:${my_max}!~^[1-9][0-9]*$?0:${my_max}}}${define:my_no_space,${eval_cond:${${re:1}.no_space}}}${define:my_no_space_before,${eval_cond:${${re:1}.no_space_before}}}${define:my_no_space_after,${eval_cond:${${re:1}.no_space_after}}}${define:my_content,${eval:${${re:1}.content}}}${define:my_content,${cutscr:+${if:${my_max}==0?${calc:${lengthscr:${my_content}}+1}:${my_max}},…,${my_content}}${repeat:${calc:${my_min}-${lengthscr:${my_content}}}, }}${define:my_next_bg,${base_decode:16,${split:${calc:${re:repl_index}+1},,,${my_bgs}}}}${define:my_symbol,${if:${plugins.var.group_tools.highmon.feature.powerline.disabled}==?${if:${color:${my_bg}}==${color:${my_next_bg}}?${color:${my_sep}}:${color:${my_bg},${my_next_bg}}}:${if:${color:${my_bg}}==${color:${my_next_bg}}?${color:${my_sep}}│}}}${color:${my_fg},${my_bg}}${if:${my_no_space}==&&${my_no_space_before}==? }${my_content}${color:${my_fg},${my_bg}}${if:${my_no_space}==&&${my_no_space_after}==? }${my_symbol}${color:reset}/my_list /.+/${re:0} /my_list /.*/${tg_tags}/my_tags / //my_tags /.*/${my_list}${tg_message}/my_message" /trigger set highmon_monitor command "/print -newbuffer highmon -tags ${my_tags} \t${my_message}" this trigger create the highmon monitor @@ -700,11 +698,12 @@ this trigger create the highmon monitor the commands above set some buffer properties for our new monitor buffer /group_tools set highmon feature allow_hidden_channels enabled 1 /group_tools add highmon segment date min "5" max "5" fg "white" bg "233" sep "246" content "${cut:5,,${split:-1,T ,,${tg_date}}}" no_space_before "1" conditions "1" /group_tools add highmon segment symbol min "0" max "0" fg "white" bg "white" sep "246" content "" no_space "1" conditions "1" /group_tools add highmon segment serv min "2" max "2" fg "white" bg "24" sep "246" content "${server}" conditions "1" /group_tools add highmon segment chan min "4" max "4" fg "white" bg "24" sep "246" content "${split:1,#,keep_eol+strip_left,${channel}}" conditions "1" /group_tools add highmon segment nick min "5" max "5" fg "white" bg "24" sep "246" content "${if:${tg_tags}=~,irc_action,? *:${tg_tag_nick}}" conditions "1" /group_tools set highmon list header list date,symbol,serv,chan,nick the commands above create a powerline bar to be displayed in front of the messages in the monitor buffer @@ -727,7 +726,7 @@ Dependencies: /trigger addreplace newsmon_monitor print "irc.libera.##news;irc_privmsg,debug_newsmon" /trigger set newsmon_monitor conditions "(${plugins.var.group_tools.newsmon.feature.allow_filtered_lines.enabled} != || ${tg_displayed} !=) && ${tg_message_nocolor} =~ ^\[[^]|]+\] +[^ ].* +→ +https?://[^ ]+$" /trigger set newsmon_monitor regex "/.*/${info:newsmon_parse,site_and_sections,${tg_message_nocolor}}/my_site_and_sections /.*/${split:1,|,,${my_site_and_sections}}/my_site /.*/${split:2,|,,${my_site_and_sections}}/my_first_section /.*/${split:3,|,,${my_site_and_sections}}/my_second_section /.*/${info:newsmon_parse,title,${tg_message_nocolor}}/my_title /.*/${info:newsmon_parse,url,${tg_message_nocolor}}/my_url /.*/${plugins.var.group_tools.newsmon.list.header.list}/my_list /[^,]+/${if:${re:0}=~^[abcdefghijklmnopqrstuvwxyz0-9_]+$?${re:0}}/my_list /[^,]+/plugins.var.group_tools.newsmon.segment.${re:0}/my_list /[^,]+/${if:${length:${${re:0}.conditions}}==||${eval_cond:${${re:0}.conditions}}?${re:0}}/my_list /,+/,/my_list /^,|,$//my_list /.*/${my_list}/my_bgs /[^,]+/${base_encode:16,${eval:${${re:0}.bg}}}/my_bgs /$/,${base_encode:16,default}/my_bgs /([^,]+)(,|$)/${define:my_fg,${eval:${${re:1}.fg}}}${define:my_bg,${base_decode:16,${split:${re:repl_index},,,${my_bgs}}}}${define:my_sep,${eval:${${re:1}.sep}}}${define:my_min,${eval:${${re:1}.min}}}${define:my_max,${eval:${${re:1}.max}}}${define:my_max,${if:${my_max}!~^[1-9][0-9]*$?0:${my_max}}}${define:my_no_space,${eval_cond:${${re:1}.no_space}}}${define:my_no_space_before,${eval_cond:${${re:1}.no_space_before}}}${define:my_no_space_after,${eval_cond:${${re:1}.no_space_after}}}${define:my_content,${eval:${${re:1}.content}}}${define:my_content,${cutscr:+${if:${my_max}==0?${calc:${lengthscr:${my_content}}+1}:${my_max}},…,${my_content}}${repeat:${calc:${my_min}-${lengthscr:${my_content}}}, }}${define:my_next_bg,${base_decode:16,${split:${calc:${re:repl_index}+1},,,${my_bgs}}}}${define:my_symbol,${if:${plugins.var.group_tools.newsmon.feature.powerline.disabled}==?${if:${color:${my_bg}}==${color:${my_next_bg}}?${color:${my_sep}}:${color:${my_bg},${my_next_bg}}}:${if:${color:${my_bg}}==${color:${my_next_bg}}?${color:${my_sep}}│}}}${color:${my_fg},${my_bg}}${if:${my_no_space}==&&${my_no_space_before}==? }${my_content}${color:${my_fg},${my_bg}}${if:${my_no_space}==&&${my_no_space_after}==? }${my_symbol}${color:reset}/my_list /.+/${re:0} /my_list /.*/${tg_tags}/my_tags / //my_tags /.*/${my_list}${my_title}${if:${plugins.var.group_tools.newsmon.feature.keep_url.enabled}!=? → ${my_url}}/my_message" /trigger set newsmon_monitor command "/print -newbuffer newsmon -tags ${my_tags} \t${my_message}" this trigger create the newsmon monitor @@ -758,7 +757,7 @@ this trigger recreate the filters for the source buffer (irc.libera.##news) and this trigger recreate the tags option of a site_* or no_site_+ option /trigger addreplace newsmon_item_rebuild config "plugins.var.group_tools.newsmon_interest.list.all.list;plugins.var.group_tools.newsmon_interest.list.newsmon.list" /trigger set newsmon_item_rebuild regex "/.*/${plugins.var.group_tools.newsmon_interest.list.all.list}/my_content /[^,]+/${if:${re:0}=~^[abcdefghijklmnopqrstuvwxyz0-9_]+$?${re:0}}/my_content /,+/,/my_content /^,|,$//my_content /([^,]+),?/${define:my_display,${plugins.var.group_tools.newsmon_interest.category.${re:1}.display}}${define:my_display,${if:${length:${my_display}}==?${re:1}:${my_display}}}${define:my_color,${if:,${plugins.var.group_tools.newsmon_interest.list.newsmon.list},=-,${re:1},?white:233}}${color:${my_color}}${color:darkgray,${my_color}}${cutscr:+5,…,${my_display}}${color:reset}${color:${my_color}}\n/my_content /.*/${base_encode:16,${my_content}}/my_item" /trigger set newsmon_item_rebuild command "/mute -core /set plugins.var.group_tools.newsmon_interest.item.newsmon_interest.encoded '${my_item}';/item refresh newsmon_interest" this trigger rebuild the bar item newsmon_interest @@ -810,9 +809,9 @@ the commands above set some buffer properties for our new monitor buffer the command above create a new bar item /group_tools set newsmon all general colors 1,3,4,5,6,9,10,13,17,22,23,25,27,33,53,55,57,63,93,94,124,129,130 /group_tools add newsmon segment site_name min "0" max "${calc:10+${if:${lengthscr:${my_first_section}}==?4:${if:${lengthscr:${my_first_section}}<7?7-${lengthscr:${my_first_section}}}}}" fg "white" bg "${info:nick_color_name,${base_encode:16,${my_site_and_sections}};${plugins.var.group_tools.newsmon.all.general.colors}}" sep "white" content "${my_site}" no_space_before "1" /group_tools add newsmon segment site_first_section min "0" max "${calc:7+${if:${lengthscr:${my_site}}<10?10-${lengthscr:${my_site}}}}" fg "white" bg "${info:nick_color_name,${base_encode:16,${my_site_and_sections}};${plugins.var.group_tools.newsmon.all.general.colors}}" sep "white" content "${my_first_section}" conditions "${my_first_section}!=" /group_tools add newsmon segment site_no_first_section min "0" max "${calc:7+${if:${lengthscr:${my_site}}<10?10-${lengthscr:${my_site}}}}" fg "white" bg "${info:nick_color_name,${base_encode:16,${my_site_and_sections}};${plugins.var.group_tools.newsmon.all.general.colors}}" sep "white" content "N/A" conditions "${my_first_section}==" /group_tools set newsmon list header list site_name,site_first_section,site_no_first_section the commands above create a powerline bar to be displayed in front of the messages in the monitor buffer @@ -875,7 +874,7 @@ Dependencies: *** /item addreplace new_logo_weechat_logo "" "${define:my_green,240}${define:my_blue,24}${define:my_left_margin,${repeat:${calc:(${weechat.bar.buflist.size}-13)//2}, }}${my_left_margin}${color:${my_green}}${color:,${my_green}} ${color:reset}${\n}${my_left_margin}${color:${my_green}}▀▀▀ ${color:${my_blue}}▄▄▄ ▄▄▄${\n}${my_left_margin}${color:${my_blue}}▇▇▇ ${color:${my_blue},${my_blue}} ${color:reset} ${color:${my_blue},${my_blue}} ${color:reset}${\n}${my_left_margin}${color:${my_blue},${my_blue}} ${color:reset} ${color:${my_blue},${my_blue}} ${color:reset} ${color:${my_blue},${my_blue}} ${color:reset}${\n}${my_left_margin}${color:${my_blue}}${color:,${my_blue}} ${color:reset}" /item addreplace new_logo_empty_line "" " " /item addreplace new_logo_separator "" "${color:31}${repeat:${weechat.bar.buflist.size},─}" /item addreplace new_logo_weechat_version "" "${repeat:${calc:(${weechat.bar.buflist.size}-${length:${info:version}})//2}, }${color:*white}${info:version}" @@ -922,22 +921,23 @@ Dependencies: /trigger addreplace powerline_items_left_to_right_draw info "powerline_items_draw;powerline_items_left_to_right_draw" /trigger set powerline_items_left_to_right_draw conditions "${tg_arguments} =~ (?-i)^[${chars:alnum}_]+,([1-9][0-9]*)?$ && ${plugins.var.group_tools.powerline_items.list.${split:1,,,${tg_arguments}}.list} =~ ^([${chars:alnum}_]+,)*[${chars:alnum}_]+$" /trigger set powerline_items_left_to_right_draw regex "/.*/${split:1,,,${tg_arguments}}/my_item /.*/${info:window,${split:2,,,${tg_arguments}}}/my_window /^$/${window[gui_current_window]}/my_window /.*/${window[${my_window}].buffer}/my_buffer /.*/${plugins.var.group_tools.powerline_items.list.${my_item}.list}/tg_info /[^,]+/plugins.var.group_tools.powerline_items.segment.${re:0}/tg_info /[^,]+/${if:${length:${${re:0}.conditions}}==||${eval_cond:${${re:0}.conditions}}?${re:0}}/tg_info /,,+/,/tg_info /^,|,$//tg_info /.*/${tg_info}/my_bgs /[^,]+/${base_encode:16,${eval:${${re:0}.bg}}}/my_bgs /$/,${base_encode:16,bar_bg}/my_bgs /([^,]+)(,|$)/${define:my_fg,${eval:${${re:1}.fg}}}${define:my_bg,${base_decode:16,${split:${re:repl_index},,,${my_bgs}}}}${define:my_sep,${eval:${${re:1}.sep}}}${define:my_min,${eval:${${re:1}.min}}}${define:my_max,${eval:${${re:1}.max}}}${define:my_max,${if:${my_max}!~^[1-9][0-9]*$?0:${my_max}}}${define:my_no_space,${eval_cond:${${re:1}.no_space}}}${define:my_no_space_before,${eval_cond:${${re:1}.no_space_before}}}${define:my_no_space_after,${eval_cond:${${re:1}.no_space_after}}}${define:my_content,${eval:${${re:1}.content}}}${define:my_content,${cutscr:+${if:${my_max}==0?${calc:${lengthscr:${my_content}}+1}:${my_max}},…,${my_content}}${repeat:${calc:${my_min}-${lengthscr:${my_content}}}, }}${define:my_next_bg,${base_decode:16,${split:${calc:${re:repl_index}+1},,,${my_bgs}}}}${define:my_symbol,${if:${plugins.var.group_tools.powerline_items.feature.powerline.disabled}==?${if:${color:${my_bg}}==${color:${my_next_bg}}?${color:${my_sep}}:${if:${re:repl_index}==${split:count,,,${tg_info}}?${color:${my_bg}}${color:${my_next_bg}}:${color:${my_bg},${my_next_bg}}}}:${if:${color:${my_bg}}==${color:${my_next_bg}}?${color:${my_sep}}│}}}${color:${my_fg},${my_bg}}${if:${my_no_space}==&&${my_no_space_before}==? }${my_content}${color:${my_fg},${my_bg}}${if:${my_no_space}==&&${my_no_space_after}==? }${my_symbol}/tg_info" /trigger addreplace powerline_items_right_to_left_draw info "powerline_items_right_to_left_draw" /trigger set powerline_items_right_to_left_draw conditions "${tg_arguments} =~ (?-i)^[${chars:alnum}_]+,([1-9][0-9]*)?$ && ${plugins.var.group_tools.powerline_items.list.${split:1,,,${tg_arguments}}.list} =~ ^([${chars:alnum}_]+,)*[${chars:alnum}_]+$" /trigger set powerline_items_right_to_left_draw regex "/.*/${split:1,,,${tg_arguments}}/my_item /.*/${info:window,${split:2,,,${tg_arguments}}}/my_window /^$/${window[gui_current_window]}/my_window /.*/${window[${my_window}].buffer}/my_buffer /.*/${plugins.var.group_tools.powerline_items.list.${my_item}.list}/tg_info /[^,]+/plugins.var.group_tools.powerline_items.segment.${re:0}/tg_info /[^,]+/${if:${length:${${re:0}.conditions}}==||${eval_cond:${${re:0}.conditions}}?${re:0}}/tg_info /,,+/,/tg_info /^,|,$//tg_info /.*/${tg_info}/my_bgs /[^,]+/${base_encode:16,${eval:${${re:0}.bg}}}/my_bgs /.*/${base_encode:16,bar_bg},${re:0}/my_bgs /([^,]+)(,|$)/${define:my_fg,${eval:${${re:1}.fg}}}${define:my_bg,${base_decode:16,${split:${calc:${re:repl_index}+1},,,${my_bgs}}}}${define:my_sep,${eval:${${re:1}.sep}}}${define:my_min,${eval:${${re:1}.min}}}${define:my_max,${eval:${${re:1}.max}}}${define:my_max,${if:${my_max}!~^[1-9][0-9]*$?0:${my_max}}}${define:my_no_space,${eval_cond:${${re:1}.no_space}}}${define:my_no_space_before,${eval_cond:${${re:1}.no_space_before}}}${define:my_no_space_after,${eval_cond:${${re:1}.no_space_after}}}${define:my_content,${eval:${${re:1}.content}}}${define:my_content,${cutscr:+${if:${my_max}==0?${calc:${lengthscr:${my_content}}+1}:${my_max}},…,${my_content}}${repeat:${calc:${my_min}-${lengthscr:${my_content}}}, }}${define:my_prev_bg,${base_decode:16,${split:${re:repl_index},,,${my_bgs}}}}${define:my_symbol,${if:${plugins.var.group_tools.powerline_items.feature.powerline.disabled}==?${if:${color:${my_bg}}==${color:${my_prev_bg}}?${color:${my_sep}}:${if:${re:repl_index}==${split:count,,,${tg_info}}?${color:${my_bg}}${color:${my_next_bg}}:${color:${my_bg},${my_next_bg}}}}:${if:${color:${my_bg}}==${color:${my_prev_bg}}?${color:${my_sep}}│}}}${my_symbol}${color:${my_fg},${my_bg}}${if:${my_no_space}==&&${my_no_space_before}==? }${my_content}${color:${my_fg},${my_bg}}${if:${my_no_space}==&&${my_no_space_after}==? }/tg_info" The triggers above redraw the powerline_items_weechat_info and powerline_items_sys_usage /group_tools add powerline_items segment time fg "white" bg "233" min 0 max 0 sep "246" content "${date:%H:%M}" no_space_before "1" /group_tools add powerline_items segment symbol fg "white" bg "white" min 0 max 0 sep "246" content "" no_space "1" /group_tools add powerline_items segment buffer_plugin_server fg "white" bg "24" min 0 max 0 sep "246" content "${color:white}${if:${buffer[${my_buffer}].plugin_name_for_upgrade}!=?${buffer[${my_buffer}].plugin_name_for_upgrade}:${if:${length:${buffer[${my_buffer}].plugin.name}}!=?${buffer[${my_buffer}].plugin.name}:core}}${if:${buffer[${my_buffer}].local_variables.server}!=?${color:246}/${color:white}${buffer[${my_buffer}].local_variables.server}}" /group_tools add powerline_items segment buffer_info fg "white" bg "236" min 0 max 0 sep "246" content "${color:white}${buffer[${my_buffer}].number}${color:246}:${color:*white}${buffer[${my_buffer}].short_name}${if:${length:${buffer[${my_buffer}].modes}}!=?${color:246}(${color:white}${split:1, ,,${buffer[${my_buffer}].modes}}${if:${buffer[${my_buffer}].modes}=~[ ]? …}${color:246})}${if:${buffer[${my_buffer}].nicklist}!=?${color:246}${\x7b}${color:white}${buffer[${my_buffer}].nicklist_nicks_count}${color:246}${\x7d}}${if:${buffer[${my_buffer}].active}==2?!}${if:${buffer[${my_buffer}].lines.lines_hidden}!=?•}" /group_tools add powerline_items segment cpu fg "white" bg "236" min 0 max 0 sep "246" content "${color:246}▣ ${color:white}${define:my_cpu_percent,${info:python_eval,import psutil;print(psutil.cpu_percent(interval=0.0,percpu=False))}}${define:my_cpu_percent,${if:${my_cpu_percent}==100.0?100:${if:${my_cpu_percent}!~^[0-9]+(.[0-9]+)$?N/A:${my_cpu_percent}}}} ${if:${length:${my_cpu_percent}}<4? }${my_cpu_percent}" /group_tools add powerline_items segment mem fg "white" bg "24" min 0 max 0 sep "246" content "${color:246}▬ ${color:white}${define:my_mem_percent,${info:python_eval,import psutil;print(psutil.virtual_memory().percent)}}${define:my_mem_percent,${if:${my_mem_percent}==100.0?100:${if:${my_mem_percent}!~^[0-9]+(.[0-9]+)$?N/A:${my_mem_percent}}}} ${if:${length:${my_mem_percent}}<4? }${my_mem_percent}" /group_tools add powerline_items segment swap fg "white" bg "233" min 0 max 0 sep "246" content "${color:246}⎘ ${color:white}${define:my_swap_percent,${info:python_eval,import psutil;print(psutil.swap_memory().percent)}}${define:my_swap_percent,${if:${my_swap_percent}==100.0?100:${if:${my_swap_percent}!~^[0-9]+(.[0-9]+)$?N/A:${my_swap_percent}}}} ${if:${length:${my_swap_percent}}<4? }${my_swap_percent}" no_space_after "1" THe previous group_tools commands create 7 segments for us to use /group_tools set powerline_items list weechat_info list time,buffer_plugin_server,buffer_info @@ -1574,17 +1574,17 @@ Dependencies: /set weechat.color.bar_more 229 /set weechat.color.chat_highlight lightred /set weechat.color.chat_highlight_bg default /set weechat.color.chat_host 24 /set weechat.color.chat_nick_colors "cyan,magenta,green,brown,lightblue,lightcyan,lightmagenta,lightgreen,blue" /set weechat.color.chat_prefix_join 121 /set weechat.color.chat_prefix_more 24 /set weechat.color.chat_prefix_quit 131 /set weechat.color.chat_prefix_suffix 24 /set weechat.color.chat_read_marker 24 /set weechat.color.chat_time 239 /set weechat.color.chat_delimiters 24 /set weechat.color.eval_syntax_colors "229,179,228,178" /set weechat.color.separator 24 /set weechat.color.status_data_highlight 163 /set weechat.color.status_data_msg 229 /set weechat.color.status_data_private 121 -
pascalpoitras revised this gist
Jul 3, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -933,7 +933,7 @@ The triggers above redraw the powerline_items_weechat_info and powerline_items_s /group_tools add powerline_items segment time fg "white" bg "233" min 0 max 0 sep "246" content "${date:%H:%M}" /group_tools add powerline_items segment buffer_plugin_server fg "white" bg "24" min 0 max 0 sep "246" content "${color:white}${if:${buffer[${my_buffer}].plugin_name_for_upgrade}!=?${buffer[${my_buffer}].plugin_name_for_upgrade}:${if:${length:${buffer[${my_buffer}].plugin.name}}!=?${buffer[${my_buffer}].plugin.name}:core}}${if:${buffer[${my_buffer}].local_variables.server}!=?${color:246}/${color:white}${buffer[${my_buffer}].local_variables.server}}" /group_tools add powerline_items segment buffer_info fg "white" bg "236" min 0 max 0 sep "246" content "${color:white}${buffer[${my_buffer}].number}${color:246}:${color:*white}${buffer[${my_buffer}].short_name}${if:${length:${buffer[${my_buffer}].modes}}!=?${color:246}(${color:white}${split:1, ,,${buffer[${my_buffer}].modes}}${if:${buffer[${my_buffer}].modes}=~[ ]? …}${color:246})}${if:${buffer[${my_buffer}].nicklist}!=?${color:246}${\x7b}${color:white}${buffer[${my_buffer}].nicklist_nicks_count}${color:246}${\x7d}}${if:${buffer[${my_buffer}].active}==2?!}${if:${buffer[${my_buffer}].lines.lines_hidden}!=?•}" /group_tools add powerline_items segment cpu fg "white" bg "236" min 0 max 0 sep "246" content "${color:246}▣ ${color:white}${define:my_cpu_percent,${info:python_eval,import psutil;print(psutil.cpu_percent(interval=0.0,percpu=False))}}${define:my_cpu_percent,${if:${my_cpu_percent}==100.0?100:${if:${my_cpu_percent}!~^[0-9]+(.[0-9]+)$?N/A:${my_cpu_percent}}}} ${if:${length:${my_cpu_percent}}<4? }${my_cpu_percent}" /group_tools add powerline_items segment mem fg "white" bg "24" min 0 max 0 sep "246" content "${color:246}▬ ${color:white}${define:my_mem_percent,${info:python_eval,import psutil;print(psutil.virtual_memory().percent)}}${define:my_mem_percent,${if:${my_mem_percent}==100.0?100:${if:${my_mem_percent}!~^[0-9]+(.[0-9]+)$?N/A:${my_mem_percent}}}} ${if:${length:${my_mem_percent}}<4? }${my_mem_percent}" /group_tools add powerline_items segment swap fg "white" bg "233" min 0 max 0 sep "246" content "${color:246}⎘ ${color:white}${define:my_swap_percent,${info:python_eval,import psutil;print(psutil.swap_memory().percent)}}${define:my_swap_percent,${if:${my_swap_percent}==100.0?100:${if:${my_swap_percent}!~^[0-9]+(.[0-9]+)$?N/A:${my_swap_percent}}}} ${if:${length:${my_swap_percent}}<4? }${my_swap_percent}" -
pascalpoitras revised this gist
Jul 3, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -909,7 +909,7 @@ Dependencies: *** /trigger addreplace powerline_items_weechat_info_refresh_signals signal "buffer_closed;buffer_lines_hidden;buffer_modes_changed;buffer_moved;buffer_opened;buffer_renamed;buffer_switch;buffer_unzoomed;buffer_zoomed;filters_*;nicklist_*;window_closed;window_switch" /trigger set powerline_items_weechat_info_refresh_signals command "/item refresh powerline_items_weechat_info" /trigger addreplace powerline_items_refresh_configs config "plugins.var.group_tools.powerline_items.*" /trigger set powerline_items_refresh_configs command "/item refresh powerline_items_*" -
pascalpoitras revised this gist
Jul 2, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1588,7 +1588,7 @@ Dependencies: /set weechat.color.status_data_highlight 163 /set weechat.color.status_data_msg 229 /set weechat.color.status_data_private 121 /set weechat.color.status_more *white /set weechat.color.status_name 121 /set weechat.color.status_name_tls 121 /set weechat.color.status_time white -
pascalpoitras revised this gist
Jul 2, 2024 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -908,10 +908,10 @@ Dependencies: *** /trigger addreplace powerline_items_weechat_info_refresh_signals signal "buffer_closed;buffer_lines_hidden;buffer_modes_changed;buffer_moved;buffer_opened;buffer_renamed;buffer_switch;buffer_unzoomed;buffer_zoomed;filters_*;nicklist_*;window_closed;window_switch" /trigger set powerline_items_refresh_signals command "/item refresh powerline_items_weechat_info" /trigger addreplace powerline_items_refresh_configs config "plugins.var.group_tools.powerline_items.*" /trigger set powerline_items_refresh_configs command "/item refresh powerline_items_*" /trigger addreplace powerline_items_weechat_info_refresh_timer timer "60000;60;0" -
pascalpoitras revised this gist
Jul 2, 2024 . 1 changed file with 62 additions and 48 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@  ## Mouse @@ -512,8 +512,6 @@ this is our favorite_buffer item /bar addreplace favorite_buffer_bottom window bottom 1 1 spacer,favorite_buffer,spacer /bar set favorite_buffer_bottom priority 499 /bar set favorite_buffer_bottom conditions ${window.number} == 1 the favorite_buffer_bottom bar is displayed in window number 1 only @@ -523,6 +521,10 @@ the favorite_buffer_bottom bar is displayed in window number 1 only the favorite_buffer_top bar is displayed in any window except the first one /bar addreplace separator_between_status_and_favorite root bottom 1 0 separator_between_status_and_favorite the bar above is used to use a different symbol than weechat.look.separator_horizontal. By default the item assigned to the bar doesn't exist, use /item in combination with ${repeat:...} to set something /favorite_buffer add 1 core.weechat /favorite_buffer add 2 core.chanmon /favorite_buffer add 2 core.highmon @@ -583,25 +585,6 @@ ___ *** ### input Dependencies: @@ -611,7 +594,7 @@ Dependencies: *** /bar addreplace input root bottom 0 0 [input_search],[input_paste],input_text /bar set input priority 1000 ___ @@ -646,7 +629,7 @@ Dependencies: Dependencies: - WeeChat: 4.4.0 - Plugins: trigger - Triggers: utils_group_tools <!-- ending list --> @@ -655,7 +638,7 @@ Dependencies: /trigger addreplace chanmon_monitor print "*;irc_privmsg,matrix_message,matrix_text" /trigger set chanmon_monitor conditions "${buffer.local_variables.type} == channel && ${buffer.local_variables.no_chanmon_like} == && (${plugins.var.group_tools.chanmon.feature.allow_filtered_lines.enabled} != || ${tg_displayed} !=) && (${plugins.var.group_tools.chanmon.feature.allow_hidden_channels.enabled} != || ${buffer.hidden} ==)" /trigger set chanmon_monitor regex "/.*/${plugins.var.group_tools.chanmon.list.header.list}/my_list /[^,]+/${if:${re:0}=~^[abcdefghijklmnopqrstuvwxyz0-9_]+$?${re:0}}/my_list /[^,]+/plugins.var.group_tools.chanmon.segment.${re:0}/my_list /[^,]+/${if:${length:${${re:0}.conditions}}==||${eval_cond:${${re:0}.conditions}}?${re:0}}/my_list /,+/,/my_list /^,|,$//my_list /.*/${my_list}/my_bgs /[^,]+/${base_encode:16,${eval:${${re:0}.bg}}}/my_bgs /$/,${base_encode:16,default}/my_bgs /([^,]+)(,|$)/${define:my_fg,${eval:${${re:1}.fg}}}${define:my_bg,${base_decode:16,${split:${re:repl_index},,,${my_bgs}}}}${define:my_sep,${eval:${${re:1}.sep}}}${define:my_min,${eval:${${re:1}.min}}}${define:my_max,${eval:${${re:1}.max}}}${define:my_max,${if:${my_max}!~^[1-9][0-9]*$?0:${my_max}}}${define:my_content,${eval:${${re:1}.content}}}${define:my_content,${cutscr:+${if:${my_max}==0?${calc:${lengthscr:${my_content}}+1}:${my_max}},…,${my_content}}${repeat:${calc:${my_min}-${lengthscr:${my_content}}}, }}${define:my_next_bg,${base_decode:16,${split:${calc:${re:repl_index}+1},,,${my_bgs}}}}${define:my_symbol,${if:${plugins.var.group_tools.chanmon.feature.powerline.disabled}==?${if:${color:${my_bg}}==${color:${my_next_bg}}?${color:${my_sep}}:${color:${my_bg},${my_next_bg}}}:${if:${color:${my_bg}}==${color:${my_next_bg}}?${color:${my_sep}}│}}}${color:${my_fg},${my_bg}} ${my_content}${color:${my_fg},${my_bg}} ${my_symbol}${color:reset}/my_list /.+/${re:0} /my_list /.*/${tg_tags}/my_tags / //my_tags /.*/${my_list}${tg_message}/my_message" /trigger set chanmon_monitor command "/print -newbuffer chanmon -tags ${my_tags} \t${my_message}" this trigger create the chanmon monitor @@ -671,7 +654,6 @@ this trigger create the chanmon monitor the commands above set some buffer properties for our new monitor buffer /group_tools add chanmon segment date min "5" max "5" fg "white" bg "24" sep "24" content "${color:underline}${cut:5,,${split:-1,T ,,${tg_date}}}" conditions "${tg_highlight}==" /group_tools add chanmon segment serv min "2" max "2" fg "white" bg "31" sep "24" content "${color:underline}${server}" conditions "${tg_highlight}==" /group_tools add chanmon segment chan min "4" max "4" fg "white" bg "31" sep "24" content "${color:underline}${split:1,#,keep_eol+strip_left,${channel}}" conditions "${tg_highlight}==" @@ -694,7 +676,7 @@ ___ Dependencies: - WeeChat: 4.4.0 - Plugins: trigger - Triggers: utils_group_tools <!-- ending list --> @@ -703,7 +685,7 @@ Dependencies: /trigger addreplace highmon_monitor print "*;irc_privmsg,matrix_message,matrix_text" /trigger set highmon_monitor conditions "${tg_highlight} == 1 && ${buffer.local_variables.type} == channel && ${buffer.local_variables.no_highmon_like} == && (${plugins.var.group_tools.highmon.feature.allow_filtered_lines.enabled} != || ${tg_displayed} !=) && (${plugins.var.group_tools.highmon.feature.allow_hidden_channels.enabled} != || ${buffer.hidden} ==)" /trigger set highmon_monitor regex "/.*/${plugins.var.group_tools.chanmon.list.header.list}/my_list /[^,]+/${if:${re:0}=~^[abcdefghijklmnopqrstuvwxyz0-9_]+$?${re:0}}/my_list /[^,]+/plugins.var.group_tools.chanmon.segment.${re:0}/my_list /[^,]+/${if:${length:${${re:0}.conditions}}==||${eval_cond:${${re:0}.conditions}}?${re:0}}/my_list /,+/,/my_list /^,|,$//my_list /.*/${my_list}/my_bgs /[^,]+/${base_encode:16,${eval:${${re:0}.bg}}}/my_bgs /$/,${base_encode:16,default}/my_bgs /([^,]+)(,|$)/${define:my_fg,${eval:${${re:1}.fg}}}${define:my_bg,${base_decode:16,${split:${re:repl_index},,,${my_bgs}}}}${define:my_sep,${eval:${${re:1}.sep}}}${define:my_min,${eval:${${re:1}.min}}}${define:my_max,${eval:${${re:1}.max}}}${define:my_max,${if:${my_max}!~^[1-9][0-9]*$?0:${my_max}}}${define:my_content,${eval:${${re:1}.content}}}${define:my_content,${cutscr:+${if:${my_max}==0?${calc:${lengthscr:${my_content}}+1}:${my_max}},…,${my_content}}${repeat:${calc:${my_min}-${lengthscr:${my_content}}}, }}${define:my_next_bg,${base_decode:16,${split:${calc:${re:repl_index}+1},,,${my_bgs}}}}${define:my_symbol,${if:${plugins.var.group_tools.chanmon.feature.powerline.disabled}==?${if:${color:${my_bg}}==${color:${my_next_bg}}?${color:${my_sep}}:${color:${my_bg},${my_next_bg}}}:${if:${color:${my_bg}}==${color:${my_next_bg}}?${color:${my_sep}}│}}}${color:${my_fg},${my_bg}} ${my_content}${color:${my_fg},${my_bg}} ${my_symbol}${color:reset}/my_list /.+/${re:0} /my_list /.*/${tg_tags}/my_tags / //my_tags /.*/${my_list}${tg_message}/my_message" /trigger set highmon_monitor command "/print -newbuffer highmon -tags ${my_tags} \t${my_message}" this trigger create the highmon monitor @@ -717,7 +699,7 @@ this trigger create the highmon monitor the commands above set some buffer properties for our new monitor buffer /group_tools set highmon feature allow_hidden_channels enabled 1 /group_tools add highmon segment date min "5" max "5" fg "white" bg "52" sep "52" content "${color:underline}${cut:5,,${split:-1,T ,,${tg_date}}}" conditions "${tg_highlight}!=" /group_tools add highmon segment serv min "2" max "2" fg "white" bg "124" sep "52" content "${color:underline}${server}" conditions "${tg_highlight}!=" /group_tools add highmon segment chan min "4" max "4" fg "white" bg "124" sep "52" content "${color:underline}${split:1,#,keep_eol+strip_left,${channel}}" conditions "${tg_highlight}!=" @@ -736,7 +718,7 @@ ___ Dependencies: - WeeChat: 4.4.0 - Plugins: trigger - Triggers: utils_group_tools <!-- ending list --> @@ -745,7 +727,7 @@ Dependencies: /trigger addreplace newsmon_monitor print "irc.libera.##news;irc_privmsg,debug_newsmon" /trigger set newsmon_monitor conditions "(${plugins.var.group_tools.newsmon.feature.allow_filtered_lines.enabled} != || ${tg_displayed} !=) && ${tg_message_nocolor} =~ ^\[[^]|]+\] +[^ ].* +→ +https?://[^ ]+$" /trigger set newsmon_monitor regex "/.*/${info:newsmon_parse,site_and_sections,${tg_message_nocolor}}/my_site_and_sections /.*/${split:1,|,,${my_site_and_sections}}/my_site /.*/${split:2,|,,${my_site_and_sections}}/my_first_section /.*/${split:3,|,,${my_site_and_sections}}/my_second_section /.*/${info:newsmon_parse,title,${tg_message_nocolor}}/my_title /.*/${info:newsmon_parse,url,${tg_message_nocolor}}/my_url /.*/${plugins.var.group_tools.newsmon.list.header.list}/my_list /[^,]+/${if:${re:0}=~^[abcdefghijklmnopqrstuvwxyz0-9_]+$?${re:0}}/my_list /[^,]+/plugins.var.group_tools.newsmon.segment.${re:0}/my_list /[^,]+/${if:${length:${${re:0}.conditions}}==||${eval_cond:${${re:0}.conditions}}?${re:0}}/my_list /,+/,/my_list /^,|,$//my_list /.*/${my_list}/my_bgs /[^,]+/${base_encode:16,${eval:${${re:0}.bg}}}/my_bgs /$/,${base_encode:16,default}/my_bgs /([^,]+)(,|$)/${define:my_fg,${eval:${${re:1}.fg}}}${define:my_bg,${base_decode:16,${split:${re:repl_index},,,${my_bgs}}}}${define:my_sep,${eval:${${re:1}.sep}}}${define:my_min,${eval:${${re:1}.min}}}${define:my_max,${eval:${${re:1}.max}}}${define:my_max,${if:${my_max}!~^[1-9][0-9]*$?0:${my_max}}}${define:my_content,${eval:${${re:1}.content}}}${define:my_content,${cutscr:+${if:${my_max}==0?${calc:${lengthscr:${my_content}}+1}:${my_max}},…,${my_content}}${repeat:${calc:${my_min}-${lengthscr:${my_content}}}, }}${define:my_next_bg,${base_decode:16,${split:${calc:${re:repl_index}+1},,,${my_bgs}}}}${define:my_symbol,${if:${plugins.var.group_tools.chanmon.feature.powerline.disabled}==?${if:${color:${my_bg}}==${color:${my_next_bg}}?${color:${my_sep}}:${color:${my_bg},${my_next_bg}}}:${if:${color:${my_bg}}==${color:${my_next_bg}}?${color:${my_sep}}│}}}${color:${my_fg},${my_bg}} ${my_content}${color:${my_fg},${my_bg}} ${my_symbol}${color:reset}/my_list /.+/${re:0} /my_list /.*/${tg_tags}/my_tags / //my_tags /.*/${my_list}${my_title}${if:${plugins.var.group_tools.newsmon.feature.keep_url.enabled}!=? → ${my_url}}/my_message" /trigger set newsmon_monitor command "/print -newbuffer newsmon -tags ${my_tags} \t${my_message}" this trigger create the newsmon monitor @@ -828,7 +810,6 @@ the commands above set some buffer properties for our new monitor buffer the command above create a new bar item /group_tools set newsmon all general colors 1,3,4,5,6,9,10,13,17,22,23,25,27,33,53,55,57,63,93,94,124,129,130 /group_tools add newsmon segment site_name min "0" max "${calc:10+${if:${lengthscr:${my_first_section}}==?4:${if:${lengthscr:${my_first_section}}<7?7-${lengthscr:${my_first_section}}}}}" fg "white" bg "${info:nick_color_name,${base_encode:16,${my_site_and_sections}};${plugins.var.group_tools.newsmon.all.general.colors}}" sep "white" content "${color:underline}${my_site}" /group_tools add newsmon segment site_first_section min "0" max "${calc:7+${if:${lengthscr:${my_site}}<10?10-${lengthscr:${my_site}}}}" fg "white" bg "${info:nick_color_name,${base_encode:16,${my_site_and_sections}};${plugins.var.group_tools.newsmon.all.general.colors}}" sep "white" content "${color:underline}${my_first_section}" conditions "${my_first_section}!=" /group_tools add newsmon segment site_no_first_section min "0" max "${calc:7+${if:${lengthscr:${my_site}}<10?10-${lengthscr:${my_site}}}}" fg "white" bg "${info:nick_color_name,${base_encode:16,${my_site_and_sections}};${plugins.var.group_tools.newsmon.all.general.colors}}" sep "white" content "${color:underline}N/A" conditions "${my_first_section}==" @@ -913,37 +894,70 @@ ___ *** ### powerline_items  Dependencies: - WeeChat: 4.4.0 - Plugins: python, trigger - PythonLib: psutil - Triggers: utils_group_tools <!-- ending list --> *** /trigger addreplace powerline_items_status_refresh_signals signal "buffer_closed;buffer_lines_hidden;buffer_modes_changed;buffer_moved;buffer_opened;buffer_renamed;buffer_switch;buffer_unzoomed;buffer_zoomed;filters_*;nicklist_*;window_closed;window_switch" /trigger set powerline_items_refresh_signals command "/item refresh powerline_items_weechat_info" /trigger addreplace powerline_items_refresh_configs config "plugins.var.group_tools.powerline_items.segment.*;plugins.var.group_tools.powerline_items.feature" /trigger set powerline_items_refresh_configs command "/item refresh powerline_items_*" /trigger addreplace powerline_items_weechat_info_refresh_timer timer "60000;60;0" /trigger set powerline_items_weechat_info_refresh_timer command "/item refresh powerline_items_weechat_info" /trigger addreplace powerline_items_sys_usage_refresh_timer timer "1000;0;0" /trigger set powerline_items_sys_usage_refresh_timer command "/item refresh powerline_items_sys_usage" /trigger addreplace powerline_items_left_to_right_draw info "powerline_items_draw;powerline_items_left_to_right_draw" /trigger set powerline_items_left_to_right_draw conditions "${tg_arguments} =~ (?-i)^[${chars:alnum}_]+,([1-9][0-9]*)?$ && ${plugins.var.group_tools.powerline_items.list.${split:1,,,${tg_arguments}}.list} =~ ^([${chars:alnum}_]+,)*[${chars:alnum}_]+$" /trigger set powerline_items_left_to_right_draw regex "/.*/${split:1,,,${tg_arguments}}/my_item /.*/${info:window,${split:2,,,${tg_arguments}}}/my_window /^$/${window[gui_current_window]}/my_window /.*/${window[${my_window}].buffer}/my_buffer /.*/${plugins.var.group_tools.powerline_items.list.${my_item}.list}/tg_info /[^,]+/plugins.var.group_tools.powerline_items.segment.${re:0}/tg_info /[^,]+/${if:${length:${${re:0}.conditions}}==||${eval_cond:${${re:0}.conditions}}?${re:0}}/tg_info /,,+/,/tg_info /^,|,$//tg_info /.*/${tg_info}/my_bgs /[^,]+/${base_encode:16,${eval:${${re:0}.bg}}}/my_bgs /$/,${base_encode:16,bar_bg}/my_bgs /([^,]+)(,|$)/${define:my_fg,${eval:${${re:1}.fg}}}${define:my_bg,${base_decode:16,${split:${re:repl_index},,,${my_bgs}}}}${define:my_sep,${eval:${${re:1}.sep}}}${define:my_min,${eval:${${re:1}.min}}}${define:my_max,${eval:${${re:1}.max}}}${define:my_max,${if:${my_max}!~^[1-9][0-9]*$?0:${my_max}}}${define:my_content,${eval:${${re:1}.content}}}${define:my_content,${cutscr:+${if:${my_max}==0?${calc:${lengthscr:${my_content}}+1}:${my_max}},…,${my_content}}${repeat:${calc:${my_min}-${lengthscr:${my_content}}}, }}${define:my_next_bg,${base_decode:16,${split:${calc:${re:repl_index}+1},,,${my_bgs}}}}${define:my_symbol,${if:${plugins.var.group_tools.powerline_items.feature.powerline.disabled}==?${if:${color:${my_bg}}==${color:${my_next_bg}}?${color:${my_sep}}:${if:${re:repl_index}==${split:count,,,${tg_info}}?${color:${my_bg}}${color:${my_next_bg}}:${color:${my_bg},${my_next_bg}}}}:${if:${color:${my_bg}}==${color:${my_next_bg}}?${color:${my_sep}}│}}}${color:${my_fg},${my_bg}}${if:${re:repl_index}>1? }${my_content}${color:${my_fg},${my_bg}} ${my_symbol}/tg_info" /trigger addreplace powerline_items_right_to_left_draw info "powerline_items_right_to_left_draw" /trigger set powerline_items_right_to_left_draw conditions "${tg_arguments} =~ (?-i)^[${chars:alnum}_]+,([1-9][0-9]*)?$ && ${plugins.var.group_tools.powerline_items.list.${split:1,,,${tg_arguments}}.list} =~ ^([${chars:alnum}_]+,)*[${chars:alnum}_]+$" /trigger set powerline_items_right_to_left_draw regex "/.*/${split:1,,,${tg_arguments}}/my_item /.*/${info:window,${split:2,,,${tg_arguments}}}/my_window /^$/${window[gui_current_window]}/my_window /.*/${window[${my_window}].buffer}/my_buffer /.*/${plugins.var.group_tools.powerline_items.list.${my_item}.list}/tg_info /[^,]+/plugins.var.group_tools.powerline_items.segment.${re:0}/tg_info /[^,]+/${if:${length:${${re:0}.conditions}}==||${eval_cond:${${re:0}.conditions}}?${re:0}}/tg_info /,,+/,/tg_info /^,|,$//tg_info /.*/${tg_info}/my_bgs /[^,]+/${base_encode:16,${eval:${${re:0}.bg}}}/my_bgs /.*/${base_encode:16,bar_bg},${re:0}/my_bgs /([^,]+)(,|$)/${define:my_fg,${eval:${${re:1}.fg}}}${define:my_bg,${base_decode:16,${split:${calc:${re:repl_index}+1},,,${my_bgs}}}}${define:my_sep,${eval:${${re:1}.sep}}}${define:my_min,${eval:${${re:1}.min}}}${define:my_max,${eval:${${re:1}.max}}}${define:my_max,${if:${my_max}!~^[1-9][0-9]*$?0:${my_max}}}${define:my_content,${eval:${${re:1}.content}}}${define:my_content,${cutscr:+${if:${my_max}==0?${calc:${lengthscr:${my_content}}+1}:${my_max}},…,${my_content}}${repeat:${calc:${my_min}-${lengthscr:${my_content}}}, }}${define:my_prev_bg,${base_decode:16,${split:${re:repl_index},,,${my_bgs}}}}${define:my_symbol,${if:${plugins.var.group_tools.powerline_items.feature.powerline.disabled}==?${if:${color:${my_bg}}==${color:${my_prev_bg}}?${color:${my_sep}}:${if:${re:repl_index}==${split:count,,,${tg_info}}?${color:${my_bg}}${color:${my_next_bg}}:${color:${my_bg},${my_next_bg}}}}:${if:${color:${my_bg}}==${color:${my_prev_bg}}?${color:${my_sep}}│}}}${my_symbol}${color:${my_fg},${my_bg}} ${my_content}${color:${my_fg},${my_bg}}${if:${re:repl_index}!=${split:count,,,${tg_info}}? }/tg_info" The triggers above redraw the powerline_items_weechat_info and powerline_items_sys_usage /group_tools add powerline_items segment time fg "white" bg "233" min 0 max 0 sep "246" content "${date:%H:%M}" /group_tools add powerline_items segment buffer_plugin_server fg "white" bg "24" min 0 max 0 sep "246" content "${color:white}${if:${buffer[${my_buffer}].plugin_name_for_upgrade}!=?${buffer[${my_buffer}].plugin_name_for_upgrade}:${if:${length:${buffer[${my_buffer}].plugin.name}}!=?${buffer[${my_buffer}].plugin.name}:core}}${if:${buffer[${my_buffer}].local_variables.server}!=?${color:246}/${color:white}${buffer[${my_buffer}].local_variables.server}}" /group_tools add powerline_items segment buffer_info fg "white" bg "236" min 0 max 0 sep "246" content "${color:white}${buffer[${my_buffer}].number}${color:246}:${color:*white}${buffer[${my_buffer}].short_name}${if:${length:${buffer[${my_buffer}].modes}}!=?${color:246}(${color:white}${split:1, ,,${buffer[${my_buffer}].modes}}${if:${buffer[${my_buffer}].modes}=~[ ]? …}${color:246})}${if:${buffer[${my_buffer}].nicklist}!=?${color:246}${\x7b}${color:white}${buffer[${my_buffer}].nicklist_nicks_count}${color:246}${\x7d}}${if:${buffer[${my_buffer}].active}==2?!}${if:${buffer[${my_buffer}].lines.lines_hidden}!=?•}" /group_tools add powerline_items segment cpu fg "white" bg "236" min 0 max 0 sep "246" content "${color:246}▣ ${color:white}${define:my_cpu_percent,${info:python_eval,import psutil;print(psutil.cpu_percent(interval=0.0,percpu=False))}}${define:my_cpu_percent,${if:${my_cpu_percent}==100.0?100:${if:${my_cpu_percent}!~^[0-9]+(.[0-9]+)$?N/A:${my_cpu_percent}}}} ${if:${length:${my_cpu_percent}}<4? }${my_cpu_percent}" /group_tools add powerline_items segment mem fg "white" bg "24" min 0 max 0 sep "246" content "${color:246}▬ ${color:white}${define:my_mem_percent,${info:python_eval,import psutil;print(psutil.virtual_memory().percent)}}${define:my_mem_percent,${if:${my_mem_percent}==100.0?100:${if:${my_mem_percent}!~^[0-9]+(.[0-9]+)$?N/A:${my_mem_percent}}}} ${if:${length:${my_mem_percent}}<4? }${my_mem_percent}" /group_tools add powerline_items segment swap fg "white" bg "233" min 0 max 0 sep "246" content "${color:246}⎘ ${color:white}${define:my_swap_percent,${info:python_eval,import psutil;print(psutil.swap_memory().percent)}}${define:my_swap_percent,${if:${my_swap_percent}==100.0?100:${if:${my_swap_percent}!~^[0-9]+(.[0-9]+)$?N/A:${my_swap_percent}}}} ${if:${length:${my_swap_percent}}<4? }${my_swap_percent}" THe previous group_tools commands create 6 segments for us to use /group_tools set powerline_items list weechat_info list time,buffer_plugin_server,buffer_info /item addreplace powerline_items_weechat_info "" "${info:powerline_items_draw,weechat_info,${window.number}}" The previous commands create the powerline_items_weechat_info item which is a powerline line with the segments time,buffer_plugin_server,buffer_info /group_tools set powerline_items list sys_usage list cpu,mem,swap /item addreplace powerline_items_sys_usage "" "${info:powerline_items_right_to_left_draw,sys_usage,${window.number}}" The previous commands create the powerline_items_sys_usage item which is a powerline line with the segments cpu,mem,swap /bar addreplace status root bottom 1 0 powerline_items_weechat_info,spacer,completion,spacer,scroll,powerline_items_sys_usage /bar set status priority 500 /bar set status color_fg white /bar set status color_delim white /bar set status color_bg 240 The previous commands recreate the status bar with our two powerlines items plus the completion and scroll item provided by WeeChat ___ -
pascalpoitras revised this gist
Jun 23, 2024 . 1 changed file with 2 additions and 4 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -611,10 +611,8 @@ Dependencies: *** /bar addreplace input root bottom 0 0 [input_prompt]+(away),[input_search],[input_paste],input_text /bar set input priority 1000 ___ -
pascalpoitras revised this gist
Jun 23, 2024 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -611,8 +611,10 @@ Dependencies: *** /bar addreplace rootinput root bottom 0 0 [input_prompt]+(away),[input_search],[input_paste],input_text /bar set rootinput priority 1000 /bar del input /bar set rootinput name input ___ -
pascalpoitras revised this gist
Jun 23, 2024 . 1 changed file with 2 additions and 5 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -592,7 +592,6 @@ Dependencies: *** /bar addreplace status root bottom 1 0 time ,buffer_last_number ,buffer_plugin ,buffer_number+:+buffer_name+(buffer_modes)+{buffer_nicklist_count}+buffer_zoom+buffer_filter,,scroll ,lag ,typing ,completion ,spacer,sys_usage /bar set status priority 500 /bar set status color_fg white @@ -612,10 +611,8 @@ Dependencies: *** /bar addreplace input root bottom 0 0 [input_prompt]+(away),[input_search],[input_paste],input_text /bar set input priority 1000 ___ -
pascalpoitras revised this gist
Jun 23, 2024 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -623,6 +623,11 @@ ___ ### nicklist Dependencies: - WeeChat: 4.4.0 <!-- ending list --> *** /bar set nicklist color_fg 229 -
pascalpoitras revised this gist
Jun 23, 2024 . 1 changed file with 21 additions and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -542,6 +542,11 @@ add one buffer to the first group and three buffers to the second and third grou ### titlenosep Dependencies: - WeeChat: 4.4.0 <!-- ending list --> *** /bar del title @@ -559,6 +564,11 @@ ___ ### titlesep Dependencies: - WeeChat: 4.4.0 <!-- ending list --> *** /bar addreplace titlesep window top 1 1 #window_number ,buffer_title,spacer,newsmon_interest @@ -575,6 +585,11 @@ ___ ### status Dependencies: - WeeChat: 4.4.0 <!-- ending list --> *** /bar del status @@ -590,6 +605,11 @@ ___ ### input Dependencies: - WeeChat: 4.4.0 <!-- ending list --> *** /bar addreplace rootinput root bottom 0 0 [input_prompt]+(away),[input_search],[input_paste],input_text @@ -955,7 +975,7 @@ ___ Dependencies: - WeeChat: 4.4.0 - Plugins: exec, trigger - Programs: sed <!-- ending list --> -
pascalpoitras revised this gist
Jun 23, 2024 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -43,17 +43,16 @@ ___ Dependencies: - Plugins: irc - Secures: liberachatpass <!-- ending list --> *** /server add libera irc.libera.chat/6697 -autoconnect /set irc.server.libera.sasl_password ${sec.data.liberachatpass} /server add oftc irc.oftc.net/6697 -autoconnect /set irc.server.oftc.tls_cert "%h/tls/nick.pem" /set irc.server.oftc.command_delay 5 -
pascalpoitras revised this gist
Jun 23, 2024 . 1 changed file with 25 additions and 13 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -43,16 +43,17 @@ ___ Dependencies: - WeeChat: 4.4.0 - Plugins: irc - Secures: liberachatpass <!-- ending list --> *** /server addreplace libera irc.libera.chat/6697 -autoconnect /set irc.server.libera.sasl_password ${sec.data.liberachatpass} /server addreplace oftc irc.oftc.net/6697 -autoconnect /set irc.server.oftc.tls_cert "%h/tls/nick.pem" /set irc.server.oftc.command_delay 5 @@ -156,14 +157,15 @@ ___ Dependencies: - WeeChat: 4.4.0 - Plugins: relay - Secures: relaypass <!-- ending list --> *** /relay tlscertkey /relay addreplace tls.weechat <port> /set relay.network.password "${sec.data.relaypass}" --- @@ -1188,7 +1190,7 @@ ___ Dependencies: - WeeChat: 4.4.0 - Plugins: python, trigger <!-- ending list --> @@ -1209,8 +1211,8 @@ Dependencies: /set weechat.buffer.core.logo.title Animated WeeChat Logo - Click on the logo to toggle the animation - Use gesture to increase and decrease the speed /alias addreplace logo_xmas /logo color "" "34 46 40 124 160 196 white" /alias addreplace logo_config /logo color "" "24 31 121 163 229 white" useless thing but nonetheless beautiful @@ -1227,7 +1229,7 @@ useless thing but nonetheless beautiful Dependencies: - WeeChat: 4.4.0 - Plugins: python, trigger <!-- ending list --> @@ -1253,7 +1255,7 @@ Dependencies: /bar set memory_game_choose_grid color_fg white /bar toggle memory_game_choose_grid /alias addreplace play_memory /memory_game $1 $2 🍅🍌🍒🍓🥒🍇🍉🍋🍍🫐🥕🥦🍭🍕🥨🥑🍐🫒🧅🥣🍿🍟🥔🫑🎂🍬🐵🐒🦍🦧🐶🦮🐩🐺🦊🦝🐈🦁🐯🐅🐆🐴🐎🦄🦓🦌🦬🐮🐂🐃🐮🐄🐷🐖🐗🐽🐏🐪🦙🦒🐘🦣🦏🦛🐭🐁🐀🐹🐇🐰🦫🦔🦇🐻🐨🐼🦥🦦🦨🦘🦡🦃🐔🐓🐤🐦🐧🦅🦆🦢🦉🦤🦩🦚🦜🐸🐊🐢🦎🐍🐲🦕🦖🐋🐬🦭🐟🐠🐡🦈🐙🐌🦋🐛🐜🐝🪲🐞🦗🦂🦟🪰🪱 /trigger addreplace memory_game command "memory_game;memory card game by r3m;<lines> <cols> <emojis>; lines: the number of lines${\n} cols: the number of columns${\n}emojis: a list of emojis (must have enough emojis for the grid size you request)${\n}${\n}Create a grid of 4 lines and 13 cols (require 26 emojis for a grid of 52 cards):${\n}${\n} /${tg_trigger_name} 4 13 🍅🍌🍒🍓🥒🍇🍉🍋🍍🫐🥕🥦🍭🍕🥨🥑🍐🫒🧅🥣🍿🍟🥔🫑🎂🍬;4 13 🍅🍌🍒🍓🥒🍇🍉🍋🍍🫐🥕🥦🍭🍕🥨🥑🍐🫒🧅🥣🍿🍟🥔🫑🎂🍬" /trigger set memory_game conditions "${info:python_version} != && ${tg_argv_eol1} =~ ^[1-9][0-9]* +[1-9][0-9]* . && ${calc:${tg_argv1}*${tg_argv2}} <= ${calc:${length:${tg_argv3}}*2} && ${calc:${tg_argv1}*${tg_argv2}} =~ [02468]$ && ${calc:${length:${tg_argv3}}*2} == ${lengthscr:${tg_argv3}}" @@ -1379,7 +1381,7 @@ ___ Dependencies: - WeeChat: 4.4.0 - Programs: qqwing - Plugins: exec, trigger <!-- ending list --> @@ -1404,7 +1406,7 @@ Dependencies: /repeat 10 /mute /set weechat.buffer.core.sudoku_game.key_bind_${repeat_index0} /sudoku_game_keyboard_insert ${repeat_index0} /key bindctxt mouse @chat(core.sudoku_game):button1 hsignal:sudoku_game_mouse_move /alias addreplace sudoku_game_show_solution /mute /set plugins.var.sudoku_game.animation 1;/repeat -interval 50ms 81 /eval -s /sudoku_game_keyboard_insert ${split:${split:2,,,${plugins.var.sudoku_game.cursor_pos}},|,strip_left,${split:${split:1,,,${plugins.var.sudoku_game.cursor_pos}},,,${plugins.var.sudoku_game.solved}}}\;/sudoku_game_keyboard_move right${if:${repeat_last}!=?\;/mute /unset plugins.var.sudoku_game.animation} /trigger addreplace sudoku_game command "sudoku_game;sudoku for weechat using qqwing as generator and solver;play <difficulty> || debug; play: play sudoku${\n} debug: static puzzle, useful for debugging${\n}difficulty: simple, easy, intermediate, expert or any;play simple|easy|intermediate|expert|any || debug" /trigger set sudoku_game conditions "${plugins.var.sudoku_game.animation} == && ${tg_argv_eol1} =~ (?-i)^play +(simple|easy|intermediate|expert|any)$ || ${tg_argv_eol1} =~ (?-i)^debug$" @@ -1447,20 +1449,30 @@ This is a basic sudoku game, support difficulty, keyboard+mouse, color the digit ### useful Dependencies: - WeeChat: 4.4.0 <!-- ending list --> *** /alias addreplace cq /allpv /buffer close ___ *** ### fun Dependencies: - WeeChat: 4.4.0 <!-- ending list --> *** /alias addreplacecompletion %(irc_channel)|%(nick)|%* slap /me slaps $* around a bit with a large trout /alias addreplacecompletion %(irc_channel)|%(nick)|%* fu /say (╹◡╹)凸 $* --- --- -
pascalpoitras revised this gist
Jun 22, 2024 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -523,16 +523,14 @@ the favorite_buffer_bottom bar is displayed in window number 1 only the favorite_buffer_top bar is displayed in any window except the first one /favorite_buffer add 1 core.weechat /favorite_buffer add 2 core.chanmon /favorite_buffer add 2 core.highmon /favorite_buffer add 2 core.newsmon /favorite_buffer add 3 core.chanmon /favorite_buffer add 3 core.highmon /favorite_buffer add 3 core.newsmon add one buffer to the first group and three buffers to the second and third group --- --- -
pascalpoitras revised this gist
Jun 22, 2024 . 1 changed file with 9 additions and 9 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -508,15 +508,15 @@ set the apparence of the tab/bubble of the first three favorite_buffer groups this is our favorite_buffer item /bar addreplace favorite_buffer_bottom window bottom 1 1 spacer,favorite_buffer,spacer /bar set favorite_buffer_bottom priority 499 /bar set favorite_buffer_bottom conditions ${window.number} == 1 /bar set favorite_buffer_bottom color_bg 234 /bar set favorite_buffer_bottom color_bg_inactive 234 the favorite_buffer_bottom bar is displayed in window number 1 only /bar addreplace favorite_buffer_top window top 1 1 favorite_buffer /bar set favorite_buffer_top priority 499 /bar set favorite_buffer_top conditions ${window.number} != 1 @@ -546,7 +546,7 @@ add three buffers to the first three favorite_buffer groups *** /bar del title /bar addreplace titlenosep window top 1 0 #window_number ,buffer_title,spacer,newsmon_interest /bar set titlenosep priority 500 /bar set titlenosep conditions ${window.number} =~ ^[23]$ /bar set titlenosep color_fg white @@ -562,7 +562,7 @@ ___ *** /bar addreplace titlesep window top 1 1 #window_number ,buffer_title,spacer,newsmon_interest /bar set titlesep priority 500 /bar set titlesep conditions ${window.number} !~ ^[23]$ /bar set titlesep color_fg white @@ -579,7 +579,7 @@ ___ *** /bar del status /bar addreplace status root bottom 1 0 time ,buffer_last_number ,buffer_plugin ,buffer_number+:+buffer_name+(buffer_modes)+{buffer_nicklist_count}+buffer_zoom+buffer_filter,,scroll ,lag ,typing ,completion ,spacer,sys_usage /bar set status priority 500 /bar set status color_fg white /bar set status color_delim 31 @@ -593,7 +593,7 @@ ___ *** /bar addreplace rootinput root bottom 0 0 [input_prompt]+(away),[input_search],[input_paste],input_text /bar set rootinput priority 1000 /bar del input /bar set rootinput name input @@ -1074,13 +1074,13 @@ the trigger conf_parser is used to switch to the conf_parser buffer and to rebui some buffer properties /bar addreplace conf_parser_line window,${buffer.full_name}==exec.exec.conf_parser left 0 0 conf_parser_item_line /bar set conf_parser_line color_fg *31 /bar set conf_parser_line priority 1 the conf_parser_line bar which display the conf_parser_item_line item /bar addreplace conf_parser_index window,${buffer.full_name}==exec.exec.conf_parser left 15 1 conf_parser_item_index /bar set conf_parser_index color_fg *31 the conf_parser_index bar which display the conf_parser_item_index item @@ -1250,7 +1250,7 @@ Dependencies: /key bindctxt mouse @item(memory_game_choose_grid):button1* hsignal:memory_game_item_start /item addreplace memory_game_choose_grid "" "${repeat:13,▆ ▆ ▆ ▆ ▆ ▆ ▆ ▆ ▆ ▆ ▆ ▆ ▆${\n}}" /bar addreplace memory_game_choose_grid window,${buffer.full_name}==core.memory_game top 0 1 memory_game_choose_grid /bar set memory_game_choose_grid filling_top_bottom vertical /bar set memory_game_choose_grid color_fg white /bar toggle memory_game_choose_grid
NewerOlder