GithubHelp home page GithubHelp logo

jarcode-foss / glava Goto Github PK

View Code? Open in Web Editor NEW
1.1K 28.0 57.0 939 KB

GLava - OpenGL audio spectrum visualizer

License: GNU General Public License v3.0

Makefile 0.18% C 71.14% GLSL 12.47% JavaScript 0.02% Shell 0.03% Meson 0.81% Lua 4.89% C++ 10.47%
audio-visualizer opengl linux shaders

glava's Introduction

GLava is a general-purpose, highly configurable OpenGL audio spectrum visualizer for X11. Displayed to the left is the radial shader module, or for a more extensive demonstration see this demo. Development is active, and reporting issues is encouranged.

Compiling:

$ git clone https://github.com/jarcode-foss/glava
$ cd glava
$ meson build --prefix /usr
$ ninja -C build
$ sudo ninja -C build install

You can pass -Dbuildtype=debug to Meson for debug builds of glava, and -Dstandalone=true to run glava directly from the build directory.

Note that versions since 2.0 use Meson for the build system, although the Makefile will remain to work identically to earlier 1.xx releases (with new features disabled). Package maintainers are encouraged to use Meson directly instead of the Make wrapper.

Requirements:

  • X11 (Xext, Xcomposite, & Xrender)
  • PulseAudio
  • Linux or BSD
  • libBlocksRuntime if compiling with Clang

Configuration tool requirements:

  • Lua (5.3 by default, change with -Dlua_version=...), and the following lua libraries:
    • Lua GObject Introspection (LGI)
    • LuaFilesystem (LFS)
  • GTK+ 3

Additional compile time requirements:

  • Meson
  • OBS (disable with -Ddisable_obs=true)

Optional requirements:

  • GLFW 3.1+ (optional, enable with -Denable_glfw=true)

Ubuntu/Debian users: the following command ensures you have all the needed packages and headers to compile GLava with the default feature set:

sudo apt-get install libgl1-mesa-dev libpulse0 libpulse-dev libxext6 libxext-dev libxrender-dev libxcomposite-dev liblua5.3-dev liblua5.3 lua-lgi lua-filesystem libobs0 libobs-dev meson build-essential gcc 

Don't forget to run sudo ldconfig after installing.

Installation

Some distributions have a package for glava. If your distribution is not listed please use the compilation instructions above.

GLava will start by looking for an entry point in the user configuration folder (~/.config/glava/rc.glsl), and will fall back to loading from the shader installation folder (/etc/xdg/glava). The entry point will specify a module to load and should set global configuration variables. Configuration for specific modules can be done in their respective .glsl files, which the module itself will include.

You should start by running glava --copy-config. This will copy over default configuration files and create symlinks to modules in your user config folder. GLava will either load system configuration files or the user provided ones, so it's not advised to copy these files selectively.

To embed GLava in your desktop (for EWMH compliant window managers), run it with the --desktop flag and then position it accordingly with #request setgeometry x y width height in your rc.glsl.

For more information, see the main configuration page.

Desktop window compatibility

GLava aims to be compatible with most EWMH compliant window managers. Below is a list of common window managers and issues specific to them for trying to get GLava to behave as a desktop window or widget:

WM ! Details
Mutter (GNOME, Budgie) - "native" (default) opacity should be used
KWin (KDE) - "Show Desktop" temporarily hides GLava
Openbox (LXDE or standalone) - No issues
Xfwm (XFCE) - No issues
Fluxbox - No issues
IceWM - No issues
Bspwm - No issues
SpectrWM
Herbstluftwm - hc rule windowtype~'_NET_WM_WINDOW_TYPE_DESKTOP' manage=off can be used to unmanage desktop windows
Unity - No issues
AwesomeWM - Defaults to unmanaged
i3 (and i3-gaps) - Defaults to unmanaged
spectrwm - Defaults to unmanaged
EXWM - EXWM does not have a desktop, and forces window decorations
Enlightenment - Needs testing
Xmonad - No issues after enabling ewmh hints via XMonad.Hooks.EwmhDesktops.ewmh
Any non EWMH-compliant WM - Window types and hints will not work if the window manager does not support the EWMH standards.

Note that some WMs listed without issues have specific overrides when using the --desktop flag. See shaders/env_*.glsl files for details.

Reading from MPD's FIFO output

Add the following to your ~/.config/mpd.conf:

