listpick 0.1.15.7__py3-none-any.whl → 0.1.15.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of listpick might be problematic. Click here for more details.
- listpick/listpick_app.py +117 -63
- listpick/pane/pane_functions.py +23 -0
- listpick/ui/build_help.py +2 -1
- listpick/ui/keys.py +1 -0
- listpick/ui/picker_colours.py +1 -1
- {listpick-0.1.15.7.dist-info → listpick-0.1.15.10.dist-info}/METADATA +1 -1
- {listpick-0.1.15.7.dist-info → listpick-0.1.15.10.dist-info}/RECORD +11 -11
- {listpick-0.1.15.7.dist-info → listpick-0.1.15.10.dist-info}/WHEEL +0 -0
- {listpick-0.1.15.7.dist-info → listpick-0.1.15.10.dist-info}/entry_points.txt +0 -0
- {listpick-0.1.15.7.dist-info → listpick-0.1.15.10.dist-info}/licenses/LICENSE.txt +0 -0
- {listpick-0.1.15.7.dist-info → listpick-0.1.15.10.dist-info}/top_level.txt +0 -0
listpick/listpick_app.py
CHANGED
|
@@ -23,6 +23,7 @@ import logging
|
|
|
23
23
|
import tty
|
|
24
24
|
import select
|
|
25
25
|
|
|
26
|
+
from listpick.pane.pane_utils import get_file_attributes
|
|
26
27
|
from listpick.ui.picker_colours import get_colours, get_help_colours, get_notification_colours, get_theme_count, get_fallback_colours
|
|
27
28
|
from listpick.utils.options_selectors import default_option_input, output_file_option_selector, default_option_selector
|
|
28
29
|
from listpick.utils.table_to_list_of_lists import *
|
|
@@ -191,16 +192,8 @@ class Picker:
|
|
|
191
192
|
sheet_states: list = [{}],
|
|
192
193
|
|
|
193
194
|
split_right: bool = False,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
split_right_auto_refresh: bool = False,
|
|
197
|
-
split_right_refresh_data: Callable = lambda old_data, arg_dict: [],
|
|
198
|
-
split_right_refresh_data_timer: float = 1.0,
|
|
199
|
-
split_right_data: list = [],
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
195
|
+
right_panes: list = [],
|
|
196
|
+
right_pane_index: int = 0,
|
|
204
197
|
):
|
|
205
198
|
self.stdscr = stdscr
|
|
206
199
|
self.items = items
|
|
@@ -350,13 +343,8 @@ class Picker:
|
|
|
350
343
|
self.sheets = sheets
|
|
351
344
|
|
|
352
345
|
self.split_right = split_right
|
|
353
|
-
self.
|
|
354
|
-
self.
|
|
355
|
-
self.split_right_auto_refresh = split_right_auto_refresh
|
|
356
|
-
self.split_right_refresh_data = split_right_refresh_data
|
|
357
|
-
self.split_right_refresh_data_timer = split_right_refresh_data_timer
|
|
358
|
-
self.split_right_data = split_right_data
|
|
359
|
-
|
|
346
|
+
self.right_panes = right_panes
|
|
347
|
+
self.right_pane_index = right_pane_index
|
|
360
348
|
self.initialise_picker_state(reset_colours=self.reset_colours)
|
|
361
349
|
|
|
362
350
|
# Note: We have to set the footer after initialising the picker state so that the footer can use the get_function_data method
|
|
@@ -426,8 +414,9 @@ class Picker:
|
|
|
426
414
|
## self.top_space
|
|
427
415
|
h, w = self.stdscr.getmaxyx()
|
|
428
416
|
self.term_h, self.term_w = self.stdscr.getmaxyx()
|
|
429
|
-
if self.split_right and
|
|
430
|
-
|
|
417
|
+
if self.split_right and len(self.right_panes):
|
|
418
|
+
proportion = self.right_panes[self.right_pane_index]["proportion"]
|
|
419
|
+
self.rows_w, self.rows_h = int(self.term_w*proportion), self.term_h
|
|
431
420
|
else:
|
|
432
421
|
self.rows_w, self.rows_h = self.term_w, self.term_h
|
|
433
422
|
|
|
@@ -701,6 +690,7 @@ class Picker:
|
|
|
701
690
|
else:
|
|
702
691
|
self.cursor_pos = 0
|
|
703
692
|
|
|
693
|
+
self.right_pane_index = max(0, min(self.right_pane_index, len(self.right_panes)-1))
|
|
704
694
|
|
|
705
695
|
|
|
706
696
|
|
|
@@ -787,8 +777,9 @@ class Picker:
|
|
|
787
777
|
|
|
788
778
|
h, w = self.stdscr.getmaxyx()
|
|
789
779
|
self.term_h, self.term_w = self.stdscr.getmaxyx()
|
|
790
|
-
if self.split_right and
|
|
791
|
-
|
|
780
|
+
if self.split_right and len(self.right_panes):
|
|
781
|
+
proportion = self.right_panes[self.right_pane_index]["proportion"]
|
|
782
|
+
self.rows_w, self.rows_h = int(self.term_w*proportion), self.term_h
|
|
792
783
|
else:
|
|
793
784
|
self.rows_w, self.rows_h = self.term_w, self.term_h
|
|
794
785
|
|
|
@@ -1189,8 +1180,18 @@ class Picker:
|
|
|
1189
1180
|
self.stdscr.addstr(self.term_h - 1, self.term_w-footer_string_width-1, " "*footer_string_width, curses.color_pair(self.colours_start+24))
|
|
1190
1181
|
self.stdscr.addstr(self.term_h - 1, self.term_w-footer_string_width-1, f"{disp_string}", curses.color_pair(self.colours_start+24))
|
|
1191
1182
|
|
|
1192
|
-
if self.split_right and
|
|
1193
|
-
|
|
1183
|
+
if self.split_right and len(self.right_panes):
|
|
1184
|
+
# If we need to refresh the data then do so.
|
|
1185
|
+
if self.right_panes[self.right_pane_index]["auto_refresh"] and ((time.time() - self.initial_split_time) > self.right_panes[self.right_pane_index]["refresh_time"]):
|
|
1186
|
+
get_data = self.right_panes[self.right_pane_index]["get_data"]
|
|
1187
|
+
data = self.right_panes[self.right_pane_index]["data"]
|
|
1188
|
+
self.right_panes[self.right_pane_index]["data"] = get_data(data, self.get_function_data())
|
|
1189
|
+
self.initial_split_time = time.time()
|
|
1190
|
+
|
|
1191
|
+
draw_pane = self.right_panes[self.right_pane_index]["display"]
|
|
1192
|
+
data = self.right_panes[self.right_pane_index]["data"]
|
|
1193
|
+
|
|
1194
|
+
draw_pane(
|
|
1194
1195
|
self.stdscr,
|
|
1195
1196
|
x = self.rows_w,
|
|
1196
1197
|
y = self.top_space - int(bool(self.show_header and self.header)),
|
|
@@ -1199,7 +1200,7 @@ class Picker:
|
|
|
1199
1200
|
state = self.get_function_data(),
|
|
1200
1201
|
row = self.indexed_items[self.cursor_pos] if self.indexed_items else [],
|
|
1201
1202
|
cell = self.indexed_items[self.cursor_pos][1][self.selected_column] if self.indexed_items else "",
|
|
1202
|
-
data=
|
|
1203
|
+
data=data,
|
|
1203
1204
|
)
|
|
1204
1205
|
|
|
1205
1206
|
self.stdscr.refresh()
|
|
@@ -1363,12 +1364,9 @@ class Picker:
|
|
|
1363
1364
|
"sheet_name": self.sheet_name,
|
|
1364
1365
|
"sheet_states": self.sheet_states,
|
|
1365
1366
|
"split_right": self.split_right,
|
|
1366
|
-
"
|
|
1367
|
-
"
|
|
1368
|
-
|
|
1369
|
-
"split_right_refresh_data_timer": self.split_right_refresh_data_timer,
|
|
1370
|
-
"split_right_refresh_data": self.split_right_refresh_data,
|
|
1371
|
-
"split_right_data": self.split_right_data,
|
|
1367
|
+
"right_panes": self.right_panes,
|
|
1368
|
+
"right_pane_index": self.right_pane_index,
|
|
1369
|
+
|
|
1372
1370
|
}
|
|
1373
1371
|
return function_data
|
|
1374
1372
|
|
|
@@ -1404,8 +1402,6 @@ class Picker:
|
|
|
1404
1402
|
"centre_in_cols",
|
|
1405
1403
|
"centre_in_terminal",
|
|
1406
1404
|
"split_right",
|
|
1407
|
-
"split_right_proportion",
|
|
1408
|
-
"split_right_function",
|
|
1409
1405
|
]
|
|
1410
1406
|
|
|
1411
1407
|
for var in variables:
|
|
@@ -1499,6 +1495,7 @@ class Picker:
|
|
|
1499
1495
|
"number_columns": False,
|
|
1500
1496
|
"reset_colours": False,
|
|
1501
1497
|
"split_right": False,
|
|
1498
|
+
"cell_cursor": False,
|
|
1502
1499
|
}
|
|
1503
1500
|
while True:
|
|
1504
1501
|
h, w = stdscr.getmaxyx()
|
|
@@ -1530,6 +1527,8 @@ class Picker:
|
|
|
1530
1527
|
|
|
1531
1528
|
if not message: message = "!!"
|
|
1532
1529
|
submenu_items = [" "+message[i*message_width:(i+1)*message_width] for i in range(len(message)//message_width+1)]
|
|
1530
|
+
for i in range(len(submenu_items)):
|
|
1531
|
+
submenu_items[i] = f"{submenu_items[i]:^{message_width}}"
|
|
1533
1532
|
|
|
1534
1533
|
notification_remap_keys = {
|
|
1535
1534
|
curses.KEY_RESIZE: curses.KEY_F5,
|
|
@@ -1555,6 +1554,7 @@ class Picker:
|
|
|
1555
1554
|
"cancel_is_back": True,
|
|
1556
1555
|
"reset_colours": False,
|
|
1557
1556
|
"split_right": False,
|
|
1557
|
+
"cell_cursor": False,
|
|
1558
1558
|
|
|
1559
1559
|
}
|
|
1560
1560
|
OptionPicker = Picker(submenu_win, **notification_data)
|
|
@@ -1695,6 +1695,9 @@ class Picker:
|
|
|
1695
1695
|
elif setting == "pane":
|
|
1696
1696
|
self.toggle_right_pane()
|
|
1697
1697
|
|
|
1698
|
+
elif setting == "pane_cycle":
|
|
1699
|
+
self.cycle_right_pane()
|
|
1700
|
+
|
|
1698
1701
|
elif setting.startswith("cwd="):
|
|
1699
1702
|
os.chdir(os.path.expandvars(os.path.expanduser(setting[len("cwd="):])))
|
|
1700
1703
|
elif setting.startswith("hl"):
|
|
@@ -2313,9 +2316,16 @@ class Picker:
|
|
|
2313
2316
|
self.load_sheet(self.loaded_file, sheet_number=self.sheet_index)
|
|
2314
2317
|
|
|
2315
2318
|
def toggle_right_pane(self):
|
|
2316
|
-
if
|
|
2319
|
+
if len(self.right_panes):
|
|
2317
2320
|
self.split_right = not self.split_right
|
|
2321
|
+
if self.right_panes[self.right_pane_index]["data"] in [[], None, {}]:
|
|
2322
|
+
self.right_panes[self.right_pane_index]["data"] = self.right_panes[self.right_pane_index]["get_data"](self.right_panes[self.right_pane_index]["data"], self.get_function_data())
|
|
2323
|
+
|
|
2318
2324
|
|
|
2325
|
+
def cycle_right_pane(self, increment=1):
|
|
2326
|
+
if len(self.right_panes) > 1:
|
|
2327
|
+
self.right_pane_index = (self.right_pane_index+1)%len(self.right_panes)
|
|
2328
|
+
self.initial_split_time = self.initial_split_time - self.right_panes[self.right_pane_index]["refresh_time"]
|
|
2319
2329
|
|
|
2320
2330
|
def run(self) -> Tuple[list[int], str, dict]:
|
|
2321
2331
|
""" Run the picker. """
|
|
@@ -2328,9 +2338,9 @@ class Picker:
|
|
|
2328
2338
|
|
|
2329
2339
|
self.draw_screen(self.indexed_items, self.highlights)
|
|
2330
2340
|
|
|
2331
|
-
initial_time = time.time()
|
|
2332
|
-
initial_time_footer = time.time()-self.footer_timer
|
|
2333
|
-
initial_split_time = time.time()-
|
|
2341
|
+
self.initial_time = time.time()
|
|
2342
|
+
self.initial_time_footer = time.time()-self.footer_timer
|
|
2343
|
+
self.initial_split_time = time.time()-200
|
|
2334
2344
|
|
|
2335
2345
|
if self.startup_notification:
|
|
2336
2346
|
self.notification(self.stdscr, message=self.startup_notification)
|
|
@@ -2366,8 +2376,9 @@ class Picker:
|
|
|
2366
2376
|
|
|
2367
2377
|
h, w = self.stdscr.getmaxyx()
|
|
2368
2378
|
self.term_h, self.term_w = self.stdscr.getmaxyx()
|
|
2369
|
-
if self.split_right and
|
|
2370
|
-
|
|
2379
|
+
if self.split_right and len(self.right_panes):
|
|
2380
|
+
proportion = self.right_panes[self.right_pane_index]["proportion"]
|
|
2381
|
+
self.rows_w, self.rows_h = int(self.term_w*proportion), self.term_h
|
|
2371
2382
|
else:
|
|
2372
2383
|
self.rows_w, self.rows_h = self.term_w, self.term_h
|
|
2373
2384
|
def terminal_resized(old_w, old_h) -> bool:
|
|
@@ -2391,8 +2402,10 @@ class Picker:
|
|
|
2391
2402
|
|
|
2392
2403
|
h, w = self.stdscr.getmaxyx()
|
|
2393
2404
|
self.term_h, self.term_w = self.stdscr.getmaxyx()
|
|
2394
|
-
|
|
2395
|
-
|
|
2405
|
+
|
|
2406
|
+
if self.split_right and len(self.right_panes):
|
|
2407
|
+
proportion = self.right_panes[self.right_pane_index]["proportion"]
|
|
2408
|
+
self.rows_w, self.rows_h = int(self.term_w*proportion), self.term_h
|
|
2396
2409
|
else:
|
|
2397
2410
|
self.rows_w, self.rows_h = self.term_w, self.term_h
|
|
2398
2411
|
|
|
@@ -2407,14 +2420,14 @@ class Picker:
|
|
|
2407
2420
|
self.logger.debug(f"Data ready after refresh")
|
|
2408
2421
|
self.initialise_variables()
|
|
2409
2422
|
|
|
2410
|
-
initial_time = time.time()
|
|
2423
|
+
self.initial_time = time.time()
|
|
2411
2424
|
|
|
2412
2425
|
self.draw_screen(self.indexed_items, self.highlights, clear=False)
|
|
2413
2426
|
|
|
2414
2427
|
self.refreshing_data = False
|
|
2415
2428
|
self.data_ready = False
|
|
2416
2429
|
|
|
2417
|
-
elif self.check_key("refresh", key, self.keys_dict) or self.remapped_key(key, curses.KEY_F5, self.key_remappings) or (self.auto_refresh and (time.time() - initial_time) >= self.timer):
|
|
2430
|
+
elif self.check_key("refresh", key, self.keys_dict) or self.remapped_key(key, curses.KEY_F5, self.key_remappings) or (self.auto_refresh and (time.time() - self.initial_time) >= self.timer):
|
|
2418
2431
|
self.logger.debug(f"Get new data (refresh).")
|
|
2419
2432
|
self.stdscr.addstr(0,self.term_w-3," ", curses.color_pair(self.colours_start+21) | curses.A_BOLD)
|
|
2420
2433
|
self.stdscr.refresh()
|
|
@@ -2428,28 +2441,30 @@ class Picker:
|
|
|
2428
2441
|
return [], "refresh", function_data
|
|
2429
2442
|
|
|
2430
2443
|
# Refresh data synchronously
|
|
2431
|
-
# if self.check_key("refresh", key, self.keys_dict) or self.remapped_key(key, curses.KEY_F5, self.key_remappings) or (self.auto_refresh and (time.time() - initial_time) > self.timer):
|
|
2444
|
+
# if self.check_key("refresh", key, self.keys_dict) or self.remapped_key(key, curses.KEY_F5, self.key_remappings) or (self.auto_refresh and (time.time() - self.initial_time) > self.timer):
|
|
2432
2445
|
# self.stdscr.addstr(0,w-3," ", curses.color_pair(self.colours_start+21) | curses.A_BOLD)
|
|
2433
2446
|
# self.stdscr.refresh()
|
|
2434
2447
|
# if self.get_new_data and self.refresh_function:
|
|
2435
2448
|
# self.initialise_variables(get_data=True)
|
|
2436
2449
|
#
|
|
2437
|
-
# initial_time = time.time()
|
|
2450
|
+
# self.initial_time = time.time()
|
|
2438
2451
|
# self.draw_screen(self.indexed_items, self.highlights, clear=False)
|
|
2439
2452
|
# else:
|
|
2440
2453
|
#
|
|
2441
2454
|
# function_data = self.get_function_data()
|
|
2442
2455
|
# return [], "refresh", function_data
|
|
2443
2456
|
|
|
2444
|
-
if self.footer_string_auto_refresh and ((time.time() - initial_time_footer) > self.footer_timer):
|
|
2457
|
+
if self.footer_string_auto_refresh and ((time.time() - self.initial_time_footer) > self.footer_timer):
|
|
2445
2458
|
self.logger.debug(f"footer_string_auto_refresh")
|
|
2446
2459
|
self.footer_string = self.footer_string_refresh_function()
|
|
2447
|
-
initial_time_footer = time.time()
|
|
2460
|
+
self.initial_time_footer = time.time()
|
|
2448
2461
|
self.draw_screen(self.indexed_items, self.highlights)
|
|
2449
2462
|
|
|
2450
|
-
if self.split_right and self.
|
|
2451
|
-
|
|
2452
|
-
|
|
2463
|
+
if self.split_right and len(self.right_panes) and self.right_panes[self.right_pane_index]["auto_refresh"] and ((time.time() - self.initial_split_time) > self.right_panes[self.right_pane_index]["refresh_time"]):
|
|
2464
|
+
get_data = self.right_panes[self.right_pane_index]["get_data"]
|
|
2465
|
+
data = self.right_panes[self.right_pane_index]["data"]
|
|
2466
|
+
self.right_panes[self.right_pane_index]["data"] = get_data(data, self.get_function_data())
|
|
2467
|
+
self.initial_split_time = time.time()
|
|
2453
2468
|
|
|
2454
2469
|
if self.check_key("help", key, self.keys_dict):
|
|
2455
2470
|
self.logger.info(f"key_function help")
|
|
@@ -3316,6 +3331,9 @@ class Picker:
|
|
|
3316
3331
|
elif self.check_key("toggle_right_pane", key, self.keys_dict):
|
|
3317
3332
|
self.toggle_right_pane()
|
|
3318
3333
|
|
|
3334
|
+
elif self.check_key("cycle_right_pane", key, self.keys_dict):
|
|
3335
|
+
self.cycle_right_pane()
|
|
3336
|
+
|
|
3319
3337
|
elif self.check_key("pipe_input", key, self.keys_dict):
|
|
3320
3338
|
self.logger.info(f"key_function pipe_input")
|
|
3321
3339
|
# usrtxt = "xargs -d '\n' -I{} "
|
|
@@ -3839,20 +3857,56 @@ def main() -> None:
|
|
|
3839
3857
|
# function_data["debug"] = True
|
|
3840
3858
|
# function_data["debug_level"] = 1
|
|
3841
3859
|
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3860
|
+
function_data["split_right"] = False
|
|
3861
|
+
function_data["right_pane_index"] = 3
|
|
3862
|
+
|
|
3863
|
+
function_data["right_panes"] = [
|
|
3864
|
+
# Graph or random numbers generated each second
|
|
3865
|
+
{
|
|
3866
|
+
"proportion": 2/3,
|
|
3867
|
+
"auto_refresh": True,
|
|
3868
|
+
"get_data": data_refresh_randint,
|
|
3869
|
+
"display": right_split_graph,
|
|
3870
|
+
"data": [],
|
|
3871
|
+
"refresh_time": 1.0,
|
|
3872
|
+
},
|
|
3873
|
+
# list of numbers
|
|
3874
|
+
{
|
|
3875
|
+
"proportion": 2/3,
|
|
3876
|
+
"auto_refresh": False,
|
|
3877
|
+
"get_data": data_refresh_randint_title,
|
|
3878
|
+
"display": right_split_display_list,
|
|
3879
|
+
"data": ["Files", [str(x) for x in range(100)]],
|
|
3880
|
+
"refresh_time": 1.0,
|
|
3881
|
+
},
|
|
3882
|
+
# File attribures
|
|
3883
|
+
{
|
|
3884
|
+
"proportion": 2/3,
|
|
3885
|
+
"auto_refresh": False,
|
|
3886
|
+
"get_data": lambda data, state: [],
|
|
3887
|
+
"display": right_split_file_attributes,
|
|
3888
|
+
"data": ["Files", [str(x) for x in range(100)]],
|
|
3889
|
+
"refresh_time": 1.0,
|
|
3890
|
+
},
|
|
3891
|
+
# List of random numbers generated each second
|
|
3892
|
+
{
|
|
3893
|
+
"proportion": 1/2,
|
|
3894
|
+
"auto_refresh": True,
|
|
3895
|
+
"get_data": data_refresh_randint_title,
|
|
3896
|
+
"display": right_split_display_list,
|
|
3897
|
+
"data": ["Files", []],
|
|
3898
|
+
"refresh_time": 2,
|
|
3899
|
+
},
|
|
3900
|
+
# Nopane
|
|
3901
|
+
{
|
|
3902
|
+
"proportion": 1/3,
|
|
3903
|
+
"auto_refresh": False,
|
|
3904
|
+
"get_data": lambda data, state: [],
|
|
3905
|
+
"display": lambda scr, x, y, w, h, state, row, cell, data: [],
|
|
3906
|
+
"data": ["Files", []],
|
|
3907
|
+
"refresh_time": 1,
|
|
3908
|
+
},
|
|
3909
|
+
]
|
|
3856
3910
|
|
|
3857
3911
|
stdscr = start_curses()
|
|
3858
3912
|
try:
|
listpick/pane/pane_functions.py
CHANGED
|
@@ -29,6 +29,12 @@ def right_split_file_attributes(stdscr, x, y, w, h, state, row, cell, past_data:
|
|
|
29
29
|
for j in range(h):
|
|
30
30
|
stdscr.addstr(j+y, x, ' ', curses.color_pair(state["colours_start"]+16))
|
|
31
31
|
|
|
32
|
+
# Display pane count
|
|
33
|
+
pane_count = len(state["right_panes"])
|
|
34
|
+
pane_index = state["right_pane_index"]
|
|
35
|
+
if pane_count > 1:
|
|
36
|
+
s = f" {pane_index+1}/{pane_count} "
|
|
37
|
+
stdscr.addstr(y+h-1, x+w-len(s)-1, s, curses.color_pair(state["colours_start"]+20))
|
|
32
38
|
|
|
33
39
|
# Filename/cursor cell value
|
|
34
40
|
stdscr.addstr(y+2, x+2, cell[:w-3])
|
|
@@ -58,6 +64,14 @@ def right_split_graph(stdscr, x, y, w, h, state, row, cell, past_data: list = []
|
|
|
58
64
|
for j in range(h):
|
|
59
65
|
stdscr.addstr(j+y, x, ' ', curses.color_pair(state["colours_start"]+16))
|
|
60
66
|
|
|
67
|
+
|
|
68
|
+
# Display pane count
|
|
69
|
+
pane_count = len(state["right_panes"])
|
|
70
|
+
pane_index = state["right_pane_index"]
|
|
71
|
+
if pane_count > 1:
|
|
72
|
+
s = f" {pane_index+1}/{pane_count} "
|
|
73
|
+
stdscr.addstr(y+h-1, x+w-len(s)-1, s, curses.color_pair(state["colours_start"]+20))
|
|
74
|
+
|
|
61
75
|
try:
|
|
62
76
|
import plotille as plt
|
|
63
77
|
except:
|
|
@@ -66,6 +80,7 @@ def right_split_graph(stdscr, x, y, w, h, state, row, cell, past_data: list = []
|
|
|
66
80
|
return None
|
|
67
81
|
|
|
68
82
|
|
|
83
|
+
|
|
69
84
|
# x_vals, y_vals = list(range(100)), [x**2 for x in range(100)]
|
|
70
85
|
if data in [[], {}, None]:
|
|
71
86
|
return None
|
|
@@ -96,6 +111,14 @@ def right_split_display_list(stdscr, x, y, w, h, state, row, cell, past_data: li
|
|
|
96
111
|
for j in range(h):
|
|
97
112
|
stdscr.addstr(j+y, x, ' ', curses.color_pair(state["colours_start"]+16))
|
|
98
113
|
|
|
114
|
+
|
|
115
|
+
# Display pane count
|
|
116
|
+
pane_count = len(state["right_panes"])
|
|
117
|
+
pane_index = state["right_pane_index"]
|
|
118
|
+
if pane_count > 1:
|
|
119
|
+
s = f" {pane_index+1}/{pane_count} "
|
|
120
|
+
stdscr.addstr(y+h-1, x+w-len(s)-1, s, curses.color_pair(state["colours_start"]+20))
|
|
121
|
+
|
|
99
122
|
if data in [[], {}, None]:
|
|
100
123
|
return None
|
|
101
124
|
|
listpick/ui/build_help.py
CHANGED
|
@@ -143,11 +143,12 @@ def build_help_rows(keys_dict: dict, debug: bool = False) -> list[list[str]]:
|
|
|
143
143
|
"sheet_next": "Go to the next sheet.",
|
|
144
144
|
"sheet_prev": "Go to the previous sheet.",
|
|
145
145
|
"toggle_right_pane": "Toggle the right pane",
|
|
146
|
+
"cycle_right_pane": "Cycle through right panes",
|
|
146
147
|
}
|
|
147
148
|
sections = {
|
|
148
149
|
"Navigation:": [ "cursor_down", "cursor_up", "half_page_up", "half_page_down", "page_up", "page_down", "cursor_bottom", "cursor_top", "five_up", "five_down", "scroll_right", "scroll_left", "scroll_far_right", "scroll_far_left" ],
|
|
149
150
|
"Selection:": [ "toggle_select", "select_all", "select_none", "visual_selection_toggle", "visual_deselection_toggle", "enter" ],
|
|
150
|
-
"UI:": [ "toggle_footer", "redraw_screen", "decrease_lines_per_page", "increase_lines_per_page", "increase_column_width", "decrease_column_width", "notification_toggle", "toggle_right_pane"],
|
|
151
|
+
"UI:": [ "toggle_footer", "redraw_screen", "decrease_lines_per_page", "increase_lines_per_page", "increase_column_width", "decrease_column_width", "notification_toggle", "toggle_right_pane", "cycle_right_pane"],
|
|
151
152
|
"Sort:": [ "cycle_sort_method", "cycle_sort_method_reverse", "cycle_sort_order", ] ,
|
|
152
153
|
"Data manipulation:": [ "delete", "delete_column", "edit", "edit_picker", "edit_ipython", "add_column_before", "add_column_after", "add_row_before", "add_row_after"],
|
|
153
154
|
"Filter and sort:": [ "filter_input", "search_input", "continue_search_forward", "continue_search_backward", ] ,
|
listpick/ui/keys.py
CHANGED
listpick/ui/picker_colours.py
CHANGED
|
@@ -340,7 +340,7 @@ def get_notification_colours(pick:int=0) -> Dict[str, int]:
|
|
|
340
340
|
else:
|
|
341
341
|
colours['background'] = 237
|
|
342
342
|
colours['unselected_bg'] = 237
|
|
343
|
-
colours['cursor_bg'] =
|
|
343
|
+
colours['cursor_bg'] = 238
|
|
344
344
|
colours['selected_bg'] = 237
|
|
345
345
|
|
|
346
346
|
return colours
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
listpick/__init__.py,sha256=ExXc97-bibodH--wlwpQivl0zCNR5D1hvpvrf7OBofU,154
|
|
2
2
|
listpick/__main__.py,sha256=wkCjDdqw093W27yWwnlC3nG_sMRKaIad7hHHWy0RBgY,193
|
|
3
|
-
listpick/listpick_app.py,sha256=
|
|
3
|
+
listpick/listpick_app.py,sha256=ttUfM3x4q-3wAD8nPGQOUcA1b6gZWZ572OJKbGH2Ovc,200530
|
|
4
4
|
listpick/pane/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
listpick/pane/get_data.py,sha256=21PTDXt9HP-4vZV4QUM8sidTqDEaKnKCDshl3-cSRCo,2255
|
|
6
|
-
listpick/pane/pane_functions.py,sha256=
|
|
6
|
+
listpick/pane/pane_functions.py,sha256=Hpc6wSFeiTmQTyO6n13muenarZMvzFw0OCmjJJy2lTY,3910
|
|
7
7
|
listpick/pane/pane_utils.py,sha256=tMp8KlFng6ZQgNjd8iFrl1zWZLPXMH_Y1A_QeuQYAk0,2537
|
|
8
8
|
listpick/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
listpick/ui/build_help.py,sha256=
|
|
9
|
+
listpick/ui/build_help.py,sha256=fDEURRb51slvK7rpk2iPWcJAwIAVigv8dp6T4cziZb4,10544
|
|
10
10
|
listpick/ui/footer.py,sha256=OH27JLGvvq9TlUsI30ODG6cHvjm7NTGSbXvF6lN1qiY,15089
|
|
11
11
|
listpick/ui/help_screen.py,sha256=zbfGIgb-IXtATpl4_Sx7nPbsnRXZ7eiMYlCKGS9EFmw,5608
|
|
12
12
|
listpick/ui/input_field.py,sha256=ylf3fiLXdAD4pueHWfzIrlwaRb9f5zm8f1UGkEPBxgM,30539
|
|
13
|
-
listpick/ui/keys.py,sha256=
|
|
14
|
-
listpick/ui/picker_colours.py,sha256=
|
|
13
|
+
listpick/ui/keys.py,sha256=nAmUn95UGuqh3QQMHWsPsXWW3or2oVMVlkzJV1t3zLQ,13559
|
|
14
|
+
listpick/ui/picker_colours.py,sha256=wq6FhXELejCoeBunWQgk9bsD0lLA3xM-I9WzZdWfWFE,12287
|
|
15
15
|
listpick/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
listpick/utils/clipboard_operations.py,sha256=ORdNm2kgGbfs51xJSvgJPERgoSmBgT11axuMkvSoP9A,3133
|
|
17
17
|
listpick/utils/config.py,sha256=MEnAZg2Rhfl38XofEIN0uoVAOY7I0ftc79Evk3fOiVw,1654
|
|
@@ -29,9 +29,9 @@ listpick/utils/sorting.py,sha256=WZZiVlVA3Zkcpwji3U5SNFlQ14zVEk3cZJtQirBkecQ,532
|
|
|
29
29
|
listpick/utils/table_to_list_of_lists.py,sha256=XBj7eGBDF15BRME-swnoXyOfZWxXCxrXp0pzsBfcJ5g,12224
|
|
30
30
|
listpick/utils/user_input.py,sha256=oyJZPAwA7UGAclPhdPL44tKnPIVNHWhX-tZEnCdBKC0,4318
|
|
31
31
|
listpick/utils/utils.py,sha256=QptLnqT15Z3G7xoq-6Q8e4-aZRFClTdb3h0l42di11s,13810
|
|
32
|
-
listpick-0.1.15.
|
|
33
|
-
listpick-0.1.15.
|
|
34
|
-
listpick-0.1.15.
|
|
35
|
-
listpick-0.1.15.
|
|
36
|
-
listpick-0.1.15.
|
|
37
|
-
listpick-0.1.15.
|
|
32
|
+
listpick-0.1.15.10.dist-info/licenses/LICENSE.txt,sha256=2mP-MRHJptADDNE9VInMNg1tE-C6Qv93Z4CCQKrpg9w,1061
|
|
33
|
+
listpick-0.1.15.10.dist-info/METADATA,sha256=FaUjvHk9A27z_fY8P14UrEYzrhCgsiMft5I1o_-qqEY,8132
|
|
34
|
+
listpick-0.1.15.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
35
|
+
listpick-0.1.15.10.dist-info/entry_points.txt,sha256=-QCf_BKIkUz35Y9nkYpjZWs2Qg0KfRna2PAs5DnF6BE,43
|
|
36
|
+
listpick-0.1.15.10.dist-info/top_level.txt,sha256=5mtsGEz86rz3qQDe0D463gGjAfSp6A3EWg4J4AGYr-Q,9
|
|
37
|
+
listpick-0.1.15.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|