remove unnecessary libprocps dependency
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)
|
# 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>
|
> Highly customizable Wayland bar for Sway and Wlroots based compositors.<br>
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <jack/jack.h>
|
#include <jack/jack.h>
|
||||||
#include <jack/thread.h>
|
#include <jack/thread.h>
|
||||||
#include <proc/readproc.h>
|
|
||||||
#include "ALabel.hpp"
|
#include "ALabel.hpp"
|
||||||
#include "util/sleeper_thread.hpp"
|
#include "util/sleeper_thread.hpp"
|
||||||
|
|
||||||
|
@ -28,7 +27,6 @@ class JACK : public ALabel {
|
||||||
jack_nframes_t samplerate_;
|
jack_nframes_t samplerate_;
|
||||||
unsigned int xruns_;
|
unsigned int xruns_;
|
||||||
std::string state_;
|
std::string state_;
|
||||||
pthread_t jack_thread_;
|
|
||||||
util::SleeperThread thread_;
|
util::SleeperThread thread_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,6 @@ libevdev = dependency('libevdev', required: get_option('libevdev'))
|
||||||
libmpdclient = dependency('libmpdclient', required: get_option('mpd'))
|
libmpdclient = dependency('libmpdclient', required: get_option('mpd'))
|
||||||
xkbregistry = dependency('xkbregistry')
|
xkbregistry = dependency('xkbregistry')
|
||||||
libjack = dependency('jack', required: get_option('jack'))
|
libjack = dependency('jack', required: get_option('jack'))
|
||||||
libprocps = dependency('libprocps', required: get_option('jack'))
|
|
||||||
|
|
||||||
libsndio = compiler.find_library('sndio', required: get_option('sndio'))
|
libsndio = compiler.find_library('sndio', required: get_option('sndio'))
|
||||||
if libsndio.found()
|
if libsndio.found()
|
||||||
|
@ -224,7 +223,7 @@ if libpulse.found()
|
||||||
src_files += 'src/modules/pulseaudio.cpp'
|
src_files += 'src/modules/pulseaudio.cpp'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if libjack.found() and libprocps.found()
|
if libjack.found()
|
||||||
add_project_arguments('-DHAVE_LIBJACK', language: 'cpp')
|
add_project_arguments('-DHAVE_LIBJACK', language: 'cpp')
|
||||||
src_files += 'src/modules/jack.cpp'
|
src_files += 'src/modules/jack.cpp'
|
||||||
endif
|
endif
|
||||||
|
@ -310,7 +309,6 @@ executable(
|
||||||
upower_glib,
|
upower_glib,
|
||||||
libpulse,
|
libpulse,
|
||||||
libjack,
|
libjack,
|
||||||
libprocps,
|
|
||||||
libudev,
|
libudev,
|
||||||
libepoll,
|
libepoll,
|
||||||
libmpdclient,
|
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('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('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('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('sndio', type: 'feature', value: 'auto', description: 'Enable support for sndio')
|
||||||
option('logind', type: 'feature', value: 'auto', description: 'Enable support for logind')
|
option('logind', type: 'feature', value: 'auto', description: 'Enable support for logind')
|
||||||
option('tests', type: 'feature', value: 'auto', description: 'Enable tests')
|
option('tests', type: 'feature', value: 'auto', description: 'Enable tests')
|
||||||
|
|
|
@ -19,25 +19,11 @@ std::string waybar::modules::JACK::JACKState() {
|
||||||
if(state_.compare("connected") == 0)
|
if(state_.compare("connected") == 0)
|
||||||
return "connected";
|
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);
|
client_ = jack_client_open("waybar", JackNoStartServer, NULL);
|
||||||
if (client_) {
|
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())
|
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_);
|
bufsize_ = jack_get_buffer_size(client_);
|
||||||
samplerate_ = jack_get_sample_rate(client_);
|
samplerate_ = jack_get_sample_rate(client_);
|
||||||
|
|
Loading…
Reference in New Issue