Is it possible to make dash on dock appear separately on multiple monitors? So for example, 2 docks, one on each monitor?
Hi,
Do you mean multiple dock, one on each monitor with only the applications
running on that monitor?
Yes.
On 22 nov. 2012, at 19:27, Michele [email protected] wrote:
Hi,
Do you mean multiple dock, one on each monitor with only the applications
running on that monitor?
—
Reply to this email directly or view it on GitHub.
I don't think I'm going to implement something like this in the near future, for two main reasons:
1.) It would require quite a lot of work and I'm not sure I have time to do it now. Moreover not having a multiple monitor configuration slows down a lot the development and testing of such feature and stops me from starting to experiment with it in my spare time.
2.) I think it's not the way multiple monitors are meant in gnome-shell but I'm not sure about this. If I remember correctly the secondary monitor is usually just a static workspace. I've tried to be as consistent as possible with the default gnome-shell behaviour, and so for instance I decided to keep thinking of the dock as a part of the overview.
Anyhow I'm not dropping the idea completely.
I really like the multi-dock that Ubuntu offers, it really helps reducing mouse movement and allows to locate windows at a glance since clicking twice on an icon show all the applications on the screen.
In a triple monitor setup I have 2 active monitor and a static one. On a single monitor, however, I use workspaces.
+1 to this idea. I'd like to see this coming somewhere in near future :)
@ticpu: I'm too lazy to try to install ubuntu... how does ubuntu handle the multimonitor thing: is the dock the same on all monitors or are them multiple docks restricted to the apps of each specific screen?
@micheleg In Ubuntu, the dock is (by default) visible on all monitors. The icons are the same in all docks, but there is a distinct indicator (a triangle) indicating the application is running on another monitor. So, on the monitor the app is running, you have a circle. On the others, a triangle. AFAIK there is no way to configure it to only show the icons of the current monitor, because anyway the pinned applications always appear, I don't think it makes much sense.
I don't run Unity since a long time, but that is how it works.
Thanks for the information.
I'd very much like to have this feature too, that's pretty much the only thing I regret from Unity
+1 for this. It would really boost productivity with multi monitor setups.
+1
+1
:+1:
I'd love this to be implemented as well. I don't care for only showing the windows open for each window, I'd rather just have the dock duplicated on each monitor. But either way, it would be very great
I'd be happy to contribute if I'll get some guidance on how to start implementing it.
I never worked on gnome extensions so I don't have the right knowledge.
@ItamarShDev : thanks for your interest in helping the development of dash-to-dock. A already said, there is no real blocking thing for having duplicated docks. Indeed, I can run two independent docks by simply duplicating the extension with a different name with very minor issues.

