mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-10-27 08:12:18 +08:00
[feat] add Linux headless mode and interactive console
This commit is contained in:
@@ -11,6 +11,8 @@ namespace crossdesk::platform {
|
||||
namespace {
|
||||
|
||||
std::filesystem::path AutostartPath(const std::string& app_name) {
|
||||
const char* config = std::getenv("XDG_CONFIG_HOME");
|
||||
if (config && *config) return std::filesystem::path(config) / "autostart" / (app_name + ".desktop");
|
||||
const char* home = std::getenv("HOME");
|
||||
if (!home || !home[0]) return {};
|
||||
return std::filesystem::path(home) / ".config" / "autostart" /
|
||||
|
||||
Reference in New Issue
Block a user