Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3483a42db | ||
|
|
d68797cebb | ||
|
|
ef221d4574 | ||
|
|
3fa2e3fa3c | ||
|
|
bda1bc0df6 | ||
|
|
cb0f084d42 | ||
|
|
674ac146f2 | ||
|
|
1ab00ee774 |
@@ -10,6 +10,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_AUTORCC ON)
|
set(CMAKE_AUTORCC ON)
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
|
||||||
|
string(TIMESTAMP TIMESTAMP %s)
|
||||||
# set(CMAKE_AUTOUIC ON)
|
# set(CMAKE_AUTOUIC ON)
|
||||||
|
|
||||||
find_package(Qt5 CONFIG REQUIRED COMPONENTS
|
find_package(Qt5 CONFIG REQUIRED COMPONENTS
|
||||||
@@ -17,6 +18,12 @@ find_package(Qt5 CONFIG REQUIRED COMPONENTS
|
|||||||
WebEngineWidgets
|
WebEngineWidgets
|
||||||
)
|
)
|
||||||
|
|
||||||
|
option(KF5NOTIFICATIONS "Use KF5Notifications for enhanced system notifications" ON)
|
||||||
|
if(KF5NOTIFICATIONS)
|
||||||
|
add_definitions( -DKF5NOTIFICATIONS )
|
||||||
|
find_package(KF5Notifications)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(discord-screenaudio_SRC
|
set(discord-screenaudio_SRC
|
||||||
src/main.cpp
|
src/main.cpp
|
||||||
src/mainwindow.cpp
|
src/mainwindow.cpp
|
||||||
@@ -51,6 +58,11 @@ add_executable(discord-screenaudio ${discord-screenaudio_SRC})
|
|||||||
|
|
||||||
target_link_libraries(discord-screenaudio Qt5::Widgets Qt5::WebEngineWidgets rohrkabel)
|
target_link_libraries(discord-screenaudio Qt5::Widgets Qt5::WebEngineWidgets rohrkabel)
|
||||||
|
|
||||||
|
if(KF5NOTIFICATIONS)
|
||||||
|
target_link_libraries(discord-screenaudio KF5::Notifications)
|
||||||
|
install(FILES assets/discord-screenaudio.notifyrc DESTINATION ${CMAKE_INSTALL_PREFIX}/share/knotifications5)
|
||||||
|
endif()
|
||||||
|
|
||||||
install(TARGETS discord-screenaudio DESTINATION bin)
|
install(TARGETS discord-screenaudio DESTINATION bin)
|
||||||
install(FILES assets/de.shorsh.discord-screenaudio.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/256x256/apps)
|
install(FILES assets/de.shorsh.discord-screenaudio.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/256x256/apps)
|
||||||
install(PROGRAMS assets/de.shorsh.discord-screenaudio.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
|
install(PROGRAMS assets/de.shorsh.discord-screenaudio.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
|
||||||
|
|||||||
23
README.md
23
README.md
@@ -15,6 +15,11 @@ case you want to stream something, maybe used with a second account. For
|
|||||||
anything else, this client has way too many things that work less well than in
|
anything else, this client has way too many things that work less well than in
|
||||||
the original client.
|
the original client.
|
||||||
|
|
||||||
|
Technically this could be against
|
||||||
|
[Discord's TOS](https://discord.com/terms#software-in-discord%E2%80%99s-services),
|
||||||
|
so be warned. Discord probably won't ban you for using this, but if they do I
|
||||||
|
told you and it's not my fault.
|
||||||
|
|
||||||
## Known Issues
|
## Known Issues
|
||||||
|
|
||||||
- Only works with **PipeWire**
|
- Only works with **PipeWire**
|
||||||
@@ -24,9 +29,17 @@ the original client.
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
If you are using Arch, you can build and install
|
You have multiple options:
|
||||||
[from the AUR](https://aur.archlinux.org/packages/discord-screenaudio). If you
|
|
||||||
aren't, you will have to [build it yourself](#building-from-source).
|
- Install the Flatpak (recommended):
|
||||||
|
`flatpak install de.shorsh.discord-screenaudio`
|
||||||
|
- If you are on Arch, you can build and install
|
||||||
|
[`discord-screenaudio`](https://aur.archlinux.org/packages/discord-screenaudio)
|
||||||
|
from the AUR
|
||||||
|
- If you are on openSUSE, you can use the
|
||||||
|
[Open Build Service package](https://software.opensuse.org/download.html?project=home%3AVortexAcherontic&package=discord-screenaudio)
|
||||||
|
by [@VortexAcherontic](https://github.com/VortexAcherontic)
|
||||||
|
- You can [build it yourself](#building-from-source)
|
||||||
|
|
||||||
## Building from Source
|
## Building from Source
|
||||||
|
|
||||||
@@ -34,12 +47,12 @@ aren't, you will have to [build it yourself](#building-from-source).
|
|||||||
|
|
||||||
- Basic building tools
|
- Basic building tools
|
||||||
- CMake
|
- CMake
|
||||||
- Qt5 and QtWebEngine
|
- Qt5, QtWebEngine and Kf5Notifications
|
||||||
- **PipeWire** (it currently doesn't work with PulseAudio)
|
- **PipeWire** (it currently doesn't work with PulseAudio)
|
||||||
- Git
|
- Git
|
||||||
|
|
||||||
On Debian:
|
On Debian:
|
||||||
`apt install -y build-essential cmake qtbase5-dev qtwebengine5-dev pkg-config libpipewire-0.3-dev git`
|
`apt install -y build-essential cmake qtbase5-dev qtwebengine5-dev libkf5notifications-dev pkg-config libpipewire-0.3-dev git`
|
||||||
|
|
||||||
### Building
|
### Building
|
||||||
|
|
||||||
|
|||||||
@@ -5,13 +5,10 @@
|
|||||||
<project_license>GPL-3.0+</project_license>
|
<project_license>GPL-3.0+</project_license>
|
||||||
<name>discord-screenaudio</name>
|
<name>discord-screenaudio</name>
|
||||||
<releases>
|
<releases>
|
||||||
<release version="${DISCORD_SCEENAUDIO_VERSION_FULL}" />
|
<release version="${DISCORD_SCEENAUDIO_VERSION_FULL}" timestamp="${TIMESTAMP}" />
|
||||||
</releases>
|
</releases>
|
||||||
|
|
||||||
<summary>
|
<summary>A very WIP custom discord client that supports streaming with audio on Linux</summary>
|
||||||
A very WIP custom discord client that supports streaming with audio on
|
|
||||||
Linux.
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
<p>A very WIP custom discord client that supports streaming with audio on Linux, made possible by the great work of @edisionnano and the Rohrkabel library by @Curve.</p>
|
<p>A very WIP custom discord client that supports streaming with audio on Linux, made possible by the great work of @edisionnano and the Rohrkabel library by @Curve.</p>
|
||||||
@@ -19,7 +16,7 @@
|
|||||||
</description>
|
</description>
|
||||||
|
|
||||||
<launchable type="desktop-id">
|
<launchable type="desktop-id">
|
||||||
discord-screenaudio.desktop
|
de.shorsh.discord-screenaudio.desktop
|
||||||
</launchable>
|
</launchable>
|
||||||
|
|
||||||
<screenshots>
|
<screenshots>
|
||||||
@@ -35,4 +32,12 @@
|
|||||||
<provides>
|
<provides>
|
||||||
<binary>discord-screenaudio</binary>
|
<binary>discord-screenaudio</binary>
|
||||||
</provides>
|
</provides>
|
||||||
|
|
||||||
|
<content_rating type="oars-1.0">
|
||||||
|
<content_attribute id="social-chat">intense</content_attribute>
|
||||||
|
<content_attribute id="social-info">intense</content_attribute>
|
||||||
|
<content_attribute id="social-audio">intense</content_attribute>
|
||||||
|
<content_attribute id="social-contacts">intense</content_attribute>
|
||||||
|
<content_attribute id="money-purchasing">mild</content_attribute>
|
||||||
|
</content_rating>
|
||||||
</component>
|
</component>
|
||||||
8
assets/discord-screenaudio.notifyrc
Normal file
8
assets/discord-screenaudio.notifyrc
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[Global]
|
||||||
|
IconName=de.shorsh.discord-screenaudio
|
||||||
|
Name=discord-screenaudio
|
||||||
|
DesktopEntry=de.shorsh.discord-screenaudio.desktop
|
||||||
|
|
||||||
|
[Event/discordNotification]
|
||||||
|
Name=Discord Notification
|
||||||
|
Action=Popup
|
||||||
@@ -2,5 +2,6 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource>
|
<qresource>
|
||||||
<file>assets/userscript.js</file>
|
<file>assets/userscript.js</file>
|
||||||
|
<file>assets/de.shorsh.discord-screenaudio.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
@@ -7,7 +7,10 @@
|
|||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
QApplication::setApplicationName("discord-screenaudio");
|
QApplication::setApplicationName("discord-screenaudio");
|
||||||
|
QApplication::setWindowIcon(
|
||||||
|
QIcon(":assets/de.shorsh.discord-screenaudio.png"));
|
||||||
QApplication::setApplicationVersion(DISCORD_SCEENAUDIO_VERSION_FULL);
|
QApplication::setApplicationVersion(DISCORD_SCEENAUDIO_VERSION_FULL);
|
||||||
|
QApplication::setDesktopFileName("de.shorsh.discord-screenaudio");
|
||||||
|
|
||||||
QCommandLineParser parser;
|
QCommandLineParser parser;
|
||||||
parser.setApplicationDescription(
|
parser.setApplicationDescription(
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "virtmic.h"
|
#include "virtmic.h"
|
||||||
|
|
||||||
|
#ifdef KF5NOTIFICATIONS
|
||||||
|
#include <KNotification>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
@@ -11,6 +15,8 @@
|
|||||||
#include <QSpacerItem>
|
#include <QSpacerItem>
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
#include <QWebEngineNotification>
|
||||||
|
#include <QWebEngineProfile>
|
||||||
#include <QWebEngineScript>
|
#include <QWebEngineScript>
|
||||||
#include <QWebEngineScriptCollection>
|
#include <QWebEngineScriptCollection>
|
||||||
#include <QWebEngineSettings>
|
#include <QWebEngineSettings>
|
||||||
@@ -30,6 +36,23 @@ void MainWindow::setupWebView() {
|
|||||||
m_webView = new QWebEngineView(this);
|
m_webView = new QWebEngineView(this);
|
||||||
m_webView->setPage(page);
|
m_webView->setPage(page);
|
||||||
|
|
||||||
|
#ifdef KF5NOTIFICATIONS
|
||||||
|
QWebEngineProfile::defaultProfile()->setNotificationPresenter(
|
||||||
|
[&](std::unique_ptr<QWebEngineNotification> notificationInfo) {
|
||||||
|
KNotification *notification = new KNotification("discordNotification");
|
||||||
|
notification->setTitle(notificationInfo->title());
|
||||||
|
notification->setText(notificationInfo->message());
|
||||||
|
notification->setPixmap(QPixmap::fromImage(notificationInfo->icon()));
|
||||||
|
notification->setDefaultAction("View");
|
||||||
|
connect(notification, &KNotification::defaultActivated,
|
||||||
|
[&, notificationInfo = std::move(notificationInfo)]() {
|
||||||
|
notificationInfo->click();
|
||||||
|
activateWindow();
|
||||||
|
});
|
||||||
|
notification->sendEvent();
|
||||||
|
});
|
||||||
|
#endif
|
||||||
|
|
||||||
setCentralWidget(m_webView);
|
setCentralWidget(m_webView);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ StreamDialog::StreamDialog() : QWidget() {
|
|||||||
setAttribute(Qt::WA_QuitOnClose, false);
|
setAttribute(Qt::WA_QuitOnClose, false);
|
||||||
|
|
||||||
auto layout = new QVBoxLayout(this);
|
auto layout = new QVBoxLayout(this);
|
||||||
|
layout->setSizeConstraint(QLayout::SetFixedSize);
|
||||||
|
|
||||||
auto targetLabel = new QLabel(this);
|
auto targetLabel = new QLabel(this);
|
||||||
targetLabel->setText("Which app do you want to stream sound from?");
|
targetLabel->setText("Which app do you want to stream sound from?");
|
||||||
@@ -57,7 +58,6 @@ StreamDialog::StreamDialog() : QWidget() {
|
|||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
|
|
||||||
setWindowTitle("discord-screenaudio Stream Dialog");
|
setWindowTitle("discord-screenaudio Stream Dialog");
|
||||||
setFixedSize(0, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void StreamDialog::startStream() {
|
void StreamDialog::startStream() {
|
||||||
|
|||||||
Reference in New Issue
Block a user