audio_output {
    type                    "fifo"
    name                    "glava_fifo"
    path                    "/tmp/mpd.fifo"
    format                  "22050:16:2"
}

Note the 22050 sample rate -- this is the reccommended setting for GLava. Restart MPD (if nessecary) and start GLava with glava --audio=fifo.

Using GLava with OBS

GLava installs a plugin for rendering directly to an OBS scene, if support was enabled at compile-time. This is enabled by default in Meson, but it is overridden to disabled in the Makefile for build compatibility.

To use the plugin, simply select GLava Direct Source from the source list in OBS and position the output accordingly. You can provide options to GLava in the source properties.

Note that this only works for the default GLX builds of both OBS and GLava. This feature will not work if OBS was compiled with EGL for context creation, or if GLava is using GLFW.

Performance

GLava will have a notable performance impact by default due to reletively high update rates, interpolation, and smoothing. Because FFT computations are (at the moment) performed on the CPU, you may wish to lower setsamplesize and setbufsize on old hardware.

However, there is functionality to prevent GLava from unessecarily eating resources. GLava will always halt completely when obscured, so a fullscreen application covering the visualizer should enounter no issues (ie. games). If you wish for GLava to halt rendering when any fullscreen application is in focus regardless of visibility, you can set setfullscreencheck to true in rc.glsl.

Any serious performance and/or updating issues (low FPS/UPS) should be reported. At a minimum, modules should be expected to run smoothly on Intel HD graphics and software rasterizers like llvmpipe.

Licensing

GLava is licensed under the terms of the GPLv3, with the exemption of khrplatform.h, which is licensed under the terms in its header. GLava includes some (heavily modified) source code that originated from cava, which was initially provided under the MIT license. The source files that originated from cava are the following:

  • [cava]/input/fifo.c -> [glava]/fifo.c
  • [cava]/input/fifo.h -> [glava]/fifo.h
  • [cava]/input/pulse.c -> [glava]/pulse_input.c
  • [cava]/input/pulse.h -> [glava]/pulse_input.h

The below copyright notice applies for the original versions of these files:

Copyright (c) 2015 Karl Stavestrand <[email protected]>

GLava also contains GLFFT, an excellent FFT implementation using Opengl 4.3 compute shaders. This was also initiallly provided under the MIT license, and applies to the following source files (where * refers to both hpp and cpp):

  • glfft/glfft.*
  • glfft/glfft_common.hpp
  • glfft/glfft_gl_interface.*
  • glfft/glfft_interface.hpp
  • glfft/glfft_wisdom.*

The below copyright notice applies for the original versions of these files:

Copyright (c) 2015 Hans-Kristian Arntzen <[email protected]>

The noted files above are all sublicensed under the terms of the GPLv3. The MIT license is included for your convenience and to satisfy the requirements of the original license, although it no longer applies to any code in this repository. You will find the original copyright notice and MIT license in the LICENSE_ORIGINAL file for cava, or glfft/LICENSE_ORIGINAL for GLFFT.

The below copyright applies for the modifications to the files listed above, and the remaining sources in the repository:

Copyright (c) 2017 Levi Webb

glava's People

Contributors

arch1t3cht30 avatar barbw1re avatar coderobe avatar cpixl avatar jarcode-foss avatar jubalh avatar literacyfanatic avatar mmhobi7 avatar slotthe avatar smarthard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glava's Issues

Testing on Solus 3

peek 2018-02-05 09-56
The above gif is basically the issue, I tried xroot and normal on solus (still on GLFW 3.2 so I can't test 3.3 features yet) Any idea what could be causing another background to be shown instead of my actual wallpaper?

Segfault after installation

Freshly installed and built version of glava, running Arch linux (glfw package is glfw-x11).

Loading module: 'bars'
found GLSL stage: '1.frag'
compiling: '1.frag'
Using default PulseAudio sink: alsa_output.pci-0000_00_14.2.analog-stereo.monitor
ASAN:DEADLYSIGNAL
=================================================================
==29759==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x55a522df4844 bp 0x000000000176 sp 0x7ffcac6e1f50 T0)
==29759==The signal is caused by a READ memory access.
==29759==Hint: address points to the zero page.
    #0 0x55a522df4843 in xwin_should_render (/usr/bin/glava+0x3843)
    #1 0x55a522df40b7 in main (/usr/bin/glava+0x30b7)
    #2 0x7f2fbc46bf49 in __libc_start_main (/usr/lib/libc.so.6+0x20f49)
    #3 0x55a522df4509 in _start (/usr/bin/glava+0x3509)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/usr/bin/glava+0x3843) in xwin_should_render
