Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Bunch of changes. #33

Open
wants to merge 173 commits into
base: master
Choose a base branch
from
Open

Bunch of changes. #33

wants to merge 173 commits into from

Conversation

mina86
Copy link

@mina86 mina86 commented Feb 12, 2014

They have all the other pull requests to stepb/urxvt-tabbedex already included.

mina86 and others added 30 commits June 25, 2013 15:25
It handles reading *-fg and *-bg resource as well as default
values moving duplicated code into separate function.
µoptimisation.  Probably does not make any difference, but somehow
makes sense to me. ;)
-1 was not accepted as a valid timeout anad besides it makes more
sense for 0 being the timeout for the initial activity mark.  Changing
comparison from > to >= moves all marks by one second (which somehow
alters the behaviour of the resource but it should not be too visible
to users) and lets 0 match initial output.
“(0(” does not look nice at all… “(0)” looks much better. :)
Addition of rs_bool removes some duplicated code (namely regex
matching) and makes things cleaner.  The rs_* prefix is now
intended to be used for functions that read and intepret resources.
Previous versions did not autohide the tab bar if the remaining
tab had a name (as opposed to an index number).  I think "autohide"
means "autohide", so I changed that behaviour.

[[email protected]: added a fix to temporarily show the tab bar
 while renaming a tab]
This lets one change the name of the current tab from within the
tab by running:

    printf "\033]777;tabbedx;set_tab_name;new name\007"

or something equivalent.

[[email protected]: tiny refactoring]
Previously, if you had a lot of tabs and/or tabs with long names,
the current tab might not show up in the tab bar (if its position
in the tab name string was more than $self->ncol chars from the
beginning).  Changes below ensure that the name of the current tab
is always visible.  Arguably it would be nice to have indications
at each end showing whether there are more tabs in that direction.

Also, when printing the tab bar, limit the length of the tab
names so that one tab name doesn't occupy the whole tab bar.

[[email protected]: tiny refactoring]
With this change pty input written with tt_write is properly dispatched
to the active tabbed window when events are sent to the main window.
Patch by Martin Pohlack.

[[email protected]: pulled from r1.26 in rxvt-unicode CSV repository]
[[email protected]: pulled form r1.28 in rxvt-unicode CSV repository]
Instead, parse_keysym is used to register bindings for tabbedex user
commands, and when renaming a dynamic key_press handler is added.

Also, commands which switch tab from the current one are disable while
renaming takes place. Otherwise, the effect would be rather confusing.
[[email protected]: pulled form r1.35 in rxvt-unicode CSV repository]
This adds a tabbedex-rs-prefix resource which, when set, changes the
prefix tabbedex will use for the resource names.  In particular,

    URXvt.tabbed.tabbedex-rs-prefix: tabbedex

will cause the plugin to read all the other resources from
“URXvt.tabbedex.*” namespace rather then “URXvt.tabbed.*”.

This commit was originally coded by Mark Pustjens <[email protected]>,
but it hard-coded the change thus breaking backwards compatibility.
My version keeps the code behaving as before unless explicit
configuration change on user part is made.
…tabs.

Needed when using kuake in combination with tabbedex.

[[email protected]: Conflicts resolved, changelog entry added.]
Reporty by Thomas Jost.
This may potentially break existing console applications which use Alt-Fn
for something.  In that case, the fix is to add the following to one's
.Xresources:

urxvt.tabbed.no-tabbedex-keys: yes
urxvt.keysym.Shift-Left: perl:tabbedex:prev_tab
urxvt.keysym.Shift-Right: perl:tabbedex:next_tab
urxvt.keysym.Shift-Down: perl:tabbedex:new_tab
urxvt.keysym.Shift-Up: perl:tabbedex:rename_tab
urxvt.keysym.Control-Left: perl:tabbedex:move_tab_left
urxvt.keysym.Control-Right: perl:tabbedex:move_tab_right

In case no-tabbedex-keys is already used, to enable goto_tab_nn bindings
the following needs to be added instead:

urxvt.keysym.Meta-F1: perl:tabbedex:goto_tab_1
urxvt.keysym.Meta-F2: perl:tabbedex:goto_tab_2
urxvt.keysym.Meta-F3: perl:tabbedex:goto_tab_3
urxvt.keysym.Meta-F4: perl:tabbedex:goto_tab_4
urxvt.keysym.Meta-F5: perl:tabbedex:goto_tab_5
urxvt.keysym.Meta-F6: perl:tabbedex:goto_tab_6
urxvt.keysym.Meta-F7: perl:tabbedex:goto_tab_7
urxvt.keysym.Meta-F8: perl:tabbedex:goto_tab_8
urxvt.keysym.Meta-F9: perl:tabbedex:goto_tab_9
urxvt.keysym.Meta-F10: perl:tabbedex:goto_tab_10
urxvt.keysym.Meta-F11: perl:tabbedex:goto_tab_11
urxvt.keysym.Meta-F12: perl:tabbedex:goto_tab_12

[[email protected]: Changed Meta-F<n> bindings to a simple loop
 and added more a detailed commit message.]
This is important with goto_tab_nn command and thus the
Alt-F<n> bindings.
This feature has been removed in [e9bff7e: Make default tab names
1-based to match Fn keys]
Moving tab does not change the current tab thus “$cur != $tab” check in
make_current fails and the tab bar is not refreshed.  This introduces
up to a second delay between when the tab is moved and tab bar refreshed.

Fix this by always refreshing in make_current.
* Old behavior: if moving a tab wraps around at the beginning or end
  the first and last tabs are swapped.  This does not preserve relative
  order of other tabs.

* New behavior: when reaching the beginning (end), the tab is appended
  (prepended) such that relative order of other tabs is preserved.

[[email protected]: changed implementation from using list ranges to
 push+shift and unshift+pop.]
rxvt-unicode has a long standing bug affecting tabbed and tabbedex where
Shift+PgUp and Shift+PgUp keys do not work if mouse pointer is not over
the tab content.  Include Martin Pohlack’s patch fixing that issue so it
can be easily found.
Allow make_current function to be called with a numeric index in
addition to the tab.  This simplifies a common pattern of getting
a tab by index employed by many of the call sites.

Similarly, add check of whether the current tab is being renamed.
This again simplifies call sites which had to check for that and
makes the code less error-prone since now there’s no chance for
the check to be missed.

All this yields negative delta so yet another reason in favour of
this change.
Simplify tab_activity_marks by removing ‘!wantarray’ case.  This additional
condition wasn’t worth the trivial simplification in tab_add_lines.

Also, refactor parse_timeouts slightly so that the regex isn’t repeated
twice and unnecessary check for $timeouts not being passed is removed.
Values read from X resources are raw bytes so they need to be
decoded to allow non-ASCII characters.

Fixes: #29
With this now supported, deprecate %matching_marks feature which
would automatically match (, [, { and < to their corresponding
closing brackets.

Fixes: #30
Upon destruction of the tab, it will automatically stop being
renamed, so there’s no need to bother and finish the renaming
in tab_destroy function.
Before this change, if there was enough space available in the
tabbar to fit tab’s title, the extension would replace last
character of the title with an ellipsis.  Now, the entire title
is shown.
Perl interprets ‘$#$root->{argv}’ as ‘($#$root)->{argv}’ which causes
and error since ‘$root’ is not an array reference:

    urxvt: Not an ARRAY reference at /home/wd/.urxvt/ext/tabbedex line 806.

This would trigger whenever ‘-e’ switch and ‘%E’ escape in
‘tab-arguments’ option were used together.  Fix by adding braces to
change binding of the operators.

Fixes: #33
Instead of treating unknown arguments starting with a dash as branch
names, reject them.
Release script assumed that all versions followed ‘vXX.YYY’ format
which has been changed to ‘vXX.YY’ with the v19.21 release.  Update
the script to handle the new format as well as supporting patch
levels (even though those have never been used so far).
mina86 and others added 18 commits November 18, 2020 05:20
With ‘tabber-timeouts’ supporting explicit character pairs, there’s no
longer need for automatic handling of parenthesise.  This feature has been
since deprecated and now around a year later start warning if it’s still
used.
The ‘new-tab-command’ resource has been deprecated for a while and is
no longer used resulting in a warning if present.  Remove the warning
since users should have enough time to notice.
Using ‘inactive’ adjective gets confusing when dealing with activity
marks.  Furthermore, ‘background’ fits better anyway since non-current
tabs remain working in the background rather than becoming
inoperative.
Normally tabbedex displays activity marks when new text is added to
a background tab.  The ‘tabbedex;ignore_line_activity’ OSC sequence
causes updates to specified line to be ignored.  This is useful when
application such as screen(1) has a clock in status line which updates
periodically without indicating real activity.

Fixes: #35
The ‘line_update’ hook does nothing on current tab so instead of having
a check in the ‘tab_line_update’ subroutine simply disable the hook for
the current tab.
When the mouse pointer is outside of the terminal window, dead keys
stop working.  When ibus is used, the prompt pops up but once next
key is pressed, no character is inserted to the terminal.  This fixes
that issue.

Unfortunately, the fix only works when ibus is used.  If urxvt is
configured not to utilise it, dead keys remain broken when the mouse
pointer is outside of the terminal window and result.

See: #26
Fixes: #39

[[email protected]: moved check to key_press handler and reworded
 comment and commit message]
Anyone who is still using the deprecated feature should switch to
specifying pair of characters explicitly in `tabbar-timeouts`.  For
example:

    URxvt.tabbedex.tabbar-timeouts: 0:|:3:():6:[]:9:{}:12:<>
Add support for optional `:nowrap` argument to the `prev_tab` and
`next_tab` actions.  When used, switching tabs left or right will not
wrap around and instead stop at the first or last tab.  To use the
behaviour by default, the Shift-Left/Right bindings can be configured
to bind to the new actions:

    URxvt.keysym.Shift-Left:    tabbedex:prev_tab:nowrap
    URxvt.keysym.Shift-Right:   tabbedex:next_tab:nowrap

Fixes: #42
No longer default ‘tabbedex-rs-prefix’ to ‘tabbed’ but instead offer
a warning if the resource is not specified and some other resource is
defined with the old prefix.
Just like for `next_tab` and `prev_tab`, add a `:nowrap` variant for
`move_tab_left` and `move_tab_right` actions.  When used, moving tabs
stops at the edges of the tab bar rather than moving the tab to
opposite end.  To use the behaviour by default, the Control-Left/Right
keys can be configured to bind to the new actions:

    URxvt.keysym.Control-Left:  tabbedex:move_tab_left:nowrap
    URxvt.keysym.Control-Right: tabbedex:move_tab_right:nowrap

Issue: #42
When border or scroll bar is enabled the -geometry flag isn’t quite
respected.  For example, starting the terminal via ‘urxvt -geometry
80x24 -pe tabbedex’ might result in internal tab having only 77
columns and 23 lines.  This is caused by root window being sized with
the assumption that there is no border or scroll bar even if they are
present in the tabs.

Fixes: #44
pod2man doesn’t like Unicode.  Use ASCII apostrophes in the POD
documentation.
The feature for automatic parenthesise in tabbar-timeouts has been
deprecated and we’ve been printing warning about it for a while.
Get rid of the code printing the warning.
The resource has been deprecated for a while.  We had a couple phases
of deprecation.  Finally, stop respecting it altogether.  Still, print
a warning if the resource is detected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.