Skip to content

Commit

Permalink
Remove CLI option to print keymap
Browse files Browse the repository at this point in the history
  • Loading branch information
NorseDreki committed May 23, 2024
1 parent e9c6c47 commit 6395eae
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
10 changes: 2 additions & 8 deletions src/nativeMain/kotlin/com/norsedreki/dogcat/app/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ fun main(args: Array<String>) {
if (appModule.appArguments.version == true) {
val m =
"""
Dogcat version ${BuildConfig.VERSION} by Alex Dmitriev ()
Dogcat version ${BuildConfig.VERSION} by Alex Dmitriev <mr.alex.dmitriev@icloud.com>
A terminal-based Android Logcat reader with sane colouring
Terminal-based Android Logcat reader with a sane colouring
https://github.com/NorseDreki/dogcat
"""
.trimIndent()
Expand All @@ -55,12 +55,6 @@ fun main(args: Array<String>) {
exit(0)
}

if (appModule.appArguments.printKeymap == true) {
Keymap.bindings.entries.forEach { println("${it.value.name} -- '${Char(it.key)}'") }

exit(0)
}

val handler = CoroutineExceptionHandler { _, e ->
Logger.d("Exception in top-level handler: ${e.message}")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package com.norsedreki.dogcat.app.ui

interface HasLifecycle {

suspend fun start()

suspend fun stop()
Expand Down
2 changes: 2 additions & 0 deletions src/nativeMain/kotlin/com/norsedreki/dogcat/app/ui/Strings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ object Strings {
const val ALL_APPS = "All apps"

const val HELP_WINDOW_TITLE = "Help: Shortcuts"

const val HELP_CAPTION = "| (?) Help"
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import com.norsedreki.dogcat.app.ui.CommonColors.RED_ON_WHITE
import com.norsedreki.dogcat.app.ui.HasLifecycle
import com.norsedreki.dogcat.app.ui.Strings.ALL_APPS
import com.norsedreki.dogcat.app.ui.Strings.AUTOSCROLL
import com.norsedreki.dogcat.app.ui.Strings.HELP_CAPTION
import com.norsedreki.dogcat.app.ui.Strings.INPUT_FILTER_PREFIX
import com.norsedreki.dogcat.app.ui.Strings.LOG_LEVEL_PREFIX
import com.norsedreki.dogcat.app.ui.Strings.NO_AUTOSCROLL
Expand Down Expand Up @@ -137,17 +138,12 @@ class StatusView : HasLifecycle {
}

private fun updateHelp() {
//wattron(window, COLOR_PAIR(GREEN_ON_WHITE.colorPairCode))
wattron(window, COLOR_PAIR(BLACK_ON_WHITE.colorPairCode))
//wattron(window, A_BOLD.toInt())

val s = "| (?) Help"
val offsetX = STATUS_VIEW_AUTOSCROLL_LEFT_MARGIN + NO_AUTOSCROLL.length + 2
mvwprintw(window, 0, offsetX, s)
mvwprintw(window, 0, offsetX, HELP_CAPTION)

//wattroff(window, A_BOLD.toInt())
wattroff(window, COLOR_PAIR(BLACK_ON_WHITE.colorPairCode))
//wattroff(window, COLOR_PAIR(GREEN_ON_WHITE.colorPairCode))
}

private fun updateDevice(device: String, running: Boolean) {
Expand Down

0 comments on commit 6395eae

Please sign in to comment.