==29759==ABORTING

Above fullscreen

Watching video,
But glava will stay below...
It should be above.

Transparent Ui

Hi. i have arch linux and install glava from Aur.
when i want to run it:
error
Desktop environment: Gnome 3.30

always on top with IceWM

I can't put the window to a lower layer, and it is always on top regardless of any wm setting even from menu or winoptions file or commandline tool icesh.
glava-ontop

GLXBadFBConfig on old graphics hardware

When trying to install GLava, I get this error when I type make in the GLava directory. It's probably some stupid mistake I'm making (I'm sort of a newb at Linux). I'm on Ubuntu 16.04 LTS 32 bit.

elithecoder@Eli-PC:~/glava$ make
cc -I glad/include -DGLAVA_GLX -DGLAVA_GLFW -O2 -march=native -DGLAVA_UNIX  -o xwin.o -c xwin.c
xwin.c:17:39: fatal error: X11/extensions/Xcomposite.h: No such file or directory
compilation terminated.
Makefile:69: recipe for target 'xwin.o' failed
make: *** [xwin.o] Error 1
elithecoder@Eli-PC:~/glava$ 

output of uname -a:

Linux Eli-PC 4.13.0-36-generic #40~16.04.1-Ubuntu SMP Fri Feb 16 23:26:51 UTC 2018 i686 i686 i686 GNU/Linux

Tagged releases

Have you thought about tagging "stable" commits once in a while?
This would allow proper distribution packaging from known-good commits.

Multiple Monitors

Glava only runs on the main monitor, which is expected, but it would be nice if it ran on both. How to get glava to run on both monitors is beyond me. I don't know the proper way that actually works but glava window could be re-positioned onto the second monitor and then expanded (full screen, whatever).

Changing audio source on the fly?

Hi
I'm using different audio devices(for example, HD Audio at home and a usb DAC at work), I 'm wondering is it possible to change the audio source manually/automatically when changing the default sink?

Trouble compiling

root@austin-System-Product-Name:~/glava# make cd glad && python -m glad --generator=c --extensions=GL_EXT_framebuffer_multisample,GL_EXT_texture_filter_anisotropic --out-path=. [01/16/2018 13:30:19][INFO ][glad ]: getting 'gl' specification from SVN [01/16/2018 13:30:19][INFO ][glad.opener ]: opening: 'https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/master/xml/gl.xml' [01/16/2018 13:30:19][INFO ][glad ]: generating 'gl' bindings [01/16/2018 13:30:20][INFO ][glad ]: generating 'gl' bindings - done cc -I glad/include -O2 -march=native -DGLAVA_UNIX -o glad.o ./glad/src/glad.c -c cc -I glad/include -O2 -march=native -DGLAVA_UNIX -o glava.o -c glava.c cc -I glad/include -O2 -march=native -DGLAVA_UNIX -o xwin.o -c xwin.c In file included from xwin.c:21:0: /usr/include/GLFW/glfw3native.h:102:3: error: #error "No context API selected" #error "No context API selected" ^ Makefile:58: recipe for target 'xwin.o' failed make: *** [xwin.o] Error 1

Issue launching in elementary OS 0.4.1 loki

I followed the instructions to a T in the README.MD. Installed all the dependencies and ran glava --copy-defualt. When I run glava -v I get

Using backend: 'glx'
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
glXChooseFBConfig(): failed
Aborted (core dumped)

Here is my rc.glsl with removed comments

#request mod bars

/* Window hints */
#request setfloating  false
#request setdecorated true
#request setfocused   false
#request setmaximized false

#request setforcegeometry false

#request setopacity "native"

#request setversion 3 3
#request setshaderversion 330

#request settitle "GLava"

#request setgeometry 0 0 800 600

#request setbg 00000000
#request setxwintype "normal"

// #request addxwinstate "sticky"
// #request addxwinstate "skip_taskbar"
// #request addxwinstate "skip_pager"
// #request addxwinstate "above"

#request setsource "auto"

#request setswap 1

#request setinterpolate true

#request setframerate 0

#request setprintframes true

#request setsamplesize 1024

#request setbufsize 4096

#request setsamplerate 22050

#request setbufscale 1

Here is my screen fetch for reference

                                     preston@PAtches
         eeeeeeeeeeeeeeeee           OS: elementary OS 0.4.1 loki
      eeeeeeeeeeeeeeeeeeeeeee        Kernel: x86_64 Linux 4.13.0-38-generic
    eeeee  eeeeeeeeeeee   eeeee      Uptime: 1h 21m
  eeee   eeeee       eee     eeee    Packages: 2043
 eeee   eeee          eee     eeee   Shell: bash 4.3.48
eee    eee            eee       eee  Resolution: 1920x1080
eee   eee            eee        eee  WM: Mutter(Gala)
ee    eee           eeee       eeee  WM Theme: elementary
ee    eee         eeeee      eeeeee  CPU: AMD Athlon X4 860K Quad Core @ 3.7GHz
ee    eee       eeeee      eeeee ee  GPU: GeForce GTX 1050 Ti
eee   eeee   eeeeee      eeeee  eee  RAM: 1731MiB / 10001MiB
eee    eeeeeeeeee     eeeeee    eee 
 eeeeeeeeeeeeeeeeeeeeeeee    eeeee  
  eeeeeeee eeeeeeeeeeee      eeee   
    eeeee                 eeeee     
      eeeeeee         eeeeeee       
         eeeeeeeeeeeeeeeee          

What am I doing wrong? Do I need to do something extra in the configs I don't know about? Do I need to change WM?

Thank you for your help!

Unable to compile on Mint

First of all I'm pretty new to git hub and compiling myself, but under Mint I don’t seem to find den Package libglx0, the only package that looks remotely like this is libxcb-glx0. I just resumed with the compilation and got that error :
cc -o glava glava.o xwin.o pulse_input.o glsl_ext.o glfw_wcb.o glx_wcb.o fifo.o render.o glad.o -lpulse -lpulse-simple -pthread -lglfw -ldl -lm -lX11 -lXext -lGLX -lXrender
/usr/bin/ld: cannot find -lGLX
collect2: error: ld returned 1 exit status
Makefile:77: recipe for target 'glava' failed

Clickthrough to underlying X windows

A clickthrough feature would be nice, to be able to operate applications that glava might be overlaying (on purpose), or to be able to interact with desktop icons when the xwintype is "desktop" but seemingly on top of the filemanager rendering the icons

Plasma/KDE - stacking order and position issues

Setting the xwintype to 'desktop', glava only shows on the active workspace when the program is initially run.
Also, clicking on the desktop outside of the glava 'window' causes it to disappear. It'll still be running just not visible.

OS: Arch
KDE Plasma: 5.11.5
Running glfw-x11-git out of the AUR.

Unable to compile on Ubuntu

When I run make I get:

In file included from xwin.c:21:0:
/usr/include/GLFW/glfw3native.h:102:3: error: #error "No context API selected"
#error "No context API selected"
^
Makefile:59: recipe for target 'xwin.o' failed

Performance issues on integrated graphics

On my i7-4710HQ, running glava with the bars module, native transparency and a size of 1920x300(+) yields surprisingly low FPS, @wacossusca34 says this should really yield 200+

The performance goes up drastically when ran on a dedicated GPU instead of the integrated one on the same device.

Compile Issues on OSX

When building with make INSTAL=osx I get IEC 60559 standard unsupported on target system.

"glfw-x11 and glfw-x11-git are in conflict (glfw)"

I am running Arch and when I try to update glava through the AUR, I get the following error message.

glfw-x11 and glfw-x11-git are in conflict (glfw). Remove glfw-x11-git? [y/N]

However, if I answer yes to removing glfw-x11-git, I get the following error message:

:: glava-git: removing glfw-x11-git breaks dependency 'glfw-x11-git'
:: Building glava-git package(s)...
==> Making package: glava-git r133.5ac2cc4-1 (Sun Mar  4 23:30:00 EST 2018)
==> Checking runtime dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for conflicting packages...
:: glfw-x11 and glfw-x11-git are in conflict (glfw). Remove glfw-x11-git? [y/N] 
error: unresolvable package conflicts detected
error: failed to prepare transaction (conflicting dependencies)
:: glfw-x11 and glfw-x11-git are in conflict
==> ERROR: 'pacman' failed to install missing dependencies.
:: failed to build glava-git package(s)

Yaourt gives me this message:
:: glava-git: removing glfw-x11-git breaks dependency 'glfw-x11-git'[/code]

This comes up every time I try to upgrade my packages using pacaur. What should I do? Thanks!

"desktop" attribute not present on i3-gaps

The desktop attribute is not available on i3-gaps (at least since the last gaps-next version).

If you could add a way to dispaly the visualizer in background instead of over other windows. Because i3 floating window must be ontop of tiling ones. On the official wiki it is say that the desktop attribute (to display a window beneath others) is not implemented in i3, thanks.

Not working - "UPS: 0.00"

System:

OS: Arch
WM: Openbox
Audio: Alsa, mpd, ncmpcpp

Issue:

Whenever I run glava without any music playing, it seems to be OK. But, if glava is running, I can't play any music, as if the play button was "blocked" in ncmpcpp.
However, if I do the other way, that is, by having music playing and then running glava, glava simply doesn't work, the window opens but shows nothing. It says the UPS is 0. The FPS keeps on 60, though.

I'm using the default config file and couldn't find any error log.

Play music in ncmpcpp then run glava:

[zeta@andromeda ~]$ ncmpcpp
Reading configuration from /home/zeta/.ncmpcpp/config...
[zeta@andromeda ~]$ glava
Using backend 'glx'
Loading module: 'bars'
found GLSL stage: '1.frag'
compiling: '1.frag'
Using default PulseAudio sing: alsa_output.pci-0000_00_14.2.analog-stereo.monitor
FPS: 61.27, UPS: 0.00
FPS: 60.02, UPS: 0.00
FPS: 60.01, UPS: 0.00
FPS: 60.02, UPS: 0.00
FPS: 60.01, UPS: 0.00
FPS: 60.02, UPS: 0.00
^C
[zeta@andromeda ~]$

Thanks for the help!

Left audio buffer is not used

I'm surprised nobody noticed this! The left audio buffer is not currently being used due to an issue with how glActiveTexture is being called, and is currently being filled with the contents of the right buffer instead.

Should be fixed shortly.

Makefile problems and conventions

When invoked with multiple jobs (make -jX) the glava rule may run before glad finished, breaking because the header(s) haven't been generated.

GLX functions do not load correctly on Bumblebee and Nvidia PRIME systems

Currently GLava just loads GLX functions (and extensions) by hand, uses -lGLX in the makefile to link to the implementation and provided GLX headers. This does wonky things when there's more than one available driver, and I'm not sure what the "proper" behaviour is here. Apparently, changing the linker option in the Makefile to -lGL fixes the issue, but I'm not sure if this is ideal (what driver is it using, does it respect optirun or DRI_PRIME=1?)

I attempted to load GLX functions through glad, since that's an option (see gladLoadGLX(display, screen)), but it appears the GLX loader for glad doesn't seem to work correctly. The glad2 branch contains fixes for the GLX generators, but it's very unstable (can't even get it to run).

