jarcode-foss / glava

GLava - OpenGL audio spectrum visualizer
GNU General Public License v3.0
1.17k stars 59 forks source link

Unable to setgeometry in Glava on Manjaro KDE #175

Open jamess7995 opened 4 years ago

jamess7995 commented 4 years ago

Hey All, I followed a ageneric guide on linuxuprising, and I'm unable to actually position where I want Glava to go. I'll provide examples of what I've changed in rc.glsl at the bottom. I'm using two monitors, my left hand smaller monitor(1920x1080), my primary center monitor(2560x1440). As far as I can tell, I installed it correctly on Manjaro, and I'm using KDE Plasma. I have noticed that if I run glava from the konsole, it appears on the monitor I run it form, and haven't found a configuration where it runs on a different monitor, which is fine, so we're assuming in the below examples, that it's all on the primary monitor. #request setgeometry 1400 1400 1440 600 Ends up on the right hand side, a little below the center

#request setgeometry 0 0 1440 600 So all I did was change the x & y value, so it should move down and to the left, nope, it didn't move a single pixel

#request setgeometry 0 0 2800 1200 Here's where you notice that I'm treating the width and height like x & y, cause that's how they seem to work to me. Here it's weirdly higher up, just by a little bit, even though I doubled the height, and its now on on the left hand side but close to center.

#request setgeometry 0 0 5600 2400 Again, it gets weird, doubled the height, again, and now it's lower than before, and now it's closer to the right.

Also worth noting, that the bigger I make the height and widtth, it takes up more RAM, which would make sense if it is changing the width and height, but it's not, it's changing position

jamess7995 commented 4 years ago

For anybody that finds my post, I discovered a solution to share, so it seems either unique to kde, or unique to my setup with multiple monitors, so might not work for you but I was able to change setforcegeomtry in the config file to true, which forces my x&y coordinates to work, the reason why width & height were changing the position, is that the window size was getting bigger, and when I was opening that "new" window from my terminal, it was positioning this new window on the empty portion of my screen, instead of using the x&y until I setforcegeometry to true.

mojolo commented 3 years ago

another method on KDE, which i find easier to achieve precise size/positioning, is to disable the geometry requests in rc.glsl and use Plasma's Window Rules instead.

in rc.glsl, i have commented out the geometry request and set setforcegeometry to false.

/* Window geometry (x, y, width, height)
#request setgeometry 0 -1400 3400 200
*/

#request setforcegeometry false

i run glava without the --desktop option and achieve the same effect with Window Rules

in Plasma's System Settings > Window Management > Window Rules, i have the following rule:

Window Matching: Class: Exact Match: glava
Size & Position: Position: Force: x,y
Size & Position: Size: Force: w,h
Arrangement & Access: Keep Below: Force: Yes
Arrangement & Access: Skip Taskbar: Force: Yes
Arrangement & Access: Skip Pager: Force: Yes
Arrangement & Access: Skip Switcher: Force: Yes
Appearance & Fixes: No titlebar and frame: Force: Yes

note: adjust x, y, w and h to your liking.