-
Notifications
You must be signed in to change notification settings - Fork 13
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
Backport and modify canvas customization from rtorrent-ps #119
Comments
Dev notes:A. Tasks: Make all the columns configurable on the extended canvas (except for Name and Tracker Domain columns):
B. Added commands: Basic commands:
The following commands return pre-formatted text for coloring purposes:
Multi-commands:
C. About coloring columns a. Theory That was the tricky part. Initially I wanted to modify the So the idea is to track all the positions of all the columns all the time in render_columns using a simple map for this:
b. Limitations
D. Replacing couple of glyphs I had to (!) replace these glyphs That's actually a concerning issue. The point is that with the wrong reported width, label rendering was off. E. Other small changes a. column rendering changes
b. fixing rendering issue with name column
c. changing width of couple of old columns
d. fixing old coloring issue
|
BTW, using #L links with "master" is pretty useless, since lines changeover time. #L only makes sense with SHAs. |
Sorry about the confusion, you're right, sometimes I'm in a rush (especially when I have to deal with documentation :) ). Fixed now. |
Backport and modify canvas customization from
rtorrent-ps
.A. Tasks:
Make all the columns configurable on the extended canvas except for Name and Tracker Domain columns:
ui.column.render
sort:len:title
u8_chop
internal methodd.ui.‹name›
) except for Name and Tracker Domain column⚑
,⣿
,☯
,⌬ ≀∆
,⌬ ≀∇
B. Added commands:
Basic commands:
value=«number»[,«base»]
: converts a given number with the given base (or 10 as the default) to an integer valuestring.map=text,{from,to},…
for columns that can only have couple of fixed values, e.g. throttle, unsafe_data, etc.d.tracker_scrape.downloaded
scrape infod.tracker_scrape.complete
scrape infod.tracker_scrape.incomplete
scrape infod.parent_dir
to get the name of the parent directory of a downloadconvert.human_size
used in upload data, data size columnsconvert.magnitude
used in scrape columnsThe following commands return pre-formatted text for coloring purposes:
d.ui.message
to return formatted text for message/tagged columnd.ui.completion
to return formatted text for completion columnd.ui.ratio
to return formatted text for ratio columnd.ui.uprate_tm
to return formatted text for uprate/last_active_time columnd.ui.downrate_tm
to return formatted text for downrate/completed_time columnMulti-commands:
ui.column.render
multi-command to hold column definitions, usage:method.set_key = ui.column.render, "230:1:◎", ((string.map, ((cat, ((d.custom,unsafe_data)))), {0, " "}, {1, "⊘"}, {2, "⊗"}))
method.set_key = ui.column.render, "100:1:☢"
method.set_key = ui.column.render, "200:1:⊘", ((string.map, ((d.throttle_name)), {"", " "}, {NULL, "∞"}, {slowup, "⊼"}, {tardyup, "⊻"}))
event.view.hide
,event.view.show
multi commands to call them on view changes, usage:method.set_key = event.view.hide, ~log, ((print, ((ui.current_view)), " → ", ((argument.0))))
Refers to: pyroscope#60
See Dev notes below for further info.
The text was updated successfully, but these errors were encountered: