listpick 0.1.15.10__py3-none-any.whl → 0.1.15.12__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 CHANGED
@@ -114,6 +114,7 @@ class Picker:
114
114
  cell_selections: dict[tuple[int,int], bool] = {},
115
115
  selected_cells_by_row: dict = {},
116
116
  highlight_full_row: bool =False,
117
+ crosshair_cursor: bool = False,
117
118
  cell_cursor: bool = True,
118
119
 
119
120
  items_per_page : int = -1,
@@ -248,6 +249,7 @@ class Picker:
248
249
  self.cell_selections = cell_selections
249
250
  self.selected_cells_by_row = selected_cells_by_row
250
251
  self.highlight_full_row = highlight_full_row
252
+ self.crosshair_cursor = crosshair_cursor
251
253
  self.cell_cursor = cell_cursor
252
254
 
253
255
  self.items_per_page = items_per_page
@@ -747,16 +749,26 @@ class Picker:
747
749
  return False
748
750
  return True
749
751
 
750
- def splash_screen(self, message="") -> None:
752
+ def splash_screen(self, message=[""]) -> None:
751
753
  """ Display a splash screen with a message. Useful when loading a large data set. """
752
754
 
753
755
  self.logger.info(f"function: splash_screen({message})")
754
- h, w =self.stdscr.getmaxyx()
756
+
755
757
  self.stdscr.bkgd(' ', curses.color_pair(2))
