Skip to content

Commit

Permalink
Merge branch 'refs/heads/blueprint'
Browse files Browse the repository at this point in the history
  • Loading branch information
vicr123 committed Jun 9, 2023
2 parents 59f89f4 + aa715b4 commit e577d01
Show file tree
Hide file tree
Showing 31 changed files with 1,943 additions and 872 deletions.
4 changes: 4 additions & 0 deletions .contemporary.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"desktop-id": "com.vicr123.theheartbeat",
"theme-colors": ["#006400", "#00c800"]
}
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
cmake_minimum_required(VERSION 3.21.0)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.15)

project(theheartbeat VERSION 1.0.0 LANGUAGES CXX)

IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
link_directories(/usr/local/lib)
ENDIF()

find_package(QT REQUIRED NAMES Qt6)

add_subdirectory(heartbeat)
22 changes: 9 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,46 @@

---
<p align="center">
<a href="https://travis-ci.org/vicr123/theheartbeat" target="_blank"><img src="https://img.shields.io/travis/vicr123/theheartbeat/master?label=Linux&style=for-the-badge" alt="Travis CI Build Status" /></a>
<img src="https://img.shields.io/github/license/vicr123/theheartbeat?style=for-the-badge" />
</p>

theHeartbeat is a system monitor, designed to integrate well with theShell.
theHeartbeat is a system monitor, designed to integrate well with theDesk.

---

