From f0540d1af357677e4ae684844cfa7de084fd601f Mon Sep 17 00:00:00 2001 From: Monotoko Date: Fri, 6 Jan 2023 21:57:24 +0000 Subject: [PATCH] Fix: Make Super Great Again --- chotkeys/application.cpp | 12 ++++++------ chotkeys/main.cpp | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/chotkeys/application.cpp b/chotkeys/application.cpp index aa5862f..5e816bc 100644 --- a/chotkeys/application.cpp +++ b/chotkeys/application.cpp @@ -21,6 +21,7 @@ #include "hotkeys.h" #include +#include Application::Application(QObject *parent) : QObject(parent) @@ -37,11 +38,13 @@ void Application::setupShortcuts() m_hotKeys->registerKey(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Delete)); m_hotKeys->registerKey(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_A)); m_hotKeys->registerKey(QKeySequence(Qt::META + Qt::Key_L)); - // m_hotKeys->registerKey(QKeySequence(Qt::Key_Super_L)); + //m_hotKeys->registerKey(QKeySequence(Qt::META + Qt::Key_6)); + m_hotKeys->registerKey(647); } void Application::onPressed(QKeySequence keySeq) { + if (keySeq.toString() == "Ctrl+Alt+Del") { QProcess::startDetached("cutefish-shutdown", QStringList()); } @@ -53,11 +56,8 @@ void Application::onPressed(QKeySequence keySeq) if (keySeq.toString() == "Ctrl+Alt+A") { QProcess::startDetached("cutefish-screenshot", QStringList()); } -} -void Application::onReleased(QKeySequence keySeq) -{ - if (keySeq == QKeySequence(Qt::Key_Super_L)) { + if (keySeq.toString() == "Ʇ") { QProcess::startDetached("cutefish-launcher", QStringList()); } -} +} \ No newline at end of file diff --git a/chotkeys/main.cpp b/chotkeys/main.cpp index 7924925..41b677e 100644 --- a/chotkeys/main.cpp +++ b/chotkeys/main.cpp @@ -26,13 +26,13 @@ int main(int argc, char *argv[]) QApplication a(argc, argv); a.setQuitOnLastWindowClosed(true); -// if (!QDBusConnection::sessionBus().registerService("com.cutefish.Chotkeys")) { -// return -1; -// } + if (!QDBusConnection::sessionBus().registerService("com.cutefish.Chotkeys")) { + return -1; + } -// if (!QDBusConnection::sessionBus().registerObject("/Chotkeys", &a)) { -// return -1; -// } + if (!QDBusConnection::sessionBus().registerObject("/Chotkeys", &a)) { + return -1; + } Application app; return a.exec();