756
- try:
757
- self.stdscr.addstr(h//2, (w-len(message))//2, message, curses.color_pair(2))
758
- except:
759
- pass
758
+
759
+ if type(message) == type(""): message = [message]
760
+
761
+ h, w =self.stdscr.getmaxyx()
762
+ if len(message) > h: start_y = 0
763
+ else: start_y = (h-len(message))//2
764
+
765
+ for i in range(len(message)):
766
+ try:
767
+ s = message[i]
768
+ if len(s) > w: s = s[:w-2]
769
+ self.stdscr.addstr(start_y+i, (w-len(s))//2, s, curses.color_pair(2))
770
+ except:
771
+ pass
760
772
  self.stdscr.refresh()
761
773
 
762
774
  def draw_screen(self, indexed_items: list[Tuple[int, list[str]]], highlights: list[dict] = [{}], clear: bool = True) -> None:
@@ -948,27 +960,31 @@ class Picker:
948
960
  self.stdscr.addstr(y, 0, f" {self.indexed_items[idx][0]} ", curses.color_pair(self.colours_start+4) | curses.A_BOLD)
949
961
 
950
962
 
951
- def highlight_cell(row: int, col:int, visible_column_widths, colour_pair_number: int = 5, y:int = 0):
963
+ def highlight_cell(row: int, col:int, visible_column_widths, colour_pair_number: int = 5, bold: bool = False, y:int = 0):
952
964
 
953
965
  cell_pos = sum(visible_column_widths[:col])+col*len(self.separator)-self.leftmost_char + self.startx
954
966
  # cell_width = self.column_widths[self.selected_column]
955
967
  cell_width = visible_column_widths[col] + len(self.separator)
956
968
  cell_max_width = self.rows_w-cell_pos
957
969
 
970
+ if bold:
971
+ colour = curses.color_pair(self.colours_start+colour_pair_number) | curses.A_BOLD
972
+ else:
973
+ colour = curses.color_pair(self.colours_start+colour_pair_number)
958
974
  try:
959
975
  # Start of cell is on screen
960
976
  if self.startx <= cell_pos <= self.rows_w:
961
- self.stdscr.addstr(y, cell_pos, (' '*cell_width)[:cell_max_width], curses.color_pair(self.colours_start+colour_pair_number))
977
+ self.stdscr.addstr(y, cell_pos, (' '*cell_width)[:cell_max_width], colour)
962
978
  if self.centre_in_cols:
963
979
  cell_value = f"{self.indexed_items[row][1][col]:^{cell_width-len(self.separator)}}" + self.separator
964
980
  else:
965
- cell_value = self.indexed_items[row][1][col] + self.separator
981
+ cell_value = self.indexed_items[row][1][col][:self.column_widths[col]] + self.separator
966
982
  # cell_value = cell_value[:min(cell_width, cell_max_width)-len(self.separator)]
967
983
  cell_value = truncate_to_display_width(cell_value, min(cell_width, cell_max_width), self.centre_in_cols, self.unicode_char_width)
968
984
  # cell_value = cell_value + self.separator
969
985
  # cell_value = cell_value
970
986
  cell_value = truncate_to_display_width(cell_value, min(cell_width, cell_max_width), self.centre_in_cols, self.unicode_char_width)
971
- self.stdscr.addstr(y, cell_pos, cell_value, curses.color_pair(self.colours_start+colour_pair_number) | curses.A_BOLD)
987
+ self.stdscr.addstr(y, cell_pos, cell_value, colour)
972
988
  # Part of the cell is on screen
973
989
  elif self.startx <= cell_pos+cell_width and cell_pos < (self.rows_w):
974
990
  cell_start = self.startx - cell_pos
@@ -977,7 +993,7 @@ class Picker:
977
993
  cell_value = f"{cell_value:^{self.column_widths[col]}}"
978
994
 
979
995
  cell_value = cell_value[cell_start:visible_column_widths[col]][:self.rows_w-self.startx]
980
- self.stdscr.addstr(y, self.startx, cell_value, curses.color_pair(self.colours_start+colour_pair_number) | curses.A_BOLD)
996
+ self.stdscr.addstr(y, self.startx, cell_value, colour)
981
997
  else:
982
998
  pass
983
999
  # if colour_pair_number == 5:
@@ -1080,6 +1096,13 @@ class Picker:
1080
1096
  self.stdscr.addstr(y, self.startx, row_str[:min(self.rows_w-self.startx, visible_columns_total_width)], curses.color_pair(self.colours_start+2))
1081
1097
 
1082
1098
 
1099
+ ## Highlight column
1100
+ if self.crosshair_cursor:
1101
+ highlight_cell(idx, self.selected_column, visible_column_widths, colour_pair_number=27, bold=False, y=y)
1102
+ if idx == self.cursor_pos:
1103
+ self.stdscr.addstr(y, self.startx, row_str[:min(self.rows_w-self.startx, visible_columns_total_width)], curses.color_pair(self.colours_start+27))
1104
+
1105
+
1083
1106
  # Draw the level 0 highlights
1084
1107
  if not self.highlights_hide:
1085
1108
  draw_highlights(l0_highlights, idx, y, item)
@@ -1089,25 +1112,26 @@ class Picker:
1089
1112
  # self.selected_cells_by_row = get_selected_cells_by_row(self.cell_selections)
1090
1113
  if item[0] in self.selected_cells_by_row:
1091
1114
  for j in self.selected_cells_by_row[item[0]]:
1092
- highlight_cell(idx, j, visible_column_widths, colour_pair_number=25, y=y)
1115
+ highlight_cell(idx, j, visible_column_widths, colour_pair_number=25, bold=False, y=y)
1093
1116
 
1094
1117
  # Visually selected
1095
1118
  if self.is_selecting:
1096
1119
  if self.start_selection <= idx <= self.cursor_pos or self.start_selection >= idx >= self.cursor_pos:
1097
1120
  x_interval = range(min(self.start_selection_col, self.selected_column), max(self.start_selection_col, self.selected_column)+1)
1098
1121
  for col in x_interval:
1099
- highlight_cell(idx, col, visible_column_widths, colour_pair_number=25, y=y)
1122
+ highlight_cell(idx, col, visible_column_widths, colour_pair_number=25, bold=False, y=y)
1100
1123
 
1101
1124
  # Visually deslected
1102
1125
  if self.is_deselecting:
1103
1126
  if self.start_selection >= idx >= self.cursor_pos or self.start_selection <= idx <= self.cursor_pos:
1104
1127
  x_interval = range(min(self.start_selection_col, self.selected_column), max(self.start_selection_col, self.selected_column)+1)
1105
1128
  for col in x_interval:
1106
- highlight_cell(idx, col, visible_column_widths, colour_pair_number=26, y=y)
1129
+ highlight_cell(idx, col, visible_column_widths, colour_pair_number=26, bold=False,y=y)
1107
1130
  # Higlight cursor row and selected rows
1108
1131
  elif self.highlight_full_row:
1109
1132
  if self.selections[item[0]]:
1110
1133
  self.stdscr.addstr(y, self.startx, row_str[:min(self.rows_w-self.startx, visible_columns_total_width)], curses.color_pair(self.colours_start+25) | curses.A_BOLD)
1134
+
1111
1135
  # Visually selected
1112
1136
  if self.is_selecting:
1113
1137
  if self.start_selection <= idx <= self.cursor_pos or self.start_selection >= idx >= self.cursor_pos:
@@ -1133,16 +1157,19 @@ class Picker:
1133
1157
  if not self.highlights_hide:
1134
1158
  draw_highlights(l1_highlights, idx, y, item)
1135
1159
 
1160
+
1161
+
1136
1162
  # Draw cursor
1137
1163
  if idx == self.cursor_pos:
1138
1164
  if self.cell_cursor:
1139
- highlight_cell(idx, self.selected_column, visible_column_widths, colour_pair_number=5, y=y)
1165
+ highlight_cell(idx, self.selected_column, visible_column_widths, colour_pair_number=5, bold=True, y=y)
1140
1166
  else:
1141
1167
  self.stdscr.addstr(y, self.startx, row_str[:min(self.rows_w-self.startx, visible_columns_total_width)], curses.color_pair(self.colours_start+5) | curses.A_BOLD)
1142
1168
 
1143
1169
  if not self.highlights_hide:
1144
1170
  draw_highlights(l2_highlights, idx, y, item)
1145
1171
 
1172
+
1146
1173
  ## Display scrollbar
1147
1174
  if self.scroll_bar and len(self.indexed_items) and len(self.indexed_items) > (self.items_per_page):
1148
1175
  scroll_bar_length = int(self.items_per_page*self.items_per_page/len(self.indexed_items))
@@ -1249,6 +1276,7 @@ class Picker:
1249
1276
  "reset_colours": False,
1250
1277
  "cell_cursor": False,
1251
1278
  "split_right": False,
1279
+ "crosshair_cursor": False,
1252
1280
  }
1253
1281
 
1254
1282
  OptionPicker = Picker(submenu_win, **infobox_data)
@@ -1366,6 +1394,7 @@ class Picker:
1366
1394
  "split_right": self.split_right,
1367
1395
  "right_panes": self.right_panes,
1368
1396
  "right_pane_index": self.right_pane_index,
1397
+ "crosshair_cursor": self.crosshair_cursor,
1369
1398
 
1370
1399
  }
