mirror of https://github.com/procxx/kepka.git
Fixed awesome WM tray icon.
This commit is contained in:
parent
067138f1bf
commit
64e9958585
|
@ -73,6 +73,8 @@ Type Compute() {
|
||||||
return Type::KDE3;
|
return Type::KDE3;
|
||||||
} else if (desktopSession.indexOf(qstr("xfce")) >= 0 || desktopSession == qstr("xubuntu")) {
|
} else if (desktopSession.indexOf(qstr("xfce")) >= 0 || desktopSession == qstr("xubuntu")) {
|
||||||
return Type::XFCE;
|
return Type::XFCE;
|
||||||
|
} else if (desktopSession == qstr("awesome")) {
|
||||||
|
return Type::Awesome;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,6 +104,7 @@ Type ComputeAndLog() {
|
||||||
case Type::Unity: return "Unity";
|
case Type::Unity: return "Unity";
|
||||||
case Type::XFCE: return "XFCE";
|
case Type::XFCE: return "XFCE";
|
||||||
case Type::Pantheon: return "Pantheon";
|
case Type::Pantheon: return "Pantheon";
|
||||||
|
case Type::Awesome: return "Awesome";
|
||||||
}
|
}
|
||||||
return QString::number(static_cast<int>(result));
|
return QString::number(static_cast<int>(result));
|
||||||
};
|
};
|
||||||
|
@ -118,7 +121,7 @@ Type Get() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TryQtTrayIcon() {
|
bool TryQtTrayIcon() {
|
||||||
return !IsPantheon();
|
return !IsPantheon() && !IsAwesome();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PreferAppIndicatorTrayIcon() {
|
bool PreferAppIndicatorTrayIcon() {
|
||||||
|
|
|
@ -32,6 +32,7 @@ enum class Type {
|
||||||
Unity,
|
Unity,
|
||||||
XFCE,
|
XFCE,
|
||||||
Pantheon,
|
Pantheon,
|
||||||
|
Awesome,
|
||||||
};
|
};
|
||||||
|
|
||||||
Type Get();
|
Type Get();
|
||||||
|
@ -68,6 +69,10 @@ inline bool IsPantheon() {
|
||||||
return Get() == Type::Pantheon;
|
return Get() == Type::Pantheon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool IsAwesome() {
|
||||||
|
return Get() == Type::Awesome;
|
||||||
|
}
|
||||||
|
|
||||||
bool TryQtTrayIcon();
|
bool TryQtTrayIcon();
|
||||||
bool PreferAppIndicatorTrayIcon();
|
bool PreferAppIndicatorTrayIcon();
|
||||||
bool TryUnityCounter();
|
bool TryUnityCounter();
|
||||||
|
|
Loading…
Reference in New Issue