mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-04 04:42:05 -04:00
- Add a neutral `dms auth sync` command and reuse the shared auth flow from: - Settings auth toggle auto-apply - `dms greeter sync` - `dms greeter install` - greeter auth cleanup paths - Rework lockscreen PAM so DMS builds /etc/pam.d/dankshell from the system login stack, but removes fingerprint and U2F from that password path. Keep /etc/pam.d/dankshell-u2f separate. - Preserve custom PAM files in place to avoid adding duplicate greeter auth when the distro already provides it, and keep NixOS on the non-writing path.
38 lines
1.1 KiB
Go
38 lines
1.1 KiB
Go
//go:build distro_binary
|
|
|
|
package main
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/AvengeMedia/DankMaterialShell/core/internal/log"
|
|
)
|
|
|
|
var Version = "dev"
|
|
|
|
func init() {
|
|
runCmd.Flags().BoolP("daemon", "d", false, "Run in daemon mode")
|
|
runCmd.Flags().Bool("daemon-child", false, "Internal flag for daemon child process")
|
|
runCmd.Flags().Bool("session", false, "Session managed (like as a systemd unit)")
|
|
runCmd.Flags().MarkHidden("daemon-child")
|
|
|
|
greeterCmd.AddCommand(greeterInstallCmd, greeterSyncCmd, greeterEnableCmd, greeterStatusCmd, greeterUninstallCmd)
|
|
authCmd.AddCommand(authSyncCmd)
|
|
setupCmd.AddCommand(setupBindsCmd, setupLayoutCmd, setupColorsCmd, setupAlttabCmd, setupOutputsCmd, setupCursorCmd, setupWindowrulesCmd)
|
|
pluginsCmd.AddCommand(pluginsBrowseCmd, pluginsListCmd, pluginsInstallCmd, pluginsUninstallCmd, pluginsUpdateCmd)
|
|
rootCmd.AddCommand(getCommonCommands()...)
|
|
rootCmd.AddCommand(authCmd)
|
|
|
|
rootCmd.SetHelpTemplate(getHelpTemplate())
|
|
}
|
|
|
|
func main() {
|
|
if os.Geteuid() == 0 {
|
|
log.Fatal("This program should not be run as root. Exiting.")
|
|
}
|
|
|
|
if err := rootCmd.Execute(); err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|