1371
1400
  return function_data
@@ -1496,6 +1525,7 @@ class Picker:
1496
1525
  "reset_colours": False,
1497
1526
  "split_right": False,
1498
1527
  "cell_cursor": False,
1528
+ "crosshair_cursor": False,
1499
1529
  }
1500
1530
  while True:
1501
1531
  h, w = stdscr.getmaxyx()
@@ -1555,6 +1585,7 @@ class Picker:
1555
1585
  "reset_colours": False,
1556
1586
  "split_right": False,
1557
1587
  "cell_cursor": False,
1588
+ "crosshair_cursor": False,
1558
1589
 
1559
1590
  }
1560
1591
  OptionPicker = Picker(submenu_win, **notification_data)
@@ -2489,6 +2520,7 @@ class Picker:
2489
2520
  "reset_colours": False,
2490
2521
  "cell_cursor": False,
2491
2522
  "split_right": False,
2523
+ "crosshair_cursor": False,
2492
2524
 
2493
2525
  }
2494
2526
  OptionPicker = Picker(self.stdscr, **help_data)
@@ -2601,6 +2633,7 @@ class Picker:
2601
2633
  "reset_colours": False,
2602
2634
  "cell_cursor": False,
2603
2635
  "split_right": False,
2636
+ "crosshair_cursor": False,
2604
2637
 
