diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-16 17:01:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-16 17:01:53 +0000 |
commit | 3cf8c4a1c4576ec9f32ed8d5c79c6af100af8541 (patch) | |
tree | 6f16bbb0673cb3b98158d222a7f99a8d45eda9c0 /extensions/46/middleclickclose | |
parent | Adding gnome-shell version 47 in 46/hibernate-status metadata.json. (diff) | |
download | gnome-shell-extensions-extra-3cf8c4a1c4576ec9f32ed8d5c79c6af100af8541.tar.xz gnome-shell-extensions-extra-3cf8c4a1c4576ec9f32ed8d5c79c6af100af8541.zip |
Updating 46/middleclickclose to version 31 [2bac2aa].
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'extensions/46/middleclickclose')
17 files changed, 382 insertions, 159 deletions
diff --git a/extensions/46/middleclickclose/README.md b/extensions/46/middleclickclose/README.md index bfb193b..adcf2f9 100644 --- a/extensions/46/middleclickclose/README.md +++ b/extensions/46/middleclickclose/README.md @@ -1,24 +1,34 @@ Quick Close in Overview -================ +----------------------- +GNOME shell extension for quickly closing apps in the overview. -Gnome shell extension for closing apps in overview with a middle (or other) click. +[![Download from extensions.gnome.org](img/ego.svg)](https://extensions.gnome.org/extension/352/middle-click-to-close-in-overview/) -All credit goes to Paolo Tranquilli (http://cs.unibo.it/~tranquil/en/hacking.html), I've merely -copied its code here to provide Gnome Shell 3.10+ compatibility +## Features -This extension is installable from -https://extensions.gnome.org/extension/352/middle-click-to-close-in-overview/. +- **Middle click to close**: Just hover over the app you want to close in the overview, and middle + click. The mouse button that will trigger closing can be adjusted in the settings. +- **`Alt+F4` in the overview**: When triggering the close action (typically `Alt+F4`), the focused + window will be closed. This can be turned off in the settings. +- **Adjustable rearrange delay**: After closing an application, GNOME will wait a bit before + rearranging the remaining windows. This extension allows configuring that delay. -Otherwise you may +## Building -* download a [zip](https://github.com/p91paul/middleclickclose/archive/master.zip) of this extension -* extract it -* run the following command - ``` - make install -``` -* reload gnome-shell (Alt-F2, r, Enter) -> on Wayland you need to log out and log in again, there is no in-place reload -* activate it through the Gnome Extensions application. +Make sure `gettext` is installed on your system and the `gnome-extensions` executable is available +on your `PATH` (It is typically bundled with `gnome-shell`). + +Afterwards, simply run `make` to build a zip suitable for submition to +[EGO](https://extensions.gnome.org/). + +`make install` can also be used to install the extension for the current user. + +## Debugging tips & tricks + +- `journalctl -f --user` is your friend. +- `make install && dbus-run-session -- gnome-shell --nested --wayland` allows for quick prototyping + without having to log out and back in every single time when running under wayland. +- `make install`, then `Alt+F2`, `r` and `Enter` allow for quick prototyping under X11. ## Translations @@ -26,4 +36,4 @@ If you're interested in contributing a translation, import the translation templ `src/po/template.pot` to your favourite po-editing software and create a `*.po` file under `src/po`. To update all existing translations after changing the code, run `make po`. To regenerate only the -`template.pot` file, run `make pot` +`template.pot` file, run `make pot`. diff --git a/extensions/46/middleclickclose/img/ego.svg b/extensions/46/middleclickclose/img/ego.svg new file mode 100644 index 0000000..ae750fa --- /dev/null +++ b/extensions/46/middleclickclose/img/ego.svg @@ -0,0 +1,22 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="200" height="60" viewBox="0 0 500 150"> + <title>Download From EGO</title> + <defs> + <linearGradient id="grad"> + <stop offset="0" stop-color="#003eaa" /> + <stop offset="1" stop-color="#0060df" /> + </linearGradient> + </defs> + <rect fill="url(#grad)" width="100%" height="100%" rx="15" /> + + <g fill="white"> + <path d="M 101.068,15 C 76.466,15 71.851,50.041 85.691,50.041 99.529,50.041 125.671,15 101.068,15 Z" /> + <path d="m 60.217,45.699 c 7.369,0.45 15.454,-28.122 1.604,-26.325 -13.845,1.797 -8.976,25.875 -1.604,26.325 z" /> + <path d="M 26.445,63.453 C 31.686,61.146 27.12,38.581 18.208,44.735 9.3,50.89 21.204,65.759 26.445,63.453 Z" /> + <path d="M 41.212,51.642 C 47.451,50.37 47.793,24.778 36.667,29.369 25.539,33.961 34.978,52.916 41.212,51.642 Z" /> + <path d="m 73.791,108.913 c 1.107,8.454 -6.202,12.629 -13.36,7.179 C 37.644,98.743 98.16,90.088 94.171,66.386 90.86,46.712 30.495,52.769 23.621,83.553 c -4.653,20.821 19.153,49.707 43.993,49.707 12.22,0 26.315,-11.034 28.952,-25.012 2.014,-10.659 -23.699,-6.388 -22.775,0.665 z" /> + + <path d="m 137.55613,63.203362 h -8.57342 V 38.824737 h 8.65523 q 3.66498,0 6.29918,1.472535 2.65056,1.456174 4.07401,4.18854 1.42345,2.716011 1.42345,6.511877 0,3.812229 -1.42345,6.544596 -1.42345,2.73237 -4.09037,4.204905 -2.66693,1.456172 -6.36463,1.456172 z m -3.58316,-4.303074 h 3.33774 q 3.51773,0 5.33385,-1.897931 1.81613,-1.897934 1.81613,-6.004668 0,-4.090374 -1.81613,-5.971946 -1.79976,-1.897934 -5.30113,-1.897934 h -3.37046 z m 27.27461,4.663028 q -2.74873,0 -4.7612,-1.178026 -2.01246,-1.19439 -3.10868,-3.305025 -1.07986,-2.126994 -1.07986,-4.941169 0,-2.830539 1.07986,-4.957533 1.09622,-2.126994 3.10868,-3.305021 2.01247,-1.194389 4.7612,-1.194389 2.74873,0 4.76119,1.194389 2.01247,1.178027 3.09233,3.305021 1.09621,2.126994 1.09621,4.957533 0,2.814175 -1.09621,4.941169 -1.07986,2.110635 -3.09233,3.305025 -2.01246,1.178026 -4.76119,1.178026 z m 0,-3.861311 q 1.96338,0 2.96143,-1.587067 0.99805,-1.587066 0.99805,-3.992205 0,-2.421499 -0.99805,-3.992203 -0.99805,-1.587066 -2.96143,-1.587066 -1.96338,0 -2.96143,1.587066 -0.98169,1.570704 -0.98169,3.992203 0,2.405139 0.98169,3.992205 0.99805,1.587067 2.96143,1.587067 z m 15.72339,3.501357 -5.39929,-18.29215 h 5.15387 l 1.58707,6.757299 q 0.32723,1.521617 0.7199,3.272298 0.39268,1.75068 0.76899,3.795865 0.37632,-1.996102 0.78536,-3.746779 0.42539,-1.767044 0.80171,-3.321384 l 1.66887,-6.757299 h 4.51577 l 1.63615,6.757299 q 0.34359,1.55434 0.75263,3.305021 0.4254,1.75068 0.81808,3.779506 0.34359,-2.028826 0.7199,-3.779506 0.37631,-1.750681 0.73627,-3.305021 l 1.58706,-6.757299 h 5.21932 l -5.43202,18.29215 h -4.99025 l -2.02883,-7.051804 q -0.34359,-1.178026 -0.67082,-2.650562 -0.31087,-1.472535 -0.6381,-2.912343 -0.31087,1.439808 -0.6381,2.928707 -0.32722,1.472535 -0.65446,2.634198 l -2.02882,7.051804 z m 29.58159,-10.585887 v 10.585887 h -4.90845 v -18.29215 h 4.6303 l 0.0654,3.779506 q 0.76899,-1.914294 2.17607,-2.96143 1.40709,-1.047135 3.51773,-1.047135 2.84689,0 4.56485,1.832485 1.71796,1.832489 1.71796,5.055701 v 11.633023 h -4.90845 V 52.421138 q 0,-1.701594 -0.88352,-2.666921 -0.86716,-0.965331 -2.4215,-0.965331 -1.5707,0 -2.56875,1.014413 -0.98169,0.998053 -0.98169,2.814176 z m 20.8609,-13.792738 v 24.378625 h -4.90845 V 38.824737 Z m 12.35293,24.738579 q -2.74873,0 -4.7612,-1.178026 -2.01246,-1.19439 -3.10868,-3.305025 -1.07986,-2.126994 -1.07986,-4.941169 0,-2.830539 1.07986,-4.957533 1.09622,-2.126994 3.10868,-3.305021 2.01247,-1.194389 4.7612,-1.194389 2.74873,0 4.76119,1.194389 2.01247,1.178027 3.09232,3.305021 1.09623,2.126994 1.09623,4.957533 0,2.814175 -1.09623,4.941169 -1.07985,2.110635 -3.09232,3.305025 -2.01246,1.178026 -4.76119,1.178026 z m 0,-3.861311 q 1.96338,0 2.96143,-1.587067 0.99805,-1.587066 0.99805,-3.992205 0,-2.421499 -0.99805,-3.992203 -0.99805,-1.587066 -2.96143,-1.587066 -1.96338,0 -2.96143,1.587066 -0.98169,1.570704 -0.98169,3.992203 0,2.405139 0.98169,3.992205 0.99805,1.587067 2.96143,1.587067 z m 17.8013,3.861311 q -2.61784,0 -4.35215,-1.374367 -1.73433,-1.390726 -1.73433,-4.106733 0,-2.045186 0.9817,-3.206853 0.98169,-1.161667 2.55239,-1.701594 1.5707,-0.539931 3.37047,-0.703545 2.35605,-0.229063 3.38683,-0.474485 1.04713,-0.261782 1.04713,-1.161664 v -0.08181 q 0,-1.161667 -0.75263,-1.799766 -0.73627,-0.638096 -2.11063,-0.638096 -1.42345,0 -2.29061,0.621737 -0.86716,0.605376 -1.16166,1.488894 l -4.49942,-0.752627 q 0.70355,-2.372416 2.79782,-3.681338 2.11063,-1.308917 5.17023,-1.308917 1.96338,0 3.73042,0.621736 1.7834,0.621736 2.89599,1.996103 1.12894,1.358003 1.12894,3.583165 v 12.320205 h -4.64666 v -2.53603 h -0.16362 q -0.67082,1.276195 -1.9961,2.094271 -1.32528,0.801713 -3.35411,0.801714 z m 1.39073,-3.452275 q 1.71796,0 2.79781,-0.998053 1.09623,-0.99805 1.09623,-2.454222 v -1.979743 q -0.29451,0.2127 -0.96533,0.376317 -0.65446,0.147251 -1.39073,0.278146 -0.73627,0.114527 -1.2762,0.179977 -1.358,0.196336 -2.19244,0.768986 -0.83443,0.572654 -0.83443,1.668876 0,1.063495 0.76899,1.619785 0.78535,0.539931 1.9961,0.539931 z m 19.65015,3.403189 q -2.11063,0 -3.79586,-1.079858 -1.68524,-1.096218 -2.68329,-3.190489 -0.98169,-2.110635 -0.98169,-5.153873 0,-3.125044 1.01441,-5.219315 1.01442,-2.094271 2.69965,-3.141407 1.68523,-1.047135 3.71406,-1.047135 1.55434,0 2.58512,0.523567 1.03077,0.523568 1.65251,1.292559 0.6381,0.76899 0.96532,1.488894 h 0.16362 v -9.162436 h 4.90845 v 24.378625 h -4.82664 v -2.928707 h -0.24543 q -0.34359,0.736268 -0.98169,1.488895 -0.63809,0.736267 -1.66887,1.243476 -1.03077,0.507204 -2.51967,0.507204 z m 1.50526,-3.94312 q 1.86521,0 2.89598,-1.505258 1.03078,-1.505254 1.03078,-3.992202 0,-2.486948 -1.03078,-3.975842 -1.01441,-1.488899 -2.89598,-1.488899 -1.93066,0 -2.92871,1.537981 -0.99805,1.521621 -0.99805,3.92676 0,2.421499 0.99805,3.95948 1.01442,1.53798 2.92871,1.53798 z m 31.03775,-14.659898 v 3.746783 H 307.323 v 14.545367 h -4.89209 V 48.657995 h -3.22322 v -3.746783 h 3.22322 v -1.407086 q 0,-2.912348 1.70159,-4.368521 1.7016,-1.456172 4.23763,-1.456172 1.16167,0 2.11063,0.179976 0.94897,0.179976 1.40709,0.32723 l -0.88352,3.697698 q -0.2945,-0.08181 -0.73627,-0.163614 -0.4254,-0.08181 -0.89988,-0.08181 -1.12894,0 -1.58706,0.539931 -0.45812,0.523568 -0.45812,1.488895 v 1.243472 z m 3.15777,18.29215 v -18.29215 h 4.74484 v 3.190493 h 0.19633 q 0.50721,-1.685235 1.68524,-2.552394 1.19439,-0.883522 2.73237,-0.883522 0.83443,0 1.58706,0.163618 v 4.384879 q -0.32723,-0.09817 -0.96532,-0.163614 -0.62174,-0.08181 -1.16167,-0.08181 -1.7016,0 -2.81418,1.063499 -1.09622,1.063495 -1.09622,2.76509 v 10.40591 z m 21.00816,0.359954 q -2.74873,0 -4.76119,-1.178026 -2.01247,-1.19439 -3.10869,-3.305025 -1.07986,-2.126994 -1.07986,-4.941169 0,-2.830539 1.07986,-4.957533 1.09622,-2.126994 3.10869,-3.305021 2.01246,-1.194389 4.76119,-1.194389 2.74873,0 4.76119,1.194389 2.01247,1.178027 3.09233,3.305021 1.09622,2.126994 1.09622,4.957533 0,2.814175 -1.09622,4.941169 -1.07986,2.110635 -3.09233,3.305025 -2.01246,1.178026 -4.76119,1.178026 z m 0,-3.861311 q 1.96338,0 2.96143,-1.587067 0.99805,-1.587066 0.99805,-3.992205 0,-2.421499 -0.99805,-3.992203 -0.99805,-1.587066 -2.96143,-1.587066 -1.96338,0 -2.96143,1.587066 -0.98169,1.570704 -0.98169,3.992203 0,2.405139 0.98169,3.992205 0.99805,1.587067 2.96143,1.587067 z m 12.36929,3.501357 v -18.29215 h 4.5485 l 0.19633,3.550447 q 0.73627,-1.996103 2.15971,-2.912348 1.42347,-0.916244 3.05961,-0.916244 3.46863,0 4.71213,4.106737 0.76897,-2.110634 2.37239,-3.108684 1.61979,-0.998053 3.50136,-0.998053 2.51968,0 4.17219,1.636149 1.66887,1.619789 1.66887,4.597582 v 12.336564 h -4.9248 v -11.40396 q 0,-1.537981 -0.83443,-2.290608 -0.83447,-0.76899 -2.06158,-0.76899 -1.39071,0 -2.2088,0.883518 -0.8017,0.883522 -0.8017,2.323334 v 11.256706 h -4.74482 V 51.668511 q 0,-1.341644 -0.80174,-2.126994 -0.78533,-0.801713 -2.04516,-0.801713 -1.29257,0 -2.17607,0.883518 -0.88354,0.867159 -0.88354,2.519671 v 11.060369 z" /> + <path d="m 137.08165,105.4651 q -2.69965,0 -4.66302,-1.16166 -1.96338,-1.16167 -3.02688,-3.27231 -1.04714,-2.110626 -1.04714,-4.957528 0,-2.814176 1.03078,-4.957529 1.04714,-2.143357 2.94507,-3.337747 1.89793,-1.210749 4.45032,-1.210749 2.07791,0 3.94312,0.932604 1.88158,0.916244 3.04324,2.94507 1.17803,2.012462 1.17803,5.317483 v 1.276199 h -12.97466 q 0.0982,2.650561 1.50525,4.057647 1.40709,1.39073 3.64862,1.39073 1.50525,0 2.58511,-0.65446 1.09622,-0.65446 1.5707,-1.930656 l 3.38683,0.801716 q -0.65445,2.14335 -2.65056,3.45227 -1.9961,1.30892 -4.92481,1.30892 z m -5.10478,-11.109452 h 9.39149 q -0.19633,-2.159717 -1.358,-3.484998 -1.1453,-1.32528 -3.22322,-1.32528 -2.15971,0 -3.41955,1.423449 -1.24347,1.407086 -1.39072,3.386829 z m 14.69262,10.733142 6.25009,-9.391502 -5.87378,-8.900652 h 4.05765 l 2.06155,3.321384 q 0.58901,0.965327 1.0635,1.865212 0.47448,0.883518 0.91624,1.717954 0.44176,-0.834436 0.88352,-1.717954 0.45812,-0.899885 1.0635,-1.865212 l 2.11063,-3.321384 h 3.99221 l -5.95559,9.031547 6.23373,9.260607 h -4.04129 l -2.45422,-3.89404 q -0.57265,-0.91624 -1.04714,-1.767041 -0.45812,-0.850796 -0.89988,-1.668872 -0.40904,0.818076 -0.8508,1.668872 -0.44176,0.850801 -1.01441,1.767041 l -2.48695,3.89404 z m 28.56717,-18.292154 v 2.928707 h -3.64862 v 10.422277 q 0,1.09621 0.45812,1.61978 0.47449,0.50721 1.53798,0.50721 0.29451,0 0.73627,-0.0654 0.45812,-0.0654 0.78536,-0.1309 l 0.63809,2.87963 q -0.57265,0.19633 -1.24347,0.27814 -0.65446,0.0982 -1.2762,0.0982 -2.48694,0 -3.86131,-1.2762 -1.37436,-1.29255 -1.37436,-3.61589 V 89.725343 h -2.66693 v -2.928707 h 2.66693 V 82.44448 h 3.59952 v 4.352156 z m 11.14217,18.668464 q -2.69964,0 -4.66302,-1.16166 -1.96338,-1.16167 -3.02688,-3.27231 -1.04713,-2.110626 -1.04713,-4.957528 0,-2.814176 1.03077,-4.957529 1.04713,-2.143357 2.94507,-3.337747 1.89793,-1.210749 4.45033,-1.210749 2.0779,0 3.94312,0.932604 1.88157,0.916244 3.04323,2.94507 1.17803,2.012462 1.17803,5.317483 v 1.276199 h -12.97467 q 0.0982,2.650561 1.50526,4.057647 1.40709,1.39073 3.64862,1.39073 1.50526,0 2.58511,-0.65446 1.09622,-0.65446 1.57071,-1.930656 l 3.38683,0.801716 q -0.65447,2.14335 -2.65057,3.45227 -1.9961,1.30892 -4.92481,1.30892 z m -5.10478,-11.109452 h 9.3915 q -0.19635,-2.159717 -1.35801,-3.484998 -1.1453,-1.32528 -3.22321,-1.32528 -2.15972,0 -3.41956,1.423449 -1.24347,1.407086 -1.39072,3.386829 z M 201.775,94.25748 v 10.83131 h -3.59953 V 86.796636 h 3.43591 l 0.0164,3.51772 q 0.85079,-1.930653 2.27425,-2.830535 1.4398,-0.916244 3.37046,-0.916244 2.79782,0 4.49941,1.76704 1.71796,1.75068 1.71796,5.137509 v 11.616664 h -3.59953 V 93.913885 q 0,-1.979739 -1.03077,-3.09232 -1.03078,-1.112582 -2.83054,-1.112582 -1.83249,0 -3.04324,1.19439 -1.21075,1.178027 -1.21075,3.354107 z m 23.11879,11.20762 q -2.97779,0 -4.94117,-1.2762 -1.94702,-1.29255 -2.43786,-3.73042 l 3.38683,-0.70354 q 0.73626,2.79782 4.02492,2.79782 1.75068,0 2.76509,-0.71991 1.03078,-0.73627 1.03078,-1.75068 0,-1.73432 -2.56876,-2.30697 l -3.07596,-0.703545 q -5.03934,-1.128944 -5.03934,-5.055701 0,-1.636149 0.89989,-2.863261 0.91624,-1.227113 2.5033,-1.897935 1.60343,-0.687181 3.68134,-0.687181 2.96143,0 4.64667,1.276194 1.68523,1.259836 2.27424,3.288662 l -3.22321,0.703544 q -0.34359,-0.965327 -1.19439,-1.685235 -0.8508,-0.736267 -2.47059,-0.736267 -1.48889,0 -2.48694,0.670822 -0.99805,0.670822 -0.99805,1.701594 0,0.916245 0.65446,1.488899 0.67082,0.55629 2.17607,0.899881 l 2.94507,0.654459 q 4.99026,1.128944 4.99026,4.941173 0,1.668867 -0.96533,2.961427 -0.94897,1.2762 -2.65056,2.01247 -1.7016,0.7199 -3.92676,0.7199 z m 11.48577,-0.37631 V 86.796636 h 3.59953 v 18.292154 z m 1.81612,-21.08997 q -0.9326,0 -1.60342,-0.621736 -0.65446,-0.621736 -0.65446,-1.505258 0,-0.899881 0.65446,-1.521617 0.67082,-0.621737 1.60342,-0.621737 0.93261,0 1.60343,0.621737 0.67082,0.621736 0.67082,1.521617 0,0.883522 -0.67082,1.505258 -0.67082,0.621736 -1.60343,0.621736 z m 14.31631,21.46628 q -2.56875,0 -4.49941,-1.17803 -1.91429,-1.17802 -2.97779,-3.28866 -1.0635,-2.126992 -1.0635,-4.957531 0,-2.846898 1.0635,-4.973892 1.0635,-2.143357 2.97779,-3.321384 1.93066,-1.178026 4.49941,-1.178026 2.58512,0 4.49941,1.178026 1.93066,1.178027 2.99415,3.321384 1.0635,2.126994 1.0635,4.973892 0,2.830539 -1.0635,4.957531 -1.06349,2.11064 -2.99415,3.28866 -1.91429,1.17803 -4.49941,1.17803 z m 0,-3.04324 q 1.66887,0 2.74873,-0.86716 1.09622,-0.88352 1.61979,-2.323328 0.53993,-1.456172 0.53993,-3.190493 0,-1.750676 -0.53993,-3.206852 -0.52357,-1.472535 -1.61979,-2.339694 -1.07986,-0.883518 -2.74873,-0.883518 -1.65251,0 -2.73237,0.883518 -1.07986,0.867159 -1.61979,2.339694 -0.52356,1.456176 -0.52356,3.206852 0,1.734321 0.52356,3.190493 0.53993,1.439808 1.61979,2.323328 1.07986,0.86716 2.73237,0.86716 z m 16.14879,-8.16438 v 10.83131 h -3.59953 V 86.796636 h 3.43592 l 0.0163,3.51772 q 0.8508,-1.930653 2.27425,-2.830535 1.43981,-0.916244 3.37047,-0.916244 2.79782,0 4.49941,1.76704 1.71796,1.75068 1.71796,5.137509 v 11.616664 h -3.59953 V 93.913885 q 0,-1.979739 -1.03078,-3.09232 -1.03077,-1.112582 -2.83054,-1.112582 -1.83248,0 -3.04323,1.19439 -1.21075,1.178027 -1.21075,3.354107 z m 23.1188,11.20762 q -2.9778,0 -4.94117,-1.2762 -1.94702,-1.29255 -2.43787,-3.73042 l 3.38683,-0.70354 q 0.73627,2.79782 4.02493,2.79782 1.75068,0 2.76509,-0.71991 1.03077,-0.73627 1.03077,-1.75068 0,-1.73432 -2.56875,-2.30697 l -3.07596,-0.703545 q -5.03934,-1.128944 -5.03934,-5.055701 0,-1.636149 0.89988,-2.863261 0.91624,-1.227113 2.50331,-1.897935 1.60343,-0.687181 3.68134,-0.687181 2.96143,0 4.64666,1.276194 1.68523,1.259836 2.27425,3.288662 l -3.22322,0.703544 q -0.34359,-0.965327 -1.19438,-1.685235 -0.8508,-0.736267 -2.47059,-0.736267 -1.4889,0 -2.48695,0.670822 -0.99805,0.670822 -0.99805,1.701594 0,0.916245 0.65446,1.488899 0.67082,0.55629 2.17608,0.899881 l 2.94507,0.654459 q 4.99025,1.128944 4.99025,4.941173 0,1.668867 -0.96532,2.961427 -0.94897,1.2762 -2.65057,2.01247 -1.70159,0.7199 -3.92675,0.7199 z m 14.15269,-0.13089 q -1.01441,0 -1.71796,-0.68718 -0.70354,-0.70355 -0.70354,-1.71796 0,-1.01441 0.70354,-1.71796 0.70355,-0.70354 1.71796,-0.70354 1.01441,0 1.70159,0.70354 0.70355,0.70355 0.70355,1.71796 0,1.01441 -0.70355,1.71796 -0.68718,0.68718 -1.70159,0.68718 z m 15.15074,6.98636 q -3.17413,0 -5.08842,-1.16167 -1.9143,-1.16166 -2.68329,-2.81418 l 3.01052,-1.42344 q 0.32722,0.52356 0.86716,1.09621 0.55629,0.58902 1.47253,0.99806 0.9326,0.40903 2.40514,0.40903 2.07791,0 3.38683,-0.99805 1.30892,-0.98169 1.30892,-3.09232 v -3.56681 h -0.31087 q -0.32723,0.60538 -0.91624,1.30892 -0.57266,0.70355 -1.61979,1.22712 -1.03078,0.5072 -2.69965,0.5072 -2.15972,0 -3.89403,-1.01441 -1.71796,-1.01441 -2.73237,-2.99415 -1.01442,-1.996107 -1.01442,-4.924815 0,-2.912343 0.99806,-4.990255 1.01441,-2.094271 2.74873,-3.206852 1.73431,-1.112581 3.94312,-1.112581 1.68523,0 2.73237,0.57265 1.06349,0.55629 1.65251,1.308921 0.60537,0.752627 0.91624,1.325281 h 0.26178 v -2.977793 h 3.51773 v 18.553934 q 0,2.40514 -1.09622,3.94312 -1.09622,1.53798 -2.96143,2.27425 -1.86522,0.75263 -4.20491,0.75263 z m -0.0327,-10.50408 q 2.29061,0 3.50136,-1.58707 1.22712,-1.587061 1.22712,-4.401237 0,-2.748734 -1.21075,-4.466691 -1.19439,-1.734317 -3.51773,-1.734317 -1.58706,0 -2.66692,0.834435 -1.0635,0.818077 -1.60342,2.225166 -0.52357,1.390727 -0.52357,3.141407 0,2.683285 1.21075,4.335797 1.22711,1.65251 3.58316,1.65251 z m 16.73781,-7.55901 v 10.83131 h -3.59953 V 86.796636 h 3.43592 l 0.0163,3.51772 q 0.8508,-1.930653 2.27425,-2.830535 1.43981,-0.916244 3.37047,-0.916244 2.79781,0 4.49941,1.76704 1.71796,1.75068 1.71796,5.137509 v 11.616664 h -3.59953 V 93.913885 q 0,-1.979739 -1.03078,-3.09232 -1.03077,-1.112582 -2.83053,-1.112582 -1.83249,0 -3.04324,1.19439 -1.21075,1.178027 -1.21075,3.354107 z m 24.24776,11.20762 q -2.56879,0 -4.49943,-1.17803 -1.91429,-1.17802 -2.97781,-3.28866 -1.06348,-2.126992 -1.06348,-4.957531 0,-2.846898 1.06348,-4.973892 1.06352,-2.143357 2.97781,-3.321384 1.93064,-1.178026 4.49943,-1.178026 2.58509,0 4.49939,1.178026 1.93067,1.178027 2.99415,3.321384 1.06352,2.126994 1.06352,4.973892 0,2.830539 -1.06352,4.957531 -1.06348,2.11064 -2.99415,3.28866 -1.9143,1.17803 -4.49939,1.17803 z m 0,-3.04324 q 1.66886,0 2.74872,-0.86716 1.09621,-0.88352 1.6198,-2.323328 0.53989,-1.456172 0.53989,-3.190493 0,-1.750676 -0.53989,-3.206852 -0.52359,-1.472535 -1.6198,-2.339694 -1.07986,-0.883518 -2.74872,-0.883518 -1.65252,0 -2.73238,0.883518 -1.07987,0.867159 -1.6198,2.339694 -0.52358,1.456176 -0.52358,3.206852 0,1.734321 0.52358,3.190493 0.53993,1.439808 1.6198,2.323328 1.07986,0.86716 2.73238,0.86716 z m 12.54924,2.66693 V 86.796636 h 3.41957 l 0.0818,3.419552 q 0.70357,-1.897931 2.11062,-2.814176 1.40709,-0.916244 3.04326,-0.916244 1.78339,0 2.96143,1.014413 1.17801,1.014413 1.71794,2.830538 0.68718,-1.848848 2.2579,-2.846898 1.58707,-0.998053 3.53409,-0.998053 1.61979,0 2.9287,0.703545 1.30891,0.703544 2.07789,2.094271 0.78536,1.390726 0.78536,3.468638 V 105.08879 H 395.8878 V 93.112172 q 0,-1.832485 -1.01441,-2.650562 -1.01441,-0.818072 -2.40515,-0.818072 -1.70159,0 -2.68328,1.047135 -0.96534,1.047136 -0.96534,2.683285 v 11.714832 h -3.55043 V 92.883113 q 0,-1.472535 -0.94895,-2.356057 -0.93261,-0.883518 -2.38878,-0.883518 -1.50526,0 -2.6342,1.047135 -1.11259,1.030773 -1.11259,3.026876 v 11.371241 z m 37.64781,0.37631 q -2.69965,0 -4.66302,-1.16166 -1.9634,-1.16167 -3.02688,-3.27231 -1.04713,-2.110626 -1.04713,-4.957528 0,-2.814176 1.03075,-4.957529 1.04713,-2.143357 2.94508,-3.337747 1.89792,-1.210749 4.45032,-1.210749 2.07793,0 3.94311,0.932604 1.88157,0.916244 3.04327,2.94507 1.178,2.012462 1.178,5.317483 v 1.276199 h -12.97465 q 0.0982,2.650561 1.50527,4.057647 1.40709,1.39073 3.64861,1.39073 1.50523,0 2.58509,-0.65446 1.09625,-0.65446 1.57073,-1.930656 l 3.38683,0.801716 q -0.65449,2.14335 -2.65058,3.45227 -1.99609,1.30892 -4.9248,1.30892 z m -5.10481,-11.109452 h 9.3915 q -0.19632,-2.159717 -1.35798,-3.484998 -1.14532,-1.32528 -3.22321,-1.32528 -2.15972,0 -3.41956,1.423449 -1.24349,1.407086 -1.39075,3.386829 z m 19.56835,10.978562 q -1.01441,0 -1.71793,-0.68718 -0.70357,-0.70355 -0.70357,-1.71796 0,-1.01441 0.70357,-1.71796 0.70352,-0.70354 1.71793,-0.70354 1.01441,0 1.70159,0.70354 0.70357,0.70355 0.70357,1.71796 0,1.01441 -0.70357,1.71796 -0.68718,0.68718 -1.70159,0.68718 z m 15.18349,0.13089 q -2.56875,0 -4.49943,-1.17803 -1.91429,-1.17802 -2.97777,-3.28866 -1.06352,-2.126992 -1.06352,-4.957531 0,-2.846898 1.06352,-4.973892 1.06348,-2.143357 2.97777,-3.321384 1.93068,-1.178026 4.49943,-1.178026 2.5851,0 4.4994,1.178026 1.93067,1.178027 2.99415,3.321384 1.06352,2.126994 1.06352,4.973892 0,2.830539 -1.06352,4.957531 -1.06348,2.11064 -2.99415,3.28866 -1.9143,1.17803 -4.4994,1.17803 z m 0,-3.04324 q 1.66886,0 2.74874,-0.86716 1.0962,-0.88352 1.61979,-2.323328 0.53993,-1.456172 0.53993,-3.190493 0,-1.750676 -0.53993,-3.206852 -0.52359,-1.472535 -1.61979,-2.339694 -1.07988,-0.883518 -2.74874,-0.883518 -1.65252,0 -2.73238,0.883518 -1.07987,0.867159 -1.6198,2.339694 -0.52355,1.456176 -0.52355,3.206852 0,1.734321 0.52355,3.190493 0.53993,1.439808 1.6198,2.323328 1.07986,0.86716 2.73238,0.86716 z m 12.54925,2.66693 V 86.796636 h 3.48502 v 2.94507 h 0.19632 q 0.49086,-1.488895 1.7507,-2.339694 1.27619,-0.867158 2.87963,-0.867158 0.34358,0 0.78533,0.03273 0.45813,0.03273 0.73629,0.06545 v 3.435915 q -0.19636,-0.04909 -0.75264,-0.114531 -0.55631,-0.08181 -1.12893,-0.08181 -1.88161,0 -3.12506,1.161667 -1.22711,1.145304 -1.22711,2.945067 V 105.0888 Z m 19.97742,7.23178 q -3.17414,0 -5.08843,-1.16167 -1.9143,-1.16166 -2.68331,-2.81418 l 3.01054,-1.42344 q 0.32722,0.52356 0.86715,1.09621 0.55628,0.58902 1.47255,0.99806 0.93257,0.40903 2.40511,0.40903 2.07793,0 3.38684,-0.99805 1.30891,-0.98169 1.30891,-3.09232 v -3.56681 h -0.31084 q -0.32723,0.60538 -0.91627,1.30892 -0.57266,0.70355 -1.61979,1.22712 -1.03076,0.5072 -2.69962,0.5072 -2.15973,0 -3.89404,-1.01441 -1.71798,-1.01441 -2.73239,-2.99415 -1.0144,-1.996107 -1.0144,-4.924815 0,-2.912343 0.99806,-4.990255 1.01441,-2.094271 2.74873,-3.206852 1.73431,-1.112581 3.94311,-1.112581 1.68524,0 2.73238,0.57265 1.06348,0.55629 1.65248,1.308921 0.60539,0.752627 0.91627,1.325281 h 0.26177 v -2.977793 h 3.51771 v 18.553934 q 0,2.40514 -1.09621,3.94312 -1.0962,1.53798 -2.96143,2.27425 -1.86522,0.75263 -4.20488,0.75263 z m -0.0328,-10.50408 q 2.2906,0 3.50136,-1.58707 1.22712,-1.587061 1.22712,-4.401237 0,-2.748734 -1.21077,-4.466691 -1.19439,-1.734317 -3.51771,-1.734317 -1.58706,0 -2.66693,0.834435 -1.06351,0.818077 -1.60344,2.225166 -0.52355,1.390727 -0.52355,3.141407 0,2.683285 1.21073,4.335797 1.22711,1.65251 3.58319,1.65251 z" /> + </g> +</svg> + diff --git a/extensions/46/middleclickclose/src/extension.js b/extensions/46/middleclickclose/src/extension.js index 0b0d562..69f4c7e 100644 --- a/extensions/46/middleclickclose/src/extension.js +++ b/extensions/46/middleclickclose/src/extension.js @@ -19,9 +19,13 @@ import GLib from 'gi://GLib'; import GObject from 'gi://GObject'; +import Meta from 'gi://Meta'; -import { Extension, InjectionManager } from 'resource:///org/gnome/shell/extensions/extension.js'; +import { Extension, InjectionManager } + from 'resource:///org/gnome/shell/extensions/extension.js'; import { Workspace } from 'resource:///org/gnome/shell/ui/workspace.js'; +import { WindowPreview } from 'resource:///org/gnome/shell/ui/windowPreview.js'; +import { ControlsState } from 'resource:///org/gnome/shell/ui/overviewControls.js'; import { SettingsWatch } from './settingsWatch.js'; @@ -29,21 +33,29 @@ export default class MiddleClickClose extends Extension { #settings; #injectionManager; + #refocusOnClose; + enable() { this.#settings = new SettingsWatch(this.getSettings(), { close_button: { get: v => v.value, }, rearrange_delay: {}, + keyboard_close: {}, }); + this.#refocusOnClose = new WeakSet(); + this.#injectionManager = new InjectionManager(); this.#patchClickHandler(); this.#patchWindowRepositioningDelay(); + this.#patchKeyClose(); } disable() { this.#injectionManager.clear(); this.#injectionManager = null; + this.#refocusOnClose = null; + this.#settings.clear(); this.#settings = null; } @@ -81,23 +93,90 @@ export default class MiddleClickClose extends Extension { // apparently that is impossible with the switch to ESM. Instead, we'll monkey-patch // _doRemoveWindow() and change the timeout after the fact. const settings = this.#settings; + const refocusOnClose = this.#refocusOnClose; const lastLayoutFrozenIds = new WeakMap(); + this.#injectionManager.overrideMethod(Workspace.prototype, '_doRemoveWindow', - original => function () { + original => function (metaWin) { + + // Grab the old window's focus chain index. + let focus_idx = this.get_focus_chain() + .findIndex(clone => clone.metaWindow == metaWin); + + // Call the original method. const ret = original.apply(this, arguments); + if (refocusOnClose.has(metaWin)) { + // Find a "nearby" window to refocus to, based on the old index + const chain = this.get_focus_chain(); + if (focus_idx >= chain.length) { + focus_idx = chain.length - 1; + } + + // Focus on the selected window. + if (focus_idx >= 0) { + global.stage.key_focus = chain[focus_idx]; + } + } + // Adjust the freeze delay. if (this._layoutFrozenId > 0 && this._layoutFrozenId != lastLayoutFrozenIds.get(this) ) { - const source = GLib.MainContext.default().find_source_by_id(this._layoutFrozenId); - source.set_ready_time(source.get_time() + settings.rearrange_delay * 1000); + const src = GLib.MainContext.default().find_source_by_id(this._layoutFrozenId); + src.set_ready_time(src.get_time() + settings.rearrange_delay * 1000); } - // Need to keep the last id to avoid adjusting the layout freeze delay more than once. + // Need to keep the last id to avoid adjusting the layout freeze delay more than + // once. lastLayoutFrozenIds.set(this, this._layoutFrozenId); - return ret; }) } + + #patchKeyClose() { + // If Meta.KeyBindingAction.CLOSE is fired in while a WindowPreview is focused, close it. + const settings = this.#settings; + const refocusOnClose = this.#refocusOnClose; + + function handleKeyPress(event) { + + // Keyboard close disabled in settings. + if (!settings.keyboard_close) { + return false; + } + + // We only care about window picker mode. + if (this._workspace._overviewAdjustment.value !== ControlsState.WINDOW_PICKER) { + return false; + } + + const action = global.display.get_keybinding_action( + event.get_key_code(), event.get_state()); + if (action == Meta.KeyBindingAction.CLOSE) { + + if (this._workspace.metaWorkspace?.active) { + // Imediately refocus on another window when closing via keyboard. + refocusOnClose.add(this.metaWindow); + + // Close the window. + this._deleteAll(); + } else { + // Switch to the workspace the focused window is in. + this._workspace.metaWorkspace?.activate(global.get_current_time()) + } + + return true; + } + + return false; + } + + this.#injectionManager.overrideMethod(WindowPreview.prototype, 'vfunc_key_press_event', + original => function () { + return handleKeyPress.apply(this, arguments) + || original.apply(this, arguments); + } + ) + } }; diff --git a/extensions/46/middleclickclose/src/metadata.json b/extensions/46/middleclickclose/src/metadata.json index 8802f6d..23bc0ed 100644 --- a/extensions/46/middleclickclose/src/metadata.json +++ b/extensions/46/middleclickclose/src/metadata.json @@ -4,7 +4,8 @@ "url": "https://github.com/p91paul/middleclickclose", "shell-version": [ "45", - "46" + "46", + "47" ], "uuid": "middleclickclose@paolo.tranquilli.gmail.com", "settings-schema": "org.gnome.shell.extensions.middleclickclose", diff --git a/extensions/46/middleclickclose/src/po/de.po b/extensions/46/middleclickclose/src/po/de.po index 4fb4821..cf12acc 100644 --- a/extensions/46/middleclickclose/src/po/de.po +++ b/extensions/46/middleclickclose/src/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gnome-shell-extensions-middleclickclose\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-30 18:29+0300\n" +"POT-Creation-Date: 2024-07-09 15:57+0300\n" "PO-Revision-Date: 2019-06-17 20:44+0200\n" "Last-Translator: Onno Giesmann <nutzer3105@gmail.com>\n" "Language-Team: German <--->\n" @@ -18,39 +18,39 @@ msgstr "" "X-Generator: Gtranslator 3.32.1\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -#: src/prefs.js:30 +#: src/prefs.js:31 msgid "Left" msgstr "Linke" -#: src/prefs.js:31 +#: src/prefs.js:32 msgid "Middle" msgstr "Mittlere" -#: src/prefs.js:32 +#: src/prefs.js:33 msgid "Right" msgstr "Rechte" -#: src/prefs.js:33 +#: src/prefs.js:34 msgid "Button 4" msgstr "Taste 4" -#: src/prefs.js:34 +#: src/prefs.js:35 msgid "Button 5" msgstr "Taste 5" -#: src/prefs.js:35 +#: src/prefs.js:36 msgid "Button 6" msgstr "Taste 6" -#: src/prefs.js:36 +#: src/prefs.js:37 msgid "Button 7" msgstr "Taste 7" -#: src/prefs.js:37 +#: src/prefs.js:38 msgid "Button 8" msgstr "Taste 8" -#: src/prefs.js:38 +#: src/prefs.js:39 msgid "Button 9" msgstr "Taste 9" @@ -62,11 +62,19 @@ msgstr "Maustaste zum Schließen" msgid "Which mouse button triggers closing in overview." msgstr "Gibt an, welche Maustaste das Schließen in der Übersicht auslöst." +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:22 +msgid "Close with keyboard" +msgstr "" + #: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:23 +msgid "Allow closing windows in overview via keyboard shortcuts." +msgstr "" + +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:28 msgid "Rearrange delay" msgstr "Verzögerung bis zur Neuanordnung" -#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:24 +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:29 msgid "" "How much time must pass with the pointer not moving for windows in overview " "to rearrange after one was closed." diff --git a/extensions/46/middleclickclose/src/po/el.po b/extensions/46/middleclickclose/src/po/el.po index d032228..cc5f21e 100644 --- a/extensions/46/middleclickclose/src/po/el.po +++ b/extensions/46/middleclickclose/src/po/el.po @@ -7,49 +7,49 @@ msgid "" msgstr "" "Project-Id-Version: gnome-shell-extensions-middleclickclose\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-30 18:33+0300\n" -"PO-Revision-Date: 2023-08-30 18:41+0300\n" +"POT-Creation-Date: 2024-07-09 15:57+0300\n" +"PO-Revision-Date: 2024-07-09 16:01+0300\n" "Last-Translator: George Tsiamasiotis <gtsiam@windowslive.com>\n" "Language-Team: \n" "Language: el\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 3.3.2\n" +"X-Generator: Poedit 3.4.2\n" -#: src/prefs.js:30 +#: src/prefs.js:31 msgid "Left" msgstr "Αριστερό" -#: src/prefs.js:31 +#: src/prefs.js:32 msgid "Middle" msgstr "Μεσαίο" -#: src/prefs.js:32 +#: src/prefs.js:33 msgid "Right" msgstr "Δεξί" -#: src/prefs.js:33 +#: src/prefs.js:34 msgid "Button 4" msgstr "Κουμπί 4" -#: src/prefs.js:34 +#: src/prefs.js:35 msgid "Button 5" msgstr "Κουμπί 5" -#: src/prefs.js:35 +#: src/prefs.js:36 msgid "Button 6" msgstr "Κουμπί 6" -#: src/prefs.js:36 +#: src/prefs.js:37 msgid "Button 7" msgstr "Κουμπί 7" -#: src/prefs.js:37 +#: src/prefs.js:38 msgid "Button 8" msgstr "Κουμπί 8" -#: src/prefs.js:38 +#: src/prefs.js:39 msgid "Button 9" msgstr "Κουμπί 9" @@ -61,14 +61,24 @@ msgstr "Κουμπί ποντικιού για κλείσιμο" msgid "Which mouse button triggers closing in overview." msgstr "Ποιό κουμπί του ποντικιού κλείνει παράθυρα στην επισκόπηση." +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:22 +msgid "Close with keyboard" +msgstr "Κλείσιμο με πληκτρολόγιο" + #: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:23 +msgid "Allow closing windows in overview via keyboard shortcuts." +msgstr "" +"Επιτρέπει το κλείσιμο παραθύρων στην επισκόπηση μέσω συντομεύσεων " +"πληκτρολογίου." + +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:28 msgid "Rearrange delay" msgstr "Καθυστέρηση ανακατονομής" -#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:24 +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:29 msgid "" "How much time must pass with the pointer not moving for windows in overview " "to rearrange after one was closed." msgstr "" -"Πόσος χρόνος πρέπει να περάσει με τον κέρσορα αδρανή στην επισκόπηση μετά " -"το κλείσιμο ενός παραθύρου για να γίνει ανακατανομή." +"Πόσος χρόνος πρέπει να περάσει με τον κέρσορα αδρανή στην επισκόπηση μετά το " +"κλείσιμο ενός παραθύρου για να γίνει ανακατανομή." diff --git a/extensions/46/middleclickclose/src/po/fr.po b/extensions/46/middleclickclose/src/po/fr.po index e762a40..f7acb45 100644 --- a/extensions/46/middleclickclose/src/po/fr.po +++ b/extensions/46/middleclickclose/src/po/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gnome-shell-extensions-middleclickclose\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-30 18:29+0300\n" +"POT-Creation-Date: 2024-07-09 15:57+0300\n" "PO-Revision-Date: 2015-12-30 07:08+0100\n" "Last-Translator: DAEM Q.\n" "Language-Team: \n" @@ -18,39 +18,39 @@ msgstr "" "X-Generator: Poedit 1.8.5\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#: src/prefs.js:30 +#: src/prefs.js:31 msgid "Left" msgstr "Gauche" -#: src/prefs.js:31 +#: src/prefs.js:32 msgid "Middle" msgstr "Milieu" -#: src/prefs.js:32 +#: src/prefs.js:33 msgid "Right" msgstr "Droit" -#: src/prefs.js:33 +#: src/prefs.js:34 msgid "Button 4" msgstr "Bouton 4" -#: src/prefs.js:34 +#: src/prefs.js:35 msgid "Button 5" msgstr "Bouton 5" -#: src/prefs.js:35 +#: src/prefs.js:36 msgid "Button 6" msgstr "Bouton 6" -#: src/prefs.js:36 +#: src/prefs.js:37 msgid "Button 7" msgstr "Bouton 7" -#: src/prefs.js:37 +#: src/prefs.js:38 msgid "Button 8" msgstr "Bouton 8" -#: src/prefs.js:38 +#: src/prefs.js:39 msgid "Button 9" msgstr "Bouton 9" @@ -64,11 +64,19 @@ msgstr "" "Le bouton de la souris qui déclenche la fermeture d'une fenêtre dans la Vue " "d'ensemble." +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:22 +msgid "Close with keyboard" +msgstr "" + #: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:23 +msgid "Allow closing windows in overview via keyboard shortcuts." +msgstr "" + +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:28 msgid "Rearrange delay" msgstr "Délai avant réarrangement" -#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:24 +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:29 msgid "" "How much time must pass with the pointer not moving for windows in overview " "to rearrange after one was closed." diff --git a/extensions/46/middleclickclose/src/po/it.po b/extensions/46/middleclickclose/src/po/it.po index 4b20c55..dbb0a96 100644 --- a/extensions/46/middleclickclose/src/po/it.po +++ b/extensions/46/middleclickclose/src/po/it.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gnome-shell-extensions-middleclickclose\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-30 18:29+0300\n" +"POT-Creation-Date: 2024-07-09 15:57+0300\n" "PO-Revision-Date: 2017-04-21 10:06+0200\n" "Last-Translator: Jimmy Scionti <jimmy.scionti@gmail.com>\n" "Language-Team: Jimmy Scionti <jimmy.scionti@gmail.com>\n" @@ -18,39 +18,39 @@ msgstr "" "X-Generator: Poedit 1.8.7.1\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/prefs.js:30 +#: src/prefs.js:31 msgid "Left" msgstr "Sinistro" -#: src/prefs.js:31 +#: src/prefs.js:32 msgid "Middle" msgstr "Centrale" -#: src/prefs.js:32 +#: src/prefs.js:33 msgid "Right" msgstr "Destro" -#: src/prefs.js:33 +#: src/prefs.js:34 msgid "Button 4" msgstr "Pulsante 4" -#: src/prefs.js:34 +#: src/prefs.js:35 msgid "Button 5" msgstr "Pulsante 5" -#: src/prefs.js:35 +#: src/prefs.js:36 msgid "Button 6" msgstr "Pulsante 6" -#: src/prefs.js:36 +#: src/prefs.js:37 msgid "Button 7" msgstr "Pulsante 7" -#: src/prefs.js:37 +#: src/prefs.js:38 msgid "Button 8" msgstr "Pulsante 8" -#: src/prefs.js:38 +#: src/prefs.js:39 msgid "Button 9" msgstr "Pulsante 9" @@ -62,11 +62,19 @@ msgstr "Pulsante del mouse per chiudere la finestra" msgid "Which mouse button triggers closing in overview." msgstr "Seleziona quale pulsante del mouse premere per chiudere una finestra." +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:22 +msgid "Close with keyboard" +msgstr "" + #: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:23 +msgid "Allow closing windows in overview via keyboard shortcuts." +msgstr "" + +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:28 msgid "Rearrange delay" msgstr "Ritardo del riordinamento" -#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:24 +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:29 msgid "" "How much time must pass with the pointer not moving for windows in overview " "to rearrange after one was closed." diff --git a/extensions/46/middleclickclose/src/po/nl.po b/extensions/46/middleclickclose/src/po/nl.po index fe9c6e9..39aa13c 100644 --- a/extensions/46/middleclickclose/src/po/nl.po +++ b/extensions/46/middleclickclose/src/po/nl.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gnome-shell-extensions-middleclickclose\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-30 18:29+0300\n" +"POT-Creation-Date: 2024-07-09 15:57+0300\n" "PO-Revision-Date: 2019-09-15 20:17+0200\n" "Last-Translator: Heimen Stoffels <vistausss@outlook.com>\n" "Language-Team: Dutch <kde-i18n-doc@kde.org>\n" @@ -17,39 +17,39 @@ msgstr "" "X-Generator: Poedit 2.2.1\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/prefs.js:30 +#: src/prefs.js:31 msgid "Left" msgstr "Links" -#: src/prefs.js:31 +#: src/prefs.js:32 msgid "Middle" msgstr "Scrollwiel" -#: src/prefs.js:32 +#: src/prefs.js:33 msgid "Right" msgstr "Rechts" -#: src/prefs.js:33 +#: src/prefs.js:34 msgid "Button 4" msgstr "Knop 4" -#: src/prefs.js:34 +#: src/prefs.js:35 msgid "Button 5" msgstr "Knop 5" -#: src/prefs.js:35 +#: src/prefs.js:36 msgid "Button 6" msgstr "Knop 6" -#: src/prefs.js:36 +#: src/prefs.js:37 msgid "Button 7" msgstr "Knop 7" -#: src/prefs.js:37 +#: src/prefs.js:38 msgid "Button 8" msgstr "Knop 8" -#: src/prefs.js:38 +#: src/prefs.js:39 msgid "Button 9" msgstr "Knop 9" @@ -61,11 +61,19 @@ msgstr "Muisknop om vensters mee te sluiten" msgid "Which mouse button triggers closing in overview." msgstr "Met welke muisknop je vensters kunt sluiten op het overzicht." +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:22 +msgid "Close with keyboard" +msgstr "" + #: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:23 +msgid "Allow closing windows in overview via keyboard shortcuts." +msgstr "" + +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:28 msgid "Rearrange delay" msgstr "Vertraging bij herschikken" -#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:24 +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:29 msgid "" "How much time must pass with the pointer not moving for windows in overview " "to rearrange after one was closed." diff --git a/extensions/46/middleclickclose/src/po/pt.po b/extensions/46/middleclickclose/src/po/pt.po index 7f35be1..1dd92d9 100644 --- a/extensions/46/middleclickclose/src/po/pt.po +++ b/extensions/46/middleclickclose/src/po/pt.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gnome-shell-extensions-middleclickclose\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-11 23:56+0100\n" +"POT-Creation-Date: 2024-07-09 15:57+0300\n" "PO-Revision-Date: 2023-10-11 23:56+0100\n" "Last-Translator: Tomás Marques <tomasm576@gmail.com>\n" "Language-Team: \n" @@ -15,39 +15,39 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: src/prefs.js:30 +#: src/prefs.js:31 msgid "Left" msgstr "Esquerda" -#: src/prefs.js:31 +#: src/prefs.js:32 msgid "Middle" msgstr "Meio" -#: src/prefs.js:32 +#: src/prefs.js:33 msgid "Right" msgstr "Direita" -#: src/prefs.js:33 +#: src/prefs.js:34 msgid "Button 4" msgstr "Botão 4" -#: src/prefs.js:34 +#: src/prefs.js:35 msgid "Button 5" msgstr "Botão 5" -#: src/prefs.js:35 +#: src/prefs.js:36 msgid "Button 6" msgstr "Botão 6" -#: src/prefs.js:36 +#: src/prefs.js:37 msgid "Button 7" msgstr "Botão 7" -#: src/prefs.js:37 +#: src/prefs.js:38 msgid "Button 8" msgstr "Botão 8" -#: src/prefs.js:38 +#: src/prefs.js:39 msgid "Button 9" msgstr "Botão 9" @@ -59,14 +59,22 @@ msgstr "Botão do meio do rato" msgid "Which mouse button triggers closing in overview." msgstr "Qual o botão do rato que fecha uma janela na vista geral." +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:22 +msgid "Close with keyboard" +msgstr "" + #: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:23 +msgid "Allow closing windows in overview via keyboard shortcuts." +msgstr "" + +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:28 msgid "Rearrange delay" msgstr "Duração de reorganizar" -#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:24 +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:29 msgid "" "How much time must pass with the pointer not moving for windows in overview " "to rearrange after one was closed." msgstr "" -"Quanto tempo tem de passar sem que o cursor se mova para que as janelas na visão geral " -"se reorganizem depois de uma ter sido fechada." +"Quanto tempo tem de passar sem que o cursor se mova para que as janelas na " +"visão geral se reorganizem depois de uma ter sido fechada." diff --git a/extensions/46/middleclickclose/src/po/sk.po b/extensions/46/middleclickclose/src/po/sk.po index d9c250a..c9e79a8 100644 --- a/extensions/46/middleclickclose/src/po/sk.po +++ b/extensions/46/middleclickclose/src/po/sk.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gnome-shell-extensions-middleclickclose\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-30 18:29+0300\n" +"POT-Creation-Date: 2024-07-09 15:57+0300\n" "PO-Revision-Date: 2015-10-30 07:08+0100\n" "Last-Translator: Juraj Fiala <doctorjellyface@riseup.net>\n" "Language-Team: \n" @@ -18,39 +18,39 @@ msgstr "" "X-Generator: Poedit 1.8.5\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#: src/prefs.js:30 +#: src/prefs.js:31 msgid "Left" msgstr "Ľavé" -#: src/prefs.js:31 +#: src/prefs.js:32 msgid "Middle" msgstr "Stredné" -#: src/prefs.js:32 +#: src/prefs.js:33 msgid "Right" msgstr "Pravé" -#: src/prefs.js:33 +#: src/prefs.js:34 msgid "Button 4" msgstr "Tlačidlo 4" -#: src/prefs.js:34 +#: src/prefs.js:35 msgid "Button 5" msgstr "Tlačidlo 5" -#: src/prefs.js:35 +#: src/prefs.js:36 msgid "Button 6" msgstr "Tlačidlo 6" -#: src/prefs.js:36 +#: src/prefs.js:37 msgid "Button 7" msgstr "Tlačidlo 7" -#: src/prefs.js:37 +#: src/prefs.js:38 msgid "Button 8" msgstr "Tlačidlo 8" -#: src/prefs.js:38 +#: src/prefs.js:39 msgid "Button 9" msgstr "Tlačidlo 9" @@ -62,11 +62,19 @@ msgstr "Tlačidlo myši na zavretie" msgid "Which mouse button triggers closing in overview." msgstr "Ktoré tlačidlo myši spustí zavretie v prehľade aktivít." +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:22 +msgid "Close with keyboard" +msgstr "" + #: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:23 +msgid "Allow closing windows in overview via keyboard shortcuts." +msgstr "" + +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:28 msgid "Rearrange delay" msgstr "Oneskorenie preskúpenia" -#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:24 +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:29 msgid "" "How much time must pass with the pointer not moving for windows in overview " "to rearrange after one was closed." diff --git a/extensions/46/middleclickclose/src/po/sr.po b/extensions/46/middleclickclose/src/po/sr.po index 514194c..037eb5c 100644 --- a/extensions/46/middleclickclose/src/po/sr.po +++ b/extensions/46/middleclickclose/src/po/sr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-02 18:28+0300\n" +"POT-Creation-Date: 2024-07-09 15:57+0300\n" "PO-Revision-Date: 2023-10-15 18:51+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -17,39 +17,39 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 3.4\n" -#: src/prefs.js:30 +#: src/prefs.js:31 msgid "Left" msgstr "Лево" -#: src/prefs.js:31 +#: src/prefs.js:32 msgid "Middle" msgstr "Средње" -#: src/prefs.js:32 +#: src/prefs.js:33 msgid "Right" msgstr "Десно" -#: src/prefs.js:33 +#: src/prefs.js:34 msgid "Button 4" msgstr "Дугме 4" -#: src/prefs.js:34 +#: src/prefs.js:35 msgid "Button 5" msgstr "Дугме 5" -#: src/prefs.js:35 +#: src/prefs.js:36 msgid "Button 6" msgstr "Дугме 6" -#: src/prefs.js:36 +#: src/prefs.js:37 msgid "Button 7" msgstr "Дугме 7" -#: src/prefs.js:37 +#: src/prefs.js:38 msgid "Button 8" msgstr "Дугме 8" -#: src/prefs.js:38 +#: src/prefs.js:39 msgid "Button 9" msgstr "Дугме 9" @@ -61,11 +61,19 @@ msgstr "Дугме на мишу за затварање апликација" msgid "Which mouse button triggers closing in overview." msgstr "Које дугме на мишу затвара апликацију у прегледнику." +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:22 +msgid "Close with keyboard" +msgstr "" + #: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:23 +msgid "Allow closing windows in overview via keyboard shortcuts." +msgstr "" + +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:28 msgid "Rearrange delay" msgstr "Задршка у распоређивању" -#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:24 +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:29 msgid "" "How much time must pass with the pointer not moving for windows in overview " "to rearrange after one was closed." diff --git a/extensions/46/middleclickclose/src/po/sr@latin.po b/extensions/46/middleclickclose/src/po/sr@latin.po index 7ec468e..e6bc7f0 100644 --- a/extensions/46/middleclickclose/src/po/sr@latin.po +++ b/extensions/46/middleclickclose/src/po/sr@latin.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-02 18:28+0300\n" +"POT-Creation-Date: 2024-07-09 15:57+0300\n" "PO-Revision-Date: 2023-10-15 18:52+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -17,39 +17,39 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 3.4\n" -#: src/prefs.js:30 +#: src/prefs.js:31 msgid "Left" msgstr "Levo" -#: src/prefs.js:31 +#: src/prefs.js:32 msgid "Middle" msgstr "Srednje" -#: src/prefs.js:32 +#: src/prefs.js:33 msgid "Right" msgstr "Desno" -#: src/prefs.js:33 +#: src/prefs.js:34 msgid "Button 4" msgstr "Dugme 4" -#: src/prefs.js:34 +#: src/prefs.js:35 msgid "Button 5" msgstr "Dugme 5" -#: src/prefs.js:35 +#: src/prefs.js:36 msgid "Button 6" msgstr "Dugme 6" -#: src/prefs.js:36 +#: src/prefs.js:37 msgid "Button 7" msgstr "Dugme 7" -#: src/prefs.js:37 +#: src/prefs.js:38 msgid "Button 8" msgstr "Dugme 8" -#: src/prefs.js:38 +#: src/prefs.js:39 msgid "Button 9" msgstr "Dugme 9" @@ -61,15 +61,23 @@ msgstr "Dugme na mišu za zatvaranje aplikacija" msgid "Which mouse button triggers closing in overview." msgstr "Koje dugme na mišu zatvara aplikaciju u pregledniku." +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:22 +msgid "Close with keyboard" +msgstr "" + #: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:23 +msgid "Allow closing windows in overview via keyboard shortcuts." +msgstr "" + +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:28 msgid "Rearrange delay" msgstr "Zadrška u raspoređivanju" -#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:24 +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:29 msgid "" "How much time must pass with the pointer not moving for windows in overview " "to rearrange after one was closed." msgstr "" -"Koliko vremena mora da prođe prilikom nepomeranja pokazivača miša za " -"prozore aplikacija u pregledniku, kako bi se prozori rasporedili nakon " -"zatvaranja aplikacije." +"Koliko vremena mora da prođe prilikom nepomeranja pokazivača miša za prozore " +"aplikacija u pregledniku, kako bi se prozori rasporedili nakon zatvaranja " +"aplikacije." diff --git a/extensions/46/middleclickclose/src/po/template.pot b/extensions/46/middleclickclose/src/po/template.pot index 02cdf11..38cf0e2 100644 --- a/extensions/46/middleclickclose/src/po/template.pot +++ b/extensions/46/middleclickclose/src/po/template.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-02 18:28+0300\n" +"POT-Creation-Date: 2024-07-09 15:57+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -17,39 +17,39 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: src/prefs.js:30 +#: src/prefs.js:31 msgid "Left" msgstr "" -#: src/prefs.js:31 +#: src/prefs.js:32 msgid "Middle" msgstr "" -#: src/prefs.js:32 +#: src/prefs.js:33 msgid "Right" msgstr "" -#: src/prefs.js:33 +#: src/prefs.js:34 msgid "Button 4" msgstr "" -#: src/prefs.js:34 +#: src/prefs.js:35 msgid "Button 5" msgstr "" -#: src/prefs.js:35 +#: src/prefs.js:36 msgid "Button 6" msgstr "" -#: src/prefs.js:36 +#: src/prefs.js:37 msgid "Button 7" msgstr "" -#: src/prefs.js:37 +#: src/prefs.js:38 msgid "Button 8" msgstr "" -#: src/prefs.js:38 +#: src/prefs.js:39 msgid "Button 9" msgstr "" @@ -61,11 +61,19 @@ msgstr "" msgid "Which mouse button triggers closing in overview." msgstr "" +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:22 +msgid "Close with keyboard" +msgstr "" + #: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:23 +msgid "Allow closing windows in overview via keyboard shortcuts." +msgstr "" + +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:28 msgid "Rearrange delay" msgstr "" -#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:24 +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:29 msgid "" "How much time must pass with the pointer not moving for windows in overview " "to rearrange after one was closed." diff --git a/extensions/46/middleclickclose/src/po/uk.po b/extensions/46/middleclickclose/src/po/uk.po index dedc32b..5224afc 100644 --- a/extensions/46/middleclickclose/src/po/uk.po +++ b/extensions/46/middleclickclose/src/po/uk.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gnome-shell-extensions-middleclickclose\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-22 00:00+0300\n" +"POT-Creation-Date: 2024-07-09 15:57+0300\n" "PO-Revision-Date: 2023-10-22 00:00+0300\n" "Last-Translator: Artem Prokop <artem.prokop.dev@gmail.com>\n" "Language-Team: \n" @@ -16,39 +16,39 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: src/prefs.js:30 +#: src/prefs.js:31 msgid "Left" msgstr "Ліва" -#: src/prefs.js:31 +#: src/prefs.js:32 msgid "Middle" msgstr "Середня" -#: src/prefs.js:32 +#: src/prefs.js:33 msgid "Right" msgstr "Права" -#: src/prefs.js:33 +#: src/prefs.js:34 msgid "Button 4" msgstr "Кнопка 4" -#: src/prefs.js:34 +#: src/prefs.js:35 msgid "Button 5" msgstr "Кнопка 5" -#: src/prefs.js:35 +#: src/prefs.js:36 msgid "Button 6" msgstr "Кнопка 6" -#: src/prefs.js:36 +#: src/prefs.js:37 msgid "Button 7" msgstr "Кнопка 7" -#: src/prefs.js:37 +#: src/prefs.js:38 msgid "Button 8" msgstr "Кнопка 8" -#: src/prefs.js:38 +#: src/prefs.js:39 msgid "Button 9" msgstr "Кнопка 9" @@ -60,14 +60,22 @@ msgstr "Кнопка миші для закриття" msgid "Which mouse button triggers closing in overview." msgstr "Яка кнопка миші закриває вікно в оверв'ю" +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:22 +msgid "Close with keyboard" +msgstr "" + #: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:23 +msgid "Allow closing windows in overview via keyboard shortcuts." +msgstr "" + +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:28 msgid "Rearrange delay" msgstr "Затримка перерозташування" -#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:24 +#: src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml:29 msgid "" "How much time must pass with the pointer not moving for windows in overview " "to rearrange after one was closed." msgstr "" -"Скільки часу курсор має не рухатись щоб вікна в оверв'ю перерозташувалися" -" після закриття вікна." +"Скільки часу курсор має не рухатись щоб вікна в оверв'ю перерозташувалися " +"після закриття вікна." diff --git a/extensions/46/middleclickclose/src/prefs.js b/extensions/46/middleclickclose/src/prefs.js index 91d9f13..99d8858 100644 --- a/extensions/46/middleclickclose/src/prefs.js +++ b/extensions/46/middleclickclose/src/prefs.js @@ -18,7 +18,8 @@ import Gtk from 'gi://Gtk'; import GLib from 'gi://GLib'; import GObject from 'gi://GObject'; -import { ExtensionPreferences, gettext as _ } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; +import { ExtensionPreferences, gettext as _ } + from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; export default class MiddleClickClosePreferences extends ExtensionPreferences { getPreferencesWidget() { @@ -43,6 +44,8 @@ export default class MiddleClickClosePreferences extends ExtensionPreferences { step: 50, })); + group.add(this.buildPreference("keyboard-close")) + page.add(group); return page; } @@ -70,7 +73,7 @@ export default class MiddleClickClosePreferences extends ExtensionPreferences { }); row.connect('notify::selected', () => { - setting.activate(GLib.Variant.new_string(range[row.selected])); + setting.change_state(GLib.Variant.new_string(range[row.selected])); }); return row; @@ -79,7 +82,20 @@ export default class MiddleClickClosePreferences extends ExtensionPreferences { opts.upper ??= range[1] } - if (["i"].includes(ty)) { + if (ty == "b") { + let row = new Adw.SwitchRow({ + title: opts.title, + subtitle: opts.subtitle, + active: setting.state.unpack() + }); + + row.connect('notify::active', () => { + setting.change_state(GLib.Variant.new_boolean(row.active)); + }); + + return row; + + } else if (ty == "i") { let adjustment = new Gtk.Adjustment({ lower: opts.lower, upper: opts.upper, @@ -95,7 +111,7 @@ export default class MiddleClickClosePreferences extends ExtensionPreferences { }); adjustment.connect("value-changed", adj => { - setting.activate(GLib.Variant.new_int32(adj.value)); + setting.change_state(GLib.Variant.new_int32(adj.value)); }); return row; diff --git a/extensions/46/middleclickclose/src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml b/extensions/46/middleclickclose/src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml index ebe6dc9..93f3793 100644 --- a/extensions/46/middleclickclose/src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml +++ b/extensions/46/middleclickclose/src/schemas/org.gnome.shell.extensions.middleclickclose.gschema.xml @@ -17,6 +17,11 @@ <summary>Mouse button to close</summary> <description>Which mouse button triggers closing in overview.</description> </key> + <key type="b" name="keyboard-close"> + <default>true</default> + <summary>Close with keyboard</summary> + <description>Allow closing windows in overview via keyboard shortcuts.</description> + </key> <key type="i" name="rearrange-delay"> <default>750</default> <range min="0" max="5000" /> |