mirror of
https://github.com/hrfee/jfa-go.git
synced 2025-01-03 15:00:12 +00:00
fix 'jfa-go systemd' layout
lines were printing out-of-order for some reason, so i added time.Sleep between them.
This commit is contained in:
parent
1a6b0d2b6e
commit
67c60cb677
15
main.go
15
main.go
@ -719,17 +719,24 @@ func main() {
|
|||||||
fmt.Printf("Couldn't write jfa-go.service: %v\n", err)
|
fmt.Printf("Couldn't write jfa-go.service: %v\n", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
fmt.Print(info(`If you want to execute jfa-go with special arguments, re-run this command with them.
|
fmt.Println(info(`If you want to execute jfa-go with special arguments, re-run this command with them.
|
||||||
Move the newly created "jfa-go.service" file to ~/.config/systemd/user (Creating it if necessary).
|
Move the newly created "jfa-go.service" file to ~/.config/systemd/user (Creating it if necessary).
|
||||||
Then run "systemctl --user daemon-reload".
|
Then run "systemctl --user daemon-reload".
|
||||||
You can then run:
|
You can then run:
|
||||||
|
|
||||||
`))
|
`))
|
||||||
color.New(color.FgGreen).PrintFunc()("To start: ")
|
// I have no idea why sleeps are necessary, but if not the lines print in the wrong order.
|
||||||
|
time.Sleep(time.Millisecond)
|
||||||
|
color.New(color.FgGreen).Print("To start: ")
|
||||||
|
time.Sleep(time.Millisecond)
|
||||||
fmt.Print(info("systemctl --user start jfa-go\n\n"))
|
fmt.Print(info("systemctl --user start jfa-go\n\n"))
|
||||||
color.New(color.FgRed).PrintFunc()("To stop: ")
|
time.Sleep(time.Millisecond)
|
||||||
|
color.New(color.FgRed).Print("To stop: ")
|
||||||
|
time.Sleep(time.Millisecond)
|
||||||
fmt.Print(info("systemctl --user stop jfa-go\n\n"))
|
fmt.Print(info("systemctl --user stop jfa-go\n\n"))
|
||||||
color.New(color.FgYellow).PrintFunc()("To restart: ")
|
time.Sleep(time.Millisecond)
|
||||||
|
color.New(color.FgYellow).Print("To restart: ")
|
||||||
|
time.Sleep(time.Millisecond)
|
||||||
fmt.Print(info("systemctl --user stop jfa-go\n"))
|
fmt.Print(info("systemctl --user stop jfa-go\n"))
|
||||||
} else if TRAY {
|
} else if TRAY {
|
||||||
RunTray()
|
RunTray()
|
||||||
|
Loading…
Reference in New Issue
Block a user