2024-07-09 15:39:40 +09:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"flag"
|
2024-09-04 01:20:12 +09:00
|
|
|
|
|
|
|
"git.ophivana.moe/cat/fortify/internal/system"
|
2024-07-09 15:39:40 +09:00
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
userName string
|
|
|
|
printVersion bool
|
2024-07-15 23:29:21 +09:00
|
|
|
mustPulse bool
|
2024-09-04 01:20:12 +09:00
|
|
|
flagVerbose bool
|
2024-07-09 15:39:40 +09:00
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
2024-09-04 01:20:12 +09:00
|
|
|
flag.StringVar(&userName, "u", "chronos", "Specify a username")
|
|
|
|
flag.BoolVar(&system.MethodFlags[0], "sudo", false, "Use 'sudo' to change user")
|
|
|
|
flag.BoolVar(&system.MethodFlags[1], "bare", false, "Use 'machinectl' but skip xdg-desktop-portal setup")
|
2024-07-15 23:29:21 +09:00
|
|
|
flag.BoolVar(&mustPulse, "pulse", false, "Treat unavailable PulseAudio as fatal")
|
2024-09-04 01:20:12 +09:00
|
|
|
flag.BoolVar(&flagVerbose, "v", false, "Verbose output")
|
2024-07-09 15:39:40 +09:00
|
|
|
flag.BoolVar(&printVersion, "V", false, "Print version")
|
|
|
|
}
|