A utility library to make use of the X Go Binding easier. (Implements EWMH and ICCCM specs, key binding support, etc.)
by BurntSushiGo
Last 12 weeks · 0 commits
2 of 6 standards met
Reproduce Uncomment the following lines in the screenshot example: https://github.com/BurntSushi/xgbutil/blob/master/_examples/screenshot/main.go#L37-L40 Run Run `./screenshot Expected result A window that pops up with the contents of the screenshot and a png gets written to disk with the contents of the screenshot. Actual result A window that pops up with the contents of the screenshot and blank png gets written to disk (https://punpun.xyz/hqgz.png)
I use ActiveWindowGet command to get currently active process. It runs perfectly. But if user starts the app with sudo, following part makes Panic and it crashes my entire app. So my questions would be: 1. Can we handle panic here and return an error to user 2. Is it possible to use ActiveWindowGet with sudo? Thanks! Edit: Oh, I'm sorry, totally my mistake. NewConn was giving an error but I didn't check that. Closing the issue, sorry for the mistake.
Hi ! I am trying to resize and move window using xgbutil and facing some issues about it. I am running i3wm and use pkg.go.dev/go.i3wm.org/i3/ to obtain the focused window ID. Then I resize the window using one of the several methods provided by xgbutil. My issue is : I have a window of random size, I want to move it and set it to a specific size, let's say 640x360. When I run one time my program, the window is moved in the correct place however the size is not correct. Geometry functions report a bogus size. If I run a second time the program immediately after, I can see the window changing a liittle bit its size again to finally get the correct size. Geometry functions returns the same value as before but this time it is correct. Subsquent run does not change the size anymore. I have printed the geometry of the window before and after the call to the resize function and can see the second time that the size was incorrect (geometry reports the incorrect size). I don't understand why the geometry after the call in the first run is incorrect though. Let's wrap-up: I create two sets of objects to be sure I am not reusing bufferized values. My code is First run I got: I do not touch anything and a rerun the program, I got: I am a little bit confused in front of the multiple function to resize a window. I found: ewmh.MoveresizeWindow ewmh.MoveresizeWindowExtra ewmh.WmMoveresizeWindow ewmh.WmMoveresizeWindowExtra ewmh.ResizeWindow xwindow.Resize xwindow.MoveResize xwindow.WMResize xwindow.WMMoveResize I understand some of the differences (such as between Move and MoveResize) but I do not understand the difference between Resize and WMResize for example.
Repository: BurntSushi/xgbutil. Description: A utility library to make use of the X Go Binding easier. (Implements EWMH and ICCCM specs, key binding support, etc.) Stars: 203, Forks: 46. Primary language: Go. Languages: Go (99.3%), Python (0.5%), Makefile (0.1%), Vim Script (0%). License: WTFPL. Open PRs: 4, open issues: 21. Last activity: 6y ago. Community health: 42%. Top contributors: BurntSushi, aarzilli, snyh, baskerville, droundy, dominikh, harryfei, knivey.