Merge branch 'Alexays:master' into hyprland/windowcount

This commit is contained in:
Khiet Tam Nguyen
2024-09-14 13:42:04 +10:00
committed by GitHub
67 changed files with 1264 additions and 127 deletions

View File

@ -148,22 +148,12 @@ void IPC::unregisterForIPC(EventHandler* ev_handler) {
std::string IPC::getSocket1Reply(const std::string& rq) {
// basically hyprctl
struct addrinfo aiHints;
struct addrinfo* aiRes = nullptr;
const auto serverSocket = socket(AF_UNIX, SOCK_STREAM, 0);
if (serverSocket < 0) {
throw std::runtime_error("Hyprland IPC: Couldn't open a socket (1)");
}
memset(&aiHints, 0, sizeof(struct addrinfo));
aiHints.ai_family = AF_UNSPEC;
aiHints.ai_socktype = SOCK_STREAM;
if (getaddrinfo("localhost", nullptr, &aiHints, &aiRes) != 0) {
throw std::runtime_error("Hyprland IPC: Couldn't get host (2)");
}
// get the instance signature
auto* instanceSig = getenv("HYPRLAND_INSTANCE_SIGNATURE");

View File

@ -590,8 +590,8 @@ auto Workspaces::populateIconsMap(const Json::Value &formatIcons) -> void {
m_iconsMap.emplace("", "");
}
auto Workspaces::populateBoolConfig(const Json::Value &config, const std::string &key, bool &member)
-> void {
auto Workspaces::populateBoolConfig(const Json::Value &config, const std::string &key,
bool &member) -> void {
const auto &configValue = config[key];
if (configValue.isBool()) {
member = configValue.asBool();