Files
DankMaterialShell/core/cmd/dms/main.go
T
Nat Fletcherandclaude[bot] 30dc1122c5 added launcher dmenu mode (#3639)
* added launcher dmenu mode

* fixed prechecker issues

* added unit tests for dms dmenu command

* added workaround for matugen printing error message to stdout

* correct help message: matching is case-*in*sensitive

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>

* no longer save dmenu selections to history; now properly close dmenu sockets

* increased parity with rofi -dmenu flags; added -i as an ignored flag to match dmenu

* go mod tidied

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
2026-10-04 22:16:40 -04:00

41 lines
1.2 KiB
Go

//go:build !distro_binary
package main
import (
"os"
"github.com/AvengeMedia/DankMaterialShell/core/internal/clipboard"
"github.com/AvengeMedia/DankMaterialShell/core/internal/log"
)
var Version = "dev"
func init() {
authCmd.AddCommand(authSyncCmd, authResolveLockCmd, authListServicesCmd, authValidateCmd)
setupCmd.AddCommand(setupHeadlessCmd, setupBindsCmd, setupLayoutCmd, setupColorsCmd, setupAlttabCmd, setupOutputsCmd, setupCursorCmd, setupWindowrulesCmd)
updateCmd.AddCommand(updateCheckCmd)
pluginsCmd.AddCommand(pluginsBrowseCmd, pluginsListCmd, pluginsInstallCmd, pluginsUninstallCmd, pluginsUpdateCmd, pluginsLockCmd, pluginsRestoreCmd)
registryCmd.AddCommand(registryListCmd, registryAddCmd, registryRemoveCmd)
rootCmd.AddCommand(getCommonCommands()...)
rootCmd.AddCommand(authCmd)
rootCmd.AddCommand(updateCmd)
rootCmd.SetHelpTemplate(getHelpTemplate())
}
func main() {
disableMemProfilingUnlessRequested()
clipboard.MaybeServeAndExit()
if os.Geteuid() == 0 && !isReadOnlyCommand(os.Args) {
log.Fatal("This program should not be run as root. Exiting.")
}
os.Args = normalizeDmenuArgv(os.Args)
if err := rootCmd.Execute(); err != nil {
log.Fatal(err)
}
}