olback/autoplank

problem running on Elementary OS 5.1

lord-kyron opened this issue · 8 comments

When I try to run it on Elementary OS 5.1 I am getting:

Autoplank
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { kind: InvalidDigit }', src/libcore/result.rs:1165:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

I can't reproduce the issue in a VM running a fresh install of ElementaryOS 5.1.
Could you post the result of these commands?

xdotool -v && xdotool getmouselocation

and

xrandr -v && xrandr

Hi again.
First, I must say I am using the ready builded file from the releases and running elementary OS 5.1 on actual laptop hardware, not a VM. Usually the laptop is connected to a docking station with two monitors. If it matters, the laptop is Lenovo ThinkPad T490.

here is the output of the commands:

~/.local/bin$ xdotool -v && xdotool getmouselocation
xdotool version 3.20160805.1
x:1002 y:700 screen:0 window:88080391
~/.local/bin$ xrandr -v && xrandr
xrandr program version       1.5.0
Server reports RandR version 1.5
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 8192 x 8192
eDP-1 connected (normal left inverted right x axis y axis)
   1920x1080     60.05 +
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)
DP-2-1 disconnected (normal left inverted right x axis y axis)
DP-2-2 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 527mm x 296mm
   1920x1080     60.00*+
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1152x864      75.00  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   640x480       75.00    59.94  
   720x400       70.08  
DP-2-3 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 527mm x 296mm
   1920x1080     60.00*+
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1152x864      75.00  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   640x480       75.00    59.94  
   720x400       70.08  

Here is the output when I try to execute the binary:

No such file or directory (os error 2)
~/.local/bin$ ./autoplank
Autoplank
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { kind: InvalidDigit }', src/libcore/result.rs:1165:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

Update:
I've cloned the repo and compiled the binary from source but the result was the same. Same errors.

I think I know what's going on. The output from xrandr suggests that you have two monitors connected to your laptop which you said you have. These two monitors show up as DP-2-2 and DP-2-3.

It looks like you are using a dock with either the laptop lid closed or laptop screen disabled, is that correct? The reason I think this is the case is because eDP-1 does not have a resolution+offset.
Example of this from the output above looks like this: DP-2-3 connected 1920x1080+1920+0.

Update:
I can reproduce the issue on my laptop with one monitor connected the the internal display disabled. Working on a fix 👍

Great! Thank you! I really need this feature as this is the way I work - laptop with closedblid on the dock and two external monitors.

Hey sorry for asking, but I remembered that the original autoplank does not have the featuer to move the dock if it is placed on another place than the bottom (left or right side for example). Canbyou make this possible since you are going to patch it or it will be too much work? Or maybe it is already supported?

Autoplank is just a wrapper arround the original plank process. The only thing Autoplank does is get your mouse location, and figure out what monitor it is on. The plank configuration is then changed accordingly.

As for the location of plank, that can be changed in the plank settings. CTRL+Right-click on plank and choose preferences. I guess you're looking for position and alignment.

plank screenshot

plank settings

Thanks for opening an issue about this. It should be fixed in the latest release which is 0.1.2 👍

Thank you too! I will bebusing this every day so if I find something more I will report it back for sure!