mirror of
https://github.com/clockworkpi/LauncherGoDev.git
synced 2026-03-19 10:22:41 +01:00
update mod ,and remove launcher ,GPU switch
This commit is contained in:
@@ -1,44 +0,0 @@
|
||||
package LauncherPy
|
||||
|
||||
import (
|
||||
"github.com/clockworkpi/LauncherGoDev/sysgo/UI"
|
||||
"github.com/cuu/gogame/time"
|
||||
"log"
|
||||
"os/exec"
|
||||
"os/user"
|
||||
)
|
||||
|
||||
/******************************************************************************/
|
||||
type LauncherPyPlugin struct {
|
||||
UI.Plugin
|
||||
}
|
||||
|
||||
func (self *LauncherPyPlugin) Init(main_screen *UI.MainScreen) {
|
||||
|
||||
}
|
||||
|
||||
func (self *LauncherPyPlugin) Run(main_screen *UI.MainScreen) {
|
||||
if main_screen != nil {
|
||||
main_screen.MsgBox.SetText("Rebooting to Launcher")
|
||||
main_screen.MsgBox.Draw()
|
||||
main_screen.SwapAndShow()
|
||||
time.BlockDelay(550)
|
||||
usr, _ := user.Current()
|
||||
dir := usr.HomeDir
|
||||
if usr.Username == "root" {
|
||||
dir = "/home/cpi"
|
||||
}
|
||||
|
||||
cmd := exec.Command("sed", "-i", "s/launchergo/launcher/g", dir+"/.bashrc")
|
||||
err := cmd.Run()
|
||||
if err != nil {
|
||||
log.Println("sed failed", err)
|
||||
} else {
|
||||
|
||||
cmd = exec.Command("sudo", "reboot")
|
||||
cmd.Run()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var APIOBJ LauncherPyPlugin
|
||||
@@ -28,8 +28,6 @@ import (
|
||||
"github.com/clockworkpi/LauncherGoDev/Menu/GameShell/10_Settings/PowerOFF"
|
||||
"github.com/clockworkpi/LauncherGoDev/Menu/GameShell/10_Settings/PowerOptions"
|
||||
"github.com/clockworkpi/LauncherGoDev/Menu/GameShell/10_Settings/TimeZone"
|
||||
"github.com/clockworkpi/LauncherGoDev/Menu/GameShell/10_Settings/LauncherPy"
|
||||
"github.com/clockworkpi/LauncherGoDev/Menu/GameShell/10_Settings/Lima"
|
||||
"github.com/clockworkpi/LauncherGoDev/Menu/GameShell/10_Settings/GateWay"
|
||||
|
||||
|
||||
@@ -114,8 +112,8 @@ func (self *SettingsPage) GenList() []*UI.UIPlugin {
|
||||
&UI.UIPlugin{UI.PluginPackage, "", "About", "About", &About.APIOBJ},
|
||||
&UI.UIPlugin{UI.PluginPackage, "", "PowerOFF", "Power off", &PowerOFF.APIOBJ},
|
||||
&UI.UIPlugin{UI.PluginPackage, "", "ButtonsLayout", "Buttons Layout", &ButtonsLayout.APIOBJ},
|
||||
&UI.UIPlugin{UI.PluginPackage,"", "LauncherPy", "Switch to Launcher", &LauncherPy.APIOBJ},
|
||||
&UI.UIPlugin{UI.PluginPackage,"", "Lima", "GPU Driver Switch", &Lima.APIOBJ},
|
||||
// &UI.UIPlugin{UI.PluginPackage,"", "LauncherPy", "Switch to Launcher", &LauncherPy.APIOBJ},
|
||||
// &UI.UIPlugin{UI.PluginPackage,"", "Lima", "GPU Driver Switch", &Lima.APIOBJ},
|
||||
&UI.UIPlugin{UI.PluginPackage, "", "GateWay", "Network gateway switch", &GateWay.APIOBJ},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user