# Dependencies
- Qt 5
- Qt 6
- Qt Core
- Qt GUI
- Qt Widgets
- Qt SVG
- [the-libs](https://github.com/vicr123/the-libs)
- [libcontemporary](https://github.com/vicr123/libcontemporary)

# Get
If you're using a supported operating system, we may have binaries available:

| System | Package |
|-------------------|---------------------------------------------------------------------------------------------------------|
| Arch Linux | ~~`theheartbeat` on the AUR~~ Coming soon! |
| Other Linux | [AppImage on GitHub Releases](https://github.com/vicr123/theHeartbeat/releases) |

For more information, visit the [website](https://vicr123.com/theslate/download.html).
| Arch Linux | `theheartbeat` on the AUR Coming soon! |

## Build
Run the following commands in your terminal.
```
qmake
make
cmake -B build -S .
cmake --build build
```

## Install
On Linux, run the following command in your terminal (with superuser permissions)
```
make install
cmake --install build
```

# Contributing
Thanks for your interest in theHeartbeat! Check out the [CONTRIBUTING.md](CONTRIBUTING.md) file to get started and see how you can help!

---

> © Victor Tran, 2019. This project is licensed under the GNU General Public License, version 3, or at your option, any later version.
> © Victor Tran, 2023. This project is licensed under the GNU General Public License, version 3, or at your option, any later version.
>
> Check the [LICENSE](LICENSE) file for more information.
> Check the [LICENSE](LICENSE) file for more information.
76 changes: 76 additions & 0 deletions heartbeat/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
cmake_minimum_required(VERSION 3.21.0)

project(theheartbeat VERSION 1.0.0 LANGUAGES CXX)

find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets DBus Sql Concurrent)
find_package(libcontemporary REQUIRED)

set(SOURCES
main.cpp
mainwindow.cpp
processes/process.cpp
processes/processmanager.cpp
processes/processmodel.cpp
system/systemmanager.cpp
panes/percentagepane.cpp
panes/minmaxpane.cpp
processaction.cpp
panes/minipercentagepane.cpp
panes/sidepane.cpp
panes/numberpane.cpp
panes/mininumberpane.cpp

mainwindow.ui
panes/percentagepane.ui
panes/minmaxpane.ui
processaction.ui
panes/minipercentagepane.ui
panes/numberpane.ui
panes/mininumberpane.ui

resources.qrc
)

set(HEADERS
mainwindow.h
processes/process.h
processes/processmanager.h
processes/processmodel.h
system/systemmanager.h
panes/percentagepane.h
panes/minmaxpane.h
processaction.h
panes/minipercentagepane.h
panes/sidepane.h
panes/numberpane.h
panes/mininumberpane.h

)

add_executable(theheartbeat ${SOURCES} ${HEADERS})

set_target_properties(theheartbeat PROPERTIES
MACOSX_BUNDLE TRUE
# MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in
MACOSX_BUNDLE_GUI_IDENTIFIER com.vicr123.theheartbeat
WIN32_EXECUTABLE TRUE
CNTP_DATA_SUBDIR theheartbeat)

cntp_init(theheartbeat 20)
cntp_translate(theheartbeat)
cntp_target_name(theheartbeat "theHeartbeat")
cntp_app_icon(theheartbeat
BASEICON icons/baseicon.svg
# BASEICON_MAC icons/baseicon-mac.svg
)
cntp_target_desktop_file(theheartbeat
DESKTOP_FILE com.vicr123.theheartbeat.desktop
BLUEPRINT_DESKTOP_FILE com.vicr123.theheartbeat_blueprint.desktop)
cntp_defaults_file(theheartbeat
DEFAULTS_FILE theheartbeat.conf)

target_link_libraries(theheartbeat Qt::Widgets Qt::DBus Qt::Concurrent libcontemporary)

install(TARGETS theheartbeat
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
BUNDLE DESTINATION /Applications)
98 changes: 98 additions & 0 deletions heartbeat/icons/baseicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 8 additions & 21 deletions heartbeat/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,44 +19,31 @@
* *************************************/
#include "mainwindow.h"

#include <tapplication.h>
#include <QDir>
#include <QLibraryInfo>
#include <QMutex>
#include <QTranslator>
#include <QLibraryInfo>
#include <QDir>
#include <tapplication.h>

QMutex checkerMutex;
int checkers = 0;

int main(int argc, char* argv[]) {
tApplication a(argc, argv);

if (QDir("/usr/share/theheartbeat").exists()) {
a.setShareDir("/usr/share/theheartbeat");
} else if (QDir(QDir::cleanPath(QApplication::applicationDirPath() + "/../share/theheartbeat/")).exists()) {
a.setShareDir(QDir::cleanPath(QApplication::applicationDirPath() + "/../share/theheartbeat/"));
}
a.setApplicationShareDir("theheartbeat");
a.installTranslators();

// a.setLayoutDirection(QLocale().textDirection());

a.setOrganizationName("theSuite");
a.setOrganizationDomain("vicr123.com");
a.setDesktopFileName("com.vicr123.theheartbeat");
a.setApplicationIcon(QIcon::fromTheme("theheartbeat", QIcon::fromTheme("utilities-system-monitor")));
a.setApplicationVersion("1.1");
a.setApplicationVersion("2.0");
a.setGenericName(QApplication::translate("main", "System Monitor"));
a.setAboutDialogSplashGraphic(a.aboutDialogSplashGraphicFromSvg(":/icons/aboutsplash.svg"));
a.setApplicationLicense(tApplication::Gpl3OrLater);
a.setCopyrightHolder("Victor Tran");
a.setCopyrightYear("2021");
a.setCopyrightYear("2023");
a.setApplicationUrl(tApplication::Sources, QUrl("https://github.com/vicr123/theheartbeat"));
a.setApplicationUrl(tApplication::FileBug, QUrl("https://github.com/vicr123/theheartbeat/issues"));
#ifdef T_BLUEPRINT_BUILD
a.setApplicationName("theHeartbeat Blueprint");
#else
a.setApplicationName("theHeartbeat");
#endif
a.setApplicationName(T_APPMETA_READABLE_NAME);
a.setDesktopFileName(T_APPMETA_DESKTOP_ID);

MainWindow w;
w.show();
Expand Down
Loading

0 comments on commit e577d01

Please sign in to comment.