Cinnamon, one panel per monitor, can I make the window list show windows on all monitors?
Linux MintThis forum is for the discussion of Linux Mint.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The window list on the left (primary) monitor shows only Firefox while the window list on the right monitor shows only Calculator. That's not what I want - I want both window lists to show all the windows.
Can I make Cinnamon do this, or should I just use a different desktop? XFCE on my Debian install does what I want.
(Also looks like it might not be that hard to patch if I really wanted to use Cinnamon, but I'm not a developer and for me that'd be more trouble than it's worth.)
I am truly sorry for the 4 year necro, but I had this same issue, and this was one of the top results on The Googles so hopefully anyone reading this will be able to make use of it.
Upfront, this is a quick and dirty hack, will probably be reverted if the applet ever updates, has no guarentees, etc.
1) Open a folder.
2) Right Click > Open as Root. All steps up to step 9 are done as Root via this now root folder.
3) Go to the folder "/usr/share/cinnamon/applets/window-list@cinnamon.org"
4) Make a backup of "applet.js"
5) Open applet.js
6) Find the function "_updateWatchedMonitors()"
7) At the time of writing, near the start of this function there should be an if statement stating "else if (instances.length > 1 && !on_primary)"
8) Replace the line of code in this if branch to the code found in the catchall else branch immediately after it.
for (let i = 0; i < n_mons; i++)
this._monitorWatchList.push(i);
9) Save the changes to "applet.js"
10) Press Alt+F2 to bring up the Cinnamon control dialog. Type r and then press Enter to restart Cinnamon.
11) Windows from all monitors should now be displayed in Window Lists across all monitors.
Last edited by BaconCatBug; 12-20-2021 at 12:04 PM.
I am truly sorry for the 4 year necro, but I had this same issue, and this was one of the top results on The Googles so hopefully anyone reading this will be able to make use of it.
Upfront, this is a quick and dirty hack, will probably be reverted if the applet ever updates, has no guarentees, etc.
1) Open a folder.
2) Right Click > Open as Root. All steps up to step 9 are done as Root via this now root folder.
3) Go to the folder "/usr/share/cinnamon/applets/window-list@cinnamon.org"
4) Make a backup of "applet.js"
5) Open applet.js
6) Find the function "_updateWatchedMonitors()"
7) At the time of writing, near the start of this function there should be an if statement stating "else if (instances.length > 1 && !on_primary)"
8) Replace the line of code in this if branch to the code found in the catchall else branch immediately after it.
In my case, that meant replacing with
9) Save the changes to "applet.js"
10) Press Alt+F2 to bring up the Cinnamon control dialog. Type r and then press Enter to restart Cinnamon.
11) Windows from all monitors should now be displayed in Window Lists across all monitors.
I don't know how universal this is across cinnamon but the applet Window list accomplishes this functionality. It will display windows from both monitors and can even display windows from all desktops. No need to edit the applet.js file but it doesn't allow grouped window lists so if you want to hover over an icon then edit applet.js.
For me I use a grouped window list in the bottom left and a Window List in the middle.
Hope this helps somebody!
Last edited by ShesBaldJerry; 06-07-2023 at 04:56 PM.
I am truly sorry for the 4 year necro, but I had this same issue, and this was one of the top results on The Googles so hopefully anyone reading this will be able to make use of it.
Upfront, this is a quick and dirty hack, will probably be reverted if the applet ever updates, has no guarentees, etc.
1) Open a folder.
2) Right Click > Open as Root. All steps up to step 9 are done as Root via this now root folder.
3) Go to the folder "/usr/share/cinnamon/applets/window-list@cinnamon.org"
4) Make a backup of "applet.js"
5) Open applet.js
6) Find the function "_updateWatchedMonitors()"
7) At the time of writing, near the start of this function there should be an if statement stating "else if (instances.length > 1 && !on_primary)"
8) Replace the line of code in this if branch to the code found in the catchall else branch immediately after it.
In my case, that meant replacing with
9) Save the changes to "applet.js"
10) Press Alt+F2 to bring up the Cinnamon control dialog. Type r and then press Enter to restart Cinnamon.
11) Windows from all monitors should now be displayed in Window Lists across all monitors.
I'm not sure if I was just reading the instructions wrong or what to but I wanted to reply with the exact changes that worked for me.
in applet.js on Cinnamon 5.6.8 here is the full edited "_updateWatchedMonitors() {" block. (line 1273-1368 for me)
Code:
_updateWatchedMonitors() {
// this can be called after our settings are finalized (and those attributes deleted),
// so lastWindowOrder won't exist anymore. This can happen when panels are removed, for
// example due to monitor changes.
if (this.lastWindowOrder === undefined) {
return;
}
let n_mons = global.display.get_n_monitors();
let on_primary = this.panel.monitorIndex == Main.layoutManager.primaryIndex;
let instances = Main.AppletManager.getRunningInstancesForUuid(this._uuid);
/* Simple cases */
if (n_mons == 1) {
this._monitorWatchList = [Main.layoutManager.primaryIndex];
} else if (instances.length > 1 && !on_primary) {
this._monitorWatchList = [this.panel.monitorIndex];
instances = instances.map(function(x) {
return x.panel.monitorIndex;
});
for (let i = 0; i < n_mons; i++)
this._monitorWatchList.push(i);
} else {
/* This is an instance on the primary monitor - it will be
* responsible for any monitors not covered individually. First
* convert the instances list into a list of the monitor indices,
* and then add the monitors not present to the monitor watch list
* */
this._monitorWatchList = [this.panel.monitorIndex];
instances = instances.map(function(x) {
return x.panel.monitorIndex;
});
for (let i = 0; i < n_mons; i++)
this._monitorWatchList.push(i);
}
// Now track the windows in our favorite monitors
let windows = global.display.list_windows(0);
if (this.showAllWorkspaces) {
for (let wks=0; wks<global.workspace_manager.n_workspaces; wks++) {
let metaWorkspace = global.workspace_manager.get_workspace_by_index(wks);
let wks_windows = metaWorkspace.list_windows();
for (let wks_window of wks_windows) {
windows.push(wks_window);
}
}
}
this.refreshing = true;
for (let window of windows) {
if (this._shouldAdd(window))
this._addWindow(window, false);
else
this._removeWindow(window);
}
this.refreshing = false;
this._applySavedOrder();
this._updateAllIconGeometry();
}
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.