summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2018-06-15 14:27:31 +0200
committerSimon Rettberg2018-06-15 14:27:31 +0200
commit8da3052b58654b9b50b49ace8d0dbb54b688c021 (patch)
tree299107539f13be45dbe05e4f1cff8115f5bfe70f
parentFix indentation, cleanup, refactoring, deletions (diff)
downloadvmchooser2-8da3052b58654b9b50b49ace8d0dbb54b688c021.tar.gz
vmchooser2-8da3052b58654b9b50b49ace8d0dbb54b688c021.tar.xz
vmchooser2-8da3052b58654b9b50b49ace8d0dbb54b688c021.zip
Add i3 icon
-rw-r--r--src/images.qrc1
-rw-r--r--src/img/i3.pngbin0 -> 6250 bytes
-rw-r--r--src/xsession.cpp6
3 files changed, 5 insertions, 2 deletions
diff --git a/src/images.qrc b/src/images.qrc
index 286cd53..938fac5 100644
--- a/src/images.qrc
+++ b/src/images.qrc
@@ -40,5 +40,6 @@
<file alias="win2000">img/win2000.png</file>
<file alias="dos">img/msdos.png</file>
<file alias="vm-mix">img/vm-mix.png</file>
+ <file alias="i3">img/i3.png</file>
</qresource>
</RCC>
diff --git a/src/img/i3.png b/src/img/i3.png
new file mode 100644
index 0000000..e158ced
--- /dev/null
+++ b/src/img/i3.png
Binary files differ
diff --git a/src/xsession.cpp b/src/xsession.cpp
index 0c41136..4017111 100644
--- a/src/xsession.cpp
+++ b/src/xsession.cpp
@@ -99,12 +99,14 @@ QIcon XSession::icon() const {
icon = "kde";
} else if (this->exec_.contains("gnome", Qt::CaseInsensitive)) {
icon = "gnome";
- } else if (this->exec_.contains("term", Qt::CaseInsensitive)) {
- icon = "term";
} else if (this->exec_.contains("xfce", Qt::CaseInsensitive)) {
icon = "xfce";
+ } else if (this->exec_.startsWith("i3", Qt::CaseInsensitive) || this->exec_.contains("/i3", Qt::CaseInsensitive)) {
+ icon = "i3";
} else if (this->exec_.contains("lxde", Qt::CaseInsensitive)) {
icon = "lxde";
+ } else if (this->exec_.contains("term", Qt::CaseInsensitive)) {
+ icon = "term";
} else {
icon = "linux";
}