abiosoft / autoplank Goto Github PK
View Code? Open in Web Editor NEWautomatically move Plank to the active monitor
License: MIT License
automatically move Plank to the active monitor
License: MIT License
So this changes the dconf settings but the dock won't move until I either open a folder or settings-type of window. My best guess is that even once a value is written to dconf for plank, something else (gsettings?) has to update.
Using Linux Mint 19.1 Cinnamon
Hi,
1st of all, thank you for this effort.
I'm trying to use autoplank on an Arch linux box, I was able to compile without problem but I'm getting the error in the title when I execute autoplank on the terminal.
Thank you
Environment:
OS: Archlinux
Plank version: 0.11.89
Go version: 1.17.6
xdotool version: 3.202111022.1
Each time I pulled the mouse to the dock area, after running plank, I get the following messages:
2018/11/02 15:35:22 attempting to move plank to DP-1-1 - primary
2018/11/02 15:35:28 attempting to move plank to DP-1-8
But that is the opposite monitor. It keeps jumping like that. I had to turn autoplank off. Would this be easy to fix?
Distro: Elementary OS 5.1
Laptop: Dell XPS 15 7590
After installing autoplank as a service it is not starting and im getting the following logs:
Apr 3 22:21:33 joaofranco-elementary systemd[2318]: Started Autoplank Service. Apr 3 22:21:33 joaofranco-elementary autoplank[6241]: 2020/04/03 22:21:33 fork/exec /usr/bin/plank: inappropriate ioctl for device Apr 3 22:21:33 joaofranco-elementary systemd[2318]: autoplank.service: Main process exited, code=exited, status=1/FAILURE Apr 3 22:21:33 joaofranco-elementary systemd[2318]: autoplank.service: Failed with result 'exit-code'. Apr 3 22:21:33 joaofranco-elementary systemd[2318]: autoplank.service: Service hold-off time over, scheduling restart. Apr 3 22:21:33 joaofranco-elementary systemd[2318]: autoplank.service: Scheduled restart job, restart counter is at 1. Apr 3 22:21:33 joaofranco-elementary systemd[2318]: Stopped Autoplank Service. Apr 3 22:21:33 joaofranco-elementary systemd[2318]: Started Autoplank Service. Apr 3 22:21:33 joaofranco-elementary autoplank[6252]: 2020/04/03 22:21:33 fork/exec /usr/bin/plank: inappropriate ioctl for device Apr 3 22:21:33 joaofranco-elementary systemd[2318]: autoplank.service: Main process exited, code=exited, status=1/FAILURE Apr 3 22:21:33 joaofranco-elementary systemd[2318]: autoplank.service: Failed with result 'exit-code'. Apr 3 22:21:33 joaofranco-elementary systemd[2318]: autoplank.service: Service hold-off time over, scheduling restart. Apr 3 22:21:33 joaofranco-elementary systemd[2318]: autoplank.service: Scheduled restart job, restart counter is at 2. Apr 3 22:21:33 joaofranco-elementary systemd[2318]: Stopped Autoplank Service. Apr 3 22:21:33 joaofranco-elementary systemd[2318]: Started Autoplank Service. Apr 3 22:21:33 joaofranco-elementary autoplank[6260]: 2020/04/03 22:21:33 fork/exec /usr/bin/plank: inappropriate ioctl for device Apr 3 22:21:33 joaofranco-elementary systemd[2318]: autoplank.service: Main process exited, code=exited, status=1/FAILURE Apr 3 22:21:33 joaofranco-elementary systemd[2318]: autoplank.service: Failed with result 'exit-code'. Apr 3 22:21:33 joaofranco-elementary systemd[2318]: autoplank.service: Service hold-off time over, scheduling restart. Apr 3 22:21:33 joaofranco-elementary systemd[2318]: autoplank.service: Scheduled restart job, restart counter is at 3. Apr 3 22:21:33 joaofranco-elementary systemd[2318]: Stopped Autoplank Service. Apr 3 22:21:33 joaofranco-elementary systemd[2318]: Started Autoplank Service. Apr 3 22:21:33 joaofranco-elementary autoplank[6267]: 2020/04/03 22:21:33 fork/exec /usr/bin/plank: inappropriate ioctl for device Apr 3 22:21:33 joaofranco-elementary systemd[2318]: autoplank.service: Main process exited, code=exited, status=1/FAILURE Apr 3 22:21:33 joaofranco-elementary systemd[2318]: autoplank.service: Failed with result 'exit-code'. Apr 3 22:21:34 joaofranco-elementary systemd[2318]: autoplank.service: Service hold-off time over, scheduling restart. Apr 3 22:21:34 joaofranco-elementary systemd[2318]: autoplank.service: Scheduled restart job, restart counter is at 4. Apr 3 22:21:34 joaofranco-elementary systemd[2318]: Stopped Autoplank Service. Apr 3 22:21:34 joaofranco-elementary systemd[2318]: Started Autoplank Service. Apr 3 22:21:34 joaofranco-elementary autoplank[6275]: 2020/04/03 22:21:34 fork/exec /usr/bin/plank: inappropriate ioctl for device Apr 3 22:21:34 joaofranco-elementary systemd[2318]: autoplank.service: Main process exited, code=exited, status=1/FAILURE Apr 3 22:21:34 joaofranco-elementary systemd[2318]: autoplank.service: Failed with result 'exit-code'. Apr 3 22:21:34 joaofranco-elementary systemd[2318]: autoplank.service: Service hold-off time over, scheduling restart. Apr 3 22:21:34 joaofranco-elementary systemd[2318]: autoplank.service: Scheduled restart job, restart counter is at 5. Apr 3 22:21:34 joaofranco-elementary systemd[2318]: Stopped Autoplank Service. Apr 3 22:21:34 joaofranco-elementary systemd[2318]: autoplank.service: Start request repeated too quickly. Apr 3 22:21:34 joaofranco-elementary systemd[2318]: autoplank.service: Failed with result 'exit-code'. Apr 3 22:21:34 joaofranco-elementary systemd[2318]: Failed to start Autoplank Service.
When i execute de service, the second monitor dont estop blink.
I have a laptop with two external monitors connected to it. I keep the laptop lid opened and use its built-in monitor as a third monitor.
I have plank set in autohide mode.
If I raise plank on the built-in monitor, it will then only display on whichever of the two external monitors I display it on next, but not the other.
Please let me know if there's any other info I can provide that would be useful.
I followed the directions for building and installing. I am running Xubuntu 19.04
$ autoplank dconf not found in PATH
I have 3 monitors when they are all enabled works fine, however if I disable any with
xrandr --output DVI-I-0 --mode 1920x1080 --pos 3840x0 --rotate normal --output DVI-I-1 --off --output HDMI-0 --off --ou tput DP-0 --primary --mode 1920x1080 --pos 1920x0 --rotate normal --output DP-1 --off --output DVI-D-0 --off
Then I get the following...
`panic: runtime error: index out of range [1] with length 1
goroutine 1 [running]:
main.fetchDisplays(0x4058bf, 0xc000016118, 0x0, 0x0, 0x0)
/home/user/git/autoplank/main.go:177 +0x62b
main.main()
/home/user/git/autoplank/main.go:22 +0x26
`
This is the issue we were talking about on Reddit: https://www.reddit.com/r/elementaryos/comments/95a879/autoplank_use_plank_on_multimonitor_setup/e3tmfas/.
My Gnome desktop lags like crazy and I get increased CPU usage for some Xorg process that's usually near 0%.
Here's a htop screenshot: https://i.imgur.com/Jj1bLHs.png While the CPU usage is not very high for that process, it's usually around 0 CPU usage until I run autoplank, and the desktop gets very choppy (mouse movement and dragging windows) and laggy while autoplank runs.
I'm using Ubuntu 18.04 with Gnome desktop, Nvidia 980 gtx graphics with proprietary nvidia drivers in case that matters. Also in case it matters: I'm using 2 monitors with different resolutions and aspect ratios: 2560x1080 (21:9) and 1920x1080 (16:9).
Plank version:
$ apt-cache policy plank
plank:
Installed: 0.11.4-2
Candidate: 0.11.4-2
Version table:
*** 0.11.4-2 500
500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
100 /var/lib/dpkg/status
Let me know what I can do to debug this.
After installing Plank in my Ubuntu, it works fine.
But for my multi screen I wanted Plank in my second screen also.
I clone the git and used go-lang to run the command.
now when trying to run "autoplank" I get: "xdotool not found in PATH"
Hi,
I'm on manjaro with XFCE and I'm trying to move my plank from my left monitor (DP-0) to my right (HDMI-0) and back. But for some reason my plank dock doesn't move at all. It won't go to the other monitor.
I've tried starting autoplank from the terminal but it displays no information it just sits idle, even if I try to change my mouse to the other monitor and go to the bottom of it.
Do you perhaps know how I can debug this?
Yours grateful,
Simbaclaws
I thought of contributing here as I like this autoplank instance. From how I had it before by using another autoplank iteration, using systemd is probably the better way to go about it.
If you like my recommendations, feel free to add it to your README @abiosoft
Here are my suggestions and take them for what is worth.
$ cat $HOME/.config/systemd/user/autoplank.service
[Unit]
Description=Autoplank Service
[Service]
ExecStart=/usr/local/bin/autoplank -p 200
Restart=always
[Install]
WantedBy=default.target
$ cat $HOME/.config/systemd/user/autoplank.timer
[Unit]
Description=Timer for the AutoPlank user-mode service
[Timer]
OnActiveSec=5
Unit=autoplank.service
[Install]
WantedBy=timers.target
Additionally:
3. Create a new service to rescan and configure it to run once:
$ cat $HOME/.config/systemd/user/autoplank_scan.service
[Unit]
Description=Autoplank Monitor Scan Service
Wants=autoplank_scan.timer
[Service]
Type=oneshot
ExecStart=/usr/local/bin/autoplank -r
[Install]
WantedBy=default.target
$ cat $HOME/.config/systemd/user/autoplank_scan.timer
[Unit]
Description=Timer for the AutoPlank Scan user-mode service
Requires=autoplank.service
After=autoplank.service
[Timer]
OnCalendar=*-*-* *:*:00
Persistent=true
AccuracySec=1s
Unit=autoplank_scan.service
[Install]
WantedBy=timers.target
$ systemctl enable autoplank.timer --user
$ systemctl enable autoplank_scan.timer --user
$ systemctl start autoplank.timer --user
$ systemctl start autoplank_scan.timer --user
Note: the services will show up as Loaded but inactive, and this is fine. Both services should show they are triggered by their timers:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.