See: Dav1dde/glad#107, Dav1dde/glad#23

I'm probably going to implement my own solution using dlopen, once I figure out what I'm supposed to do on systems with hybrid graphics. See #22 for the original issue submitted by @aaahh.

Inconsistent UPS while interacting with GNOME's audio settings

Right after starting glava I get 30-50 UPS, trying to find a solution I discovered that if I stop glava, switch the audio output from analog to digital or viceversa (I'm using a DAC, so they both come out of my speakers) and restart glava, I get 60 UPS, but as soon as I focus another window or close the audio settings it goes back to 40ish. I also noticed that if I change output while glava is running, it uses my USB mic as input.

Things I changed in my rc.glsl:

setinterpolate -> false
setsamplerate -> 44100

Running glava corrupts terminal emulator contents

I do not know if this is a problem you can influence/fix in any way, but here it is:

Whenever I run glava, the output from my urxvt (rxvt_unicode) terminals gets mangled extremely badly. This only happens when the visualizer is running and immediately stops when I close it.

Any help is appreciated, thank you for your hard work!

Documentation on Gradients?

As someone not that up to speed on OpenGL programming and stuff can we get some documentation in the wiki about how to define gradients?

herbstluftwm compatibility

Hi, first off- great job! GLava looks really cool, and I'll definitely use it once I get it working with my window manager.

So, I have a line in my herbstluftwm config which unmanages windows of type desktop, dock and notification:

hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off

This works fine for programs like dunst or docky, but doesn't seem to work for GLava when I set the window type via rc.glsl. I'm doing it like so:

#request setxwintype "desktop"

I tried all three window types mentioned above, but hlwm doesn't seem to unmanage them. I checked that the window type is being set correctly with xprop (output below):

WM_STATE(WM_STATE):
		window state: Normal
		icon window: 0x0
_NET_FRAME_EXTENTS(CARDINAL) = 2, 2, 2, 2
_NET_WM_STATE(ATOM) = _NET_WM_STATE_BELOW
_NET_WM_DESKTOP(CARDINAL) = 1
_NET_WM_ICON_NAME(UTF8_STRING) = "GLava"
_NET_WM_NAME(UTF8_STRING) = "GLava"
WM_LOCALE_NAME(STRING) = "C"
WM_CLIENT_MACHINE(STRING) = "burek"
WM_ICON_NAME(STRING) = "GLava"
WM_NAME(STRING) = "GLava"
XdndAware(ATOM) = BITMAP
WM_CLASS(STRING) = "GLava", "GLava"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
		program specified location: 0, 0
		window gravity: Static
WM_HINTS(WM_HINTS):
		Initial state is Normal State.
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
_NET_WM_PID(CARDINAL) = 14756
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, _NET_WM_PING
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x139dafa0, 0x0, 0x139c6e40, 0xc8bc0200

I then tried unmanaging it by WM_CLASS in my hlwm config:

hc rule class~'GLava' manage=off

This unmanages it fine, but GLava gets drawn on top of my other windows, which isn't very useful. If I could get it to draw in the background, I'd be able to use it. As far as I can tell the only way to have it drawn below other windows in hlwm is to set the window type to DESKTOP, but as mentioned above hlwm doesn't want to play nice. I'm not sure whose end the problem is on, but thought I'd make an issue anyway.

Thanks!

Compilation terminated on Ubuntu 18.04.1

When I,

$ make
..
xwin.c:19:10: fatal error: X11/extensions/Xcomposite.h: No such file or directory
 #include <X11/extensions/Xcomposite.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:74: recipe for target 'xwin.o' failed
make: *** [xwin.o] Error 1

setclickthrough Non-functional

Using #request setclickthrough true in ~/.config/glava/rc.glsl does not actually work for clickthrough. Tested with wintype desktop, normal, utility, and dock. No luck either way.

Running Manjaro, kernel 4.18.7-1-MANJARO, Xfce/xfwm DE/WM.

MPD support & UI features

I am wondering if anyone is interested in GLava being an MPD client. I can simply add support for MPD as audio input, but the following features are a possibility as well:

  • Song status (title, time elapsed, playing/paused/stopped)
  • Player status (volume, current playlist, etc.)
  • Album artwork rendering (idea taken from this comment) in the center of the radial module, or to the left of the bars module
  • Ability to heavily configure UI and reposition the visualizer itself in the GLava window
  • Some basic controls for MPD (this might have problems with usability as the GLava window isn't always easy to interact with, this may be better alongside a feature to temporarily bring GLava to the front)

Most of the above features will warrant a large amount of code for font rendering and other UI elements. Since I want this to be heavily configurable and exposed to the users, I do not want to do this in pure C. Some options are:

  • Cleaning up glsl_ext.c and adding more preprocessor directives that specify UI drawing routines for native code. I can't imagine this would be too pleasing as preprocessor directives are ugly enough as is, but it gives me plenty of control over how GLava behaves and I can maintain the "zero heap allocations at runtime" rule I have been loosely enforcing over the code.

  • Using another language, like Lua, to handle organizing the UI elements. This will massively help on a usability front, since it's probably much easier for users to learn and use compared to hacked GLSL directives, but if I am evaluating code at runtime it could have a small performance impact (luajit can mitigate this).

I have been pondering the idea for some time and thought it's probably best to ask for feedback before I start making rapid changes to the respository. Any input (including support for this kind of feature/extension) would be appreciated.

Combining Left and Right audio

Either combining them or let the user choose one. I currently have mine setup so the "bars" view is 3840 pixels wide and spans 2 monitors (one to the left of mine) to get just the right channel on my monitor. I feel it's not ideal and a combination of both channels could be used to show one side at a time.

I'm sorry if i worded this weirdly.

Configurable solid background color

since transparent doesn't work with any of glfw versions I tried, is there a way to change the background color from the usual black color to something like solarized

Bspwm works, with a few tweaks.

I can confirm that GLava works on BSPWM as intended, however it requires a bit of configuration;

A Rule, or someother method requires the following variables to be set:
state=floating layer=below sticky=true locked=true border=off

Then, a program will have to be used to change the geometry of the window around (0,0); with the width and hieght that of the screen resolution. Anything above the screen resolution will make GLava become fully black.

I use wmctrl.

A external rule can be used to set all of this everytime GLava is ran.

I expect i3 could also be successfully used through the same sort of configuration.

Im writing this for a enhancement in the readme, and the wiki, and perhaps a method for automatically configuring it in the future.

Additional options for bars configuration

First of all I would love to be able to put Glava on the right edge of my screen. Is it even possible through a custom bars config or not?

Also if that happens, I wold like the bars to go from the left edge to the right. So basically is like flipping the whole thing.

I tried #define ROTATE () in the bars.glsl but with not much success. If anything it only moves the window around the screen if I don't set Glava to my window screen.

Compiling Errors

I'm Ubuntu 14.04 user. When I compiling Glava from source, i get next error:

fifo.c: In function ‘input_fifo’:
fifo.c:26:9: error: variable ‘req’ has initializer but incomplete type
struct timespec req = { .tv_sec = 0, .tv_nsec = 10000000 };
^
fifo.c:26:9: error: unknown field ‘tv_sec’ specified in initializer

How to use it properly?

All i can do is open a terminal and type "glava" and it appears as pre-configured (the bar style and windowed, etc)

I mean, how do i create my own module? The wiki is so confusing. I have to create a folder in the config file and name it wharever i want (lets say i create one named 'hrq'), and then inside the folder i put a 1.frag file and a config file?

I tried to create a config file and run glava by typing: glava -e /pathtomyfile.glsl, but NO MATTER HOW I WRITE IT, it shows an error like this: No module was selected, edit 'hrq' to load a module with `#request mod [name]. No matter what i do, this error shows up.

All i wanted to do is to edit this glava to use it properly, but among all things i saw this week, this wiki was the only one i couldnt figure how to configure

OpenSuse Tumbleweed install

Is it possible to install this on OpenSuse?
All these dependencies are available and installed on my system: libpulse0 libpulse-dev libglfw3 libxext6 libxext-dev libxcomposite-dev python make gcc
This one is not available: libglfw3-dev
I always get this error, with both make and make DISABLE_GLFW=1
cc -o glava xwin.o render.o pulse_input.o glx_wcb.o glsl_ext.o glfw_wcb.o glava.o fifo.o glad.o -lpulse -lpulse-simple -pthread -ldl -lm -lX11 -lXext -lXrender /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: render.o: in function rd_new':
render.c:(.text+0x2842): undefined reference to wcb_glfw' collect2: error: ld returned 1 exit status make: *** [Makefile:77: glava] Error 1

I tried to install libglfw3-dev with some RPM I found, but same error.

reading $HOME/.Xauthority in infinite loop

# fatrace -ct . 
08:03:53.480510 glava(5461): O /home/DC-1/.Xauthority
08:03:53.480510 glava(5461): RC /home/DC-1/.Xauthority
08:03:53.494806 glava(5461): O /home/DC-1/.Xauthority
08:03:53.494864 glava(5461): RC /home/DC-1/.Xauthority
08:03:53.513631 glava(5461): O /home/DC-1/.Xauthority
08:03:53.513688 glava(5461): RC /home/DC-1/.Xauthority
08:03:53.530283 glava(5461): O /home/DC-1/.Xauthority
08:03:53.530283 glava(5461): R /home/DC-1/.Xauthority
08:03:53.530357 glava(5461): C /home/DC-1/.Xauthority
08:03:53.547148 glava(5461): O /home/DC-1/.Xauthority
08:03:53.547204 glava(5461): RC /home/DC-1/.Xauthority
08:03:53.563497 glava(5461): O /home/DC-1/.Xauthority
08:03:53.563554 glava(5461): RC /home/DC-1/.Xauthority
08:03:53.580376 glava(5461): O /home/DC-1/.Xauthority
08:03:53.580376 glava(5461): R /home/DC-1/.Xauthority
08:03:53.580468 glava(5461): C /home/DC-1/.Xauthority
08:03:53.594654 glava(5461): RCO /home/DC-1/.Xauthority
08:03:53.613451 glava(5461): O /home/DC-1/.Xauthority
08:03:53.613507 glava(5461): RC /home/DC-1/.Xauthority
08:03:53.630072 glava(5461): O /home/DC-1/.Xauthority
08:03:53.630072 glava(5461): R /home/DC-1/.Xauthority
08:03:53.630167 glava(5461): C /home/DC-1/.Xauthority
08:03:53.644658 glava(5461): O /home/DC-1/.Xauthority
08:03:53.644713 glava(5461): RC /home/DC-1/.Xauthority
08:03:53.663534 glava(5461): O /home/DC-1/.Xauthority
08:03:53.663534 glava(5461): R /home/DC-1/.Xauthority
08:03:53.663622 glava(5461): C /home/DC-1/.Xauthority
08:03:53.680235 glava(5461): O /home/DC-1/.Xauthority
08:03:53.680235 glava(5461): R /home/DC-1/.Xauthority
08:03:53.680324 glava(5461): C /home/DC-1/.Xauthority
08:03:53.695154 glava(5461): O /home/DC-1/.Xauthority
08:03:53.695154 glava(5461): R /home/DC-1/.Xauthority
08:03:53.695229 glava(5461): C /home/DC-1/.Xauthority
08:03:53.713391 glava(5461): O /home/DC-1/.Xauthority
08:03:53.713449 glava(5461): RC /home/DC-1/.Xauthority
08:03:53.729968 glava(5461): RCO /home/DC-1/.Xauthority
08:03:53.746723 glava(5461): O /home/DC-1/.Xauthority
08:03:53.746723 glava(5461): R /home/DC-1/.Xauthority
08:03:53.746815 glava(5461): C /home/DC-1/.Xauthority
08:03:53.763307 glava(5461): O /home/DC-1/.Xauthority
08:03:53.763358 glava(5461): RC /home/DC-1/.Xauthority
08:03:53.780234 glava(5461): O /home/DC-1/.Xauthority
08:03:53.780234 glava(5461): R /home/DC-1/.Xauthority
08:03:53.780309 glava(5461): C /home/DC-1/.Xauthority
08:03:53.794482 glava(5461): RCO /home/DC-1/.Xauthority
08:03:53.813198 glava(5461): O /home/DC-1/.Xauthority
08:03:53.813254 glava(5461): RC /home/DC-1/.Xauthority
08:03:53.829825 glava(5461): O /home/DC-1/.Xauthority
08:03:53.829879 glava(5461): RC /home/DC-1/.Xauthority
08:03:53.844567 glava(5461): RO /home/DC-1/.Xauthority
08:03:53.844567 glava(5461): C /home/DC-1/.Xauthority
08:03:53.863177 glava(5461): O /home/DC-1/.Xauthority
08:03:53.863240 glava(5461): RC /home/DC-1/.Xauthority
08:03:53.879927 glava(5461): O /home/DC-1/.Xauthority
08:03:53.879984 glava(5461): RC /home/DC-1/.Xauthority
08:03:53.894329 glava(5461): O /home/DC-1/.Xauthority
08:03:53.894384 glava(5461): RC /home/DC-1/.Xauthority
08:03:53.913237 glava(5461): O /home/DC-1/.Xauthority
08:03:53.913293 glava(5461): RC /home/DC-1/.Xauthority
08:03:53.929779 glava(5461): O /home/DC-1/.Xauthority
08:03:53.929835 glava(5461): RC /home/DC-1/.Xauthority
08:03:53.944370 glava(5461): O /home/DC-1/.Xauthority
08:03:53.944426 glava(5461): RC /home/DC-1/.Xauthority
08:03:53.963086 glava(5461): O /home/DC-1/.Xauthority
08:03:53.963139 glava(5461): RC /home/DC-1/.Xauthority
08:03:53.979807 glava(5461): O /home/DC-1/.Xauthority
08:03:53.979862 glava(5461): RC /home/DC-1/.Xauthority
08:03:53.996358 glava(5461): O /home/DC-1/.Xauthority
08:03:53.996416 glava(5461): RC /home/DC-1/.Xauthority
08:03:54.013047 glava(5461): O /home/DC-1/.Xauthority
08:03:54.013102 glava(5461): RC /home/DC-1/.Xauthority
08:03:54.029749 glava(5461): O /home/DC-1/.Xauthority
08:03:54.029807 glava(5461): RC /home/DC-1/.Xauthority

I think it's a bit too often.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.