diff options
author | Simon Rettberg | 2018-06-15 14:27:31 +0200 |
---|---|---|
committer | Simon Rettberg | 2018-06-15 14:27:31 +0200 |
commit | 8da3052b58654b9b50b49ace8d0dbb54b688c021 (patch) | |
tree | 299107539f13be45dbe05e4f1cff8115f5bfe70f /src | |
parent | Fix indentation, cleanup, refactoring, deletions (diff) | |
download | vmchooser2-8da3052b58654b9b50b49ace8d0dbb54b688c021.tar.gz vmchooser2-8da3052b58654b9b50b49ace8d0dbb54b688c021.tar.xz vmchooser2-8da3052b58654b9b50b49ace8d0dbb54b688c021.zip |
Add i3 icon
Diffstat (limited to 'src')
-rw-r--r-- | src/images.qrc | 1 | ||||
-rw-r--r-- | src/img/i3.png | bin | 0 -> 6250 bytes | |||
-rw-r--r-- | src/xsession.cpp | 6 |
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 Binary files differnew file mode 100644 index 0000000..e158ced --- /dev/null +++ b/src/img/i3.png 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"; } |