2605
2638
  }
2606
2639
  OptionPicker = Picker(self.stdscr, **info_data)
@@ -2960,11 +2993,24 @@ class Picker:
2960
2993
  row_width = sum(self.column_widths) + len(self.separator)*(len(self.column_widths)-1)
2961
2994
  if row_width-self.leftmost_char >= self.rows_w-self.startx-5:
2962
2995
  self.leftmost_char += 5
2996
+ self.leftmost_char = min(self.leftmost_char, row_width - (self.rows_w - self.startx) + 5)
2997
+
2998
+ elif self.check_key("scroll_right_25", key, self.keys_dict):
2999
+ self.logger.info(f"key_function scroll_right")
3000
+ if len(self.indexed_items):
3001
+ row_width = sum(self.column_widths) + len(self.separator)*(len(self.column_widths)-1)
3002
+ if row_width-self.leftmost_char >= self.rows_w-self.startx-25:
3003
+ self.leftmost_char += 25
3004
+ self.leftmost_char = min(self.leftmost_char, row_width - (self.rows_w - self.startx) + 5)
2963
3005
 
2964
3006
  elif self.check_key("scroll_left", key, self.keys_dict):
2965
3007
  self.logger.info(f"key_function scroll_left")
2966
3008
  self.leftmost_char = max(self.leftmost_char-5, 0)
2967
3009
 
3010
+ elif self.check_key("scroll_left_25", key, self.keys_dict):
3011
+ self.logger.info(f"key_function scroll_left")
3012
+ self.leftmost_char = max(self.leftmost_char-25, 0)
3013
+
2968
3014
  elif self.check_key("scroll_far_left", key, self.keys_dict):
2969
3015
  self.logger.info(f"key_function scroll_far_left")
2970
3016
  self.leftmost_char = 0
@@ -3574,95 +3620,39 @@ def set_colours(pick: int = 0, start: int = 0) -> Optional[int]:
3574
3620
  if not colours: return 0
3575
3621
 
3576
3622
  try:
3577
- start = standard_colours_start
3578
- curses.init_pair(start+1, colours['selected_fg'], colours['selected_bg'])
3579
- curses.init_pair(start+2, colours['unselected_fg'], colours['unselected_bg'])
3580
- curses.init_pair(start+3, colours['normal_fg'], colours['background'])
3581
- curses.init_pair(start+4, colours['header_fg'], colours['header_bg'])
3582
- curses.init_pair(start+5, colours['cursor_fg'], colours['cursor_bg'])
3583
- curses.init_pair(start+6, colours['normal_fg'], colours['background'])
3584
- curses.init_pair(start+7, colours['error_fg'], colours['error_bg'])
3585
- curses.init_pair(start+8, colours['complete_fg'], colours['complete_bg'])
3586
- curses.init_pair(start+9, colours['active_fg'], colours['active_bg'])
3587
- curses.init_pair(start+10, colours['search_fg'], colours['search_bg'])
3588
- curses.init_pair(start+11, colours['waiting_fg'], colours['waiting_bg'])
3589
- curses.init_pair(start+12, colours['paused_fg'], colours['paused_bg'])
3590
- curses.init_pair(start+13, colours['active_input_fg'], colours['active_input_bg'])
3591
- curses.init_pair(start+14, colours['modes_selected_fg'], colours['modes_selected_bg'])
3592
- curses.init_pair(start+15, colours['modes_unselected_fg'], colours['modes_unselected_bg'])
3593
- curses.init_pair(start+16, colours['title_fg'], colours['title_bg'])
3594
- curses.init_pair(start+17, colours['normal_fg'], colours['title_bar'])
3595
- curses.init_pair(start+18, colours['normal_fg'], colours['scroll_bar_bg'])
3596
- curses.init_pair(start+19, colours['selected_header_column_fg'], colours['selected_header_column_bg'])
3597
- curses.init_pair(start+20, colours['footer_fg'], colours['footer_bg'])
3598
- curses.init_pair(start+21, colours['refreshing_fg'], colours['refreshing_bg'])
3599
- curses.init_pair(start+22, colours['40pc_fg'], colours['40pc_bg'])
3600
- curses.init_pair(start+23, colours['refreshing_inactive_fg'], colours['refreshing_inactive_bg'])
3601
- curses.init_pair(start+24, colours['footer_string_fg'], colours['footer_string_bg'])
3602
- curses.init_pair(start+25, colours['selected_cell_fg'], colours['selected_cell_bg'])
3603
- curses.init_pair(start+26, colours['deselecting_cell_fg'], colours['deselecting_cell_bg'])
3604
-
3605
-
3606
- # notifications 50, infobox 100, help 150
3607
- # Notification colours
3608
- colours = notification_colours
3609
- start = notification_colours_start
3610
- curses.init_pair(start+1, colours['selected_fg'], colours['selected_bg'])
3611
- curses.init_pair(start+2, colours['unselected_fg'], colours['unselected_bg'])
3612
- curses.init_pair(start+3, colours['normal_fg'], colours['background'])
3613
- curses.init_pair(start+4, colours['header_fg'], colours['header_bg'])
3614
- curses.init_pair(start+5, colours['cursor_fg'], colours['cursor_bg'])
3615
- curses.init_pair(start+6, colours['normal_fg'], colours['background'])
3616
- curses.init_pair(start+7, colours['error_fg'], colours['error_bg'])
3617
- curses.init_pair(start+8, colours['complete_fg'], colours['complete_bg'])
3618
- curses.init_pair(start+9, colours['active_fg'], colours['active_bg'])
3619
- curses.init_pair(start+10, colours['search_fg'], colours['search_bg'])
3620
- curses.init_pair(start+11, colours['waiting_fg'], colours['waiting_bg'])
3621
- curses.init_pair(start+12, colours['paused_fg'], colours['paused_bg'])
3622
- curses.init_pair(start+13, colours['active_input_fg'], colours['active_input_bg'])
3623
- curses.init_pair(start+14, colours['modes_selected_fg'], colours['modes_selected_bg'])
3624
- curses.init_pair(start+15, colours['modes_unselected_fg'], colours['modes_unselected_bg'])
3625
- curses.init_pair(start+16, colours['title_fg'], colours['title_bg'])
3626
- curses.init_pair(start+17, colours['normal_fg'], colours['title_bar'])
3627
- curses.init_pair(start+18, colours['normal_fg'], colours['scroll_bar_bg'])
3628
- curses.init_pair(start+19, colours['selected_header_column_fg'], colours['selected_header_column_bg'])
3629
- curses.init_pair(start+20, colours['footer_fg'], colours['footer_bg'])
3630
- curses.init_pair(start+21, colours['refreshing_fg'], colours['refreshing_bg'])
3631
- curses.init_pair(start+22, colours['40pc_fg'], colours['40pc_bg'])
3632
- curses.init_pair(start+23, colours['refreshing_inactive_fg'], colours['refreshing_inactive_bg'])
3633
- curses.init_pair(start+24, colours['footer_string_fg'], colours['footer_string_bg'])
3634
- curses.init_pair(start+25, colours['selected_cell_fg'], colours['selected_cell_bg'])
3635
- curses.init_pair(start+26, colours['deselecting_cell_fg'], colours['deselecting_cell_bg'])
3636
-
3637
- # Help
3638
- colours = help_colours
3639
- start = help_colours_start
3640
- curses.init_pair(start+1, colours['selected_fg'], colours['selected_bg'])
3641
- curses.init_pair(start+2, colours['unselected_fg'], colours['unselected_bg'])
3642
- curses.init_pair(start+3, colours['normal_fg'], colours['background'])
3643
- curses.init_pair(start+4, colours['header_fg'], colours['header_bg'])
3644
- curses.init_pair(start+5, colours['cursor_fg'], colours['cursor_bg'])
3645
- curses.init_pair(start+6, colours['normal_fg'], colours['background'])
3646
- curses.init_pair(start+7, colours['error_fg'], colours['error_bg'])
3647
- curses.init_pair(start+8, colours['complete_fg'], colours['complete_bg'])
3648
- curses.init_pair(start+9, colours['active_fg'], colours['active_bg'])
3649
- curses.init_pair(start+10, colours['search_fg'], colours['search_bg'])
3650
- curses.init_pair(start+11, colours['waiting_fg'], colours['waiting_bg'])
3651
- curses.init_pair(start+12, colours['paused_fg'], colours['paused_bg'])
3652
- curses.init_pair(start+13, colours['active_input_fg'], colours['active_input_bg'])
3653
- curses.init_pair(start+14, colours['modes_selected_fg'], colours['modes_selected_bg'])
3654
- curses.init_pair(start+15, colours['modes_unselected_fg'], colours['modes_unselected_bg'])
3655
- curses.init_pair(start+16, colours['title_fg'], colours['title_bg'])
3656
- curses.init_pair(start+17, colours['normal_fg'], colours['title_bar'])
3657
- curses.init_pair(start+18, colours['normal_fg'], colours['scroll_bar_bg'])
3658
- curses.init_pair(start+19, colours['selected_header_column_fg'], colours['selected_header_column_bg'])
3659
- curses.init_pair(start+20, colours['footer_fg'], colours['footer_bg'])
3660
- curses.init_pair(start+21, colours['refreshing_fg'], colours['refreshing_bg'])
3661
- curses.init_pair(start+22, colours['40pc_fg'], colours['40pc_bg'])
3662
- curses.init_pair(start+23, colours['refreshing_inactive_fg'], colours['refreshing_inactive_bg'])
3663
- curses.init_pair(start+24, colours['footer_string_fg'], colours['footer_string_bg'])
3664
- curses.init_pair(start+25, colours['selected_cell_fg'], colours['selected_cell_bg'])
3665
- curses.init_pair(start+26, colours['deselecting_cell_fg'], colours['deselecting_cell_bg'])
3623
+ colour_sets = [colours, notification_colours, help_colours]
3624
+ colour_pair_offsets = [standard_colours_start, notification_colours_start, help_colours_start]
3625
+ for i in range(3):
3626
+ start = colour_pair_offsets[i]
3627
+ colours = colour_sets[i]
3628
+ curses.init_pair(start+1, colours['selected_fg'], colours['selected_bg'])
3629
+ curses.init_pair(start+2, colours['unselected_fg'], colours['unselected_bg'])
3630
+ curses.init_pair(start+3, colours['normal_fg'], colours['background'])
3631
+ curses.init_pair(start+4, colours['header_fg'], colours['header_bg'])
3632
+ curses.init_pair(start+5, colours['cursor_fg'], colours['cursor_bg'])
3633
+ curses.init_pair(start+6, colours['normal_fg'], colours['background'])
3634
+ curses.init_pair(start+7, colours['error_fg'], colours['error_bg'])
3635
+ curses.init_pair(start+8, colours['complete_fg'], colours['complete_bg'])
3636
+ curses.init_pair(start+9, colours['active_fg'], colours['active_bg'])
3637
+ curses.init_pair(start+10, colours['search_fg'], colours['search_bg'])
3638
+ curses.init_pair(start+11, colours['waiting_fg'], colours['waiting_bg'])
3639
+ curses.init_pair(start+12, colours['paused_fg'], colours['paused_bg'])
3640
+ curses.init_pair(start+13, colours['active_input_fg'], colours['active_input_bg'])
3641
+ curses.init_pair(start+14, colours['modes_selected_fg'], colours['modes_selected_bg'])
3642
+ curses.init_pair(start+15, colours['modes_unselected_fg'], colours['modes_unselected_bg'])
3643
+ curses.init_pair(start+16, colours['title_fg'], colours['title_bg'])
3644
+ curses.init_pair(start+17, colours['normal_fg'], colours['title_bar'])
3645
+ curses.init_pair(start+18, colours['normal_fg'], colours['scroll_bar_bg'])
3646
+ curses.init_pair(start+19, colours['selected_header_column_fg'], colours['selected_header_column_bg'])
3647
+ curses.init_pair(start+20, colours['footer_fg'], colours['footer_bg'])
3648
+ curses.init_pair(start+21, colours['refreshing_fg'], colours['refreshing_bg'])
3649
+ curses.init_pair(start+22, colours['40pc_fg'], colours['40pc_bg'])
3650
+ curses.init_pair(start+23, colours['refreshing_inactive_fg'], colours['refreshing_inactive_bg'])
3651
+ curses.init_pair(start+24, colours['footer_string_fg'], colours['footer_string_bg'])
3652
+ curses.init_pair(start+25, colours['selected_cell_fg'], colours['selected_cell_bg'])
3653
+ curses.init_pair(start+26, colours['deselecting_cell_fg'], colours['deselecting_cell_bg'])
3654
+ curses.init_pair(start+27, colours['active_column_fg'], colours['active_column_bg'])
3655
+
3666
3656
  except Exception as e:
3667
3657
  pass
3668
3658
  COLOURS_SET = True
listpick/ui/build_help.py CHANGED
@@ -129,8 +129,10 @@ def build_help_rows(keys_dict: dict, debug: bool = False) -> list[list[str]]:
129
129
  "notification_toggle": "Toggle empty notification.",
130
130
  "redo": "Redo.",
131
131
  "undo": "Undo.",
132
- "scroll_right": "Scroll right.",
133
- "scroll_left": "Scroll left.",
132
+ "scroll_right": "Scroll right (5 chars).",
133
+ "scroll_left": "Scroll left (5 chars).",
134
+ "scroll_right_25": "Scroll right (25 chars).",
135
+ "scroll_left_25": "Scroll left (25 chars).",
134
136
  "scroll_far_right": "Scroll to the end of the column set.",
135
137
  "scroll_far_left": "Scroll to the left home.",
136
138
  "add_column_before": "Insert column before cursor.",
@@ -146,7 +148,7 @@ def build_help_rows(keys_dict: dict, debug: bool = False) -> list[list[str]]:
146
148
  "cycle_right_pane": "Cycle through right panes",
147
149
  }
148
150
  sections = {
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" ],
151
+ "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_right_25", "scroll_left_25", "scroll_far_right", "scroll_far_left" ],
150
152
  "Selection:": [ "toggle_select", "select_all", "select_none", "visual_selection_toggle", "visual_deselection_toggle", "enter" ],
