Refactor, Rename, Cleanup
This commit is contained in:
parent
5c9f29eaaa
commit
888e0ce990
11 changed files with 20 additions and 20 deletions
|
@ -1 +1 @@
|
||||||
org-data-accessor
|
KRemoteAccess
|
|
@ -3,6 +3,7 @@
|
||||||
<component name="CheckStyle-IDEA" serialisationVersion="2">
|
<component name="CheckStyle-IDEA" serialisationVersion="2">
|
||||||
<checkstyleVersion>10.12.5</checkstyleVersion>
|
<checkstyleVersion>10.12.5</checkstyleVersion>
|
||||||
<scanScope>JavaOnly</scanScope>
|
<scanScope>JavaOnly</scanScope>
|
||||||
|
<scanBeforeCheckin>true</scanBeforeCheckin>
|
||||||
<option name="thirdPartyClasspath" />
|
<option name="thirdPartyClasspath" />
|
||||||
<option name="activeLocationIds" />
|
<option name="activeLocationIds" />
|
||||||
<option name="locations">
|
<option name="locations">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# KRemoteAccess
|
# kotRemote
|
||||||
Wrapper for sshfs, built in Kotlin, and utilizes [Jexer](https://git.ouroboros.group/limepotato/jexer)
|
Wrapper for sshfs, built in Kotlin, and utilizes [Jexer](https://git.ouroboros.group/limepotato/jexer)
|
||||||
|
|
||||||
|
|
||||||
|
|
1
TODO.md
1
TODO.md
|
@ -11,6 +11,5 @@
|
||||||
- Probably should have logging of some sort, if something goes wrong for a board member
|
- Probably should have logging of some sort, if something goes wrong for a board member
|
||||||
~~- Detect system (windows/linux(x11 or wayland?)/terminal?)~~ and environment, ~~then switch Jexers environment based on that~~
|
~~- Detect system (windows/linux(x11 or wayland?)/terminal?)~~ and environment, ~~then switch Jexers environment based on that~~
|
||||||
~~- Maybe make this not hardcode org servers, rebrand, allow user to customize servers (none at start),~~ and keep them saved, then open-source?
|
~~- Maybe make this not hardcode org servers, rebrand, allow user to customize servers (none at start),~~ and keep them saved, then open-source?
|
||||||
- Rename/Rebrand
|
|
||||||
- Allow function of a file browser in Jexer?
|
- Allow function of a file browser in Jexer?
|
||||||
- Allow function of a terminal/remote terminal in Jexer?
|
- Allow function of a terminal/remote terminal in Jexer?
|
|
@ -34,14 +34,14 @@ tasks {
|
||||||
named<ShadowJar>("shadowJar") {
|
named<ShadowJar>("shadowJar") {
|
||||||
mergeServiceFiles()
|
mergeServiceFiles()
|
||||||
manifest {
|
manifest {
|
||||||
attributes(mapOf("Main-Class" to "org.bm00.kRemoteAccess.MainKt"))
|
attributes(mapOf("Main-Class" to "xyz.limepot.kotRemote.MainKt"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val jar by tasks.getting(Jar::class) {
|
val jar by tasks.getting(Jar::class) {
|
||||||
manifest {
|
manifest {
|
||||||
attributes["Main-Class"] = "org.bm00.kRemoteAccess.MainKt"
|
attributes["Main-Class"] = "xyz.limepot.kotRemote.MainKt"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
plugins {
|
plugins {
|
||||||
id("org.gradle.toolchains.foojay-resolver-convention") version "0.5.0"
|
id("org.gradle.toolchains.foojay-resolver-convention") version "0.5.0"
|
||||||
}
|
}
|
||||||
rootProject.name = "KRemoteAccess"
|
rootProject.name = "kotRemote"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package xyz.limepot.kRemoteAccess
|
package xyz.limepot.kotRemote
|
||||||
|
|
||||||
import jexer.TApplication
|
import jexer.TApplication
|
||||||
import xyz.limepot.kRemoteAccess.jexerWindow.WelcomeWindow
|
import xyz.limepot.kotRemote.jexerWindow.WelcomeWindow
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
//// OS CHECKER ////
|
//// OS CHECKER ////
|
|
@ -1,4 +1,4 @@
|
||||||
package xyz.limepot.kRemoteAccess
|
package xyz.limepot.kotRemote
|
||||||
|
|
||||||
import dev.dirs.ProjectDirectories
|
import dev.dirs.ProjectDirectories
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
@ -12,9 +12,9 @@ import java.util.*
|
||||||
val prop = Properties()
|
val prop = Properties()
|
||||||
|
|
||||||
class Config {
|
class Config {
|
||||||
val confDir = ProjectDirectories.from("org", "bm00", "osda")
|
val confDir = ProjectDirectories.from("limepot", "xyz", "kotRemote")
|
||||||
val runDir = File(confDir.configDir)
|
val runDir = File(confDir.configDir)
|
||||||
val confFile = File(confDir.configDir + "/osda.cfg")
|
val confFile = File(confDir.configDir + "/kotRemote.cfg")
|
||||||
private val prop = Properties()
|
private val prop = Properties()
|
||||||
private var runDirExists = runDir.exists()
|
private var runDirExists = runDir.exists()
|
||||||
init {
|
init {
|
||||||
|
@ -27,13 +27,13 @@ class Config {
|
||||||
}
|
}
|
||||||
//Otherwise create the necessary directories
|
//Otherwise create the necessary directories
|
||||||
else{
|
else{
|
||||||
Files.createFile(Paths.get(confDir.configDir + "/osda.cfg"))
|
Files.createFile(Paths.get(confDir.configDir + "/kotRemote.cfg"))
|
||||||
FileInputStream(confFile).use {
|
FileInputStream(confFile).use {
|
||||||
prop.load(it)
|
prop.load(it)
|
||||||
prop.setProperty("configVersion", "1")
|
prop.setProperty("configVersion", "1")
|
||||||
}
|
}
|
||||||
val out: OutputStream = FileOutputStream(confFile)
|
val out: OutputStream = FileOutputStream(confFile)
|
||||||
prop.store(out, "Org Secure Data Accessor - OSDA Config file")
|
prop.store(out, "kotRemote Config File")
|
||||||
}
|
}
|
||||||
|
|
||||||
//Set Jexer Colors
|
//Set Jexer Colors
|
|
@ -1,10 +1,10 @@
|
||||||
package xyz.limepot.kRemoteAccess.jexerWindow
|
package xyz.limepot.kotRemote.jexerWindow
|
||||||
|
|
||||||
import jexer.TAction
|
import jexer.TAction
|
||||||
import jexer.TApplication
|
import jexer.TApplication
|
||||||
import jexer.TWindow
|
import jexer.TWindow
|
||||||
import jexer.layout.StretchLayoutManager
|
import jexer.layout.StretchLayoutManager
|
||||||
import xyz.limepot.kRemoteAccess.osName
|
import xyz.limepot.kotRemote.osName
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
//// OS CHECKER ////
|
//// OS CHECKER ////
|
|
@ -1,4 +1,4 @@
|
||||||
package xyz.limepot.kRemoteAccess.jexerWindow
|
package xyz.limepot.kotRemote.jexerWindow
|
||||||
|
|
||||||
import jexer.TAction
|
import jexer.TAction
|
||||||
import jexer.TApplication
|
import jexer.TApplication
|
||||||
|
@ -6,7 +6,7 @@ import jexer.TWindow
|
||||||
import jexer.layout.StretchLayoutManager
|
import jexer.layout.StretchLayoutManager
|
||||||
|
|
||||||
class WelcomeWindow private constructor(parent: TApplication, flags: Int) :
|
class WelcomeWindow private constructor(parent: TApplication, flags: Int) :
|
||||||
TWindow(parent, "KRemoteAccess", 0, 0, 46, 8, flags) {
|
TWindow(parent, "kotRemote", 0, 0, 46, 8, flags) {
|
||||||
constructor(parent: TApplication) : this(parent, CENTERED)
|
constructor(parent: TApplication) : this(parent, CENTERED)
|
||||||
init {
|
init {
|
||||||
layoutManager = StretchLayoutManager(
|
layoutManager = StretchLayoutManager(
|
||||||
|
@ -25,7 +25,7 @@ class WelcomeWindow private constructor(parent: TApplication, flags: Int) :
|
||||||
addButton("Exit...", CENTERED + 28, CENTERED - 2,
|
addButton("Exit...", CENTERED + 28, CENTERED - 2,
|
||||||
object : TAction() {
|
object : TAction() {
|
||||||
override fun DO() {
|
override fun DO() {
|
||||||
if (xyz.limepot.kRemoteAccess.osName == "LINUX") {
|
if (xyz.limepot.kotRemote.osName == "LINUX") {
|
||||||
ProcessBuilder("umount", "/tmp/osda_mount")
|
ProcessBuilder("umount", "/tmp/osda_mount")
|
||||||
.redirectOutput(ProcessBuilder.Redirect.INHERIT)
|
.redirectOutput(ProcessBuilder.Redirect.INHERIT)
|
||||||
.redirectError(ProcessBuilder.Redirect.INHERIT)
|
.redirectError(ProcessBuilder.Redirect.INHERIT)
|
||||||
|
@ -33,7 +33,7 @@ class WelcomeWindow private constructor(parent: TApplication, flags: Int) :
|
||||||
.waitFor()
|
.waitFor()
|
||||||
System.exit(0)
|
System.exit(0)
|
||||||
}
|
}
|
||||||
else if (xyz.limepot.kRemoteAccess.osName == "WINDOWS") {
|
else if (xyz.limepot.kotRemote.osName == "WINDOWS") {
|
||||||
ProcessBuilder("net", "use", "O:", "/delete")
|
ProcessBuilder("net", "use", "O:", "/delete")
|
||||||
.redirectOutput(ProcessBuilder.Redirect.INHERIT)
|
.redirectOutput(ProcessBuilder.Redirect.INHERIT)
|
||||||
.redirectError(ProcessBuilder.Redirect.INHERIT)
|
.redirectError(ProcessBuilder.Redirect.INHERIT)
|
|
@ -1,4 +1,4 @@
|
||||||
package xyz.limepot.kRemoteAccess
|
package xyz.limepot.kotRemote
|
||||||
|
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
Loading…
Reference in a new issue