Tiny Core Base > Release Candidate Testing
Core v14.0beta1
nick65go:
--- Quote from: CNK on March 06, 2023, 08:34:04 PM ---[This is too long for the default aterm terminal window size of 80x24 characters. Testing in TC 13, although all the entries are visible, it scrolls down below the blank line at the top, and this causes the starting position of the text to change when there are fewer entries on the list (eg. when you get to the last page of results). More annoyingly, on slow computers (or slow Telnet/SSH/serial connections) it causes extra flickering as the window scrolls down one line each time the list is redrawn.
--- End quote ---
The idea is to see "as many as possible" tcz/screen. I did not know that exist (and are used today) terminals of 24 rows.
Anyway, there are still two empty lines in the list, one at top, one at bottom, generated by "echo" commands in the script, which could be also removed.
I obey the majority /democracy. If I am minority, then so be it. Maybe you want to "enhance" the script to check for tty rows.
EDIT: I aterm (so under X server) I can change the resolution and have a lot more of rows. In console / terminal I have 25 rows normally. If radeon console driver is loaded I have also a lot of rows. IMMV.
curaga:
--- Quote from: nick65go on March 06, 2023, 02:43:03 PM ---Maybe we could just force all like:
--- Code: ---/sbin/modprobe acpi-cpufreq powernow-k8 amd_freq_sensitivity
--- End code ---
and the kernel is smart enough to load only what is needs.
--- End quote ---
Most of those modules are for 32-bit cpus, so they aren't present on 64-bit. Loading everything would work, but it may take some extra time and print a message in dmesg that there is no such hardware.
nick65go, do you want to post a new patch that uses the maximum that fits into default aterm, or do I revert?
nick65go:
--- Quote from: curaga on March 07, 2023, 03:05:09 AM ---nick65go, do you want to post a new patch that uses the maximum that fits into default aterm, or do I revert?
--- End quote ---
please revert it.
nick65go:
I eliminated the 3 empty rows (two in top, one in bottom), and n=next and p=previous are OK; tested on rows=60 in Xorg.
--- Code: ------ ./select.orig
+++ /usr/bin/select
@@ -13 +13 @@
-awk -v title="$1" -v offset="$OFFSET" -v answer="/tmp/select.ans" '
+awk -v title="$1" -v offset="$OFFSET" -v answer="/tmp/select.ans" -v r="$(expr `stty size | cut -d" " -f1` - 2)" '
@@ -33,2 +33,2 @@
- printf "\n%s\n\n", title
- for (l=1; l<=15; l++) {
+ printf "%s\n", title
+ for (l=1; l<=r ; l++) {
@@ -38,2 +38,2 @@
- printf "\nEnter selection ( 1 - %s ) or (q)uit", NR
- if ( NR > 15 ) printf ", (n)ext, (p)revious: "
+ printf "Enter selection ( 1 - %s ) or (q)uit", NR
+ if ( NR > r ) printf ", (n)ext, (p)revious: "
@@ -44,2 +44,2 @@
- if ( j > 15 )
- j = j - 30
+ if ( j > r )
+ j = j - r * 2
@@ -52 +52 @@
- j = j - 15
+ j = j - r
@@ -56 +56 @@
- if (selection+0 < 1 || selection+0 > NR ) j = j - 15
+ if (selection+0 < 1 || selection+0 > NR ) j = j - r
--- End code ---
curaga:
Applied. Please use -U (not -U0) in the future, it helps if it's not an exact match (someone else also worked on it, etc).
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version