Skip to content

Commit 9f3bc7b

Browse files
committed
Some bug fixes, both with building and the actual app, also update legacy readme
1 parent dbac497 commit 9f3bc7b

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

Legacy/README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,18 @@
66
</a>
77
</p>
88

9-
This section of the project is made for machines running lower than macOS Sierra (or if you're running on something like High Sierra on x86). The requirements for this version are pretty much the requirements for itlwm.
9+
This section of the project is made for machines running lower than macOS Sierra, or are running a 32-bit CPU. The requirements for this version are pretty much the requirements for itlwm.
1010

11-
- Mac OS X Lion (10.7) through OS X El Capitan (10.11).
11+
- Mac OS X Lion (10.7) through macOS Tahoe (26).
1212
- 32-bit *or* 64-bit CPU.
1313

14-
Note that this project is not as maintained as regular ItlwmCLI, so it may not always work properly.
14+
Note that this project is not *as* maintained as regular ItlwmCLI, so it may not always work properly.
1515

1616
This is very similar to the main ItlwmCLI, but it has a few differences:
1717
- It has an extremely simple TUI
1818
- There's no graph or network list in the TUI
1919
- There's no settings features (yet, if there's demand it's possible)
2020

21-
Other than that, it uses the exact same API as the main ItlwmCLI, so it should be able to do whatever itlwm can do.
21+
Other than that, it uses the exact same API as the main ItlwmCLI, so it should be able to do whatever the main ItlwmCLI can do.
2222

23-
![Screenshot at Calebh101/ItlwmCLI/Assets/Screenshots/legacy.png](https://github.com/Calebh101/ItlwmCLI/raw/refs/heads/master/Assets/Screenshots/legacy.png)
24-
25-
<sub>Note that this screenshot is from a Linux environment, so it does not have access to itlwm.
23+
![Screenshot at Calebh101/ItlwmCLI/Assets/Screenshots/legacy.png](https://github.com/Calebh101/ItlwmCLI/raw/refs/heads/master/Assets/Screenshots/legacy.png)

Legacy/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ BUILD_64="$ROOT/build/x64"
1111
BUILD_WITHOUT_VERSION=false
1212
OPTIONS_STRING_RAW=""
1313

14-
while getopts "vf:" opt; do
14+
while getopts "v" opt; do
1515
case $opt in
1616
v) BUILD_WITHOUT_VERSION=true ;;
1717
*)

build.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ NO_BUILD_PACKAGES=false # -p
1414

1515
OPTIONS_STRING_RAW=""
1616

17-
while getopts "vf:" opt; do
17+
while getopts "vp" opt; do
1818
case $opt in
1919
v) BUILD_WITHOUT_VERSION=true ;;
2020
p) NO_BUILD_PACKAGES=true ;;
@@ -27,7 +27,6 @@ while getopts "vf:" opt; do
2727
OPTIONS_STRING_RAW+="$opt"
2828
done
2929

30-
3130
if [[ -n "$OPTIONS_STRING_RAW" ]]; then
3231
OPTIONS_STRING="-$OPTIONS_STRING_RAW"
3332
else

main.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,6 @@ int main(int argc, char* argv[]) {
452452

453453
size_t start = (output.size() > VISIBLE_LOG_LINES) ? (output.size() - VISIBLE_LOG_LINES) : 0; // Where should we start rendering command logs?
454454
bool foundConnected = false; // If one of the networks returned from itlwm is the one we're connected to (it doesn't seem to do this in my testing)
455-
std::string inputIndexPadding(LOG_INDEX_PADDING - 1, ' '); // Padding for the command line prompt row
456455

457456
for (size_t i = start - positionAway; i < output.size() - positionAway; ++i) {
458457
std::string index = std::to_string(i + 1);
@@ -532,6 +531,11 @@ int main(int argc, char* argv[]) {
532531
maxRssi = *std::max_element(signalRssis.begin(), signalRssis.end()); // Maximum graph point (based on the entire dataset)
533532
if (minRssi == maxRssi) maxRssi = minRssi + 1;
534533

534+
// Fancy duplication stuff
535+
int lastIndexLength = output.size();
536+
std::stringstream hashtagStream;
537+
hashtagStream << std::setw(LOG_INDEX_PADDING) << std::setfill(' ') << std::string(std::to_string(output.size()).size(), '#');
538+
535539
// Get average RSSI
536540
long long rssiSum = 0;
537541
for (int n : signalRssis) rssiSum += abs(n);
@@ -605,7 +609,7 @@ int main(int argc, char* argv[]) {
605609
// Command line
606610
vbox({
607611
vbox(output_elements),
608-
hbox({text(fmt::format("{}#. > ", inputIndexPadding)), input->Render()}),
612+
hbox({text(fmt::format("{}. > ", hashtagStream.str())), input->Render()}),
609613
}) | border | size(HEIGHT, EQUAL, VISIBLE_LOG_LINES + 3),
610614
});
611615
});

0 commit comments

Comments
 (0)