-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathutils.h
More file actions
40 lines (32 loc) · 1.07 KB
/
utils.h
File metadata and controls
40 lines (32 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// SPDX-FileCopyrightText: 2021 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef UTILS_H
#define UTILS_H
#include <QDebug>
// system services
#define AT_SPI_SERVICE "at-spi-dbus-bus.service"
#define OBEX_SERVICE "obex.service"
#define PULSEAUDIO_SERVICE "pulseaudio.service"
#define PIPEWIRE_SOCKET "pipewire.socket"
#define PIPEWIRE_PULSE_SOCKET "pipewire-pulse.socket"
#define BAMFDAEMON_SERVICE "bamfdaemon.service"
#define REDSHIFT_SERVICE "redshift.service"
#define DDE_DOCK_SERVICE "dde-dock.service"
#define APP_SLICE "app.slice"
// sound
#define SOUND_EFFECT_SCHEMA "com.deepin.dde.sound-effect"
#define SOUND_EFFECT_ENABLED_KEY "enabled"
#define SOUND_EFFECT_PLAYER_KEY "player"
// macro funtions
#define EXEC_COMMAND(cmd, args) \
QProcess p;\
p.start(cmd, args);\
p.waitForFinished(-1);\
if (p.exitCode() != 0) {\
qWarning() << "failed to run: " << cmd << ", args:" << args;\
}
namespace Utils {
const bool IS_WAYLAND_DISPLAY = qgetenv("XDG_SESSION_TYPE").startsWith("wayland");
}
#endif // UTILS_H