trap_others.go 503 B

12345678910111213141516
  1. //go:build !windows
  2. // +build !windows
  3. package mousetrap
  4. // StartedByExplorer returns true if the program was invoked by the user
  5. // double-clicking on the executable from explorer.exe
  6. //
  7. // It is conservative and returns false if any of the internal calls fail.
  8. // It does not guarantee that the program was run from a terminal. It only can tell you
  9. // whether it was launched from explorer.exe
  10. //
  11. // On non-Windows platforms, it always returns false.
  12. func StartedByExplorer() bool {
  13. return false
  14. }