├── .project ├── LICENSE ├── README.md ├── debug.sh └── multi-monitors-add-on@spin83 ├── extension.js ├── globals.js ├── icons ├── multi-monitors-l-symbolic.svg └── multi-monitors-r-symbolic.svg ├── indicator.js ├── locale ├── de │ └── LC_MESSAGES │ │ ├── multi-monitors-add-on.mo │ │ └── multi-monitors-add-on.po ├── es │ └── LC_MESSAGES │ │ ├── multi-monitors-add-on.mo │ │ └── multi-monitors-add-on.po ├── fr │ └── LC_MESSAGES │ │ ├── multi-monitors-add-on.mo │ │ └── multi-monitors-add-on.po ├── it │ └── LC_MESSAGES │ │ ├── multi-monitors-add-on.mo │ │ └── multi-monitors-add-on.po ├── pl │ └── LC_MESSAGES │ │ ├── multi-monitors-add-on.mo │ │ └── multi-monitors-add-on.po └── pt_BR │ └── LC_MESSAGES │ ├── multi-monitors-add-on.mo │ └── multi-monitors-add-on.po ├── metadata.json ├── mmlayout.js ├── mmpanel.js ├── multi-monitors-add-on.pot ├── prefs.js ├── schemas ├── gschemas.compiled └── org.gnome.shell.extensions.multi-monitors-add-on.gschema.xml └── stylesheet.css /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | multi-monitors-add-on 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | 341 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Multi Monitors Add-On 2 | 3 | Fork of https://github.com/spin83/multi-monitors-add-on rewritten (almost) from scratch for gnome-shell version 46. 4 | 5 | # Versions 6 | - Branch [master](https://github.com/lazanet/multi-monitors-add-on/tree/master) contains extension for GNOME 46 7 | - Branch [gnome-42_44](https://github.com/lazanet/multi-monitors-add-on/tree/gnome-42_44) contains extension for GNOME 42, 43, 44 8 | - Branch [gnome-3-32_3-36](https://github.com/spin83/multi-monitors-add-on/tree/gnome-3-32_3-36) contains extension for GNOME 3.32, 3.34 and 3.36 9 | - Branch [gnome-3-24_3-30](https://github.com/spin83/multi-monitors-add-on/tree/gnome-3-24_3-30) contains extension for GNOME 3.24, 3.26, 3.28 and 3.30 10 | - Branch [gnome-3-20_3-22](https://github.com/spin83/multi-monitors-add-on/tree/gnome-3-20_3-22) contains extension for GNOME 3.20 and 3.22 11 | - Branch [gnome-3-16_3-18](https://github.com/spin83/multi-monitors-add-on/tree/gnome-3-16_3-18) contains extension for GNOME 3.16 and 3.18 12 | - Branch [gnome-3-14](https://github.com/spin83/multi-monitors-add-on/tree/gnome-3-14) contains extension for GNOME 3.14 13 | - Branch [gnome-3-10](https://github.com/spin83/multi-monitors-add-on/tree/gnome-3-10) contains extension for GNOME 3.10 14 | 15 | # Installation from git 16 | 17 | ```sh 18 | # clone repo 19 | git clone git@github.com:lazanet/multi-monitors-add-on.git 20 | # cd into cloned repo 21 | cd multi-monitors-add-on 22 | # create a local shared gnome shell extensions dir 23 | mkdir -p ~/.local/share/gnome-shell/extensions 24 | # create a symbolic link in the extensions dir to this extension 25 | ln -sr multi-monitors-add-on@spin83 ~/.local/share/gnome-shell/extensions 26 | ``` 27 | 28 | Restart the shell and then enable the extension. 29 | 30 | # License 31 | 32 | Multi Monitors Add-On extension is distributed under the terms of the 33 | GNU General Public License, version 2 or later. See the LICENSE file for details. 34 | -------------------------------------------------------------------------------- /debug.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | export G_MESSAGES_DEBUG=all 5 | export SHELL_DEBUG=all 6 | export MUTTER_DEBUG_DUMMY_MODE_SPECS=1366x768 7 | export MUTTER_DEBUG_NUM_DUMMY_MONITORS=2 8 | dbus-run-session -- gnome-shell --nested --wayland 2>&1 >&- 9 | -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/extension.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2014 spin83 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, visit https://www.gnu.org/licenses/. 16 | */ 17 | 18 | import * as Main from 'resource:///org/gnome/shell/ui/main.js'; 19 | import { Extension, gettext as _ } from 'resource:///org/gnome/shell/extensions/extension.js'; 20 | 21 | import * as MMLayout from './mmlayout.js' 22 | import * as MMIndicator from './indicator.js' 23 | 24 | const SHOW_INDICATOR_ID = 'show-indicator'; 25 | 26 | export default class MultiMonitorsAddOn extends Extension { 27 | 28 | constructor(metadata) { 29 | super(metadata); 30 | this._settings = this.getSettings(); 31 | 32 | this.mmIndicator = null; 33 | this.mmLayoutManager = null; 34 | } 35 | 36 | _toggleIndicator() { 37 | if (this._settings.get_boolean(SHOW_INDICATOR_ID)) 38 | this._showIndicator(); 39 | else 40 | this._hideIndicator(); 41 | } 42 | 43 | _showIndicator() { 44 | if (this.mmIndicator) 45 | return; 46 | this.mmIndicator = Main.panel.addToStatusArea('MultiMonitorsAddOn', new MMIndicator.MultiMonitorsIndicator()); 47 | } 48 | 49 | _hideIndicator() { 50 | if (!this.mmIndicator) 51 | return 52 | this.mmIndicator.destroy(); 53 | this.mmIndicator = null; 54 | } 55 | 56 | enable() { 57 | console.log(`Enabling ${this.metadata.name}`) 58 | 59 | if (Main.panel.statusArea.MultiMonitorsAddOn) 60 | disable(); 61 | 62 | this._toggleIndicatorId = this._settings.connect('changed::' + SHOW_INDICATOR_ID, this._toggleIndicator.bind(this)); 63 | this._toggleIndicator(); 64 | 65 | this.mmLayoutManager = new MMLayout.MultiMonitorsLayoutManager(); 66 | this._showPanelId = this._settings.connect('changed::' + MMLayout.SHOW_PANEL_ID, this.mmLayoutManager.showPanel.bind(this.mmLayoutManager)); 67 | this.mmLayoutManager.showPanel(); 68 | } 69 | 70 | disable() { 71 | this._settings.disconnect(this._showPanelId); 72 | this._settings.disconnect(this._toggleIndicatorId); 73 | this._hideIndicator(); 74 | 75 | this.mmLayoutManager.hidePanel(); 76 | this.mmLayoutManager = null; 77 | 78 | console.log(`Disabled ${this.metadata.name} ...`) 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/globals.js: -------------------------------------------------------------------------------- 1 | import GObject from 'gi://GObject'; 2 | import { Extension } from 'resource:///org/gnome/shell/extensions/extension.js'; 3 | 4 | export var g = { 5 | mmPanel: [] 6 | } 7 | 8 | export function currentExtension() { 9 | return Extension.lookupByUUID("multi-monitors-add-on@spin83"); 10 | } 11 | 12 | export function unhideClass(classId) { 13 | let tmp = GObject.Object.new(GObject.type_from_name(classId)); 14 | return tmp; 15 | } 16 | 17 | export function copyClass(s, d) { 18 | if (!s) { 19 | console.error(`copyClass s undefined for d ${d.name}`) 20 | return 21 | //throw Error(`copyClass s undefined for d ${d.name}`) 22 | } 23 | 24 | let prototype = s.prototype ? s.prototype : Object.getPrototypeOf(s); 25 | let propertyNames = Reflect.ownKeys(prototype); 26 | 27 | for (let pName of propertyNames.values()) { 28 | if (typeof pName === "symbol") continue; 29 | if (d.prototype.hasOwnProperty(pName)) continue; 30 | if (pName === "prototype") continue; 31 | if (pName === "constructor") continue; 32 | let pDesc = Reflect.getOwnPropertyDescriptor(prototype, pName); 33 | if (typeof pDesc !== 'object') continue; 34 | Reflect.defineProperty(d.prototype, pName, pDesc); 35 | } 36 | }; 37 | -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/icons/multi-monitors-l-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 22 | 24 | image/svg+xml 25 | 27 | Gnome Symbolic Icon Theme 28 | 29 | 30 | 31 | 64 | 75 | 79 | 80 | Gnome Symbolic Icon Theme 82 | 84 | 87 | 91 | 92 | 99 | 105 | 106 | 113 | 116 | 119 | 124 | 129 | 130 | 135 | 140 | 141 | 142 | 149 | 152 | 157 | 162 | 167 | 175 | 183 | 189 | 195 | 196 | 197 | 204 | 210 | 211 | 218 | 224 | 225 | 232 | 238 | 239 | 246 | 249 | 254 | 259 | 264 | 269 | 274 | 279 | 280 | 281 | 288 | 294 | 295 | 302 | 308 | 309 | 310 | 316 | 321 | 327 | 329 | 334 | 340 | 346 | 347 | 348 | 353 | 358 | 363 | 368 | 374 | 380 | 386 | 392 | 393 | -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/icons/multi-monitors-r-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 22 | 24 | image/svg+xml 25 | 27 | Gnome Symbolic Icon Theme 28 | 29 | 30 | 31 | 64 | 75 | 79 | 80 | Gnome Symbolic Icon Theme 82 | 84 | 87 | 91 | 92 | 99 | 105 | 106 | 113 | 116 | 119 | 124 | 129 | 130 | 135 | 140 | 141 | 142 | 149 | 152 | 157 | 162 | 167 | 175 | 183 | 189 | 195 | 196 | 197 | 204 | 210 | 211 | 218 | 224 | 225 | 232 | 238 | 239 | 246 | 249 | 254 | 259 | 264 | 269 | 274 | 279 | 280 | 281 | 288 | 294 | 295 | 302 | 308 | 309 | 310 | 316 | 321 | 327 | 330 | 335 | 341 | 347 | 348 | 349 | 354 | 359 | 364 | 369 | 375 | 381 | 387 | 393 | 394 | -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/indicator.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2014 spin83 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, visit https://www.gnu.org/licenses/. 16 | */ 17 | 18 | import St from 'gi://St'; 19 | import Gio from 'gi://Gio'; 20 | import GLib from 'gi://GLib'; 21 | import GObject from 'gi://GObject'; 22 | 23 | import * as Main from 'resource:///org/gnome/shell/ui/main.js'; 24 | import * as PanelMenu from 'resource:///org/gnome/shell/ui/panelMenu.js'; 25 | import { currentExtension } from './globals.js' 26 | 27 | import { gettext as _ } from 'resource:///org/gnome/shell/extensions/extension.js'; 28 | 29 | export var MultiMonitorsIndicator = (() => { 30 | let MultiMonitorsIndicator = class MultiMonitorsIndicator extends PanelMenu.Button { 31 | _init() { 32 | super._init(0.0, "MultiMonitorsAddOn", false); 33 | 34 | this.text = null; 35 | this._mmStatusIcon = new St.BoxLayout({ style_class: 'multimonitor-status-indicators-box' }); 36 | this._mmStatusIcon.hide(); 37 | this.add_child(this._mmStatusIcon); 38 | this._leftRightIcon = true; 39 | this.menu.addAction(_("Preferences"), this._onPreferences.bind(this)); 40 | this._viewMonitorsId = Main.layoutManager.connect('monitors-changed', this._viewMonitors.bind(this)); 41 | this._viewMonitors(); 42 | } 43 | 44 | _onDestroy() { 45 | Main.layoutManager.disconnect(this._viewMonitorsId); 46 | super._onDestroy(); 47 | } 48 | 49 | _syncIndicatorsVisible() { 50 | this._mmStatusIcon.visible = this._mmStatusIcon.get_children().some(a => a.visible); 51 | } 52 | 53 | _icon_name(icon, iconName) { 54 | icon.set_gicon(Gio.icon_new_for_string(currentExtension().path + "/icons/" + iconName + ".svg")); 55 | } 56 | 57 | _viewMonitors() { 58 | let monitors = this._mmStatusIcon.get_children(); 59 | 60 | let monitorChange = Main.layoutManager.monitors.length - monitors.length; 61 | if (monitorChange > 0) { 62 | console.log("Add Monitors ..."); 63 | for (let idx = 0; idx < monitorChange; idx++) { 64 | let icon; 65 | icon = new St.Icon({ style_class: 'system-status-icon multimonitor-status-icon' }); 66 | this._mmStatusIcon.add_child(icon); 67 | icon.connect('notify::visible', this._syncIndicatorsVisible.bind(this)); 68 | 69 | if (this._leftRightIcon) 70 | this._icon_name(icon, 'multi-monitors-l-symbolic'); 71 | else 72 | this._icon_name(icon, 'multi-monitors-r-symbolic'); 73 | this._leftRightIcon = !this._leftRightIcon; 74 | } 75 | this._syncIndicatorsVisible(); 76 | } 77 | else if (monitorChange < 0) { 78 | console.log("Remove Monitors ..."); 79 | monitorChange = -monitorChange; 80 | 81 | for (let idx = 0; idx < monitorChange; idx++) { 82 | let icon = this._mmStatusIcon.get_last_child(); 83 | this._mmStatusIcon.remove_child(icon); 84 | icon.destroy(); 85 | this._leftRightIcon = !this._leftRightIcon; 86 | } 87 | } 88 | } 89 | 90 | _onPreferences() { 91 | const uuid = "multi-monitors-add-on@spin83"; 92 | Gio.DBus.session.call( 93 | 'org.gnome.Shell.Extensions', 94 | '/org/gnome/Shell/Extensions', 95 | 'org.gnome.Shell.Extensions', 96 | 'OpenExtensionPrefs', 97 | new GLib.Variant('(ssa{sv})', [uuid, '', {}]), 98 | null, 99 | Gio.DBusCallFlags.NONE, 100 | -1, 101 | null); 102 | } 103 | }; 104 | return GObject.registerClass(MultiMonitorsIndicator); 105 | })(); 106 | -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/locale/de/LC_MESSAGES/multi-monitors-add-on.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazanet/multi-monitors-add-on/67af601899ebc52562e42b34037f0b0967f89acd/multi-monitors-add-on@spin83/locale/de/LC_MESSAGES/multi-monitors-add-on.mo -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/locale/de/LC_MESSAGES/multi-monitors-add-on.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: Multi Monitors Add On Gnome Shell Extension\n" 9 | "Report-Msgid-Bugs-To: https://github.com/spin83/multi-monitors-add-on/" 10 | "issues\n" 11 | "POT-Creation-Date: 2019-10-04 04:44-0300\n" 12 | "PO-Revision-Date: 2015-01-23 22:30+0100\n" 13 | "Last-Translator: Jonatan Zeidler \n" 14 | "Language-Team: German \n" 15 | "Language: de\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "X-Generator: Poedit 1.5.4\n" 20 | "X-Poedit-SourceCharset: UTF-8\n" 21 | 22 | #: indicator.js:46 23 | msgid "Preferences" 24 | msgstr "Einstellungen" 25 | 26 | #: indicator.js:115 27 | msgid "Multi Monitors Add-On" 28 | msgstr "Multimonitor-Erweiterung" 29 | 30 | #: mmoverview.js:642 31 | msgid "Overview" 32 | msgstr "" 33 | 34 | #. Translators: If there is no suitable word for "Activities" 35 | #. in your language, you can use the word for "Overview". 36 | #: mmpanel.js:333 37 | msgid "Activities" 38 | msgstr "" 39 | 40 | #: mmpanel.js:414 41 | msgid "Top Bar" 42 | msgstr "" 43 | 44 | #: prefs.js:62 45 | msgid "Show Multi Monitors indicator on Top Panel." 46 | msgstr "Multimonitor-Indikator in der oberen Leiste anzeigen" 47 | 48 | #: prefs.js:63 49 | msgid "Show Panel on additional monitors." 50 | msgstr "Leiste auf zusätzlichen Monitoren anzeigen" 51 | 52 | #: prefs.js:64 53 | msgid "Show Thumbnails-Slider on additional monitors." 54 | msgstr "Arbeitsflächenübersicht auf zusätzlichen Monitoren anzeigen" 55 | 56 | #: prefs.js:65 57 | msgid "Show Activities-Button on additional monitors." 58 | msgstr "Aktivitäten-Schaltfläche auf zusätzlichen Monitoren anzeigen" 59 | 60 | #: prefs.js:66 61 | msgid "Show AppMenu-Button on additional monitors." 62 | msgstr "Anwendungsmenü auf zusätzlichen Monitoren anzeigen" 63 | 64 | #: prefs.js:67 65 | msgid "Show DateTime-Button on additional monitors." 66 | msgstr "Datum-Zeit auf zusätzlichen Monitoren anzeigen." 67 | 68 | #: prefs.js:71 69 | msgid "Enable hot corners." 70 | msgstr "" 71 | 72 | #: prefs.js:77 73 | msgid "A list of indicators for transfer to additional monitors." 74 | msgstr "" 75 | "Eine Liste von Indikatoren, die auf die zusätzlichen Monitore verschoben " 76 | "werden sollen" 77 | 78 | #: prefs.js:124 79 | msgid "Select indicator" 80 | msgstr "Indikator auswählen" 81 | 82 | #: prefs.js:127 83 | msgid "Add" 84 | msgstr "Hinzufügen" 85 | 86 | #: prefs.js:141 87 | msgid "Indicators on Top Panel" 88 | msgstr "Indikatoren in der oberen Leiste" 89 | 90 | #: prefs.js:170 91 | msgid "Monitor index:" 92 | msgstr "Monitorindex:" 93 | 94 | #~ msgid "Test" 95 | #~ msgstr "Test" 96 | -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/locale/es/LC_MESSAGES/multi-monitors-add-on.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazanet/multi-monitors-add-on/67af601899ebc52562e42b34037f0b0967f89acd/multi-monitors-add-on@spin83/locale/es/LC_MESSAGES/multi-monitors-add-on.mo -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/locale/es/LC_MESSAGES/multi-monitors-add-on.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # Alonso Lara , 2017. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: PACKAGE VERSION\n" 9 | "Report-Msgid-Bugs-To: https://github.com/spin83/multi-monitors-add-on/" 10 | "issues\n" 11 | "POT-Creation-Date: 2019-10-04 04:44-0300\n" 12 | "PO-Revision-Date: 2017-03-04 23:59+0100\n" 13 | "Last-Translator: Alonso Lara \n" 14 | "Language-Team: Spanish \n" 15 | "Language: es\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #: indicator.js:46 21 | msgid "Preferences" 22 | msgstr "Preferencias" 23 | 24 | #: indicator.js:115 25 | msgid "Multi Monitors Add-On" 26 | msgstr "Accesorio de monitores múltiples" 27 | 28 | #: mmoverview.js:642 29 | msgid "Overview" 30 | msgstr "" 31 | 32 | #. Translators: If there is no suitable word for "Activities" 33 | #. in your language, you can use the word for "Overview". 34 | #: mmpanel.js:333 35 | msgid "Activities" 36 | msgstr "" 37 | 38 | #: mmpanel.js:414 39 | msgid "Top Bar" 40 | msgstr "" 41 | 42 | #: prefs.js:62 43 | msgid "Show Multi Monitors indicator on Top Panel." 44 | msgstr "Mostrar indicador de monitores múltiples en el panel." 45 | 46 | #: prefs.js:63 47 | msgid "Show Panel on additional monitors." 48 | msgstr "Mostrar el panel en monitores adicionales." 49 | 50 | #: prefs.js:64 51 | msgid "Show Thumbnails-Slider on additional monitors." 52 | msgstr "Mostrar las miniaturas en los monitores adicionales." 53 | 54 | #: prefs.js:65 55 | msgid "Show Activities-Button on additional monitors." 56 | msgstr "Mostrar las actividades en los monitores adicionales." 57 | 58 | #: prefs.js:66 59 | msgid "Show AppMenu-Button on additional monitors." 60 | msgstr "Mostrar el menú de aplicaciones en los monitores adicionales." 61 | 62 | #: prefs.js:67 63 | msgid "Show DateTime-Button on additional monitors." 64 | msgstr "Mostrar la fecha en los monitores adicionales." 65 | 66 | #: prefs.js:71 67 | msgid "Enable hot corners." 68 | msgstr "" 69 | 70 | #: prefs.js:77 71 | msgid "A list of indicators for transfer to additional monitors." 72 | msgstr "Un listado de indicadores para transferir a monitores adicionales." 73 | 74 | #: prefs.js:124 75 | msgid "Select indicator" 76 | msgstr "Seleccione indicador" 77 | 78 | #: prefs.js:127 79 | msgid "Add" 80 | msgstr "Añadir" 81 | 82 | #: prefs.js:141 83 | msgid "Indicators on Top Panel" 84 | msgstr "Indicadores en el panel" 85 | 86 | #: prefs.js:170 87 | msgid "Monitor index:" 88 | msgstr "Monitor número:" 89 | 90 | #~ msgid "Test" 91 | #~ msgstr "Prueba" 92 | -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/locale/fr/LC_MESSAGES/multi-monitors-add-on.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazanet/multi-monitors-add-on/67af601899ebc52562e42b34037f0b0967f89acd/multi-monitors-add-on@spin83/locale/fr/LC_MESSAGES/multi-monitors-add-on.mo -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/locale/fr/LC_MESSAGES/multi-monitors-add-on.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: Multi Monitors Add On Gnome Shell Extension\n" 9 | "Report-Msgid-Bugs-To: https://github.com/spin83/multi-monitors-add-on/" 10 | "issues\n" 11 | "POT-Creation-Date: 2019-10-04 04:44-0300\n" 12 | "PO-Revision-Date: 2015-12-26 22:30+0100\n" 13 | "Last-Translator: Quentin Daem\n" 14 | "Language-Team: Language: fr_FR\n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "X-Generator: Poedit 1.5.4\n" 20 | "X-Poedit-SourceCharset: UTF-8\n" 21 | 22 | #: indicator.js:46 23 | msgid "Preferences" 24 | msgstr "Préférences" 25 | 26 | #: indicator.js:115 27 | msgid "Multi Monitors Add-On" 28 | msgstr "Multi Moniteurs Add-On" 29 | 30 | #: mmoverview.js:642 31 | msgid "Overview" 32 | msgstr "" 33 | 34 | #. Translators: If there is no suitable word for "Activities" 35 | #. in your language, you can use the word for "Overview". 36 | #: mmpanel.js:333 37 | msgid "Activities" 38 | msgstr "" 39 | 40 | #: mmpanel.js:414 41 | msgid "Top Bar" 42 | msgstr "" 43 | 44 | #: prefs.js:62 45 | msgid "Show Multi Monitors indicator on Top Panel." 46 | msgstr "Afficher l'icone Multi Moniteurs sur la barre du haut" 47 | 48 | #: prefs.js:63 49 | msgid "Show Panel on additional monitors." 50 | msgstr "Afficher Menu sur les moniteurs secondaires" 51 | 52 | #: prefs.js:64 53 | msgid "Show Thumbnails-Slider on additional monitors." 54 | msgstr "" 55 | "Afficher le dock listant les espaces de travail sur les moniteurs secondaires" 56 | 57 | #: prefs.js:65 58 | msgid "Show Activities-Button on additional monitors." 59 | msgstr "Afficher le bouton Activités sur les moniteurs secondaires" 60 | 61 | #: prefs.js:66 62 | msgid "Show AppMenu-Button on additional monitors." 63 | msgstr "Afficher le bouton du menu Applications sur les moniteurs secondaires" 64 | 65 | #: prefs.js:67 66 | msgid "Show DateTime-Button on additional monitors." 67 | msgstr "Afficher le bouton Date-Heure sur les moniteurs secondaires." 68 | 69 | #: prefs.js:71 70 | msgid "Enable hot corners." 71 | msgstr "" 72 | 73 | #: prefs.js:77 74 | msgid "A list of indicators for transfer to additional monitors." 75 | msgstr "Une liste d'indicateurs pour transfert vers les moniteurs secondaires " 76 | 77 | #: prefs.js:124 78 | msgid "Select indicator" 79 | msgstr "Selectionner indicateur" 80 | 81 | #: prefs.js:127 82 | msgid "Add" 83 | msgstr "Ajouter" 84 | 85 | #: prefs.js:141 86 | msgid "Indicators on Top Panel" 87 | msgstr "Indicateur dans le panneau du haut" 88 | 89 | #: prefs.js:170 90 | msgid "Monitor index:" 91 | msgstr "Index moniteur:" 92 | 93 | #~ msgid "Test" 94 | #~ msgstr "Test" 95 | -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/locale/it/LC_MESSAGES/multi-monitors-add-on.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazanet/multi-monitors-add-on/67af601899ebc52562e42b34037f0b0967f89acd/multi-monitors-add-on@spin83/locale/it/LC_MESSAGES/multi-monitors-add-on.mo -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/locale/it/LC_MESSAGES/multi-monitors-add-on.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: Multi Monitors Add On Gnome Shell Extension\n" 9 | "Report-Msgid-Bugs-To: https://github.com/spin83/multi-monitors-add-on/" 10 | "issues\n" 11 | "POT-Creation-Date: 2019-10-04 04:44-0300\n" 12 | "PO-Revision-Date: 2019-10-21 14:53+0200\n" 13 | "Last-Translator: Luca Bandini (@Vombato) \n" 14 | "Language-Team: ItalianLanguage: it\n" 15 | "Language: it\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "X-Generator: Poedit 2.2.4\n" 20 | "X-Poedit-SourceCharset: UTF-8\n" 21 | 22 | #: indicator.js:46 23 | msgid "Preferences" 24 | msgstr "Preferenze" 25 | 26 | #: indicator.js:115 27 | msgid "Multi Monitors Add-On" 28 | msgstr "Componente aggiuntivo per più monitor" 29 | 30 | #: mmoverview.js:642 31 | msgid "Overview" 32 | msgstr "Panoramica" 33 | 34 | #. Translators: If there is no suitable word for "Activities" 35 | #. in your language, you can use the word for "Overview". 36 | #: mmpanel.js:333 37 | msgid "Activities" 38 | msgstr "Attività" 39 | 40 | #: mmpanel.js:414 41 | msgid "Top Bar" 42 | msgstr "Barra Superiore" 43 | 44 | #: prefs.js:62 45 | msgid "Show Multi Monitors indicator on Top Panel." 46 | msgstr "Mostra l'icona Multi Monitor sul pannello superiore." 47 | 48 | #: prefs.js:63 49 | msgid "Show Panel on additional monitors." 50 | msgstr "Mostra Menu su monitor secondari." 51 | 52 | #: prefs.js:64 53 | msgid "Show Thumbnails-Slider on additional monitors." 54 | msgstr "Visualizza le aree di lavoro sui monitor secondari." 55 | 56 | #: prefs.js:65 57 | msgid "Show Activities-Button on additional monitors." 58 | msgstr "Mostra il Bottone Attività sui monitor secondari." 59 | 60 | #: prefs.js:66 61 | msgid "Show AppMenu-Button on additional monitors." 62 | msgstr "Visualizza il pulsante del menu Applicazioni sui monitor secondari." 63 | 64 | #: prefs.js:67 65 | msgid "Show DateTime-Button on additional monitors." 66 | msgstr "Mostra il Bottone Data/Ora sui monitor secondari." 67 | 68 | #: prefs.js:71 69 | msgid "Enable hot corners." 70 | msgstr "" 71 | 72 | #: prefs.js:77 73 | msgid "A list of indicators for transfer to additional monitors." 74 | msgstr "Un elenco di indicatori per il trasferimento a monitor secondari." 75 | 76 | #: prefs.js:124 77 | msgid "Select indicator" 78 | msgstr "Seleziona indicatore" 79 | 80 | #: prefs.js:127 81 | msgid "Add" 82 | msgstr "Aggiungere" 83 | 84 | #: prefs.js:141 85 | msgid "Indicators on Top Panel" 86 | msgstr "Indicatore nel pannello superiore" 87 | 88 | #: prefs.js:170 89 | msgid "Monitor index:" 90 | msgstr "Indice monitor:" 91 | 92 | #~ msgid "Test" 93 | #~ msgstr "Test" 94 | -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/locale/pl/LC_MESSAGES/multi-monitors-add-on.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazanet/multi-monitors-add-on/67af601899ebc52562e42b34037f0b0967f89acd/multi-monitors-add-on@spin83/locale/pl/LC_MESSAGES/multi-monitors-add-on.mo -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/locale/pl/LC_MESSAGES/multi-monitors-add-on.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: \n" 9 | "Report-Msgid-Bugs-To: https://github.com/spin83/multi-monitors-add-on/" 10 | "issues\n" 11 | "POT-Creation-Date: 2019-10-04 04:44-0300\n" 12 | "PO-Revision-Date: 2016-12-29 14:25+0100\n" 13 | "Last-Translator: \n" 14 | "Language-Team: \n" 15 | "Language: pl_PL\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "X-Generator: Poedit 1.8.11\n" 20 | "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " 21 | "|| n%100>=20) ? 1 : 2);\n" 22 | 23 | #: indicator.js:46 24 | msgid "Preferences" 25 | msgstr "Ustawienia" 26 | 27 | #: indicator.js:115 28 | msgid "Multi Monitors Add-On" 29 | msgstr "Multi Monitors Add-On" 30 | 31 | #: mmoverview.js:642 32 | msgid "Overview" 33 | msgstr "" 34 | 35 | #. Translators: If there is no suitable word for "Activities" 36 | #. in your language, you can use the word for "Overview". 37 | #: mmpanel.js:333 38 | msgid "Activities" 39 | msgstr "" 40 | 41 | #: mmpanel.js:414 42 | msgid "Top Bar" 43 | msgstr "" 44 | 45 | #: prefs.js:62 46 | msgid "Show Multi Monitors indicator on Top Panel." 47 | msgstr "Wyświetl wskaźnik rozszerzenia na głównym pasku." 48 | 49 | #: prefs.js:63 50 | msgid "Show Panel on additional monitors." 51 | msgstr "Wyświetl główny pasek na dodatkowych monitorach." 52 | 53 | #: prefs.js:64 54 | msgid "Show Thumbnails-Slider on additional monitors." 55 | msgstr "Wyświetl pasek miniatur na dodatkowych monitorach." 56 | 57 | #: prefs.js:65 58 | msgid "Show Activities-Button on additional monitors." 59 | msgstr "Wyświetl przycisk podglądu na dodatkowych monitorach." 60 | 61 | #: prefs.js:66 62 | msgid "Show AppMenu-Button on additional monitors." 63 | msgstr "Wyświetl przycisk aplikacji na dodatkowych monitorach." 64 | 65 | #: prefs.js:67 66 | msgid "Show DateTime-Button on additional monitors." 67 | msgstr "Wyświetl przycisk daty i czasu na dodatkowych monitorach." 68 | 69 | #: prefs.js:71 70 | msgid "Enable hot corners." 71 | msgstr "Włączenie podglądu po najechaniu rogu ekranu." 72 | 73 | #: prefs.js:77 74 | msgid "A list of indicators for transfer to additional monitors." 75 | msgstr "Lista wskaźników do przesunięcia na dodatkowe monitory." 76 | 77 | #: prefs.js:124 78 | msgid "Select indicator" 79 | msgstr "Wybierz wskaźnik" 80 | 81 | #: prefs.js:127 82 | msgid "Add" 83 | msgstr "Dodaj" 84 | 85 | #: prefs.js:141 86 | msgid "Indicators on Top Panel" 87 | msgstr "Wskaźniki na głównym panelu" 88 | 89 | #: prefs.js:170 90 | msgid "Monitor index:" 91 | msgstr "Indeks monitora:" 92 | 93 | #~ msgid "Test" 94 | #~ msgstr "Test" 95 | -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/locale/pt_BR/LC_MESSAGES/multi-monitors-add-on.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazanet/multi-monitors-add-on/67af601899ebc52562e42b34037f0b0967f89acd/multi-monitors-add-on@spin83/locale/pt_BR/LC_MESSAGES/multi-monitors-add-on.mo -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/locale/pt_BR/LC_MESSAGES/multi-monitors-add-on.po: -------------------------------------------------------------------------------- 1 | # Brazilian Portuguese translation for multi-monitors-add-on 2 | # Copyright (C) 2019 THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the multi-monitors-add-on package. 4 | # Rafael Fontenelle , 2019. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: Multi Monitors Add On Gnome Shell Extension\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2015-01-23 22:29+0100\n" 11 | "PO-Revision-Date: 2019-10-03 06:49-0300\n" 12 | "Last-Translator: Rafael Fontenelle \n" 13 | "Language-Team: Brazilian Portuguese \n" 14 | "Language: pt_BR\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=2; plural=(n > 1)\n" 19 | "X-Generator: Gtranslator 3.32.0\n" 20 | "X-Project-Style: gnome\n" 21 | 22 | #: prefs.js:61 23 | msgid "Show Multi Monitors indicator on Top Panel." 24 | msgstr "Mostrar o indicador do Multi Monitors no painel superior" 25 | 26 | #: prefs.js:62 27 | msgid "Show Panel on additional monitors." 28 | msgstr "Mostrar o painel em monitores adicionais" 29 | 30 | #: prefs.js:63 31 | msgid "Show Thumbnails-Slider on additional monitors." 32 | msgstr "Mostrar controle deslizante de miniaturas em monitores adicionais" 33 | 34 | #: prefs.js:64 35 | msgid "Show Activities-Button on additional monitors." 36 | msgstr "Mostrar botão de Atividades em monitores adicionais" 37 | 38 | #: prefs.js:65 39 | msgid "Show AppMenu-Button on additional monitors." 40 | msgstr "Mostrar botão de menu de aplicativos em monitores adicionais" 41 | 42 | #: prefs.js:67 43 | msgid "Show DateTime-Button on additional monitors." 44 | msgstr "Mostrar o botão de data e hora em monitores adicionais" 45 | 46 | #: prefs.js:75 47 | msgid "A list of indicators for transfer to additional monitors." 48 | msgstr "Uma lista de indicadores para transferir para monitores adicionais." 49 | 50 | #: prefs.js:71 51 | msgid "Enable hot corners." 52 | msgstr "" 53 | 54 | #: prefs.js:122 55 | msgid "Select indicator" 56 | msgstr "Selecionar indicador" 57 | 58 | #: prefs.js:125 59 | msgid "Add" 60 | msgstr "Adicionar" 61 | 62 | #: prefs.js:139 63 | msgid "Indicators on Top Panel" 64 | msgstr "Indicadores no painel superior" 65 | 66 | #: prefs.js:168 67 | msgid "Monitor index:" 68 | msgstr "Índice do monitor:" 69 | 70 | #: indicator.js:106 71 | msgid "Preferences" 72 | msgstr "Preferências" 73 | 74 | #: indicator.js:107 75 | msgid "Test" 76 | msgstr "Testar" 77 | 78 | #: indicator.js:129 79 | msgid "Multi Monitors Add-On" 80 | msgstr "Multi Monitors Add-On" 81 | 82 | #~ msgid "Overview" 83 | #~ msgstr "Panorama" 84 | 85 | #~ msgid "Activities" 86 | #~ msgstr "Atividades" 87 | 88 | #~ msgid "Top Bar" 89 | #~ msgstr "Barra superior" 90 | -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "shell-version": ["45", "46"], 3 | "uuid": "multi-monitors-add-on@spin83", 4 | "name": "Multi Monitors Add-On", 5 | "settings-schema": "org.gnome.shell.extensions.multi-monitors-add-on", 6 | "gettext-domain": "multi-monitors-add-on", 7 | "description": "Add multiple monitors overview and panel for gnome-shell.", 8 | "url": "https://github.com/spin83/multi-monitors-add-on.git", 9 | "version": 27 10 | } 11 | -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/mmlayout.js: -------------------------------------------------------------------------------- 1 | /** 2 | * New node file 3 | */ 4 | 5 | import St from 'gi://St'; 6 | 7 | import * as Main from 'resource:///org/gnome/shell/ui/main.js'; 8 | import * as Layout from 'resource:///org/gnome/shell/ui/layout.js'; 9 | 10 | import * as MMPanel from './mmpanel.js' 11 | import { g, currentExtension } from './globals.js' 12 | var { mmPanel } = g 13 | 14 | var SHOW_PANEL_ID = 'show-panel'; 15 | var ENABLE_HOT_CORNERS = 'enable-hot-corners'; 16 | 17 | export const MultiMonitorsPanelBox = class MultiMonitorsPanelBox { 18 | constructor(monitor) { 19 | this.panelBox = new St.BoxLayout({ name: 'panelBox', vertical: true, clip_to_allocation: true }); 20 | Main.layoutManager.addChrome(this.panelBox, { affectsStruts: true, trackFullscreen: true }); 21 | this.panelBox.set_position(monitor.x, monitor.y); 22 | this.panelBox.set_size(monitor.width, -1); 23 | Main.uiGroup.set_child_below_sibling(this.panelBox, Main.layoutManager.panelBox); 24 | } 25 | 26 | destroy() { 27 | this.panelBox.destroy(); 28 | } 29 | 30 | updatePanel(monitor) { 31 | this.panelBox.set_position(monitor.x, monitor.y); 32 | this.panelBox.set_size(monitor.width, -1); 33 | } 34 | }; 35 | 36 | export var MultiMonitorsLayoutManager = class MultiMonitorsLayoutManager { 37 | constructor() { 38 | this._settings = currentExtension().getSettings(); 39 | this._desktopSettings = currentExtension().getSettings("org.gnome.desktop.interface"); 40 | 41 | mmPanel = []; 42 | 43 | this._monitorIds = []; 44 | this.mmPanelBox = []; 45 | 46 | this._monitorsChangedId = null; 47 | 48 | this._layoutManager_updateHotCorners = null; 49 | this._changedEnableHotCornersId = null; 50 | } 51 | 52 | showPanel() { 53 | if (this._settings.get_boolean(SHOW_PANEL_ID)) { 54 | if (!this._monitorsChangedId) { 55 | this._monitorsChangedId = Main.layoutManager.connect('monitors-changed', this._monitorsChanged.bind(this)); 56 | this._monitorsChanged(); 57 | } 58 | 59 | if (!this._layoutManager_updateHotCorners) { 60 | this._layoutManager_updateHotCorners = Main.layoutManager._updateHotCorners; 61 | 62 | const _this = this; 63 | Main.layoutManager._updateHotCorners = function () { 64 | this.hotCorners.forEach((corner) => { 65 | if (corner) 66 | corner.destroy(); 67 | }); 68 | this.hotCorners = []; 69 | 70 | if (!_this._desktopSettings.get_boolean(ENABLE_HOT_CORNERS)) { 71 | this.emit('hot-corners-changed'); 72 | return; 73 | } 74 | 75 | let size = this.panelBox.height; 76 | 77 | for (let i = 0; i < this.monitors.length; i++) { 78 | let monitor = this.monitors[i]; 79 | let cornerX = this._rtl ? monitor.x + monitor.width : monitor.x; 80 | let cornerY = monitor.y; 81 | 82 | let corner = new Layout.HotCorner(this, monitor, cornerX, cornerY); 83 | corner.setBarrierSize(size); 84 | this.hotCorners.push(corner); 85 | } 86 | 87 | this.emit('hot-corners-changed'); 88 | }; 89 | 90 | if (!this._changedEnableHotCornersId) { 91 | this._changedEnableHotCornersId = this._desktopSettings.connect('changed::' + ENABLE_HOT_CORNERS, 92 | Main.layoutManager._updateHotCorners.bind(Main.layoutManager)); 93 | } 94 | 95 | Main.layoutManager._updateHotCorners(); 96 | } 97 | } 98 | else { 99 | this.hidePanel(); 100 | } 101 | } 102 | 103 | hidePanel() { 104 | if (this._changedEnableHotCornersId) { 105 | global.settings.disconnect(this._changedEnableHotCornersId); 106 | this._changedEnableHotCornersId = null; 107 | } 108 | 109 | if (this._layoutManager_updateHotCorners) { 110 | Main.layoutManager['_updateHotCorners'] = this._layoutManager_updateHotCorners; 111 | this._layoutManager_updateHotCorners = null; 112 | Main.layoutManager._updateHotCorners(); 113 | } 114 | 115 | if (this._monitorsChangedId) { 116 | Main.layoutManager.disconnect(this._monitorsChangedId); 117 | this._monitorsChangedId = null; 118 | } 119 | 120 | let panels2remove = this._monitorIds.length; 121 | for (let i = 0; i < panels2remove; i++) { 122 | let monitorId = this._monitorIds.pop(); 123 | this._popPanel(); 124 | console.log("remove: " + monitorId); 125 | } 126 | } 127 | 128 | _monitorsChanged() { 129 | let monitorChange = Main.layoutManager.monitors.length - this._monitorIds.length - 1; 130 | if (monitorChange < 0) { 131 | for (let idx = 0; idx < -monitorChange; idx++) { 132 | let monitorId = this._monitorIds.pop(); 133 | this._popPanel(); 134 | console.log("remove: " + monitorId); 135 | } 136 | } 137 | 138 | let j = 0; 139 | for (let i = 0; i < Main.layoutManager.monitors.length; i++) { 140 | if (i != Main.layoutManager.primaryIndex) { 141 | let monitor = Main.layoutManager.monitors[i]; 142 | let monitorId = "i" + i + "x" + monitor.x + "y" + monitor.y + "w" + monitor.width + "h" + monitor.height; 143 | if (monitorChange > 0 && j == this._monitorIds.length) { 144 | this._monitorIds.push(monitorId); 145 | this._pushPanel(i, monitor); 146 | console.log("new: " + monitorId); 147 | } 148 | else if (this._monitorIds[j] > monitorId || this._monitorIds[j] < monitorId) { 149 | let oldMonitorId = this._monitorIds[j]; 150 | this._monitorIds[j] = monitorId; 151 | this.mmPanelBox[j].updatePanel(monitor); 152 | console.log("update: " + oldMonitorId + ">" + monitorId); 153 | } 154 | j++; 155 | } 156 | } 157 | } 158 | 159 | _pushPanel(i, monitor) { 160 | let mmPanelBox = new MultiMonitorsPanelBox(monitor); 161 | let panel = new MMPanel.MultiMonitorsPanel(i, mmPanelBox); 162 | 163 | mmPanel.push(panel); 164 | this.mmPanelBox.push(mmPanelBox); 165 | } 166 | 167 | _popPanel() { 168 | mmPanel.pop(); 169 | let mmPanelBox = this.mmPanelBox.pop(); 170 | mmPanelBox.destroy(); 171 | } 172 | }; 173 | -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/mmpanel.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2014 spin83 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, visit https://www.gnu.org/licenses/. 16 | */ 17 | import GObject from 'gi://GObject'; 18 | 19 | import * as Main from 'resource:///org/gnome/shell/ui/main.js'; 20 | import * as Panel from 'resource:///org/gnome/shell/ui/panel.js'; 21 | 22 | function getMainIndicators() { 23 | let ret = {} 24 | Object.entries(Main.panel.statusArea) 25 | .forEach(([key, value]) => { 26 | if (true || (key.startsWith("appindicator-") && ["IndicatorStatusTrayIcon", "IndicatorStatusIcon"].includes(value.constructor.name))) { 27 | ret[key] = value; 28 | } 29 | }) 30 | return ret; 31 | } 32 | 33 | export var MultiMonitorsPanel = (() => { 34 | let MultiMonitorsPanel = class MultiMonitorsPanel extends Panel.Panel { 35 | _init(monitorIndex, mmPanelBox) { 36 | super._init(); 37 | Main.layoutManager.panelBox.remove_child(this); 38 | mmPanelBox.panelBox.add_child(this); 39 | this.monitorIndex = monitorIndex; 40 | this.connect('destroy', this._onDestroy.bind(this)); 41 | // this._syncIndicators() 42 | } 43 | 44 | _syncIndicators() { 45 | // WIP! 46 | Object.entries(getMainIndicators()).forEach(([key, value]) => { 47 | try { 48 | this.addToStatusArea(key, value, 1); 49 | } catch (e) { 50 | console.warn("Skipping role: " + key); 51 | } 52 | }) 53 | } 54 | 55 | _onDestroy() { 56 | Main.ctrlAltTabManager.removeGroup(this); 57 | } 58 | 59 | vfunc_get_preferred_width(_forHeight) { 60 | if (Main.layoutManager.monitors.length > this.monitorIndex) 61 | return [0, Main.layoutManager.monitors[this.monitorIndex].width]; 62 | 63 | return [0, 0]; 64 | } 65 | 66 | }; 67 | return GObject.registerClass(MultiMonitorsPanel); 68 | })(); 69 | -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/multi-monitors-add-on.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the multi-monitors-add-on package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: multi-monitors-add-on\n" 10 | "Report-Msgid-Bugs-To: https://github.com/spin83/multi-monitors-add-on/" 11 | "issues\n" 12 | "POT-Creation-Date: 2019-10-04 04:44-0300\n" 13 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 | "Last-Translator: FULL NAME \n" 15 | "Language-Team: LANGUAGE \n" 16 | "Language: \n" 17 | "MIME-Version: 1.0\n" 18 | "Content-Type: text/plain; charset=CHARSET\n" 19 | "Content-Transfer-Encoding: 8bit\n" 20 | 21 | #: indicator.js:46 22 | msgid "Preferences" 23 | msgstr "" 24 | 25 | #: indicator.js:115 26 | msgid "Multi Monitors Add-On" 27 | msgstr "" 28 | 29 | #: mmoverview.js:642 30 | msgid "Overview" 31 | msgstr "" 32 | 33 | #. Translators: If there is no suitable word for "Activities" 34 | #. in your language, you can use the word for "Overview". 35 | #: mmpanel.js:333 36 | msgid "Activities" 37 | msgstr "" 38 | 39 | #: mmpanel.js:414 40 | msgid "Top Bar" 41 | msgstr "" 42 | 43 | #: prefs.js:62 44 | msgid "Show Multi Monitors indicator on Top Panel." 45 | msgstr "" 46 | 47 | #: prefs.js:63 48 | msgid "Show Panel on additional monitors." 49 | msgstr "" 50 | 51 | #: prefs.js:64 52 | msgid "Show Thumbnails-Slider on additional monitors." 53 | msgstr "" 54 | 55 | #: prefs.js:65 56 | msgid "Show Activities-Button on additional monitors." 57 | msgstr "" 58 | 59 | #: prefs.js:66 60 | msgid "Show AppMenu-Button on additional monitors." 61 | msgstr "" 62 | 63 | #: prefs.js:67 64 | msgid "Show DateTime-Button on additional monitors." 65 | msgstr "" 66 | 67 | #: prefs.js:68 68 | msgid "Show Thumbnails-Slider on left side of additional monitors." 69 | msgstr "" 70 | 71 | #: prefs.js:77 72 | msgid "A list of indicators for transfer to additional monitors." 73 | msgstr "" 74 | 75 | #: prefs.js:124 76 | msgid "Select indicator" 77 | msgstr "" 78 | 79 | #: prefs.js:127 80 | msgid "Add" 81 | msgstr "" 82 | 83 | #: prefs.js:141 84 | msgid "Indicators on Top Panel" 85 | msgstr "" 86 | 87 | #: prefs.js:170 88 | msgid "Monitor index:" 89 | msgstr "" 90 | -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/prefs.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2014 spin83 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, visit https://www.gnu.org/licenses/. 16 | */ 17 | 18 | import Adw from 'gi://Adw'; 19 | import GObject from 'gi://GObject'; 20 | import Gdk from 'gi://Gdk'; 21 | import Gtk from 'gi://Gtk'; 22 | import Gio from 'gi://Gio'; 23 | 24 | import { ExtensionPreferences, gettext as _ } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; 25 | 26 | export const SHOW_INDICATOR_ID = 'show-indicator'; 27 | export const SHOW_PANEL_ID = 'show-panel'; 28 | export const SHOW_ACTIVITIES_ID = 'show-activities'; 29 | export const ENABLE_HOT_CORNERS = 'enable-hot-corners'; 30 | 31 | export var MultiMonitorsPrefsWidget = GObject.registerClass( 32 | class MultiMonitorsPrefsWidget extends Gtk.Grid { 33 | _init(p) { 34 | super._init({ 35 | margin_top: 6, margin_end: 6, margin_bottom: 6, margin_start: 6 36 | }); 37 | 38 | this._numRows = 0; 39 | 40 | this.set_orientation(Gtk.Orientation.VERTICAL); 41 | 42 | this._settings = p.getSettings(); 43 | this._desktopSettings = p.getSettings("org.gnome.desktop.interface"); 44 | 45 | this._display = Gdk.Display.get_default(); 46 | this._monitors = this._display.get_monitors() 47 | 48 | this._addBooleanSwitch(_('Show Multi Monitors indicator on Top Panel.'), SHOW_INDICATOR_ID); 49 | this._addBooleanSwitch(_('Show Panel on additional monitors.'), SHOW_PANEL_ID); 50 | 51 | this._addSettingsBooleanSwitch(_('Enable hot corners.'), this._desktopSettings, ENABLE_HOT_CORNERS); 52 | } 53 | 54 | add(child) { 55 | this.attach(child, 0, this._numRows++, 1, 1); 56 | } 57 | 58 | _addComboBoxSwitch(label, schema_id, options) { 59 | this._addSettingsComboBoxSwitch(label, this._settings, schema_id, options) 60 | } 61 | 62 | _addSettingsComboBoxSwitch(label, settings, schema_id, options) { 63 | let gHBox = new Gtk.Box({ 64 | orientation: Gtk.Orientation.HORIZONTAL, 65 | margin_top: 10, margin_end: 10, margin_bottom: 10, margin_start: 10, 66 | spacing: 20, hexpand: true 67 | }); 68 | let gLabel = new Gtk.Label({ label: _(label), halign: Gtk.Align.START }); 69 | gHBox.append(gLabel); 70 | 71 | let gCBox = new Gtk.ComboBoxText({ halign: Gtk.Align.END }); 72 | Object.entries(options).forEach(function (entry) { 73 | const [key, val] = entry; 74 | gCBox.append(key, val); 75 | }); 76 | gHBox.append(gCBox); 77 | 78 | this.add(gHBox); 79 | 80 | settings.bind(schema_id, gCBox, 'active-id', Gio.SettingsBindFlags.DEFAULT); 81 | } 82 | 83 | _addBooleanSwitch(label, schema_id) { 84 | this._addSettingsBooleanSwitch(label, this._settings, schema_id); 85 | } 86 | 87 | _addSettingsBooleanSwitch(label, settings, schema_id) { 88 | let gHBox = new Gtk.Box({ 89 | orientation: Gtk.Orientation.HORIZONTAL, 90 | margin_top: 10, margin_end: 10, margin_bottom: 10, margin_start: 10, 91 | spacing: 20, hexpand: true 92 | }); 93 | let gLabel = new Gtk.Label({ label: _(label), halign: Gtk.Align.START }); 94 | gHBox.append(gLabel); 95 | let gSwitch = new Gtk.Switch({ halign: Gtk.Align.END }); 96 | gHBox.append(gSwitch); 97 | this.add(gHBox); 98 | 99 | settings.bind(schema_id, gSwitch, 'active', Gio.SettingsBindFlags.DEFAULT); 100 | } 101 | }); 102 | 103 | export default class MultiMonitorsPreferences extends ExtensionPreferences { 104 | fillPreferencesWindow(window) { 105 | window._settings = this.getSettings(); 106 | 107 | let page = new Adw.PreferencesPage(); 108 | let group = new Adw.PreferencesGroup(); 109 | 110 | let widget = new MultiMonitorsPrefsWidget(this); 111 | group.add(widget); 112 | page.add(group); 113 | window.add(page); 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/schemas/gschemas.compiled: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazanet/multi-monitors-add-on/67af601899ebc52562e42b34037f0b0967f89acd/multi-monitors-add-on@spin83/schemas/gschemas.compiled -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/schemas/org.gnome.shell.extensions.multi-monitors-add-on.gschema.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | Show Multi Monitors indicator on Top Panel. 7 | Add or remove Multi Monitors indicator from Top Panel. 8 | 9 | 10 | 11 | true 12 | Show Panel on additional monitors. 13 | Add or remove Panel from additional monitors. 14 | 15 | 16 | 17 | true 18 | Show Activities-Button on additional monitors. 19 | Change visibility of Activities-Button on additional monitors. 20 | 21 | 22 | 23 | true 24 | Show AppMenu-Button on additional monitors. 25 | Change visibility of AppMenu-Button on additional monitors. 26 | 27 | 28 | 29 | true 30 | Show DateTime-Button on additional monitors. 31 | Change visibility of DateTime-Button on additional monitors. 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 'auto' 42 | Show Thumbnails-Slider on additional monitors. 43 | Select position of Thumbnails-Slider on additional monitors. 44 | 45 | 46 | 47 | [] 48 | A list of available indicators. 49 | A list of indicators that are available for transfer. For internal use only. 50 | 51 | 52 | 53 | {} 54 | A list of indicators for transfer. 55 | A list of indicators selected for transfer to additional Panel. 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /multi-monitors-add-on@spin83/stylesheet.css: -------------------------------------------------------------------------------- 1 | 2 | .helloworld-label { 3 | font-size: 72px; 4 | font-weight: bold; 5 | color: #ffffff; 6 | background-color: rgba(0,0,0,0.5); 7 | border-radius: 5px; 8 | padding: .5em; 9 | } 10 | 11 | .multimonitor-spacer { 12 | height: 4em; 13 | } 14 | 15 | .multimonitor-status-indicators-box { 16 | spacing: 0px; 17 | } 18 | 19 | .multimonitor-status-icon { 20 | padding: 0 2px; 21 | } 22 | 23 | .workspace-thumbnails-left { 24 | border-radius: 0 9px 9px 0; 25 | } 26 | 27 | .workspace-thumbnails-left:rtl { 28 | border-radius: 9px 0 0 9px; 29 | } 30 | --------------------------------------------------------------------------------