151
153
  "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"],
152
154
  "Sort:": [ "cycle_sort_method", "cycle_sort_method_reverse", "cycle_sort_order", ] ,
listpick/ui/keys.py CHANGED
@@ -74,6 +74,8 @@ picker_keys = {
74
74
  "redo": [ord('.')],
75
75
  "undo": [26], # Ctrl+z
76
76
  "scroll_right": [ord('l'), curses.KEY_RIGHT],
77
+ "scroll_right_25": [keycodes.META_l],
78
+ "scroll_left_25": [keycodes.META_h],
77
79
  "scroll_left": [ord('h'), curses.KEY_LEFT],
78
80
  "scroll_far_right": [ord('L')],
79
81
  "scroll_far_left": [ord('H')],
@@ -69,6 +69,8 @@ def get_colours(pick:int=0) -> Dict[str, int]:
69
69
  'selected_cell_fg': 253,
70
70
  'deselecting_cell_bg': 162,
71
71
  'deselecting_cell_fg': 253,
72
+ 'active_column_bg': 234,
73
+ 'active_column_fg': 253,
72
74
  },
73
75
  ### (1) Black and white
74
76
  {
@@ -120,6 +122,8 @@ def get_colours(pick:int=0) -> Dict[str, int]:
120
122
  'selected_cell_fg': 253,
121
123
  'deselecting_cell_bg': 162,
122
124
  'deselecting_cell_fg': 253,
125
+ 'active_column_bg': 234,
126
+ 'active_column_fg': 253,
123
127
  },
124
128
  ### (2) Blue header, blue title, blue modes, purple selected, green cursor
