mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
remove unnecessary libprocps dependency
This commit is contained in:
parent
b65c976bc1
commit
8b5f42d934
@ -1,9 +1,3 @@
|
||||
## note: this fork depends on libjack and libprocps as well as the dependencies listed below
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Waybar [![Licence](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [![Paypal Donate](https://img.shields.io/badge/Donate-Paypal-2244dd.svg)](https://paypal.me/ARouillard)<br>![Waybar](https://raw.githubusercontent.com/alexays/waybar/master/preview-2.png)
|
||||
|
||||
> Highly customizable Wayland bar for Sway and Wlroots based compositors.<br>
|
||||
|
@ -4,7 +4,6 @@
|
||||
#include <fstream>
|
||||
#include <jack/jack.h>
|
||||
#include <jack/thread.h>
|
||||
#include <proc/readproc.h>
|
||||
#include "ALabel.hpp"
|
||||
#include "util/sleeper_thread.hpp"
|
||||
|
||||
@ -28,7 +27,6 @@ class JACK : public ALabel {
|
||||
jack_nframes_t samplerate_;
|
||||
unsigned int xruns_;
|
||||
std::string state_;
|
||||
pthread_t jack_thread_;
|
||||
util::SleeperThread thread_;
|
||||
};
|
||||
|
||||
|
@ -99,7 +99,6 @@ libevdev = dependency('libevdev', required: get_option('libevdev'))
|
||||
libmpdclient = dependency('libmpdclient', required: get_option('mpd'))
|
||||
xkbregistry = dependency('xkbregistry')
|
||||
libjack = dependency('jack', required: get_option('jack'))
|
||||
libprocps = dependency('libprocps', required: get_option('jack'))
|
||||
|
||||
libsndio = compiler.find_library('sndio', required: get_option('sndio'))
|
||||
if libsndio.found()
|
||||
@ -224,7 +223,7 @@ if libpulse.found()
|
||||
src_files += 'src/modules/pulseaudio.cpp'
|
||||
endif
|
||||
|
||||
if libjack.found() and libprocps.found()
|
||||
if libjack.found()
|
||||
add_project_arguments('-DHAVE_LIBJACK', language: 'cpp')
|
||||
src_files += 'src/modules/jack.cpp'
|
||||
endif
|
||||
@ -310,7 +309,6 @@ executable(
|
||||
upower_glib,
|
||||
libpulse,
|
||||
libjack,
|
||||
libprocps,
|
||||
libudev,
|
||||
libepoll,
|
||||
libmpdclient,
|
||||
|
@ -9,7 +9,7 @@ option('dbusmenu-gtk', type: 'feature', value: 'auto', description: 'Enable supp
|
||||
option('man-pages', type: 'feature', value: 'auto', description: 'Generate and install man pages')
|
||||
option('mpd', type: 'feature', value: 'auto', description: 'Enable support for the Music Player Daemon')
|
||||
option('gtk-layer-shell', type: 'feature', value: 'auto', description: 'Use gtk-layer-shell library for popups support')
|
||||
option('rfkill', type: 'feature', value: 'auto', description: 'Enable support for RFKILL')
|
||||
option('rfkill', type: 'feature', value: 'enabled', description: 'Enable support for RFKILL')
|
||||
option('sndio', type: 'feature', value: 'auto', description: 'Enable support for sndio')
|
||||
option('logind', type: 'feature', value: 'auto', description: 'Enable support for logind')
|
||||
option('tests', type: 'feature', value: 'auto', description: 'Enable tests')
|
||||
|
@ -19,25 +19,11 @@ std::string waybar::modules::JACK::JACKState() {
|
||||
if(state_.compare("connected") == 0)
|
||||
return "connected";
|
||||
|
||||
std::string procname;
|
||||
bool foundJACK = false;
|
||||
proc_t** proctab = readproctab(PROC_FILLSTAT);
|
||||
for(int i=0; proctab[i]; i++) {
|
||||
procname = proctab[i]->cmd;
|
||||
if(!procname.compare("jackd") || !procname.compare("jackdbus") ||
|
||||
!procname.compare("pipewire"))
|
||||
foundJACK = true;
|
||||
freeproc(proctab[i]);
|
||||
}
|
||||
free(proctab);
|
||||
if(!foundJACK)
|
||||
return "disconnected";
|
||||
|
||||
client_ = jack_client_open("waybar", JackNoStartServer, NULL);
|
||||
if (client_) {
|
||||
jack_thread_ = jack_client_thread_id(client_);
|
||||
pthread_t jack_thread = jack_client_thread_id(client_);
|
||||
if(config_["realtime"].isBool() && !config_["realtime"].asBool())
|
||||
jack_drop_real_time_scheduling(jack_thread_);
|
||||
jack_drop_real_time_scheduling(jack_thread);
|
||||
|
||||
bufsize_ = jack_get_buffer_size(client_);
|
||||
samplerate_ = jack_get_sample_rate(client_);
|
||||
|
Loading…
Reference in New Issue
Block a user