Merge pull request #29 from scaryrawr/env-sock

Get socket path from env I3SOCK
This commit is contained in:
Sergey Naumov
2020-10-28 20:30:09 +03:00
committed by GitHub

View File

@@ -304,8 +304,12 @@ static std::shared_ptr<bar_config_t> parse_bar_config_from_json(const Json::Val
#undef i3IPC_TYPE_STR #undef i3IPC_TYPE_STR
} }
std::string get_socketpath() { std::string get_socketpath() {
const char* envsock{std::getenv("I3SOCK")};
if (envsock) {
return envsock;
}
std::string str; std::string str;
{ {
auss_t str_buf; auss_t str_buf;