With independent settings it's then easy to move one of the dock in the secondary monitor.
So it's mainly a matter of organizing the code in order to allow the instantiations of two dash objects.
If you have a look at the code, in extension.js the docking.DockedDash object (https://github.com/micheleg/dash-to-dock/blob/master/docking.js#L184) is created. A dirty approach would be to duplicate it at this level, creating another one and somehow force its settings to show the dock on the secondary monitor. This would be basically as duplicating the whole extension, duplicating also the code dealing with intellihide and the various shell tweaks which should instead be kept in common. You don't need a particular understanding of Gnome Shell innards, but only of Javascript, to get the idea of how rework the code. I see two options:
Are you willing to look into this? If so I can provide guidance once you get an overview of the code.
@micheleg sure i am willing
I have already looked at the code, will be happy to help.
will give it another look this evening or tomorrow's
Will be happy to more guidance if needed
Thanks for the info
I went with the "easy approach" and renamed the extension to a new one with different settings.
rm -rf ~/.local/share/gnome-shell/extensions/[email protected]
cp -R ~/.local/share/gnome-shell/extensions/[email protected] ~/.local/share/gnome-shell/extensions/[email protected]
mv ~/.local/share/gnome-shell/extensions/[email protected]/schemas/org.gnome.shell.extensions.dash-to-dock.gschema.xml ~/.local/share/gnome-shell/extensions/[email protected]/schemas/org.gnome.shell.extensions.dash-to-multiple.gschema.xml
sed -i 's/Dash to Dock/Dash to Multiple/g' ~/.local/share/gnome-shell/extensions/[email protected]/metadata.json
sed -i 's/dash-to-dock/dash-to-multiple/g' ~/.local/share/gnome-shell/extensions/[email protected]/metadata.json ~/.local/share/gnome-shell/extensions/[email protected]/*.js ~/.local/share/gnome-shell/extensions/[email protected]/schemas/org.gnome.shell.extensions.dash-to-multiple.gschema.xml
rm ~/.local/share/gnome-shell/extensions/[email protected]/schemas/gschemas.compiled
glib-compile-schemas ~/.local/share/gnome-shell/extensions/[email protected]/schemas/
Then, hit alt+f2 and execute r to reload gnome-shell. You can now activate and configure your independent copy with the tweak tool.
Hi, I'm not planning on working on this in the near future, but if someone wants to look at it, I created a branch with _minimal_ (and hacky) support for 2 monitors.
https://github.com/franglais125/dash-to-dock/tree/multi_monitor
I'm essentially duplicating the DockedDash object, but I'm forcing two of them on 2 monitors, so you need at least 2 monitors to run it properly!
Todo:
Just to make it clear, this is _not_ a correct implementation; the single patch that matters [4abfb6e92ecfc3b60202b420866819aab1c4cd97] shows what object to duplicate, and basic monitor handling.
I tested it on 2 monitors and it "works", not sure if it will crash eventually, so be careful if you install it :).
Cheers
Well, I ended up working on it, as it wasn't as much work as I thought, at least to get it to work minimally. The 3rd point still need to be checked:
I just updated the tree [https://github.com/franglais125/dash-to-dock/tree/multi_monitor].
If anyone wants to give it a try, it seems to work reasonably well on Gnome 3.20. I won't be doing a PR until some other PRs are resolved though.
Hi all:
I rebased the tree I was working on [[https://github.com/franglais125/dash-to-dock/tree/multi_monitor] to update it against @micheleg's master.
As far as I can tell, the code works quite well (tested on Gnome 3.20):
What I would really need is some testing, as I can't cover all use-cases and combination of features. I have sent some pull requests, but this one is a bit bigger and more intrusive.
I'd feel more comfortable if somebody could test this branch and send me feedback.
I'm currently testing the extension on Gnome 3.18 on Ubuntu Xenial, no problem whatsoever. Currently set options are extend dock and isolate workspace.
I think I encountered a crash while unlocking my screen. This is the first crash I had with gnome-shell in quite a while. I still have the process open in gdb if needed.
https://gist.github.com/ticpu/686b1d4cd8c3caf4b42b02e84a95f2cc
@ticpu any new problems to report? Or did the fix I included work well so far? And thanks for your feedback so far.
To all: I updated the multi-monitor branch (https://github.com/franglais125/dash-to-dock/tree/multi_monitor) after the release of v54. So if anyone else is willing to test it, please let me know how it goes!
I'll try to use it tomorrow and I'll tell you how it went
I've been using it daily ever since the last release without any updates. No crash yet.
@ticpu thanks!
@bishiboosh I forgot to mention that the multi-monitor tree only works for Gnome Shell 3.18, 3.20 and 3.22
It works.
@micheleg Is it a good time to start a PR for this?
Perhaps there are other issues/PRs you want to handle first!
I'd like to merge the hotkeys branch first. As usual I'm a bit scared of introducing big changes until I become confident about it. I need to find the time to review it. How much do you like your current implementation?
Well, I'm scared of introducing too many changes too! I'm asking now as there seems to be at least a few people using it (without bad reports).
Super summary: essentially the way it works is that there is a "dockManager" that creates and deletes docks whenever the monitors change.
This is what I have to say (briefly) about the 7 commits:
I can wait for you to review/accept/reject the hotkeys implementation, and then bother again with this when you are done.
Or I can send you this now/soon (with a better description), and just wait for you to find the time to review it. As you prefer!
+1 for this feature
+1 for this feature
For anyone interested, I rebased the _multi-monitor_ branch (https://github.com/franglais125/dash-to-dock/tree/multi_monitor), so that a merge is still easily feasible.
@franglais125 do you have this feature implemented for 3.14? I have a single monitor only at home but I'd like to run it at work where I have two screens.
@micheleg I just prepared a branch for 3.14. I simply had to cherry-pick a few commits from my gnome-3.14-custom branch.
Here it is: https://github.com/franglais125/dash-to-dock/commits/gnome-3.14-multi_monitor
By the way, it contains the hotkeys as well (first 2 commits).
Here is a comparison:
https://github.com/micheleg/dash-to-dock/compare/gnome-3.14...franglais125:gnome-3.14-multi_monitor?expand=1
Thanks,
I'll give it a try next week.
@micheleg did you get a chance to test it? :)
@franglais125 I installed the multi monitor branch from here. Up until now everything feels as it should, the only thing i noticed is that when i press application button of dock on the second monitor it actually opens it on the "primary". Nice effort :)
@pkoutsovasilis this is gnome related imho
as the apps and overview always display in the main monitor.
I am using two monitors for awhile on gnome and i dont recall any extension that manipulates this behavior.
but, maybe im mistaken
@micheleg sorry i wasn't here, i caught up in my work (new work, new programming language)
and weren't able to find me some time to work on it to the fullest :(
@pkoutsovasilis thanks for the feedback! I noticed this too, but I am not sure that adding the option to open the overview on the secondary monitor makes a lot of sense... Perhaps it would be better to simply remove the Apps button from the dash on secondary monitors.
In any case, I think I would rather wait for @micheleg to review the changes and give some feedback on how it is implemented. We can then look at improving the remaining bits.
Unfortunately I haven't had the opportunity to look into this yet. I will try to do it soon.
@franglais125 thank you for working on this! However, I'm perhaps slightly confused.
How do you get the dash to show on all you monitors? I was expecting in the "Show the dock on" pull-down there would be a new option for "All Monitors" or similar?
Again, thank you to all involved. I think if we can get this branch merged and the windows previews to be activated via hover it will be perfect ;-)
Thank you all!
Mike
@jonnjonzzn
You simply need to check the "Show on all monitors." check box :)

Yeah, that was my fault. You have to be smart enough to grab the correct branch ;-)
So far works well. As @luisfpg mentioned above some of Ubuntu's per-monitor Unity magic would be icing on the cake.
Regardless, thank you. Great work.
Mike
A few days on continuous use at work (3 monitors) and no problems I've noticed.
+1
Merge it.
@jonnjonzzn thanks for the feedback!
I guess the "icing on the cake" you are referring to is to have some kind of indicator to know on which monitor the app is running?
I don't think I'll implement something like this in the short term, but once (and if) this is merged, I can have a look at it.
I'm testing @franglais125's modifications on Fedora 25 and it's working beautifully. It works after disconnecting and reconnecting the external display. I'm using intelligent autohide and they both behave independently as you'd expect. Looks good!
@franglais125 I was potentially thinking the dot(s) below or background of running applications could be a different color for apps running on the current monitor. Certainly not very important and perhaps not even a good idea with the overhead to the code. Just a thought.
Again, thank you for all your work on this. It is very much appreciated.
Hi all, I just updated (rebased) the branch to follow the latest developments, and more specifically to include a nice fix for Wayland: thanks Michele!
From what I gathered, the feedback has been rather positive about how the multi-monitor dash is working. However, if anyone else willing to test it, please let me know if you find problems.
https://github.com/franglais125/dash-to-dock/tree/multi_monitor
@franglais125 I have just updated my workstation at work with a fresh install of fedora 25. I just installed your latest update/rebase and will pass along my feedback. Initially everything is working as expected and looks good.
Thank you.
Michael
@jonnjonzzn thanks for lettming me know!
To all: again, following recent commits, I rebased multi-monitor today.
i installed yesterday, other than what appeared to be some conflicts while trying to install it, the extension is working beautifully so far
Found a bug with overview on second monitor:

@cra0zy Are you referring to the overlap between the dash and the window?
If so, then I think it's a duplicate of https://github.com/micheleg/dash-to-dock/issues/410.
@cra0zy Are you referring to the overlap between the dash and the window?
If so, then I think it's a duplicate of #410.
Yup.
Thanks, the problem does not originate from the multi-monitor implementation, but still, I'll try to see if I can fix this.
Tested this for a few days now, no problems so far. Great work, thanks!
For anyone interested: I just rebased the multi-monitor branch again to include the latest commits from the master branch.
Cheers!
https://github.com/franglais125/dash-to-dock/tree/multi_monitor
thanks man, any ETA on when itll get accepted into master?
@thejacer87 unfortunately, no. AFAIK, @micheleg doesn't have an extra monitor to test the changes. The modifications are not minor, and even though the multi-monitor branch has received positive feedback so far, it is difficult to review and merge code that you can't test properly.
I'm doing my best to keep it up to date until it can be merged (hopefully).
sounds good, keep up the good work
@franglais125 Tested with Ubuntu 16.04 (gnome 3.18.3) and working perfect! Thanks buddy
I have been waiting for a long time to see this feature integrated into the master. I use 3 monitors at work, and at home, sometimes I use 1 monitor along with the TV. And I've never had a problem using this @franglais125 branch. Using Manjaro (4.9.15-1-MANJARO) GNOME Shell 3.22.3.
I do agree this is a nice feature to have, and I'd like to see it merged (@gabrielmoreira I'd like to have three monitor too!)
@franglais125 how do you judge your branch on a scale of "it's an hack"..."I thoroughly thought about how to structure things"?
I haven't looked at the code recently. I guess we are somewhere in between, also because you probably tried to not disrupt too much the current code structure. So my question is, would a bigger core reorganization to accommodate the existence of multiple docks be desirable?
More generally, what kind of multimonitor are we looking for? Duplicated dock on all screen? Screen restricted dock? Dock moving from monitor to monitor (Ã la MacOS if I remember correctly). Should it depend on the workspace settings (workspace on secondary monitors or not)?
@micheleg you bring up some nice questions!
As you said, the patches I propose can feel a bit like a hack in the sense that I tried not to be disruptive, while keeping a sane implementation. However, I did think of a consistent structure:
For now, the multi-monitor option simply duplicates the dock on all screens. My idea was first to get the basic support in, and then introduce subsequent smaller features.
At this point I think it would be simply better to start a PR and discuss structure/commits over there.
@micheleg, you will need an extra monitor when this feature is merged.
I recommend at least buying a cheap monitor $ 119
https://goo.gl/scEvvu
I can contribute $25, if we can get some more donors I think it's worth it for everyone.
https://www.bountysource.com/issues/1218983-dash-to-dock-multi-monitor
What do you think? If you agree, I can make the donation.
@gabrielmoreira I was going to suggest something like this too. I can chip in as well, if @micheleg is interested!
Thanks all for the offer of support. Unfortunately, the reason I don't have a secondary monitor is really lack of space for it rather than economical affordability... However, I can occasionally hook up my laptop to a tv, it's just not the most comfortable developing location, especially for extensive testing and bug hunting.
That said, I intend now to work on this feature and try to merge it in the next release, time permitting.
I'm looking forward to this, we'll definitely need it now Unity is dead.
Great work! That's what I'm looking for, thank you!
This is great!
An extra nice touch might be the option to have different positions on each monitor. For example, on my left monitor i'd like to keep the dock to the left, on the right monitor i'd keep it to the right. That way, it doesn't "catch" my mouse when moving it from right to left monitor.
How can i try this new functionality or when do you plan to push an update to the gnome extensions store? I tried building from sorce and installing manually on ubuntu-gnome, but it did not appear to have any differences to the official version.... I think, I did something wrong....
@uloco if you install from source, I assume you mean running make install. You need to checkout the multi_monitor branch to get the new feature. Something like:
git clone https://github.com/micheleg/dash-to-dock
cd dash-to-dock/
git checkout multi_monitor
make && make install
A word of caution: it's an experimental branch, and might have a few problems still, hence why it isn't merged yet.
It works, thanks!
Looks like I forgot to check out the right branch :see_no_evil:
Hi everyone!
The work to enable multi-monitor support has been included in the master branch. Thanks a lot @micheleg for the review and inclusion of this feature!
In the testing I did things seemed to work fine, but if people can test more and report on bugs you find,it would be great to make sure we haven't broken anything.
We can perhaps keep this open until a new version is uploaded to e.g.o, so that it's easier to find for people looking for this issue.
Cheers!
This has been merged into master. Please provide any useful feedback, in terms of bugs and possible improvements.
What is the behaviour with the extension disabled? Does the icon show up in the default dash (inside the overview)?
@micheleg I think you meant to write the last comment in #483 ?
Is it possible for the app drawer to be displayed on the second monitor?
@franglais125 Yes, too many tabs github tabs open...
@cra0zy You mean the grid of applications you get in the overview?
@cra0zy You mean the grid of applications you get in the overview?
yissss
does that fact that this is in master mean that enabling it from the gnome extensions website will have this feature in there?
edit: just tried and didn't seem to work. i just realized what "e.g.o" was in franglais last post.
any ETA for the ego release?
It will be included in the next release. I'm waiting for some feedback but I should upload a new release reasonably soon (~1 week time).
I feel forgotten :(
@cra0zy While the answer to your question could be "yes it's possible", I don't think it is straightforward. I'd love to implement it, but I doubt it will be worth the trouble.
Perhaps I'm mistaken, but the (short) look I took at the code looked like a hard thing to implement.
@cra0zy this is something that could be implemented, although I'm not sure how easy it is. I've always tried to avoid disrupting too much the default shell behaviour and not to do things that are outside the scope of this extension. I will consider it, but I'll think twice before doing it. Would you mind opening an issue for it?
Found a bug... When you have two windows on the second screen open and you tap the super key, the left windows' close button becomes unaccessible. This happens, because the dash just overlays the screen but should pad the screen to the right. My dash settings are like classic unity: a static dock on the left, full length top to bottom, always visible, both monitors enabled.
@uloco Indeed, this was reported some time ago #410, we still need to fix it. The bug is also present even if you don't use "Show on all monitors".
Found a bug?: Minimizing animation is always tied to one of the docks even if you drag the window to a second monitor. Not sure if you can do anything to fix it tho.
@cra0zy I forgot to comment about that. Normally windows should minimize to the corresponding dock (screen where the window is).
Can anybody else reproduce this problem? On my system it's working fine, i.e. the window minimizes to the correct dock (assuming you are using multiple docks obviously)>
Just FYI I am running GNOME 3.24
@cra0zy I just tried on Gnome 3.24 and still can't reproduce the problem. If you are still seeing that behavior, can you open a new issue and describe what's happening?
Hi everyone!
The work to enable multi-monitor support has been included in the master branch. Thanks a lot @micheleg for the review and inclusion of this feature!
In the testing I did things seemed to work fine, but if people can test more and report on bugs you find,it would be great to make sure we haven't broken anything.We can perhaps keep this open until a new version is uploaded to e.g.o, so that it's easier to find for people looking for this issue.
Cheers!
Does it work on gnome-shell 3.18?
Thanks!
Please release the multi monitor version, so I can ditch Unity :)
@luisvasquez it should work on 3.18, but I didn't test that in a while. Let me know if you find problems related to multi-monitor!
multi_monitor branch is gone?
@collinpeters I removed it since it was merged to master.
To try it:
git clone https://github.com/micheleg/dash-to-dock
cd dash-to-dock
make && make install
I kinda skipped some comments, but I'm wondering if the option of having only the opened apps on a monitor showing in the dock is still being developed?
What i really wanted was having the favorite apps on the main monitor + opened apps on said monitor and having only the opened apps on the second monitor.
@RicardoEPRodrigues The monitor-isolation feature is already available in the master branch! All it does is show the running applications for each monitor, but the favorites are shown on all docks.
Unfortunately, we don't have per-dock settings, and it wouldn't be easy to do either...
@franglais125 I think it would be easier to make a toggle saying something like Show favorites only on main monitor, since we select which monitor to show the dock that would be the "main" monitor.
Sure, that's yet-another-setting, but easy to implement.
There are a number of active PRs, and I already have 2 open. Perhaps you can open another issue (not to spam everyone here!). I don't mind adding this as an option, but I don't want to create new branches just yet. Let's see what @micheleg's feeling is about it first.
@RicardoEPRodrigues Here you go: https://github.com/franglais125/dash-to-dock/tree/favs_on_main
I ended up liking the idea!
Exactly what i wanted! Thank you so much! :smile:
For those that want to try it out do the following:
git clone https://github.com/franglais125/dash-to-dock.git
cd dash-to-dock
git checkout favs_on_main
make
make install
Now restart GNOME Shell:
Alt+F2 -> r -> Enter
Then enter dash-to-dock settings and activate Launchers > Show only on main monitor.
Most helpful comment
Thanks all for the offer of support. Unfortunately, the reason I don't have a secondary monitor is really lack of space for it rather than economical affordability... However, I can occasionally hook up my laptop to a tv, it's just not the most comfortable developing location, especially for extensive testing and bug hunting.
That said, I intend now to work on this feature and try to merge it in the next release, time permitting.