125
129
  {
@@ -171,6 +175,8 @@ def get_colours(pick:int=0) -> Dict[str, int]:
171
175
  'selected_cell_fg': 253,
172
176
  'deselecting_cell_bg': 162,
173
177
  'deselecting_cell_fg': 253,
178
+ 'active_column_bg': 234,
179
+ 'active_column_fg': 253,
174
180
  },
175
181
  ### (3) Purple header, purple title, white modes, green selected, blue cursor
176
182
  {
@@ -222,6 +228,8 @@ def get_colours(pick:int=0) -> Dict[str, int]:
222
228
  'selected_cell_fg': 232,
223
229
  'deselecting_cell_bg': 162,
224
230
  'deselecting_cell_fg': 253,
231
+ 'active_column_bg': 234,
232
+ 'active_column_fg': 253,
225
233
  },
226
234
  ## (4) 3-bit colours
227
235
  {
@@ -273,6 +281,8 @@ def get_colours(pick:int=0) -> Dict[str, int]:
273
281
  'selected_cell_fg': 253,
274
282
  'deselecting_cell_bg': curses.COLOR_MAGENTA,
275
283
  'deselecting_cell_fg': curses.COLOR_WHITE,
284
+ 'active_column_bg': curses.COLOR_BLACK,
285
+ 'active_column_fg': curses.COLOR_WHITE,
276
286
  },
277
287
  ]
278
288
  for colour in colours:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: listpick
3
- Version: 0.1.15.10
3
+ Version: 0.1.15.12
4
4
  Summary: Listpick is a powerful TUI data tool for creating TUI apps or viewing/comparing tabulated data.
5
5
  Home-page: https://github.com/grimandgreedy/listpick
6
6
  Author: Grim
@@ -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=ttUfM3x4q-3wAD8nPGQOUcA1b6gZWZ572OJKbGH2Ovc,200530
3
+ listpick/listpick_app.py,sha256=e8R3UlaRfAKtc5pBls1SHatyR2KQCapFLqbTjumEEn0,198303
4
4
  listpick/pane/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  listpick/pane/get_data.py,sha256=21PTDXt9HP-4vZV4QUM8sidTqDEaKnKCDshl3-cSRCo,2255
6
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=fDEURRb51slvK7rpk2iPWcJAwIAVigv8dp6T4cziZb4,10544
9
+ listpick/ui/build_help.py,sha256=IpN4tX4U8ET3icRoTlF389VqVjVcPAon617vgstlPAc,10750
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=nAmUn95UGuqh3QQMHWsPsXWW3or2oVMVlkzJV1t3zLQ,13559
14
- listpick/ui/picker_colours.py,sha256=wq6FhXELejCoeBunWQgk9bsD0lLA3xM-I9WzZdWfWFE,12287
13
+ listpick/ui/keys.py,sha256=1NCsOPFxhNuVPbO5vflcArNZ1jbBBerPQ3oZUAZDyPs,13682
14
+ listpick/ui/picker_colours.py,sha256=kOewfOXDJtlMCI5q-hbjRNOZzIoDjuwsGE_wB1Rtrbg,12647
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.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,,
32
+ listpick-0.1.15.12.dist-info/licenses/LICENSE.txt,sha256=2mP-MRHJptADDNE9VInMNg1tE-C6Qv93Z4CCQKrpg9w,1061
33
+ listpick-0.1.15.12.dist-info/METADATA,sha256=3sBOgZpK_XzOP5i0VdUAhgKWSG40PeAiDQ77GKzcgBg,8132
34
+ listpick-0.1.15.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
35
+ listpick-0.1.15.12.dist-info/entry_points.txt,sha256=-QCf_BKIkUz35Y9nkYpjZWs2Qg0KfRna2PAs5DnF6BE,43
36
+ listpick-0.1.15.12.dist-info/top_level.txt,sha256=5mtsGEz86rz3qQDe0D463gGjAfSp6A3EWg4J4AGYr-Q,9
37
+ listpick-0.1.15.12.dist-info/RECORD,,