diff --git a/chezmoi/.chezmoiignore b/chezmoi/.chezmoiignore index 555511d9..9e4be7e1 100644 --- a/chezmoi/.chezmoiignore +++ b/chezmoi/.chezmoiignore @@ -10,3 +10,4 @@ bootstrap.sh ansible dconf.ini +installed-extensions.txt diff --git a/chezmoi/.chezmoiscripts/run_once_after_50_load-dconf-settings.sh.tmpl b/chezmoi/.chezmoiscripts/run_once_after_50_load-dconf-settings.sh.tmpl index e73ebbc9..23fc1f2c 100644 --- a/chezmoi/.chezmoiscripts/run_once_after_50_load-dconf-settings.sh.tmpl +++ b/chezmoi/.chezmoiscripts/run_once_after_50_load-dconf-settings.sh.tmpl @@ -6,9 +6,11 @@ echo "" echo "===============================================================" echo "" -echo "Loading dconf settings" +echo "Installing extensions and loading dconf settings" echo "" echo "===============================================================" echo "" +cat {{ joinPath .chezmoi.sourceDir "installed-extensions.txt" | quote }} | xargs -I {} gext install {} + dconf load / < {{ joinPath .chezmoi.sourceDir "dconf.ini" | quote }} diff --git a/chezmoi/.chezmoiscripts/run_onchange_30_install_extensions_list.sh.tmpl b/chezmoi/.chezmoiscripts/run_onchange_30_install_extensions_list.sh.tmpl new file mode 100644 index 00000000..5665e5fc --- /dev/null +++ b/chezmoi/.chezmoiscripts/run_onchange_30_install_extensions_list.sh.tmpl @@ -0,0 +1,12 @@ +#!/bin/bash + +echo "" +echo "===============================================================" +echo "" +echo "Reconfiguring Gnome Extensions due to change detected" +echo "" +echo "===============================================================" +echo "" + +# dconf.ini hash: {{ include "installed-extensions.txt" | sha256sum }} +cat {{ joinPath .chezmoi.sourceDir "installed-extensions.txt" | quote }} | xargs -I {} gext install {} diff --git a/chezmoi/dconf.ini b/chezmoi/dconf.ini index 921f26c5..5b8b0852 100644 --- a/chezmoi/dconf.ini +++ b/chezmoi/dconf.ini @@ -9,8 +9,8 @@ width=1254 [apps/update-manager] first-run=false -launch-count=250 -launch-time=int64 1728482895 +launch-count=252 +launch-time=int64 1729751055 show-details=true window-height=574 window-width=534 @@ -26,7 +26,7 @@ window-width=1254 show-percentage=true [com/ubuntu/update-notifier] -release-check-time=uint32 1728288080 +release-check-time=uint32 1729503240 [desktop/ibus/general] preload-engines=['xkb:us::eng'] @@ -36,12 +36,12 @@ version='1.5.22' favorites=['🎤', '🛡', '🔓', '🏗', '⚒️', '🕵️', '🗃️', '👥', '📊', '🔑', '🏡', '🧡', '⛔', '⚠️'] [org/gnome/Characters] -recent-characters=['🤮', '🏎️', '🚩', '👴🏻', '🐸', '✌', '✍🏾', '🗝️', '🔑', '🗃️', '🔓', '💡', '🔒'] +recent-characters=['👋🏾', '🤮', '🏎️', '🚩', '👴🏻', '🐸', '✌', '✍🏾', '🗝️', '🔑', '🗃️', '🔓', '💡', '🔒'] [org/gnome/Extensions] -window-height=1346 -window-maximized=false -window-width=1254 +window-height=331 +window-maximized=true +window-width=304 [org/gnome/TextEditor] highlight-current-line=true @@ -79,7 +79,7 @@ target-currency='DZD' target-units='radian' window-maximized=false window-position=(3526, 189) -window-size=(2560, 1376) +window-size=(1254, 1360) word-size=64 [org/gnome/calendar] @@ -96,8 +96,8 @@ panel-id='world' size=(870, 690) [org/gnome/control-center] -last-panel='network' -window-state=(1254, 1346, false) +last-panel='background' +window-state=(1254, 1360, false) [org/gnome/deja-dup] backend='local' @@ -146,8 +146,8 @@ translate=true [org/gnome/desktop/background] color-shading-type='solid' picture-options='zoom' -picture-uri='file:///home/tmeijn/.local/share/backgrounds/2024-10-08-17-25-05-darkskin-headphone-ai.jpg' -picture-uri-dark='file:///home/tmeijn/.local/share/backgrounds/2024-10-08-17-25-05-darkskin-headphone-ai.jpg' +picture-uri='file:///home/tmeijn/.local/share/backgrounds/2024-10-31-12-23-14-purple-aesthetic-5120x2880-18775.jpg' +picture-uri-dark='file:///home/tmeijn/.local/share/backgrounds/2024-10-31-12-23-14-purple-aesthetic-5120x2880-18775.jpg' primary-color='#000000000000' secondary-color='#000000000000' @@ -179,7 +179,7 @@ show-battery-percentage=true text-scaling-factor=0.89999999999999991 [org/gnome/desktop/notifications] -application-children=['update-manager', 'org-gnome-software', 'google-chrome', 'gnome-shell-extension-prefs', 'slack-slack', 'org-gnome-gedit', 'gnome-power-panel', 'gnome-network-panel', 'apport-gtk', 'redis-desktop-manager-rdm', 'chrome-jjphmlaoffndcnecccgemfdaaoighkel-default', 'org-gnome-nautilus', 'chrome-macmgoeeggnlnmpiojbcniblabkdjphe-default', 'phpstorm-phpstorm', 'code-code', 'gnome-control-center', 'skype-skypeforlinux', 'org-gnome-chromegnomeshell', 'kazam', 'org-gnome-terminal', 'gitkraken-gitkraken', 'org-gnome-eog', 'gnome-printers-panel', 'org-gnome-extensions-desktop', 'nm-connection-editor', 'org-gnome-shell-extensions', 'org-gnome-screenshot', 'flameshot', 'org-gnome-dejadup', 'teams', 'snap-store-ubuntu-software', 'vlc', 'gnome-datetime-panel', 'chrome-fbddfdjileihpefdciilbgplolpcpmgd-default', 'org-gnome-fileroller', 'keybase', 'org-flameshot-flameshot', 'io-snapcraft-sessionagent', 'firefox-firefox', 'teams-for-linux-teams-for-linux', 'nomachine-status', 'terminator', 'slack', 'veracrypt', 'firefox', 'gnome-system-monitor', 'gitdock', 'ca-desrt-dconf-editor', 'org-gnome-baobab', 'io-podman-desktop-podmandesktop', 'xdg-desktop-portal-gnome', 'teams-for-linux', 'org-gnome-texteditor', 'org-wezfurlong-wezterm', 'org-gnome-settings', 'io-github-seadve-kooha', 'org-gnome-calendar', 'org-gnome-shell-portalhelper', 'com-visualstudio-code', 'yelp', 'org-gnome-extensions', 'org-gnome-totem', 'org-gnome-meld', 'app-getclipboard-clipboard', 'kitty', 'code', 'org-gnome-characters', 'snapd-desktop-integration-snapd-desktop-integration'] +application-children=['update-manager', 'org-gnome-software', 'google-chrome', 'gnome-shell-extension-prefs', 'slack-slack', 'org-gnome-gedit', 'gnome-power-panel', 'gnome-network-panel', 'apport-gtk', 'redis-desktop-manager-rdm', 'chrome-jjphmlaoffndcnecccgemfdaaoighkel-default', 'org-gnome-nautilus', 'chrome-macmgoeeggnlnmpiojbcniblabkdjphe-default', 'phpstorm-phpstorm', 'code-code', 'gnome-control-center', 'skype-skypeforlinux', 'org-gnome-chromegnomeshell', 'kazam', 'org-gnome-terminal', 'gitkraken-gitkraken', 'org-gnome-eog', 'gnome-printers-panel', 'org-gnome-extensions-desktop', 'nm-connection-editor', 'org-gnome-shell-extensions', 'org-gnome-screenshot', 'flameshot', 'org-gnome-dejadup', 'teams', 'snap-store-ubuntu-software', 'vlc', 'gnome-datetime-panel', 'chrome-fbddfdjileihpefdciilbgplolpcpmgd-default', 'org-gnome-fileroller', 'keybase', 'org-flameshot-flameshot', 'io-snapcraft-sessionagent', 'firefox-firefox', 'teams-for-linux-teams-for-linux', 'nomachine-status', 'terminator', 'slack', 'veracrypt', 'firefox', 'gnome-system-monitor', 'gitdock', 'ca-desrt-dconf-editor', 'org-gnome-baobab', 'io-podman-desktop-podmandesktop', 'xdg-desktop-portal-gnome', 'teams-for-linux', 'org-gnome-texteditor', 'org-wezfurlong-wezterm', 'org-gnome-settings', 'io-github-seadve-kooha', 'org-gnome-calendar', 'org-gnome-shell-portalhelper', 'com-visualstudio-code', 'yelp', 'org-gnome-extensions', 'org-gnome-totem', 'org-gnome-meld', 'app-getclipboard-clipboard', 'kitty', 'code', 'org-gnome-characters', 'snapd-desktop-integration-snapd-desktop-integration', 'org-gnome-shell-extensions-gsconnect', 'thunderbird-thunderbird'] show-banners=true show-in-lock-screen=false @@ -381,6 +381,9 @@ application-id='teams.desktop' [org/gnome/desktop/notifications/application/terminator] application-id='terminator.desktop' +[org/gnome/desktop/notifications/application/thunderbird-thunderbird] +application-id='thunderbird_thunderbird.desktop' + [org/gnome/desktop/notifications/application/update-manager] application-id='update-manager.desktop' @@ -403,6 +406,8 @@ numlock-state=false speed=0.34558823529411775 [org/gnome/desktop/peripherals/touchpad] +disable-while-typing=true +tap-to-click=false two-finger-scrolling-enabled=true [org/gnome/desktop/privacy] @@ -414,7 +419,7 @@ report-technical-problems=true [org/gnome/desktop/screensaver] color-shading-type='solid' picture-options='zoom' -picture-uri='file:///home/tmeijn/.local/share/backgrounds/2024-10-08-17-25-05-darkskin-headphone-ai.jpg' +picture-uri='file:///home/tmeijn/.local/share/backgrounds/2024-10-31-12-23-14-purple-aesthetic-5120x2880-18775.jpg' primary-color='#000000000000' secondary-color='#000000000000' @@ -603,7 +608,7 @@ search-view='list-view' show-image-thumbnails='always' [org/gnome/nautilus/window-state] -initial-size=(1254, 674) +initial-size=(2560, 1400) maximized=false sidebar-width=210 @@ -676,6 +681,9 @@ last-folder-path='/home/tmeijn/workspace/el-capitano/tutorials-and-courses/go-le [org/gnome/portal/filechooser/gnome-background-panel] last-folder-path='/home/tmeijn/Pictures/Wallpapers' +[org/gnome/portal/filechooser/gnome-control-center] +last-folder-path='/home/tmeijn/Pictures/Wallpapers' + [org/gnome/portal/filechooser/gnome-display-panel] last-folder-path='/home/tmeijn/Pictures/Wallpapers' @@ -686,7 +694,7 @@ last-folder-path='/home/tmeijn/Downloads' last-folder-path='/home/tmeijn/OneDrive/personal' [org/gnome/portal/filechooser/snap.firefox] -last-folder-path='/home/tmeijn/Videos/Screencasts' +last-folder-path='/home/tmeijn/Pictures/Wallpapers' [org/gnome/portal/filechooser/teams-for-linux] last-folder-path='/home/tmeijn/Videos/Kooha' @@ -719,8 +727,8 @@ app-picker-layout=[{'org.gnome.Calculator.desktop': <{'position': <0>}>, 'simple command-history=['r'] disable-extension-version-validation=false disable-user-extensions=false -disabled-extensions=['places-menu@gnome-shell-extensions.gcampax.github.com', 'workspace-indicator@gnome-shell-extensions.gcampax.github.com', 'tiling-assistant@ubuntu.com', 'ding@rastersoft.com', 'CoverflowAltTab@palatis.blogspot.com', 'netspeedsimplified@prateekmedia.extension', 'apps-menu@gnome-shell-extensions.gcampax.github.com', 'freon@UshakovVasilii_Github.yahoo.com', 'rounded-window-corners@fxgn', 'gsconnect@andyholmes.github.io'] -enabled-extensions=['ubuntu-appindicators@ubuntu.com', 'openweather-extension@jenslody.de', 'update-extensions@franglais125.gmail.com', 'clipboard-indicator@tudmotu.com', 'launch-new-instance@gnome-shell-extensions.gcampax.github.com', 'batterypercentageandtime@copong.gmail.com', 'ShellTile@emasab.it', 'putWindow@clemens.lab21.org', 'impatience@gfxmonk.net', 'space-bar@luchrioh', 'auto-move-windows@gnome-shell-extensions.gcampax.github.com', 'user-theme@gnome-shell-extensions.gcampax.github.com', 'workspace-indicator@gnome-shell-extensions.gcampax.github.com', 'just-perfection-desktop@just-perfection', 'gtktitlebar@velitasali.github.io', 'mediacontrols@cliffniff.github.com', 'ubuntu-dock@ubuntu.com', 'openweather-extension@penguin-teal.github.io', 'native-window-placement@gnome-shell-extensions.gcampax.github.com', 'blur-my-shell@aunetx', 'pop-shell@system76.com', 'openbar@neuromorph', 'day-progress@arcaege.github.io', 'dash-to-panel@jderose9.github.com'] +disabled-extensions=['places-menu@gnome-shell-extensions.gcampax.github.com', 'workspace-indicator@gnome-shell-extensions.gcampax.github.com', 'tiling-assistant@ubuntu.com', 'ding@rastersoft.com', 'CoverflowAltTab@palatis.blogspot.com', 'netspeedsimplified@prateekmedia.extension', 'apps-menu@gnome-shell-extensions.gcampax.github.com', 'freon@UshakovVasilii_Github.yahoo.com', 'rounded-window-corners@fxgn', 'gsconnect@andyholmes.github.io', 'ubuntu-dock@ubuntu.com'] +enabled-extensions=['ubuntu-appindicators@ubuntu.com', 'openweather-extension@jenslody.de', 'update-extensions@franglais125.gmail.com', 'clipboard-indicator@tudmotu.com', 'launch-new-instance@gnome-shell-extensions.gcampax.github.com', 'batterypercentageandtime@copong.gmail.com', 'ShellTile@emasab.it', 'putWindow@clemens.lab21.org', 'impatience@gfxmonk.net', 'auto-move-windows@gnome-shell-extensions.gcampax.github.com', 'user-theme@gnome-shell-extensions.gcampax.github.com', 'workspace-indicator@gnome-shell-extensions.gcampax.github.com', 'just-perfection-desktop@just-perfection', 'gtktitlebar@velitasali.github.io', 'mediacontrols@cliffniff.github.com', 'openweather-extension@penguin-teal.github.io', 'native-window-placement@gnome-shell-extensions.gcampax.github.com', 'blur-my-shell@aunetx', 'pop-shell@system76.com', 'openbar@neuromorph', 'day-progress@arcaege.github.io', 'dash-to-panel@jderose9.github.com', 'space-bar@luchrioh'] favorite-apps=['firefox_firefox.desktop'] had-bluetooth-devices-setup=true last-selected-power-profile='power-saver' @@ -1114,8 +1122,8 @@ save-format='application/pdf' selected-device='escl:http://192.168.178.19:8080' [org/gnome/software] -check-timestamp=int64 1728976393 -flatpak-purge-timestamp=int64 1728986764 +check-timestamp=int64 1730361294 +flatpak-purge-timestamp=int64 1730368106 install-timestamp=int64 1680257960 packagekit-historical-updates-timestamp=uint64 1680257960 update-notification-timestamp=int64 1705750277 @@ -1176,5 +1184,5 @@ sort-column='name' sort-directories-first=true sort-order='ascending' type-format='category' -window-position=(26, 23) +window-position=(193, 337) window-size=(908, 680) diff --git a/chezmoi/dot_config/mise/config.toml b/chezmoi/dot_config/mise/config.toml index 11efb51c..ee31ebe2 100644 --- a/chezmoi/dot_config/mise/config.toml +++ b/chezmoi/dot_config/mise/config.toml @@ -19,6 +19,7 @@ pipx = "latest" "pipx:ansible" = "latest" "pipx:ansible-lint" = "latest" "pipx:aws-gate" = "latest" +"pipx:gnome-extensions-cli" = "0.10.3" "pipx:harlequin" = { version = "latest", extras = "postgres" } "pipx:pgcli" = "latest" "pipx:readmeai" = "latest" @@ -29,6 +30,7 @@ pipx = "latest" ################## # Cargo Packages # ################## +"cargo:ag" = "latest" "cargo:bandwhich" = "latest" "cargo:crates-tui" = "latest" "cargo:gitnr" = "latest" @@ -57,5 +59,10 @@ pipx = "latest" ################ "npm:gitlab-ci-local" = "latest" +################ +# UBI Packages # +################ +"ubi:darkhz/bluetuith" = "latest" + [settings] pipx_uvx = true diff --git a/chezmoi/installed-extensions.txt b/chezmoi/installed-extensions.txt new file mode 100644 index 00000000..d599a338 --- /dev/null +++ b/chezmoi/installed-extensions.txt @@ -0,0 +1,15 @@ +auto-move-windows@gnome-shell-extensions.gcampax.github.com +blur-my-shell@aunetx +clipboard-indicator@tudmotu.com +dash-to-panel@jderose9.github.com +day-progress@arcaege.github.io +impatience@gfxmonk.net +just-perfection-desktop@just-perfection +launch-new-instance@gnome-shell-extensions.gcampax.github.com +mediacontrols@cliffniff.github.com +native-window-placement@gnome-shell-extensions.gcampax.github.com +openweather-extension@penguin-teal.github.io +space-bar@luchrioh +ubuntu-appindicators@ubuntu.com +user-theme@gnome-shell-extensions.gcampax.github.com +workspace-indicator@gnome-shell-extensions.gcampax.github.com diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/COPYING b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/COPYING deleted file mode 100644 index e55e5b8a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/COPYING +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/NEWS b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/NEWS deleted file mode 100644 index 716a8894..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/NEWS +++ /dev/null @@ -1,1462 +0,0 @@ -46.2 -==== -* apps-menu: Fix a11y of category labels [Florian; !319] -* window-list: Fix long-press support [Florian; !320] -* Misc. bug fixes and cleanups [Florian; !324] - -Contributors: - Florian Müllner - -Translators: - Hugo Carvalho [pt], Jose Riha [sk], Jordi Mas i Hernandez [ca], - Scrambled 777 [hi] - -46.1 -==== -* screenshot-window-sizer: Add flathub-recommended size [Florian; !317] - -Contributors: - Florian Müllner - -Translators: - Rachida SACI [kab], Matheus Polkorny [pt_BR], Fabio Tomat [fur] - -46.0 -==== -* system-monitor: Fix net speed [Florian; !313] -* Misc. bug fixes and cleanups [Aral; !311] - -Contributors: - Aral Balkan, Florian Müllner - -Translators: - Anders Jonsson [sv], Piotr Drąg [pl], Balázs Úr [hu], Milo Casagrande [it], - Quentin PAGÈS [oc], Athmane MOKRAOUI [kab], Changwoo Ryu [ko], - Ask Hjorth Larsen [da] - -46.rc -===== -* Fix window previews in workspace indicator [Florian; !304] -* Fix menu ornament in workspace indicator [Florian; !305] -* Misc. bug fixes and cleanups [Florian; !306, !309] - -Contributors: - Florian Müllner - -Translators: - Danial Behzadi [fa], Ekaterine Papava [ka], Sabri Ünal [tr], Artur S0 [ru], - Yuri Chornoivan [uk], Vasil Pupkin [be], Asier Sarasua Garmendia [eu], - Yaron Shahrabani [he], Brage Fuglseth [nb], Nathan Follens [nl], - Aurimas Černius [lt], Matej Urbančič [sl], Boyuan Yang [zh_CN], - Kukuh Syafaat [id], Fran Dieguez [gl], Andi Chandler [en_GB], - Baurzhan Muftakhidinov [kk], Rūdolfs Mazurs [lv], Guillaume Bernard [fr], - Daniel Mustieles [es], Jiri Grönroos [fi] - -46.beta -======= -* apps-menu: Rename Applications to Apps [Allan; !299] -* Misc. bug fixes and cleanups [Florian; !296, !297, !300, !301, !302] - -Contributors: - Allan Day, Florian Müllner - -Translators: - Gabriel Brand [de], Daniel Rusek [cs], Fran Dieguez [gl], - Aefgh Threenine [th], Vasil Pupkin [be], Artur S0 [ru], Yosef Or Boczko [he], - Sabri Ünal [tr] - -46.alpha -======== -* workspace-indicator: Fix initial preview visibility [Florian; !280, !292] -* screenshot-window-sizer: Fix cycling between sizes backwards [Florian; !284] -* Add back overview in Classic session [Florian; !287] -* Allow running Classic session headless [Jonas; !289] -* window-list: Fix buttons not being clickable at the screen edge - [Florian; !291] -* Add system-monitor extension [Florian; !277] -* Fixed crash [Florian; !290] -* Misc. bug fixes and cleanups [Florian; !276, !275, !278, !281, !286, !288] - -Contributors: - Jonas Ådahl, Florian Müllner - -Translators: - Kristjan SCHMIDT [eo], Brage Fuglseth [nb] - -45.0 -==== - -Contributors: - Andre Klapper - -Translators: - Bruce Cowan [en_GB] - -45.rc -===== -* Misc. bug fixes and cleanups [Florian; !267, !224, !272] - -Contributors: - Florian Müllner - -Translators: - Sabri Ünal [tr], Florentina Musat [ro], A S Alam [pa] - -45.beta -======= -* Port extensions to ESM [Florian; !259, !266, !268, !269] -* Misc. bug fixes and cleanups [Florian; !260, !261, !262, !263, !264] - -Contributors: - Florian Müllner - -Translators: - Efstathios Iosifidis [el] - -45.alpha -======== -* window-list: Modernize default styling [Alexander; !253] -* Replace classic styling with built-in light style [Florian; !254] -* window-list: Add tooltip for long window titles [Arik; !251] -* light-style: New extension [Florian; !256] -* Misc. bug fixes and cleanups [Florian; !255, !257] - -Contributors: - Florian Müllner, Arik W, Alexander Weichart - -44.0 -==== -* Bump version - -44.rc -===== -* Bump version - -44.beta -======= -* Tweak menu alignment [robxnano; !246] - -Contributors: - Florian Müllner, robxnano - -Translators: - Vasil Pupkin [be] - -43.1 -==== -* Fixed crash [Florian; !243] -* Misc. bug fixes and cleanups [mowemcfc; !244] - -Contributors: - Florian Müllner, mowemcfc - -Translators: - Sabri Ünal [tr] - -43.0 -==== - -Contributors: - Florian Müllner - -Translators: - Pawan Chitrakar [ne], Zurab Kargareteli [ka], Aleksandr Melman [ru] - -43.rc -===== -* Misc. bug fixes and cleanups [Florian; !240] - -Contributors: - Florian Müllner - -43.beta -======= -* Misc. bug fixes and cleanups [Florian; !237, !238] - -Contributors: - Florian Müllner - -Translators: - Nart Tlisha [ab] - -43.alpha -======== - -Contributors: - Florian Müllner - -Translators: - Marco Ciampa [it] - -42.3 -==== -* screenshot-window-sizer: Fix reported sizes on wayland [Florian; !232] -* window-list: Improve touch support [Florian; !233] - -Contributors: - Florian Müllner - -42.2 -==== -* native-window-placement: Adjust to gnome-shell 42 changes [Florian; !229] -* window-list: Fix visibility on non-primary monitors [Jason; !230] - -Contributors: - Jason Lynch, Florian Müllner - -Translators: - Cheng-Chia Tseng [zh_TW] - -42.1 -==== -* Misc. bug fixes and cleanups [Florian; !223, !222, !225] - -Contributors: - Florian Müllner - -Translators: - Milo Casagrande [it], Rūdolfs Mazurs [lv], Nathan Follens [nl], - Ngọc Quân Trần [vi], Zurab Kargareteli [ka] - -42.0 -==== - -Translators: - Philipp Kiemle [de], Balázs Úr [hu], Марко Костић [sr], sicklylife [ja], - Baurzhan Muftakhidinov [kk] - -42.rc -===== -* Misc. bug fixes and cleanups [Florian; !215, !218] - -Contributors: - Florian Müllner - -Translators: - Marek Černocký [cs], Dušan Kazik [sk], Piotr Drąg [pl], Jiri Grönroos [fi], - Luna Jernberg [sv], Alan Mortensen [da], Charles Monzat [fr], - Changwoo Ryu [ko] - -42.beta -======= -* workspace-indicator: Fix cancelling editing with Esc [Florian; !208] -* window-list: Update window tracking to avoid missing icons [Florian; !207] -* Use libadwaita for preferences [Florian; !209, !213] -* Adapt to Clutter grab API changes [Florian; !212] -* Misc. bug fixes and cleanups [Jan, Florian; !210, !214] - -Contributors: - Jan Beich, Florian Müllner, Naala Nanba - -Translators: - Boyuan Yang [zh_CN], Matej Urbančič [sl], Naala Nanba [ab], - Alexander Shopov [bg], Emin Tufan Çetin [tr] - -42.alpha -======== -* native-window-placement: Fix distorted layout in app grid [Sebastian; !189] -* window-list: Fix on-screen keyboard [Florian; !199] -* Misc. bug fixes and cleanups [Neal; Just; !195, !197] - -Contributors: - Piotr Drąg, Neal Gompa, Sebastian Keller, Florian Müllner, Just Perfection - -Translators: - Goran Vidović [hr], Sveinn í Felli [is], Yuri Chornoivan [uk], - Fabio Tomat [fur], Quentin PAGÈS [oc], Hugo Carvalho [pt], - Yaron Shahrabani [he], Jordi Mas i Hernandez [ca], MohammadSaleh Kamyab [fa], - Fran Dieguez [gl], Daniel Mustieles [es], Aleksandr Melman [ru], - Aurimas Černius [lt], Asier Sarasua Garmendia [eu], Kukuh Syafaat [id], - Rafael Fontenelle [pt_BR] - -41.0 -==== -* Bump version - -41.rc.1 -======= -* Fix pre-generating stylesheets in tarball [Florian; !190] - -Contributors: - Florian Müllner - -41.rc -===== -* window-list: Adapt to overview-on-startup [Florian; !185] -* apps-menu: Use a custom 'toggle-menu' shortcut [Florian; !173] -* Misc. bug fixes and cleanups [Florian; !186] - -Contributors: - Florian Müllner - -41.beta -======= -* window-list: Extend reactive area of minimap to screen edges [Adam; !171] -* drive-menu: Improve detection of network mounts [Florian; !27, !176] -* Use distinct gettext domain for e.g.o uploads [Florian; #335] -* Misc. bug fixes and cleanups [Florian; !172, !174, !177, !167, !178, !180, - !181, !182, !183] - -Contributors: - Marco Trevisan (Treviño), Adam Goode, Florian Müllner - -Translators: - Hugo Carvalho [pt], Juliano de Souza Camargo [pt], Alexander Shopov [bg] - -40.1 -==== -* Disable welcome dialog in classic session [Florian; !169] -* windowsNavigator: Adjust to a late gnome-shell change [Florian; !170] - -Contributors: - Florian Müllner - -Translators: - Ngọc Quân Trần [vi], Anders Jonsson [sv], Carmen Bianca BAKKER [eo], - Pawan Chitrakar [ne], Quentin PAGÈS [oc] - -40.0 -==== - -Translators: - Jiri Grönroos [fi] - -40.rc -===== -* native-window-placement: Adjust to gnome-shell changes [Florian; !164] -* windows-navigator: Adjust to gnome-shell changes [Florian; !163] -* window-list, workspace-indicator: Only show previews for up to six workspaces - [Florian; !165] -* window-list, workspace-indicator: Improve workspace preview appearance - [Florian; !166] - -Contributors: - Florian Müllner - -Translators: - Fran Dieguez [gl] - -40.beta -======= -* Add tooltips to workspace thumbnails [Florian; !155] -* Drop arrows from top bar menus [Florian; !156] -* drive-menu: Mark mounts that can be unmounted as removable [Michael; !152] -* Remove horizontal-workspaces extension [Florian; !158] -* Adjust to shell overview changes [Florian; !159, !160] -* Fix crashes [Daniel; !157] -* Misc. bug fixes and cleanups [Florian; !154, !161] - -Contributors: - Michael Lawton, Florian Müllner, Daniel van Vugt - -Translators: - Аляксей [be], A S Alam [pa] - -40.alpha.1 -========== -* Don't depend on sassc when building from tarball [Florian; !150] -* Port extensions preferences to GTK4 [Florian; !148] -* Misc. bug fixes and cleanups [Florian, Jonas; !149, !151, !153] - -Contributors: - Jonas Dreßler, Florian Müllner - -40.alpha -======== -* window-list: Honor changes in skip-taskbar property [Sergio; !130] -* window-list, workspace-indicator: Adjust to 3.38 changes [Florian; !133] -* window-list, workspace-indicator: Improve previews in workspace thumbs - [Florian; #260, !142] -* auto-move: Improve behavior on multi-monitor setups [Florian; !135] -* windowNavigator: Adjust to 3.38 changes [Thun; #259] -* Misc. bug fixes and cleanups [Florian, Jonas Å, Jordan, Ray; !131, !136, - !137, !140, !141, !144, !146, !145] - -Contributors: - Sergio Costas, Florian Müllner, Jordan Petridis, Thun Pin, Ray Strode, - Jonas Ådahl - -Translators: - Fabio Tomat [fur], Jordi Mas [ca] - -3.38.1 -====== - -Contributors: - Yacine Bouklif, Florian Müllner - -Translators: - Yacine Bouklif [kab], Cheng-Chia Tseng [zh_TW], Stas Solovey [ru], - Yosef Or Boczko [he] - -3.38.0 -====== - -Translators: - Balázs Meskó [hu], Alan Mortensen [da], Juliano Camargo [pt], Tim Sabsch [de], - Milo Casagrande [it], Rūdolfs Mazurs [lv] - -3.37.92 -======= - -Translators: - Nathan Follens [nl], Zander Brown [en_GB], Aurimas Černius [lt], - Marek Černocký [cs], Changwoo Ryu [ko], Dušan Kazik [sk] - -3.37.91 -======= - -Contributors: - Florian Müllner - -Translators: - Fran Dieguez [gl], Akarshan Biswas [bn_IN], Kukuh Syafaat [id], - Piotr Drąg [pl], Rafael Fontenelle [pt_BR], Jiri Grönroos [fi], - Марко Костић [sr], Goran Vidović [hr] - -3.37.90 -======= -* Misc. bug fixes and cleanups [Florian, Piotr; !126, !128] - -Contributors: - Piotr Drąg, Florian Müllner - -Translators: - Fabio Tomat [fur], Efstathios Iosifidis [el], Anders Jonsson [sv], - Asier Sarasua Garmendia [eu], Alexandre Franke [fr] - -3.37.3 -====== -* window-list, native-window-placement: Adjust to shell changes [Florian; !124] - -Contributors: - Florian Müllner - -Translators: - Jordi Mas [ca], sicklylife [ja], Boyuan Yang [zh_CN], - Baurzhan Muftakhidinov [kk] - -3.37.2 -====== -* window-list, auto-move: Modernize preference dialogs [Florian; !121] -* Adjust to gnome-shell changes [Florian; !122] - -Contributors: - Florian Müllner - -Translators: - Cheng-Chia Tseng [zh_TW], Yuri Chornoivan [uk], Daniel Mustieles [es], - Emin Tufan Çetin [tr], Danial Behzadi [fa], Daniel Șerbănescu [ro], - Matej Urbančič [sl] - -3.37.1 -====== -* drive-menu: Emphasize eject buttons [Florian; #223] -* user-theme: Add preference dialog [Florian; !117] -* window-list: Fix inconsistent state in preference dialog [Milan; !119] -* workspace-indicator: Overhaul preference dialog [Florian; !120] -* user-theme: Support session mode styles [Florian; !118] -* Misc. bug fixes and cleanups [Florian, Xiaoguang; !113, !106, !114, !116] - -Contributors: - Milan Crha, Florian Müllner, Xiaoguang Wang - -Translators: - Daniel Korostil [uk], Yosef Or Boczko [he], Kristjan SCHMIDT [eo], - Dz Chen [zh_CN], Danial Behzadi [fa], Yuri Chornoivan [uk], - Anders Jonsson [sv], Daniel Mustieles [es] - -3.36.0 -====== - -Contributors: - Florian Müllner - -3.35.91 -======= - -Contributors: - Florian Müllner - -Translators: - Zander Brown [en_GB] - -3.35.90 -======= -* Adjust to gnome-shell changes [Florian; !100, !101, !102] -* Force single-line window titles in window list [Florian; #202] -* Misc. bug fixes and cleanup [Florian; !104, !105] - -Contributors: - Florian Müllner - -Translators: - sicklylife [ja], Umarzuki Bin Mochlis Moktar [ms] - -3.35.3 -====== - -Translators: - Fran Dieguez [gl] - -3.35.2 -====== -* Adjust to gnome-shell changes [Marco, Florian; !89, !95, !96] -* window-list, workspace-indicator: Exclude DESKTOP windows from previews - [Florian; !93] -* screenshot-window-sizer: Fix cycling through all valid sizes [Willy; !97] - -Contributors: - Marco Trevisan (Treviño), Florian Müllner, Willy Stadnick - -3.34.1 -====== -* Adjust to gnome-settings-daemon plugin removals [Xiaoguang; !94] - -Contributors: - Florian Müllner, Xiaoguang Wang - -Translators: - Nathan Follens [nl], Dušan Kazik [sk], Ask Hjorth Larsen [da], - Yi-Jyun Pan [zh_TW] - -3.34.0 -====== - -Translators: - Rafael Fontenelle [pt_BR], Efstathios Iosifidis [el], Milo Casagrande [it], - Sabri Ünal [tr] - -3.33.92 -======= - -Translators: - Марко Костић [sr], Tim Sabsch [de], Rūdolfs Mazurs [lv], Matej Urbančič [sl], - Balázs Úr [hu], Claude Paroz [fr], Fran Dieguez [gl], Changwoo Ryu [ko], - Ryuta Fujii [ja], Fabio Tomat [fur], Goran Vidović [hr] - -3.33.91 -======= -* Misc. bug fixes and cleanups [Florian; !88, !90, !91, !92] - -Contributors: - Florian Müllner - -Translators: - Asier Sarasua Garmendia [eu], Anders Jonsson [sv], Marek Černocký [cs], - Kukuh Syafaat [id], Jiri Grönroos [fi], Florentina Mușat [ro], - Aurimas Černius [lt], Daniel Mustieles [es], Piotr Drąg [pl], Jordi Mas [ca], - Danial Behzadi [fa] -3.33.90 -======= -* window-list: Support showing windows from all workspaces [Florian; #154] -* Misc. bug fixes and cleanups [Florian; !86, !87] - -Contributors: - Florian Müllner - -Translators: - Jor Teron [mjw] - -3.33.4 -====== -* Make GNOME Classic more classic: - - Disable GNOME 3 overview [Florian; !69] - - Add window picker button to window list [Florian; !73, !80] - - Style improvements and fixes [Jakub; #169, !82] - - Support horizontal workspace layout in window list [Florian; !70] - - Add draggable previews to window list workspace switcher [Florian; !74] - - Arrange workspaces horizontally [Florian; !72] -* workspace-indicator: Support horizontal workspace layout [Florian; !71] -* workspace-indicator: Add draggable previews [Florian; !77] -* Misc. bug fixes and cleanups [Florian; !75, !76, !79, !78, #168, !84] - -Contributors: - Florian Müllner, Jakub Steiner, Jor Teron - -Translators: - Jor Teron [mjw] - -3.33.3 -====== -* Misc. bug fixes [Florian, Marco; !67, !68] - -Contributors: - Florian Müllner, Marco Trevisan (Treviño) - -3.33.2 -====== -* Misc. bug fixes and cleanups [Florian; !66] - -Contributors: - Florian Müllner - -3.33.1 -====== -* Misc. bug fixes [Florian; !64] - -Contributors: - Florian Müllner - -3.32.1 -====== -* Fix windowsNavigator extension after ES6 port [Florian; #143] -* screenshot-window-sizer: Add phone screenshot sizes [Adrien; !65] -* Misc. bug fixes and cleanups [Fabian; !62] - -Contributors: - Florian Müllner, Adrien Plazas, Fabian P. Schmidt - -3.32.0 -====== - -Contributors: - Florian Müllner - -Translations: - Victor Ibragimov [tg], Kristjan SCHMIDT [eo], Mart Raudsepp [et] - -3.31.92 -======= -* Misc. bug fixes and cleanups [Florian; !57, !58, !59, !60] - -Contributors: - Florian Müllner - -3.31.91 -======= -* apps-menu: Remove outdated legacy-tray handling [Florian; !53] -* user-theme: Allow using XDG user data dir [Tomasz; !55] -* Misc. bug fixes and cleanups [Florian; !52, !54, !56] - -Contributors: - Tomasz Gąsior, Florian Müllner - -Translators: - Matej Urbančič [sl], Gun Chleoc [gd] - -3.31.90 -======= -* Misc. bug fixes and cleanups [Florian; !49, !50, !51] - -Contributors: - Florian Müllner - -Translators: - Ryuta Fujii [ja], Charles Monzat [fr], Pieter Schalk Schoeman [af] - -3.31.2 -====== -* Remove obsolete alternate-tab extension [Florian; #786496] -* Adjust to gnome-shell changes [Florian; #113] - -Contributors: - Florian Müllner - -3.30.1 -====== -* apps-menu: Fix height on HiDPI systems [Florian; #102] -* window-list: Only switch between windows on active workspace when scrolling - [Florian; #78] - -Contributors: - Florian Müllner - -3.30.0 -====== -* Bump version - -3.29.91 -======= -* Misc. bug fixes [Florian; #90] - -Contributors: - Florian Müllner - -3.29.90 -======= -* Misc. bug fixes [Florian; #786496] - -Contributors: - Florian Müllner - -3.29.3 -====== -* Adjust to global.screen removal [Jonas; #759538] - -Contributors: - Jonas Ådahl, Florian Müllner - -3.29.2 -====== -* Misc. bug fixes [Florian; #69] - -Contributors: - Florian Müllner - -3.28.1 -====== -* Misc. bug fixes [Xiaoguang, Florian; #59, #62] - -Contributors: - Florian Müllner, Xiaoguang Wang - -Translators: - Dz Chen [zh_CN] - -3.28.0 -====== - -Contributors: - Florian Müllner, Xiaoguang Wang - -Translators: - Aman Alam [pa], Bruce Cowan [en_GB] - -3.27.92 -======= - -Contributors: - Florian Müllner - -Translators: - Piotr Drąg [es], GNOME Translation Robot [gd], Daniel Șerbănescu [ro] - -3.27.91 -======= -* places-menu: Support unmounting ejectable places [Rémy; #17] -* apps-menu: Support separators and custom sort order [Florian; #27] -* Port to meson [Florian; #31, #45] -* window-list: Fix missing icons on wayland [Florian; #10] -* places-menu: Fix terminating gnome-shell with recent gjs [Florian; #44] -* auto-move: Make it work with wayland windows [Florian; #33] -* Classic theme fixes [Florian, Jonas; #26, #41, #39, #40] -* Require sassc for classic styling [Florian; !28] -* Misc. bug fixes [Piotr, Florian; #772211, #32, #30] - -Contributors: - Jeremy Bicha, Piotr Drąg, Jonas Kümmerlin, Rémy Lefevre, Iñigo Martínez, - Florian Müllner - -Translators: - Matej Urbančič [sl], Kjartan Maraas [nb] - -3.27.1 -====== -* updated translations (ca@valencia) - -3.26.1 -====== -* native-window-placement: Adjust to gnome-shell changes -* updated translations: el, fa, ru, sv - -3.26.0 -====== -* updated translations (be, bg, ca, da, eu, fi, is, it, ko, lv, ml, - nl, pt_BR, vi, zh_TW) - -3.25.91 -======= -* updated translations (ca, fr, it, pl, pt_BR, sr, sr@latin, tr) - -3.25.90 -======= -* updated translations (es, gl, hr, hu, kk, sl, sv, sv) - -3.25.4 -====== -* screenshot-window-sizer: Fix backward cycling -* updated translations (ar, be, ca, cs, de, fur, id, lt, pl, sk) - -3.25.3 -====== -* places-menu: Use mount operation if necessary -* window-list: Respect MWM hints -* updated translations (es, fur, kk) - -3.25.2 -====== -* places-menu: Make URI launching asynchronous -* updated translations (de, fur, hr, hu, id, sl) - -3.25.1 -====== -* apps-menu: Mark copied launchers as trusted -* places-menu: Make icon lookup asynchronous -* updated translations (hr) - -3.24.1 -====== -* apps-menu: Allow creating desktop launchers via DND -* updated translations (el, vi) - -3.24.0 -====== -* updated translations (lv, tr) - -3.23.92 -======= -* update classic theme -* updated translations (be, ko, ca, da, cs, ru, lt) - -3.23.91 -======= -* updated translations (de, es, eu, fi, fr, fur, gl, hu, id, it, kk, nb, pl, pt_BR, - sk, sr, sr@latin, sv, uk, zh_TW) - -3.23.90 -======= -* window-list: Improve styling -* window-list: Hide workspace indicator when there's a single (static) workspace -* new translation (be) - -3.23.2 -====== -* alternateTab: Don't take over 'switch-group' shortcut -* updated translations (zh_CN) - -3.22.1 -====== -* window-list: Update icon on app changes - -3.22.0 -====== -* updated translations (en_GB) - -3.21.92 -======= -* update style -* updated translations (pl, vi) - -3.21.91 -======= -* updated translations (pl) - -3.21.90 -======= -* updated translations (es, gu) - -3.21.4 -====== -* apps-menu: Fix entries from non-standard AppDir directories - -3.21.3 -====== -* adjust to gnome-shell changes -* updated translations (oc) - -3.21.2 -====== -* version bump, nothing to see here - -3.20.1 -====== -* update classic style -* updated translations (gd, oc) - -3.20.0 -====== -* version bump, nothing to see here - -3.19.92 -======= -* version bump, nothing to see here - -3.19.91 -======= -* updated translations (oc) - -3.19.90 -======= -* version bump, nothing to see here - -3.19.4 -====== -* screenshot-window-sizer: HiDPI support -* Fix gnome-shell component in classic session -* updated translations (lt) - -3.19.3 -====== -* native-window-placement: Don't let border overlap title -* apps-menu: Fix handling of .desktop files in subdirectories -* updated translations (is) - -3.19.2 -====== -* updated translations (gd) - -3.19.1 -====== -* Fix some theme issues - -3.18.1 -====== -* window-list: Fix accessibility of window buttons -* apps-menu: Fix unreliable highlight -* updated translations (ar) - -3.18.0 -====== -* Bump version - -3.17.92 -======= -* places: Include DESKTOP when desktop icons are enabled -* updated translations (fa) - -3.17.91 -======= -* updated translations (nl, pl, zh_TW) - -3.17.90 -======= -* window-list: Improve application ordering -* workspace-indicator: Use consistent workspace numbering - -3.17.4 -====== -* updated translations (fur) - -3.17.3 -====== -* window-list: Adjust with text-scaling-factor -* classic style updates -* updated translations (pt, ro) - -3.17.2 -====== -* updated translations (oc, pt, zh_CN) - -3.17.1 -====== -* style updates -* updated translations (oc) - -3.16.1 -====== -* window-list: Fix workspace indicators popup menu position -* apps-menu: Fix taking over panel-main-menu shortcut -* updated translations (et, ja, lv) - -3.16.0 -====== -* updated translations (ca) - -3.15.92 -======= -* classic: Update theme -* update for mutter API changes -* updated translations (bg, bs, da, fi, pa, ru, sr, sr@latin, tg) - -3.15.91 -======= -* classic: Update theme -* systemMonitor extension was removed, as the message tray where it - put its indicator no longer exists -* window-list: Adjust for gnome-shell changes -* updated translations (gl, it, kk, ko, lt, pl, sk, uk, zh_TW) - -3.15.90 -======= -* classic: Visual refresh based on new shell theme -* window-list: Adjust for gnome-shell changes -* updated translations (an, el, eo, eu, fr, he, is, sv, tr) - -3.15.4 -====== -* window-list: Improve interaction with system modal dialogs -* updated translations (cs, de, es, eu, fur, hu, id, nb, pt_BR, ru, sl, vi) - -3.15.3.1 -======== -* adjust to gnome-shell change - -3.15.3 -====== -* classic-mode: Add high-contrast theme variant, drop .desktop file -* places-menu: Fix error when XDG user directories are not set up -* window-list: Add option to show on all monitors -* updated translations (eu, hu, kk, ro, tr) - -3.15.2 -====== -* removable-drive, user-theme, window-list: Update for gnome-shell changes -* apps-menu: Fix some visual glitches -* Fix classic mode style -* updated translations (an, cs, he, vi) - -3.15.1 -====== - * updated translations (es, nb) - -3.14.1 -====== - * alternateTab: Fix dismissing popup with Escape - * some improvements to the window-list - (spacing in app buttons, no flash when closing windows with auto-grouping) - * updated translations (lv, it, pt, bg) - -3.14.0 -====== - * updated translations (bn_IN, hi, kn, sr, sr@latin, uk) - -3.13.92 -======= -* new extension: screenshot-window-sizer -* window-list: Don't add sticky windows more than once -* updated translations (da, de, fi, ko, mr, ms, ne, pa, pl, sk, sv, ta, te, tr) - -3.13.91 -======= -* window-list: restore fitts'ability of workspace button -* updated for gnome-shell changes -* updated translations (cs, kk, fr, or, fa, ja, gu, id) - -3.13.90 -======= -* updated translations (as, ca, eu, nl, zh_CN, zh_HK, zh_TW) - -3.13.4 -====== -* Updated for gnome-shell changes -* updated translations (el, gl, ru) - -3.13.3 -====== -* Tweak preference UIs some more -* Fix classic mode schema overrides -* updated translations (es, he, hu, lt, nb, pt_BR, sl, tr) - -3.13.2 -====== -* Fix sorting of grouped buttons in window list -* Tweak preference UIs -* updated translations (en_GB) - -3.13.1 -====== -* add DesktopNames key to the classic session file -* classic theme: remove rounded corners from tile previews -* window-list: don't shift message tray on other monitors -* auto-move-windows: several fixes and updates for api changes -* launch-new-instances: updates for api changes -* updated translations (ja, km) - -3.12.0 -====== -* updated translations (zh_HK, zh_TW) - -3.11.92 -======= -* nothing to see here, move on - -3.11.91 -======= -* updated translations (ko, fur) - -3.11.90 -======= -* several fixes and improvements to the window-list - (can be scrolled, works correctly with the OSD - keyboard, filters skip-taskbar windows, does not - force all notifications to bold) -* drive-menu fixed not to show shadowed mounts -* updates for gnome-shell changes (launch-new-instance, - auto-move-windows, places-menu) -* build system fixes for systems without /bin/bash -* updated translations (or, tr, uk) - -3.11.5 -====== -* updates for gnome-shell changes -* updated translations (kn) - -3.11.4 -====== -* classic mode now supports session saving -* updates for gnome-shell changes -* updated translations (ar, kn) - -3.11.3 -====== -* workspace-indicator is vertically aligned now -* updated translations (ar, eo, ta, te) - -3.11.2 -====== -* updated translations (zh_CN) - -3.11.1 -====== -* ignore shadowed mounts in drive-menu extension -* updates for gnome-shell/gjs changes -* updated translations (el, th) - -3.10.1 -====== -* updated translations (af, ca, ca@valencia, de, et, eu, fa, - hu, lt, lv, nb, nl, pa, pt, sk, sr, sr@latin, tr) - -3.10.0 -====== -* updated translations (as, cs, da, es, et, fi, fr, gl, - he, id, it, kk, lt, lv, pa, pl, pt, pt_BR, ru, sl, tg, - uk, zh_HK, zh_TW) - -3.9.92 -====== -* more updates and fixes for gnome-shell master changes - and regressions (systemMonitor, window-list, apps-menu) -* lots of updated translations (ar, as, cs, da, de, el, es, - eu, fi, gl, he, hu, it, ja, kk, ko, lv, nb, nl, pa, pl, - pt_BR, ru, sk, sr, sr@latin, ta, tg) - -3.9.91 -====== -* update the classic mode session and theme to work with the - new system menu -* the usual round of updates and fixes for gnome-shell - API changes -* updated translations (de, it, lt, nl, pl, pt_BR, sk, - zh_HK, zh_TW) - -3.9.90 -====== -* xrandr-indicator was removed, as the implementation - was incompatible with the new DisplayConfig mutter API -* various extensions were updated for the 3.9.90 gnome-shell API -* updated translations (cs, es, fur, gl, he, hu, id, ja, sl, tg, - zh_CN, zh_HK, zh_TW) - -3.9.5 -===== -* alternative-status-menu was removed entirely, as - it does not fit in the designs of the new unified - status menu -* updated translations (as, gu, it, ru) - -3.9.4 -===== -* apps-menu: fixed handling of hot corner in case - of screen reconfiguration -* alternative-status-menu now correctly honors polkit - for hibernation -* user-menu now loads themes from $XDG_DATA_HOME too -* translation updates (de, id, pt_BR, vi, zh_CN, ml) - -3.9.3 -===== -* classic mode mini extensions were replaced with a - GSettings override specified in the .json file -* styling of classic mode improved -* native-window-placement is back working on 3.9 -* misc bug fixes -* traslation updates (an, cs, el, es, gl, nb, pl, sk, tg) - -3.9.2 -===== -* apps-menu: appearance of the scrollbars was improved -* window-list is a little taller in classic mode (to account - for the workspace switcher) -* alternative-status-menu honors again the dconf configuration -* translation updates (sr) - -3.9.1 -===== -* updates to window-list, xrandr-indicator, - workspace-indicator, windowsNavigator for gnome-shell - changes -* translation updates (cs, es, lt, pl, pt_BR, sl) - -3.8.1 -===== -* many improvements to window-list: - - windows are activated by DND over them - - window buttons now have the right size, - even if the text is smaller or larger - than the ideal - - window buttons can be grouped automatically - when the panel becomes crowded - - added a workspace switcher menu -* added keyboard navigation to apps-menu -* small tweaks to classic-mode theme, in particular - for menus -* translation updates (gl, ko, sr) - -3.8.0 -===== -* translation updates (hu, ja, fi, it) - -3.7.92 -====== -* misc bug fixes to app-menu and window-list -* translation updates (de, sl, pt_BR, ru) - -3.7.91 -====== -* various updates for shell changes -* update window-list to always use application icons -* update apps-menu to not load subdirectories as - separate categories -* translation updates (lt, zh_CN) - -3.7.90 -====== -* various fixes to make places-menu behave more - like Nautilus, including showing the machine - name in place of File System -* various updates for shell changes -* alternative-status-menu no longer supports - ConsoleKit systems, you need to install logind - to have suspend or hibernate -* translation updates (es, cz, pl, sr) - -3.7.5.1 -======= -* new extension forgotten in previous NEWS entry: - windows-list -* also forgotten previously: classic mode got a new - GNOME2 style -* build fixes - -3.7.5 -===== -* places-menu is back in the classic extensions, with - a new old GNOME-2 look -* classic mode moved the date menu to right, where we - all know it rightly belongs -* apps-menu received a face-lift, with the inclusion - of a reduced form of AxeMenu -* new extension in the classic set: launch-new-instance, - which modifies the behavior of clicking in the dash - and app launcher -* alternate-tab, native-window-placement and windowsNavigator - updated for gnome-shell changes -* translation updates (es, cz, pl) - -3.7.4 -===== -* a separate configure switch has been added to enable - classic mode session definitions -* places-menu is no longer part of the classic-mode - extension set -* updated translations (ar, gl, hu, lt, pt_BR, sr) - -3.7.3 -===== -* new extensions: default-min-max, static-workspaces -* alternate-tab now uses the built-in window switcher and just - takes over the switch-application keybinding -* workspace-indicator: is no longer part of classic-mode -* we now install classic-mode data files for gdm, gnome-session - and gnome-shell, so if you enable classic-mode you get a new - session option in GDM -* updated translations (ar, es, pl, ru, sl, zh_HK, zh_TW) - -3.7.2 -===== -* fixed crashes with places-menu, windowsNavigator, alternate-tab - and native-window-placement -* alternate-tab now hides attached modal dialogs -* places-menu has restored support for Nautilus 3.4 -* the default for hibernate is now to show in alternative-status-menu -* some extensions are now tagged as "classic", and can be chosen with - --enable-extensions=classic-mode -* dock and gajim were removed at the beginning of the 3.7.1 cycle, - as they were buggy and unmaintained -* updated translations (ar, cs, de, el, es, gl, id, lt, lv, pa, pl - ru, sk, sl, sr, sr@latin) - -3.6.1 -===== -* fixed alternative-status-menu for the new lock screen -* squashed some alternate-tab warnings -* drive-menu now works with 3.6 again -* updated translations (ar, cs, el, es, gl, id, lv, pl, sl) - -3.6.0 -===== -* major rework in places menu, to make it work without - removed supporting code in the shell and to make it look like - the nautilus sidebar - (similar work would be needed for drive-menu, not done yet) -* updated translations (ca, cs, de, el, en_GB, es, fi, hu, id, lt, - pl, pt_BR, ru, sl, sr) - -3.5.91 -====== -* various crashers were fixed in alternative-tab -* auto-move-windows now can be made to work with static workspaces -* place-menu is now on the left and uses symbolic icons like Files -* StIconType usage was removed from all extensions, after it was - removed in core -* systemMonitor, xrandr-indicator, apps-menu, places-menu, - alternative-status-menu were updated for the newer shell -* updated translations (es, gl, it, pl, sl) - -3.5.90 -====== -* alternate-tab has been reworked again, the old mode switch - was removed and the all&thumbnails code extended to handle - icons and filtering to the workspace -* alternate-tab thumbnails now reflect the aspect ratio of the windows -* systemMonitor now shows a tooltip above the indicator -* native-window-placement, systemMonitor and windowsNavigator have been updated - for the newer shell -* updated translations (es, pa) - -3.5.5 -===== -* convenience module has been relicensed to BSD, - for compatibility with GPLv3 extensions -* alternate-tab has been refactored and seen various - improvements to all&thumbnails mode, including a new - overlaid application icon -* updated translations (lt, id, sr) - -3.5.4 -===== -* updated translations (de, es, ar, sl, lv, zh_CN) - -3.5.2 -===== -* removable-drive-menu is now a11y friendly -* the dock can now be placed on any monitor, not just the primary -* dock is now clipped to its monitor -* alternative-status-menu now exposes GSettings for Suspend - and Hibernate visibility - no UI yet -* more gnome-shell API changes (places-menu, removable-drive-menu, - alternative-status-menu) -* miscellaneous bug fixes (native-window-placement, gajim, - auto-move-windows) -* updated translations - -3.4.0 -===== -* build system improvements -* updated translations (ar, cs, fr) - -3.3.92 -====== -* various updates for gnome-shell API changes (dock, - native-window-placement) -* local-install is now a make rule, not a shell script -* updated translations (zh, es, sw, ga, hu, it, no, pt_BR, de, sl, - pl, la, fi, sr) - -3.3.90 -====== -* system wide installation via "make install" is possible - again -* alternate-tab can now pre-activate the selected window -* auto-move-windows, workspace-indicator and example gained - new preference dialogs -* workspace-indicator: fixed a bug wrt focus stealing prevention -* updated translations (es, pt_BR, it, sl, gl, sr) - -3.3.5 -===== -* improvements to the build system and convenience module, - making it easier for other extensions to use, and bringing - it up to date with gnome-shell changes -* all extensions were ported to the Lang.Class framework - (except xrandr-indicator, which is pending GDBus merge) -* alternate-tab and dock were slightly refactored to clean up - some old code - -3.3.4 -===== -* improved styling of windowsNavigator tooltips -* fixed windowsNavigator when used with the numeric keypad -* fixed native-window-placement with custom button layout -* updated translations (pt_BR, cz) - -3.3.3 -===== -* windowsNavigator was fixed to work with azerty keyboards -* drive-menu was changed to use media-eject icon instead of media-optical -* dock: the default value of hide-effect is now move -* dock: if autohide is disabled, now it pushes maximized windows aside -* dock was updated to match current core shell styling -* native-window-placement: position stategy setting was removed -* alternative-status-menu no longer conflicts with other extensions - in the user menu -* various other minor bug fixes -* updated translations (zh, uk, es, it, cz, sl, sk, fi) - -3.3.2 -===== -* all extensions are now self-contained, including l10n and settings -* introduce a convenience module that can be shared among all extensions -* you can know build an installable zip file with make zip-file -* apps-menu no longer shows NoDisplay apps -* alternative-status-menu, alternate-tab: fix for master shell - -3.2.1 -===== -* dock: added "move" hide effect -* systemMonitor: now it enables/disables properly -* systemMonitor: improved styling -* alternate-tab: both modes now work with gnome-shell 3.2 -* various other bug fixes -* updated translations - -3.2.0 -===== - -* various: update for gnome-shell API changes - -3.1.91 -====== - -* gajim: update for gnome-shell API changes - -3.1.90 -====== - -* All extensions have been ported to the new extension - system (including live enable/disable) -* Updated translations -* xrandr-indicator no longer requires a specific gjs version -* windowsNavigator fixed for more than 2 workspaces - -3.1.4 -===== - -* New extension: a menu for changing workspace (workspace-indicator) -* systemMonitor: lower the requirement on libgtop -* auto-move-windows: open overview when last window on - last workspace is closed -* dock: implement autohiding, with various configurable - effects -* alternate-tab: more configurable implementations available -* native-window-placement: don't rearrange the windows when - the workspace switcher is shown/hidden -* update for gnome-shell 3.1.4 API changes - -3.1.3 -===== - -* New extension: a menu for removable drives (drive-menu -* New extensions: GNOME 2 like menus for apps and places - (apps-menu, places-menu) -* New extension: additional configurability for the window - layout in the overview, including a mechanism similar to - KDE4 (native-window-placement) -* New extension: a message tray indicator for CPU and memory - usage (uses libgtop) (systemMonitor) -* user-theme: fixed resetting theme -* user-theme: support themes installed in /usr/share/themes -* alternative-status-menu: ported to gnome-shell master -* dock: ported to gnome-shell master -* dock: make position configurable (can be left or right) -* Updated translations - -3.0.2 -===== - -* Updated translations. -* Fixed bug #647386 (reverting of user-theme to default) -* Fixed bug #647599 (support globally installed themes) -* Added license and README diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/extension.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/extension.js deleted file mode 100644 index 17bcf3b5..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/extension.js +++ /dev/null @@ -1,664 +0,0 @@ -// SPDX-FileCopyrightText: 2011 Vamsi Krishna Brahmajosyula -// SPDX-FileCopyrightText: 2011 Giovanni Campagna -// SPDX-FileCopyrightText: 2013 Debarshi Ray -// SPDX-FileCopyrightText: 2013 Florian Müllner -// -// SPDX-License-Identifier: GPL-2.0-or-later - -/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ -import Atk from 'gi://Atk'; -import Clutter from 'gi://Clutter'; -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GMenu from 'gi://GMenu'; -import GObject from 'gi://GObject'; -import Gtk from 'gi://Gtk'; -import Meta from 'gi://Meta'; -import Shell from 'gi://Shell'; -import St from 'gi://St'; -import {EventEmitter} from 'resource:///org/gnome/shell/misc/signals.js'; - -import {Extension, gettext as _} from 'resource:///org/gnome/shell/extensions/extension.js'; - -import * as DND from 'resource:///org/gnome/shell/ui/dnd.js'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import * as PanelMenu from 'resource:///org/gnome/shell/ui/panelMenu.js'; -import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js'; - -const appSys = Shell.AppSystem.get_default(); - -const APPLICATION_ICON_SIZE = 32; -const HORIZ_FACTOR = 5; -const MENU_HEIGHT_OFFSET = 132; -const NAVIGATION_REGION_OVERSHOOT = 50; - -Gio._promisify(Gio._LocalFilePrototype, 'query_info_async', 'query_info_finish'); -Gio._promisify(Gio._LocalFilePrototype, 'set_attributes_async', 'set_attributes_finish'); - -class ApplicationMenuItem extends PopupMenu.PopupBaseMenuItem { - static { - GObject.registerClass(this); - } - - constructor(button, app) { - super(); - this._app = app; - this._button = button; - - this._iconBin = new St.Bin(); - this.add_child(this._iconBin); - - let appLabel = new St.Label({ - text: app.get_name(), - y_expand: true, - y_align: Clutter.ActorAlign.CENTER, - }); - this.add_child(appLabel); - this.label_actor = appLabel; - - let textureCache = St.TextureCache.get_default(); - textureCache.connectObject('icon-theme-changed', - () => this._updateIcon(), this); - this._updateIcon(); - - this._delegate = this; - let draggable = DND.makeDraggable(this); - - let maybeStartDrag = draggable._maybeStartDrag; - draggable._maybeStartDrag = event => { - if (this._dragEnabled) - return maybeStartDrag.call(draggable, event); - return false; - }; - } - - activate(event) { - this._app.open_new_window(-1); - this._button.selectCategory(null); - this._button.menu.toggle(); - super.activate(event); - - Main.overview.hide(); - } - - setActive(active, params) { - if (active) - this._button.scrollToButton(this); - super.setActive(active, params); - } - - setDragEnabled(enabled) { - this._dragEnabled = enabled; - } - - getDragActor() { - return this._app.create_icon_texture(APPLICATION_ICON_SIZE); - } - - getDragActorSource() { - return this._iconBin; - } - - _updateIcon() { - let icon = this.getDragActor(); - icon.style_class = 'icon-dropshadow'; - this._iconBin.set_child(icon); - } -} - -class CategoryMenuItem extends PopupMenu.PopupBaseMenuItem { - static { - GObject.registerClass(this); - } - - constructor(button, category) { - super(); - this._category = category; - this._button = button; - - this._oldX = -1; - this._oldY = -1; - - let name; - if (this._category) - name = this._category.get_name(); - else - name = _('Favorites'); - - const label = new St.Label({text: name}); - this.add_child(label); - this.actor.label_actor = label; - - this.connect('motion-event', this._onMotionEvent.bind(this)); - this.connect('notify::active', this._onActiveChanged.bind(this)); - } - - activate(event) { - this._button.selectCategory(this._category); - this._button.scrollToCatButton(this); - super.activate(event); - } - - _isNavigatingSubmenu([x, y]) { - let [posX, posY] = this.get_transformed_position(); - - if (this._oldX === -1) { - this._oldX = x; - this._oldY = y; - return true; - } - - let deltaX = Math.abs(x - this._oldX); - let deltaY = Math.abs(y - this._oldY); - - this._oldX = x; - this._oldY = y; - - // If it lies outside the x-coordinates then it is definitely outside. - if (posX > x || posX + this.width < x) - return false; - - // If it lies inside the menu item then it is definitely inside. - if (posY <= y && posY + this.height >= y) - return true; - - // We want the keep-up triangle only if the movement is more - // horizontal than vertical. - if (deltaX * HORIZ_FACTOR < deltaY) - return false; - - // Check whether the point lies inside triangle ABC, and a similar - // triangle on the other side of the menu item. - // - // +---------------------+ - // | menu item | - // A +---------------------+ C - // P | - // B - - // Ensure that the point P always lies below line AC so that we can - // only check for triangle ABC. - if (posY > y) { - let offset = posY - y; - y = posY + this.height + offset; - } - - // Ensure that A is (0, 0). - x -= posX; - y -= posY + this.height; - - // Check which side of line AB the point P lies on by taking the - // cross-product of AB and AP. See: - // http://stackoverflow.com/questions/3461453/determine-which-side-of-a-line-a-point-lies - if (this.width * y - NAVIGATION_REGION_OVERSHOOT * x <= 0) - return true; - - return false; - } - - _onMotionEvent(actor, event) { - if (!this._grab) { - this._oldX = -1; - this._oldY = -1; - const grab = global.stage.grab(this); - if (grab.get_seat_state() !== Clutter.GrabState.NONE) - this._grab = grab; - else - grab.dismiss(); - } - this.hover = true; - - if (this._isNavigatingSubmenu(event.get_coords())) - return true; - - this._oldX = -1; - this._oldY = -1; - this.hover = false; - this._grab?.dismiss(); - delete this._grab; - - const targetActor = global.stage.get_event_actor(event); - if (targetActor instanceof St.Widget) - targetActor.sync_hover(); - - return false; - } - - _onActiveChanged() { - if (!this.active) - return; - - this._button.selectCategory(this._category); - this._button.scrollToCatButton(this); - } -} - -class ApplicationsMenu extends PopupMenu.PopupMenu { - constructor(sourceActor, arrowAlignment, arrowSide, button) { - super(sourceActor, arrowAlignment, arrowSide); - this._button = button; - } - - isEmpty() { - return false; - } - - toggle() { - if (this.isOpen) - this._button.selectCategory(null); - super.toggle(); - } -} - -class DesktopTarget extends EventEmitter { - constructor() { - super(); - - this._desktop = null; - this._desktopDestroyedId = 0; - - this._windowAddedId = - global.window_group.connect('child-added', - this._onWindowAdded.bind(this)); - - global.get_window_actors().forEach(a => { - this._onWindowAdded(a.get_parent(), a); - }); - } - - get hasDesktop() { - return this._desktop !== null; - } - - _onWindowAdded(group, actor) { - if (!(actor instanceof Meta.WindowActor)) - return; - - if (actor.meta_window.get_window_type() === Meta.WindowType.DESKTOP) - this._setDesktop(actor); - } - - _setDesktop(desktop) { - if (this._desktop) { - this._desktop.disconnectObject(this); - delete this._desktop._delegate; - } - - this._desktop = desktop; - this.emit('desktop-changed'); - - if (this._desktop) { - this._desktop.connectObject('destroy', () => { - this._setDesktop(null); - }, this); - this._desktop._delegate = this; - } - } - - _getSourceAppInfo(source) { - if (!(source instanceof ApplicationMenuItem)) - return null; - return source._app.app_info; - } - - async _markTrusted(file) { - let modeAttr = Gio.FILE_ATTRIBUTE_UNIX_MODE; - let trustedAttr = 'metadata::trusted'; - let queryFlags = Gio.FileQueryInfoFlags.NONE; - let ioPriority = GLib.PRIORITY_DEFAULT; - - try { - let info = await file.query_info_async(modeAttr, queryFlags, ioPriority, null); - - let mode = info.get_attribute_uint32(modeAttr) | 0o100; - info.set_attribute_uint32(modeAttr, mode); - info.set_attribute_string(trustedAttr, 'yes'); - await file.set_attributes_async(info, queryFlags, ioPriority, null); - - // Hack: force nautilus to reload file info - info = new Gio.FileInfo(); - info.set_attribute_uint64( - Gio.FILE_ATTRIBUTE_TIME_ACCESS, GLib.get_real_time()); - try { - await file.set_attributes_async(info, queryFlags, ioPriority, null); - } catch (e) { - log(`Failed to update access time: ${e.message}`); - } - } catch (e) { - log(`Failed to mark file as trusted: ${e.message}`); - } - } - - destroy() { - global.window_group.disconnectObject(this); - this._setDesktop(null); - } - - handleDragOver(source, _actor, _x, _y, _time) { - let appInfo = this._getSourceAppInfo(source); - if (!appInfo) - return DND.DragMotionResult.CONTINUE; - - return DND.DragMotionResult.COPY_DROP; - } - - acceptDrop(source, _actor, _x, _y, _time) { - let appInfo = this._getSourceAppInfo(source); - if (!appInfo) - return false; - - this.emit('app-dropped'); - - let desktop = GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_DESKTOP); - - let src = Gio.File.new_for_path(appInfo.get_filename()); - let dst = Gio.File.new_for_path(GLib.build_filenamev([desktop, src.get_basename()])); - - try { - // copy_async() isn't introspectable :-( - src.copy(dst, Gio.FileCopyFlags.OVERWRITE, null, null); - this._markTrusted(dst); - } catch (e) { - log(`Failed to copy to desktop: ${e.message}`); - } - - return true; - } -} - -class MainLayout extends Clutter.BoxLayout { - static { - GObject.registerClass(this); - } - - vfunc_get_preferred_height(container, forWidth) { - const [mainChild] = container; - const [minHeight, natHeight] = - mainChild.get_preferred_height(forWidth); - - return [minHeight, natHeight + MENU_HEIGHT_OFFSET]; - } -} - -class ApplicationsButton extends PanelMenu.Button { - static { - GObject.registerClass(this); - } - - constructor() { - super(1.0, null, false); - - this.setMenu(new ApplicationsMenu(this, 1.0, St.Side.TOP, this)); - Main.panel.menuManager.addMenu(this.menu); - - // At this moment applications menu is not keyboard navigable at - // all (so not accessible), so it doesn't make sense to set as - // role ATK_ROLE_MENU like other elements of the panel. - this.accessible_role = Atk.Role.LABEL; - - this._label = new St.Label({ - text: _('Apps'), - y_expand: true, - y_align: Clutter.ActorAlign.CENTER, - }); - - this.add_child(this._label); - this.name = 'panelApplications'; - this.label_actor = this._label; - - Main.overview.connectObject( - 'showing', () => this.add_accessible_state(Atk.StateType.CHECKED), - 'hiding', () => this.remove_accessible_state(Atk.StateType.CHECKED), - this); - - Main.wm.addKeybinding( - 'apps-menu-toggle-menu', - Extension.lookupByURL(import.meta.url).getSettings(), - Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, - Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW, - () => this.menu.toggle()); - - this._desktopTarget = new DesktopTarget(); - this._desktopTarget.connect('app-dropped', () => { - this.menu.close(); - }); - this._desktopTarget.connect('desktop-changed', () => { - this._applicationsButtons.forEach(item => { - item.setDragEnabled(this._desktopTarget.hasDesktop); - }); - }); - - this._tree = new GMenu.Tree({menu_basename: 'applications.menu'}); - this._tree.connectObject('changed', - () => this._onTreeChanged(), this); - - this._applicationsButtons = new Map(); - this.reloadFlag = false; - this._createLayout(); - this._display(); - appSys.connectObject('installed-changed', - () => this._onTreeChanged(), this); - } - - _onTreeChanged() { - if (this.menu.isOpen) { - this._redisplay(); - this.mainBox.show(); - } else { - this.reloadFlag = true; - } - } - - _onDestroy() { - super._onDestroy(); - - delete this._tree; - - Main.wm.removeKeybinding('apps-menu-toggle-menu'); - - this._desktopTarget.destroy(); - } - - _onMenuKeyPress(actor, event) { - let symbol = event.get_key_symbol(); - if (symbol === Clutter.KEY_Left || symbol === Clutter.KEY_Right) { - let direction = symbol === Clutter.KEY_Left - ? Gtk.DirectionType.LEFT : Gtk.DirectionType.RIGHT; - if (this.menu.actor.navigate_focus(global.stage.key_focus, direction, false)) - return true; - } - return super._onMenuKeyPress(actor, event); - } - - _onOpenStateChanged(menu, open) { - if (open) { - if (this.reloadFlag) { - this._redisplay(); - this.reloadFlag = false; - } - this.mainBox.show(); - } - super._onOpenStateChanged(menu, open); - } - - _redisplay() { - this.applicationsBox.destroy_all_children(); - this.categoriesBox.destroy_all_children(); - this._display(); - } - - _loadCategory(categoryId, dir) { - let iter = dir.iter(); - let nextType; - while ((nextType = iter.next()) !== GMenu.TreeItemType.INVALID) { - if (nextType === GMenu.TreeItemType.ENTRY) { - let entry = iter.get_entry(); - let id; - try { - id = entry.get_desktop_file_id(); // catch non-UTF8 filenames - } catch (e) { - continue; - } - let app = appSys.lookup_app(id); - if (!app) - app = new Shell.App({app_info: entry.get_app_info()}); - if (app.get_app_info().should_show()) - this.applicationsByCategory[categoryId].push(app); - } else if (nextType === GMenu.TreeItemType.SEPARATOR) { - this.applicationsByCategory[categoryId].push('separator'); - } else if (nextType === GMenu.TreeItemType.DIRECTORY) { - let subdir = iter.get_directory(); - if (!subdir.get_is_nodisplay()) - this._loadCategory(categoryId, subdir); - } - } - } - - scrollToButton(button) { - let appsScrollBoxAdj = this.applicationsScrollBox.get_vadjustment(); - let appsScrollBoxAlloc = this.applicationsScrollBox.get_allocation_box(); - let currentScrollValue = appsScrollBoxAdj.get_value(); - let boxHeight = appsScrollBoxAlloc.y2 - appsScrollBoxAlloc.y1; - let buttonAlloc = button.get_allocation_box(); - let newScrollValue = currentScrollValue; - if (currentScrollValue > buttonAlloc.y1 - 10) - newScrollValue = buttonAlloc.y1 - 10; - if (boxHeight + currentScrollValue < buttonAlloc.y2 + 10) - newScrollValue = buttonAlloc.y2 - boxHeight + 10; - if (newScrollValue !== currentScrollValue) - appsScrollBoxAdj.set_value(newScrollValue); - } - - scrollToCatButton(button) { - let catsScrollBoxAdj = this.categoriesScrollBox.get_vadjustment(); - let catsScrollBoxAlloc = this.categoriesScrollBox.get_allocation_box(); - let currentScrollValue = catsScrollBoxAdj.get_value(); - let boxHeight = catsScrollBoxAlloc.y2 - catsScrollBoxAlloc.y1; - let buttonAlloc = button.get_allocation_box(); - let newScrollValue = currentScrollValue; - if (currentScrollValue > buttonAlloc.y1 - 10) - newScrollValue = buttonAlloc.y1 - 10; - if (boxHeight + currentScrollValue < buttonAlloc.y2 + 10) - newScrollValue = buttonAlloc.y2 - boxHeight + 10; - if (newScrollValue !== currentScrollValue) - catsScrollBoxAdj.set_value(newScrollValue); - } - - _createLayout() { - let section = new PopupMenu.PopupMenuSection(); - this.menu.addMenuItem(section); - this.mainBox = new St.BoxLayout({layoutManager: new MainLayout()}); - this.leftBox = new St.BoxLayout({vertical: true}); - this.applicationsScrollBox = new St.ScrollView({ - style_class: 'apps-menu vfade', - x_expand: true, - }); - this.categoriesScrollBox = new St.ScrollView({ - style_class: 'vfade', - }); - this.leftBox.add_child(this.categoriesScrollBox); - - this.applicationsBox = new St.BoxLayout({vertical: true}); - this.applicationsScrollBox.set_child(this.applicationsBox); - this.categoriesBox = new St.BoxLayout({vertical: true}); - this.categoriesScrollBox.set_child(this.categoriesBox); - - this.mainBox.add_child(this.leftBox); - this.mainBox.add_child(this.applicationsScrollBox); - section.actor.add_child(this.mainBox); - } - - _display() { - this._applicationsButtons.clear(); - this.mainBox.hide(); - - // Load categories - this.applicationsByCategory = {}; - this._tree.load_sync(); - let root = this._tree.get_root_directory(); - let categoryMenuItem = new CategoryMenuItem(this, null); - this.categoriesBox.add_child(categoryMenuItem); - let iter = root.iter(); - let nextType; - while ((nextType = iter.next()) !== GMenu.TreeItemType.INVALID) { - if (nextType !== GMenu.TreeItemType.DIRECTORY) - continue; - - let dir = iter.get_directory(); - if (dir.get_is_nodisplay()) - continue; - - let categoryId = dir.get_menu_id(); - this.applicationsByCategory[categoryId] = []; - this._loadCategory(categoryId, dir); - if (this.applicationsByCategory[categoryId].length > 0) { - categoryMenuItem = new CategoryMenuItem(this, dir); - this.categoriesBox.add_child(categoryMenuItem); - } - } - - // Load applications - this._displayButtons(this._listApplications(null)); - } - - selectCategory(dir) { - this.applicationsBox.get_children().forEach(c => { - if (c._delegate instanceof PopupMenu.PopupSeparatorMenuItem) - c._delegate.destroy(); - else - this.applicationsBox.remove_child(c); - }); - - if (dir) - this._displayButtons(this._listApplications(dir.get_menu_id())); - else - this._displayButtons(this._listApplications(null)); - } - - _displayButtons(apps) { - for (let i = 0; i < apps.length; i++) { - let app = apps[i]; - let item; - if (app instanceof Shell.App) - item = this._applicationsButtons.get(app); - else - item = new PopupMenu.PopupSeparatorMenuItem(); - if (!item) { - item = new ApplicationMenuItem(this, app); - item.setDragEnabled(this._desktopTarget.hasDesktop); - this._applicationsButtons.set(app, item); - } - if (!item.get_parent()) - this.applicationsBox.add_child(item); - } - } - - _listApplications(categoryMenuId) { - let applist; - - if (categoryMenuId) { - applist = this.applicationsByCategory[categoryMenuId]; - } else { - applist = global.settings.get_strv('favorite-apps') - .map(id => appSys.lookup_app(id)) - .filter(app => app); - } - - return applist; - } -} - -export default class AppsMenuExtension extends Extension { - enable() { - this._appsMenuButton = new ApplicationsButton(); - const index = Main.sessionMode.panel.left.indexOf('activities') + 1; - Main.panel.addToStatusArea( - 'apps-menu', this._appsMenuButton, index, 'left'); - } - - disable() { - Main.panel.menuManager.removeMenu(this._appsMenuButton.menu); - this._appsMenuButton.destroy(); - delete this._appsMenuButton; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ab/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ab/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index ae0330e2..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ab/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/af/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/af/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index f49084b7..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/af/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/an/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/an/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index f7c2a1c1..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/an/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ar/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ar/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 8abf71b6..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ar/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/as/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/as/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index f5da5426..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/as/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/be/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/be/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 42078553..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/be/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/bg/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/bg/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index da84c33d..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/bg/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/bn_IN/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/bn_IN/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 3b93b6c1..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/bn_IN/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/bs/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/bs/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 07f6c095..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/bs/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ca/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ca/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 26910644..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ca/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ca@valencia/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ca@valencia/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index fe27d198..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ca@valencia/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/cs/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/cs/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 9ac0a336..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/cs/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/da/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/da/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 5af763e9..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/da/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/de/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/de/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index ccf9c10e..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/de/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/el/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/el/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 5a2496e9..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/el/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/en_GB/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/en_GB/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index f2ffce15..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/en_GB/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/eo/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/eo/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 214054fd..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/eo/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/es/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/es/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 24af9c4f..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/es/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/et/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/et/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index a26a2849..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/et/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/eu/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/eu/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index e3ab6eb8..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/eu/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/fa/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/fa/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index f5d109f0..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/fa/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/fi/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/fi/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index c48d6306..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/fi/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/fr/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/fr/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 0f30f25b..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/fr/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/fur/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/fur/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 590bec24..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/fur/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/gd/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/gd/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 2ceeacc9..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/gd/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/gl/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/gl/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index a84cfd1f..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/gl/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/gu/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/gu/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index c7d7b8dc..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/gu/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/he/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/he/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 4bebfb0f..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/he/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/hi/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/hi/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 6cb610fd..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/hi/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/hr/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/hr/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index c9163273..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/hr/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/hu/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/hu/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 76a6d5be..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/hu/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/id/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/id/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 68ccde62..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/id/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/is/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/is/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index a80625e7..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/is/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/it/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/it/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index d72c0965..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/it/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ja/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ja/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 5da92b63..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ja/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ka/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ka/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 99f2d0ab..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ka/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/kab/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/kab/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index c8774aa4..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/kab/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/kk/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/kk/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 5b1ccb2c..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/kk/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/km/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/km/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 8934c15b..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/km/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/kn/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/kn/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index b4b475b1..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/kn/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ko/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ko/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 80ebc28e..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ko/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/lt/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/lt/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 25e2b2e9..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/lt/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/lv/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/lv/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 712d001b..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/lv/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/mjw/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/mjw/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 48ef5c31..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/mjw/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ml/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ml/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index f6b3a484..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ml/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/mr/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/mr/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index c2db72aa..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/mr/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ms/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ms/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index c5868c0c..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ms/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/nb/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/nb/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index c26d442a..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/nb/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ne/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ne/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 58e923e3..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ne/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/nl/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/nl/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index b4b79d13..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/nl/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/oc/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/oc/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 0af5897e..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/oc/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/or/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/or/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 925ae9bd..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/or/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/pa/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/pa/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index aee5c05d..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/pa/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/pl/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/pl/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 6638c6c0..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/pl/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/pt/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/pt/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 6f14d323..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/pt/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/pt_BR/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/pt_BR/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 9079ad21..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/pt_BR/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ro/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ro/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index ac3e81e0..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ro/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ru/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ru/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 9a59edc8..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ru/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/sk/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/sk/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 22ac3959..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/sk/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/sl/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/sl/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 2f129a46..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/sl/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/sr/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/sr/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 529c4ed9..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/sr/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/sr@latin/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/sr@latin/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index c494d36a..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/sr@latin/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/sv/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/sv/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index c6696e9b..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/sv/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ta/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ta/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 2cd5ab3d..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/ta/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/te/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/te/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index b03c2b17..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/te/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/tg/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/tg/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 2d961196..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/tg/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/th/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/th/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index d5fe9950..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/th/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/tr/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/tr/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 66101213..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/tr/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/uk/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/uk/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index d32b1567..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/uk/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/vi/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/vi/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index b52d0ed3..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/vi/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/zh_CN/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/zh_CN/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index dfd06813..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/zh_CN/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/zh_HK/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/zh_HK/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 4e1b326a..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/zh_HK/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/zh_TW/LC_MESSAGES/gnome-shell-extension-apps-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/zh_TW/LC_MESSAGES/gnome-shell-extension-apps-menu.mo deleted file mode 100644 index 846eae9b..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/locale/zh_TW/LC_MESSAGES/gnome-shell-extension-apps-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/private_metadata.json b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/private_metadata.json deleted file mode 100644 index b6c70f95..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/private_metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "_generated": "Generated by SweetTooth, do not edit", - "description": "Add a category-based menu for apps.\nThis extension is part of Classic Mode and is officially supported by GNOME. Please do not report bugs using the form below, use GNOME's GitLab instance instead.", - "extension-id": "apps-menu", - "gettext-domain": "gnome-shell-extension-apps-menu", - "name": "Apps Menu", - "original-authors": [ - "e2002@bk.ru", - "debarshir@gnome.org" - ], - "settings-schema": "org.gnome.shell.extensions.apps-menu", - "shell-version": [ - "46" - ], - "url": "https://gitlab.gnome.org/GNOME/gnome-shell-extensions", - "uuid": "apps-menu@gnome-shell-extensions.gcampax.github.com", - "version": 59 -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/schemas/gschemas.compiled b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/schemas/gschemas.compiled deleted file mode 100644 index 2a1bd6e9..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/schemas/gschemas.compiled and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/schemas/org.gnome.shell.extensions.apps-menu.gschema.xml b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/schemas/org.gnome.shell.extensions.apps-menu.gschema.xml deleted file mode 100644 index 6930ecc0..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/schemas/org.gnome.shell.extensions.apps-menu.gschema.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - ["<Alt>F1"] - Keybinding to open the applications menu - - Keybinding to open the applications menu. - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/stylesheet.css b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/stylesheet.css deleted file mode 100644 index 16eed17b..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/stylesheet.css +++ /dev/null @@ -1,15 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2013 Florian Müllner - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ - -.apps-menu {width: 26em;} - -.apps-menu:ltr { - padding-right: 3px; -} - -.apps-menu:rtl { - padding-left: 3px; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/COPYING b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/COPYING deleted file mode 100644 index e55e5b8a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/COPYING +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/NEWS b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/NEWS deleted file mode 100644 index 716a8894..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/NEWS +++ /dev/null @@ -1,1462 +0,0 @@ -46.2 -==== -* apps-menu: Fix a11y of category labels [Florian; !319] -* window-list: Fix long-press support [Florian; !320] -* Misc. bug fixes and cleanups [Florian; !324] - -Contributors: - Florian Müllner - -Translators: - Hugo Carvalho [pt], Jose Riha [sk], Jordi Mas i Hernandez [ca], - Scrambled 777 [hi] - -46.1 -==== -* screenshot-window-sizer: Add flathub-recommended size [Florian; !317] - -Contributors: - Florian Müllner - -Translators: - Rachida SACI [kab], Matheus Polkorny [pt_BR], Fabio Tomat [fur] - -46.0 -==== -* system-monitor: Fix net speed [Florian; !313] -* Misc. bug fixes and cleanups [Aral; !311] - -Contributors: - Aral Balkan, Florian Müllner - -Translators: - Anders Jonsson [sv], Piotr Drąg [pl], Balázs Úr [hu], Milo Casagrande [it], - Quentin PAGÈS [oc], Athmane MOKRAOUI [kab], Changwoo Ryu [ko], - Ask Hjorth Larsen [da] - -46.rc -===== -* Fix window previews in workspace indicator [Florian; !304] -* Fix menu ornament in workspace indicator [Florian; !305] -* Misc. bug fixes and cleanups [Florian; !306, !309] - -Contributors: - Florian Müllner - -Translators: - Danial Behzadi [fa], Ekaterine Papava [ka], Sabri Ünal [tr], Artur S0 [ru], - Yuri Chornoivan [uk], Vasil Pupkin [be], Asier Sarasua Garmendia [eu], - Yaron Shahrabani [he], Brage Fuglseth [nb], Nathan Follens [nl], - Aurimas Černius [lt], Matej Urbančič [sl], Boyuan Yang [zh_CN], - Kukuh Syafaat [id], Fran Dieguez [gl], Andi Chandler [en_GB], - Baurzhan Muftakhidinov [kk], Rūdolfs Mazurs [lv], Guillaume Bernard [fr], - Daniel Mustieles [es], Jiri Grönroos [fi] - -46.beta -======= -* apps-menu: Rename Applications to Apps [Allan; !299] -* Misc. bug fixes and cleanups [Florian; !296, !297, !300, !301, !302] - -Contributors: - Allan Day, Florian Müllner - -Translators: - Gabriel Brand [de], Daniel Rusek [cs], Fran Dieguez [gl], - Aefgh Threenine [th], Vasil Pupkin [be], Artur S0 [ru], Yosef Or Boczko [he], - Sabri Ünal [tr] - -46.alpha -======== -* workspace-indicator: Fix initial preview visibility [Florian; !280, !292] -* screenshot-window-sizer: Fix cycling between sizes backwards [Florian; !284] -* Add back overview in Classic session [Florian; !287] -* Allow running Classic session headless [Jonas; !289] -* window-list: Fix buttons not being clickable at the screen edge - [Florian; !291] -* Add system-monitor extension [Florian; !277] -* Fixed crash [Florian; !290] -* Misc. bug fixes and cleanups [Florian; !276, !275, !278, !281, !286, !288] - -Contributors: - Jonas Ådahl, Florian Müllner - -Translators: - Kristjan SCHMIDT [eo], Brage Fuglseth [nb] - -45.0 -==== - -Contributors: - Andre Klapper - -Translators: - Bruce Cowan [en_GB] - -45.rc -===== -* Misc. bug fixes and cleanups [Florian; !267, !224, !272] - -Contributors: - Florian Müllner - -Translators: - Sabri Ünal [tr], Florentina Musat [ro], A S Alam [pa] - -45.beta -======= -* Port extensions to ESM [Florian; !259, !266, !268, !269] -* Misc. bug fixes and cleanups [Florian; !260, !261, !262, !263, !264] - -Contributors: - Florian Müllner - -Translators: - Efstathios Iosifidis [el] - -45.alpha -======== -* window-list: Modernize default styling [Alexander; !253] -* Replace classic styling with built-in light style [Florian; !254] -* window-list: Add tooltip for long window titles [Arik; !251] -* light-style: New extension [Florian; !256] -* Misc. bug fixes and cleanups [Florian; !255, !257] - -Contributors: - Florian Müllner, Arik W, Alexander Weichart - -44.0 -==== -* Bump version - -44.rc -===== -* Bump version - -44.beta -======= -* Tweak menu alignment [robxnano; !246] - -Contributors: - Florian Müllner, robxnano - -Translators: - Vasil Pupkin [be] - -43.1 -==== -* Fixed crash [Florian; !243] -* Misc. bug fixes and cleanups [mowemcfc; !244] - -Contributors: - Florian Müllner, mowemcfc - -Translators: - Sabri Ünal [tr] - -43.0 -==== - -Contributors: - Florian Müllner - -Translators: - Pawan Chitrakar [ne], Zurab Kargareteli [ka], Aleksandr Melman [ru] - -43.rc -===== -* Misc. bug fixes and cleanups [Florian; !240] - -Contributors: - Florian Müllner - -43.beta -======= -* Misc. bug fixes and cleanups [Florian; !237, !238] - -Contributors: - Florian Müllner - -Translators: - Nart Tlisha [ab] - -43.alpha -======== - -Contributors: - Florian Müllner - -Translators: - Marco Ciampa [it] - -42.3 -==== -* screenshot-window-sizer: Fix reported sizes on wayland [Florian; !232] -* window-list: Improve touch support [Florian; !233] - -Contributors: - Florian Müllner - -42.2 -==== -* native-window-placement: Adjust to gnome-shell 42 changes [Florian; !229] -* window-list: Fix visibility on non-primary monitors [Jason; !230] - -Contributors: - Jason Lynch, Florian Müllner - -Translators: - Cheng-Chia Tseng [zh_TW] - -42.1 -==== -* Misc. bug fixes and cleanups [Florian; !223, !222, !225] - -Contributors: - Florian Müllner - -Translators: - Milo Casagrande [it], Rūdolfs Mazurs [lv], Nathan Follens [nl], - Ngọc Quân Trần [vi], Zurab Kargareteli [ka] - -42.0 -==== - -Translators: - Philipp Kiemle [de], Balázs Úr [hu], Марко Костић [sr], sicklylife [ja], - Baurzhan Muftakhidinov [kk] - -42.rc -===== -* Misc. bug fixes and cleanups [Florian; !215, !218] - -Contributors: - Florian Müllner - -Translators: - Marek Černocký [cs], Dušan Kazik [sk], Piotr Drąg [pl], Jiri Grönroos [fi], - Luna Jernberg [sv], Alan Mortensen [da], Charles Monzat [fr], - Changwoo Ryu [ko] - -42.beta -======= -* workspace-indicator: Fix cancelling editing with Esc [Florian; !208] -* window-list: Update window tracking to avoid missing icons [Florian; !207] -* Use libadwaita for preferences [Florian; !209, !213] -* Adapt to Clutter grab API changes [Florian; !212] -* Misc. bug fixes and cleanups [Jan, Florian; !210, !214] - -Contributors: - Jan Beich, Florian Müllner, Naala Nanba - -Translators: - Boyuan Yang [zh_CN], Matej Urbančič [sl], Naala Nanba [ab], - Alexander Shopov [bg], Emin Tufan Çetin [tr] - -42.alpha -======== -* native-window-placement: Fix distorted layout in app grid [Sebastian; !189] -* window-list: Fix on-screen keyboard [Florian; !199] -* Misc. bug fixes and cleanups [Neal; Just; !195, !197] - -Contributors: - Piotr Drąg, Neal Gompa, Sebastian Keller, Florian Müllner, Just Perfection - -Translators: - Goran Vidović [hr], Sveinn í Felli [is], Yuri Chornoivan [uk], - Fabio Tomat [fur], Quentin PAGÈS [oc], Hugo Carvalho [pt], - Yaron Shahrabani [he], Jordi Mas i Hernandez [ca], MohammadSaleh Kamyab [fa], - Fran Dieguez [gl], Daniel Mustieles [es], Aleksandr Melman [ru], - Aurimas Černius [lt], Asier Sarasua Garmendia [eu], Kukuh Syafaat [id], - Rafael Fontenelle [pt_BR] - -41.0 -==== -* Bump version - -41.rc.1 -======= -* Fix pre-generating stylesheets in tarball [Florian; !190] - -Contributors: - Florian Müllner - -41.rc -===== -* window-list: Adapt to overview-on-startup [Florian; !185] -* apps-menu: Use a custom 'toggle-menu' shortcut [Florian; !173] -* Misc. bug fixes and cleanups [Florian; !186] - -Contributors: - Florian Müllner - -41.beta -======= -* window-list: Extend reactive area of minimap to screen edges [Adam; !171] -* drive-menu: Improve detection of network mounts [Florian; !27, !176] -* Use distinct gettext domain for e.g.o uploads [Florian; #335] -* Misc. bug fixes and cleanups [Florian; !172, !174, !177, !167, !178, !180, - !181, !182, !183] - -Contributors: - Marco Trevisan (Treviño), Adam Goode, Florian Müllner - -Translators: - Hugo Carvalho [pt], Juliano de Souza Camargo [pt], Alexander Shopov [bg] - -40.1 -==== -* Disable welcome dialog in classic session [Florian; !169] -* windowsNavigator: Adjust to a late gnome-shell change [Florian; !170] - -Contributors: - Florian Müllner - -Translators: - Ngọc Quân Trần [vi], Anders Jonsson [sv], Carmen Bianca BAKKER [eo], - Pawan Chitrakar [ne], Quentin PAGÈS [oc] - -40.0 -==== - -Translators: - Jiri Grönroos [fi] - -40.rc -===== -* native-window-placement: Adjust to gnome-shell changes [Florian; !164] -* windows-navigator: Adjust to gnome-shell changes [Florian; !163] -* window-list, workspace-indicator: Only show previews for up to six workspaces - [Florian; !165] -* window-list, workspace-indicator: Improve workspace preview appearance - [Florian; !166] - -Contributors: - Florian Müllner - -Translators: - Fran Dieguez [gl] - -40.beta -======= -* Add tooltips to workspace thumbnails [Florian; !155] -* Drop arrows from top bar menus [Florian; !156] -* drive-menu: Mark mounts that can be unmounted as removable [Michael; !152] -* Remove horizontal-workspaces extension [Florian; !158] -* Adjust to shell overview changes [Florian; !159, !160] -* Fix crashes [Daniel; !157] -* Misc. bug fixes and cleanups [Florian; !154, !161] - -Contributors: - Michael Lawton, Florian Müllner, Daniel van Vugt - -Translators: - Аляксей [be], A S Alam [pa] - -40.alpha.1 -========== -* Don't depend on sassc when building from tarball [Florian; !150] -* Port extensions preferences to GTK4 [Florian; !148] -* Misc. bug fixes and cleanups [Florian, Jonas; !149, !151, !153] - -Contributors: - Jonas Dreßler, Florian Müllner - -40.alpha -======== -* window-list: Honor changes in skip-taskbar property [Sergio; !130] -* window-list, workspace-indicator: Adjust to 3.38 changes [Florian; !133] -* window-list, workspace-indicator: Improve previews in workspace thumbs - [Florian; #260, !142] -* auto-move: Improve behavior on multi-monitor setups [Florian; !135] -* windowNavigator: Adjust to 3.38 changes [Thun; #259] -* Misc. bug fixes and cleanups [Florian, Jonas Å, Jordan, Ray; !131, !136, - !137, !140, !141, !144, !146, !145] - -Contributors: - Sergio Costas, Florian Müllner, Jordan Petridis, Thun Pin, Ray Strode, - Jonas Ådahl - -Translators: - Fabio Tomat [fur], Jordi Mas [ca] - -3.38.1 -====== - -Contributors: - Yacine Bouklif, Florian Müllner - -Translators: - Yacine Bouklif [kab], Cheng-Chia Tseng [zh_TW], Stas Solovey [ru], - Yosef Or Boczko [he] - -3.38.0 -====== - -Translators: - Balázs Meskó [hu], Alan Mortensen [da], Juliano Camargo [pt], Tim Sabsch [de], - Milo Casagrande [it], Rūdolfs Mazurs [lv] - -3.37.92 -======= - -Translators: - Nathan Follens [nl], Zander Brown [en_GB], Aurimas Černius [lt], - Marek Černocký [cs], Changwoo Ryu [ko], Dušan Kazik [sk] - -3.37.91 -======= - -Contributors: - Florian Müllner - -Translators: - Fran Dieguez [gl], Akarshan Biswas [bn_IN], Kukuh Syafaat [id], - Piotr Drąg [pl], Rafael Fontenelle [pt_BR], Jiri Grönroos [fi], - Марко Костић [sr], Goran Vidović [hr] - -3.37.90 -======= -* Misc. bug fixes and cleanups [Florian, Piotr; !126, !128] - -Contributors: - Piotr Drąg, Florian Müllner - -Translators: - Fabio Tomat [fur], Efstathios Iosifidis [el], Anders Jonsson [sv], - Asier Sarasua Garmendia [eu], Alexandre Franke [fr] - -3.37.3 -====== -* window-list, native-window-placement: Adjust to shell changes [Florian; !124] - -Contributors: - Florian Müllner - -Translators: - Jordi Mas [ca], sicklylife [ja], Boyuan Yang [zh_CN], - Baurzhan Muftakhidinov [kk] - -3.37.2 -====== -* window-list, auto-move: Modernize preference dialogs [Florian; !121] -* Adjust to gnome-shell changes [Florian; !122] - -Contributors: - Florian Müllner - -Translators: - Cheng-Chia Tseng [zh_TW], Yuri Chornoivan [uk], Daniel Mustieles [es], - Emin Tufan Çetin [tr], Danial Behzadi [fa], Daniel Șerbănescu [ro], - Matej Urbančič [sl] - -3.37.1 -====== -* drive-menu: Emphasize eject buttons [Florian; #223] -* user-theme: Add preference dialog [Florian; !117] -* window-list: Fix inconsistent state in preference dialog [Milan; !119] -* workspace-indicator: Overhaul preference dialog [Florian; !120] -* user-theme: Support session mode styles [Florian; !118] -* Misc. bug fixes and cleanups [Florian, Xiaoguang; !113, !106, !114, !116] - -Contributors: - Milan Crha, Florian Müllner, Xiaoguang Wang - -Translators: - Daniel Korostil [uk], Yosef Or Boczko [he], Kristjan SCHMIDT [eo], - Dz Chen [zh_CN], Danial Behzadi [fa], Yuri Chornoivan [uk], - Anders Jonsson [sv], Daniel Mustieles [es] - -3.36.0 -====== - -Contributors: - Florian Müllner - -3.35.91 -======= - -Contributors: - Florian Müllner - -Translators: - Zander Brown [en_GB] - -3.35.90 -======= -* Adjust to gnome-shell changes [Florian; !100, !101, !102] -* Force single-line window titles in window list [Florian; #202] -* Misc. bug fixes and cleanup [Florian; !104, !105] - -Contributors: - Florian Müllner - -Translators: - sicklylife [ja], Umarzuki Bin Mochlis Moktar [ms] - -3.35.3 -====== - -Translators: - Fran Dieguez [gl] - -3.35.2 -====== -* Adjust to gnome-shell changes [Marco, Florian; !89, !95, !96] -* window-list, workspace-indicator: Exclude DESKTOP windows from previews - [Florian; !93] -* screenshot-window-sizer: Fix cycling through all valid sizes [Willy; !97] - -Contributors: - Marco Trevisan (Treviño), Florian Müllner, Willy Stadnick - -3.34.1 -====== -* Adjust to gnome-settings-daemon plugin removals [Xiaoguang; !94] - -Contributors: - Florian Müllner, Xiaoguang Wang - -Translators: - Nathan Follens [nl], Dušan Kazik [sk], Ask Hjorth Larsen [da], - Yi-Jyun Pan [zh_TW] - -3.34.0 -====== - -Translators: - Rafael Fontenelle [pt_BR], Efstathios Iosifidis [el], Milo Casagrande [it], - Sabri Ünal [tr] - -3.33.92 -======= - -Translators: - Марко Костић [sr], Tim Sabsch [de], Rūdolfs Mazurs [lv], Matej Urbančič [sl], - Balázs Úr [hu], Claude Paroz [fr], Fran Dieguez [gl], Changwoo Ryu [ko], - Ryuta Fujii [ja], Fabio Tomat [fur], Goran Vidović [hr] - -3.33.91 -======= -* Misc. bug fixes and cleanups [Florian; !88, !90, !91, !92] - -Contributors: - Florian Müllner - -Translators: - Asier Sarasua Garmendia [eu], Anders Jonsson [sv], Marek Černocký [cs], - Kukuh Syafaat [id], Jiri Grönroos [fi], Florentina Mușat [ro], - Aurimas Černius [lt], Daniel Mustieles [es], Piotr Drąg [pl], Jordi Mas [ca], - Danial Behzadi [fa] -3.33.90 -======= -* window-list: Support showing windows from all workspaces [Florian; #154] -* Misc. bug fixes and cleanups [Florian; !86, !87] - -Contributors: - Florian Müllner - -Translators: - Jor Teron [mjw] - -3.33.4 -====== -* Make GNOME Classic more classic: - - Disable GNOME 3 overview [Florian; !69] - - Add window picker button to window list [Florian; !73, !80] - - Style improvements and fixes [Jakub; #169, !82] - - Support horizontal workspace layout in window list [Florian; !70] - - Add draggable previews to window list workspace switcher [Florian; !74] - - Arrange workspaces horizontally [Florian; !72] -* workspace-indicator: Support horizontal workspace layout [Florian; !71] -* workspace-indicator: Add draggable previews [Florian; !77] -* Misc. bug fixes and cleanups [Florian; !75, !76, !79, !78, #168, !84] - -Contributors: - Florian Müllner, Jakub Steiner, Jor Teron - -Translators: - Jor Teron [mjw] - -3.33.3 -====== -* Misc. bug fixes [Florian, Marco; !67, !68] - -Contributors: - Florian Müllner, Marco Trevisan (Treviño) - -3.33.2 -====== -* Misc. bug fixes and cleanups [Florian; !66] - -Contributors: - Florian Müllner - -3.33.1 -====== -* Misc. bug fixes [Florian; !64] - -Contributors: - Florian Müllner - -3.32.1 -====== -* Fix windowsNavigator extension after ES6 port [Florian; #143] -* screenshot-window-sizer: Add phone screenshot sizes [Adrien; !65] -* Misc. bug fixes and cleanups [Fabian; !62] - -Contributors: - Florian Müllner, Adrien Plazas, Fabian P. Schmidt - -3.32.0 -====== - -Contributors: - Florian Müllner - -Translations: - Victor Ibragimov [tg], Kristjan SCHMIDT [eo], Mart Raudsepp [et] - -3.31.92 -======= -* Misc. bug fixes and cleanups [Florian; !57, !58, !59, !60] - -Contributors: - Florian Müllner - -3.31.91 -======= -* apps-menu: Remove outdated legacy-tray handling [Florian; !53] -* user-theme: Allow using XDG user data dir [Tomasz; !55] -* Misc. bug fixes and cleanups [Florian; !52, !54, !56] - -Contributors: - Tomasz Gąsior, Florian Müllner - -Translators: - Matej Urbančič [sl], Gun Chleoc [gd] - -3.31.90 -======= -* Misc. bug fixes and cleanups [Florian; !49, !50, !51] - -Contributors: - Florian Müllner - -Translators: - Ryuta Fujii [ja], Charles Monzat [fr], Pieter Schalk Schoeman [af] - -3.31.2 -====== -* Remove obsolete alternate-tab extension [Florian; #786496] -* Adjust to gnome-shell changes [Florian; #113] - -Contributors: - Florian Müllner - -3.30.1 -====== -* apps-menu: Fix height on HiDPI systems [Florian; #102] -* window-list: Only switch between windows on active workspace when scrolling - [Florian; #78] - -Contributors: - Florian Müllner - -3.30.0 -====== -* Bump version - -3.29.91 -======= -* Misc. bug fixes [Florian; #90] - -Contributors: - Florian Müllner - -3.29.90 -======= -* Misc. bug fixes [Florian; #786496] - -Contributors: - Florian Müllner - -3.29.3 -====== -* Adjust to global.screen removal [Jonas; #759538] - -Contributors: - Jonas Ådahl, Florian Müllner - -3.29.2 -====== -* Misc. bug fixes [Florian; #69] - -Contributors: - Florian Müllner - -3.28.1 -====== -* Misc. bug fixes [Xiaoguang, Florian; #59, #62] - -Contributors: - Florian Müllner, Xiaoguang Wang - -Translators: - Dz Chen [zh_CN] - -3.28.0 -====== - -Contributors: - Florian Müllner, Xiaoguang Wang - -Translators: - Aman Alam [pa], Bruce Cowan [en_GB] - -3.27.92 -======= - -Contributors: - Florian Müllner - -Translators: - Piotr Drąg [es], GNOME Translation Robot [gd], Daniel Șerbănescu [ro] - -3.27.91 -======= -* places-menu: Support unmounting ejectable places [Rémy; #17] -* apps-menu: Support separators and custom sort order [Florian; #27] -* Port to meson [Florian; #31, #45] -* window-list: Fix missing icons on wayland [Florian; #10] -* places-menu: Fix terminating gnome-shell with recent gjs [Florian; #44] -* auto-move: Make it work with wayland windows [Florian; #33] -* Classic theme fixes [Florian, Jonas; #26, #41, #39, #40] -* Require sassc for classic styling [Florian; !28] -* Misc. bug fixes [Piotr, Florian; #772211, #32, #30] - -Contributors: - Jeremy Bicha, Piotr Drąg, Jonas Kümmerlin, Rémy Lefevre, Iñigo Martínez, - Florian Müllner - -Translators: - Matej Urbančič [sl], Kjartan Maraas [nb] - -3.27.1 -====== -* updated translations (ca@valencia) - -3.26.1 -====== -* native-window-placement: Adjust to gnome-shell changes -* updated translations: el, fa, ru, sv - -3.26.0 -====== -* updated translations (be, bg, ca, da, eu, fi, is, it, ko, lv, ml, - nl, pt_BR, vi, zh_TW) - -3.25.91 -======= -* updated translations (ca, fr, it, pl, pt_BR, sr, sr@latin, tr) - -3.25.90 -======= -* updated translations (es, gl, hr, hu, kk, sl, sv, sv) - -3.25.4 -====== -* screenshot-window-sizer: Fix backward cycling -* updated translations (ar, be, ca, cs, de, fur, id, lt, pl, sk) - -3.25.3 -====== -* places-menu: Use mount operation if necessary -* window-list: Respect MWM hints -* updated translations (es, fur, kk) - -3.25.2 -====== -* places-menu: Make URI launching asynchronous -* updated translations (de, fur, hr, hu, id, sl) - -3.25.1 -====== -* apps-menu: Mark copied launchers as trusted -* places-menu: Make icon lookup asynchronous -* updated translations (hr) - -3.24.1 -====== -* apps-menu: Allow creating desktop launchers via DND -* updated translations (el, vi) - -3.24.0 -====== -* updated translations (lv, tr) - -3.23.92 -======= -* update classic theme -* updated translations (be, ko, ca, da, cs, ru, lt) - -3.23.91 -======= -* updated translations (de, es, eu, fi, fr, fur, gl, hu, id, it, kk, nb, pl, pt_BR, - sk, sr, sr@latin, sv, uk, zh_TW) - -3.23.90 -======= -* window-list: Improve styling -* window-list: Hide workspace indicator when there's a single (static) workspace -* new translation (be) - -3.23.2 -====== -* alternateTab: Don't take over 'switch-group' shortcut -* updated translations (zh_CN) - -3.22.1 -====== -* window-list: Update icon on app changes - -3.22.0 -====== -* updated translations (en_GB) - -3.21.92 -======= -* update style -* updated translations (pl, vi) - -3.21.91 -======= -* updated translations (pl) - -3.21.90 -======= -* updated translations (es, gu) - -3.21.4 -====== -* apps-menu: Fix entries from non-standard AppDir directories - -3.21.3 -====== -* adjust to gnome-shell changes -* updated translations (oc) - -3.21.2 -====== -* version bump, nothing to see here - -3.20.1 -====== -* update classic style -* updated translations (gd, oc) - -3.20.0 -====== -* version bump, nothing to see here - -3.19.92 -======= -* version bump, nothing to see here - -3.19.91 -======= -* updated translations (oc) - -3.19.90 -======= -* version bump, nothing to see here - -3.19.4 -====== -* screenshot-window-sizer: HiDPI support -* Fix gnome-shell component in classic session -* updated translations (lt) - -3.19.3 -====== -* native-window-placement: Don't let border overlap title -* apps-menu: Fix handling of .desktop files in subdirectories -* updated translations (is) - -3.19.2 -====== -* updated translations (gd) - -3.19.1 -====== -* Fix some theme issues - -3.18.1 -====== -* window-list: Fix accessibility of window buttons -* apps-menu: Fix unreliable highlight -* updated translations (ar) - -3.18.0 -====== -* Bump version - -3.17.92 -======= -* places: Include DESKTOP when desktop icons are enabled -* updated translations (fa) - -3.17.91 -======= -* updated translations (nl, pl, zh_TW) - -3.17.90 -======= -* window-list: Improve application ordering -* workspace-indicator: Use consistent workspace numbering - -3.17.4 -====== -* updated translations (fur) - -3.17.3 -====== -* window-list: Adjust with text-scaling-factor -* classic style updates -* updated translations (pt, ro) - -3.17.2 -====== -* updated translations (oc, pt, zh_CN) - -3.17.1 -====== -* style updates -* updated translations (oc) - -3.16.1 -====== -* window-list: Fix workspace indicators popup menu position -* apps-menu: Fix taking over panel-main-menu shortcut -* updated translations (et, ja, lv) - -3.16.0 -====== -* updated translations (ca) - -3.15.92 -======= -* classic: Update theme -* update for mutter API changes -* updated translations (bg, bs, da, fi, pa, ru, sr, sr@latin, tg) - -3.15.91 -======= -* classic: Update theme -* systemMonitor extension was removed, as the message tray where it - put its indicator no longer exists -* window-list: Adjust for gnome-shell changes -* updated translations (gl, it, kk, ko, lt, pl, sk, uk, zh_TW) - -3.15.90 -======= -* classic: Visual refresh based on new shell theme -* window-list: Adjust for gnome-shell changes -* updated translations (an, el, eo, eu, fr, he, is, sv, tr) - -3.15.4 -====== -* window-list: Improve interaction with system modal dialogs -* updated translations (cs, de, es, eu, fur, hu, id, nb, pt_BR, ru, sl, vi) - -3.15.3.1 -======== -* adjust to gnome-shell change - -3.15.3 -====== -* classic-mode: Add high-contrast theme variant, drop .desktop file -* places-menu: Fix error when XDG user directories are not set up -* window-list: Add option to show on all monitors -* updated translations (eu, hu, kk, ro, tr) - -3.15.2 -====== -* removable-drive, user-theme, window-list: Update for gnome-shell changes -* apps-menu: Fix some visual glitches -* Fix classic mode style -* updated translations (an, cs, he, vi) - -3.15.1 -====== - * updated translations (es, nb) - -3.14.1 -====== - * alternateTab: Fix dismissing popup with Escape - * some improvements to the window-list - (spacing in app buttons, no flash when closing windows with auto-grouping) - * updated translations (lv, it, pt, bg) - -3.14.0 -====== - * updated translations (bn_IN, hi, kn, sr, sr@latin, uk) - -3.13.92 -======= -* new extension: screenshot-window-sizer -* window-list: Don't add sticky windows more than once -* updated translations (da, de, fi, ko, mr, ms, ne, pa, pl, sk, sv, ta, te, tr) - -3.13.91 -======= -* window-list: restore fitts'ability of workspace button -* updated for gnome-shell changes -* updated translations (cs, kk, fr, or, fa, ja, gu, id) - -3.13.90 -======= -* updated translations (as, ca, eu, nl, zh_CN, zh_HK, zh_TW) - -3.13.4 -====== -* Updated for gnome-shell changes -* updated translations (el, gl, ru) - -3.13.3 -====== -* Tweak preference UIs some more -* Fix classic mode schema overrides -* updated translations (es, he, hu, lt, nb, pt_BR, sl, tr) - -3.13.2 -====== -* Fix sorting of grouped buttons in window list -* Tweak preference UIs -* updated translations (en_GB) - -3.13.1 -====== -* add DesktopNames key to the classic session file -* classic theme: remove rounded corners from tile previews -* window-list: don't shift message tray on other monitors -* auto-move-windows: several fixes and updates for api changes -* launch-new-instances: updates for api changes -* updated translations (ja, km) - -3.12.0 -====== -* updated translations (zh_HK, zh_TW) - -3.11.92 -======= -* nothing to see here, move on - -3.11.91 -======= -* updated translations (ko, fur) - -3.11.90 -======= -* several fixes and improvements to the window-list - (can be scrolled, works correctly with the OSD - keyboard, filters skip-taskbar windows, does not - force all notifications to bold) -* drive-menu fixed not to show shadowed mounts -* updates for gnome-shell changes (launch-new-instance, - auto-move-windows, places-menu) -* build system fixes for systems without /bin/bash -* updated translations (or, tr, uk) - -3.11.5 -====== -* updates for gnome-shell changes -* updated translations (kn) - -3.11.4 -====== -* classic mode now supports session saving -* updates for gnome-shell changes -* updated translations (ar, kn) - -3.11.3 -====== -* workspace-indicator is vertically aligned now -* updated translations (ar, eo, ta, te) - -3.11.2 -====== -* updated translations (zh_CN) - -3.11.1 -====== -* ignore shadowed mounts in drive-menu extension -* updates for gnome-shell/gjs changes -* updated translations (el, th) - -3.10.1 -====== -* updated translations (af, ca, ca@valencia, de, et, eu, fa, - hu, lt, lv, nb, nl, pa, pt, sk, sr, sr@latin, tr) - -3.10.0 -====== -* updated translations (as, cs, da, es, et, fi, fr, gl, - he, id, it, kk, lt, lv, pa, pl, pt, pt_BR, ru, sl, tg, - uk, zh_HK, zh_TW) - -3.9.92 -====== -* more updates and fixes for gnome-shell master changes - and regressions (systemMonitor, window-list, apps-menu) -* lots of updated translations (ar, as, cs, da, de, el, es, - eu, fi, gl, he, hu, it, ja, kk, ko, lv, nb, nl, pa, pl, - pt_BR, ru, sk, sr, sr@latin, ta, tg) - -3.9.91 -====== -* update the classic mode session and theme to work with the - new system menu -* the usual round of updates and fixes for gnome-shell - API changes -* updated translations (de, it, lt, nl, pl, pt_BR, sk, - zh_HK, zh_TW) - -3.9.90 -====== -* xrandr-indicator was removed, as the implementation - was incompatible with the new DisplayConfig mutter API -* various extensions were updated for the 3.9.90 gnome-shell API -* updated translations (cs, es, fur, gl, he, hu, id, ja, sl, tg, - zh_CN, zh_HK, zh_TW) - -3.9.5 -===== -* alternative-status-menu was removed entirely, as - it does not fit in the designs of the new unified - status menu -* updated translations (as, gu, it, ru) - -3.9.4 -===== -* apps-menu: fixed handling of hot corner in case - of screen reconfiguration -* alternative-status-menu now correctly honors polkit - for hibernation -* user-menu now loads themes from $XDG_DATA_HOME too -* translation updates (de, id, pt_BR, vi, zh_CN, ml) - -3.9.3 -===== -* classic mode mini extensions were replaced with a - GSettings override specified in the .json file -* styling of classic mode improved -* native-window-placement is back working on 3.9 -* misc bug fixes -* traslation updates (an, cs, el, es, gl, nb, pl, sk, tg) - -3.9.2 -===== -* apps-menu: appearance of the scrollbars was improved -* window-list is a little taller in classic mode (to account - for the workspace switcher) -* alternative-status-menu honors again the dconf configuration -* translation updates (sr) - -3.9.1 -===== -* updates to window-list, xrandr-indicator, - workspace-indicator, windowsNavigator for gnome-shell - changes -* translation updates (cs, es, lt, pl, pt_BR, sl) - -3.8.1 -===== -* many improvements to window-list: - - windows are activated by DND over them - - window buttons now have the right size, - even if the text is smaller or larger - than the ideal - - window buttons can be grouped automatically - when the panel becomes crowded - - added a workspace switcher menu -* added keyboard navigation to apps-menu -* small tweaks to classic-mode theme, in particular - for menus -* translation updates (gl, ko, sr) - -3.8.0 -===== -* translation updates (hu, ja, fi, it) - -3.7.92 -====== -* misc bug fixes to app-menu and window-list -* translation updates (de, sl, pt_BR, ru) - -3.7.91 -====== -* various updates for shell changes -* update window-list to always use application icons -* update apps-menu to not load subdirectories as - separate categories -* translation updates (lt, zh_CN) - -3.7.90 -====== -* various fixes to make places-menu behave more - like Nautilus, including showing the machine - name in place of File System -* various updates for shell changes -* alternative-status-menu no longer supports - ConsoleKit systems, you need to install logind - to have suspend or hibernate -* translation updates (es, cz, pl, sr) - -3.7.5.1 -======= -* new extension forgotten in previous NEWS entry: - windows-list -* also forgotten previously: classic mode got a new - GNOME2 style -* build fixes - -3.7.5 -===== -* places-menu is back in the classic extensions, with - a new old GNOME-2 look -* classic mode moved the date menu to right, where we - all know it rightly belongs -* apps-menu received a face-lift, with the inclusion - of a reduced form of AxeMenu -* new extension in the classic set: launch-new-instance, - which modifies the behavior of clicking in the dash - and app launcher -* alternate-tab, native-window-placement and windowsNavigator - updated for gnome-shell changes -* translation updates (es, cz, pl) - -3.7.4 -===== -* a separate configure switch has been added to enable - classic mode session definitions -* places-menu is no longer part of the classic-mode - extension set -* updated translations (ar, gl, hu, lt, pt_BR, sr) - -3.7.3 -===== -* new extensions: default-min-max, static-workspaces -* alternate-tab now uses the built-in window switcher and just - takes over the switch-application keybinding -* workspace-indicator: is no longer part of classic-mode -* we now install classic-mode data files for gdm, gnome-session - and gnome-shell, so if you enable classic-mode you get a new - session option in GDM -* updated translations (ar, es, pl, ru, sl, zh_HK, zh_TW) - -3.7.2 -===== -* fixed crashes with places-menu, windowsNavigator, alternate-tab - and native-window-placement -* alternate-tab now hides attached modal dialogs -* places-menu has restored support for Nautilus 3.4 -* the default for hibernate is now to show in alternative-status-menu -* some extensions are now tagged as "classic", and can be chosen with - --enable-extensions=classic-mode -* dock and gajim were removed at the beginning of the 3.7.1 cycle, - as they were buggy and unmaintained -* updated translations (ar, cs, de, el, es, gl, id, lt, lv, pa, pl - ru, sk, sl, sr, sr@latin) - -3.6.1 -===== -* fixed alternative-status-menu for the new lock screen -* squashed some alternate-tab warnings -* drive-menu now works with 3.6 again -* updated translations (ar, cs, el, es, gl, id, lv, pl, sl) - -3.6.0 -===== -* major rework in places menu, to make it work without - removed supporting code in the shell and to make it look like - the nautilus sidebar - (similar work would be needed for drive-menu, not done yet) -* updated translations (ca, cs, de, el, en_GB, es, fi, hu, id, lt, - pl, pt_BR, ru, sl, sr) - -3.5.91 -====== -* various crashers were fixed in alternative-tab -* auto-move-windows now can be made to work with static workspaces -* place-menu is now on the left and uses symbolic icons like Files -* StIconType usage was removed from all extensions, after it was - removed in core -* systemMonitor, xrandr-indicator, apps-menu, places-menu, - alternative-status-menu were updated for the newer shell -* updated translations (es, gl, it, pl, sl) - -3.5.90 -====== -* alternate-tab has been reworked again, the old mode switch - was removed and the all&thumbnails code extended to handle - icons and filtering to the workspace -* alternate-tab thumbnails now reflect the aspect ratio of the windows -* systemMonitor now shows a tooltip above the indicator -* native-window-placement, systemMonitor and windowsNavigator have been updated - for the newer shell -* updated translations (es, pa) - -3.5.5 -===== -* convenience module has been relicensed to BSD, - for compatibility with GPLv3 extensions -* alternate-tab has been refactored and seen various - improvements to all&thumbnails mode, including a new - overlaid application icon -* updated translations (lt, id, sr) - -3.5.4 -===== -* updated translations (de, es, ar, sl, lv, zh_CN) - -3.5.2 -===== -* removable-drive-menu is now a11y friendly -* the dock can now be placed on any monitor, not just the primary -* dock is now clipped to its monitor -* alternative-status-menu now exposes GSettings for Suspend - and Hibernate visibility - no UI yet -* more gnome-shell API changes (places-menu, removable-drive-menu, - alternative-status-menu) -* miscellaneous bug fixes (native-window-placement, gajim, - auto-move-windows) -* updated translations - -3.4.0 -===== -* build system improvements -* updated translations (ar, cs, fr) - -3.3.92 -====== -* various updates for gnome-shell API changes (dock, - native-window-placement) -* local-install is now a make rule, not a shell script -* updated translations (zh, es, sw, ga, hu, it, no, pt_BR, de, sl, - pl, la, fi, sr) - -3.3.90 -====== -* system wide installation via "make install" is possible - again -* alternate-tab can now pre-activate the selected window -* auto-move-windows, workspace-indicator and example gained - new preference dialogs -* workspace-indicator: fixed a bug wrt focus stealing prevention -* updated translations (es, pt_BR, it, sl, gl, sr) - -3.3.5 -===== -* improvements to the build system and convenience module, - making it easier for other extensions to use, and bringing - it up to date with gnome-shell changes -* all extensions were ported to the Lang.Class framework - (except xrandr-indicator, which is pending GDBus merge) -* alternate-tab and dock were slightly refactored to clean up - some old code - -3.3.4 -===== -* improved styling of windowsNavigator tooltips -* fixed windowsNavigator when used with the numeric keypad -* fixed native-window-placement with custom button layout -* updated translations (pt_BR, cz) - -3.3.3 -===== -* windowsNavigator was fixed to work with azerty keyboards -* drive-menu was changed to use media-eject icon instead of media-optical -* dock: the default value of hide-effect is now move -* dock: if autohide is disabled, now it pushes maximized windows aside -* dock was updated to match current core shell styling -* native-window-placement: position stategy setting was removed -* alternative-status-menu no longer conflicts with other extensions - in the user menu -* various other minor bug fixes -* updated translations (zh, uk, es, it, cz, sl, sk, fi) - -3.3.2 -===== -* all extensions are now self-contained, including l10n and settings -* introduce a convenience module that can be shared among all extensions -* you can know build an installable zip file with make zip-file -* apps-menu no longer shows NoDisplay apps -* alternative-status-menu, alternate-tab: fix for master shell - -3.2.1 -===== -* dock: added "move" hide effect -* systemMonitor: now it enables/disables properly -* systemMonitor: improved styling -* alternate-tab: both modes now work with gnome-shell 3.2 -* various other bug fixes -* updated translations - -3.2.0 -===== - -* various: update for gnome-shell API changes - -3.1.91 -====== - -* gajim: update for gnome-shell API changes - -3.1.90 -====== - -* All extensions have been ported to the new extension - system (including live enable/disable) -* Updated translations -* xrandr-indicator no longer requires a specific gjs version -* windowsNavigator fixed for more than 2 workspaces - -3.1.4 -===== - -* New extension: a menu for changing workspace (workspace-indicator) -* systemMonitor: lower the requirement on libgtop -* auto-move-windows: open overview when last window on - last workspace is closed -* dock: implement autohiding, with various configurable - effects -* alternate-tab: more configurable implementations available -* native-window-placement: don't rearrange the windows when - the workspace switcher is shown/hidden -* update for gnome-shell 3.1.4 API changes - -3.1.3 -===== - -* New extension: a menu for removable drives (drive-menu -* New extensions: GNOME 2 like menus for apps and places - (apps-menu, places-menu) -* New extension: additional configurability for the window - layout in the overview, including a mechanism similar to - KDE4 (native-window-placement) -* New extension: a message tray indicator for CPU and memory - usage (uses libgtop) (systemMonitor) -* user-theme: fixed resetting theme -* user-theme: support themes installed in /usr/share/themes -* alternative-status-menu: ported to gnome-shell master -* dock: ported to gnome-shell master -* dock: make position configurable (can be left or right) -* Updated translations - -3.0.2 -===== - -* Updated translations. -* Fixed bug #647386 (reverting of user-theme to default) -* Fixed bug #647599 (support globally installed themes) -* Added license and README diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/extension.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/extension.js deleted file mode 100644 index 4f972cd7..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/extension.js +++ /dev/null @@ -1,140 +0,0 @@ -// SPDX-FileCopyrightText: 2011 Giovanni Campagna -// SPDX-FileCopyrightText: 2011 Alessandro Crismani -// SPDX-FileCopyrightText: 2014 Florian Müllner -// -// SPDX-License-Identifier: GPL-2.0-or-later - -// -*- mode: js2; indent-tabs-mode: nil; js2-basic-offset: 4 -*- -// Start apps on custom workspaces - -import Shell from 'gi://Shell'; - -import {Extension} from 'resource:///org/gnome/shell/extensions/extension.js'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; - -class WindowMover { - constructor(settings) { - this._settings = settings; - this._appSystem = Shell.AppSystem.get_default(); - this._appConfigs = new Map(); - this._appData = new Map(); - - this._appSystem.connectObject('installed-changed', - () => this._updateAppData(), this); - - this._settings.connectObject('changed', - this._updateAppConfigs.bind(this), this); - this._updateAppConfigs(); - } - - _updateAppConfigs() { - this._appConfigs.clear(); - - this._settings.get_strv('application-list').forEach(v => { - let [appId, num] = v.split(':'); - this._appConfigs.set(appId, parseInt(num) - 1); - }); - - this._updateAppData(); - } - - _updateAppData() { - let ids = [...this._appConfigs.keys()]; - let removedApps = [...this._appData.keys()] - .filter(a => !ids.includes(a.id)); - removedApps.forEach(app => { - app.disconnectObject(this); - this._appData.delete(app); - }); - - let addedApps = ids - .map(id => this._appSystem.lookup_app(id)) - .filter(app => app && !this._appData.has(app)); - addedApps.forEach(app => { - app.connectObject('windows-changed', - this._appWindowsChanged.bind(this), this); - this._appData.set(app, {windows: app.get_windows()}); - }); - } - - destroy() { - this._appSystem.disconnectObject(this); - this._settings.disconnectObject(this); - this._settings = null; - - this._appConfigs.clear(); - this._updateAppData(); - } - - _moveWindow(window, workspaceNum) { - if (window.skip_taskbar || window.is_on_all_workspaces()) - return; - - // ensure we have the required number of workspaces - let workspaceManager = global.workspace_manager; - for (let i = workspaceManager.n_workspaces; i <= workspaceNum; i++) { - window.change_workspace_by_index(i - 1, false); - workspaceManager.append_new_workspace(false, 0); - } - - window.change_workspace_by_index(workspaceNum, false); - } - - _appWindowsChanged(app) { - let data = this._appData.get(app); - let windows = app.get_windows(); - - // If get_compositor_private() returns non-NULL on a removed windows, - // the window still exists and is just moved to a different workspace - // or something; assume it'll be added back immediately, so keep it - // to avoid moving it again - windows.push(...data.windows.filter(w => { - return !windows.includes(w) && w.get_compositor_private() !== null; - })); - - let workspaceNum = this._appConfigs.get(app.id); - windows.filter(w => !data.windows.includes(w)).forEach(window => { - this._moveWindow(window, workspaceNum); - }); - data.windows = windows; - } -} - -export default class AutoMoveExtension extends Extension { - enable() { - this._prevCheckWorkspaces = Main.wm._workspaceTracker._checkWorkspaces; - Main.wm._workspaceTracker._checkWorkspaces = - this._getCheckWorkspaceOverride(this._prevCheckWorkspaces); - this._windowMover = new WindowMover(this.getSettings()); - } - - disable() { - Main.wm._workspaceTracker._checkWorkspaces = this._prevCheckWorkspaces; - this._windowMover.destroy(); - delete this._windowMover; - } - - _getCheckWorkspaceOverride(originalMethod) { - /* eslint-disable no-invalid-this */ - return function () { - const keepAliveWorkspaces = []; - let foundNonEmpty = false; - for (let i = this._workspaces.length - 1; i >= 0; i--) { - if (!foundNonEmpty) { - foundNonEmpty = this._workspaces[i].list_windows().some( - w => !w.is_on_all_workspaces()); - } else if (!this._workspaces[i]._keepAliveId) { - keepAliveWorkspaces.push(this._workspaces[i]); - } - } - - // make sure the original method only removes empty workspaces at the end - keepAliveWorkspaces.forEach(ws => (ws._keepAliveId = 1)); - originalMethod.call(this); - keepAliveWorkspaces.forEach(ws => delete ws._keepAliveId); - - return false; - }; - /* eslint-enable no-invalid-this */ - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ab/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ab/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 2fe2c756..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ab/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/af/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/af/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 735af54a..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/af/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/an/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/an/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 840f8e1a..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/an/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ar/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ar/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index f4c46ebd..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ar/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/as/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/as/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 3f954b90..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/as/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/be/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/be/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 22b5c550..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/be/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/bg/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/bg/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 0f3b3c21..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/bg/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/bn_IN/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/bn_IN/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index f7541095..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/bn_IN/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/bs/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/bs/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 861b39db..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/bs/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ca/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ca/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 23b60a32..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ca/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ca@valencia/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ca@valencia/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index ef288ebb..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ca@valencia/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/cs/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/cs/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 7374af72..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/cs/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/da/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/da/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 6ceadbe4..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/da/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/de/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/de/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 7c4f6287..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/de/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/el/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/el/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 49d0251d..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/el/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/en_GB/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/en_GB/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 65ef68e3..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/en_GB/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/eo/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/eo/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 41e4064d..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/eo/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/es/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/es/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 27f8972f..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/es/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/et/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/et/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index bbcc5b19..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/et/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/eu/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/eu/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index f960d1b2..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/eu/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/fa/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/fa/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index f0904523..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/fa/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/fi/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/fi/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 6bba61a1..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/fi/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/fr/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/fr/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index a3b07762..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/fr/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/fur/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/fur/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 8a5b2b18..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/fur/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/gd/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/gd/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 542f0c8d..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/gd/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/gl/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/gl/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index d3623365..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/gl/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/gu/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/gu/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 951f3e6a..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/gu/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/he/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/he/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index af97eaf3..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/he/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/hi/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/hi/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index f6acf0d7..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/hi/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/hr/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/hr/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 074df60c..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/hr/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/hu/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/hu/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index bf6db487..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/hu/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/id/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/id/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index c8db2696..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/id/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/is/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/is/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 7f81e47e..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/is/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/it/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/it/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 6d6c60f7..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/it/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ja/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ja/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 9e54e643..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ja/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ka/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ka/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 1d85d199..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ka/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/kab/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/kab/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 7c00b2d3..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/kab/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/kk/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/kk/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 1c986037..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/kk/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/km/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/km/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index cf5202e2..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/km/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/kn/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/kn/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index b7ac105e..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/kn/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ko/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ko/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index b6ee69c5..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ko/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/lt/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/lt/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 35789435..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/lt/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/lv/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/lv/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 1038b36a..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/lv/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/mjw/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/mjw/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 48ef5c31..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/mjw/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ml/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ml/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 60625c2a..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ml/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/mr/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/mr/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index a6e05bb7..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/mr/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ms/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ms/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 53fadee0..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ms/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/nb/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/nb/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index ba60f4e2..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/nb/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ne/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ne/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 753de9fc..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ne/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/nl/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/nl/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 23c3eed9..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/nl/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/oc/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/oc/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index ee8ed601..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/oc/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/or/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/or/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 4b8f73cc..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/or/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/pa/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/pa/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index b9e15dfb..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/pa/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/pl/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/pl/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index e5ba1cb3..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/pl/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/pt/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/pt/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 1cf97824..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/pt/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/pt_BR/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/pt_BR/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index d2fc41b1..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/pt_BR/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ro/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ro/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index bda056cb..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ro/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ru/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ru/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 3bb78650..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ru/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/sk/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/sk/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 994b6a75..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/sk/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/sl/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/sl/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 278a352f..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/sl/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/sr/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/sr/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 9b3abe56..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/sr/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/sr@latin/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/sr@latin/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 403c6d18..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/sr@latin/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/sv/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/sv/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 977bf0ad..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/sv/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ta/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ta/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index aa4e19a3..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/ta/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/te/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/te/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 15b2e085..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/te/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/tg/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/tg/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 2368c84b..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/tg/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/th/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/th/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index b8b833f5..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/th/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/tr/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/tr/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index d5f52b3f..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/tr/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/uk/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/uk/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index f6a8dd43..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/uk/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/vi/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/vi/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 89a8cf41..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/vi/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/zh_CN/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/zh_CN/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 1cebf36d..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/zh_CN/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/zh_HK/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/zh_HK/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index 8a7aea4f..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/zh_HK/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/zh_TW/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/zh_TW/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo deleted file mode 100644 index fb5ace8a..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/locale/zh_TW/LC_MESSAGES/gnome-shell-extension-auto-move-windows.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/prefs.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/prefs.js deleted file mode 100644 index 10c14717..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/prefs.js +++ /dev/null @@ -1,353 +0,0 @@ -// SPDX-FileCopyrightText: 2012 Giovanni Campagna -// SPDX-FileCopyrightText: 2014 Florian Müllner -// -// SPDX-License-Identifier: GPL-2.0-or-later - -// -*- mode: js2; indent-tabs-mode: nil; js2-basic-offset: 4 -*- -// Start apps on custom workspaces - -import Adw from 'gi://Adw'; -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Gtk from 'gi://Gtk'; - -import {ExtensionPreferences, gettext as _} from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; - -const SETTINGS_KEY = 'application-list'; - -const WORKSPACE_MAX = 36; // compiled in limit of mutter - -class NewItem extends GObject.Object {} -GObject.registerClass(NewItem); - -class NewItemModel extends GObject.Object { - static [GObject.interfaces] = [Gio.ListModel]; - static { - GObject.registerClass(this); - } - - #item = new NewItem(); - - vfunc_get_item_type() { - return NewItem; - } - - vfunc_get_n_items() { - return 1; - } - - vfunc_get_item(_pos) { - return this.#item; - } -} - -class Rule extends GObject.Object { - static [GObject.properties] = { - 'app-info': GObject.ParamSpec.object( - 'app-info', 'app-info', 'app-info', - GObject.ParamFlags.READWRITE, - Gio.DesktopAppInfo), - 'workspace': GObject.ParamSpec.uint( - 'workspace', 'workspace', 'workspace', - GObject.ParamFlags.READWRITE, - 1, WORKSPACE_MAX, 1), - }; - - static { - GObject.registerClass(this); - } -} - -class RulesList extends GObject.Object { - static [GObject.interfaces] = [Gio.ListModel]; - static { - GObject.registerClass(this); - } - - #settings; - #rules = []; - #changedId; - - constructor(settings) { - super(); - - this.#settings = settings; - this.#changedId = - this.#settings.connect(`changed::${SETTINGS_KEY}`, - () => this.#sync()); - this.#sync(); - } - - append(appInfo) { - const pos = this.#rules.length; - - this.#rules.push(new Rule({appInfo})); - this.#saveRules(); - - this.items_changed(pos, 0, 1); - } - - remove(id) { - const pos = this.#rules.findIndex(r => r.appInfo.get_id() === id); - if (pos < 0) - return; - - this.#rules.splice(pos, 1); - this.#saveRules(); - - this.items_changed(pos, 1, 0); - } - - changeWorkspace(id, workspace) { - const pos = this.#rules.findIndex(r => r.appInfo.get_id() === id); - if (pos < 0) - return; - - this.#rules[pos].set({workspace}); - this.#saveRules(); - } - - #saveRules() { - this.#settings.block_signal_handler(this.#changedId); - this.#settings.set_strv(SETTINGS_KEY, - this.#rules.map(r => `${r.app_info.get_id()}:${r.workspace}`)); - this.#settings.unblock_signal_handler(this.#changedId); - } - - #sync() { - const removed = this.#rules.length; - - this.#rules = []; - for (const stringRule of this.#settings.get_strv(SETTINGS_KEY)) { - const [id, workspace] = stringRule.split(':'); - const appInfo = Gio.DesktopAppInfo.new(id); - if (appInfo) - this.#rules.push(new Rule({appInfo, workspace})); - else - log(`Invalid ID ${id}`); - } - this.items_changed(0, removed, this.#rules.length); - } - - vfunc_get_item_type() { - return Rule; - } - - vfunc_get_n_items() { - return this.#rules.length; - } - - vfunc_get_item(pos) { - return this.#rules[pos] ?? null; - } -} - -class AutoMoveSettingsWidget extends Adw.PreferencesGroup { - static { - GObject.registerClass(this); - - this.install_action('rules.add', null, self => self._addNewRule()); - this.install_action('rules.remove', 's', - (self, name, param) => self._rules.remove(param.unpack())); - this.install_action('rules.change-workspace', '(si)', - (self, name, param) => self._rules.changeWorkspace(...param.deepUnpack())); - } - - constructor(settings) { - super({ - title: _('Workspace Rules'), - }); - - this._settings = settings; - this._rules = new RulesList(this._settings); - - const store = new Gio.ListStore({item_type: Gio.ListModel}); - const listModel = new Gtk.FlattenListModel({model: store}); - store.append(this._rules); - store.append(new NewItemModel()); - - this._list = new Gtk.ListBox({ - selection_mode: Gtk.SelectionMode.NONE, - css_classes: ['boxed-list'], - }); - this.add(this._list); - - this._list.bind_model(listModel, item => { - return item instanceof NewItem - ? new NewRuleRow() - : new RuleRow(item); - }); - } - - _addNewRule() { - const dialog = new NewRuleDialog(this.get_root(), this._settings); - dialog.connect('response', (dlg, id) => { - const appInfo = id === Gtk.ResponseType.OK - ? dialog.get_widget().get_app_info() : null; - if (appInfo) - this._rules.append(appInfo); - dialog.destroy(); - }); - dialog.show(); - } -} - -class WorkspaceSelector extends Gtk.Widget { - static [GObject.properties] = { - 'number': GObject.ParamSpec.uint( - 'number', 'number', 'number', - GObject.ParamFlags.READWRITE, - 1, WORKSPACE_MAX, 1), - }; - - static { - GObject.registerClass(this); - - this.set_layout_manager_type(Gtk.BoxLayout); - } - - constructor() { - super(); - - this.layout_manager.spacing = 6; - - const label = new Gtk.Label({ - xalign: 1, - margin_end: 6, - }); - this.bind_property('number', - label, 'label', - GObject.BindingFlags.SYNC_CREATE); - label.set_parent(this); - - const buttonProps = { - css_classes: ['circular'], - valign: Gtk.Align.CENTER, - }; - - this._decButton = new Gtk.Button({ - icon_name: 'list-remove-symbolic', - ...buttonProps, - }); - this._decButton.set_parent(this); - this._decButton.connect('clicked', () => this.number--); - - this._incButton = new Gtk.Button({ - icon_name: 'list-add-symbolic', - ...buttonProps, - }); - this._incButton.set_parent(this); - this._incButton.connect('clicked', () => this.number++); - - this.connect('notify::number', () => this._syncButtons()); - this._syncButtons(); - } - - _syncButtons() { - this._decButton.sensitive = this.number > 1; - this._incButton.sensitive = this.number < WORKSPACE_MAX; - } -} - -class RuleRow extends Adw.ActionRow { - static { - GObject.registerClass(this); - } - - constructor(rule) { - const {appInfo} = rule; - const id = appInfo.get_id(); - - super({ - activatable: false, - title: rule.appInfo.get_display_name(), - }); - - const icon = new Gtk.Image({ - css_classes: ['icon-dropshadow'], - gicon: appInfo.get_icon(), - pixel_size: 32, - }); - this.add_prefix(icon); - - const wsButton = new WorkspaceSelector(); - rule.bind_property('workspace', - wsButton, 'number', - GObject.BindingFlags.SYNC_CREATE); - this.add_suffix(wsButton); - - wsButton.connect('notify::number', () => { - this.activate_action('rules.change-workspace', - new GLib.Variant('(si)', [id, wsButton.number])); - }); - - const button = new Gtk.Button({ - action_name: 'rules.remove', - action_target: new GLib.Variant('s', id), - icon_name: 'edit-delete-symbolic', - has_frame: false, - valign: Gtk.Align.CENTER, - }); - this.add_suffix(button); - } -} - -class NewRuleRow extends Gtk.ListBoxRow { - static { - GObject.registerClass(this); - } - - constructor() { - super({ - action_name: 'rules.add', - child: new Gtk.Image({ - icon_name: 'list-add-symbolic', - pixel_size: 16, - margin_top: 12, - margin_bottom: 12, - margin_start: 12, - margin_end: 12, - }), - }); - this.update_property( - [Gtk.AccessibleProperty.LABEL], [_('Add Rule')]); - } -} - -class NewRuleDialog extends Gtk.AppChooserDialog { - static { - GObject.registerClass(this); - } - - constructor(parent, settings) { - super({ - transient_for: parent, - modal: true, - }); - - this._settings = settings; - - this.get_widget().set({ - show_all: true, - show_other: true, // hide more button - }); - - this.get_widget().connect('application-selected', - this._updateSensitivity.bind(this)); - this._updateSensitivity(); - } - - _updateSensitivity() { - const rules = this._settings.get_strv(SETTINGS_KEY); - const appInfo = this.get_widget().get_app_info(); - this.set_response_sensitive(Gtk.ResponseType.OK, - appInfo && !rules.some(i => i.startsWith(appInfo.get_id()))); - } -} - -export default class AutoMovePrefs extends ExtensionPreferences { - getPreferencesWidget() { - return new AutoMoveSettingsWidget(this.getSettings()); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/private_metadata.json b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/private_metadata.json deleted file mode 100644 index aff34993..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/private_metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "_generated": "Generated by SweetTooth, do not edit", - "description": "Move applications to specific workspaces when they create windows.", - "extension-id": "auto-move-windows", - "gettext-domain": "gnome-shell-extension-auto-move-windows", - "name": "Auto Move Windows", - "original-authors": [ - "alessandro.crismani@gmail.com", - "thomas.bouffon@gmail.com" - ], - "settings-schema": "org.gnome.shell.extensions.auto-move-windows", - "shell-version": [ - "46" - ], - "url": "https://gitlab.gnome.org/GNOME/gnome-shell-extensions", - "uuid": "auto-move-windows@gnome-shell-extensions.gcampax.github.com", - "version": 57 -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/schemas/gschemas.compiled b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/schemas/gschemas.compiled deleted file mode 100644 index 9ba7c0d8..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/schemas/gschemas.compiled and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/schemas/org.gnome.shell.extensions.auto-move-windows.gschema.xml b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/schemas/org.gnome.shell.extensions.auto-move-windows.gschema.xml deleted file mode 100644 index 563f7ee6..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/auto-move-windows@gnome-shell-extensions.gcampax.github.com/schemas/org.gnome.shell.extensions.auto-move-windows.gschema.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - [ ] - Application and workspace list - A list of strings, each containing an application id (desktop file name), followed by a colon and the workspace number - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/appfolders.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/appfolders.js deleted file mode 100644 index 88247771..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/appfolders.js +++ /dev/null @@ -1,265 +0,0 @@ -import Shell from 'gi://Shell'; -import Clutter from 'gi://Clutter'; -import Cogl from 'gi://Cogl'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import { adjustAnimationTime } from 'resource:///org/gnome/shell/misc/animationUtils.js'; - -import { PaintSignals } from '../conveniences/paint_signals.js'; -// TODO drop Tweener in favour of Clutter's `ease` (will need to extend the blur effect for it) -const Tweener = imports.tweener.tweener; - -// TODO: Drop GNOME 46 backwards compatibility -const transparent = Clutter.Color ? - Clutter.Color.from_pixel(0x00000000) : - new Cogl.Color({ - red: 0, - green: 0, - blue: 0, - alpha: 0 - }); -const FOLDER_DIALOG_ANIMATION_TIME = 200; - -const DIALOGS_STYLES = [ - "appfolder-dialogs-transparent", - "appfolder-dialogs-light", - "appfolder-dialogs-dark" -]; - -let original_zoomAndFadeIn = null; -let original_zoomAndFadeOut = null; -let sigma; -let brightness; - -let _zoomAndFadeIn = function () { - let [sourceX, sourceY] = - this._source.get_transformed_position(); - let [dialogX, dialogY] = - this.child.get_transformed_position(); - - this.child.set({ - translation_x: sourceX - dialogX, - translation_y: sourceY - dialogY, - scale_x: this._source.width / this.child.width, - scale_y: this._source.height / this.child.height, - opacity: 0, - }); - - this.set_background_color(transparent); - - let blur_effect = this.get_effect("appfolder-blur"); - - blur_effect.radius = 0; - blur_effect.brightness = 1.0; - Tweener.addTween(blur_effect, - { - radius: sigma * 2, - brightness: brightness, - time: adjustAnimationTime(FOLDER_DIALOG_ANIMATION_TIME / 1000), - transition: 'easeOutQuad' - } - ); - - this.child.ease({ - translation_x: 0, - translation_y: 0, - scale_x: 1, - scale_y: 1, - opacity: 255, - duration: FOLDER_DIALOG_ANIMATION_TIME, - mode: Clutter.AnimationMode.EASE_OUT_QUAD, - }); - - this._needsZoomAndFade = false; - - if (this._sourceMappedId === 0) { - this._sourceMappedId = this._source.connect( - 'notify::mapped', this._zoomAndFadeOut.bind(this)); - } -}; - -let _zoomAndFadeOut = function () { - if (!this._isOpen) - return; - - if (!this._source.mapped) { - this.hide(); - return; - } - - let [sourceX, sourceY] = - this._source.get_transformed_position(); - let [dialogX, dialogY] = - this.child.get_transformed_position(); - - this.set_background_color(transparent); - - let blur_effect = this.get_effect("appfolder-blur"); - Tweener.addTween(blur_effect, - { - radius: 0, - brightness: 1.0, - time: adjustAnimationTime(FOLDER_DIALOG_ANIMATION_TIME / 1000), - transition: 'easeInQuad' - } - ); - - this.child.ease({ - translation_x: sourceX - dialogX, - translation_y: sourceY - dialogY, - scale_x: this._source.width / this.child.width, - scale_y: this._source.height / this.child.height, - opacity: 0, - duration: FOLDER_DIALOG_ANIMATION_TIME, - mode: Clutter.AnimationMode.EASE_OUT_QUAD, - onComplete: () => { - this.child.set({ - translation_x: 0, - translation_y: 0, - scale_x: 1, - scale_y: 1, - opacity: 255, - }); - this.hide(); - - this._popdownCallbacks.forEach(func => func()); - this._popdownCallbacks = []; - }, - }); - - this._needsZoomAndFade = false; -}; - - -export const AppFoldersBlur = class AppFoldersBlur { - // we do not use the effects manager and dummy pipelines here because we - // really want to manage our sigma value ourself during the transition - constructor(connections, settings, _) { - this.connections = connections; - this.paint_signals = new PaintSignals(connections); - this.settings = settings; - } - - enable() { - this._log("blurring appfolders"); - - brightness = this.settings.appfolder.BRIGHTNESS; - sigma = this.settings.appfolder.SIGMA; - - let appDisplay = Main.overview._overview.controls._appDisplay; - - if (appDisplay._folderIcons.length > 0) { - this.blur_appfolders(); - } - - this.connections.connect( - appDisplay, 'view-loaded', _ => this.blur_appfolders() - ); - } - - blur_appfolders() { - let appDisplay = Main.overview._overview.controls._appDisplay; - - if (this.settings.HACKS_LEVEL === 1) - this._log("appfolders hack level 1"); - - appDisplay._folderIcons.forEach(icon => { - icon._ensureFolderDialog(); - - if (original_zoomAndFadeIn == null) { - original_zoomAndFadeIn = icon._dialog._zoomAndFadeIn; - } - if (original_zoomAndFadeOut == null) { - original_zoomAndFadeOut = icon._dialog._zoomAndFadeOut; - } - - let blur_effect = new Shell.BlurEffect({ - name: "appfolder-blur", - radius: sigma * 2, - brightness: brightness, - mode: Shell.BlurMode.BACKGROUND - }); - - icon._dialog.remove_effect_by_name("appfolder-blur"); - icon._dialog.add_effect(blur_effect); - - DIALOGS_STYLES.forEach( - style => icon._dialog._viewBox.remove_style_class_name(style) - ); - - if (this.settings.appfolder.STYLE_DIALOGS > 0) - icon._dialog._viewBox.add_style_class_name( - DIALOGS_STYLES[this.settings.appfolder.STYLE_DIALOGS - 1] - ); - - // finally override the builtin functions - icon._dialog._zoomAndFadeIn = _zoomAndFadeIn; - icon._dialog._zoomAndFadeOut = _zoomAndFadeOut; - - - // HACK - // - //`Shell.BlurEffect` does not repaint when shadows are under it. [1] - // - // This does not entirely fix this bug (shadows caused by windows - // still cause artifacts), but it prevents the shadows of the panel - // buttons to cause artifacts on the panel itself - // - // [1]: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2857 - - if (this.settings.HACKS_LEVEL === 1) { - this.paint_signals.disconnect_all_for_actor(icon._dialog); - this.paint_signals.connect(icon._dialog, blur_effect); - } else { - this.paint_signals.disconnect_all(); - } - }); - }; - - set_sigma(s) { - sigma = s; - if (this.settings.appfolder.BLUR) - this.blur_appfolders(); - } - - set_brightness(b) { - brightness = b; - if (this.settings.appfolder.BLUR) - this.blur_appfolders(); - } - - disable() { - this._log("removing blur from appfolders"); - - let appDisplay = Main.overview._overview.controls._appDisplay; - - if (original_zoomAndFadeIn != null) { - appDisplay._folderIcons.forEach(icon => { - if (icon._dialog) - icon._dialog._zoomAndFadeIn = original_zoomAndFadeIn; - }); - } - - if (original_zoomAndFadeOut != null) { - appDisplay._folderIcons.forEach(icon => { - if (icon._dialog) - icon._dialog._zoomAndFadeOut = original_zoomAndFadeOut; - }); - } - - appDisplay._folderIcons.forEach(icon => { - if (icon._dialog) { - icon._dialog.remove_effect_by_name("appfolder-blur"); - DIALOGS_STYLES.forEach( - s => icon._dialog._viewBox.remove_style_class_name(s) - ); - } - }); - - this.connections.disconnect_all(); - } - - _log(str) { - if (this.settings.DEBUG) - console.log(`[Blur my Shell > appfolders] ${str}`); - } -}; \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/applications.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/applications.js deleted file mode 100644 index e2a8bdf9..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/applications.js +++ /dev/null @@ -1,451 +0,0 @@ -import Meta from 'gi://Meta'; -import Gio from 'gi://Gio'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; - -import { ApplicationsService } from '../dbus/services.js'; -import { PaintSignals } from '../conveniences/paint_signals.js'; -import { DummyPipeline } from '../conveniences/dummy_pipeline.js'; - -export const ApplicationsBlur = class ApplicationsBlur { - constructor(connections, settings, effects_manager) { - this.connections = connections; - this.settings = settings; - this.effects_manager = effects_manager; - this.paint_signals = new PaintSignals(connections); - - // stores every blurred meta window - this.meta_window_map = new Map(); - } - - enable() { - this._log("blurring applications..."); - - // export dbus service for preferences - this.service = new ApplicationsService; - this.service.export(); - - this.mutter_gsettings = new Gio.Settings({ schema: 'org.gnome.mutter' }); - - // blur already existing windows - this.update_all_windows(); - - // blur every new window - this.connections.connect( - global.display, - 'window-created', - (_meta_display, meta_window) => { - this._log("window created"); - - if (meta_window) - this.track_new(meta_window); - } - ); - - // update window blur when focus is changed - this.focused_window_pid = null; - this.init_dynamic_opacity(); - this.connections.connect( - global.display, - 'focus-window', - (_meta_display, meta_window, _p0) => { - if (meta_window && meta_window.bms_pid != this.focused_window_pid) - this.set_focus_for_window(meta_window); - else if (!meta_window) - this.set_focus_for_window(null); - } - ); - - this.connect_to_overview(); - } - - /// Initializes the dynamic opacity for windows, without touching to the connections. - /// This is used both when enabling the component, and when changing the dynamic-opacity pref. - init_dynamic_opacity() { - if (this.settings.applications.DYNAMIC_OPACITY) { - // make the currently focused window solid - if (global.display.focus_window) - this.set_focus_for_window(global.display.focus_window); - } else { - // remove old focused window if the pref was changed - if (this.focused_window_pid) - this.set_focus_for_window(null); - } - } - - /// Connect to the overview being opened/closed to force the blur being - /// shown on every window of the workspaces viewer. - connect_to_overview() { - this.connections.disconnect_all_for(Main.overview); - - if (this.settings.applications.BLUR_ON_OVERVIEW) { - // when the overview is opened, show every window actors (which - // allows the blur to be shown too) - this.connections.connect( - Main.overview, 'showing', - _ => this.meta_window_map.forEach((meta_window, _pid) => { - let window_actor = meta_window.get_compositor_private(); - window_actor?.show(); - }) - ); - - // when the overview is closed, hide every actor that is not on the - // current workspace (to mimic the original behaviour) - this.connections.connect( - Main.overview, 'hidden', - _ => { - this.meta_window_map.forEach((meta_window, _pid) => { - let window_actor = meta_window.get_compositor_private(); - - if ( - !meta_window.get_workspace().active - ) - window_actor.hide(); - }); - } - ); - } - } - - /// Iterate through all existing windows and add blur as needed. - update_all_windows() { - // remove all previously blurred windows, in the case where the - // whitelist was changed - this.meta_window_map.forEach(((_meta_window, pid) => { - this.remove_blur(pid); - })); - - for ( - let i = 0; - i < global.workspace_manager.get_n_workspaces(); - ++i - ) { - let workspace = global.workspace_manager.get_workspace_by_index(i); - let windows = workspace.list_windows(); - - windows.forEach(meta_window => this.track_new(meta_window)); - } - } - - /// Adds the needed signals to every new tracked window, and adds blur if - /// needed. - /// Accepts only untracked meta windows (i.e no `bms_pid` set) - track_new(meta_window) { - // create a pid that will follow the window during its whole life - const pid = ("" + Math.random()).slice(2, 16); - meta_window.bms_pid = pid; - - this._log(`new window tracked, pid: ${pid}`); - - // register the blurred window - this.meta_window_map.set(pid, meta_window); - - // update the blur when wm-class is changed - this.connections.connect( - meta_window, 'notify::wm-class', - _ => this.check_blur(meta_window) - ); - - // update the position and size when the window size changes - this.connections.connect( - meta_window, 'size-changed', - _ => this.update_size(pid) - ); - - // remove the blur when the window is unmanaged - this.connections.connect( - meta_window, 'unmanaging', - _ => this.untrack_meta_window(pid) - ); - - this.check_blur(meta_window); - } - - /// Updates the size of the blur actor associated to a meta window from its pid. - /// Accepts only tracked meta window (i.e `bms_pid` set), be it blurred or not. - update_size(pid) { - if (this.meta_window_map.has(pid)) { - const meta_window = this.meta_window_map.get(pid); - const blur_actor = meta_window.blur_actor; - if (blur_actor) { - const allocation = this.compute_allocation(meta_window); - blur_actor.x = allocation.x; - blur_actor.y = allocation.y; - blur_actor.width = allocation.width; - blur_actor.height = allocation.height; - } - } else - // the pid was visibly not removed - this.untrack_meta_window(pid); - } - - /// Checks if the given actor needs to be blurred. - /// Accepts only tracked meta window, be it blurred or not. - /// - /// In order to be blurred, a window either: - /// - is whitelisted in the user preferences if not enable-all - /// - is not blacklisted if enable-all - check_blur(meta_window) { - const window_wm_class = meta_window.get_wm_class(); - const enable_all = this.settings.applications.ENABLE_ALL; - const whitelist = this.settings.applications.WHITELIST; - const blacklist = this.settings.applications.BLACKLIST; - if (window_wm_class) - this._log(`pid ${meta_window.bms_pid} associated to wm class name ${window_wm_class}`); - - - // if we are in blacklist mode and the window is not blacklisted - // or if we are in whitelist mode and the window is whitelisted - if ( - window_wm_class !== "" - && ((enable_all && !blacklist.includes(window_wm_class)) - || (!enable_all && whitelist.includes(window_wm_class)) - ) - && [ - Meta.FrameType.NORMAL, - Meta.FrameType.DIALOG, - Meta.FrameType.MODAL_DIALOG - ].includes(meta_window.get_frame_type()) - ) { - // only blur the window if it is not already done - if (!meta_window.blur_actor) - this.create_blur_effect(meta_window); - } - - // remove blur it is not explicitly whitelisted or un-blacklisted - else if (meta_window.blur_actor) - this.remove_blur(meta_window.bms_pid); - } - - /// Add the blur effect to the window. - /// Accepts only tracked meta window that is NOT already blurred. - create_blur_effect(meta_window) { - const pid = meta_window.bms_pid; - const window_actor = meta_window.get_compositor_private(); - - const pipeline = new DummyPipeline(this.effects_manager, this.settings.applications); - let [blur_actor, bg_manager] = pipeline.create_background_with_effect( - window_actor, 'bms-application-blurred-widget' - ); - - meta_window.blur_actor = blur_actor; - meta_window.bg_manager = bg_manager; - - // if hacks are selected, force to repaint the window - if (this.settings.HACKS_LEVEL === 1) { - this._log("hack level 1"); - - this.paint_signals.disconnect_all_for_actor(blur_actor); - this.paint_signals.connect(blur_actor, pipeline.effect); - } else { - this.paint_signals.disconnect_all_for_actor(blur_actor); - } - - // make sure window is blurred in overview - if (this.settings.applications.BLUR_ON_OVERVIEW) - this.enforce_window_visibility_on_overview_for(window_actor); - - // update the size - this.update_size(pid); - - // set the window actor's opacity - this.set_window_opacity(window_actor, this.settings.applications.OPACITY); - - // now set up the signals, for the window actor only: they are disconnected - // in `remove_blur`, whereas the signals for the meta window are disconnected - // only when the whole component is disabled - - // update the window opacity when it changes, else we don't control it fully - this.connections.connect( - window_actor, 'notify::opacity', - _ => { - if (this.focused_window_pid != pid) - this.set_window_opacity(window_actor, this.settings.applications.OPACITY); - } - ); - - // hide the blur if window becomes invisible - if (!window_actor.visible) - blur_actor.hide(); - - this.connections.connect( - window_actor, - 'notify::visible', - window_actor => { - if (window_actor.visible) - meta_window.blur_actor.show(); - else - meta_window.blur_actor.hide(); - } - ); - } - - /// With `focus=true`, tells us we are focused on said window (which can be null if - /// we are not focused anymore). It automatically removes the ancient focus. - /// With `focus=false`, just remove the focus from said window (which can still be null). - set_focus_for_window(meta_window, focus = true) { - let blur_actor = null; - let window_actor = null; - let new_pid = null; - if (meta_window) { - blur_actor = meta_window.blur_actor; - window_actor = meta_window.get_compositor_private(); - new_pid = meta_window.bms_pid; - } - - if (focus) { - // remove old focused window if any - if (this.focused_window_pid) { - const old_focused_window = this.meta_window_map.get(this.focused_window_pid); - if (old_focused_window) - this.set_focus_for_window(old_focused_window, false); - } - // set new focused window pid - this.focused_window_pid = new_pid; - // if we have blur, hide it and make the window opaque - if (this.settings.applications.DYNAMIC_OPACITY && blur_actor) { - blur_actor.hide(); - this.set_window_opacity(window_actor, 255); - } - } - // if we remove the focus and have blur, show it and make the window transparent - else if (blur_actor) { - blur_actor.show(); - this.set_window_opacity(window_actor, this.settings.applications.OPACITY); - } - } - - /// Makes sure that, when the overview is visible, the window actor will - /// stay visible no matter what. - /// We can instead hide the last child of the window actor, which will - /// improve performances without hiding the blur effect. - enforce_window_visibility_on_overview_for(window_actor) { - this.connections.connect(window_actor, 'notify::visible', - _ => { - if (this.settings.applications.BLUR_ON_OVERVIEW) { - if ( - !window_actor.visible - && Main.overview.visible - ) { - window_actor.show(); - window_actor.get_last_child().hide(); - } - else if ( - window_actor.visible - ) - window_actor.get_last_child().show(); - } - } - ); - } - - /// Set the opacity of the window actor that sits on top of the blur effect. - set_window_opacity(window_actor, opacity) { - window_actor?.get_children().forEach(child => { - if (child.name !== "blur-actor" && child.opacity != opacity) - child.opacity = opacity; - }); - } - - /// Update the opacity of all window actors. - set_opacity() { - let opacity = this.settings.applications.OPACITY; - - this.meta_window_map.forEach(((meta_window, pid) => { - if (pid != this.focused_window_pid && meta_window.blur_actor) { - let window_actor = meta_window.get_compositor_private(); - this.set_window_opacity(window_actor, opacity); - } - })); - } - - /// Compute the size and position for a blur actor. - /// If `scale-monitor-framebuffer` experimental feature if on, we don't need to manage scaling. - /// Else, on wayland, we need to divide by the scale to get the correct result. - compute_allocation(meta_window) { - const scale_monitor_framebuffer = this.mutter_gsettings.get_strv('experimental-features') - .includes('scale-monitor-framebuffer'); - const is_wayland = Meta.is_wayland_compositor(); - const monitor_index = meta_window.get_monitor(); - // check if the window is using wayland, or xwayland/xorg for rendering - const scale = !scale_monitor_framebuffer && is_wayland && meta_window.get_client_type() == 0 - ? Main.layoutManager.monitors[monitor_index].geometry_scale - : 1; - - let frame = meta_window.get_frame_rect(); - let buffer = meta_window.get_buffer_rect(); - - return { - x: (frame.x - buffer.x) / scale, - y: (frame.y - buffer.y) / scale, - width: frame.width / scale, - height: frame.height / scale - }; - } - - /// Removes the blur actor to make a blurred window become normal again. - /// It however does not untrack the meta window itself. - /// Accepts a pid corresponding (or not) to a blurred (or not) meta window. - remove_blur(pid) { - this._log(`removing blur for pid ${pid}`); - - let meta_window = this.meta_window_map.get(pid); - if (meta_window) { - let window_actor = meta_window.get_compositor_private(); - let blur_actor = meta_window.blur_actor; - let bg_manager = meta_window.bg_manager; - - if (blur_actor && window_actor) { - // reset the opacity - this.set_window_opacity(window_actor, 255); - - // remove the blurred actor - window_actor.remove_child(blur_actor); - bg_manager._bms_pipeline.destroy(); - bg_manager.destroy(); - blur_actor.destroy(); - - // kinda untrack the blurred actor, as its presence is how we know - // whether we are blurred or not - delete meta_window.blur_actor; - delete meta_window.bg_manager; - - // disconnect the signals of the window actor - this.paint_signals.disconnect_all_for_actor(blur_actor); - this.connections.disconnect_all_for(window_actor); - } - } - } - - /// Kinda the same as `remove_blur`, but better: it also untracks the window. - /// This needs to be called when the component is being disabled, else it - /// would cause havoc by having untracked windows during normal operations, - /// which is not the point at all! - /// Accepts a pid corresponding (or not) to a blurred (or not) meta window. - untrack_meta_window(pid) { - this.remove_blur(pid); - let meta_window = this.meta_window_map.get(pid); - if (meta_window) { - this.connections.disconnect_all_for(meta_window); - this.meta_window_map.delete(pid); - } - } - - disable() { - this._log("removing blur from applications..."); - - this.service?.unexport(); - delete this.mutter_gsettings; - - this.meta_window_map.forEach((_meta_window, pid) => { - this.untrack_meta_window(pid); - }); - - this.connections.disconnect_all(); - this.paint_signals.disconnect_all(); - } - - _log(str) { - if (this.settings.DEBUG) - console.log(`[Blur my Shell > applications] ${str}`); - } -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/coverflow_alt_tab.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/coverflow_alt_tab.js deleted file mode 100644 index e4b0f193..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/coverflow_alt_tab.js +++ /dev/null @@ -1,91 +0,0 @@ -import * as Main from "resource:///org/gnome/shell/ui/main.js"; - -import { PaintSignals } from "../conveniences/paint_signals.js"; -import { Pipeline } from "../conveniences/pipeline.js"; - -export const CoverflowAltTabBlur = class CoverflowAltTabBlur { - constructor(connections, settings, effects_manager) { - this.connections = connections; - this.settings = settings; - this.paint_signals = new PaintSignals(connections); - this.effects_manager = effects_manager; - this.background_actors = []; - this.background_managers = []; - } - - enable() { - this._log("blurring coverflow alt-tab"); - - this.update_backgrounds(); - - this.connections.connect( - Main.layoutManager.uiGroup, - "child-added", - (_, child) => this.try_blur(child) - ); - - this.connections.connect(Main.layoutManager, "monitors-changed", (_) => { - this.update_backgrounds(); - }); - } - - update_backgrounds() { - this.remove_background_actors(); - - Main.layoutManager.uiGroup - .get_children() - .forEach((child) => this.try_blur(child)); - } - - try_blur(actor) { - if ( - actor.constructor.name !== "Meta_BackgroundGroup" || - actor.get_name() !== "coverflow-alt-tab-background-group" - ) { - return; - } - - this._log("found coverflow alt-tab to blur"); - - for (let i = 0; i < Main.layoutManager.monitors.length; i++) { - const pipeline = new Pipeline( - this.effects_manager, - global.blur_my_shell._pipelines_manager, - this.settings.coverflow_alt_tab.PIPELINE - ); - - const background_actor = pipeline.create_background_with_effects( - i, - this.background_managers, - actor, - "bms-coverflow-alt-tab-blurred-widget" - ); - - this.background_actors.push(background_actor); - } - } - - remove_background_actors() { - this.background_actors.forEach((actor) => actor.destroy); - this.background_actors = []; - - this.background_managers.forEach((background_manager) => { - background_manager._bms_pipeline.destroy(); - background_manager.destroy(); - }); - this.background_managers = []; - } - - disable() { - this._log("removing blur from coverflow alt-tab"); - - this.remove_background_actors(); - this.connections.disconnect_all(); - } - - _log(str) { - if (this.settings.DEBUG) { - console.log(`[Blur my Shell > coverflow alt-tab] ${str}`); - } - } -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/dash_to_dock.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/dash_to_dock.js deleted file mode 100644 index 4ff212c6..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/dash_to_dock.js +++ /dev/null @@ -1,421 +0,0 @@ -import Meta from 'gi://Meta'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import * as Signals from 'resource:///org/gnome/shell/misc/signals.js'; - -import { PaintSignals } from '../conveniences/paint_signals.js'; - -import { Pipeline } from '../conveniences/pipeline.js'; -import { DummyPipeline } from '../conveniences/dummy_pipeline.js'; - -const DASH_STYLES = [ - "transparent-dash", - "light-dash", - "dark-dash" -]; - - -/// This type of object is created for every dash found, and talks to the main -/// DashBlur thanks to signals. -/// -/// This allows to dynamically track the created dashes for each screen. -class DashInfos { - constructor( - dash_blur, dash, dash_container, dash_background, - background, background_group, bg_manager - ) { - // the parent DashBlur object, to communicate - this.dash_blur = dash_blur; - this.dash = dash; - this.dash_container = dash_container; - this.dash_background = dash_background; - this.background = background; - this.background_group = background_group; - this.bg_manager = bg_manager; - this.settings = dash_blur.settings; - this.old_style = this.dash._background.style; - - this.dash_destroy_id = dash.connect('destroy', () => this.remove_dash_blur(false)); - this.dash_blur_connections_ids = []; - this.dash_blur_connections_ids.push( - this.dash_blur.connect('remove-dashes', () => this.remove_dash_blur()), - this.dash_blur.connect('override-style', () => this.override_style()), - this.dash_blur.connect('remove-style', () => this.remove_style()), - this.dash_blur.connect('show', () => this.background_group.show()), - this.dash_blur.connect('hide', () => this.background_group.hide()), - this.dash_blur.connect('update-size', () => this.update_size()), - this.dash_blur.connect('change-blur-type', () => this.change_blur_type()), - this.dash_blur.connect('update-pipeline', () => this.update_pipeline()) - ); - } - - // IMPORTANT: do never call this in a mutable `this.dash_blur.forEach` - remove_dash_blur(dash_not_already_destroyed = true) { - // remove the style and destroy the effects - this.remove_style(); - this.destroy_dash(dash_not_already_destroyed); - - // remove the dash infos from their list - const dash_infos_index = this.dash_blur.dashes.indexOf(this); - if (dash_infos_index >= 0) - this.dash_blur.dashes.splice(dash_infos_index, 1); - - // disconnect everything - this.dash_blur_connections_ids.forEach(id => { if (id) this.dash_blur.disconnect(id); }); - this.dash_blur_connections_ids = []; - if (this.dash_destroy_id) - this.dash.disconnect(this.dash_destroy_id); - this.dash_destroy_id = null; - } - - override_style() { - this.remove_style(); - - this.dash.set_style_class_name( - DASH_STYLES[this.settings.dash_to_dock.STYLE_DASH_TO_DOCK] - ); - } - - remove_style() { - this.dash._background.style = this.old_style; - - DASH_STYLES.forEach( - style => this.dash.remove_style_class_name(style) - ); - } - - destroy_dash(dash_not_already_destroyed = true) { - if (!dash_not_already_destroyed) - this.bg_manager.backgroundActor = null; - - this.paint_signals?.disconnect_all(); - this.dash.get_parent().remove_child(this.background_group); - this.bg_manager._bms_pipeline.destroy(); - this.bg_manager.destroy(); - this.background_group.destroy(); - } - - change_blur_type() { - this.destroy_dash(); - - let [ - background, background_group, bg_manager, paint_signals - ] = this.dash_blur.add_blur(this.dash); - - this.background = background; - this.background_group = background_group; - this.bg_manager = bg_manager; - this.paint_signals = paint_signals; - - this.dash.get_parent().insert_child_at_index(this.background_group, 0); - - this.update_size(); - } - - update_pipeline() { - this.bg_manager._bms_pipeline.change_pipeline_to( - this.settings.dash_to_dock.PIPELINE - ); - } - - update_size() { - if (this.dash_blur.is_static) { - let [x, y] = this.get_dash_position(this.dash_container, this.dash_background); - - this.background.x = -x; - this.background.y = -y; - - if (this.dash_container.get_style_class_name().includes("top")) - this.background.set_clip( - x, - y + this.dash.y + this.dash_background.y, - this.dash_background.width, - this.dash_background.height - ); - else if (this.dash_container.get_style_class_name().includes("bottom")) - this.background.set_clip( - x, - y + this.dash.y + this.dash_background.y, - this.dash_background.width, - this.dash_background.height - ); - else if (this.dash_container.get_style_class_name().includes("left")) - this.background.set_clip( - x + this.dash.x + this.dash_background.x, - y + this.dash.y + this.dash_background.y, - this.dash_background.width, - this.dash_background.height - ); - else if (this.dash_container.get_style_class_name().includes("right")) - this.background.set_clip( - x + this.dash.x + this.dash_background.x, - y + this.dash.y + this.dash_background.y, - this.dash_background.width, - this.dash_background.height - ); - } else { - this.background.width = this.dash_background.width; - this.background.height = this.dash_background.height; - - this.background.x = this.dash_background.x; - this.background.y = this.dash_background.y + this.dash.y; - } - } - - get_dash_position(dash_container, dash_background) { - var x, y; - - let monitor = Main.layoutManager.findMonitorForActor(dash_container); - let dash_box = dash_container._slider.get_child(); - - if (dash_container.get_style_class_name().includes("top")) { - x = (monitor.width - dash_background.width) / 2; - y = dash_box.y; - } else if (dash_container.get_style_class_name().includes("bottom")) { - x = (monitor.width - dash_background.width) / 2; - y = monitor.height - dash_container.height; - } else if (dash_container.get_style_class_name().includes("left")) { - x = dash_box.x; - y = dash_container.y + (dash_container.height - dash_background.height) / 2 - dash_background.y; - } else if (dash_container.get_style_class_name().includes("right")) { - x = monitor.width - dash_container.width; - y = dash_container.y + (dash_container.height - dash_background.height) / 2 - dash_background.y; - } - - return [x, y]; - } - - _log(str) { - if (this.settings.DEBUG) - console.log(`[Blur my Shell > dash] ${str}`); - } - - _warn(str) { - console.warn(`[Blur my Shell > dash] ${str}`); - } -} - -export const DashBlur = class DashBlur extends Signals.EventEmitter { - constructor(connections, settings, _) { - super(); - this.dashes = []; - this.connections = connections; - this.settings = settings; - this.paint_signals = new PaintSignals(connections); - this.is_static = this.settings.dash_to_dock.STATIC_BLUR; - this.enabled = false; - } - - enable() { - this.connections.connect(Main.uiGroup, 'child-added', (_, actor) => { - if ( - (actor.get_name() === "dashtodockContainer") && - (actor.constructor.name === 'DashToDock') - ) - this.try_blur(actor); - }); - - this.blur_existing_dashes(); - this.connect_to_overview(); - - this.update_size(); - - this.enabled = true; - } - - // Finds all existing dashes on every monitor, and call `try_blur` on them - // We cannot only blur `Main.overview.dash`, as there could be several - blur_existing_dashes() { - this._log("searching for dash"); - - // blur every dash found, filtered by name - Main.uiGroup.get_children().filter((child) => { - return (child.get_name() === "dashtodockContainer") && - (child.constructor.name === 'DashToDock'); - }).forEach(dash_container => this.try_blur(dash_container)); - } - - // Tries to blur the dash contained in the given actor - try_blur(dash_container) { - let dash_box = dash_container._slider.get_child(); - - // verify that we did not already blur that dash - if (!dash_box.get_children().some(child => - child.get_name() === "bms-dash-backgroundgroup" - )) { - this._log("dash to dock found, blurring it"); - - // finally blur the dash - let dash = dash_box.get_children().find(child => { - return child.get_name() === 'dash'; - }); - - this.dashes.push(this.blur_dash_from(dash, dash_container)); - } - } - - // Blurs the dash and returns a `DashInfos` containing its information - blur_dash_from(dash, dash_container) { - let [background, background_group, bg_manager, paint_signals] = this.add_blur(dash); - - // insert the background group to the right element - dash.get_parent().insert_child_at_index(background_group, 0); - - // updates size and position on change - this.connections.connect( - dash, - ['notify::width', 'notify::height'], - _ => this.update_size() - ); - this.connections.connect( - dash_container, - ['notify::width', 'notify::height', 'notify::y', 'notify::x'], - _ => this.update_size() - ); - - const dash_background = dash.get_children().find(child => { - return child.get_style_class_name() === 'dash-background'; - }); - - // create infos - let infos = new DashInfos( - this, - dash, - dash_container, - dash_background, - background, - background_group, - bg_manager, - paint_signals - ); - - this.update_size(); - this.update_background(); - - // returns infos - return infos; - } - - add_blur(dash) { - const monitor = Main.layoutManager.findMonitorForActor(dash); - if (!monitor) - return; - - const background_group = new Meta.BackgroundGroup({ - name: 'bms-dash-backgroundgroup', width: 0, height: 0 - }); - - let background, bg_manager, paint_signals; - let static_blur = this.settings.dash_to_dock.STATIC_BLUR; - if (static_blur) { - let bg_manager_list = []; - const pipeline = new Pipeline( - global.blur_my_shell._effects_manager, - global.blur_my_shell._pipelines_manager, - this.settings.dash_to_dock.PIPELINE - ); - background = pipeline.create_background_with_effects( - monitor.index, bg_manager_list, - background_group, 'bms-dash-blurred-widget' - ); - bg_manager = bg_manager_list[0]; - } - else { - const pipeline = new DummyPipeline( - global.blur_my_shell._effects_manager, - this.settings.dash_to_dock - ); - [background, bg_manager] = pipeline.create_background_with_effect( - background_group, 'bms-dash-blurred-widget' - ); - - paint_signals = new PaintSignals(this.connections); - - // HACK - // - //`Shell.BlurEffect` does not repaint when shadows are under it. [1] - // - // This does not entirely fix this bug (shadows caused by windows - // still cause artifacts), but it prevents the shadows of the dash - // buttons to cause artifacts on the dash itself - // - // [1]: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2857 - - if (this.settings.HACKS_LEVEL === 1) { - this._log("hack level 1"); - - paint_signals.disconnect_all(); - paint_signals.connect(background, pipeline.effect); - } else { - paint_signals.disconnect_all(); - } - } - - return [background, background_group, bg_manager, paint_signals]; - } - - change_blur_type() { - this.is_static = this.settings.dash_to_dock.STATIC_BLUR; - this.emit('change-blur-type'); - - this.update_background(); - } - - /// Connect when overview if opened/closed to hide/show the blur accordingly - connect_to_overview() { - this.connections.disconnect_all_for(Main.overview); - - if (this.settings.dash_to_dock.UNBLUR_IN_OVERVIEW) { - this.connections.connect( - Main.overview, 'showing', _ => this.hide() - ); - this.connections.connect( - Main.overview, 'hidden', _ => this.show() - ); - } - }; - - /// Updates the background to either remove it or not, according to the - /// user preferences. - update_background() { - this._log("updating background"); - if (this.settings.dash_to_dock.OVERRIDE_BACKGROUND) - this.emit('override-style'); - else - this.emit('remove-style'); - } - - update_pipeline() { - this.emit('update-pipeline'); - } - - update_size() { - this.emit('update-size'); - } - - show() { - this.emit('show'); - } - hide() { - this.emit('hide'); - } - - disable() { - this._log("removing blur from dashes"); - - this.emit('remove-dashes'); - - this.dashes = []; - this.connections.disconnect_all(); - - this.enabled = false; - } - - _log(str) { - if (this.settings.DEBUG) - console.log(`[Blur my Shell > dash manager] ${str}`); - } - - _warn(str) { - console.warn(`[Blur my Shell > dash manager] ${str}`); - } -}; \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/lockscreen.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/lockscreen.js deleted file mode 100644 index 7755ba9c..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/lockscreen.js +++ /dev/null @@ -1,89 +0,0 @@ -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import { UnlockDialog } from 'resource:///org/gnome/shell/ui/unlockDialog.js'; - -import { Pipeline } from '../conveniences/pipeline.js'; - -const original_createBackground = - UnlockDialog.prototype._createBackground; -const original_updateBackgroundEffects = - UnlockDialog.prototype._updateBackgroundEffects; -const original_updateBackgrounds = - UnlockDialog.prototype._updateBackgrounds; - - -export const LockscreenBlur = class LockscreenBlur { - constructor(connections, settings, effects_manager) { - this.connections = connections; - this.settings = settings; - this.effects_manager = effects_manager; - this.enabled = false; - } - - enable() { - this._log("blurring lockscreen"); - - this.update_lockscreen(); - - this.enabled = true; - } - - update_lockscreen() { - UnlockDialog.prototype._createBackground = - this._createBackground; - UnlockDialog.prototype._updateBackgroundEffects = - this._updateBackgroundEffects; - UnlockDialog.prototype._updateBackgrounds = - this._updateBackgrounds; - } - - _createBackground(monitor_index) { - let pipeline = new Pipeline( - global.blur_my_shell._effects_manager, global.blur_my_shell._pipelines_manager, - global.blur_my_shell._settings.lockscreen.PIPELINE - ); - - pipeline.create_background_with_effects( - monitor_index, - this._bgManagers, - this._backgroundGroup, - "screen-shield-background" - ); - } - - _updateBackgroundEffects() { - this._updateBackgrounds(); - } - - _updateBackgrounds() { - for (let i = 0; i < this._bgManagers.length; i++) { - this._bgManagers[i]._bms_pipeline.destroy(); - this._bgManagers[i].destroy(); - } - - this._bgManagers = []; - this._backgroundGroup.destroy_all_children(); - - for (let i = 0; i < Main.layoutManager.monitors.length; i++) - this._createBackground(i); - } - - disable() { - this._log("removing blur from lockscreen"); - - UnlockDialog.prototype._createBackground = - original_createBackground; - UnlockDialog.prototype._updateBackgroundEffects = - original_updateBackgroundEffects; - UnlockDialog.prototype._updateBackgrounds = - original_updateBackgrounds; - - this.connections.disconnect_all(); - - this.enabled = false; - } - - _log(str) { - if (this.settings.DEBUG) - console.log(`[Blur my Shell > lockscreen] ${str}`); - } -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/overview.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/overview.js deleted file mode 100644 index 13992343..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/overview.js +++ /dev/null @@ -1,213 +0,0 @@ -import Meta from 'gi://Meta'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; - -import { WorkspaceAnimationController } from 'resource:///org/gnome/shell/ui/workspaceAnimation.js'; -const wac_proto = WorkspaceAnimationController.prototype; - -import { Pipeline } from '../conveniences/pipeline.js'; - -const OVERVIEW_COMPONENTS_STYLE = [ - "overview-components-light", - "overview-components-dark", - "overview-components-transparent" -]; - - -export const OverviewBlur = class OverviewBlur { - constructor(connections, settings, effects_manager) { - this.connections = connections; - this.settings = settings; - this.effects_manager = effects_manager; - this.overview_background_managers = []; - this.overview_background_group = new Meta.BackgroundGroup( - { name: 'bms-overview-backgroundgroup' } - ); - this.animation_background_managers = []; - this.animation_background_group = new Meta.BackgroundGroup( - { name: 'bms-animation-backgroundgroup' } - ); - this.enabled = false; - this.proto_patched = false; - } - - enable() { - this._log("blurring overview"); - - // add css class name for workspace-switch background - Main.uiGroup.add_style_class_name("blurred-overview"); - - // add css class name to make components semi-transparent if wanted - this.update_components_classname(); - - // update backgrounds when the component is enabled - this.update_backgrounds(); - - // connect to monitors change - this.connections.connect(Main.layoutManager, 'monitors-changed', - _ => this.update_backgrounds() - ); - - // part for the workspace animation switch - - // make sure not to do this part if the functions were patched prior, as - // the functions would call themselves and cause infinite recursion - if (!this.proto_patched) { - // store original workspace switching methods for restoring them on - // disable() - this._original_PrepareSwitch = wac_proto._prepareWorkspaceSwitch; - this._original_FinishSwitch = wac_proto._finishWorkspaceSwitch; - - const w_m = global.workspace_manager; - const outer_this = this; - - // create a blurred background actor for each monitor during a - // workspace switch - wac_proto._prepareWorkspaceSwitch = function (...params) { - outer_this._log("prepare workspace switch"); - outer_this._original_PrepareSwitch.apply(this, params); - - // this permits to show the blur behind windows that are on - // workspaces on the left and right - if ( - outer_this.settings.applications.BLUR - ) { - let ws_index = w_m.get_active_workspace_index(); - [ws_index - 1, ws_index + 1].forEach( - i => w_m.get_workspace_by_index(i)?.list_windows().forEach( - window => window.get_compositor_private().show() - ) - ); - } - - Main.uiGroup.insert_child_above( - outer_this.animation_background_group, - global.window_group - ); - - outer_this.animation_background_managers.forEach(bg_manager => { - if (bg_manager._bms_pipeline.actor) - if ( - Meta.prefs_get_workspaces_only_on_primary() && - bg_manager._monitorIndex !== Main.layoutManager.primaryMonitor.index - ) - bg_manager._bms_pipeline.actor.visible = false; - else - bg_manager._bms_pipeline.actor.visible = true; - }); - }; - - // remove the workspace-switch actors when the switch is done - wac_proto._finishWorkspaceSwitch = function (...params) { - outer_this._log("finish workspace switch"); - outer_this._original_FinishSwitch.apply(this, params); - - // this hides windows that are not on the current workspace - if ( - outer_this.settings.applications.BLUR - ) - for (let i = 0; i < w_m.get_n_workspaces(); i++) { - if (i != w_m.get_active_workspace_index()) - w_m.get_workspace_by_index(i)?.list_windows().forEach( - window => window.get_compositor_private().hide() - ); - } - - Main.uiGroup.remove_child(outer_this.animation_background_group); - }; - - this.proto_patched = true; - } - - this.enabled = true; - } - - update_backgrounds() { - // remove every old background - this.remove_background_actors(); - // create new backgrounds for the overview and the animation - for (let i = 0; i < Main.layoutManager.monitors.length; i++) { - const pipeline_overview = new Pipeline( - this.effects_manager, - global.blur_my_shell._pipelines_manager, - this.settings.overview.PIPELINE - ); - pipeline_overview.create_background_with_effects( - i, this.overview_background_managers, - this.overview_background_group, 'bms-overview-blurred-widget' - ); - - const pipeline_animation = new Pipeline( - this.effects_manager, - global.blur_my_shell._pipelines_manager, - this.settings.overview.PIPELINE - ); - pipeline_animation.create_background_with_effects( - i, this.animation_background_managers, - this.animation_background_group, 'bms-animation-blurred-widget' - ); - } - // add the container widget for the overview only to the overview group - Main.layoutManager.overviewGroup.insert_child_at_index(this.overview_background_group, 0); - } - - /// Updates the classname to style overview components with semi-transparent - /// backgrounds. - update_components_classname() { - OVERVIEW_COMPONENTS_STYLE.forEach( - style => Main.uiGroup.remove_style_class_name(style) - ); - - if (this.settings.overview.STYLE_COMPONENTS > 0) - Main.uiGroup.add_style_class_name( - OVERVIEW_COMPONENTS_STYLE[this.settings.overview.STYLE_COMPONENTS - 1] - ); - } - - remove_background_actors() { - this.overview_background_group.remove_all_children(); - this.animation_background_group.remove_all_children(); - this.overview_background_managers.forEach(background_manager => { - background_manager._bms_pipeline.destroy(); - background_manager.destroy(); - }); - this.animation_background_managers.forEach(background_manager => { - background_manager._bms_pipeline.destroy(); - background_manager.destroy(); - }); - this.overview_background_managers = []; - this.animation_background_managers = []; - } - - disable() { - this._log("removing blur from overview"); - - this.remove_background_actors(); - Main.uiGroup.remove_style_class_name("blurred-overview"); - OVERVIEW_COMPONENTS_STYLE.forEach( - style => Main.uiGroup.remove_style_class_name(style) - ); - - this.connections.disconnect_all(); - this.enabled = false; - } - - restore_patched_proto() { - if (this.proto_patched) { - if (this._original_PrepareSwitch) - wac_proto._prepareWorkspaceSwitch = this._original_PrepareSwitch; - if (this._original_FinishSwitch) - wac_proto._finishWorkspaceSwitch = this._original_FinishSwitch; - - this.proto_patched = false; - } - } - - _log(str) { - if (this.settings.DEBUG) - console.log(`[Blur my Shell > overview] ${str}`); - } - - _warn(str) { - console.warn(`[Blur my Shell > overview] ${str}`); - } -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/panel.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/panel.js deleted file mode 100644 index df1be7be..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/panel.js +++ /dev/null @@ -1,542 +0,0 @@ -import St from 'gi://St'; -import Meta from 'gi://Meta'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; - -import { PaintSignals } from '../conveniences/paint_signals.js'; - -import { Pipeline } from '../conveniences/pipeline.js'; -import { DummyPipeline } from '../conveniences/dummy_pipeline.js'; - -const DASH_TO_PANEL_UUID = 'dash-to-panel@jderose9.github.com'; -const PANEL_STYLES = [ - "transparent-panel", - "light-panel", - "dark-panel", - "contrasted-panel" -]; - - -export const PanelBlur = class PanelBlur { - constructor(connections, settings, effects_manager) { - this.connections = connections; - this.window_signal_ids = new Map(); - this.settings = settings; - this.effects_manager = effects_manager; - this.actors_list = []; - this.enabled = false; - } - - enable() { - this._log("blurring top panel"); - - // check for panels when Dash to Panel is activated - this.connections.connect( - Main.extensionManager, - 'extension-state-changed', - (_, extension) => { - if (extension.uuid === DASH_TO_PANEL_UUID - && extension.state === 1 - ) { - this.connections.connect( - global.dashToPanel, - 'panels-created', - _ => this.blur_dtp_panels() - ); - - this.blur_existing_panels(); - } - } - ); - - this.blur_existing_panels(); - - // connect to overview being opened/closed, and dynamically show or not - // the blur when a window is near a panel - this.connect_to_windows_and_overview(); - - // update the classname if the panel to have or have not light text - this.update_light_text_classname(); - - // connect to workareas change - this.connections.connect(global.display, 'workareas-changed', - _ => this.reset() - ); - - this.enabled = true; - } - - reset() { - this._log("resetting..."); - - this.disable(); - setTimeout(_ => this.enable(), 1); - } - - /// Check for already existing panels and blur them if they are not already - blur_existing_panels() { - // check if dash-to-panel is present - if (global.dashToPanel) { - // blur already existing ones - if (global.dashToPanel.panels) - this.blur_dtp_panels(); - } else { - // if no dash-to-panel, blur the main and only panel - this.maybe_blur_panel(Main.panel); - } - } - - blur_dtp_panels() { - // FIXME when Dash to Panel changes its size, it seems it creates new - // panels; but I can't get to delete old widgets - - // blur every panel found - global.dashToPanel.panels.forEach(p => { - this.maybe_blur_panel(p.panel); - }); - - // if main panel is not included in the previous panels, blur it - if ( - !global.dashToPanel.panels - .map(p => p.panel) - .includes(Main.panel) - && - this.settings.dash_to_panel.BLUR_ORIGINAL_PANEL - ) - this.maybe_blur_panel(Main.panel); - }; - - /// Blur a panel only if it is not already blurred (contained in the list) - maybe_blur_panel(panel) { - // check if the panel is contained in the list - let actors = this.actors_list.find( - actors => actors.widgets.panel == panel - ); - - if (!actors) - // if the actors is not blurred, blur it - this.blur_panel(panel); - } - - /// Blur a panel - blur_panel(panel) { - let panel_box = panel.get_parent(); - let is_dtp_panel = false; - if (!panel_box.name) { - is_dtp_panel = true; - panel_box = panel_box.get_parent(); - } - - let monitor = Main.layoutManager.findMonitorForActor(panel); - if (!monitor) - return; - - let background_group = new Meta.BackgroundGroup( - { name: 'bms-panel-backgroundgroup', width: 0, height: 0 } - ); - - let background, bg_manager; - let static_blur = this.settings.panel.STATIC_BLUR; - if (static_blur) { - let bg_manager_list = []; - const pipeline = new Pipeline( - this.effects_manager, - global.blur_my_shell._pipelines_manager, - this.settings.panel.PIPELINE - ); - background = pipeline.create_background_with_effects( - monitor.index, bg_manager_list, - background_group, 'bms-panel-blurred-widget' - ); - bg_manager = bg_manager_list[0]; - } - else { - const pipeline = new DummyPipeline(this.effects_manager, this.settings.panel); - [background, bg_manager] = pipeline.create_background_with_effect( - background_group, 'bms-panel-blurred-widget' - ); - - let paint_signals = new PaintSignals(this.connections); - - // HACK - // - //`Shell.BlurEffect` does not repaint when shadows are under it. [1] - // - // This does not entirely fix this bug (shadows caused by windows - // still cause artifacts), but it prevents the shadows of the panel - // buttons to cause artifacts on the panel itself - // - // [1]: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2857 - - { - if (this.settings.HACKS_LEVEL === 1) { - this._log("panel hack level 1"); - - paint_signals.disconnect_all(); - paint_signals.connect(background, pipeline.effect); - } else { - paint_signals.disconnect_all(); - } - } - } - - // insert the background group to the panel box - panel_box.insert_child_at_index(background_group, 0); - - // the object that is used to remembering each elements that is linked to the blur effect - let actors = { - widgets: { panel, panel_box, background, background_group }, - static_blur, - monitor, - bg_manager, - is_dtp_panel - }; - this.actors_list.push(actors); - - // update the size of the actor - this.update_size(actors); - - // connect to panel, panel_box and its parent position or size change - // this should fire update_size every time one of its params change - this.connections.connect( - panel, - 'notify::position', - _ => this.update_size(actors) - ); - this.connections.connect( - panel_box, - ['notify::size', 'notify::position'], - _ => this.update_size(actors) - ); - this.connections.connect( - panel_box.get_parent(), - 'notify::position', - _ => this.update_size(actors) - ); - - // connect to the panel getting destroyed - this.connections.connect( - panel, - 'destroy', - _ => this.destroy_blur(actors, true) - ); - } - - update_size(actors) { - let panel = actors.widgets.panel; - let panel_box = actors.widgets.panel_box; - let background = actors.widgets.background; - let [width, height] = panel_box.get_size(); - - // if static blur, need to clip the background - if (actors.static_blur) { - let monitor = Main.layoutManager.findMonitorForActor(panel); - if (!monitor) - return; - - // an alternative to panel.get_transformed_position, because it - // sometimes yields NaN (probably when the actor is not fully - // positionned yet) - let [p_x, p_y] = panel_box.get_position(); - let [p_p_x, p_p_y] = panel_box.get_parent().get_position(); - let x = p_x + p_p_x - monitor.x + (width - panel.width) / 2; - let y = p_y + p_p_y - monitor.y + (height - panel.height) / 2; - - background.set_clip(x, y, panel.width, panel.height); - background.x = (width - panel.width) / 2 - x; - background.y = .5 + (height - panel.height) / 2 - y; - } else { - background.x = panel.x; - background.y = panel.y; - background.width = panel.width; - background.height = panel.height; - } - - // update the monitor panel is on - actors.monitor = Main.layoutManager.findMonitorForActor(panel); - } - - /// Connect when overview if opened/closed to hide/show the blur accordingly - /// - /// If HIDETOPBAR is set, we need just to hide the blur when showing appgrid - /// (so no shadow is cropped) - connect_to_overview() { - // may be called when panel blur is disabled, if hidetopbar - // compatibility is toggled on/off - // if this is the case, do nothing as only the panel blur interfers with - // hidetopbar - if ( - this.settings.panel.BLUR && - this.settings.panel.UNBLUR_IN_OVERVIEW - ) { - if (!this.settings.hidetopbar.COMPATIBILITY) { - this.connections.connect( - Main.overview, 'showing', _ => this.hide() - ); - this.connections.connect( - Main.overview, 'hidden', _ => this.show() - ); - } else { - let appDisplay = Main.overview._overview._controls._appDisplay; - - this.connections.connect( - appDisplay, 'show', _ => this.hide() - ); - this.connections.connect( - appDisplay, 'hide', _ => this.show() - ); - this.connections.connect( - Main.overview, 'hidden', _ => this.show() - ); - } - - } - } - - /// Connect to windows disable transparency when a window is too close - connect_to_windows() { - if ( - this.settings.panel.OVERRIDE_BACKGROUND_DYNAMICALLY - ) { - // connect to overview opening/closing - this.connections.connect(Main.overview, ['showing', 'hiding'], - _ => this.update_visibility() - ); - - // connect to session mode update - this.connections.connect(Main.sessionMode, 'updated', - _ => this.update_visibility() - ); - - // manage already-existing windows - for (const meta_window_actor of global.get_window_actors()) { - this.on_window_actor_added( - meta_window_actor.get_parent(), meta_window_actor - ); - } - - // manage windows at their creation/removal - this.connections.connect(global.window_group, 'child-added', - this.on_window_actor_added.bind(this) - ); - this.connections.connect(global.window_group, 'child-removed', - this.on_window_actor_removed.bind(this) - ); - - // connect to a workspace change - this.connections.connect(global.window_manager, 'switch-workspace', - _ => this.update_visibility() - ); - - // perform early update - this.update_visibility(); - } else { - // reset transparency for every panels - this.actors_list.forEach( - actors => this.set_should_override_panel(actors, true) - ); - } - } - - /// An helper to connect to both the windows and overview signals. - /// This is the only function that should be directly called, to prevent - /// inconsistencies with signals not being disconnected. - connect_to_windows_and_overview() { - this.disconnect_from_windows_and_overview(); - this.connect_to_overview(); - this.connect_to_windows(); - } - - /// Disconnect all the connections created by connect_to_windows - disconnect_from_windows_and_overview() { - // disconnect the connections to actors - for (const actor of [ - Main.overview, Main.sessionMode, - global.window_group, global.window_manager, - Main.overview._overview._controls._appDisplay - ]) { - this.connections.disconnect_all_for(actor); - } - - // disconnect the connections from windows - for (const [actor, ids] of this.window_signal_ids) { - for (const id of ids) { - actor.disconnect(id); - } - } - this.window_signal_ids = new Map(); - } - - /// Update the css classname of the panel for light theme - update_light_text_classname(disable = false) { - if (this.settings.panel.FORCE_LIGHT_TEXT && !disable) - Main.panel.add_style_class_name("panel-light-text"); - else - Main.panel.remove_style_class_name("panel-light-text"); - } - - /// Callback when a new window is added - on_window_actor_added(container, meta_window_actor) { - this.window_signal_ids.set(meta_window_actor, [ - meta_window_actor.connect('notify::allocation', - _ => this.update_visibility() - ), - meta_window_actor.connect('notify::visible', - _ => this.update_visibility() - ) - ]); - this.update_visibility(); - } - - /// Callback when a window is removed - on_window_actor_removed(container, meta_window_actor) { - for (const signalId of this.window_signal_ids.get(meta_window_actor)) { - meta_window_actor.disconnect(signalId); - } - this.window_signal_ids.delete(meta_window_actor); - this.update_visibility(); - } - - /// Update the visibility of the blur effect - update_visibility() { - if ( - Main.panel.has_style_pseudo_class('overview') - || !Main.sessionMode.hasWindows - ) { - this.actors_list.forEach( - actors => this.set_should_override_panel(actors, true) - ); - return; - } - - if (!Main.layoutManager.primaryMonitor) - return; - - // get all the windows in the active workspace that are visible - const workspace = global.workspace_manager.get_active_workspace(); - const windows = workspace.list_windows().filter(meta_window => - meta_window.showing_on_its_workspace() - && !meta_window.is_hidden() - && meta_window.get_window_type() !== Meta.WindowType.DESKTOP - // exclude Desktop Icons NG - && meta_window.get_gtk_application_id() !== "com.rastersoft.ding" - && meta_window.get_gtk_application_id() !== "com.desktop.ding" - ); - - // check if at least one window is near enough to each panel and act - // accordingly - const scale = St.ThemeContext.get_for_stage(global.stage).scale_factor; - this.actors_list - // do not apply for dtp panels, as it would only cause bugs and it - // can be done from its preferences anyway - .filter(actors => !actors.is_dtp_panel) - .forEach(actors => { - let panel = actors.widgets.panel; - let panel_top = panel.get_transformed_position()[1]; - let panel_bottom = panel_top + panel.get_height(); - - // check if at least a window is near enough the panel - let window_overlap_panel = false; - windows.forEach(meta_window => { - let window_monitor_i = meta_window.get_monitor(); - let same_monitor = actors.monitor.index == window_monitor_i; - - let window_vertical_pos = meta_window.get_frame_rect().y; - - // if so, and if in the same monitor, then it overlaps - if (same_monitor - && - window_vertical_pos < panel_bottom + 5 * scale - ) - window_overlap_panel = true; - }); - - // if no window overlaps, then the panel is transparent - this.set_should_override_panel( - actors, !window_overlap_panel - ); - }); - } - - /// Choose wether or not the panel background should be overriden, in - /// respect to its argument and the `override-background` setting. - set_should_override_panel(actors, should_override) { - let panel = actors.widgets.panel; - - PANEL_STYLES.forEach(style => panel.remove_style_class_name(style)); - - if ( - this.settings.panel.OVERRIDE_BACKGROUND - && - should_override - ) - panel.add_style_class_name( - PANEL_STYLES[this.settings.panel.STYLE_PANEL] - ); - } - - update_pipeline() { - this.actors_list.forEach(actors => - actors.bg_manager._bms_pipeline.change_pipeline_to( - this.settings.panel.PIPELINE - ) - ); - } - - show() { - this.actors_list.forEach(actors => { - actors.widgets.background.show(); - }); - } - - hide() { - this.actors_list.forEach(actors => { - actors.widgets.background.hide(); - }); - } - - // IMPORTANT: do never call this in a mutable `this.actors_list.forEach` - destroy_blur(actors, panel_already_destroyed) { - this.set_should_override_panel(actors, false); - - actors.bg_manager._bms_pipeline.destroy(); - - if (panel_already_destroyed) - actors.bg_manager.backgroundActor = null; - actors.bg_manager.destroy(); - - if (!panel_already_destroyed) { - actors.widgets.panel_box.remove_child(actors.widgets.background_group); - actors.widgets.background_group.destroy_all_children(); - actors.widgets.background_group.destroy(); - } - - let index = this.actors_list.indexOf(actors); - if (index >= 0) - this.actors_list.splice(index, 1); - } - - disable() { - this._log("removing blur from top panel"); - - this.disconnect_from_windows_and_overview(); - - this.update_light_text_classname(true); - - const immutable_actors_list = [...this.actors_list]; - immutable_actors_list.forEach(actors => this.destroy_blur(actors, false)); - this.actors_list = []; - - this.connections.disconnect_all(); - - this.enabled = false; - } - - _log(str) { - if (this.settings.DEBUG) - console.log(`[Blur my Shell > panel] ${str}`); - } - - _warn(str) { - console.warn(`[Blur my Shell > panel] ${str}`); - } -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/screenshot.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/screenshot.js deleted file mode 100644 index dcf05eba..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/screenshot.js +++ /dev/null @@ -1,110 +0,0 @@ -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; - -import { Pipeline } from '../conveniences/pipeline.js'; - -export const ScreenshotBlur = class ScreenshotBlur { - constructor(connections, settings, effects_manager) { - this.connections = connections; - this.settings = settings; - this.screenshot_background_managers = []; - this.effects_manager = effects_manager; - } - - enable() { - this._log("blurring screenshot's window selector"); - - // connect to monitors change - this.connections.connect(Main.layoutManager, 'monitors-changed', - _ => this.update_backgrounds() - ); - - // update backgrounds when the component is enabled - this.update_backgrounds(); - } - - update_backgrounds() { - // remove every old background - this.remove_background_actors(); - // create new backgrounds for the screenshot window selector - for (let i = 0; i < Main.screenshotUI._windowSelectors.length; i++) { - const window_selector = Main.screenshotUI._windowSelectors[i]; - const pipeline = new Pipeline( - this.effects_manager, - global.blur_my_shell._pipelines_manager, - this.settings.screenshot.PIPELINE - ); - pipeline.create_background_with_effects( - window_selector._monitorIndex, this.screenshot_background_managers, - window_selector, 'bms-screenshot-blurred-widget', false - ); - - // prevent old `BackgroundActor` from being accessed, which creates a whole bug of logs - this.connections.connect(window_selector.get_parent(), 'destroy', _ => { - this.screenshot_background_managers.forEach(background_manager => { - if (background_manager.backgroundActor) { - let widget = background_manager.backgroundActor.get_parent(); - let parent = widget?.get_parent(); - - if (parent == window_selector) { - background_manager._bms_pipeline.destroy(); - parent.remove_child(widget); - } - } - background_manager.destroy(); - }); - - window_selector.get_children().forEach(child => { - if (child.get_name() == 'bms-screenshot-blurred-widget') - window_selector.remove_child(child); - }); - - let index = this.screenshot_background_managers.indexOf(window_selector); - this.screenshot_background_managers.splice(index, 1); - }); - } - } - - update_pipeline() { - this.screenshot_background_managers.forEach(background_manager => - background_manager._bms_pipeline.change_pipeline_to( - this.settings.screenshot.PIPELINE - ) - ); - } - - remove_background_actors() { - this.screenshot_background_managers.forEach(background_manager => { - background_manager._bms_pipeline.destroy(); - if (background_manager.backgroundActor) { - let widget = background_manager.backgroundActor.get_parent(); - widget?.get_parent()?.remove_child(widget); - } - background_manager.destroy(); - }); - - Main.screenshotUI._windowSelectors.forEach(window_selector => - window_selector.get_children().forEach(child => { - if (child.get_name() == 'bms-screenshot-blurred-widget') - window_selector.remove_child(child); - }) - ); - - this.screenshot_background_managers = []; - } - - disable() { - this._log("removing blur from screenshot's window selector"); - - this.remove_background_actors(); - this.connections.disconnect_all(); - } - - _log(str) { - if (this.settings.DEBUG) - console.log(`[Blur my Shell > screenshot] ${str}`); - } - - _warn(str) { - console.warn(`[Blur my Shell > screenshot] ${str}`); - } -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/window_list.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/window_list.js deleted file mode 100644 index 6ab0644f..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/components/window_list.js +++ /dev/null @@ -1,148 +0,0 @@ -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; - -import { PaintSignals } from '../conveniences/paint_signals.js'; -import { DummyPipeline } from '../conveniences/dummy_pipeline.js'; - - -export const WindowListBlur = class WindowListBlur { - constructor(connections, settings, effects_manager) { - this.connections = connections; - this.settings = settings; - this.paint_signals = new PaintSignals(connections); - this.effects_manager = effects_manager; - this.pipelines = []; - } - - enable() { - this._log("blurring window list"); - - // blur if window-list is found - Main.layoutManager.uiGroup.get_children().forEach( - child => this.try_blur(child) - ); - - // listen to new actors in `Main.layoutManager.uiGroup` and blur it if - // if is window-list - this.connections.connect( - Main.layoutManager.uiGroup, - 'child-added', - (_, child) => this.try_blur(child) - ); - - // connect to overview - this.connections.connect(Main.overview, 'showing', _ => { - this.hide(); - }); - this.connections.connect(Main.overview, 'hidden', _ => { - this.show(); - }); - } - - try_blur(actor) { - if ( - actor.constructor.name === "WindowList" && - actor.style !== "background:transparent;" - ) { - this._log("found window list to blur"); - - const pipeline = new DummyPipeline( - this.effects_manager, this.settings.window_list - ); - pipeline.attach_effect_to_actor(actor); - this.pipelines.push(pipeline); - - actor.set_style("background:transparent;"); - - actor._windowList.get_children().forEach( - window => this.style_window_button(window) - ); - - this.connections.connect( - actor._windowList, - 'child-added', - (_, window) => this.style_window_button(window) - ); - - this.connections.connect( - actor, - 'destroy', - _ => this.destroy_blur(pipeline, true) - ); - - - // HACK - // - //`Shell.BlurEffect` does not repaint when shadows are under it. [1] - // - // This does not entirely fix this bug (shadows caused by windows - // still cause artifacts), but it prevents the shadows of the panel - // buttons to cause artifacts on the panel itself - // - // [1]: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2857 - - if (this.settings.HACKS_LEVEL === 1) { - this._log("window list hack level 1"); - - this.paint_signals.disconnect_all_for_actor(actor); - this.paint_signals.connect(actor, pipeline.effect); - } else { - this.paint_signals.disconnect_all_for_actor(actor); - } - } - } - - style_window_button(window) { - window.get_child_at_index(0).set_style( - "box-shadow:none; background-color:rgba(0,0,0,0.2); border-radius:5px;" - ); - } - - // IMPORTANT: do never call this in a mutable `this.pipelines.forEach` - destroy_blur(pipeline, actor_destroyed = false) { - if (!actor_destroyed) { - this.remove_style(pipeline.actor); - this.paint_signals.disconnect_all_for_actor(pipeline.actor); - } - - pipeline.destroy(); - - let index = this.pipelines.indexOf(pipeline); - if (index >= 0) - this.pipelines.splice(pipeline, 1); - } - - remove_style(actor) { - if ( - actor.constructor.name === "WindowList" && - actor.style === "background:transparent;" - ) { - actor.style = null; - actor._windowList.get_children().forEach( - child => child.get_child_at_index(0).set_style(null) - ); - } - } - - hide() { - this.pipelines.forEach(pipeline => pipeline.effect?.set_enabled(false)); - } - - show() { - this.pipelines.forEach(pipeline => pipeline.effect?.set_enabled(true)); - } - - disable() { - this._log("removing blur from window list"); - - const immutable_pipelines_list = [...this.pipelines]; - immutable_pipelines_list.forEach(pipeline => this.destroy_blur(pipeline)); - - this.pipelines = []; - this.connections.disconnect_all(); - } - - _log(str) { - if (this.settings.DEBUG) - console.log(`[Blur my Shell > window list] ${str}`); - } -}; \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/connections.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/connections.js deleted file mode 100644 index 0583db33..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/connections.js +++ /dev/null @@ -1,106 +0,0 @@ -import GObject from 'gi://GObject'; - -/// An object to easily manage signals. -export const Connections = class Connections { - constructor() { - this.buffer = []; - } - - /// Adds a connection. - /// - /// Takes as arguments: - /// - an actor, which fires the signal - /// - signal(s) (string or array of strings), which are watched for - /// - a callback, which is called when the signal is fired - connect(actor, signals, handler) { - if (signals instanceof Array) { - signals.forEach(signal => { - let id = actor.connect(signal, handler); - this.process_connection(actor, id); - }); - } else { - let id = actor.connect(signals, handler); - this.process_connection(actor, id); - } - - } - - /// Process the given actor and id. - /// - /// This makes sure that the signal is disconnected when the actor is - /// destroyed, and that the signal can be managed through other Connections - /// methods. - process_connection(actor, id) { - let infos = { - actor: actor, - id: id - }; - - // remove the signal when the actor is destroyed - if ( - actor.connect && - ( - !(actor instanceof GObject.Object) || - GObject.signal_lookup('destroy', actor) - ) - ) { - let destroy_id = actor.connect('destroy', () => { - actor.disconnect(id); - actor.disconnect(destroy_id); - - let index = this.buffer.indexOf(infos); - if (index >= 0) { - this.buffer.splice(index, 1); - } - }); - infos.destroy_id = destroy_id; - } - - this.buffer.push(infos); - } - - /// Disconnects every connection found for an actor. - disconnect_all_for(actor) { - // get every connection stored for the actor - let actor_connections = this.buffer.filter( - infos => infos.actor === actor - ); - - // remove each of them - actor_connections.forEach(connection => { - // disconnect - try { - connection.actor.disconnect(connection.id); - if ('destroy_id' in connection) - connection.actor.disconnect(connection.destroy_id); - } catch (e) { - this._warn(`error removing connection: ${e}; continuing`); - } - - // remove from buffer - let index = this.buffer.indexOf(connection); - this.buffer.splice(index, 1); - }); - } - - /// Disconnect every connection for each actor. - disconnect_all() { - this.buffer.forEach(connection => { - // disconnect - try { - connection.actor.disconnect(connection.id); - if ('destroy_id' in connection) - connection.actor.disconnect(connection.destroy_id); - } catch (e) { - this._warn(`error removing connection: ${e}; continuing`); - } - }); - - // reset buffer - this.buffer = []; - } - - _warn(str) { - console.warn(`[Blur my Shell > connections] ${str}`); - } -}; \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/dummy_pipeline.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/dummy_pipeline.js deleted file mode 100644 index 544d68cf..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/dummy_pipeline.js +++ /dev/null @@ -1,112 +0,0 @@ -import St from 'gi://St'; -import Clutter from 'gi://Clutter'; - -/// A dummy `Pipeline`, for dynamic blur only. -/// Instead of a pipeline id, we take the settings of the component we want to blur. -export const DummyPipeline = class DummyPipeline { - constructor(effects_manager, settings, actor = null) { - this.effects_manager = effects_manager; - this.settings = settings; - this.effect = null; - this.attach_effect_to_actor(actor); - } - - create_background_with_effect( - background_group, - widget_name - ) { - // create the new actor - this.actor = new St.Widget({ name: widget_name }); - - this.attach_effect_to_actor(this.actor); - - // a dummy `BackgroundManager`, just to access the pipeline easily - let bg_manager = new Clutter.Actor; - bg_manager.backgroundActor = this.actor; - bg_manager._bms_pipeline = this; - - background_group.insert_child_at_index(this.actor, 0); - - return [this.actor, bg_manager]; - }; - - attach_effect_to_actor(actor) { - // set the actor - if (actor) - this.actor = actor; - else { - this.remove_pipeline_from_actor(); - return; - } - - // build the new effect to be added - this.build_effect({ - unscaled_radius: 2 * this.settings.SIGMA, - brightness: this.settings.BRIGHTNESS, - }); - - this.actor_destroy_id = this.actor.connect( - "destroy", () => this.remove_pipeline_from_actor() - ); - - // add the effect to the actor - if (this.actor) - this.actor.add_effect(this.effect); - else - this._warn(`could not add effect to actor, actor does not exist anymore`); - } - - remove_pipeline_from_actor() { - this.remove_effect(); - if (this.actor && this.actor_destroy_id) - this.actor.disconnect(this.actor_destroy_id); - this.actor_destroy_id = null; - this.actor = null; - } - - build_effect(params) { - // create the effect - this.effect = this.effects_manager.new_native_dynamic_gaussian_blur_effect(params); - - // connect to settings changes, using the true gsettings object - this._sigma_changed_id = this.settings.settings.connect( - 'changed::sigma', () => this.effect.unscaled_radius = 2 * this.settings.SIGMA - ); - this._brightness_changed_id = this.settings.settings.connect( - 'changed::brightness', () => this.effect.brightness = this.settings.BRIGHTNESS - ); - } - - repaint_effect() { - this.effect?.queue_repaint(); - } - - /// Remove every effect from the actor it is attached to. Please note that they are not - /// destroyed, but rather stored (thanks to the `EffectManager` class) to be reused later. - remove_effect() { - if (this.effect) - this.effects_manager.remove(this.effect); - this.effect = null; - - if (this._sigma_changed_id) - this.settings.settings.disconnect(this._sigma_changed_id); - if (this._brightness_changed_id) - this.settings.settings.disconnect(this._brightness_changed_id); - delete this._sigma_changed_id; - delete this._brightness_changed_id; - } - - /// Do nothing for this dummy pipeline. - /// Note: exposed to public API. - change_pipeline_to() { return; } - - /// Note: exposed to public API. - destroy() { - this.remove_effect(); - this.remove_pipeline_from_actor(); - } - - _warn(str) { - console.warn(`[Blur my Shell > dummy pip] ${str}`); - } -}; \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/effects_manager.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/effects_manager.js deleted file mode 100644 index 947d535f..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/effects_manager.js +++ /dev/null @@ -1,90 +0,0 @@ -import { get_supported_effects } from '../effects/effects.js'; - -/// An object to manage effects (by not destroying them all the time) -export const EffectsManager = class EffectsManager { - constructor(connections) { - this.connections = connections; - this.used = []; - this.SUPPORTED_EFFECTS = get_supported_effects(); - - Object.keys(this.SUPPORTED_EFFECTS).forEach(effect_name => { - // init the arrays containing each unused effect - this[effect_name + '_effects'] = []; - - // init the functions for each effect - this['new_' + effect_name + '_effect'] = function (params) { - let effect; - if (this[effect_name + '_effects'].length > 0) { - effect = this[effect_name + '_effects'].splice(0, 1)[0]; - effect.set({ - ...this.SUPPORTED_EFFECTS[effect_name].class.default_params, ...params - }); - } else - effect = new this.SUPPORTED_EFFECTS[effect_name].class({ - ...this.SUPPORTED_EFFECTS[effect_name].class.default_params, ...params - }); - - this.used.push(effect); - this.connect_to_destroy(effect); - return effect; - }; - }); - } - - connect_to_destroy(effect) { - effect.old_actor = effect.get_actor(); - if (effect.old_actor) - effect.old_actor_id = effect.old_actor.connect('destroy', _ => { - this.remove(effect, true); - }); - - this.connections.connect(effect, 'notify::actor', _ => { - let actor = effect.get_actor(); - - if (effect.old_actor && actor != effect.old_actor) - effect.old_actor.disconnect(effect.old_actor_id); - - if (actor && actor != effect.old_actor) { - effect.old_actor_id = actor.connect('destroy', _ => { - this.remove(effect, true); - }); - } - }); - } - - // IMPORTANT: do never call this in a mutable `this.used.forEach` - remove(effect, actor_already_destroyed = false) { - if (!actor_already_destroyed) - try { - effect.get_actor()?.remove_effect(effect); - } catch (e) { - this._warn(`could not remove the effect, continuing: ${e}`); - } - if (effect.old_actor) - effect.old_actor.disconnect(effect.old_actor_id); - delete effect.old_actor; - delete effect.old_actor_id; - - let index = this.used.indexOf(effect); - if (index >= 0) { - this.used.splice(index, 1); - - Object.keys(this.SUPPORTED_EFFECTS).forEach(effect_name => { - if (effect instanceof this.SUPPORTED_EFFECTS[effect_name].class) - this[effect_name + '_effects'].push(effect); - }); - } - } - - destroy_all() { - const immutable_used_list = [...this.used]; - immutable_used_list.forEach(effect => this.remove(effect)); - Object.keys(this.SUPPORTED_EFFECTS).forEach(effect_name => { - this[effect_name + '_effects'].splice(0, this[effect_name + '_effects'].length); - }); - } - - _warn(str) { - console.warn(`[Blur my Shell > effects mng] ${str}`); - } -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/keys.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/keys.js deleted file mode 100644 index 1e1dba84..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/keys.js +++ /dev/null @@ -1,188 +0,0 @@ -import { Type } from './settings.js'; - -// This lists the preferences keys -export const KEYS = [ - { - component: "general", schemas: [ - { type: Type.PIPELINES, name: "pipelines" }, - { type: Type.I, name: "hacks-level" }, - { type: Type.B, name: "debug" }, - ] - }, - { - component: "overview", schemas: [ - { type: Type.B, name: "blur" }, - { type: Type.S, name: "pipeline" }, - { type: Type.I, name: "style-components" }, - ] - }, - { - component: "appfolder", schemas: [ - { type: Type.B, name: "blur" }, - { type: Type.I, name: "sigma" }, - { type: Type.D, name: "brightness" }, - { type: Type.I, name: "style-dialogs" }, - ] - }, - { - component: "panel", schemas: [ - { type: Type.B, name: "blur" }, - { type: Type.B, name: "static-blur" }, - { type: Type.S, name: "pipeline" }, - { type: Type.I, name: "sigma" }, - { type: Type.D, name: "brightness" }, - { type: Type.B, name: "unblur-in-overview" }, - { type: Type.B, name: "force-light-text" }, - { type: Type.B, name: "override-background" }, - { type: Type.I, name: "style-panel" }, - { type: Type.B, name: "override-background-dynamically" }, - ] - }, - { - component: "dash-to-dock", schemas: [ - { type: Type.B, name: "blur" }, - { type: Type.B, name: "static-blur" }, - { type: Type.S, name: "pipeline" }, - { type: Type.I, name: "sigma" }, - { type: Type.D, name: "brightness" }, - { type: Type.B, name: "unblur-in-overview" }, - { type: Type.B, name: "override-background" }, - { type: Type.I, name: "style-dash-to-dock" }, - ] - }, - { - component: "applications", schemas: [ - { type: Type.B, name: "blur" }, - { type: Type.I, name: "sigma" }, - { type: Type.D, name: "brightness" }, - { type: Type.I, name: "opacity" }, - { type: Type.B, name: "dynamic-opacity" }, - { type: Type.B, name: "blur-on-overview" }, - { type: Type.B, name: "enable-all" }, - { type: Type.AS, name: "whitelist" }, - { type: Type.AS, name: "blacklist" }, - ] - }, - { - component: "lockscreen", schemas: [ - { type: Type.B, name: "blur" }, - { type: Type.S, name: "pipeline" }, - ] - }, - { - component: "window-list", schemas: [ - { type: Type.B, name: "blur" }, - { type: Type.S, name: "pipeline" }, - { type: Type.I, name: "sigma" }, - { type: Type.D, name: "brightness" }, - ] - }, - { - component: "coverflow-alt-tab", schemas: [ - { type: Type.B, name: "blur" }, - { type: Type.S, name: "pipeline" }, - ] - }, - { - component: "screenshot", schemas: [ - { type: Type.B, name: "blur" }, - { type: Type.S, name: "pipeline" }, - ] - }, - { - component: "hidetopbar", schemas: [ - { type: Type.B, name: "compatibility" }, - ] - }, - { - component: "dash-to-panel", schemas: [ - { type: Type.B, name: "blur-original-panel" }, - ] - }, -]; - - -// This lists the deprecated preferences keys -export const DEPRECATED_KEYS = [ - { - component: "general", schemas: [ - { type: Type.I, name: "sigma" }, - { type: Type.D, name: "brightness" }, - { type: Type.C, name: "color" }, - { type: Type.D, name: "noise-amount" }, - { type: Type.D, name: "noise-lightness" }, - { type: Type.B, name: "color-and-noise" }, - ] - }, - { - component: "overview", schemas: [ - { type: Type.B, name: "customize" }, - { type: Type.I, name: "sigma" }, - { type: Type.D, name: "brightness" }, - { type: Type.C, name: "color" }, - { type: Type.D, name: "noise-amount" }, - { type: Type.D, name: "noise-lightness" }, - ] - }, - { - component: "appfolder", schemas: [ - { type: Type.B, name: "customize" }, - { type: Type.C, name: "color" }, - { type: Type.D, name: "noise-amount" }, - { type: Type.D, name: "noise-lightness" }, - ] - }, - { - component: "panel", schemas: [ - { type: Type.B, name: "customize" }, - { type: Type.C, name: "color" }, - { type: Type.D, name: "noise-amount" }, - { type: Type.D, name: "noise-lightness" }, - ] - }, - { - component: "dash-to-dock", schemas: [ - { type: Type.B, name: "customize" }, - { type: Type.C, name: "color" }, - { type: Type.D, name: "noise-amount" }, - { type: Type.D, name: "noise-lightness" }, - { type: Type.I, name: "corner-radius" }, - ] - }, - { - component: "applications", schemas: [ - { type: Type.B, name: "customize" }, - { type: Type.C, name: "color" }, - { type: Type.D, name: "noise-amount" }, - { type: Type.D, name: "noise-lightness" }, - ] - }, - { - component: "lockscreen", schemas: [ - { type: Type.B, name: "customize" }, - { type: Type.I, name: "sigma" }, - { type: Type.D, name: "brightness" }, - { type: Type.C, name: "color" }, - { type: Type.D, name: "noise-amount" }, - { type: Type.D, name: "noise-lightness" }, - ] - }, - { - component: "window-list", schemas: [ - { type: Type.B, name: "customize" }, - { type: Type.C, name: "color" }, - { type: Type.D, name: "noise-amount" }, - { type: Type.D, name: "noise-lightness" }, - ] - }, - { - component: "screenshot", schemas: [ - { type: Type.B, name: "customize" }, - { type: Type.I, name: "sigma" }, - { type: Type.D, name: "brightness" }, - { type: Type.C, name: "color" }, - { type: Type.D, name: "noise-amount" }, - { type: Type.D, name: "noise-lightness" }, - ] - }, -]; \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/paint_signals.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/paint_signals.js deleted file mode 100644 index 5fbfee47..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/paint_signals.js +++ /dev/null @@ -1,91 +0,0 @@ -import GObject from 'gi://GObject'; -import Clutter from 'gi://Clutter'; - - -export const PaintSignals = class PaintSignals { - constructor(connections) { - this.buffer = []; - this.connections = connections; - } - - connect(actor, blur_effect) { - let paint_effect = new EmitPaintSignal(); - let infos = { - actor: actor, - paint_effect: paint_effect - }; - let counter = 0; - - actor.add_effect(paint_effect); - this.connections.connect(paint_effect, 'update-blur', () => { - try { - // checking if blur_effect.queue_repaint() has been recently called - if (counter === 0) { - counter = 2; - blur_effect.queue_repaint(); - } - else counter--; - } catch (e) { } - }); - - // remove the actor from buffer when it is destroyed - if ( - actor.connect && - ( - !(actor instanceof GObject.Object) || - GObject.signal_lookup('destroy', actor) - ) - ) - this.connections.connect(actor, 'destroy', () => { - const immutable_buffer = [...this.buffer]; - immutable_buffer.forEach(infos => { - if (infos.actor === actor) { - // remove from buffer - let index = this.buffer.indexOf(infos); - this.buffer.splice(index, 1); - } - }); - }); - - this.buffer.push(infos); - } - - disconnect_all_for_actor(actor) { - const immutable_buffer = [...this.buffer]; - immutable_buffer.forEach(infos => { - if (infos.actor === actor) { - this.connections.disconnect_all_for(infos.paint_effect); - infos.actor.remove_effect(infos.paint_effect); - - // remove from buffer - let index = this.buffer.indexOf(infos); - this.buffer.splice(index, 1); - } - }); - } - - disconnect_all() { - this.buffer.forEach(infos => { - this.connections.disconnect_all_for(infos.paint_effect); - infos.actor.remove_effect(infos.paint_effect); - }); - - this.buffer = []; - } -}; - -export const EmitPaintSignal = GObject.registerClass({ - GTypeName: 'EmitPaintSignal', - Signals: { - 'update-blur': { - param_types: [] - }, - } -}, - class EmitPaintSignal extends Clutter.Effect { - vfunc_paint(node, paint_context, paint_flags) { - this.emit("update-blur"); - super.vfunc_paint(node, paint_context, paint_flags); - } - } -); \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/pipeline.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/pipeline.js deleted file mode 100644 index 84b1d7af..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/pipeline.js +++ /dev/null @@ -1,223 +0,0 @@ -import St from 'gi://St'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import * as Background from 'resource:///org/gnome/shell/ui/background.js'; - -/// A `Pipeline` object is a handy way to manage the effects attached to an actor. It only manages -/// one actor at a time (so blurring multiple widgets will need multiple `Pipeline`), and is -/// linked to a `pipeline_id` that has been (hopefully) defined in the settings. -/// -/// It communicates with the settings through the `PipelinesManager` object, and receives different -/// signals (with `pipeline_id` being an unique string): -/// - `'pipeline_id'::pipeline-updated`, handing a new pipeline descriptor object, when the pipeline -/// has been changed enough that it needs to rebuild the effects configuration -/// - `'pipeline_id'::pipeline-destroyed`, when the pipeline has been destroyed; thus making the -/// `Pipeline` change its id to `pipeline_default` -/// -/// And each effect, with an unique `id`, is connected to the `PipelinesManager` for the signals: -/// - `'pipeline_id'::effect-'id'-key-removed`, handing the key that was removed -/// - `'pipeline_id'::effect-'id'-key-updated`, handing the key that was changed and its new value -/// - `'pipeline_id'::effect-'id'-key-added`, handing the key that was added and its value -export const Pipeline = class Pipeline { - constructor(effects_manager, pipelines_manager, pipeline_id, actor = null) { - this.effects_manager = effects_manager; - this.pipelines_manager = pipelines_manager; - this.effects = []; - this.set_pipeline_id(pipeline_id); - this.attach_pipeline_to_actor(actor); - } - - /// Create a background linked to the monitor with index `monitor_index`, with a - /// `BackgroundManager` that is appended to the list `background_managers`. The background actor - /// will be given the name `widget_name` and inserted into the given `background_group`. - /// If `use_absolute_position` is false, then the position used is at (0,0); useful when the - /// positioning is relative. - /// Note: exposed to public API. - create_background_with_effects( - monitor_index, - background_managers, - background_group, - widget_name, - use_absolute_position = true - ) { - let monitor = Main.layoutManager.monitors[monitor_index]; - - // create the new actor - this.actor = new St.Widget({ - name: widget_name, - x: use_absolute_position ? monitor.x : 0, - y: .5 + (use_absolute_position ? monitor.y : 0), // add 1 to correct z-position - z_position: 1, // seems to fix the multi-monitor glitch - width: monitor.width, - height: monitor.height - }); - - // remove the effects, wether or not we attach the pipeline to the actor: if they are fired - // while the actor has changed, this could go bad - this.remove_all_effects(); - if (this.pipeline_id) - this.attach_pipeline_to_actor(this.actor); - - let bg_manager = new Background.BackgroundManager({ - container: this.actor, - monitorIndex: monitor_index, - controlPosition: false, - }); - bg_manager._bms_pipeline = this; - - background_managers.push(bg_manager); - background_group.insert_child_at_index(this.actor, 0); - - return this.actor; - }; - - /// Set the pipeline id, correctly connecting the `Pipeline` object to listen the pipelines - /// manager for pipeline-wide changes. This does not update the effects in consequence, call - /// `change_pipeline_to` instead if you want to reconstruct the effects too. - set_pipeline_id(pipeline_id) { - // disconnect ancient signals - this.remove_connections(); - - // change the id - this.pipeline_id = pipeline_id; - - // connect to settings changes - this._pipeline_changed_id = this.pipelines_manager.connect( - this.pipeline_id + '::pipeline-updated', - (_, new_pipeline) => this.update_effects_from_pipeline(new_pipeline) - ); - this._pipeline_destroyed_id = this.pipelines_manager.connect( - this.pipeline_id + '::pipeline-destroyed', - _ => this.change_pipeline_to("pipeline_default") - ); - } - - /// Disconnect the signals for the pipeline changes. Please note that the signals related to the - /// effects are stored with them and removed with `remove_all_effects`. - remove_connections() { - if (this._pipeline_changed_id) - this.pipelines_manager.disconnect(this._pipeline_changed_id); - if (this._pipeline_destroyed_id) - this.pipelines_manager.disconnect(this._pipeline_destroyed_id); - this._pipeline_changed_id = null; - this._pipeline_destroyed_id = null; - } - - /// Attach a Pipeline object with `pipeline_id` already set to an actor. - attach_pipeline_to_actor(actor) { - // set the actor - if (actor) - this.actor = actor; - else { - this.remove_pipeline_from_actor(); - return; - } - - // attach the pipeline - let pipeline = this.pipelines_manager.pipelines[this.pipeline_id]; - if (!pipeline) { - this._warn(`could not attach pipeline to actor, pipeline "${this.pipeline_id}" not found`); - // do not recurse... - if ("pipeline_default" in this.pipelines_manager.pipelines) { - this.set_pipeline_id("pipeline_default"); - pipeline = this.pipelines_manager.pipelines["pipeline_default"]; - } else - return; - } - - this.actor_destroy_id = this.actor.connect( - "destroy", () => this.remove_pipeline_from_actor() - ); - - // update the effects - this.update_effects_from_pipeline(pipeline); - } - - remove_pipeline_from_actor() { - this.remove_all_effects(); - if (this.actor && this.actor_destroy_id) - this.actor.disconnect(this.actor_destroy_id); - this.actor_destroy_id = null; - this.actor = null; - } - - /// Update the effects from the given pipeline object, the hard way. - update_effects_from_pipeline(pipeline) { - // remove all effects - this.remove_all_effects(); - - // build the new effects to be added - pipeline.effects.forEach(effect => { - if ('new_' + effect.type + '_effect' in this.effects_manager) - this.build_effect(effect); - else - this._warn(`could not add effect to actor, effect "${effect.type}" not found`); - }); - this.effects.reverse(); - - // add the effects to the actor - if (this.actor) - this.effects.forEach(effect => this.actor.add_effect(effect)); - else - this._warn(`could not add effect to actor, actor does not exist anymore`); - } - - /// Given an `effect_infos` object containing the effect type, id and params, build an effect - /// and append it to the effects list - build_effect(effect_infos) { - let effect = this.effects_manager['new_' + effect_infos.type + '_effect'](effect_infos.params); - this.effects.push(effect); - - // connect to settings changes - effect._effect_key_removed_id = this.pipelines_manager.connect( - this.pipeline_id + '::effect-' + effect_infos.id + '-key-removed', - (_, key) => effect[key] = effect.constructor.default_params[key] - ); - effect._effect_key_updated_id = this.pipelines_manager.connect( - this.pipeline_id + '::effect-' + effect_infos.id + '-key-updated', - (_, key, value) => effect[key] = value - ); - effect._effect_key_added_id = this.pipelines_manager.connect( - this.pipeline_id + '::effect-' + effect_infos.id + '-key-added', - (_, key, value) => effect[key] = value - ); - } - - /// Remove every effect from the actor it is attached to. Please note that they are not - /// destroyed, but rather stored (thanks to the `EffectManager` class) to be reused later. - remove_all_effects() { - this.effects.forEach(effect => { - this.effects_manager.remove(effect); - [ - effect._effect_key_removed_id, - effect._effect_key_updated_id, - effect._effect_key_added_id - ].forEach( - id => { if (id) this.pipelines_manager.disconnect(id); } - ); - delete effect._effect_key_removed_id; - delete effect._effect_key_updated_id; - delete effect._effect_key_added_id; - }); - this.effects = []; - } - - /// Change the pipeline id, and update the effects according to this change. - /// Note: exposed to public API. - change_pipeline_to(pipeline_id) { - this.set_pipeline_id(pipeline_id); - this.attach_pipeline_to_actor(this.actor); - } - - /// Resets the `Pipeline` object to a sane state, removing every effect and signal. - /// Note: exposed to public API. - destroy() { - this.remove_all_effects(); - this.remove_connections(); - this.remove_pipeline_from_actor(); - this.pipeline_id = null; - } - - _warn(str) { - console.warn(`[Blur my Shell > pipeline] ${str}`); - } -}; \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/pipelines_manager.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/pipelines_manager.js deleted file mode 100644 index 0fdfe9ea..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/pipelines_manager.js +++ /dev/null @@ -1,168 +0,0 @@ -const Signals = imports.signals; - -/// The `PipelinesManager` object permits to store the list of pipelines and their effects in -/// memory. It is meant to *always* be in sync with the `org.gnome.shell.extensions.blur-my-shell`'s -/// `pipelines` gschema. However, we do not want to re-create every effect each time this schema is -/// changed, so the pipelines manager handles it, and dispatches the updates with targeted signals. -/// -/// It is only connected to ONE signal (the pipelines schema being changed), and emits numerous -/// which are connected to by both the different `Pipeline` objects in the extension, and by the -/// different pages of the extension preferences. -/// It emits three different types of signals: -/// -/// - general changes to the pipelines list, connected to by the extension preferences: -/// - `pipeline-list-changed`, when the list of pipelines has changed (by creation or deletion) -/// - `pipeline-names-changed`, when the name of a pipeline is changed -/// -/// - signals that are targeted towards a given pipeline, with `pipeline_id` being its unique id: -/// - `'pipeline_id'::pipeline-updated`, handing a new pipeline descriptor object, when the -/// pipeline has been changed quite a bit (added/destroyed/reordered the effects) -/// - `'pipeline_id'::pipeline-destroyed`, when the pipeline has been destroyed -/// - `'pipeline_id'::pipeline-renamed`, handing the new name, when the pipeline has been -/// renamed, which is only important for the preferences -/// -/// - signals that are targeted towards a given effect, with `effect_id` being its unique id, and -/// `pipeline_id` the unique id of the pipeline it is attached to: -/// - `'pipeline_id'::effect-'effect_id'-key-removed`, handing the key that was removed -/// - `'pipeline_id'::effect-'effect_id'-key-updated`, handing the key that was changed and its -/// new value -/// - `'pipeline_id'::effect-'effect_id'-key-added`, handing the key that was added and its -/// value -export class PipelinesManager { - constructor(settings) { - this.settings = settings; - this.pipelines = this.settings.PIPELINES; - this.settings.PIPELINES_changed(_ => this.on_pipeline_update()); - } - - create_pipeline(name, effects = []) { - // select a random id for the pipeline - let id = "pipeline_" + ("" + Math.random()).slice(2, 16); - // add a random ID for each effect, to help tracking them - effects.forEach(effect => effect.id = "effect_" + ("" + Math.random()).slice(2, 16)); - - this.pipelines[id] = { name, effects }; - this.settings.PIPELINES = this.pipelines; - this._emit('pipeline-created', id, this.pipelines[id]); - this._emit('pipeline-list-changed'); - return id; - } - - duplicate_pipeline(id) { - if (!(id in this.pipelines)) { - this._warn(`could not duplicate pipeline, id ${id} does not exist`); - return; - } - const pipeline = this.pipelines[id]; - this.create_pipeline(pipeline.name + " - duplicate", [...pipeline.effects]); - this.settings.PIPELINES = this.pipelines; - } - - delete_pipeline(id) { - if (!(id in this.pipelines)) { - this._warn(`could not delete pipeline, id ${id} does not exist`); - return; - } - if (id == "pipeline_default") { - this._warn(`could not delete pipeline "pipeline_default" as it is immutable`); - return; - } - delete this.pipelines[id]; - this.settings.PIPELINES = this.pipelines; - this._emit(id + '::pipeline-destroyed'); - this._emit('pipeline-list-changed'); - } - - update_pipeline_effects(id, effects, emit_update_signal = true) { - if (!(id in this.pipelines)) { - this._warn(`could not update pipeline effects, id ${id} does not exist`); - return; - } - this.pipelines[id].effects = [...effects]; - this.settings.PIPELINES = this.pipelines; - if (emit_update_signal) - this._emit(id + '::pipeline-updated'); - } - - rename_pipeline(id, name) { - if (!(id in this.pipelines)) { - this._warn(`could not rename pipeline, id ${id} does not exist`); - return; - } - this.pipelines[id].name = name.slice(); - this.settings.PIPELINES = this.pipelines; - this._emit(id + '::pipeline-renamed', name); - this._emit('pipeline-names-changed'); - } - - on_pipeline_update() { - const old_pipelines = this.pipelines; - this.pipelines = this.settings.PIPELINES; - - for (var pipeline_id in old_pipelines) { - // if we find a pipeline that does not exist anymore, signal it - if (!(pipeline_id in this.pipelines)) { - this._emit(pipeline_id + '::pipeline-destroyed'); - continue; - } - - const old_pipeline = old_pipelines[pipeline_id]; - const new_pipeline = this.pipelines[pipeline_id]; - - // verify if both pipelines have effects in the same order - // if they have, then check for their parameters - if ( - old_pipeline.effects.length == new_pipeline.effects.length && - old_pipeline.effects.every((effect, i) => effect.id === new_pipeline.effects[i].id) - ) { - for (let i = 0; i < old_pipeline.effects.length; i++) { - const old_effect = old_pipeline.effects[i]; - const new_effect = new_pipeline.effects[i]; - const id = old_effect.id; - for (let key in old_effect.params) { - // if a key was removed, we emit to tell the effect to use the default value - if (!(key in new_effect.params)) - this._emit( - pipeline_id + '::effect-' + id + '-key-removed', key - ); - // if a key was updated, we emit to tell the effect to change its value - else if (old_effect.params[key] != new_effect.params[key]) - this._emit( - pipeline_id + '::effect-' + id + '-key-updated', key, new_effect.params[key] - ); - } - for (let key in new_effect.params) { - // if a key was added, we emit to tell the effect the key and its value - if (!(key in old_effect.params)) - this._emit( - pipeline_id + '::effect-' + id + '-key-added', key, new_effect.params[key] - ); - } - } - } - // if either the order has changed, or there are new effects, then rebuild it - else - this._emit(pipeline_id + '::pipeline-updated', new_pipeline); - } - } - - destroy() { - this.settings.PIPELINES_disconnect(); - } - - _emit(signal, ...args) { - this.emit(signal, ...args); - this._log(`signal: '${signal}', arguments: ${args}`); - } - - _log(str) { - if (this.settings.DEBUG) - console.log(`[Blur my Shell > pipelines] ${str}`); - } - - _warn(str) { - console.warn(`[Blur my Shell > pipelines] ${str}`); - } -} - -Signals.addSignalMethods(PipelinesManager.prototype); \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/settings.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/settings.js deleted file mode 100644 index 53f8497c..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/settings.js +++ /dev/null @@ -1,363 +0,0 @@ -import GLib from 'gi://GLib'; -const Signals = imports.signals; - -/// An enum non-extensively describing the type of gsettings key. -export const Type = { - B: 'Boolean', - I: 'Integer', - D: 'Double', - S: 'String', - C: 'Color', - AS: 'StringArray', - PIPELINES: 'Pipelines' -}; - -/// An object to get and manage the gsettings preferences. -/// -/// Should be initialized with an array of keys, for example: -/// -/// let settings = new Settings([ -/// { type: Type.I, name: "panel-corner-radius" }, -/// { type: Type.B, name: "debug" } -/// ]); -/// -/// Each {type, name} object represents a gsettings key, which must be created -/// in the gschemas.xml file of the extension. -export const Settings = class Settings { - constructor(keys, settings) { - this.settings = settings; - this.keys = keys; - - this.keys.forEach(bundle => { - let component = this; - let component_settings = settings; - if (bundle.component !== "general") { - let bundle_component = bundle.component.replaceAll('-', '_'); - this[bundle_component] = { - settings: this.settings.get_child(bundle.component) - }; - component = this[bundle_component]; - component_settings = settings.get_child(bundle.component); - } - - - bundle.schemas.forEach(key => { - let property_name = this.get_property_name(key.name); - - switch (key.type) { - case Type.B: - Object.defineProperty(component, property_name, { - get() { - return component_settings.get_boolean(key.name); - }, - set(v) { - component_settings.set_boolean(key.name, v); - } - }); - break; - - case Type.I: - Object.defineProperty(component, property_name, { - get() { - return component_settings.get_int(key.name); - }, - set(v) { - component_settings.set_int(key.name, v); - } - }); - break; - - case Type.D: - Object.defineProperty(component, property_name, { - get() { - return component_settings.get_double(key.name); - }, - set(v) { - component_settings.set_double(key.name, v); - } - }); - break; - - case Type.S: - Object.defineProperty(component, property_name, { - get() { - return component_settings.get_string(key.name); - }, - set(v) { - component_settings.set_string(key.name, v); - } - }); - break; - - case Type.C: - Object.defineProperty(component, property_name, { - // returns the array [red, blue, green, alpha] with - // values between 0 and 1 - get() { - let val = component_settings.get_value(key.name); - return val.deep_unpack(); - }, - // takes an array [red, blue, green, alpha] with - // values between 0 and 1 - set(v) { - let val = new GLib.Variant("(dddd)", v); - component_settings.set_value(key.name, val); - } - }); - break; - - case Type.AS: - Object.defineProperty(component, property_name, { - get() { - let val = component_settings.get_value(key.name); - return val.deep_unpack(); - }, - set(v) { - let val = new GLib.Variant("as", v); - component_settings.set_value(key.name, val); - } - }); - break; - - case Type.PIPELINES: - Object.defineProperty(component, property_name, { - get() { - let pips = component_settings.get_value(key.name).deep_unpack(); - Object.keys(pips).forEach(pipeline_id => { - let pipeline = pips[pipeline_id]; - - if (!('name' in pipeline)) { - this._warn('impossible to get pipelines, pipeline has not name, resetting'); - component[property_name + '_reset'](); - return component[property_name]; - } - let name = pipeline.name.deep_unpack(); - if (typeof name !== 'string') { - this._warn('impossible to get pipelines, pipeline name is not a string, resetting'); - component[property_name + '_reset'](); - return component[property_name]; - } - - if (!('effects' in pipeline)) { - this._warn('impossible to get pipelines, pipeline has not effects, resetting'); - component[property_name + '_reset'](); - return component[property_name]; - } - let effects = pipeline.effects.deep_unpack(); - if (!Array.isArray(effects)) { - this._warn('impossible to get pipelines, pipeline effects is not an array, resetting'); - component[property_name + '_reset'](); - return component[property_name]; - } - - effects = effects.map(effect => effect.deep_unpack()); - effects.forEach(effect => { - if (!('type' in effect)) { - this._warn('impossible to get pipelines, effect has not type, resetting'); - component[property_name + '_reset'](); - return component[property_name]; - } - let type = effect.type.deep_unpack(); - if (typeof type !== 'string') { - this._warn('impossible to get pipelines, effect type is not a string, resetting'); - component[property_name + '_reset'](); - return component[property_name]; - } - - if (!('id' in effect)) { - this._warn('impossible to get pipelines, effect has not id, resetting'); - component[property_name + '_reset'](); - return component[property_name]; - } - let id = effect.id.deep_unpack(); - if (typeof id !== 'string') { - this._warn('impossible to get pipelines, effect id is not a string, resetting'); - component[property_name + '_reset'](); - return component[property_name]; - } - - let params = {}; - if ('params' in effect) - params = effect.params.deep_unpack(); - if (!(params && typeof params === 'object' && params.constructor === Object)) { - this._warn('impossible to get pipelines, effect params is not an object, resetting'); - component[property_name + '_reset'](); - return component[property_name]; - } - Object.keys(params).forEach(param_key => { - params[param_key] = params[param_key].deep_unpack(); - }); - - effect.type = type; - effect.id = id; - effect.params = params; - }); - pipeline.name = name; - pipeline.effects = effects; - }); - return pips; - }, - set(pips) { - let pipelines = {}; - Object.keys(pips).forEach(pipeline_id => { - let pipeline = pips[pipeline_id]; - if (!(pipeline && typeof pipeline === 'object' && pipeline.constructor === Object)) { - this._warn('impossible to set pipelines, pipeline is not an object'); - return; - } - - if (!('name' in pipeline)) { - this._warn('impossible to set pipelines, pipeline has no name'); - return; - } - if (typeof pipeline.name !== 'string') { - this._warn('impossible to set pipelines, pipeline name is not a string'); - return; - } - - if (!('effects' in pipeline)) { - this._warn('impossible to set pipelines, pipeline has no effect'); - return; - } - if (!Array.isArray(pipeline.effects)) { - this._warn('impossible to set pipelines, effects is not an array'); - return; - } - - let gvariant_effects = []; - pipeline.effects.forEach(effect => { - if (!(effect instanceof Object)) { - this._warn('impossible to set pipelines, effect is not an object'); - return; - } - - if (!('type' in effect)) { - this._warn('impossible to set pipelines, effect has not type'); - return; - } - if (typeof effect.type !== 'string') { - this._warn('impossible to set pipelines, effect type is not a string'); - return; - } - - if (!('id' in effect)) { - this._warn('impossible to set pipelines, effect has not id'); - return; - } - if (typeof effect.id !== 'string') { - this._warn('impossible to set pipelines, effect id is not a string'); - return; - } - - let params = {}; - if ('params' in effect) { - params = effect.params; - } - let gvariant_params = {}; - Object.keys(params).forEach(param_key => { - let param = params[param_key]; - if (typeof param === 'boolean') - gvariant_params[param_key] = GLib.Variant.new_boolean(param); - else if (typeof param === 'number') { - if (Number.isInteger(param)) - gvariant_params[param_key] = GLib.Variant.new_int32(param); - else - gvariant_params[param_key] = GLib.Variant.new_double(param); - } else if (typeof param === 'string') - gvariant_params[param_key] = GLib.Variant.new_string(param); - else if (Array.isArray(param) && param.length == 4) - gvariant_params[param_key] = new GLib.Variant("(dddd)", param); - else - this._warn('impossible to set pipeline, effect parameter type is unknown'); - }); - - gvariant_effects.push( - new GLib.Variant("a{sv}", { - type: GLib.Variant.new_string(effect.type), - id: GLib.Variant.new_string(effect.id), - params: new GLib.Variant("a{sv}", gvariant_params) - }) - ); - }); - - pipelines[pipeline_id] = { - name: GLib.Variant.new_string(pipeline.name), - effects: new GLib.Variant("av", gvariant_effects) - }; - }); - let val = new GLib.Variant("a{sa{sv}}", pipelines); - component_settings.set_value(key.name, val); - } - }); - break; - } - - - component[property_name + '_reset'] = function () { - return component_settings.reset(key.name); - }; - - component[property_name + '_signal_ids'] = []; - component[property_name + '_changed'] = function (cb) { - component[property_name + '_signal_ids'].push( - component_settings.connect('changed::' + key.name, cb) - ); - }; - - component[property_name + '_disconnect'] = function () { - component[property_name + '_signal_ids'].forEach( - id => component_settings.disconnect(id) - ); - component[property_name + '_signal_ids'] = []; - }; - }); - }); - }; - - /// Reset the preferences. - reset() { - this.keys.forEach(bundle => { - let component = this; - if (bundle.component !== "general") { - let bundle_component = bundle.component.replaceAll('-', '_'); - component = this[bundle_component]; - } - - bundle.schemas.forEach(key => { - let property_name = this.get_property_name(key.name); - component[property_name + '_reset'](); - }); - }); - - this.emit('reset', true); - } - - /// From the gschema name, returns the name of the associated property on - /// the Settings object. - get_property_name(name) { - return name.replaceAll('-', '_').toUpperCase(); - } - - /// Remove all connections managed by the Settings object, i.e. created with - /// `settings.PROPERTY_changed(callback)`. - disconnect_all_settings() { - this.keys.forEach(bundle => { - let component = this; - if (bundle.component !== "general") { - let bundle_component = bundle.component.replaceAll('-', '_'); - component = this[bundle_component]; - } - - bundle.schemas.forEach(key => { - let property_name = this.get_property_name(key.name); - component[property_name + '_disconnect'](); - }); - }); - } - - _warn(str) { - console.warn(`[Blur my Shell > settings] ${str}`); - } -}; - -Signals.addSignalMethods(Settings.prototype); \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/settings_updater.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/settings_updater.js deleted file mode 100644 index 2affbc1a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/settings_updater.js +++ /dev/null @@ -1,40 +0,0 @@ -import { Settings } from './settings.js'; -import { KEYS, DEPRECATED_KEYS } from './keys.js'; - -const CURRENT_SETTINGS_VERSION = 2; - -export function update_from_old_settings(gsettings) { - const preferences = new Settings(KEYS, gsettings); - const deprecated_preferences = new Settings(DEPRECATED_KEYS, gsettings); - const old_version = preferences.settings.get_int('settings-version'); - - if (old_version < CURRENT_SETTINGS_VERSION) { - // set artifacts hacks to be 1 at most, as it should be suitable now that most big bugs have - // been resolved (and especially because hack levels to 2 now means disabling clipped - // redraws entirely, which is very much not what we want for users that update) - if (preferences.HACKS_LEVEL > 1) - preferences.HACKS_LEVEL = 1; - - // enable dash-to-dock blurring, as most disabled it due to the lack of rounded corners; set - // it to static blur by default too and with transparent background - preferences.dash_to_dock.BLUR = true; - preferences.dash_to_dock.STATIC_BLUR = true; - preferences.dash_to_dock.STYLE_DASH_TO_DOCK = 0; - - // 'customize' has been removed: we merge the current used settings - ['appfolder', 'panel', 'dash_to_dock', 'applications', 'window_list'].forEach( - component_name => { - const deprecated_component = deprecated_preferences[component_name]; - const new_component = preferences[component_name]; - if (!deprecated_component.CUSTOMIZE) { - new_component.SIGMA = deprecated_preferences.SIGMA; - new_component.BRIGHTNESS = deprecated_preferences.BRIGHTNESS; - } - }); - - // remove old preferences in order not to clutter the gsettings - deprecated_preferences.reset(); - } - - preferences.settings.set_int('settings-version', CURRENT_SETTINGS_VERSION); -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/utils.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/utils.js deleted file mode 100644 index 0277e0eb..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/conveniences/utils.js +++ /dev/null @@ -1,38 +0,0 @@ -import GLib from 'gi://GLib'; - -export const IS_IN_PREFERENCES = typeof global === 'undefined'; - -// Taken from https://github.com/Schneegans/Burn-My-Windows/blob/main/src/utils.js -// This method can be used to import a module in the GNOME Shell process only. This -// is useful if you want to use a module in extension.js, but not in the preferences -// process. This method returns null if it is called in the preferences process. -export async function import_in_shell_only(module) { - if (IS_IN_PREFERENCES) - return null; - return (await import(module)).default; -} - -// In use for the effects, to prevent boilerplate code -export function setup_params(outer_this, params) { - // setup each parameter, either with the given or the default value - for (const params_name in outer_this.constructor.default_params) { - outer_this["_" + params_name] = null; - outer_this[params_name] = params_name in params ? - params[params_name] : - outer_this.constructor.default_params[params_name]; - } -}; - -export const get_shader_source = (Shell, shader_filename, self_uri) => { - if (!Shell) - return; - const shader_path = GLib.filename_from_uri( - GLib.uri_resolve_relative(self_uri, shader_filename, GLib.UriFlags.NONE) - )[0]; - try { - return Shell.get_file_contents_utf8_sync(shader_path); - } catch (e) { - console.warn(`[Blur my Shell > effect] error loading shader from ${shader_path}: ${e}`); - return null; - } -}; \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/dbus/client.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/dbus/client.js deleted file mode 100644 index 3867b3a6..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/dbus/client.js +++ /dev/null @@ -1,58 +0,0 @@ -import Gio from 'gi://Gio'; - -const bus_name = 'org.gnome.Shell'; -const iface_name = 'dev.aunetx.BlurMyShell'; -const obj_path = '/dev/aunetx/BlurMyShell'; - - -/// Call pick() from the DBus service, it will open the Inspector from -/// gnome-shell to pick an actor on stage. -export function pick() { - Gio.DBus.session.call( - bus_name, - obj_path, - iface_name, - 'pick', - null, - null, - Gio.DBusCallFlags.NO_AUTO_START, - -1, - null, - null - ); -} - -/// Connect to DBus 'picking' signal, which will be emitted when the inspector -/// is picking a window. -export function on_picking(cb) { - const id = Gio.DBus.session.signal_subscribe( - bus_name, - iface_name, - 'picking', - obj_path, - null, - Gio.DBusSignalFlags.NONE, - _ => { - cb(); - Gio.DBus.session.signal_unsubscribe(id); - } - ); -} - -/// Connect to DBus 'picked' signal, which will be emitted when a window is -/// picked. -export function on_picked(cb) { - const id = Gio.DBus.session.signal_subscribe( - bus_name, - iface_name, - 'picked', - obj_path, - null, - Gio.DBusSignalFlags.NONE, - (conn, sender, obj_path, iface, signal, params) => { - const val = params.get_child_value(0); - cb(val.get_string()[0]); - Gio.DBus.session.signal_unsubscribe(id); - } - ); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/dbus/iface.xml b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/dbus/iface.xml deleted file mode 100644 index 4f298ad1..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/dbus/iface.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/dbus/services.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/dbus/services.js deleted file mode 100644 index 4b1f4f0c..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/dbus/services.js +++ /dev/null @@ -1,93 +0,0 @@ -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import * as LookingGlass from 'resource:///org/gnome/shell/ui/lookingGlass.js'; - - -export const ApplicationsService = class ApplicationsService { - constructor() { - let decoder = new TextDecoder(); - let path = GLib.filename_from_uri(GLib.uri_resolve_relative( - import.meta.url, 'iface.xml', GLib.UriFlags.NONE) - )[0]; - let [, buffer] = GLib.file_get_contents(path); - let iface = decoder.decode(buffer); - GLib.free(buffer); - - this.DBusImpl = Gio.DBusExportedObject.wrapJSObject(iface, this); - } - - /// Pick Window for Preferences Page, exported to DBus client. - pick() { - // emit `picking` signal to know we are listening - const send_picking_signal = _ => - this.DBusImpl.emit_signal( - 'picking', - null - ); - - // emit `picked` signal to send wm_class - const send_picked_signal = wm_class => - this.DBusImpl.emit_signal( - 'picked', - new GLib.Variant('(s)', [wm_class]) - ); - - // notify the preferences that we are listening - send_picking_signal(); - - // A very interesting way to pick a window: - // 1. Open LookingGlass to mask all event handles of window - // 2. Use inspector to pick window, thats is also lookingGlass do - // 3. Close LookingGlass when done - // It will restore event handles of window - - // open then hide LookingGlass - const looking_class = Main.createLookingGlass(); - looking_class.open(); - looking_class.hide(); - - // inspect window now - const inspector = new LookingGlass.Inspector(Main.createLookingGlass()); - inspector.connect('target', (me, target, x, y) => { - // remove border effect when window is picked. - const effect_name = 'lookingGlass_RedBorderEffect'; - target - .get_effects() - .filter(e => e.toString().includes(effect_name)) - .forEach(e => target.remove_effect(e)); - - // get wm_class_instance property of window, then pass it to DBus - // client - const type_str = target.toString(); - - let actor = target; - if (type_str.includes('MetaSurfaceActor')) - actor = target.get_parent(); - - if (!actor.toString().includes('WindowActor')) - actor = actor.get_parent(); - - if (!actor.toString().includes('WindowActor')) - return send_picked_signal('window-not-found'); - - send_picked_signal( - actor.meta_window.get_wm_class() ?? 'window-not-found' - ); - }); - - // close LookingGlass when we're done - inspector.connect('closed', _ => looking_class.close()); - } - - export() { - this.DBusImpl.export( - Gio.DBus.session, - '/dev/aunetx/BlurMyShell' - ); - }; - - unexport() { - this.DBusImpl.unexport(); - } -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/color.glsl b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/color.glsl deleted file mode 100644 index 142b89bf..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/color.glsl +++ /dev/null @@ -1,13 +0,0 @@ -uniform sampler2D tex; -uniform float red; -uniform float green; -uniform float blue; -uniform float blend; - -void main() { - vec4 c = texture2D(tex, cogl_tex_coord_in[0].st); - vec3 pix_color = c.xyz; - vec3 color = vec3(red, green, blue); - - cogl_color_out = vec4(mix(pix_color, color, blend), 1.); -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/color.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/color.js deleted file mode 100644 index 7de753d6..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/color.js +++ /dev/null @@ -1,140 +0,0 @@ -import GObject from 'gi://GObject'; - -import * as utils from '../conveniences/utils.js'; -const Shell = await utils.import_in_shell_only('gi://Shell'); -const Clutter = await utils.import_in_shell_only('gi://Clutter'); - -const SHADER_FILENAME = 'color.glsl'; -const DEFAULT_PARAMS = { - color: [0.0, 0.0, 0.0, 0.0] -}; - - -export const ColorEffect = utils.IS_IN_PREFERENCES ? - { default_params: DEFAULT_PARAMS } : - new GObject.registerClass({ - GTypeName: "ColorEffect", - Properties: { - 'red': GObject.ParamSpec.double( - `red`, - `Red`, - `Red value in shader`, - GObject.ParamFlags.READWRITE, - 0.0, 1.0, - 0.0, - ), - 'green': GObject.ParamSpec.double( - `green`, - `Green`, - `Green value in shader`, - GObject.ParamFlags.READWRITE, - 0.0, 1.0, - 0.0, - ), - 'blue': GObject.ParamSpec.double( - `blue`, - `Blue`, - `Blue value in shader`, - GObject.ParamFlags.READWRITE, - 0.0, 1.0, - 0.0, - ), - 'blend': GObject.ParamSpec.double( - `blend`, - `Blend`, - `Amount of blending between the colors`, - GObject.ParamFlags.READWRITE, - 0.0, 1.0, - 0.0, - ), - } - }, class ColorEffect extends Clutter.ShaderEffect { - constructor(params) { - // initialize without color as a parameter - const { color, ...parent_params } = params; - super(parent_params); - - this._red = null; - this._green = null; - this._blue = null; - this._blend = null; - - // set shader source - this._source = utils.get_shader_source(Shell, SHADER_FILENAME, import.meta.url); - if (this._source) - this.set_shader_source(this._source); - - // set shader color - this.color = 'color' in params ? color : this.constructor.default_params.color; - } - - static get default_params() { - return DEFAULT_PARAMS; - } - - get red() { - return this._red; - } - - set red(value) { - if (this._red !== value) { - this._red = value; - - this.set_uniform_value('red', parseFloat(this._red - 1e-6)); - } - } - - get green() { - return this._green; - } - - set green(value) { - if (this._green !== value) { - this._green = value; - - this.set_uniform_value('green', parseFloat(this._green - 1e-6)); - } - } - - get blue() { - return this._blue; - } - - set blue(value) { - if (this._blue !== value) { - this._blue = value; - - this.set_uniform_value('blue', parseFloat(this._blue - 1e-6)); - } - } - - get blend() { - return this._blend; - } - - set blend(value) { - if (this._blend !== value) { - this._blend = value; - - this.set_uniform_value('blend', parseFloat(this._blend - 1e-6)); - this.set_enabled(this.blend > 0); - } - } - - set color(rgba) { - let [r, g, b, a] = rgba; - this.red = r; - this.green = g; - this.blue = b; - this.blend = a; - } - - get color() { - return [this.red, this.green, this.blue, this.blend]; - } - - /// False set function, only cares about the color. Too hard to change. - set(params) { - this.color = params.color; - } - }); \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/corner.glsl b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/corner.glsl deleted file mode 100644 index 760798ae..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/corner.glsl +++ /dev/null @@ -1,93 +0,0 @@ -// Heavily based on https://github.com/yilozt/rounded-window-corners -// which is itself based on upstream Mutter code - -uniform sampler2D tex; -uniform float radius; -uniform float width; -uniform float height; -uniform bool corners_top; -uniform bool corners_bottom; - -uniform float clip_x0; -uniform float clip_y0; -uniform float clip_width; -uniform float clip_height; - -float circle_bounds(vec2 p, vec2 center, float clip_radius) { - vec2 delta = p - center; - float dist_squared = dot(delta, delta); - - float outer_radius = clip_radius + 0.5; - if (dist_squared >= (outer_radius * outer_radius)) - return 0.0; - - float inner_radius = clip_radius - 0.5; - if (dist_squared <= (inner_radius * inner_radius)) - return 1.0; - - return outer_radius - sqrt(dist_squared); -} - -vec4 getTexture(vec2 uv) { - if (uv.x < 2. / width) - uv.x = 2. / width; - - if (uv.y < 2. / height) - uv.y = 2. / height; - - if (uv.x > 1. - 3. / width) - uv.x = 1. - 3. / width; - - if (uv.y > 1. - 3. / height) - uv.y = 1. - 3. / height; - - return texture2D(tex, uv); -} - -float rounded_rect_coverage(vec2 p, vec4 bounds, float clip_radius) { - // Outside the bounds - if (p.x < bounds.x || p.x > bounds.z || p.y < bounds.y || p.y > bounds.w) { - return 0.; - } - - vec2 center; - - float center_left = bounds.x + clip_radius; - float center_right = bounds.z - clip_radius; - - if (p.x < center_left) - center.x = center_left + 2.; - else if (p.x > center_right) - center.x = center_right - 1.; - else - return 1.0; - - float center_top = bounds.y + clip_radius; - float center_bottom = bounds.w - clip_radius; - - if (corners_top && p.y < center_top) - center.y = center_top + 2.; - else if (corners_bottom && p.y > center_bottom) - center.y = center_bottom - 1.; - else - return 1.0; - - return circle_bounds(p, center, clip_radius); -} - -void main(void) { - vec2 uv = cogl_tex_coord_in[0].xy; - vec2 pos = uv * vec2(width, height); - vec4 c = getTexture(uv); - - vec4 bounds; - if (clip_width < 0. || clip_height < 0.) { - bounds = vec4(clip_x0, clip_y0, clip_x0 + width, clip_y0 + height); - } else { - bounds = vec4(clip_x0, clip_y0, clip_x0 + clip_width, clip_y0 + clip_height); - } - - float alpha = rounded_rect_coverage(pos, bounds, radius); - - cogl_color_out = vec4(c.rgb * alpha, min(alpha, c.a)); -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/corner.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/corner.js deleted file mode 100644 index 109be126..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/corner.js +++ /dev/null @@ -1,211 +0,0 @@ -import GObject from 'gi://GObject'; - -import * as utils from '../conveniences/utils.js'; -const St = await utils.import_in_shell_only('gi://St'); -const Shell = await utils.import_in_shell_only('gi://Shell'); -const Clutter = await utils.import_in_shell_only('gi://Clutter'); - -const SHADER_FILENAME = 'corner.glsl'; -const DEFAULT_PARAMS = { - radius: 12, width: 0, height: 0, - corners_top: true, corners_bottom: true, - clip: [0, 0, -1, -1] -}; - - -export const CornerEffect = utils.IS_IN_PREFERENCES ? - { default_params: DEFAULT_PARAMS } : - new GObject.registerClass({ - GTypeName: "CornerEffect", - Properties: { - 'radius': GObject.ParamSpec.double( - `radius`, - `Corner Radius`, - `Corner Radius`, - GObject.ParamFlags.READWRITE, - 0, Number.MAX_SAFE_INTEGER, - 12, - ), - 'width': GObject.ParamSpec.double( - `width`, - `Width`, - `Width`, - GObject.ParamFlags.READWRITE, - 0.0, Number.MAX_SAFE_INTEGER, - 0.0, - ), - 'height': GObject.ParamSpec.double( - `height`, - `Height`, - `Height`, - GObject.ParamFlags.READWRITE, - 0.0, Number.MAX_SAFE_INTEGER, - 0.0, - ), - 'corners_top': GObject.ParamSpec.boolean( - `corners_top`, - `Round top corners`, - `Round top corners`, - GObject.ParamFlags.READWRITE, - true, - ), - 'corners_bottom': GObject.ParamSpec.boolean( - `corners_bottom`, - `Round bottom corners`, - `Round bottom corners`, - GObject.ParamFlags.READWRITE, - true, - ), - // FIXME this works but it logs an error, because I'm not a double... - // I don't want to fiddle with GVariants again - 'clip': GObject.ParamSpec.double( - `clip`, - `Clip`, - `Clip`, - GObject.ParamFlags.READWRITE, - 0.0, Number.MAX_SAFE_INTEGER, - 0.0, - ), - } - }, class CornerEffect extends Clutter.ShaderEffect { - constructor(params) { - super(params); - - this._clip_x0 = null; - this._clip_y0 = null; - this._clip_width = null; - this._clip_height = null; - - utils.setup_params(this, params); - - // set shader source - this._source = utils.get_shader_source(Shell, SHADER_FILENAME, import.meta.url); - if (this._source) - this.set_shader_source(this._source); - - const theme_context = St.ThemeContext.get_for_stage(global.stage); - theme_context.connectObject('notify::scale-factor', _ => this.update_radius(), this); - } - - static get default_params() { - return DEFAULT_PARAMS; - } - - get radius() { - return this._radius; - } - - set radius(value) { - if (this._radius !== value) { - this._radius = value; - - this.update_radius(); - } - } - - update_radius() { - const theme_context = St.ThemeContext.get_for_stage(global.stage); - let radius = Math.min( - this.radius * theme_context.scale_factor, - this.width / 2, this.height / 2 - ); - if (this._clip_width >= 0 || this._clip_height >= 0) - radius = Math.min(radius, this._clip_width / 2, this._clip_height / 2); - - this.set_uniform_value('radius', parseFloat(radius - 1e-6)); - } - - get width() { - return this._width; - } - - set width(value) { - if (this._width !== value) { - this._width = value; - - this.set_uniform_value('width', parseFloat(this._width + 3.0 - 1e-6)); - this.update_radius(); - } - } - - get height() { - return this._height; - } - - set height(value) { - if (this._height !== value) { - this._height = value; - - this.set_uniform_value('height', parseFloat(this._height + 3.0 - 1e-6)); - this.update_radius(); - } - } - - get corners_top() { - return this._corners_top; - } - - set corners_top(value) { - if (this._corners_top !== value) { - this._corners_top = value; - - this.set_uniform_value('corners_top', this._corners_top ? 1 : 0); - } - } - - get corners_bottom() { - return this._corners_bottom; - } - - set corners_bottom(value) { - if (this._corners_bottom !== value) { - this._corners_bottom = value; - - this.set_uniform_value('corners_bottom', this._corners_bottom ? 1 : 0); - } - } - - get clip() { - return [this._clip_x0, this._clip_y0, this._clip_width, this._clip_height]; - } - - set clip(value) { - [this._clip_x0, this._clip_y0, this._clip_width, this._clip_height] = value; - this.set_uniform_value('clip_x0', parseFloat(this._clip_x0 - 1e-6)); - this.set_uniform_value('clip_y0', parseFloat(this._clip_y0 - 1e-6)); - this.set_uniform_value('clip_width', parseFloat(this._clip_width + 3 - 1e-6)); - this.set_uniform_value('clip_height', parseFloat(this._clip_height + 3 - 1e-6)); - this.update_radius(); - } - - vfunc_set_actor(actor) { - if (this._actor_connection_size_id) { - let old_actor = this.get_actor(); - old_actor?.disconnect(this._actor_connection_size_id); - } - if (this._actor_connection_clip_rect_id) { - let old_actor = this.get_actor(); - old_actor?.disconnect(this._actor_connection_clip_rect_id); - } - - if (actor) { - this.width = actor.width; - this.height = actor.height; - this._actor_connection_size_id = actor.connect('notify::size', _ => { - this.width = actor.width; - this.height = actor.height; - }); - - this.clip = actor.has_clip ? actor.get_clip() : [0, 0, -10, -10]; - this._actor_connection_clip_rect_id = actor.connect('notify::clip-rect', _ => { - this.clip = actor.has_clip ? actor.get_clip() : [0, 0, -10, -10]; - }); - } - else { - this._actor_connection_size_id = null; - this._actor_connection_clip_rect_id = null; - } - - super.vfunc_set_actor(actor); - } - }); \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/derivative.glsl b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/derivative.glsl deleted file mode 100644 index 64c16821..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/derivative.glsl +++ /dev/null @@ -1,71 +0,0 @@ -uniform sampler2D tex; -uniform int operation; -uniform float width; -uniform float height; - -#define CORRECTION 2.25 -#define SIZE_ADDITION 3 - -vec4 get_texture_at_position(vec2 position) { - vec2 raw_position = position + vec2(CORRECTION, CORRECTION); - vec2 raw_uv = raw_position / vec2(width + SIZE_ADDITION, height + SIZE_ADDITION); - - return texture2D(tex, raw_uv); -} - -vec4 try_get_texture_at_position(vec2 position, inout int count) { - if (any(greaterThanEqual(position, vec2(width, height))) || - any(lessThan(position, vec2(0, 0)))) { - return vec4(0); - } else { - count++; - return get_texture_at_position(position); - } -} - -ivec2 get_corrected_position() { - vec2 raw_uv = cogl_tex_coord0_in.st; - vec2 raw_position = raw_uv * vec2(width + SIZE_ADDITION, height + SIZE_ADDITION); - return ivec2(raw_position - vec2(CORRECTION, CORRECTION)); -} - -void main() { - ivec2 corrected_position = get_corrected_position(); - - // 1-step derivative - if (operation == 0) { - vec4 color = vec4(0); - int c = 0; - color += try_get_texture_at_position(corrected_position + vec2(0, 1), c); - color -= try_get_texture_at_position(corrected_position + vec2(0, 0), c); - color += try_get_texture_at_position(corrected_position + vec2(1, 0), c); - color -= try_get_texture_at_position(corrected_position + vec2(0, 0), c); - if (c < 4) { - color = vec4(0); - } - cogl_color_out = vec4(color.xyz, 1); - } else - // 2-step derivative - if (operation == 1) { - vec4 color = vec4(0); - int c = 0; - color += try_get_texture_at_position(corrected_position + vec2(0, 1), c); - color -= try_get_texture_at_position(corrected_position + vec2(0, -1), c); - color += try_get_texture_at_position(corrected_position + vec2(1, 0), c); - color -= try_get_texture_at_position(corrected_position + vec2(-1, 0), c); - if (c < 4) { - color = vec4(0); - } - cogl_color_out = vec4(color.xyz / 2, 1); - } else - // laplacian - if (operation == 2) { - vec4 color = vec4(0); - color = -4 * get_texture_at_position(corrected_position); - color += get_texture_at_position(corrected_position + vec2(0, 1)); - color += get_texture_at_position(corrected_position + vec2(0, -1)); - color += get_texture_at_position(corrected_position + vec2(1, 0)); - color += get_texture_at_position(corrected_position + vec2(-1, 0)); - cogl_color_out = vec4(color.xyz, 1); - } -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/derivative.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/derivative.js deleted file mode 100644 index 04d61004..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/derivative.js +++ /dev/null @@ -1,120 +0,0 @@ -import GObject from 'gi://GObject'; - -import * as utils from '../conveniences/utils.js'; -const Shell = await utils.import_in_shell_only('gi://Shell'); -const Clutter = await utils.import_in_shell_only('gi://Clutter'); - -const SHADER_FILENAME = 'derivative.glsl'; -const DEFAULT_PARAMS = { - operation: 0, width: 0, height: 0 -}; - - -export const DerivativeEffect = utils.IS_IN_PREFERENCES ? - { default_params: DEFAULT_PARAMS } : - new GObject.registerClass({ - GTypeName: "DerivativeEffect", - Properties: { - 'operation': GObject.ParamSpec.int( - `operation`, - `Operation`, - `Operation`, - GObject.ParamFlags.READWRITE, - 0, 2, - 0, - ), - 'width': GObject.ParamSpec.double( - `width`, - `Width`, - `Width`, - GObject.ParamFlags.READWRITE, - 0.0, Number.MAX_SAFE_INTEGER, - 0.0, - ), - 'height': GObject.ParamSpec.double( - `height`, - `Height`, - `Height`, - GObject.ParamFlags.READWRITE, - 0.0, Number.MAX_SAFE_INTEGER, - 0.0, - ) - } - }, class DerivativeEffect extends Clutter.ShaderEffect { - constructor(params) { - super(params); - - utils.setup_params(this, params); - - // set shader source - this._source = utils.get_shader_source(Shell, SHADER_FILENAME, import.meta.url); - if (this._source) - this.set_shader_source(this._source); - } - - static get default_params() { - return DEFAULT_PARAMS; - } - - get operation() { - return this._operation; - } - - set operation(value) { - if (this._operation !== value) { - this._operation = value; - - this.set_uniform_value('operation', this._operation); - } - } - - get width() { - return this._width; - } - - set width(value) { - if (this._width !== value) { - this._width = value; - - this.set_uniform_value('width', parseFloat(this._width - 1e-6)); - } - } - - get height() { - return this._height; - } - - set height(value) { - if (this._height !== value) { - this._height = value; - - this.set_uniform_value('height', parseFloat(this._height - 1e-6)); - } - } - - vfunc_set_actor(actor) { - if (this._actor_connection_size_id) { - let old_actor = this.get_actor(); - old_actor?.disconnect(this._actor_connection_size_id); - } - if (actor) { - this.width = actor.width; - this.height = actor.height; - this._actor_connection_size_id = actor.connect('notify::size', _ => { - this.width = actor.width; - this.height = actor.height; - }); - } - else - this._actor_connection_size_id = null; - - super.vfunc_set_actor(actor); - } - - vfunc_paint_target(paint_node, paint_context) { - // force setting nearest-neighbour texture filtering - this.get_pipeline().set_layer_filters(0, 9728, 9728); - - super.vfunc_paint_target(paint_node, paint_context); - } - }); \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/downscale.glsl b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/downscale.glsl deleted file mode 100644 index 98712683..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/downscale.glsl +++ /dev/null @@ -1,76 +0,0 @@ -uniform sampler2D tex; -uniform int divider; -uniform float width; -uniform float height; -uniform int downsampling_mode; - -#define CORRECTION 2.25 -#define SIZE_ADDITION 3 - -vec4 get_texture_at_position(vec2 position) { - vec2 raw_position = position + vec2(CORRECTION, CORRECTION); - vec2 raw_uv = raw_position / vec2(width + SIZE_ADDITION, height + SIZE_ADDITION); - - return texture2D(tex, raw_uv); -} - -vec2 get_corrected_position() { - vec2 raw_uv = cogl_tex_coord0_in.st; - vec2 raw_position = raw_uv * vec2(width + SIZE_ADDITION, height + SIZE_ADDITION); - return raw_position - vec2(CORRECTION, CORRECTION); -} - -void main() { - ivec2 corrected_position = ivec2(get_corrected_position()); - vec2 multiplied_position = corrected_position * divider; - - if (any(greaterThan(multiplied_position, vec2(width, height)))) { - discard; - } - - // mode 0: boxcar downsampling - if (downsampling_mode == 0) { - - vec4 color = vec4(0.); - int count = 0; - for (int i = 0; i < divider; i++) { - for (int j = 0; j < divider; j++) { - vec2 lookup_position = multiplied_position + vec2(i, j); - if (all(greaterThanEqual(lookup_position, vec2(0, 0))) && - all(lessThan(lookup_position, vec2(width, height)))) { - color += get_texture_at_position(lookup_position); - count += 1; - } - } - } - cogl_color_out = color / count; - - } else - // mode 1: triangular downsampling - if (downsampling_mode == 1) { - - vec4 color = vec4(0.); - int count = 0; - int force = 1; - for (int i = 0; i < divider; i++) { - for (int j = 0; j < divider; j++) { - vec2 lookup_position = multiplied_position + vec2(i, j); - if (all(greaterThanEqual(lookup_position, vec2(0, 0))) && - all(lessThan(lookup_position, vec2(width, height)))) { - force = 1 + divider - int(abs(divider - i - j)); - color += get_texture_at_position(lookup_position) * force; - count += force; - } - } - } - cogl_color_out = color / count; - - } else - // mode 2: Dirac downsampling - if (downsampling_mode == 2) { - - vec2 lookup_position = min(multiplied_position + vec2(divider, divider) / 2, vec2(width - 1, height - 1)); - cogl_color_out = get_texture_at_position(lookup_position); - - } -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/downscale.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/downscale.js deleted file mode 100644 index 8103486f..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/downscale.js +++ /dev/null @@ -1,140 +0,0 @@ -import GObject from 'gi://GObject'; - -import * as utils from '../conveniences/utils.js'; -const Shell = await utils.import_in_shell_only('gi://Shell'); -const Clutter = await utils.import_in_shell_only('gi://Clutter'); - -const SHADER_FILENAME = 'downscale.glsl'; -const DEFAULT_PARAMS = { - divider: 8, downsampling_mode: 0, width: 0, height: 0 -}; - - -export const DownscaleEffect = utils.IS_IN_PREFERENCES ? - { default_params: DEFAULT_PARAMS } : - new GObject.registerClass({ - GTypeName: "DownscaleEffect", - Properties: { - 'divider': GObject.ParamSpec.int( - `divider`, - `Divider`, - `Divider`, - GObject.ParamFlags.READWRITE, - 0, 64, - 8, - ), - 'downsampling_mode': GObject.ParamSpec.int( - `downsampling_mode`, - `Downsampling mode`, - `Downsampling mode`, - GObject.ParamFlags.READWRITE, - 0, 2, - 0, - ), - 'width': GObject.ParamSpec.double( - `width`, - `Width`, - `Width`, - GObject.ParamFlags.READWRITE, - 0.0, Number.MAX_SAFE_INTEGER, - 0.0, - ), - 'height': GObject.ParamSpec.double( - `height`, - `Height`, - `Height`, - GObject.ParamFlags.READWRITE, - 0.0, Number.MAX_SAFE_INTEGER, - 0.0, - ) - } - }, class DownscaleEffect extends Clutter.ShaderEffect { - constructor(params) { - super(params); - - utils.setup_params(this, params); - - // set shader source - this._source = utils.get_shader_source(Shell, SHADER_FILENAME, import.meta.url); - if (this._source) - this.set_shader_source(this._source); - } - - static get default_params() { - return DEFAULT_PARAMS; - } - - get divider() { - return this._divider; - } - - set divider(value) { - if (this._divider !== value) { - this._divider = value; - - this.set_uniform_value('divider', this._divider); - } - } - - get downsampling_mode() { - return this._downsampling_mode; - } - - set downsampling_mode(value) { - if (this._downsampling_mode !== value) { - this._downsampling_mode = value; - - this.set_uniform_value('downsampling_mode', this._downsampling_mode); - } - } - - get width() { - return this._width; - } - - set width(value) { - if (this._width !== value) { - this._width = value; - - this.set_uniform_value('width', parseFloat(this._width - 1e-6)); - } - } - - get height() { - return this._height; - } - - set height(value) { - if (this._height !== value) { - this._height = value; - - this.set_uniform_value('height', parseFloat(this._height - 1e-6)); - } - } - - vfunc_set_actor(actor) { - if (this._actor_connection_size_id) { - let old_actor = this.get_actor(); - old_actor?.disconnect(this._actor_connection_size_id); - } - if (actor) { - this.width = actor.width; - this.height = actor.height; - this._actor_connection_size_id = actor.connect('notify::size', _ => { - this.width = actor.width; - this.height = actor.height; - }); - } - else - this._actor_connection_size_id = null; - - super.vfunc_set_actor(actor); - } - - vfunc_paint_target(paint_node, paint_context) { - // force setting nearest-neighbour texture filtering - this.get_pipeline().set_layer_filters(0, 9728, 9728); - - super.vfunc_paint_target(paint_node, paint_context); - } - }); \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/effects.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/effects.js deleted file mode 100644 index 8678d9a9..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/effects.js +++ /dev/null @@ -1,332 +0,0 @@ -import { NativeDynamicBlurEffect } from '../effects/native_dynamic_gaussian_blur.js'; -import { NativeStaticBlurEffect } from '../effects/native_static_gaussian_blur.js'; -import { GaussianBlurEffect } from '../effects/gaussian_blur.js'; -import { MonteCarloBlurEffect } from '../effects/monte_carlo_blur.js'; -import { ColorEffect } from '../effects/color.js'; -import { NoiseEffect } from '../effects/noise.js'; -import { CornerEffect } from '../effects/corner.js'; -import { DownscaleEffect } from './downscale.js'; -import { UpscaleEffect } from './upscale.js'; -import { PixelizeEffect } from './pixelize.js'; -import { DerivativeEffect } from './derivative.js'; -import { RgbToHslEffect } from './rgb_to_hsl.js'; -import { HslToRgbEffect } from './hsl_to_rgb.js'; - -// We do in this way because I've not found another way to store our preferences in a dictionnary -// while calling `gettext` on it while in preferences. Not so pretty, but works. -export function get_effects_groups(_ = _ => "") { - return { - blur_effects: { - name: _("Blur effects"), - contains: [ - "native_static_gaussian_blur", - "gaussian_blur", - "monte_carlo_blur" - ] - }, - texture_effects: { - name: _("Texture effects"), - contains: [ - "downscale", - "upscale", - "pixelize", - "derivative", - "noise", - "color", - "rgb_to_hsl", - "hsl_to_rgb" - ] - }, - shape_effects: { - name: _("Shape effects"), - contains: [ - "corner" - ] - } - }; -}; - -export function get_supported_effects(_ = () => "") { - return { - native_dynamic_gaussian_blur: { - class: NativeDynamicBlurEffect - }, - - native_static_gaussian_blur: { - class: NativeStaticBlurEffect, - name: _("Native gaussian blur"), - description: _("An optimized blur effect that smoothly blends pixels within a given radius."), - is_advanced: false, - editable_params: { - unscaled_radius: { - name: _("Radius"), - description: _("The intensity of the blur effect."), - type: "float", - min: 0., - max: 100., - increment: 1.0, - big_increment: 10., - digits: 0 - }, - brightness: { - name: _("Brightness"), - description: _("The brightness of the blur effect, a high value might make the text harder to read."), - type: "float", - min: 0., - max: 1., - increment: 0.01, - big_increment: 0.1, - digits: 2 - }, - } - }, - - gaussian_blur: { - class: GaussianBlurEffect, - name: _("Gaussian blur (advanced effect)"), - description: _("A blur effect that smoothly blends pixels within a given radius. This effect is more precise, but way less optimized."), - is_advanced: true, - editable_params: { - radius: { - name: _("Radius"), - description: _("The intensity of the blur effect. The bigger it is, the slower it will be."), - type: "float", - min: 0., - max: 100., - increment: .1, - big_increment: 10., - digits: 1 - }, - brightness: { - name: _("Brightness"), - description: _("The brightness of the blur effect, a high value might make the text harder to read."), - type: "float", - min: 0., - max: 1., - increment: 0.01, - big_increment: 0.1, - digits: 2 - }, - } - }, - - monte_carlo_blur: { - class: MonteCarloBlurEffect, - name: _("Monte Carlo blur"), - description: _("A blur effect that mimics a random walk, by picking pixels further and further away from its origin and mixing them all together."), - is_advanced: false, - editable_params: { - radius: { - name: _("Radius"), - description: _("The maximum travel distance for each step in the random walk. A higher value will make the blur more randomized."), - type: "float", - min: 0., - max: 10., - increment: 0.01, - big_increment: 0.1, - digits: 2 - }, - iterations: { - name: _("Iterations"), - description: _("The number of iterations. The more there are, the smoother the blur is."), - type: "integer", - min: 0, - max: 50, - increment: 1 - }, - brightness: { - name: _("Brightness"), - description: _("The brightness of the blur effect, a high value might make the text harder to read."), - type: "float", - min: 0., - max: 1., - increment: 0.01, - big_increment: 0.1, - digits: 2 - }, - use_base_pixel: { - name: _("Use base pixel"), - description: _("Whether or not the original pixel is counted for the blur. If it is, the image will be more legible."), - type: "boolean" - } - } - }, - - color: { - class: ColorEffect, - name: _("Color"), - description: _("An effect that blends a color into the pipeline."), - is_advanced: false, - // TODO make this RGB + blend - editable_params: { - color: { - name: _("Color"), - description: _("The color to blend in. The blending amount is controled by the opacity of the color."), - type: "rgba" - } - } - }, - - pixelize: { - class: PixelizeEffect, - name: _("Pixelize"), - description: _("An effect that pixelizes the image."), - is_advanced: false, - editable_params: { - factor: { - name: _("Factor"), - description: _("How much to scale down the image."), - type: "integer", - min: 1, - max: 50, - increment: 1 - }, - downsampling_mode: { - name: _("Downsampling mode"), - description: _("The downsampling method that is used."), - type: "dropdown", - options: [ - _("Boxcar"), - _("Triangular"), - _("Dirac") - ] - } - } - }, - - downscale: { - class: DownscaleEffect, - name: _("Downscale (advanced effect)"), - description: _("An effect that downscales the image and put it on the top-left corner."), - is_advanced: true, - editable_params: { - divider: { - name: _("Factor"), - description: _("How much to scale down the image."), - type: "integer", - min: 1, - max: 50, - increment: 1 - }, - downsampling_mode: { - name: _("Downsampling mode"), - description: _("The downsampling method that is used."), - type: "dropdown", - options: [ - _("Boxcar"), - _("Triangular"), - _("Dirac") - ] - } - } - }, - - upscale: { - class: UpscaleEffect, - name: _("Upscale (advanced effect)"), - description: _("An effect that upscales the image from the top-left corner."), - is_advanced: true, - editable_params: { - factor: { - name: _("Factor"), - description: _("How much to scale up the image."), - type: "integer", - min: 1, - max: 50, - increment: 1 - } - } - }, - - derivative: { - class: DerivativeEffect, - name: _("Derivative"), - description: _("Apply a spatial derivative, or a laplacian."), - is_advanced: false, - editable_params: { - operation: { - name: _("Operation"), - description: _("The mathematical operation to apply."), - type: "dropdown", - options: [ - _("1-step derivative"), - _("2-step derivative"), - _("Laplacian") - ] - } - } - }, - - noise: { - class: NoiseEffect, - name: _("Noise"), - description: _("An effect that adds a random noise. Prefer the Monte Carlo blur for a more organic effect if needed."), - is_advanced: false, - editable_params: { - noise: { - name: _("Noise"), - description: _("The amount of noise to add."), - type: "float", - min: 0., - max: 1., - increment: 0.01, - big_increment: 0.1, - digits: 2 - }, - lightness: { - name: _("Lightness"), - description: _("The luminosity of the noise. A setting of '1.0' will make the effect transparent."), - type: "float", - min: 0., - max: 2., - increment: 0.01, - big_increment: 0.1, - digits: 2 - } - } - }, - - rgb_to_hsl: { - class: RgbToHslEffect, - name: _("RGB to HSL (advanced effect)"), - description: _("Converts the image from RGBA colorspace to HSLA."), - is_advanced: true, - editable_params: {} - }, - - hsl_to_rgb: { - class: HslToRgbEffect, - name: _("HSL to RGB (advanced effect)"), - description: _("Converts the image from HSLA colorspace to RGBA."), - is_advanced: true, - editable_params: {} - }, - - corner: { - class: CornerEffect, - name: _("Corner"), - description: _("An effect that draws corners. Add it last not to have the other effects perturb the corners."), - is_advanced: false, - editable_params: { - radius: { - name: _("Radius"), - description: _("The radius of the corner. GNOME apps use a radius of 12 px by default."), - type: "integer", - min: 0, - max: 50, - increment: 1, - }, - corners_top: { - name: _("Top corners"), - description: _("Whether or not to round the top corners."), - type: "boolean" - }, - corners_bottom: { - name: _("Bottom corners"), - description: _("Whether or not to round the bottom corners."), - type: "boolean" - } - } - } - }; -}; \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/gaussian_blur.glsl b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/gaussian_blur.glsl deleted file mode 100644 index 809cc93d..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/gaussian_blur.glsl +++ /dev/null @@ -1,70 +0,0 @@ -uniform sampler2D tex; -uniform float sigma; -uniform int dir; -uniform float brightness; -uniform float width; -uniform float height; - -vec4 getTexture(vec2 uv) { - if (uv.x < 3. / width) - uv.x = 3. / width; - - if (uv.y < 3. / height) - uv.y = 3. / height; - - if (uv.x > 1. - 3. / width) - uv.x = 1. - 3. / width; - - if (uv.y > 1. - 3. / height) - uv.y = 1. - 3. / height; - - return texture2D(tex, uv); -} - -void main(void) { - vec2 uv = cogl_tex_coord_in[0].xy; - vec2 direction = vec2(dir, (1.0 - dir)); - - float pixel_step; - if (dir == 0) - pixel_step = 1.0 / height; - else - pixel_step = 1.0 / width; - - vec3 gauss_coefficient; - gauss_coefficient.x = 1.0 / (sqrt(2.0 * 3.14159265) * sigma); - gauss_coefficient.y = exp(-0.5 / (sigma * sigma)); - gauss_coefficient.z = gauss_coefficient.y * gauss_coefficient.y; - - float gauss_coefficient_total = gauss_coefficient.x; - - vec4 ret = getTexture(uv) * gauss_coefficient.x; - gauss_coefficient.xy *= gauss_coefficient.yz; - - int n_steps = int(ceil(1.5 * sigma)) * 2; - - for (int i = 1; i <= n_steps; i += 2) { - float coefficient_subtotal = gauss_coefficient.x; - gauss_coefficient.xy *= gauss_coefficient.yz; - coefficient_subtotal += gauss_coefficient.x; - - float gauss_ratio = gauss_coefficient.x / coefficient_subtotal; - - float foffset = float(i) + gauss_ratio; - vec2 offset = direction * foffset * pixel_step; - - ret += getTexture(uv + offset) * coefficient_subtotal; - ret += getTexture(uv - offset) * coefficient_subtotal; - - gauss_coefficient_total += 2.0 * coefficient_subtotal; - gauss_coefficient.xy *= gauss_coefficient.yz; - } - vec4 outColor = ret / gauss_coefficient_total; - - // apply brightness on the second pass (dir==0 comes last) - if (dir == 0) { - outColor.rgb *= brightness; - } - - cogl_color_out = outColor; -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/gaussian_blur.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/gaussian_blur.js deleted file mode 100644 index 113a6fdb..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/gaussian_blur.js +++ /dev/null @@ -1,213 +0,0 @@ -import GObject from 'gi://GObject'; - -import * as utils from '../conveniences/utils.js'; -const St = await utils.import_in_shell_only('gi://St'); -const Shell = await utils.import_in_shell_only('gi://Shell'); -const Clutter = await utils.import_in_shell_only('gi://Clutter'); - -const SHADER_FILENAME = 'gaussian_blur.glsl'; -const DEFAULT_PARAMS = { - radius: 30, brightness: .6, - width: 0, height: 0, direction: 0, chained_effect: null -}; - - -export const GaussianBlurEffect = utils.IS_IN_PREFERENCES ? - { default_params: DEFAULT_PARAMS } : - new GObject.registerClass({ - GTypeName: "GaussianBlurEffect", - Properties: { - 'radius': GObject.ParamSpec.double( - `radius`, - `Radius`, - `Blur radius`, - GObject.ParamFlags.READWRITE, - 0.0, 2000.0, - 30.0, - ), - 'brightness': GObject.ParamSpec.double( - `brightness`, - `Brightness`, - `Blur brightness`, - GObject.ParamFlags.READWRITE, - 0.0, 1.0, - 0.6, - ), - 'width': GObject.ParamSpec.double( - `width`, - `Width`, - `Width`, - GObject.ParamFlags.READWRITE, - 0.0, Number.MAX_SAFE_INTEGER, - 0.0, - ), - 'height': GObject.ParamSpec.double( - `height`, - `Height`, - `Height`, - GObject.ParamFlags.READWRITE, - 0.0, Number.MAX_SAFE_INTEGER, - 0.0, - ), - 'direction': GObject.ParamSpec.int( - `direction`, - `Direction`, - `Direction`, - GObject.ParamFlags.READWRITE, - 0, 1, - 0, - ), - 'chained_effect': GObject.ParamSpec.object( - `chained_effect`, - `Chained Effect`, - `Chained Effect`, - GObject.ParamFlags.READWRITE, - GObject.Object, - ), - } - }, class GaussianBlurEffect extends Clutter.ShaderEffect { - constructor(params) { - super(params); - - utils.setup_params(this, params); - - // set shader source - this._source = utils.get_shader_source(Shell, SHADER_FILENAME, import.meta.url); - if (this._source) - this.set_shader_source(this._source); - - const theme_context = St.ThemeContext.get_for_stage(global.stage); - theme_context.connectObject( - 'notify::scale-factor', _ => - this.set_uniform_value('sigma', - parseFloat(this.radius * theme_context.scale_factor / 2 - 1e-6) - ), - this - ); - } - - static get default_params() { - return DEFAULT_PARAMS; - } - - get radius() { - return this._radius; - } - - set radius(value) { - if (this._radius !== value) { - this._radius = value; - - const scale_factor = St.ThemeContext.get_for_stage(global.stage).scale_factor; - - // like Clutter, we use the assumption radius = 2*sigma - this.set_uniform_value('sigma', parseFloat(this._radius * scale_factor / 2 - 1e-6)); - this.set_enabled(this.radius > 0.); - - if (this.chained_effect) - this.chained_effect.radius = value; - } - } - - get brightness() { - return this._brightness; - } - - set brightness(value) { - if (this._brightness !== value) { - this._brightness = value; - - this.set_uniform_value('brightness', parseFloat(this._brightness - 1e-6)); - - if (this.chained_effect) - this.chained_effect.brightness = value; - } - } - - get width() { - return this._width; - } - - set width(value) { - if (this._width !== value) { - this._width = value; - - this.set_uniform_value('width', parseFloat(this._width + 3.0 - 1e-6)); - - if (this.chained_effect) - this.chained_effect.width = value; - } - } - - get height() { - return this._height; - } - - set height(value) { - if (this._height !== value) { - this._height = value; - - this.set_uniform_value('height', parseFloat(this._height + 3.0 - 1e-6)); - - if (this.chained_effect) - this.chained_effect.height = value; - } - } - - get direction() { - return this._direction; - } - - set direction(value) { - if (this._direction !== value) - this._direction = value; - } - - get chained_effect() { - return this._chained_effect; - } - - set chained_effect(value) { - this._chained_effect = value; - } - - vfunc_set_actor(actor) { - if (this._actor_connection_size_id) { - let old_actor = this.get_actor(); - old_actor?.disconnect(this._actor_connection_size_id); - } - if (actor) { - this.width = actor.width; - this.height = actor.height; - this._actor_connection_size_id = actor.connect('notify::size', _ => { - this.width = actor.width; - this.height = actor.height; - }); - } - else - this._actor_connection_size_id = null; - - super.vfunc_set_actor(actor); - - if (this.direction == 0) { - if (this.chained_effect) - this.chained_effect.get_actor()?.remove_effect(this.chained_effect); - else - this.chained_effect = new GaussianBlurEffect({ - radius: this.radius, - brightness: this.brightness, - width: this.width, - height: this.height, - direction: 1 - }); - if (actor !== null) - actor.add_effect(this.chained_effect); - } - } - - vfunc_paint_target(paint_node, paint_context) { - this.set_uniform_value("dir", this.direction); - - super.vfunc_paint_target(paint_node, paint_context); - } - }); \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/hsl_to_rgb.glsl b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/hsl_to_rgb.glsl deleted file mode 100644 index 58d26949..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/hsl_to_rgb.glsl +++ /dev/null @@ -1,14 +0,0 @@ -uniform sampler2D tex; - -vec3 hsl_to_rgb(vec3 c) { - vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); - vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); - return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); -} - -void main(void) { - vec2 uv = cogl_tex_coord_in[0].xy; - vec4 hsla = texture2D(tex, uv); - vec4 rgba = vec4(hsl_to_rgb(hsla.xyz), hsla.w); - cogl_color_out = rgba; -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/hsl_to_rgb.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/hsl_to_rgb.js deleted file mode 100644 index fe531145..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/hsl_to_rgb.js +++ /dev/null @@ -1,31 +0,0 @@ -import GObject from 'gi://GObject'; - -import * as utils from '../conveniences/utils.js'; -const Shell = await utils.import_in_shell_only('gi://Shell'); -const Clutter = await utils.import_in_shell_only('gi://Clutter'); - -const SHADER_FILENAME = 'hsl_to_rgb.glsl'; -const DEFAULT_PARAMS = {}; - - -export const HslToRgbEffect = utils.IS_IN_PREFERENCES ? - { default_params: DEFAULT_PARAMS } : - new GObject.registerClass({ - GTypeName: "HslToRgbEffect", - Properties: {} - }, class HslToRgbEffect extends Clutter.ShaderEffect { - constructor(params) { - super(params); - - utils.setup_params(this, params); - - // set shader source - this._source = utils.get_shader_source(Shell, SHADER_FILENAME, import.meta.url); - if (this._source) - this.set_shader_source(this._source); - } - - static get default_params() { - return DEFAULT_PARAMS; - } - }); \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/monte_carlo_blur.glsl b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/monte_carlo_blur.glsl deleted file mode 100644 index 4142a467..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/monte_carlo_blur.glsl +++ /dev/null @@ -1,44 +0,0 @@ -uniform sampler2D tex; -uniform float radius; -uniform int iterations; -uniform float brightness; -uniform float width; -uniform float height; -uniform bool use_base_pixel; - -float srand(vec2 a) { - return sin(dot(a, vec2(1233.224, 1743.335))); -} - -float rand(inout float r) { - r = fract(3712.65 * r + 0.61432); - return (r - 0.5) * 2.0; -} - -void main() { - vec2 uv = cogl_tex_coord0_in.st; - vec2 p = 16 * radius / vec2(width, height); - float r = srand(uv); - vec2 rv; - - int count = 0; - vec4 c = vec4(0.); - - for (int i = 0; i < iterations; i++) { - rv.x = rand(r); - rv.y = rand(r); - vec2 new_uv = uv + rv * p; - if (new_uv.x > 2. / width && new_uv.y > 2. / height && new_uv.x < 1. - 3. / width && new_uv.y < 1. - 3. / height) { - c += texture2D(tex, new_uv); - count += 1; - } - } - - if (count == 0 || use_base_pixel) { - c += texture2D(tex, uv); - count += 1; - } - - c.xyz *= brightness; - cogl_color_out = c / count; -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/monte_carlo_blur.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/monte_carlo_blur.js deleted file mode 100644 index fbf01a7b..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/monte_carlo_blur.js +++ /dev/null @@ -1,187 +0,0 @@ -import GObject from 'gi://GObject'; - -import * as utils from '../conveniences/utils.js'; -const St = await utils.import_in_shell_only('gi://St'); -const Shell = await utils.import_in_shell_only('gi://Shell'); -const Clutter = await utils.import_in_shell_only('gi://Clutter'); - -const SHADER_FILENAME = 'monte_carlo_blur.glsl'; -const DEFAULT_PARAMS = { - radius: 2., iterations: 5, brightness: .6, - width: 0, height: 0, use_base_pixel: true -}; - - -export const MonteCarloBlurEffect = utils.IS_IN_PREFERENCES ? - { default_params: DEFAULT_PARAMS } : - new GObject.registerClass({ - GTypeName: "MonteCarloBlurEffect", - Properties: { - 'radius': GObject.ParamSpec.double( - `radius`, - `Radius`, - `Blur radius`, - GObject.ParamFlags.READWRITE, - 0.0, 2000.0, - 2.0, - ), - 'iterations': GObject.ParamSpec.int( - `iterations`, - `Iterations`, - `Blur iterations`, - GObject.ParamFlags.READWRITE, - 0, 64, - 5, - ), - 'brightness': GObject.ParamSpec.double( - `brightness`, - `Brightness`, - `Blur brightness`, - GObject.ParamFlags.READWRITE, - 0.0, 1.0, - 0.6, - ), - 'width': GObject.ParamSpec.double( - `width`, - `Width`, - `Width`, - GObject.ParamFlags.READWRITE, - 0.0, Number.MAX_SAFE_INTEGER, - 0.0, - ), - 'height': GObject.ParamSpec.double( - `height`, - `Height`, - `Height`, - GObject.ParamFlags.READWRITE, - 0.0, Number.MAX_SAFE_INTEGER, - 0.0, - ), - 'use_base_pixel': GObject.ParamSpec.boolean( - `use_base_pixel`, - `Use base pixel`, - `Use base pixel`, - GObject.ParamFlags.READWRITE, - true, - ), - } - }, class MonteCarloBlurEffect extends Clutter.ShaderEffect { - constructor(params) { - super(params); - - utils.setup_params(this, params); - - // set shader source - this._source = utils.get_shader_source(Shell, SHADER_FILENAME, import.meta.url); - if (this._source) - this.set_shader_source(this._source); - - const theme_context = St.ThemeContext.get_for_stage(global.stage); - theme_context.connectObject( - 'notify::scale-factor', - _ => this.set_uniform_value('radius', - parseFloat(this._radius * theme_context.scale_factor - 1e-6) - ), - this - ); - } - - static get default_params() { - return DEFAULT_PARAMS; - } - - get radius() { - return this._radius; - } - - set radius(value) { - if (this._radius !== value) { - this._radius = value; - - const scale_factor = St.ThemeContext.get_for_stage(global.stage).scale_factor; - - this.set_uniform_value('radius', parseFloat(this._radius * scale_factor - 1e-6)); - this.set_enabled(this.radius > 0. && this.iterations > 0); - } - } - - get iterations() { - return this._iterations; - } - - set iterations(value) { - if (this._iterations !== value) { - this._iterations = value; - - this.set_uniform_value('iterations', this._iterations); - this.set_enabled(this.radius > 0. && this.iterations > 0); - } - } - - get brightness() { - return this._brightness; - } - - set brightness(value) { - if (this._brightness !== value) { - this._brightness = value; - - this.set_uniform_value('brightness', parseFloat(this._brightness - 1e-6)); - } - } - - get width() { - return this._width; - } - - set width(value) { - if (this._width !== value) { - this._width = value; - - this.set_uniform_value('width', parseFloat(this._width + 3.0 - 1e-6)); - } - } - - get height() { - return this._height; - } - - set height(value) { - if (this._height !== value) { - this._height = value; - - this.set_uniform_value('height', parseFloat(this._height + 3.0 - 1e-6)); - } - } - - get use_base_pixel() { - return this._use_base_pixel; - } - - set use_base_pixel(value) { - if (this._use_base_pixel !== value) { - this._use_base_pixel = value; - - this.set_uniform_value('use_base_pixel', this._use_base_pixel ? 1 : 0); - } - } - - vfunc_set_actor(actor) { - if (this._actor_connection_size_id) { - let old_actor = this.get_actor(); - old_actor?.disconnect(this._actor_connection_size_id); - } - if (actor) { - this.width = actor.width; - this.height = actor.height; - this._actor_connection_size_id = actor.connect('notify::size', _ => { - this.width = actor.width; - this.height = actor.height; - }); - } - else - this._actor_connection_size_id = null; - - super.vfunc_set_actor(actor); - } - }); \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/native_dynamic_gaussian_blur.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/native_dynamic_gaussian_blur.js deleted file mode 100644 index 556ffa49..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/native_dynamic_gaussian_blur.js +++ /dev/null @@ -1,43 +0,0 @@ -import GObject from 'gi://GObject'; - -import * as utils from '../conveniences/utils.js'; -const St = await utils.import_in_shell_only('gi://St'); -const Shell = await utils.import_in_shell_only('gi://Shell'); - -const DEFAULT_PARAMS = { - unscaled_radius: 30, brightness: 0.6 -}; - - -export const NativeDynamicBlurEffect = utils.IS_IN_PREFERENCES ? - { default_params: DEFAULT_PARAMS } : - new GObject.registerClass({ - GTypeName: "NativeDynamicBlurEffect" - }, class NativeDynamicBlurEffect extends Shell.BlurEffect { - constructor(params) { - const { unscaled_radius, brightness, ...parent_params } = params; - super({ ...parent_params, mode: Shell.BlurMode.BACKGROUND }); - - this._theme_context = St.ThemeContext.get_for_stage(global.stage); - this._theme_context.connectObject( - 'notify::scale-factor', - _ => this.radius = this.unscaled_radius * this._theme_context.scale_factor, - this - ); - - utils.setup_params(this, params); - } - - static get default_params() { - return DEFAULT_PARAMS; - } - - get unscaled_radius() { - return this._unscaled_radius; - } - - set unscaled_radius(value) { - this._unscaled_radius = value; - this.radius = value * this._theme_context.scale_factor; - } - }); \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/native_static_gaussian_blur.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/native_static_gaussian_blur.js deleted file mode 100644 index fe003f5b..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/native_static_gaussian_blur.js +++ /dev/null @@ -1,43 +0,0 @@ -import GObject from 'gi://GObject'; - -import * as utils from '../conveniences/utils.js'; -const St = await utils.import_in_shell_only('gi://St'); -const Shell = await utils.import_in_shell_only('gi://Shell'); - -const DEFAULT_PARAMS = { - unscaled_radius: 30, brightness: 0.6 -}; - - -export const NativeStaticBlurEffect = utils.IS_IN_PREFERENCES ? - { default_params: DEFAULT_PARAMS } : - new GObject.registerClass({ - GTypeName: "NativeStaticBlurEffect" - }, class NativeStaticBlurEffect extends Shell.BlurEffect { - constructor(params) { - const { unscaled_radius, brightness, ...parent_params } = params; - super({ ...parent_params, mode: Shell.BlurMode.ACTOR }); - - this._theme_context = St.ThemeContext.get_for_stage(global.stage); - this._theme_context.connectObject( - 'notify::scale-factor', - _ => this.radius = this.unscaled_radius * this._theme_context.scale_factor, - this - ); - - utils.setup_params(this, params); - } - - static get default_params() { - return DEFAULT_PARAMS; - } - - get unscaled_radius() { - return this._unscaled_radius; - } - - set unscaled_radius(value) { - this._unscaled_radius = value; - this.radius = value * this._theme_context.scale_factor; - } - }); \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/noise.glsl b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/noise.glsl deleted file mode 100644 index 6d701b60..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/noise.glsl +++ /dev/null @@ -1,20 +0,0 @@ -uniform sampler2D tex; -uniform float noise; -uniform float lightness; - -float PHI = 1.61803398874989484820459; -float SEED = 24; - -float noise_gen(in vec2 xy) { - float r = fract(tan(distance(xy * PHI, xy) * SEED) * xy.x); - r = r != r ? 0.0 : r; - return r; -} - -void main() { - vec4 c = texture2D(tex, cogl_tex_coord_in[0].st); - vec3 pix_color = c.xyz; - float blend = noise * (1. - noise_gen(gl_FragCoord.xy)); - - cogl_color_out = vec4(mix(pix_color, lightness * pix_color, blend), 1.); -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/noise.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/noise.js deleted file mode 100644 index 3049fa1d..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/noise.js +++ /dev/null @@ -1,76 +0,0 @@ -import GObject from 'gi://GObject'; - -import * as utils from '../conveniences/utils.js'; -const Shell = await utils.import_in_shell_only('gi://Shell'); -const Clutter = await utils.import_in_shell_only('gi://Clutter'); - -const SHADER_FILENAME = 'noise.glsl'; -const DEFAULT_PARAMS = { - noise: 0.4, lightness: 0.4 -}; - - -export const NoiseEffect = utils.IS_IN_PREFERENCES ? - { default_params: DEFAULT_PARAMS } : - new GObject.registerClass({ - GTypeName: "NoiseEffect", - Properties: { - 'noise': GObject.ParamSpec.double( - `noise`, - `Noise`, - `Amount of noise integrated with the image`, - GObject.ParamFlags.READWRITE, - 0.0, 1.0, - 0.4, - ), - 'lightness': GObject.ParamSpec.double( - `lightness`, - `Lightness`, - `Lightness of the grey used for the noise`, - GObject.ParamFlags.READWRITE, - 0.0, 2.0, - 0.4, - ), - } - }, class NoiseEffect extends Clutter.ShaderEffect { - constructor(params) { - super(params); - - utils.setup_params(this, params); - - // set shader source - this._source = utils.get_shader_source(Shell, SHADER_FILENAME, import.meta.url); - if (this._source) - this.set_shader_source(this._source); - } - - static get default_params() { - return DEFAULT_PARAMS; - } - - get noise() { - return this._noise; - } - - set noise(value) { - if (this._noise !== value) { - this._noise = value; - - this.set_uniform_value('noise', parseFloat(this._noise - 1e-6)); - this.set_enabled(this.noise > 0. && this.lightness != 1); - } - } - - get lightness() { - return this._lightness; - } - - set lightness(value) { - if (this._lightness !== value) { - this._lightness = value; - - this.set_uniform_value('lightness', parseFloat(this._lightness - 1e-6)); - this.set_enabled(this.noise > 0. && this.lightness != 1); - } - } - }); \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/pixelize.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/pixelize.js deleted file mode 100644 index e9cad9b0..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/pixelize.js +++ /dev/null @@ -1,88 +0,0 @@ -import GObject from 'gi://GObject'; - -import * as utils from '../conveniences/utils.js'; -const Clutter = await utils.import_in_shell_only('gi://Clutter'); - -import { UpscaleEffect } from './upscale.js'; -import { DownscaleEffect } from './downscale.js'; - -const DEFAULT_PARAMS = { - factor: 8, downsampling_mode: 0 -}; - - -export const PixelizeEffect = utils.IS_IN_PREFERENCES ? - { default_params: DEFAULT_PARAMS } : - new GObject.registerClass({ - GTypeName: "PixelizeEffect", - Properties: { - 'factor': GObject.ParamSpec.int( - `factor`, - `Factor`, - `Factor`, - GObject.ParamFlags.READWRITE, - 0, 64, - 8, - ), - 'downsampling_mode': GObject.ParamSpec.int( - `downsampling_mode`, - `Downsampling mode`, - `Downsampling mode`, - GObject.ParamFlags.READWRITE, - 0, 2, - 0, - ) - } - }, class PixelizeEffect extends Clutter.Effect { - constructor(params) { - super(); - - this.upscale_effect = new UpscaleEffect({}); - this.downscale_effect = new DownscaleEffect({}); - - utils.setup_params(this, params); - } - - static get default_params() { - return DEFAULT_PARAMS; - } - - get factor() { - // should be the same as `this.downscale_effect.divider` - return this.upscale_effect.factor; - } - - set factor(value) { - this.upscale_effect.factor = value; - this.downscale_effect.divider = value; - } - - get downsampling_mode() { - return this.downscale_effect.downsampling_mode; - } - - set downsampling_mode(value) { - this.downscale_effect.downsampling_mode = value; - } - - vfunc_set_actor(actor) { - // deattach effects from old actor - this.upscale_effect?.actor?.remove_effect(this.upscale_effect); - this.downscale_effect?.actor?.remove_effect(this.downscale_effect); - // attach effects to new actor - if (actor) { - if (this.upscale_effect) - actor.add_effect(this.upscale_effect); - if (this.downscale_effect) - actor.add_effect(this.downscale_effect); - } - - super.vfunc_set_actor(actor); - } - - vfunc_set_enabled(is_enabled) { - this.upscale_effect?.set_enabled(is_enabled); - this.downscale_effect?.set_enabled(is_enabled); - super.vfunc_set_enabled(is_enabled); - } - }); \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/rgb_to_hsl.glsl b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/rgb_to_hsl.glsl deleted file mode 100644 index b7a35ac3..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/rgb_to_hsl.glsl +++ /dev/null @@ -1,18 +0,0 @@ -uniform sampler2D tex; - -vec3 rgb_to_hsl(vec3 c) { - vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); - vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); - vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); - - float d = q.x - min(q.w, q.y); - float e = 1.0e-10; - return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x); -} - -void main(void) { - vec2 uv = cogl_tex_coord_in[0].xy; - vec4 rgba = texture2D(tex, uv); - vec4 hsla = vec4(rgb_to_hsl(rgba.xyz), rgba.w); - cogl_color_out = hsla; -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/rgb_to_hsl.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/rgb_to_hsl.js deleted file mode 100644 index 5c4eb05e..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/rgb_to_hsl.js +++ /dev/null @@ -1,31 +0,0 @@ -import GObject from 'gi://GObject'; - -import * as utils from '../conveniences/utils.js'; -const Shell = await utils.import_in_shell_only('gi://Shell'); -const Clutter = await utils.import_in_shell_only('gi://Clutter'); - -const SHADER_FILENAME = 'rgb_to_hsl.glsl'; -const DEFAULT_PARAMS = {}; - - -export const RgbToHslEffect = utils.IS_IN_PREFERENCES ? - { default_params: DEFAULT_PARAMS } : - new GObject.registerClass({ - GTypeName: "RgbToHslEffect", - Properties: {} - }, class RgbToHslEffect extends Clutter.ShaderEffect { - constructor(params) { - super(params); - - utils.setup_params(this, params); - - // set shader source - this._source = utils.get_shader_source(Shell, SHADER_FILENAME, import.meta.url); - if (this._source) - this.set_shader_source(this._source); - } - - static get default_params() { - return DEFAULT_PARAMS; - } - }); \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/upscale.glsl b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/upscale.glsl deleted file mode 100644 index 5cc06ec8..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/upscale.glsl +++ /dev/null @@ -1,57 +0,0 @@ -uniform sampler2D tex; -uniform int factor; -uniform float width; -uniform float height; - -#define CORRECTION 2.25 -#define SIZE_ADDITION 3 - -vec4 get_texture_at_position(vec2 position) { - vec2 raw_position = position + vec2(CORRECTION, CORRECTION); - vec2 raw_uv = raw_position / vec2(width + SIZE_ADDITION, height + SIZE_ADDITION); - - return texture2D(tex, raw_uv); -} - -ivec2 get_corrected_position() { - vec2 raw_uv = cogl_tex_coord0_in.st; - vec2 raw_position = raw_uv * vec2(width + SIZE_ADDITION, height + SIZE_ADDITION); - return ivec2(raw_position - vec2(CORRECTION, CORRECTION)); -} - -void main() { - ivec2 corrected_position = get_corrected_position(); - - vec2 adjusted_position = corrected_position / factor; - - cogl_color_out = get_texture_at_position(adjusted_position); - - // round - if (distance(corrected_position, (floor(adjusted_position) + 0.5) * factor) < factor / 2.5) { - //cogl_color_out = get_texture_at_position(adjusted_position); - } else { - //cogl_color_out = vec4(0, 0, 0, 1); - } - - // square - if (mod(corrected_position.x, factor) >= 2 && mod(corrected_position.y, factor) >= 2) { - //cogl_color_out = get_texture_at_position(adjusted_position); - } else { - //cogl_color_out = vec4(0, 0, 0, 1); - } - - // local mix - vec4 color = vec4(0); - int count = 0; - for (int i = -1; i <= 1; i++) { - for (int j = -1; j <= 1; j++) { - vec2 lookup_position = adjusted_position + vec2(i, j); - if (all(greaterThanEqual(lookup_position, vec2(0, 0))) && - all(lessThan(lookup_position, vec2(width, height) / factor))) { - color += get_texture_at_position(lookup_position); - count += 1; - } - } - } - //cogl_color_out = color / count; -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/upscale.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/upscale.js deleted file mode 100644 index fb719c31..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/effects/upscale.js +++ /dev/null @@ -1,120 +0,0 @@ -import GObject from 'gi://GObject'; - -import * as utils from '../conveniences/utils.js'; -const Shell = await utils.import_in_shell_only('gi://Shell'); -const Clutter = await utils.import_in_shell_only('gi://Clutter'); - -const SHADER_FILENAME = 'upscale.glsl'; -const DEFAULT_PARAMS = { - factor: 8, width: 0, height: 0 -}; - - -export const UpscaleEffect = utils.IS_IN_PREFERENCES ? - { default_params: DEFAULT_PARAMS } : - new GObject.registerClass({ - GTypeName: "UpscaleEffect", - Properties: { - 'factor': GObject.ParamSpec.int( - `factor`, - `Factor`, - `Factor`, - GObject.ParamFlags.READWRITE, - 0, 64, - 8, - ), - 'width': GObject.ParamSpec.double( - `width`, - `Width`, - `Width`, - GObject.ParamFlags.READWRITE, - 0.0, Number.MAX_SAFE_INTEGER, - 0.0, - ), - 'height': GObject.ParamSpec.double( - `height`, - `Height`, - `Height`, - GObject.ParamFlags.READWRITE, - 0.0, Number.MAX_SAFE_INTEGER, - 0.0, - ) - } - }, class UpscaleEffect extends Clutter.ShaderEffect { - constructor(params) { - super(params); - - utils.setup_params(this, params); - - // set shader source - this._source = utils.get_shader_source(Shell, SHADER_FILENAME, import.meta.url); - if (this._source) - this.set_shader_source(this._source); - } - - static get default_params() { - return DEFAULT_PARAMS; - } - - get factor() { - return this._factor; - } - - set factor(value) { - if (this._factor !== value) { - this._factor = value; - - this.set_uniform_value('factor', this._factor); - } - } - - get width() { - return this._width; - } - - set width(value) { - if (this._width !== value) { - this._width = value; - - this.set_uniform_value('width', parseFloat(this._width - 1e-6)); - } - } - - get height() { - return this._height; - } - - set height(value) { - if (this._height !== value) { - this._height = value; - - this.set_uniform_value('height', parseFloat(this._height - 1e-6)); - } - } - - vfunc_set_actor(actor) { - if (this._actor_connection_size_id) { - let old_actor = this.get_actor(); - old_actor?.disconnect(this._actor_connection_size_id); - } - if (actor) { - this.width = actor.width; - this.height = actor.height; - this._actor_connection_size_id = actor.connect('notify::size', _ => { - this.width = actor.width; - this.height = actor.height; - }); - } - else - this._actor_connection_size_id = null; - - super.vfunc_set_actor(actor); - } - - vfunc_paint_target(paint_node, paint_context) { - // force setting nearest-neighbour texture filtering - this.get_pipeline().set_layer_filters(0, 9728, 9728); - - super.vfunc_paint_target(paint_node, paint_context); - } - }); \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/extension.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/extension.js deleted file mode 100644 index 443d7b6b..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/extension.js +++ /dev/null @@ -1,589 +0,0 @@ -import Meta from 'gi://Meta'; -import Clutter from 'gi://Clutter'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; - -import { Extension } from 'resource:///org/gnome/shell/extensions/extension.js'; - -import { update_from_old_settings } from './conveniences/settings_updater.js'; -import { PipelinesManager } from './conveniences/pipelines_manager.js'; -import { EffectsManager } from './conveniences/effects_manager.js'; -import { Connections } from './conveniences/connections.js'; -import { Settings } from './conveniences/settings.js'; -import { KEYS } from './conveniences/keys.js'; - -import { PanelBlur } from './components/panel.js'; -import { OverviewBlur } from './components/overview.js'; -import { DashBlur } from './components/dash_to_dock.js'; -import { LockscreenBlur } from './components/lockscreen.js'; -import { AppFoldersBlur } from './components/appfolders.js'; -import { WindowListBlur } from './components/window_list.js'; -import { CoverflowAltTabBlur } from './components/coverflow_alt_tab.js'; -import { ApplicationsBlur } from './components/applications.js'; -import { ScreenshotBlur } from './components/screenshot.js'; - - -/// The main extension class, created when the GNOME Shell is loaded. -export default class BlurMyShell extends Extension { - /// Enables the extension. - enable() { - // add the extension to global to make it accessible to other extensions - // create it first as it is very useful when debugging crashes - global.blur_my_shell = this; - - // update from old settings, very important for hacks level specifically - update_from_old_settings(this.getSettings()); - - // create a Settings instance, to manage extension's preferences - // it needs to be loaded before logging, as it checks for DEBUG - this._settings = new Settings(KEYS, this.getSettings()); - - this._log("enabling extension..."); - - // create main extension Connections instance - this._connection = new Connections; - - // store it in a global array - this._connections = [this._connection]; - - // create a global effects manager (to prevent RAM bleeding) - this._effects_manager = new EffectsManager(this._connection); - - // create a global pipelines manager, that helps talking with preferences - this._pipelines_manager = new PipelinesManager(this._settings); - - // create an instance of each component, with its associated Connections - let init = () => { - // create a Connections instance, to manage signals - let connection = new Connections; - - // store it to keeps track of them globally - this._connections.push(connection); - - return [connection, this._settings, this._effects_manager]; - }; - - this._panel_blur = new PanelBlur(...init()); - this._dash_to_dock_blur = new DashBlur(...init()); - this._overview_blur = new OverviewBlur(...init()); - this._lockscreen_blur = new LockscreenBlur(...init()); - this._appfolder_blur = new AppFoldersBlur(...init()); - this._window_list_blur = new WindowListBlur(...init()); - this._coverflow_alt_tab_blur = new CoverflowAltTabBlur(...init()); - this._applications_blur = new ApplicationsBlur(...init()); - this._screenshot_blur = new ScreenshotBlur(...init()); - - // connect each component to preferences change - this._connect_to_settings(); - - // enable the lockscreen blur, only one important in both `user` session and `unlock-dialog` - if (this._settings.lockscreen.BLUR && !this._lockscreen_blur.enabled) - this._lockscreen_blur.enable(); - - // ensure we take the correct action for the current session mode - this._user_session_mode_enabled = false; - this._on_session_mode_changed(Main.sessionMode); - - // watch for changes to the session mode - this._connection.connect(Main.sessionMode, 'updated', - () => this._on_session_mode_changed(Main.sessionMode) - ); - } - - /// Enables the components related to the user session (everything except lockscreen blur). - _enable_user_session() { - this._log("changing mode to user session..."); - - // maybe disable clipped redraw - this._update_clipped_redraws(); - - // enable every component - // if the shell is still starting up, wait for it to be entirely loaded; - // this should prevent bugs like #136 and #137 - if (Main.layoutManager._startingUp) { - this._connection.connect( - Main.layoutManager, - 'startup-complete', - () => this._enable_components() - ); - } else - this._enable_components(); - - // try to enable the components as soon as possible anyway, this way the - // overview may load before the user sees it - try { - if (this._settings.overview.BLUR && !this._overview_blur.enabled) - this._overview_blur.enable(); - } catch (e) { - this._log("Could not enable overview blur directly"); - this._log(e); - } - try { - if (this._settings.dash_to_dock.BLUR - && !this._dash_to_dock_blur.enabled) - this._dash_to_dock_blur.enable(); - } catch (e) { - this._log("Could not enable dash-to-dock blur directly"); - this._log(e); - } - try { - if (this._settings.panel.BLUR && !this._panel_blur.enabled) - this._panel_blur.enable(); - } catch (e) { - this._log("Could not enable panel blur directly"); - this._log(e); - } - - // tells the extension we have enabled the user session components, so that we do not - // disable them later if they were not even enabled to begin with - this._user_session_mode_enabled = true; - } - - /// Disables the extension. - /// - /// This extension needs to use the 'unlock-dialog' session mode in order to change the blur on - /// the lockscreen. We have kind of two states of enablement for this extension: - /// - the 'enabled' state, which means that we have created the necessary components (which only - /// are js objects) and enabled the lockscreen blur (which means swapping two functions from - /// the `UnlockDialog` constructor with our ones; - /// - the 'user session enabled` mode, which means that we are in the 'enabled' mode AND we are - /// in the user mode, and so we enable all the other components that we created before. - /// We switch from one state to the other thanks to `this._on_session_mode_changed`, and we - /// track wether or not we are in the user mode with `this._user_session_mode_enabled` (because - /// `this._on_session_mode_changed` might be called multiple times while in the user session - /// mode, typically when going back from simple lockscreen and not sleep mode). - disable() { - this._log("disabling extension..."); - - // disable every component from user session mode - if (this._user_session_mode_enabled) - this._disable_user_session(); - this._overview_blur.restore_patched_proto(); - - // disable lockscreen blur too - this._lockscreen_blur.disable(); - - // untrack them - this._panel_blur = null; - this._dash_to_dock_blur = null; - this._overview_blur = null; - this._appfolder_blur = null; - this._lockscreen_blur = null; - this._window_list_blur = null; - this._coverflow_alt_tab_blur = null; - this._applications_blur = null; - this._screenshot_blur = null; - - // make sure no settings change can re-enable them - this._settings.disconnect_all_settings(); - - // force disconnecting every signal, even if component crashed - this._connections.forEach((connections) => { - connections.disconnect_all(); - }); - this._connections = []; - - // remove the clipped redraws flag - this._reenable_clipped_redraws(); - - // remove the extension from GJS's global - delete global.blur_my_shell; - - this._log("extension disabled."); - - this._settings = null; - } - - /// Disables the components related to the user session (everything except lockscreen blur). - _disable_user_session() { - this._log("disabling user session mode..."); - - // disable every component except lockscreen blur - this._panel_blur.disable(); - this._dash_to_dock_blur.disable(); - this._overview_blur.disable(); - this._appfolder_blur.disable(); - this._window_list_blur.disable(); - this._coverflow_alt_tab_blur.disable(); - this._applications_blur.disable(); - this._screenshot_blur.disable(); - - // remove the clipped redraws flag - this._reenable_clipped_redraws(); - - // tells the extension we have disabled the user session components, so that we do not - // disable them later again if they were already disabled - this._user_session_mode_enabled = false; - } - - /// Restarts the components related to the user session. - _restart() { - this._log("restarting..."); - - this._disable_user_session(); - this._enable_user_session(); - - this._log("restarted."); - } - - /// Changes the extension to operate either on 'user' mode or 'unlock-dialog' mode, switching - /// from one to the other means enabling/disabling every component except lockscreen blur. - _on_session_mode_changed(session) { - if (session.currentMode === 'user' || session.parentMode === 'user') { - if (!this._user_session_mode_enabled) - // we need to activate everything - this._enable_user_session(); - } - else if (session.currentMode === 'unlock-dialog') { - if (this._user_session_mode_enabled) - // we need to disable the components related to the user session mode - this._disable_user_session(); - } - } - - /// Add or remove the clutter debug flag to disable clipped redraws. - /// This will entirely fix the blur effect, but should not be used except if - /// the user really needs it, as clipped redraws are a huge performance - /// boost for the compositor. - _update_clipped_redraws() { - if (this._settings.HACKS_LEVEL === 2) - this._disable_clipped_redraws(); - else - this._reenable_clipped_redraws(); - } - - /// Add the Clutter debug flag. - _disable_clipped_redraws() { - Meta.add_clutter_debug_flags( - null, Clutter.DrawDebugFlag.DISABLE_CLIPPED_REDRAWS, null - ); - } - - /// Remove the Clutter debug flag. - _reenable_clipped_redraws() { - Meta.remove_clutter_debug_flags( - null, Clutter.DrawDebugFlag.DISABLE_CLIPPED_REDRAWS, null - ); - } - - /// Enables every component from the user session needed, should be called when the shell is - /// entirely loaded as the `enable` methods interact with it. - _enable_components() { - // enable each component if needed, and if it is not already enabled - - if (this._settings.panel.BLUR && !this._panel_blur.enabled) - this._panel_blur.enable(); - - if (this._settings.dash_to_dock.BLUR && !this._dash_to_dock_blur.enabled) - this._dash_to_dock_blur.enable(); - - if (this._settings.overview.BLUR && !this._overview_blur.enabled) - this._overview_blur.enable(); - - if (this._settings.appfolder.BLUR) - this._appfolder_blur.enable(); - - if (this._settings.applications.BLUR) - this._applications_blur.enable(); - - if (this._settings.window_list.BLUR) - this._window_list_blur.enable(); - - if (this._settings.coverflow_alt_tab.BLUR) - this._coverflow_alt_tab_blur.enable(); - - if (this._settings.screenshot.BLUR) - this._screenshot_blur.enable(); - - this._log("all components enabled."); - } - - /// Updates needed things in each component when a preference changed - _connect_to_settings() { - // restart the extension when hacks level is changed, easier than - // restarting individual components and should not happen often either - this._settings.HACKS_LEVEL_changed(() => this._restart()); - - - // ---------- OVERVIEW ---------- - - // toggled on/off - this._settings.overview.BLUR_changed(() => { - if (this._settings.overview.BLUR) - this._overview_blur.enable(); - else - this._overview_blur.disable(); - }); - - // overview pipeline changed - this._settings.overview.PIPELINE_changed(() => { - if (this._settings.overview.BLUR) - this._overview_blur.update_backgrounds(); - }); - - // overview components style changed - this._settings.overview.STYLE_COMPONENTS_changed(() => { - if (this._settings.overview.BLUR) - this._overview_blur.update_components_classname(); - }); - - - // ---------- APPFOLDER ---------- - - // toggled on/off - this._settings.appfolder.BLUR_changed(() => { - if (this._settings.appfolder.BLUR) - this._appfolder_blur.enable(); - else - this._appfolder_blur.disable(); - }); - - // appfolder sigma changed - this._settings.appfolder.SIGMA_changed(() => { - if (this._settings.appfolder.BLUR) - this._appfolder_blur.set_sigma( - this._settings.appfolder.SIGMA - ); - }); - - // appfolder brightness changed - this._settings.appfolder.BRIGHTNESS_changed(() => { - if (this._settings.appfolder.BLUR) - this._appfolder_blur.set_brightness( - this._settings.appfolder.BRIGHTNESS - ); - }); - - // appfolder dialogs style changed - this._settings.appfolder.STYLE_DIALOGS_changed(() => { - if (this._settings.appfolder.BLUR) - this._appfolder_blur.blur_appfolders(); - }); - - - // ---------- PANEL ---------- - - // toggled on/off - this._settings.panel.BLUR_changed(() => { - if (this._settings.panel.BLUR) - this._panel_blur.enable(); - else - this._panel_blur.disable(); - }); - - // static blur toggled on/off, really we can just reload the blur at this point - this._settings.panel.STATIC_BLUR_changed(() => { - if (this._settings.panel.BLUR) - this._panel_blur.reset(); - }); - - // panel pipeline changed - this._settings.panel.PIPELINE_changed(() => { - if (this._settings.panel.BLUR) - this._panel_blur.update_pipeline(); - }); - - // panel blur's overview connection toggled on/off - this._settings.panel.UNBLUR_IN_OVERVIEW_changed(() => { - this._panel_blur.connect_to_windows_and_overview(); - }); - - // force light text toggled on/off - this._settings.panel.FORCE_LIGHT_TEXT_changed(() => { - if (this._settings.panel.BLUR) - this._panel_blur.update_light_text_classname(); - }); - - // panel override background toggled on/off - this._settings.panel.OVERRIDE_BACKGROUND_changed(() => { - if (this._settings.panel.BLUR) - this._panel_blur.connect_to_windows_and_overview(); - }); - - // panel style changed - this._settings.panel.STYLE_PANEL_changed(() => { - if (this._settings.panel.BLUR) - this._panel_blur.connect_to_windows_and_overview(); - }); - - // panel background's dynamic overriding toggled on/off - this._settings.panel.OVERRIDE_BACKGROUND_DYNAMICALLY_changed(() => { - if (this._settings.panel.BLUR) - this._panel_blur.connect_to_windows_and_overview(); - }); - - - // ---------- DASH TO DOCK ---------- - - // toggled on/off - this._settings.dash_to_dock.BLUR_changed(() => { - if (this._settings.dash_to_dock.BLUR) - this._dash_to_dock_blur.enable(); - else - this._dash_to_dock_blur.disable(); - }); - - // static blur toggled on/off - this._settings.dash_to_dock.STATIC_BLUR_changed(() => { - if (this._settings.dash_to_dock.BLUR) - this._dash_to_dock_blur.change_blur_type(); - }); - - // overview pipeline changed - this._settings.dash_to_dock.PIPELINE_changed(() => { - if (this._settings.dash_to_dock.BLUR) - this._dash_to_dock_blur.update_pipeline(); - }); - - // dash-to-dock override background toggled on/off - this._settings.dash_to_dock.OVERRIDE_BACKGROUND_changed(() => { - if (this._settings.dash_to_dock.BLUR) - this._dash_to_dock_blur.update_background(); - }); - - // dash-to-dock style changed - this._settings.dash_to_dock.STYLE_DASH_TO_DOCK_changed(() => { - if (this._settings.dash_to_dock.BLUR) - this._dash_to_dock_blur.update_background(); - }); - - // dash-to-dock blur's overview connection toggled on/off - this._settings.dash_to_dock.UNBLUR_IN_OVERVIEW_changed(() => { - if (this._settings.dash_to_dock.BLUR) - this._dash_to_dock_blur.connect_to_overview(); - }); - - - // ---------- APPLICATIONS ---------- - - // toggled on/off - this._settings.applications.BLUR_changed(() => { - if (this._settings.applications.BLUR) - this._applications_blur.enable(); - else - this._applications_blur.disable(); - }); - - // application opacity changed - this._settings.applications.OPACITY_changed(() => { - if (this._settings.applications.BLUR) - this._applications_blur.set_opacity( - this._settings.applications.OPACITY - ); - }); - - // application dynamic-opacity changed - this._settings.applications.DYNAMIC_OPACITY_changed(() => { - if (this._settings.applications.BLUR) - this._applications_blur.init_dynamic_opacity(); - }); - - // application blur-on-overview changed - this._settings.applications.BLUR_ON_OVERVIEW_changed(() => { - if (this._settings.applications.BLUR) - this._applications_blur.connect_to_overview(); - }); - - // application enable-all changed - this._settings.applications.ENABLE_ALL_changed(() => { - if (this._settings.applications.BLUR) - this._applications_blur.update_all_windows(); - }); - - // application whitelist changed - this._settings.applications.WHITELIST_changed(() => { - if ( - this._settings.applications.BLUR - && !this._settings.applications.ENABLE_ALL - ) - this._applications_blur.update_all_windows(); - }); - - // application blacklist changed - this._settings.applications.BLACKLIST_changed(() => { - if ( - this._settings.applications.BLUR - && this._settings.applications.ENABLE_ALL - ) - this._applications_blur.update_all_windows(); - }); - - - // ---------- LOCKSCREEN ---------- - - // toggled on/off - this._settings.lockscreen.BLUR_changed(() => { - if (this._settings.lockscreen.BLUR) - this._lockscreen_blur.enable(); - else - this._lockscreen_blur.disable(); - }); - - // lockscreen pipeline changed - this._settings.lockscreen.PIPELINE_changed(() => { - if (this._settings.lockscreen.BLUR) - this._lockscreen_blur.update_lockscreen(); - }); - - - // ---------- WINDOW LIST ---------- - - // toggled on/off - this._settings.window_list.BLUR_changed(() => { - if (this._settings.window_list.BLUR) - this._window_list_blur.enable(); - else - this._window_list_blur.disable(); - }); - - - // ---------- COVERFLOW ALT-TAB ---------- - - // toggled on/off - this._settings.coverflow_alt_tab.BLUR_changed(() => { - if (this._settings.coverflow_alt_tab.BLUR) - this._coverflow_alt_tab_blur.enable(); - else - this._coverflow_alt_tab_blur.disable(); - }); - - - // ---------- HIDETOPBAR ---------- - - // toggled on/off - this._settings.hidetopbar.COMPATIBILITY_changed(() => { - // no need to verify if it is enabled or not, it is done anyway - this._panel_blur.connect_to_windows_and_overview(); - }); - - - // ---------- DASH TO PANEL ---------- - - // toggled on/off - this._settings.dash_to_panel.BLUR_ORIGINAL_PANEL_changed(() => { - if (this._settings.panel.BLUR) - this._panel_blur.reset(); - }); - - - // ---------- SCREENSHOT ---------- - - // toggled on/off - this._settings.screenshot.BLUR_changed(() => { - if (this._settings.screenshot.BLUR) - this._screenshot_blur.enable(); - else - this._screenshot_blur.disable(); - }); - - // screenshot pipeline changed - this._settings.screenshot.PIPELINE_changed(() => { - if (this._settings.screenshot.BLUR) - this._screenshot_blur.update_pipeline(); - }); - } - - _log(str) { - if (this._settings.DEBUG) - console.log(`[Blur my Shell > extension] ${str}`); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/add-row-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/add-row-symbolic.svg deleted file mode 100644 index bdab3095..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/add-row-symbolic.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/applications-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/applications-symbolic.svg deleted file mode 100644 index 87f307f5..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/applications-symbolic.svg +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/bottom-panel-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/bottom-panel-symbolic.svg deleted file mode 100644 index 2eda98b7..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/bottom-panel-symbolic.svg +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/dash-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/dash-symbolic.svg deleted file mode 100644 index 5a78b467..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/dash-symbolic.svg +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/down-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/down-symbolic.svg deleted file mode 100644 index 652f8c0d..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/down-symbolic.svg +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/duplicate-row-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/duplicate-row-symbolic.svg deleted file mode 100644 index 925e9007..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/duplicate-row-symbolic.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/dynamic-mode-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/dynamic-mode-symbolic.svg deleted file mode 100644 index c37b9aa7..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/dynamic-mode-symbolic.svg +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/edit-row-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/edit-row-symbolic.svg deleted file mode 100644 index f4115ada..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/edit-row-symbolic.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/heart-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/heart-symbolic.svg deleted file mode 100644 index fa045a8b..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/heart-symbolic.svg +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/other-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/other-symbolic.svg deleted file mode 100644 index 45e703e4..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/other-symbolic.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/overview-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/overview-symbolic.svg deleted file mode 100644 index 445f6621..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/overview-symbolic.svg +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/pipelines-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/pipelines-symbolic.svg deleted file mode 100644 index d451b238..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/pipelines-symbolic.svg +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/remove-row-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/remove-row-symbolic.svg deleted file mode 100644 index a8da14f5..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/remove-row-symbolic.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/reset-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/reset-symbolic.svg deleted file mode 100644 index e443de4f..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/reset-symbolic.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/select-row-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/select-row-symbolic.svg deleted file mode 100644 index e6d2d9e7..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/select-row-symbolic.svg +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/select-window-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/select-window-symbolic.svg deleted file mode 100644 index cad2da87..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/select-window-symbolic.svg +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/static-mode-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/static-mode-symbolic.svg deleted file mode 100644 index 5b0eb20c..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/icons/hicolor/scalable/actions/static-mode-symbolic.svg +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/af/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/af/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 9228b72c..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/af/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ar/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ar/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 782420bc..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ar/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/az/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/az/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 118ad996..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/az/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/be/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/be/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 818a7e23..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/be/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/bg/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/bg/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 5f80e8bf..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/bg/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ca/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ca/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index a03611b9..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ca/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/cs/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/cs/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 799f7576..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/cs/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/da/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/da/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 155dcbb6..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/da/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/de/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/de/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 0a31cf83..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/de/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/el/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/el/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index fc3ca9ba..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/el/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/es/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/es/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 756a7237..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/es/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/et/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/et/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 2719fca7..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/et/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/fi/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/fi/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 09c44221..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/fi/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/fr/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/fr/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 1bb85eba..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/fr/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/he/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/he/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index abb4ac00..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/he/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/hi/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/hi/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index ee819a73..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/hi/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/hu/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/hu/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index f181edbc..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/hu/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/id/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/id/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index cf717647..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/id/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/it/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/it/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 484f4050..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/it/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ja/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ja/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 1a8f89e4..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ja/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ka/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ka/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 8c7b5101..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ka/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ko/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ko/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index c940d4bd..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ko/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/nb_NO/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/nb_NO/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 2436b7ce..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/nb_NO/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/nl/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/nl/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index fdca0515..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/nl/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/nn/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/nn/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index c872ad07..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/nn/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/pl/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/pl/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 071cbd4f..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/pl/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/pt/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/pt/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 82060011..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/pt/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/pt_BR/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/pt_BR/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index efcc8009..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/pt_BR/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ro/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ro/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index eb690737..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ro/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ru/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ru/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 25e129d3..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ru/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/sl/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/sl/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 0ceab79a..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/sl/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/sv/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/sv/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index efa421e7..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/sv/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ta/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ta/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 6efb1c7b..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/ta/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/tr/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/tr/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 603f521b..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/tr/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/uk/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/uk/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 38b4c47a..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/uk/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/vi/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/vi/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 38be0d01..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/vi/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/zh_Hans/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/zh_Hans/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index 19e2cfb4..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/zh_Hans/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/zh_TW/LC_MESSAGES/blur-my-shell@aunetx.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/zh_TW/LC_MESSAGES/blur-my-shell@aunetx.mo deleted file mode 100644 index c18174df..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/locale/zh_TW/LC_MESSAGES/blur-my-shell@aunetx.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/applications.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/applications.js deleted file mode 100644 index 620d59e9..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/applications.js +++ /dev/null @@ -1,186 +0,0 @@ -import Adw from 'gi://Adw'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Gio from 'gi://Gio'; - -import { ApplicationRow } from './applications_management/application_row.js'; - - -const make_array = prefs_group => { - let list_box = prefs_group - .get_first_child() - .get_last_child() - .get_first_child(); - - let elements = []; - let i = 0; - let element = list_box.get_row_at_index(i); - while (element) { - elements.push(element); - i++; - element = list_box.get_row_at_index(i); - } - - return elements; -}; - - -export const Applications = GObject.registerClass({ - GTypeName: 'Applications', - Template: GLib.uri_resolve_relative(import.meta.url, '../ui/applications.ui', GLib.UriFlags.NONE), - InternalChildren: [ - 'blur', - 'sigma', - 'brightness', - 'opacity', - 'dynamic_opacity', - 'blur_on_overview', - 'enable_all', - 'whitelist', - 'add_window_whitelist', - 'blacklist', - 'add_window_blacklist' - ], -}, class Applications extends Adw.PreferencesPage { - constructor(preferences, preferences_window) { - super({}); - this._preferences_window = preferences_window; - - this.preferences = preferences; - - this.preferences.applications.settings.bind( - 'blur', this._blur, 'active', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.applications.settings.bind( - 'opacity', this._opacity, 'value', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.applications.settings.bind( - 'dynamic-opacity', this._dynamic_opacity, 'active', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.applications.settings.bind( - 'blur-on-overview', this._blur_on_overview, 'active', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.applications.settings.bind( - 'enable-all', this._enable_all, 'active', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.applications.settings.bind( - 'sigma', this._sigma, 'value', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.applications.settings.bind( - 'brightness', this._brightness, 'value', - Gio.SettingsBindFlags.DEFAULT - ); - - // connect 'enable all' button to whitelist/blacklist visibility - this._enable_all.bind_property( - 'active', this._whitelist, 'visible', - GObject.BindingFlags.INVERT_BOOLEAN - ); - this._enable_all.bind_property( - 'active', this._blacklist, 'visible', - GObject.BindingFlags.DEFAULT - ); - - // make sure that blacklist / whitelist is correctly hidden - if (this._enable_all.active) - this._whitelist.visible = false; - this._blacklist.visible = !this._whitelist.visible; - - // listen to app row addition - this._add_window_whitelist.connect('clicked', - () => this.add_to_whitelist() - ); - this._add_window_blacklist.connect('clicked', - () => this.add_to_blacklist() - ); - - // add initial applications - this.add_widgets_from_lists(); - - this.preferences.connect('reset', () => { - this.remove_all_widgets(); - this.add_widgets_from_lists(); - }); - } - - // A way to retriew the whitelist widgets. - get _whitelist_elements() { - return make_array(this._whitelist); - } - - // A way to retriew the blacklist widgets. - get _blacklist_elements() { - return make_array(this._blacklist); - } - - add_widgets_from_lists() { - this.preferences.applications.WHITELIST.forEach( - app_name => this.add_to_whitelist(app_name) - ); - - this.preferences.applications.BLACKLIST.forEach( - app_name => this.add_to_blacklist(app_name) - ); - - } - - close_all_expanded_rows() { - this._whitelist_elements.forEach( - element => element.set_expanded(false) - ); - this._blacklist_elements.forEach( - element => element.set_expanded(false) - ); - } - - remove_all_widgets() { - this._whitelist_elements.forEach( - element => this._whitelist.remove(element) - ); - this._blacklist_elements.forEach( - element => this._blacklist.remove(element) - ); - } - - add_to_whitelist(app_name = null) { - let window_row = new ApplicationRow('whitelist', this, app_name); - this._whitelist.add(window_row); - } - - add_to_blacklist(app_name = null) { - let window_row = new ApplicationRow('blacklist', this, app_name); - this._blacklist.add(window_row); - } - - update_whitelist_titles() { - let titles = this._whitelist_elements - .map(element => element._window_class.buffer.text) - .filter(title => title != ""); - - this.preferences.applications.WHITELIST = titles; - } - - update_blacklist_titles() { - let titles = this._blacklist_elements - .map(element => element._window_class.buffer.text) - .filter(title => title != ""); - - this.preferences.applications.BLACKLIST = titles; - } - - remove_from_whitelist(widget) { - this._whitelist.remove(widget); - this.update_whitelist_titles(); - } - - remove_from_blacklist(widget) { - this._blacklist.remove(widget); - this.update_blacklist_titles(); - } -}); \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/applications_management/application_row.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/applications_management/application_row.js deleted file mode 100644 index 4af3bf87..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/applications_management/application_row.js +++ /dev/null @@ -1,112 +0,0 @@ -import Adw from 'gi://Adw'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Gio from 'gi://Gio'; -import Gtk from 'gi://Gtk'; - -import { pick, on_picking, on_picked } from '../../dbus/client.js'; - - -export const ApplicationRow = GObject.registerClass({ - GTypeName: 'ApplicationRow', - Template: GLib.uri_resolve_relative(import.meta.url, '../../ui/application-row.ui', GLib.UriFlags.NONE), - InternalChildren: [ - 'window_picker', - 'window_class', - 'picking_failure_toast', - 'window_not_found_toast' - ], -}, class ApplicationRow extends Adw.ExpanderRow { - constructor(list, app_page, app_name) { - super({}); - this._list = list; - this._app_page = app_page; - - // add a 'remove' button before the text - let action_row = this.child.get_first_child().get_first_child(); - let remove_button = new Gtk.Button({ - 'icon-name': 'remove-row-symbolic', - 'width-request': 38, - 'height-request': 38, - 'margin-top': 6, - 'margin-bottom': 6, - }); - remove_button.add_css_class('circular'); - remove_button.add_css_class('flat'); - action_row.add_prefix(remove_button); - - // connect the button to the whitelist / blacklist removal - remove_button.connect('clicked', () => this._remove_row()); - - // bind row title to text buffer - this._window_class.buffer.bind_property( - 'text', this, 'title', - Gio.SettingsBindFlags.BIDIRECTIONNAL - ); - - // set application name if it exists, or open the revealer and pick one - if (app_name) - this._window_class.buffer.text = app_name; - else { - app_page.close_all_expanded_rows(); - this.set_expanded(true); - this._do_pick_window(true); - } - - // pick a window when the picker button is clicked - this._window_picker.connect('clicked', () => this._do_pick_window()); - - // update list on text buffer change - this._window_class.connect('changed', - () => this._update_rows_titles() - ); - } - - _remove_row() { - this._app_page["remove_from_" + this._list](this); - } - - _update_rows_titles() { - this._app_page["update_" + this._list + "_titles"](this); - } - - _do_pick_window(remove_if_failed = false) { - // a mechanism to know if the extension is listening correcly - let has_responded = false; - let should_take_answer = true; - setTimeout(() => { - if (!has_responded) { - // show toast about failure - this._app_page._preferences_window.add_toast( - this._picking_failure_toast - ); - - // prevent title from changing with later picks - should_take_answer = false; - - // remove row if asked - if (remove_if_failed) - this._remove_row(); - } - }, 250); - - on_picking(() => - has_responded = true - ); - - on_picked(wm_class => { - if (should_take_answer) { - if (wm_class == 'window-not-found') { - console.warn("Can't pick window from here"); - this._app_page._preferences_window.add_toast( - this._window_not_found_toast - ); - return; - } - this._window_class.buffer.text = wm_class; - } - }); - - pick(); - } -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/dash.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/dash.js deleted file mode 100644 index aae37685..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/dash.js +++ /dev/null @@ -1,81 +0,0 @@ -import Adw from 'gi://Adw'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Gio from 'gi://Gio'; - - -export const Dash = GObject.registerClass({ - GTypeName: 'Dash', - Template: GLib.uri_resolve_relative(import.meta.url, '../ui/dash.ui', GLib.UriFlags.NONE), - InternalChildren: [ - 'blur', - 'pipeline_choose_row', - 'mode_static', - 'mode_dynamic', - 'sigma_row', - 'sigma', - 'brightness_row', - 'brightness', - 'override_background', - 'style_dash_to_dock', - 'unblur_in_overview' - ], -}, class Dash extends Adw.PreferencesPage { - constructor(preferences, pipelines_manager, pipelines_page) { - super({}); - - this.preferences = preferences; - this.pipelines_manager = pipelines_manager; - this.pipelines_page = pipelines_page; - - this.preferences.dash_to_dock.settings.bind( - 'blur', this._blur, 'active', - Gio.SettingsBindFlags.DEFAULT - ); - - this._pipeline_choose_row.initialize( - this.preferences.dash_to_dock, this.pipelines_manager, this.pipelines_page - ); - - this.change_blur_mode(this.preferences.dash_to_dock.STATIC_BLUR, true); - - this._mode_static.connect('toggled', - () => this.preferences.dash_to_dock.STATIC_BLUR = this._mode_static.active - ); - this.preferences.dash_to_dock.STATIC_BLUR_changed( - () => this.change_blur_mode(this.preferences.dash_to_dock.STATIC_BLUR, false) - ); - - this.preferences.dash_to_dock.settings.bind( - 'sigma', this._sigma, 'value', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.dash_to_dock.settings.bind( - 'brightness', this._brightness, 'value', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.dash_to_dock.settings.bind( - 'override-background', - this._override_background, 'enable-expansion', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.dash_to_dock.settings.bind( - 'style-dash-to-dock', this._style_dash_to_dock, 'selected', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.dash_to_dock.settings.bind( - 'unblur-in-overview', this._unblur_in_overview, 'active', - Gio.SettingsBindFlags.DEFAULT - ); - } - - change_blur_mode(is_static_blur, first_run) { - this._mode_static.set_active(is_static_blur); - if (first_run) - this._mode_dynamic.set_active(!is_static_blur); - - this._pipeline_choose_row.set_visible(is_static_blur); - this._sigma_row.set_visible(!is_static_blur); - this._brightness_row.set_visible(!is_static_blur); - } -}); \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/menu.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/menu.js deleted file mode 100644 index 899fdcfc..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/menu.js +++ /dev/null @@ -1,68 +0,0 @@ -import Gdk from 'gi://Gdk'; -import Gtk from 'gi://Gtk'; -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; - - -export function addMenu(window) { - const builder = new Gtk.Builder(); - - // add a dummy page and remove it immediately, to access headerbar - builder.add_from_file(GLib.filename_from_uri(GLib.uri_resolve_relative(import.meta.url, '../ui/menu.ui', GLib.UriFlags.NONE))[0]); - let menu_util = builder.get_object('menu_util'); - window.add(menu_util); - try { - addMenuToHeader(window, builder); - } catch (error) { - // could not add menu... not so bad - } - window.remove(menu_util); -} - -function addMenuToHeader(window, builder) { - // a little hack to get to the headerbar - const page = builder.get_object('menu_util'); - const pages_stack = page.get_parent(); // AdwViewStack - const content_stack = pages_stack.get_parent().get_parent(); // GtkStack - const preferences = content_stack.get_parent(); // GtkBox - const headerbar = preferences.get_first_child().get_next_sibling() - .get_first_child().get_first_child().get_first_child(); // AdwHeaderBar - headerbar.pack_start(builder.get_object('info_menu')); - - // setup menu actions - const actionGroup = new Gio.SimpleActionGroup(); - window.insert_action_group('prefs', actionGroup); - - // a list of actions with their associated link - const actions = [ - { - name: 'open-bug-report', - link: 'https://github.com/aunetx/blur-my-shell/issues' - }, - { - name: 'open-readme', - link: 'https://github.com/aunetx/blur-my-shell' - }, - { - name: 'open-license', - link: 'https://github.com/aunetx/blur-my-shell/blob/master/LICENSE' - }, - { - name: 'donate-github', - link: 'https://github.com/sponsors/aunetx' - }, - { - name: 'donate-kofi', - link: 'https://ko-fi.com/aunetx' - }, - ]; - - actions.forEach(action => { - let act = new Gio.SimpleAction({ name: action.name }); - act.connect( - 'activate', - () => Gtk.show_uri(window, action.link, Gdk.CURRENT_TIME) - ); - actionGroup.add_action(act); - }); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/other.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/other.js deleted file mode 100644 index 0fac364a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/other.js +++ /dev/null @@ -1,86 +0,0 @@ -import Adw from 'gi://Adw'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Gio from 'gi://Gio'; - - -export const Other = GObject.registerClass({ - GTypeName: 'Other', - Template: GLib.uri_resolve_relative(import.meta.url, '../ui/other.ui', GLib.UriFlags.NONE), - InternalChildren: [ - 'lockscreen_blur', - 'lockscreen_pipeline_choose_row', - - 'screenshot_blur', - 'screenshot_pipeline_choose_row', - - 'window_list_blur', - 'window_list_sigma', - 'window_list_brightness', - - 'coverflow_alt_tab_blur', - 'coverflow_alt_tab_pipeline_choose_row', - - 'hack_level', - 'debug', - 'reset' - ], -}, class Overview extends Adw.PreferencesPage { - constructor(preferences, pipelines_manager, pipelines_page) { - super({}); - - this.preferences = preferences; - this.pipelines_manager = pipelines_manager; - this.pipelines_page = pipelines_page; - - this.preferences.lockscreen.settings.bind( - 'blur', this._lockscreen_blur, 'active', - Gio.SettingsBindFlags.DEFAULT - ); - - this._lockscreen_pipeline_choose_row.initialize( - this.preferences.lockscreen, this.pipelines_manager, this.pipelines_page - ); - - this.preferences.screenshot.settings.bind( - 'blur', this._screenshot_blur, 'active', - Gio.SettingsBindFlags.DEFAULT - ); - - this._screenshot_pipeline_choose_row.initialize( - this.preferences.screenshot, this.pipelines_manager, this.pipelines_page - ); - - this.preferences.window_list.settings.bind( - 'blur', this._window_list_blur, 'active', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.window_list.settings.bind( - 'sigma', this._window_list_sigma, 'value', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.window_list.settings.bind( - 'brightness', this._window_list_brightness, 'value', - Gio.SettingsBindFlags.DEFAULT - ); - - this.preferences.coverflow_alt_tab.settings.bind( - 'blur', this._coverflow_alt_tab_blur, 'active', - Gio.SettingsBindFlags.DEFAULT - ); - this._coverflow_alt_tab_pipeline_choose_row.initialize( - this.preferences.coverflow_alt_tab, this.pipelines_manager, this.pipelines_page - ); - - this.preferences.settings.bind( - 'hacks-level', this._hack_level, 'selected', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.settings.bind( - 'debug', this._debug, 'active', - Gio.SettingsBindFlags.DEFAULT - ); - - this._reset.connect('clicked', () => this.preferences.reset()); - } -}); \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/overview.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/overview.js deleted file mode 100644 index f6fe592a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/overview.js +++ /dev/null @@ -1,59 +0,0 @@ -import Adw from 'gi://Adw'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Gio from 'gi://Gio'; - - -export const Overview = GObject.registerClass({ - GTypeName: 'Overview', - Template: GLib.uri_resolve_relative(import.meta.url, '../ui/overview.ui', GLib.UriFlags.NONE), - InternalChildren: [ - 'overview_blur', - 'pipeline_choose_row', - 'overview_style_components', - - 'appfolder_blur', - 'appfolder_sigma', - 'appfolder_brightness', - 'appfolder_style_dialogs' - ], -}, class Overview extends Adw.PreferencesPage { - constructor(preferences, pipelines_manager, pipelines_page) { - super({}); - - this.preferences = preferences; - this.pipelines_manager = pipelines_manager; - this.pipelines_page = pipelines_page; - - this.preferences.overview.settings.bind( - 'blur', this._overview_blur, 'active', - Gio.SettingsBindFlags.DEFAULT - ); - - this._pipeline_choose_row.initialize( - this.preferences.overview, this.pipelines_manager, this.pipelines_page - ); - - this.preferences.overview.settings.bind( - 'style-components', this._overview_style_components, 'selected', - Gio.SettingsBindFlags.DEFAULT - ); - - this.preferences.appfolder.settings.bind( - 'blur', this._appfolder_blur, 'active', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.appfolder.settings.bind( - 'sigma', this._appfolder_sigma, 'value', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.appfolder.settings.bind( - 'brightness', this._appfolder_brightness, 'value', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.appfolder.settings.bind( - 'style-dialogs', this._appfolder_style_dialogs, 'selected', - Gio.SettingsBindFlags.DEFAULT - ); - } -}); \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/panel.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/panel.js deleted file mode 100644 index c49f3239..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/panel.js +++ /dev/null @@ -1,102 +0,0 @@ -import Adw from 'gi://Adw'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Gio from 'gi://Gio'; - - -export const Panel = GObject.registerClass({ - GTypeName: 'Panel', - Template: GLib.uri_resolve_relative(import.meta.url, '../ui/panel.ui', GLib.UriFlags.NONE), - InternalChildren: [ - 'blur', - 'pipeline_choose_row', - 'mode_static', - 'mode_dynamic', - 'sigma_row', - 'sigma', - 'brightness_row', - 'brightness', - 'unblur_in_overview', - 'force_light_text', - 'override_background', - 'style_panel', - 'override_background_dynamically', - 'hidetopbar_compatibility', - 'dtp_blur_original_panel' - ], -}, class Panel extends Adw.PreferencesPage { - constructor(preferences, pipelines_manager, pipelines_page) { - super({}); - - this.preferences = preferences; - this.pipelines_manager = pipelines_manager; - this.pipelines_page = pipelines_page; - - this.preferences.panel.settings.bind( - 'blur', this._blur, 'active', - Gio.SettingsBindFlags.DEFAULT - ); - - this._pipeline_choose_row.initialize( - this.preferences.panel, this.pipelines_manager, this.pipelines_page - ); - - this.change_blur_mode(this.preferences.panel.STATIC_BLUR, true); - - this._mode_static.connect('toggled', - () => this.preferences.panel.STATIC_BLUR = this._mode_static.active - ); - this.preferences.panel.STATIC_BLUR_changed( - () => this.change_blur_mode(this.preferences.panel.STATIC_BLUR, false) - ); - - this.preferences.panel.settings.bind( - 'sigma', this._sigma, 'value', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.panel.settings.bind( - 'brightness', this._brightness, 'value', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.panel.settings.bind( - 'unblur-in-overview', this._unblur_in_overview, 'active', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.panel.settings.bind( - 'force-light-text', this._force_light_text, 'active', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.panel.settings.bind( - 'override-background', - this._override_background, 'enable-expansion', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.panel.settings.bind( - 'style-panel', this._style_panel, 'selected', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.panel.settings.bind( - 'override-background-dynamically', - this._override_background_dynamically, 'active', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.hidetopbar.settings.bind( - 'compatibility', this._hidetopbar_compatibility, 'active', - Gio.SettingsBindFlags.DEFAULT - ); - this.preferences.dash_to_panel.settings.bind( - 'blur-original-panel', this._dtp_blur_original_panel, 'active', - Gio.SettingsBindFlags.DEFAULT - ); - } - - change_blur_mode(is_static_blur, first_run) { - this._mode_static.set_active(is_static_blur); - if (first_run) - this._mode_dynamic.set_active(!is_static_blur); - - this._pipeline_choose_row.set_visible(is_static_blur); - this._sigma_row.set_visible(!is_static_blur); - this._brightness_row.set_visible(!is_static_blur); - } -}); \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/pipelines.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/pipelines.js deleted file mode 100644 index 158ea9ae..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/pipelines.js +++ /dev/null @@ -1,98 +0,0 @@ -import Adw from 'gi://Adw'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import { gettext as _ } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; - -import { PipelineGroup } from './pipelines_management/pipeline_group.js'; -import { EffectsDialog } from './pipelines_management/effects_dialog.js'; - - -export const Pipelines = GObject.registerClass({ - GTypeName: 'Pipelines', - Template: GLib.uri_resolve_relative(import.meta.url, '../ui/pipelines.ui', GLib.UriFlags.NONE), - InternalChildren: [ - 'add_pipeline' - ], -}, class Pipelines extends Adw.PreferencesPage { - constructor(preferences, pipelines_manager, window) { - super({}); - - this.preferences = preferences; - this.pipelines_manager = pipelines_manager; - this.window = window; - - this.pipelines_map = new Map; - - for (let pipeline_id in this.pipelines_manager.pipelines) - this.add_pipeline(pipeline_id, false); - - this.preferences.connect('reset', _ => { - this.pipelines_map.forEach((_infos, pid) => this.remove_pipeline(pid)); - for (let pipeline_id in this.pipelines_manager.pipelines) - this.add_pipeline(pipeline_id, false); - }); - - this._add_pipeline.connect( - "clicked", - () => this.pipelines_manager.create_pipeline(_("New pipeline")) - ); - - this.pipelines_manager.connect( - "pipeline-created", - (_obj, id, _pipeline) => this.add_pipeline(id, true) - ); - } - - add_pipeline(pipeline_id, scroll_to_bottom) { - let pipeline = this.pipelines_manager.pipelines[pipeline_id]; - let pipeline_group = new PipelineGroup( - this.pipelines_manager, pipeline_id, pipeline, this - ); - - let pipeline_destroyed_id = this.pipelines_manager.connect( - pipeline_id + "::pipeline-destroyed", - () => this.remove_pipeline(pipeline_id) - ); - - let pipeline_renamed_id = this.pipelines_manager.connect( - pipeline_id + "::pipeline-renamed", - (_obj, name) => this.rename_pipeline(pipeline_id, name) - ); - - this.pipelines_map.set(pipeline_id, { - pipeline_group, pipeline_destroyed_id, pipeline_renamed_id - }); - - this.add(pipeline_group); - - // scroll to the bottom of the page - if (scroll_to_bottom) { - this.window.set_visible_page(this); - setTimeout(() => { - const scroll_adjustment = this.get_first_child().get_vadjustment(); - scroll_adjustment.value = scroll_adjustment.get_upper(); - }, 10); - pipeline_group._title.grab_focus(); - } - } - - remove_pipeline(pipeline_id) { - let pipeline_infos = this.pipelines_map.get(pipeline_id); - if (pipeline_infos) { - this.pipelines_manager.disconnect(pipeline_infos.pipeline_destroyed_id); - this.remove(pipeline_infos.pipeline_group); - this.pipelines_map.delete(pipeline_id); - } - } - - rename_pipeline(pipeline_id, name) { - let pipeline_infos = this.pipelines_map.get(pipeline_id); - if (pipeline_infos) - pipeline_infos.pipeline_group.set_title(name.length > 0 ? name : " "); - } - - open_effects_dialog(pipeline_id) { - let dialog = new EffectsDialog(this.pipelines_manager, pipeline_id); - dialog.present(this.window); - } -}); \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/pipelines_management/effect_row.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/pipelines_management/effect_row.js deleted file mode 100644 index 130edfdb..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/pipelines_management/effect_row.js +++ /dev/null @@ -1,222 +0,0 @@ -import Adw from 'gi://Adw'; -import GObject from 'gi://GObject'; -import Gtk from 'gi://Gtk'; -import { gettext as _ } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; - -import { get_supported_effects } from '../../effects/effects.js'; - - -export const EffectRow = GObject.registerClass({ - GTypeName: 'EffectRow', - InternalChildren: [], -}, class EffectRow extends Adw.ExpanderRow { - constructor(effect, effects_dialog) { - super({}); - - this.SUPPORTED_EFFECTS = get_supported_effects(_); - - this.effect = effect; - this.effects_dialog = effects_dialog; - this.pipeline_id = effects_dialog.pipeline_id; - this.pipelines_manager = effects_dialog.pipelines_manager; - - if (effect.type in this.SUPPORTED_EFFECTS) { - this.set_title(this.SUPPORTED_EFFECTS[effect.type].name); - this.set_subtitle(this.SUPPORTED_EFFECTS[effect.type].description); - this.populate_options(); - } - else { - this._warn(`could not assign effect ${effect.type} to its correct name`); - this.set_title(effect.type); - } - - let prefix_bin = new Gtk.Box({ - spacing: 6 - }); - this.add_prefix(prefix_bin); - - let move_bin = new Gtk.Box({ - orientation: Gtk.Orientation.VERTICAL, - 'width-request': 38, - 'height-request': 38, - 'margin-top': 6, - 'margin-bottom': 6 - }); - prefix_bin.append(move_bin); - move_bin.add_css_class('linked'); - - this._move_up_button = new Gtk.Button({ - 'icon-name': 'go-up-symbolic', - 'width-request': 38, - 'height-request': 19 - }); - this._move_down_button = new Gtk.Button({ - 'icon-name': 'go-down-symbolic', - 'width-request': 38, - 'height-request': 19 - }); - this._move_up_button.add_css_class('flat'); - this._move_down_button.add_css_class('flat'); - move_bin.append(this._move_up_button); - move_bin.append(this._move_down_button); - - this._move_up_button.connect('clicked', () => effects_dialog.move_row_by(this, -1)); - this._move_down_button.connect('clicked', () => effects_dialog.move_row_by(this, +1)); - - let remove_button = new Gtk.Button({ - 'icon-name': 'remove-row-symbolic', - 'width-request': 38, - 'height-request': 38, - 'margin-top': 6, - 'margin-bottom': 6, - 'valign': Gtk.Align.CENTER - }); - prefix_bin.append(remove_button); - remove_button.add_css_class('destructive-action'); - - remove_button.connect('clicked', () => effects_dialog.remove_row(this)); - } - - populate_options() { - const editable_params = this.SUPPORTED_EFFECTS[this.effect.type].editable_params; - - if (Object.keys(editable_params).length == 0) - this.enable_expansion = false; - - for (const param_key in editable_params) { - let param = editable_params[param_key]; - let row; - switch (param.type) { - case "integer": - row = new Adw.SpinRow({ - adjustment: new Gtk.Adjustment({ - lower: param.min, - upper: param.max, - step_increment: param.increment - }) - }); - row.adjustment.set_value(this.get_effect_param(param_key)); - row.adjustment.connect( - 'value-changed', () => this.set_effect_param(param_key, row.adjustment.value) - ); - break; - - case "float": - row = new Adw.ActionRow; - let scale = new Gtk.Scale({ - valign: Gtk.Align.CENTER, - hexpand: true, - width_request: 200, - draw_value: true, - value_pos: Gtk.PositionType.RIGHT, - digits: param.digits, - adjustment: new Gtk.Adjustment({ - lower: param.min, - upper: param.max, - step_increment: param.increment, - page_increment: param.big_increment - }) - }); - // TODO check if it's a good idea to set the default parameter, as the "good" - // value really change depending on the user wallpaper... if so, do for dynamic - // blur too - scale.add_mark( - this.get_default_effect_param(param_key), Gtk.PositionType.BOTTOM, null - ); - row.add_suffix(scale); - scale.adjustment.set_value(this.get_effect_param(param_key)); - scale.adjustment.connect( - 'value-changed', () => this.set_effect_param(param_key, scale.adjustment.value) - ); - break; - - case "boolean": - row = new Adw.SwitchRow; - row.set_active(this.get_effect_param(param_key)); - row.connect( - 'notify::active', () => this.set_effect_param(param_key, row.active) - ); - break; - - case "dropdown": - row = new Adw.ComboRow({ model: new Gtk.StringList }); - param.options.forEach(option => row.model.append(option)); - row.selected = this.get_effect_param(param_key); - row.connect( - 'notify::selected', () => this.set_effect_param(param_key, row.selected) - ); - break; - - case "rgba": - row = new Adw.ActionRow; - let color_button = new Gtk.ColorButton({ - valign: Gtk.Align.CENTER, - width_request: 75, - height_request: 45, - show_editor: true, - use_alpha: true - }); - row.add_suffix(color_button); - // set original color - let c = color_button.get_rgba().copy(); - [c.red, c.green, c.blue, c.alpha] = this.get_effect_param(param_key); - color_button.set_rgba(c); - // update on on 'color-set' - color_button.connect( - 'color-set', () => { - let c = color_button.get_rgba(); - this.set_effect_param(param_key, [c.red, c.green, c.blue, c.alpha]); - } - ); - break; - - default: - row = new Adw.ActionRow; - break; - } - row.set_title(param.name); - row.set_subtitle(param.description); - this.add_row(row); - } - } - - get_effect_param(key) { - let effects = this.pipelines_manager.pipelines[this.pipeline_id].effects; - const gsettings_effect = effects.find(e => e.id == this.effect.id); - - if ('params' in gsettings_effect && key in gsettings_effect.params) - return gsettings_effect.params[key]; - else - return this.get_default_effect_param(key); - } - - get_default_effect_param(key) { - return this.SUPPORTED_EFFECTS[this.effect.type].class.default_params[key]; - } - - set_effect_param(key, value) { - // we must pay attention not to change the effects in the pipelines manager before updating - // it in gsettings, else it won't be updated (or every effect will be) - let effects = this.pipelines_manager.pipelines[this.pipeline_id].effects; - const effect_index = effects.findIndex(e => e.id == this.effect.id); - - if (effect_index >= 0) { - effects[effect_index] = { - ...this.effect, params: { ...this.effect.params } - }; - effects[effect_index].params[key] = value; - this.effect = effects[effect_index]; - } - else - this._warn(`effect not found when setting key ${key}`); - - this.pipelines_manager.update_pipeline_effects(this.pipeline_id, effects, false); - } - - _warn(str) { - console.warn( - `[Blur my Shell > effect row] pipeline '${this.pipeline_id}',` - + ` effect '${this.effect.id}': ${str}` - ); - } -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/pipelines_management/effects_dialog.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/pipelines_management/effects_dialog.js deleted file mode 100644 index 222a92e9..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/pipelines_management/effects_dialog.js +++ /dev/null @@ -1,174 +0,0 @@ -import Adw from 'gi://Adw'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Gtk from 'gi://Gtk'; -import Gio from 'gi://Gio'; -import { gettext as _ } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; - -import { EffectRow } from './effect_row.js'; -import { get_effects_groups, get_supported_effects } from '../../effects/effects.js'; - -export const EffectsDialog = GObject.registerClass({ - GTypeName: 'EffectsDialog', - Template: GLib.uri_resolve_relative(import.meta.url, '../../ui/effects-dialog.ui', GLib.UriFlags.NONE), - InternalChildren: [ - "add_effect", - "add_effect_alt_menu", - "effects_list" - ], -}, class EffectsDialog extends Adw.PreferencesDialog { - constructor(pipelines_manager, pipeline_id) { - super({}); - - this.EFFECTS_GROUPS = get_effects_groups(_); - this.SUPPORTED_EFFECTS = get_supported_effects(_); - - this.pipelines_manager = pipelines_manager; - this.pipeline_id = pipeline_id; - - let pipeline = pipelines_manager.pipelines[pipeline_id]; - - this.set_title(pipeline.name.length > 0 ? _(`Effects for "${pipeline.name}"`) : _("Effects")); - - pipeline.effects.forEach(effect => { - const effect_row = new EffectRow(effect, this); - this._effects_list.add(effect_row); - this.update_rows_insensitive_mover(effect_row); - }); - - // setup advanced effects chooser action - this.show_advanced_effects = false; - let action_group = new Gio.SimpleActionGroup(); - this.insert_action_group('effects-dialog', action_group); - let advanced_effects_action = Gio.SimpleAction.new_stateful( - 'advanced-effects-bool', - null, - GLib.Variant.new_boolean(this.show_advanced_effects) - ); - advanced_effects_action.connect( - 'change-state', - (_, state) => { - this.show_advanced_effects = state.get_boolean(); - this.build_effects_chooser(); - advanced_effects_action.set_state(state); - } - ); - action_group.add_action(advanced_effects_action); - - this.build_effects_chooser(); - this._add_effect.connect('clicked', () => this.effects_chooser_dialog.present(this)); - } - - build_effects_chooser() { - this.effects_chooser_dialog = new Adw.Dialog({ - presentation_mode: Adw.DialogPresentationMode.BOTTOM_SHEET, - content_width: 450 - }); - - let page = new Adw.PreferencesPage; - this.effects_chooser_dialog.set_child(page); - - for (const effects_group in this.EFFECTS_GROUPS) { - const group_infos = this.EFFECTS_GROUPS[effects_group]; - - let group = new Adw.PreferencesGroup({ - title: group_infos.name - }); - page.add(group); - - for (const effect_type of group_infos.contains) { - if (!(effect_type in this.SUPPORTED_EFFECTS)) - continue; - - if (!this.show_advanced_effects && this.SUPPORTED_EFFECTS[effect_type].is_advanced) - continue; - - let action_row = new Adw.ActionRow({ - title: this.SUPPORTED_EFFECTS[effect_type].name, - subtitle: this.SUPPORTED_EFFECTS[effect_type].description - }); - let select_button = new Gtk.Button({ - 'icon-name': 'select-row-symbolic', - 'width-request': 38, - 'height-request': 38, - 'margin-top': 6, - 'margin-bottom': 6 - }); - group.add(action_row); - - select_button.add_css_class('flat'); - action_row.add_suffix(select_button); - action_row.set_activatable_widget(select_button); - select_button.connect('clicked', () => { - this.append_effect(effect_type); - this.effects_chooser_dialog.close(); - }); - } - } - } - - append_effect(effect_type) { - const effect = { - type: effect_type, id: "effect_" + ("" + Math.random()).slice(2, 16) - }; - this.pipelines_manager.update_pipeline_effects( - this.pipeline_id, - [...this.pipelines_manager.pipelines[this.pipeline_id].effects, effect] - ); - - const effect_row = new EffectRow(effect, this); - this._effects_list.add(effect_row); - this.move_row_by(effect_row, 0); - this.update_rows_insensitive_mover(effect_row); - } - - move_row_by(row, number) { - const effects = this.pipelines_manager.pipelines[this.pipeline_id].effects; - const effect_index = effects.findIndex(e => e.id == row.effect.id); - - if (effect_index >= 0) { - effects.splice(effect_index, 1); - effects.splice(effect_index + number, 0, row.effect); - - const listbox = row.get_parent(); - listbox.set_sort_func((row_a, row_b) => { - const id_a = effects.findIndex(e => e.id == row_a.effect.id); - const id_b = effects.findIndex(e => e.id == row_b.effect.id); - return id_a > id_b; - }); - - this.update_rows_insensitive_mover(row); - - this.pipelines_manager.update_pipeline_effects( - this.pipeline_id, effects - ); - } - } - - update_rows_insensitive_mover(any_row) { - if (this._insensitive_top) - this._insensitive_top.set_sensitive(true); - if (this._insensitive_bottom) - this._insensitive_bottom.set_sensitive(true); - - const listbox = any_row.get_parent(); - this._insensitive_top = listbox.get_first_child()._move_up_button; - this._insensitive_top?.set_sensitive(false); - this._insensitive_bottom = listbox.get_last_child()._move_down_button; - this._insensitive_bottom?.set_sensitive(false); - } - - remove_row(row) { - const effects = this.pipelines_manager.pipelines[this.pipeline_id].effects; - const effect_index = effects.findIndex(e => e.id == row.effect.id); - - if (effect_index >= 0) { - effects.splice(effect_index, 1); - this.pipelines_manager.update_pipeline_effects( - this.pipeline_id, effects - ); - } - - this._effects_list.remove(row); - } -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/pipelines_management/pipeline_choose_row.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/pipelines_management/pipeline_choose_row.js deleted file mode 100644 index e0c51658..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/pipelines_management/pipeline_choose_row.js +++ /dev/null @@ -1,106 +0,0 @@ -import Adw from 'gi://Adw'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Gtk from 'gi://Gtk'; -import { gettext as _ } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; - - -export const PipelineChooseRow = GObject.registerClass({ - GTypeName: 'PipelineChooseRow', - Template: GLib.uri_resolve_relative(import.meta.url, '../../ui/pipeline-choose-row.ui', GLib.UriFlags.NONE), - InternalChildren: [ - 'pipeline_choose', - 'pipeline_model', - 'pipeline_edit' - ], -}, class PipelineChooseRow extends Adw.ActionRow { - initialize(preferences, pipelines_manager, pipelines_page) { - this.preferences = preferences; - this.pipelines_manager = pipelines_manager; - this.pipelines_page = pipelines_page; - - this.create_pipelines_list(); - - // display the correct pipeline name in the drop-down instead of their ids - const closure_func = string_object => { - const pipeline_id = string_object.get_string(); - if (pipeline_id == 'create_new') - return _("Create new pipeline"); - if (pipeline_id in this.pipelines_manager.pipelines) - return this.pipelines_manager.pipelines[pipeline_id].name; - else - return ""; - }; - - const expression = new Gtk.ClosureExpression(GObject.TYPE_STRING, closure_func, []); - this._pipeline_choose.expression = expression; - - // TODO fix the expression not being re-evaluated other than by setting it again - this.pipelines_manager.connect( - 'pipeline-names-changed', - () => this._pipeline_choose.expression = new Gtk.ClosureExpression( - GObject.TYPE_STRING, closure_func, [] - ) - ); - - this.preferences.PIPELINE_changed(() => this.on_settings_pipeline_changed()); - - this.pipelines_manager.connect('pipeline-list-changed', () => this.create_pipelines_list()); - - this._pipeline_choose.connect('notify::selected', () => this.on_selected_pipeline_changed()); - - this._pipeline_edit.connect( - 'clicked', - () => this.pipelines_page.open_effects_dialog(this.preferences.PIPELINE) - ); - } - - on_selected_pipeline_changed() { - if (!this._pipeline_choose.selected_item || this._is_creating_pipelines_list) - return; - - const pipeline_id = this._pipeline_choose.selected_item.get_string(); - if (pipeline_id == 'create_new') { - const id = this.pipelines_manager.create_pipeline(_("New pipeline")); - this.preferences.PIPELINE = id; - } - else - this.preferences.PIPELINE = pipeline_id; - } - - on_settings_pipeline_changed() { - for (let i = 0; i < this._pipeline_model.n_items; i++) { - const pipeline_id = this._pipeline_model.get_string(i); - // if we have more pipelines than we should have: rebuild... - // that is the case when resetting the preferences for example - if (!(pipeline_id in this.pipelines_manager)) { - this.create_pipelines_list(); - return; - } - if (pipeline_id == this.preferences.PIPELINE) - this._pipeline_choose.set_selected(i); - } - } - - create_pipelines_list() { - // prevent the pipeline selector from being updated while re-creating the list - this._is_creating_pipelines_list = true; - - // remove ancient items - this._pipeline_model.splice(0, this._pipeline_model.n_items, null); - - // add new ones - let i = 0; - for (let pipeline_id in this.pipelines_manager.pipelines) { - this._pipeline_model.append(pipeline_id); - if (pipeline_id == this.preferences.PIPELINE) - this._pipeline_choose.set_selected(i); - i++; - } - this._pipeline_model.append('create_new'); - - // now update the drop-down selector - this._is_creating_pipelines_list = false; - this.on_selected_pipeline_changed(); - } -}); \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/pipelines_management/pipeline_group.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/pipelines_management/pipeline_group.js deleted file mode 100644 index 627b5760..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/preferences/pipelines_management/pipeline_group.js +++ /dev/null @@ -1,99 +0,0 @@ -import Adw from 'gi://Adw'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Gtk from 'gi://Gtk'; -import { gettext as _ } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; - -import { get_supported_effects } from '../../effects/effects.js'; - - -export const PipelineGroup = GObject.registerClass({ - GTypeName: 'PipelineGroup', - Template: GLib.uri_resolve_relative(import.meta.url, '../../ui/pipeline-group.ui', GLib.UriFlags.NONE), - InternalChildren: [ - "title", - "effects_description_row", - "manage_effects" - ], -}, class PipelineGroup extends Adw.PreferencesGroup { - constructor(pipelines_manager, pipeline_id, pipeline, pipelines_page) { - super({}); - - this.SUPPORTED_EFFECTS = get_supported_effects(_); - - this._pipelines_manager = pipelines_manager; - this._pipelines_page = pipelines_page; - this._pipeline_id = pipeline_id; - - // set the description - this.set_description(_(`Pipeline id: "${pipeline_id}"`)); - - // set the title and connect it to the text entry - this.set_title(pipeline.name.length > 0 ? pipeline.name : " "); - this._title.set_text(pipeline.name); - this._title.connect( - 'changed', - () => pipelines_manager.rename_pipeline(pipeline_id, this._title.get_text()) - ); - - // the bin containing the actions - let prefix_bin = new Gtk.Box; - prefix_bin.add_css_class('linked'); - this._title.add_prefix(prefix_bin); - - // add a 'remove' button if we are not the default pipeline - if (pipeline_id != "pipeline_default") { - let remove_button = new Gtk.Button({ - 'icon-name': 'remove-row-symbolic', - 'width-request': 38, - 'height-request': 38, - 'margin-top': 6, - 'margin-bottom': 6 - }); - remove_button.add_css_class('destructive-action'); - prefix_bin.append(remove_button); - remove_button.connect('clicked', () => pipelines_manager.delete_pipeline(pipeline_id)); - } - // add a 'duplicate' button - let duplicate_button = new Gtk.Button({ - 'icon-name': 'duplicate-row-symbolic', - 'width-request': 38, - 'height-request': 38, - 'margin-top': 6, - 'margin-bottom': 6 - }); - prefix_bin.append(duplicate_button); - duplicate_button.connect('clicked', () => pipelines_manager.duplicate_pipeline(pipeline_id)); - - this.update_effects_description_row(); - this._pipelines_manager.connect( - pipeline_id + '::pipeline-updated', - () => this.update_effects_description_row() - ); - - this._manage_effects.connect( - 'clicked', - () => pipelines_page.open_effects_dialog(pipeline_id) - ); - } - - update_effects_description_row() { - const effects = this._pipelines_manager.pipelines[this._pipeline_id].effects; - - if (effects.length == 0) - this._effects_description_row.set_title(_("No effect")); - else if (effects.length == 1) - this._effects_description_row.set_title(_("1 effect")); - else - this._effects_description_row.set_title(_(`${effects.length} effects`)); - - let subtitle = ""; - effects.forEach(effect => { - if (effect.type in this.SUPPORTED_EFFECTS) - subtitle += _(`${this.SUPPORTED_EFFECTS[effect.type].name}, `); - else - subtitle += _("Unknown effect, "); - }); - this._effects_description_row.set_subtitle(subtitle.slice(0, -2)); - } -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/prefs.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/prefs.js deleted file mode 100644 index d90bdda1..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/prefs.js +++ /dev/null @@ -1,51 +0,0 @@ -import Gdk from 'gi://Gdk'; -import Gtk from 'gi://Gtk'; -import { ExtensionPreferences } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; - -import { update_from_old_settings } from './conveniences/settings_updater.js'; -import { PipelinesManager } from './conveniences/pipelines_manager.js'; -import { Settings } from './conveniences/settings.js'; -import { KEYS } from './conveniences/keys.js'; - -import { addMenu } from './preferences/menu.js'; -import { Pipelines } from './preferences/pipelines.js'; -import { Panel } from './preferences/panel.js'; -import { Overview } from './preferences/overview.js'; -import { Dash } from './preferences/dash.js'; -import { Applications } from './preferences/applications.js'; -import { Other } from './preferences/other.js'; - -import './preferences/pipelines_management/pipeline_choose_row.js'; - - -export default class BlurMyShellPreferences extends ExtensionPreferences { - constructor(metadata) { - super(metadata); - - // load the icon theme - let iconPath = this.dir.get_child("icons").get_path(); - let iconTheme = Gtk.IconTheme.get_for_display(Gdk.Display.get_default()); - iconTheme.add_search_path(iconPath); - } - - fillPreferencesWindow(window) { - addMenu(window); - - // update from old settings, very important for hacks level specifically - update_from_old_settings(this.getSettings()); - - const preferences = new Settings(KEYS, this.getSettings()); - const pipelines_manager = new PipelinesManager(preferences); - - const pipelines_page = new Pipelines(preferences, pipelines_manager, window); - - window.add(pipelines_page); - window.add(new Panel(preferences, pipelines_manager, pipelines_page)); - window.add(new Overview(preferences, pipelines_manager, pipelines_page)); - window.add(new Dash(preferences, pipelines_manager, pipelines_page)); - window.add(new Applications(preferences, window)); - window.add(new Other(preferences, pipelines_manager, pipelines_page)); - - window.search_enabled = true; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/private_metadata.json b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/private_metadata.json deleted file mode 100644 index 582a13f1..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/private_metadata.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "_generated": "Generated by SweetTooth, do not edit", - "description": "Adds a blur look to different parts of the GNOME Shell, including the top panel, dash and overview.\n\nYou can support my work by sponsoring me on:\n- github: https://github.com/sponsors/aunetx\n- ko-fi: https://ko-fi.com/aunetx\n\nIf you use Ubuntu, you may want to change the radius of the corner effect for Dash-to-Dock in preferences, else you may see unpleasantly mixed radii in your dock.\n\nNote: if the extension shows an error after updating, please make sure to restart your session to see if it persists. This is due to a bug in gnome shell, which I can't fix by myself.", - "donations": { - "github": "aunetx", - "kofi": "aunetx" - }, - "gettext-domain": "blur-my-shell@aunetx", - "name": "Blur my Shell", - "original-authors": [ - "me@aunetx.dev" - ], - "session-modes": [ - "unlock-dialog", - "user" - ], - "settings-schema": "org.gnome.shell.extensions.blur-my-shell", - "shell-version": [ - "46", - "47" - ], - "url": "https://github.com/aunetx/blur-my-shell", - "uuid": "blur-my-shell@aunetx", - "version": 67 -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/schemas/gschemas.compiled b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/schemas/gschemas.compiled deleted file mode 100644 index 6f781f41..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/schemas/gschemas.compiled and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/schemas/org.gnome.shell.extensions.blur-my-shell.gschema.xml b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/schemas/org.gnome.shell.extensions.blur-my-shell.gschema.xml deleted file mode 100644 index 5708ca36..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/schemas/org.gnome.shell.extensions.blur-my-shell.gschema.xml +++ /dev/null @@ -1,585 +0,0 @@ - - - - - - - 1 - The version of the settings to update from. - - - - , - 'effects': <[ - <{ - 'type': <'native_static_gaussian_blur'>, - 'id': <'effect_000000000000'>, - 'params': <{ - 'radius': <30>, - 'brightness': <0.6> - }> - }> - ]> - }, - 'pipeline_default_rounded': { - 'name': <'Default rounded'>, - 'effects': <[ - <{ - 'type': <'native_static_gaussian_blur'>, - 'id': <'effect_000000000001'>, - 'params': <{ - 'radius': <30>, - 'brightness': <0.6> - }> - }>, - <{ - 'type': <'corner'>, - 'id': <'effect_000000000002'>, - 'params': <{ - 'radius': <24> - }> - }> - ]> - } - } - ]]> - A dictionnary describing the different pipelines and their effects. - - - - 30 - Global gaussian sigma to use - - - - 0.6 - Global brightness to use - - - - (0.,0.,0.,0.) - Color to mix with the blur effect - - - - 0. - Amount of noise to add to the blur effect - - - - 0. - Lightness of the noise added to the blur effect - - - - true - Boolean, controls wether or not the color and noise effects are in use globally - - - - 1 - Level of hacks to use (from 0 to 2, 2 disabling clipped redraws entirely) - - - - false - Boolean, set to true to activate debug mode (more verbose journalctl logs) - - - - - - - - - - - - - - - - - - - - true - Boolean, whether to blur activate the blur for this component or not - - - - "pipeline_default" - String, the name of the pipeline to use. It must exist, else "pipeline_default" will be used - - - - false - Boolean, whether to customize the blur effect sigma/brightness or use general values - - - - 30 - Gaussian sigma to use for the blur effect - - - - 0.6 - Brightness to use for the blur effect - - - - (0.,0.,0.,0.) - Color to mix with the blur effect - - - - 0. - Amount of noise to add to the blur effect - - - - 0. - Lightness of the noise added to the blur effect - - - - 1 - Enum to select the style of the components in overview (0 not styled, 1 light, 2 dark, 3 transparent) - - - - - - - - true - Boolean, whether to blur activate the blur for this component or not - - - - false - Boolean, whether to customize the blur effect sigma/brightness or use general values - - - - 30 - Gaussian sigma to use for the blur effect - - - - 0.6 - Brightness to use for the blur effect - - - - (0.,0.,0.,0.) - Color to mix with the blur effect - - - - 0. - Amount of noise to add to the blur effect - - - - 0. - Lightness of the noise added to the blur effect - - - - 1 - Enum to select the style of the appfolder dialogs (0 not styled, 1 transparent, 2 light, 3 dark) - - - - - - - - true - Boolean, whether to blur activate the blur for this component or not - - - - "pipeline_default" - String, the name of the pipeline to use. It must exist, else "pipeline_default" will be used - - - - false - Boolean, whether to customize the blur effect sigma/brightness or use general values - - - - 30 - Gaussian sigma to use for the blur effect - - - - 0.6 - Brightness to use for the blur effect - - - - (0.,0.,0.,0.) - Color to mix with the blur effect - - - - 0. - Amount of noise to add to the blur effect - - - - 0. - Lightness of the noise added to the blur effect - - - - true - Boolean, whether to use a static or dynamic blur for this component - - - - true - Boolean, whether to disable blur from this component when opening the overview or not - - - - false - Boolean, whether or not to force the panel to have light text, useful when using light theme - - - - true - Boolean, whether to override the background or not - - - - 0 - Enum to select the style of the panel (0 transparent, 1 light, 2 dark, 3 contrasted) - - - - false - Boolean, whether to disable blur from this component when a window is close to the panel - - - - - - - - true - Boolean, whether to blur activate the blur for this component or not - - - - "pipeline_default_rounded" - String, the name of the pipeline to use. It must exist, else "pipeline_default" will be used - - - - false - Boolean, whether to customize the blur effect sigma/brightness or use general values - - - - 30 - Gaussian sigma to use for the blur effect - - - - 0.6 - Brightness to use for the blur effect - - - - (0.,0.,0.,0.) - Color to mix with the blur effect - - - - 0. - Amount of noise to add to the blur effect - - - - 0. - Lightness of the noise added to the blur effect - - - - true - Boolean, whether to use static or dynamic blur for this component - - - - true - Boolean, whether to override the background or not - - - - 0 - Enum to select the style of dash to dock (0 transparent, 1 light, 2 dark) - - - - false - Boolean, whether to disable blur from this component when opening the overview or not - - - - 12 - Radius for the corner rounding effect - - - - - - - - false - Boolean, whether to blur activate the blur for this component or not - - - - true - Boolean, whether to customize the blur effect sigma/brightness or use general values - - - - 30 - Gaussian sigma to use for the blur effect - - - - 1. - Brightness to use for the blur effect - - - - (0.,0.,0.,0.) - Color to mix with the blur effect - - - - 0. - Amount of noise to add to the blur effect - - - - 0. - Lightness of the noise added to the blur effect - - - - 215 - Opacity of the window actor on top of the blur effect - - - - true - Wether or not to make the focused window opaque - - - - false - Wether or not to blur applications on the overview - - - - false - Wether or not to blur all applications by default - - - - [] - List of applications to blur - - - - ["Plank","com.desktop.ding", "Conky"] - List of applications not to blur - - - - - - - - true - Boolean, whether to blur activate the blur for this component or not - - - - "pipeline_default" - String, the name of the pipeline to use. It must exist, else "pipeline_default" will be used - - - - false - Boolean, whether to customize the blur effect sigma/brightness or use general values - - - - 30 - Gaussian sigma to use for the blur effect - - - - 0.6 - Brightness to use for the blur effect - - - - (0.,0.,0.,0.) - Color to mix with the blur effect - - - - 0. - Amount of noise to add to the blur effect - - - - 0. - Lightness of the noise added to the blur effect - - - - - - - - true - Boolean, whether to blur activate the blur for this component or not - - - - "pipeline_default" - String, the name of the pipeline to use. It must exist, else "pipeline_default" will be used - - - - false - Boolean, whether to customize the blur effect sigma/brightness or use general values - - - - 30 - Gaussian sigma to use for the blur effect - - - - 0.6 - Brightness to use for the blur effect - - - - (0.,0.,0.,0.) - Color to mix with the blur effect - - - - 0. - Amount of noise to add to the blur effect - - - - 0. - Lightness of the noise added to the blur effect - - - - - - - - true - Boolean, whether to blur activate the blur for this component or not - - - - "pipeline_default" - String, the name of the pipeline to use. It must exist, else "pipeline_default" will be used - - - - false - Boolean, whether to customize the blur effect sigma/brightness or use general values - - - - 30 - Gaussian sigma to use for the blur effect - - - - 0.6 - Brightness to use for the blur effect - - - - (0.,0.,0.,0.) - Color to mix with the blur effect - - - - 0. - Amount of noise to add to the blur effect - - - - 0. - Lightness of the noise added to the blur effect - - - - - - - - true - Boolean, whether to blur activate the blur for this component or not - - - - "pipeline_default" - String, the name of the pipeline to use. It must exist, else "pipeline_default" will be used - - - - - - - - false - Boolean, whether to try compatibility with hidetopbar@mathieu.bidon.ca or not - - - - - - - - true - Boolean, whether to blur the original panel (if option selected) with Dash to Panel - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/stylesheet.css b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/stylesheet.css deleted file mode 100644 index b61e5305..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/stylesheet.css +++ /dev/null @@ -1,573 +0,0 @@ -/*** PANEL ***/ - -/* -* `.transparent-panel` -*/ -#panel.transparent-panel { - background: transparent; - transition-duration: 500ms; -} - -/* -* `.dark-panel` -*/ -#panel.dark-panel { - background-color: rgba(100, 100, 100, 0.35); - box-shadow: none; - transition-duration: 500ms; -} - -/* -* `.light-panel` -*/ -#panel.light-panel { - background-color: rgba(200, 200, 200, 0.2); - box-shadow: none; - transition-duration: 500ms; -} - -/* -* `.contrasted-panel` -*/ -#panel.contrasted-panel { - background-color: transparent; - box-shadow: none; - transition-duration: 500ms; -} - -.contrasted-panel .panel-button, -.contrasted-panel .clock, -.contrasted-panel .clock-display StIcon { - color: #ffffff; - border-radius: 14px; - border: 3px solid transparent; - background-color: rgba(0, 0, 0, 0.8); - box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03); -} - - -.contrasted-panel .clock-display StIcon { - padding: 8px; - margin: 0; -} - -.contrasted-panel .panel-button:hover, -.contrasted-panel .panel-button:hover .clock { - color: #ffffff; - background-color: rgba(0, 0, 0, 0.8); -} - -.contrasted-panel .clock-display { - background-color: transparent !important; - box-shadow: none !important; - border: none !important; -} - -.contrasted-panel .clock { - margin: 0 !important; -} - - -/*** DASH-TO-DOCK ***/ - -/* -* `.transparent-dash` -*/ -.transparent-dash .dash-background { - background-color: transparent !important; -} - -/* -* `.light-dash` -*/ -.light-dash .dash-background { - background-color: rgba(200, 200, 200, 0.2) !important; -} - -/* -* `.dark-dash` -*/ -.dark-dash .dash-background { - background-color: rgba(100, 100, 100, 0.35) !important; -} - - -/*** OVERVIEW ***/ - -/* -* Add transparency to the workspace animation (between workspaces) -*/ -.blurred-overview .workspace-animation { - background-color: transparent !important; -} - - -/* -* `.overview-components-transparent` -*/ - -.overview-components-transparent .workspace-thumbnail { - border: 1px solid rgba(100, 100, 100, 0.35); -} - -.overview-components-transparent .search-entry { - color: white; - background-color: rgba(0, 0, 0, 0); - border-color: transparent; - box-shadow: none; -} - -.overview-components-transparent .search-entry .search-entry-icon { - color: rgba(255, 255, 255, 0.65); -} - -.overview-components-transparent .overview-tile, -.overview-components-transparent .overview-icon, -.overview-components-transparent .grid-search-result, -.overview-components-transparent .list-search-result, -.overview-components-transparent .search-provider-icon, -/* prevents the extension from interfering with Just Perfection */ -.overview-components-transparent.just-perfection .search-section-content, -/* remove the rectangular background from the dash */ -.overview-components-transparent #dash .overview-tile, -.overview-components-transparent #dashtopanelScrollview .overview-tile { - background-color: transparent; -} - -.overview-components-transparent .workspace-thumbnail, -.overview-components-transparent .search-section-content, -.overview-components-transparent .overview-tile.app-folder, -.overview-components-transparent .page-navigation-arrow, -.overview-components-transparent .app-folder-dialog .icon-button, -/* this shouldn't apply to Dash to Dock */ -.overview-components-transparent StBoxLayout>StWidget>#dash>.dash-background { - background-color: rgba(0, 0, 0, 0); -} - -.overview-components-transparent .overview-tile:hover, -.overview-components-transparent .overview-tile:focus, -.overview-components-transparent .overview-tile:selected, -.overview-components-transparent .overview-tile:highlighted, -.overview-components-transparent .grid-search-result:hover, -.overview-components-transparent .grid-search-result:focus, -.overview-components-transparent .grid-search-result:selected, -.overview-components-transparent .grid-search-result:highlighted, -.overview-components-transparent .list-search-result:hover, -.overview-components-transparent .list-search-result:focus, -.overview-components-transparent .list-search-result:selected, -.overview-components-transparent .list-search-result:highlighted, -.overview-components-transparent .search-provider-icon:hover, -.overview-components-transparent .search-provider-icon:focus, -.overview-components-transparent .page-navigation-arrow:hover, -.overview-components-transparent .page-navigation-arrow:focus, -.overview-components-transparent .app-folder-dialog .icon-button:hover, -.overview-components-transparent .app-folder-dialog .icon-button:focus, -.overview-components-transparent #dash .overview-tile:hover .overview-icon, -.overview-components-transparent #dash .overview-tile:focus .overview-icon, -.overview-components-transparent #dash .show-apps:hover .overview-icon, -.overview-components-transparent #dash .show-apps:focus .overview-icon { - background-color: rgba(230, 230, 230, 0.08); -} - -.overview-components-transparent .overview-tile:active, -.overview-components-transparent .overview-tile:focus:hover, -.overview-components-transparent .overview-tile:drop, -.overview-components-transparent .overview-tile:selected:hover, -.overview-components-transparent .overview-tile:highlighted:hover, -.overview-components-transparent .grid-search-result:active, -.overview-components-transparent .grid-search-result:focus:hover, -.overview-components-transparent .grid-search-result:selected:hover, -.overview-components-transparent .grid-search-result:highlighted:hover, -.overview-components-transparent .list-search-result:active, -.overview-components-transparent .list-search-result:focus:hover, -.overview-components-transparent .list-search-result:selected:hover, -.overview-components-transparent .list-search-result:highlighted:hover, -.overview-components-transparent .search-provider-icon:active, -.overview-components-transparent .search-provider-icon:focus:hover, -.overview-components-transparent .page-navigation-arrow:active, -.overview-components-transparent .page-navigation-arrow:focus:hover, -.overview-components-transparent .app-folder-dialog .icon-button:active, -.overview-components-transparent .app-folder-dialog .icon-button:focus:hover, -.overview-components-transparent #dash .overview-tile:active .overview-icon, -.overview-components-transparent #dash .overview-tile:focus:hover .overview-icon, -.overview-components-transparent #dash .overview-tile:drop .overview-icon, -.overview-components-transparent #dash .show-apps:checked .overview-icon { - background-color: rgba(230, 230, 230, 0.12); -} - -.overview-components-transparent .overview-tile:focus:active, -.overview-components-transparent .overview-tile:selected:active, -.overview-components-transparent .overview-tile:highlighted:active, -.overview-components-transparent .grid-search-result:focus:active, -.overview-components-transparent .grid-search-result:selected:active, -.overview-components-transparent .grid-search-result:highlighted:active, -.overview-components-transparent .list-search-result:focus:active, -.overview-components-transparent .list-search-result:selected:active, -.overview-components-transparent .list-search-result:highlighted:active, -.overview-components-transparent .search-provider-icon:focus:active, -.overview-components-transparent .page-navigation-arrow:focus:active, -.overview-components-transparent .app-folder-dialog .icon-button:focus:active, -.overview-components-transparent #dash .show-apps:checked .overview-icon:hover { - background-color: rgba(230, 230, 230, 0.15); -} - - -/* -* `.overview-components-light` -*/ - -.overview-components-light .search-entry { - color: white; - background-color: rgba(200, 200, 200, 0.2); - border-color: transparent; - box-shadow: none; -} - -.overview-components-light .search-entry .search-entry-icon { - color: rgba(255, 255, 255, 0.65); -} - -.overview-components-light .overview-tile, -.overview-components-light .overview-icon, -.overview-components-light .grid-search-result, -.overview-components-light .list-search-result, -.overview-components-light .search-provider-icon, -/* prevents the extension from interfering with Just Perfection */ -.overview-components-light.just-perfection .search-section-content, -/* remove the rectangular background from the dash */ -.overview-components-light #dash .overview-tile, -.overview-components-light #dashtopanelScrollview .overview-tile { - background-color: transparent; -} - -.overview-components-light .workspace-thumbnail, -.overview-components-light .search-section-content, -.overview-components-light .overview-tile.app-folder, -.overview-components-light .page-navigation-arrow, -.overview-components-light .app-folder-dialog .icon-button, -/* this shouldn't apply to Dash to Dock */ -.overview-components-light StBoxLayout>StWidget>#dash>.dash-background { - background-color: rgba(200, 200, 200, 0.2); -} - -.overview-components-light .overview-tile:hover, -.overview-components-light .overview-tile:focus, -.overview-components-light .overview-tile:selected, -.overview-components-light .overview-tile:highlighted, -.overview-components-light .grid-search-result:hover, -.overview-components-light .grid-search-result:focus, -.overview-components-light .grid-search-result:selected, -.overview-components-light .grid-search-result:highlighted, -.overview-components-light .list-search-result:hover, -.overview-components-light .list-search-result:focus, -.overview-components-light .list-search-result:selected, -.overview-components-light .list-search-result:highlighted, -.overview-components-light .search-provider-icon:hover, -.overview-components-light .search-provider-icon:focus, -.overview-components-light .page-navigation-arrow:hover, -.overview-components-light .page-navigation-arrow:focus, -.overview-components-light .app-folder-dialog .icon-button:hover, -.overview-components-light .app-folder-dialog .icon-button:focus, -.overview-components-light #dash .overview-tile:hover .overview-icon, -.overview-components-light #dash .overview-tile:focus .overview-icon, -.overview-components-light #dash .show-apps:hover .overview-icon, -.overview-components-light #dash .show-apps:focus .overview-icon { - background-color: rgba(230, 230, 230, 0.2); -} - -.overview-components-light .overview-tile:active, -.overview-components-light .overview-tile:focus:hover, -.overview-components-light .overview-tile:drop, -.overview-components-light .overview-tile:selected:hover, -.overview-components-light .overview-tile:highlighted:hover, -.overview-components-light .grid-search-result:active, -.overview-components-light .grid-search-result:focus:hover, -.overview-components-light .grid-search-result:selected:hover, -.overview-components-light .grid-search-result:highlighted:hover, -.overview-components-light .list-search-result:active, -.overview-components-light .list-search-result:focus:hover, -.overview-components-light .list-search-result:selected:hover, -.overview-components-light .list-search-result:highlighted:hover, -.overview-components-light .search-provider-icon:active, -.overview-components-light .search-provider-icon:focus:hover, -.overview-components-light .page-navigation-arrow:active, -.overview-components-light .page-navigation-arrow:focus:hover, -.overview-components-light .app-folder-dialog .icon-button:active, -.overview-components-light .app-folder-dialog .icon-button:focus:hover, -.overview-components-light #dash .overview-tile:active .overview-icon, -.overview-components-light #dash .overview-tile:focus:hover .overview-icon, -.overview-components-light #dash .overview-tile:drop .overview-icon, -.overview-components-light #dash .show-apps:checked .overview-icon { - background-color: rgba(230, 230, 230, 0.25); -} - -.overview-components-light .overview-tile:focus:active, -.overview-components-light .overview-tile:selected:active, -.overview-components-light .overview-tile:highlighted:active, -.overview-components-light .grid-search-result:focus:active, -.overview-components-light .grid-search-result:selected:active, -.overview-components-light .grid-search-result:highlighted:active, -.overview-components-light .list-search-result:focus:active, -.overview-components-light .list-search-result:selected:active, -.overview-components-light .list-search-result:highlighted:active, -.overview-components-light .search-provider-icon:focus:active, -.overview-components-light .page-navigation-arrow:focus:active, -.overview-components-light .app-folder-dialog .icon-button:focus:active, -.overview-components-light #dash .show-apps:checked .overview-icon:hover { - background-color: rgba(230, 230, 230, 0.3); -} - - -/* -* `.overview-components-dark` -*/ - -.overview-components-dark .search-entry { - color: white; - background-color: rgba(100, 100, 100, 0.35); - border-color: transparent; - box-shadow: none; -} - -.overview-components-dark .search-entry .search-entry-icon { - color: rgba(255, 255, 255, 0.65); -} - -.overview-components-dark .overview-tile, -.overview-components-dark .overview-icon, -.overview-components-dark .grid-search-result, -.overview-components-dark .list-search-result, -.overview-components-dark .search-provider-icon, -/* prevents the extension from interfering with Just Perfection */ -.overview-components-dark.just-perfection .search-section-content, -/* remove the rectangular background from the dash */ -.overview-components-dark #dash .overview-tile, -.overview-components-dark #dashtopanelScrollview .overview-tile { - background-color: transparent; -} - -.overview-components-dark .workspace-thumbnail, -.overview-components-dark .search-section-content, -.overview-components-dark .overview-tile.app-folder, -.overview-components-dark .page-navigation-arrow, -.overview-components-dark .app-folder-dialog .icon-button, -/* this shouldn't apply to Dash to Dock */ -.overview-components-dark StBoxLayout>StWidget>#dash>.dash-background { - background-color: rgba(100, 100, 100, 0.35); -} - -.overview-components-dark .overview-tile:hover, -.overview-components-dark .overview-tile:focus, -.overview-components-dark .overview-tile:selected, -.overview-components-dark .overview-tile:highlighted, -.overview-components-dark .grid-search-result:hover, -.overview-components-dark .grid-search-result:focus, -.overview-components-dark .grid-search-result:selected, -.overview-components-dark .grid-search-result:highlighted, -.overview-components-dark .list-search-result:hover, -.overview-components-dark .list-search-result:focus, -.overview-components-dark .list-search-result:selected, -.overview-components-dark .list-search-result:highlighted, -.overview-components-dark .search-provider-icon:hover, -.overview-components-dark .search-provider-icon:focus, -.overview-components-dark .page-navigation-arrow:hover, -.overview-components-dark .page-navigation-arrow:focus, -.overview-components-dark .app-folder-dialog .icon-button:hover, -.overview-components-dark .app-folder-dialog .icon-button:focus, -.overview-components-dark #dash .overview-tile:hover .overview-icon, -.overview-components-dark #dash .overview-tile:focus .overview-icon, -.overview-components-dark #dash .show-apps:hover .overview-icon, -.overview-components-dark #dash .show-apps:focus .overview-icon { - background-color: rgba(120, 120, 120, 0.35); -} - -.overview-components-dark .overview-tile:active, -.overview-components-dark .overview-tile:focus:hover, -.overview-components-dark .overview-tile:drop, -.overview-components-dark .overview-tile:selected:hover, -.overview-components-dark .overview-tile:highlighted:hover, -.overview-components-dark .grid-search-result:active, -.overview-components-dark .grid-search-result:focus:hover, -.overview-components-dark .grid-search-result:selected:hover, -.overview-components-dark .grid-search-result:highlighted:hover, -.overview-components-dark .list-search-result:active, -.overview-components-dark .list-search-result:focus:hover, -.overview-components-dark .list-search-result:selected:hover, -.overview-components-dark .list-search-result:highlighted:hover, -.overview-components-dark .search-provider-icon:active, -.overview-components-dark .search-provider-icon:focus:hover, -.overview-components-dark .page-navigation-arrow:active, -.overview-components-dark .page-navigation-arrow:focus:hover, -.overview-components-dark .app-folder-dialog .icon-button:active, -.overview-components-dark .app-folder-dialog .icon-button:focus:hover, -.overview-components-dark #dash .overview-tile:active .overview-icon, -.overview-components-dark #dash .overview-tile:focus:hover .overview-icon, -.overview-components-dark #dash .overview-tile:drop .overview-icon, -.overview-components-dark #dash .show-apps:checked .overview-icon { - background-color: rgba(120, 120, 120, 0.4); -} - -.overview-components-dark .overview-tile:focus:active, -.overview-components-dark .overview-tile:selected:active, -.overview-components-dark .overview-tile:highlighted:active, -.overview-components-dark .grid-search-result:focus:active, -.overview-components-dark .grid-search-result:selected:active, -.overview-components-dark .grid-search-result:highlighted:active, -.overview-components-dark .list-search-result:focus:active, -.overview-components-dark .list-search-result:selected:active, -.overview-components-dark .list-search-result:highlighted:active, -.overview-components-dark .search-provider-icon:focus:active, -.overview-components-dark .page-navigation-arrow:focus:active, -.overview-components-dark .app-folder-dialog .icon-button:focus:active, -.overview-components-dark #dash .show-apps:checked .overview-icon:hover { - background-color: rgba(120, 120, 120, 0.45); -} - - -/*** APPFOLDER DIALOG ***/ - -/* -* `.appfolder-dialogs-transparent` -*/ - -.appfolder-dialogs-transparent { - background-color: rgba(0, 0, 0, 0); - border: none; - box-shadow: none; -} - -.appfolder-dialogs-transparent .folder-name-entry { - color: white; - background-color: rgba(0, 0, 0, 0); - border: 0; - box-shadow: none; -} - -/* -* `.appfolder-dialogs-light` -*/ - -.appfolder-dialogs-light { - background-color: rgba(200, 200, 200, 0.2); - border: none; - box-shadow: none; -} - -.appfolder-dialogs-light .folder-name-entry { - color: white; - background-color: rgba(200, 200, 200, 0.2); - border: 0; - box-shadow: none; -} - - -/* -* `.appfolder-dialogs-dark` -*/ - -.appfolder-dialogs-dark { - background-color: rgba(100, 100, 100, 0.35); - border: none; - box-shadow: none; -} - -.appfolder-dialogs-dark .folder-name-entry { - color: white; - background-color: rgba(100, 100, 100, 0.35); - border: 0; - box-shadow: none; -} - - -/*** PANEL LIGHT TEXT ***/ - -/* -* `.panel-light-text`, adapted from gnome-shell-light.css -*/ - -#panel.panel-light-text .panel-button, -#panel.panel-light-text .panel-button.clock-display, -#panel.panel-light-text .netSpeedLabel { - color: #f6f5f4; - box-shadow: none; -} - -#panel.panel-light-text .panel-button:active, -#panel.panel-light-text .panel-button:focus, -#panel.panel-light-text .panel-button:checked, -#panel.panel-light-text .panel-button.clock-display:active .clock, -#panel.panel-light-text .panel-button.clock-display:focus .clock, -#panel.panel-light-text .panel-button.clock-display:checked .clock { - box-shadow: inset 0 0 0 100px rgba(246, 245, 244, 0.25); -} - -#panel.panel-light-text .panel-button:active:hover, -#panel.panel-light-text .panel-button:focus:hover, -#panel.panel-light-text .panel-button:checked:hover, -#panel.panel-light-text .panel-button.clock-display:active:hover, -#panel.panel-light-text .panel-button.clock-display:focus:hover, -#panel.panel-light-text .panel-button.clock-display:checked:hover, -#panel.panel-light-text .panel-button.clock-display:active .clock:hover, -#panel.panel-light-text .panel-button.clock-display:focus .clock:hover, -#panel.panel-light-text .panel-button.clock-display:checked .clock:hover { - box-shadow: inset 0 0 0 100px rgba(246, 245, 244, 0.35); -} - -#panel.panel-light-text .panel-button:hover, -#panel.panel-light-text .panel-button.clock-display:hover, -#panel.panel-light-text .panel-button.clock-display:hover .clock { - box-shadow: inset 0 0 0 100px rgba(246, 245, 244, 0.2); -} - -#panel.panel-light-text .panel-button#panelActivities .workspace-dot { - background-color: #f6f5f4; -} - -#panel.panel-light-text .panel-button.clock-display:active, -#panel.panel-light-text .panel-button.clock-display:focus, -#panel.panel-light-text .panel-button.clock-display:checked, -#panel.panel-light-text .panel-button.clock-display:hover { - box-shadow: none !important; -} - -#panel.panel-light-text .panel-button.screen-recording-indicator { - color: #f6f5f4; - box-shadow: inset 0 0 0 100px rgba(192, 28, 40, 0.8); -} - -#panel.panel-light-text .panel-button.screen-recording-indicator:active, -#panel.panel-light-text .panel-button.screen-recording-indicator:focus, -#panel.panel-light-text .panel-button.screen-recording-indicator:checked { - box-shadow: inset 0 0 0 100px #c01c28; -} - -#panel.panel-light-text .panel-button.screen-recording-indicator:active:hover, -#panel.panel-light-text .panel-button.screen-recording-indicator:focus:hover, -#panel.panel-light-text .panel-button.screen-recording-indicator:checked:hover { - box-shadow: inset 0 0 0 100px rgba(192, 28, 40, 0.95); -} - -#panel.panel-light-text .panel-button.screen-recording-indicator:hover { - box-shadow: inset 0 0 0 100px rgba(192, 28, 40, 0.9); -} - -#panel.panel-light-text .panel-button.screen-sharing-indicator { - color: #282828; - box-shadow: inset 0 0 0 100px rgba(255, 120, 0, 0.8); -} - -#panel.panel-light-text .panel-button.screen-sharing-indicator:active, -#panel.panel-light-text .panel-button.screen-sharing-indicator:focus, -#panel.panel-light-text .panel-button.screen-sharing-indicator:checked { - box-shadow: inset 0 0 0 100px #ff7800; -} - -#panel.panel-light-text .panel-button.screen-sharing-indicator:active:hover, -#panel.panel-light-text .panel-button.screen-sharing-indicator:focus:hover, -#panel.panel-light-text .panel-button.screen-sharing-indicator:checked:hover { - box-shadow: inset 0 0 0 100px rgba(255, 120, 0, 0.95); -} - -#panel.panel-light-text .panel-button.screen-sharing-indicator:hover { - box-shadow: inset 0 0 0 100px rgba(255, 120, 0, 0.9); -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/application-row.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/application-row.ui deleted file mode 100644 index 2a26d145..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/application-row.ui +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - Could not pick window, make sure that the extension is enabled. - - - - Could not pick window from here, does not seem like a valid window. - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/applications.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/applications.ui deleted file mode 100644 index 452a6b6d..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/applications.ui +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - 0 - 100 - 1 - - - - 0.0 - 1.0 - 0.01 - - - - 25 - 255 - 1 - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/dash.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/dash.ui deleted file mode 100644 index b08a4d1b..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/dash.ui +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - 0 - 100 - 1 - - - - 0.0 - 1.0 - 0.01 - - - - - Transparent - Light - Dark - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/effects-dialog.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/effects-dialog.ui deleted file mode 100644 index c6baf62e..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/effects-dialog.ui +++ /dev/null @@ -1,77 +0,0 @@ - - - - - -
- - Include advanced effects - effects-dialog.advanced-effects-bool - -
-
-
\ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/menu.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/menu.ui deleted file mode 100644 index 6d2a4741..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/menu.ui +++ /dev/null @@ -1,37 +0,0 @@ - - - -
- - Project page - prefs.open-readme - - - Report a Bug - prefs.open-bug-report - - - License - prefs.open-license - - - Donate - - GitHub - prefs.donate-github - - - Ko-fi - prefs.donate-kofi - - -
-
- - - info_menu_model - heart-symbolic - - - -
\ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/other.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/other.ui deleted file mode 100644 index e136e381..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/other.ui +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - 0 - 100 - 1 - - - - 0.0 - 1.0 - 0.01 - - - - - High performances - Default - No artifact - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/overview.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/overview.ui deleted file mode 100644 index 36b91fc7..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/overview.ui +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - Do not style - Light - Dark - Transparent - - - - - 0 - 100 - 1 - - - - 0.0 - 1.0 - 0.01 - - - - - - Do not style - Transparent - Light - Dark - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/panel.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/panel.ui deleted file mode 100644 index 306f4efa..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/panel.ui +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - Transparent - Light - Dark - Contrasted - - - - - 0 - 100 - 1 - - - - 0.0 - 1.0 - 0.01 - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/pipeline-choose-row.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/pipeline-choose-row.ui deleted file mode 100644 index 72b854bd..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/pipeline-choose-row.ui +++ /dev/null @@ -1,39 +0,0 @@ - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/pipeline-group.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/pipeline-group.ui deleted file mode 100644 index 19a12bf7..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/pipeline-group.ui +++ /dev/null @@ -1,29 +0,0 @@ - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/pipelines.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/pipelines.ui deleted file mode 100644 index 555ec0a2..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/blur-my-shell@aunetx/ui/pipelines.ui +++ /dev/null @@ -1,44 +0,0 @@ - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/LICENSE.rst b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/LICENSE.rst deleted file mode 100644 index 45cad828..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/LICENSE.rst +++ /dev/null @@ -1,24 +0,0 @@ -====================== -The MIT License (MIT) -====================== - -Copyright (c) 2014, Yotam Bar-On ------------------------------------------ - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -*The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software.* - -**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE.** diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/README.rst b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/README.rst deleted file mode 100644 index 57804f65..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/README.rst +++ /dev/null @@ -1,88 +0,0 @@ -============================ -📋 Clipboard Indicator -============================ - -.. image:: https://raw.githubusercontent.com/andyholmes/gnome-shell-extensions-badge/eb9af9a1c6f04eb060cb01de6aeb5c84232cd8c0/get-it-on-ego.svg?sanitize=true - :target: https://extensions.gnome.org/extension/779/clipboard-indicator/ - :width: 180 - :alt: Get it on GNOME Extensions - -The most popular, reliable and feature-rich clipboard manager for GNOME with -over **1M** downloads. - -|Screenshot| - -.. |Screenshot| image:: ./screenshot.png - :width: 400 - :alt: A screenshot of the clipboard manager, showing clipboard history including images - -This extension is also packaged by the community for many popular Linux distros -— search your package manager. - -🧰 Features: ----------------- - -- Highly customizable -- Supports both text and images -- Allows pinning items to top -- Includes a "private" mode -- Has configurable shortcuts -- Keyboard control - -In-Menu Keyboard Controls -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -- Use arrows to navigate -- :code:`v` to paste directly from menu -- :code:`p` to pin item -- :code:`` to delete an item - -📦 Install from source ----------------- - -Installation via git is performed by cloning the repo into your local gnome-shell extensions directory (usually :code:`~/.local/share/gnome-shell/extensions/`):: - - $ git clone https://github.com/Tudmotu/gnome-shell-extension-clipboard-indicator.git /clipboard-indicator@tudmotu.com - -After cloning the repo, the extension is practically installed yet disabled. In order to enable it, run the following command:: - - $ gnome-extensions enable clipboard-indicator@tudmotu.com - - -✅ GNOME Version Support --------------------------- -Depending on your GNOME version, you will need to install the following -Clipboard Indicator versions: - -* GNOME 46 and above: - - * Use latest version - -* GNOME 45: - - * v57 - -* GNOME 42-44 - - * v47 - -* GNOME 40-41 - - * v39 - -* GNOME <40 - - * v37 - -⌨️ Contributing ----------------- -Contributions to this project are welcome. - -Please follow these guidelines when contributing: - -- If you want to contribute code, your best bet is to look for an issue with the label "Up for grabs" -- DO NOT open unsolicited PRs unless they are for updating translations -- Look at the list of previous PRs before you open a PR, if your PR conflicts with another, it will be rejected -- If you have a feature idea, open an issue and discuss it there before implementing. DO NOT open a PR as a platform for discussion - -Note: I have very little time to maintain this project, so expect long (months) of response time. Apologies in advance. diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/confirmDialog.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/confirmDialog.js deleted file mode 100644 index 745e912e..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/confirmDialog.js +++ /dev/null @@ -1,72 +0,0 @@ -import St from 'gi://St'; -import GObject from 'gi://GObject'; -import Clutter from 'gi://Clutter'; -import * as ModalDialog from 'resource:///org/gnome/shell/ui/modalDialog.js'; - -export class DialogManager { - #openDialog; - - open (title, message, sub_message, ok_label, cancel_label, callback) { - if (this.#openDialog) return; - this.#openDialog = new ConfirmDialog(title, message + "\n" + sub_message, ok_label, cancel_label, callback); - this.#openDialog.onFinish = () => this.#openDialog = null; - this.#openDialog.open(); - } - - destroy () { - if (this.#openDialog) this.#openDialog.destroy(); - this.#openDialog = null; - } -} - -const ConfirmDialog = GObject.registerClass( - class ConfirmDialog extends ModalDialog.ModalDialog { - - _init(title, desc, ok_label, cancel_label, callback) { - super._init(); - - let main_box = new St.BoxLayout({ - vertical: false - }); - this.contentLayout.add_child(main_box); - - let message_box = new St.BoxLayout({ - vertical: true - }); - main_box.add_child(message_box); - - let subject_label = new St.Label({ - style: 'font-weight: bold', - x_align: Clutter.ActorAlign.CENTER, - text: title - }); - message_box.add_child(subject_label); - - let desc_label = new St.Label({ - style: 'padding-top: 12px', - x_align: Clutter.ActorAlign.CENTER, - text: desc - }); - message_box.add_child(desc_label); - - this.setButtons([ - { - label: cancel_label, - action: () => { - this.close(); - this.onFinish(); - }, - key: Clutter.Escape - }, - { - label: ok_label, - action: () => { - this.close(); - this.onFinish(); - callback(); - } - } - ]); - } - } -); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/constants.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/constants.js deleted file mode 100644 index 0c728a53..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/constants.js +++ /dev/null @@ -1,24 +0,0 @@ -export const PrefsFields = { - HISTORY_SIZE : 'history-size', - PREVIEW_SIZE : 'preview-size', - CACHE_FILE_SIZE : 'cache-size', - CACHE_ONLY_FAVORITE : 'cache-only-favorites', - DELETE : 'enable-deletion', - NOTIFY_ON_COPY : 'notify-on-copy', - CONFIRM_ON_CLEAR : 'confirm-clear', - MOVE_ITEM_FIRST : 'move-item-first', - ENABLE_KEYBINDING : 'enable-keybindings', - TOPBAR_PREVIEW_SIZE : 'topbar-preview-size', - TOPBAR_DISPLAY_MODE_ID : 'display-mode', - DISABLE_DOWN_ARROW : 'disable-down-arrow', - STRIP_TEXT : 'strip-text', - KEEP_SELECTED_ON_CLEAR : 'keep-selected-on-clear', - PASTE_BUTTON : 'paste-button', - PINNED_ON_BOTTOM : 'pinned-on-bottom', - BINDING_TOGGLE_MENU : 'toggle-menu', - BINDING_CLEAR_HISTORY : 'clear-history', - BINDING_PREV_ENTRY : 'prev-entry', - BINDING_NEXT_ENTRY : 'next-entry', - BINDING_PRIVATE_MODE : 'private-mode-binding', - CLEAR_ON_BOOT : 'clear-on-boot' -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/extension.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/extension.js deleted file mode 100644 index 4645f988..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/extension.js +++ /dev/null @@ -1,1172 +0,0 @@ -import Clutter from 'gi://Clutter'; -import GObject from 'gi://GObject'; -import Meta from 'gi://Meta'; -import Shell from 'gi://Shell'; -import St from 'gi://St'; - -import * as AnimationUtils from 'resource:///org/gnome/shell/misc/animationUtils.js'; -import * as MessageTray from 'resource:///org/gnome/shell/ui/messageTray.js'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import * as PanelMenu from 'resource:///org/gnome/shell/ui/panelMenu.js'; -import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js'; -import { Extension, gettext as _ } from 'resource:///org/gnome/shell/extensions/extension.js'; - -import { Registry, ClipboardEntry } from './registry.js'; -import { DialogManager } from './confirmDialog.js'; -import { PrefsFields } from './constants.js'; -import { Keyboard } from './keyboard.js'; - -const CLIPBOARD_TYPE = St.ClipboardType.CLIPBOARD; - -const INDICATOR_ICON = 'edit-paste-symbolic'; - -let DELAYED_SELECTION_TIMEOUT = 750; -let MAX_REGISTRY_LENGTH = 15; -let MAX_ENTRY_LENGTH = 50; -let CACHE_ONLY_FAVORITE = false; -let DELETE_ENABLED = true; -let MOVE_ITEM_FIRST = false; -let ENABLE_KEYBINDING = true; -let PRIVATEMODE = false; -let NOTIFY_ON_COPY = true; -let CONFIRM_ON_CLEAR = true; -let MAX_TOPBAR_LENGTH = 15; -let TOPBAR_DISPLAY_MODE = 1; //0 - only icon, 1 - only clipboard content, 2 - both, 3 - neither -let CLEAR_ON_BOOT = false; -let DISABLE_DOWN_ARROW = false; -let STRIP_TEXT = false; -let KEEP_SELECTED_ON_CLEAR = false; -let PASTE_BUTTON = true; -let PINNED_ON_BOTTOM = false; - -export default class ClipboardIndicatorExtension extends Extension { - enable () { - this.clipboardIndicator = new ClipboardIndicator({ - clipboard: St.Clipboard.get_default(), - settings: this.getSettings(), - openSettings: this.openPreferences, - uuid: this.uuid - }); - - Main.panel.addToStatusArea('clipboardIndicator', this.clipboardIndicator, 1); - } - - disable () { - this.clipboardIndicator.destroy(); - this.clipboardIndicator = null; - } -} - -const ClipboardIndicator = GObject.registerClass({ - GTypeName: 'ClipboardIndicator' -}, class ClipboardIndicator extends PanelMenu.Button { - #refreshInProgress = false; - - destroy () { - this._disconnectSettings(); - this._unbindShortcuts(); - this._disconnectSelectionListener(); - this._clearDelayedSelectionTimeout(); - this.#clearTimeouts(); - this.dialogManager.destroy(); - this.keyboard.destroy(); - - super.destroy(); - } - - _init (extension) { - super._init(0.0, "ClipboardIndicator"); - this.extension = extension; - this.registry = new Registry(extension); - this.keyboard = new Keyboard(); - this._settingsChangedId = null; - this._selectionOwnerChangedId = null; - this._historyLabel = null; - this._buttonText = null; - this._disableDownArrow = null; - - this._shortcutsBindingIds = []; - this.clipItemsRadioGroup = []; - - let hbox = new St.BoxLayout({ - style_class: 'panel-status-menu-box clipboard-indicator-hbox' - }); - - this.hbox = hbox; - - this.icon = new St.Icon({ - icon_name: INDICATOR_ICON, - style_class: 'system-status-icon clipboard-indicator-icon' - }); - - this._buttonText = new St.Label({ - text: _('Text will be here'), - y_align: Clutter.ActorAlign.CENTER - }); - - this._buttonImgPreview = new St.Bin({ - style_class: 'clipboard-indicator-topbar-preview' - }); - - hbox.add_child(this.icon); - hbox.add_child(this._buttonText); - hbox.add_child(this._buttonImgPreview); - this._downArrow = PopupMenu.arrowIcon(St.Side.BOTTOM); - hbox.add_child(this._downArrow); - this.add_child(hbox); - this._createHistoryLabel(); - this._loadSettings(); - - if (CLEAR_ON_BOOT) this.registry.clearCacheFolder(); - - this.dialogManager = new DialogManager(); - this._buildMenu().then(() => { - this._updateTopbarLayout(); - this._setupListener(); - }); - } - - #updateIndicatorContent(entry) { - if (this.preventIndicatorUpdate || (TOPBAR_DISPLAY_MODE !== 1 && TOPBAR_DISPLAY_MODE !== 2)) { - return; - } - - if (!entry || PRIVATEMODE) { - this._buttonImgPreview.destroy_all_children(); - this._buttonText.set_text("...") - } else { - if (entry.isText()) { - this._buttonText.set_text(this._truncate(entry.getStringValue(), MAX_TOPBAR_LENGTH)); - this._buttonImgPreview.destroy_all_children(); - } - else if (entry.isImage()) { - this._buttonText.set_text(''); - this._buttonImgPreview.destroy_all_children(); - this.registry.getEntryAsImage(entry).then(img => { - img.add_style_class_name('clipboard-indicator-img-preview'); - img.y_align = Clutter.ActorAlign.CENTER; - - // icon only renders properly in setTimeout for some arcane reason - this._imagePreviewTimeout = setTimeout(() => { - this._buttonImgPreview.set_child(img); - }, 0); - }); - } - } - } - - async _buildMenu () { - let that = this; - const clipHistory = await this._getCache(); - let lastIdx = clipHistory.length - 1; - let clipItemsArr = that.clipItemsRadioGroup; - - /* This create the search entry, which is add to a menuItem. - The searchEntry is connected to the function for research. - The menu itself is connected to some shitty hack in order to - grab the focus of the keyboard. */ - that._entryItem = new PopupMenu.PopupBaseMenuItem({ - reactive: false, - can_focus: false - }); - that.searchEntry = new St.Entry({ - name: 'searchEntry', - style_class: 'search-entry', - can_focus: true, - hint_text: _('Type here to search...'), - track_hover: true, - x_expand: true, - y_expand: true, - primary_icon: new St.Icon({ icon_name: 'edit-find-symbolic' }) - }); - - that.searchEntry.get_clutter_text().connect( - 'text-changed', - that._onSearchTextChanged.bind(that) - ); - - that._entryItem.add_child(that.searchEntry); - - that.menu.connect('open-state-changed', (self, open) => { - this._setFocusOnOpenTimeout = setTimeout(() => { - if (open) { - if (this.clipItemsRadioGroup.length > 0) { - that.searchEntry.set_text(''); - global.stage.set_key_focus(that.searchEntry); - } - else { - global.stage.set_key_focus(that.privateModeMenuItem); - } - } - }, 50); - }); - - // Create menu sections for items - // Favorites - that.favoritesSection = new PopupMenu.PopupMenuSection(); - - that.scrollViewFavoritesMenuSection = new PopupMenu.PopupMenuSection(); - this.favoritesScrollView = new St.ScrollView({ - style_class: 'ci-history-menu-section', - overlay_scrollbars: true - }); - this.favoritesScrollView.add_child(that.favoritesSection.actor); - - that.scrollViewFavoritesMenuSection.actor.add_child(this.favoritesScrollView); - this.favoritesSeparator = new PopupMenu.PopupSeparatorMenuItem(); - - // History - that.historySection = new PopupMenu.PopupMenuSection(); - - that.scrollViewMenuSection = new PopupMenu.PopupMenuSection(); - this.historyScrollView = new St.ScrollView({ - style_class: 'ci-main-menu-section ci-history-menu-section', - overlay_scrollbars: true - }); - this.historyScrollView.add_child(that.historySection.actor); - - that.scrollViewMenuSection.actor.add_child(this.historyScrollView); - - // Add separator - this.historySeparator = new PopupMenu.PopupSeparatorMenuItem(); - - // Add sections ordered according to settings - if (PINNED_ON_BOTTOM) { - that.menu.addMenuItem(that.scrollViewMenuSection); - that.menu.addMenuItem(that.scrollViewFavoritesMenuSection); - } - else { - that.menu.addMenuItem(that.scrollViewFavoritesMenuSection); - that.menu.addMenuItem(that.scrollViewMenuSection); - } - - // Private mode switch - that.privateModeMenuItem = new PopupMenu.PopupSwitchMenuItem( - _("Private mode"), PRIVATEMODE, { reactive: true }); - that.privateModeMenuItem.connect('toggled', - that._onPrivateModeSwitch.bind(that)); - that.privateModeMenuItem.insert_child_at_index( - new St.Icon({ - icon_name: 'security-medium-symbolic', - style_class: 'clipboard-menu-icon', - y_align: Clutter.ActorAlign.CENTER - }), - 0 - ); - that.menu.addMenuItem(that.privateModeMenuItem); - - // Add 'Clear' button which removes all items from cache - this.clearMenuItem = new PopupMenu.PopupMenuItem(_('Clear history')); - this.clearMenuItem.insert_child_at_index( - new St.Icon({ - icon_name: 'user-trash-symbolic', - style_class: 'clipboard-menu-icon', - y_align: Clutter.ActorAlign.CENTER - }), - 0 - ); - this.clearMenuItem.connect('activate', that._removeAll.bind(that)); - - // Add 'Settings' menu item to open settings - this.settingsMenuItem = new PopupMenu.PopupMenuItem(_('Settings')); - this.settingsMenuItem.insert_child_at_index( - new St.Icon({ - icon_name: 'preferences-system-symbolic', - style_class: 'clipboard-menu-icon', - y_align: Clutter.ActorAlign.CENTER - }), - 0 - ); - that.menu.addMenuItem(this.settingsMenuItem); - this.settingsMenuItem.connect('activate', that._openSettings.bind(that)); - - // Empty state section - this.emptyStateSection = new St.BoxLayout({ - style_class: 'clipboard-indicator-empty-state', - vertical: true - }); - this.emptyStateSection.add_child(new St.Icon({ - icon_name: INDICATOR_ICON, - style_class: 'system-status-icon clipboard-indicator-icon', - x_align: Clutter.ActorAlign.CENTER - })); - this.emptyStateSection.add_child(new St.Label({ - text: _('Clipboard is empty'), - x_align: Clutter.ActorAlign.CENTER - })); - - // Add cached items - clipHistory.forEach(entry => this._addEntry(entry)); - - if (lastIdx >= 0) { - that._selectMenuItem(clipItemsArr[lastIdx]); - } - - this.#showElements(); - } - - #hideElements() { - if (this.menu.box.contains(this._entryItem)) this.menu.box.remove_child(this._entryItem); - if (this.menu.box.contains(this.favoritesSeparator)) this.menu.box.remove_child(this.favoritesSeparator); - if (this.menu.box.contains(this.historySeparator)) this.menu.box.remove_child(this.historySeparator); - if (this.menu.box.contains(this.clearMenuItem)) this.menu.box.remove_child(this.clearMenuItem); - if (this.menu.box.contains(this.emptyStateSection)) this.menu.box.remove_child(this.emptyStateSection); - } - - #showElements() { - if (this.clipItemsRadioGroup.length > 0) { - if (this.menu.box.contains(this._entryItem) === false) { - this.menu.box.insert_child_at_index(this._entryItem, 0); - } - if (this.menu.box.contains(this.clearMenuItem) === false) { - this.menu.box.insert_child_below(this.clearMenuItem, this.settingsMenuItem); - } - if (this.menu.box.contains(this.emptyStateSection) === true) { - this.menu.box.remove_child(this.emptyStateSection); - } - - if (this.favoritesSection._getMenuItems().length > 0) { - if (this.menu.box.contains(this.favoritesSeparator) === false) { - this.menu.box.insert_child_above(this.favoritesSeparator, this.scrollViewFavoritesMenuSection.actor); - } - } - else if (this.menu.box.contains(this.favoritesSeparator) === true) { - this.menu.box.remove_child(this.favoritesSeparator); - } - - if (this.historySection._getMenuItems().length > 0) { - if (this.menu.box.contains(this.historySeparator) === false) { - this.menu.box.insert_child_above(this.historySeparator, this.scrollViewMenuSection.actor); - } - } - else if (this.menu.box.contains(this.historySeparator) === true) { - this.menu.box.remove_child(this.historySeparator); - } - } - else if (this.menu.box.contains(this.emptyStateSection) === false) { - this.#renderEmptyState(); - } - } - - #renderEmptyState () { - this.#hideElements(); - this.menu.box.insert_child_at_index(this.emptyStateSection, 0); - } - - /* When text change, this function will check, for each item of the - historySection and favoritesSestion, if it should be visible or not (based on words contained - in the clipContents attribute of the item). It doesn't destroy or create - items. It the entry is empty, the section is restored with all items - set as visible. */ - _onSearchTextChanged () { - let searchedText = this.searchEntry.get_text().toLowerCase(); - - if(searchedText === '') { - this._getAllIMenuItems().forEach(function(mItem){ - mItem.actor.visible = true; - }); - } - else { - this._getAllIMenuItems().forEach(function(mItem){ - let text = mItem.clipContents.toLowerCase(); - let isMatching = text.indexOf(searchedText) >= 0; - mItem.actor.visible = isMatching - }); - } - } - - _truncate (string, length) { - let shortened = string.replace(/\s+/g, ' '); - - let chars = [...shortened] - if (chars.length > length) - shortened = chars.slice(0, length - 1).join('') + '...'; - - return shortened; - } - - _setEntryLabel (menuItem) { - const { entry } = menuItem; - if (entry.isText()) { - menuItem.label.set_text(this._truncate(entry.getStringValue(), MAX_ENTRY_LENGTH)); - } - else if (entry.isImage()) { - this.registry.getEntryAsImage(entry).then(img => { - img.add_style_class_name('clipboard-menu-img-preview'); - if (menuItem.previewImage) { - menuItem.remove_child(menuItem.previewImage); - } - menuItem.previewImage = img; - menuItem.insert_child_below(img, menuItem.label); - }); - } - } - - _findNextMenuItem (currentMenutItem) { - let currentIndex = this.clipItemsRadioGroup.indexOf(currentMenutItem); - - // for only one item - if(this.clipItemsRadioGroup.length === 1) { - return null; - } - - // when focus is in middle of the displayed list - for (let i = currentIndex - 1; i >= 0; i--) { - let menuItem = this.clipItemsRadioGroup[i]; - if (menuItem.actor.visible) { - return menuItem; - } - } - - // when focus is at the last element of the displayed list - let beforeMenuItem = this.clipItemsRadioGroup[currentIndex + 1]; - if(beforeMenuItem.actor.visible){ - return beforeMenuItem; - } - - return null; - } - - #selectNextMenuItem (menuItem) { - let nextMenuItem = this._findNextMenuItem(menuItem); - - if (nextMenuItem) { - nextMenuItem.actor.grab_key_focus(); - } else { - this.privateModeMenuItem.actor.grab_key_focus(); - } - } - - _addEntry (entry, autoSelect, autoSetClip) { - let menuItem = new PopupMenu.PopupMenuItem(''); - - menuItem.menu = this.menu; - menuItem.entry = entry; - menuItem.clipContents = entry.getStringValue(); - menuItem.radioGroup = this.clipItemsRadioGroup; - const allowedKeysyms = [ - Clutter.KEY_KP_Enter, - Clutter.KEY_Return, - ]; - menuItem.keyPressId = menuItem.connect('key-press-event', (actor, event) => { - if (allowedKeysyms.includes(event.get_key_symbol())) { - this._onMenuItemSelectedAndMenuClose(menuItem, 'activate') - return true; - } - return false; - }) - menuItem.buttonPressId = menuItem.connect('activate', - autoSet => this._onMenuItemSelectedAndMenuClose(menuItem, autoSet)); - menuItem.connect('key-focus-in', () => { - const viewToScroll = menuItem.entry.isFavorite() ? - this.favoritesScrollView : this.historyScrollView; - AnimationUtils.ensureActorVisibleInScrollView(viewToScroll, menuItem); - }); - menuItem.actor.connect('key-press-event', (actor, event) => { - if(event.get_key_symbol() === Clutter.KEY_Delete) { - this.#selectNextMenuItem(menuItem); - this._removeEntry(menuItem, 'delete'); - } - else if (event.get_key_symbol() === Clutter.KEY_p) { - this.#selectNextMenuItem(menuItem); - this._favoriteToggle(menuItem); - } - else if (event.get_key_symbol() === Clutter.KEY_v) { - this.#pasteItem(menuItem); - } - }) - - this._setEntryLabel(menuItem); - this.clipItemsRadioGroup.push(menuItem); - - // Favorite button - let iconfav = new St.Icon({ - icon_name: 'view-pin-symbolic', - style_class: 'system-status-icon' - }); - - let icofavBtn = new St.Button({ - style_class: 'ci-pin-btn ci-action-btn', - can_focus: true, - child: iconfav, - x_align: Clutter.ActorAlign.END, - x_expand: true, - y_expand: true - }); - - menuItem.actor.add_child(icofavBtn); - menuItem.icofavBtn = icofavBtn; - menuItem.favoritePressId = icofavBtn.connect('clicked', - () => this._favoriteToggle(menuItem) - ); - - // Paste button - menuItem.pasteBtn = new St.Button({ - style_class: 'ci-action-btn', - can_focus: true, - child: new St.Icon({ - icon_name: 'edit-paste-symbolic', - style_class: 'system-status-icon' - }), - x_align: Clutter.ActorAlign.END, - x_expand: false, - y_expand: true, - visible: PASTE_BUTTON - }); - - menuItem.pasteBtn.connect('clicked', - () => this.#pasteItem(menuItem) - ); - - menuItem.actor.add_child(menuItem.pasteBtn); - - // Delete button - let icon = new St.Icon({ - icon_name: 'edit-delete-symbolic', //'mail-attachment-symbolic', - style_class: 'system-status-icon' - }); - - let icoBtn = new St.Button({ - style_class: 'ci-action-btn', - can_focus: true, - child: icon, - x_align: Clutter.ActorAlign.END, - x_expand: false, - y_expand: true - }); - - menuItem.actor.add_child(icoBtn); - menuItem.icoBtn = icoBtn; - menuItem.deletePressId = icoBtn.connect('clicked', - () => this._removeEntry(menuItem, 'delete') - ); - - if (entry.isFavorite()) { - this.favoritesSection.addMenuItem(menuItem, 0); - } else { - this.historySection.addMenuItem(menuItem, 0); - } - - if (autoSelect === true) { - this._selectMenuItem(menuItem, autoSetClip); - } - else { - menuItem.setOrnament(PopupMenu.Ornament.NONE); - } - - this.#showElements(); - } - - _favoriteToggle (menuItem) { - menuItem.entry.favorite = menuItem.entry.isFavorite() ? false : true; - this._moveItemFirst(menuItem); - this._updateCache(); - this.#showElements(); - } - - _confirmRemoveAll () { - const title = _("Clear all?"); - const message = _("Are you sure you want to delete all clipboard items?"); - const sub_message = _("This operation cannot be undone."); - - this.dialogManager.open(title, message, sub_message, _("Clear"), _("Cancel"), () => { - this._clearHistory(); - } - ); - } - - _clearHistory () { - // Don't remove pinned items - this.historySection._getMenuItems().forEach(mItem => { - if (KEEP_SELECTED_ON_CLEAR === false || !mItem.currentlySelected) { - this._removeEntry(mItem, 'delete'); - } - }); - this._showNotification(_("Clipboard history cleared")); - } - - _removeAll () { - if (PRIVATEMODE) return; - var that = this; - - if (CONFIRM_ON_CLEAR) { - that._confirmRemoveAll(); - } else { - that._clearHistory(); - } - } - - _removeEntry (menuItem, event) { - let itemIdx = this.clipItemsRadioGroup.indexOf(menuItem); - - if(event === 'delete' && menuItem.currentlySelected) { - this.#clearClipboard(); - } - - menuItem.destroy(); - this.clipItemsRadioGroup.splice(itemIdx,1); - - if (menuItem.entry.isImage()) { - this.registry.deleteEntryFile(menuItem.entry); - } - - this._updateCache(); - this.#showElements(); - } - - _removeOldestEntries () { - let that = this; - - let clipItemsRadioGroupNoFavorite = that.clipItemsRadioGroup.filter( - item => item.entry.isFavorite() === false); - - const origSize = clipItemsRadioGroupNoFavorite.length; - - while (clipItemsRadioGroupNoFavorite.length > MAX_REGISTRY_LENGTH) { - let oldestNoFavorite = clipItemsRadioGroupNoFavorite.shift(); - that._removeEntry(oldestNoFavorite); - - clipItemsRadioGroupNoFavorite = that.clipItemsRadioGroup.filter( - item => item.entry.isFavorite() === false); - } - - if (clipItemsRadioGroupNoFavorite.length < origSize) { - that._updateCache(); - } - } - - _onMenuItemSelected (menuItem, autoSet) { - for (let otherMenuItem of menuItem.radioGroup) { - let clipContents = menuItem.clipContents; - - if (otherMenuItem === menuItem && clipContents) { - menuItem.setOrnament(PopupMenu.Ornament.DOT); - menuItem.currentlySelected = true; - if (autoSet !== false) - this.#updateClipboard(menuItem.entry); - } - else { - otherMenuItem.setOrnament(PopupMenu.Ornament.NONE); - otherMenuItem.currentlySelected = false; - } - } - } - - _selectMenuItem (menuItem, autoSet) { - this._onMenuItemSelected(menuItem, autoSet); - this.#updateIndicatorContent(menuItem.entry); - } - - _onMenuItemSelectedAndMenuClose (menuItem, autoSet) { - for (let otherMenuItem of menuItem.radioGroup) { - let clipContents = menuItem.clipContents; - - if (menuItem === otherMenuItem && clipContents) { - menuItem.setOrnament(PopupMenu.Ornament.DOT); - menuItem.currentlySelected = true; - if (autoSet !== false) - this.#updateClipboard(menuItem.entry); - } - else { - otherMenuItem.setOrnament(PopupMenu.Ornament.NONE); - otherMenuItem.currentlySelected = false; - } - } - - menuItem.menu.close(); - } - - _getCache () { - return this.registry.read(); - } - - #addToCache (entry) { - const entries = this.clipItemsRadioGroup - .map(menuItem => menuItem.entry) - .filter(entry => CACHE_ONLY_FAVORITE == false || entry.isFavorite()) - .concat([entry]); - this.registry.write(entries); - } - - _updateCache () { - const entries = this.clipItemsRadioGroup - .map(menuItem => menuItem.entry) - .filter(entry => CACHE_ONLY_FAVORITE == false || entry.isFavorite()); - - this.registry.write(entries); - } - - async _onSelectionChange (selection, selectionType, selectionSource) { - if (selectionType === Meta.SelectionType.SELECTION_CLIPBOARD) { - this._refreshIndicator(); - } - } - - async _refreshIndicator () { - if (PRIVATEMODE) return; // Private mode, do not. - if (this.#refreshInProgress) return; - this.#refreshInProgress = true; - - try { - const result = await this.#getClipboardContent(); - - if (result) { - for (let menuItem of this.clipItemsRadioGroup) { - if (menuItem.entry.equals(result)) { - this._selectMenuItem(menuItem, false); - - if (!menuItem.entry.isFavorite() && MOVE_ITEM_FIRST) { - this._moveItemFirst(menuItem); - } - - return; - } - } - - this.#addToCache(result); - this._addEntry(result, true, false); - this._removeOldestEntries(); - if (NOTIFY_ON_COPY) { - this._showNotification(_("Copied to clipboard"), notif => { - notif.addAction(_('Cancel'), this._cancelNotification); - }); - } - } - } - catch (e) { - console.error('Clipboard Indicator: Failed to refresh indicator'); - console.error(e); - } - finally { - this.#refreshInProgress = false; - } - } - - _moveItemFirst (item) { - this._removeEntry(item); - this._addEntry(item.entry, item.currentlySelected, false); - this._updateCache(); - } - - _findItem (text) { - return this.clipItemsRadioGroup.filter( - item => item.clipContents === text)[0]; - } - - _getCurrentlySelectedItem () { - return this.clipItemsRadioGroup.find(item => item.currentlySelected); - } - - _getAllIMenuItems () { - return this.historySection._getMenuItems().concat(this.favoritesSection._getMenuItems()); - } - - _setupListener () { - const metaDisplay = Shell.Global.get().get_display(); - const selection = metaDisplay.get_selection(); - this._setupSelectionTracking(selection); - } - - _setupSelectionTracking (selection) { - this.selection = selection; - this._selectionOwnerChangedId = selection.connect('owner-changed', (selection, selectionType, selectionSource) => { - this._onSelectionChange(selection, selectionType, selectionSource); - }); - } - - _openSettings () { - this.extension.openSettings(); - } - - _initNotifSource () { - if (!this._notifSource) { - this._notifSource = new MessageTray.Source({ - title: 'Clipboard Indicator', - 'icon-name': INDICATOR_ICON - }); - - this._notifSource.connect('destroy', () => { - this._notifSource = null; - }); - - Main.messageTray.add(this._notifSource); - } - } - - _cancelNotification () { - if (this.clipItemsRadioGroup.length >= 2) { - let clipSecond = this.clipItemsRadioGroup.length - 2; - let previousClip = this.clipItemsRadioGroup[clipSecond]; - this.#updateClipboard(previousClip.entry); - previousClip.setOrnament(PopupMenu.Ornament.DOT); - previousClip.icoBtn.visible = false; - previousClip.currentlySelected = true; - } else { - this.#clearClipboard(); - } - let clipFirst = this.clipItemsRadioGroup.length - 1; - this._removeEntry(this.clipItemsRadioGroup[clipFirst]); - } - - _showNotification (message, transformFn) { - const dndOn = () => - !Main.panel.statusArea.dateMenu._indicator._settings.get_boolean( - 'show-banners', - ); - if (PRIVATEMODE || dndOn()) { - return; - } - - let notification = null; - - this._initNotifSource(); - - if (this._notifSource.count === 0) { - notification = new MessageTray.Notification({ - source: this._notifSource, - body: message, - 'is-transient': true - }); - } - else { - notification = this._notifSource.notifications[0]; - notification.body = message; - notification.clearActions(); - } - - if (typeof transformFn === 'function') { - transformFn(notification); - } - - this._notifSource.addNotification(notification); - } - - _createHistoryLabel () { - this._historyLabel = new St.Label({ - style_class: 'ci-notification-label', - text: '' - }); - - global.stage.add_child(this._historyLabel); - - this._historyLabel.hide(); - } - - togglePrivateMode () { - this.privateModeMenuItem.toggle(); - } - - _onPrivateModeSwitch () { - let that = this; - PRIVATEMODE = this.privateModeMenuItem.state; - // We hide the history in private ModeTypee because it will be out of sync (selected item will not reflect clipboard) - this.scrollViewMenuSection.actor.visible = !PRIVATEMODE; - this.scrollViewFavoritesMenuSection.actor.visible = !PRIVATEMODE; - // If we get out of private mode then we restore the clipboard to old state - if (!PRIVATEMODE) { - let selectList = this.clipItemsRadioGroup.filter((item) => !!item.currentlySelected); - - if (selectList.length) { - this._selectMenuItem(selectList[0]); - } else { - // Nothing to return to, let's empty it instead - this.#clearClipboard(); - } - - this.#getClipboardContent().then(entry => { - if (!entry) return; - this.#updateIndicatorContent(entry); - }).catch(e => console.error(e)); - - this.hbox.remove_style_class_name('private-mode'); - this.#showElements(); - } else { - this.hbox.add_style_class_name('private-mode'); - this.#updateIndicatorContent(null); - this.#hideElements(); - } - } - - _loadSettings () { - this._settingsChangedId = this.extension.settings.connect('changed', - this._onSettingsChange.bind(this)); - - this._fetchSettings(); - - if (ENABLE_KEYBINDING) - this._bindShortcuts(); - } - - _fetchSettings () { - const { settings } = this.extension; - MAX_REGISTRY_LENGTH = settings.get_int(PrefsFields.HISTORY_SIZE); - MAX_ENTRY_LENGTH = settings.get_int(PrefsFields.PREVIEW_SIZE); - CACHE_ONLY_FAVORITE = settings.get_boolean(PrefsFields.CACHE_ONLY_FAVORITE); - DELETE_ENABLED = settings.get_boolean(PrefsFields.DELETE); - MOVE_ITEM_FIRST = settings.get_boolean(PrefsFields.MOVE_ITEM_FIRST); - NOTIFY_ON_COPY = settings.get_boolean(PrefsFields.NOTIFY_ON_COPY); - CONFIRM_ON_CLEAR = settings.get_boolean(PrefsFields.CONFIRM_ON_CLEAR); - ENABLE_KEYBINDING = settings.get_boolean(PrefsFields.ENABLE_KEYBINDING); - MAX_TOPBAR_LENGTH = settings.get_int(PrefsFields.TOPBAR_PREVIEW_SIZE); - TOPBAR_DISPLAY_MODE = settings.get_int(PrefsFields.TOPBAR_DISPLAY_MODE_ID); - CLEAR_ON_BOOT = settings.get_boolean(PrefsFields.CLEAR_ON_BOOT); - DISABLE_DOWN_ARROW = settings.get_boolean(PrefsFields.DISABLE_DOWN_ARROW); - STRIP_TEXT = settings.get_boolean(PrefsFields.STRIP_TEXT); - KEEP_SELECTED_ON_CLEAR = settings.get_boolean(PrefsFields.KEEP_SELECTED_ON_CLEAR); - PASTE_BUTTON = settings.get_boolean(PrefsFields.PASTE_BUTTON); - PINNED_ON_BOTTOM = settings.get_boolean(PrefsFields.PINNED_ON_BOTTOM); - - } - - async _onSettingsChange () { - try { - var that = this; - - // Load the settings into variables - that._fetchSettings(); - - // Remove old entries in case the registry size changed - that._removeOldestEntries(); - - // Re-set menu-items lables in case preview size changed - this._getAllIMenuItems().forEach(function (mItem) { - that._setEntryLabel(mItem); - mItem.pasteBtn.visible = PASTE_BUTTON; - }); - - //update topbar - this._updateTopbarLayout(); - that.#updateIndicatorContent(await this.#getClipboardContent()); - - // Bind or unbind shortcuts - if (ENABLE_KEYBINDING) - that._bindShortcuts(); - else - that._unbindShortcuts(); - } catch (e) { - console.error('Clipboard Indicator: Failed to update registry'); - console.error(e); - } - } - - _bindShortcuts () { - this._unbindShortcuts(); - this._bindShortcut(PrefsFields.BINDING_CLEAR_HISTORY, this._removeAll); - this._bindShortcut(PrefsFields.BINDING_PREV_ENTRY, this._previousEntry); - this._bindShortcut(PrefsFields.BINDING_NEXT_ENTRY, this._nextEntry); - this._bindShortcut(PrefsFields.BINDING_TOGGLE_MENU, this._toggleMenu); - this._bindShortcut(PrefsFields.BINDING_PRIVATE_MODE, this.togglePrivateMode); - } - - _unbindShortcuts () { - this._shortcutsBindingIds.forEach( - (id) => Main.wm.removeKeybinding(id) - ); - - this._shortcutsBindingIds = []; - } - - _bindShortcut (name, cb) { - var ModeType = Shell.hasOwnProperty('ActionMode') ? - Shell.ActionMode : Shell.KeyBindingMode; - - Main.wm.addKeybinding( - name, - this.extension.settings, - Meta.KeyBindingFlags.NONE, - ModeType.ALL, - cb.bind(this) - ); - - this._shortcutsBindingIds.push(name); - } - - _updateTopbarLayout () { - if(TOPBAR_DISPLAY_MODE === 0){ - this.icon.visible = true; - this._buttonText.visible = false; - this.show(); - } - if(TOPBAR_DISPLAY_MODE === 1){ - this.icon.visible = false; - this._buttonText.visible = true; - this.show(); - } - if(TOPBAR_DISPLAY_MODE === 2){ - this.icon.visible = true; - this._buttonText.visible = true; - this.show(); - } - if (TOPBAR_DISPLAY_MODE === 3) { - this.hide(); - } - if(!DISABLE_DOWN_ARROW) { - this._downArrow.visible = true; - } else { - this._downArrow.visible = false; - } - } - - _disconnectSettings () { - if (!this._settingsChangedId) - return; - - this.extension.settings.disconnect(this._settingsChangedId); - this._settingsChangedId = null; - } - - _disconnectSelectionListener () { - if (!this._selectionOwnerChangedId) - return; - - this.selection.disconnect(this._selectionOwnerChangedId); - } - - _clearDelayedSelectionTimeout () { - if (this._delayedSelectionTimeoutId) { - clearInterval(this._delayedSelectionTimeoutId); - } - } - - _selectEntryWithDelay (entry) { - let that = this; - that._selectMenuItem(entry, false); - - that._delayedSelectionTimeoutId = setTimeout(function () { - that._selectMenuItem(entry); //select the item - that._delayedSelectionTimeoutId = null; - }, DELAYED_SELECTION_TIMEOUT); - } - - _previousEntry () { - if (PRIVATEMODE) return; - let that = this; - - that._clearDelayedSelectionTimeout(); - - this._getAllIMenuItems().some(function (mItem, i, menuItems){ - if (mItem.currentlySelected) { - i--; //get the previous index - if (i < 0) i = menuItems.length - 1; //cycle if out of bound - let index = i + 1; //index to be displayed - that._showNotification(index + ' / ' + menuItems.length + ': ' + menuItems[i].entry.getStringValue()); - if (MOVE_ITEM_FIRST) { - that._selectEntryWithDelay(menuItems[i]); - } - else { - that._selectMenuItem(menuItems[i]); - } - return true; - } - return false; - }); - } - - _nextEntry () { - if (PRIVATEMODE) return; - let that = this; - - that._clearDelayedSelectionTimeout(); - - this._getAllIMenuItems().some(function (mItem, i, menuItems){ - if (mItem.currentlySelected) { - i++; //get the next index - if (i === menuItems.length) i = 0; //cycle if out of bound - let index = i + 1; //index to be displayed - that._showNotification(index + ' / ' + menuItems.length + ': ' + menuItems[i].entry.getStringValue()); - if (MOVE_ITEM_FIRST) { - that._selectEntryWithDelay(menuItems[i]); - } - else { - that._selectMenuItem(menuItems[i]); - } - return true; - } - return false; - }); - } - - _toggleMenu () { - this.menu.toggle(); - } - - #pasteItem (menuItem) { - this.menu.close(); - const currentlySelected = this._getCurrentlySelectedItem(); - this.preventIndicatorUpdate = true; - this.#updateClipboard(menuItem.entry); - this._pastingKeypressTimeout = setTimeout(() => { - if (this.keyboard.purpose === Clutter.InputContentPurpose.TERMINAL) { - this.keyboard.press(Clutter.KEY_Control_L); - this.keyboard.press(Clutter.KEY_Shift_L); - this.keyboard.press(Clutter.KEY_Insert); - this.keyboard.release(Clutter.KEY_Insert); - this.keyboard.release(Clutter.KEY_Shift_L); - this.keyboard.release(Clutter.KEY_Control_L); - } - else { - this.keyboard.press(Clutter.KEY_Shift_L); - this.keyboard.press(Clutter.KEY_Insert); - this.keyboard.release(Clutter.KEY_Insert); - this.keyboard.release(Clutter.KEY_Shift_L); - } - - this._pastingResetTimeout = setTimeout(() => { - this.preventIndicatorUpdate = false; - this.#updateClipboard(currentlySelected.entry); - }, 50); - }, 50); - } - - #clearTimeouts () { - if (this._imagePreviewTimeout) clearTimeout(this._imagePreviewTimeout); - if (this._setFocusOnOpenTimeout) clearTimeout(this._setFocusOnOpenTimeout); - if (this._pastingKeypressTimeout) clearTimeout(this._pastingKeypressTimeout); - if (this._pastingResetTimeout) clearTimeout(this._pastingResetTimeout); - } - - #clearClipboard () { - this.extension.clipboard.set_text(CLIPBOARD_TYPE, ""); - this.#updateIndicatorContent(null); - } - - #updateClipboard (entry) { - this.extension.clipboard.set_content(CLIPBOARD_TYPE, entry.mimetype(), entry.asBytes()); - this.#updateIndicatorContent(entry); - } - - async #getClipboardContent () { - const mimetypes = [ - "text/plain;charset=utf-8", - "UTF8_STRING", - "text/plain", - "STRING", - 'image/gif', - 'image/png', - 'image/jpg', - 'image/jpeg', - 'image/webp', - 'image/svg+xml', - 'text/html', - ]; - - for (let type of mimetypes) { - let result = await new Promise(resolve => this.extension.clipboard.get_content(CLIPBOARD_TYPE, type, (clipBoard, bytes) => { - if (bytes === null || bytes.get_size() === 0) { - resolve(null); - return; - } - - const entry = new ClipboardEntry(type, bytes.get_data(), false); - if (entry.isImage()) { - this.registry.writeEntryFile(entry); - } - resolve(entry); - })); - - if (result) return result; - } - - return null; - } -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/keyboard.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/keyboard.js deleted file mode 100644 index 6ec9baa9..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/keyboard.js +++ /dev/null @@ -1,41 +0,0 @@ -import Clutter from 'gi://Clutter'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; - -export class Keyboard { - #device; - #contentPurpose; - - constructor () { - let seat = Clutter.get_default_backend().get_default_seat(); - this.#device = seat.create_virtual_device(Clutter.InputDeviceType.KEYBOARD_DEVICE); - - Main.inputMethod.connectObject('notify::content-purpose', (method) => { - this.#contentPurpose = method.content_purpose; - }, this); - } - - destroy () { - Main.inputMethod.disconnectObject(this); - this.#device.run_dispose(); - } - - #notify (key, state) { - this.#device.notify_keyval( - Clutter.get_current_event_time() * 1000, - key, - state - ); - } - - get purpose () { - return this.#contentPurpose; - } - - press (key) { - this.#notify(key, Clutter.KeyState.PRESSED); - } - - release (key) { - this.#notify(key, Clutter.KeyState.RELEASED); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/ar/LC_MESSAGES/clipboard-indicator.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/ar/LC_MESSAGES/clipboard-indicator.mo deleted file mode 100644 index 6bbca1ef..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/ar/LC_MESSAGES/clipboard-indicator.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/ca/LC_MESSAGES/clipboard-indicator.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/ca/LC_MESSAGES/clipboard-indicator.mo deleted file mode 100644 index 1925bbaa..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/ca/LC_MESSAGES/clipboard-indicator.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/cs/LC_MESSAGES/clipboard-indicator.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/cs/LC_MESSAGES/clipboard-indicator.mo deleted file mode 100644 index 112a8606..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/cs/LC_MESSAGES/clipboard-indicator.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/de/LC_MESSAGES/clipboard-indicator.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/de/LC_MESSAGES/clipboard-indicator.mo deleted file mode 100644 index ebceb2e1..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/de/LC_MESSAGES/clipboard-indicator.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/el/LC_MESSAGES/clipboard-indicator.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/el/LC_MESSAGES/clipboard-indicator.mo deleted file mode 100644 index d0c2ca18..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/el/LC_MESSAGES/clipboard-indicator.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/es/LC_MESSAGES/clipboard-indicator.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/es/LC_MESSAGES/clipboard-indicator.mo deleted file mode 100644 index 8bd949c9..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/es/LC_MESSAGES/clipboard-indicator.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/eu/LC_MESSAGES/clipboard-indicator.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/eu/LC_MESSAGES/clipboard-indicator.mo deleted file mode 100644 index dab2f150..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/eu/LC_MESSAGES/clipboard-indicator.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/fa/LC_MESSAGES/clipboard-indicator.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/fa/LC_MESSAGES/clipboard-indicator.mo deleted file mode 100644 index b1376a61..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/fa/LC_MESSAGES/clipboard-indicator.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/fi/LC_MESSAGES/clipboard-indicator.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/fi/LC_MESSAGES/clipboard-indicator.mo deleted file mode 100644 index 964a9219..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/fi/LC_MESSAGES/clipboard-indicator.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/fr_FR/LC_MESSAGES/clipboard-indicator.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/fr_FR/LC_MESSAGES/clipboard-indicator.mo deleted file mode 100644 index 013809d7..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/fr_FR/LC_MESSAGES/clipboard-indicator.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/hu/LC_MESSAGES/clipboard-indicator.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/hu/LC_MESSAGES/clipboard-indicator.mo deleted file mode 100644 index bb2c2dfa..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/hu/LC_MESSAGES/clipboard-indicator.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/it/LC_MESSAGES/clipboard-indicator.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/it/LC_MESSAGES/clipboard-indicator.mo deleted file mode 100644 index c12403b3..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/it/LC_MESSAGES/clipboard-indicator.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/ja/LC_MESSAGES/ja.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/ja/LC_MESSAGES/ja.mo deleted file mode 100644 index ac33b2eb..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/ja/LC_MESSAGES/ja.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/nl/LC_MESSAGES/clipboard-indicator.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/nl/LC_MESSAGES/clipboard-indicator.mo deleted file mode 100644 index f08cf3cd..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/nl/LC_MESSAGES/clipboard-indicator.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/oc/LC_MESSAGES/clipboard-indicator.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/oc/LC_MESSAGES/clipboard-indicator.mo deleted file mode 100644 index 6aaba6e4..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/oc/LC_MESSAGES/clipboard-indicator.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/pl/LC_MESSAGES/clipboard-indicator.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/pl/LC_MESSAGES/clipboard-indicator.mo deleted file mode 100644 index ae34e92f..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/pl/LC_MESSAGES/clipboard-indicator.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/pt_BR/LC_MESSAGES/clipboard-indicator.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/pt_BR/LC_MESSAGES/clipboard-indicator.mo deleted file mode 100644 index 82ec9356..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/pt_BR/LC_MESSAGES/clipboard-indicator.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/ru/LC_MESSAGES/clipboard-indicator.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/ru/LC_MESSAGES/clipboard-indicator.mo deleted file mode 100644 index 38d53ef3..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/ru/LC_MESSAGES/clipboard-indicator.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/sk/LC_MESSAGES/clipboard-indicator.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/sk/LC_MESSAGES/clipboard-indicator.mo deleted file mode 100644 index f261c255..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/sk/LC_MESSAGES/clipboard-indicator.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/tr/LC_MESSAGES/clipboard-indicator.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/tr/LC_MESSAGES/clipboard-indicator.mo deleted file mode 100644 index 1e04ff26..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/tr/LC_MESSAGES/clipboard-indicator.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/uk/LC_MESSAGES/clipboard-indicator.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/uk/LC_MESSAGES/clipboard-indicator.mo deleted file mode 100644 index 94fdd63c..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/uk/LC_MESSAGES/clipboard-indicator.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/zh_CN/LC_MESSAGES/clipboard-indicator.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/zh_CN/LC_MESSAGES/clipboard-indicator.mo deleted file mode 100644 index e6af608f..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/locale/zh_CN/LC_MESSAGES/clipboard-indicator.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/prefs.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/prefs.js deleted file mode 100644 index 8a9d5b84..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/prefs.js +++ /dev/null @@ -1,283 +0,0 @@ -import Adw from 'gi://Adw'; -import GObject from 'gi://GObject'; -import Gtk from 'gi://Gtk'; -import Gdk from 'gi://Gdk'; -import Gio from 'gi://Gio'; -import { ExtensionPreferences, gettext as _ } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; -import { PrefsFields } from './constants.js'; - -export default class ClipboardIndicatorPreferences extends ExtensionPreferences { - fillPreferencesWindow (window) { - window._settings = this.getSettings(); - const settingsUI = new Settings(window._settings); - const page = new Adw.PreferencesPage(); - page.add(settingsUI.ui); - page.add(settingsUI.behavior); - page.add(settingsUI.limits); - page.add(settingsUI.topbar); - page.add(settingsUI.notifications); - page.add(settingsUI.shortcuts); - window.add(page); - } -} - -class Settings { - constructor (schema) { - this.schema = schema; - - this.field_size = new Adw.SpinRow({ - title: _("History Size"), - adjustment: new Gtk.Adjustment({ - lower: 1, - upper: 200, - step_increment: 1 - }) - }); - - this.field_preview_size = new Adw.SpinRow({ - title: _("Preview Size (characters)"), - adjustment: new Gtk.Adjustment({ - lower: 10, - upper: 100, - step_increment: 1 - }) - }); - - this.field_cache_size = new Adw.SpinRow({ - title: _("Max cache file size (MB)"), - adjustment: new Gtk.Adjustment({ - lower: 1, - upper: 256, - step_increment: 1 - }) - }); - - this.field_topbar_preview_size = new Adw.SpinRow({ - title: _("Number of characters in top bar"), - adjustment: new Gtk.Adjustment({ - lower: 1, - upper: 100, - step_increment: 1 - }) - }); - - this.field_display_mode = new Adw.ComboRow({ - title: _("What to show in top bar"), - model: this.#createDisplayModeOptions() - }); - - this.field_disable_down_arrow = new Adw.SwitchRow({ - title: _("Remove down arrow in top bar") - }); - - this.field_cache_disable = new Adw.SwitchRow({ - title: _("Cache only pinned items") - }); - - this.field_notification_toggle = new Adw.SwitchRow({ - title: _("Show notification on copy") - }); - - this.field_confirm_clear_toggle = new Adw.SwitchRow({ - title: _("Show confirmation on Clear History") - }); - - this.field_strip_text = new Adw.SwitchRow({ - title: _("Remove whitespace around text") - }); - - this.field_move_item_first = new Adw.SwitchRow({ - title: _("Move item to the top after selection") - }); - - this.field_keep_selected_on_clear = new Adw.SwitchRow({ - title: _("Keep selected entry after Clear History") - }); - - this.field_paste_button = new Adw.SwitchRow({ - title: _("Show paste buttons"), - subtitle: _("Adds a paste button to each entry that lets you paste it directly") - }); - - this.field_pinned_on_bottom = new Adw.SwitchRow({ - title: _("Place the pinned section on the bottom"), - subtitle: _("Requires restarting the extension") - }); - - this.field_clear_on_boot = new Adw.SwitchRow({ - title: _("Clear clipboard history on system reboot") - }); - - this.ui = new Adw.PreferencesGroup({ title: _('UI') }); - this.behavior = new Adw.PreferencesGroup({title: _('Behavior')}); - this.limits = new Adw.PreferencesGroup({ title: _('Limits') }); - this.topbar = new Adw.PreferencesGroup({ title: _('Topbar') }); - this.notifications = new Adw.PreferencesGroup({ title: _('Notifications') }); - this.shortcuts = new Adw.PreferencesGroup({ title: _('Shortcuts') }); - - this.ui.add(this.field_preview_size); - this.ui.add(this.field_move_item_first); - this.ui.add(this.field_strip_text); - this.ui.add(this.field_keep_selected_on_clear); - this.ui.add(this.field_paste_button); - this.ui.add(this.field_pinned_on_bottom); - - this.behavior.add(this.field_clear_on_boot); - - this.limits.add(this.field_size); - this.limits.add(this.field_cache_size); - this.limits.add(this.field_cache_disable); - - this.topbar.add(this.field_display_mode); - this.topbar.add(this.field_topbar_preview_size); - this.topbar.add(this.field_disable_down_arrow); - - this.notifications.add(this.field_notification_toggle); - this.notifications.add(this.field_confirm_clear_toggle); - - this.#buildShorcuts(this.shortcuts); - - this.schema.bind(PrefsFields.HISTORY_SIZE, this.field_size, 'value', Gio.SettingsBindFlags.DEFAULT); - this.schema.bind(PrefsFields.PREVIEW_SIZE, this.field_preview_size, 'value', Gio.SettingsBindFlags.DEFAULT); - this.schema.bind(PrefsFields.CACHE_FILE_SIZE, this.field_cache_size, 'value', Gio.SettingsBindFlags.DEFAULT); - this.schema.bind(PrefsFields.CACHE_ONLY_FAVORITE, this.field_cache_disable, 'active', Gio.SettingsBindFlags.DEFAULT); - this.schema.bind(PrefsFields.NOTIFY_ON_COPY, this.field_notification_toggle, 'active', Gio.SettingsBindFlags.DEFAULT); - this.schema.bind(PrefsFields.CONFIRM_ON_CLEAR, this.field_confirm_clear_toggle, 'active', Gio.SettingsBindFlags.DEFAULT); - this.schema.bind(PrefsFields.MOVE_ITEM_FIRST, this.field_move_item_first, 'active', Gio.SettingsBindFlags.DEFAULT); - this.schema.bind(PrefsFields.KEEP_SELECTED_ON_CLEAR, this.field_keep_selected_on_clear, 'active', Gio.SettingsBindFlags.DEFAULT); - this.schema.bind(PrefsFields.TOPBAR_DISPLAY_MODE_ID, this.field_display_mode, 'selected', Gio.SettingsBindFlags.DEFAULT); - this.schema.bind(PrefsFields.DISABLE_DOWN_ARROW, this.field_disable_down_arrow, 'active', Gio.SettingsBindFlags.DEFAULT); - this.schema.bind(PrefsFields.TOPBAR_PREVIEW_SIZE, this.field_topbar_preview_size, 'value', Gio.SettingsBindFlags.DEFAULT); - this.schema.bind(PrefsFields.STRIP_TEXT, this.field_strip_text, 'active', Gio.SettingsBindFlags.DEFAULT); - this.schema.bind(PrefsFields.PASTE_BUTTON, this.field_paste_button, 'active', Gio.SettingsBindFlags.DEFAULT); - this.schema.bind(PrefsFields.PINNED_ON_BOTTOM, this.field_pinned_on_bottom, 'active', Gio.SettingsBindFlags.DEFAULT); - this.schema.bind(PrefsFields.ENABLE_KEYBINDING, this.field_keybinding_activation, 'active', Gio.SettingsBindFlags.DEFAULT); - this.schema.bind(PrefsFields.CLEAR_ON_BOOT, this.field_clear_on_boot, 'active', Gio.SettingsBindFlags.DEFAULT); - } - - #createDisplayModeOptions () { - let options = [ - _("Icon"), - _("Clipboard Content"), - _("Both"), - _("Neither") - ]; - let liststore = new Gtk.StringList(); - for (let option of options) { - liststore.append(option) - } - return liststore; - } - - #shortcuts = { - [PrefsFields.BINDING_PRIVATE_MODE]: _("Private mode"), - [PrefsFields.BINDING_TOGGLE_MENU]: _("Toggle the menu"), - [PrefsFields.BINDING_CLEAR_HISTORY]: _("Clear history"), - [PrefsFields.BINDING_PREV_ENTRY]: _("Previous entry"), - [PrefsFields.BINDING_NEXT_ENTRY]: _("Next entry") - }; - - #buildShorcuts (group) { - this.field_keybinding_activation = new Adw.SwitchRow({ - title: _("Enable shortcuts") - }); - - group.add(this.field_keybinding_activation); - - for (const [pref, title] of Object.entries(this.#shortcuts)) { - const row = new Adw.ActionRow({ - title - }); - - row.add_suffix(this.#createShortcutButton(pref)); - - group.add(row); - } - } - - #createShortcutButton (pref) { - const button = new Gtk.Button({ - has_frame: false - }); - - const setLabelFromSettings = () => { - const originalValue = this.schema.get_strv(pref)[0]; - - if (!originalValue) { - button.set_label(_('Disabled')); - } - else { - button.set_label(originalValue); - } - }; - - const startEditing = () => { - button.isEditing = button.label; - button.set_label(_('Enter shortcut')); - }; - - const revertEditing = () => { - button.set_label(button.isEditing); - button.isEditing = null; - }; - - const stopEditing = () => { - setLabelFromSettings(); - button.isEditing = null; - }; - - setLabelFromSettings(); - - button.connect('clicked', () => { - if (button.isEditing) { - revertEditing(); - return; - } - - startEditing(); - - const eventController = new Gtk.EventControllerKey(); - button.add_controller(eventController); - - let debounceTimeoutId = null; - const connectId = eventController.connect('key-pressed', (_ec, keyval, keycode, mask) => { - if (debounceTimeoutId) clearTimeout(debounceTimeoutId); - - mask = mask & Gtk.accelerator_get_default_mod_mask(); - - if (mask === 0) { - switch (keyval) { - case Gdk.KEY_Escape: - revertEditing(); - return Gdk.EVENT_STOP; - case Gdk.KEY_BackSpace: - this.schema.set_strv(pref, []); - setLabelFromSettings(); - stopEditing(); - eventController.disconnect(connectId); - return Gdk.EVENT_STOP; - } - } - - const selectedShortcut = Gtk.accelerator_name_with_keycode( - null, - keyval, - keycode, - mask - ); - - debounceTimeoutId = setTimeout(() => { - eventController.disconnect(connectId); - this.schema.set_strv(pref, [selectedShortcut]); - stopEditing(); - }, 400); - - return Gdk.EVENT_STOP; - }); - - button.show(); - }); - - return button; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/private_metadata.json b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/private_metadata.json deleted file mode 100644 index fcca6919..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/private_metadata.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_generated": "Generated by SweetTooth, do not edit", - "description": "The most popular clipboard manager for GNOME, with over 1M downloads", - "gettext-domain": "clipboard-indicator", - "name": "Clipboard Indicator", - "settings-schema": "org.gnome.shell.extensions.clipboard-indicator", - "shell-version": [ - "46", - "47" - ], - "url": "https://github.com/Tudmotu/gnome-shell-extension-clipboard-indicator", - "uuid": "clipboard-indicator@tudmotu.com", - "version": 65 -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/registry.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/registry.js deleted file mode 100644 index 9fc26411..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/registry.js +++ /dev/null @@ -1,319 +0,0 @@ -import GLib from 'gi://GLib'; -import Gio from 'gi://Gio'; -import St from 'gi://St'; -import { PrefsFields } from './constants.js'; - -const FileQueryInfoFlags = Gio.FileQueryInfoFlags; -const FileCopyFlags = Gio.FileCopyFlags; -const FileTest = GLib.FileTest; - -export class Registry { - constructor ({ settings, uuid }) { - this.uuid = uuid; - this.settings = settings; - this.REGISTRY_FILE = 'registry.txt'; - this.REGISTRY_DIR = GLib.get_user_cache_dir() + '/' + this.uuid; - this.REGISTRY_PATH = this.REGISTRY_DIR + '/' + this.REGISTRY_FILE; - this.BACKUP_REGISTRY_PATH = this.REGISTRY_PATH + '~'; - } - - write (entries) { - const registryContent = []; - - for (let entry of entries) { - const item = { - favorite: entry.isFavorite(), - mimetype: entry.mimetype() - }; - - registryContent.push(item); - - if (entry.isText()) { - item.contents = entry.getStringValue(); - } - else if (entry.isImage()) { - const filename = this.getEntryFilename(entry); - item.contents = filename; - this.writeEntryFile(entry); - } - } - - this.writeToFile(registryContent); - } - - writeToFile (registry) { - let json = JSON.stringify(registry); - let contents = new GLib.Bytes(json); - - // Make sure dir exists - GLib.mkdir_with_parents(this.REGISTRY_DIR, parseInt('0775', 8)); - - // Write contents to file asynchronously - let file = Gio.file_new_for_path(this.REGISTRY_PATH); - file.replace_async(null, false, Gio.FileCreateFlags.NONE, - GLib.PRIORITY_DEFAULT, null, (obj, res) => { - - let stream = obj.replace_finish(res); - - stream.write_bytes_async(contents, GLib.PRIORITY_DEFAULT, - null, (w_obj, w_res) => { - - w_obj.write_bytes_finish(w_res); - stream.close(null); - }); - }); - } - - async read () { - return new Promise(resolve => { - if (GLib.file_test(this.REGISTRY_PATH, FileTest.EXISTS)) { - let file = Gio.file_new_for_path(this.REGISTRY_PATH); - let CACHE_FILE_SIZE = this.settings.get_int(PrefsFields.CACHE_FILE_SIZE); - - file.query_info_async('*', FileQueryInfoFlags.NONE, - GLib.PRIORITY_DEFAULT, null, (src, res) => { - // Check if file size is larger than CACHE_FILE_SIZE - // If so, make a backup of file, and resolve with empty array - let file_info = src.query_info_finish(res); - - if (file_info.get_size() >= CACHE_FILE_SIZE * 1024 * 1024) { - let destination = Gio.file_new_for_path(this.BACKUP_REGISTRY_PATH); - - file.move(destination, FileCopyFlags.OVERWRITE, null, null); - resolve([]); - return; - } - - file.load_contents_async(null, (obj, res) => { - let [success, contents] = obj.load_contents_finish(res); - - if (success) { - let max_size = this.settings.get_int(PrefsFields.HISTORY_SIZE); - const registry = JSON.parse(new TextDecoder().decode(contents)); - const entriesPromises = registry.map( - jsonEntry => { - return ClipboardEntry.fromJSON(jsonEntry) - } - ); - - Promise.all(entriesPromises).then(clipboardEntries => { - clipboardEntries = clipboardEntries - .filter(entry => entry !== null); - - let registryNoFavorite = clipboardEntries - .filter(entry => entry.isFavorite()); - - while (registryNoFavorite.length > max_size) { - let oldestNoFavorite = registryNoFavorite.shift(); - let itemIdx = clipboardEntries.indexOf(oldestNoFavorite); - clipboardEntries.splice(itemIdx,1); - - registryNoFavorite = clipboardEntries.filter( - entry => entry.isFavorite() - ); - } - - resolve(clipboardEntries); - }).catch(e => { - console.error(e); - }); - } - else { - console.error('Clipboard Indicator: failed to open registry file'); - } - }); - }); - } - else { - resolve([]); - } - }); - } - - #entryFileExists (entry) { - const filename = this.getEntryFilename(entry); - return GLib.file_test(filename, FileTest.EXISTS); - } - - async getEntryAsImage (entry) { - const filename = this.getEntryFilename(entry); - - if (entry.isImage() === false) return; - - if (this.#entryFileExists(entry) == false) { - await this.writeEntryFile(entry); - } - - const gicon = Gio.icon_new_for_string(this.getEntryFilename(entry)); - const stIcon = new St.Icon({ gicon }); - return stIcon; - } - - getEntryFilename (entry) { - return `${this.REGISTRY_DIR}/${entry.asBytes().hash()}`; - } - - async writeEntryFile (entry) { - if (this.#entryFileExists(entry)) return; - - let file = Gio.file_new_for_path(this.getEntryFilename(entry)); - - return new Promise(resolve => { - file.replace_async(null, false, Gio.FileCreateFlags.NONE, - GLib.PRIORITY_DEFAULT, null, (obj, res) => { - - let stream = obj.replace_finish(res); - - stream.write_bytes_async(entry.asBytes(), GLib.PRIORITY_DEFAULT, - null, (w_obj, w_res) => { - - w_obj.write_bytes_finish(w_res); - stream.close(null); - resolve(); - }); - }); - }); - } - - async deleteEntryFile (entry) { - const file = Gio.file_new_for_path(this.getEntryFilename(entry)); - - try { - await file.delete_async(GLib.PRIORITY_DEFAULT, null); - } - catch (e) { - console.error(e); - } - } - - clearCacheFolder() { - - const CANCELLABLE = null; - try { - const folder = Gio.file_new_for_path(this.REGISTRY_DIR); - const enumerator = folder.enumerate_children("", 1, CANCELLABLE); - - let file; - while ((file = enumerator.iterate(CANCELLABLE)[2]) != null) { - file.delete(CANCELLABLE); - } - - } - catch (e) { - console.error(e); - } - } -} - -export class ClipboardEntry { - #mimetype; - #bytes; - #favorite; - - static #decode (contents) { - return Uint8Array.from(contents.match(/.{1,2}/g).map((byte) => parseInt(byte, 16))); - } - - static __isText (mimetype) { - return mimetype.startsWith('text/') || - mimetype === 'STRING' || - mimetype === 'UTF8_STRING'; - } - - static async fromJSON (jsonEntry) { - const mimetype = jsonEntry.mimetype || 'text/plain;charset=utf-8'; - const favorite = jsonEntry.favorite; - let bytes; - - if (ClipboardEntry.__isText(mimetype)) { - bytes = new TextEncoder().encode(jsonEntry.contents); - } - else { - const filename = jsonEntry.contents; - if (!GLib.file_test(filename, FileTest.EXISTS)) return null; - - let file = Gio.file_new_for_path(filename); - - const contentType = await file.query_info_async('*', FileQueryInfoFlags.NONE, GLib.PRIORITY_DEFAULT, null, (obj, res) => { - try { - const fileInfo = obj.query_info_finish(res); - return fileInfo.get_content_type(); - } catch (e) { - console.error(e); - } - }); - - if (contentType && !contentType.startsWith('image/') && !contentType.startsWith('text/')) { - bytes = new TextEncoder().encode(jsonEntry.contents); - } - else { - bytes = await new Promise((resolve, reject) => file.load_contents_async(null, (obj, res) => { - let [success, contents] = obj.load_contents_finish(res); - - if (success) { - resolve(contents); - } - else { - reject( - new Error('Clipboard Indicator: could not read image file from cache') - ); - } - })); - } - } - - return new ClipboardEntry(mimetype, bytes, favorite); - } - - constructor (mimetype, bytes, favorite) { - this.#mimetype = mimetype; - this.#bytes = bytes; - this.#favorite = favorite; - } - - #encode () { - if (this.isText()) { - return this.getStringValue(); - } - - return [...this.#bytes] - .map(x => x.toString(16).padStart(2, '0')) - .join(''); - } - - getStringValue () { - if (this.isImage()) { - return `[Image ${this.asBytes().hash()}]`; - } - return new TextDecoder().decode(this.#bytes); - } - - mimetype () { - return this.#mimetype; - } - - isFavorite () { - return this.#favorite; - } - - set favorite (val) { - this.#favorite = !!val; - } - - isText () { - return ClipboardEntry.__isText(this.#mimetype); - } - - isImage () { - return this.#mimetype.startsWith('image/'); - } - - asBytes () { - return GLib.Bytes.new(this.#bytes); - } - - equals (otherEntry) { - return this.getStringValue() === otherEntry.getStringValue(); - // this.asBytes().equal(otherEntry.asBytes()); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/schemas/gschemas.compiled b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/schemas/gschemas.compiled deleted file mode 100644 index 30815b42..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/schemas/gschemas.compiled and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/schemas/org.gnome.shell.extensions.clipboard-indicator.gschema.xml b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/schemas/org.gnome.shell.extensions.clipboard-indicator.gschema.xml deleted file mode 100644 index badd69d9..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/schemas/org.gnome.shell.extensions.clipboard-indicator.gschema.xml +++ /dev/null @@ -1,170 +0,0 @@ - - - - - true - Add button to paste an entry - - If true, adds another button to each menu entry that lets you immediately paste it - - - - - false - Display the pinned section on the bottom - - If true, places the "pinned" section on the bottom - - - - - true - Enable the deletion of clipboard items from your history - - If true, displays 'delete' buttons on each item, and a 'Clear History' option - - - - - 15 - The number of items to save in history - - - - - - 0 - What to display in top bar - - - - - true - Remove down arrow in top bar - - - - false - Clear clipboard history on every system reboot. - - - - 30 - Amount of visible characters for clipboard items - - The number of characters to display for every clipboard item in - the history menu - - - - - - 10 - Amount of visible characters in topbar - - The number of characters to display for current clipboard item in the topbar - - - - - - 5 - The allowed size for the registry cache file in MB - - If the cache overflows this limit, the file will be overriden. - High limit might cause slowness of shell startup. - - - - - - false - Disable the registry cache file for favorites and use memory only - - Contents which are not favorites are not stored and retrieved from a cache (registry.txt) file. - This can avoid writing passwords to a plaintext file, but at the cost of persistant history. - Your clipboard history, except favorite items, is lost after a gnome-shell session ends or the extension is reloaded. - - - - - false - Show notification on copy to clipboard - - If true, a notification is shown when content is copied to clipboard. - - - - - true - Show confirmation dialog on Clear History - - If true, a confirmation dialog is shown when attempting to Clear History. - - - - - false - Remove whitespace around text - - If true, white spaces around text will be removed. - - - - false - Move items to the top of the list when selected. - - If true, move items to the top of the list when it is selected. - - - - false - Keep selected item on clear - - Whether to keep the currently selected entry in the clipboard - after clearing the history - - - - true - Enable the keyboard shortcuts - - If true, user can delete and cycle through the history with keyboard shortcuts - - - - F10']]]> - Key to clear the history - - - - - F11']]]> - Key to cycle to the previous entry in the clipboard - - - - - F12']]]> - Next entry - - Key to cycle to the next entry in the clipboard - - - - F9']]]> - Toggle the menu - - Key to toggle the clipboard menu - - - - F8']]]> - Toggle "Private Mode" - - Key to toggle the private mode - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/stylesheet.css b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/stylesheet.css deleted file mode 100644 index 05665edf..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/clipboard-indicator@tudmotu.com/stylesheet.css +++ /dev/null @@ -1,75 +0,0 @@ -.clipboard-indicator-hbox.private-mode { - color: rgba(255,255,255,0.3); -} - -.ci-notification-label { - font-weight: bold; - color: #ffffff; - background-color: rgba(10,10,10,0.7); - border-radius: 6px; - font-size:2em; - padding:.5em; - width:400px; -} - -.ci-history-menu-section .popup-menu-item { - margin-right: .8em; -} - -.popup-menu-item .ci-action-btn StIcon { - icon-size:1.2em; - margin-left:.25em; -} - -.popup-menu-item StEntry StIcon { - icon-size:1em; - margin:0 .25em; -} - -.clipboard-indicator-empty-state { - width:350px; - color:#aaa; -} - -.clipboard-indicator-empty-state StIcon { - icon-size:5em; - margin-top:3em; -} - -.clipboard-indicator-empty-state StLabel { - margin:1em 0 3em 0; -} - -.ci-history-menu-section { - max-height:450px; -} - -.ci-main-menu-section StButton.ci-pin-btn { - color: rgba(255,255,255,0.3); -} - -.clipboard-hidden { - display:none!important; -} - -.clipboard-menu-icon { - width:1em; - height:1em; - margin-right:.5em; -} - -.clipboard-menu-img-preview { - border:solid 1px white; - overflow:hidden; - width:1.5em; - height:1.5em; - margin:0; - padding:0; -} - -.clipboard-indicator-img-preview { - border:solid 1px white; - width:1em; - height:1em; - margin-right:.25em; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/COPYING b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/COPYING deleted file mode 100644 index 8d61b15e..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/COPYING +++ /dev/null @@ -1,341 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/README.md b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/README.md deleted file mode 100644 index 53a8e81b..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/README.md +++ /dev/null @@ -1,194 +0,0 @@ -

- -

-

-   - - -   - - - -

- -![](media/design/png/dtp-main-p2.png) - -### Introduction - -Dash to Panel is an icon taskbar for Gnome Shell. This extension moves the dash into the gnome main panel so that the application launchers and system tray are combined into a single panel, similar to that found in KDE Plasma and Windows 7+. A separate dock is no longer needed for easy access to running and favorited applications. - -Beyond that, just about every aspect of the panel is fully customizable. From positioning and scaling panel elements to running indicators to multi-monitor display, to window previews and even intellihide, Dash to Panel has everything you need to make your workspace feel like home. - -### Features - -|Customizable appearance| -|:-----:| -|![screenshot](media/design/gif/customizable.gif)| -|Hide & show panel elements and set their positions, sizes & colors| - -## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Customizable running indicators
MetroCiliora/Dashes
CilioraSquares/Segmented
DashesDots/Solid
Set position, style, weight & color of running indicators to easily and quickly identify focused and unfocused applications
- -## - -|Live Previews on Hover| -|:-----:| -|![screenshot](media/design/gif/previews.gif)| -|Hover over the launcher icon for an open application to get a live window preview| - -## -|Launch by Number| -|:-----:| -|![](media/design/png/indicators-num.png.png)| -|Optionally launch your favorite applications via keyboard| - -## - -|Panel Intellihide| -|:-----:| -|![Intellihide](media/design/gif/Intellihide.gif)| -|Hide and reveal the panel according to your set preferences| - -## -|Additional Features|Feature Implemented| -|:-----|:-----:| -|Add "Show Desktop" button to panel|![](media/design/png/done.png)| -|Isolate running apps by workspaces and/or monitors|![](media/design/png/done.png)| -|Custom click behaviors (launch new window, cycle open windows, minimize, etc)|![](media/design/png/done.png)| -|Integrate native Gnome appMenu into right-click secondary menu|![](media/design/png/done.png)| -|Multi-monitor support|![](media/design/png/done.png)| -|Dynamic transparency|![](media/design/png/done.png)| -|Ungroup application windows|![](media/design/png/done.png)| -|Export and import settings|![](media/design/png/done.png)| -## - -### Installation - -**To install the most recent official release: -[Visit Dash-to-Panel at GNOME Extensions](https://extensions.gnome.org/extension/1160/dash-to-panel/)** - -To install a development version from source, please see the [Installation wiki page](https://github.com/home-sweet-gnome/dash-to-panel/wiki/Installation). - -## -### FAQ - -How do I customize the panel? [See the Wiki](https://github.com/home-sweet-gnome/dash-to-panel/wiki/Enable-and-Customize#customize-it) - -How do I embed my bottom left notification drawer into the panel like a system tray? [Top Icons Plus](https://extensions.gnome.org/extension/2311/topicons-plus) or [(K)StatusNotifierItem/AppIndicator Support](https://extensions.gnome.org/extension/615/appindicator-support) - -How do I add a traditional start menu? [Arc Menu](https://extensions.gnome.org/extension/3628/arcmenu/) - -How do I disable the hot corner? [No Topleft Hot Corner](https://extensions.gnome.org/extension/118/no-topleft-hot-corner) - -How do I move the notifications to somewhere other than the top center? [Notification Banner Reloaded](https://extensions.gnome.org/extension/4651/notification-banner-reloaded/) - -How do I display Minimize & Maximize buttons? In the Tweak Tool application, turn on `Windows > Titlebar Buttons > Minimize & Maximize`. - -How do I reset the extension to its default settings? `dconf reset -f /org/gnome/shell/extensions/dash-to-panel/`. - -## -### Themes -While this extension works well with most popular Gnome Shell themes, the following themes are known to have explicitly added custom styles for this extension: -- [Ciliora Tertia](https://github.com/zagortenay333/ciliora-tertia-shell) / [Ciliora Secunda](https://github.com/zagortenay333/ciliora-secunda-shell) -- [Plano](https://github.com/lassekongo83/plano-theme) - - -## -### Compatibility - -This extension has been tested with Gnome 3.18+. - -This extension manipulates the Gnome Main Panel, aka Top Bar. So, most other extensions which operate on the top bar should be compatible. - -## -### Volunteers needed! - -This extension could be even better with your help! Any items in the issue tracker labelled `help wanted` or `good first issue` are up for grabs. For more info, see the [Contributing wiki page](https://github.com/home-sweet-gnome/dash-to-panel/wiki/Contributing). - -## -### Credits - -This extension is developed and maintained by [@jderose9](https://github.com/jderose9) and [@charlesg99](https://github.com/charlesg99). - -Significant portions of code in this extension were derived from [Dash-to-Dock](https://micheleg.github.io/dash-to-dock/index.html). - -Additional credits: This extension leverages the work for [ZorinOS Taskbar](https://github.com/ZorinOS/zorin-taskbar) (used in [ZorinOS](https://zorinos.com/)) to show window previews and allow the dash from [Dash-to-Dock](https://micheleg.github.io/dash-to-dock/index.html) to be embedded in the Gnome main panel. -Code to set anchor position taken from [Thoma5/gnome-shell-extension-bottompanel](https://github.com/Thoma5/gnome-shell-extension-bottompanel). -Pattern for moving panel contents based on [Frippery Move Clock](http://frippery.org/extensions/) by R M Yorston. -Ideas for recursing child actors and assigning inline styles are based on code from the extension [StatusAreaHorizontalSpacing](https://bitbucket.org/mathematicalcoffee/status-area-horizontal-spacing-gnome-shell-extension). -## - -#### Thanks to the following people for contributing via pull requests: - -- @franglais125 for launching apps by number (w/ overlay), bug fixes, and issue support -- @LinxGem33 and @sbarrett322 for artwork, logos, screenshots and design effort -- @dziku1337 for peek mode in window previews -- @robrobinbin for configuring appMenu on/off in the panel -- @MartinPL for toggling favorites on/off in panel -- @jackwickham for thumbnail middle and right click actions -- @abakkk for centering the taskbar icons in the panel, and animated taskbar hovering -- @quasoft for changing of font weight of ungrouped application titles -- @jordanribera for using icon's dominant color as running indicator color -- @tper0700 for dynamically building context menu based on system capabilities -- @levacic for configurable minimized application title font color -- @l3nn4rt for toggling workspace switch popup -- @hlechner for adjustable show desktop line color and window preview icon size -- @ArtyomZorin for animated urgent icons -- @jvpessoa10 for additional click window cycle options -- @marksvc for assigning percent of display for panel length -- @philippun1 for GNOME 40 support :rocket: -- @HaselLoyance for toggle for notification counter badge -- @rastersoft for Desktop Icons NG integration - -#### Bug Fixes: -@imrvelj, @Teslator, @bil-elmoussaoui, @brandon-schumann, @sw9, @rockon999 , @lexruee, @3v1n0, @freeroot, @moqmar, @ArtyomZorin, @lkc0987, @saibotk, @vanillajonathan, @Zkdc, @leebickmtu, @l3nn4rt, @Melix19, @Aikatsui, @melix99, @kyrillzorin, @oneshadab, @CorvetteCole, @vantu5z, @spectreseven1138 - -#### Documentation Improvements: -@BoQsc, @zakkak, @dandv - -#### Translations: -@frnogueira / @victorwpbastos / @vagkaefer (pt_BR), @zeten30 (cs), @franglais125 / @calotam / @oeramirez (es), @LaurentTreguier / @SolarLiner (fr), @elsieholmes (uk), @hosiet (zh\_CN), @jonnius / @linuxr01 / @daPhipz (de), @urbalazs / @pappfer (hu), @crayxt (kk), @pkomur / @MartinPL / @alex4401 (pl), @AlexGluck / @GoodNike / @rjapolov / @vantu5z (ru), @sicklylife-jp / @ryonakano / @nexryai (ja), @oltulu / @TeknoMobil / @daenney (tr), @sbadux / @kowalski7cc / @l3nn4rt (it), @OriginCode / @pan93412 (zh\_TW), @ojn (sv), @frandieguez (gl), @kuroehanako / @MarongHappy (ko) - - -## -### License & Terms ![](media/design/png/copyleft-16.png) - -Dash to Panel is available under the terms of the GPL-v2 or later license See [`COPYING`](https://github.com/home-sweet-gnome/dash-to-panel/blob/master/COPYING) for details. - -![](https://img.shields.io/badge/Language-JavaScript-yellow.svg) ![](https://img.shields.io/badge/Licence-GPL--2.0-blue.svg) diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/appIcons.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/appIcons.js deleted file mode 100644 index c24e1339..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/appIcons.js +++ /dev/null @@ -1,1904 +0,0 @@ -/* - * This file is part of the Dash-To-Panel extension for Gnome 3 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * - * Credits: - * This file is based on code from the Dash to Dock extension by micheleg - * and code from the Taskbar extension by Zorin OS - * Some code was also adapted from the upstream Gnome Shell source code. - */ - - -import Clutter from 'gi://Clutter'; -import GLib from 'gi://GLib'; -import Gio from 'gi://Gio'; -import Graphene from 'gi://Graphene'; -import GObject from 'gi://GObject'; -import Mtk from 'gi://Mtk'; -import Shell from 'gi://Shell'; -import St from 'gi://St'; - -import * as AppDisplay from 'resource:///org/gnome/shell/ui/appDisplay.js'; -import * as AppMenu from 'resource:///org/gnome/shell/ui/appMenu.js'; -import * as Dash from 'resource:///org/gnome/shell/ui/dash.js'; -import * as DND from 'resource:///org/gnome/shell/ui/dnd.js'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js'; -import * as Util from 'resource:///org/gnome/shell/misc/util.js'; -import * as BoxPointer from 'resource:///org/gnome/shell/ui/boxpointer.js'; -import {EventEmitter} from 'resource:///org/gnome/shell/misc/signals.js'; - -import * as Utils from './utils.js'; -import * as PanelSettings from './panelSettings.js'; -import * as Taskbar from './taskbar.js'; -import * as Progress from './progress.js'; -import {DTP_EXTENSION, SETTINGS, DESKTOPSETTINGS, TERMINALSETTINGS, EXTENSION_PATH} from './extension.js'; -import {gettext as _, ngettext} from 'resource:///org/gnome/shell/extensions/extension.js'; - -//timeout names -const T2 = 'mouseScrollTimeout'; -const T3 = 'showDotsTimeout'; -const T4 = 'overviewWindowDragEndTimeout'; -const T5 = 'switchWorkspaceTimeout'; -const T6 = 'displayProperIndicatorTimeout'; - -//right padding defined for .overview-label in stylesheet.css -const TITLE_RIGHT_PADDING = 8; -const DOUBLE_CLICK_DELAY_MS = 450; - -let LABEL_GAP = 5; -let MAX_INDICATORS = 4; -export const DEFAULT_PADDING_SIZE = 4; - -let APPICON_STYLE = { - NORMAL: "NORMAL", - SYMBOLIC: "SYMBOLIC" -} - -let DOT_STYLE = { - DOTS: "DOTS", - SQUARES: "SQUARES", - DASHES: "DASHES", - SEGMENTED: "SEGMENTED", - CILIORA: "CILIORA", - METRO: "METRO", - SOLID: "SOLID" -} - -let DOT_POSITION = { - TOP: "TOP", - BOTTOM: "BOTTOM", - LEFT: 'LEFT', - RIGHT: 'RIGHT' -} - -let recentlyClickedAppLoopId = 0; -let recentlyClickedApp = null; -let recentlyClickedAppWindows = null; -let recentlyClickedAppIndex = 0; -let recentlyClickedAppMonitorIndex; - -let tracker = Shell.WindowTracker.get_default(); - -/** - * Extend AppIcon - * - * - Apply a css class based on the number of windows of each application (#N); - * - Draw a dot for each window of the application based on the default "dot" style which is hidden (#N); - * a class of the form "running#N" is applied to the AppWellIcon actor. - * like the original .running one. - * - add a .focused style to the focused app - * - Customize click actions. - * - Update minimization animation target - * - */ - -export const TaskbarAppIcon = GObject.registerClass({ -}, class TaskbarAppIcon extends AppDisplay.AppIcon { - - _init(appInfo, panel, iconParams, previewMenu, iconAnimator) { - this.dtpPanel = panel; - this._nWindows = 0; - this.window = appInfo.window; - this.isLauncher = appInfo.isLauncher; - this._previewMenu = previewMenu; - this.iconAnimator = iconAnimator; - this.lastClick = 0; - - super._init(appInfo.app, iconParams); - - this._timeoutsHandler = new Utils.TimeoutsHandler(); - - // Fix touchscreen issues before the listener is added by the parent constructor. - this._onTouchEvent = function(actor, event) { - if (event.type() == Clutter.EventType.TOUCH_BEGIN) { - // Open the popup menu on long press. - this._setPopupTimeout(); - } else if (this._menuTimeoutId != 0 && (event.type() == Clutter.EventType.TOUCH_END || event.type() == Clutter.EventType.TOUCH_CANCEL)) { - // Activate/launch the application. - this.activate(1); - this._removeMenuTimeout(); - } - // Disable dragging via touch screen as it's buggy as hell. Not perfect for tablet users, but the alternative is way worse. - // Also, EVENT_PROPAGATE launches applications twice with this solution, so this.activate(1) above must only be called if there's already a window. - return Clutter.EVENT_STOP; - }; - // Hack for missing TOUCH_END event. - this._onLeaveEvent = function(actor, event) { - this.fake_release(); - if (this._menuTimeoutId != 0) this.activate(1); // Activate/launch the application if TOUCH_END didn't fire. - this._removeMenuTimeout(); - }; - - - this._dot.set_width(0); - this._isGroupApps = SETTINGS.get_boolean('group-apps'); - - this._container = new St.Widget({ style_class: 'dtp-container', layout_manager: new Clutter.BinLayout() }); - this._dotsContainer = new St.Widget({ layout_manager: new Clutter.BinLayout() }); - this._dtpIconContainer = new St.Widget({ layout_manager: new Clutter.BinLayout(), style: getIconContainerStyle(panel.checkIfVertical()) }); - - this.remove_child(this._iconContainer); - - this._dtpIconContainer.add_child(this._iconContainer); - - if (appInfo.window) { - let box = new St.BoxLayout(); - - this._windowTitle = new St.Label({ - y_align: Clutter.ActorAlign.CENTER, - x_align: Clutter.ActorAlign.START, - style_class: 'overview-label' - }); - - this._updateWindowTitle(); - this._updateWindowTitleStyle(); - - this._scaleFactorChangedId = Utils.getStageTheme().connect('changed', () => this._updateWindowTitleStyle()); - - box.add_child(this._dtpIconContainer); - box.add_child(this._windowTitle); - - this._dotsContainer.add_child(box); - } else { - this._dotsContainer.add_child(this._dtpIconContainer); - } - - this._container.add_child(this._dotsContainer); - this.set_child(this._container); - - if (panel.checkIfVertical()) { - this.set_width(panel.geom.w); - } - - // Monitor windows-changes instead of app state. - // Keep using the same Id and function callback (that is extended) - if(this._stateChangedId > 0) { - this.app.disconnect(this._stateChangedId); - this._stateChangedId = 0; - } - - this._onAnimateAppiconHoverChanged(); - this._setAppIconPadding(); - this._setAppIconStyle(); - this._showDots(); - - this._focusWindowChangedId = global.display.connect('notify::focus-window', - this._onFocusAppChanged.bind(this)); - - this._windowEnteredMonitorId = this._windowLeftMonitorId = 0; - this._stateChangedId = this.app.connect('windows-changed', this.onWindowsChanged.bind(this)); - - if (!this.window) { - if (SETTINGS.get_boolean('isolate-monitors')) { - this._windowEnteredMonitorId = Utils.DisplayWrapper.getScreen().connect('window-entered-monitor', this.onWindowEnteredOrLeft.bind(this)); - this._windowLeftMonitorId = Utils.DisplayWrapper.getScreen().connect('window-left-monitor', this.onWindowEnteredOrLeft.bind(this)); - } - - this._titleWindowChangeId = 0; - this._minimizedWindowChangeId = 0; - } else { - this._titleWindowChangeId = this.window.connect('notify::title', - this._updateWindowTitle.bind(this)); - - this._minimizedWindowChangeId = this.window.connect('notify::minimized', - this._updateWindowTitleStyle.bind(this)); - } - - this._scrollEventId = this.connect('scroll-event', this._onMouseScroll.bind(this)); - - this._overviewWindowDragEndId = Main.overview.connect('window-drag-end', - this._onOverviewWindowDragEnd.bind(this)); - - this._switchWorkspaceId = global.window_manager.connect('switch-workspace', - this._onSwitchWorkspace.bind(this)); - - this._hoverChangeId = this.connect('notify::hover', () => this._onAppIconHoverChanged()); - - this._dtpSettingsSignalIds = [ - SETTINGS.connect('changed::animate-appicon-hover', this._onAnimateAppiconHoverChanged.bind(this)), - SETTINGS.connect('changed::dot-position', this._settingsChangeRefresh.bind(this)), - SETTINGS.connect('changed::dot-size', this._settingsChangeRefresh.bind(this)), - SETTINGS.connect('changed::dot-style-focused', this._settingsChangeRefresh.bind(this)), - SETTINGS.connect('changed::dot-style-unfocused', this._settingsChangeRefresh.bind(this)), - SETTINGS.connect('changed::dot-color-dominant', this._settingsChangeRefresh.bind(this)), - SETTINGS.connect('changed::dot-color-override', this._settingsChangeRefresh.bind(this)), - SETTINGS.connect('changed::dot-color-1', this._settingsChangeRefresh.bind(this)), - SETTINGS.connect('changed::dot-color-2', this._settingsChangeRefresh.bind(this)), - SETTINGS.connect('changed::dot-color-3', this._settingsChangeRefresh.bind(this)), - SETTINGS.connect('changed::dot-color-4', this._settingsChangeRefresh.bind(this)), - SETTINGS.connect('changed::dot-color-unfocused-different', this._settingsChangeRefresh.bind(this)), - SETTINGS.connect('changed::dot-color-unfocused-1', this._settingsChangeRefresh.bind(this)), - SETTINGS.connect('changed::dot-color-unfocused-2', this._settingsChangeRefresh.bind(this)), - SETTINGS.connect('changed::dot-color-unfocused-3', this._settingsChangeRefresh.bind(this)), - SETTINGS.connect('changed::dot-color-unfocused-4', this._settingsChangeRefresh.bind(this)), - SETTINGS.connect('changed::focus-highlight', this._settingsChangeRefresh.bind(this)), - SETTINGS.connect('changed::focus-highlight-dominant', this._settingsChangeRefresh.bind(this)), - SETTINGS.connect('changed::focus-highlight-color', this._settingsChangeRefresh.bind(this)), - SETTINGS.connect('changed::focus-highlight-opacity', this._settingsChangeRefresh.bind(this)), - SETTINGS.connect('changed::group-apps-label-font-size', this._updateWindowTitleStyle.bind(this)), - SETTINGS.connect('changed::group-apps-label-font-weight', this._updateWindowTitleStyle.bind(this)), - SETTINGS.connect('changed::group-apps-label-font-color', this._updateWindowTitleStyle.bind(this)), - SETTINGS.connect('changed::group-apps-label-font-color-minimized', this._updateWindowTitleStyle.bind(this)), - SETTINGS.connect('changed::group-apps-label-max-width', this._updateWindowTitleStyle.bind(this)), - SETTINGS.connect('changed::group-apps-use-fixed-width', this._updateWindowTitleStyle.bind(this)), - SETTINGS.connect('changed::group-apps-underline-unfocused', this._settingsChangeRefresh.bind(this)) - ] - - this._progressIndicator = new Progress.ProgressIndicator(this, panel.progressManager); - - this._numberOverlay(); - } - - getDragActor() { - return this.app.create_icon_texture(this.dtpPanel.taskbar.iconSize); - } - - // Used by TaskbarItemContainer to animate appIcons on hover - getCloneButton() { - // The source of the clone is this._container, - // using this.actor directly would break DnD style. - let clone = new Clutter.Clone({ - source: this.child, - x: this.child.x, y: this.child.y, - width: this.child.width, height: this.child.height, - pivot_point: new Graphene.Point({ x: 0.5, y: 0.5 }), - opacity: 255, - reactive: false, - x_align: Clutter.ActorAlign.CENTER, y_align: Clutter.ActorAlign.CENTER, - }); - - clone._delegate = this._delegate; - - // "clone" of this.actor - return new St.Button({ - child: clone, - x: this.x, y: this.y, - width: this.width, height: this.height, - reactive: false, - }); - } - - shouldShowTooltip() { - if (!SETTINGS.get_boolean('show-tooltip') || - (!this.isLauncher && SETTINGS.get_boolean("show-window-previews") && - this.getAppIconInterestingWindows().length > 0)) { - return false; - } else { - return this.hover && !this.window && - (!this._menu || !this._menu.isOpen) && - (this._previewMenu.getCurrentAppIcon() !== this); - } - } - - _onAppIconHoverChanged() { - if (!SETTINGS.get_boolean('show-window-previews') || - (!this.window && !this._nWindows)) { - return; - } - - if (this.hover) { - this._previewMenu.requestOpen(this); - } else { - this._previewMenu.requestClose(); - } - } - - _onDestroy() { - super._onDestroy(); - - this._timeoutsHandler.destroy(); - - this._previewMenu.close(true); - - // Disconect global signals - if (this._stateChangedId > 0) { - this.app.disconnect(this._stateChangedId); - this._stateChangedId = 0; - } - - if(this._overviewWindowDragEndId) - Main.overview.disconnect(this._overviewWindowDragEndId); - - if(this._focusWindowChangedId) - global.display.disconnect(this._focusWindowChangedId); - - if(this._titleWindowChangeId) - this.window.disconnect(this._titleWindowChangeId); - - if(this._minimizedWindowChangeId) - this.window.disconnect(this._minimizedWindowChangeId); - - if (this._windowEnteredMonitorId) { - Utils.DisplayWrapper.getScreen().disconnect(this._windowEnteredMonitorId); - Utils.DisplayWrapper.getScreen().disconnect(this._windowLeftMonitorId); - } - - if(this._switchWorkspaceId) - global.window_manager.disconnect(this._switchWorkspaceId); - - if(this._scaleFactorChangedId) - Utils.getStageTheme().disconnect(this._scaleFactorChangedId); - - if (this._hoverChangeId) { - this.disconnect(this._hoverChangeId); - } - - if (this._scrollEventId) { - this.disconnect(this._scrollEventId); - } - - for (let i = 0; i < this._dtpSettingsSignalIds.length; ++i) { - SETTINGS.disconnect(this._dtpSettingsSignalIds[i]); - } - } - - onWindowsChanged() { - this._updateWindows(); - this.updateIcon(); - - if (this._isGroupApps) - this._setIconStyle(); - } - - onWindowEnteredOrLeft(display, number, metaWindow) { - if (number > 0 && tracker.get_window_app(metaWindow) == this.app) { - this._updateWindows(); - this._displayProperIndicator(); - } - } - - updateTitleStyle() { - this._updateWindowTitleStyle(); - } - - // Update indicator and target for minimization animation - updateIcon() { - - // If (for unknown reason) the actor is not on the stage the reported size - // and position are random values, which might exceeds the integer range - // resulting in an error when assigned to the a rect. This is a more like - // a workaround to prevent flooding the system with errors. - if (this.get_stage() == null) - return; - - let rect = new Mtk.Rectangle(); - - [rect.x, rect.y] = this.get_transformed_position(); - [rect.width, rect.height] = this.get_transformed_size(); - - let windows = this.window ? [this.window] : this.getAppIconInterestingWindows(true); - windows.forEach(function(w) { - w.set_icon_geometry(rect); - }); - } - - _onAnimateAppiconHoverChanged() { - if (SETTINGS.get_boolean('animate-appicon-hover')) { - this._container.add_style_class_name('animate-appicon-hover'); - - // Workaround to prevent scaled icon from being ugly when it is animated on hover. - // It increases the "resolution" of the icon without changing the icon size. - this.icon.createIcon = (iconSize) => this.app.create_icon_texture(2 * iconSize); - this._iconIconBinActorAddedId = this.icon._iconBin.connect('child-added', () => { - let size = this.icon.iconSize * Utils.getScaleFactor() - - if (this.icon._iconBin.child.mapped) { - this.icon._iconBin.child.set_size(size, size); - } else { - let iconMappedId = this.icon._iconBin.child.connect('notify::mapped', () => { - this.icon._iconBin.child.set_size(size, size); - this.icon._iconBin.child.disconnect(iconMappedId); - }); - } - }); - if (this.icon._iconBin.child) - this.icon._createIconTexture(this.icon.iconSize); - } else { - this._container.remove_style_class_name('animate-appicon-hover'); - - if (this._iconIconBinActorAddedId) { - this.icon._iconBin.disconnect(this._iconIconBinActorAddedId); - this._iconIconBinActorAddedId = 0; - this.icon.createIcon = this._createIcon.bind(this); - } - } - } - - _onMouseScroll(actor, event) { - let scrollAction = SETTINGS.get_string('scroll-icon-action'); - - if (scrollAction === 'PASS_THROUGH') { - return this.dtpPanel._onPanelMouseScroll(actor, event); - } else if (scrollAction === 'NOTHING' || (!this.window && !this._nWindows)) { - return; - } - - let direction = Utils.getMouseScrollDirection(event); - - if (direction && !this._timeoutsHandler.getId(T2)) { - this._timeoutsHandler.add([T2, SETTINGS.get_int('scroll-icon-delay'), () => {}]); - - let windows = this.getAppIconInterestingWindows(); - - windows.sort(Taskbar.sortWindowsCompareFunction); - Utils.activateSiblingWindow(windows, direction, this.window); - } - } - - _showDots() { - // Just update style if dots already exist - if (this._focusedDots && this._unfocusedDots) { - this._updateWindows(); - return; - } - - if (!this._isGroupApps) { - this._focusedDots = new St.Widget({ - layout_manager: new Clutter.BinLayout(), - x_expand: true, y_expand: true, - visible: false - }); - - let mappedId = this.connect('notify::mapped', () => { - this._displayProperIndicator(); - this.disconnect(mappedId); - }); - } else { - this._focusedDots = new St.DrawingArea(), - this._unfocusedDots = new St.DrawingArea(); - - this._focusedDots.connect('repaint', () => { - if (!this._dashItemContainer.animatingOut) - // don't draw and trigger more animations if the icon is in the middle of - // being removed from the panel - this._drawRunningIndicator(this._focusedDots, SETTINGS.get_string('dot-style-focused'), true); - }); - - this._unfocusedDots.connect('repaint', () => { - if (!this._dashItemContainer.animatingOut) - this._drawRunningIndicator(this._unfocusedDots, SETTINGS.get_string('dot-style-unfocused'), false); - }); - - this._dotsContainer.add_child(this._unfocusedDots); - - this._updateWindows(); - - this._timeoutsHandler.add([T3, 0, () => { - this._resetDots(); - this._displayProperIndicator(); - }]); - } - - this._dotsContainer.add_child(this._focusedDots); - } - - _resetDots() { - let position = SETTINGS.get_string('dot-position'); - let isHorizontalDots = position == DOT_POSITION.TOP || position == DOT_POSITION.BOTTOM; - let sizeProp = isHorizontalDots ? 'width' : 'height'; - let focusedDotStyle = SETTINGS.get_string('dot-style-focused'); - let unfocusedDotStyle = SETTINGS.get_string('dot-style-unfocused'); - - this._focusedIsWide = this._isWideDotStyle(focusedDotStyle); - this._unfocusedIsWide = this._isWideDotStyle(unfocusedDotStyle); - - [, this._containerSize] = this._container[`get_preferred_${sizeProp}`](-1); - - [this._focusedDots, this._unfocusedDots].forEach(d => { - d.set_size(-1, -1); - d.x_expand = d.y_expand = false; - - d[sizeProp] = 1; - d[(isHorizontalDots ? 'y' : 'x') + '_expand'] = true; - }); - } - - _settingsChangeRefresh() { - if (this._isGroupApps) { - this._updateWindows(); - this._resetDots(); - this._focusedDots.queue_repaint(); - this._unfocusedDots.queue_repaint(); - } - - this._displayProperIndicator(); - } - - _updateWindowTitleStyle() { - if (this._windowTitle) { - let useFixedWidth = SETTINGS.get_boolean('group-apps-use-fixed-width'); - let fontWeight = SETTINGS.get_string('group-apps-label-font-weight'); - let fontScale = DESKTOPSETTINGS.get_double('text-scaling-factor'); - let fontColor = this.window.minimized ? - SETTINGS.get_string('group-apps-label-font-color-minimized') : - SETTINGS.get_string('group-apps-label-font-color'); - let scaleFactor = Utils.getScaleFactor(); - let maxLabelWidth = SETTINGS.get_int('group-apps-label-max-width') * scaleFactor; - let variableWidth = !useFixedWidth || this.dtpPanel.checkIfVertical() || this.dtpPanel.taskbar.fullScrollView; - - this._windowTitle[(maxLabelWidth > 0 ? 'show' : 'hide')](); - this._windowTitle.set_width(variableWidth ? -1 : maxLabelWidth + TITLE_RIGHT_PADDING * scaleFactor); - - this._windowTitle.clutter_text.natural_width = useFixedWidth ? maxLabelWidth : 0; - this._windowTitle.clutter_text.natural_width_set = useFixedWidth; - - this._windowTitle.set_style('font-size: ' + SETTINGS.get_int('group-apps-label-font-size') * fontScale + 'px;' + - 'font-weight: ' + fontWeight + ';' + - (useFixedWidth ? '' : 'max-width: ' + maxLabelWidth + 'px;') + - 'color: ' + fontColor); - } - } - - _updateWindowTitle() { - if (this._windowTitle.text != this.window.title) { - this._windowTitle.text = (this.window.title ? this.window.title : this.app.get_name()).replace(/\r?\n|\r/g, '').trim(); - - if (this._focusedDots) { - this._displayProperIndicator(); - } - } - } - - _setIconStyle(isFocused) { - let inlineStyle = 'margin: 0;'; - - if(SETTINGS.get_boolean('focus-highlight') && - this._checkIfFocusedApp() && !this.isLauncher && - (!this.window || isFocused) && !this._isThemeProvidingIndicator() && this._checkIfMonitorHasFocus()) { - let focusedDotStyle = SETTINGS.get_string('dot-style-focused'); - let pos = SETTINGS.get_string('dot-position'); - let highlightMargin = this._focusedIsWide ? SETTINGS.get_int('dot-size') : 0; - - if(!this.window) { - let containerWidth = this._dtpIconContainer.get_width() / Utils.getScaleFactor(); - let backgroundSize = containerWidth + "px " + - (containerWidth - (pos == DOT_POSITION.BOTTOM ? highlightMargin : 0)) + "px;"; - - if (focusedDotStyle == DOT_STYLE.CILIORA || focusedDotStyle == DOT_STYLE.SEGMENTED) - highlightMargin += 1; - - if (this._nWindows > 1 && focusedDotStyle == DOT_STYLE.METRO) { - let bgSvg = '/img/highlight_stacked_bg'; - - if (pos == DOT_POSITION.LEFT || pos == DOT_POSITION.RIGHT) { - bgSvg += (this.dtpPanel.checkIfVertical() ? '_2' : '_3'); - } - - inlineStyle += "background-image: url('" + EXTENSION_PATH + bgSvg + ".svg');" + - "background-position: 0 " + (pos == DOT_POSITION.TOP ? highlightMargin : 0) + "px;" + - "background-size: " + backgroundSize; - } - } - - let highlightColor = this._getFocusHighlightColor(); - inlineStyle += "background-color: " + cssHexTocssRgba(highlightColor, SETTINGS.get_int('focus-highlight-opacity') * 0.01); - } - - if(this._dotsContainer.get_style() != inlineStyle) { - this._dotsContainer.set_style(inlineStyle); - } - } - - _checkIfFocusedApp() { - return tracker.focus_app == this.app; - } - - _checkIfMonitorHasFocus() { - return global.display.focus_window && - (!SETTINGS.get_boolean('multi-monitors') || // only check same monitor index if multi window is enabled. - !SETTINGS.get_boolean('isolate-monitors') || - global.display.focus_window.get_monitor() === this.dtpPanel.monitor.index); - } - - _setAppIconPadding() { - let padding = getIconPadding(this.dtpPanel.monitor.index); - let margin = SETTINGS.get_int('appicon-margin'); - - this.set_style('padding:' + (this.dtpPanel.checkIfVertical() ? margin + 'px 0' : '0 ' + margin + 'px;')); - this._iconContainer.set_style('padding: ' + padding + 'px;'); - } - - _setAppIconStyle() { - let symbolic_icon_style_name = 'symbolic-icon-style'; - if (SETTINGS.get_string('appicon-style') === APPICON_STYLE.SYMBOLIC) { - this.add_style_class_name(symbolic_icon_style_name); - } else { - this.remove_style_class_name(symbolic_icon_style_name); - } - } - - popupMenu() { - this._removeMenuTimeout(); - this.fake_release(); - - if (!this._menu) { - this._menu = new TaskbarSecondaryMenu(this, this.dtpPanel.geom.position); - this._menu.setApp(this.app); - this._menu.connect('open-state-changed', (menu, isPoppedUp) => { - if (!isPoppedUp) - this._onMenuPoppedDown(); - else - this._previewMenu.close(true); - }); - let id = Main.overview.connect('hiding', () => { - this._menu.close(); - }); - this.connect('destroy', () => { - Main.overview.disconnect(id); - }); - - // We want to keep the item hovered while the menu is up - this._menu.blockSourceEvents = true; - - Main.uiGroup.add_child(this._menu.actor); - this._menuManager.addMenu(this._menu); - } - this._menu.updateQuitText(); - - this.emit('menu-state-changed', true); - - this.set_hover(true); - this._menu.open(BoxPointer.PopupAnimation.FULL); - this._menuManager.ignoreRelease(); - this.emit('sync-tooltip'); - - return false; - } - - _onFocusAppChanged(windowTracker) { - this._displayProperIndicator(); - } - - _onOverviewWindowDragEnd(windowTracker) { - this._timeoutsHandler.add([T4, 0, () => { - if (SETTINGS.get_boolean('isolate-workspaces')) - this._updateWindows() - - this._displayProperIndicator() - }]); - } - - _onSwitchWorkspace(windowTracker) { - if (this._isGroupApps) { - this._timeoutsHandler.add([T5, 0, () => this._displayProperIndicator()]); - } else { - this._displayProperIndicator(); - } - } - - _displayProperIndicator() { - let isFocused = this._isFocusedWindow(); - let position = SETTINGS.get_string('dot-position'); - let isHorizontalDots = position == DOT_POSITION.TOP || position == DOT_POSITION.BOTTOM; - - this._setIconStyle(isFocused); - - if(!this._isGroupApps) { - if (this.window && (SETTINGS.get_boolean('group-apps-underline-unfocused') || isFocused)) { - let align = Clutter.ActorAlign[position == DOT_POSITION.TOP || position == DOT_POSITION.LEFT ? 'START' : 'END']; - - this._focusedDots.set_size(0, 0); - this._focusedDots[isHorizontalDots ? 'height' : 'width'] = this._getRunningIndicatorSize(); - - this._focusedDots.y_align = this._focusedDots.x_align = Clutter.ActorAlign.FILL; - this._focusedDots[(isHorizontalDots ? 'y' : 'x') + '_align'] = align; - this._focusedDots.background_color = this._getRunningIndicatorColor(isFocused); - this._focusedDots.show(); - } else if (this._focusedDots.visible) { - this._focusedDots.hide(); - } - } else { - let sizeProp = isHorizontalDots ? 'width' : 'height'; - let newFocusedDotsSize = 0; - let newFocusedDotsOpacity = 0; - let newUnfocusedDotsSize = 0; - let newUnfocusedDotsOpacity = 0; - - isFocused = this._checkIfFocusedApp() && this._checkIfMonitorHasFocus(); - - this._timeoutsHandler.add([T6, 0, () => { - if(isFocused) - this.add_style_class_name('focused'); - else - this.remove_style_class_name('focused'); - }]); - - if(this._focusedIsWide) { - newFocusedDotsSize = (isFocused && this._nWindows > 0) ? this._containerSize : 0; - newFocusedDotsOpacity = 255; - } else { - newFocusedDotsSize = this._containerSize; - newFocusedDotsOpacity = (isFocused && this._nWindows > 0) ? 255 : 0; - } - - if(this._unfocusedIsWide) { - newUnfocusedDotsSize = (!isFocused && this._nWindows > 0) ? this._containerSize : 0; - newUnfocusedDotsOpacity = 255; - } else { - newUnfocusedDotsSize = this._containerSize; - newUnfocusedDotsOpacity = (!isFocused && this._nWindows > 0) ? 255 : 0; - } - - // Only animate if... - // animation is enabled in settings - // AND (going from a wide style to a narrow style indicator or vice-versa - // OR going from an open app to a closed app or vice versa) - let animate = SETTINGS.get_boolean('animate-app-switch') && - ((this._focusedIsWide != this._unfocusedIsWide) || - (this._focusedDots[sizeProp] != newUnfocusedDotsSize || this._unfocusedDots[sizeProp] != newFocusedDotsSize)) - let duration = animate ? Taskbar.DASH_ANIMATION_TIME : 0.001; - - this._animateDotDisplay(this._focusedDots, newFocusedDotsSize, this._unfocusedDots, newUnfocusedDotsOpacity, sizeProp, duration); - this._animateDotDisplay(this._unfocusedDots, newUnfocusedDotsSize, this._focusedDots, newFocusedDotsOpacity, sizeProp, duration); - } - } - - _animateDotDisplay(dots, newSize, otherDots, newOtherOpacity, sizeProp, duration) { - Utils.stopAnimations(dots) - - let tweenOpts = { - time: duration, - transition: 'easeInOutCubic', - onComplete: () => { - if(newOtherOpacity > 0) - otherDots.opacity = newOtherOpacity; - } - }; - - if(newOtherOpacity == 0) - otherDots.opacity = newOtherOpacity; - - tweenOpts[sizeProp] = newSize; - - Utils.animate(dots, tweenOpts); - } - - _isFocusedWindow() { - let focusedWindow = global.display.focus_window; - - while (focusedWindow) { - if (focusedWindow == this.window) { - return true; - } - - focusedWindow = focusedWindow.get_transient_for(); - } - - return false; - } - - _isWideDotStyle(dotStyle) { - return dotStyle == DOT_STYLE.SEGMENTED || - dotStyle == DOT_STYLE.CILIORA || - dotStyle == DOT_STYLE.METRO || - dotStyle == DOT_STYLE.SOLID; - } - - _isThemeProvidingIndicator() { - // This is an attempt to determine if the theme is providing their own - // running indicator by way of a border image on the icon, for example in - // the theme Ciliora - return (this.icon.get_stage() && - this.icon.get_theme_node().get_border_image()); - } - - activate(button, modifiers, handleAsGrouped) { - let event = Clutter.get_current_event(); - - modifiers = event ? event.get_state() : modifiers || 0; - - // Only consider SHIFT and CONTROL as modifiers (exclude SUPER, CAPS-LOCK, etc.) - modifiers = modifiers & (Clutter.ModifierType.SHIFT_MASK | Clutter.ModifierType.CONTROL_MASK); - - let ctrlPressed = modifiers & Clutter.ModifierType.CONTROL_MASK - - if (ctrlPressed) { - // CTRL-click or hotkey with ctrl - return this._launchNewInstance(true); - } - - // We check what type of click we have and if the modifier SHIFT is - // being used. We then define what buttonAction should be for this - // event. - let buttonAction = 0; - let doubleClick; - - if (button && button == 2 ) { - if (modifiers & Clutter.ModifierType.SHIFT_MASK) - buttonAction = SETTINGS.get_string('shift-middle-click-action'); - else - buttonAction = SETTINGS.get_string('middle-click-action'); - } - // fixed issue #1676 by checking for button 0 or 1 to also handle touchscreen - // input, probably not the proper fix as i'm not aware button 0 should exist - // but from using this fix for months it seems to not create any issues - else if (button === 0 || button === 1) { - let now = global.get_current_time() - - doubleClick = now - this.lastClick < DOUBLE_CLICK_DELAY_MS - this.lastClick = now - - if (modifiers & Clutter.ModifierType.SHIFT_MASK) - buttonAction = SETTINGS.get_string('shift-click-action'); - else - buttonAction = SETTINGS.get_string('click-action'); - } - - let closePreview = () => this._previewMenu.close(SETTINGS.get_boolean('window-preview-hide-immediate-click')); - let appCount = this.getAppIconInterestingWindows().length; - let previewedAppIcon = this._previewMenu.getCurrentAppIcon(); - - if (this.window || buttonAction != 'TOGGLE-SHOWPREVIEW') - closePreview() - - // We check if the app is running, and that the # of windows is > 0 in - // case we use workspace isolation, - let appIsRunning = this.app.state == Shell.AppState.RUNNING && appCount > 0; - - // We customize the action only when the application is already running - if (appIsRunning && !this.isLauncher) { - if (this.window && !handleAsGrouped) { - //ungrouped applications behaviors - switch (buttonAction) { - case 'RAISE': case 'CYCLE': case 'CYCLE-MIN': case 'MINIMIZE': case 'TOGGLE-SHOWPREVIEW': case 'TOGGLE-CYCLE': - if (!Main.overview._shown && - (buttonAction == 'MINIMIZE' || buttonAction == 'TOGGLE-SHOWPREVIEW' || buttonAction == 'TOGGLE-CYCLE' || buttonAction == 'CYCLE-MIN') && - (this._isFocusedWindow() || (buttonAction == 'MINIMIZE' && (button == 2 || modifiers & Clutter.ModifierType.SHIFT_MASK)))) { - this.window.minimize(); - } else { - Main.activateWindow(this.window); - } - - break; - - case "LAUNCH": - this._launchNewInstance(); - break; - - case "QUIT": - this.window.delete(global.get_current_time()); - break; - } - } else { - //grouped application behaviors - let monitor = this.dtpPanel.monitor; - let appHasFocus = this._checkIfFocusedApp() && this._checkIfMonitorHasFocus(); - - switch (buttonAction) { - case "RAISE": - activateAllWindows(this.app, monitor); - break; - - case "LAUNCH": - this._launchNewInstance(); - break; - - case "MINIMIZE": - // In overview just activate the app, unless the acion is explicitely - // requested with a keyboard modifier - if (!Main.overview._shown || modifiers){ - // If we have button=2 or a modifier, allow minimization even if - // the app is not focused - if (appHasFocus || button == 2 || modifiers & Clutter.ModifierType.SHIFT_MASK) { - // minimize all windows on double click and always in the case of primary click without - // additional modifiers - let all_windows = (button == 1 && ! modifiers) || doubleClick; - minimizeWindow(this.app, all_windows, monitor); - } - else - activateAllWindows(this.app, monitor); - } - else - this.app.activate(); - break; - - case "CYCLE": - if (!Main.overview._shown){ - if (appHasFocus) - cycleThroughWindows(this.app, false, false, monitor); - else { - activateFirstWindow(this.app, monitor); - } - } - else - this.app.activate(); - break; - case "CYCLE-MIN": - if (!Main.overview._shown){ - if (appHasFocus || (recentlyClickedApp == this.app && recentlyClickedAppWindows[recentlyClickedAppIndex % recentlyClickedAppWindows.length] == "MINIMIZE")) - cycleThroughWindows(this.app, false, true, monitor); - else { - activateFirstWindow(this.app, monitor); - } - } - else - this.app.activate(); - break; - case "TOGGLE-SHOWPREVIEW": - if (!Main.overview._shown) { - if (appCount == 1) { - closePreview() - - if (appHasFocus) - minimizeWindow(this.app, false, monitor); - else - activateFirstWindow(this.app, monitor); - } else { - if (doubleClick) { - // minimize all windows if double clicked - closePreview() - minimizeWindow(this.app, true, monitor); - } else if (previewedAppIcon != this) { - this._previewMenu.open(this); - } - - this.emit('sync-tooltip'); - } - } - else - this.app.activate(); - break; - case "TOGGLE-CYCLE": - if (!Main.overview._shown) { - if (appCount == 1) { - if (appHasFocus) - minimizeWindow(this.app, false, monitor); - else - activateFirstWindow(this.app, monitor); - } else { - cycleThroughWindows(this.app, false, false, monitor); - } - } - else - this.app.activate(); - break; - case "QUIT": - closeAllWindows(this.app, monitor); - break; - } - } - } - else { - this._launchNewInstance(); - } - - global.display.emit('grab-op-begin', null, null); - Main.overview.hide(); - } - - _launchNewInstance(ctrlPressed) { - let maybeAnimate = () => SETTINGS.get_boolean('animate-window-launch') && this.animateLaunch() - - if ((ctrlPressed || this.app.state == Shell.AppState.RUNNING) && - this.app.can_open_new_window()) { - maybeAnimate(); - this.app.open_new_window(-1); - } else { - let windows = this.window ? [this.window] : this.app.get_windows(); - - if (windows.length) { - Main.activateWindow(windows[0]); - } else { - maybeAnimate(); - this.app.activate(); - } - } - } - - _updateWindows() { - let windows = [this.window]; - - if (!this.window) { - windows = this.getAppIconInterestingWindows(); - - this._nWindows = windows.length; - - for (let i = 1; i <= MAX_INDICATORS; i++){ - let className = 'running'+i; - if(i != this._nWindows) - this.remove_style_class_name(className); - else - this.add_style_class_name(className); - } - } - - this._previewMenu.update(this, windows); - } - - _getRunningIndicatorCount() { - return Math.min(this._nWindows, MAX_INDICATORS); - } - - _getRunningIndicatorSize() { - return SETTINGS.get_int('dot-size') * Utils.getScaleFactor(); - } - - _getRunningIndicatorColor(isFocused) { - let color; - const fallbackColor = new Utils.ColorUtils.Color({ red: 82, green: 148, blue: 226, alpha: 255 }); - - if (SETTINGS.get_boolean('dot-color-dominant')) { - let dce = new Utils.DominantColorExtractor(this.app); - let palette = dce._getColorPalette(); - if (palette) { - color = Utils.ColorUtils.color_from_string(palette.original)[1]; - } else { // unable to determine color, fall back to theme - let themeNode = this._dot.get_theme_node(); - color = themeNode.get_background_color(); - - // theme didn't provide one, use a default - if(color.alpha == 0) color = fallbackColor; - } - } else if(SETTINGS.get_boolean('dot-color-override')) { - let dotColorSettingPrefix = 'dot-color-'; - - if(!isFocused && SETTINGS.get_boolean('dot-color-unfocused-different')) - dotColorSettingPrefix = 'dot-color-unfocused-'; - - color = Utils.ColorUtils.color_from_string(SETTINGS.get_string(dotColorSettingPrefix + (this._getRunningIndicatorCount() || 1) ))[1]; - } else { - // Re-use the style - background color, and border width and color - - // of the default dot - let themeNode = this._dot.get_theme_node(); - color = themeNode.get_background_color(); - - // theme didn't provide one, use a default - if(color.alpha == 0) color = fallbackColor; - } - - return color; - } - - _getFocusHighlightColor() { - if (SETTINGS.get_boolean('focus-highlight-dominant')) { - let dce = new Utils.DominantColorExtractor(this.app); - let palette = dce._getColorPalette(); - if (palette) return palette.original; - } - return SETTINGS.get_string('focus-highlight-color'); - } - - _drawRunningIndicator(area, type, isFocused) { - let n = this._getRunningIndicatorCount(); - - if (!n) { - return; - } - - let position = SETTINGS.get_string('dot-position'); - let isHorizontalDots = position == DOT_POSITION.TOP || position == DOT_POSITION.BOTTOM; - let bodyColor = this._getRunningIndicatorColor(isFocused); - let [areaWidth, areaHeight] = area.get_surface_size(); - let cr = area.get_context(); - let size = this._getRunningIndicatorSize(); - - let areaSize = areaWidth; - let startX = 0; - let startY = 0; - - if (isHorizontalDots) { - if (position == DOT_POSITION.BOTTOM) { - startY = areaHeight - size; - } - } else { - areaSize = areaHeight; - - if (position == DOT_POSITION.RIGHT) { - startX = areaWidth - size; - } - } - - if (type == DOT_STYLE.SOLID || type == DOT_STYLE.METRO) { - if (type == DOT_STYLE.SOLID || n <= 1) { - cr.translate(startX, startY); - cr.setSourceColor(bodyColor); - cr.newSubPath(); - cr.rectangle.apply(cr, [0, 0].concat(isHorizontalDots ? [areaSize, size] : [size, areaSize])); - cr.fill(); - } else { - let blackenedLength = (1 / 48) * areaSize; // need to scale with the SVG for the stacked highlight - let darkenedLength = isFocused ? (2 / 48) * areaSize : (10 / 48) * areaSize; - let blackenedColor = new Utils.ColorUtils.Color({ red: bodyColor.red * .3, green: bodyColor.green * .3, blue: bodyColor.blue * .3, alpha: bodyColor.alpha }); - let darkenedColor = new Utils.ColorUtils.Color({ red: bodyColor.red * .7, green: bodyColor.green * .7, blue: bodyColor.blue * .7, alpha: bodyColor.alpha }); - let solidDarkLength = areaSize - darkenedLength; - let solidLength = solidDarkLength - blackenedLength; - - cr.translate(startX, startY); - - cr.setSourceColor(bodyColor); - cr.newSubPath(); - cr.rectangle.apply(cr, [0, 0].concat(isHorizontalDots ? [solidLength, size] : [size, solidLength])); - cr.fill(); - cr.setSourceColor(blackenedColor); - cr.newSubPath(); - cr.rectangle.apply(cr, isHorizontalDots ? [solidLength, 0, 1, size] : [0, solidLength, size, 1]); - cr.fill(); - cr.setSourceColor(darkenedColor); - cr.newSubPath(); - cr.rectangle.apply(cr, isHorizontalDots ? [solidDarkLength, 0, darkenedLength, size] : [0, solidDarkLength, size, darkenedLength]); - cr.fill(); - } - } else { - let spacing = Math.ceil(areaSize / 18); // separation between the indicators - let length; - let dist; - let indicatorSize; - let translate; - let preDraw = () => {}; - let draw; - let drawDash = (i, dashLength) => { - dist = i * dashLength + i * spacing; - cr.rectangle.apply(cr, (isHorizontalDots ? [dist, 0, dashLength, size] : [0, dist, size, dashLength])); - }; - - switch (type) { - case DOT_STYLE.CILIORA: - spacing = size; - length = areaSize - (size * (n - 1)) - (spacing * (n - 1)); - translate = () => cr.translate(startX, startY); - preDraw = () => { - cr.newSubPath(); - cr.rectangle.apply(cr, [0, 0].concat(isHorizontalDots ? [length, size] : [size, length])); - }; - draw = i => { - dist = length + (i * spacing) + ((i - 1) * size); - cr.rectangle.apply(cr, (isHorizontalDots ? [dist, 0] : [0, dist]).concat([size, size])); - }; - break; - case DOT_STYLE.DOTS: - let radius = size / 2; - - translate = () => { - indicatorSize = Math.floor((areaSize - n * size - (n - 1) * spacing) / 2); - cr.translate.apply(cr, isHorizontalDots ? [indicatorSize, startY] : [startX, indicatorSize]); - } - draw = i => { - dist = (2 * i + 1) * radius + i * spacing; - cr.arc.apply(cr, (isHorizontalDots ? [dist, radius] : [radius, dist]).concat([radius, 0, 2 * Math.PI])); - }; - break; - case DOT_STYLE.SQUARES: - translate = () => { - indicatorSize = Math.floor((areaSize - n * size - (n - 1) * spacing) / 2); - cr.translate.apply(cr, isHorizontalDots ? [indicatorSize, startY] : [startX, indicatorSize]); - } - draw = i => { - dist = i * size + i * spacing; - cr.rectangle.apply(cr, (isHorizontalDots ? [dist, 0] : [0, dist]).concat([size, size])); - }; - break; - case DOT_STYLE.DASHES: - length = Math.floor(areaSize / 4) - spacing; - translate = () => { - indicatorSize = Math.floor((areaSize - n * length - (n - 1) * spacing) / 2); - cr.translate.apply(cr, isHorizontalDots ? [indicatorSize, startY] : [startX, indicatorSize]); - } - draw = i => drawDash(i, length); - break; - case DOT_STYLE.SEGMENTED: - length = Math.ceil((areaSize - ((n - 1) * spacing)) / n); - translate = () => cr.translate(startX, startY); - draw = i => drawDash(i, length); - break; - } - - translate(); - - cr.setSourceColor(bodyColor); - preDraw(); - for (let i = 0; i < n; i++) { - cr.newSubPath(); - draw(i); - } - cr.fill(); - } - - cr.$dispose(); - } - - _numberOverlay() { - // Add label for a Hot-Key visual aid - this._numberOverlayLabel = new St.Label({ style_class: 'badge' }); - this._numberOverlayBin = new St.Bin({ - child: this._numberOverlayLabel, y: 2 - }); - this._numberOverlayLabel.add_style_class_name('number-overlay'); - this._numberOverlayOrder = -1; - this._numberOverlayBin.hide(); - - this._dtpIconContainer.add_child(this._numberOverlayBin); - } - - updateHotkeyNumberOverlay() { - this.updateNumberOverlay(this._numberOverlayBin, true); - } - - updateNumberOverlay(bin, fixedSize) { - // We apply an overall scale factor that might come from a HiDPI monitor. - // Clutter dimensions are in physical pixels, but CSS measures are in logical - // pixels, so make sure to consider the scale. - // Set the font size to something smaller than the whole icon so it is - // still visible. The border radius is large to make the shape circular - let [minWidth, natWidth] = this._dtpIconContainer.get_preferred_width(-1); - let font_size = Math.round(Math.max(12, 0.3 * natWidth) / Utils.getScaleFactor()); - let size = Math.round(font_size * 1.3); - let label = bin.child; - let style = 'font-size: ' + font_size + 'px;' + - 'border-radius: ' + this.icon.iconSize + 'px;' + - 'height: ' + size +'px;'; - - if (fixedSize || label.get_text().length == 1) { - style += 'width: ' + size + 'px;'; - } else { - style += 'padding: 0 2px;'; - } - - bin.x = 2; - label.set_style(style); - } - - setNumberOverlay(number) { - this._numberOverlayOrder = number; - this._numberOverlayLabel.set_text(number.toString()); - } - - toggleNumberOverlay(activate) { - if (activate && this._numberOverlayOrder > -1) - this._numberOverlayBin.show(); - else - this._numberOverlayBin.hide(); - } - - handleDragOver(source, actor, x, y, time) { - if (source == Main.xdndHandler) { - this._previewMenu.close(true); - } - - return DND.DragMotionResult.CONTINUE; - } - - getAppIconInterestingWindows(isolateMonitors) { - return getInterestingWindows(this.app, this.dtpPanel.monitor, isolateMonitors); - } -}); -TaskbarAppIcon.prototype.scaleAndFade = TaskbarAppIcon.prototype.undoScaleAndFade = () => {}; - -export function minimizeWindow(app, param, monitor){ - // Param true make all app windows minimize - let windows = getInterestingWindows(app, monitor); - let current_workspace = Utils.DisplayWrapper.getWorkspaceManager().get_active_workspace(); - for (let i = 0; i < windows.length; i++) { - let w = windows[i]; - if (w.get_workspace() == current_workspace && w.showing_on_its_workspace()){ - w.minimize(); - // Just minimize one window. By specification it should be the - // focused window on the current workspace. - if(!param) - break; - } - } -} - -/* - * By default only non minimized windows are activated. - * This activates all windows in the current workspace. - */ -export function activateAllWindows(app, monitor){ - - // First activate first window so workspace is switched if needed, - // then activate all other app windows in the current workspace. - let windows = getInterestingWindows(app, monitor); - let w = windows[0]; - Main.activateWindow(w); - let activeWorkspace = Utils.DisplayWrapper.getWorkspaceManager().get_active_workspace_index(); - - if (windows.length <= 0) - return; - - for (let i = windows.length - 1; i >= 0; i--){ - if (windows[i].get_workspace().index() == activeWorkspace){ - Main.activateWindow(windows[i]); - } - } -} - -export function activateFirstWindow(app, monitor){ - - let windows = getInterestingWindows(app, monitor); - Main.activateWindow(windows[0]); -} - -export function cycleThroughWindows(app, reversed, shouldMinimize, monitor) { - // Store for a little amount of time last clicked app and its windows - // since the order changes upon window interaction - let MEMORY_TIME=3000; - - let app_windows = getInterestingWindows(app, monitor); - - if(shouldMinimize) - app_windows.push("MINIMIZE"); - - if (recentlyClickedAppLoopId > 0) - GLib.Source.remove(recentlyClickedAppLoopId); - - recentlyClickedAppLoopId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, - MEMORY_TIME, resetRecentlyClickedApp); - - // If there isn't already a list of windows for the current app, - // or the stored list is outdated, use the current windows list. - if (!recentlyClickedApp || - recentlyClickedApp.get_id() != app.get_id() || - recentlyClickedAppWindows.length != app_windows.length || - recentlyClickedAppMonitorIndex != monitor.index) { - recentlyClickedApp = app; - recentlyClickedAppWindows = app_windows; - recentlyClickedAppIndex = 0; - recentlyClickedAppMonitorIndex = monitor.index; - } - - if (reversed) { - recentlyClickedAppIndex--; - if (recentlyClickedAppIndex < 0) recentlyClickedAppIndex = recentlyClickedAppWindows.length - 1; - } else { - recentlyClickedAppIndex++; - } - let index = recentlyClickedAppIndex % recentlyClickedAppWindows.length; - - if(recentlyClickedAppWindows[index] === "MINIMIZE") - minimizeWindow(app, true, monitor); - else - Main.activateWindow(recentlyClickedAppWindows[index]); -} - -export function resetRecentlyClickedApp() { - if (recentlyClickedAppLoopId > 0) - GLib.Source.remove(recentlyClickedAppLoopId); - - recentlyClickedAppLoopId=0; - recentlyClickedApp =null; - recentlyClickedAppWindows = null; - recentlyClickedAppIndex = 0; - recentlyClickedAppMonitorIndex = null; - - return false; -} - -export function closeAllWindows(app, monitor) { - let windows = getInterestingWindows(app, monitor); - for (let i = 0; i < windows.length; i++) - windows[i].delete(global.get_current_time()); -} - -// Filter out unnecessary windows, for instance -// nautilus desktop window. -export function getInterestingWindows(app, monitor, isolateMonitors) { - let windows = ( - app ? - app.get_windows() : - global.get_window_actors().map(wa => wa.get_meta_window()) - ).filter(w => !w.skip_taskbar); - - // When using workspace or monitor isolation, we filter out windows - // that are not in the current workspace or on the same monitor as the appicon - if (SETTINGS.get_boolean('isolate-workspaces')) - windows = windows.filter(function(w) { - return w.get_workspace() && - w.get_workspace() == Utils.getCurrentWorkspace(); - }); - - if (monitor && SETTINGS.get_boolean('multi-monitors') && (isolateMonitors || SETTINGS.get_boolean('isolate-monitors'))) { - windows = windows.filter(function(w) { - return w.get_monitor() == monitor.index; - }); - } - - return windows; -} - -export function cssHexTocssRgba(cssHex, opacity) { - let bigint = parseInt(cssHex.slice(1), 16); - let r = (bigint >> 16) & 255; - let g = (bigint >> 8) & 255; - let b = bigint & 255; - - return 'rgba(' + [r, g, b].join(',') + ',' + opacity + ')'; -} - -export function getIconPadding(monitorIndex) { - let panelSize = PanelSettings.getPanelSize(SETTINGS, monitorIndex); - let padding = SETTINGS.get_int('appicon-padding'); - let availSize = panelSize - Taskbar.MIN_ICON_SIZE - panelSize % 2; - - if (padding * 2 > availSize) { - padding = availSize * .5; - } - - return padding; -} - -/** - * Extend AppMenu (AppIconMenu for pre gnome 41) - * - * - hide 'Show Details' according to setting - * - show windows header only if show-window-previews is disabled - * - Add close windows option based on quitfromdash extension - * (https://github.com/deuill/shell-extension-quitfromdash) - */ - -export class TaskbarSecondaryMenu extends AppMenu.AppMenu { - - constructor(source, side) { - super(source, side); - // constructor parameter does nos work for some reason - this._enableFavorites = true; - this._showSingleWindows = true; - - // Remove "Show Details" menu item - if(!SETTINGS.get_boolean('secondarymenu-contains-showdetails')) { - let existingMenuItems = this._getMenuItems(); - for (let i = 0; i < existingMenuItems.length; i++) { - let item = existingMenuItems[i]; - if (item !== undefined && item.label !== undefined) { - if (item.label.text == "Show Details") { - this.box.remove_child(item.actor); - } - } - } - } - - // replace quit item - delete this._quitItem; - this._quitItem = this.addAction(_('Quit'), () => this._quitFromTaskbar()); - } - - updateQuitText() { - let count = this.sourceActor.window ? 1 : - getInterestingWindows(this._app, this.sourceActor.dtpPanel.monitor).length; - - if ( count > 0) { - let quitFromTaskbarMenuText = ""; - if (count == 1) - quitFromTaskbarMenuText = _("Quit"); - else - quitFromTaskbarMenuText = ngettext('Quit %d Window', 'Quit %d Windows', count).format(count); - - this._quitItem.label.set_text(quitFromTaskbarMenuText); - } - } - - _quitFromTaskbar() { - let time = global.get_current_time() - let windows = - this.sourceActor.window ? // ungrouped applications - [this.sourceActor.window] : - getInterestingWindows(this._app, this.sourceActor.dtpPanel.monitor) - - if (windows.length == this._app.get_windows().length) - this._app.request_quit() - - GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => { - windows.forEach((w) => !!w.get_compositor_private() && w.delete(time++)); - - return GLib.SOURCE_REMOVE; - }); - } -} - -/** - * This function is used for extendDashItemContainer - */ -export function ItemShowLabel() { - if (!this._labelText) - return; - - this.label.set_text(this._labelText); - this.label.opacity = 0; - this.label.show(); - - let [stageX, stageY] = this.get_transformed_position(); - let node = this.label.get_theme_node(); - - let itemWidth = this.allocation.x2 - this.allocation.x1; - let itemHeight = this.allocation.y2 - this.allocation.y1; - - let labelWidth = this.label.get_width(); - let labelHeight = this.label.get_height(); - - let position = this._dtpPanel.getPosition(); - let labelOffset = node.get_length('-x-offset'); - - // From TaskbarItemContainer - if (this._getIconAnimationOffset) - labelOffset += this._getIconAnimationOffset(); - - let xOffset = Math.floor((itemWidth - labelWidth) / 2); - let x = stageX + xOffset - let y = stageY + (itemHeight - labelHeight) * .5; - - switch(position) { - case St.Side.TOP: - y = stageY + labelOffset + itemHeight; - break; - case St.Side.BOTTOM: - y = stageY - labelHeight - labelOffset; - break; - case St.Side.LEFT: - x = stageX + labelOffset + itemWidth; - break; - case St.Side.RIGHT: - x = stageX - labelWidth - labelOffset; - break; - } - - // keep the label inside the screen border - // Only needed for the x coordinate. - - // Leave a few pixel gap - let gap = LABEL_GAP; - let monitor = Main.layoutManager.findMonitorForActor(this); - if ( x - monitor.x < gap) - x += monitor.x - x + labelOffset; - else if ( x + labelWidth > monitor.x + monitor.width - gap) - x -= x + labelWidth -( monitor.x + monitor.width) + gap; - - this.label.set_position(Math.round(x), Math.round(y)); - - let duration = Dash.DASH_ITEM_LABEL_SHOW_TIME; - - if (duration > 1) { - duration /= 1000; - } - - Utils.animate(this.label, { - opacity: 255, - time: duration, - transition: 'easeOutQuad', - }); -} - -/** - * A wrapper class around the ShowAppsIcon class. - * - * - Pass settings to the constructor - * - set label position based on dash orientation (Note, I am reusing most machinery of the appIcon class) - * - implement a popupMenu based on the AppIcon code (Note, I am reusing most machinery of the appIcon class) - * - * I can't subclass the original object because of this: https://bugzilla.gnome.org/show_bug.cgi?id=688973. - * thus use this pattern where the real showAppsIcon object is encaptulated, and a reference to it will be properly wired upon - * use of this class in place of the original showAppsButton. - * - */ -export const ShowAppsIconWrapper = class extends EventEmitter { - - constructor(dtpPanel) { - super(); - - this.realShowAppsIcon = new Dash.ShowAppsIcon(); - - /* the variable equivalent to toggleButton has a different name in the appIcon class - (actor): duplicate reference to easily reuse appIcon methods */ - this.actor = this.realShowAppsIcon.toggleButton; - this.realShowAppsIcon.show(false); - - // Re-use appIcon methods - this._removeMenuTimeout = AppDisplay.AppIcon.prototype._removeMenuTimeout; - this._setPopupTimeout = AppDisplay.AppIcon.prototype._setPopupTimeout; - this._onKeyboardPopupMenu = AppDisplay.AppIcon.prototype._onKeyboardPopupMenu; - - // No action on clicked (showing of the appsview is controlled elsewhere) - this._onClicked = (actor, button) => this._removeMenuTimeout(); - - this.actor.connect('leave-event', this._onLeaveEvent.bind(this)); - this.actor.connect('button-press-event', this._onButtonPress.bind(this)); - this.actor.connect('touch-event', this._onTouchEvent.bind(this)); - this.actor.connect('clicked', this._onClicked.bind(this)); - this.actor.connect('popup-menu', this._onKeyboardPopupMenu.bind(this)); - - this._menu = null; - this._menuManager = new PopupMenu.PopupMenuManager(this.actor); - this._menuTimeoutId = 0; - - this.realShowAppsIcon._dtpPanel = dtpPanel; - Taskbar.extendDashItemContainer(this.realShowAppsIcon); - - let customIconPath = SETTINGS.get_string('show-apps-icon-file'); - - this.realShowAppsIcon.icon.createIcon = function(size) { - this._iconActor = new St.Icon({ icon_name: 'view-app-grid-symbolic', - icon_size: size, - style_class: 'show-apps-icon', - track_hover: true }); - - if (customIconPath) { - this._iconActor.gicon = new Gio.FileIcon({ file: Gio.File.new_for_path(customIconPath) }); - } - - return this._iconActor; - }; - - this._changedShowAppsIconId = SETTINGS.connect('changed::show-apps-icon-file', () => { - customIconPath = SETTINGS.get_string('show-apps-icon-file'); - this.realShowAppsIcon.icon._createIconTexture(this.realShowAppsIcon.icon.iconSize); - }); - - this._changedAppIconPaddingId = SETTINGS.connect('changed::appicon-padding', () => this.setShowAppsPadding()); - this._changedAppIconSidePaddingId = SETTINGS.connect('changed::show-apps-icon-side-padding', () => this.setShowAppsPadding()); - - this.setShowAppsPadding(); - } - - _onButtonPress(_actor, event) { - let button = event.get_button(); - if (button == 1) { - this._setPopupTimeout(); - } else if (button == 3) { - this.popupMenu(); - return Clutter.EVENT_STOP; - } - return Clutter.EVENT_PROPAGATE; - } - - _onLeaveEvent(_actor, _event) { - this.actor.fake_release(); - this._removeMenuTimeout(); - } - - _onTouchEvent(actor, event) { - if (event.type() == Clutter.EventType.TOUCH_BEGIN) - this._setPopupTimeout(); - - return Clutter.EVENT_PROPAGATE; - } - - _onMenuPoppedDown() { - this._menu.sourceActor = this.actor; - this.actor.sync_hover(); - this.emit('menu-state-changed', false); - } - - setShowAppsPadding() { - let padding = getIconPadding(this.realShowAppsIcon._dtpPanel.monitor.index); - let sidePadding = SETTINGS.get_int('show-apps-icon-side-padding'); - let isVertical = this.realShowAppsIcon._dtpPanel.checkIfVertical(); - - this.actor.set_style('padding:' + (padding + (isVertical ? sidePadding : 0)) + 'px ' + (padding + (isVertical ? 0 : sidePadding)) + 'px;'); - } - - createMenu() { - if (!this._menu) { - this._menu = new MyShowAppsIconMenu(this.realShowAppsIcon, this.realShowAppsIcon._dtpPanel); - this._menu.connect('open-state-changed', (menu, isPoppedUp) => { - if (!isPoppedUp) - this._onMenuPoppedDown(); - }); - let id = Main.overview.connect('hiding', () => { - this._menu.close(); - }); - this._menu.actor.connect('destroy', () => { - Main.overview.disconnect(id); - }); - - // We want to keep the item hovered while the menu is up - this._menu.blockSourceEvents = true; - - Main.uiGroup.add_child(this._menu.actor); - this._menuManager.addMenu(this._menu); - } - } - - popupMenu(sourceActor = null) { - this._removeMenuTimeout(); - this.actor.fake_release(); - this.createMenu(); - - this._menu.updateItems(sourceActor == null ? this.realShowAppsIcon : sourceActor); - - this.actor.set_hover(true); - this._menu.open(BoxPointer.PopupAnimation.FULL); - this._menuManager.ignoreRelease(); - this.emit('sync-tooltip'); - - return false; - } - - shouldShowTooltip() { - return SETTINGS.get_boolean('show-tooltip') && - (this.actor.hover && (!this._menu || !this._menu.isOpen)); - } - - destroy() { - SETTINGS.disconnect(this._changedShowAppsIconId); - SETTINGS.disconnect(this._changedAppIconSidePaddingId); - SETTINGS.disconnect(this._changedAppIconPaddingId); - - this.realShowAppsIcon.destroy(); - } -}; - -/** - * A menu for the showAppsIcon - */ -export const MyShowAppsIconMenu = class extends PopupMenu.PopupMenu { - - constructor(actor, dtpPanel) { - super(actor, 0, dtpPanel.getPosition()); - - this._dtpPanel = dtpPanel; - - this.updateItems(actor); - } - - updateItems(sourceActor) { - this.sourceActor = sourceActor; - - this.removeAll(); - - if (this.sourceActor != Main.layoutManager.dummyCursor) { - this._appendItem({ - title: _('Power options'), - cmd: ['gnome-control-center', 'power'] - }); - - this._appendItem({ - title: _('Event logs'), - cmd: ['gnome-logs'] - }); - - this._appendItem({ - title: _('System'), - cmd: ['gnome-control-center', 'info-overview'] - }); - - this._appendItem({ - title: _('Device Management'), - cmd: ['gnome-control-center', 'display'] - }); - - this._appendItem({ - title: _('Disk Management'), - cmd: ['gnome-disks'] - }); - - this._appendList( - SETTINGS.get_strv('show-apps-button-context-menu-commands'), - SETTINGS.get_strv('show-apps-button-context-menu-titles') - ) - - this._appendSeparator(); - } - - this._appendItem({ - title: _('Terminal'), - cmd: [TERMINALSETTINGS.get_string('exec')] - }); - - this._appendItem({ - title: _('System monitor'), - cmd: ['gnome-system-monitor'] - }); - - this._appendItem({ - title: _('Files'), - cmd: ['nautilus'] - }); - - this._appendItem({ - title: _('Extensions'), - cmd: ['gnome-shell-extension-prefs'] - }); - - this._appendItem({ - title: _('Settings'), - cmd: ['gnome-control-center'] - }); - - this._appendList( - SETTINGS.get_strv('panel-context-menu-commands'), - SETTINGS.get_strv('panel-context-menu-titles') - ) - - this._appendSeparator(); - - let lockTaskbarMenuItem = this._appendMenuItem(SETTINGS.get_boolean('taskbar-locked') ? _('Unlock taskbar') : _('Lock taskbar')); - lockTaskbarMenuItem.connect('activate', () => { - SETTINGS.set_boolean('taskbar-locked', !SETTINGS.get_boolean('taskbar-locked')); - }); - - let settingsMenuItem = this._appendMenuItem(_('Dash to Panel Settings')); - settingsMenuItem.connect('activate', () => DTP_EXTENSION.openPreferences()) - - if(this.sourceActor == Main.layoutManager.dummyCursor) { - this._appendSeparator(); - let item = this._appendMenuItem(this._dtpPanel._restoreWindowList ? _('Restore Windows') : _('Show Desktop')); - item.connect('activate', this._dtpPanel._onShowDesktopButtonPress.bind(this._dtpPanel)); - } - } - - - // Only add menu entries for commands that exist in path - _appendItem(info) { - if (GLib.find_program_in_path(info.cmd[0])) { - let item = this._appendMenuItem(_(info.title)); - - item.connect('activate', function() { - print("activated: " + info.title); - Util.spawn(info.cmd); - }); - return item; - } - - return null; - } - - _appendList(commandList, titleList) { - if (commandList.length != titleList.length) { - return; - } - - for (let entry = 0; entry < commandList.length; entry++) { - this._appendItem({ - title: titleList[entry], - cmd: commandList[entry].split(' ') - }); - } - } - - _appendSeparator() { - let separator = new PopupMenu.PopupSeparatorMenuItem(); - this.addMenuItem(separator); - } - - _appendMenuItem(labelText) { - // FIXME: app-well-menu-item style - let item = new PopupMenu.PopupMenuItem(labelText); - this.addMenuItem(item); - return item; - } -}; - - -export const getIconContainerStyle = function(isVertical) { - let style = 'padding: '; - - if (SETTINGS.get_boolean('group-apps')) { - style += (isVertical ? '0;' : '0 ' + DEFAULT_PADDING_SIZE + 'px;'); - } else { - style += (isVertical ? '' : '0 ') + DEFAULT_PADDING_SIZE + 'px;'; - } - - return style; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/desktopIconsIntegration.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/desktopIconsIntegration.js deleted file mode 100644 index e403516d..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/desktopIconsIntegration.js +++ /dev/null @@ -1,165 +0,0 @@ -/* - * The code in this file is distributed under a "1-clause BSD license", - * which makes it compatible with GPLv2 and GPLv3 too, and others. - * - * License text: - * - * Copyright (C) 2021 Sergio Costas (rastersoft@gmail.com) - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/******************************************************************************* - * Integration class - * - * This class must be added to other extensions in order to integrate - * them with Desktop Icons NG. It allows an extension to notify how much margin - * it uses in each side of each monitor. - * - * DON'T SEND PATCHES TO THIS FILE TO THE EXTENSION MAINTAINER. SEND THEM TO - * DESKTOP ICONS NG MAINTAINER: https://gitlab.com/rastersoft/desktop-icons-ng - * - * In the *enable()* function, create a *DesktopIconsUsableAreaClass()* - * object with - * - * new DesktopIconsIntegration.DesktopIconsUsableAreaClass(object); - * - * Now, in the *disable()* function just call to the *destroy()* method before - * nullifying the pointer. You must create a new object in enable() the next - * time the extension is enabled. - * - * In your code, every time you change the margins, you should call first to - * *resetMargins()* method to clear the current margins, and then call to - * *setMargins(...)* method as many times as you need to set the margins in each - * monitor. You don't need to call it for all the monitors, only for those where - * you are painting something. If you don't set values for a monitor, they will - * be considered zero. - * - * The margins values are relative to the monitor border. - * - *******************************************************************************/ - -import GLib from 'gi://GLib'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import * as ExtensionUtils from 'resource:///org/gnome/shell/misc/extensionUtils.js'; -import {Extension} from 'resource:///org/gnome/shell/extensions/extension.js'; - -const IDENTIFIER_UUID = "130cbc66-235c-4bd6-8571-98d2d8bba5e2"; - -export class DesktopIconsUsableAreaClass { - _checkIfExtensionIsEnabled(extension) { - return (extension?.state === ExtensionUtils.ExtensionState.ENABLED) || - (extension?.state === ExtensionUtils.ExtensionState.ACTIVE); - } - - constructor() { - const Me = Extension.lookupByURL(import.meta.url); - this._UUID = Me.uuid; - this._extensionManager = Main.extensionManager; - this._timedMarginsID = 0; - this._margins = {}; - this._emID = this._extensionManager.connect('extension-state-changed', (_obj, extension) => { - if (!extension) - return; - - // If an extension is being enabled and lacks the DesktopIconsUsableArea object, we can avoid launching a refresh - if (this._checkIfExtensionIsEnabled(extension)) { - this._sendMarginsToExtension(extension); - return; - } - // if the extension is being disabled, we must do a full refresh, because if there were other extensions originally - // loaded after that extension, those extensions will be disabled and enabled again without notification - this._changedMargins(); - }); - } - - /** - * Sets or updates the top, bottom, left and right margins for a - * monitor. Values are measured from the monitor border (and NOT from - * the workspace border). - * - * @param {int} monitor Monitor number to which set the margins. - * A negative value means "the primary monitor". - * @param {int} top Top margin in pixels - * @param {int} bottom Bottom margin in pixels - * @param {int} left Left margin in pixels - * @param {int} right Right margin in pixels - */ - setMargins(monitor, top, bottom, left, right) { - this._margins[monitor] = { - 'top': top, - 'bottom': bottom, - 'left': left, - 'right': right - }; - this._changedMargins(); - } - - /** - * Clears the current margins. Must be called before configuring the monitors - * margins with setMargins(). - */ - resetMargins() { - this._margins = {}; - this._changedMargins(); - } - - /** - * Disconnects all the signals and removes the margins. - */ - destroy() { - if (this._emID) { - this._extensionManager.disconnect(this._emID); - this._emID = 0; - } - if (this._timedMarginsID) { - GLib.source_remove(this._timedMarginsID); - this._timedMarginsID = 0; - } - this._margins = null; - this._changedMargins(); - } - - _changedMargins() { - if (this._timedMarginsID) { - GLib.source_remove(this._timedMarginsID); - } - this._timedMarginsID = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 100, ()=> { - this._sendMarginsToAll(); - this._timedMarginsID = 0; - return GLib.SOURCE_REMOVE; - }); - } - - _sendMarginsToAll() { - this._extensionManager.getUuids().forEach(uuid => - this._sendMarginsToExtension(this._extensionManager.lookup(uuid))); - } - - _sendMarginsToExtension(extension) { - // check that the extension is an extension that has the logic to accept - // working margins - if (!this._checkIfExtensionIsEnabled(extension)) - return; - - const usableArea = extension?.stateObj?.DesktopIconsUsableArea; - if (usableArea?.uuid === IDENTIFIER_UUID) - usableArea.setMarginsForExtension(this._UUID, this._margins); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/executable_panelManager.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/executable_panelManager.js deleted file mode 100644 index 917c91dd..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/executable_panelManager.js +++ /dev/null @@ -1,773 +0,0 @@ -/* - * This file is part of the Dash-To-Panel extension for Gnome 3 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * Credits: - * This file is based on code from the Dash to Dock extension by micheleg - * and code from the Taskbar extension by Zorin OS - * - * Code to re-anchor the panel was taken from Thoma5 BottomPanel: - * https://github.com/Thoma5/gnome-shell-extension-bottompanel - * - * Pattern for moving clock based on Frippery Move Clock by R M Yorston - * http://frippery.org/extensions/ - * - * Some code was also adapted from the upstream Gnome Shell source code. - */ - -import * as Overview from './overview.js'; -import * as Panel from './panel.js'; -import * as PanelSettings from './panelSettings.js'; -import * as Proximity from './proximity.js'; -import * as Utils from './utils.js'; -import * as DesktopIconsIntegration from './desktopIconsIntegration.js'; - -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Clutter from 'gi://Clutter'; -import Meta from 'gi://Meta'; -import Shell from 'gi://Shell'; -import St from 'gi://St'; - -import * as BoxPointer from 'resource:///org/gnome/shell/ui/boxpointer.js'; -import * as LookingGlass from 'resource:///org/gnome/shell/ui/lookingGlass.js'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import * as PanelMenu from 'resource:///org/gnome/shell/ui/panelMenu.js'; -import * as Layout from 'resource:///org/gnome/shell/ui/layout.js'; -import {InjectionManager} from 'resource:///org/gnome/shell/extensions/extension.js'; -import {SETTINGS} from './extension.js'; -import {SecondaryMonitorDisplay, WorkspacesView} from 'resource:///org/gnome/shell/ui/workspacesView.js'; - - -export const PanelManager = class { - - constructor() { - this.overview = new Overview.Overview(); - this.panelsElementPositions = {}; - this._injectionManager = new InjectionManager(); - - this._saveMonitors(); - } - - enable(reset) { - let dtpPrimaryIndex = SETTINGS.get_int('primary-monitor'); - - this.allPanels = []; - this.dtpPrimaryMonitor = Main.layoutManager.monitors[dtpPrimaryIndex] || Main.layoutManager.primaryMonitor; - this.proximityManager = new Proximity.ProximityManager(); - - if (this.dtpPrimaryMonitor) { - this.primaryPanel = this._createPanel(this.dtpPrimaryMonitor, SETTINGS.get_boolean('stockgs-keep-top-panel')); - this.allPanels.push(this.primaryPanel); - this.overview.enable(this.primaryPanel); - - this.setFocusedMonitor(this.dtpPrimaryMonitor); - } - - if (SETTINGS.get_boolean('multi-monitors')) { - Main.layoutManager.monitors.filter(m => m != this.dtpPrimaryMonitor).forEach(m => { - this.allPanels.push(this._createPanel(m, true)); - }); - } - - global.dashToPanel.panels = this.allPanels; - global.dashToPanel.emit('panels-created'); - - this.allPanels.forEach(p => { - let panelPosition = p.getPosition(); - let leftOrRight = (panelPosition == St.Side.LEFT || panelPosition == St.Side.RIGHT); - - p.panelBox.set_size( - leftOrRight ? -1 : p.geom.w + p.geom.lrPadding, - leftOrRight ? p.geom.h + p.geom.tbPadding : -1 - ); - - this._findPanelMenuButtons(p.panelBox).forEach(pmb => this._adjustPanelMenuButton(pmb, p.monitor, panelPosition)); - - p.taskbar.iconAnimator.start(); - }); - - this._setDesktopIconsMargins(); - //in 3.32, BoxPointer now inherits St.Widget - if (BoxPointer.BoxPointer.prototype.vfunc_get_preferred_height) { - let panelManager = this; - - this._injectionManager.overrideMethod(BoxPointer.BoxPointer.prototype, 'vfunc_get_preferred_height', () => function(forWidth) { - let alloc = { min_size: 0, natural_size: 0 }; - - [alloc.min_size, alloc.natural_size] = this.vfunc_get_preferred_height(forWidth); - - return panelManager._getBoxPointerPreferredHeight(this, alloc); - }); - } - - this._updatePanelElementPositions(); - - if (reset) return; - - this._desktopIconsUsableArea = new DesktopIconsIntegration.DesktopIconsUsableAreaClass(); - - this._oldUpdatePanelBarrier = Main.layoutManager._updatePanelBarrier; - Main.layoutManager._updatePanelBarrier = (panel) => { - let panelUpdates = panel ? [panel] : this.allPanels; - - panelUpdates.forEach(p => newUpdatePanelBarrier.call(Main.layoutManager, p)); - }; - Main.layoutManager._updatePanelBarrier(); - - this._oldUpdateHotCorners = Main.layoutManager._updateHotCorners; - Main.layoutManager._updateHotCorners = newUpdateHotCorners.bind(Main.layoutManager); - Main.layoutManager._updateHotCorners(); - - this._forceHotCornerId = SETTINGS.connect('changed::stockgs-force-hotcorner', () => Main.layoutManager._updateHotCorners()); - - if (Main.layoutManager._interfaceSettings) { - this._enableHotCornersId = Main.layoutManager._interfaceSettings.connect('changed::enable-hot-corners', () => Main.layoutManager._updateHotCorners()); - } - - this._oldUpdateWorkspacesViews = Main.overview._overview._controls._workspacesDisplay._updateWorkspacesViews; - Main.overview._overview._controls._workspacesDisplay._updateWorkspacesViews = this._newUpdateWorkspacesViews.bind(Main.overview._overview._controls._workspacesDisplay); - - this._oldSetPrimaryWorkspaceVisible = Main.overview._overview._controls._workspacesDisplay.setPrimaryWorkspaceVisible - Main.overview._overview._controls._workspacesDisplay.setPrimaryWorkspaceVisible = this._newSetPrimaryWorkspaceVisible.bind(Main.overview._overview._controls._workspacesDisplay); - - LookingGlass.LookingGlass.prototype._oldResize = LookingGlass.LookingGlass.prototype._resize; - LookingGlass.LookingGlass.prototype._resize = _newLookingGlassResize; - - LookingGlass.LookingGlass.prototype._oldOpen = LookingGlass.LookingGlass.prototype.open; - LookingGlass.LookingGlass.prototype.open = _newLookingGlassOpen; - - this._signalsHandler = new Utils.GlobalSignalsHandler(); - - //listen settings - this._signalsHandler.add( - [ - SETTINGS, - [ - 'changed::primary-monitor', - 'changed::multi-monitors', - 'changed::isolate-monitors', - 'changed::panel-positions', - 'changed::panel-lengths', - 'changed::panel-anchors', - 'changed::stockgs-keep-top-panel' - ], - () => this._reset() - ], - [ - SETTINGS, - 'changed::panel-element-positions', - () => this._updatePanelElementPositions() - ], - [ - SETTINGS, - 'changed::intellihide-key-toggle-text', - () => this._setKeyBindings(true) - ], - [ - SETTINGS, - 'changed::panel-sizes', - () => { - GLib.idle_add(GLib.PRIORITY_LOW, () => { - this._setDesktopIconsMargins(); - return GLib.SOURCE_REMOVE; - }); - } - ], - [ - Utils.DisplayWrapper.getMonitorManager(), - 'monitors-changed', - () => { - if (Main.layoutManager.primaryMonitor) { - this._saveMonitors(); - this._reset(); - } - } - ] - ); - - Panel.panelBoxes.forEach(c => this._signalsHandler.add( - [ - Main.panel[c], - 'child-added', - (parent, child) => { - this.primaryPanel && - child instanceof St.Bin && - this._adjustPanelMenuButton(this._getPanelMenuButton(child.get_first_child()), this.primaryPanel.monitor, this.primaryPanel.getPosition()) - } - ] - )); - - this._setKeyBindings(true); - - // keep GS overview.js from blowing away custom panel styles - if(!SETTINGS.get_boolean('stockgs-keep-top-panel')) - Object.defineProperty(Main.panel, "style", {configurable: true, set(v) {}}); - } - - disable(reset) { - this.primaryPanel && this.overview.disable(); - this.proximityManager.destroy(); - - this.allPanels.forEach(p => { - p.taskbar.iconAnimator.pause(); - - this._findPanelMenuButtons(p.panelBox).forEach(pmb => { - if (pmb.menu._boxPointer._dtpGetPreferredHeightId) { - pmb.menu._boxPointer._container.disconnect(pmb.menu._boxPointer._dtpGetPreferredHeightId); - } - - pmb.menu._boxPointer.sourceActor = pmb.menu._boxPointer._dtpSourceActor; - delete pmb.menu._boxPointer._dtpSourceActor; - pmb.menu._boxPointer._userArrowSide = St.Side.TOP; - }) - - this._removePanelBarriers(p); - - p.disable(); - - let clipContainer = p.panelBox.get_parent(); - - Main.layoutManager._untrackActor(p.panelBox); - Main.layoutManager.removeChrome(clipContainer); - - if (p.isStandalone) { - p.panelBox.destroy(); - } else { - p.panelBox.remove_child(p); - p.remove_child(p.panel); - p.panelBox.add_child(p.panel); - - p.panelBox.set_position(clipContainer.x, clipContainer.y); - - clipContainer.remove_child(p.panelBox); - Main.layoutManager.addChrome(p.panelBox, { affectsStruts: true, trackFullscreen: true }); - } - }); - - this._injectionManager.clear(); - - if (Main.layoutManager.primaryMonitor) { - Main.layoutManager.panelBox.set_position(Main.layoutManager.primaryMonitor.x, Main.layoutManager.primaryMonitor.y); - Main.layoutManager.panelBox.set_size(Main.layoutManager.primaryMonitor.width, -1); - } - - if (reset) return; - - this._setKeyBindings(false); - - this._signalsHandler.destroy(); - - Main.layoutManager._updateHotCorners = this._oldUpdateHotCorners; - Main.layoutManager._updateHotCorners(); - - SETTINGS.disconnect(this._forceHotCornerId); - - if (this._enableHotCornersId) { - Main.layoutManager._interfaceSettings.disconnect(this._enableHotCornersId); - } - - Main.layoutManager._updatePanelBarrier = this._oldUpdatePanelBarrier; - Main.layoutManager._updatePanelBarrier(); - - Main.overview._overview._controls._workspacesDisplay._updateWorkspacesViews = this._oldUpdateWorkspacesViews; - Main.overview._overview._controls._workspacesDisplay.setPrimaryWorkspaceVisible = this._oldSetPrimaryWorkspaceVisible; - - LookingGlass.LookingGlass.prototype._resize = LookingGlass.LookingGlass.prototype._oldResize; - delete LookingGlass.LookingGlass.prototype._oldResize; - - LookingGlass.LookingGlass.prototype.open = LookingGlass.LookingGlass.prototype._oldOpen; - delete LookingGlass.LookingGlass.prototype._oldOpen - - delete Main.panel.style; - this._desktopIconsUsableArea.destroy(); - this._desktopIconsUsableArea = null; - } - - _setDesktopIconsMargins() { - this._desktopIconsUsableArea?.resetMargins(); - this.allPanels.forEach(p => { - switch(p.geom.position) { - case St.Side.TOP: - this._desktopIconsUsableArea?.setMargins(p.monitor.index, p.geom.h, 0, 0, 0); - break; - case St.Side.BOTTOM: - this._desktopIconsUsableArea?.setMargins(p.monitor.index, 0, p.geom.h, 0, 0); - break; - case St.Side.LEFT: - this._desktopIconsUsableArea?.setMargins(p.monitor.index, 0, 0, p.geom.w, 0); - break; - case St.Side.RIGHT: - this._desktopIconsUsableArea?.setMargins(p.monitor.index, 0, 0, 0, p.geom.w); - break; - } - }); - } - - setFocusedMonitor(monitor) { - this.focusedMonitorPanel = this.allPanels.find(p => p.monitor == monitor) - - if (!this.checkIfFocusedMonitor(monitor)) { - Main.overview._overview.clear_constraints(); - Main.overview._overview.add_constraint(new Layout.MonitorConstraint({ index: monitor.index })); - - Main.overview._overview._controls._workspacesDisplay._primaryIndex = monitor.index; - } - } - - _newSetPrimaryWorkspaceVisible(visible) { - if (this._primaryVisible === visible) - return; - - this._primaryVisible = visible; - - const primaryIndex = Main.overview._overview._controls._workspacesDisplay._primaryIndex; - const primaryWorkspace = this._workspacesViews[primaryIndex]; - if (primaryWorkspace) - primaryWorkspace.visible = visible; - } - - _newUpdateWorkspacesViews() { - for (let i = 0; i < this._workspacesViews.length; i++) - this._workspacesViews[i].destroy(); - - this._workspacesViews = []; - let monitors = Main.layoutManager.monitors; - for (let i = 0; i < monitors.length; i++) { - let view; - if (i === this._primaryIndex) { - view = new WorkspacesView(i, - this._controls, - this._scrollAdjustment, - this._fitModeAdjustment, - this._overviewAdjustment); - - view.visible = this._primaryVisible; - this.bind_property('opacity', view, 'opacity', GObject.BindingFlags.SYNC_CREATE); - this.add_child(view); - } else { - // No idea why atm, but we need the import at the top of this file and to use the - // full imports ns here, otherwise SecondaryMonitorDisplay can't be used ¯\_(ツ)_/¯ - view = new SecondaryMonitorDisplay(i, - this._controls, - this._scrollAdjustment, - this._fitModeAdjustment, - this._overviewAdjustment); - Main.layoutManager.overviewGroup.add_child(view); - } - - this._workspacesViews.push(view); - } - } - - _saveMonitors() { - //Mutter meta_monitor_manager_get_primary_monitor (global.display.get_primary_monitor()) doesn't return the same - //monitor as GDK gdk_screen_get_primary_monitor (imports.gi.Gdk.Screen.get_default().get_primary_monitor()). - //Since the Mutter function is what's used in gnome-shell and we can't access it from the settings dialog, store - //the monitors information in a setting so we can use the same monitor indexes as the ones in gnome-shell - let keyMonitors = 'available-monitors'; - let keyPrimary = 'primary-monitor'; - let primaryIndex = Main.layoutManager.primaryIndex; - let newMonitors = [primaryIndex]; - let savedMonitors = SETTINGS.get_value(keyMonitors).deep_unpack(); - let dtpPrimaryIndex = SETTINGS.get_int(keyPrimary); - let newDtpPrimaryIndex = primaryIndex; - - Main.layoutManager.monitors.filter(m => m.index != primaryIndex).forEach(m => newMonitors.push(m.index)); - - if (savedMonitors[0] != dtpPrimaryIndex) { - // dash to panel primary wasn't the gnome-shell primary (first index of available-monitors) - let savedIndex = savedMonitors.indexOf(dtpPrimaryIndex) - - // default to primary if it was set to a monitor that is no longer available - newDtpPrimaryIndex = newMonitors[savedIndex]; - newDtpPrimaryIndex = newDtpPrimaryIndex == null ? primaryIndex : newDtpPrimaryIndex; - } - - SETTINGS.set_int(keyPrimary, newDtpPrimaryIndex); - SETTINGS.set_value(keyMonitors, new GLib.Variant('ai', newMonitors)); - } - - checkIfFocusedMonitor(monitor) { - return Main.overview._overview._controls._workspacesDisplay._primaryIndex == monitor.index; - } - - _createPanel(monitor, isStandalone) { - let panelBox; - let panel; - let clipContainer = new Clutter.Actor(); - - if (isStandalone) { - panelBox = new St.BoxLayout({ name: 'panelBox' }); - } else { - panelBox = Main.layoutManager.panelBox; - Main.layoutManager._untrackActor(panelBox); - panelBox.remove_child(Main.panel); - Main.layoutManager.removeChrome(panelBox); - } - - Main.layoutManager.addChrome(clipContainer, { affectsInputRegion: false }); - clipContainer.add_child(panelBox); - Main.layoutManager.trackChrome(panelBox, { trackFullscreen: true, affectsStruts: true, affectsInputRegion: true }); - - panel = new Panel.Panel(this, monitor, panelBox, isStandalone); - panelBox.add_child(panel); - panel.enable(); - - panelBox.visible = true; - if (monitor.inFullscreen) { - panelBox.hide(); - } - panelBox.set_position(0, 0); - - return panel; - } - - _reset() { - this.disable(true); - this.allPanels = []; - this.enable(true); - } - - _updatePanelElementPositions() { - this.panelsElementPositions = PanelSettings.getSettingsJson(SETTINGS, 'panel-element-positions'); - this.allPanels.forEach(p => p.updateElementPositions()); - } - - _adjustPanelMenuButton(button, monitor, arrowSide) { - if (button) { - button.menu._boxPointer._dtpSourceActor = button.menu._boxPointer.sourceActor; - button.menu._boxPointer.sourceActor = button; - button.menu._boxPointer._userArrowSide = arrowSide; - button.menu._boxPointer._dtpInPanel = 1; - - if (!button.menu._boxPointer.vfunc_get_preferred_height) { - button.menu._boxPointer._dtpGetPreferredHeightId = button.menu._boxPointer._container.connect('get-preferred-height', (actor, forWidth, alloc) => { - this._getBoxPointerPreferredHeight(button.menu._boxPointer, alloc, monitor); - }); - } - } - } - - _getBoxPointerPreferredHeight(boxPointer, alloc, monitor) { - if (boxPointer._dtpInPanel && boxPointer.sourceActor && SETTINGS.get_boolean('intellihide')) { - monitor = monitor || Main.layoutManager.findMonitorForActor(boxPointer.sourceActor); - let panel = Utils.find(global.dashToPanel.panels, p => p.monitor == monitor); - let excess = alloc.natural_size + panel.dtpSize + 10 - monitor.height; // 10 is arbitrary - - if (excess > 0) { - alloc.natural_size -= excess; - } - } - - return [alloc.min_size, alloc.natural_size]; - } - - _findPanelMenuButtons(container) { - let panelMenuButtons = []; - let panelMenuButton; - - let find = parent => parent.get_children().forEach(c => { - if ((panelMenuButton = this._getPanelMenuButton(c))) { - panelMenuButtons.push(panelMenuButton); - } - - find(c); - }); - - find(container); - - return panelMenuButtons; - } - - _removePanelBarriers(panel) { - if (panel.isStandalone && panel._rightPanelBarrier) { - panel._rightPanelBarrier.destroy(); - } - - if (panel._leftPanelBarrier) { - panel._leftPanelBarrier.destroy(); - delete panel._leftPanelBarrier; - } - } - - _getPanelMenuButton(obj) { - return obj instanceof PanelMenu.Button && obj.menu?._boxPointer ? obj : 0; - } - - _setKeyBindings(enable) { - let keys = { - 'intellihide-key-toggle': () => this.allPanels.forEach(p => p.intellihide.toggle()) - }; - - Object.keys(keys).forEach(k => { - Utils.removeKeybinding(k); - - if (enable) { - Utils.addKeybinding(k, SETTINGS, keys[k], Shell.ActionMode.NORMAL); - } - }); - } - -}; - -// This class drives long-running icon animations, to keep them running in sync -// with each other. -export const IconAnimator = class { - - constructor(actor) { - this._count = 0; - this._started = false; - this._animations = { - dance: [], - }; - this._timeline = new Clutter.Timeline({ - duration: 3000, - repeat_count: -1, - }); - - /* Just use the construction property when no need to support 3.36 */ - if (this._timeline.set_actor) - this._timeline.set_actor(actor); - - this._timeline.connect('new-frame', () => { - const progress = this._timeline.get_progress(); - const danceRotation = progress < 1/6 ? 15*Math.sin(progress*24*Math.PI) : 0; - const dancers = this._animations.dance; - for (let i = 0, iMax = dancers.length; i < iMax; i++) { - dancers[i].target.rotation_angle_z = danceRotation; - } - }); - } - - destroy() { - this._timeline.stop(); - this._timeline = null; - for (let name in this._animations) { - const pairs = this._animations[name]; - for (let i = 0, iMax = pairs.length; i < iMax; i++) { - const pair = pairs[i]; - pair.target.disconnect(pair.targetDestroyId); - } - } - this._animations = null; - } - - pause() { - if (this._started && this._count > 0) { - this._timeline.stop(); - } - this._started = false; - } - - start() { - if (!this._started && this._count > 0) { - this._timeline.start(); - } - this._started = true; - } - - addAnimation(target, name) { - const targetDestroyId = target.connect('destroy', () => this.removeAnimation(target, name)); - this._animations[name].push({ target: target, targetDestroyId: targetDestroyId }); - if (this._started && this._count === 0) { - this._timeline.start(); - } - this._count++; - } - - removeAnimation(target, name) { - const pairs = this._animations[name]; - for (let i = 0, iMax = pairs.length; i < iMax; i++) { - const pair = pairs[i]; - if (pair.target === target) { - target.disconnect(pair.targetDestroyId); - pairs.splice(i, 1); - this._count--; - if (this._started && this._count === 0) { - this._timeline.stop(); - } - return; - } - } - } -}; - -function newUpdateHotCorners() { - // destroy old hot corners - this.hotCorners.forEach(function(corner) { - if (corner) - corner.destroy(); - }); - this.hotCorners = []; - - //global.settings is ubuntu specific setting to disable the hot corner (Tweak tool > Top Bar > Activities Overview Hot Corner) - //this._interfaceSettings is for the setting to disable the hot corner introduced in gnome-shell 3.34 - if ((global.settings.list_keys().indexOf('enable-hot-corners') >= 0 && !global.settings.get_boolean('enable-hot-corners')) || - (this._interfaceSettings && !this._interfaceSettings.get_boolean('enable-hot-corners'))) { - this.emit('hot-corners-changed'); - return; - } - - // build new hot corners - for (let i = 0; i < this.monitors.length; i++) { - let panel = Utils.find(global.dashToPanel.panels, p => p.monitor.index == i); - let panelPosition = panel ? panel.getPosition() : St.Side.BOTTOM; - let panelTopLeft = panelPosition == St.Side.TOP || panelPosition == St.Side.LEFT; - let monitor = this.monitors[i]; - let cornerX = this._rtl ? monitor.x + monitor.width : monitor.x; - let cornerY = monitor.y; - - let haveTopLeftCorner = true; - - // If the panel is on the bottom, unless this is explicitly forced, don't add a topleft - // hot corner unless it is actually a top left panel. Otherwise, it stops the mouse - // as you are dragging across. In the future, maybe we will automatically move the - // hotcorner to the bottom when the panel is positioned at the bottom - if (i != this.primaryIndex || (!panelTopLeft && !SETTINGS.get_boolean('stockgs-force-hotcorner'))) { - // Check if we have a top left (right for RTL) corner. - // I.e. if there is no monitor directly above or to the left(right) - let besideX = this._rtl ? monitor.x + 1 : cornerX - 1; - let besideY = cornerY; - let aboveX = cornerX; - let aboveY = cornerY - 1; - - for (let j = 0; j < this.monitors.length; j++) { - if (i == j) - continue; - let otherMonitor = this.monitors[j]; - if (besideX >= otherMonitor.x && - besideX < otherMonitor.x + otherMonitor.width && - besideY >= otherMonitor.y && - besideY < otherMonitor.y + otherMonitor.height) { - haveTopLeftCorner = false; - break; - } - if (aboveX >= otherMonitor.x && - aboveX < otherMonitor.x + otherMonitor.width && - aboveY >= otherMonitor.y && - aboveY < otherMonitor.y + otherMonitor.height) { - haveTopLeftCorner = false; - break; - } - } - } - - if (haveTopLeftCorner) { - let corner = new Layout.HotCorner(this, monitor, cornerX, cornerY); - - corner.setBarrierSize = size => Object.getPrototypeOf(corner).setBarrierSize.call(corner, Math.min(size, 32)); - corner.setBarrierSize(panel ? panel.dtpSize : 32); - this.hotCorners.push(corner); - } else { - this.hotCorners.push(null); - } - } - - this.emit('hot-corners-changed'); -} - -function newUpdatePanelBarrier(panel) { - let barriers = { - _rightPanelBarrier: [(panel.isStandalone ? panel : this)], - _leftPanelBarrier: [panel] - }; - - Object.keys(barriers).forEach(k => { - let obj = barriers[k][0]; - - if (obj[k]) { - obj[k].destroy(); - obj[k] = null; - } - }); - - if (!this.primaryMonitor || !panel.panelBox.height) { - return; - } - - let barrierSize = Math.min(10, panel.panelBox.height); - let fixed1 = panel.monitor.y; - let fixed2 = panel.monitor.y + barrierSize; - - if (panel.checkIfVertical()) { - barriers._rightPanelBarrier.push(panel.monitor.y + panel.monitor.height, Meta.BarrierDirection.NEGATIVE_Y); - barriers._leftPanelBarrier.push(panel.monitor.y, Meta.BarrierDirection.POSITIVE_Y); - } else { - barriers._rightPanelBarrier.push(panel.monitor.x + panel.monitor.width, Meta.BarrierDirection.NEGATIVE_X); - barriers._leftPanelBarrier.push(panel.monitor.x, Meta.BarrierDirection.POSITIVE_X); - } - - switch (panel.getPosition()) { - //values are initialized as St.Side.TOP - case St.Side.BOTTOM: - fixed1 = panel.monitor.y + panel.monitor.height - barrierSize; - fixed2 = panel.monitor.y + panel.monitor.height; - break; - case St.Side.LEFT: - fixed1 = panel.monitor.x + barrierSize; - fixed2 = panel.monitor.x; - break; - case St.Side.RIGHT: - fixed1 = panel.monitor.x + panel.monitor.width - barrierSize; - fixed2 = panel.monitor.x + panel.monitor.width; - break; - } - - //remove left barrier if it overlaps one of the hotcorners - for (let k in this.hotCorners) { - let hc = this.hotCorners[k]; - - if (hc && hc._monitor == panel.monitor && - ((fixed1 == hc._x || fixed2 == hc._x) || fixed1 == hc._y || fixed2 == hc._y)) { - delete barriers._leftPanelBarrier; - break; - } - } - - Object.keys(barriers).forEach(k => { - let barrierOptions = { - backend: global.backend, - directions: barriers[k][2] - }; - - barrierOptions[panel.varCoord.c1] = barrierOptions[panel.varCoord.c2] = barriers[k][1]; - barrierOptions[panel.fixedCoord.c1] = fixed1; - barrierOptions[panel.fixedCoord.c2] = fixed2; - - barriers[k][0][k] = new Meta.Barrier(barrierOptions); - }); -} - -function _newLookingGlassResize() { - let primaryMonitorPanel = Utils.find(global.dashToPanel.panels, p => p.monitor == Main.layoutManager.primaryMonitor); - let topOffset = primaryMonitorPanel.getPosition() == St.Side.TOP ? primaryMonitorPanel.dtpSize + 8 : 32; - - this._oldResize(); - - this._hiddenY = Main.layoutManager.primaryMonitor.y + topOffset - this.height; - this._targetY = this._hiddenY + this.height; - this.y = this._hiddenY; - - this._objInspector.set_position(this.x + Math.floor(this.width * 0.1), this._targetY + Math.floor(this.height * 0.1)); -} - -function _newLookingGlassOpen() { - if (this._open) - return; - - this._resize(); - this._oldOpen(); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/extension.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/extension.js deleted file mode 100644 index f35f903e..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/extension.js +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Dash-To-Panel extension for Gnome 3 - * Copyright 2016 Jason DeRose (jderose9) and Charles Gagnon (charlesg99) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - -import Gio from 'gi://Gio'; - -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import {EventEmitter} from 'resource:///org/gnome/shell/misc/signals.js'; -import {Extension, gettext as _} from 'resource:///org/gnome/shell/extensions/extension.js'; - -import * as PanelManager from './panelManager.js'; -import * as Utils from './utils.js'; -import * as AppIcons from './appIcons.js'; - - -const UBUNTU_DOCK_UUID = 'ubuntu-dock@ubuntu.com'; - -let panelManager; -let extensionChangedHandler; -let startupCompleteHandler; -let disabledUbuntuDock; -let extensionSystem = Main.extensionManager; - -export let DTP_EXTENSION = null; -export let SETTINGS = null; -export let DESKTOPSETTINGS = null; -export let TERMINALSETTINGS = null; -export let PERSISTENTSTORAGE = null; -export let EXTENSION_UUID = null; -export let EXTENSION_PATH = null; - -export default class DashToPanelExtension extends Extension { - constructor(metadata) { - super(metadata); - - this._realHasOverview = Main.sessionMode.hasOverview; - - //create an object that persists until gnome-shell is restarted, even if the extension is disabled - PERSISTENTSTORAGE = {}; - } - - enable() { - DTP_EXTENSION = this; - - // The Ubuntu Dock extension might get enabled after this extension - extensionChangedHandler = extensionSystem.connect('extension-state-changed', (data, extension) => { - if (extension.uuid === UBUNTU_DOCK_UUID && extension.state === 1) { - _enable(this); - } - }); - - //create a global object that can emit signals and conveniently expose functionalities to other extensions - global.dashToPanel = new EventEmitter(); - - _enable(this); - } - - disable(reset = false) { - panelManager.disable(); - - DTP_EXTENSION = null; - SETTINGS = null; - DESKTOPSETTINGS = null; - TERMINALSETTINGS = null; - panelManager = null; - - if (!reset) { - extensionSystem.disconnect(extensionChangedHandler); - delete global.dashToPanel; - - // Re-enable Ubuntu Dock if it was disabled by dash to panel - if (disabledUbuntuDock) { - (extensionSystem._callExtensionEnable || extensionSystem.enableExtension).call(extensionSystem, UBUNTU_DOCK_UUID); - } - - AppIcons.resetRecentlyClickedApp(); - } - - if (startupCompleteHandler) { - Main.layoutManager.disconnect(startupCompleteHandler); - startupCompleteHandler = null; - } - - Main.sessionMode.hasOverview = this._realHasOverview; - } -} - -function _enable(extension) { - let ubuntuDock = extensionSystem.lookup(UBUNTU_DOCK_UUID); - - if (ubuntuDock && ubuntuDock.stateObj && ubuntuDock.state == 1) { //ExtensionState.ACTIVE - // Disable Ubuntu Dock - let extensionOrder = extensionSystem._extensionOrder; - - ubuntuDock.stateObj.disable(); - extensionSystem._unloadExtensionStylesheet(ubuntuDock); - ubuntuDock.state = 2; //ExtensionState.INACTIVE - extensionOrder.splice(extensionOrder.indexOf(UBUNTU_DOCK_UUID), 1); - - disabledUbuntuDock = true; - - //reset to prevent conflicts with the ubuntu-dock - if (panelManager) { - extension.disable(true); - } - } - - if (panelManager) return; //already initialized - - SETTINGS = extension.getSettings('org.gnome.shell.extensions.dash-to-panel'); - DESKTOPSETTINGS = new Gio.Settings({schema_id: 'org.gnome.desktop.interface'}); - TERMINALSETTINGS = new Gio.Settings({schema_id: 'org.gnome.desktop.default-applications.terminal'}) - EXTENSION_UUID = extension.uuid - EXTENSION_PATH = extension.path - - Main.layoutManager.startInOverview = !SETTINGS.get_boolean('hide-overview-on-startup'); - - if (SETTINGS.get_boolean('hide-overview-on-startup') && Main.layoutManager._startingUp) { - Main.sessionMode.hasOverview = false; - startupCompleteHandler = Main.layoutManager.connect('startup-complete', () => { - Main.sessionMode.hasOverview = extension._realHasOverview - }); - } - - panelManager = new PanelManager.PanelManager(); - - panelManager.enable(); -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/img/highlight_stacked_bg.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/img/highlight_stacked_bg.svg deleted file mode 100644 index 977146b1..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/img/highlight_stacked_bg.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/img/highlight_stacked_bg_2.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/img/highlight_stacked_bg_2.svg deleted file mode 100644 index 47aa8025..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/img/highlight_stacked_bg_2.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/img/highlight_stacked_bg_3.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/img/highlight_stacked_bg_3.svg deleted file mode 100644 index 80420fdb..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/img/highlight_stacked_bg_3.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/intellihide.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/intellihide.js deleted file mode 100644 index 9bc157ee..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/intellihide.js +++ /dev/null @@ -1,427 +0,0 @@ -/* - * This file is part of the Dash-To-Panel extension for Gnome 3 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -import Clutter from 'gi://Clutter'; -import Meta from 'gi://Meta'; -import Shell from 'gi://Shell'; -import St from 'gi://St'; - -import * as GrabHelper from 'resource:///org/gnome/shell/ui/grabHelper.js'; -import * as Layout from 'resource:///org/gnome/shell/ui/layout.js'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import * as OverviewControls from 'resource:///org/gnome/shell/ui/overviewControls.js'; -import * as PointerWatcher from 'resource:///org/gnome/shell/ui/pointerWatcher.js'; - -import * as Proximity from './proximity.js'; -import * as Utils from './utils.js'; -import {SETTINGS} from './extension.js'; - -//timeout intervals -const CHECK_POINTER_MS = 200; -const CHECK_GRAB_MS = 400; -const POST_ANIMATE_MS = 50; -const MIN_UPDATE_MS = 250; - -//timeout names -const T1 = 'checkGrabTimeout'; -const T2 = 'limitUpdateTimeout'; -const T3 = 'postAnimateTimeout'; - -const SIDE_CONTROLS_ANIMATION_TIME = OverviewControls.SIDE_CONTROLS_ANIMATION_TIME / (OverviewControls.SIDE_CONTROLS_ANIMATION_TIME > 1 ? 1000 : 1); - -export const Hold = { - NONE: 0, - TEMPORARY: 1, - PERMANENT: 2 -}; - -export const Intellihide = class { - - constructor(dtpPanel) { - this._dtpPanel = dtpPanel; - this._panelBox = dtpPanel.panelBox; - this._panelManager = dtpPanel.panelManager; - this._proximityManager = this._panelManager.proximityManager; - this._holdStatus = Hold.NONE; - - this._signalsHandler = new Utils.GlobalSignalsHandler(); - this._timeoutsHandler = new Utils.TimeoutsHandler(); - - this._intellihideChangedId = SETTINGS.connect('changed::intellihide', () => this._changeEnabledStatus()); - this._intellihideOnlySecondaryChangedId = SETTINGS.connect('changed::intellihide-only-secondary', () => this._changeEnabledStatus()); - - this.enabled = false; - this._changeEnabledStatus(); - } - - enable() { - this.enabled = true; - this._monitor = this._dtpPanel.monitor; - this._animationDestination = -1; - this._pendingUpdate = false; - this._hoveredOut = false; - this._windowOverlap = false; - this._translationProp = 'translation_' + (this._dtpPanel.checkIfVertical() ? 'x' : 'y'); - - this._panelBox.translation_y = 0; - this._panelBox.translation_x = 0; - - this._setTrackPanel(true); - this._bindGeneralSignals(); - - if (SETTINGS.get_boolean('intellihide-hide-from-windows')) { - this._proximityWatchId = this._proximityManager.createWatch( - this._panelBox.get_parent(), - this._dtpPanel.monitor.index, - Proximity.Mode[SETTINGS.get_string('intellihide-behaviour')], - 0, 0, - overlap => { - this._windowOverlap = overlap; - this._queueUpdatePanelPosition(); - } - ); - } - - this._setRevealMechanism(); - this._queueUpdatePanelPosition(); - } - - disable(reset) { - if (this._proximityWatchId) { - this._proximityManager.removeWatch(this._proximityWatchId); - } - - this._setTrackPanel(false); - - this._signalsHandler.destroy(); - this._timeoutsHandler.destroy(); - - this._removeRevealMechanism(); - - this._revealPanel(!reset); - - this.enabled = false; - } - - destroy() { - SETTINGS.disconnect(this._intellihideChangedId); - SETTINGS.disconnect(this._intellihideOnlySecondaryChangedId); - - if (this.enabled) { - this.disable(); - } - } - - toggle() { - this[this._holdStatus & Hold.PERMANENT ? 'release' : 'revealAndHold'](Hold.PERMANENT); - } - - revealAndHold(holdStatus) { - if (this.enabled && !this._holdStatus) { - this._revealPanel(); - } - - this._holdStatus |= holdStatus; - } - - release(holdStatus) { - this._holdStatus -= holdStatus; - - if (this.enabled && !this._holdStatus) { - this._queueUpdatePanelPosition(); - } - } - - reset() { - this.disable(true); - this.enable(); - } - - _changeEnabledStatus() { - let intellihide = SETTINGS.get_boolean('intellihide'); - let onlySecondary = SETTINGS.get_boolean('intellihide-only-secondary'); - let enabled = intellihide && !(this._dtpPanel.isPrimary && onlySecondary); - - if (this.enabled !== enabled) { - this[enabled ? 'enable' : 'disable'](); - } - } - - _bindGeneralSignals() { - this._signalsHandler.add( - [ - this._dtpPanel.taskbar, - ['menu-closed', 'end-drag'], - () => { - this._panelBox.sync_hover(); - this._onHoverChanged(); - } - ], - [ - SETTINGS, - [ - 'changed::intellihide-use-pressure', - 'changed::intellihide-hide-from-windows', - 'changed::intellihide-behaviour', - 'changed::intellihide-pressure-threshold', - 'changed::intellihide-pressure-time' - ], - () => this.reset() - ], - [ - this._panelBox, - 'notify::hover', - () => this._onHoverChanged() - ], - [ - this._dtpPanel.taskbar.previewMenu, - 'open-state-changed', - () => this._queueUpdatePanelPosition() - ], - [ - Main.overview, - [ - 'showing', - 'hiding' - ], - () => this._queueUpdatePanelPosition() - ] - ); - - if (Meta.is_wayland_compositor()) { - this._signalsHandler.add([ - this._panelBox, - 'notify::visible', - () => Utils.setDisplayUnredirect(!this._panelBox.visible) - ]); - } - } - - _onHoverChanged() { - this._hoveredOut = !this._panelBox.hover; - this._queueUpdatePanelPosition(); - } - - _setTrackPanel(enable) { - let actorData = Utils.getTrackedActorData(this._panelBox) - - actorData.affectsStruts = !enable; - actorData.trackFullscreen = !enable; - - this._panelBox.track_hover = enable; - this._panelBox.reactive = enable; - this._panelBox.visible = enable ? enable : this._panelBox.visible; - - Main.layoutManager._queueUpdateRegions(); - } - - _setRevealMechanism() { - let barriers = Meta.BackendCapabilities.BARRIERS - - if ((global.backend.capabilities & barriers) === barriers && SETTINGS.get_boolean('intellihide-use-pressure')) { - this._edgeBarrier = this._createBarrier(); - this._pressureBarrier = new Layout.PressureBarrier( - SETTINGS.get_int('intellihide-pressure-threshold'), - SETTINGS.get_int('intellihide-pressure-time'), - Shell.ActionMode.NORMAL - ); - this._pressureBarrier.addBarrier(this._edgeBarrier); - this._signalsHandler.add([this._pressureBarrier, 'trigger', () => this._queueUpdatePanelPosition(true)]); - } else { - this._pointerWatch = PointerWatcher.getPointerWatcher() - .addWatch(CHECK_POINTER_MS, (x, y) => this._checkMousePointer(x, y)); - } - } - - _removeRevealMechanism() { - if (this._pointerWatch) { - PointerWatcher.getPointerWatcher()._removeWatch(this._pointerWatch); - } - - if (this._pressureBarrier) { - this._pressureBarrier.destroy(); - this._edgeBarrier.destroy(); - - this._pressureBarrier = 0; - } - } - - _createBarrier() { - let position = this._dtpPanel.geom.position; - let opts = { backend: global.backend }; - - if (this._dtpPanel.checkIfVertical()) { - opts.y1 = this._monitor.y; - opts.y2 = this._monitor.y + this._monitor.height; - opts.x1 = opts.x2 = this._monitor.x; - } else { - opts.x1 = this._monitor.x; - opts.x2 = this._monitor.x + this._monitor.width; - opts.y1 = opts.y2 = this._monitor.y; - } - - if (position == St.Side.TOP) { - opts.directions = Meta.BarrierDirection.POSITIVE_Y; - } else if (position == St.Side.BOTTOM) { - opts.y1 = opts.y2 = opts.y1 + this._monitor.height; - opts.directions = Meta.BarrierDirection.NEGATIVE_Y; - } else if (position == St.Side.LEFT) { - opts.directions = Meta.BarrierDirection.POSITIVE_X; - } else { - opts.x1 = opts.x2 = opts.x1 + this._monitor.width; - opts.directions = Meta.BarrierDirection.NEGATIVE_X; - } - - return new Meta.Barrier(opts); - } - - _checkMousePointer(x, y) { - let position = this._dtpPanel.geom.position; - - if (!this._panelBox.hover && !Main.overview.visible && - ((position == St.Side.TOP && y <= this._monitor.y + 1) || - (position == St.Side.BOTTOM && y >= this._monitor.y + this._monitor.height - 1) || - (position == St.Side.LEFT && x <= this._monitor.x + 1) || - (position == St.Side.RIGHT && x >= this._monitor.x + this._monitor.width - 1)) && - ((x >= this._monitor.x && x < this._monitor.x + this._monitor.width) && - (y >= this._monitor.y && y < this._monitor.y + this._monitor.height))) { - this._queueUpdatePanelPosition(true); - } - } - - _queueUpdatePanelPosition(fromRevealMechanism) { - if (!fromRevealMechanism && this._timeoutsHandler.getId(T2) && !Main.overview.visible) { - //unless this is a mouse interaction or entering/leaving the overview, limit the number - //of updates, but remember to update again when the limit timeout is reached - this._pendingUpdate = true; - } else if (!this._holdStatus) { - this._checkIfShouldBeVisible(fromRevealMechanism) ? this._revealPanel() : this._hidePanel(); - this._timeoutsHandler.add([T2, MIN_UPDATE_MS, () => this._endLimitUpdate()]); - } - } - - _endLimitUpdate() { - if (this._pendingUpdate) { - this._pendingUpdate = false; - this._queueUpdatePanelPosition(); - } - } - - _checkIfShouldBeVisible(fromRevealMechanism) { - if (Main.overview.visibleTarget || this._dtpPanel.taskbar.previewMenu.opened || - this._dtpPanel.taskbar._dragMonitor || this._panelBox.get_hover() || this._checkIfGrab()) { - return true; - } - - if (fromRevealMechanism) { - let mouseBtnIsPressed = global.get_pointer()[2] & Clutter.ModifierType.BUTTON1_MASK; - - //the user is trying to reveal the panel - if (this._monitor.inFullscreen && !mouseBtnIsPressed) { - return SETTINGS.get_boolean('intellihide-show-in-fullscreen'); - } - - return !mouseBtnIsPressed; - } - - if (!SETTINGS.get_boolean('intellihide-hide-from-windows')) { - return this._panelBox.hover; - } - - return !this._windowOverlap; - } - - _checkIfGrab() { - let isGrab - - if (GrabHelper._grabHelperStack) - // gnome-shell < 42 - isGrab = GrabHelper._grabHelperStack.some(gh => gh._owner == this._dtpPanel.panel) - else if (global.stage.get_grab_actor) { - // gnome-shell >= 42 - let grabActor = global.stage.get_grab_actor() - let sourceActor = grabActor?._sourceActor || grabActor - - isGrab = sourceActor && - (sourceActor == Main.layoutManager.dummyCursor || - this._dtpPanel.statusArea.quickSettings?.menu.actor.contains(sourceActor) || - this._dtpPanel.panel.contains(sourceActor)) - } - - if (isGrab) - //there currently is a grab on a child of the panel, check again soon to catch its release - this._timeoutsHandler.add([T1, CHECK_GRAB_MS, () => this._queueUpdatePanelPosition()]); - - return isGrab; - } - - _revealPanel(immediate) { - if (!this._panelBox.visible) { - this._panelBox.visible = true; - this._dtpPanel.taskbar._shownInitially = false; - } - - this._animatePanel(0, immediate); - } - - _hidePanel(immediate) { - let position = this._dtpPanel.geom.position; - let size = this._panelBox[position == St.Side.LEFT || position == St.Side.RIGHT ? 'width' : 'height']; - let coefficient = position == St.Side.TOP || position == St.Side.LEFT ? -1 : 1; - - this._animatePanel(size * coefficient, immediate); - } - - _animatePanel(destination, immediate) { - let animating = Utils.isAnimating(this._panelBox, this._translationProp); - - if (!((animating && destination === this._animationDestination) || - (!animating && destination === this._panelBox[this._translationProp]))) { - //the panel isn't already at, or animating to the asked destination - if (animating) { - Utils.stopAnimations(this._panelBox); - } - - this._animationDestination = destination; - - if (immediate) { - this._panelBox[this._translationProp] = destination; - this._panelBox.visible = !destination; - } else { - let tweenOpts = { - //when entering/leaving the overview, use its animation time instead of the one from the settings - time: Main.overview.visible ? - SIDE_CONTROLS_ANIMATION_TIME : - SETTINGS.get_int('intellihide-animation-time') * 0.001, - //only delay the animation when hiding the panel after the user hovered out - delay: destination != 0 && this._hoveredOut ? SETTINGS.get_int('intellihide-close-delay') * 0.001 : 0, - transition: 'easeOutQuad', - onComplete: () => { - this._panelBox.visible = !destination; - Main.layoutManager._queueUpdateRegions(); - this._timeoutsHandler.add([T3, POST_ANIMATE_MS, () => this._queueUpdatePanelPosition()]); - } - }; - - tweenOpts[this._translationProp] = destination; - Utils.animate(this._panelBox, tweenOpts); - } - } - - this._hoveredOut = false; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/cs/LC_MESSAGES/dash-to-panel.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/cs/LC_MESSAGES/dash-to-panel.mo deleted file mode 100644 index d7676757..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/cs/LC_MESSAGES/dash-to-panel.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/de/LC_MESSAGES/dash-to-panel.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/de/LC_MESSAGES/dash-to-panel.mo deleted file mode 100644 index 667c7a39..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/de/LC_MESSAGES/dash-to-panel.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/es/LC_MESSAGES/dash-to-panel.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/es/LC_MESSAGES/dash-to-panel.mo deleted file mode 100644 index 61045151..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/es/LC_MESSAGES/dash-to-panel.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/fa/LC_MESSAGES/dash-to-panel.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/fa/LC_MESSAGES/dash-to-panel.mo deleted file mode 100644 index 82cc5c28..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/fa/LC_MESSAGES/dash-to-panel.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/fr/LC_MESSAGES/dash-to-panel.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/fr/LC_MESSAGES/dash-to-panel.mo deleted file mode 100644 index a002a221..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/fr/LC_MESSAGES/dash-to-panel.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/gl/LC_MESSAGES/dash-to-panel.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/gl/LC_MESSAGES/dash-to-panel.mo deleted file mode 100644 index 9df4e96e..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/gl/LC_MESSAGES/dash-to-panel.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/hu/LC_MESSAGES/dash-to-panel.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/hu/LC_MESSAGES/dash-to-panel.mo deleted file mode 100644 index 866ce3e0..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/hu/LC_MESSAGES/dash-to-panel.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/it/LC_MESSAGES/dash-to-panel.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/it/LC_MESSAGES/dash-to-panel.mo deleted file mode 100644 index 3151da61..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/it/LC_MESSAGES/dash-to-panel.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/ja/LC_MESSAGES/dash-to-panel.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/ja/LC_MESSAGES/dash-to-panel.mo deleted file mode 100644 index 8b4d4f8f..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/ja/LC_MESSAGES/dash-to-panel.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/kk/LC_MESSAGES/dash-to-panel.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/kk/LC_MESSAGES/dash-to-panel.mo deleted file mode 100644 index c23fc213..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/kk/LC_MESSAGES/dash-to-panel.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/ko/LC_MESSAGES/dash-to-panel.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/ko/LC_MESSAGES/dash-to-panel.mo deleted file mode 100644 index 8bd529ea..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/ko/LC_MESSAGES/dash-to-panel.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/nl/LC_MESSAGES/dash-to-panel.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/nl/LC_MESSAGES/dash-to-panel.mo deleted file mode 100644 index b45a90d4..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/nl/LC_MESSAGES/dash-to-panel.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/pl/LC_MESSAGES/dash-to-panel.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/pl/LC_MESSAGES/dash-to-panel.mo deleted file mode 100644 index cc9d6e20..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/pl/LC_MESSAGES/dash-to-panel.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/pt_BR/LC_MESSAGES/dash-to-panel.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/pt_BR/LC_MESSAGES/dash-to-panel.mo deleted file mode 100644 index 84c8f881..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/pt_BR/LC_MESSAGES/dash-to-panel.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/ru/LC_MESSAGES/dash-to-panel.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/ru/LC_MESSAGES/dash-to-panel.mo deleted file mode 100644 index 312b52d9..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/ru/LC_MESSAGES/dash-to-panel.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/sk/LC_MESSAGES/dash-to-panel.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/sk/LC_MESSAGES/dash-to-panel.mo deleted file mode 100644 index 6732ff6e..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/sk/LC_MESSAGES/dash-to-panel.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/sv/LC_MESSAGES/dash-to-panel.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/sv/LC_MESSAGES/dash-to-panel.mo deleted file mode 100644 index 2d72e4f2..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/sv/LC_MESSAGES/dash-to-panel.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/tr/LC_MESSAGES/dash-to-panel.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/tr/LC_MESSAGES/dash-to-panel.mo deleted file mode 100644 index 4628d41c..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/tr/LC_MESSAGES/dash-to-panel.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/uk/LC_MESSAGES/dash-to-panel.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/uk/LC_MESSAGES/dash-to-panel.mo deleted file mode 100644 index 7ac58eb5..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/uk/LC_MESSAGES/dash-to-panel.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/zh_CN/LC_MESSAGES/dash-to-panel.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/zh_CN/LC_MESSAGES/dash-to-panel.mo deleted file mode 100644 index 350fd9a2..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/zh_CN/LC_MESSAGES/dash-to-panel.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/zh_TW/LC_MESSAGES/dash-to-panel.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/zh_TW/LC_MESSAGES/dash-to-panel.mo deleted file mode 100644 index c82af66a..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/locale/zh_TW/LC_MESSAGES/dash-to-panel.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/overview.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/overview.js deleted file mode 100644 index e4f4961a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/overview.js +++ /dev/null @@ -1,518 +0,0 @@ -/* - * This file is part of the Dash-To-Panel extension for Gnome 3 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * Credits: - * This file is based on code from the Dash to Dock extension by micheleg - * - * Some code was also adapted from the upstream Gnome Shell source code. - */ - -import * as Intellihide from './intellihide.js'; -import * as Utils from './utils.js'; - -import Clutter from 'gi://Clutter'; -import Gio from 'gi://Gio'; -import Shell from 'gi://Shell'; -import St from 'gi://St'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import * as WindowManager from 'resource:///org/gnome/shell/ui/windowManager.js'; -import {WindowPreview} from 'resource:///org/gnome/shell/ui/windowPreview.js'; -import {InjectionManager} from 'resource:///org/gnome/shell/extensions/extension.js'; -import {SETTINGS} from './extension.js'; - -const GS_HOTKEYS_KEY = 'switch-to-application-'; - -// When the dash is shown, workspace window preview bottom labels go over it (default -// gnome-shell behavior), but when the extension hides the dash, leave some space -// so those labels don't go over a bottom panel -const LABEL_MARGIN = 60; - -//timeout names -const T1 = 'swipeEndTimeout'; -const T2 = 'numberOverlayTimeout'; - -export const Overview = class { - - constructor() { - this._injectionManager = new InjectionManager(); - this._numHotkeys = 10; - } - - enable (primaryPanel) { - this._panel = primaryPanel; - this.taskbar = primaryPanel.taskbar; - - this._injectionsHandler = new Utils.InjectionsHandler(); - this._signalsHandler = new Utils.GlobalSignalsHandler(); - this._timeoutsHandler = new Utils.TimeoutsHandler(); - - this._optionalWorkspaceIsolation(); - this._optionalHotKeys(); - this._optionalNumberOverlay(); - this._optionalClickToExit(); - - this._toggleDash(); - this._adaptAlloc(); - - this._signalsHandler.add([ - SETTINGS, - [ - 'changed::stockgs-keep-dash', - 'changed::panel-sizes' - ], - () => this._toggleDash() - ]); - } - - disable() { - this._signalsHandler.destroy(); - this._injectionsHandler.destroy(); - this._timeoutsHandler.destroy(); - this._injectionManager.clear(); - - this._toggleDash(true); - - // Remove key bindings - this._disableHotKeys(); - this._disableExtraShortcut(); - this._disableClickToExit(); - } - - _toggleDash(visible) { - if (visible === undefined) { - visible = SETTINGS.get_boolean('stockgs-keep-dash'); - } - - let visibilityFunc = visible ? 'show' : 'hide'; - let height = visible ? -1 : LABEL_MARGIN * Utils.getScaleFactor(); - let overviewControls = Main.overview._overview._controls; - - overviewControls.dash[visibilityFunc](); - overviewControls.dash.set_height(height); - } - - _adaptAlloc() { - let overviewControls = Main.overview._overview._controls - - this._injectionManager.overrideMethod(Object.getPrototypeOf(overviewControls), 'vfunc_allocate', - (originalAllocate) => - (box) => { - let focusedPanel = this._panel.panelManager.focusedMonitorPanel - - if (focusedPanel) { - let position = focusedPanel.geom.position - let isBottom = position == St.Side.BOTTOM - - if (focusedPanel.intellihide?.enabled) { - // Panel intellihide is enabled (struts aren't taken into account on overview allocation), - // dynamically modify the overview box to follow the reveal/hide animation - let { transitioning, finalState, progress } = overviewControls._stateAdjustment.getStateTransitionParams() - let size = focusedPanel.geom[focusedPanel.checkIfVertical() ? 'w' : 'h'] * - (transitioning ? Math.abs((finalState != 0 ? 0 : 1) - progress) : 1) - - if (isBottom || position == St.Side.RIGHT) - box[focusedPanel.fixedCoord.c2] -= size - else - box[focusedPanel.fixedCoord.c1] += size - } else if (isBottom) - // The default overview allocation is very good and takes into account external - // struts, everywhere but the bottom where the dash is usually fixed anyway. - // If there is a bottom panel under the dash location, give it some space here - box.y2 -= focusedPanel.geom.h - } - - originalAllocate.call(overviewControls, box) - } - ); - } - - /** - * Isolate overview to open new windows for inactive apps - */ - _optionalWorkspaceIsolation() { - let label = 'optionalWorkspaceIsolation'; - - let enable = () => { - this._injectionsHandler.removeWithLabel(label); - - this._injectionsHandler.addWithLabel(label, [ - Shell.App.prototype, - 'activate', - IsolatedOverview - ]); - - this._signalsHandler.removeWithLabel(label); - - this._signalsHandler.addWithLabel(label, [ - global.window_manager, - 'switch-workspace', - () => this._panel.panelManager.allPanels.forEach(p => p.taskbar.handleIsolatedWorkspaceSwitch()) - ]); - } - - let disable = () => { - this._signalsHandler.removeWithLabel(label); - this._injectionsHandler.removeWithLabel(label); - } - - function IsolatedOverview() { - // These lines take care of Nautilus for icons on Desktop - let activeWorkspace = Utils.DisplayWrapper.getWorkspaceManager().get_active_workspace(); - let windows = this.get_windows().filter(w => w.get_workspace().index() == activeWorkspace.index()); - - if (windows.length > 0 && - (!(windows.length == 1 && windows[0].skip_taskbar) || - this.is_on_workspace(activeWorkspace))) - return Main.activateWindow(windows[0]); - - return this.open_new_window(-1); - } - - this._signalsHandler.add([ - SETTINGS, - 'changed::isolate-workspaces', - () => { - this._panel.panelManager.allPanels.forEach(p => p.taskbar.resetAppIcons()); - - if (SETTINGS.get_boolean('isolate-workspaces')) - enable(); - else - disable(); - } - ]); - - if (SETTINGS.get_boolean('isolate-workspaces')) - enable(); - } - - // Hotkeys - _activateApp(appIndex, modifiers) { - let seenApps = {}; - let apps = []; - - this.taskbar._getAppIcons().forEach(appIcon => { - if (!seenApps[appIcon.app] || this.taskbar.allowSplitApps) { - apps.push(appIcon); - } - - seenApps[appIcon.app] = (seenApps[appIcon.app] || 0) + 1; - }); - - this._showOverlay(); - - if (appIndex < apps.length) { - let appIcon = apps[appIndex]; - let seenAppCount = seenApps[appIcon.app]; - let windowCount = appIcon.window || appIcon._hotkeysCycle ? seenAppCount : appIcon._nWindows; - - if (SETTINGS.get_boolean('shortcut-previews') && windowCount > 1 && - !(modifiers & ~(Clutter.ModifierType.MOD1_MASK | Clutter.ModifierType.SUPER_MASK))) { //ignore the alt (MOD1_MASK) and super key (SUPER_MASK) - if (this._hotkeyPreviewCycleInfo && this._hotkeyPreviewCycleInfo.appIcon != appIcon) { - this._endHotkeyPreviewCycle(); - } - - if (!this._hotkeyPreviewCycleInfo) { - this._hotkeyPreviewCycleInfo = { - appIcon: appIcon, - currentWindow: appIcon.window, - keyFocusOutId: appIcon.connect('key-focus-out', () => appIcon.grab_key_focus()), - capturedEventId: global.stage.connect('captured-event', (actor, e) => { - if (e.type() == Clutter.EventType.KEY_RELEASE && e.get_key_symbol() == (Clutter.KEY_Super_L || Clutter.Super_L)) { - this._endHotkeyPreviewCycle(true); - } - - return Clutter.EVENT_PROPAGATE; - }) - }; - - appIcon._hotkeysCycle = appIcon.window; - appIcon.window = null; - appIcon._previewMenu.open(appIcon, true); - appIcon.grab_key_focus(); - } - - appIcon._previewMenu.focusNext(); - } else { - // Activate with button = 1, i.e. same as left click - let button = 1; - this._endHotkeyPreviewCycle(); - appIcon.activate(button, modifiers, !this.taskbar.allowSplitApps); - } - } - } - - _endHotkeyPreviewCycle(focusWindow) { - if (this._hotkeyPreviewCycleInfo) { - global.stage.disconnect(this._hotkeyPreviewCycleInfo.capturedEventId); - this._hotkeyPreviewCycleInfo.appIcon.disconnect(this._hotkeyPreviewCycleInfo.keyFocusOutId); - - if (focusWindow) { - this._hotkeyPreviewCycleInfo.appIcon._previewMenu.activateFocused(); - } else - this._hotkeyPreviewCycleInfo.appIcon._previewMenu.close() - - this._hotkeyPreviewCycleInfo.appIcon.window = this._hotkeyPreviewCycleInfo.currentWindow; - delete this._hotkeyPreviewCycleInfo.appIcon._hotkeysCycle; - this._hotkeyPreviewCycleInfo = 0; - } - } - - _optionalHotKeys() { - this._hotKeysEnabled = false; - if (SETTINGS.get_boolean('hot-keys')) - this._enableHotKeys(); - - this._signalsHandler.add([ - SETTINGS, - 'changed::hot-keys', - () => { - if (SETTINGS.get_boolean('hot-keys')) - this._enableHotKeys(); - else - this._disableHotKeys(); - } - ]); - } - - _resetHotkeys() { - this._disableHotKeys(); - this._enableHotKeys(); - } - - _enableHotKeys() { - if (this._hotKeysEnabled) - return; - - //3.32 introduced app hotkeys, disable them to prevent conflicts - if (Main.wm._switchToApplication) { - for (let i = 1; i < 10; ++i) { - Utils.removeKeybinding(GS_HOTKEYS_KEY + i); - } - } - - // Setup keyboard bindings for taskbar elements - let shortcutNumKeys = SETTINGS.get_string('shortcut-num-keys'); - let bothNumKeys = shortcutNumKeys == 'BOTH'; - let keys = []; - let prefixModifiers = Clutter.ModifierType.SUPER_MASK - - if (SETTINGS.get_string('hotkey-prefix-text') == 'SuperAlt') - prefixModifiers |= Clutter.ModifierType.MOD1_MASK - - if (bothNumKeys || shortcutNumKeys == 'NUM_ROW') { - keys.push('app-hotkey-', 'app-shift-hotkey-', 'app-ctrl-hotkey-'); // Regular numbers - } - - if (bothNumKeys || shortcutNumKeys == 'NUM_KEYPAD') { - keys.push('app-hotkey-kp-', 'app-shift-hotkey-kp-', 'app-ctrl-hotkey-kp-'); // Key-pad numbers - } - - keys.forEach( function(key) { - let modifiers = prefixModifiers - - // for some reason, in gnome-shell >= 40 Clutter.get_current_event() is now empty - // for keyboard events. Create here the modifiers that are needed in appicon.activate - modifiers |= (key.indexOf('-shift-') >= 0 ? Clutter.ModifierType.SHIFT_MASK : 0) - modifiers |= (key.indexOf('-ctrl-') >= 0 ? Clutter.ModifierType.CONTROL_MASK : 0) - - for (let i = 0; i < this._numHotkeys; i++) { - let appNum = i; - - Utils.addKeybinding(key + (i + 1), SETTINGS, () => this._activateApp(appNum, modifiers)); - } - }, this); - - this._hotKeysEnabled = true; - - if (SETTINGS.get_string('hotkeys-overlay-combo') === 'ALWAYS') - this.taskbar.toggleNumberOverlay(true); - } - - _disableHotKeys() { - if (!this._hotKeysEnabled) - return; - - let keys = ['app-hotkey-', 'app-shift-hotkey-', 'app-ctrl-hotkey-', // Regular numbers - 'app-hotkey-kp-', 'app-shift-hotkey-kp-', 'app-ctrl-hotkey-kp-']; // Key-pad numbers - keys.forEach( function(key) { - for (let i = 0; i < this._numHotkeys; i++) { - Utils.removeKeybinding(key + (i + 1)); - } - }, this); - - if (Main.wm._switchToApplication) { - let gsSettings = new Gio.Settings({ schema_id: WindowManager.SHELL_KEYBINDINGS_SCHEMA }); - - for (let i = 1; i < 10; ++i) { - Utils.addKeybinding(GS_HOTKEYS_KEY + i, gsSettings, Main.wm._switchToApplication.bind(Main.wm)); - } - } - - this._hotKeysEnabled = false; - - this.taskbar.toggleNumberOverlay(false); - } - - _optionalNumberOverlay() { - // Enable extra shortcut - if (SETTINGS.get_boolean('hot-keys')) - this._enableExtraShortcut(); - - this._signalsHandler.add([ - SETTINGS, - 'changed::hot-keys', - this._checkHotkeysOptions.bind(this) - ], [ - SETTINGS, - 'changed::hotkeys-overlay-combo', - () => { - if (SETTINGS.get_boolean('hot-keys') && SETTINGS.get_string('hotkeys-overlay-combo') === 'ALWAYS') - this.taskbar.toggleNumberOverlay(true); - else - this.taskbar.toggleNumberOverlay(false); - } - ], [ - SETTINGS, - 'changed::shortcut-num-keys', - () => this._resetHotkeys() - ]); - } - - _checkHotkeysOptions() { - if (SETTINGS.get_boolean('hot-keys')) - this._enableExtraShortcut(); - else - this._disableExtraShortcut(); - } - - _enableExtraShortcut() { - Utils.addKeybinding('shortcut', SETTINGS, () => this._showOverlay(true)); - } - - _disableExtraShortcut() { - Utils.removeKeybinding('shortcut'); - } - - _showOverlay(overlayFromShortcut) { - //wait for intellihide timeout initialization - if (!this._panel.intellihide) { - return; - } - - // Restart the counting if the shortcut is pressed again - let hotkey_option = SETTINGS.get_string('hotkeys-overlay-combo'); - - if (hotkey_option === 'NEVER') - return; - - if (hotkey_option === 'TEMPORARILY' || overlayFromShortcut) - this.taskbar.toggleNumberOverlay(true); - - this._panel.intellihide.revealAndHold(Intellihide.Hold.TEMPORARY); - - let timeout = SETTINGS.get_int('overlay-timeout'); - - if (overlayFromShortcut) { - timeout = SETTINGS.get_int('shortcut-timeout'); - } - - // Hide the overlay/dock after the timeout - this._timeoutsHandler.add([T2, timeout, () => { - if (hotkey_option != 'ALWAYS') { - this.taskbar.toggleNumberOverlay(false); - } - - this._panel.intellihide.release(Intellihide.Hold.TEMPORARY); - }]); - } - - _optionalClickToExit() { - this._clickToExitEnabled = false; - if (SETTINGS.get_boolean('overview-click-to-exit')) - this._enableClickToExit(); - - this._signalsHandler.add([ - SETTINGS, - 'changed::overview-click-to-exit', - () => { - if (SETTINGS.get_boolean('overview-click-to-exit')) - this._enableClickToExit(); - else - this._disableClickToExit(); - } - ]); - } - - _enableClickToExit() { - if (this._clickToExitEnabled) - return; - - this._signalsHandler.addWithLabel('click-to-exit', [ - Main.layoutManager.overviewGroup, - 'button-release-event', - () => { - let [x, y] = global.get_pointer(); - let pickedActor = global.stage.get_actor_at_pos(Clutter.PickMode.REACTIVE, x, y); - - if (pickedActor) { - let parent = pickedActor.get_parent(); - - if ( - ( - pickedActor.has_style_class_name && - pickedActor.has_style_class_name('apps-scroll-view') && - !pickedActor.has_style_pseudo_class('first-child') - ) || ( - parent?.has_style_class_name && - parent.has_style_class_name('window-picker') - ) || - Main.overview._overview._controls._searchEntryBin.contains(pickedActor) || - pickedActor instanceof WindowPreview - ) - return Clutter.EVENT_PROPAGATE - } - - Main.overview.toggle() - } - ]); - - this._clickToExitEnabled = true; - } - - _disableClickToExit() { - if (!this._clickToExitEnabled) - return; - - this._signalsHandler.removeWithLabel('click-to-exit') - - this._clickToExitEnabled = false; - } - - _onSwipeBegin() { - this._swiping = true; - return true; - } - - _onSwipeEnd() { - this._timeoutsHandler.add([ - T1, - 0, - () => this._swiping = false - ]); - return true; - } - -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/panel.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/panel.js deleted file mode 100644 index d025b9bf..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/panel.js +++ /dev/null @@ -1,1263 +0,0 @@ -/* - * This file is part of the Dash-To-Panel extension for Gnome 3 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * Credits: - * This file is based on code from the Dash to Dock extension by micheleg - * and code from the Taskbar extension by Zorin OS - * - * Code to re-anchor the panel was taken from Thoma5 BottomPanel: - * https://github.com/Thoma5/gnome-shell-extension-bottompanel - * - * Pattern for moving clock based on Frippery Move Clock by R M Yorston - * http://frippery.org/extensions/ - * - * Some code was also adapted from the upstream Gnome Shell source code. - */ - -import Clutter from 'gi://Clutter'; -import GObject from 'gi://GObject'; -import * as AppIcons from './appIcons.js'; -import * as Utils from './utils.js'; -import * as Taskbar from './taskbar.js'; -import * as TaskbarItemContainer from './taskbar.js'; -import * as Pos from './panelPositions.js'; -import * as PanelSettings from './panelSettings.js'; -import * as PanelStyle from './panelStyle.js'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import * as Dash from 'resource:///org/gnome/shell/ui/dash.js'; -import * as CtrlAltTab from 'resource:///org/gnome/shell/ui/ctrlAltTab.js'; -import * as PanelMenu from 'resource:///org/gnome/shell/ui/panelMenu.js'; -import St from 'gi://St'; -import Meta from 'gi://Meta'; -import Pango from 'gi://Pango'; -import * as DND from 'resource:///org/gnome/shell/ui/dnd.js'; -import Shell from 'gi://Shell'; -import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js'; -import * as DateMenu from 'resource:///org/gnome/shell/ui/dateMenu.js'; -import * as Volume from 'resource:///org/gnome/shell/ui/status/volume.js'; -import * as Progress from './progress.js'; - -import * as Intellihide from './intellihide.js'; -import * as Transparency from './transparency.js'; -import {SETTINGS, DESKTOPSETTINGS, PERSISTENTSTORAGE} from './extension.js'; -import {gettext as _, InjectionManager} from 'resource:///org/gnome/shell/extensions/extension.js'; - -let tracker = Shell.WindowTracker.get_default(); -export const panelBoxes = ['_leftBox', '_centerBox', '_rightBox']; - -//timeout names -const T2 = 'startIntellihideTimeout'; -const T4 = 'showDesktopTimeout'; -const T5 = 'trackerFocusAppTimeout'; -const T6 = 'scrollPanelDelayTimeout'; -const T7 = 'waitPanelBoxAllocation'; - -export const Panel = GObject.registerClass({ -}, class Panel extends St.Widget { - - _init(panelManager, monitor, panelBox, isStandalone) { - super._init({ layout_manager: new Clutter.BinLayout() }); - - this._timeoutsHandler = new Utils.TimeoutsHandler(); - this._signalsHandler = new Utils.GlobalSignalsHandler(); - this._injectionManager = new InjectionManager(); - - this.panelManager = panelManager; - this.panelStyle = new PanelStyle.PanelStyle(); - - this.monitor = monitor; - this.panelBox = panelBox; - - // when the original gnome-shell top panel is kept, all panels are "standalone", - // so in this case use isPrimary to get the panel on the primary dtp monitor, which - // might be different from the system's primary monitor. - this.isStandalone = isStandalone; - this.isPrimary = !isStandalone || (SETTINGS.get_boolean('stockgs-keep-top-panel') && - monitor == panelManager.dtpPrimaryMonitor); - - this._sessionStyle = null; - this._unmappedButtons = []; - this._elementGroups = []; - - let systemMenuInfo = Utils.getSystemMenuInfo(); - - if (isStandalone) { - this.panel = new SecondaryPanel({ name: 'panel', reactive: true }); - this.statusArea = this.panel.statusArea = {}; - - //next 3 functions are needed by other extensions to add elements to the secondary panel - this.panel.addToStatusArea = function(role, indicator, position, box) { - return Main.panel.addToStatusArea.call(this, role, indicator, position, box); - }; - - this.panel._addToPanelBox = function(role, indicator, position, box) { - Main.panel._addToPanelBox.call(this, role, indicator, position, box); - }; - - this.panel._onMenuSet = function(indicator) { - Main.panel._onMenuSet.call(this, indicator); - }; - - this._leftBox = this.panel._leftBox = new St.BoxLayout({ name: 'panelLeft' }); - this._centerBox = this.panel._centerBox = new St.BoxLayout({ name: 'panelCenter' }); - this._rightBox = this.panel._rightBox = new St.BoxLayout({ name: 'panelRight' }); - - this.menuManager = this.panel.menuManager = new PopupMenu.PopupMenuManager(this.panel); - - this._setPanelMenu(systemMenuInfo.name, systemMenuInfo.constructor, this.panel); - this._setPanelMenu('dateMenu', DateMenu.DateMenuButton, this.panel); - this._setPanelMenu('activities', Main.panel.statusArea.activities.constructor, this.panel); - - this.panel.add_child(this._leftBox); - this.panel.add_child(this._centerBox); - this.panel.add_child(this._rightBox); - } else { - this.panel = Main.panel; - this.statusArea = Main.panel.statusArea; - this.menuManager = Main.panel.menuManager; - - panelBoxes.forEach(p => this[p] = Main.panel[p]); - - ['activities', systemMenuInfo.name, 'dateMenu'].forEach(b => { - let container = this.statusArea[b].container; - let parent = container.get_parent(); - let siblings = parent.get_children(); - let index = siblings.indexOf(container); - - container._dtpOriginalParent = parent; - container._dtpOriginalIndex = index && index == siblings.length - 1 ? -1: index; - parent ? parent.remove_child(container) : null; - this.panel.add_child(container); - }); - } - - // Create a wrapper around the real showAppsIcon in order to add a popupMenu. Most of - // its behavior is handled by the taskbar, but its positioning is done at the panel level - this.showAppsIconWrapper = new AppIcons.ShowAppsIconWrapper(this); - this.panel.add_child(this.showAppsIconWrapper.realShowAppsIcon); - - this.panel._delegate = this; - - this.add_child(this.panel); - - if (Main.panel._onButtonPress || Main.panel._tryDragWindow) { - this._signalsHandler.add([ - this.panel, - [ - 'button-press-event', - 'touch-event' - ], - this._onButtonPress.bind(this) - ]); - } - - if (Main.panel._onKeyPress) { - this._signalsHandler.add([this.panel, 'key-press-event', Main.panel._onKeyPress.bind(this)]); - } - - Main.ctrlAltTabManager.addGroup(this, _("Top Bar")+" "+ monitor.index, 'focus-top-bar-symbolic', - { sortGroup: CtrlAltTab.SortGroup.TOP }); - } - - enable () { - let { name: systemMenuName } = Utils.getSystemMenuInfo(); - - if (this.statusArea[systemMenuName] && this.statusArea[systemMenuName]._volumeOutput) { - Utils.getIndicators(this.statusArea[systemMenuName]._volumeOutput)._dtpIgnoreScroll = 1; - } - - this.geom = this.getGeometry(); - - this._setPanelPosition(); - - if (!this.isStandalone) { - this._injectionManager.overrideMethod(Object.getPrototypeOf(this.panel), 'vfunc_allocate', () => (box) => this._mainPanelAllocate(box)); - - // remove the extra space before the clock when the message-indicator is displayed - if (DateMenu.IndicatorPad) { - this._injectionManager.overrideMethod(DateMenu.IndicatorPad.prototype, 'vfunc_get_preferred_width', () => () => [0,0]); - this._injectionManager.overrideMethod(DateMenu.IndicatorPad.prototype, 'vfunc_get_preferred_height', () => () => [0,0]); - } - } - - if (!DateMenu.IndicatorPad && this.statusArea.dateMenu) { - //3.36 switched to a size constraint applied on an anonymous child - let indicatorPad = this.statusArea.dateMenu.get_first_child().get_first_child(); - - this._dateMenuIndicatorPadContraints = indicatorPad.get_constraints(); - indicatorPad.clear_constraints(); - } - - this.menuManager._oldChangeMenu = this.menuManager._changeMenu; - this.menuManager._changeMenu = (menu) => { - if (!SETTINGS.get_boolean('stockgs-panelbtn-click-only')) { - this.menuManager._oldChangeMenu(menu); - } - }; - - this.dynamicTransparency = new Transparency.DynamicTransparency(this); - - this.taskbar = new Taskbar.Taskbar(this); - - this.panel.add_child(this.taskbar.actor); - - this._setShowDesktopButton(true); - - this._setAllocationMap(); - - this.panel.add_style_class_name('dashtopanelMainPanel ' + this.getOrientation()); - - this._timeoutsHandler.add([T2, SETTINGS.get_int('intellihide-enable-start-delay'), () => this.intellihide = new Intellihide.Intellihide(this)]); - - this._signalsHandler.add( - // this is to catch changes to the theme or window scale factor - [ - Utils.getStageTheme(), - 'changed', - () => (this._resetGeometry(), this._setShowDesktopButtonStyle()), - ], - [ - // sync hover after a popupmenu is closed - this.taskbar, - 'menu-closed', - () => this.panel.sync_hover() - ], - [ - Main.overview, - [ - 'showing', - 'hiding' - ], - () => this._adjustForOverview() - ], - [ - Main.overview, - 'hidden', - () => { - if (this.isPrimary) { - //reset the primary monitor when exiting the overview - this.panelManager.setFocusedMonitor(this.monitor); - } - } - ], - [ - this.statusArea.activities, - 'captured-event', - (actor, e) => { - if (e.type() == Clutter.EventType.BUTTON_PRESS || e.type() == Clutter.EventType.TOUCH_BEGIN) { - //temporarily use as primary the monitor on which the activities btn was clicked - this.panelManager.setFocusedMonitor(this.monitor); - } - } - ], - [ - this._centerBox, - 'child-added', - () => this._onBoxActorAdded(this._centerBox) - ], - [ - this._rightBox, - 'child-added', - () => this._onBoxActorAdded(this._rightBox) - ], - [ - this.panel, - 'scroll-event', - this._onPanelMouseScroll.bind(this) - ], - [ - Main.layoutManager, - 'startup-complete', - () => this._resetGeometry() - ] - ); - - this._bindSettingsChanges(); - - this.panelStyle.enable(this); - - if (this.checkIfVertical()) { - this._signalsHandler.add([ - this.panelBox, - 'notify::visible', - () => { - if (this.panelBox.visible) { - this._refreshVerticalAlloc(); - } - } - ]); - - if (this.statusArea.dateMenu) { - this._formatVerticalClock(); - - this._signalsHandler.add([ - this.statusArea.dateMenu._clock, - 'notify::clock', - () => this._formatVerticalClock() - ]); - } - } - - // Since we are usually visible but not usually changing, make sure - // most repaint requests don't actually require us to repaint anything. - // This saves significant CPU when repainting the screen. - this.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS); - - this._initProgressManager(); - } - - disable() { - this.panelStyle.disable(); - - this._timeoutsHandler.destroy(); - this._signalsHandler.destroy(); - - this.panel.remove_child(this.taskbar.actor); - - if (this.intellihide) { - this.intellihide.destroy(); - } - - this.dynamicTransparency.destroy(); - - this.progressManager.destroy(); - - this.taskbar.destroy(); - this.showAppsIconWrapper.destroy(); - - this.menuManager._changeMenu = this.menuManager._oldChangeMenu; - - this._unmappedButtons.forEach(a => this._disconnectVisibleId(a)); - - if (this.statusArea.dateMenu) { - this.statusArea.dateMenu._clockDisplay.text = this.statusArea.dateMenu._clock.clock; - this.statusArea.dateMenu._clockDisplay.clutter_text.set_width(-1); - - if (this._dateMenuIndicatorPadContraints) { - let indicatorPad = this.statusArea.dateMenu.get_first_child().get_first_child(); - - this._dateMenuIndicatorPadContraints.forEach(c => indicatorPad.add_constraint(c)); - } - } - - this._setVertical(this.panel, false); - this._setVertical(this._centerBox, false); - this._setVertical(this._rightBox, false); - - let { name: systemMenuName } = Utils.getSystemMenuInfo(); - - if (!this.isStandalone) { - ['vertical', 'horizontal', 'dashtopanelMainPanel'].forEach(c => this.panel.remove_style_class_name(c)); - - if (!Main.sessionMode.isLocked) { - ['activities', systemMenuName, 'dateMenu'].forEach(b => { - let container = this.statusArea[b].container; - let originalParent = container._dtpOriginalParent; - - this.panel.remove_child(container); - - originalParent && originalParent.insert_child_at_index( - container, - Math.min(container._dtpOriginalIndex, originalParent.get_children().length - 1) - ); - - delete container._dtpOriginalParent; - delete container._dtpOriginalIndex; - }); - } - - this._setShowDesktopButton(false); - - delete Utils.getIndicators(this.statusArea[systemMenuName]._volumeOutput)._dtpIgnoreScroll; - - this._injectionManager.clear(); - - this.panel._delegate = this.panel; - } else { - this._removePanelMenu('dateMenu'); - this._removePanelMenu(systemMenuName); - this._removePanelMenu('activities'); - } - - Main.ctrlAltTabManager.removeGroup(this); - } - - getPosition() { - let position = PanelSettings.getPanelPosition(SETTINGS, this.monitor.index); - - if (position == Pos.TOP) { - return St.Side.TOP; - } else if (position == Pos.RIGHT) { - return St.Side.RIGHT; - } else if (position == Pos.BOTTOM) { - return St.Side.BOTTOM; - } - - return St.Side.LEFT; - } - - checkIfVertical() { - let position = this.getPosition(); - - return (position == St.Side.LEFT || position == St.Side.RIGHT); - } - - getOrientation() { - return (this.checkIfVertical() ? 'vertical' : 'horizontal'); - } - - updateElementPositions() { - let panelPositions = this.panelManager.panelsElementPositions[this.monitor.index] || Pos.defaults; - - this._updateGroupedElements(panelPositions); - - this.panel.hide(); - this.panel.show(); - } - - _updateGroupedElements(panelPositions) { - let previousPosition = 0; - let previousCenteredPosition = 0; - let currentGroup = -1; - - this._elementGroups = []; - - panelPositions.forEach(pos => { - let allocationMap = this.allocationMap[pos.element]; - - if (allocationMap.actor) { - allocationMap.actor.visible = pos.visible; - - if (!pos.visible) { - return; - } - - let currentPosition = pos.position; - let isCentered = Pos.checkIfCentered(currentPosition); - - if (currentPosition == Pos.STACKED_TL && previousPosition == Pos.STACKED_BR) { - currentPosition = Pos.STACKED_BR; - } - - if (!previousPosition || - (previousPosition == Pos.STACKED_TL && currentPosition != Pos.STACKED_TL) || - (previousPosition != Pos.STACKED_BR && currentPosition == Pos.STACKED_BR) || - (isCentered && previousPosition != currentPosition && previousPosition != Pos.STACKED_BR)) { - this._elementGroups[++currentGroup] = { elements: [], index: this._elementGroups.length, expandableIndex: -1 }; - previousCenteredPosition = 0; - } - - if (pos.element == Pos.TASKBAR) { - this._elementGroups[currentGroup].expandableIndex = this._elementGroups[currentGroup].elements.length; - } - - if (isCentered && !this._elementGroups[currentGroup].isCentered) { - this._elementGroups[currentGroup].isCentered = 1; - previousCenteredPosition = currentPosition; - } - - this._elementGroups[currentGroup].position = previousCenteredPosition || currentPosition; - this._elementGroups[currentGroup].elements.push(allocationMap); - - allocationMap.position = currentPosition; - previousPosition = currentPosition; - } - }); - } - - _bindSettingsChanges() { - let isVertical = this.checkIfVertical(); - - this._signalsHandler.add( - [ - SETTINGS, - [ - 'changed::panel-sizes', - 'changed::group-apps' - ], - () => this._resetGeometry() - ], - [ - SETTINGS, - [ - 'changed::appicon-margin', - 'changed::appicon-padding' - ], - () => this.taskbar.resetAppIcons() - ], - [ - SETTINGS, - [ - 'changed::showdesktop-button-width', - 'changed::trans-use-custom-bg', - 'changed::desktop-line-use-custom-color', - 'changed::desktop-line-custom-color', - 'changed::trans-bg-color' - ], - () => this._setShowDesktopButtonStyle() - ], - [ - DESKTOPSETTINGS, - 'changed::clock-format', - () => { - this._clockFormat = null; - - if (isVertical) { - this._formatVerticalClock(); - } - } - ], - [ - SETTINGS, - 'changed::progress-show-bar', - () => this._initProgressManager() - ], - [ - SETTINGS, - 'changed::progress-show-count', - () => this._initProgressManager() - ] - ); - - if (isVertical) { - this._signalsHandler.add([SETTINGS, 'changed::group-apps-label-max-width', () => this._resetGeometry()]); - } - } - - _setPanelMenu(propName, constr, container) { - if (!this.statusArea[propName]) { - this.statusArea[propName] = this._getPanelMenu(propName, constr); - this.menuManager.addMenu(this.statusArea[propName].menu); - container.insert_child_at_index(this.statusArea[propName].container, 0); - } - } - - _removePanelMenu(propName) { - if (this.statusArea[propName]) { - let parent = this.statusArea[propName].container.get_parent(); - - if (parent) { - parent.remove_child(this.statusArea[propName].container); - } - - //calling this.statusArea[propName].destroy(); is buggy for now, gnome-shell never - //destroys those panel menus... - //since we can't destroy the menu (hence properly disconnect its signals), let's - //store it so the next time a panel needs one of its kind, we can reuse it instead - //of creating a new one - let panelMenu = this.statusArea[propName]; - - this.menuManager.removeMenu(panelMenu.menu); - PERSISTENTSTORAGE[propName].push(panelMenu); - this.statusArea[propName] = null; - } - } - - _getPanelMenu(propName, constr) { - PERSISTENTSTORAGE[propName] = PERSISTENTSTORAGE[propName] || []; - - if (!PERSISTENTSTORAGE[propName].length) { - PERSISTENTSTORAGE[propName].push(new constr()); - } - - return PERSISTENTSTORAGE[propName].pop(); - } - - _adjustForOverview() { - let isFocusedMonitor = this.panelManager.checkIfFocusedMonitor(this.monitor); - let isOverview = !!Main.overview.visibleTarget; - let isOverviewFocusedMonitor = isOverview && isFocusedMonitor; - let isShown = !isOverview || isOverviewFocusedMonitor; - let actorData = Utils.getTrackedActorData(this.panelBox) - - // prevent the "chrome" to update the panelbox visibility while in overview - actorData.trackFullscreen = !isOverview - - this.panelBox[isShown ? 'show' : 'hide'](); - } - - _resetGeometry() { - this.geom = this.getGeometry(); - this._setPanelPosition(); - this.taskbar.resetAppIcons(true); - this.dynamicTransparency.updateExternalStyle(); - - if (this.intellihide && this.intellihide.enabled) { - this.intellihide.reset(); - } - - if (this.checkIfVertical()) { - this.showAppsIconWrapper.realShowAppsIcon.toggleButton.set_width(this.geom.w); - this._refreshVerticalAlloc(); - } - } - - getGeometry() { - let scaleFactor = Utils.getScaleFactor(); - let panelBoxTheme = this.panelBox.get_theme_node(); - let lrPadding = panelBoxTheme.get_padding(St.Side.RIGHT) + panelBoxTheme.get_padding(St.Side.LEFT); - let topPadding = panelBoxTheme.get_padding(St.Side.TOP); - let tbPadding = topPadding + panelBoxTheme.get_padding(St.Side.BOTTOM); - let position = this.getPosition(); - let length = PanelSettings.getPanelLength(SETTINGS, this.monitor.index) / 100; - let anchor = PanelSettings.getPanelAnchor(SETTINGS, this.monitor.index); - let anchorPlaceOnMonitor = 0; - let gsTopPanelOffset = 0; - let x = 0, y = 0; - let w = 0, h = 0; - - const panelSize = PanelSettings.getPanelSize(SETTINGS, this.monitor.index); - this.dtpSize = panelSize * scaleFactor; - - if (SETTINGS.get_boolean('stockgs-keep-top-panel') && Main.layoutManager.primaryMonitor == this.monitor) { - gsTopPanelOffset = Main.layoutManager.panelBox.height - topPadding; - } - - if (this.checkIfVertical()) { - if (!SETTINGS.get_boolean('group-apps')) { - // add window title width and side padding of _dtpIconContainer when vertical - this.dtpSize += SETTINGS.get_int('group-apps-label-max-width') + AppIcons.DEFAULT_PADDING_SIZE * 2 / scaleFactor; - } - - this.sizeFunc = 'get_preferred_height', - this.fixedCoord = { c1: 'x1', c2: 'x2' } - this.varCoord = { c1: 'y1', c2: 'y2' }; - - w = this.dtpSize; - h = this.monitor.height * length - tbPadding - gsTopPanelOffset; - } else { - this.sizeFunc = 'get_preferred_width'; - this.fixedCoord = { c1: 'y1', c2: 'y2' }; - this.varCoord = { c1: 'x1', c2: 'x2' }; - - w = this.monitor.width * length - lrPadding; - h = this.dtpSize; - } - - if (position == St.Side.TOP || position == St.Side.LEFT) { - x = this.monitor.x; - y = this.monitor.y + gsTopPanelOffset; - } else if (position == St.Side.RIGHT) { - x = this.monitor.x + this.monitor.width - this.dtpSize - lrPadding; - y = this.monitor.y + gsTopPanelOffset; - } else { //BOTTOM - x = this.monitor.x; - y = this.monitor.y + this.monitor.height - this.dtpSize - tbPadding; - } - - if (this.checkIfVertical()) { - let viewHeight = this.monitor.height - gsTopPanelOffset; - - if (anchor === Pos.MIDDLE) { - anchorPlaceOnMonitor = (viewHeight - h) / 2; - } else if (anchor === Pos.END) { - anchorPlaceOnMonitor = viewHeight - h; - } else { // Pos.START - anchorPlaceOnMonitor = 0; - } - y = y + anchorPlaceOnMonitor; - } else { - if (anchor === Pos.MIDDLE) { - anchorPlaceOnMonitor = (this.monitor.width - w) / 2; - } else if (anchor === Pos.END) { - anchorPlaceOnMonitor = this.monitor.width - w; - } else { // Pos.START - anchorPlaceOnMonitor = 0; - } - x = x + anchorPlaceOnMonitor; - } - - return { - x, y, - w, h, - lrPadding, - tbPadding, - position - }; - } - - _setAllocationMap() { - this.allocationMap = {}; - let setMap = (name, actor) => this.allocationMap[name] = { - actor: actor, - box: new Clutter.ActorBox() - }; - - setMap(Pos.SHOW_APPS_BTN, this.showAppsIconWrapper.realShowAppsIcon); - setMap(Pos.ACTIVITIES_BTN, this.statusArea.activities ? this.statusArea.activities.container : 0); - setMap(Pos.LEFT_BOX, this._leftBox); - setMap(Pos.TASKBAR, this.taskbar.actor); - setMap(Pos.CENTER_BOX, this._centerBox); - setMap(Pos.DATE_MENU, this.statusArea.dateMenu.container); - setMap(Pos.SYSTEM_MENU, this.statusArea[Utils.getSystemMenuInfo().name].container); - setMap(Pos.RIGHT_BOX, this._rightBox); - setMap(Pos.DESKTOP_BTN, this._showDesktopButton); - } - - _mainPanelAllocate(box) { - this.panel.set_allocation(box); - } - - vfunc_allocate(box) { - this.set_allocation(box); - - let fixed = 0; - let centeredMonitorGroup; - let panelAlloc = new Clutter.ActorBox({ x1: 0, y1: 0, x2: this.geom.w, y2: this.geom.h }); - let assignGroupSize = (group, update) => { - group.size = 0; - group.tlOffset = 0; - group.brOffset = 0; - - group.elements.forEach(element => { - if (!update) { - element.box[this.fixedCoord.c1] = panelAlloc[this.fixedCoord.c1]; - element.box[this.fixedCoord.c2] = panelAlloc[this.fixedCoord.c2]; - element.natSize = element.actor[this.sizeFunc](-1)[1]; - } - - if (!group.isCentered || Pos.checkIfCentered(element.position)) { - group.size += element.natSize; - } else if (element.position == Pos.STACKED_TL) { - group.tlOffset += element.natSize; - } else { // Pos.STACKED_BR - group.brOffset += element.natSize; - } - }); - - if (group.isCentered) { - group.size += Math.max(group.tlOffset, group.brOffset) * 2; - group.tlOffset = Math.max(group.tlOffset - group.brOffset, 0); - } - }; - let allocateGroup = (group, tlLimit, brLimit) => { - let startPosition = tlLimit; - let currentPosition = 0; - - if (group.expandableIndex >= 0) { - let availableSize = brLimit - tlLimit; - let expandable = group.elements[group.expandableIndex]; - let i = 0; - let l = this._elementGroups.length; - let tlSize = 0; - let brSize = 0; - - if (centeredMonitorGroup && (centeredMonitorGroup != group || expandable.position != Pos.CENTERED_MONITOR)) { - if (centeredMonitorGroup.index < group.index || (centeredMonitorGroup == group && expandable.position == Pos.STACKED_TL)) { - i = centeredMonitorGroup.index; - } else { - l = centeredMonitorGroup.index; - } - } - - for (; i < l; ++i) { - let refGroup = this._elementGroups[i]; - - if (i < group.index && (!refGroup.fixed || refGroup[this.varCoord.c2] > tlLimit)) { - tlSize += refGroup.size; - } else if (i > group.index && (!refGroup.fixed || refGroup[this.varCoord.c1] < brLimit)) { - brSize += refGroup.size; - } - } - - if (group.isCentered) { - availableSize -= Math.max(tlSize, brSize) * 2; - } else { - availableSize -= tlSize + brSize; - } - - if (availableSize < group.size) { - expandable.natSize -= (group.size - availableSize) * (group.isCentered && !Pos.checkIfCentered(expandable.position) ? .5 : 1); - assignGroupSize(group, true); - } - } - - if (group.isCentered) { - startPosition = tlLimit + (brLimit - tlLimit - group.size) * .5; - } else if (group.position == Pos.STACKED_BR) { - startPosition = brLimit - group.size; - } - - currentPosition = group.tlOffset + startPosition; - - group.elements.forEach(element => { - element.box[this.varCoord.c1] = Math.round(currentPosition); - element.box[this.varCoord.c2] = Math.round((currentPosition += element.natSize)); - - element.actor.allocate(element.box); - }); - - group[this.varCoord.c1] = startPosition; - group[this.varCoord.c2] = currentPosition; - group.fixed = 1; - ++fixed; - }; - - this.panel.allocate(panelAlloc); - - this._elementGroups.forEach(group => { - group.fixed = 0; - - assignGroupSize(group); - - if (group.position == Pos.CENTERED_MONITOR) { - centeredMonitorGroup = group; - } - }); - - if (centeredMonitorGroup) { - allocateGroup(centeredMonitorGroup, panelAlloc[this.varCoord.c1], panelAlloc[this.varCoord.c2]); - } - - let iterations = 0; //failsafe - while (fixed < this._elementGroups.length && ++iterations < 10) { - for (let i = 0, l = this._elementGroups.length; i < l; ++i) { - let group = this._elementGroups[i]; - - if (group.fixed) { - continue; - } - - let prevGroup = this._elementGroups[i - 1]; - let nextGroup = this._elementGroups[i + 1]; - let prevLimit = prevGroup && prevGroup.fixed ? prevGroup[this.varCoord.c2] : - centeredMonitorGroup && group.index > centeredMonitorGroup.index ? centeredMonitorGroup[this.varCoord.c2] : panelAlloc[this.varCoord.c1]; - let nextLimit = nextGroup && nextGroup.fixed ? nextGroup[this.varCoord.c1] : - centeredMonitorGroup && group.index < centeredMonitorGroup.index ? centeredMonitorGroup[this.varCoord.c1] : panelAlloc[this.varCoord.c2]; - - if (group.position == Pos.STACKED_TL) { - allocateGroup(group, panelAlloc[this.varCoord.c1], nextLimit); - } else if (group.position == Pos.STACKED_BR) { - allocateGroup(group, prevLimit, panelAlloc[this.varCoord.c2]); - } else if ((!prevGroup || prevGroup.fixed) && (!nextGroup || nextGroup.fixed)) { // CENTERED - allocateGroup(group, prevLimit, nextLimit); - } - } - } - } - - _setPanelPosition() { - let clipContainer = this.panelBox.get_parent(); - - this.set_size(this.geom.w, this.geom.h); - clipContainer.set_position(this.geom.x, this.geom.y); - - this._setVertical(this.panel, this.checkIfVertical()); - - // styles for theming - Object.keys(St.Side).forEach(p => { - let cssName = 'dashtopanel' + p.charAt(0) + p.slice(1).toLowerCase(); - - this.panel[(St.Side[p] == this.geom.position ? 'add' : 'remove') + '_style_class_name'](cssName); - }); - - this._setPanelClip(clipContainer); - - Main.layoutManager._updateHotCorners(); - Main.layoutManager._updatePanelBarrier(this); - } - - _setPanelClip(clipContainer) { - clipContainer = clipContainer || this.panelBox.get_parent(); - this._timeoutsHandler.add([T7, 0, () => Utils.setClip(clipContainer, clipContainer.x, clipContainer.y, this.panelBox.width, this.panelBox.height)]); - } - - _onButtonPress(actor, event) { - let type = event.type(); - let isPress = type == Clutter.EventType.BUTTON_PRESS; - let button = isPress ? event.get_button() : -1; - let [stageX, stageY] = event.get_coords(); - - if (button == 3 && global.stage.get_actor_at_pos(Clutter.PickMode.REACTIVE, stageX, stageY) == this.panel) { - //right click on an empty part of the panel, temporarily borrow and display the showapps context menu - Main.layoutManager.setDummyCursorGeometry(stageX, stageY, 0, 0); - - this.showAppsIconWrapper.createMenu(); - this.showAppsIconWrapper.popupMenu(Main.layoutManager.dummyCursor); - - return Clutter.EVENT_STOP; - } else { - const targetActor = global.stage.get_event_actor(event); - - if (Main.modalCount > 0 || targetActor != actor || - (!isPress && type != Clutter.EventType.TOUCH_BEGIN) || - (isPress && button != 1)) { - return Clutter.EVENT_PROPAGATE; - } - } - - let params = this.checkIfVertical() ? [stageY, 'y', 'height'] : [stageX, 'x', 'width']; - let dragWindow = this._getDraggableWindowForPosition.apply(this, params.concat(['maximized_' + this.getOrientation() + 'ly'])); - - if (!dragWindow) - return Clutter.EVENT_PROPAGATE; - - global.display.begin_grab_op(dragWindow, - Meta.GrabOp.MOVING, - false, /* pointer grab */ - true, /* frame action */ - button, - event.get_state(), - event.get_time(), - stageX, stageY); - - return Clutter.EVENT_STOP; - } - - _getDraggableWindowForPosition(stageCoord, coord, dimension, maximizedProp) { - let workspace = Utils.getCurrentWorkspace(); - let allWindowsByStacking = global.display.sort_windows_by_stacking( - workspace.list_windows() - ).reverse(); - - return Utils.find(allWindowsByStacking, metaWindow => { - let rect = metaWindow.get_frame_rect(); - - return metaWindow.get_monitor() == this.monitor.index && - metaWindow.showing_on_its_workspace() && - metaWindow.get_window_type() != Meta.WindowType.DESKTOP && - metaWindow[maximizedProp] && - stageCoord > rect[coord] && stageCoord < rect[coord] + rect[dimension]; - }); - } - - _onBoxActorAdded(box) { - if (this.checkIfVertical()) { - this._setVertical(box, true); - } - } - - _refreshVerticalAlloc() { - this._setVertical(this._centerBox, true); - this._setVertical(this._rightBox, true); - this._formatVerticalClock(); - } - - _setVertical(actor, isVertical) { - let _set = (actor, isVertical) => { - if (!actor || actor instanceof Dash.DashItemContainer || actor instanceof TaskbarItemContainer.TaskbarItemContainer) { - return; - } - - if (actor instanceof St.BoxLayout) { - actor.vertical = isVertical; - } else if ( - actor != this.statusArea.appMenu && - ((actor._delegate || actor) instanceof PanelMenu.ButtonBox || actor == this.statusArea.quickSettings) - ) { - let child = actor.get_first_child(); - - if (isVertical && !actor.visible && !actor._dtpVisibleId) { - this._unmappedButtons.push(actor); - actor._dtpVisibleId = actor.connect('notify::visible', () => { - this._disconnectVisibleId(actor); - this._refreshVerticalAlloc(); - }); - actor._dtpDestroyId = actor.connect('destroy', () => this._disconnectVisibleId(actor)); - } - - if (child) { - let [, natWidth] = actor.get_preferred_width(-1); - - child.x_align = Clutter.ActorAlign[isVertical ? 'CENTER' : 'START']; - actor.set_width(isVertical ? this.dtpSize : -1); - isVertical = isVertical && (natWidth > this.dtpSize); - actor[(isVertical ? 'add' : 'remove') + '_style_class_name']('vertical'); - } - } - - actor.get_children().forEach(c => _set(c, isVertical)); - }; - - _set(actor, false); - - if (isVertical) - _set(actor, isVertical); - } - - _disconnectVisibleId(actor) { - actor.disconnect(actor._dtpVisibleId); - actor.disconnect(actor._dtpDestroyId); - - delete actor._dtpVisibleId; - delete actor._dtpDestroyId; - - this._unmappedButtons.splice(this._unmappedButtons.indexOf(actor), 1); - } - - _formatVerticalClock() { - // https://github.com/GNOME/gnome-desktop/blob/master/libgnome-desktop/gnome-wall-clock.c#L310 - if (this.statusArea.dateMenu) { - let datetime = this.statusArea.dateMenu._clock.clock; - let datetimeParts = datetime.split(' '); - let time = datetimeParts[1]; - let clockText = this.statusArea.dateMenu._clockDisplay.clutter_text; - let setClockText = (text, useTimeSeparator) => { - let stacks = text instanceof Array; - let separator = `\n ${useTimeSeparator ? '‧‧' : '—' } \n`; - - clockText.set_text((stacks ? text.join(separator) : text).trim()); - clockText.set_use_markup(stacks); - clockText.get_allocation_box(); - - return !clockText.get_layout().is_ellipsized(); - }; - - if (clockText.ellipsize == Pango.EllipsizeMode.NONE) { - //on gnome-shell 3.36.4, the clockdisplay isn't ellipsize anymore, so set it back - clockText.ellipsize = Pango.EllipsizeMode.END; - } - - clockText.natural_width = this.dtpSize; - - if (!time) { - datetimeParts = datetime.split(' '); - time = datetimeParts.pop(); - datetimeParts = [datetimeParts.join(' '), time]; - } - - if (!setClockText(datetime) && - !setClockText(datetimeParts) && - !setClockText(time)) { - let timeParts = time.split('∶'); - - if (!this._clockFormat) { - this._clockFormat = DESKTOPSETTINGS.get_string('clock-format'); - } - - if (this._clockFormat == '12h') { - timeParts.push.apply(timeParts, timeParts.pop().split(' ')); - } - - setClockText(timeParts, true); - } - } - } - - _setShowDesktopButton(add) { - if (add) { - if(this._showDesktopButton) - return; - - this._showDesktopButton = new St.Bin({ style_class: 'showdesktop-button', - reactive: true, - can_focus: true, - // x_fill: true, - // y_fill: true, - track_hover: true }); - - this._setShowDesktopButtonStyle(); - - this._showDesktopButton.connect('touch-event', (actor, event) => { - if (event.type() == Clutter.EventType.TOUCH_BEGIN) { - this._onShowDesktopButtonPress(); - } - }); - this._showDesktopButton.connect('button-press-event', () => this._onShowDesktopButtonPress()); - this._showDesktopButton.connect('enter-event', () => { - this._showDesktopButton.add_style_class_name(this._getBackgroundBrightness() ? - 'showdesktop-button-light-hovered' : 'showdesktop-button-dark-hovered'); - - if (SETTINGS.get_boolean('show-showdesktop-hover')) { - this._timeoutsHandler.add([T4, SETTINGS.get_int('show-showdesktop-delay'), () => { - this._hiddenDesktopWorkspace = Utils.DisplayWrapper.getWorkspaceManager().get_active_workspace(); - this._toggleWorkspaceWindows(true, this._hiddenDesktopWorkspace); - }]); - } - }); - - this._showDesktopButton.connect('leave-event', () => { - this._showDesktopButton.remove_style_class_name(this._getBackgroundBrightness() ? - 'showdesktop-button-light-hovered' : 'showdesktop-button-dark-hovered'); - - if (SETTINGS.get_boolean('show-showdesktop-hover')) { - if (this._timeoutsHandler.getId(T4)) { - this._timeoutsHandler.remove(T4); - } else if (this._hiddenDesktopWorkspace) { - this._toggleWorkspaceWindows(false, this._hiddenDesktopWorkspace); - } - } - }); - - this.panel.add_child(this._showDesktopButton); - } else { - if(!this._showDesktopButton) - return; - - this.panel.remove_child(this._showDesktopButton); - this._showDesktopButton.destroy(); - this._showDesktopButton = null; - } - } - - _setShowDesktopButtonStyle() { - let rgb = this._getBackgroundBrightness() ? "rgba(55, 55, 55, .2)" : "rgba(200, 200, 200, .2)"; - - let isLineCustom = SETTINGS.get_boolean('desktop-line-use-custom-color'); - rgb = isLineCustom ? SETTINGS.get_string('desktop-line-custom-color') : rgb; - - if (this._showDesktopButton) { - let buttonSize = SETTINGS.get_int('showdesktop-button-width') + 'px;'; - let isVertical = this.checkIfVertical(); - - let sytle = "border: 0 solid " + rgb + ";"; - sytle += isVertical ? 'border-top-width:1px;height:' + buttonSize : 'border-left-width:1px;width:' + buttonSize; - - this._showDesktopButton.set_style(sytle); - this._showDesktopButton[(isVertical ? 'x' : 'y') + '_expand'] = true; - } - } - - // _getBackgroundBrightness: return true if panel has a bright background color - _getBackgroundBrightness() { - return Utils.checkIfColorIsBright(this.dynamicTransparency.backgroundColorRgb); - } - - _toggleWorkspaceWindows(hide, workspace) { - let time = SETTINGS.get_int('show-showdesktop-time') * .001; - - workspace.list_windows().forEach(w => { - if (!w.minimized && !w.customJS_ding) { - let tweenOpts = { - opacity: hide ? 0 : 255, - time: time, - transition: 'easeOutQuad' - }; - - Utils.animateWindowOpacity(w.get_compositor_private(), tweenOpts); - } - }); - } - - _onShowDesktopButtonPress() { - let label = 'trackerFocusApp'; - - this._signalsHandler.removeWithLabel(label); - this._timeoutsHandler.remove(T5); - - if(this._restoreWindowList && this._restoreWindowList.length) { - this._timeoutsHandler.remove(T4); - - let current_workspace = Utils.DisplayWrapper.getWorkspaceManager().get_active_workspace(); - let windows = current_workspace.list_windows(); - this._restoreWindowList.forEach(function(w) { - if(windows.indexOf(w) > -1) - Main.activateWindow(w); - }); - this._restoreWindowList = null; - } else { - let current_workspace = Utils.DisplayWrapper.getWorkspaceManager().get_active_workspace(); - let windows = current_workspace.list_windows().filter(function (w) { - return w.showing_on_its_workspace() && !w.skip_taskbar; - }); - windows = global.display.sort_windows_by_stacking(windows); - - windows.forEach(function(w) { - w.minimize(); - }); - - this._restoreWindowList = windows; - - this._timeoutsHandler.add([T5, 20, () => this._signalsHandler.addWithLabel( - label, - [ - tracker, - 'notify::focus-app', - () => this._restoreWindowList = null - ] - )]); - } - - Main.overview.hide(); - } - - _onPanelMouseScroll(actor, event) { - let scrollAction = SETTINGS.get_string('scroll-panel-action'); - let direction = Utils.getMouseScrollDirection(event); - - const targetActor = global.stage.get_event_actor(event); - - if (!this._checkIfIgnoredScrollSource(targetActor) && !this._timeoutsHandler.getId(T6)) { - if (direction && scrollAction === 'SWITCH_WORKSPACE') { - let args = [global.display]; - - //adjust for horizontal workspaces - if (Utils.DisplayWrapper.getWorkspaceManager().layout_rows === 1) { - direction = direction == 'up' ? 'left' : 'right'; - } - - //gnome-shell < 3.30 needs an additional "screen" param - global.screen ? args.push(global.screen) : 0; - - let showWsPopup = SETTINGS.get_boolean('scroll-panel-show-ws-popup'); - showWsPopup ? 0 : Main.wm._workspaceSwitcherPopup = { display: () => {} }; - Main.wm._showWorkspaceSwitcher.apply(Main.wm, args.concat([0, { get_name: () => 'switch---' + direction }])); - showWsPopup ? 0 : Main.wm._workspaceSwitcherPopup = null; - } else if (direction && scrollAction === 'CYCLE_WINDOWS') { - let windows = this.taskbar.getAppInfos().reduce((ws, appInfo) => ws.concat(appInfo.windows), []); - - Utils.activateSiblingWindow(windows, direction); - } else if (scrollAction === 'CHANGE_VOLUME' && !event.is_pointer_emulated()) { - let proto = Volume.OutputIndicator.prototype; - let func = proto._handleScrollEvent || proto.vfunc_scroll_event || proto._onScrollEvent; - let indicator = Main.panel.statusArea[Utils.getSystemMenuInfo().name]._volumeOutput; - - if (indicator.quickSettingsItems) - // new quick settings menu in gnome-shell > 42 - func(indicator.quickSettingsItems[0], event); - else - func.call(indicator, 0, event); - } else { - return; - } - - const scrollDelay = SETTINGS.get_int('scroll-panel-delay'); - - if (scrollDelay) { - this._timeoutsHandler.add([T6, scrollDelay, () => {}]); - } - } - } - - _checkIfIgnoredScrollSource(source) { - let ignoredConstr = ['WorkspaceIndicator']; - - return source.get_parent()._dtpIgnoreScroll || ignoredConstr.indexOf(source.constructor.name) >= 0; - } - - _initProgressManager() { - const progressVisible = SETTINGS.get_boolean('progress-show-bar'); - const countVisible = SETTINGS.get_boolean('progress-show-count'); - const pm = this.progressManager; - - if(!pm && (progressVisible || countVisible)) - this.progressManager = new Progress.ProgressManager(); - else if (pm) - Object.keys(pm._entriesByDBusName).forEach((k) => pm._entriesByDBusName[k].setCountVisible(countVisible)); - } -}); - -export const SecondaryPanel = GObject.registerClass({ -}, class SecondaryPanel extends St.Widget { - - _init(params) { - super._init(params); - } - - vfunc_allocate(box) { - this.set_allocation(box); - } -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/panelPositions.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/panelPositions.js deleted file mode 100644 index a970bdde..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/panelPositions.js +++ /dev/null @@ -1,61 +0,0 @@ -/* - * This file is part of the Dash-To-Panel extension for Gnome 3 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -export const SHOW_APPS_BTN = 'showAppsButton'; -export const ACTIVITIES_BTN = 'activitiesButton'; -export const TASKBAR = 'taskbar'; -export const DATE_MENU = 'dateMenu'; -export const SYSTEM_MENU = 'systemMenu'; -export const LEFT_BOX = 'leftBox'; -export const CENTER_BOX = 'centerBox'; -export const RIGHT_BOX = 'rightBox'; -export const DESKTOP_BTN = 'desktopButton'; - -export const STACKED_TL = 'stackedTL'; -export const STACKED_BR = 'stackedBR'; -export const CENTERED = 'centered'; -export const CENTERED_MONITOR = 'centerMonitor'; - -export const TOP = 'TOP'; -export const BOTTOM = 'BOTTOM'; -export const LEFT = 'LEFT'; -export const RIGHT = 'RIGHT'; - -export const START = 'START'; -export const MIDDLE = 'MIDDLE'; -export const END = 'END'; - -export const defaults = [ - { element: SHOW_APPS_BTN, visible: true, position: STACKED_TL }, - { element: ACTIVITIES_BTN, visible: false, position: STACKED_TL }, - { element: LEFT_BOX, visible: true, position: STACKED_TL }, - { element: TASKBAR, visible: true, position: STACKED_TL }, - { element: CENTER_BOX, visible: true, position: STACKED_BR }, - { element: RIGHT_BOX, visible: true, position: STACKED_BR }, - { element: DATE_MENU, visible: true, position: STACKED_BR }, - { element: SYSTEM_MENU, visible: true, position: STACKED_BR }, - { element: DESKTOP_BTN, visible: true, position: STACKED_BR }, -]; - -export const optionDialogFunctions = {}; - -optionDialogFunctions[SHOW_APPS_BTN] = '_showShowAppsButtonOptions'; -optionDialogFunctions[DESKTOP_BTN] = '_showDesktopButtonOptions'; - -export function checkIfCentered(position) { - return position == CENTERED || position == CENTERED_MONITOR; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/panelSettings.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/panelSettings.js deleted file mode 100644 index fc2d60cd..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/panelSettings.js +++ /dev/null @@ -1,111 +0,0 @@ -/* - * This file is part of the Dash-To-Panel extension for Gnome 3 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -import * as Pos from './panelPositions.js'; - -/** Return object representing a settings value that is stored as JSON. */ -export function getSettingsJson(settings, setting) { - try { - return JSON.parse(settings.get_string(setting)); - } catch(e) { - log('Error parsing positions: ' + e.message); - } -} -/** Write value object as JSON to setting in settings. */ -export function setSettingsJson(settings, setting, value) { - try { - const json = JSON.stringify(value); - settings.set_string(setting, json); - } catch(e) { - log('Error serializing setting: ' + e.message); - } -} - -/** Returns size of panel on a specific monitor, in pixels. */ -export function getPanelSize(settings, monitorIndex) { - const sizes = getSettingsJson(settings, 'panel-sizes'); - // Pull in deprecated setting if panel-sizes does not have setting for monitor. - const fallbackSize = settings.get_int('panel-size'); - const theDefault = 48; - return sizes[monitorIndex] || fallbackSize || theDefault; -} - -export function setPanelSize(settings, monitorIndex, value) { - if (!(Number.isInteger(value) && value <= 128 && value >= 16)) { - log('Not setting invalid panel size: ' + value); - return; - } - let sizes = getSettingsJson(settings, 'panel-sizes'); - sizes[monitorIndex] = value; - setSettingsJson(settings, 'panel-sizes', sizes); -} - -/** - * Returns length of panel on a specific monitor, as a whole number percent, - * from settings. e.g. 100 - */ -export function getPanelLength(settings, monitorIndex) { - const lengths = getSettingsJson(settings, 'panel-lengths'); - const theDefault = 100; - return lengths[monitorIndex] || theDefault; -} - -export function setPanelLength(settings, monitorIndex, value) { - if (!(Number.isInteger(value) && value <= 100 && value >= 0)) { - log('Not setting invalid panel length: ' + value); - return; - } - let lengths = getSettingsJson(settings, 'panel-lengths'); - lengths[monitorIndex] = value; - setSettingsJson(settings, 'panel-lengths', lengths); -} - -/** Returns position of panel on a specific monitor. */ -export function getPanelPosition(settings, monitorIndex) { - const positions = getSettingsJson(settings, 'panel-positions'); - const fallbackPosition = settings.get_string('panel-position'); - const theDefault = Pos.BOTTOM; - return positions[monitorIndex] || fallbackPosition || theDefault; -} - -export function setPanelPosition(settings, monitorIndex, value) { - if (!(value === Pos.TOP || value === Pos.BOTTOM || value === Pos.LEFT - || value === Pos.RIGHT)) { - log('Not setting invalid panel position: ' + value); - return; - } - const positions = getSettingsJson(settings, 'panel-positions'); - positions[monitorIndex] = value; - setSettingsJson(settings, 'panel-positions', positions); -} - -/** Returns anchor location of panel on a specific monitor. */ -export function getPanelAnchor(settings, monitorIndex) { - const anchors = getSettingsJson(settings, 'panel-anchors'); - const theDefault = Pos.MIDDLE; - return anchors[monitorIndex] || theDefault; -} - -export function setPanelAnchor(settings, monitorIndex, value) { - if (!(value === Pos.START || value === Pos.MIDDLE || value === Pos.END)) { - log('Not setting invalid panel anchor: ' + value); - return; - } - const anchors = getSettingsJson(settings, 'panel-anchors'); - anchors[monitorIndex] = value; - setSettingsJson(settings, 'panel-anchors', anchors); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/panelStyle.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/panelStyle.js deleted file mode 100644 index 353e3ef0..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/panelStyle.js +++ /dev/null @@ -1,314 +0,0 @@ -/* - * This file is part of the Dash-To-Panel extension for Gnome 3 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * Credits: - * Ideas for recursing child actors and assigning inline styles - * are based on code from the StatusAreaHorizontalSpacing extension - * https://bitbucket.org/mathematicalcoffee/status-area-horizontal-spacing-gnome-shell-extension - * mathematical.coffee@gmail.com - */ - -import * as Utils from './utils.js'; -import {SETTINGS} from './extension.js'; - - -export const PanelStyle = class { - - enable(panel) { - this.panel = panel; - - this._applyStyles(); - - this._bindSettingsChanges(); - } - - disable() { - for (let i = 0; i < this._dtpSettingsSignalIds.length; ++i) { - SETTINGS.disconnect(this._dtpSettingsSignalIds[i]); - } - - this._removeStyles(); - } - - _bindSettingsChanges() { - let configKeys = [ - "tray-size", - "leftbox-size", - "tray-padding", - "leftbox-padding", - "status-icon-padding", - ]; - - this._dtpSettingsSignalIds = []; - - for(let i in configKeys) { - this._dtpSettingsSignalIds.push(SETTINGS.connect('changed::' + configKeys[i], () => { - this._removeStyles(); - this._applyStyles(); - })); - } - } - - _applyStyles() { - this._rightBoxOperations = []; - - let trayPadding = SETTINGS.get_int('tray-padding'); - let isVertical = this.panel.checkIfVertical(); - let paddingStyle = 'padding: ' + (isVertical ? '%dpx 0' : '0 %dpx'); - - if(trayPadding >= 0) { - let operation = {}; - let trayPaddingStyleLine; - - if (isVertical) { - trayPaddingStyleLine = paddingStyle.format(trayPadding); - operation.compareFn = function (actor) { - let parent = actor.get_parent(); - return ((parent && parent.has_style_class_name && (parent.has_style_class_name('panel-button') && !parent.has_style_class_name('clock-display'))) || - (actor.has_style_class_name && actor.has_style_class_name('clock'))); - }; - } else { - trayPaddingStyleLine = '-natural-hpadding: %dpx'.format(trayPadding); - if (trayPadding < 6) { - trayPaddingStyleLine += '; -minimum-hpadding: %dpx'.format(trayPadding); - } - - operation.compareFn = function (actor) { - return (actor.has_style_class_name && actor.has_style_class_name('panel-button')); - }; - } - - operation.applyFn = (actor, operationIdx) => { - this._overrideStyle(actor, trayPaddingStyleLine, operationIdx); - this._refreshPanelButton(actor); - }; - this._rightBoxOperations.push(operation); - } - - let statusIconPadding = SETTINGS.get_int('status-icon-padding'); - if(statusIconPadding >= 0) { - let statusIconPaddingStyleLine = paddingStyle.format(statusIconPadding) - let operation = {}; - operation.compareFn = function (actor) { - return (actor.has_style_class_name && actor.has_style_class_name('system-status-icon')); - }; - operation.applyFn = (actor, operationIdx) => { - this._overrideStyle(actor, statusIconPaddingStyleLine, operationIdx); - }; - this._rightBoxOperations.push(operation); - } - - let trayContentSize = SETTINGS.get_int('tray-size'); - if(trayContentSize > 0) { - let trayIconSizeStyleLine = 'icon-size: %dpx'.format(trayContentSize) - let operation = {}; - operation.compareFn = function (actor) { - return (actor.constructor && actor.constructor.name == 'St_Icon'); - }; - operation.applyFn = (actor, operationIdx) => { - this._overrideStyle(actor, trayIconSizeStyleLine, operationIdx); - }; - this._rightBoxOperations.push(operation); - - let trayContentSizeStyleLine = 'font-size: %dpx'.format(trayContentSize) - operation = {}; - operation.compareFn = function (actor) { - return (actor.constructor && actor.constructor.name == 'St_Label'); - }; - operation.applyFn = (actor, operationIdx) => { - this._overrideStyle(actor, trayContentSizeStyleLine, operationIdx); - }; - this._rightBoxOperations.push(operation); - - this._overrideStyle(this.panel._rightBox, trayContentSizeStyleLine, 0); - this._overrideStyle(this.panel._centerBox, trayContentSizeStyleLine, 0); - } - - // center box has been moved next to the right box and will be treated the same - this._centerBoxOperations = this._rightBoxOperations; - - this._leftBoxOperations = []; - - let leftboxPadding = SETTINGS.get_int('leftbox-padding'); - if(leftboxPadding >= 0) { - let leftboxPaddingStyleLine = paddingStyle.format(leftboxPadding); - let operation = {}; - operation.compareFn = function (actor) { - let parent = actor.get_parent(); - return (parent && parent.has_style_class_name && parent.has_style_class_name('panel-button')); - }; - operation.applyFn = (actor, operationIdx) => { - this._overrideStyle(actor, leftboxPaddingStyleLine, operationIdx); - }; - this._leftBoxOperations.push(operation); - } - - let leftboxContentSize = SETTINGS.get_int('leftbox-size'); - if(leftboxContentSize > 0) { - let leftboxIconSizeStyleLine = 'icon-size: %dpx'.format(leftboxContentSize) - let operation = {}; - operation.compareFn = function (actor) { - return (actor.constructor && actor.constructor.name == 'St_Icon'); - }; - operation.applyFn = (actor, operationIdx) => { - this._overrideStyle(actor, leftboxIconSizeStyleLine, operationIdx); - }; - this._leftBoxOperations.push(operation); - - let leftboxContentSizeStyleLine = 'font-size: %dpx'.format(leftboxContentSize) - operation = {}; - operation.compareFn = function (actor) { - return (actor.constructor && actor.constructor.name == 'St_Label'); - }; - operation.applyFn = (actor, operationIdx) => { - this._overrideStyle(actor, leftboxContentSizeStyleLine, operationIdx); - }; - this._leftBoxOperations.push(operation); - - this._overrideStyle(this.panel._leftBox, leftboxContentSizeStyleLine, 0); - } - - this._applyStylesRecursively(); - - /* connect signal */ - this._rightBoxActorAddedID = this.panel._rightBox.connect('child-added', - (container, actor) => { - if(this._rightBoxOperations.length && !this._ignoreAddedChild) - this._recursiveApply(actor, this._rightBoxOperations); - - this._ignoreAddedChild = 0; - } - ); - this._centerBoxActorAddedID = this.panel._centerBox.connect('child-added', - (container, actor) => { - if(this._centerBoxOperations.length && !this._ignoreAddedChild) - this._recursiveApply(actor, this._centerBoxOperations); - - this._ignoreAddedChild = 0; - } - ); - this._leftBoxActorAddedID = this.panel._leftBox.connect('child-added', - (container, actor) => { - if(this._leftBoxOperations.length) - this._recursiveApply(actor, this._leftBoxOperations); - } - ); - } - - _removeStyles() { - /* disconnect signal */ - if (this._rightBoxActorAddedID) - this.panel._rightBox.disconnect(this._rightBoxActorAddedID); - if (this._centerBoxActorAddedID) - this.panel._centerBox.disconnect(this._centerBoxActorAddedID); - if (this._leftBoxActorAddedID) - this.panel._leftBox.disconnect(this._leftBoxActorAddedID); - - this._restoreOriginalStyle(this.panel._rightBox); - this._restoreOriginalStyle(this.panel._centerBox); - this._restoreOriginalStyle(this.panel._leftBox); - - this._applyStylesRecursively(true); - } - - _applyStylesRecursively(restore) { - /*recurse actors */ - if(this._rightBoxOperations.length) { - // add the system menu as we move it from the rightbox to the panel to position it independently - let children = this.panel._rightBox.get_children().concat([this.panel.statusArea[Utils.getSystemMenuInfo().name].container]); - for(let i in children) - this._recursiveApply(children[i], this._rightBoxOperations, restore); - } - - if(this._centerBoxOperations.length) { - // add the date menu as we move it from the centerbox to the panel to position it independently - let children = this.panel._centerBox.get_children().concat([this.panel.statusArea.dateMenu.container]); - for(let i in children) - this._recursiveApply(children[i], this._centerBoxOperations, restore); - } - - if(this._leftBoxOperations.length) { - let children = this.panel._leftBox.get_children(); - for(let i in children) - this._recursiveApply(children[i], this._leftBoxOperations, restore); - } - } - - _recursiveApply(actor, operations, restore) { - for(let i in operations) { - let o = operations[i]; - if(o.compareFn(actor)) - if(restore) - o.restoreFn ? o.restoreFn(actor) : this._restoreOriginalStyle(actor); - else - o.applyFn(actor, i); - } - - if(actor.get_children) { - let children = actor.get_children(); - for(let i in children) { - this._recursiveApply(children[i], operations, restore); - } - } - } - - _overrideStyle(actor, styleLine, operationIdx) { - if (actor._dtp_original_inline_style === undefined) { - actor._dtp_original_inline_style = actor.get_style(); - } - - if(actor._dtp_style_overrides === undefined) { - actor._dtp_style_overrides = {}; - } - - actor._dtp_style_overrides[operationIdx] = styleLine; - let newStyleLine = ''; - for(let i in actor._dtp_style_overrides) - newStyleLine += actor._dtp_style_overrides[i] + '; '; - actor.set_style(newStyleLine + (actor._dtp_original_inline_style || '')); - } - - _restoreOriginalStyle(actor) { - if (actor._dtp_original_inline_style !== undefined) { - actor.set_style(actor._dtp_original_inline_style); - delete actor._dtp_original_inline_style; - delete actor._dtp_style_overrides; - } - - if (actor.has_style_class_name('panel-button')) { - this._refreshPanelButton(actor); - } - } - - _refreshPanelButton(actor) { - if (actor.visible) { - //force gnome 3.34+ to refresh (having problem with the -natural-hpadding) - let parent = actor.get_parent(); - let children = parent.get_children(); - let actorIndex = 0; - - if (children.length > 1) { - actorIndex = children.indexOf(actor); - } - - this._ignoreAddedChild = [this.panel._centerBox, this.panel._rightBox].indexOf(parent) >= 0; - - parent.remove_child(actor); - parent.insert_child_at_index(actor, actorIndex); - } - } - -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/prefs.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/prefs.js deleted file mode 100644 index d2337c2d..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/prefs.js +++ /dev/null @@ -1,2343 +0,0 @@ -/* - * This file is part of the Dash-To-Panel extension for Gnome 3 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * - * Credits: - * This file is based on code from the Dash to Dock extension by micheleg. - * Some code was also adapted from the upstream Gnome Shell source code. - */ - -import GdkPixbuf from 'gi://GdkPixbuf'; -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Gtk from 'gi://Gtk'; -import Gdk from 'gi://Gdk'; - -import * as PanelSettings from './panelSettings.js'; -import * as Pos from './panelPositions.js'; - -import {ExtensionPreferences, gettext as _, ngettext} from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; - -const SCALE_UPDATE_TIMEOUT = 500; -const DEFAULT_PANEL_SIZES = [ 128, 96, 64, 48, 32, 24, 16 ]; -const DEFAULT_FONT_SIZES = [ 96, 64, 48, 32, 24, 16, 0 ]; -const DEFAULT_MARGIN_SIZES = [ 32, 24, 16, 12, 8, 4, 0 ]; -const DEFAULT_PADDING_SIZES = [ 32, 24, 16, 12, 8, 4, 0, -1 ]; -// Minimum length could be 0, but a higher value may help prevent confusion about where the panel went. -const LENGTH_MARKS = [ 100, 90, 80, 70, 60, 50, 40, 30, 20, 10 ]; -const MAX_WINDOW_INDICATOR = 4; - -const SCHEMA_PATH = '/org/gnome/shell/extensions/dash-to-panel/'; - -/** - * This function was copied from the activities-config extension - * https://github.com/nls1729/acme-code/tree/master/activities-config - * by Norman L. Smith. - */ -function cssHexString(css) { - let rrggbb = '#'; - let start; - for (let loop = 0; loop < 3; loop++) { - let end = 0; - let xx = ''; - for (let loop = 0; loop < 2; loop++) { - while (true) { - let x = css.slice(end, end + 1); - if ((x == '(') || (x == ',') || (x == ')')) - break; - end++; - } - if (loop == 0) { - end++; - start = end; - } - } - xx = parseInt(css.slice(start, end)).toString(16); - if (xx.length == 1) - xx = '0' + xx; - rrggbb += xx; - css = css.slice(end); - } - return rrggbb; -} - -function setShortcut(settings, shortcutName) { - let shortcut_text = settings.get_string(shortcutName + '-text'); - let [success, key, mods] = Gtk.accelerator_parse(shortcut_text); - - if (success && Gtk.accelerator_valid(key, mods)) { - let shortcut = Gtk.accelerator_name(key, mods); - settings.set_strv(shortcutName, [shortcut]); - } - else { - settings.set_strv(shortcutName, []); - } -} - -function checkHotkeyPrefix(settings) { - settings.delay(); - - let hotkeyPrefix = settings.get_string('hotkey-prefix-text'); - if (hotkeyPrefix == 'Super') - hotkeyPrefix = ''; - else if (hotkeyPrefix == 'SuperAlt') - hotkeyPrefix = ''; - let [ , , mods] = Gtk.accelerator_parse(hotkeyPrefix); - let [ , , shift_mods] = Gtk.accelerator_parse('' + hotkeyPrefix); - let [ , , ctrl_mods] = Gtk.accelerator_parse('' + hotkeyPrefix); - - let numHotkeys = 10; - for (let i = 1; i <= numHotkeys; i++) { - let number = i; - if (number == 10) - number = 0; - let key = Gdk.keyval_from_name(number.toString()); - let key_kp = Gdk.keyval_from_name('KP_' + number.toString()); - if (Gtk.accelerator_valid(key, mods)) { - let shortcut = Gtk.accelerator_name(key, mods); - let shortcut_kp = Gtk.accelerator_name(key_kp, mods); - - // Setup shortcut strings - settings.set_strv('app-hotkey-' + i, [shortcut]); - settings.set_strv('app-hotkey-kp-' + i, [shortcut_kp]); - - // With - shortcut = Gtk.accelerator_name(key, shift_mods); - shortcut_kp = Gtk.accelerator_name(key_kp, shift_mods); - settings.set_strv('app-shift-hotkey-' + i, [shortcut]); - settings.set_strv('app-shift-hotkey-kp-' + i, [shortcut_kp]); - - // With - shortcut = Gtk.accelerator_name(key, ctrl_mods); - shortcut_kp = Gtk.accelerator_name(key_kp, ctrl_mods); - settings.set_strv('app-ctrl-hotkey-' + i, [shortcut]); - settings.set_strv('app-ctrl-hotkey-kp-' + i, [shortcut_kp]); - } - else { - // Reset default settings for the relevant keys if the - // accelerators are invalid - let keys = ['app-hotkey-' + i, 'app-shift-hotkey-' + i, 'app-ctrl-hotkey-' + i, // Regular numbers - 'app-hotkey-kp-' + i, 'app-shift-hotkey-kp-' + i, 'app-ctrl-hotkey-kp-' + i]; // Key-pad numbers - keys.forEach(function(val) { - settings.set_value(val, settings.get_default_value(val)); - }, this); - } - } - - settings.apply(); -} - -function mergeObjects(main, bck) { - for (const prop in bck) { - if (!main.hasOwnProperty(prop) && bck.hasOwnProperty(prop)) { - main[prop] = bck[prop]; - } - } - - return main; -} - -const Preferences = class { - - constructor(window, settings, path) { - // this._settings = ExtensionUtils.getSettings('org.gnome.shell.extensions.dash-to-panel'); - this._rtl = (Gtk.Widget.get_default_direction() == Gtk.TextDirection.RTL); - this._builder = new Gtk.Builder(); - this._builder.set_scope(new BuilderScope(this)); - this._settings = settings; - this._path = path; - - this._metadata = ExtensionPreferences.lookupByURL(import.meta.url).metadata; - this._builder.set_translation_domain(this._metadata['gettext-domain']); - - window.set_search_enabled(true); - - // dialogs - this._builder.add_from_file(this._path + '/ui/BoxAnimateAppIconHoverOptions.ui'); - this._builder.add_from_file(this._path + '/ui/BoxDotOptions.ui'); - this._builder.add_from_file(this._path + '/ui/BoxShowDesktopOptions.ui'); - this._builder.add_from_file(this._path + '/ui/BoxDynamicOpacityOptions.ui'); - this._builder.add_from_file(this._path + '/ui/BoxIntellihideOptions.ui'); - this._builder.add_from_file(this._path + '/ui/BoxShowApplicationsOptions.ui'); - this._builder.add_from_file(this._path + '/ui/BoxWindowPreviewOptions.ui'); - this._builder.add_from_file(this._path + '/ui/BoxGroupAppsOptions.ui'); - this._builder.add_from_file(this._path + '/ui/BoxMiddleClickOptions.ui'); - this._builder.add_from_file(this._path + '/ui/BoxOverlayShortcut.ui'); - this._builder.add_from_file(this._path + '/ui/BoxSecondaryMenuOptions.ui'); - this._builder.add_from_file(this._path + '/ui/BoxScrollPanelOptions.ui'); - this._builder.add_from_file(this._path + '/ui/BoxScrollIconOptions.ui'); - this._builder.add_from_file(this._path + '/ui/BoxAdvancedOptions.ui'); - - // pages - this._builder.add_from_file(this._path + '/ui/SettingsPosition.ui'); - let pagePosition = this._builder.get_object('position'); - window.add(pagePosition); - - this._builder.add_from_file(this._path + '/ui/SettingsStyle.ui'); - let pageStyle = this._builder.get_object('style'); - window.add(pageStyle); - - this._builder.add_from_file(this._path + '/ui/SettingsBehavior.ui'); - let pageBehavior = this._builder.get_object('behavior'); - window.add(pageBehavior); - - this._builder.add_from_file(this._path + '/ui/SettingsAction.ui'); - let pageAction = this._builder.get_object('action'); - window.add(pageAction); - - this._builder.add_from_file(this._path + '/ui/SettingsFineTune.ui'); - let pageFineTune = this._builder.get_object('finetune'); - window.add(pageFineTune); - - this._builder.add_from_file(this._path + '/ui/SettingsAbout.ui'); - let pageAbout = this._builder.get_object('about'); - window.add(pageAbout); - - let listbox = this._builder.get_object('taskbar_display_listbox'); - let provider = new Gtk.CssProvider(); - provider.load_from_data('list { background-color: transparent; }', -1); - let context = listbox.get_style_context(); - context.add_provider(provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); - - // set the window as notebook, it is being used as parent for dialogs - this.notebook = window; - - // Timeout to delay the update of the settings - this._panel_size_timeout = 0; - this._dot_height_timeout = 0; - this._tray_size_timeout = 0; - this._leftbox_size_timeout = 0; - this._appicon_margin_timeout = 0; - this._appicon_padding_timeout = 0; - this._opacity_timeout = 0; - this._tray_padding_timeout = 0; - this._statusicon_padding_timeout = 0; - this._leftbox_padding_timeout = 0; - this._addFormatValueCallbacks(); - this._bindSettings(); - } - - /** - * Connect signals - */ - _connector(builder, object, signal, handler) { - object.connect(signal, this._SignalHandler[handler].bind(this)); - } - - _updateVerticalRelatedOptions() { - let position = this._getPanelPosition(this._currentMonitorIndex); - let isVertical = position == Pos.LEFT || position == Pos.RIGHT; - let showDesktopWidthLabel = this._builder.get_object('show_showdesktop_width_label'); - - showDesktopWidthLabel.set_title(isVertical ? _('Show Desktop button height (px)') : _('Show Desktop button width (px)')); - - this._displayPanelPositionsForMonitor(this._currentMonitorIndex); - } - - _maybeDisableTopPosition() { - let keepTopPanel = this._settings.get_boolean('stockgs-keep-top-panel'); - let monitorSync = this._settings.get_boolean('panel-element-positions-monitors-sync'); - let topAvailable = !keepTopPanel || (!monitorSync && this._currentMonitorIndex != this.monitors[0]); - let topRadio = this._builder.get_object('position_top_button'); - - topRadio.set_sensitive(topAvailable); - topRadio.set_tooltip_text(!topAvailable ? _('Unavailable when gnome-shell top panel is present') : ''); - } - - _getPanelPosition(monitorIndex) { - return PanelSettings.getPanelPosition(this._settings, monitorIndex); - } - - _setPanelPosition(position) { - const monitorSync = this._settings.get_boolean('panel-element-positions-monitors-sync'); - const monitorsToSetFor = monitorSync ? this.monitors : [this._currentMonitorIndex]; - monitorsToSetFor.forEach(monitorIndex => { - PanelSettings.setPanelPosition(this._settings, monitorIndex, position); - }); - this._setAnchorLabels(this._currentMonitorIndex); - } - - _setPositionRadios(position) { - this._ignorePositionRadios = true; - - switch (position) { - case Pos.BOTTOM: - this._builder.get_object('position_bottom_button').set_active(true); - break; - case Pos.TOP: - this._builder.get_object('position_top_button').set_active(true); - break; - case Pos.LEFT: - this._builder.get_object('position_left_button').set_active(true); - break; - case Pos.RIGHT: - this._builder.get_object('position_right_button').set_active(true); - break; - } - - this._ignorePositionRadios = false; - } - - /** - * Set panel anchor combo labels according to whether the monitor's panel is vertical - * or horizontal, or if all monitors' panels are being configured and they are a mix - * of vertical and horizontal. - */ - _setAnchorLabels(currentMonitorIndex) { - const monitorSync = this._settings.get_boolean('panel-element-positions-monitors-sync'); - const monitorsToSetFor = monitorSync ? this.monitors : [currentMonitorIndex]; - const allVertical = monitorsToSetFor.every(i => { - const position = PanelSettings.getPanelPosition(this._settings, i); - return position === Pos.LEFT || position === Pos.RIGHT - }); - const allHorizontal = monitorsToSetFor.every(i => { - const position = PanelSettings.getPanelPosition(this._settings, i); - return position === Pos.TOP || position === Pos.BOTTOM; - }); - - const anchor_combo = this._builder.get_object('panel_anchor_combo'); - anchor_combo.remove_all(); - - if (allHorizontal) { - anchor_combo.append(Pos.START, _('Left')); - anchor_combo.append(Pos.MIDDLE, _('Center')); - anchor_combo.append(Pos.END, _('Right')); - } else if (allVertical) { - anchor_combo.append(Pos.START, _('Top')); - anchor_combo.append(Pos.MIDDLE, _('Middle')); - anchor_combo.append(Pos.END, _('Bottom')); - } else { - // Setting for a mix of horizontal and vertical panels on different monitors. - anchor_combo.append(Pos.START, _('Start')); - anchor_combo.append(Pos.MIDDLE, _('Middle')); - anchor_combo.append(Pos.END, _('End')); - } - - // Set combo box after re-populating its options. But only if it's for a single-panel - // configuration, or a multi-panel configuration where they all have the same anchor - // setting. So don't set the combo box if there is a multi-panel configuration with - // different anchor settings. - const someAnchor = PanelSettings.getPanelAnchor(this._settings, currentMonitorIndex); - if (monitorsToSetFor.every(i => - PanelSettings.getPanelAnchor(this._settings, i) === someAnchor)) { - const panel_anchor = PanelSettings.getPanelAnchor(this._settings, currentMonitorIndex); - this._builder.get_object('panel_anchor_combo').set_active_id(panel_anchor); - } - } - - /** - * When a monitor is selected, update the widgets for panel position, size, anchoring, - * and contents so they accurately show the settings for the panel on that monitor. - */ - _updateWidgetSettingsForMonitor(monitorIndex) { - // Update display of panel screen position setting - this._maybeDisableTopPosition(); - const panelPosition = this._getPanelPosition(monitorIndex); - this._setPositionRadios(panelPosition); - - // Update display of thickness, length, and anchor settings - const panel_size_scale = this._builder.get_object('panel_size_scale'); - const size = PanelSettings.getPanelSize(this._settings, monitorIndex); - panel_size_scale.set_value(size); - - const panel_length_scale = this._builder.get_object('panel_length_scale'); - const length = PanelSettings.getPanelLength(this._settings, monitorIndex); - panel_length_scale.set_value(length); - this._setAnchorWidgetSensitivity(length); - - this._setAnchorLabels(monitorIndex); - - // Update display of panel content settings - this._displayPanelPositionsForMonitor(monitorIndex); - } - - /** - * Anchor is only relevant if panel length is less than 100%. Enable or disable - * anchor widget sensitivity accordingly. - */ - _setAnchorWidgetSensitivity(panelLength) { - const isPartialLength = panelLength < 100; - this._builder.get_object('panel_anchor_label').set_sensitive(isPartialLength); - this._builder.get_object('panel_anchor_combo').set_sensitive(isPartialLength); - } - - _displayPanelPositionsForMonitor(monitorIndex) { - let taskbarListBox = this._builder.get_object('taskbar_display_listbox'); - - while(taskbarListBox.get_first_child()) - { - taskbarListBox.remove(taskbarListBox.get_first_child()); - } - - let labels = {}; - let panelPosition = this._getPanelPosition(monitorIndex); - let isVertical = panelPosition == Pos.LEFT || panelPosition == Pos.RIGHT; - let panelElementPositionsSettings = PanelSettings.getSettingsJson(this._settings, 'panel-element-positions'); - let panelElementPositions = panelElementPositionsSettings[monitorIndex] || Pos.defaults; - let updateElementsSettings = () => { - let newPanelElementPositions = []; - let monitorSync = this._settings.get_boolean('panel-element-positions-monitors-sync'); - let monitors = monitorSync ? this.monitors : [monitorIndex]; - - let child = taskbarListBox.get_first_child(); - while (child != null) - { - newPanelElementPositions.push({ - element: child.id, - visible: child.visibleToggleBtn.get_active(), - position: child.positionCombo.get_active_id() - }); - child = child.get_next_sibling(); - } - - monitors.forEach(m => panelElementPositionsSettings[m] = newPanelElementPositions); - this._settings.set_string('panel-element-positions', JSON.stringify(panelElementPositionsSettings)); - }; - - - labels[Pos.SHOW_APPS_BTN] = _('Show Applications button'); - labels[Pos.ACTIVITIES_BTN] = _('Activities button'); - labels[Pos.TASKBAR] = _('Taskbar'); - labels[Pos.DATE_MENU] = _('Date menu'); - labels[Pos.SYSTEM_MENU] = _('System menu'); - labels[Pos.LEFT_BOX] = _('Left box'); - labels[Pos.CENTER_BOX] = _('Center box'); - labels[Pos.RIGHT_BOX] = _('Right box'); - labels[Pos.DESKTOP_BTN] = _('Desktop button'); - - panelElementPositions.forEach(el => { - let row = new Gtk.ListBoxRow(); - let grid = new Gtk.Grid({ margin_start: 12, margin_end: 12, column_spacing: 8 }); - let upDownGrid = new Gtk.Grid({ column_spacing: 2 }); - let upBtn = new Gtk.Button({ tooltip_text: _('Move up') }); - let upImg = new Gtk.Image({ icon_name: 'go-up-symbolic', pixel_size: 12 }); - let downBtn = new Gtk.Button({ tooltip_text: _('Move down') }); - let downImg = new Gtk.Image({ icon_name: 'go-down-symbolic', pixel_size: 12 }); - let visibleToggleBtn = new Gtk.ToggleButton({ label: _('Visible'), active: el.visible }); - let positionCombo = new Gtk.ComboBoxText({ tooltip_text: _('Select element position') }); - let upDownClickHandler = limit => { - let index = row.get_index(); - - if (index != limit) { - taskbarListBox.remove(row); - taskbarListBox.insert(row, index + (!limit ? -1 : 1)); - updateElementsSettings(); - } - }; - - positionCombo.append(Pos.STACKED_TL, isVertical ? _('Stacked to top') : _('Stacked to left')); - positionCombo.append(Pos.STACKED_BR, isVertical ? _('Stacked to bottom') :_('Stacked to right')); - positionCombo.append(Pos.CENTERED, _('Centered')); - positionCombo.append(Pos.CENTERED_MONITOR, _('Monitor Center')); - positionCombo.set_active_id(el.position); - - upBtn.connect('clicked', () => upDownClickHandler(0)); - downBtn.connect('clicked', () => upDownClickHandler(panelElementPositions.length - 1)); - visibleToggleBtn.connect('toggled', () => updateElementsSettings()); - positionCombo.connect('changed', () => updateElementsSettings()); - - upBtn.set_child(upImg); - downBtn.set_child(downImg); - - upDownGrid.attach(upBtn, 0, 0, 1, 1); - upDownGrid.attach(downBtn, 1, 0, 1, 1); - - grid.attach(upDownGrid, 0, 0, 1, 1); - grid.attach(new Gtk.Label({ label: labels[el.element], xalign: 0, hexpand: true }), 1, 0, 1, 1); - - if (Pos.optionDialogFunctions[el.element]) { - let cogImg = new Gtk.Image({ icon_name: 'emblem-system-symbolic' }); - let optionsBtn = new Gtk.Button({ tooltip_text: _('More options') }); - - optionsBtn.get_style_context().add_class('circular'); - optionsBtn.set_child(cogImg); - grid.attach(optionsBtn, 2, 0, 1, 1); - - optionsBtn.connect('clicked', () => this[Pos.optionDialogFunctions[el.element]]()); - } - - grid.attach(visibleToggleBtn, 3, 0, 1, 1); - grid.attach(positionCombo, 4, 0, 1, 1); - - row.id = el.element; - row.visibleToggleBtn = visibleToggleBtn; - row.positionCombo = positionCombo; - - row.set_child(grid); - taskbarListBox.insert(row, -1); - }); - } - - _createPreferencesDialog(title, content, reset_function = null) { - let dialog; - - dialog = new Gtk.Dialog({ title: title, - transient_for: this.notebook.get_root(), - use_header_bar: true, - modal: true }); - - // GTK+ leaves positive values for application-defined response ids. - // Use +1 for the reset action - if (reset_function != null) - dialog.add_button(_('Reset to defaults'), 1); - - dialog.get_content_area().append(content); - - dialog.connect('response', (dialog, id) => { - if (id == 1) { - // restore default settings - if (reset_function) - reset_function(); - } else { - // remove the settings content so it doesn't get destroyed; - dialog.get_content_area().remove(content); - dialog.destroy(); - } - return; - }); - - return dialog; - } - - _showShowAppsButtonOptions() { - let box = this._builder.get_object('show_applications_options'); - - let dialog = this._createPreferencesDialog(_('Show Applications options'), box, () => - { - // restore default settings - this._settings.set_value('show-apps-icon-side-padding', this._settings.get_default_value('show-apps-icon-side-padding')); - this._builder.get_object('show_applications_side_padding_spinbutton').set_value(this._settings.get_int('show-apps-icon-side-padding')); - this._settings.set_value('show-apps-override-escape', this._settings.get_default_value('show-apps-override-escape')); - handleIconChange.call(this, null); - }); - - let fileChooserButton = this._builder.get_object('show_applications_icon_file_filebutton'); - let fileChooser = new Gtk.FileChooserNative({ title: _('Open icon'), transient_for: dialog }); - let fileImage = this._builder.get_object('show_applications_current_icon_image'); - let fileFilter = new Gtk.FileFilter(); - fileFilter.add_pixbuf_formats(); - fileChooser.filter = fileFilter; - - let handleIconChange = function(newIconPath) { - if (newIconPath && GLib.file_test(newIconPath, GLib.FileTest.EXISTS)) { - let file = Gio.File.new_for_path(newIconPath); - let pixbuf = GdkPixbuf.Pixbuf.new_from_stream_at_scale(file.read(null), 32, 32, true, null); - - fileImage.set_from_pixbuf(pixbuf); - fileChooser.set_file(file); - fileChooserButton.set_label(newIconPath); - } else { - newIconPath = ''; - fileImage.set_from_icon_name('view-app-grid-symbolic'); - let picturesFolder = Gio.File.new_for_path(GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_PICTURES)); - fileChooser.set_file(picturesFolder); - fileChooserButton.set_label("(None)"); - } - - this._settings.set_string('show-apps-icon-file', newIconPath || ''); - }; - - fileChooserButton.connect('clicked', () => { - fileChooser.show(); - }); - - fileChooser.connect('response', widget => handleIconChange.call(this, widget.get_file().get_path())); - handleIconChange.call(this, this._settings.get_string('show-apps-icon-file')); - - // we have to destroy the fileChooser as well - dialog.connect('response', (dialog, id) => { - if (id != 1) { - fileChooser.destroy(); - } - return; - }); - - dialog.show(); - dialog.set_default_size(1, 1); - } - - _showDesktopButtonOptions() { - let box = this._builder.get_object('box_show_showdesktop_options'); - - let dialog = this._createPreferencesDialog(_('Show Desktop options'), box, () => - { - // restore default settings - this._settings.set_value('showdesktop-button-width', this._settings.get_default_value('showdesktop-button-width')); - this._builder.get_object('show_showdesktop_width_spinbutton').set_value(this._settings.get_int('showdesktop-button-width')); - - this._settings.set_value('desktop-line-use-custom-color', this._settings.get_default_value('desktop-line-use-custom-color')); - - this._settings.set_value('show-showdesktop-hover', this._settings.get_default_value('show-showdesktop-hover')); - - this._settings.set_value('show-showdesktop-delay', this._settings.get_default_value('show-showdesktop-delay')); - this._builder.get_object('show_showdesktop_delay_spinbutton').set_value(this._settings.get_int('show-showdesktop-delay')); - - this._settings.set_value('show-showdesktop-time', this._settings.get_default_value('show-showdesktop-time')); - this._builder.get_object('show_showdesktop_time_spinbutton').set_value(this._settings.get_int('show-showdesktop-time')); - }); - - this._builder.get_object('show_showdesktop_width_spinbutton').set_value(this._settings.get_int('showdesktop-button-width')); - this._builder.get_object('show_showdesktop_width_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('showdesktop-button-width', widget.get_value()); - }); - - this._builder.get_object('show_showdesktop_delay_spinbutton').set_value(this._settings.get_int('show-showdesktop-delay')); - this._builder.get_object('show_showdesktop_delay_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('show-showdesktop-delay', widget.get_value()); - }); - - this._builder.get_object('show_showdesktop_time_spinbutton').set_value(this._settings.get_int('show-showdesktop-time')); - this._builder.get_object('show_showdesktop_time_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('show-showdesktop-time', widget.get_value()); - }); - - dialog.show(); - dialog.set_default_size(1, 1); - } - - _addFormatValueCallbacks() { - // position - this._builder.get_object('panel_size_scale') - .set_format_value_func((scale, value) => { - return value + ' px'; - }); - - // style - this._builder.get_object('appicon_margin_scale') - .set_format_value_func((scale, value) => { - return value + ' px'; - }); - - this._builder.get_object('appicon_padding_scale') - .set_format_value_func((scale, value) => { - return value + ' px'; - }); - - // fine-tune box1 - this._builder.get_object('tray_size_scale') - .set_format_value_func((scale, value) => { - return value + ' px'; - }); - - this._builder.get_object('leftbox_size_scale') - .set_format_value_func((scale, value) => { - return value + ' px'; - }); - - // fine-tune box2 - this._builder.get_object('tray_padding_scale') - .set_format_value_func((scale, value) => { - return value + ' px'; - }); - - this._builder.get_object('statusicon_padding_scale') - .set_format_value_func((scale, value) => { - return value + ' px'; - }); - - this._builder.get_object('leftbox_padding_scale') - .set_format_value_func((scale, value) => { - return value + ' px'; - }); - - // animate hovering app icons dialog - this._builder.get_object('animate_appicon_hover_options_duration_scale') - .set_format_value_func((scale, value) => { - return _("%d ms").format(value); - }); - - this._builder.get_object('animate_appicon_hover_options_rotation_scale') - .set_format_value_func((scale, value) => { - return _("%d °").format(value); - }); - - this._builder.get_object('animate_appicon_hover_options_travel_scale') - .set_format_value_func((scale, value) => { - return _("%d %%").format(value); - }); - - this._builder.get_object('animate_appicon_hover_options_zoom_scale') - .set_format_value_func((scale, value) => { - return _("%d %%").format(value); - }); - - this._builder.get_object('animate_appicon_hover_options_convexity_scale') - .set_format_value_func((scale, value) => { - return _("%.1f").format(value); - }); - - this._builder.get_object('animate_appicon_hover_options_extent_scale') - .set_format_value_func((scale, value) => { - return ngettext("%d icon", "%d icons", value).format(value); - }); - } - - _bindSettings() { - // size options - let panel_size_scale = this._builder.get_object('panel_size_scale'); - panel_size_scale.set_range(DEFAULT_PANEL_SIZES[DEFAULT_PANEL_SIZES.length - 1], DEFAULT_PANEL_SIZES[0]); - DEFAULT_PANEL_SIZES.slice(1, -1).forEach(function(val) { - panel_size_scale.add_mark(val, Gtk.PositionType.TOP, val.toString()); - }); - - // Correct for rtl languages - if (this._rtl) { - // Flip value position: this is not done automatically - panel_size_scale.set_value_pos(Gtk.PositionType.LEFT); - // I suppose due to a bug, having a more than one mark and one above a value of 100 - // makes the rendering of the marks wrong in rtl. This doesn't happen setting the scale as not flippable - // and then manually inverting it - panel_size_scale.set_flippable(false); - panel_size_scale.set_inverted(true); - } - - // App icon style option - this._builder.get_object('appicon_style_combo').set_active_id(this._settings.get_string('appicon-style')); - this._builder.get_object('appicon_style_combo').connect('changed', (widget) => { - this._settings.set_string('appicon-style', widget.get_active_id()); - }); - - // Dots Position option - let dotPosition = this._settings.get_string('dot-position'); - - switch (dotPosition) { - case 'BOTTOM': - this._builder.get_object('dots_bottom_button').set_active(true); - break; - case 'TOP': - this._builder.get_object('dots_top_button').set_active(true); - break; - case 'LEFT': - this._builder.get_object('dots_left_button').set_active(true); - break; - case 'RIGHT': - this._builder.get_object('dots_right_button').set_active(true); - break; - } - - this._builder.get_object('dot_style_focused_combo').set_active_id(this._settings.get_string('dot-style-focused')); - this._builder.get_object('dot_style_focused_combo').connect('changed', (widget) => { - this._settings.set_string('dot-style-focused', widget.get_active_id()); - }); - - this._builder.get_object('dot_style_unfocused_combo').set_active_id(this._settings.get_string('dot-style-unfocused')); - this._builder.get_object('dot_style_unfocused_combo').connect('changed', (widget) => { - this._settings.set_string('dot-style-unfocused', widget.get_active_id()); - }); - - for (let i = 1; i <= MAX_WINDOW_INDICATOR; i++) { - let idx = i; - this._builder.get_object('dot_color_' + idx + '_colorbutton').connect('color-set', (button) => { - let rgba = button.get_rgba(); - let css = rgba.to_string(); - let hexString = cssHexString(css); - this._settings.set_string('dot-color-' + idx, hexString); - }); - - this._builder.get_object('dot_color_unfocused_' + idx + '_colorbutton').connect('color-set', (button) => { - let rgba = button.get_rgba(); - let css = rgba.to_string(); - let hexString = cssHexString(css); - this._settings.set_string('dot-color-unfocused-' + idx, hexString); - }); - } - - this._builder.get_object('dot_color_apply_all_button').connect('clicked', () => { - for (let i = 2; i <= MAX_WINDOW_INDICATOR; i++) { - this._settings.set_value('dot-color-' + i, this._settings.get_value('dot-color-1')); - let rgba = new Gdk.RGBA(); - rgba.parse(this._settings.get_string('dot-color-' + i)); - this._builder.get_object('dot_color_' + i + '_colorbutton').set_rgba(rgba); - } - }); - - this._builder.get_object('dot_color_unfocused_apply_all_button').connect('clicked', () => { - for (let i = 2; i <= MAX_WINDOW_INDICATOR; i++) { - this._settings.set_value('dot-color-unfocused-' + i, this._settings.get_value('dot-color-unfocused-1')); - let rgba = new Gdk.RGBA(); - rgba.parse(this._settings.get_string('dot-color-unfocused-' + i)); - this._builder.get_object('dot_color_unfocused_' + i + '_colorbutton').set_rgba(rgba); - } - }); - - this._builder.get_object('focus_highlight_color_colorbutton').connect('color-set', (button) => { - let rgba = button.get_rgba(); - let css = rgba.to_string(); - let hexString = cssHexString(css); - this._settings.set_string('focus-highlight-color', hexString); - }); - - this._builder.get_object('dot_style_options_button').connect('clicked', () => { - let box = this._builder.get_object('box_dots_options'); - - let dialog = this._createPreferencesDialog(_('Running Indicator Options'), box, () => - { - // restore default settings - this._settings.set_value('dot-color-dominant', this._settings.get_default_value('dot-color-dominant')); - this._settings.set_value('dot-color-override', this._settings.get_default_value('dot-color-override')); - this._settings.set_value('dot-color-unfocused-different', this._settings.get_default_value('dot-color-unfocused-different')); - - this._settings.set_value('focus-highlight-color', this._settings.get_default_value('focus-highlight-color')); - let rgba = new Gdk.RGBA(); - rgba.parse(this._settings.get_string('focus-highlight-color')); - this._builder.get_object('focus_highlight_color_colorbutton').set_rgba(rgba); - - this._settings.set_value('focus-highlight-opacity', this._settings.get_default_value('focus-highlight-opacity')); - this._builder.get_object('focus_highlight_opacity_spinbutton').set_value(this._settings.get_int('focus-highlight-opacity')); - - for (let i = 1; i <= MAX_WINDOW_INDICATOR; i++) { - this._settings.set_value('dot-color-' + i, this._settings.get_default_value('dot-color-' + i)); - rgba = new Gdk.RGBA(); - rgba.parse(this._settings.get_string('dot-color-' + i)); - this._builder.get_object('dot_color_' + i + '_colorbutton').set_rgba(rgba); - - this._settings.set_value('dot-color-unfocused-' + i, this._settings.get_default_value('dot-color-unfocused-' + i)); - rgba = new Gdk.RGBA(); - rgba.parse(this._settings.get_string('dot-color-unfocused-' + i)); - this._builder.get_object('dot_color_unfocused_' + i + '_colorbutton').set_rgba(rgba); - } - - this._settings.set_value('dot-size', this._settings.get_default_value('dot-size')); - this._builder.get_object('dot_size_spinbutton').set_value(this._settings.get_int('dot-size')); - - this._settings.set_value('focus-highlight', this._settings.get_default_value('focus-highlight')); - this._settings.set_value('focus-highlight-dominant', this._settings.get_default_value('focus-highlight-dominant')); - }); - - this._settings.bind('dot-color-dominant', - this._builder.get_object('dot_color_dominant_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('dot-color-override', - this._builder.get_object('dot_color_override_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - // when either becomes active, turn the other off - this._builder.get_object('dot_color_dominant_switch').connect('state-set', (widget) => { - if (widget.get_active()) this._settings.set_boolean('dot-color-override', false); - }); - this._builder.get_object('dot_color_override_switch').connect('state-set', (widget) => { - if (widget.get_active()) this._settings.set_boolean('dot-color-dominant', false); - else this._settings.set_boolean('dot-color-unfocused-different', false); - }); - - this._settings.bind('dot-color-unfocused-different', - this._builder.get_object('dot_color_unfocused_different_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('dot-color-override', - this._builder.get_object('grid_dot_color'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('dot-color-override', - this._builder.get_object('dot_color_unfocused_box'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('dot-color-unfocused-different', - this._builder.get_object('grid_dot_color_unfocused'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - for (let i = 1; i <= MAX_WINDOW_INDICATOR; i++) { - let rgba = new Gdk.RGBA(); - rgba.parse(this._settings.get_string('dot-color-' + i)); - this._builder.get_object('dot_color_' + i + '_colorbutton').set_rgba(rgba); - - rgba = new Gdk.RGBA(); - rgba.parse(this._settings.get_string('dot-color-unfocused-' + i)); - this._builder.get_object('dot_color_unfocused_' + i + '_colorbutton').set_rgba(rgba); - } - - this._settings.bind('focus-highlight', - this._builder.get_object('focus_highlight_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('focus-highlight', - this._builder.get_object('grid_focus_highlight_options'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('focus-highlight-dominant', - this._builder.get_object('focus_highlight_dominant_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('focus-highlight-dominant', - this._builder.get_object('focus_highlight_color_label'), - 'sensitive', - Gio.SettingsBindFlags.INVERT_BOOLEAN); - - this._settings.bind('focus-highlight-dominant', - this._builder.get_object('focus_highlight_color_colorbutton'), - 'sensitive', - Gio.SettingsBindFlags.INVERT_BOOLEAN); - - - (function() { - let rgba = new Gdk.RGBA(); - rgba.parse(this._settings.get_string('focus-highlight-color')); - this._builder.get_object('focus_highlight_color_colorbutton').set_rgba(rgba); - }).apply(this); - - this._builder.get_object('focus_highlight_opacity_spinbutton').set_value(this._settings.get_int('focus-highlight-opacity')); - this._builder.get_object('focus_highlight_opacity_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('focus-highlight-opacity', widget.get_value()); - }); - - this._builder.get_object('dot_size_spinbutton').set_value(this._settings.get_int('dot-size')); - this._builder.get_object('dot_size_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('dot-size', widget.get_value()); - }); - - dialog.show(); - dialog.set_default_size(1, 1); - - }); - - //multi-monitor - this.monitors = this._settings.get_value('available-monitors').deep_unpack(); - - let dtpPrimaryMonitorIndex = this.monitors.indexOf(this._settings.get_int('primary-monitor')); - - if (dtpPrimaryMonitorIndex < 0) { - dtpPrimaryMonitorIndex = 0; - } - - this._currentMonitorIndex = this.monitors[dtpPrimaryMonitorIndex]; - - this._settings.connect('changed::panel-positions', () => this._updateVerticalRelatedOptions()); - this._updateVerticalRelatedOptions(); - - for (let i = 0; i < this.monitors.length; ++i) { - //the gnome-shell primary index is the first one in the "available-monitors" setting - let label = !i ? _('Primary monitor') : _('Monitor ') + (i + 1); - - this._builder.get_object('multimon_primary_combo').append_text(label); - this._builder.get_object('taskbar_position_monitor_combo').append_text(label); - } - - this._builder.get_object('multimon_primary_combo').set_active(dtpPrimaryMonitorIndex); - this._builder.get_object('taskbar_position_monitor_combo').set_active(dtpPrimaryMonitorIndex); - - this._settings.bind('panel-element-positions-monitors-sync', - this._builder.get_object('taskbar_position_sync_button'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('panel-element-positions-monitors-sync', - this._builder.get_object('taskbar_position_monitor_combo'), - 'sensitive', - Gio.SettingsBindFlags.INVERT_BOOLEAN); - - this._settings.connect('changed::panel-element-positions-monitors-sync', () => { - this._maybeDisableTopPosition(); - // The anchor combo box may has different labels for single- or all-monitor configuration. - this._setAnchorLabels(this._currentMonitorIndex); - }); - - this._builder.get_object('multimon_primary_combo').connect('changed', (widget) => { - this._settings.set_int('primary-monitor', this.monitors[widget.get_active()]); - }); - - this._builder.get_object('taskbar_position_monitor_combo').connect('changed', (widget) => { - this._currentMonitorIndex = this.monitors[widget.get_active()]; - this._updateWidgetSettingsForMonitor(this._currentMonitorIndex); - }); - - this._settings.bind('multi-monitors', - this._builder.get_object('multimon_multi_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - if (this.monitors.length === 1) { - this._builder.get_object('multimon_multi_switch').set_sensitive(false); - } - - const panel_length_scale = this._builder.get_object('panel_length_scale'); - panel_length_scale.connect('value-changed', (widget) => { - const value = widget.get_value(); - const monitorSync = this._settings.get_boolean('panel-element-positions-monitors-sync'); - const monitorsToSetFor = monitorSync ? this.monitors : [this._currentMonitorIndex]; - monitorsToSetFor.forEach(monitorIndex => { - PanelSettings.setPanelLength(this._settings, monitorIndex, value); - }); - - this._setAnchorWidgetSensitivity(value); - }); - - this._builder.get_object('panel_anchor_combo').connect('changed', (widget) => { - const value = widget.get_active_id(); - // Value can be null while anchor labels are being swapped out - if (value !== null) { - const monitorSync = this._settings.get_boolean('panel-element-positions-monitors-sync'); - const monitorsToSetFor = monitorSync ? this.monitors : [this._currentMonitorIndex]; - monitorsToSetFor.forEach(monitorIndex => { - PanelSettings.setPanelAnchor(this._settings, monitorIndex, value); - }); - } - }); - - this._updateWidgetSettingsForMonitor(this._currentMonitorIndex); - - //dynamic opacity - this._settings.bind('trans-use-custom-bg', - this._builder.get_object('trans_bg_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('trans-use-custom-bg', - this._builder.get_object('trans_bg_color_colorbutton'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - let rgba = new Gdk.RGBA(); - rgba.parse(this._settings.get_string('trans-bg-color')); - this._builder.get_object('trans_bg_color_colorbutton').set_rgba(rgba); - - this._builder.get_object('trans_bg_color_colorbutton').connect('color-set', (button) => { - let rgba = button.get_rgba(); - let css = rgba.to_string(); - let hexString = cssHexString(css); - this._settings.set_string('trans-bg-color', hexString); - }); - - this._settings.bind('trans-use-custom-opacity', - this._builder.get_object('trans_opacity_override_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('trans-use-custom-opacity', - this._builder.get_object('trans_opacity_box'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('trans-use-custom-opacity', - this._builder.get_object('trans_opacity_box2'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - this._builder.get_object('trans_opacity_override_switch').connect('notify::active', (widget) => { - if (!widget.get_active()) - this._builder.get_object('trans_dyn_switch').set_active(false); - }); - - this._builder.get_object('trans_opacity_spinbutton').set_value(this._settings.get_double('trans-panel-opacity') * 100); - this._builder.get_object('trans_opacity_spinbutton').connect('value-changed', (widget) => { - this._settings.set_double('trans-panel-opacity', widget.get_value() * 0.01); - }); - - this._settings.bind('trans-use-dynamic-opacity', - this._builder.get_object('trans_dyn_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('trans-use-dynamic-opacity', - this._builder.get_object('trans_dyn_options_button'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('trans-dynamic-behavior', - this._builder.get_object('trans_options_window_type_combo'), - 'active-id', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('trans-use-custom-gradient', - this._builder.get_object('trans_gradient_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('trans-use-custom-gradient', - this._builder.get_object('trans_gradient_box'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('trans-use-custom-gradient', - this._builder.get_object('trans_gradient_box2'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - rgba.parse(this._settings.get_string('trans-gradient-top-color')); - this._builder.get_object('trans_gradient_color1_colorbutton').set_rgba(rgba); - - this._builder.get_object('trans_gradient_color1_colorbutton').connect('color-set', (button) => { - let rgba = button.get_rgba(); - let css = rgba.to_string(); - let hexString = cssHexString(css); - this._settings.set_string('trans-gradient-top-color', hexString); - }); - - this._builder.get_object('trans_gradient_color1_spinbutton').set_value(this._settings.get_double('trans-gradient-top-opacity') * 100); - this._builder.get_object('trans_gradient_color1_spinbutton').connect('value-changed', (widget) => { - this._settings.set_double('trans-gradient-top-opacity', widget.get_value() * 0.01); - }); - - rgba.parse(this._settings.get_string('trans-gradient-bottom-color')); - this._builder.get_object('trans_gradient_color2_colorbutton').set_rgba(rgba); - - this._builder.get_object('trans_gradient_color2_colorbutton').connect('color-set', (button) => { - let rgba = button.get_rgba(); - let css = rgba.to_string(); - let hexString = cssHexString(css); - this._settings.set_string('trans-gradient-bottom-color', hexString); - }); - - this._builder.get_object('trans_gradient_color2_spinbutton').set_value(this._settings.get_double('trans-gradient-bottom-opacity') * 100); - this._builder.get_object('trans_gradient_color2_spinbutton').connect('value-changed', (widget) => { - this._settings.set_double('trans-gradient-bottom-opacity', widget.get_value() * 0.01); - }); - - this._builder.get_object('trans_options_distance_spinbutton').set_value(this._settings.get_int('trans-dynamic-distance')); - this._builder.get_object('trans_options_distance_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('trans-dynamic-distance', widget.get_value()); - }); - - this._builder.get_object('trans_options_min_opacity_spinbutton').set_value(this._settings.get_double('trans-dynamic-anim-target') * 100); - this._builder.get_object('trans_options_min_opacity_spinbutton').connect('value-changed', (widget) => { - this._settings.set_double('trans-dynamic-anim-target', widget.get_value() * 0.01); - }); - - this._builder.get_object('trans_options_anim_time_spinbutton').set_value(this._settings.get_int('trans-dynamic-anim-time')); - this._builder.get_object('trans_options_anim_time_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('trans-dynamic-anim-time', widget.get_value()); - }); - - this._builder.get_object('trans_dyn_options_button').connect('clicked', () => { - let box = this._builder.get_object('box_dynamic_opacity_options'); - - let dialog = this._createPreferencesDialog(_('Dynamic opacity options'), box, () => - { - // restore default settings - this._settings.set_value('trans-dynamic-behavior', this._settings.get_default_value('trans-dynamic-behavior')); - - this._settings.set_value('trans-dynamic-distance', this._settings.get_default_value('trans-dynamic-distance')); - this._builder.get_object('trans_options_distance_spinbutton').set_value(this._settings.get_int('trans-dynamic-distance')); - - this._settings.set_value('trans-dynamic-anim-target', this._settings.get_default_value('trans-dynamic-anim-target')); - this._builder.get_object('trans_options_min_opacity_spinbutton').set_value(this._settings.get_double('trans-dynamic-anim-target') * 100); - - this._settings.set_value('trans-dynamic-anim-time', this._settings.get_default_value('trans-dynamic-anim-time')); - this._builder.get_object('trans_options_anim_time_spinbutton').set_value(this._settings.get_int('trans-dynamic-anim-time')); - }); - - dialog.show(); - dialog.set_default_size(1, 1); - - }); - - this._settings.bind('desktop-line-use-custom-color', - this._builder.get_object('override_show_desktop_line_color_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('desktop-line-use-custom-color', - this._builder.get_object('override_show_desktop_line_color_colorbutton'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - rgba.parse(this._settings.get_string('desktop-line-custom-color')); - this._builder.get_object('override_show_desktop_line_color_colorbutton').set_rgba(rgba); - this._builder.get_object('override_show_desktop_line_color_colorbutton').connect('color-set', (button) => { - let rgba = button.get_rgba(); - let css = rgba.to_string(); - this._settings.set_string('desktop-line-custom-color', css); - }); - - - this._settings.bind('intellihide', - this._builder.get_object('intellihide_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('intellihide', - this._builder.get_object('intellihide_options_button'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('intellihide-hide-from-windows', - this._builder.get_object('intellihide_window_hide_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('intellihide-hide-from-windows', - this._builder.get_object('intellihide_behaviour_options'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('intellihide-behaviour', - this._builder.get_object('intellihide_behaviour_combo'), - 'active-id', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('intellihide-use-pressure', - this._builder.get_object('intellihide_use_pressure_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('intellihide-use-pressure', - this._builder.get_object('intellihide_use_pressure_options'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('intellihide-use-pressure', - this._builder.get_object('intellihide_use_pressure_options2'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('intellihide-show-in-fullscreen', - this._builder.get_object('intellihide_show_in_fullscreen_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('intellihide-only-secondary', - this._builder.get_object('intellihide_only_secondary_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('multi-monitors', - this._builder.get_object('grid_intellihide_only_secondary'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - this._builder.get_object('multimon_multi_switch').connect('notify::active', (widget) => { - if (!widget.get_active()) - this._builder.get_object('intellihide_only_secondary_switch').set_active(false); - }); - - this._builder.get_object('intellihide_pressure_threshold_spinbutton').set_value(this._settings.get_int('intellihide-pressure-threshold')); - this._builder.get_object('intellihide_pressure_threshold_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('intellihide-pressure-threshold', widget.get_value()); - }); - - this._builder.get_object('intellihide_pressure_time_spinbutton').set_value(this._settings.get_int('intellihide-pressure-time')); - this._builder.get_object('intellihide_pressure_time_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('intellihide-pressure-time', widget.get_value()); - }); - - this._settings.bind('intellihide-key-toggle-text', - this._builder.get_object('intellihide_toggle_entry'), - 'text', - Gio.SettingsBindFlags.DEFAULT); - this._settings.connect('changed::intellihide-key-toggle-text', () => setShortcut(this._settings, 'intellihide-key-toggle')); - - this._builder.get_object('intellihide_animation_time_spinbutton').set_value(this._settings.get_int('intellihide-animation-time')); - this._builder.get_object('intellihide_animation_time_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('intellihide-animation-time', widget.get_value()); - }); - - this._builder.get_object('intellihide_close_delay_spinbutton').set_value(this._settings.get_int('intellihide-close-delay')); - this._builder.get_object('intellihide_close_delay_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('intellihide-close-delay', widget.get_value()); - }); - - this._builder.get_object('intellihide_enable_start_delay_spinbutton').set_value(this._settings.get_int('intellihide-enable-start-delay')); - this._builder.get_object('intellihide_enable_start_delay_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('intellihide-enable-start-delay', widget.get_value()); - }); - - this._builder.get_object('intellihide_options_button').connect('clicked', () => { - let box = this._builder.get_object('box_intellihide_options'); - - let dialog = this._createPreferencesDialog(_('Intellihide options'), box, () => - { - // restore default settings - this._settings.set_value('intellihide-hide-from-windows', this._settings.get_default_value('intellihide-hide-from-windows')); - this._settings.set_value('intellihide-behaviour', this._settings.get_default_value('intellihide-behaviour')); - this._settings.set_value('intellihide-use-pressure', this._settings.get_default_value('intellihide-use-pressure')); - this._settings.set_value('intellihide-show-in-fullscreen', this._settings.get_default_value('intellihide-show-in-fullscreen')); - this._settings.set_value('intellihide-only-secondary', this._settings.get_default_value('intellihide-only-secondary')); - - this._settings.set_value('intellihide-pressure-threshold', this._settings.get_default_value('intellihide-pressure-threshold')); - this._builder.get_object('intellihide_pressure_threshold_spinbutton').set_value(this._settings.get_int('intellihide-pressure-threshold')); - - this._settings.set_value('intellihide-pressure-time', this._settings.get_default_value('intellihide-pressure-time')); - this._builder.get_object('intellihide_pressure_time_spinbutton').set_value(this._settings.get_int('intellihide-pressure-time')); - - this._settings.set_value('intellihide-key-toggle-text', this._settings.get_default_value('intellihide-key-toggle-text')); - - this._settings.set_value('intellihide-animation-time', this._settings.get_default_value('intellihide-animation-time')); - this._builder.get_object('intellihide_animation_time_spinbutton').set_value(this._settings.get_int('intellihide-animation-time')); - - this._settings.set_value('intellihide-close-delay', this._settings.get_default_value('intellihide-close-delay')); - this._builder.get_object('intellihide_close_delay_spinbutton').set_value(this._settings.get_int('intellihide-close-delay')); - - this._settings.set_value('intellihide-enable-start-delay', this._settings.get_default_value('intellihide-enable-start-delay')); - this._builder.get_object('intellihide_enable_start_delay_spinbutton').set_value(this._settings.get_int('intellihide-enable-start-delay')); - }); - - dialog.show(); - dialog.set_default_size(1, 1); - - }); - - // Behavior panel - - this._builder.get_object('show_applications_side_padding_spinbutton').set_value(this._settings.get_int('show-apps-icon-side-padding')); - this._builder.get_object('show_applications_side_padding_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('show-apps-icon-side-padding', widget.get_value()); - }); - - this._settings.bind('show-apps-override-escape', - this._builder.get_object('show_applications_esc_key_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('show-showdesktop-hover', - this._builder.get_object('show_showdesktop_hide_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('show-showdesktop-hover', - this._builder.get_object('grid_show_showdesktop_hide_options'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('show-showdesktop-hover', - this._builder.get_object('grid_show_showdesktop_hide_options2'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('show-window-previews', - this._builder.get_object('show_window_previews_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('show-window-previews', - this._builder.get_object('show_window_previews_button'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('show-tooltip', - this._builder.get_object('show_tooltip_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('show-favorites', - this._builder.get_object('show_favorite_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('show-favorites-all-monitors', - this._builder.get_object('multimon_multi_show_favorites_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('show-favorites', - this._builder.get_object('multimon_multi_show_favorites_switch'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('show-running-apps', - this._builder.get_object('show_runnning_apps_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._setPreviewTitlePosition(); - - this._builder.get_object('grid_preview_title_font_color_colorbutton').connect('color-set', (button) => { - let rgba = button.get_rgba(); - let css = rgba.to_string(); - let hexString = cssHexString(css); - this._settings.set_string('window-preview-title-font-color', hexString); - }); - - this._builder.get_object('show_window_previews_button').connect('clicked', () => { - let scrolledWindow = this._builder.get_object('box_window_preview_options'); - - let dialog = this._createPreferencesDialog(_('Window preview options'), scrolledWindow, () => - { - // restore default settings - this._settings.set_value('show-window-previews-timeout', this._settings.get_default_value('show-window-previews-timeout')); - this._builder.get_object('preview_timeout_spinbutton').set_value(this._settings.get_int('show-window-previews-timeout')); - - this._settings.set_value('leave-timeout', this._settings.get_default_value('leave-timeout')); - this._builder.get_object('leave_timeout_spinbutton').set_value(this._settings.get_int('leave-timeout')); - - this._settings.set_value('window-preview-hide-immediate-click', this._settings.get_default_value('window-preview-hide-immediate-click')); - - this._settings.set_value('window-preview-animation-time', this._settings.get_default_value('window-preview-animation-time')); - this._builder.get_object('animation_time_spinbutton').set_value(this._settings.get_int('window-preview-animation-time')); - - this._settings.set_value('preview-use-custom-opacity', this._settings.get_default_value('preview-use-custom-opacity')); - - this._settings.set_value('window-preview-use-custom-icon-size', this._settings.get_default_value('window-preview-use-custom-icon-size')); - - this._settings.set_value('preview-custom-opacity', this._settings.get_default_value('preview-custom-opacity')); - this._builder.get_object('preview_custom_opacity_spinbutton').set_value(this._settings.get_int('preview-custom-opacity')); - - this._settings.set_value('window-preview-title-position', this._settings.get_default_value('window-preview-title-position')); - this._setPreviewTitlePosition(); - - this._settings.set_value('peek-mode', this._settings.get_default_value('peek-mode')); - this._settings.set_value('window-preview-show-title', this._settings.get_default_value('window-preview-show-title')); - this._settings.set_value('enter-peek-mode-timeout', this._settings.get_default_value('enter-peek-mode-timeout')); - this._builder.get_object('enter_peek_mode_timeout_spinbutton').set_value(this._settings.get_int('enter-peek-mode-timeout')); - this._settings.set_value('peek-mode-opacity', this._settings.get_default_value('peek-mode-opacity')); - this._builder.get_object('peek_mode_opacity_spinbutton').set_value(this._settings.get_int('peek-mode-opacity')); - - this._settings.set_value('window-preview-size', this._settings.get_default_value('window-preview-size')); - this._builder.get_object('preview_size_spinbutton').set_value(this._settings.get_int('window-preview-size')); - - this._settings.set_value('window-preview-fixed-x', this._settings.get_default_value('window-preview-fixed-x')); - this._settings.set_value('window-preview-fixed-y', this._settings.get_default_value('window-preview-fixed-y')); - - this._settings.set_value('window-preview-aspect-ratio-x', this._settings.get_default_value('window-preview-aspect-ratio-x')); - this._builder.get_object('preview_aspect_ratio_x_combo').set_active_id(this._settings.get_int('window-preview-aspect-ratio-x').toString()); - - this._settings.set_value('window-preview-aspect-ratio-y', this._settings.get_default_value('window-preview-aspect-ratio-y')); - this._builder.get_object('preview_aspect_ratio_y_combo').set_active_id(this._settings.get_int('window-preview-aspect-ratio-y').toString()); - - this._settings.set_value('window-preview-padding', this._settings.get_default_value('window-preview-padding')); - this._builder.get_object('preview_padding_spinbutton').set_value(this._settings.get_int('window-preview-padding')); - - this._settings.set_value('preview-middle-click-close', this._settings.get_default_value('preview-middle-click-close')); - - this._settings.set_value('window-preview-title-font-size', this._settings.get_default_value('window-preview-title-font-size')); - this._builder.get_object('preview_title_size_spinbutton').set_value(this._settings.get_int('window-preview-title-font-size')); - - this._settings.set_value('window-preview-custom-icon-size', this._settings.get_default_value('window-preview-custom-icon-size')); - this._builder.get_object('preview_custom_icon_size_spinbutton').set_value(this._settings.get_int('window-preview-custom-icon-size')); - - this._settings.set_value('window-preview-title-font-weight', this._settings.get_default_value('window-preview-title-font-weight')); - this._builder.get_object('grid_preview_title_weight_combo').set_active_id(this._settings.get_string('window-preview-title-font-weight')); - - this._settings.set_value('window-preview-title-font-color', this._settings.get_default_value('window-preview-title-font-color')); - let rgba = new Gdk.RGBA(); - rgba.parse(this._settings.get_string('window-preview-title-font-color')); - this._builder.get_object('grid_preview_title_font_color_colorbutton').set_rgba(rgba); - }); - - this._builder.get_object('preview_timeout_spinbutton').set_value(this._settings.get_int('show-window-previews-timeout')); - this._builder.get_object('preview_timeout_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('show-window-previews-timeout', widget.get_value()); - }); - - this._settings.bind('preview-middle-click-close', - this._builder.get_object('preview_middle_click_close_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('window-preview-fixed-x', - this._builder.get_object('preview_aspect_ratio_x_fixed_togglebutton'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('window-preview-fixed-y', - this._builder.get_object('preview_aspect_ratio_y_fixed_togglebutton'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('preview-use-custom-opacity', - this._builder.get_object('preview_custom_opacity_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - this._settings.bind('preview-use-custom-opacity', - this._builder.get_object('preview_custom_opacity_spinbutton'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - this._settings.bind('window-preview-use-custom-icon-size', - this._builder.get_object('preview_custom_icon_size_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - this._settings.bind('window-preview-use-custom-icon-size', - this._builder.get_object('preview_custom_icon_size_spinbutton'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - this._builder.get_object('preview_custom_opacity_spinbutton').set_value(this._settings.get_int('preview-custom-opacity')); - this._builder.get_object('preview_custom_opacity_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('preview-custom-opacity', widget.get_value()); - }); - - this._settings.bind('peek-mode', - this._builder.get_object('peek_mode_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - this._settings.bind('peek-mode', - this._builder.get_object('grid_enter_peek_mode_timeout'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - this._settings.bind('peek-mode', - this._builder.get_object('grid_peek_mode_opacity'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('window-preview-show-title', - this._builder.get_object('preview_show_title_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - this._settings.bind('window-preview-show-title', - this._builder.get_object('grid_preview_custom_icon_size'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - this._settings.bind('window-preview-show-title', - this._builder.get_object('grid_preview_title_size'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - this._settings.bind('window-preview-show-title', - this._builder.get_object('grid_preview_title_weight'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - this._settings.bind('window-preview-show-title', - this._builder.get_object('grid_preview_title_font_color'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - this._builder.get_object('enter_peek_mode_timeout_spinbutton').set_value(this._settings.get_int('enter-peek-mode-timeout')); - this._builder.get_object('enter_peek_mode_timeout_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('enter-peek-mode-timeout', widget.get_value()); - }); - - this._builder.get_object('leave_timeout_spinbutton').set_value(this._settings.get_int('leave-timeout')); - this._builder.get_object('leave_timeout_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('leave-timeout', widget.get_value()); - }); - - this._settings.bind('window-preview-hide-immediate-click', - this._builder.get_object('preview_immediate_click_button'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._builder.get_object('animation_time_spinbutton').set_value(this._settings.get_int('window-preview-animation-time')); - this._builder.get_object('animation_time_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('window-preview-animation-time', widget.get_value()); - }); - - this._builder.get_object('peek_mode_opacity_spinbutton').set_value(this._settings.get_int('peek-mode-opacity')); - this._builder.get_object('peek_mode_opacity_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('peek-mode-opacity', widget.get_value()); - }); - - this._builder.get_object('preview_size_spinbutton').set_value(this._settings.get_int('window-preview-size')); - this._builder.get_object('preview_size_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('window-preview-size', widget.get_value()); - }); - - this._builder.get_object('preview_aspect_ratio_x_combo').set_active_id(this._settings.get_int('window-preview-aspect-ratio-x').toString()); - this._builder.get_object('preview_aspect_ratio_x_combo').connect('changed', (widget) => { - this._settings.set_int('window-preview-aspect-ratio-x', parseInt(widget.get_active_id(), 10)); - }); - - this._builder.get_object('preview_aspect_ratio_y_combo').set_active_id(this._settings.get_int('window-preview-aspect-ratio-y').toString()); - this._builder.get_object('preview_aspect_ratio_y_combo').connect('changed', (widget) => { - this._settings.set_int('window-preview-aspect-ratio-y', parseInt(widget.get_active_id(), 10)); - }); - - this._builder.get_object('preview_padding_spinbutton').set_value(this._settings.get_int('window-preview-padding')); - this._builder.get_object('preview_padding_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('window-preview-padding', widget.get_value()); - }); - - this._builder.get_object('preview_title_size_spinbutton').set_value(this._settings.get_int('window-preview-title-font-size')); - this._builder.get_object('preview_title_size_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('window-preview-title-font-size', widget.get_value()); - }); - - this._builder.get_object('preview_custom_icon_size_spinbutton').set_value(this._settings.get_int('window-preview-custom-icon-size')); - this._builder.get_object('preview_custom_icon_size_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('window-preview-custom-icon-size', widget.get_value()); - }); - - this._builder.get_object('grid_preview_title_weight_combo').set_active_id(this._settings.get_string('window-preview-title-font-weight')); - this._builder.get_object('grid_preview_title_weight_combo').connect('changed', (widget) => { - this._settings.set_string('window-preview-title-font-weight', widget.get_active_id()); - }); - - (function() { - let rgba = new Gdk.RGBA(); - rgba.parse(this._settings.get_string('window-preview-title-font-color')); - this._builder.get_object('grid_preview_title_font_color_colorbutton').set_rgba(rgba); - }).apply(this); - - dialog.show(); - - }); - - this._settings.bind('isolate-workspaces', - this._builder.get_object('isolate_workspaces_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('isolate-monitors', - this._builder.get_object('multimon_multi_isolate_monitor_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('overview-click-to-exit', - this._builder.get_object('clicktoexit_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('hide-overview-on-startup', - this._builder.get_object('hide_overview_on_startup_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('group-apps', - this._builder.get_object('group_apps_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT | Gio.SettingsBindFlags.INVERT_BOOLEAN); - - this._settings.bind('group-apps', - this._builder.get_object('show_group_apps_options_button'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT | Gio.SettingsBindFlags.INVERT_BOOLEAN); - - this._settings.bind('progress-show-count', - this._builder.get_object('show_notification_badge_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._builder.get_object('group_apps_label_font_color_colorbutton').connect('color-set', (button) => { - let rgba = button.get_rgba(); - let css = rgba.to_string(); - let hexString = cssHexString(css); - this._settings.set_string('group-apps-label-font-color', hexString); - }); - - this._builder.get_object('group_apps_label_font_color_minimized_colorbutton').connect('color-set', (button) => { - let rgba = button.get_rgba(); - let css = rgba.to_string(); - let hexString = cssHexString(css); - this._settings.set_string('group-apps-label-font-color-minimized', hexString); - }); - - this._settings.bind('group-apps-use-fixed-width', - this._builder.get_object('group_apps_use_fixed_width_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('group-apps-underline-unfocused', - this._builder.get_object('group_apps_underline_unfocused_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('group-apps-use-launchers', - this._builder.get_object('group_apps_use_launchers_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._builder.get_object('show_group_apps_options_button').connect('clicked', () => { - let box = this._builder.get_object('box_group_apps_options'); - - let dialog = this._createPreferencesDialog(_('Ungrouped application options'), box, () => - { - // restore default settings - this._settings.set_value('group-apps-label-font-size', this._settings.get_default_value('group-apps-label-font-size')); - this._builder.get_object('group_apps_label_font_size_spinbutton').set_value(this._settings.get_int('group-apps-label-font-size')); - - this._settings.set_value('group-apps-label-font-weight', this._settings.get_default_value('group-apps-label-font-weight')); - this._builder.get_object('group_apps_label_font_weight_combo').set_active_id(this._settings.get_string('group-apps-label-font-weight')); - - this._settings.set_value('group-apps-label-font-color', this._settings.get_default_value('group-apps-label-font-color')); - let rgba = new Gdk.RGBA(); - rgba.parse(this._settings.get_string('group-apps-label-font-color')); - this._builder.get_object('group_apps_label_font_color_colorbutton').set_rgba(rgba); - - this._settings.set_value('group-apps-label-font-color-minimized', this._settings.get_default_value('group-apps-label-font-color-minimized')); - let minimizedFontColor = new Gdk.RGBA(); - minimizedFontColor.parse(this._settings.get_string('group-apps-label-font-color-minimized')); - this._builder.get_object('group_apps_label_font_color_minimized_colorbutton').set_rgba(minimizedFontColor); - - this._settings.set_value('group-apps-label-max-width', this._settings.get_default_value('group-apps-label-max-width')); - this._builder.get_object('group_apps_label_max_width_spinbutton').set_value(this._settings.get_int('group-apps-label-max-width')); - - this._settings.set_value('group-apps-use-fixed-width', this._settings.get_default_value('group-apps-use-fixed-width')); - this._settings.set_value('group-apps-underline-unfocused', this._settings.get_default_value('group-apps-underline-unfocused')); - this._settings.set_value('group-apps-use-launchers', this._settings.get_default_value('group-apps-use-launchers')); - }); - - this._builder.get_object('group_apps_label_font_size_spinbutton').set_value(this._settings.get_int('group-apps-label-font-size')); - this._builder.get_object('group_apps_label_font_size_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('group-apps-label-font-size', widget.get_value()); - }); - - this._builder.get_object('group_apps_label_font_weight_combo').set_active_id(this._settings.get_string('group-apps-label-font-weight')); - this._builder.get_object('group_apps_label_font_weight_combo').connect('changed', (widget) => { - this._settings.set_string('group-apps-label-font-weight', widget.get_active_id()); - }); - - (function() { - let rgba = new Gdk.RGBA(); - rgba.parse(this._settings.get_string('group-apps-label-font-color')); - this._builder.get_object('group_apps_label_font_color_colorbutton').set_rgba(rgba); - }).apply(this); - - (function() { - let rgba = new Gdk.RGBA(); - rgba.parse(this._settings.get_string('group-apps-label-font-color-minimized')); - this._builder.get_object('group_apps_label_font_color_minimized_colorbutton').set_rgba(rgba); - }).apply(this); - - this._builder.get_object('group_apps_label_max_width_spinbutton').set_value(this._settings.get_int('group-apps-label-max-width')); - this._builder.get_object('group_apps_label_max_width_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('group-apps-label-max-width', widget.get_value()); - }); - - dialog.show(); - dialog.set_default_size(600, 1); - - }); - - this._builder.get_object('click_action_combo').set_active_id(this._settings.get_string('click-action')); - this._builder.get_object('click_action_combo').connect('changed', (widget) => { - this._settings.set_string('click-action', widget.get_active_id()); - }); - - this._builder.get_object('shift_click_action_combo').connect('changed', (widget) => { - this._settings.set_string('shift-click-action', widget.get_active_id()); - }); - - this._builder.get_object('middle_click_action_combo').connect('changed', (widget) => { - this._settings.set_string('middle-click-action', widget.get_active_id()); - }); - this._builder.get_object('shift_middle_click_action_combo').connect('changed', (widget) => { - this._settings.set_string('shift-middle-click-action', widget.get_active_id()); - }); - - // Create dialog for middle-click options - this._builder.get_object('middle_click_options_button').connect('clicked', () => { - let box = this._builder.get_object('box_middle_click_options'); - - let dialog = this._createPreferencesDialog(_('Customize middle-click behavior'), box, () => - { - // restore default settings for the relevant keys - let keys = ['shift-click-action', 'middle-click-action', 'shift-middle-click-action']; - keys.forEach(function(val) { - this._settings.set_value(val, this._settings.get_default_value(val)); - }, this); - this._builder.get_object('shift_click_action_combo').set_active_id(this._settings.get_string('shift-click-action')); - this._builder.get_object('middle_click_action_combo').set_active_id(this._settings.get_string('middle-click-action')); - this._builder.get_object('shift_middle_click_action_combo').set_active_id(this._settings.get_string('shift-middle-click-action')); - }); - - this._builder.get_object('shift_click_action_combo').set_active_id(this._settings.get_string('shift-click-action')); - - this._builder.get_object('middle_click_action_combo').set_active_id(this._settings.get_string('middle-click-action')); - - this._builder.get_object('shift_middle_click_action_combo').set_active_id(this._settings.get_string('shift-middle-click-action')); - - this._settings.bind('shift-click-action', - this._builder.get_object('shift_click_action_combo'), - 'active-id', - Gio.SettingsBindFlags.DEFAULT); - this._settings.bind('middle-click-action', - this._builder.get_object('middle_click_action_combo'), - 'active-id', - Gio.SettingsBindFlags.DEFAULT); - this._settings.bind('shift-middle-click-action', - this._builder.get_object('shift_middle_click_action_combo'), - 'active-id', - Gio.SettingsBindFlags.DEFAULT); - - dialog.show(); - dialog.set_default_size(700, 1); - - }); - - this._builder.get_object('scroll_panel_combo').set_active_id(this._settings.get_string('scroll-panel-action')); - this._builder.get_object('scroll_panel_combo').connect('changed', (widget) => { - this._settings.set_string('scroll-panel-action', widget.get_active_id()); - }); - - this._builder.get_object('scroll_icon_combo').set_active_id(this._settings.get_string('scroll-icon-action')); - this._builder.get_object('scroll_icon_combo').connect('changed', (widget) => { - this._settings.set_string('scroll-icon-action', widget.get_active_id()); - }); - - // Create dialog for panel scroll options - this._builder.get_object('scroll_panel_options_button').connect('clicked', () => { - let box = this._builder.get_object('scroll_panel_options_box'); - - let dialog = this._createPreferencesDialog(_('Customize panel scroll behavior'), box, () => - { - // restore default settings - this._settings.set_value('scroll-panel-delay', this._settings.get_default_value('scroll-panel-delay')); - this._builder.get_object('scroll_panel_options_delay_spinbutton').set_value(this._settings.get_int('scroll-panel-delay')); - - this._settings.set_value('scroll-panel-show-ws-popup', this._settings.get_default_value('scroll-panel-show-ws-popup')); - }); - - this._builder.get_object('scroll_panel_options_delay_spinbutton').set_value(this._settings.get_int('scroll-panel-delay')); - this._builder.get_object('scroll_panel_options_delay_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('scroll-panel-delay', widget.get_value()); - }); - - this._settings.bind('scroll-panel-show-ws-popup', - this._builder.get_object('scroll_panel_options_show_ws_popup_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - dialog.show(); - dialog.set_default_size(640, 1); - - }); - - // Create dialog for icon scroll options - this._builder.get_object('scroll_icon_options_button').connect('clicked', () => { - let box = this._builder.get_object('scroll_icon_options_box'); - - let dialog = this._createPreferencesDialog(_('Customize icon scroll behavior'), box, () => - { - // restore default settings - this._settings.set_value('scroll-icon-delay', this._settings.get_default_value('scroll-icon-delay')); - this._builder.get_object('scroll_icon_options_delay_spinbutton').set_value(this._settings.get_int('scroll-icon-delay')); - }); - - this._builder.get_object('scroll_icon_options_delay_spinbutton').set_value(this._settings.get_int('scroll-icon-delay')); - this._builder.get_object('scroll_icon_options_delay_spinbutton').connect('value-changed', (widget) => { - this._settings.set_int('scroll-icon-delay', widget.get_value()); - }); - - dialog.show(); - dialog.set_default_size(640, 1); - - }); - - this._settings.bind('hot-keys', - this._builder.get_object('hot_keys_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - this._settings.bind('hot-keys', - this._builder.get_object('overlay_button'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - this._builder.get_object('overlay_combo').connect('changed', (widget) => { - this._settings.set_string('hotkeys-overlay-combo', widget.get_active_id()); - }); - - this._settings.bind('shortcut-previews', - this._builder.get_object('shortcut_preview_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._builder.get_object('shortcut_num_keys_combo').set_active_id(this._settings.get_string('shortcut-num-keys')); - this._builder.get_object('shortcut_num_keys_combo').connect('changed', (widget) => { - this._settings.set_string('shortcut-num-keys', widget.get_active_id()); - }); - - this._settings.connect('changed::hotkey-prefix-text', () => {checkHotkeyPrefix(this._settings);}); - - this._builder.get_object('hotkey_prefix_combo').set_active_id(this._settings.get_string('hotkey-prefix-text')); - - this._settings.bind('hotkey-prefix-text', - this._builder.get_object('hotkey_prefix_combo'), - 'active-id', - Gio.SettingsBindFlags.DEFAULT); - - this._builder.get_object('overlay_combo').set_active_id(this._settings.get_string('hotkeys-overlay-combo')); - - this._settings.bind('hotkeys-overlay-combo', - this._builder.get_object('overlay_combo'), - 'active-id', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('overlay-timeout', - this._builder.get_object('timeout_spinbutton'), - 'value', - Gio.SettingsBindFlags.DEFAULT); - if (this._settings.get_string('hotkeys-overlay-combo') !== 'TEMPORARILY') { - this._builder.get_object('timeout_spinbutton').set_sensitive(false); - } - - this._settings.connect('changed::hotkeys-overlay-combo', () => { - if (this._settings.get_string('hotkeys-overlay-combo') !== 'TEMPORARILY') - this._builder.get_object('timeout_spinbutton').set_sensitive(false); - else - this._builder.get_object('timeout_spinbutton').set_sensitive(true); - }); - - this._settings.bind('shortcut-text', - this._builder.get_object('shortcut_entry'), - 'text', - Gio.SettingsBindFlags.DEFAULT); - this._settings.connect('changed::shortcut-text', () => {setShortcut(this._settings, 'shortcut');}); - - // Create dialog for number overlay options - this._builder.get_object('overlay_button').connect('clicked', () => { - let box = this._builder.get_object('box_overlay_shortcut'); - - let dialog = this._createPreferencesDialog(_('Advanced hotkeys options'), box, () => - { - // restore default settings for the relevant keys - let keys = ['hotkey-prefix-text', 'shortcut-text', 'hotkeys-overlay-combo', 'overlay-timeout', 'shortcut-previews']; - keys.forEach(function(val) { - this._settings.set_value(val, this._settings.get_default_value(val)); - }, this); - }); - - dialog.show(); - dialog.set_default_size(600, 1); - - }); - - // setup dialog for secondary menu options - this._builder.get_object('secondarymenu_options_button').connect('clicked', () => { - let box = this._builder.get_object('box_secondarymenu_options'); - - let dialog = this._createPreferencesDialog(_('Secondary Menu Options'), box, () => - { - // restore default settings - this._settings.set_value('secondarymenu-contains-appmenu', this._settings.get_default_value('secondarymenu-contains-appmenu')); - this._settings.set_value('secondarymenu-contains-showdetails', this._settings.get_default_value('secondarymenu-contains-showdetails')); - }); - - // TODO setting secondarymenu-contains-appmenu is not being used anywhere - this._settings.bind('secondarymenu-contains-appmenu', - this._builder.get_object('secondarymenu_appmenu_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('secondarymenu-contains-showdetails', - this._builder.get_object('secondarymenu_showdetails_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - dialog.show(); - dialog.set_default_size(480, 1); - - }); - - // setup dialog for advanced options - this._builder.get_object('button_advanced_options').connect('clicked', () => { - let box = this._builder.get_object('box_advanced_options'); - - let dialog = this._createPreferencesDialog(_('Advanced Options'), box); - - dialog.show(); - dialog.set_default_size(480, 1); - - }); - - // Fine-tune panel - - let sizeScales = [ - {objectName: 'tray_size_scale', valueName: 'tray-size', range: DEFAULT_FONT_SIZES }, - {objectName: 'leftbox_size_scale', valueName: 'leftbox-size', range: DEFAULT_FONT_SIZES }, - {objectName: 'appicon_margin_scale', valueName: 'appicon-margin', range: DEFAULT_MARGIN_SIZES }, - {objectName: 'appicon_padding_scale', valueName: 'appicon-padding', range: DEFAULT_MARGIN_SIZES }, - {objectName: 'tray_padding_scale', valueName: 'tray-padding', range: DEFAULT_PADDING_SIZES }, - {objectName: 'leftbox_padding_scale', valueName: 'leftbox-padding', range: DEFAULT_PADDING_SIZES }, - {objectName: 'statusicon_padding_scale', valueName: 'status-icon-padding', range: DEFAULT_PADDING_SIZES }, - {objectName: 'panel_length_scale', valueName: '', range: LENGTH_MARKS } - ]; - - for(const idx in sizeScales) { - let size_scale = this._builder.get_object(sizeScales[idx].objectName); - let range = sizeScales[idx].range; - size_scale.set_range(range[range.length - 1], range[0]); - let value; - if (sizeScales[idx].objectName === 'panel_length_scale') { - value = PanelSettings.getPanelLength(this._settings, this._currentMonitorIndex); - } else { - value = this._settings.get_int(sizeScales[idx].valueName); - } - size_scale.set_value(value); - // Add marks from range arrays, omitting the first and last values. - range.slice(1, -1).forEach(function(val) { - size_scale.add_mark(val, Gtk.PositionType.TOP, val.toString()); - }); - - // Corrent for rtl languages - if (this._rtl) { - // Flip value position: this is not done automatically - size_scale.set_value_pos(Gtk.PositionType.LEFT); - // I suppose due to a bug, having a more than one mark and one above a value of 100 - // makes the rendering of the marks wrong in rtl. This doesn't happen setting the scale as not flippable - // and then manually inverting it - size_scale.set_flippable(false); - size_scale.set_inverted(true); - } - } - - this._settings.bind('animate-app-switch', - this._builder.get_object('animate_app_switch_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('animate-window-launch', - this._builder.get_object('animate_window_launch_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('animate-appicon-hover', - this._builder.get_object('animate_appicon_hover_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('animate-appicon-hover', - this._builder.get_object('animate_appicon_hover_button'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - - { - this._settings.bind('animate-appicon-hover-animation-type', - this._builder.get_object('animate_appicon_hover_options_type_combo'), - 'active-id', - Gio.SettingsBindFlags.DEFAULT); - - let scales = [ - ['animate_appicon_hover_options_duration_scale', 'animate-appicon-hover-animation-duration', 1], - ['animate_appicon_hover_options_rotation_scale', 'animate-appicon-hover-animation-rotation', 1], - ['animate_appicon_hover_options_travel_scale', 'animate-appicon-hover-animation-travel', 100], - ['animate_appicon_hover_options_zoom_scale', 'animate-appicon-hover-animation-zoom', 100], - ['animate_appicon_hover_options_convexity_scale', 'animate-appicon-hover-animation-convexity', 1], - ['animate_appicon_hover_options_extent_scale', 'animate-appicon-hover-animation-extent', 1], - ]; - - let updateScale = scale => { - let [id, key, factor] = scale; - let type = this._settings.get_string('animate-appicon-hover-animation-type'); - let value = this._settings.get_value(key).deep_unpack()[type]; - let defaultValue = this._settings.get_default_value(key).deep_unpack()[type]; - this._builder.get_object(id).sensitive = defaultValue !== undefined; - this._builder.get_object(id).set_value(value * factor || 0); - this._builder.get_object(id).clear_marks(); - this._builder.get_object(id).add_mark(defaultValue * factor, Gtk.PositionType.TOP, - defaultValue !== undefined ? (defaultValue * factor).toString() : ' '); - }; - - scales.forEach(scale => { - let [id, key, factor] = scale; - this._settings.connect('changed::' + key, () => updateScale(scale)); - this._builder.get_object(id).connect('value-changed', widget => { - let type = this._settings.get_string('animate-appicon-hover-animation-type'); - let variant = this._settings.get_value(key); - let unpacked = variant.deep_unpack(); - if (unpacked[type] != widget.get_value() / factor) { - unpacked[type] = widget.get_value() / factor; - this._settings.set_value(key, new GLib.Variant(variant.get_type_string(), unpacked)); - } - }); - }); - - this._settings.connect('changed::animate-appicon-hover-animation-type', () => scales.forEach(updateScale)); - scales.forEach(updateScale); - } - - this._builder.get_object('animate_appicon_hover_button').connect('clicked', () => { - let box = this._builder.get_object('animate_appicon_hover_options'); - - let dialog = this._createPreferencesDialog(_('App icon animation options'), box, () => - { - // restore default settings - this._settings.set_value('animate-appicon-hover-animation-type', this._settings.get_default_value('animate-appicon-hover-animation-type')); - this._settings.set_value('animate-appicon-hover-animation-duration', this._settings.get_default_value('animate-appicon-hover-animation-duration')); - this._settings.set_value('animate-appicon-hover-animation-rotation', this._settings.get_default_value('animate-appicon-hover-animation-rotation')); - this._settings.set_value('animate-appicon-hover-animation-travel', this._settings.get_default_value('animate-appicon-hover-animation-travel')); - this._settings.set_value('animate-appicon-hover-animation-zoom', this._settings.get_default_value('animate-appicon-hover-animation-zoom')); - this._settings.set_value('animate-appicon-hover-animation-convexity', this._settings.get_default_value('animate-appicon-hover-animation-convexity')); - this._settings.set_value('animate-appicon-hover-animation-extent', this._settings.get_default_value('animate-appicon-hover-animation-extent')); - }); - - dialog.show(); - - }); - - this._settings.bind('stockgs-keep-dash', - this._builder.get_object('stockgs_dash_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('stockgs-keep-top-panel', - this._builder.get_object('stockgs_top_panel_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - - - this._settings.connect('changed::stockgs-keep-top-panel', () => this._maybeDisableTopPosition()); - - this._maybeDisableTopPosition(); - - this._settings.bind('stockgs-panelbtn-click-only', - this._builder.get_object('stockgs_panelbtn_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - this._settings.bind('stockgs-force-hotcorner', - this._builder.get_object('stockgs_hotcorner_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - - // About Panel - - this._builder.get_object('extension_version').set_label(this._metadata.version.toString() + (this._metadata.commit ? ' (' + this._metadata.commit + ')' : '')); - - this._builder.get_object('importexport_export_button').connect('clicked', widget => { - this._showFileChooser( - _('Export settings'), - { action: Gtk.FileChooserAction.SAVE }, - "Save", - filename => { - let file = Gio.file_new_for_path(filename); - let raw = file.replace(null, false, Gio.FileCreateFlags.NONE, null); - let out = Gio.BufferedOutputStream.new_sized(raw, 4096); - - out.write_all(GLib.spawn_command_line_sync('dconf dump ' + SCHEMA_PATH)[1], null); - out.close(null); - } - ); - }); - - this._builder.get_object('importexport_import_button').connect('clicked', widget => { - this._showFileChooser( - _('Import settings'), - { action: Gtk.FileChooserAction.OPEN }, - "Open", - filename => { - if (filename && GLib.file_test(filename, GLib.FileTest.EXISTS)) { - let settingsFile = Gio.File.new_for_path(filename); - let [ , pid, stdin, stdout, stderr] = - GLib.spawn_async_with_pipes( - null, - ['dconf', 'load', SCHEMA_PATH], - null, - GLib.SpawnFlags.SEARCH_PATH | GLib.SpawnFlags.DO_NOT_REAP_CHILD, - null - ); - - stdin = new Gio.UnixOutputStream({ fd: stdin, close_fd: true }); - GLib.close(stdout); - GLib.close(stderr); - - stdin.splice(settingsFile.read(null), Gio.OutputStreamSpliceFlags.CLOSE_SOURCE | Gio.OutputStreamSpliceFlags.CLOSE_TARGET, null); - } - } - ); - }); - - } - - _setPreviewTitlePosition() { - switch (this._settings.get_string('window-preview-title-position')) { - case 'BOTTOM': - this._builder.get_object('preview_title_position_bottom_button').set_active(true); - break; - case 'TOP': - this._builder.get_object('preview_title_position_top_button').set_active(true); - break; - } - } - - _showFileChooser(title, params, acceptBtn, acceptHandler) { - let dialog = new Gtk.FileChooserDialog(mergeObjects({ title: title, transient_for: this.notebook.get_root() }, params)); - - dialog.add_button("Cancel", Gtk.ResponseType.CANCEL); - dialog.add_button(acceptBtn, Gtk.ResponseType.ACCEPT); - - dialog.show(); - - dialog.connect('response', (dialog, id) => { - if (id == Gtk.ResponseType.ACCEPT) - acceptHandler.call(this, dialog.get_file().get_path()); - - dialog.destroy(); - }); - } -} - - -const BuilderScope = GObject.registerClass({ - Implements: [Gtk.BuilderScope], -}, class BuilderScope extends GObject.Object { - - _init(preferences) { - this._preferences = preferences; - super._init(); - } - - vfunc_create_closure(builder, handlerName, flags, connectObject) { - if (flags & Gtk.BuilderClosureFlags.SWAPPED) - throw new Error('Unsupported template signal flag "swapped"'); - - if (typeof this[handlerName] === 'undefined') - throw new Error(`${handlerName} is undefined`); - - return this[handlerName].bind(connectObject || this); - } - - on_btn_click(connectObject) { - connectObject.set_label("Clicked"); - } - - position_bottom_button_clicked_cb(button) { - if (!this._preferences._ignorePositionRadios && button.get_active()) this._preferences._setPanelPosition(Pos.BOTTOM); - } - - position_top_button_clicked_cb(button) { - if (!this._preferences._ignorePositionRadios && button.get_active()) this._preferences._setPanelPosition(Pos.TOP); - } - - position_left_button_clicked_cb(button) { - if (!this._preferences._ignorePositionRadios && button.get_active()) this._preferences._setPanelPosition(Pos.LEFT); - } - - position_right_button_clicked_cb(button) { - if (!this._preferences._ignorePositionRadios && button.get_active()) this._preferences._setPanelPosition(Pos.RIGHT); - } - - dots_bottom_button_toggled_cb(button) { - if (button.get_active()) - this._preferences._settings.set_string('dot-position', "BOTTOM"); - } - - dots_top_button_toggled_cb(button) { - if (button.get_active()) - this._preferences._settings.set_string('dot-position', "TOP"); - } - - dots_left_button_toggled_cb(button) { - if (button.get_active()) - this._preferences._settings.set_string('dot-position', "LEFT"); - } - - dots_right_button_toggled_cb(button) { - if (button.get_active()) - this._preferences._settings.set_string('dot-position', "RIGHT"); - } - - preview_title_position_bottom_button_toggled_cb(button) { - if (button.get_active()) - this._preferences._settings.set_string('window-preview-title-position', 'BOTTOM'); - } - - preview_title_position_top_button_toggled_cb(button) { - if (button.get_active()) - this._preferences._settings.set_string('window-preview-title-position', 'TOP'); - } - - panel_size_scale_value_changed_cb(scale) { - // Avoid settings the size continuously - if (this._preferences._panel_size_timeout > 0) - GLib.Source.remove(this._preferences._panel_size_timeout); - - this._preferences._panel_size_timeout = GLib.timeout_add(GLib.PRIORITY_DEFAULT, SCALE_UPDATE_TIMEOUT, () => { - const value = scale.get_value(); - const monitorSync = this._preferences._settings.get_boolean('panel-element-positions-monitors-sync'); - const monitorsToSetFor = monitorSync ? this._preferences.monitors : [this._preferences._currentMonitorIndex]; - monitorsToSetFor.forEach(monitorIndex => { - PanelSettings.setPanelSize(this._preferences._settings, monitorIndex, value); - }); - - this._preferences._panel_size_timeout = 0; - return GLib.SOURCE_REMOVE; - }); - } - - tray_size_scale_value_changed_cb(scale) { - // Avoid settings the size consinuosly - if (this._preferences._tray_size_timeout > 0) - GLib.Source.remove(this._preferences._tray_size_timeout); - - this._preferences._tray_size_timeout = GLib.timeout_add(GLib.PRIORITY_DEFAULT, SCALE_UPDATE_TIMEOUT, () => { - this._preferences._settings.set_int('tray-size', scale.get_value()); - this._preferences._tray_size_timeout = 0; - return GLib.SOURCE_REMOVE; - }); - } - - leftbox_size_scale_value_changed_cb(scale) { - // Avoid settings the size consinuosly - if (this._preferences._leftbox_size_timeout > 0) - GLib.Source.remove(this._preferences._leftbox_size_timeout); - - this._preferences._leftbox_size_timeout = GLib.timeout_add(GLib.PRIORITY_DEFAULT, SCALE_UPDATE_TIMEOUT, () => { - this._preferences._settings.set_int('leftbox-size', scale.get_value()); - this._preferences._leftbox_size_timeout = 0; - return GLib.SOURCE_REMOVE; - }); - } - - appicon_margin_scale_value_changed_cb(scale) { - // Avoid settings the size consinuosly - if (this._preferences._appicon_margin_timeout > 0) - GLib.Source.remove(this._preferences._appicon_margin_timeout); - - this._preferences._appicon_margin_timeout = GLib.timeout_add(GLib.PRIORITY_DEFAULT, SCALE_UPDATE_TIMEOUT, () => { - this._preferences._settings.set_int('appicon-margin', scale.get_value()); - this._preferences._appicon_margin_timeout = 0; - return GLib.SOURCE_REMOVE; - }); - } - - appicon_padding_scale_value_changed_cb(scale) { - // Avoid settings the size consinuosly - if (this._preferences._appicon_padding_timeout > 0) - GLib.Source.remove(this._preferences._appicon_padding_timeout); - - this._preferences._appicon_padding_timeout = GLib.timeout_add(GLib.PRIORITY_DEFAULT, SCALE_UPDATE_TIMEOUT, () => { - this._preferences._settings.set_int('appicon-padding', scale.get_value()); - this._preferences._appicon_padding_timeout = 0; - return GLib.SOURCE_REMOVE; - }); - } - - tray_padding_scale_value_changed_cb(scale) { - // Avoid settings the size consinuosly - if (this._preferences._tray_padding_timeout > 0) - GLib.Source.remove(this._preferences._tray_padding_timeout); - - this._preferences._tray_padding_timeout = GLib.timeout_add(GLib.PRIORITY_DEFAULT, SCALE_UPDATE_TIMEOUT, () => { - this._preferences._settings.set_int('tray-padding', scale.get_value()); - this._preferences._tray_padding_timeout = 0; - return GLib.SOURCE_REMOVE; - }); - } - - statusicon_padding_scale_value_changed_cb(scale) { - // Avoid settings the size consinuosly - if (this._preferences._statusicon_padding_timeout > 0) - GLib.Source.remove(this._preferences._statusicon_padding_timeout); - - this._preferences._statusicon_padding_timeout = GLib.timeout_add(GLib.PRIORITY_DEFAULT, SCALE_UPDATE_TIMEOUT, () => { - this._preferences._settings.set_int('status-icon-padding', scale.get_value()); - this._preferences._statusicon_padding_timeout = 0; - return GLib.SOURCE_REMOVE; - }); - } - - leftbox_padding_scale_value_changed_cb(scale) { - // Avoid settings the size consinuosly - if (this._preferences._leftbox_padding_timeout > 0) - GLib.Source.remove(this._preferences._leftbox_padding_timeout); - - this._preferences._leftbox_padding_timeout = GLib.timeout_add(GLib.PRIORITY_DEFAULT, SCALE_UPDATE_TIMEOUT, () => { - this._preferences._settings.set_int('leftbox-padding', scale.get_value()); - this._preferences._leftbox_padding_timeout = 0; - return GLib.SOURCE_REMOVE; - }); - } -}); - - -export default class DashToPanelPreferences extends ExtensionPreferences { - fillPreferencesWindow(window) { - window._settings = this.getSettings('org.gnome.shell.extensions.dash-to-panel'); - - // use default width or window - window.set_default_size(0, 740); - - let preferences = new Preferences(window, window._settings, this.path); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/private_metadata.json b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/private_metadata.json deleted file mode 100644 index 913101cd..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/private_metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "_generated": "Generated by SweetTooth, do not edit", - "description": "An icon taskbar for the Gnome Shell. This extension moves the dash into the gnome main panel so that the application launchers and system tray are combined into a single panel, similar to that found in KDE Plasma and Windows 7+. A separate dock is no longer needed for easy access to running and favorited applications.\n\nFor a more traditional experience, you may also want to use Tweak Tool to enable Windows > Titlebar Buttons > Minimize & Maximize.\n\nFor the best support, please report any issues on Github. Dash-to-panel is developed and maintained by @jderose9 and @charlesg99.", - "donations": { - "paypal": "charlesg99" - }, - "extension-id": "dash-to-panel", - "gettext-domain": "dash-to-panel", - "name": "Dash to Panel", - "shell-version": [ - "46", - "47" - ], - "url": "https://github.com/home-sweet-gnome/dash-to-panel", - "uuid": "dash-to-panel@jderose9.github.com", - "version": 63 -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/progress.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/progress.js deleted file mode 100644 index 48105ab9..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/progress.js +++ /dev/null @@ -1,597 +0,0 @@ -/* - * This file is part of the Dash-To-Panel extension for Gnome 3 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * - * Credits: - * This file is based on code from the Dash to Dock extension by micheleg - */ - -import Cairo from 'cairo'; -import Gio from 'gi://Gio'; -import Clutter from 'gi://Clutter'; -import Pango from 'gi://Pango'; -import St from 'gi://St'; -import * as Utils from './utils.js'; -import {SETTINGS} from './extension.js'; - -import {EventEmitter} from 'resource:///org/gnome/shell/misc/signals.js'; - - -export const ProgressManager = class extends EventEmitter { - - constructor() { - super(); - - this._entriesByDBusName = {}; - - this._launcher_entry_dbus_signal_id = - Gio.DBus.session.signal_subscribe(null, // sender - 'com.canonical.Unity.LauncherEntry', // iface - null, // member - null, // path - null, // arg0 - Gio.DBusSignalFlags.NONE, - this._onEntrySignalReceived.bind(this)); - - this._dbus_name_owner_changed_signal_id = - Gio.DBus.session.signal_subscribe('org.freedesktop.DBus', // sender - 'org.freedesktop.DBus', // interface - 'NameOwnerChanged', // member - '/org/freedesktop/DBus', // path - null, // arg0 - Gio.DBusSignalFlags.NONE, - this._onDBusNameOwnerChanged.bind(this)); - - this._acquireUnityDBus(); - } - - destroy() { - if (this._launcher_entry_dbus_signal_id) { - Gio.DBus.session.signal_unsubscribe(this._launcher_entry_dbus_signal_id); - } - - if (this._dbus_name_owner_changed_signal_id) { - Gio.DBus.session.signal_unsubscribe(this._dbus_name_owner_changed_signal_id); - } - - this._releaseUnityDBus(); - } - - size() { - return Object.keys(this._entriesByDBusName).length; - } - - lookupByDBusName(dbusName) { - return this._entriesByDBusName.hasOwnProperty(dbusName) ? this._entriesByDBusName[dbusName] : null; - } - - lookupById(appId) { - let ret = []; - for (let dbusName in this._entriesByDBusName) { - let entry = this._entriesByDBusName[dbusName]; - if (entry && entry.appId() == appId) { - ret.push(entry); - } - } - - return ret; - } - - addEntry(entry) { - let existingEntry = this.lookupByDBusName(entry.dbusName()); - if (existingEntry) { - existingEntry.update(entry); - } else { - this._entriesByDBusName[entry.dbusName()] = entry; - this.emit('progress-entry-added', entry); - } - } - - removeEntry(entry) { - delete this._entriesByDBusName[entry.dbusName()] - this.emit('progress-entry-removed', entry); - } - - _acquireUnityDBus() { - if (!this._unity_bus_id) { - Gio.DBus.session.own_name('com.canonical.Unity', - Gio.BusNameOwnerFlags.ALLOW_REPLACEMENT, null, null); - } - } - - _releaseUnityDBus() { - if (this._unity_bus_id) { - Gio.DBus.session.unown_name(this._unity_bus_id); - this._unity_bus_id = 0; - } - } - - _onEntrySignalReceived(connection, sender_name, object_path, - interface_name, signal_name, parameters, user_data) { - if (!parameters || !signal_name) - return; - - if (signal_name == 'Update') { - if (!sender_name) { - return; - } - - this._handleUpdateRequest(sender_name, parameters); - } - } - - _onDBusNameOwnerChanged(connection, sender_name, object_path, - interface_name, signal_name, parameters, user_data) { - if (!parameters || !this.size()) - return; - - let [name, before, after] = parameters.deep_unpack(); - - if (!after) { - if (this._entriesByDBusName.hasOwnProperty(before)) { - this.removeEntry(this._entriesByDBusName[before]); - } - } - } - - _handleUpdateRequest(senderName, parameters) { - if (!senderName || !parameters) { - return; - } - - let [appUri, properties] = parameters.deep_unpack(); - let appId = appUri.replace(/(^\w+:|^)\/\//, ''); - let entry = this.lookupByDBusName(senderName); - - if (entry) { - entry.setDBusName(senderName); - entry.update(properties); - } else { - let entry = new AppProgress(senderName, appId, properties); - this.addEntry(entry); - } - } -}; - -export class AppProgress extends EventEmitter { - - constructor(dbusName, appId, properties) { - super(); - - this._dbusName = dbusName; - this._appId = appId; - this._count = 0; - this._countVisible = false; - this._progress = 0.0; - this._progressVisible = false; - this._urgent = false; - this.update(properties); - } - - appId() { - return this._appId; - } - - dbusName() { - return this._dbusName; - } - - count() { - return this._count; - } - - setCount(count) { - if (this._count != count) { - this._count = count; - this.emit('count-changed', this._count); - } - } - - countVisible() { - return this._countVisible; - } - - setCountVisible(countVisible) { - if (this._countVisible != countVisible) { - this._countVisible = countVisible; - this.emit('count-visible-changed', this._countVisible); - } - } - - progress() { - return this._progress; - } - - setProgress(progress) { - if (this._progress != progress) { - this._progress = progress; - this.emit('progress-changed', this._progress); - } - } - - progressVisible() { - return this._progressVisible; - } - - setProgressVisible(progressVisible) { - if (this._progressVisible != progressVisible) { - this._progressVisible = progressVisible; - this.emit('progress-visible-changed', this._progressVisible); - } - } - - urgent() { - return this._urgent; - } - - setUrgent(urgent) { - if (this._urgent != urgent) { - this._urgent = urgent; - this.emit('urgent-changed', this._urgent); - } - } - - setDBusName(dbusName) { - if (this._dbusName != dbusName) { - let oldName = this._dbusName; - this._dbusName = dbusName; - this.emit('dbus-name-changed', oldName); - } - } - - update(other) { - if (other instanceof AppProgress) { - this.setDBusName(other.dbusName()) - this.setCount(other.count()); - this.setCountVisible(other.countVisible()); - this.setProgress(other.progress()); - this.setProgressVisible(other.progressVisible()) - this.setUrgent(other.urgent()); - } else { - for (let property in other) { - if (other.hasOwnProperty(property)) { - if (property == 'count') { - this.setCount(other[property].get_int64()); - } else if (property == 'count-visible') { - this.setCountVisible(SETTINGS.get_boolean('progress-show-count') && other[property].get_boolean()); - } else if (property == 'progress') { - this.setProgress(other[property].get_double()); - } else if (property == 'progress-visible') { - this.setProgressVisible(SETTINGS.get_boolean('progress-show-bar') && other[property].get_boolean()); - } else if (property == 'urgent') { - this.setUrgent(other[property].get_boolean()); - } else { - // Not implemented yet - } - } - } - } - } -} - - -export const ProgressIndicator = class { - - constructor(source, progressManager) { - this._source = source; - this._progressManager = progressManager; - this._signalsHandler = new Utils.GlobalSignalsHandler(); - - this._sourceDestroyId = this._source.connect('destroy', () => { - this._signalsHandler.destroy(); - }); - - this._notificationBadgeLabel = new St.Label({ style_class: 'badge' }); - this._notificationBadgeBin = new St.Bin({ - child: this._notificationBadgeLabel, y: 2, x: 2 - }); - this._notificationBadgeLabel.add_style_class_name('notification-badge'); - this._notificationBadgeCount = 0; - this._notificationBadgeBin.hide(); - - this._source._dtpIconContainer.add_child(this._notificationBadgeBin); - this._source._dtpIconContainer.connect('notify::allocation', this.updateNotificationBadge.bind(this)); - - this._progressManagerEntries = []; - this._progressManager.lookupById(this._source.app.id).forEach( - (entry) => { - this.insertEntry(entry); - } - ); - - this._signalsHandler.add([ - this._progressManager, - 'progress-entry-added', - this._onEntryAdded.bind(this) - ], [ - this._progressManager, - 'progress-entry-removed', - this._onEntryRemoved.bind(this) - ]); - } - - destroy() { - this._source.disconnect(this._sourceDestroyId); - this._signalsHandler.destroy(); - } - - _onEntryAdded(appProgress, entry) { - if (!entry || !entry.appId()) - return; - if (this._source && this._source.app && this._source.app.id == entry.appId()) { - this.insertEntry(entry); - } - } - - _onEntryRemoved(appProgress, entry) { - if (!entry || !entry.appId()) - return; - - if (this._source && this._source.app && this._source.app.id == entry.appId()) { - this.removeEntry(entry); - } - } - - updateNotificationBadge() { - this._source.updateNumberOverlay(this._notificationBadgeBin); - this._notificationBadgeLabel.clutter_text.ellipsize = Pango.EllipsizeMode.MIDDLE; - } - - _notificationBadgeCountToText(count) { - if (count <= 9999) { - return count.toString(); - } else if (count < 1e5) { - let thousands = count / 1e3; - return thousands.toFixed(1).toString() + "k"; - } else if (count < 1e6) { - let thousands = count / 1e3; - return thousands.toFixed(0).toString() + "k"; - } else if (count < 1e8) { - let millions = count / 1e6; - return millions.toFixed(1).toString() + "M"; - } else if (count < 1e9) { - let millions = count / 1e6; - return millions.toFixed(0).toString() + "M"; - } else { - let billions = count / 1e9; - return billions.toFixed(1).toString() + "B"; - } - } - - setNotificationBadge(count) { - this._notificationBadgeCount = count; - let text = this._notificationBadgeCountToText(count); - this._notificationBadgeLabel.set_text(text); - } - - toggleNotificationBadge(activate) { - if (activate && this._notificationBadgeCount > 0) { - this.updateNotificationBadge(); - this._notificationBadgeBin.show(); - } - else - this._notificationBadgeBin.hide(); - } - - _showProgressOverlay() { - if (this._progressOverlayArea) { - this._updateProgressOverlay(); - return; - } - - this._progressOverlayArea = new St.DrawingArea({x_expand: true, y_expand: true}); - this._progressOverlayArea.add_style_class_name('progress-bar'); - this._progressOverlayArea.connect('repaint', () => { - this._drawProgressOverlay(this._progressOverlayArea); - }); - - this._source._iconContainer.add_child(this._progressOverlayArea); - let node = this._progressOverlayArea.get_theme_node(); - - let [hasColor, color] = node.lookup_color('-progress-bar-background', false); - if (hasColor) - this._progressbar_background = color - else - this._progressbar_background = new Utils.ColorUtils.Color({red: 204, green: 204, blue: 204, alpha: 255}); - - [hasColor, color] = node.lookup_color('-progress-bar-border', false); - if (hasColor) - this._progressbar_border = color; - else - this._progressbar_border = new Utils.ColorUtils.Color({red: 230, green: 230, blue: 230, alpha: 255}); - - this._updateProgressOverlay(); - } - - _hideProgressOverlay() { - if (this._progressOverlayArea) - this._progressOverlayArea.destroy(); - - this._progressOverlayArea = null; - this._progressbar_background = null; - this._progressbar_border = null; - } - - _updateProgressOverlay() { - - if (this._progressOverlayArea) { - this._progressOverlayArea.queue_repaint(); - } - } - - _drawProgressOverlay(area) { - let scaleFactor = Utils.getScaleFactor(); - let [surfaceWidth, surfaceHeight] = area.get_surface_size(); - let cr = area.get_context(); - - let iconSize = this._source.icon.iconSize * scaleFactor; - - let x = Math.floor((surfaceWidth - iconSize) / 2); - let y = Math.floor((surfaceHeight - iconSize) / 2); - - let lineWidth = Math.floor(1.0 * scaleFactor); - let padding = Math.floor(iconSize * 0.05); - let width = iconSize - 2.0*padding; - let height = Math.floor(Math.min(18.0*scaleFactor, 0.20*iconSize)); - x += padding; - y += iconSize - height - padding; - - cr.setLineWidth(lineWidth); - - // Draw the outer stroke - let stroke = new Cairo.LinearGradient(0, y, 0, y + height); - let fill = null; - stroke.addColorStopRGBA(0.5, 0.5, 0.5, 0.5, 0.1); - stroke.addColorStopRGBA(0.9, 0.8, 0.8, 0.8, 0.4); - Utils.drawRoundedLine(cr, x + lineWidth/2.0, y + lineWidth/2.0, width, height, true, true, stroke, fill); - - // Draw the background - x += lineWidth; - y += lineWidth; - width -= 2.0*lineWidth; - height -= 2.0*lineWidth; - - stroke = Cairo.SolidPattern.createRGBA(0.20, 0.20, 0.20, 0.9); - fill = new Cairo.LinearGradient(0, y, 0, y + height); - fill.addColorStopRGBA(0.4, 0.25, 0.25, 0.25, 1.0); - fill.addColorStopRGBA(0.9, 0.35, 0.35, 0.35, 1.0); - Utils.drawRoundedLine(cr, x + lineWidth/2.0, y + lineWidth/2.0, width, height, true, true, stroke, fill); - - // Draw the finished bar - x += lineWidth; - y += lineWidth; - width -= 2.0*lineWidth; - height -= 2.0*lineWidth; - - let finishedWidth = Math.ceil(this._progress * width); - - let bg = this._progressbar_background; - let bd = this._progressbar_border; - - stroke = Cairo.SolidPattern.createRGBA(bd.red/255, bd.green/255, bd.blue/255, bd.alpha/255); - fill = Cairo.SolidPattern.createRGBA(bg.red/255, bg.green/255, bg.blue/255, bg.alpha/255); - - if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL) - Utils.drawRoundedLine(cr, x + lineWidth/2.0 + width - finishedWidth, y + lineWidth/2.0, finishedWidth, height, true, true, stroke, fill); - else - Utils.drawRoundedLine(cr, x + lineWidth/2.0, y + lineWidth/2.0, finishedWidth, height, true, true, stroke, fill); - - cr.$dispose(); - } - - setProgress(progress) { - this._progress = Math.min(Math.max(progress, 0.0), 1.0); - this._updateProgressOverlay(); - } - - toggleProgressOverlay(activate) { - if (activate) { - this._showProgressOverlay(); - } - else { - this._hideProgressOverlay(); - } - } - - insertEntry(appProgress) { - if (!appProgress || this._progressManagerEntries.indexOf(appProgress) !== -1) - return; - - this._progressManagerEntries.push(appProgress); - this._selectEntry(appProgress); - } - - removeEntry(appProgress) { - if (!appProgress || this._progressManagerEntries.indexOf(appProgress) == -1) - return; - - this._progressManagerEntries.splice(this._progressManagerEntries.indexOf(appProgress), 1); - - if (this._progressManagerEntries.length > 0) { - this._selectEntry(this._progressManagerEntries[this._progressManagerEntries.length-1]); - } else { - this.setNotificationBadge(0); - this.toggleNotificationBadge(false); - this.setProgress(0); - this.toggleProgressOverlay(false); - this.setUrgent(false); - } - } - - _selectEntry(appProgress) { - if (!appProgress) - return; - - this._signalsHandler.removeWithLabel('progress-entry'); - - this._signalsHandler.addWithLabel('progress-entry', - [ - appProgress, - 'count-changed', - (appProgress, value) => { - this.setNotificationBadge(value); - } - ], [ - appProgress, - 'count-visible-changed', - (appProgress, value) => { - this.toggleNotificationBadge(value); - } - ], [ - appProgress, - 'progress-changed', - (appProgress, value) => { - this.setProgress(value); - } - ], [ - appProgress, - 'progress-visible-changed', - (appProgress, value) => { - this.toggleProgressOverlay(value); - } - ], [ - appProgress, - 'urgent-changed', - (appProgress, value) => { - this.setUrgent(value) - } - ]); - - this.setNotificationBadge(appProgress.count()); - this.toggleNotificationBadge(appProgress.countVisible()); - this.setProgress(appProgress.progress()); - this.toggleProgressOverlay(appProgress.progressVisible()); - - this._isUrgent = false; - } - - setUrgent(urgent) { - const icon = this._source.icon._iconBin; - if (urgent) { - if (!this._isUrgent) { - icon.set_pivot_point(0.5, 0.5); - this._source.iconAnimator.addAnimation(icon, 'dance'); - this._isUrgent = true; - } - } else { - if (this._isUrgent) { - this._source.iconAnimator.removeAnimation(icon, 'dance'); - this._isUrgent = false; - } - icon.rotation_angle_z = 0; - } - } -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/proximity.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/proximity.js deleted file mode 100644 index eff15483..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/proximity.js +++ /dev/null @@ -1,256 +0,0 @@ -/* - * This file is part of the Dash-To-Panel extension for Gnome 3 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -import Meta from 'gi://Meta'; -import Mtk from 'gi://Mtk'; - -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; - -import * as Utils from './utils.js'; - -//timeout intervals -const MIN_UPDATE_MS = 200; - -//timeout names -const T1 = 'limitUpdateTimeout'; - -export const Mode = { - ALL_WINDOWS: 0, - FOCUSED_WINDOWS: 1, - MAXIMIZED_WINDOWS: 2 -}; - -export class ProximityWatch { - - constructor(actor, monitorIndex, mode, xThreshold, yThreshold, handler) { - this.actor = actor; - this.monitorIndex = monitorIndex - this.overlap = false; - this.mode = mode; - this.threshold = [xThreshold, yThreshold]; - this.handler = handler; - - this._allocationChangedId = actor.connect('notify::allocation', () => this._updateWatchRect()); - - this._updateWatchRect(); - } - - destroy() { - this.actor.disconnect(this._allocationChangedId); - } - - _updateWatchRect() { - let [actorX, actorY] = this.actor.get_position(); - - this.rect = new Mtk.Rectangle({ - x: actorX - this.threshold[0], - y: actorY - this.threshold[1], - width: this.actor.width + this.threshold[0] * 2, - height: this.actor.height + this.threshold[1] * 2 - }); - } -}; - -export const ProximityManager = class { - - constructor() { - this._counter = 1; - this._watches = {}; - this._focusedWindowInfo = null; - - this._signalsHandler = new Utils.GlobalSignalsHandler(); - this._timeoutsHandler = new Utils.TimeoutsHandler(); - - this._bindSignals(); - this._setFocusedWindow(); - } - - createWatch(actor, monitorIndex, mode, xThreshold, yThreshold, handler) { - let watch = new ProximityWatch(actor, monitorIndex, mode, xThreshold, yThreshold, handler); - - this._watches[this._counter] = watch; - this.update(); - - return this._counter++; - } - - removeWatch(id) { - if (this._watches[id]) { - this._watches[id].destroy(); - delete this._watches[id]; - } - } - - update() { - this._queueUpdate(true); - } - - destroy() { - this._signalsHandler.destroy(); - this._timeoutsHandler.destroy(); - this._disconnectFocusedWindow(); - Object.keys(this._watches).forEach(id => this.removeWatch(id)); - } - - _bindSignals() { - this._signalsHandler.add( - [ - global.window_manager, - 'switch-workspace', - () => this._queueUpdate() - ], - [ - Main.overview, - 'hidden', - () => this._queueUpdate() - ], - [ - global.display, - 'notify::focus-window', - () => { - this._setFocusedWindow(); - this._queueUpdate(); - } - ], - [ - global.display, - 'restacked', - () => this._queueUpdate() - ] - ); - } - - _setFocusedWindow() { - this._disconnectFocusedWindow(); - - let focusedWindow = global.display.focus_window; - - if (focusedWindow) { - let focusedWindowInfo = this._getFocusedWindowInfo(focusedWindow); - - if (focusedWindowInfo && this._checkIfHandledWindowType(focusedWindowInfo.metaWindow)) { - focusedWindowInfo.allocationId = focusedWindowInfo.window.connect('notify::allocation', () => this._queueUpdate()); - focusedWindowInfo.destroyId = focusedWindowInfo.window.connect('destroy', () => this._disconnectFocusedWindow(true)); - - this._focusedWindowInfo = focusedWindowInfo; - } - } - } - - _getFocusedWindowInfo(focusedWindow) { - let window = focusedWindow.get_compositor_private(); - let focusedWindowInfo; - - if (window) { - focusedWindowInfo = { window: window }; - focusedWindowInfo.metaWindow = focusedWindow; - - if (focusedWindow.is_attached_dialog()) { - let mainMetaWindow = focusedWindow.get_transient_for(); - - if (focusedWindowInfo.metaWindow.get_frame_rect().height < mainMetaWindow.get_frame_rect().height) { - focusedWindowInfo.window = mainMetaWindow.get_compositor_private(); - focusedWindowInfo.metaWindow = mainMetaWindow; - } - } - } - - return focusedWindowInfo; - } - - _disconnectFocusedWindow(destroy) { - if (this._focusedWindowInfo && !destroy) { - this._focusedWindowInfo.window.disconnect(this._focusedWindowInfo.allocationId); - this._focusedWindowInfo.window.disconnect(this._focusedWindowInfo.destroyId); - } - - this._focusedWindowInfo = null; - } - - _getHandledWindows() { - return Utils.getCurrentWorkspace() - .list_windows() - .filter(mw => this._checkIfHandledWindow(mw)); - } - - _checkIfHandledWindow(metaWindow) { - return metaWindow && - !metaWindow.minimized && - !metaWindow.customJS_ding && - this._checkIfHandledWindowType(metaWindow); - } - - _checkIfHandledWindowType(metaWindow) { - let metaWindowType = metaWindow.get_window_type(); - - //https://www.roojs.org/seed/gir-1.2-gtk-3.0/seed/Meta.WindowType.html - return metaWindowType <= Meta.WindowType.SPLASHSCREEN && - metaWindowType != Meta.WindowType.DESKTOP; - } - - _queueUpdate(noDelay) { - if (!noDelay && this._timeoutsHandler.getId(T1)) { - //limit the number of updates - this._pendingUpdate = true; - return; - } - - this._timeoutsHandler.add([T1, MIN_UPDATE_MS, () => this._endLimitUpdate()]); - - let metaWindows = this._getHandledWindows(); - - Object.keys(this._watches).forEach(id => { - let watch = this._watches[id]; - let overlap = !!this._update(watch, metaWindows); - - if (overlap !== watch.overlap) { - watch.handler(overlap); - watch.overlap = overlap; - } - }); - } - - _endLimitUpdate() { - if (this._pendingUpdate) { - this._pendingUpdate = false; - this._queueUpdate(); - } - } - - _update(watch, metaWindows) { - if (watch.mode === Mode.FOCUSED_WINDOWS) - return (this._focusedWindowInfo && - this._checkIfHandledWindow(this._focusedWindowInfo.metaWindow) && - this._checkProximity(this._focusedWindowInfo.metaWindow, watch)); - - if (watch.mode === Mode.MAXIMIZED_WINDOWS) - return metaWindows.some(mw => mw.maximized_vertically && mw.maximized_horizontally && - mw.get_monitor() == watch.monitorIndex); - - //Mode.ALL_WINDOWS - return metaWindows.some(mw => this._checkProximity(mw, watch)); - } - - _checkProximity(metaWindow, watch) { - let windowRect = metaWindow.get_frame_rect(); - - return windowRect.overlap(watch.rect) && - ((!watch.threshold[0] && !watch.threshold[1]) || - metaWindow.get_monitor() == watch.monitorIndex || - windowRect.overlap(global.display.get_monitor_geometry(watch.monitorIndex))); - } -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/schemas/gschemas.compiled b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/schemas/gschemas.compiled deleted file mode 100644 index 4aad826e..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/schemas/gschemas.compiled and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml deleted file mode 100644 index a73a349a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml +++ /dev/null @@ -1,1282 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 'BOTTOM' - Panel position (Deprecated) - Panel is shown on the Bottom or Top of the screen. - - - true - Sync element positions - Sync panel element positions on all monitors. - - - '{}' - Panel positions - Panel positions (JSON). - - - '{}' - Panel element positions - Panel element positions (JSON). - - - '{}' - Percentages of screen edge for panel to span - Length of the panels, in percent (JSON). - - - '{}' - Positions along screen edge - Where to show the panels if it is not the full length of the screen edge (JSON). - - - '{}' - Panel sizes - Sizes of panels, in pixels. - - - 48 - Panel size (Deprecated) - Set the size of the panel. - - - false - Override Show Desktop line color - Replace current Show Desktop button line color - - - "rgba(200,200,200,0.2)" - Custom Show Desktop line color - Custom Show Desktop button line color - - - 'BOTTOM' - Dot position - Running indicators are shown on the Bottom or Top of the screen. - - - 'NORMAL' - Style of Appicons - Style of Appicons - - - 'METRO' - Style of the running indicator (focused) - Style of the running indicator for the icon for the currently focused application - - - 'METRO' - Style of the running indicator (unfocused) - Style of the running indicator for the icon for applications which are not currently focused - - - false - Running indicator dominant color - Whether to use the app icon's dominant color for .app-well-running-dot - - - false - Running indicator color override - Whether to override the theme background color for .app-well-running-dot - - - "#5294e2" - Color of running indicator (1 window) - Customize the color of the running indicator when one window is running for that application - - - "#5294e2" - Color of running indicator (2 windows) - Customize the color of the running indicator when two windows are running for that application - - - "#5294e2" - Color of running indicator (3 windows) - Customize the color of the running indicator when three windows are running for that application - - - "#5294e2" - Color of running indicator (4+ windows) - Customize the color of the running indicator when four or more windows are running for that application - - - false - Unfocused color is different than focused - Whether to apply a 2nd color scheme to the indicator when the app is not focused - - - "#5294e2" - Color of unfocused running indicator (1 window) - Customize the color of the unfocused running indicator when one window is running for that application - - - "#5294e2" - Color of unfocused running indicator (2 windows) - Customize the color of the unfocused running indicator when two windows are running for that application - - - "#5294e2" - Color of unfocused running indicator (3 windows) - Customize the color of the unfocused running indicator when three windows are running for that application - - - "#5294e2" - Color of unfocused running indicator (4+ windows) - Customize the color of the unfocused running indicator when four or more windows are running for that application - - - 3 - Running indicator height - Height of the running indicator line/diameter of window indicator dots - - - true - Highlight icon of focused application - Whether to highlight the background of the currently focused application's icon - - - false - Highlight icon dominant color - Base the active window highlight color on that application's icon - - - "#EEEEEE" - Color of highlight of focused application - Customize the color of the highlight of the focused application - - - 25 - Opacity of highlight of focused application - Customize the opacity of the highlight of the focused application - - - false - Keep dash - Whether to keep the stock gnome-shell dash while in overview - - - false - Keep top panel - Whether to keep the stock gnome-shell top panel - - - false - Panel menu buttons require click - Whether to activate the panel menu buttons on hover or on click - - - false - Force hot corner - Wheter to force having an Activities hot corner on the primary monitor - - - false - Lock the taskbar - Specifies if the user can modify the taskbar - - - false - Override theme background color - Replace current theme background color for the panel - - - "#000" - Custom background color - Custom background color for the panel - - - false - Custom background color - Replace current theme background color for the panel - - - false - Dynamic opacity - Enable dynamic opacity - - - 0.4 - Panel opacity - Custom opacity for the panel - - - 'ALL_WINDOWS' - Dynamic opacity behavior - Dictates which window type affects the panel opacity - - - 20 - Distance to change opacity - The distance a window needs to be from the panel to change opacity - - - 0.8 - Modified panel opacity - Modified opacity for the panel when a window is near - - - 300 - Opacity change duration - The duration of the animation when the opacity changes - - - false - Custom gradient - Replace current theme gradient for the panel - - - "#000" - Custom gradient top color - Custom gradient top color for the panel - - - 0 - Custom gradient top opacity - Custom gradient top opacity for the panel - - - "#000" - Custom gradient bottom color - Custom gradient bottom color for the panel - - - 0.2 - Custom gradient bottom opacity - Custom gradient bottom opacity for the panel - - - false - Intellihide - Whether to intelligently hide the panel - - - false - Only hide from windows - Dictates if the dash should only hide when in conflict with windows - - - 'FOCUSED_WINDOWS' - Intellihide behaviour - Dictates how to intelligently hide the panel - - - false - Intellihide pressure - To reveal the panel, pressure needs to be applied to the edege of the screen - - - 100 - Intellihide pressure threshold - The pressure needed to reveal the panel - - - 1000 - Intellihide pressure time - The numer of milliseconds that the pressure needs to be applied to reveal the panel - - - false - Intellihide pressure - Allow the panel to be revealed while an application is in fullscreen mode - - - false - Intellihide only secondary - Whether to only hide secondary panels - - - 200 - Intellihide animation time - The animation time (ms) to hide and reveal the panel - - - 400 - Intellihide close delay - The delay (ms) before hiding the panel - - - "<Super>i" - Keybinding toggle intellihide - Keybinding to reveal the panel while in intellihide mode - - - i']]]> - Keybinding toggle intellihide - Keybinding to reveal the panel while in intellihide mode - - - 2000 - Intellihide enable start delay - The delay before enabling intellihide on start - - - "" - Custom Show Applications icon - Customize the Show Applications icon - - - 8 - Show Applications icon side padding - Customize the Show Applications icon side padding - - - true - Override escape key - Override the escape key to return to the desktop when entering the overview using the Show Applications button - - - [] - Show Apps button context menu commands - Commands to add to the Show Apps button right click menu - - - [] - Show Apps button context menu titles - Titles for commands added to Show Apps button right click menu - - - [] - Panel context menu commands - Commands to add to the panel right click menu - - - [] - Panel context menu titles - Titles for commands added to panel right click menu - - - false - Show activities button - Show activities button on the left hand side of the taskbar - - - 8 - Width of show Desktop button - Customize the width of the show Desktop button - - - false - Show desktop on hover - Show the desktop on mouse hover - - - 1000 - Delay show desktop - Delay before showing the desktop - - - 300 - Show desktop animation time - Window fade animation time when showing the destop - - - true - Show window preview - Show preview of running window on hover of app icon - - - true - Show tooltip - Show tooltip on hover of app icon - - - true - Show running apps - Show or hide running application icons in the dash - - - true - Show favorites apps - Show or hide favorite application icons in the dash - - - 400 - Icon enter display time - Amount of time after entering icon to wait before displaying window preview if icon is not clicked or mouse has not left. - - - true - Enable peek mode - Peek a window upon hover for some time - - - true - Display title in preview - Display window title in preview - - - false - Window previews manual styling - This defines if the default window previews styling should be applied - - - 'TOP' - Title position - Position of the window title, close button and icon in preview. - - - "#dddddd" - Window previews title font color - This defines the window preview titles font color. - - - 14 - Window previews title font size - This defines the window preview titles font size. - - - false - Window previews use custom icon size - Window previews use custom application icon size. - - - 16 - Window previews custom icon size - Window previews custom application icon size. - - - 260 - Window previews animation time - This defines the window previews animation time. - - - 'inherit' - Font weight of window preview titles - This defines the font weight of window preview titles. Supported values: inherit (from theme), normal, lighter, bold and bolder. - - - 240 - Window previews size - Preferred window previews size - - - false - Fixed aspect ratio X - This defines if the window previews use a fixed aspect ratio X. - - - true - Fixed aspect ratio Y - This defines if the window previews use a fixed aspect ratio Y. - - - 8 - Window previews padding - The padding of the window previews - - - 16 - Aspect ratio X - The window previews respected aspect ratio X. - - - 9 - Aspect ratio Y - The window previews respected aspect ratio Y. - - - false - Immediate hide on icon click - The window previews immediately hide when an application icon is clicked. - - - false - Provide workspace isolation - Dash shows only windows from the current workspace - - - false - Close overview by clicking in empty space - Close overview or app grid by clicking in empty space - - - false - Hide overview on startup - Hide overview on startup, which would be shown by default at gnome startup. - - - true - Group applications - Dash groups the application instances under the same icon - - - 14 - Application title font size - When the applications are ungrouped, this defines the application titles font size. - - - 'inherit' - Font weight of application titles - When the applications are ungrouped, this defines font weight of application titles. Supported values: inherit (from theme), normal, lighter, bold and bolder. - - - "#dddddd" - Application title font color - When the applications are ungrouped, this defines the application titles font color. - - - "#dddddd" - Minimized application title font color - When the applications are ungrouped, this defines the titles font color for minimized applications. - - - 160 - Application title max width - When the applications are ungrouped, this defines the application titles maximum width. - - - true - Use a fixed width for the application titles - The application titles all have the same width, even if their texts are shorter than the maximum width. The maximum width value is used as the fixed width. - - - true - Display running indicators on unfocused applications - When the applications are ungrouped, this defines if running applications should display an indicator. - - - false - Use favorite icons as application launchers - When the applications are ungrouped, this defines if running applications stay separate from the favorite icons. - - - 0 - Primary monitor index - Specifies the index of the primary monitor. - - - true - Display panels on all monitors - Specifies if a panel is shown on every monitors - - - [] - Available monitors - Available gnome-shell (Mutter) monitors, internal use - - - false - Provide monitor isolation - Dash shows only windows from the current monitor - - - true - Display the favorites on all monitors - Specifies if every panel should display the favorite applications. If false, the favorite appplications are only displayed on the primary monitor. - - - true - Customize click behaviour - Customize action on various mouse events - - - true - Minimize on shift+click - - - true - Activate only one window - - - 'CYCLE-MIN' - Action when clicking on a running app - Set the action that is executed when clicking on the icon of a running application - - - 'MINIMIZE' - Action when shift+clicking on a running app - Set the action that is executed when shift+clicking on the icon of a running application - - - 'LAUNCH' - Action when clicking on a running app - Set the action that is executed when middle-clicking on the icon of a running application - - - 'LAUNCH' - Action when clicking on a running app - Set the action that is executed when shift+middle-clicking on the icon of a running application - - - 'SWITCH_WORKSPACE' - Action when scrolling over the panel - Set the action that is executed when scrolling over the panel - - - 0 - Delay between panel mouse scroll events - Set the minimum delay between panel mouse scroll events - - - true - Show the workspace switch head-up when workspace is changed by scrolling on the panel - - - 'CYCLE_WINDOWS' - Action when scrolling over a running app - Set the action that is executed when scrolling over a running application - - - 0 - Delay between icon mouse scroll events - Set the minimum delay between icon mouse scroll events - - - 100 - Icon leave preview timeout - Amount of time to leave preview windows open when the mouse has left the application's icon. - - - 500 - Enter window peeking mode timeout - Amount of time of inactivity to enter the window peeking mode when the mouse has entered a window preview. - - - 40 - Window peeking mode opacity - All windows except for the peeked one have their opacity set to the same value. - - - true - Middle click preview to close window - Middle click on the window preview to close that window - - - true - Window previews use custom opacity - Window previews background use a different opacity from the panel - - - 80 - Window previews background opacity - Window previews use this custom background opacity. - - - 0 - Tray font size - Set the size of the tray font. (0 for default) - - - 0 - Leftbox font size - Set the size of the leftBox font. (0 for default) - - - 8 - App icon margin - Set the margin for application icons in the embedded dash. - - - 4 - App icon padding - Set the padding for application icons in the embedded dash. - - - -1 - Tray item padding - Set the size of the tray padding. (-1 for default) - - - -1 - Leftbox item padding - Set the size of the leftBox padding. (-1 for default) - - - -1 - Status icon padding - Set the size of the aggregate (status) menu icon padding. (-1 for default) - - - true - Animate running indicator when open/closing/switching applications - - - true - Animate when new window launched - - - false - Animate app icon on hover - - - 'SIMPLE' - App icon hover animation type - - - {'RIPPLE':2,'PLANK':1} - App icon hover animation curve convexity (1 is linear, more is convex, less is concave) - - - {'SIMPLE':160,'RIPPLE':130,'PLANK':100} - App icon hover animation duration in milliseconds - - - {'RIPPLE':4,'PLANK':4} - App icon hover animation extent (maximum number of animated icons) - - - {'SIMPLE':0,'RIPPLE':10,'PLANK':0} - App icon hover animation rotation in degrees - - - {'SIMPLE':0.30,'RIPPLE':0.40,'PLANK':0} - App icon hover animation travel translation in relation to the app icon size - - - {'SIMPLE':1,'RIPPLE':1.25,'PLANK':2} - App icon hover animation zoom scale in relation to the app icon size - - - true - Integrate items from the gnome appmenu into the right click menu - - - false - Display Show Details to open Gnome Software from right click menu - - - "<Super>q" - Keybinding to show the dock and the number overlay. - Behavior depends on hotkeys-show-dock and hotkeys-overlay. - - - q']]]> - Keybinding to show the dock and the number overlay. - Behavior depends on hotkeys-show-dock and hotkeys-overlay. - - - 2000 - Timeout to hide the dock, in seconds - Sets the time duration before the dock is hidden again. - - - 750 - Timeout to hide the dock, in seconds - Sets the time duration before the dock is hidden again. - - - 'TEMPORARILY' - Transitivity of the number overlay - You can choose between NEVER, TEMPORARILY and ALWAYS. - - - false - Super Hot-Keys - Launch and switch between dash items using Super+(0-9) - - - 'Super' - Prefix to use for hotkeys - You can choose between Super or SuperAlt as the prefix for hotkeys. - - - false - Show window previews - When multiple instances of the application are available, show their window previews - - - 'BOTH' - Hotkeys number keys - Which number keys are used for the hotkeys - - - 1']]]> - Keybinding to launch 1st dash app - - Keybinding to launch 1st app. - - - - 2']]]> - Keybinding to launch 2nd dash app - - Keybinding to launch 2nd app. - - - - 3']]]> - Keybinding to launch 3rd dash app - - Keybinding to launch 3rd app. - - - - 4']]]> - Keybinding to launch 4th dash app - - Keybinding to launch 4th app. - - - - 5']]]> - Keybinding to launch 5th dash app - - Keybinding to launch 5th app. - - - - 6']]]> - Keybinding to launch 6th dash app - - Keybinding to launch 6th app. - - - - 7']]]> - Keybinding to launch 7th dash app - - Keybinding to launch 7th app. - - - - 8']]]> - Keybinding to launch 8th dash app - - Keybinding to launch 8th app. - - - - 9']]]> - Keybinding to launch 9th dash app - - Keybinding to launch 9th app. - - - - 0']]]> - Keybinding to launch 10th dash app - - Keybinding to launch 10th app. - - - - 1']]]> - Keybinding to trigger 1st dash app with shift behavior - - Keybinding to trigger 1st app with shift behavior. - - - - 2']]]> - Keybinding to trigger 2nd dash app with shift behavior - - Keybinding to trigger 2nd app with shift behavior. - - - - 3']]]> - Keybinding to trigger 3rd dash app with shift behavior - - Keybinding to trigger 3rd app with shift behavior. - - - - 4']]]> - Keybinding to trigger 4th dash app with shift behavior - - Keybinding to trigger 4th app with shift behavior. - - - - 5']]]> - Keybinding to trigger 5th dash app with shift behavior - - Keybinding to trigger 5th app with shift behavior. - - - - 6']]]> - Keybinding to trigger 6th dash app with shift behavior - - Keybinding to trigger 6th app with shift behavior. - - - - 7']]]> - Keybinding to trigger 7th dash app with shift behavior - - Keybinding to trigger 7th app with shift behavior. - - - - 8']]]> - Keybinding to trigger 8th dash app with shift behavior - - Keybinding to trigger 8th app with shift behavior. - - - - 9']]]> - Keybinding to trigger 9th dash app with shift behavior - - Keybinding to trigger 9th app with shift behavior. - - - - 0']]]> - Keybinding to trigger 10th dash app with shift behavior - - Keybinding to trigger 10th app with shift behavior. - - - - 1']]]> - Keybinding to trigger 1st dash app - - Keybinding to either show or launch the 1st application in the dash. - - - - 2']]]> - Keybinding to trigger 2nd dash app - - Keybinding to either show or launch the 2nd application in the dash. - - - - 3']]]> - Keybinding to trigger 3rd dash app - - Keybinding to either show or launch the 3rd application in the dash. - - - - 4']]]> - Keybinding to trigger 4th dash app - - Keybinding to either show or launch the 4th application in the dash. - - - - 5']]]> - Keybinding to trigger 5th dash app - - Keybinding to either show or launch the 5th application in the dash. - - - - 6']]]> - Keybinding to trigger 6th dash app - - Keybinding to either show or launch the 6th application in the dash. - - - - 7']]]> - Keybinding to trigger 7th dash app - - Keybinding to either show or launch the 7th application in the dash. - - - - 8']]]> - Keybinding to trigger 8th dash app - - Keybinding to either show or launch the 8th application in the dash. - - - - 9']]]> - Keybinding to trigger 9th dash app - - Keybinding to either show or launch the 9th application in the dash. - - - - 0']]]> - Keybinding to trigger 10th dash app - - Keybinding to either show or launch the 10th application in the dash. - - - - KP_1']]]> - Keybinding to launch 1st dash app - - Keybinding to launch 1st app. - - - - KP_2']]]> - Keybinding to launch 2nd dash app - - Keybinding to launch 2nd app. - - - - KP_3']]]> - Keybinding to launch 3rd dash app - - Keybinding to launch 3rd app. - - - - KP_4']]]> - Keybinding to launch 4th dash app - - Keybinding to launch 4th app. - - - - KP_5']]]> - Keybinding to launch 5th dash app - - Keybinding to launch 5th app. - - - - KP_6']]]> - Keybinding to launch 6th dash app - - Keybinding to launch 6th app. - - - - KP_7']]]> - Keybinding to launch 7th dash app - - Keybinding to launch 7th app. - - - - KP_8']]]> - Keybinding to launch 8th dash app - - Keybinding to launch 8th app. - - - - KP_9']]]> - Keybinding to launch 9th dash app - - Keybinding to launch 9th app. - - - - KP_0']]]> - Keybinding to launch 10th dash app - - Keybinding to launch 10th app. - - - - KP_1']]]> - Keybinding to trigger 1st dash app with shift behavior - - Keybinding to trigger 1st app with shift behavior. - - - - KP_2']]]> - Keybinding to trigger 2nd dash app with shift behavior - - Keybinding to trigger 2nd app with shift behavior. - - - - KP_3']]]> - Keybinding to trigger 3rd dash app with shift behavior - - Keybinding to trigger 3rd app with shift behavior. - - - - KP_4']]]> - Keybinding to trigger 4th dash app with shift behavior - - Keybinding to trigger 4th app with shift behavior. - - - - KP_5']]]> - Keybinding to trigger 5th dash app with shift behavior - - Keybinding to trigger 5th app with shift behavior. - - - - KP_6']]]> - Keybinding to trigger 6th dash app with shift behavior - - Keybinding to trigger 6th app with shift behavior. - - - - KP_7']]]> - Keybinding to trigger 7th dash app with shift behavior - - Keybinding to trigger 7th app with shift behavior. - - - - KP_8']]]> - Keybinding to trigger 8th dash app with shift behavior - - Keybinding to trigger 8th app with shift behavior. - - - - KP_9']]]> - Keybinding to trigger 9th dash app with shift behavior - - Keybinding to trigger 9th app with shift behavior. - - - - KP_0']]]> - Keybinding to trigger 10th dash app with shift behavior - - Keybinding to trigger 10th app with shift behavior. - - - - KP_1']]]> - Keybinding to trigger 1st dash app - - Keybinding to either show or launch the 1st application in the dash. - - - - KP_2']]]> - Keybinding to trigger 2nd dash app - - Keybinding to either show or launch the 2nd application in the dash. - - - - KP_3']]]> - Keybinding to trigger 3rd dash app - - Keybinding to either show or launch the 3rd application in the dash. - - - - KP_4']]]> - Keybinding to trigger 4th dash app - - Keybinding to either show or launch the 4th application in the dash. - - - - KP_5']]]> - Keybinding to trigger 5th dash app - - Keybinding to either show or launch the 5th application in the dash. - - - - KP_6']]]> - Keybinding to trigger 6th dash app - - Keybinding to either show or launch the 6th application in the dash. - - - - KP_7']]]> - Keybinding to trigger 7th dash app - - Keybinding to either show or launch the 7th application in the dash. - - - - KP_8']]]> - Keybinding to trigger 8th dash app - - Keybinding to either show or launch the 8th application in the dash. - - - - KP_9']]]> - Keybinding to trigger 9th dash app - - Keybinding to either show or launch the 9th application in the dash. - - - - KP_0']]]> - Keybinding to trigger 10th dash app - - Keybinding to either show or launch the 10th application in the dash. - - - - true - Show progress bar on app icon - Whether to show progress bar overlay on app icon, for supported applications. - - - true - Show badge count on app icon - Whether to show badge count overlay on app icon, for supported applications. - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/stylesheet.css b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/stylesheet.css deleted file mode 100644 index 58d191ae..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/stylesheet.css +++ /dev/null @@ -1,155 +0,0 @@ -/* - * This file is part of the Dash-To-Panel extension for Gnome 3 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * - * Credits: - * This file is based on code from the Dash to Dock extension by micheleg - * and code from the Taskbar extension by Zorin OS - * Some code was also adapted from the upstream Gnome Shell source code. - */ - -#dashtopanelTaskbar .dash-item-container > StWidget, -.dashtopanelMainPanel .dash-item-container .show-apps { - margin: 0; - padding: 0; -} - -#dashtopanelScrollview .overview-tile, -.dashtopanelMainPanel .overview-tile { - background: none; -} - -#dashtopanelScrollview .overview-tile .overview-label { - /* must match TITLE_RIGHT_PADDING in apppicons.js */ - padding-right: 8px; - text-align: left; -} - -#dashtopanelScrollview .overview-tile:hover .dtp-container, -#dashtopanelScrollview .overview-tile:focus .dtp-container, -.dashtopanelMainPanel .dash-item-container .show-apps:hover { - background-color: rgba(238, 238, 238, 0.1); -} - -.dashtopanelMainPanel .dash-item-container .show-apps .overview-icon { - color: #FFF; -} - -#dashtopanelTaskbar .dash-item-container .overview-tile:hover, -#dashtopanelTaskbar .dash-item-container .overview-tile .dtp-container .overview-icon, -#dashtopanelScrollview .overview-tile:hover .dtp-container.animate-appicon-hover, -.dashtopanelMainPanel .dash-item-container .show-apps:hover .overview-icon { - background: none; -} - -#dashtopanelScrollview .overview-tile:active .dtp-container { - background-color: rgba(238, 238, 236, 0.18); -} - -#dashtopanelScrollview .overview-tile .favorite { - background-color: rgba(80, 150, 255, 0.4); -} - -#dashtopanelTaskbar .scrollview-fade { - background-gradient-end: rgba(0, 0, 0, 0); -} - -.dashtopanelSecondaryMenu { - max-width: 400px; -} - -.dashtopanelMainPanel.vertical .panel-button { - text-align: center; -} - -.dashtopanelMainPanel.vertical .panel-button.vertical *, -.dashtopanelMainPanel.vertical .panel-button.clock-display * { - padding: 0; - margin: 0; -} - -.dashtopanelMainPanel.vertical .panel-button > *, -.dashtopanelMainPanel.vertical .panel-button.vertical > *, -.dashtopanelMainPanel.vertical .panel-button.vertical .system-status-icon, -.dashtopanelMainPanel.vertical .panel-button.clock-display > *, -.dashtopanelMainPanel.vertical .panel-button.clock-display .clock { - padding: 8px 0; -} - -.dashtopanelMainPanel.vertical .panel-button.clock-display { - -natural-hpadding: 0; - -minimum-hpadding: 0; -} - -#dashtopanelThumbnailList { - spacing: 0em; - padding: 0 1em; -} - -#dashtopanelThumbnailList .popup-menu-item { - padding: 0; - border-radius: 5px; - spacing: 0; -} - -#dashtopanelThumbnailList .window-box { - padding: 0; - spacing: 0; -} - -#dashtopanelThumbnailList .preview-window-title { - padding-top: 1em; -} - -.popup-menu.panel-menu { - margin-bottom: 0; -} - -#panel #panelLeft, #panel #panelCenter { - spacing: 0px; -} - -.showdesktop-button-dark-hovered { - background-color: rgba(200, 200, 200, .4); -} - -.showdesktop-button-light-hovered { - background-color: rgba(55, 55, 55, .4); -} - -#dashtopanelScrollview .badge { - color: rgba(255, 255, 255, 1); - font-weight: bold; - text-align: center; -} - -#dashtopanelScrollview .number-overlay { - background-color: rgba(0,0,0,0.8); -} - -#dashtopanelScrollview .notification-badge { - background-color: rgba(255,0,0,0.8); -} - -#dashtopanelScrollview .progress-bar { - /* Customization of the progress bar style, e.g.: - -progress-bar-background: rgba(0.8, 0.8, 0.8, 1); - -progress-bar-border: rgba(0.9, 0.9, 0.9, 1); */ -} - -.symbolic-icon-style { - -st-icon-style: symbolic; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/taskbar.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/taskbar.js deleted file mode 100644 index 54da64f1..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/taskbar.js +++ /dev/null @@ -1,1556 +0,0 @@ -/* - * This file is part of the Dash-To-Panel extension for Gnome 3 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * - * Credits: - * This file is based on code from the Dash to Dock extension by micheleg - * and code from the Taskbar extension by Zorin OS - * Some code was also adapted from the upstream Gnome Shell source code. - */ - - -import Clutter from 'gi://Clutter'; -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Graphene from 'gi://Graphene'; -import Shell from 'gi://Shell'; -import St from 'gi://St'; - -import * as AppFavorites from 'resource:///org/gnome/shell/ui/appFavorites.js'; -import * as Dash from 'resource:///org/gnome/shell/ui/dash.js'; -import * as DND from 'resource:///org/gnome/shell/ui/dnd.js'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import {EventEmitter} from 'resource:///org/gnome/shell/misc/signals.js'; - -import * as AppIcons from './appIcons.js'; -import * as PanelManager from './panelManager.js'; -import * as PanelSettings from './panelSettings.js'; -import * as Pos from './panelPositions.js'; -import * as Utils from './utils.js'; -import * as WindowPreview from './windowPreview.js'; -import {SETTINGS} from './extension.js'; - -const SearchController = Main.overview.searchController; - -export const DASH_ANIMATION_TIME = .2; // Dash.DASH_ANIMATION_TIME is now private -const DASH_ITEM_HOVER_TIMEOUT = .3; // Dash.DASH_ITEM_HOVER_TIMEOUT is now private -export const MIN_ICON_SIZE = 4; - -const T1 = 'ensureAppIconVisibilityTimeout' -const T2 = 'showLabelTimeout' -const T3 = 'resetHoverTimeout' - - -/** - * Extend DashItemContainer - * - * - set label position based on taskbar orientation - * - * I can't subclass the original object because of this: https://bugzilla.gnome.org/show_bug.cgi?id=688973. - * thus use this ugly pattern. - */ - -export function extendDashItemContainer(dashItemContainer) { - dashItemContainer.showLabel = AppIcons.ItemShowLabel; -} - -const iconAnimationSettings = { - _getDictValue(key) { - let type = SETTINGS.get_string('animate-appicon-hover-animation-type'); - return SETTINGS.get_value(key).deep_unpack()[type] || 0; - }, - - get type() { - if (!SETTINGS.get_boolean('animate-appicon-hover')) - return ""; - - return SETTINGS.get_string('animate-appicon-hover-animation-type'); - }, - - get convexity() { - return Math.max(0, this._getDictValue('animate-appicon-hover-animation-convexity')); - }, - - get duration() { - return this._getDictValue('animate-appicon-hover-animation-duration'); - }, - - get extent() { - return Math.max(1, this._getDictValue('animate-appicon-hover-animation-extent')); - }, - - get rotation() { - return this._getDictValue('animate-appicon-hover-animation-rotation'); - }, - - get travel() { - return Math.max(0, this._getDictValue('animate-appicon-hover-animation-travel')); - }, - - get zoom() { - return Math.max(1, this._getDictValue('animate-appicon-hover-animation-zoom')); - }, -}; - -/* This class is a fork of the upstream DashActor class (ui.dash.js) - * - * Summary of changes: - * - modified chldBox calculations for when 'show-apps-at-top' option is checked - * - handle horizontal dash - */ -export const TaskbarActor = GObject.registerClass({ -}, class TaskbarActor extends St.Widget { - _init(delegate) { - this._delegate = delegate; - this._currentBackgroundColor = 0; - super._init({ name: 'dashtopanelTaskbar', - layout_manager: new Clutter.BoxLayout({ orientation: Clutter.Orientation[delegate.dtpPanel.getOrientation().toUpperCase()] }), - clip_to_allocation: true }); - } - - vfunc_allocate(box) { - this.set_allocation(box); - - let panel = this._delegate.dtpPanel; - let availFixedSize = box[panel.fixedCoord.c2] - box[panel.fixedCoord.c1]; - let availVarSize = box[panel.varCoord.c2] - box[panel.varCoord.c1]; - let [dummy, scrollview, leftFade, rightFade] = this.get_children(); - let [, natSize] = this[panel.sizeFunc](availFixedSize); - let childBox = new Clutter.ActorBox(); - let orientation = panel.getOrientation(); - - dummy.allocate(childBox); - - childBox[panel.varCoord.c1] = box[panel.varCoord.c1]; - childBox[panel.varCoord.c2] = Math.min(availVarSize, natSize); - childBox[panel.fixedCoord.c1] = box[panel.fixedCoord.c1]; - childBox[panel.fixedCoord.c2] = box[panel.fixedCoord.c2]; - - scrollview.allocate(childBox); - - let [value, , upper, , , pageSize] = scrollview[orientation[0] + 'adjustment'].get_values(); - upper = Math.floor(upper); - scrollview._dtpFadeSize = upper > pageSize ? this._delegate.iconSize : 0; - - if (this._currentBackgroundColor !== panel.dynamicTransparency.currentBackgroundColor) { - this._currentBackgroundColor = panel.dynamicTransparency.currentBackgroundColor; - let gradientStyle = 'background-gradient-start: ' + this._currentBackgroundColor + - 'background-gradient-direction: ' + orientation; - - leftFade.set_style(gradientStyle); - rightFade.set_style(gradientStyle); - } - - childBox[panel.varCoord.c2] = childBox[panel.varCoord.c1] + (value > 0 ? scrollview._dtpFadeSize : 0); - leftFade.allocate(childBox); - - childBox[panel.varCoord.c1] = box[panel.varCoord.c2] - (value + pageSize < upper ? scrollview._dtpFadeSize : 0); - childBox[panel.varCoord.c2] = box[panel.varCoord.c2]; - rightFade.allocate(childBox); - } - - // We want to request the natural size of all our children - // as our natural width, so we chain up to StWidget (which - // then calls BoxLayout) - vfunc_get_preferred_width(forHeight) { - let [, natWidth] = St.Widget.prototype.vfunc_get_preferred_width.call(this, forHeight); - - return [0, natWidth]; - } - - vfunc_get_preferred_height(forWidth) { - let [, natHeight] = St.Widget.prototype.vfunc_get_preferred_height.call(this, forWidth); - - return [0, natHeight]; - } -}); - -/* This class is a fork of the upstream dash class (ui.dash.js) - * - * Summary of changes: - * - disconnect global signals adding a destroy method; - * - play animations even when not in overview mode - * - set a maximum icon size - * - show running and/or favorite applications - * - emit a custom signal when an app icon is added - * - Add scrollview - * Ensure actor is visible on keyfocus inside the scrollview - * - add 128px icon size, might be useful for hidpi display - * - Sync minimization application target position. - */ - -export const Taskbar = class extends EventEmitter { - - constructor(panel) { - super(); - - this.dtpPanel = panel; - - // start at smallest size due to running indicator drawing area expanding but not shrinking - this.iconSize = 16; - - this._shownInitially = false; - - this._signalsHandler = new Utils.GlobalSignalsHandler(); - this._timeoutsHandler = new Utils.TimeoutsHandler(); - - this._labelShowing = false; - this.fullScrollView = 0; - - let isVertical = panel.checkIfVertical(); - - this._box = new St.BoxLayout({ vertical: isVertical, - clip_to_allocation: false, - x_align: Clutter.ActorAlign.START, - y_align: Clutter.ActorAlign.START }); - - this._container = new TaskbarActor(this); - this._scrollView = new St.ScrollView({ name: 'dashtopanelScrollview', - hscrollbar_policy: St.PolicyType.NEVER, - vscrollbar_policy: St.PolicyType.NEVER, - enable_mouse_scrolling: true }); - - this._scrollView.connect('leave-event', this._onLeaveEvent.bind(this)); - this._scrollView.connect('motion-event', this._onMotionEvent.bind(this)); - this._scrollView.connect('scroll-event', this._onScrollEvent.bind(this)); - this._scrollView.add_child(this._box); - - this._showAppsIconWrapper = panel.showAppsIconWrapper; - this._showAppsIconWrapper.connect('menu-state-changed', (showAppsIconWrapper, opened) => { - this._itemMenuStateChanged(showAppsIconWrapper, opened); - }); - // an instance of the showAppsIcon class is encapsulated in the wrapper - this._showAppsIcon = this._showAppsIconWrapper.realShowAppsIcon; - this.showAppsButton = this._showAppsIcon.toggleButton; - - if (isVertical) { - this.showAppsButton.set_width(panel.geom.w); - } - - this.showAppsButton.connect('notify::checked', this._onShowAppsButtonToggled.bind(this)); - - this.showAppsButton.checked = (SearchController._showAppsButton) ? SearchController._showAppsButton.checked : false; - - this._showAppsIcon.childScale = 1; - this._showAppsIcon.childOpacity = 255; - this._showAppsIcon.icon.setIconSize(this.iconSize); - this._hookUpLabel(this._showAppsIcon, this._showAppsIconWrapper); - - this._container.add_child(new St.Widget({ width: 0, reactive: false })); - this._container.add_child(this._scrollView); - - let orientation = panel.getOrientation(); - let fadeStyle = 'background-gradient-direction:' + orientation; - let fade1 = new St.Widget({ style_class: 'scrollview-fade', reactive: false }); - let fade2 = new St.Widget({ style_class: 'scrollview-fade', - reactive: false, - pivot_point: new Graphene.Point({ x: .5, y: .5 }), - rotation_angle_z: 180 }); - - fade1.set_style(fadeStyle); - fade2.set_style(fadeStyle); - - this._container.add_child(fade1); - this._container.add_child(fade2); - - this.previewMenu = new WindowPreview.PreviewMenu(panel); - this.previewMenu.enable(); - - let rtl = Clutter.get_default_text_direction() == Clutter.TextDirection.RTL; - this.actor = new St.Bin({ - child: this._container, - y_align: Clutter.ActorAlign.START, - x_align: rtl ? Clutter.ActorAlign.END : Clutter.ActorAlign.START - }); - - const adjustment = this._scrollView[orientation[0] + 'adjustment']; - - this._workId = Main.initializeDeferredWork(this._box, this._redisplay.bind(this)); - - this._settings = new Gio.Settings({ schema_id: 'org.gnome.shell' }); - - this._appSystem = Shell.AppSystem.get_default(); - - this.iconAnimator = new PanelManager.IconAnimator(this.dtpPanel.panel); - - this._signalsHandler.add( - [ - this.dtpPanel.panel, - 'notify::height', - () => this._queueRedisplay() - ], - [ - this.dtpPanel.panel, - 'notify::width', - () => this._queueRedisplay() - ], - [ - this._appSystem, - 'installed-changed', - () => { - AppFavorites.getAppFavorites().reload(); - this._queueRedisplay(); - } - ], - [ - this._appSystem, - 'app-state-changed', - this._queueRedisplay.bind(this) - ], - [ - AppFavorites.getAppFavorites(), - 'changed', - this._queueRedisplay.bind(this) - ], - [ - global.window_manager, - 'switch-workspace', - () => this._connectWorkspaceSignals() - ], - [ - Utils.DisplayWrapper.getScreen(), - [ - 'window-entered-monitor', - 'window-left-monitor' - ], - () => { - if (SETTINGS.get_boolean('isolate-monitors')) { - this._queueRedisplay(); - } - } - ], - [ - Main.overview, - 'item-drag-begin', - this._onDragBegin.bind(this) - ], - [ - Main.overview, - 'item-drag-end', - this._onDragEnd.bind(this) - ], - [ - Main.overview, - 'item-drag-cancelled', - this._onDragCancelled.bind(this) - ], - [ - // Ensure the ShowAppsButton status is kept in sync - SearchController._showAppsButton, - 'notify::checked', - this._syncShowAppsButtonToggled.bind(this) - ], - [ - SETTINGS, - [ - 'changed::dot-size', - 'changed::show-favorites', - 'changed::show-running-apps', - 'changed::show-favorites-all-monitors' - ], - () => { - setAttributes() - this._redisplay() - } - ], - [ - SETTINGS, - 'changed::group-apps', - () => { - setAttributes() - this._connectWorkspaceSignals(); - } - ], - [ - SETTINGS, - [ - 'changed::appicon-style', - 'changed::group-apps-use-launchers', - 'changed::taskbar-locked' - ], - () => { - setAttributes() - this.resetAppIcons() - } - ], - [ - adjustment, - [ - 'notify::upper', - 'notify::pageSize' - ], - () => this._onScrollSizeChange(adjustment) - ] - ); - - let setAttributes = () => { - this.isGroupApps = SETTINGS.get_boolean('group-apps'); - this.usingLaunchers = !this.isGroupApps && SETTINGS.get_boolean('group-apps-use-launchers'); - this.showFavorites = SETTINGS.get_boolean('show-favorites') && - (this.dtpPanel.isPrimary || SETTINGS.get_boolean('show-favorites-all-monitors')) - this.showRunningApps = SETTINGS.get_boolean('show-running-apps') - this.allowSplitApps = this.usingLaunchers || (!this.isGroupApps && !this.showFavorites) - } - - setAttributes() - - this._onScrollSizeChange(adjustment); - this._connectWorkspaceSignals(); - } - - destroy() { - if (this._waitIdleId) { - GLib.source_remove(this._waitIdleId); - this._waitIdleId = 0; - } - - this._timeoutsHandler.destroy(); - this.iconAnimator.destroy(); - - this._signalsHandler.destroy(); - this._signalsHandler = 0; - - this._container.destroy(); - - this.previewMenu.disable(); - this.previewMenu.destroy(); - - this._disconnectWorkspaceSignals(); - } - - _dropIconAnimations() { - this._getTaskbarIcons().forEach(item => { - item.raise(0); - item.stretch(0); - }); - } - - _updateIconAnimations(pointerX, pointerY) { - this._iconAnimationTimestamp = Date.now(); - let type = iconAnimationSettings.type; - - if (!pointerX || !pointerY) - [pointerX, pointerY] = global.get_pointer(); - - this._getTaskbarIcons().forEach(item => { - let [x, y] = item.get_transformed_position(); - let [width, height] = item.get_transformed_size(); - let [centerX, centerY] = [x + width / 2, y + height / 2]; - let size = this._box.vertical ? height : width; - let difference = this._box.vertical ? pointerY - centerY : pointerX - centerX; - let distance = Math.abs(difference); - let maxDistance = (iconAnimationSettings.extent / 2) * size; - - if (type == 'PLANK') { - // Make the position stable for items that are far from the pointer. - let translation = distance <= maxDistance ? - distance / (2 + 8 * distance / maxDistance) : - // the previous expression with distance = maxDistance - maxDistance / 10; - - if (difference > 0) - translation *= -1; - - item.stretch(translation); - } - - if (distance <= maxDistance) { - let level = (maxDistance - distance) / maxDistance; - level = Math.pow(level, iconAnimationSettings.convexity); - item.raise(level); - } else { - item.raise(0); - } - }); - } - - _onLeaveEvent(actor) { - let [stageX, stageY] = global.get_pointer(); - let [success, x, y] = actor.transform_stage_point(stageX, stageY); - if (success && !actor.allocation.contains(x, y) && (iconAnimationSettings.type == 'RIPPLE' || iconAnimationSettings.type == 'PLANK')) - this._dropIconAnimations(); - - return Clutter.EVENT_PROPAGATE; - } - - _onMotionEvent(actor_, event) { - if (iconAnimationSettings.type == 'RIPPLE' || iconAnimationSettings.type == 'PLANK') { - let timestamp = Date.now(); - if (!this._iconAnimationTimestamp || - (timestamp - this._iconAnimationTimestamp >= iconAnimationSettings.duration / 2)) { - let [pointerX, pointerY] = event.get_coords(); - this._updateIconAnimations(pointerX, pointerY); - } - } - - return Clutter.EVENT_PROPAGATE; - } - - _onScrollEvent(actor, event) { - - let orientation = this.dtpPanel.getOrientation(); - - // reset timeout to avid conflicts with the mousehover event - this._timeoutsHandler.add([T1, 0, - () => this._swiping = false - ]); - - // Skip to avoid double events mouse - if (event.is_pointer_emulated()) - return Clutter.EVENT_STOP; - - let adjustment, delta; - - adjustment = this._scrollView[orientation[0] + 'adjustment']; - - let increment = adjustment.step_increment; - - switch ( event.get_scroll_direction() ) { - case Clutter.ScrollDirection.UP: - case Clutter.ScrollDirection.LEFT: - delta = -increment; - break; - case Clutter.ScrollDirection.DOWN: - case Clutter.ScrollDirection.RIGHT: - delta = +increment; - break; - case Clutter.ScrollDirection.SMOOTH: - let [dx, dy] = event.get_scroll_delta(); - delta = dy*increment; - delta += dx*increment; - break; - - } - - adjustment.set_value(adjustment.get_value() + delta); - - return Clutter.EVENT_STOP; - - } - - _onScrollSizeChange(adjustment) { - // Update minimization animation target position on scrollview change. - this._updateAppIcons(); - - // When applications are ungrouped and there is some empty space on the horizontal taskbar, - // force a fixed label width to prevent the icons from "wiggling" when an animation runs - // (adding or removing an icon). When the taskbar is full, revert to a dynamic label width - // to allow them to resize and make room for new icons. - if (!this.dtpPanel.checkIfVertical() && !this.isGroupApps) { - let initial = this.fullScrollView; - - if (!this.fullScrollView && Math.floor(adjustment.upper) > adjustment.page_size) { - this.fullScrollView = adjustment.page_size; - } else if (adjustment.page_size < this.fullScrollView) { - this.fullScrollView = 0; - } - - if (initial != this.fullScrollView && !this._waitIdleId) { - this._waitIdleId = GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => { - this._getAppIcons().forEach(a => a.updateTitleStyle()) - this._waitIdleId = 0; - - return GLib.SOURCE_REMOVE; - }); - } - } - } - - _onDragBegin() { - this._dragCancelled = false; - this._dragMonitor = { - dragMotion: this._onDragMotion.bind(this) - }; - DND.addDragMonitor(this._dragMonitor); - - if (this._box.get_n_children() == 0) { - this._emptyDropTarget = new Dash.EmptyDropTargetItem(); - this._box.insert_child_at_index(this._emptyDropTarget, 0); - this._emptyDropTarget.show(true); - } - - this._toggleFavoriteHighlight(true); - } - - _onDragCancelled() { - this._dragCancelled = true; - - if (this._dragInfo) { - this._box.set_child_at_index(this._dragInfo[1]._dashItemContainer, this._dragInfo[0]); - } - - this._endDrag(); - } - - _onDragEnd() { - if (this._dragCancelled) - return; - - this._endDrag(); - } - - _endDrag() { - if (this._dragInfo && this._dragInfo[1]._dashItemContainer instanceof DragPlaceholderItem) { - this._box.remove_child(this._dragInfo[1]._dashItemContainer); - this._dragInfo[1]._dashItemContainer.destroy(); - delete this._dragInfo[1]._dashItemContainer; - } - - this._dragInfo = null; - this._clearEmptyDropTarget(); - this._showAppsIcon.setDragApp(null); - DND.removeDragMonitor(this._dragMonitor); - - this._dragMonitor = null; - this.emit('end-drag'); - - this._toggleFavoriteHighlight(); - } - - _onDragMotion(dragEvent) { - let app = Dash.Dash.getAppFromSource(dragEvent.source); - if (app == null) - return DND.DragMotionResult.CONTINUE; - - let showAppsHovered = this._showAppsIcon.contains(dragEvent.targetActor); - - if (showAppsHovered) - this._showAppsIcon.setDragApp(app); - else - this._showAppsIcon.setDragApp(null); - - return DND.DragMotionResult.CONTINUE; - } - - _toggleFavoriteHighlight(show) { - let appFavorites = AppFavorites.getAppFavorites(); - let cssFuncName = (show ? 'add' : 'remove') + '_style_class_name'; - - if (this.showFavorites) - this._getAppIcons().filter(appIcon => (this.usingLaunchers && appIcon.isLauncher) || - (!this.usingLaunchers && appFavorites.isFavorite(appIcon.app.get_id()))) - .forEach(fav => fav._container[cssFuncName]('favorite')); - } - - handleIsolatedWorkspaceSwitch() { - this._shownInitially = this.isGroupApps; - this._queueRedisplay(); - } - - _connectWorkspaceSignals() { - this._disconnectWorkspaceSignals(); - - this._lastWorkspace = Utils.DisplayWrapper.getWorkspaceManager().get_active_workspace(); - - this._workspaceWindowAddedId = this._lastWorkspace.connect('window-added', () => this._queueRedisplay()); - this._workspaceWindowRemovedId = this._lastWorkspace.connect('window-removed', () => this._queueRedisplay()); - } - - _disconnectWorkspaceSignals() { - if (this._lastWorkspace) { - this._lastWorkspace.disconnect(this._workspaceWindowAddedId); - this._lastWorkspace.disconnect(this._workspaceWindowRemovedId); - - this._lastWorkspace = null; - } - } - - _queueRedisplay() { - Main.queueDeferredWork(this._workId); - } - - _hookUpLabel(item, syncHandler) { - item.child.connect('notify::hover', () => { - this._syncLabel(item, syncHandler); - }); - - syncHandler.connect('sync-tooltip', () => { - this._syncLabel(item, syncHandler); - }); - } - - _createAppItem(app, window, isLauncher) { - let appIcon = new AppIcons.TaskbarAppIcon( - { - app, - window, - isLauncher - }, - this.dtpPanel, - { - setSizeManually: true, - showLabel: false, - isDraggable: !SETTINGS.get_boolean('taskbar-locked'), - }, - this.previewMenu, - this.iconAnimator - ); - - if (appIcon._draggable) { - appIcon._draggable.connect('drag-begin', - () => { - appIcon.opacity = 0; - appIcon.isDragged = 1; - this._dropIconAnimations(); - }); - appIcon._draggable.connect('drag-end', - () => { - appIcon.opacity = 255; - delete appIcon.isDragged; - this._updateAppIcons(); - }); - } - - appIcon.connect('menu-state-changed', - (appIcon, opened) => { - this._itemMenuStateChanged(item, opened); - }); - - let item = new TaskbarItemContainer(); - - item._dtpPanel = this.dtpPanel - extendDashItemContainer(item); - - item.setChild(appIcon); - appIcon._dashItemContainer = item; - - appIcon.connect('notify::hover', () => { - if (appIcon.hover){ - this._timeoutsHandler.add([T1, 100, - () => Utils.ensureActorVisibleInScrollView(this._scrollView, appIcon, this._scrollView._dtpFadeSize) - ]) - - if (!appIcon.isDragged && iconAnimationSettings.type == 'SIMPLE') - appIcon.get_parent().raise(1); - else if (!appIcon.isDragged && (iconAnimationSettings.type == 'RIPPLE' || iconAnimationSettings.type == 'PLANK')) - this._updateIconAnimations(); - } else { - this._timeoutsHandler.remove(T1) - - if (!appIcon.isDragged && iconAnimationSettings.type == 'SIMPLE') - appIcon.get_parent().raise(0); - } - }); - - appIcon.connect('clicked', - (actor) => { - Utils.ensureActorVisibleInScrollView(this._scrollView, actor, this._scrollView._dtpFadeSize); - }); - - appIcon.connect('key-focus-in', (actor) => { - let [x_shift, y_shift] = Utils.ensureActorVisibleInScrollView(this._scrollView, actor, this._scrollView._dtpFadeSize); - - // This signal is triggered also by mouse click. The popup menu is opened at the original - // coordinates. Thus correct for the shift which is going to be applied to the scrollview. - if (appIcon._menu) { - appIcon._menu._boxPointer.xOffset = -x_shift; - appIcon._menu._boxPointer.yOffset = -y_shift; - } - }); - - // Override default AppIcon label_actor, now the - // accessible_name is set at DashItemContainer.setLabelText - appIcon.label_actor = null; - item.setLabelText(app.get_name()); - - appIcon.icon.setIconSize(this.iconSize); - this._hookUpLabel(item, appIcon); - - return item; - } - - // Return an array with the "proper" appIcons currently in the taskbar - _getAppIcons() { - // Only consider children which are "proper" icons and which are not - // animating out (which means they will be destroyed at the end of - // the animation) - return this._getTaskbarIcons().map(function(actor){ - return actor.child._delegate; - }); - } - - _getTaskbarIcons(includeAnimated) { - return this._box.get_children().filter(function(actor) { - return actor.child && - actor.child._delegate && - actor.child._delegate.icon && - (includeAnimated || !actor.animatingOut); - }); - } - - _updateAppIcons() { - let appIcons = this._getAppIcons(); - - appIcons.filter(icon => icon.constructor === AppIcons.TaskbarAppIcon).forEach(icon => { - icon.updateIcon(); - }); - } - - _itemMenuStateChanged(item, opened) { - // When the menu closes, it calls sync_hover, which means - // that the notify::hover handler does everything we need to. - if (opened) { - this._timeoutsHandler.remove(T2) - - item.hideLabel(); - } else { - // I want to listen from outside when a menu is closed. I used to - // add a custom signal to the appIcon, since gnome 3.8 the signal - // calling this callback was added upstream. - this.emit('menu-closed'); - - // The icon menu grabs the events and, once it is closed, the pointer is maybe - // no longer over the taskbar and the animations are not dropped. - if (iconAnimationSettings.type == 'RIPPLE' || iconAnimationSettings.type == 'PLANK') { - this._scrollView.sync_hover(); - if (!this._scrollView.hover) - this._dropIconAnimations(); - } - } - } - - _syncLabel(item, syncHandler) { - let shouldShow = syncHandler ? syncHandler.shouldShowTooltip() : item.child.get_hover(); - - if (shouldShow) { - if (!this._timeoutsHandler.getId(T2)) { - let timeout = this._labelShowing ? 0 : DASH_ITEM_HOVER_TIMEOUT; - - this._timeoutsHandler.add([T2, timeout, - () => { - this._labelShowing = true; - item.showLabel(); - } - ]); - - this._timeoutsHandler.remove(T3) - } - } else { - this._timeoutsHandler.remove(T2) - - item.hideLabel(); - if (this._labelShowing) { - this._timeoutsHandler.add([T3, DASH_ITEM_HOVER_TIMEOUT, - () => this._labelShowing = false - ]); - } - } - } - - _adjustIconSize() { - const thisMonitorIndex = this.dtpPanel.monitor.index; - let panelSize = PanelSettings.getPanelSize(SETTINGS, thisMonitorIndex); - let availSize = panelSize - SETTINGS.get_int('appicon-padding') * 2; - let minIconSize = MIN_ICON_SIZE + panelSize % 2; - - if (availSize == this.iconSize) - return; - - if (availSize < minIconSize) { - availSize = minIconSize; - } - - // For the icon size, we only consider children which are "proper" - // icons and which are not animating out (which means they will be - // destroyed at the end of the animation) - let iconChildren = this._getTaskbarIcons().concat([this._showAppsIcon]); - let scale = this.iconSize / availSize; - - this.iconSize = availSize; - - for (let i = 0; i < iconChildren.length; i++) { - let icon = iconChildren[i].child._delegate.icon; - - // Set the new size immediately, to keep the icons' sizes - // in sync with this.iconSize - icon.setIconSize(this.iconSize); - - // Don't animate the icon size change when the overview - // is transitioning, or when initially filling - // the taskbar - if (Main.overview.animationInProgress || - !this._shownInitially) - continue; - - let [targetWidth, targetHeight] = icon.icon.get_size(); - - // Scale the icon's texture to the previous size and - // tween to the new size - icon.icon.set_size(icon.icon.width * scale, icon.icon.height * scale); - - Utils.animate(icon.icon, - { width: targetWidth, - height: targetHeight, - time: DASH_ANIMATION_TIME, - transition: 'easeOutQuad', - }); - } - } - - sortAppsCompareFunction(appA, appB) { - return getAppStableSequence(appA, this.dtpPanel.monitor) - - getAppStableSequence(appB, this.dtpPanel.monitor); - } - - getAppInfos() { - //get the user's favorite apps - let favoriteApps = this.showFavorites ? AppFavorites.getAppFavorites().getFavorites() : []; - - //find the apps that should be in the taskbar: the favorites first, then add the running apps - // When using isolation, we filter out apps that have no windows in - // the current workspace (this check is done in AppIcons.getInterestingWindows) - let runningApps = this.showRunningApps ? this._getRunningApps().sort(this.sortAppsCompareFunction.bind(this)) : []; - - if (this.allowSplitApps) { - return this._createAppInfos(favoriteApps, [], true) - .concat(this._createAppInfos(runningApps) - .filter(appInfo => appInfo.windows.length)); - } else { - return this._createAppInfos(favoriteApps.concat(runningApps.filter(app => favoriteApps.indexOf(app) < 0))) - .filter(appInfo => appInfo.windows.length || favoriteApps.indexOf(appInfo.app) >= 0); - } - } - - _redisplay() { - if (!this._signalsHandler) { - return; - } - - //get the currently displayed appIcons - let currentAppIcons = this._getTaskbarIcons(); - let expectedAppInfos = this.getAppInfos(); - - //remove the appIcons which are not in the expected apps list - for (let i = currentAppIcons.length - 1; i > -1; --i) { - let appIcon = currentAppIcons[i].child._delegate; - let appIndex = Utils.findIndex(expectedAppInfos, appInfo => appInfo.app == appIcon.app && - (!this.allowSplitApps || this.isGroupApps || appInfo.windows[0] == appIcon.window) && - appInfo.isLauncher == appIcon.isLauncher); - - if (appIndex < 0 || - (appIcon.window && (this.isGroupApps || expectedAppInfos[appIndex].windows.indexOf(appIcon.window) < 0)) || - (!appIcon.window && !appIcon.isLauncher && - !this.isGroupApps && expectedAppInfos[appIndex].windows.length)) { - currentAppIcons[i][this._shownInitially ? 'animateOutAndDestroy' : 'destroy'](); - currentAppIcons.splice(i, 1); - } - } - - //if needed, reorder the existing appIcons and create the missing ones - let currentPosition = 0; - for (let i = 0, l = expectedAppInfos.length; i < l; ++i) { - let neededAppIcons = this.isGroupApps || !expectedAppInfos[i].windows.length ? - [{ app: expectedAppInfos[i].app, window: null, isLauncher: expectedAppInfos[i].isLauncher }] : - expectedAppInfos[i].windows.map(window => ({ app: expectedAppInfos[i].app, window: window, isLauncher: false })); - - for (let j = 0, ll = neededAppIcons.length; j < ll; ++j) { - //check if the icon already exists - let matchingAppIconIndex = Utils.findIndex(currentAppIcons, appIcon => appIcon.child._delegate.app == neededAppIcons[j].app && - appIcon.child._delegate.window == neededAppIcons[j].window); - - if (matchingAppIconIndex > 0 && matchingAppIconIndex != currentPosition) { - //moved icon, reposition it - this._box.remove_child(currentAppIcons[matchingAppIconIndex]); - this._box.insert_child_at_index(currentAppIcons[matchingAppIconIndex], currentPosition); - } else if (matchingAppIconIndex < 0) { - //the icon doesn't exist yet, create a new one - let newAppIcon = this._createAppItem(neededAppIcons[j].app, neededAppIcons[j].window, neededAppIcons[j].isLauncher); - - this._box.insert_child_at_index(newAppIcon, currentPosition); - currentAppIcons.splice(currentPosition, 0, newAppIcon); - - // Skip animations on first run when adding the initial set - // of items, to avoid all items zooming in at once - newAppIcon.show(this._shownInitially); - } - - ++currentPosition; - } - } - - this._adjustIconSize(); - - // Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=692744 - // Without it, StBoxLayout may use a stale size cache - this._box.queue_relayout(); - - // This is required for icon reordering when the scrollview is used. - this._updateAppIcons(); - - // This will update the size, and the corresponding number for each icon on the primary panel - if (this.dtpPanel.isPrimary) { - this._updateNumberOverlay(); - } - - this._shownInitially = true; - } - - _getRunningApps() { - let tracker = Shell.WindowTracker.get_default(); - let windows = global.get_window_actors(); - let apps = []; - - for (let i = 0, l = windows.length; i < l; ++i) { - let app = tracker.get_window_app(windows[i].metaWindow); - - if (app && apps.indexOf(app) < 0) { - apps.push(app); - } - } - - return apps; - } - - _createAppInfos(apps, defaultWindows, defaultIsLauncher) { - if (this.allowSplitApps && !defaultIsLauncher) { - let separateApps = [] - - if (apps.length) { - let tracker = Shell.WindowTracker.get_default(); - let windows = AppIcons.getInterestingWindows(null, this.dtpPanel.monitor) - .sort(sortWindowsCompareFunction) - - windows.forEach(w => { - let windowApp = tracker.get_window_app(w) - - if (apps.indexOf(windowApp) >= 0) - separateApps.push({ - app: windowApp, - isLauncher: false, - windows: [w] - }) - }) - } - - return separateApps - } - - return apps.map(app => ({ - app: app, - isLauncher: defaultIsLauncher || false, - windows: defaultWindows || AppIcons.getInterestingWindows(app, this.dtpPanel.monitor) - .sort(sortWindowsCompareFunction) - })); - } - - // Reset the displayed apps icon to mantain the correct order - resetAppIcons (geometryChange) { - let children = this._getTaskbarIcons(true); - - for (let i = 0; i < children.length; i++) { - let item = children[i]; - item.destroy(); - } - - // to avoid ugly animations, just suppress them like when taskbar is first loaded. - this._shownInitially = false; - this._redisplay(); - - if (geometryChange && this.dtpPanel.checkIfVertical()) { - this.previewMenu._updateClip(); - } - } - - _updateNumberOverlay() { - let seenApps = {}; - let counter = 0; - - this._getAppIcons().forEach(icon => { - if (!seenApps[icon.app] || this.allowSplitApps) { - seenApps[icon.app] = 1; - counter++; - } - - if (counter <= 10) { - icon.setNumberOverlay(counter == 10 ? 0 : counter); - } else { - // No overlay after 10 - icon.setNumberOverlay(-1); - } - - icon.updateHotkeyNumberOverlay(); - }); - - if (SETTINGS.get_boolean('hot-keys') && - SETTINGS.get_string('hotkeys-overlay-combo') === 'ALWAYS') - this.toggleNumberOverlay(true); - } - - toggleNumberOverlay(activate) { - let appIcons = this._getAppIcons(); - appIcons.forEach(function(icon) { - icon.toggleNumberOverlay(activate); - }); - } - - _clearEmptyDropTarget() { - if (this._emptyDropTarget) { - this._emptyDropTarget.animateOutAndDestroy(); - this._emptyDropTarget = null; - } - } - - handleDragOver(source, actor, x, y, time) { - if (source == Main.xdndHandler) - return DND.DragMotionResult.CONTINUE; - - // Don't allow favoriting of transient apps - if (source.app == null || source.app.is_window_backed()) - return DND.DragMotionResult.NO_DROP; - - if (!this._settings.is_writable('favorite-apps')) - return DND.DragMotionResult.NO_DROP; - - let isVertical = this.dtpPanel.checkIfVertical(); - - if (!this._box.contains(source) && !source._dashItemContainer) { - //not an appIcon of the taskbar, probably from the applications view - source._dashItemContainer = new DragPlaceholderItem(source, this.iconSize, isVertical); - this._box.insert_child_above(source._dashItemContainer, null); - } - - let sizeProp = isVertical ? 'height' : 'width'; - let posProp = isVertical ? 'y' : 'x'; - let pos = isVertical ? y : x; - - let currentAppIcons = this._getAppIcons(); - let sourceIndex = currentAppIcons.indexOf(source); - let hoveredIndex = Utils.findIndex(currentAppIcons, - appIcon => pos >= appIcon._dashItemContainer[posProp] && - pos <= (appIcon._dashItemContainer[posProp] + appIcon._dashItemContainer[sizeProp])); - - if (!this._dragInfo) { - this._dragInfo = [sourceIndex, source]; - } - - if (hoveredIndex >= 0) { - let isLeft = pos < currentAppIcons[hoveredIndex]._dashItemContainer[posProp] + currentAppIcons[hoveredIndex]._dashItemContainer[sizeProp] * .5; - let prevIcon = currentAppIcons[hoveredIndex - 1] - let nextIcon = currentAppIcons[hoveredIndex + 1] - - // Don't allow positioning before or after self and between icons of same app if ungrouped and showing favorites - if (!(hoveredIndex === sourceIndex || - (isLeft && hoveredIndex - 1 == sourceIndex) || - (!this.allowSplitApps && isLeft && hoveredIndex - 1 >= 0 && source.app != prevIcon.app && - prevIcon.app == currentAppIcons[hoveredIndex].app) || - (!isLeft && hoveredIndex + 1 == sourceIndex) || - (!this.allowSplitApps && !isLeft && hoveredIndex + 1 < currentAppIcons.length && source.app != nextIcon.app && - nextIcon.app == currentAppIcons[hoveredIndex].app))) { - this._box.set_child_at_index(source._dashItemContainer, hoveredIndex); - - // Ensure the next and previous icon are visible when moving the icon - // (I assume there's room for both of them) - if (hoveredIndex > 1) - Utils.ensureActorVisibleInScrollView(this._scrollView, this._box.get_children()[hoveredIndex-1], this._scrollView._dtpFadeSize); - if (hoveredIndex < this._box.get_children().length-1) - Utils.ensureActorVisibleInScrollView(this._scrollView, this._box.get_children()[hoveredIndex+1], this._scrollView._dtpFadeSize); - } - } - - return this._dragInfo[0] !== sourceIndex ? DND.DragMotionResult.MOVE_DROP : DND.DragMotionResult.CONTINUE; - } - - // Draggable target interface - acceptDrop (source, actor, x, y, time) { - // Don't allow favoriting of transient apps - if (!this._dragInfo || !source.app || source.app.is_window_backed() || - !this._settings.is_writable('favorite-apps')) { - return false; - } - - let appIcons = this._getAppIcons(); - let sourceIndex = appIcons.indexOf(source); - let usingLaunchers = !this.isGroupApps && this.usingLaunchers; - - // dragging the icon to its original position - if (this._dragInfo[0] === sourceIndex) { - return true; - } - - let appFavorites = AppFavorites.getAppFavorites(); - let sourceAppId = source.app.get_id(); - let appIsFavorite = this.showFavorites && appFavorites.isFavorite(sourceAppId); - let replacingIndex = sourceIndex + (sourceIndex > this._dragInfo[0] ? -1 : 1); - let favoriteIndex = replacingIndex >= 0 ? appFavorites.getFavorites().indexOf(appIcons[replacingIndex].app) : 0; - let sameApps = this.allowSplitApps ? [] : appIcons.filter(a => a != source && a.app == source.app); - let favoritesCount = 0; - let position = 0; - let interestingWindows = {}; - let getAppWindows = app => { - if (!interestingWindows[app]) { - interestingWindows[app] = AppIcons.getInterestingWindows(app, this.dtpPanel.monitor); - } - - let appWindows = interestingWindows[app]; //prevents "reference to undefined property Symbol.toPrimitive" warning - return appWindows; - }; - - if (sameApps.length && - ((!appIcons[sourceIndex - 1] || appIcons[sourceIndex - 1].app !== source.app) && - (!appIcons[sourceIndex + 1] || appIcons[sourceIndex + 1].app !== source.app))) { - appIcons.splice(appIcons.indexOf(sameApps[0]), sameApps.length); - Array.prototype.splice.apply(appIcons, [sourceIndex + 1, 0].concat(sameApps)); - } - - for (let i = 0, l = appIcons.length; i < l; ++i) { - let windows = []; - - if (!usingLaunchers || (!source.isLauncher && !appIcons[i].isLauncher)) { - windows = appIcons[i].window ? [appIcons[i].window] : getAppWindows(appIcons[i].app); - } - - windows.forEach(w => w._dtpPosition = position++); - - if (this.showFavorites && - ((usingLaunchers && appIcons[i].isLauncher) || - (!usingLaunchers && appFavorites.isFavorite(appIcons[i].app.get_id())))) { - ++favoritesCount; - } - } - - if (sourceIndex < favoritesCount) { - if (appIsFavorite) { - appFavorites.moveFavoriteToPos(sourceAppId, favoriteIndex); - } else { - appFavorites.addFavoriteAtPos(sourceAppId, favoriteIndex); - } - } else if (appIsFavorite && this.showFavorites && (!usingLaunchers || source.isLauncher)) { - appFavorites.removeFavorite(sourceAppId); - } - - appFavorites.emit('changed'); - - return true; - } - - _onShowAppsButtonToggled() { - // Sync the status of the default appButtons. Only if the two statuses are - // different, that means the user interacted with the extension provided - // application button, cutomize the behaviour. Otherwise the shell has changed the - // status (due to the _syncShowAppsButtonToggled function below) and it - // has already performed the desired action. - let selector = SearchController; - - if (selector._showAppsButton && - selector._showAppsButton.checked !== this.showAppsButton.checked) { - // find visible view - - if (this.showAppsButton.checked) { - if (SETTINGS.get_boolean('show-apps-override-escape')) { - //override escape key to return to the desktop when entering the overview using the showapps button - SearchController._onStageKeyPress = function(actor, event) { - if (Main.modalCount == 1 && event.get_key_symbol() === Clutter.KEY_Escape) { - this._searchActive ? this.reset() : Main.overview.hide(); - - return Clutter.EVENT_STOP; - } - - return Object.getPrototypeOf(this)._onStageKeyPress.call(this, actor, event); - }; - - let overviewHiddenId = Main.overview.connect('hidden', () => { - Main.overview.disconnect(overviewHiddenId); - delete SearchController._onStageKeyPress; - }); - } - - // force exiting overview if needed - if (!Main.overview._shown) { - this.forcedOverview = true; - } - - //temporarily use as primary the monitor on which the showapps btn was clicked, this is - //restored by the panel when exiting the overview - this.dtpPanel.panelManager.setFocusedMonitor(this.dtpPanel.monitor); - - // Finally show the overview - selector._showAppsButton.checked = true; - Main.overview.show(2 /*APP_GRID*/); - } - else { - if (this.forcedOverview) { - // force exiting overview if needed - Main.overview.hide(); - } else { - selector._showAppsButton.checked = false; - } - - this.forcedOverview = false; - } - } - } - - _syncShowAppsButtonToggled() { - let status = SearchController._showAppsButton.checked; - if (this.showAppsButton.checked !== status) - this.showAppsButton.checked = status; - } - - showShowAppsButton() { - this.showAppsButton.visible = true; - this.showAppsButton.set_width(-1); - this.showAppsButton.set_height(-1); - } - - popupFocusedAppSecondaryMenu() { - let appIcons = this._getAppIcons(); - let tracker = Shell.WindowTracker.get_default(); - - for(let i in appIcons) { - if(appIcons[i].app == tracker.focus_app) { - let appIcon = appIcons[i]; - if(appIcon._menu && appIcon._menu.isOpen) - appIcon._menu.close(); - else - appIcon.popupMenu(); - - appIcon.sync_hover(); - break; - } - } - } -}; - -export const TaskbarItemContainer = GObject.registerClass({ - -}, class TaskbarItemContainer extends Dash.DashItemContainer { - - _init() { - super._init() - } - - vfunc_allocate(box) { - if (this.child == null) - return; - - this.set_allocation(box); - - let availWidth = box.x2 - box.x1; - let availHeight = box.y2 - box.y1; - let [minChildWidth, minChildHeight, natChildWidth, natChildHeight] = this.child.get_preferred_size(); - let [childScaleX, childScaleY] = this.child.get_scale(); - - let childWidth = Math.min(natChildWidth * childScaleX, availWidth); - let childHeight = Math.min(natChildHeight * childScaleY, availHeight); - let childBox = new Clutter.ActorBox(); - - childBox.x1 = (availWidth - childWidth) / 2; - childBox.y1 = (availHeight - childHeight) / 2; - childBox.x2 = childBox.x1 + childWidth; - childBox.y2 = childBox.y1 + childHeight; - - this.child.allocate(childBox); - } - - // In case appIcon is removed from the taskbar while it is hovered, - // restore opacity before dashItemContainer.animateOutAndDestroy does the destroy animation. - animateOutAndDestroy() { - if (this._raisedClone) { - this._raisedClone.source.opacity = 255; - this._raisedClone.destroy(); - } - - super.animateOutAndDestroy(); - } - - // For ItemShowLabel - _getIconAnimationOffset() { - if (!SETTINGS.get_boolean('animate-appicon-hover')) - return 0; - - let travel = iconAnimationSettings.travel; - let zoom = iconAnimationSettings.zoom; - return this._dtpPanel.dtpSize * (travel + (zoom - 1) / 2); - } - - _updateCloneContainerPosition(cloneContainer) { - let [stageX, stageY] = this.get_transformed_position(); - - cloneContainer.set_position( - stageX - this._dtpPanel.panelBox.translation_x - this.translation_x, - stageY - this._dtpPanel.panelBox.translation_y - this.translation_y - ); - } - - _createRaisedClone() { - let [width, height] = this.get_transformed_size(); - - // "clone" of this child (appIcon actor) - let cloneButton = this.child._delegate.getCloneButton(); - - // "clone" of this (taskbarItemContainer) - let cloneContainer = new St.Bin({ - child: cloneButton, - width: width, height: height, - reactive: false, - }); - - this._updateCloneContainerPosition(cloneContainer); - - // For the stretch animation - let boundProperty = this._dtpPanel.checkIfVertical() ? 'translation_y' : 'translation_x'; - this.bind_property(boundProperty, cloneContainer, boundProperty, GObject.BindingFlags.SYNC_CREATE); - - - // The clone follows its source when the taskbar is scrolled. - let taskbarScrollView = this.get_parent().get_parent(); - let adjustment = this._dtpPanel.checkIfVertical() ? taskbarScrollView.vscroll.get_adjustment() : taskbarScrollView.hscroll.get_adjustment(); - let adjustmentChangedId = adjustment.connect('notify::value', () => this._updateCloneContainerPosition(cloneContainer)); - - // Update clone position when an item is added to / removed from the taskbar. - let taskbarBox = this.get_parent(); - let taskbarBoxAllocationChangedId = taskbarBox.connect('notify::allocation', () => this._updateCloneContainerPosition(cloneContainer)); - - // The clone itself - this._raisedClone = cloneButton.child; - this._raisedClone.connect('destroy', () => { - adjustment.disconnect(adjustmentChangedId); - taskbarBox.disconnect(taskbarBoxAllocationChangedId); - GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => { - cloneContainer.destroy(); - return GLib.SOURCE_REMOVE; - }); - delete this._raisedClone; - }); - - this._raisedClone.source.opacity = 0; - Main.uiGroup.add_child(cloneContainer); - } - - // Animate the clone. - // AppIcon actors cannot go outside the taskbar so the animation is done with a clone. - // If level is zero, the clone is dropped and destroyed. - raise(level) { - if (this._raisedClone) - Utils.stopAnimations(this._raisedClone); - else if (level) - this._createRaisedClone(); - else - return; - - let panelPosition = this._dtpPanel.getPosition(); - let panelElementPositions = this._dtpPanel.panelManager.panelsElementPositions[this._dtpPanel.monitor.index] || Pos.defaults; - let taskbarPosition = panelElementPositions.filter(pos => pos.element == 'taskbar')[0].position; - - let vertical = panelPosition == St.Side.LEFT || panelPosition == St.Side.RIGHT; - let translationDirection = panelPosition == St.Side.TOP || panelPosition == St.Side.LEFT ? 1 : -1; - let rotationDirection; - if (panelPosition == St.Side.LEFT || taskbarPosition == Pos.STACKED_TL) - rotationDirection = -1; - else if (panelPosition == St.Side.RIGHT || taskbarPosition == Pos.STACKED_BR) - rotationDirection = 1; - else { - let items = this.get_parent().get_children(); - let index = items.indexOf(this); - rotationDirection = (index - (items.length - 1) / 2) / ((items.length - 1) / 2); - } - - let duration = iconAnimationSettings.duration / 1000; - let rotation = iconAnimationSettings.rotation; - let travel = iconAnimationSettings.travel; - let zoom = iconAnimationSettings.zoom; - - // level is about 1 for the icon that is hovered, less for others. - // time depends on the translation to do. - let [width, height] = this._raisedClone.source.get_transformed_size(); - let translationMax = (vertical ? width : height) * (travel + (zoom - 1) / 2); - let translationEnd = translationMax * level; - let translationDone = vertical ? this._raisedClone.translation_x : this._raisedClone.translation_y; - let translationTodo = Math.abs(translationEnd - translationDone); - let scale = 1 + (zoom - 1) * level; - let rotationAngleZ = rotationDirection * rotation * level; - let time = duration * translationTodo / translationMax; - - let options = { - scale_x: scale, scale_y: scale, - rotation_angle_z: rotationAngleZ, - time: time, - transition: 'easeOutQuad', - onComplete: () => { - if (!level) { - this._raisedClone.source.opacity = 255; - this._raisedClone.destroy(); - delete this._raisedClone; - } - } - }; - options[vertical ? 'translation_x' : 'translation_y'] = translationDirection * translationEnd; - - Utils.animate(this._raisedClone, options); - } - - // Animate this and cloneContainer, since cloneContainer translation is bound to this. - stretch(translation) { - let duration = iconAnimationSettings.duration / 1000; - let zoom = iconAnimationSettings.zoom; - let animatedProperty = this._dtpPanel.checkIfVertical() ? 'translation_y' : 'translation_x'; - let isShowing = this.opacity != 255 || this.child.opacity != 255; - - if (isShowing) { - // Do no stop the animation initiated in DashItemContainer.show. - this[animatedProperty] = zoom * translation; - } else { - let options = { - time: duration, - transition: 'easeOutQuad', - }; - options[animatedProperty] = zoom * translation; - - Utils.stopAnimations(this); - Utils.animate(this, options); - } - } -}); - -const DragPlaceholderItem = GObject.registerClass({ -}, class DragPlaceholderItem extends St.Widget { - - _init(appIcon, iconSize, isVertical) { - super._init({ style: AppIcons.getIconContainerStyle(isVertical), layout_manager: new Clutter.BinLayout() }); - - this.child = { _delegate: appIcon }; - - this._clone = new Clutter.Clone({ - source: appIcon.icon._iconBin, - width: iconSize, - height: iconSize - }); - - this.add_child(this._clone); - } - - destroy() { - this._clone.destroy(); - super.destroy(); - } -}); - -export function getAppStableSequence(app, monitor) { - let windows = AppIcons.getInterestingWindows(app, monitor); - - return windows.reduce((prevWindow, window) => { - return Math.min(prevWindow, getWindowStableSequence(window)); - }, Infinity); -} - -export function sortWindowsCompareFunction(windowA, windowB) { - return getWindowStableSequence(windowA) - getWindowStableSequence(windowB); -} - -export function getWindowStableSequence(window) { - return ('_dtpPosition' in window ? window._dtpPosition : window.get_stable_sequence()); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/transparency.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/transparency.js deleted file mode 100644 index 25ff00f1..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/transparency.js +++ /dev/null @@ -1,252 +0,0 @@ -/* - * This file is part of the Dash-To-Panel extension for Gnome 3 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -import GdkPixbuf from 'gi://GdkPixbuf'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import St from 'gi://St'; - -import * as Proximity from './proximity.js'; -import * as Utils from './utils.js'; -import {SETTINGS} from './extension.js'; - -export const DynamicTransparency = class { - - constructor(dtpPanel) { - this._dtpPanel = dtpPanel; - this._proximityManager = dtpPanel.panelManager.proximityManager; - this._proximityWatchId = 0; - this.currentBackgroundColor = 0; - - this._initialPanelStyle = dtpPanel.panel.get_style(); - - this._signalsHandler = new Utils.GlobalSignalsHandler(); - this._bindSignals(); - - this._updateAnimationDuration(); - this._updateAllAndSet(); - this._updateProximityWatch(); - } - - destroy() { - this._signalsHandler.destroy(); - this._proximityManager.removeWatch(this._proximityWatchId); - - this._dtpPanel.panel.set_style(this._initialPanelStyle); - } - - updateExternalStyle() { - this._updateComplementaryStyles(); - this._setBackground(); - } - - _bindSignals() { - this._signalsHandler.add( - [ - Utils.getStageTheme(), - 'changed', - () => this._updateAllAndSet() - ], - [ - Main.overview, - [ - 'showing', - 'hiding' - ], - () => this._updateAlphaAndSet() - ], - [ - SETTINGS, - [ - 'changed::trans-use-custom-bg', - 'changed::trans-bg-color' - ], - () => this._updateColorAndSet() - ], - [ - SETTINGS, - [ - 'changed::trans-use-custom-opacity', - 'changed::trans-panel-opacity', - 'changed::trans-bg-color', - 'changed::trans-dynamic-anim-target', - 'changed::trans-use-dynamic-opacity' - ], - () => this._updateAlphaAndSet() - ], - [ - SETTINGS, - [ - 'changed::trans-use-custom-gradient', - 'changed::trans-gradient-top-color', - 'changed::trans-gradient-bottom-color', - 'changed::trans-gradient-top-opacity', - 'changed::trans-gradient-bottom-opacity' - ], - () => this._updateGradientAndSet() - ], - [ - SETTINGS, - [ - 'changed::trans-dynamic-behavior', - 'changed::trans-use-dynamic-opacity', - 'changed::trans-dynamic-distance' - ], - () => this._updateProximityWatch() - ], - [ - SETTINGS, - 'changed::trans-dynamic-anim-time', - () => this._updateAnimationDuration() - ] - ); - } - - _updateProximityWatch() { - this._proximityManager.removeWatch(this._proximityWatchId); - - if (SETTINGS.get_boolean('trans-use-dynamic-opacity')) { - let isVertical = this._dtpPanel.checkIfVertical(); - let threshold = SETTINGS.get_int('trans-dynamic-distance'); - - this._windowOverlap = false; - this._updateAlphaAndSet() - - this._proximityWatchId = this._proximityManager.createWatch( - this._dtpPanel.panelBox.get_parent(), - this._dtpPanel.monitor.index, - Proximity.Mode[SETTINGS.get_string('trans-dynamic-behavior')], - isVertical ? threshold : 0, - isVertical ? 0 : threshold, - overlap => { - this._windowOverlap = overlap; - this._updateAlphaAndSet(); - } - ); - } - } - - _updateAnimationDuration() { - this.animationDuration = (SETTINGS.get_int('trans-dynamic-anim-time') * 0.001) + 's;'; - } - - _updateAllAndSet() { - let themeBackground = this._getThemeBackground(true); - - this._updateColor(themeBackground); - this._updateAlpha(themeBackground); - this._updateComplementaryStyles(); - this._updateGradient(); - this._setBackground(); - this._setGradient(); - } - - _updateColorAndSet() { - this._updateColor(); - this._setBackground(); - } - - _updateAlphaAndSet() { - this._updateAlpha(); - this._setBackground(); - } - - _updateGradientAndSet() { - this._updateGradient(); - this._setGradient(); - } - - _updateComplementaryStyles() { - let panelThemeNode = this._dtpPanel.panel.get_theme_node(); - - this._complementaryStyles = 'border-radius: ' + panelThemeNode.get_border_radius(0) + 'px;'; - } - - _updateColor(themeBackground) { - this.backgroundColorRgb = SETTINGS.get_boolean('trans-use-custom-bg') ? - SETTINGS.get_string('trans-bg-color') : - (themeBackground || this._getThemeBackground()); - } - - _updateAlpha(themeBackground) { - if (this._windowOverlap && !Main.overview.visibleTarget && SETTINGS.get_boolean('trans-use-dynamic-opacity')) { - this.alpha = SETTINGS.get_double('trans-dynamic-anim-target'); - } else { - this.alpha = SETTINGS.get_boolean('trans-use-custom-opacity') ? - SETTINGS.get_double('trans-panel-opacity') : - (themeBackground || this._getThemeBackground()).alpha * 0.003921569; // 1 / 255 = 0.003921569 - } - } - - _updateGradient() { - this._gradientStyle = ''; - - if (SETTINGS.get_boolean('trans-use-custom-gradient')) { - this._gradientStyle += 'background-gradient-direction: ' + (this._dtpPanel.checkIfVertical() ? 'horizontal;' : 'vertical;') + - 'background-gradient-start: ' + Utils.getrgbaColor(SETTINGS.get_string('trans-gradient-top-color'), - SETTINGS.get_double('trans-gradient-top-opacity')) + - 'background-gradient-end: ' + Utils.getrgbaColor(SETTINGS.get_string('trans-gradient-bottom-color'), - SETTINGS.get_double('trans-gradient-bottom-opacity')); - } - } - - _setBackground() { - this.currentBackgroundColor = Utils.getrgbaColor(this.backgroundColorRgb, this.alpha); - - let transition = 'transition-duration:' + this.animationDuration; - - this._dtpPanel.set_style('background-color: ' + this.currentBackgroundColor + transition + this._complementaryStyles); - } - - _setGradient() { - this._dtpPanel.panel.set_style( - 'background: none; ' + - 'border-image: none; ' + - 'background-image: none; ' + - this._gradientStyle + - 'transition-duration:' + this.animationDuration - ); - } - - _getThemeBackground(reload) { - if (reload || !this._themeBackground) { - let fakePanel = new St.Bin({ name: 'panel' }); - Main.uiGroup.add_child(fakePanel); - let fakeTheme = fakePanel.get_theme_node() - this._themeBackground = this._getBackgroundImageColor(fakeTheme) || fakeTheme.get_background_color(); - Main.uiGroup.remove_child(fakePanel); - } - - return this._themeBackground; - } - - _getBackgroundImageColor(theme) { - let bg = null; - - try { - let imageFile = theme.get_background_image() || theme.get_border_image().get_file(); - - if (imageFile) { - let imageBuf = GdkPixbuf.Pixbuf.new_from_file(imageFile.get_path()); - let pixels = imageBuf.get_pixels(); - - bg = { red: pixels[0], green: pixels[1], blue: pixels[2], alpha: pixels[3] }; - } - } catch (error) {} - - return bg; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxAdvancedOptions.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxAdvancedOptions.ui deleted file mode 100644 index 3007d952..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxAdvancedOptions.ui +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - vertical - 600 - 24 - 32 - 32 - 32 - 32 - - - - - - - Nothing yet! - For real... - - - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxAnimateAppIconHoverOptions.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxAnimateAppIconHoverOptions.ui deleted file mode 100644 index f49e2d72..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxAnimateAppIconHoverOptions.ui +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - 0 - 300 - 1 - 5 - - - - -30 - 30 - 1 - 5 - - - - 0 - 100 - 1 - 5 - - - - 100 - 250 - 1 - 5 - - - - 0 - 3 - 0.1 - 1 - - - - 1 - 10 - 0.1 - 1 - - - - vertical - 600 - 24 - 32 - 32 - 32 - 32 - - - - - - - Animation type - - - center - - Simple - Ripple - Plank - - - - - - - - - - - - - - - Duration - - - center - 300 - animate_appicon_hover_options_duration_adjustment - 0 - 0 - right - True - - - - - - - - Rotation - - - end - 300 - animate_appicon_hover_options_rotation_adjustment - 0 - 0 - right - True - - - - - - - - Travel - - - center - 300 - animate_appicon_hover_options_travel_adjustment - 0 - 0 - right - True - - - - - - - - Zoom - - - center - 300 - animate_appicon_hover_options_zoom_adjustment - 0 - 0 - right - True - - - - - - - - Convexity - - - end - 300 - animate_appicon_hover_options_convexity_adjustment - 1 - 1 - right - True - - - - - - - - Extent - - - center - 300 - animate_appicon_hover_options_extent_adjustment - 0 - 0 - right - True - - - - - - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxDotOptions.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxDotOptions.ui deleted file mode 100644 index 18c81ecb..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxDotOptions.ui +++ /dev/null @@ -1,271 +0,0 @@ - - - - - - 5 - 100 - 5 - 5 - - - - 5 - 1 - 5 - - - - 600 - 600 - True - - - - vertical - 24 - 32 - 32 - 32 - 32 - - - - - - - Highlight focused application - - - center - - - - - - - - - - - - - - Icon dominant color - - - center - - - - - - - - Custom color - - - center - - - - - - - - Highlight opacity - - - center - 5 - focus_highlight_opacity_adjustment - 5 - - - - - - - - - - - - - - Indicator size (px) - - - center - 0 - dot_size_adjustment - - - - - - - - Indicator color - Icon Dominant - - - center - - - - - - - - - - - - - - Indicator color - Override Theme - - - center - - - - - - - - - - - - - 1 window open (or ungrouped) - - - center - Apply to all - - - - - center - - - - - - - - 2 windows open - - - center - - - - - - - - 3 windows open - - - center - - - - - - - - 4+ windows open - - - center - - - - - - - - - - - - - - Use different for unfocused - - - center - - - - - - - - - - - - - - 1 window open (or ungrouped) - - - center - Apply to all - - - - - center - - - - - - - - 2 windows open - - - center - - - - - - - - 3 windows open - - - center - - - - - - - - 4+ windows open - - - center - - - - - - - - - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxDynamicOpacityOptions.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxDynamicOpacityOptions.ui deleted file mode 100644 index 447f50d3..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxDynamicOpacityOptions.ui +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - 200 - 1 - 10 - - - - 100 - 5 - 10 - - - - 2000 - 1 - 10 - - - - vertical - 600 - 24 - 32 - 32 - 32 - 32 - - - - - - - The panel background opacity is affected by - - - center - - All windows - Focused windows - Maximized windows - - - - - - - - - Change opacity when a window gets closer than (px) - - - center - 4 - 50 - trans_distance_adjustment - True - 50 - - - - - - - - Change opacity to (%) - - - 0 - center - trans_opacity_min_adjustment - - - - - - - - Opacity change animation duration (ms) - - - 4 - 50 - center - trans_anim_time_adjustment - True - 50 - - - - - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxGroupAppsOptions.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxGroupAppsOptions.ui deleted file mode 100644 index ffc4d903..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxGroupAppsOptions.ui +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - 6 - 24 - 1 - 100 - - - - 1000 - 10 - 100 - - - - vertical - 600 - 24 - 32 - 32 - 32 - 32 - - - - - - - Font size (px) of the application titles (default is 14) - - - center - 4 - 0 - group_apps_label_font_size_adjustment - True - - - - - - - - Font weight of application titles - - - center - - inherit from theme - normal - lighter - bold - bolder - - - - - - - - - Font color of the application titles - - - True - center - - - - - - - - Font color of the minimized application titles - - - True - center - - - - - - - - - - - - - - Maximum width (px) of the application titles - (default is 160) - - - center - 4 - 0 - group_apps_label_max_width_adjustment - True - - - - - - - - Use a fixed width for the application titles - The application titles all have the same width, even if their texts are shorter than the maximum width. The maximum width value is used as the fixed width. - - - center - - - - - - - - - - - - - - Display running indicators on unfocused applications - - - center - - - - - - - - Use the favorite icons as application launchers - - - center - - - - - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxIntellihideOptions.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxIntellihideOptions.ui deleted file mode 100644 index 0da3ec29..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxIntellihideOptions.ui +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - 1 - 9990 - 10 - 100 - - - - 1 - 5000 - 10 - 100 - - - - 10 - 2000 - 10 - 100 - - - - 10 - 4000 - 10 - 100 - - - - 10000 - 10 - 100 - - - - vertical - 600 - 24 - 32 - 32 - 32 - 32 - - - - - - - Only hide the panel when it is obstructed by windows - - - center - - - - - - - - The panel hides from - - - center - - All windows - Focused windows - Maximized windows - - - - - - - - - - - - - - - Require pressure at the edge of the screen to reveal the panel - - - center - - - - - - - - Required pressure threshold (px) - - - center - 4 - 0 - intellihide_pressure_threshold_adjustment - True - - - - - - - - Required pressure timeout (ms) - - - center - 4 - 0 - intellihide_pressure_time_adjustment - True - - - - - - - - - - - - - - Allow the panel to be revealed while in fullscreen mode - - - center - - - - - - - - Only hide secondary panels - (requires multi-monitors option) - - - center - - - - - - - - Keyboard shortcut to reveal and hold the panel - Syntax: &lt;Shift&gt;, &lt;Ctrl&gt;, &lt;Alt&gt;, &lt;Super&gt; - - - center - 12 - e.g. <Super>i - - - - - - - - - - - - - - Hide and reveal animation duration (ms) - - - center - 4 - 0 - intellihide_animation_time_adjustment - True - - - - - - - - Delay before hiding the panel (ms) - - - center - 4 - 10 - intellihide_close_delay_adjustment - True - 10 - - - - - - - - Delay before enabling intellihide on start (ms) - - - center - 4 - 10 - intellihide_enable_hide_delay_adjustment - True - 10 - - - - - - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxMiddleClickOptions.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxMiddleClickOptions.ui deleted file mode 100644 index 023845e6..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxMiddleClickOptions.ui +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - vertical - 600 - 24 - 32 - 32 - 32 - 32 - - - - - - - Shift+Click action - When set to minimize, double clicking minimizes all the windows of the application. - - - center - - Raise windows - Minimize window - Launch new instance - Cycle through windows - Cycle windows + minimize - Toggle single / Preview multiple - Toggle single / Cycle multiple - Quit - - - - - - - - - - - - - - - Middle-Click action - Behavior for Middle-Click. - - - center - - Raise windows - Minimize window - Launch new instance - Cycle through windows - Cycle windows + minimize - Toggle single / Preview multiple - Toggle single / Cycle multiple - Quit - - - - - - - - - - - - - - - Shift+Middle-Click action - Behavior for Shift+Middle-Click. - - - center - - Raise windows - Minimize window - Launch new instance - Cycle through windows - Cycle windows + minimize - Toggle single / Preview multiple - Toggle single / Cycle multiple - Quit - - - - - - - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxOverlayShortcut.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxOverlayShortcut.ui deleted file mode 100644 index 5f875896..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxOverlayShortcut.ui +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - 10000 - 250 - 1000 - - - - vertical - 600 - 24 - 32 - 32 - 32 - 32 - - - - - - - Hotkeys prefix - Hotkeys will either be Super+Number or Super+Alt+Num - - - center - - Super - Super + Alt - - - - - - - - - Number overlay - Temporarily show the application numbers over the icons when using the hotkeys. - - - center - - Never - Show temporarily - Always visible - - - - - - - - - Hide timeout (ms) - - - center - shortcut_time_adjustment - - - - - - - - Shortcut to show the overlay for 2 seconds - Syntax: &lt;Shift&gt;, &lt;Ctrl&gt;, &lt;Alt&gt;, &lt;Super&gt; - - - center - 12 - e.g. <Super>q - - - - - - - - Show window previews on hotkey - Show previews when the application have multiple instances - - - center - - - - - - - - Hotkeys are activated with - Select which keyboard number keys are used to activate the hotkeys - - - center - - Number row - Numeric keypad - Both - - - - - - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxScrollIconOptions.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxScrollIconOptions.ui deleted file mode 100644 index bb457ff4..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxScrollIconOptions.ui +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - 2000 - 10 - 50 - - - - vertical - 600 - 24 - 32 - 32 - 32 - 32 - - - - - - - Delay between mouse scroll events (ms) - Use this value to limit the number of captured mouse scroll events. - - - center - 4 - 50 - scroll_icon_options_delay_adjustment - True - 50 - - - - - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxScrollPanelOptions.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxScrollPanelOptions.ui deleted file mode 100644 index 2354b76d..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxScrollPanelOptions.ui +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - 2000 - 10 - 50 - - - - vertical - 600 - 24 - 32 - 32 - 32 - 32 - - - - - - - Delay between mouse scroll events (ms) - Use this value to limit the number of captured mouse scroll events. - - - center - 4 - 50 - scroll_panel_options_delay_adjustment - True - 50 - - - - - - - - Show popup when changing workspace - This affects workspace popup when scrolling on the panel only. - - - center - - - - - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxSecondaryMenuOptions.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxSecondaryMenuOptions.ui deleted file mode 100644 index 483ddc82..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxSecondaryMenuOptions.ui +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - vertical - 600 - 24 - 32 - 32 - 32 - 32 - - - - - - - Integrate <i>AppMenu</i> items - - - center - - - - - - - - <i>Show Details</i> menu item - - - center - - - - - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxShowApplicationsOptions.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxShowApplicationsOptions.ui deleted file mode 100644 index ee183a5b..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxShowApplicationsOptions.ui +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - 100 - 1 - 10 - - - - vertical - 600 - 24 - 32 - 32 - 32 - 32 - - - - - - - Show Applications icon - - - 32 - 32 - gtk-missing-image - 32 - - - - - - - - - - 8 - 8 - 8 - 8 - 140 - True - - - - - - - - - - - - - - Show Applications icon side padding (px) - - - center - 0 - show_applications_side_padding_adjustment - - - - - - - - Override escape key and return to desktop - - - center - - - - - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxShowDesktopOptions.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxShowDesktopOptions.ui deleted file mode 100644 index be5d21c1..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxShowDesktopOptions.ui +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - 1 - 40 - 1 - 10 - - - - 5000 - 10 - 100 - - - - 5000 - 10 - 100 - - - - vertical - 600 - 24 - 32 - 32 - 32 - 32 - - - - - - - - - center - 4 - 1 - show_showdesktop_width_adjustment - True - 1 - - - - - - - - Override Show Desktop line color - - > - True - center - True - - - - - center - - - - - - - - - - - - - - Reveal the desktop when hovering the Show Desktop button - - - True - end - center - - - - - - - - Delay before revealing the desktop (ms) - - - center - 4 - 1 - show_showdesktop_delay_adjustment - True - 1 - - - - - - - - Fade duration (ms) - - - center - 4 - 1 - show_showdesktop_time_adjustment - True - 1 - - - - - - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxWindowPreviewOptions.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxWindowPreviewOptions.ui deleted file mode 100644 index 87cecff4..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/BoxWindowPreviewOptions.ui +++ /dev/null @@ -1,484 +0,0 @@ - - - - - - 9999 - 25 - 100 - - - - 1000 - 10 - 50 - - - - 9999 - 25 - 100 - - - - 100 - 800 - 10 - 50 - - - - 50 - 1 - 5 - - - - 100 - 5 - 10 - - - - 8 - 48 - 1 - 100 - - - - 6 - 24 - 1 - 100 - - - - 50 - 9999 - 25 - 100 - - - - 255 - 10 - 25 - - - - 800 - 600 - True - - - - vertical - 600 - 24 - 32 - 32 - 32 - 32 - - - - - - - Time (ms) before showing - (400 is default) - - - center - 4 - 0 - preview_timeout_adjustment - True - - - - - - - - Time (ms) before hiding - (100 is default) - - - False - - - 4 - Immediate on application icon click - True - - - - - - - center - 4 - 25 - leave_timeout_adjustment - True - 25 - - - - - - - - Animation time (ms) - - - center - 4 - 0 - preview_animation_time_adjustment - True - - - - - - - - - - - - - - Middle click on the preview to close the window - - - center - - - - - - - - - - - - - - Window previews preferred size (px) - - - center - 4 - 100 - preview_size_adjustment - True - 100 - - - - - - - - Window previews aspect ratio X (width) - - - center - - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - - - - - - Fixed - True - center - - - - - - - - Window previews aspect ratio Y (height) - - - center - - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - - - - - - Fixed - True - center - - - - - - - - Window previews padding (px) - - - center - 4 - 50 - preview_padding_adjustment - True - 50 - - - - - - - - - - - - - - Use custom opacity for the previews background - If disabled, the previews background have the same opacity as the panel. - - - center - - - - - center - 5 - preview_opacity_adjustment - 5 - - - - - - - - - - - - - - Close button and header position - - - Bottom - False - center - True - - - - - - Top - False - center - preview_title_position_bottom_button - - - - - - - - - - - - - - - Display window preview headers - - > - center - - - - - - - - Icon size (px) of the window preview - If disabled, the previews icon size will be based on headerbar size - - - center - - - - - center - 4 - 6 - preview_custom_icon_size_adjustment - True - 6 - - - - - - - - Font size (px) of the preview titles - - - center - 4 - 6 - preview_title_font_size_adjustment - True - 6 - - - - - - - - Font weight of the preview titles - - - center - - inherit from theme - normal - lighter - bold - bolder - - - - - - - - - Font color of the preview titles - - - True - center - - - - - - - - - - - - - - Enable window peeking - When hovering over a window preview for some time, the window gets distinguished. - - - center - - - - - - - - Enter window peeking mode timeout (ms) - Time of inactivity while hovering over a window preview needed to enter the window peeking mode. - - - center - 4 - 50 - enter_peek_mode_timeout_adjustment - True - 50 - - - - - - - - Window peeking mode opacity - All windows except for the peeked one have their opacity set to the same value. - - - center - 4 - 0 - peek_mode_opacity_adjustment - True - - - - - - - - - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/SettingsAbout.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/SettingsAbout.ui deleted file mode 100644 index 4ab0476b..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/SettingsAbout.ui +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - About - help-about-symbolic - - - - - Info - - - - Version - - - ... - - - - - - - - Source - - - GitHub - True - center - https://github.com/home-sweet-gnome/dash-to-panel - - - - - - - - - - - - Export and Import - - - - Export and import settings - Use the buttons below to create a settings file from your current preferences that can be imported on a different machine. - - - - - - - - 8 - 8 - 4 - 4 - 8 - end - - - Export to file - True - - - - - Import from file - True - - - - - - - - - - - - - - - - <span size="small">This program comes with ABSOLUTELY NO WARRANTY. See the <a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public License, version 2 or later</a> for details.</span> - True - center - True - - - - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/SettingsAction.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/SettingsAction.ui deleted file mode 100644 index 20cbf9c1..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/SettingsAction.ui +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - Action - view-pin-symbolic - - - - - Click action - - - - Click action - Behaviour when clicking on the icon of a running application. - - - True - center - - - emblem-system-symbolic - - - - - - - - center - - Cycle windows + minimize - Cycle through windows - Toggle single / Preview multiple - Toggle single / Cycle multiple - Toggle windows - Raise windows - Launch new instance - - - - - - - - - - - - - Scroll action - - - - Scroll panel action - Behavior when mouse scrolling over the panel. - - - True - True - end - center - - - True - emblem-system-symbolic - - - - - - - - True - center - True - - Do nothing - Switch workspace - Cycle windows - Change volume - - - - - - - - - Scroll icon action - Behavior when mouse scrolling over an application icon. - - - True - center - - - True - emblem-system-symbolic - - - - - - - - center - True - - Do nothing - Cycle windows - Same as panel - - - - - - - - - - - - - Hotkey overlay - - - - Use hotkeys to activate apps - Enable Super+(0-9) as shortcuts to activate apps. It can also be used together with Shift and Ctrl. - - - True - center - - - emblem-system-symbolic - - - - - - - - center - - - - - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/SettingsBehavior.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/SettingsBehavior.ui deleted file mode 100644 index c56b7c71..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/SettingsBehavior.ui +++ /dev/null @@ -1,192 +0,0 @@ - - - - - Behavior - preferences-system-symbolic - - - - - Applications - - - - Show favorite applications - - - center - - - - - - - - Show favorite applications on secondary panels - - - center - - - - - - - - Show running applications - - - center - - - - - - - - Ungroup applications - - - True - center - - - emblem-system-symbolic - - - - - - - - center - - - - - - - - Show notification counter badge - - - True - end - center - - - - - - - - - - - - Hover - - - - Show window previews on hover - - - True - center - - - emblem-system-symbolic - - - - - - - - center - - - - - - - - Show tooltip on hover - - - center - - - - - - - - - - - - Isolate - - - - Isolate Workspaces - - - center - - - - - - - - Isolate monitors - - - center - - - - - - - - - - - - Overview - - - - Click empty space to close overview - - - center - - - - - - - - Disable show overview on startup - - - center - - - - - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/SettingsFineTune.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/SettingsFineTune.ui deleted file mode 100644 index c9def52e..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/SettingsFineTune.ui +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - 0.33 - 1 - 0.01 - 0.1 - - - - 0.33 - 1 - 0.01 - 0.1 - - - - 0.33 - 1 - 0.01 - 0.1 - - - - 0.33 - 1 - 0.01 - 0.1 - - - - 0.33 - 1 - 0.01 - 0.1 - - - - Fine-Tune - preferences-other-symbolic - - - - - Font size - - - - Tray Font Size - (0 = theme default) - - - 300 - tray_size_adjustment - 0 - 0 - right - True - - - - - - - - - LeftBox Font Size - (0 = theme default) - - - 300 - leftbox_size_adjustment - 0 - 0 - right - True - - - - - - - - - - - - - Padding - - - - Tray Item Padding - (-1 = theme default) - - - 300 - tray_padding_adjustment - 0 - 0 - right - True - - - - - - - - - Status Icon Padding - (-1 = theme default) - - - 300 - statusicon_padding_adjustment - 0 - 0 - right - True - - - - - - - - - LeftBox Padding - (-1 = theme default) - - - 300 - leftbox_padding_adjustment - 0 - 0 - right - True - - - - - - - - - - - - - Animate - - - - Animate switching applications - - - center - - - - - - - - Animate launching new windows - - - center - - - - - - - - - - - - Gnome functionality - - - - Keep original gnome-shell dash - (overview) - - - center - - - - - - - - Keep original gnome-shell top panel - - - center - - - - - - - - Activate panel menu buttons on click only - (e.g. date menu) - - - center - - - - - - - - Force Activities hot corner on primary monitor - - - center - - - - - - - - - - - - - - - App icon secondary menu - (right-click menu) - - - True - center - - - emblem-system-symbolic - - - - - - - - - - - - - - - - - - Advanced Options - False - True - end - - - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/SettingsPosition.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/SettingsPosition.ui deleted file mode 100644 index 8130f7f9..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/SettingsPosition.ui +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - 0.33 - 1 - 0.01 - 0.1 - - - - 100 - 1 - 10 - - - - Position - find-location-symbolic - - - - - Panel - - - - Display the main panel on - - - center - - - - - - - - Display panels on all monitors - - - center - - - - - - - - - - - - - Panel Intellihide - Hide and reveal the panel according to preferences - - - True - center - - - emblem-system-symbolic - - - - - - - - center - - - - - - - - - - - - Order and Position on monitors - - - - - Monitor - - - 6 - 6 - 6 - 6 - - - Apply changes to all monitors - False - start - True - - - - - end - center - True - - - - - - - - - - - - - - - - - Panel screen position - - - Bottom - False - center - True - - - - - - Top - False - center - position_bottom_button - - - - - - Left - False - center - position_bottom_button - - - - - - Right - False - center - position_bottom_button - - - - - - - - - Panel thickness - (default is 48) - - - 300 - panel_size_adjustment - 0 - 0 - right - True - - - - - - - - - Panel length (%) - (default is 100) - - - 300 - panel_length_adjustment - 0 - 0 - right - True - - - - - - - - Anchor - - - center - - Start - Middle - End - - - - - - - - - - - - - - - - Taskbar Display - - - 6 - 6 - True - none - - - - - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/SettingsStyle.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/SettingsStyle.ui deleted file mode 100644 index abe5c341..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/ui/SettingsStyle.ui +++ /dev/null @@ -1,359 +0,0 @@ - - - - - - 0.33 - 1 - 0.01 - 0.1 - - - - 0.33 - 1 - 0.01 - 0.1 - - - - 100 - 5 - 10 - - - - 100 - 5 - 10 - - - - 100 - 5 - 10 - - - - Style - applications-graphics-symbolic - - - - - AppIcon style - - - - App Icon Margin - (default is 8) - - - 300 - appicon_margin_adjustment - 0 - 0 - right - True - - - - - - - - - App Icon Padding - (default is 4) - - - 300 - appicon_padding_adjustment - 0 - 0 - right - True - - - - - - - - - Animate hovering app icons - - - True - center - - - emblem-system-symbolic - - - - - - - - center - - - - - - - - Icon style - - - center - - Normal - Symbolic - - - - - - - - - - - - Running indicator - - - - Running indicator position - - - Bottom - center - - - - - - Top - center - dots_bottom_button - - - - - - Left - center - dots_bottom_button - - - - - - Right - center - dots_bottom_button - - - - - - - - - Running indicator style (Focused app) - - - center - - - emblem-system-symbolic - - - - - - - - center - - Dots - Squares - Dashes - Segmented - Solid - Ciliora - Metro - - - - - - - - - Running indicator style (Unfocused apps) - - - center - - Dots - Squares - Dashes - Segmented - Solid - Ciliora - Metro - - - - - - - - - - - - - Panel style - - - - Override panel theme background color - - - center - - - - - center - - - - - - - - - - - - - - Override panel theme background opacity - - - center - - - - - - - - Panel background opacity (%) - - - center - 0 - trans_opacity_adjustment - - - - - - - - Dynamic background opacity - Change opacity when a window gets close to the panel - - - True - center - - - emblem-system-symbolic - - - - - - - - center - - - - - - - - - - - - - - - Override panel theme gradient - - - center - - - - - - - - Gradient top color and opacity (%) - - - True - center - - - - - center - 0 - trans_gradient_opacity1_adjustment - - - - - - - - Gradient bottom color and opacity (%) - - - True - center - - - - - center - 0 - trans_gradient_opacity2_adjustment - - - - - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/utils.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/utils.js deleted file mode 100644 index df67ad96..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/utils.js +++ /dev/null @@ -1,889 +0,0 @@ -/* - * This file is part of the Dash-To-Panel extension for Gnome 3 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * - * Credits: - * This file is based on code from the Dash to Dock extension by micheleg - * and code from the Taskbar extension by Zorin OS - * Some code was also adapted from the upstream Gnome Shell source code. - */ - -import Clutter from 'gi://Clutter'; -import Cogl from 'gi://Cogl'; -import GdkPixbuf from 'gi://GdkPixbuf'; -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import Graphene from 'gi://Graphene'; -import Meta from 'gi://Meta'; -import Shell from 'gi://Shell'; -import St from 'gi://St'; -import * as Util from 'resource:///org/gnome/shell/misc/util.js'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import * as MessageTray from 'resource:///org/gnome/shell/ui/messageTray.js'; - -const SCROLL_TIME = Util.SCROLL_TIME / (Util.SCROLL_TIME > 1 ? 1000 : 1); - -// simplify global signals and function injections handling -// abstract class -export const BasicHandler = class { - - constructor() { - this._storage = new Object(); - } - - add(/*unlimited 3-long array arguments*/){ - - // convert arguments object to array, concatenate with generic - let args = [].concat('generic', [].slice.call(arguments)); - // call addWithLabel with ags as if they were passed arguments - this.addWithLabel.apply(this, args); - } - - destroy() { - for( let label in this._storage ) - this.removeWithLabel(label); - } - - addWithLabel( label /* plus unlimited 3-long array arguments*/) { - - if(this._storage[label] == undefined) - this._storage[label] = new Array(); - - // skip first element of the arguments - for( let i = 1; i < arguments.length; i++ ) { - let item = this._storage[label]; - let handlers = this._create(arguments[i]); - - for (let j = 0, l = handlers.length; j < l; ++j) { - item.push(handlers[j]); - } - } - - } - - removeWithLabel(label){ - - if(this._storage[label]) { - for( let i = 0; i < this._storage[label].length; i++ ) { - this._remove(this._storage[label][i]); - } - - delete this._storage[label]; - } - } - - /* Virtual methods to be implemented by subclass */ - // create single element to be stored in the storage structure - _create(item){ - throw new Error('no implementation of _create in ' + this); - } - - // correctly delete single element - _remove(item){ - throw new Error('no implementation of _remove in ' + this); - } -} - -// Manage global signals -export const GlobalSignalsHandler = class extends BasicHandler { - - _create(item) { - let handlers = []; - - item[1] = [].concat(item[1]); - - for (let i = 0, l = item[1].length; i < l; ++i) { - let object = item[0]; - let event = item[1][i]; - let callback = item[2] - try { - let id = object.connect(event, callback); - - handlers.push([object, id]); - } catch (e) - { - - } - } - - return handlers; - } - - _remove(item){ - item[0].disconnect(item[1]); - } -}; - -/** - * Manage function injection: both instances and prototype can be overridden - * and restored - */ -export const InjectionsHandler = class extends BasicHandler { - - _create(item) { - let object = item[0]; - let name = item[1]; - let injectedFunction = item[2]; - let original = object[name]; - - object[name] = injectedFunction; - return [[object, name, injectedFunction, original]]; - } - - _remove(item) { - let object = item[0]; - let name = item[1]; - let original = item[3]; - object[name] = original; - } -}; - -/** - * Manage timeouts: the added timeouts have their id reset on completion - */ -export const TimeoutsHandler = class extends BasicHandler { - - _create(item) { - let name = item[0]; - let delay = item[1]; - let timeoutHandler = item[2]; - - this._remove(item); - - this[name] = GLib.timeout_add(GLib.PRIORITY_DEFAULT, delay, () => { - this[name] = 0; - timeoutHandler(); - - return GLib.SOURCE_REMOVE; - }); - - return [[name]]; - } - - remove(name) { - this._remove([name]) - } - - _remove(item) { - let name = item[0]; - - if (this[name]) { - GLib.Source.remove(this[name]); - this[name] = 0; - } - } - - getId(name) { - return this[name] ? this[name] : 0; - } -}; - -// This is wrapper to maintain compatibility with GNOME-Shell 3.30+ as well as -// previous versions. -export const DisplayWrapper = { - getScreen() { - return global.screen || global.display; - }, - - getWorkspaceManager() { - return global.screen || global.workspace_manager; - }, - - getMonitorManager() { - return global.screen || global.backend.get_monitor_manager(); - } -}; - -let unredirectEnabled = true -export const setDisplayUnredirect = (enable) => { - if (enable && !unredirectEnabled) - Meta.enable_unredirect_for_display(global.display); - else if (!enable && unredirectEnabled) - Meta.disable_unredirect_for_display(global.display); - - unredirectEnabled = enable; -}; - -export const getSystemMenuInfo = function() { - return { - name: 'quickSettings', - constructor: Main.panel.statusArea.quickSettings.constructor - }; -} - -export const getCurrentWorkspace = function() { - return DisplayWrapper.getWorkspaceManager().get_active_workspace(); -}; - -export const getWorkspaceByIndex = function(index) { - return DisplayWrapper.getWorkspaceManager().get_workspace_by_index(index); -}; - -export const getWorkspaceCount = function() { - return DisplayWrapper.getWorkspaceManager().n_workspaces; -}; - -export const getStageTheme = function() { - return St.ThemeContext.get_for_stage(global.stage); -}; - -export const getScaleFactor = function() { - return getStageTheme().scale_factor || 1; -}; - -export const findIndex = function(array, predicate) { - if (array) { - if (Array.prototype.findIndex) { - return array.findIndex(predicate); - } - - for (let i = 0, l = array.length; i < l; ++i) { - if (predicate(array[i])) { - return i; - } - } - } - - return -1; -}; - -export const find = function(array, predicate) { - let index = findIndex(array, predicate); - - if (index > -1) { - return array[index]; - } -}; - -export const mergeObjects = function(main, bck) { - for (const prop in bck) { - if (!main.hasOwnProperty(prop) && bck.hasOwnProperty(prop)) { - main[prop] = bck[prop]; - } - } - - return main; -}; - -export const getTrackedActorData = (actor) => { - let trackedIndex = Main.layoutManager._findActor(actor); - - if (trackedIndex >= 0) - return Main.layoutManager._trackedActors[trackedIndex] -} - -export const getTransformedAllocation = function(actor) { - let extents = actor.get_transformed_extents(); - let topLeft = extents.get_top_left(); - let bottomRight = extents.get_bottom_right(); - - return { x1: topLeft.x, x2: bottomRight.x, y1: topLeft.y, y2: bottomRight.y }; -}; - -export const setClip = function(actor, x, y, width, height) { - actor.set_clip(0, 0, width, height); - actor.set_position(x, y); - actor.set_size(width, height); -}; - -export const addKeybinding = function(key, settings, handler, modes) { - if (!Main.wm._allowedKeybindings[key]) { - Main.wm.addKeybinding( - key, - settings, - Meta.KeyBindingFlags.NONE, - modes || (Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW), - handler - ); - } -}; - -export const removeKeybinding = function(key) { - if (Main.wm._allowedKeybindings[key]) { - Main.wm.removeKeybinding(key); - } -}; - -export const getrgbColor = function(color) { - color = typeof color === 'string' ? ColorUtils.color_from_string(color)[1] : color; - - return { red: color.red, green: color.green, blue: color.blue }; -}; - -export const getrgbaColor = function(color, alpha, offset) { - if (alpha <= 0) { - return 'transparent; '; - } - - let rgb = getrgbColor(color); - - if (offset) { - ['red', 'green', 'blue'].forEach(k => { - rgb[k] = Math.min(255, Math.max(0, rgb[k] + offset)); - - if (rgb[k] == color[k]) { - rgb[k] = Math.min(255, Math.max(0, rgb[k] - offset)); - } - }); - } - - return 'rgba(' + rgb.red + ',' + rgb.green + ',' + rgb.blue + ',' + (Math.floor(alpha * 100) * 0.01) + '); ' ; -}; - -export const checkIfColorIsBright = function(color) { - let rgb = getrgbColor(color); - let brightness = 0.2126 * rgb.red + 0.7152 * rgb.green + 0.0722 * rgb.blue; - - return brightness > 128; -}; - -export const getMouseScrollDirection = function(event) { - let direction; - - switch (event.get_scroll_direction()) { - case Clutter.ScrollDirection.UP: - case Clutter.ScrollDirection.LEFT: - direction = 'up'; - break; - case Clutter.ScrollDirection.DOWN: - case Clutter.ScrollDirection.RIGHT: - direction = 'down'; - break; - } - - return direction; -}; - -export const checkIfWindowHasTransient = function(window) { - let hasTransient; - - window.foreach_transient(t => !(hasTransient = true)); - - return hasTransient; -}; - -export const activateSiblingWindow = function(windows, direction, startWindow) { - let windowIndex = windows.indexOf(global.display.focus_window); - let nextWindowIndex = windowIndex < 0 ? - startWindow ? windows.indexOf(startWindow) : 0 : - windowIndex + (direction == 'up' ? -1 : 1); - - if (nextWindowIndex == windows.length) { - nextWindowIndex = 0; - } else if (nextWindowIndex < 0) { - nextWindowIndex = windows.length - 1; - } - - if (windowIndex != nextWindowIndex) { - Main.activateWindow(windows[nextWindowIndex]); - } -}; - -export const animateWindowOpacity = function(window, tweenOpts) { - //there currently is a mutter bug with the windowactor opacity, starting with 3.34 - //https://gitlab.gnome.org/GNOME/mutter/issues/836 - - //since 3.36, a workaround is to use the windowactor's child for the fade animation - //this leaves a "shadow" on the desktop, so the windowactor needs to be hidden - //when the animation is complete - let visible = tweenOpts.opacity > 0; - let windowActor = window; - let initialOpacity = window.opacity; - - window = windowActor.get_first_child() || windowActor; - - if (!windowActor.visible && visible) { - window.opacity = 0; - windowActor.visible = visible; - tweenOpts.opacity = Math.min(initialOpacity, tweenOpts.opacity); - } - - if (!visible) { - tweenOpts.onComplete = () => { - windowActor.visible = visible; - window.opacity = initialOpacity; - }; - } - - animate(window, tweenOpts); -}; - -export const animate = function(actor, options) { - //the original animations used Tweener instead of Clutter animations, so we - //use "time" and "delay" properties defined in seconds, as opposed to Clutter - //animations "duration" and "delay" which are defined in milliseconds - if (options.delay) { - options.delay = options.delay * 1000; - } - - options.duration = options.time * 1000; - delete options.time; - - if (options.transition) { - //map Tweener easing equations to Clutter animation modes - options.mode = { - 'easeInCubic': Clutter.AnimationMode.EASE_IN_CUBIC, - 'easeInOutCubic': Clutter.AnimationMode.EASE_IN_OUT_CUBIC, - 'easeInOutQuad': Clutter.AnimationMode.EASE_IN_OUT_QUAD, - 'easeOutQuad': Clutter.AnimationMode.EASE_OUT_QUAD - }[options.transition] || Clutter.AnimationMode.LINEAR; - - delete options.transition; - } - - let params = [options]; - - if ('value' in options && actor instanceof St.Adjustment) { - params.unshift(options.value); - delete options.value; - } - - actor.ease.apply(actor, params); -} - -export const isAnimating = function(actor, prop) { - return !!actor.get_transition(prop); -} - -export const stopAnimations = function(actor) { - actor.remove_all_transitions(); -} - -export const getIndicators = function(delegate) { - if (delegate instanceof St.BoxLayout) { - return delegate; - } - - return delegate.indicators; -} - -export const getPoint = function(coords) { - return new Graphene.Point(coords); -} - -export const notify = function(text, iconName, action, isTransient) { - let source = new MessageTray.SystemNotificationSource(); - let notification = new MessageTray.Notification(source, 'Dash to Panel', text); - let notifyFunc = source.showNotification || source.notify; - - if (iconName) { - source.createIcon = function() { - return new St.Icon({ icon_name: iconName }); - }; - } - - if (action) { - if (!(action instanceof Array)) { - action = [action]; - } - - action.forEach(a => notification.addAction(a.text, a.func)); - } - - Main.messageTray.add(source); - - notification.setTransient(isTransient); - notifyFunc.call(source, notification); -}; - -/* - * This is a copy of the same function in utils.js, but also adjust horizontal scrolling - * and perform few further cheks on the current value to avoid changing the values when - * it would be clamp to the current one in any case. - * Return the amount of shift applied -*/ -export const ensureActorVisibleInScrollView = function(scrollView, actor, fadeSize, onComplete) { - const vadjustment = scrollView.vadjustment; - const hadjustment = scrollView.hadjustment; - let [vvalue, vlower, vupper, vstepIncrement, vpageIncrement, vpageSize] = vadjustment.get_values(); - let [hvalue, hlower, hupper, hstepIncrement, hpageIncrement, hpageSize] = hadjustment.get_values(); - - let [hvalue0, vvalue0] = [hvalue, vvalue]; - - let voffset = fadeSize; - let hoffset = fadeSize; - - let box = actor.get_allocation_box(); - let y1 = box.y1, y2 = box.y2, x1 = box.x1, x2 = box.x2; - - let parent = actor.get_parent(); - while (parent != scrollView) { - if (!parent) - throw new Error("actor not in scroll view"); - - let box = parent.get_allocation_box(); - y1 += box.y1; - y2 += box.y1; - x1 += box.x1; - x2 += box.x1; - parent = parent.get_parent(); - } - - if (y1 < vvalue + voffset) - vvalue = Math.max(0, y1 - voffset); - else if (vvalue < vupper - vpageSize && y2 > vvalue + vpageSize - voffset) - vvalue = Math.min(vupper -vpageSize, y2 + voffset - vpageSize); - - if (x1 < hvalue + hoffset) - hvalue = Math.max(0, x1 - hoffset); - else if (hvalue < hupper - hpageSize && x2 > hvalue + hpageSize - hoffset) - hvalue = Math.min(hupper - hpageSize, x2 + hoffset - hpageSize); - - let tweenOpts = { - time: SCROLL_TIME, - onComplete: onComplete || (() => {}), - transition: 'easeOutQuad' - }; - - if (vvalue !== vvalue0) { - animate(vadjustment, mergeObjects(tweenOpts, { value: vvalue })); - } - - if (hvalue !== hvalue0) { - animate(hadjustment, mergeObjects(tweenOpts, { value: hvalue })); - } - - return [hvalue- hvalue0, vvalue - vvalue0]; -} - -/** - * ColorUtils is adapted from https://github.com/micheleg/dash-to-dock - */ -let colorNs = Clutter.Color ? Clutter : Cogl - -export const ColorUtils = { - color_from_string: colorNs.color_from_string, - Color: colorNs.Color, - - colorLuminance(r, g, b, dlum) { - // Darken or brighten color by a fraction dlum - // Each rgb value is modified by the same fraction. - // Return "#rrggbb" strin - - let rgbString = '#'; - - rgbString += ColorUtils._decimalToHex(Math.round(Math.min(Math.max(r*(1+dlum), 0), 255)), 2); - rgbString += ColorUtils._decimalToHex(Math.round(Math.min(Math.max(g*(1+dlum), 0), 255)), 2); - rgbString += ColorUtils._decimalToHex(Math.round(Math.min(Math.max(b*(1+dlum), 0), 255)), 2); - - return rgbString; - }, - - _decimalToHex(d, padding) { - // Convert decimal to an hexadecimal string adding the desired padding - - let hex = d.toString(16); - while (hex.length < padding) - hex = '0'+ hex; - return hex; - }, - - HSVtoRGB(h, s, v) { - // Convert hsv ([0-1, 0-1, 0-1]) to rgb ([0-255, 0-255, 0-255]). - // Following algorithm in https://en.wikipedia.org/wiki/HSL_and_HSV - // here with h = [0,1] instead of [0, 360] - // Accept either (h,s,v) independently or {h:h, s:s, v:v} object. - // Return {r:r, g:g, b:b} object. - - if (arguments.length === 1) { - s = h.s; - v = h.v; - h = h.h; - } - - let r,g,b; - let c = v*s; - let h1 = h*6; - let x = c*(1 - Math.abs(h1 % 2 - 1)); - let m = v - c; - - if (h1 <=1) - r = c + m, g = x + m, b = m; - else if (h1 <=2) - r = x + m, g = c + m, b = m; - else if (h1 <=3) - r = m, g = c + m, b = x + m; - else if (h1 <=4) - r = m, g = x + m, b = c + m; - else if (h1 <=5) - r = x + m, g = m, b = c + m; - else - r = c + m, g = m, b = x + m; - - return { - r: Math.round(r * 255), - g: Math.round(g * 255), - b: Math.round(b * 255) - }; - }, - - RGBtoHSV(r, g, b) { - // Convert rgb ([0-255, 0-255, 0-255]) to hsv ([0-1, 0-1, 0-1]). - // Following algorithm in https://en.wikipedia.org/wiki/HSL_and_HSV - // here with h = [0,1] instead of [0, 360] - // Accept either (r,g,b) independently or {r:r, g:g, b:b} object. - // Return {h:h, s:s, v:v} object. - - if (arguments.length === 1) { - r = r.r; - g = r.g; - b = r.b; - } - - let h,s,v; - - let M = Math.max(r, g, b); - let m = Math.min(r, g, b); - let c = M - m; - - if (c == 0) - h = 0; - else if (M == r) - h = ((g-b)/c) % 6; - else if (M == g) - h = (b-r)/c + 2; - else - h = (r-g)/c + 4; - - h = h/6; - v = M/255; - if (M !== 0) - s = c/M; - else - s = 0; - - return {h: h, s: s, v: v}; - } -}; - -/** - * DominantColorExtractor is adapted from https://github.com/micheleg/dash-to-dock - */ -let themeLoader = null; -let iconCacheMap = new Map(); -const MAX_CACHED_ITEMS = 1000; -const BATCH_SIZE_TO_DELETE = 50; -const DOMINANT_COLOR_ICON_SIZE = 64; - -export const DominantColorExtractor = class { - - constructor(app){ - this._app = app; - } - - /** - * Try to get the pixel buffer for the current icon, if not fail gracefully - */ - _getIconPixBuf() { - let iconTexture = this._app.create_icon_texture(16); - - if (themeLoader === null) { - themeLoader = new St.IconTheme(); - } - - // Unable to load the icon texture, use fallback - if (iconTexture instanceof St.Icon === false) { - return null; - } - - iconTexture = iconTexture.get_gicon(); - - // Unable to load the icon texture, use fallback - if (iconTexture === null) { - return null; - } - - if (iconTexture instanceof Gio.FileIcon) { - // Use GdkPixBuf to load the pixel buffer from the provided file path - return GdkPixbuf.Pixbuf.new_from_file(iconTexture.get_file().get_path()); - } - - // Get the pixel buffer from the icon theme - if (iconTexture instanceof Gio.ThemedIcon) { - let icon_info = themeLoader.lookup_icon(iconTexture.get_names()[0], - DOMINANT_COLOR_ICON_SIZE, 0); - - if (icon_info !== null) { - return icon_info.load_icon(); - } - } - - return null; - } - - /** - * The backlight color choosing algorithm was mostly ported to javascript from the - * Unity7 C++ source of Canonicals: - * https://bazaar.launchpad.net/~unity-team/unity/trunk/view/head:/launcher/LauncherIcon.cpp - * so it more or less works the same way. - */ - _getColorPalette() { - if (iconCacheMap.get(this._app.get_id())) { - // We already know the answer - return iconCacheMap.get(this._app.get_id()); - } - - let pixBuf = this._getIconPixBuf(); - if (pixBuf == null) - return null; - - let pixels = pixBuf.get_pixels(), - offset = 0; - - let total = 0, - rTotal = 0, - gTotal = 0, - bTotal = 0; - - let resample_y = 1, - resample_x = 1; - - // Resampling of large icons - // We resample icons larger than twice the desired size, as the resampling - // to a size s - // DOMINANT_COLOR_ICON_SIZE < s < 2*DOMINANT_COLOR_ICON_SIZE, - // most of the case exactly DOMINANT_COLOR_ICON_SIZE as the icon size is tipycally - // a multiple of it. - let width = pixBuf.get_width(); - let height = pixBuf.get_height(); - - // Resample - if (height >= 2* DOMINANT_COLOR_ICON_SIZE) - resample_y = Math.floor(height/DOMINANT_COLOR_ICON_SIZE); - - if (width >= 2* DOMINANT_COLOR_ICON_SIZE) - resample_x = Math.floor(width/DOMINANT_COLOR_ICON_SIZE); - - if (resample_x !==1 || resample_y !== 1) - pixels = this._resamplePixels(pixels, resample_x, resample_y); - - // computing the limit outside the for (where it would be repeated at each iteration) - // for performance reasons - let limit = pixels.length; - for (let offset = 0; offset < limit; offset+=4) { - let r = pixels[offset], - g = pixels[offset + 1], - b = pixels[offset + 2], - a = pixels[offset + 3]; - - let saturation = (Math.max(r,g, b) - Math.min(r,g, b)); - let relevance = 0.1 * 255 * 255 + 0.9 * a * saturation; - - rTotal += r * relevance; - gTotal += g * relevance; - bTotal += b * relevance; - - total += relevance; - } - - total = total * 255; - - let r = rTotal / total, - g = gTotal / total, - b = bTotal / total; - - let hsv = ColorUtils.RGBtoHSV(r * 255, g * 255, b * 255); - - if (hsv.s > 0.15) - hsv.s = 0.65; - hsv.v = 0.90; - - let rgb = ColorUtils.HSVtoRGB(hsv.h, hsv.s, hsv.v); - - // Cache the result. - let backgroundColor = { - lighter: ColorUtils.colorLuminance(rgb.r, rgb.g, rgb.b, 0.2), - original: ColorUtils.colorLuminance(rgb.r, rgb.g, rgb.b, 0), - darker: ColorUtils.colorLuminance(rgb.r, rgb.g, rgb.b, -0.5) - }; - - if (iconCacheMap.size >= MAX_CACHED_ITEMS) { - //delete oldest cached values (which are in order of insertions) - let ctr=0; - for (let key of iconCacheMap.keys()) { - if (++ctr > BATCH_SIZE_TO_DELETE) - break; - iconCacheMap.delete(key); - } - } - - iconCacheMap.set(this._app.get_id(), backgroundColor); - - return backgroundColor; - } - - /** - * Downsample large icons before scanning for the backlight color to - * improve performance. - * - * @param pixBuf - * @param pixels - * @param resampleX - * @param resampleY - * - * @return []; - */ - _resamplePixels(pixels, resampleX, resampleY) { - let resampledPixels = []; - // computing the limit outside the for (where it would be repeated at each iteration) - // for performance reasons - let limit = pixels.length / (resampleX * resampleY) / 4; - for (let i = 0; i < limit; i++) { - let pixel = i * resampleX * resampleY; - - resampledPixels.push(pixels[pixel * 4]); - resampledPixels.push(pixels[pixel * 4 + 1]); - resampledPixels.push(pixels[pixel * 4 + 2]); - resampledPixels.push(pixels[pixel * 4 + 3]); - } - - return resampledPixels; - } - -}; - -export const drawRoundedLine = function(cr, x, y, width, height, isRoundLeft, isRoundRight, stroke, fill) { - if (height > width) { - y += Math.floor((height - width) / 2.0); - height = width; - } - - height = 2.0 * Math.floor(height / 2.0); - - const leftRadius = isRoundLeft ? height / 2.0 : 0.0; - const rightRadius = isRoundRight ? height / 2.0 : 0.0; - - cr.moveTo(x + width - rightRadius, y); - cr.lineTo(x + leftRadius, y); - if (isRoundLeft) - cr.arcNegative(x + leftRadius, y + leftRadius, leftRadius, -Math.PI/2, Math.PI/2); - else - cr.lineTo(x, y + height); - cr.lineTo(x + width - rightRadius, y + height); - if (isRoundRight) - cr.arcNegative(x + width - rightRadius, y + rightRadius, rightRadius, Math.PI/2, -Math.PI/2); - else - cr.lineTo(x + width, y); - cr.closePath(); - - if (fill != null) { - cr.setSource(fill); - cr.fillPreserve(); - } - if (stroke != null) - cr.setSource(stroke); - cr.stroke(); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/windowPreview.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/windowPreview.js deleted file mode 100644 index f0a2741a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/dash-to-panel@jderose9.github.com/windowPreview.js +++ /dev/null @@ -1,1152 +0,0 @@ -/* - * This file is part of the Dash-To-Panel extension for Gnome 3 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -import GObject from 'gi://GObject'; -import Clutter from 'gi://Clutter'; -import GLib from 'gi://GLib'; -import Graphene from 'gi://Graphene'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import Meta from 'gi://Meta'; -import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js'; -import St from 'gi://St'; - -import * as Taskbar from './taskbar.js'; -import * as Utils from './utils.js'; -import {SETTINGS, DESKTOPSETTINGS} from './extension.js'; -import {gettext as _} from 'resource:///org/gnome/shell/extensions/extension.js'; - -//timeout intervals -const ENSURE_VISIBLE_MS = 200; - -//timeout names -const T1 = 'openMenuTimeout'; -const T2 = 'closeMenuTimeout'; -const T3 = 'peekTimeout'; -const T4 = 'ensureVisibleTimeout'; - -const MAX_TRANSLATION = 40; -const HEADER_HEIGHT = 38; -const MAX_CLOSE_BUTTON_SIZE = 30; -const MIN_DIMENSION = 100; -const FOCUSED_COLOR_OFFSET = 24; -const HEADER_COLOR_OFFSET = -12; -const FADE_SIZE = 36; -const PEEK_INDEX_PROP = '_dtpPeekInitialIndex'; - -let headerHeight = 0; -let alphaBg = 0; -let isLeftButtons = false; -let isTopHeader = true; -let isManualStyling = false; -let scaleFactor = 1; -let animationTime = 0; -let aspectRatio = {}; - -export const PreviewMenu = GObject.registerClass({ - Signals: { 'open-state-changed': {} } -}, class PreviewMenu extends St.Widget { - - _init(panel) { - super._init({ layout_manager: new Clutter.BinLayout() }); - - let geom = panel.geom; - this.panel = panel; - this.currentAppIcon = null; - this._focusedPreview = null; - this._peekedWindow = null; - this.allowCloseWindow = true; - this.peekInitialWorkspaceIndex = -1; - this.opened = false; - this.isVertical = geom.position == St.Side.LEFT || geom.position == St.Side.RIGHT; - this._translationProp = 'translation_' + (this.isVertical ? 'x' : 'y'); - this._translationDirection = (geom.position == St.Side.TOP || geom.position == St.Side.LEFT ? -1 : 1); - this._translationOffset = Math.min(panel.dtpSize, MAX_TRANSLATION) * this._translationDirection; - - this.menu = new St.Widget({ - name: 'preview-menu', - layout_manager: new Clutter.BinLayout(), - reactive: true, - track_hover: true, - x_expand: true, - y_expand: true, - x_align: Clutter.ActorAlign[geom.position != St.Side.RIGHT ? 'START' : 'END'], - y_align: Clutter.ActorAlign[geom.position != St.Side.BOTTOM ? 'START' : 'END'] - }); - this._box = new St.BoxLayout({ vertical: this.isVertical }); - this._scrollView = new St.ScrollView({ - name: 'dashtopanelPreviewScrollview', - hscrollbar_policy: St.PolicyType.NEVER, - vscrollbar_policy: St.PolicyType.NEVER, - enable_mouse_scrolling: true, - y_expand: !this.isVertical - }); - - this._scrollView.add_child(this._box); - this.menu.add_child(this._scrollView); - this.add_child(this.menu); - } - - enable() { - this._timeoutsHandler = new Utils.TimeoutsHandler(); - this._signalsHandler = new Utils.GlobalSignalsHandler(); - - Main.layoutManager.addChrome(this, { affectsInputRegion: false }); - Main.layoutManager.trackChrome(this.menu, { affectsInputRegion: true }); - - this._resetHiddenState(); - this._refreshGlobals(); - this._updateClip(); - this.menu.set_position(1, 1); - - this._signalsHandler.add( - [ - this.menu, - 'notify::hover', - () => this._onHoverChanged() - ], - [ - this._scrollView, - 'scroll-event', - this._onScrollEvent.bind(this) - ], - [ - this.panel.panelBox, - 'style-changed', - () => this._updateClip() - ], - [ - Utils.DisplayWrapper.getScreen(), - 'in-fullscreen-changed', - () => { - if (global.display.focus_window && global.display.focus_window.is_fullscreen()) { - this.close(true); - } - } - ], - [ - SETTINGS, - [ - 'changed::panel-sizes', - 'changed::window-preview-size', - 'changed::window-preview-padding', - 'changed::window-preview-show-title' - ], - () => { - this._refreshGlobals(); - this._updateClip(); - } - ] - ); - } - - disable() { - this._timeoutsHandler.destroy(); - this._signalsHandler.destroy(); - - this.close(true); - - Main.layoutManager.untrackChrome(this.menu); - Main.layoutManager.removeChrome(this); - } - - requestOpen(appIcon) { - let timeout = SETTINGS.get_int('show-window-previews-timeout'); - - if (this.opened) { - timeout = Math.min(100, timeout); - } - - this._endOpenCloseTimeouts(); - this._timeoutsHandler.add([T1, timeout, () => this.open(appIcon)]); - } - - requestClose() { - this._endOpenCloseTimeouts(); - this._addCloseTimeout(); - } - - open(appIcon, preventCloseWindow) { - if (this.currentAppIcon != appIcon) { - this.currentAppIcon = appIcon; - this.allowCloseWindow = !preventCloseWindow; - - if (!this.opened) { - this._refreshGlobals(); - - this.set_height(this.clipHeight); - this.menu.show(); - - setStyle(this.menu, 'background: ' + Utils.getrgbaColor(this.panel.dynamicTransparency.backgroundColorRgb, alphaBg)); - } - - this._mergeWindows(appIcon); - this._updatePosition(); - this._animateOpenOrClose(true); - - this._setReactive(true); - this._setOpenedState(true); - } - } - - close(immediate) { - this._endOpenCloseTimeouts(); - this._removeFocus(); - this._endPeek(); - - if (immediate) { - Utils.stopAnimations(this.menu); - this._resetHiddenState(); - } else { - this._animateOpenOrClose(false, () => this._resetHiddenState()); - } - - this._setReactive(false); - this.currentAppIcon = null; - } - - update(appIcon, windows) { - if (this.currentAppIcon == appIcon) { - if (windows && !windows.length) { - this.close(); - } else { - this._addAndRemoveWindows(windows); - this._updatePosition(); - } - } - } - - updatePosition() { - this._updatePosition(); - } - - focusNext() { - let previews = this._box.get_children(); - let currentIndex = this._focusedPreview ? previews.indexOf(this._focusedPreview) : -1; - let nextIndex = currentIndex + 1; - - nextIndex = previews[nextIndex] ? nextIndex : 0; - - if (previews[nextIndex]) { - this._removeFocus(); - previews[nextIndex].setFocus(true); - this._focusedPreview = previews[nextIndex]; - } - - return nextIndex; - } - - activateFocused() { - if (this.opened && this._focusedPreview) { - this._focusedPreview.activate(); - } - } - - requestPeek(window) { - this._timeoutsHandler.remove(T3); - - if (SETTINGS.get_boolean('peek-mode')) { - if (this.peekInitialWorkspaceIndex < 0) { - this._timeoutsHandler.add([T3, SETTINGS.get_int('enter-peek-mode-timeout'), () => this._peek(window)]); - } else { - this._peek(window); - } - } - } - - endPeekHere() { - this._endPeek(true); - } - - ensureVisible(preview) { - let [ , upper, pageSize] = this._getScrollAdjustmentValues(); - - if (upper > pageSize) { - this._timeoutsHandler.add([ - T4, - ENSURE_VISIBLE_MS, - () => Utils.ensureActorVisibleInScrollView(this._scrollView, preview, MIN_DIMENSION, () => this._updateScrollFade()) - ]); - } - } - - getCurrentAppIcon() { - return this.currentAppIcon; - } - - _setReactive(reactive) { - this._box.get_children().forEach(c => c.reactive = reactive); - this.menu.reactive = reactive; - } - - _setOpenedState(opened) { - this.opened = opened; - this.emit('open-state-changed'); - } - - _resetHiddenState() { - this.menu.hide(); - this.set_height(0); - this._setOpenedState(false); - this.menu.opacity = 0; - this.menu[this._translationProp] = this._translationOffset; - this._box.get_children().forEach(c => c.destroy()); - } - - _removeFocus() { - if (this._focusedPreview) { - this._focusedPreview.setFocus(false); - this._focusedPreview = null; - } - } - - _mergeWindows(appIcon, windows) { - windows = windows || (appIcon.window ? [appIcon.window] : appIcon.getAppIconInterestingWindows()); - windows.sort(Taskbar.sortWindowsCompareFunction); - - let currentPreviews = this._box.get_children(); - let l = Math.max(windows.length, currentPreviews.length); - - for (let i = 0; i < l; ++i) { - if (currentPreviews[i] && windows[i]) { - currentPreviews[i].assignWindow(windows[i], this.opened); - } else if (!currentPreviews[i]) { - this._addNewPreview(windows[i]); - } else if (!windows[i]) { - currentPreviews[i][!this.opened ? 'destroy' : 'animateOut'](); - } - } - } - - _addAndRemoveWindows(windows) { - let currentPreviews = this._box.get_children(); - - windows.sort(Taskbar.sortWindowsCompareFunction); - - for (let i = 0, l = windows.length; i < l; ++i) { - let currentIndex = Utils.findIndex(currentPreviews, c => c.window == windows[i]); - - if (currentIndex < 0) { - this._addNewPreview(windows[i]); - } else { - currentPreviews[currentIndex].assignWindow(windows[i]); - currentPreviews.splice(currentIndex, 1); - - if (this._peekedWindow && this._peekedWindow == windows[i]) { - this.requestPeek(windows[i]); - } - } - } - - currentPreviews.forEach(c => c.animateOut()); - } - - _addNewPreview(window) { - let preview = new Preview(this); - - this._box.add_child(preview); - preview.adjustOnStage(); - preview.assignWindow(window, this.opened); - } - - _addCloseTimeout() { - this._timeoutsHandler.add([T2, SETTINGS.get_int('leave-timeout'), () => this.close()]); - } - - _onHoverChanged() { - this._endOpenCloseTimeouts(); - - if (this.currentAppIcon && !this.menu.hover) { - this._addCloseTimeout(); - this._endPeek(); - } - } - - _onScrollEvent(actor, event) { - if (!event.is_pointer_emulated()) { - let vOrh = this.isVertical ? 'v' : 'h'; - let adjustment = this._scrollView['get_' + vOrh + 'scroll_bar']().get_adjustment(); - let increment = adjustment.step_increment; - let delta = increment; - - switch (event.get_scroll_direction()) { - case Clutter.ScrollDirection.UP: - delta = -increment; - break; - case Clutter.ScrollDirection.SMOOTH: - let [dx, dy] = event.get_scroll_delta(); - delta = dy * increment; - delta += dx * increment; - break; - } - - adjustment.set_value(adjustment.get_value() + delta); - this._updateScrollFade(); - } - - return Clutter.EVENT_STOP; - } - - _endOpenCloseTimeouts() { - this._timeoutsHandler.remove(T1); - this._timeoutsHandler.remove(T2); - this._timeoutsHandler.remove(T4); - } - - _refreshGlobals() { - isLeftButtons = Meta.prefs_get_button_layout().left_buttons.indexOf(Meta.ButtonFunction.CLOSE) >= 0; - isTopHeader = SETTINGS.get_string('window-preview-title-position') == 'TOP'; - isManualStyling = SETTINGS.get_boolean('window-preview-manual-styling'); - scaleFactor = Utils.getScaleFactor(); - headerHeight = SETTINGS.get_boolean('window-preview-show-title') ? HEADER_HEIGHT * scaleFactor : 0; - animationTime = SETTINGS.get_int('window-preview-animation-time') * .001; - aspectRatio.x = { - size: SETTINGS.get_int('window-preview-aspect-ratio-x'), - fixed: SETTINGS.get_boolean('window-preview-fixed-x') - }; - aspectRatio.y = { - size: SETTINGS.get_int('window-preview-aspect-ratio-y'), - fixed: SETTINGS.get_boolean('window-preview-fixed-y') - }; - - alphaBg = SETTINGS.get_boolean('preview-use-custom-opacity') ? - SETTINGS.get_int('preview-custom-opacity') * .01 : - this.panel.dynamicTransparency.alpha; - } - - _updateClip() { - let x, y, w; - let geom = this.panel.getGeometry(); - let panelBoxTheme = this.panel.panelBox.get_theme_node(); - let previewSize = (SETTINGS.get_int('window-preview-size') + - SETTINGS.get_int('window-preview-padding') * 2) * scaleFactor; - - if (this.isVertical) { - w = previewSize; - this.clipHeight = this.panel.monitor.height; - y = this.panel.monitor.y; - } else { - w = this.panel.monitor.width; - this.clipHeight = (previewSize + headerHeight); - x = this.panel.monitor.x; - } - - if (geom.position == St.Side.LEFT) { - x = this.panel.monitor.x + this.panel.dtpSize + panelBoxTheme.get_padding(St.Side.LEFT); - } else if (geom.position == St.Side.RIGHT) { - x = this.panel.monitor.x + this.panel.monitor.width - (this.panel.dtpSize + previewSize) - panelBoxTheme.get_padding(St.Side.RIGHT); - } else if (geom.position == St.Side.TOP) { - y = this.panel.monitor.y + this.panel.dtpSize + panelBoxTheme.get_padding(St.Side.TOP); - } else { //St.Side.BOTTOM - y = this.panel.monitor.y + this.panel.monitor.height - (this.panel.dtpSize + panelBoxTheme.get_padding(St.Side.BOTTOM) + previewSize + headerHeight); - } - - Utils.setClip(this, x, y, w, this.clipHeight); - } - - _updatePosition() { - let sourceNode = this.currentAppIcon.get_theme_node(); - let sourceContentBox = sourceNode.get_content_box(this.currentAppIcon.get_allocation_box()); - let sourceAllocation = Utils.getTransformedAllocation(this.currentAppIcon); - let [previewsWidth, previewsHeight] = this._getPreviewsSize(); - let appIconMargin = SETTINGS.get_int('appicon-margin') / scaleFactor; - let x = 0, y = 0; - - previewsWidth = Math.min(previewsWidth, this.panel.monitor.width); - previewsHeight = Math.min(previewsHeight, this.panel.monitor.height); - this._updateScrollFade(previewsWidth < this.panel.monitor.width && previewsHeight < this.panel.monitor.height); - - if (this.isVertical) { - y = sourceAllocation.y1 + appIconMargin - this.panel.monitor.y + (sourceContentBox.y2 - sourceContentBox.y1 - previewsHeight) * .5; - y = Math.max(y, 0); - y = Math.min(y, this.panel.monitor.height - previewsHeight); - } else { - x = sourceAllocation.x1 + appIconMargin - this.panel.monitor.x + (sourceContentBox.x2 - sourceContentBox.x1 - previewsWidth) * .5; - x = Math.max(x, 0); - x = Math.min(x, this.panel.monitor.width - previewsWidth); - } - - if (!this.opened) { - this.menu.set_position(x, y); - this.menu.set_size(previewsWidth, previewsHeight); - } else { - Utils.animate(this.menu, getTweenOpts({ x: x, y: y, width: previewsWidth, height: previewsHeight })); - } - } - - _updateScrollFade(remove) { - let [value, upper, pageSize] = this._getScrollAdjustmentValues(); - let needsFade = Math.round(upper) > Math.round(pageSize); - let fadeWidgets = this.menu.get_children().filter(c => c != this._scrollView); - - if (!remove && needsFade) { - if (!fadeWidgets.length) { - fadeWidgets.push(this._getFadeWidget()); - fadeWidgets.push(this._getFadeWidget(true)); - - this.menu.add_child(fadeWidgets[0]); - this.menu.add_child(fadeWidgets[1]); - } - - fadeWidgets[0].visible = value > 0; - fadeWidgets[1].visible = value + pageSize < upper; - } else if (remove || (!needsFade && fadeWidgets.length)) { - fadeWidgets.forEach(fw => fw.destroy()); - } - } - - _getScrollAdjustmentValues() { - let [value , , upper, , , pageSize] = this._scrollView[(this.isVertical ? 'v' : 'h') + 'adjustment'].get_values(); - - return [value, upper, pageSize]; - } - - _getFadeWidget(end) { - let x = 0, y = 0; - let startBg = Utils.getrgbaColor(this.panel.dynamicTransparency.backgroundColorRgb, Math.min(alphaBg + .1, 1)); - let endBg = Utils.getrgbaColor(this.panel.dynamicTransparency.backgroundColorRgb, 0) - let fadeStyle = 'background-gradient-start:' + startBg + - 'background-gradient-end:' + endBg + - 'background-gradient-direction:' + this.panel.getOrientation(); - - if (this.isVertical) { - y = end ? this.panel.monitor.height - FADE_SIZE : 0; - } else { - x = end ? this.panel.monitor.width - FADE_SIZE : 0; - } - - let fadeWidget = new St.Widget({ - reactive: false, - pivot_point: new Graphene.Point({ x: .5, y: .5 }), - rotation_angle_z: end ? 180 : 0, - style: fadeStyle, - x: x, y: y, - width: this.isVertical ? this.width : FADE_SIZE, - height: this.isVertical ? FADE_SIZE : this.height - }); - - return fadeWidget; - } - - _getPreviewsSize() { - let previewsWidth = 0; - let previewsHeight = 0; - - this._box.get_children().forEach(c => { - if (!c.animatingOut) { - let [width, height] = c.getSize(); - - if (this.isVertical) { - previewsWidth = Math.max(width, previewsWidth); - previewsHeight += height; - } else { - previewsWidth += width; - previewsHeight = Math.max(height, previewsHeight); - } - } - }); - - return [previewsWidth, previewsHeight]; - } - - _animateOpenOrClose(show, onComplete) { - let isTranslationAnimation = this.menu[this._translationProp] != 0; - let tweenOpts = { - opacity: show ? 255 : 0, - transition: show ? 'easeInOutQuad' : 'easeInCubic', - onComplete: () => { - if (isTranslationAnimation) { - Main.layoutManager._queueUpdateRegions(); - } - - (onComplete || (() => {}))(); - } - }; - - tweenOpts[this._translationProp] = show ? this._translationDirection : this._translationOffset; - - Utils.animate(this.menu, getTweenOpts(tweenOpts)); - } - - _peek(window) { - let currentWorkspace = Utils.getCurrentWorkspace(); - let windowWorkspace = window.get_workspace(); - let focusWindow = () => this._focusMetaWindow(SETTINGS.get_int('peek-mode-opacity'), window); - - this._restorePeekedWindowStack(); - - if (this._peekedWindow && windowWorkspace != currentWorkspace) { - currentWorkspace.list_windows().forEach(mw => this.animateWindowOpacity(mw, null, 255)) - } - - this._peekedWindow = window; - - if (currentWorkspace != windowWorkspace) { - this._switchToWorkspaceImmediate(windowWorkspace.index()); - this._timeoutsHandler.add([T3, 100, focusWindow]); - } else { - focusWindow(); - } - - if (this.peekInitialWorkspaceIndex < 0) { - this.peekInitialWorkspaceIndex = currentWorkspace.index(); - } - } - - _endPeek(stayHere) { - this._timeoutsHandler.remove(T3); - - if (this._peekedWindow) { - let immediate = !stayHere && this.peekInitialWorkspaceIndex != Utils.getCurrentWorkspace().index(); - - this._restorePeekedWindowStack(); - this._focusMetaWindow(255, this._peekedWindow, immediate, true); - this._peekedWindow = null; - - if (!stayHere) { - this._switchToWorkspaceImmediate(this.peekInitialWorkspaceIndex); - } - - this.peekInitialWorkspaceIndex = -1; - } - } - - _switchToWorkspaceImmediate(workspaceIndex) { - let workspace = Utils.getWorkspaceByIndex(workspaceIndex); - let shouldAnimate = Main.wm._shouldAnimate; - - if (!workspace || (!workspace.list_windows().length && - workspaceIndex < Utils.getWorkspaceCount() - 1)) { - workspace = Utils.getCurrentWorkspace(); - } - - Main.wm._shouldAnimate = () => false; - workspace.activate(global.display.get_current_time_roundtrip()); - Main.wm._shouldAnimate = shouldAnimate; - } - - _focusMetaWindow(dimOpacity, window, immediate, ignoreFocus) { - window.get_workspace().list_windows().forEach(mw => { - let wa = mw.get_compositor_private(); - let isFocused = !ignoreFocus && mw == window; - - if (wa) { - if (isFocused) { - mw[PEEK_INDEX_PROP] = wa.get_parent().get_children().indexOf(wa); - wa.get_parent().set_child_above_sibling(wa, null); - } - - if (isFocused && mw.minimized) { - wa.show(); - } - - this.animateWindowOpacity(mw, wa, isFocused ? 255 : dimOpacity, immediate) - } - }); - } - - animateWindowOpacity(metaWindow, windowActor, opacity, immediate) { - windowActor = windowActor || metaWindow.get_compositor_private(); - - if (windowActor && !metaWindow.minimized) { - let tweenOpts = getTweenOpts({ opacity }); - - if (immediate && !metaWindow.is_on_all_workspaces()) { - tweenOpts.time = 0; - } - - Utils.animateWindowOpacity(windowActor, tweenOpts); - } - } - - _restorePeekedWindowStack() { - let windowActor = this._peekedWindow ? this._peekedWindow.get_compositor_private() : null; - - if (windowActor) { - if (this._peekedWindow.hasOwnProperty(PEEK_INDEX_PROP)) { - windowActor.get_parent().set_child_at_index(windowActor, this._peekedWindow[PEEK_INDEX_PROP]); - delete this._peekedWindow[PEEK_INDEX_PROP]; - } - - if (this._peekedWindow.minimized) { - windowActor.hide(); - } - } - } -}); - -export const Preview = GObject.registerClass({ -}, class Preview extends St.Widget { - - _init(previewMenu) { - super._init({ - style_class: 'preview-container', - reactive: true, - track_hover: true, - layout_manager: new Clutter.BinLayout() - }); - - this.window = null; - this._waitWindowId = 0; - this._needsCloseButton = true; - this.cloneWidth = this.cloneHeight = 0; - this._previewMenu = previewMenu; - this._padding = SETTINGS.get_int('window-preview-padding') * scaleFactor; - this._previewDimensions = this._getPreviewDimensions(); - this.animatingOut = false; - - let box = new St.Widget({ layout_manager: new Clutter.BoxLayout({ orientation: Clutter.Orientation.VERTICAL }), y_expand: true }); - let [previewBinWidth, previewBinHeight] = this._getBinSize(); - let closeButton = new St.Button({ style_class: 'window-close', accessible_name: 'Close window' }); - - closeButton.add_child(new St.Icon({ icon_name: 'window-close-symbolic' })); - - this._closeButtonBin = new St.Widget({ - style_class: 'preview-close-btn-container', - layout_manager: new Clutter.BinLayout(), - opacity: 0, - x_expand: true, y_expand: true, - x_align: Clutter.ActorAlign[isLeftButtons ? 'START' : 'END'], - y_align: Clutter.ActorAlign[isTopHeader ? 'START' : 'END'] - }); - - this._closeButtonBin.add_child(closeButton); - - this._previewBin = new St.Widget({ - layout_manager: new Clutter.BinLayout(), - x_expand: true, y_expand: true, - style: 'padding: ' + this._padding / scaleFactor + 'px;' - }); - - this._previewBin.set_size(previewBinWidth, previewBinHeight); - - box.add_child(this._previewBin); - - if (headerHeight) { - let headerBox = new St.Widget({ - style_class: 'preview-header-box', - layout_manager: new Clutter.BoxLayout(), - x_expand: true, - y_align: Clutter.ActorAlign[isTopHeader ? 'START' : 'END'] - }); - - setStyle(headerBox, this._getBackgroundColor(HEADER_COLOR_OFFSET, 1)); - this._workspaceIndicator = new St.Label({ y_align: Clutter.ActorAlign.CENTER }); - this._windowTitle = new St.Label({ y_align: Clutter.ActorAlign.CENTER, x_expand: true }); - - this._iconBin = new St.Widget({ layout_manager: new Clutter.BinLayout() }); - this._iconBin.set_size(headerHeight, headerHeight); - - headerBox.add_child(this._iconBin); - headerBox.insert_child_at_index(this._workspaceIndicator, isLeftButtons ? 0 : 1); - headerBox.insert_child_at_index(this._windowTitle, isLeftButtons ? 1 : 2); - - box.insert_child_at_index(headerBox, isTopHeader ? 0 : 1); - } - - this.add_child(box); - this.add_child(this._closeButtonBin); - - closeButton.connect('clicked', () => this._onCloseBtnClick()); - this.connect('notify::hover', () => this._onHoverChanged()); - this.connect('button-release-event', (actor, e) => this._onButtonReleaseEvent(e)); - this.connect('destroy', () => this._onDestroy()); - } - - adjustOnStage() { - let closeButton = this._closeButtonBin.get_first_child(); - let closeButtonHeight = closeButton.height; - let maxCloseButtonSize = MAX_CLOSE_BUTTON_SIZE * scaleFactor; - let closeButtonBorderRadius = ''; - - if (closeButtonHeight > maxCloseButtonSize) { - closeButtonHeight = maxCloseButtonSize; - closeButton.set_size(closeButtonHeight, closeButtonHeight); - } - - if (!headerHeight) { - closeButtonBorderRadius = 'border-radius: '; - - if (isTopHeader) { - closeButtonBorderRadius += (isLeftButtons ? '0 0 4px 0;' : '0 0 0 4px;'); - } else { - closeButtonBorderRadius += (isLeftButtons ? '0 4px 0 0;' : '4px 0 0 0;'); - } - } - - setStyle( - this._closeButtonBin, - 'padding: ' + (headerHeight ? Math.round((headerHeight - closeButtonHeight) * .5 / scaleFactor) : 4) + 'px;' + - this._getBackgroundColor(HEADER_COLOR_OFFSET, headerHeight ? 1 : .6) + - closeButtonBorderRadius - ); - } - - assignWindow(window, animateSize) { - if (this.window != window) { - let _assignWindowClone = () => { - if (window.get_compositor_private()) { - let cloneBin = this._getWindowCloneBin(window); - - this._resizeClone(cloneBin, window); - this._addClone(cloneBin, animateSize); - this._previewMenu.updatePosition(); - } else if (!this._waitWindowId) { - this._waitWindowId = GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => { - this._waitWindowId = 0; - - if (this._previewMenu.opened) { - _assignWindowClone(); - } - - return GLib.SOURCE_REMOVE; - }); - } - }; - - _assignWindowClone(); - } - - this._cancelAnimateOut(); - this._removeWindowSignals(); - this.window = window; - this._needsCloseButton = this._previewMenu.allowCloseWindow && window.can_close() && !Utils.checkIfWindowHasTransient(window); - this._updateHeader(); - } - - animateOut() { - if (!this.animatingOut) { - let tweenOpts = getTweenOpts({ opacity: 0, width: 0, height: 0, onComplete: () => this.destroy() }); - - this.animatingOut = true; - - Utils.stopAnimations(this); - Utils.animate(this, tweenOpts); - } - } - - getSize() { - let [binWidth, binHeight] = this._getBinSize(); - - binWidth = Math.max(binWidth, this.cloneWidth + this._padding * 2); - binHeight = Math.max(binHeight, this.cloneHeight + this._padding * 2) + headerHeight; - - return [binWidth, binHeight]; - } - - setFocus(focused) { - this._hideOrShowCloseButton(!focused); - setStyle(this, this._getBackgroundColor(FOCUSED_COLOR_OFFSET, focused ? '-' : 0)); - - if (focused) { - this._previewMenu.ensureVisible(this); - this._previewMenu.requestPeek(this.window); - } - } - - activate() { - this._previewMenu.endPeekHere(); - this._previewMenu.close(); - Main.activateWindow(this.window); - } - - _onDestroy() { - if (this._waitWindowId) { - GLib.source_remove(this._waitWindowId); - this._waitWindowId = 0; - } - - this._removeWindowSignals(); - } - - _onHoverChanged() { - this.setFocus(this.hover); - } - - _onCloseBtnClick() { - this._hideOrShowCloseButton(true); - this.reactive = false; - - if (!SETTINGS.get_boolean('group-apps')) { - this._previewMenu.close(); - } else { - this._previewMenu.endPeekHere(); - } - - this.window.delete(global.get_current_time()); - } - - _onButtonReleaseEvent(e) { - switch (e.get_button()) { - case 1: // Left click - this.activate(); - break; - case 2: // Middle click - if (SETTINGS.get_boolean('preview-middle-click-close')) { - this._onCloseBtnClick(); - } - break; - case 3: // Right click - this._showContextMenu(e); - break; - } - - return Clutter.EVENT_STOP; - } - - _cancelAnimateOut() { - if (this.animatingOut) { - this.animatingOut = false; - - Utils.stopAnimations(this); - Utils.animate(this, getTweenOpts({ opacity: 255, width: this.cloneWidth, height: this.cloneHeight })); - } - } - - _showContextMenu(e) { - let coords = e.get_coords(); - let currentWorkspace = this._previewMenu.peekInitialWorkspaceIndex < 0 ? - Utils.getCurrentWorkspace() : - Utils.getWorkspaceByIndex(this._previewMenu.peekInitialWorkspaceIndex); - - Main.wm._showWindowMenu(null, this.window, Meta.WindowMenuType.WM, { - x: coords[0], - y: coords[1], - width: 0, - height: 0 - }); - - let menu = Main.wm._windowMenuManager._manager._menus[0]; - - menu.connect('open-state-changed', () => this._previewMenu.menu.sync_hover()); - this._previewMenu.menu.sync_hover(); - - if (this.window.get_workspace() != currentWorkspace) { - let menuItem = new PopupMenu.PopupMenuItem(_('Move to current Workspace') + ' [' + (currentWorkspace.index() + 1) + ']'); - let menuItems = menu.box.get_children(); - let insertIndex = Utils.findIndex(menuItems, c => c._delegate instanceof PopupMenu.PopupSeparatorMenuItem); - - insertIndex = insertIndex >= 0 ? insertIndex : menuItems.length - 1; - menu.addMenuItem(menuItem, insertIndex); - menuItem.connect('activate', () => this.window.change_workspace(currentWorkspace)); - } - } - - _removeWindowSignals() { - if (this._titleWindowChangeId) { - this.window.disconnect(this._titleWindowChangeId); - this._titleWindowChangeId = 0; - } - } - - _updateHeader() { - if (headerHeight) { - let iconTextureSize = SETTINGS.get_boolean('window-preview-use-custom-icon-size') ? - SETTINGS.get_int('window-preview-custom-icon-size') : - headerHeight / scaleFactor * .6; - let icon = this._previewMenu.getCurrentAppIcon().app.create_icon_texture(iconTextureSize); - let workspaceIndex = ''; - let workspaceStyle = null; - let fontScale = DESKTOPSETTINGS.get_double('text-scaling-factor'); - let commonTitleStyles = 'color: ' + SETTINGS.get_string('window-preview-title-font-color') + ';' + - 'font-size: ' + SETTINGS.get_int('window-preview-title-font-size') * fontScale + 'px;' + - 'font-weight: ' + SETTINGS.get_string('window-preview-title-font-weight') + ';'; - - this._iconBin.destroy_all_children(); - this._iconBin.add_child(icon); - - if (!SETTINGS.get_boolean('isolate-workspaces')) { - workspaceIndex = (this.window.get_workspace().index() + 1).toString(); - workspaceStyle = 'margin: 0 4px 0 ' + (isLeftButtons ? Math.round((headerHeight - icon.width) * .5) + 'px' : '0') + '; padding: 0 4px;' + - 'border: 2px solid ' + this._getRgbaColor(FOCUSED_COLOR_OFFSET, .8) + 'border-radius: 2px;' + commonTitleStyles; - } - - this._workspaceIndicator.text = workspaceIndex; - setStyle(this._workspaceIndicator, workspaceStyle); - - this._titleWindowChangeId = this.window.connect('notify::title', () => this._updateWindowTitle()); - setStyle(this._windowTitle, 'max-width: 0px; padding-right: 4px;' + commonTitleStyles); - this._updateWindowTitle(); - } - } - - _updateWindowTitle() { - this._windowTitle.text = this.window.title; - } - - _hideOrShowCloseButton(hide) { - if (this._needsCloseButton) { - Utils.animate(this._closeButtonBin, getTweenOpts({ opacity: hide ? 0 : 255 })); - } - } - - _getBackgroundColor(offset, alpha) { - return 'background-color: ' + this._getRgbaColor(offset, alpha) + - 'transition-duration:' + this._previewMenu.panel.dynamicTransparency.animationDuration; - } - - _getRgbaColor(offset, alpha) { - alpha = Math.abs(alpha); - - if (isNaN(alpha)) { - alpha = alphaBg; - } - - return Utils.getrgbaColor(this._previewMenu.panel.dynamicTransparency.backgroundColorRgb, alpha, offset); - } - - _addClone(newCloneBin, animateSize) { - let currentClones = this._previewBin.get_children(); - let newCloneOpts = getTweenOpts({ opacity: 255 }); - - this._previewBin.add_child(newCloneBin); - - if (currentClones.length) { - let currentCloneBin = currentClones.pop(); - let currentCloneOpts = getTweenOpts({ opacity: 0, onComplete: () => currentCloneBin.destroy() }); - - if (newCloneBin.width > currentCloneBin.width) { - newCloneOpts.width = newCloneBin.width; - newCloneBin.width = currentCloneBin.width; - } else { - currentCloneOpts.width = newCloneBin.width; - } - - if (newCloneBin.height > currentCloneBin.height) { - newCloneOpts.height = newCloneBin.height; - newCloneBin.height = currentCloneBin.height; - } else { - currentCloneOpts.height = newCloneBin.height; - } - - currentClones.forEach(c => c.destroy()); - Utils.animate(currentCloneBin, currentCloneOpts); - } else if (animateSize) { - newCloneBin.width = 0; - newCloneBin.height = 0; - newCloneOpts.width = this.cloneWidth; - newCloneOpts.height = this.cloneHeight; - } - - Utils.animate(newCloneBin, newCloneOpts); - } - - _getWindowCloneBin(window) { - let frameRect = window.get_frame_rect(); - let bufferRect = window.get_buffer_rect(); - let clone = new Clutter.Clone({ source: window.get_compositor_private() }); - let cloneBin = new St.Widget({ - opacity: 0, - layout_manager: frameRect.width != bufferRect.width || - frameRect.height != bufferRect.height ? - new WindowCloneLayout(frameRect, bufferRect) : - new Clutter.BinLayout() - }); - - cloneBin.add_child(clone); - - return cloneBin; - } - - _getBinSize() { - let [fixedWidth, fixedHeight] = this._previewDimensions; - - return [ - aspectRatio.x.fixed ? fixedWidth + this._padding * 2 : -1, - aspectRatio.y.fixed ? fixedHeight + this._padding * 2 : -1 - ]; - } - - _resizeClone(cloneBin, window) { - let frameRect = cloneBin.layout_manager.frameRect || window.get_frame_rect(); - let [fixedWidth, fixedHeight] = this._previewDimensions; - let ratio = Math.min(fixedWidth / frameRect.width, fixedHeight / frameRect.height, 1); - let cloneWidth = frameRect.width * ratio; - let cloneHeight = frameRect.height * ratio; - - let clonePaddingTB = cloneHeight < MIN_DIMENSION ? MIN_DIMENSION - cloneHeight : 0; - let clonePaddingLR = cloneWidth < MIN_DIMENSION ? MIN_DIMENSION - cloneWidth : 0; - let clonePaddingTop = clonePaddingTB * .5; - let clonePaddingLeft = clonePaddingLR * .5; - - this.cloneWidth = cloneWidth + clonePaddingLR * scaleFactor; - this.cloneHeight = cloneHeight + clonePaddingTB * scaleFactor; - - cloneBin.set_style('padding: ' + clonePaddingTop + 'px ' + clonePaddingLeft + 'px;'); - cloneBin.layout_manager.ratio = ratio; - cloneBin.layout_manager.padding = [clonePaddingLeft * scaleFactor, clonePaddingTop * scaleFactor]; - - cloneBin.get_first_child().set_size(cloneWidth, cloneHeight); - } - - _getPreviewDimensions() { - let size = SETTINGS.get_int('window-preview-size') * scaleFactor; - let w, h; - - if (this._previewMenu.isVertical) { - w = size; - h = w * aspectRatio.y.size / aspectRatio.x.size; - } else { - h = size; - w = h * aspectRatio.x.size / aspectRatio.y.size; - } - - return [w, h]; - } -}); - -export const WindowCloneLayout = GObject.registerClass({ -}, class WindowCloneLayout extends Clutter.BinLayout { - - _init(frameRect, bufferRect) { - super._init(); - - //the buffer_rect contains the transparent padding that must be removed - this.frameRect = frameRect; - this.bufferRect = bufferRect; - } - - vfunc_allocate(actor, box) { - let [width, height] = box.get_size(); - - box.set_origin( - (this.bufferRect.x - this.frameRect.x) * this.ratio + this.padding[0], - (this.bufferRect.y - this.frameRect.y) * this.ratio + this.padding[1] - ); - - box.set_size( - width + (this.bufferRect.width - this.frameRect.width) * this.ratio, - height + (this.bufferRect.height - this.frameRect.height) * this.ratio - ); - - actor.get_first_child().allocate(box); - } -}); - -export function setStyle(actor, style) { - if (!isManualStyling) { - actor.set_style(style); - } -} - -export function getTweenOpts(opts) { - let defaults = { - time: animationTime, - transition: 'easeInOutQuad' - }; - - return Utils.mergeObjects(opts || {}, defaults); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/day-progress@arcaege.github.io/LICENSE b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/day-progress@arcaege.github.io/LICENSE deleted file mode 100644 index f288702d..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/day-progress@arcaege.github.io/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/day-progress@arcaege.github.io/extension.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/day-progress@arcaege.github.io/extension.js deleted file mode 100644 index 8e1a136c..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/day-progress@arcaege.github.io/extension.js +++ /dev/null @@ -1,483 +0,0 @@ -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Gio from 'gi://Gio'; -import Clutter from 'gi://Clutter'; -import St from 'gi://St'; -import Cairo from 'gi://cairo'; - -import { Extension, gettext as _ } from 'resource:///org/gnome/shell/extensions/extension.js'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import * as PanelMenu from 'resource:///org/gnome/shell/ui/panelMenu.js'; -import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js'; - -const Pie = GObject.registerClass({ - Properties: { - 'angle': GObject.ParamSpec.double( - 'angle', 'angle', 'angle', - GObject.ParamFlags.READWRITE, - 0, 2 * Math.PI, 0), - }, -}, class Pie extends St.DrawingArea { - _init() { - this._angle = 0; - this._outerBorder = true; - super._init({ - style_class: 'pie', - visible: false, - }); - } - - get angle() { - return this._angle; - } - - set_angle(angle) { - if (this._angle === angle) - return; - - this._angle = angle; - this.notify('angle'); - this.queue_repaint(); - } - - calculate_styles(width, height, outerBorder) { - let min = Math.min(width, height); - min += 0.5; - this.style = 'width: ' + min + 'em; ' + 'height: ' + min + 'em;'; - this._outerBorder = outerBorder; - } - - vfunc_repaint() { - let node = this.get_theme_node(); - let fillColor = node.get_color('-pie-color'); - let bgColor = node.get_color('-pie-background-color'); - let borderColor = node.get_color('-pie-border-color'); - let borderWidth = node.get_length('-pie-border-width'); - let [width, height] = this.get_surface_size(); - let radius = Math.min(width / 2, height / 2); - - let startAngle = 3 * Math.PI / 2; - let endAngle = startAngle + this._angle; - - let cr = this.get_context(); - cr.setLineCap(Cairo.LineCap.ROUND); - cr.setLineJoin(Cairo.LineJoin.ROUND); - cr.translate(width / 2, height / 2); - - if (this._angle < 2 * Math.PI) - cr.moveTo(0, 0); - - cr.arc(0, 0, radius - borderWidth * (this._outerBorder ? 2.6 : 1), startAngle, endAngle); - - if (this._angle < 2 * Math.PI) - cr.lineTo(0, 0); - - cr.closePath(); - - cr.setLineWidth(0); - cr.setSourceColor(fillColor); - cr.fill(); - - if (!this._outerBorder) { - cr.moveTo(0, 0); - - if (this._angle >= 2 * Math.PI || this._angle >= 0) { - cr.arc(0, 0, radius - borderWidth, startAngle, startAngle - 0.000000000001); - } else { - cr.arc(0, 0, radius - borderWidth, endAngle, startAngle); - } - - cr.lineTo(0, 0); - - cr.closePath(); - - cr.setLineWidth(0); - cr.setSourceColor(bgColor); - cr.fill(); - } - - // Draw outer border - if (this._outerBorder) { - cr.arc(0, 0, radius - borderWidth, startAngle, startAngle + 2 * Math.PI); - - cr.setLineWidth(borderWidth); - cr.setSourceColor(borderColor); - cr.stroke(); - } - - cr.$dispose(); - } -}); - -export default class DayProgress extends Extension { - enable() { - // Uncomment for easier debug - // global.dayprogress = this; - - // Get if using GNOME classic - this.isUsingClassic = GLib.getenv('GNOME_SHELL_SESSION_MODE') == "classic"; - - // Light styles - this.colorSchemeSettings = new Gio.Settings({ - schema_id: 'org.gnome.desktop.interface', - }); - - this.lightColorScheme = this.colorSchemeSettings.get_string('color-scheme') == 'prefer-light'; - - // Create a panel button - this._indicator = new PanelMenu.Button(0.5, this.metadata.name, false); - - // Get settings - this._settings = this.getSettings(); - - // Get show elapsed key - this.showElapsed = this._settings.get_boolean('show-elapsed'); - - // Width - this.width = this._settings.get_int('width') / 5; - - // Height - this.height = this._settings.get_int('height') / 10; - - // Create UI elements - this.box = new St.BoxLayout({ - // style: `border-width: 1px; border-color: rgba(220, 220, 220, 1); height: 20px; border-radius: 10px; background-color: rgb(255, 255, 255); width: 40px;`, // border-width: 1px; border-color: rgba(220, 220, 220, 1); height: 10px; border-radius: 10px; background-color: rgba(255, 255, 255, 0.2) - xAlign: Clutter.ActorAlign.CENTER, - xExpand: false, - yAlign: Clutter.ActorAlign.CENTER, - yExpand: false, - }); - - this.container = new St.Bin({ - reactive: false, - trackHover: false, - canFocus: false, - xExpand: true, - yExpand: true, - xAlign: Clutter.ActorAlign.CENTER, - yAlign: Clutter.ActorAlign.CENTER, - style: ``, // width: 2.5em; height: 0.85em; background-color: rgba(255, 255, 255, 0.0); border-radius: 1em; border-width: 0.1em; overflow: hidden; - styleClass: this.isUsingClassic || this.lightColorScheme ? 'container-classic' : 'container', - }); - - this.pie = new Pie(); - - this.border = new St.Bin({ - reactive: false, - trackHover: false, - canFocus: false, - xExpand: true, - yExpand: true, - xAlign: Clutter.ActorAlign.CENTER, - yAlign: Clutter.ActorAlign.CENTER, - styleClass: 'border', - }); - - this.bar = new St.Bin({ - styleClass: this.isUsingClassic || this.lightColorScheme ? 'bar-classic' : 'bar', - yExpand: true, - yAlign: Clutter.ActorAlign.CENTER, - xAlign: Clutter.ActorAlign.START, - xExpand: true, - }); - - this.box.add_child(this.container); - this.box.add_child(this.pie); - this.container.add_child(this.border); - this.border.add_child(this.bar); - this._indicator.add_child(this.box); - - this.menuElapsedContainer = new PopupMenu.PopupBaseMenuItem({ reactive: false }); - this.elapsedLabel = new St.Label({ - text: 'Elapsed', - xAlign: Clutter.ActorAlign.START, - xExpand: true, - styleClass: 'label', - }); - this.elapsedValue = new St.Label({ - text: '', - }); - this.menuElapsedContainer.add_child(this.elapsedLabel); - this.menuElapsedContainer.add_child(this.elapsedValue); - - this.menuRemainingContainer = new PopupMenu.PopupBaseMenuItem({ reactive: false }); - this.remainingLabel = new St.Label({ - text: 'Remaining', - xAlign: Clutter.ActorAlign.START, - xExpand: true, - styleClass: 'label', - }); - this.remainingValue = new St.Label({ - text: '', - }); - this.menuRemainingContainer.add_child(this.remainingLabel); - this.menuRemainingContainer.add_child(this.remainingValue); - - // Add the indicator to the panel - Main.panel.addToStatusArea(this.uuid, this._indicator); - - // Show elapsed - this.showElapsedHandle = this._settings.connect('changed::show-elapsed', (settings, key) => { - this.showElapsed = settings.get_boolean(key); - this.updateBar(); - }); - - // Width - this.widthHandle = this._settings.connect('changed::width', (settings, key) => { - this.width = settings.get_int(key) / 5; - this.calculateStyles(); - this.updateBar(); - }); - - // Height - this.heightHandle = this._settings.connect('changed::height', (settings, key) => { - this.height = settings.get_int(key) / 10; - this.calculateStyles(); - this.updateBar(); - }); - - // Style - this.style = this._settings.get_int('style'); - this.circular = this.style == 1; - this.styleHandle = this._settings.connect('changed::style', (settings, key) => { - this.style = settings.get_int(key); - this.circular = this.style == 1; - this.calculateStyles(); - }); - - // Start time - this.startHour = this._settings.get_int('start-hour'); - this.startHourHandle = this._settings.connect('changed::start-hour', (settings, key) => { - this.startHour = settings.get_int(key); - this.updateBar(); - }); - - this.startMinute = this._settings.get_int('start-minute'); - this.startMinuteHandle = this._settings.connect('changed::start-minute', (settings, key) => { - this.startMinute = settings.get_int(key); - this.updateBar(); - }); - - // Reset times - this.resetHour = this._settings.get_int('reset-hour'); - this.resetHourHandle = this._settings.connect('changed::reset-hour', (settings, key) => { - this.resetHour = settings.get_int(key); - this.updateBar(); - }); - - this.resetMinute = this._settings.get_int('reset-minute'); - this.resetMinuteHandle = this._settings.connect('changed::reset-minute', (settings, key) => { - this.resetMinute = settings.get_int(key); - this.updateBar(); - }); - - // Panel position - this.panelPosition = this._settings.get_int('panel-position'); - this.panelPositionHandle = this._settings.connect('changed::panel-position', (settings, key) => { - this.panelPosition = settings.get_int(key); - this.applyPosition(); - }); - - this.panelIndex = this._settings.get_int('panel-index'); - this.panelIndexHandle = this._settings.connect('changed::panel-index', (settings, key) => { - this.panelIndex = settings.get_int(key); - this.applyPosition(); - }); - - this.applyPosition(); - this.calculateStyles(); - - // Update bar now to immediately populate it - this.updateBar(); - - // Light styles - this.colorSchemeChanged(); - - this.timerID = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 10, () => { - this.updateBar(); - return GLib.SOURCE_CONTINUE; - }); - - this._indicator.menu.addMenuItem(this.menuElapsedContainer); - this._indicator.menu.addMenuItem(this.menuRemainingContainer); - // Add a menu item to open the preferences window - this._indicator.menu.addAction(_('Preferences'), - () => this.openPreferences()); - } - - // Support for light panel through extensions such as Light Style - colorSchemeChanged() { - this.lightColorScheme = this.colorSchemeSettings.get_string('color-scheme') == 'prefer-light'; - this.container.styleClass = this.isUsingClassic || this.lightColorScheme ? 'container-classic' : 'container'; - this.bar.styleClass = this.isUsingClassic || this.lightColorScheme ? 'bar-classic' : 'bar'; - this.pie.style_class = this.isUsingClassic || this.lightColorScheme ? 'pie-classic' : 'pie'; - this.pie.calculate_styles(this.width, this.height, this.style == 2); - } - - calculateStyles() { - this.container.style = `width: ` + this.width + `em; ` + `height: ` + this.height + `em; ` + 'border-radius: ' + (this.circular ? 1 : 0.3) + 'em;'; - this.border.style = `width: ` + this.width + `em; ` + `height: ` + this.height + `em; ` + 'border-radius: ' + (this.circular ? 1 : 0.3) + 'em;'; - this.pie.calculate_styles(this.width, this.height, this.style == 2); - this.container.visible = (this.style == 0 || this.style == 1); - this.pie.visible = (this.style == 2 || this.style == 3); - this.updateBar(); - } - - // Update the bar - updateBar() { - // TODO: convert this to a listener - this.colorSchemeChanged(); - - const localDateTime = GLib.DateTime.new_now_local(); - // Start time as a fraction of the day - const startTimeFraction = this.startHour / 24 + this.startMinute / (60 * 24); - // End time as a fraction of the day - const endTimeFraction = this.resetHour / 24 + this.resetMinute / (60 * 24); - - const percentElapsedOfPeriod = (() => { - // Current time as a fraction of the day - const currentTimeFraction = (localDateTime.get_hour() + localDateTime.get_minute() / 60 + localDateTime.get_second() / 3600) / 24; - - // No midnight wrap around - if (endTimeFraction > startTimeFraction) { - return mapNumber(clamp(currentTimeFraction, startTimeFraction, endTimeFraction), startTimeFraction, endTimeFraction, 0, 1); - } - - // There is midnight wrap around - if (currentTimeFraction >= endTimeFraction && currentTimeFraction < startTimeFraction) return 1; - const durationFraction = (1 - (startTimeFraction - endTimeFraction)); - const offset = 1 - startTimeFraction; - const offsettedTimeFraction = (currentTimeFraction + 1 + offset) % 1; - return mapNumber(clamp(offsettedTimeFraction, 0, durationFraction), 0, durationFraction, 0, 1); - })(); - const percentRemainingOfPeriod = 1 - percentElapsedOfPeriod; - this.bar.style = `width: ` + mapNumber(this.showElapsed ? percentElapsedOfPeriod : percentRemainingOfPeriod, 0, 1, 0.0, this.width - 0.15) + - `em; ` + `height: ` + this.height + `em; ` + 'border-radius: ' + (this.circular ? 1 : 0.15) + 'em;'; // Needs to be 0.15, half of border curve as it is a smaller corner - this.updatePie((this.showElapsed ? percentElapsedOfPeriod : percentRemainingOfPeriod) * (Math.PI * 2.0)); - - const duration = endTimeFraction > startTimeFraction ? (endTimeFraction - startTimeFraction) : (1 - (startTimeFraction - endTimeFraction)); - const elapsedHours = Math.floor(percentElapsedOfPeriod * duration * 24); - const elapsedMinutes = Math.floor((percentElapsedOfPeriod * duration * 24 * 60) % 60); - const remainingHours = Math.floor(percentRemainingOfPeriod * duration * 24); - const remainingMinutes = Math.floor((percentRemainingOfPeriod * duration * 24 * 60) % 60); - this.elapsedValue.text = elapsedHours + 'h ' + elapsedMinutes + 'm' + ' | ' + Math.round(percentElapsedOfPeriod * 100) + '%'; - this.remainingValue.text = remainingHours + 'h ' + remainingMinutes + 'm' + ' | ' + Math.round(percentRemainingOfPeriod * 100) + '%'; - - this.applyPosition(); - } - - updatePie(angle) { - this.pie.set_angle(angle); - } - - // Mostly copied from Noiseclapper@JordanViknar - applyPosition() { - const boxes = { - left: Main.panel._leftBox, - center: Main.panel._centerBox, - right: Main.panel._rightBox, - }; - const position = this.panelPosition; - const index = this.panelIndex; - Main.panel._addToPanelBox(this.metadata.name, this._indicator, index, boxes[position === 0 ? 'left' : position === 1 ? 'center' : 'right']); - } - - disable() { - // Uncomment for easier debug - // delete global.dayprogress; - - if (this.timerID) { - GLib.Source.remove(this.timerID); - this.timerID = null; - } - - if (this.showElapsedHandle) { - this._settings.disconnect(this.showElapsedHandle); - this.showElapsedHandle = null; - } - if (this.widthHandle) { - this._settings.disconnect(this.widthHandle); - this.widthHandle = null; - } - if (this.heightHandle) { - this._settings.disconnect(this.heightHandle); - this.heightHandle = null; - } - if (this.styleHandle) { - this._settings.disconnect(this.styleHandle); - this.styleHandle = null; - } - if (this.startHourHandle) { - this._settings.disconnect(this.startHourHandle); - this.startHourHandle = null; - } - if (this.startMinuteHandle) { - this._settings.disconnect(this.startMinuteHandle); - this.startMinuteHandle = null; - } - if (this.resetHourHandle) { - this._settings.disconnect(this.resetHourHandle); - this.resetHourHandle = null; - } - if (this.resetMinuteHandle) { - this._settings.disconnect(this.resetMinuteHandle); - this.resetMinuteHandle = null; - } - if (this.panelPositionHandle) { - this._settings.disconnect(this.panelPositionHandle); - this.panelPositionHandle = null; - } - if (this.panelIndexHandle) { - this._settings.disconnect(this.panelIndexHandle); - this.panelIndexHandle = null; - } - - this.remainingValue?.destroy(); - this.remainingValue = null; - this.elapsedValue?.destroy(); - this.elapsedValue = null; - this.remainingLabel?.destroy(); - this.remainingLabel = null; - this.elapsedLabel?.destroy(); - this.elapsedLabel = null; - this.menuRemainingContainer?.destroy(); - this.menuRemainingContainer = null; - this.menuElapsedContainer?.destroy(); - this.menuElapsedContainer = null; - this.bar?.destroy(); - this.bar = null; - this.border?.destroy(); - this.border = null; - this.pie?.destroy(); - this.pie = null; - this.container?.destroy(); - this.container = null; - this.box?.destroy(); - this.box = null; - this._indicator?.destroy(); - this._indicator = null; - - this.showElapsed = null; - this.circular = null; - this.width = null; - this.height = null; - this.style = null; - this.startHour = null; - this.startMinute = null; - this.resetHour = null; - this.resetMinute = null; - this.panelPosition = null; - this.panelIndex = null; - - this._settings = null; - this.colorSchemeSettings = null; - } -} - -function mapNumber(number, inMin, inMax, outMin, outMax) { - return (number - inMin) * (outMax - outMin) / (inMax - inMin) + outMin; -} - -function clamp(number, min, max) { - return Math.max(min, Math.min(number, max)); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/day-progress@arcaege.github.io/prefs.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/day-progress@arcaege.github.io/prefs.js deleted file mode 100644 index 6922dd7c..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/day-progress@arcaege.github.io/prefs.js +++ /dev/null @@ -1,166 +0,0 @@ -import Gio from 'gi://Gio'; -import Adw from 'gi://Adw'; -import Gtk from 'gi://Gtk'; - -import { ExtensionPreferences, gettext as _ } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; - - -export default class ExamplePreferences extends ExtensionPreferences { - fillPreferencesWindow(window) { - // Create a preferences page, with a single group - const page = new Adw.PreferencesPage({ - title: _('General'), - icon_name: 'dialog-information-symbolic', - }); - window.add(page); - - const appearance = new Adw.PreferencesGroup({ - title: _('Appearance'), - description: _('Configure the appearance of the extension'), - }); - page.add(appearance); - - const panelPosition = new Adw.PreferencesGroup({ - title: _('Panel position'), - description: _('Where on the panel the indicator will be displayed'), - }); - page.add(panelPosition); - - const startTime = new Adw.PreferencesGroup({ - title: _('Start time'), - description: _('The time at which the indicator starts'), - }); - page.add(startTime); - - const resetTime = new Adw.PreferencesGroup({ - title: _('Reset time'), - description: _('The time at which the indicator resets'), - }); - page.add(resetTime); - - // Elapsed - const elapsed = new Adw.SwitchRow({ - title: _('Time Elapsed'), - subtitle: _('Whether to show time elapsed instead of remaining'), - }); - appearance.add(elapsed); - - // Width - const width = new Adw.SpinRow({ - title: _("Width"), - subtitle: _('Width of the indicator (measured in fifth of an em), scales with font'), - adjustment: new Gtk.Adjustment({ - lower: 1, - upper: 150, - step_increment: 1 - }) - }); - appearance.add(width); - - // Height - const height = new Adw.SpinRow({ - title: _("Height"), - subtitle: _('Height of the indicator (measured in tenth of an em), scales with font'), - adjustment: new Gtk.Adjustment({ - lower: 2, - upper: 50, - step_increment: 1 - }) - }); - appearance.add(height); - - // Style - const styles = [_("Bar"), _("Circular bar (experimental)"), _("Pie"), _("Pie (no border)")]; - let styleOptionsList = new Gtk.StringList(); - styles.forEach((it) => { - styleOptionsList.append(it); - }); - const styleRow = new Adw.ComboRow({ - title: _("Indicator style"), - subtitle: _("How the indicator is displayed"), - model: styleOptionsList - }); - appearance.add(styleRow); - - // Start time - const startHour = new Adw.SpinRow({ - title: _("Hours"), - adjustment: new Gtk.Adjustment({ - lower: 0, - upper: 23, - step_increment: 1 - }) - }); - startTime.add(startHour); - const startMinute = new Adw.SpinRow({ - title: _("Minutes"), - adjustment: new Gtk.Adjustment({ - lower: 0, - upper: 59, - step_increment: 1 - }) - }); - startTime.add(startMinute); - - // Reset time - const resetHour = new Adw.SpinRow({ - title: _("Hours"), - adjustment: new Gtk.Adjustment({ - lower: 0, - upper: 23, - step_increment: 1 - }) - }); - resetTime.add(resetHour); - const resetMinute = new Adw.SpinRow({ - title: _("Minutes"), - adjustment: new Gtk.Adjustment({ - lower: 0, - upper: 59, - step_increment: 1 - }) - }); - resetTime.add(resetMinute); - - // Panel position - const positions = [_("Left"), _("Centre"), _("Right")]; - let optionsList = new Gtk.StringList(); - positions.forEach((it) => { - optionsList.append(it); - }); - const positionRow = new Adw.ComboRow({ - title: _("Position"), - subtitle: _("The side of the panel it is on"), - model: optionsList - }); - panelPosition.add(positionRow); - - // Panel index - const panelIndex = new Adw.SpinRow({ - title: _("Index"), - subtitle: _("How far along the panel area it is"), - adjustment: new Gtk.Adjustment({ - lower: -128, - upper: 127, - step_increment: 1 - }) - }); - panelPosition.add(panelIndex); - - // Bind - window._settings = this.getSettings(); - window._settings.bind('show-elapsed', elapsed, 'active', Gio.SettingsBindFlags.DEFAULT); - window._settings.bind('width', width, 'value', Gio.SettingsBindFlags.DEFAULT); - window._settings.bind('height', height, 'value', Gio.SettingsBindFlags.DEFAULT); - window._settings.bind('style', styleRow, 'selected', Gio.SettingsBindFlags.DEFAULT); - - window._settings.bind('start-hour', startHour, 'value', Gio.SettingsBindFlags.DEFAULT); - window._settings.bind('start-minute', startMinute, 'value', Gio.SettingsBindFlags.DEFAULT); - - window._settings.bind('reset-hour', resetHour, 'value', Gio.SettingsBindFlags.DEFAULT); - window._settings.bind('reset-minute', resetMinute, 'value', Gio.SettingsBindFlags.DEFAULT); - - window._settings.bind('panel-position', positionRow, 'selected', Gio.SettingsBindFlags.DEFAULT); - window._settings.bind('panel-index', panelIndex, 'value', Gio.SettingsBindFlags.DEFAULT); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/day-progress@arcaege.github.io/private_metadata.json b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/day-progress@arcaege.github.io/private_metadata.json deleted file mode 100644 index 4326a079..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/day-progress@arcaege.github.io/private_metadata.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "_generated": "Generated by SweetTooth, do not edit", - "description": "Displays a (somewhat) customisable progress bar of your day in the top panel to help you track your time.", - "name": "Day Progress", - "settings-schema": "org.gnome.shell.extensions.day-progress", - "shell-version": [ - "46", - "47" - ], - "url": "https://github.com/ArcaEge/day-progress", - "uuid": "day-progress@arcaege.github.io", - "version": 19 -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/day-progress@arcaege.github.io/schemas/gschemas.compiled b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/day-progress@arcaege.github.io/schemas/gschemas.compiled deleted file mode 100644 index 95abf38c..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/day-progress@arcaege.github.io/schemas/gschemas.compiled and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/day-progress@arcaege.github.io/schemas/org.gnome.shell.extensions.day-progress.gschema.xml b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/day-progress@arcaege.github.io/schemas/org.gnome.shell.extensions.day-progress.gschema.xml deleted file mode 100644 index 8c2d2d28..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/day-progress@arcaege.github.io/schemas/org.gnome.shell.extensions.day-progress.gschema.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - false - - - 15 - - - - 9 - - - - 0 - - - - 'right' - Panel position - Position in Panel ('left', 'center', 'right') - - - 0 - - - - 0 - - - - 0 - - - - 0 - - - - 2 - - - - 0 - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/day-progress@arcaege.github.io/stylesheet.css b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/day-progress@arcaege.github.io/stylesheet.css deleted file mode 100644 index c45649a6..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/day-progress@arcaege.github.io/stylesheet.css +++ /dev/null @@ -1,42 +0,0 @@ -.bar { - background: rgba(255, 255, 255, 1); -} - -.bar-classic { - background: rgba(40, 40, 40, 1); -} - -.border { - border-width: 0.1em; - overflow: hidden; -} - -.container { - border-color: rgba(255, 255, 255, 0.7); - background-color: rgba(255, 255, 255, 0.1); - border-width: 0.1em; -} - -.container-classic { - border-color: rgba(40, 40, 40, 0.7); - background-color: rgba(40, 40, 40, 0.1); - border-width: 0.1em; -} - -.label { - font-weight: bold; -} - -.pie { - -pie-border-color: rgba(255, 255, 255, 0.7); - -pie-color: rgba(255, 255, 255, 1); - -pie-background-color: rgba(255, 255, 255, 0.2); - -pie-border-width: 0.1em; -} - -.pie-classic { - -pie-border-color: rgba(40, 40, 40, 0.7); - -pie-color: rgba(40, 40, 40, 1); - -pie-background-color: rgba(40, 40, 40, 0.2); - -pie-border-width: 0.1em; -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/aticonfigUtil.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/aticonfigUtil.js deleted file mode 100644 index 83915c90..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/aticonfigUtil.js +++ /dev/null @@ -1,38 +0,0 @@ -import GLib from 'gi://GLib'; - -import CommandLineUtil from './commandLineUtil.js'; - -export default class AticonfigUtil extends CommandLineUtil { - - constructor() { - super(); - let path = GLib.find_program_in_path('aticonfig'); - this._argv = path ? [path, '--odgt'] : null; - } - - /* - Default Adapter - AMD Radeon R9 200 Series - Sensor 0: Temperature - 37.00 C - */ - get temp() { - if(!this._output) - return []; - let label = null; - let temp = null; - for (let line of this._output) { - if(!line) - continue; - let r; - if(line.indexOf('Adapter') > 0) - label = (r = /Adapter \- (.*)/.exec(line)) ? r[1] : undefined; - if(line.indexOf('Temperature') > 0) - temp = (r = /Temperature \- (\d{1,3}.\d{1,2})/.exec(line)) ? parseFloat(r[1]) : undefined; - } - - if(!label || !temp) - return []; - - return [{ label : label.trim(), temp : temp}]; - } - -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/batteryUtil.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/batteryUtil.js deleted file mode 100644 index c4f3d91e..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/batteryUtil.js +++ /dev/null @@ -1,110 +0,0 @@ -import GLib from 'gi://GLib'; - - -export default class BatteryUtil { - - constructor(callback) { - this._bat_path = []; // Path to batteries for cat - this._find_batteries(); - } - - get available(){ - return (this._bat_path[0]) ? true : false; - } - - get energy() { - let features = [] - this._bat_path.forEach((bat_path) => { - let energy = parseFloat(this._get_sensor_data(bat_path, "energy_now")); - energy /= 1000000.00; - - let bat_name = bat_path.split('/').pop(); - let feature = { - label: bat_name + " Energy", - ["power"]: energy - }; - features.push(feature); - }); - return features; - } - - get power() { - let features = []; - this._bat_path.forEach((bat_path) => { - let power = parseFloat(this._get_sensor_data(bat_path, "power_now")); - power /= 1000000.00; - - let state = this._get_sensor_data(bat_path, "status"); - if (state.startsWith("Dis")) - power *= -1; - - let bat_name = bat_path.split('/').pop(); - let feature = { - label: bat_name + " Power", - ["power"]: power - }; - features.push(feature); - }) - return features; - } - - get voltage() { - let features = []; - this._bat_path.forEach((bat_path) => { - let voltage = parseFloat(this._get_sensor_data(bat_path, "voltage_now")); - voltage /= 1000000.00; - - let bat_name = bat_path.split('/').pop(); - let feature = { - label: bat_name + " Voltage", - ["volt"]: voltage - }; - features.push(feature); - }) - return features; - } - - - destroy(callback) { - this._bat_path = []; - } - - execute(callback) { - } - - _find_batteries() { - const cmd = `find /sys/class/power_supply/ -type l -name "BAT*"` - let cmd_res = [] - try { - cmd_res = GLib.spawn_command_line_sync(cmd) - } catch (e) { - logError(e, `[FREON] failed to execute "find"`) - } - if (cmd_res[0] == true) { - this._bat_path = new TextDecoder().decode( cmd_res[1] ).split('\n') - let trailing_path = this._bat_path.pop() - if (trailing_path.length > 1) // remove empty trailing Elements - this._bat_path.push(trailing_path) - } - else { - print(`"find" returned an error: ${cmd_res[2]}`) - } - } - - _get_sensor_data(bat_path, sensor) { - const path = `${bat_path}/${sensor}` - const cmd = "cat " + path; - - let cmd_res = [] - try { - cmd_res = GLib.spawn_command_line_sync(cmd) - } catch (e) { - logError(e, `[FREON] failed to execute "cat"`) - } - if (cmd_res[0] == true) - return new TextDecoder().decode(cmd_res[1]) - else - return "" - } - -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/bumblebeeNvidiaUtil.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/bumblebeeNvidiaUtil.js deleted file mode 100644 index 063d3940..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/bumblebeeNvidiaUtil.js +++ /dev/null @@ -1,101 +0,0 @@ -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; - -import CommandLineUtil from './commandLineUtil.js'; - -export default class BumblebeeNvidiaUtil extends CommandLineUtil { - - constructor() { - super(); - // optirun nvidia-smi -q -d TEMPERATURE - this._path = GLib.find_program_in_path('optirun'); - this._argv = this._path ? [this._path, 'nvidia-smi', '-q', '-d', 'TEMPERATURE'] : null; - - // original source here: - // https://github.com/meden/gse-bumblebee-indicator - // thank meden! - let virtualDisplay = ':8'; - - let bumblebeeConfPath = '/etc/bumblebee/bumblebee.conf'; - if(GLib.file_test(bumblebeeConfPath, GLib.FileTest.EXISTS)){ - let configFile = Gio.File.new_for_path(bumblebeeConfPath); - let contents = configFile.load_contents(null); - if (contents[0]) { - let pattern = /^VirtualDisplay=.*$/m - let match = new String(pattern.exec(new String(contents))); - virtualDisplay = match.substr(16); - } - } - let lockFilePath = '/tmp/.X' + virtualDisplay + '-lock'; - this._lockMonitor = Gio.File.new_for_path( - lockFilePath).monitor_file(Gio.FileMonitorFlags.NONE, null - ); - this._lockMonitor.id = this._lockMonitor.connect( - 'changed', this._statusChanged.bind(this) - ); - - // Check if the lock file already exists - // (needed when NVIDIA card is already in use at that point) - if(GLib.file_test(lockFilePath, GLib.FileTest.EXISTS)){ - this._detectLabel(); - this._active = true; - } - } - - _detectLabel() { - // optirun nvidia-smi -L - // GPU 0: GeForce GT 525M (UUID: GPU-...) - for (let line of GLib.spawn_command_line_sync(this._path + " nvidia-smi -L")){ - let match = /.*GPU [\d]:([\w\d\ ]+).*/.exec(line); - if(match){ - this._label = match[1]; - if(this._label) - this._label = this._label.trim(); - break; - } - } - } - - _statusChanged(monitor, a_file, other_file, event_type) { - if (event_type == Gio.FileMonitorEvent.CREATED) { - if(this._argv && !this._label) - this._detectLabel(); - this._active = true; - } else if (event_type == Gio.FileMonitorEvent.DELETED) { - this._active = false; - } - } - - execute(callback) { - if(this._active) - super.execute(callback); - else - this._output = []; - } - - get temp() { - let key = 'bumblebee-nvidia' - let label = this._label ? this._label : _('Bumblebee + NVIDIA'); - if(this._active && this._output){ - // GPU Current Temp : 37 C - for (let line of this._output) { - if(!line) - continue; - let r; - if(line.indexOf('GPU Current Temp') > 0) - return [{ - label: key, - temp: (r = /[\s]*GPU Current Temp[\s]*:[\s]*(\d{1,3}).*/.exec(line)) ? parseFloat(r[1]) : null, - displayName: label - }]; - } - } - return [{label: key, temp: null, displayName: label}]; - } - - destroy(){ - super.destroy(); - this._lockMonitor.disconnect(this._lockMonitor.id); - } - -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/commandLineUtil.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/commandLineUtil.js deleted file mode 100644 index fc0dcfd7..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/commandLineUtil.js +++ /dev/null @@ -1,52 +0,0 @@ -import Gio from 'gi://Gio'; - -export default class CommandLineUtil { - - constructor(){ - this._argv = null; - this._updated = false; - } - - execute(callback) { - try{ - this._callback = callback; - - let proc = Gio.Subprocess.new(this._argv, - Gio.SubprocessFlags.STDOUT_PIPE | - Gio.SubprocessFlags.STDERR_PIPE); - - proc.communicate_utf8_async(null, null, (proc, result) => { - try { - let [, stdout, stderr] = proc.communicate_utf8_finish(result); - - this._output = stdout ? stdout.split('\n') : []; - this._error_output = stderr ? stderr.split('\n') : []; - } catch (e) { - logError(e); - } finally { - callback(); - this._updated = true; - } - }); - } catch(e){ - logError(e); - } - } - - get available(){ - return this._argv != null; - } - - get updated (){ - return this._updated; - } - - set updated (updated){ - this._updated = updated; - } - - destroy(){ - this._argv = null; - } - -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/extension.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/extension.js deleted file mode 100644 index 1b248f7c..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/extension.js +++ /dev/null @@ -1,1053 +0,0 @@ -import Clutter from 'gi://Clutter'; -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import St from 'gi://St'; - -import * as PanelMenu from 'resource:///org/gnome/shell/ui/panelMenu.js'; -import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import * as Util from 'resource:///org/gnome/shell/misc/util.js'; - -import {Extension, gettext as _} from 'resource:///org/gnome/shell/extensions/extension.js'; - -import SensorsUtil from './sensorsUtil.js'; -import FreeipmiUtil from './freeipmiUtil.js'; -import LiquidctlUtil from './liquidctlUtil.js'; - -import NvidiaUtil from './nvidiaUtil.js'; -import BumblebeeNvidiaUtil from './bumblebeeNvidiaUtil.js'; -import AticonfigUtil from './aticonfigUtil.js'; - -import Udisks2Util from './udisks2.js'; -import HddtempUtil from './hddtempUtil.js'; -import SmartctlUtil from './smartctlUtil.js'; -import NvmecliUtil from './nvmecliUtil.js'; -import BatteryUtil from './batteryUtil.js'; - -import FreonItem from './freonItem.js'; - -function _makeLogFunction(prefix) { - return msg => { - // Grab the second line of a stack trace, i.e. caller of debug() - let regex = /(?:(?:[^<.]+<\.)?([^@]+))?@(.+):(\d+):\d+/g; - let trace = ((msg.stack) ? msg : new Error()).stack.split('\n')[1]; - let [m, func, file, line] = regex.exec(trace); - file = GLib.path_get_basename(file); - - let hdr = [file, func, line].filter(k => (k)).join(':'); - - GLib.log_structured( - 'freon', - GLib.LogLevelFlags.LEVEL_MESSAGE, - { - MESSAGE: `[${prefix}] [${hdr}]: ${msg}`, - SYSLOG_IDENTIFIER: 'org.gnome.shell.extensions.freon', - CODE_FILE: file, - CODE_FUNC: `${func}`, - CODE_LINE: `${line}` - } - ); - } -} - -class FreonMenuButton extends PanelMenu.Button { - - static { - GObject.registerClass(this); - } - - constructor(uuid, path, settings) { - super(0); - - this._extension_uuid = uuid; - this._settings = settings; - - var _debugFunc = _makeLogFunction('DEBUG'); - this.debug = this._settings.get_boolean('debug') ? _debugFunc : () => {}; - - this._settings.connect('changed::debug', () => { - this.debug = this._settings.get_boolean('debug') ? _debugFunc : () => {}; - }); - - this._sensorMenuItems = {}; - - this._utils = {}; - - this._initSensorsUtility(); - this._initFreeipmiUtility(); - this._initLiquidctlUtility(); - this._initBatteryUtility(); - - this._initNvidiaUtility(); - this._initBumblebeeNvidiaUtility(); - this._initAticonfigUtility(); - - this._initUdisks2Utility(); - this._initHddtempUtility(); - this._initSmartctlUtility(); - this._initNvmecliUtility(); - - let temperatureIcon = Gio.icon_new_for_string(path + '/icons/material-icons/material-temperature-symbolic.svg'); - let voltageIcon = Gio.icon_new_for_string(path + '/icons/freon-voltage-symbolic.svg'); - let batteryIcon = Gio.icon_new_for_string(path + '/icons/freon-battery-symbolic.svg'); - - this._sensorIcons = { - 'temperature' : temperatureIcon, - 'temperature-average' : temperatureIcon, - 'temperature-maximum' : temperatureIcon, - 'gpu-temperature' : Gio.icon_new_for_string(path + '/icons/material-icons/material-gpu-temperature-symbolic.svg'), - 'drive-temperature' : Gio.icon_new_for_string('drive-harddisk-symbolic'), - 'voltage' : voltageIcon, - 'fan' : Gio.icon_new_for_string(path + '/icons/freon-fan-symbolic.svg'), - 'power' : voltageIcon, - 'battery' : batteryIcon, - } - - this._menuLayout = new St.BoxLayout(); - - this._hotLabels = {}; - this._hotIcons = {}; - - let hotSensors = this._settings.get_strv('hot-sensors'); - let showIcon = this._settings.get_boolean('show-icon-on-panel'); - - for (let s of hotSensors){ - this._createHotItem(s, showIcon); - } - - if(hotSensors.length == 0){ - this._createInitialIcon(); - } - - this.add_child(this._menuLayout); - - this._settingChangedSignals = []; - - this._addSettingChangedSignal('hot-sensors', this._querySensors.bind(this)); - - this._addSettingChangedSignal('update-time', this._updateTimeChanged.bind(this)); - this._addSettingChangedSignal('position-in-panel', this._positionInPanelChanged.bind(this)); - this._addSettingChangedSignal('panel-box-index', this._positionInPanelChanged.bind(this)); - this._addSettingChangedSignal('show-icon-on-panel', this._showIconOnPanelChanged.bind(this)); - - this._addSettingChangedSignal('show-temperature-unit', this._updateUI.bind(this)); - this._addSettingChangedSignal('unit', this._querySensors.bind(this)); - this._addSettingChangedSignal('show-rotationrate-unit', this._updateUI.bind(this)); - this._addSettingChangedSignal('show-voltage-unit', this._updateUI.bind(this)); - this._addSettingChangedSignal('show-power-unit', this._updateUI.bind(this)); - - this._addSettingChangedSignal('show-decimal-value', this._querySensors.bind(this)); - - this._addSettingChangedSignal('use-generic-lmsensors', this._sensorsUtilityChanged.bind(this)); - this._addSettingChangedSignal('freeimpi-selected', this._freeipmiUtilityChanged.bind(this)); - this._addSettingChangedSignal('use-generic-liquidctl', this._liquidctlUtilityChanged.bind(this)); - this._addSettingChangedSignal('show-battery-stats', this._batteryUtilityChanged.bind(this)); - - this._addSettingChangedSignal('use-gpu-nvidia', this._nvidiaUtilityChanged.bind(this)); - this._addSettingChangedSignal('use-gpu-nvidiabumblebee', this._nvidiabumblebeeUtilityChanged.bind(this)); - this._addSettingChangedSignal('use-gpu-aticonfig', this._aticonfigUtilityChanged.bind(this)); - - this._addSettingChangedSignal('use-drive-udisks2', this._udisks2UtilityChanged.bind(this)); - this._addSettingChangedSignal('use-drive-hddtemp', this._hddtempUtilityChanged.bind(this)); - this._addSettingChangedSignal('use-drive-smartctl', this._smartctlUtilityChanged.bind(this)); - this._addSettingChangedSignal('use-drive-nvmecli', this._nvmecliUtilityChanged.bind(this)); - - this._addSettingChangedSignal('show-temperature', this._rerender.bind(this)); - this._addSettingChangedSignal('show-rotationrate', this._rerender.bind(this)); - this._addSettingChangedSignal('show-voltage', this._rerender.bind(this)); - this._addSettingChangedSignal('show-power', this._rerender.bind(this)); - - - this._addSettingChangedSignal('group-temperature', this._rerender.bind(this)) - this._addSettingChangedSignal('group-rotationrate', this._rerender.bind(this)) - this._addSettingChangedSignal('group-voltage', this._rerender.bind(this)) - - this.connect('destroy', this._onButtonDestroy.bind(this)); - - // don't postprone the first call by update-time. - this._querySensors(); - - this._addTimer(); - this._updateUI(true); - this._updateUITimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 250, () => { - this._updateUI(); - // readd to update queue - return true; - }); - } - - _createHotItem(s, showIcon, gicon){ - if(showIcon){ - let i = new St.Icon({ style_class: 'system-status-icon'}); - this._hotIcons[s] = i; - - if(gicon) - i.gicon = gicon; - - this._menuLayout.add_child(i); - } - let l = new St.Label({ - text: '\u26a0', // ⚠, warning - y_expand: true, - y_align: Clutter.ActorAlign.CENTER}); - l.set_style_class_name(showIcon ? 'freon-panel-icon-label' : 'freon-panel-no-icon-label'); - - this._hotLabels[s] = l; - this._menuLayout.add_child(l); - } - - _createInitialIcon() { - this._initialIcon = new St.Icon({ style_class: 'system-status-icon'}); - this._initialIcon.gicon = this._sensorIcons['gpu-temperature']; - this._menuLayout.add_child(this._initialIcon); - } - - _rerender(){ - this._needRerender = true; - this._querySensors(); - } - - _positionInPanelChanged(){ - this.container.get_parent().remove_child(this.container); - - // small HACK with private boxes :) - let boxes = { - left: Main.panel._leftBox, - center: Main.panel._centerBox, - right: Main.panel._rightBox - }; - - let i = this._settings.get_int('panel-box-index'); - let p = this._settings.get_int('position-in-panel'); - - console.debug(p) - - switch (p) { - case 0: - boxes['left'].insert_child_at_index(this.container, i); break; - case 1: - boxes['center'].insert_child_at_index(this.container, i); break; - case 2: - default: - boxes['right'].insert_child_at_index(this.container, i); break; - } - //boxes[p].insert_child_at_index(this.container, i); - } - - _showIconOnPanelChanged(){ - let showIcon = this._settings.get_boolean('show-icon-on-panel'); - if (showIcon) { - let index = 0; - for(let k in this._hotLabels){ - let i = new St.Icon({ style_class: 'system-status-icon'}); - this._hotIcons[k] = i; - i.gicon = this._sensorMenuItems[k].gicon; - this._menuLayout.insert_child_at_index(i, index); - index += 2; - } - } else { - for(let k in this._hotIcons) - this._hotIcons[k].destroy(); - this._hotIcons = {}; - } - for (let l in this._hotLabels) - this._hotLabels[l].set_style_class_name(showIcon ? 'freon-panel-icon-label' : 'freon-panel-no-icon-label'); - } - - _initSensorsUtility() { - if (this._settings.get_boolean('use-generic-lmsensors')) - this._utils.sensors = new SensorsUtil(); - } - - _destroySensorsUtility() { - if (this._utils.sensors) { - this._utils.sensors.destroy(); - delete this._utils.sensors; - } - } - - _sensorsUtilityChanged() { - this._destroySensorsUtility(); - this._initSensorsUtility(); - this._querySensors(); - this._updateUI(true); - } - - _initFreeipmiUtility() { - let exec_method = this._settings.get_int('freeimpi-selected'); - if (exec_method != 0) { - try { - if (exec_method == 1) - this._utils.freeipmi = new FreeipmiUtil("direct"); - else if (exec_method == 2) - this._utils.freeipmi = new FreeipmiUtil("pkexec"); - } catch (e) { - if (exec_method == 2) { - this._settings.set_int('freeimpi-selected', 1); - this._freeipmiUtilityChanged(); - } - } - } - } - - _destroyFreeipmiUtility() { - if(this._utils.freeipmi) { - this._utils.freeipmi.destroy(); - delete this._utils.freeipmi; - } - } - - _freeipmiUtilityChanged() { - this._destroyFreeipmiUtility(); - this._initFreeipmiUtility(); - this._querySensors(); - this._updateUI(true); - } - - _initLiquidctlUtility() { - if (this._settings.get_boolean('use-generic-liquidctl')) - this._utils.liquidctl = new LiquidctlUtil(); - } - - _destroyLiquidctlUtility() { - if (this._utils.liquidctl) { - this._utils.liquidctl.destroy(); - delete this._utils.liquidctl; - } - } - - _liquidctlUtilityChanged() { - this._destroyLiquidctlUtility(); - this._initLiquidctlUtility(); - this._querySensors(); - this._updateUI(true); - } - - _initBatteryUtility() { - if (this._settings.get_boolean("show-battery-stats")) - this._utils.battery = new BatteryUtil(); - } - - _destroyBatteryUtility() { - if (this._utils.battery) { - this._utils.battery.destroy(); - delete this._utils.battery; - } - } - - _batteryUtilityChanged() { - this._destroyBatteryUtility(); - this._initBatteryUtility(); - this._querySensors(); - this._updateUI(true); - } - - _initNvidiaUtility() { - if (this._settings.get_boolean('use-gpu-nvidia')) - this._utils.nvidia = new NvidiaUtil(); - } - - _destroyNvidiaUtility() { - if (this._utils.nvidia) { - this._utils.nvidia.destroy(); - delete this._utils.nvidia; - } - } - - _nvidiaUtilityChanged() { - this._destroyNvidiaUtility(); - this._initNvidiaUtility(); - this._querySensors(); - this._updateUI(true); - } - - _initBumblebeeNvidiaUtility() { - if (this._settings.get_boolean('use-gpu-bumblebeenvidia')) - this._utils.nvidiabumblebee = new BumblebeeNvidiaUtil(); - } - - _destroyBumblebeeNvidiaUtility() { - if (this._utils.nvidiabumblebee) { - this._utils.nvidiabumblebee.destroy(); - delete this._utils.nvidiabumblebee; - } - } - - _nvidiabumblebeeUtilityChanged() { - this._destroyBumblebeeNvidiaUtility(); - this._initBumblebeeNvidiaUtility(); - this._querySensors(); - this._updateUI(true); - } - - _initAticonfigUtility() { - if (this._settings.get_boolean('use-gpu-aticonfig')) - this._utils.aticonfig = new AticonfigUtil(); - } - - _destroyAticonfigUtility() { - if (this._utils.aticonfig) { - this._utils.aticonfig.destroy(); - delete this._utils.aticonfig; - } - } - - _aticonfigUtilityChanged() { - this._destroyAticonfigUtility(); - this._initAticonfigUtility(); - this._querySensors(); - this._updateUI(true); - } - - _initUdisks2Utility() { - if (this._settings.get_boolean('use-drive-udisks2')) - this._utils.udisks2 = new Udisks2Util(() => { - // this._updateDisplay(); we cannot change actor in background thread #74 - }); - } - - _destroyUdisks2Utility() { - if (this._utils.udisks2) { - this._utils.udisks2.destroy(); - delete this._utils.udisks2; - } - } - - _udisks2UtilityChanged() { - this._destroyUdisks2Utility(); - this._initUdisks2Utility(); - this._querySensors(); - this._updateUI(true); - } - - _initHddtempUtility() { - if (this._settings.get_boolean('use-drive-hddtemp')) - this._utils.hddtemp = new HddtempUtil(); - } - - _destroyHddtempUtility() { - if (this._utils.hddtemp) { - this._utils.hddtemp.destroy(); - delete this._utils.hddtemp; - } - } - - _hddtempUtilityChanged() { - this._destroyHddtempUtility(); - this._initHddtempUtility(); - this._querySensors(); - this._updateUI(true); - } - - _initSmartctlUtility() { - if (this._settings.get_boolean('use-drive-smartctl')) - this._utils.smartctl = new SmartctlUtil(); - } - - _destroySmartctlUtility() { - if (this._utils.smartctl) { - this._utils.smartctl.destroy(); - delete this._utils.smartctl; - } - } - - _smartctlUtilityChanged() { - this._destroySmartctlUtility(); - this._initSmartctlUtility(); - this._querySensors(); - this._updateUI(true); - } - - _initNvmecliUtility() { - if (this._settings.get_boolean('use-drive-nvmecli')) - this._utils.nvmecli = new NvmecliUtil(); - } - - _destroyNvmecliUtility() { - if (this._utils.nvmecli) { - this._utils.nvmecli.destroy(); - delete this._utils.nvmecli; - } - } - - _nvmecliUtilityChanged() { - this._destroyNvmecliUtility(); - this._initNvmecliUtility(); - this._querySensors(); - this._updateUI(true); - } - - _updateTimeChanged(){ - GLib.Source.remove(this._timeoutId); - this._addTimer(); - } - - _addTimer(){ - this._timeoutId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, this._settings.get_int('update-time'), () => { - this._querySensors(); - // readd to update queue - return true; - }); - } - - _addSettingChangedSignal(key, callback){ - this._settingChangedSignals.push(this._settings.connect('changed::' + key, callback)); - } - - _onButtonDestroy(){ - this._destroySensorsUtility(); - this._destroyFreeipmiUtility(); - this._destroyLiquidctlUtility(); - - this._destroyNvidiaUtility(); - this._destroyBumblebeeNvidiaUtility(); - this._destroyAticonfigUtility(); - - this._destroyUdisks2Utility(); - this._destroyHddtempUtility(); - this._destroySmartctlUtility(); - this._destroyNvmecliUtility(); - - this._destroyBatteryUtility(); - - GLib.Source.remove(this._timeoutId); - GLib.Source.remove(this._updateUITimeoutId); - - for (let signal of this._settingChangedSignals){ - this._settings.disconnect(signal); - }; - } - - _querySensors(){ - for (let sensor of Object.values(this._utils)) { - if (sensor.available) { - sensor.execute(() => { - // we cannot change actor in background thread #74 - }); - } - } - } - - _updateUI(needUpdate = false){ - for (let sensor of Object.values(this._utils)) { - if (sensor.available && sensor.updated) { - this.debug(sensor + ' updated'); - sensor.updated = false; - needUpdate = true; - } - } - - if(needUpdate) { - this._updateDisplay(); // #74 - this.debug('update display'); - } - } - - _fixNames(sensors){ - let names = []; - - for (let s of sensors){ - if(s.type == 'separator' || - s.type == 'temperature-group' || - s.type == 'temperature-average' || - s.type == 'temperature-maximum') - continue; - - let name = s.label; - let i = 1; - - while(names.indexOf(name) >= 0){ - name = s.label + '-' + i++; - } - - if(name != s.label){ - s.displayName = s.label; - s.label = name; - } - - names.push(name); - } - } - - _updateDisplay(){ - let sensorsTempInfo = []; - let gpuTempInfo = [] - let driveTempInfo = []; - let fanInfo = []; - let voltageInfo = []; - let powerInfo = []; - - if (this._utils.sensors && this._utils.sensors.available) { - if (this._settings.get_boolean('show-temperature')) { - sensorsTempInfo = sensorsTempInfo.concat(this._utils.sensors.temp); - gpuTempInfo = gpuTempInfo.concat(this._utils.sensors.gpu); - driveTempInfo = driveTempInfo.concat(this._utils.sensors.disks); - } - - if (this._settings.get_boolean('show-rotationrate')) - fanInfo = fanInfo.concat(this._utils.sensors.rpm); - if (this._settings.get_boolean('show-voltage')) - voltageInfo = voltageInfo.concat(this._utils.sensors.volt); - if (this._settings.get_boolean('show-power')) { - powerInfo = powerInfo.concat(this._utils.sensors.power); - } - - } - - if (this._utils.freeipmi && this._utils.freeipmi.available) { - if (this._settings.get_boolean('show-temperature')) - sensorsTempInfo = sensorsTempInfo.concat(this._utils.freeipmi.temp); - if (this._settings.get_boolean('show-rotationrate')) - fanInfo = fanInfo.concat(this._utils.freeipmi.rpm); - if (this._settings.get_boolean('show-voltage')) - voltageInfo = voltageInfo.concat(this._utils.freeipmi.volt); - } - - if (this._utils.liquidctl && this._utils.liquidctl.available) { - if (this._settings.get_boolean('show-temperature')) - sensorsTempInfo = sensorsTempInfo.concat(this._utils.liquidctl.temp); - if (this._settings.get_boolean('show-rotationrate')) - fanInfo = fanInfo.concat(this._utils.liquidctl.rpm); - if (this._settings.get_boolean('show-voltage')) - voltageInfo = voltageInfo.concat(this._utils.liquidctl.volt); - } - - if (this._utils.battery && this._utils.battery.available) { - if (this._settings.get_boolean('show-battery-stats')) { - powerInfo = powerInfo.concat(this._utils.battery.power) - } - } - - if (this._utils.nvidia && this._utils.nvidia.available) - if (this._settings.get_boolean('show-temperature')) - gpuTempInfo = gpuTempInfo.concat(this._utils.nvidia.temp); - - if (this._utils.nvidiabumblebee && this._utils.nvidiabumblebee.available) - if (this._settings.get_boolean('show-temperature')) - gpuTempInfo = gpuTempInfo.concat(this._utils.nvidiabumblebee.temp); - - if (this._utils.aticonfig && this._utils.aticonfig.available) - if (this._settings.get_boolean('show-temperature')) - gpuTempInfo = gpuTempInfo.concat(this._utils.aticonfig.temp); - - if (this._utils.udisks2 && this._utils.udisks2.available) - if (this._settings.get_boolean('show-temperature')) - driveTempInfo = driveTempInfo.concat(this._utils.udisks2.temp); - - if (this._utils.hddtemp && this._utils.hddtemp.available) - if (this._settings.get_boolean('show-temperature')) - driveTempInfo = driveTempInfo.concat(this._utils.hddtemp.temp); - - if (this._utils.smartctl && this._utils.smartctl.available) - if (this._settings.get_boolean('show-temperature')) - driveTempInfo = driveTempInfo.concat(this._utils.smartctl.temp); - - if (this._utils.nvmecli && this._utils.nvmecli.available) - if (this._settings.get_boolean('show-temperature')) - driveTempInfo = driveTempInfo.concat(this._utils.nvmecli.temp); - - const comparator = (a, b) => a.label.localeCompare(b.label, undefined, {numeric: true}) - sensorsTempInfo.sort(comparator); - driveTempInfo.sort(comparator); - fanInfo.sort(comparator); - voltageInfo.sort(comparator); - powerInfo.sort(comparator); - - let tempInfo = gpuTempInfo.concat(sensorsTempInfo).concat(driveTempInfo); - - if (tempInfo.length == 0 - && fanInfo.length == 0 - && voltageInfo.length == 0) { - this._sensorMenuItems = {}; - this.menu.removeAll(); - - let item = new PopupMenu.PopupMenuItem( - this._utils.sensors && this._utils.sensors.available - ? _("Please run sensors-detect as root.") - : _("Please install lm_sensors.\nIf this doesn\'t help, click here to report with your sensors output!") - ); - - item.connect('activate',function() { - Util.spawn(["xdg-open", "https://github.com/UshakovVasilii/gnome-shell-extension-freon/wiki/Dependency"]); - }); - - this.menu.addMenuItem(item); - this._appendStaticMenuItems(); - - for (let k in this._hotLabels) - this._hotLabels[k].set_text('\u26a0'); // ⚠, warning - } else { - let tempMean = 0; - let tempMax = 0; - - for (let i of tempInfo) { - let sum = 0; - let total = 0; - - if (i.temp !== null && i.temp >= 0) { - total++; - sum += i.temp; - - if (i.temp > tempMax) - tempMax = i.temp; - } - - if (total != 0) - tempMean = sum / total; - } - - let sensors = []; - - for (let i of gpuTempInfo) { - sensors.push({ - icon: 'gpu-temperature', - type: 'temperature', - label: i.label, - value: this._formatTemp(i.temp), - displayName: i.displayName}); - } - - for (let i of sensorsTempInfo) { - sensors.push({ - icon: 'temperature', - type: 'temperature', - label: i.label, - value: this._formatTemp(i.temp)}); - } - - for (let i of driveTempInfo) { - sensors.push({ - icon: 'drive-temperature', - type: 'temperature', - label: i.label, - value: this._formatTemp(i.temp)}); - } - - if (tempInfo.length > 0) { - sensors.push({type : 'separator'}); - - // Add average and maximum entries - sensors.push({ - icon: 'temperature-average', - type: 'temperature-average', - key: '__average__', - label: _("Average"), - value: this._formatTemp(tempMean)}); - - sensors.push({ - icon: 'temperature-maximum', - type: 'temperature-maximum', - key: '__max__', - label: _("Maximum"), - value: this._formatTemp(tempMax)}); - - if (fanInfo.length > 0 || voltageInfo.length > 0) - sensors.push({type : 'separator'}); - } - - if (tempInfo.length > 0 && this._settings.get_boolean('group-temperature')) { - sensors.push({ - icon: 'temperature-group', - type: 'temperature-group', - label: 'temperature-group', - value: this._formatTemp(tempMean)}); - } - - for (let fan of fanInfo){ - const unit = this._settings.get_boolean('show-rotationrate-unit') ? _(' rpm'): ''; - - sensors.push({ - icon: 'fan', - type: 'fan', - label: fan.label, - value: _("%d%s").format(fan.rpm, unit)}); - } - - if (fanInfo.length > 0 && voltageInfo.length > 0){ - sensors.push({type : 'separator'}); - } - - for (let voltage of voltageInfo){ - const unit = this._settings.get_boolean('show-voltage-unit') ? _('V'): ''; - - sensors.push({ - icon: 'voltage', - type: 'voltage', - label: voltage.label, - value: _("%s%.2f%s").format(((voltage.volt >= 0) ? '+' : ''), - voltage.volt, unit)}); - } - - for (let power of powerInfo){ - const unit = this._settings.get_boolean('show-power-unit') ? _('W'): ''; - let _icon = 'power'; - if (power.label.startsWith("BAT")) { - _icon = 'battery'; - } - sensors.push({ - icon: _icon, - type: 'power', - label: power.label, - value: _("%s%.2f%s").format(((power.power >= 0) ? '+' : ''), - power.power, unit)}); - } - - this._fixNames(sensors); - - for (let k in this._hotLabels) - this._hotLabels[k].set_text('\u26a0'); // ⚠, warning - - for (let s of sensors) - if(s.type != 'separator') { - let l = this._hotLabels[s.key || s.label]; - if(l) - l.set_text(s.value); - } - - if(this._lastSensorsCount && this._lastSensorsCount==sensors.length){ - for (let s of sensors) { - if(s.type != 'separator') { - let item = this._sensorMenuItems[s.key || s.label]; - if(item) { - if(s.type == 'temperature-group') - item.status.text = s.value; - else { - item.value = s.value; - if(s.displayName) - item.display_name = s.displayName; - } - } else { - this._needRerender = true; - } - } - } - } else { - this._needRerender = true; - } - - if(this._needRerender){ - this._needRerender = false; - this.debug('Render all MenuItems'); - this.menu.removeAll(); - this._appendMenuItems(sensors); - } - } - } - - _appendStaticMenuItems(){ - // separator - this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); - - let wiki = new PopupMenu.PopupBaseMenuItem(); - wiki.actor.add_child(new St.Label({ text: _("Go to the Freon wiki"), x_align: Clutter.ActorAlign.START, x_expand: true })); - wiki.connect('activate', () => { - Util.spawn(["xdg-open", "https://github.com/UshakovVasilii/gnome-shell-extension-freon/wiki"]); - }); - - this.menu.addMenuItem(wiki); - - let settings = new PopupMenu.PopupBaseMenuItem(); - settings.actor.add_child(new St.Label({ text: _("Sensor Settings"), x_align: Clutter.ActorAlign.START, x_expand: true })); - settings.connect('activate', () => { - Util.spawn(["gnome-extensions", "prefs", this._extension_uuid]); - }); - - this.menu.addMenuItem(settings); - } - - _appendMenuItems(sensors){ - this._lastSensorsCount = sensors.length; - this._sensorMenuItems = {}; - let needGroupTemperature = this._settings.get_boolean('group-temperature'); - let needGroupRotationRate = this._settings.get_boolean('group-rotationrate'); - let needGroupVoltage = this._settings.get_boolean('group-voltage'); - - if (needGroupRotationRate) { - let i = 0; - - for (let s of sensors) - if (s.type == 'fan') - i++; - - if (i < 2) - needGroupRotationRate = false; - } - - if (needGroupVoltage) { - let i = 0; - - for (let s of sensors) - if (s.type == 'voltage') - i++; - - if (i < 2) - needGroupVoltage = false; - } - - let temperatureGroup = null; - let rotationrateGroup = null; - let voltageGroup = null; - - for (let s of sensors){ - if(s.type == 'separator') { - this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); - } else if (s.type == 'temperature-group') { - if(temperatureGroup) { - temperatureGroup.status.text = s.value; - this._sensorMenuItems['temperature-group'] = temperatureGroup; - } - } else { - let key = s.key || s.label; - let item = new FreonItem(this._sensorIcons[s.icon], key, s.label, s.value, s.displayName || undefined); - - item.connect('activate', (self) => { - let l = this._hotLabels[self.key]; - let hotSensors = this._settings.get_strv('hot-sensors'); - - if (l) { - hotSensors.splice(hotSensors.indexOf(self.key), 1); - delete this._hotLabels[self.key]; - l.destroy(); // destroy is called after dict cleanup to prevert set_label on not exist actor - let i = this._hotIcons[self.key]; - - if (i) { - i.destroy(); - delete this._hotIcons[self.key]; - } - - self.main = false; - } else { - hotSensors.push(self.key); - - if (Object.keys(this._hotLabels).length == 0) { - this._initialIcon.destroy(); - this._initialIcon = null; - } - - let showIcon = this._settings.get_boolean('show-icon-on-panel'); - this._createHotItem(self.key, showIcon, self.gicon); - self.main = true; - } - - for (let i = hotSensors.length -1; i >= 0 ; i--) { - let k = hotSensors[i]; - - if (!this._sensorMenuItems[k]) { - hotSensors.splice(i, 1); - let ll = this._hotLabels[k] - delete this._hotLabels[k]; - ll.destroy(); // destroy is called after dict cleanup to prevert set_label on not exist actor - - if (this._hotIcons[k]) { - this._hotIcons[k].destroy(); - delete this._hotIcons[k]; - } - } - } - - if (Object.keys(this._hotLabels).length == 0) - this._createInitialIcon(); - - this._settings.set_strv('hot-sensors', hotSensors.filter( - function(item, pos) { - return hotSensors.indexOf(item) == pos; - })); - }); - - if (this._hotLabels[key]) { - item.main = true; - if(this._hotIcons[key]) - this._hotIcons[key].gicon = item.gicon; - } - - this._sensorMenuItems[key] = item; - - if (needGroupTemperature && s.type == 'temperature') { - if (!temperatureGroup) { - temperatureGroup = new PopupMenu.PopupSubMenuMenuItem(_('Temperature'), true); - temperatureGroup.icon.gicon = this._sensorIcons['temperature']; - - if (!temperatureGroup.status) { // gnome 3.18 and hight - temperatureGroup.status = new St.Label({ - style_class: 'popup-status-menu-item', - y_expand: true, - y_align: Clutter.ActorAlign.CENTER }); - temperatureGroup.actor.insert_child_at_index(temperatureGroup.status, 4); - } - - this.menu.addMenuItem(temperatureGroup); - } - - temperatureGroup.menu.addMenuItem(item); - } else if (needGroupRotationRate && s.type == 'fan') { - if (!rotationrateGroup) { - rotationrateGroup = new PopupMenu.PopupSubMenuMenuItem(_('Rotation Rate'), true); - rotationrateGroup.icon.gicon = this._sensorIcons['fan']; - this.menu.addMenuItem(rotationrateGroup); - } - - rotationrateGroup.menu.addMenuItem(item); - } else if (needGroupVoltage && s.type == 'voltage') { - if (!voltageGroup) { - voltageGroup = new PopupMenu.PopupSubMenuMenuItem(_('Voltage'), true); - voltageGroup.icon.gicon = this._sensorIcons['voltage']; - this.menu.addMenuItem(voltageGroup); - } - - voltageGroup.menu.addMenuItem(item); - } else { - this.menu.addMenuItem(item); - } - } - } - this._appendStaticMenuItems(); - } - - - _toFahrenheit(c){ - return ((9/5)*c+32); - } - - _formatTemp(value) { - let unit_type = this._settings.get_int('unit'); - let show_unit = this._settings.get_boolean('show-temperature-unit'); - - if(value === null) { - return 'N/A'; - } - - let format = '%.1f'; - if (!this._settings.get_boolean('show-decimal-value')){ - format = '%.0f'; - } - - if (unit_type == 1) { - value = this._toFahrenheit(value); - } - - if (show_unit) { - if (unit_type == 0) { - format += "\u00b0C"; - } else if (unit_type == 1) { - format += "\u00b0F"; - } - } - return format.format(value); - } - -} - -export default class extends Extension { - - enable() { - this._freonMenu = new FreonMenuButton(this.uuid, this.path, this.getSettings()); - Main.panel.addToStatusArea('freonMenu', this._freonMenu); - this._freonMenu._positionInPanelChanged(); - } - - disable() { - this._freonMenu?.destroy(); - this._freonMenu = null; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/freeipmiUtil.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/freeipmiUtil.js deleted file mode 100644 index 4b38c5ac..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/freeipmiUtil.js +++ /dev/null @@ -1,100 +0,0 @@ -import GLib from 'gi://GLib'; - -import CommandLineUtil from './commandLineUtil.js'; -import PkexecUtil from './pkexecUtil.js'; - -export default class FreeipmiUtil extends CommandLineUtil { - - constructor(exec_method) { - super(); - - const path = GLib.find_program_in_path('ipmi-sensors'); - // --comma-separated-output: pseudo csv output format, splitting on comma may be good enough for the values we read. - this._argv = path ? [path, '--comma-separated-output'] : null; - - if (this._argv && exec_method === 'pkexec') - { - let pkexecUtil = new PkexecUtil('ipmi-sensors'); - if (!pkexecUtil.checkOrInstall()) { - throw 'cannot run ipmi-sensors with pkexec'; - } - const pkexec_path = GLib.find_program_in_path('pkexec'); - this._argv = pkexec_path ? [pkexec_path].concat(this._argv) : null; - } - } - - // Avoid parsing the data more than once. - execute(callback) { - super.execute(() => { - let data = []; - - for (const line of this._output) { - if (!line) - continue; - - const value_list = line.split(','); - - if (value_list.length <= 1) - break; - - const id = value_list[0]; - - if (id === 'ID') - continue; - - const name = value_list[1]; - const value = value_list[3]; - const unit = value_list[4]; - - if (value !== 'N/A' && unit !== 'N/A') { - data[name] = {}; - data[name]["value"] = value; - data[name]["unit"] = unit; - } - } - - this._data = data; - callback(); - }); - } - - get temp() { - return this._parseSensorsOutput(/^(C|C per minute)$/, 'temp'); - } - - get rpm() { - return this._parseSensorsOutput(/^RPM$/, 'rpm'); - } - - get volt() { - return this._parseSensorsOutput(/^V$/, 'volt'); - } - - _parseSensorsOutput(sensorFilter, sensorType) { - if(!this._data) - return []; - - const data = this._data; - - let sensors = []; - for (const name in data) { - if (!data.hasOwnProperty(name)) - continue; - - const value = data[name]["value"] - const unit = data[name]["unit"] - - if (!sensorFilter.test(unit)) - continue; - - const feature = { - label: name, - [sensorType]: parseFloat(value) - }; - - sensors.push(feature); - } - - return sensors; - } -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/freonItem.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/freonItem.js deleted file mode 100644 index d087ad8c..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/freonItem.js +++ /dev/null @@ -1,53 +0,0 @@ -import Clutter from 'gi://Clutter'; -import GObject from 'gi://GObject'; -import St from 'gi://St'; - -import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js'; - -export default class FreonItem extends PopupMenu.PopupBaseMenuItem { - - static { - GObject.registerClass(this); - } - - constructor(gIcon, key, label, value, displayName) { - super(); - this._main = false; - this._key = key; - this._gIcon = gIcon; - - this._labelActor = new St.Label({text: displayName ? displayName : label, x_align: Clutter.ActorAlign.CENTER, x_expand: true}); - this.actor.add_child(new St.Icon({ style_class: 'popup-menu-icon', gicon : gIcon})); - this.actor.add_child(this._labelActor); - this._valueLabel = new St.Label({text: value}); - this.actor.add_child(this._valueLabel); - } - - set main(main) { - if(main) - this.setOrnament(PopupMenu.Ornament.CHECK); - else - this.setOrnament(PopupMenu.Ornament.NONE); - this._main = main; - } - - get main() { - return this._main; - } - - get key() { - return this._key; - } - - set display_name(text) { - return this._labelActor.text = text; - } - - get gicon() { - return this._gIcon; - } - - set value(value) { - this._valueLabel.text = value; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/hddtempUtil.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/hddtempUtil.js deleted file mode 100644 index e52fbc22..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/hddtempUtil.js +++ /dev/null @@ -1,81 +0,0 @@ -import GLib from 'gi://GLib'; - -import CommandLineUtil from './commandLineUtil.js'; - -function run_command(argv) { - return new TextDecoder().decode(GLib.spawn_command_line_sync(argv)[1]).trim(); -} - -export default class HddtempUtil extends CommandLineUtil { - - constructor() { - super(); - let hddtempArgv = GLib.find_program_in_path('hddtemp'); - if(hddtempArgv) { - // check if this user can run hddtemp directly. - if(!GLib.spawn_command_line_sync(hddtempArgv)[3]){ - this._argv = [hddtempArgv]; - return; - } - } - - // doesn't seem to be the case… is it running as a daemon? - // Check first for systemd - let systemctl = GLib.find_program_in_path('systemctl'); - let pidof = GLib.find_program_in_path('pidof'); - let nc = GLib.find_program_in_path('nc'); - let pid = undefined; - - if(systemctl) { - let activeState = run_command(systemctl + " show hddtemp.service -p ActiveState"); - if(activeState == "ActiveState=active") { - let output = run_command(systemctl + " show hddtemp.service -p MainPID"); - - if(output.length && output.split("=").length == 2) - pid = Number(output.split("=")[1].trim()); - } - } - - // systemd isn't used on this system, try sysvinit instead - if(!pid && pidof) { - let output = run_command("pidof hddtemp"); - if(output.length) - pid = Number(output.trim()); - } - - if(nc && pid) { - // get daemon command line - let cmdline = GLib.file_get_contents('/proc/'+pid+'/cmdline'); - // get port or assume default - let match = /(-p\W*|--port=)(\d{1,5})/.exec(cmdline) - let port = match ? parseInt(match[2]) : 7634; - // use net cat to get data - this._argv = [nc, 'localhost', port.toString()]; - } - } - - get temp() { - if(!this._output) - return []; - - let sep = /nc$/.exec(this._argv[0]) ? '|' : ': '; - let hddtempOutput = []; - if (this._output.join().indexOf(sep+sep) > 0) { - hddtempOutput = this._output.join().split(sep+sep); - } else { - hddtempOutput = this._output; - } - - let sensors = []; - for (let line of hddtempOutput) { - let fields = line.split(sep).filter(function(e){ return e; }); - let sensor = { label: fields[1], temp: parseFloat(fields[2])}; - //push only if the temp is a Number - if (!isNaN(sensor.temp)) - sensors.push(sensor); - } - - return sensors; - } - -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/freon-battery-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/freon-battery-symbolic.svg deleted file mode 100644 index b57789a5..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/freon-battery-symbolic.svg +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - image/svg+xml - - Gnome Symbolic Icon Theme - - - - - - - - - - - - - Gnome Symbolic Icon Theme - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/freon-fan-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/freon-fan-symbolic.svg deleted file mode 100644 index a584b74d..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/freon-fan-symbolic.svg +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - image/svg+xml - - Gnome Symbolic Icon Theme - - - - - - - Gnome Symbolic Icon Theme - - - - - - - - - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/freon-gpu-temperature-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/freon-gpu-temperature-symbolic.svg deleted file mode 100644 index e75e10ac..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/freon-gpu-temperature-symbolic.svg +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - - image/svg+xml - - Gnome Symbolic Icon Theme - - - - - - - Gnome Symbolic Icon Theme - - - - - - - - - - - - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/freon-temperature-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/freon-temperature-symbolic.svg deleted file mode 100644 index ed342e19..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/freon-temperature-symbolic.svg +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - image/svg+xml - - Gnome Symbolic Icon Theme - - - - - - - Gnome Symbolic Icon Theme - - - - - - - - - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/freon-voltage-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/freon-voltage-symbolic.svg deleted file mode 100644 index b2e7effc..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/freon-voltage-symbolic.svg +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - image/svg+xml - - Gnome Symbolic Icon Theme - - - - - - - Gnome Symbolic Icon Theme - - - - - - - - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/material-icons/LICENSE b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/material-icons/LICENSE deleted file mode 100644 index 4ae316b4..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/material-icons/LICENSE +++ /dev/null @@ -1,94 +0,0 @@ -Copyright (c) 2014, Austin Andrews (http://materialdesignicons.com/), -with Reserved Font Name Material Design Icons. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/material-icons/material-gpu-temperature-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/material-icons/material-gpu-temperature-symbolic.svg deleted file mode 100644 index b01e8035..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/material-icons/material-gpu-temperature-symbolic.svg +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/material-icons/material-temperature-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/material-icons/material-temperature-symbolic.svg deleted file mode 100644 index 03a1556b..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/icons/material-icons/material-temperature-symbolic.svg +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/liquidctlUtil.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/liquidctlUtil.js deleted file mode 100644 index a2f3015a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/liquidctlUtil.js +++ /dev/null @@ -1,89 +0,0 @@ -// Provide sensor data from liquidctl. -import GLib from 'gi://GLib'; - -import CommandLineUtil from './commandLineUtil.js'; - -export default class LiquidctlUtil extends CommandLineUtil { - - constructor() { - super(); - const path = GLib.find_program_in_path('liquidctl'); - this._argv = path ? [path, 'status', '--json'] : null; - } - - // Avoid processing the data more than once. - execute(callback) { - super.execute(() => { - try { - const output = this._output.join(''); - if (output == '') - throw 'no data (liquidctl probably exited with an error)'; - - let temp = []; - let rpm = []; - let volt = []; - - let dest = null; - let type = null; - - for (const device of JSON.parse(output)) { - // use a shorter device name to reduce visual noise: - // - omit manufacturer name - // - omit details in parenthesis - const shortDevice = device.description.replace(/(^.+? )|( \(.+)/g, ''); - - for (const item of device.status) { - switch (item.unit) { - case '°C': - dest = temp; - type = 'temp'; - break; - case 'rpm': - dest = rpm; - type = 'rpm'; - break; - case 'V': - dest = volt; - type = 'volt'; - break; - default: - continue; - } - - // use a shorter sensor name to reduce visual noise: - // - omit temperature|speed|voltage suffix - const shortKey = item.key.replace(/ (temperature|speed|voltage)/, ''); - - const feature = { - label: shortDevice + ' ' + shortKey, - [type]: item.value, - }; - dest.push(feature); - } - } - - this._temp = temp; - this._rpm = rpm; - this._volt = volt; - callback(); - } catch (e) { - this._temp = null; - this._rpm = null; - this._volt = null; - logError(e, 'failed to process data from liquidctl'); - } - }); - } - - get temp() { - return this._temp || []; - } - - get rpm() { - return this._rpm || []; - } - - get volt() { - return this._volt || []; - } -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/de/LC_MESSAGES/freon.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/de/LC_MESSAGES/freon.mo deleted file mode 100644 index 4611aa16..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/de/LC_MESSAGES/freon.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/es_AR/LC_MESSAGES/freon.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/es_AR/LC_MESSAGES/freon.mo deleted file mode 100644 index 261b768b..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/es_AR/LC_MESSAGES/freon.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/es_ES/LC_MESSAGES/freon.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/es_ES/LC_MESSAGES/freon.mo deleted file mode 100644 index b65723d2..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/es_ES/LC_MESSAGES/freon.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/fr/LC_MESSAGES/freon.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/fr/LC_MESSAGES/freon.mo deleted file mode 100644 index 27e131a8..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/fr/LC_MESSAGES/freon.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/hu/LC_MESSAGES/freon.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/hu/LC_MESSAGES/freon.mo deleted file mode 100644 index 32c7b98f..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/hu/LC_MESSAGES/freon.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/it/LC_MESSAGES/freon.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/it/LC_MESSAGES/freon.mo deleted file mode 100644 index 5c03f2f1..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/it/LC_MESSAGES/freon.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/nl/LC_MESSAGES/freon.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/nl/LC_MESSAGES/freon.mo deleted file mode 100644 index 89807385..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/nl/LC_MESSAGES/freon.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/pl/LC_MESSAGES/freon.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/pl/LC_MESSAGES/freon.mo deleted file mode 100644 index 34198090..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/pl/LC_MESSAGES/freon.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/pt_BR/LC_MESSAGES/freon.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/pt_BR/LC_MESSAGES/freon.mo deleted file mode 100644 index f8706950..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/pt_BR/LC_MESSAGES/freon.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/ru/LC_MESSAGES/freon.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/ru/LC_MESSAGES/freon.mo deleted file mode 100644 index c2f6d5cf..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/ru/LC_MESSAGES/freon.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/tr/LC_MESSAGES/freon.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/tr/LC_MESSAGES/freon.mo deleted file mode 100644 index 6e1d32cf..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/tr/LC_MESSAGES/freon.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/uk_UA/LC_MESSAGES/freon.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/uk_UA/LC_MESSAGES/freon.mo deleted file mode 100644 index aa8879e5..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/uk_UA/LC_MESSAGES/freon.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/zh_CN/LC_MESSAGES/freon.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/zh_CN/LC_MESSAGES/freon.mo deleted file mode 100644 index 3b00152f..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/zh_CN/LC_MESSAGES/freon.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/zh_TW/LC_MESSAGES/freon.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/zh_TW/LC_MESSAGES/freon.mo deleted file mode 100644 index c5410039..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/locale/zh_TW/LC_MESSAGES/freon.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/nvidiaUtil.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/nvidiaUtil.js deleted file mode 100644 index 84e74b33..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/nvidiaUtil.js +++ /dev/null @@ -1,191 +0,0 @@ -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; - -export default class NvidiaUtil { - - constructor() { - this._nvidiaSmiPath = GLib.find_program_in_path('nvidia-smi'); - this._updated = false; - this._gpuInfo = {}; - this._output = []; - } - - async execute(callback) { - try { - // Read all GPUs from /proc/driver/nvidia/gpus. - const directory = Gio.File.new_for_path('/proc/driver/nvidia/gpus'); - const iter = await new Promise((resolve, reject) => { - directory.enumerate_children_async( - 'standard::*', - Gio.FileQueryInfoFlags.NOFOLLOW_SYMLINKS, - GLib.PRIORITY_DEFAULT, - null, - (file_, result) => { - try { - resolve(directory.enumerate_children_finish(result)); - } catch (e) { - reject(e); - } - } - ); - }); - const gpus = [] - - while (true) { - const infos = await new Promise((resolve, reject) => { - iter.next_files_async(10, GLib.PRIORITY_DEFAULT, null, (iter_, res) => { - try { - resolve(iter.next_files_finish(res)); - } catch (e) { - reject(e); - } - }); - }); - - if (infos.length === 0) - break; - - for (const info of infos) - gpus.push(info.get_name()); - } - - // For each GPU... - let gpuInfo = {}; - for (const gpu of gpus) { - // ...read /proc/driver/nvidia/gpus//power and check if it supports sleep. - const file = Gio.File.new_for_path(`/proc/driver/nvidia/gpus/${gpu}/power`); - const [, contents, etag] = await new Promise((resolve, reject) => { - file.load_contents_async(null, (file_, result) => { - try { - resolve(file.load_contents_finish(result)); - } catch (e) { - reject(e); - } - }); - }); - - // If the GPU is sleeping, don't poll it. - const decoder = new TextDecoder('utf-8'); - const contentsString = decoder.decode(contents); - const prevGpuInfo = this._gpuInfo[gpu] || {}; - if (contentsString.split('\n')[1].endsWith('Off') && prevGpuInfo.output) { - gpuInfo[gpu] = { output: prevGpuInfo.output.split(',')[0] + ',N/A' }; - continue; - } - - // If the GPU needs time to sleep, then keep showing the old temperature. - // Since even process monitoring prevents sleep, we don't check && sleepEligible :/ - if ((prevGpuInfo.skipUntil || 0) > Date.now()) { - gpuInfo[gpu] = prevGpuInfo; - continue; - } - - // Poll the GPU. - gpuInfo[gpu] = { output: await this.getGpuInfo(gpu) }; - - // If runtime D3 is enabled and the GPU is eligible to sleep... - try { - const sleepEligible = await this.isGpuEligibleToSleep(gpu); - if (contentsString.split('\n')[0].includes('Enabled') && sleepEligible) { - // ...skip polling it for 30 seconds. - gpuInfo[gpu].skipUntil = Date.now() + 30000; - } - } catch (e) { - console.error(e); - } - } - this._gpuInfo = gpuInfo; - this._output = Object.keys(this._gpuInfo) - .sort() - .map(gpu => gpuInfo[gpu].output) - .filter(output => !!output); - } catch (e) { - console.error(e); - } finally { - callback(); - this._updated = true; - } - } - - isGpuEligibleToSleep(id) { - return new Promise((resolve, reject) => { - let proc = Gio.Subprocess.new( - [this._nvidiaSmiPath, 'pmon', '--count=1', `--id=${id}`], - Gio.SubprocessFlags.STDOUT_PIPE | - Gio.SubprocessFlags.STDERR_PIPE); - - proc.communicate_utf8_async(null, null, (proc, result) => { - try { - let [, stdout, stderr] = proc.communicate_utf8_finish(result); - const processes = stdout ? stdout.trim().split('\n').slice(2) : []; - if (processes.length === 1) { - const process = processes[0].toLowerCase().split(' ').pop().replace(/-?server/, ''); - resolve(process === 'xorg' || process === 'x' || process === 'x11' || // X11 - process === 'gnome-shell'); // Wayland - } else { - resolve(processes.length === 0); - } - } catch (e) { - reject(e); - } - }); - }); - } - - getGpuInfo(id) { - return new Promise((resolve, reject) => { - let proc = Gio.Subprocess.new( - [this._nvidiaSmiPath, '--query-gpu=name,temperature.gpu', '--format=csv,noheader', `--id=${id}`], - Gio.SubprocessFlags.STDOUT_PIPE | - Gio.SubprocessFlags.STDERR_PIPE); - - proc.communicate_utf8_async(null, null, (proc, result) => { - try { - let [, stdout, stderr] = proc.communicate_utf8_finish(result); - resolve(stdout ? stdout.trim() : ''); - } catch (e) { - reject(e); - } - }); - }); - } - - get temp() { - let gpus = []; - - if (this._output) { - for (let line of this._output) { - let values = line.split(','); - if (values.length < 2) - continue; - - let label = values[0].trim(); - let temp = values[1] === 'N/A' ? null : parseFloat(values[1]); - - if(!label || isNaN(temp)) - continue; - - gpus.push({ label: label, temp: temp }); - } - } - - return gpus; - } - - get available() { - return !!this._nvidiaSmiPath; - } - - get updated() { - return this._updated; - } - - set updated(updated) { - this._updated = updated; - } - - destroy(callback) { - this._gpuInfo = {}; - this._output = []; - } -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/nvmecliUtil.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/nvmecliUtil.js deleted file mode 100644 index 2b12d2d0..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/nvmecliUtil.js +++ /dev/null @@ -1,58 +0,0 @@ -import GLib from 'gi://GLib'; - -function getNvmeData (argv){ - const nvme = GLib.find_program_in_path('nvme') - return JSON.parse(new TextDecoder().decode(GLib.spawn_command_line_sync(`${nvme} ${argv} -o json`)[1])) -} - -export default class NvmecliUtil { - - constructor(callback) { - this._nvmeDevices = []; - try { - this._nvmeDevices = getNvmeData("list")["Devices"] - } catch (e) { - logError(e, '[FREON] Unable to find nvme devices'); - } - this._updated = true; - } - - get available(){ - return this._nvmeDevices.length > 0; - } - - get updated (){ - return this._updated; - } - - set updated (updated){ - this._updated = updated; - } - - get temp() { - let sensors = []; - for (let device of this._nvmeDevices) { - var smart_log = getNvmeData(`smart-log ${device["DevicePath"]}`); - if( smart_log.hasOwnProperty('temperature_sensor_2') ){ - sensors.push({ label: device["ModelNumber"] + " S1", - temp: parseFloat(smart_log.temperature_sensor_1) - 273.15 }); - sensors.push({ label: device["ModelNumber"] + " S2", - temp: parseFloat(smart_log.temperature_sensor_2) - 273.15 }); - } - else{ - sensors.push({ label: device["ModelNumber"], - temp: parseFloat(smart_log.temperature) - 273.15 }); - } - } - return sensors; - } - - destroy(callback) { - this._nvmeDevices = []; - } - - execute(callback) { - this._updated = true; - } - -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/pkexecUtil.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/pkexecUtil.js deleted file mode 100644 index 054dfe92..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/pkexecUtil.js +++ /dev/null @@ -1,73 +0,0 @@ -import GLib from 'gi://GLib'; -import Gio from 'gi://Gio'; - -export default class PkexecUtil { - constructor(name) { - this._name = name; - this._policy = 'com.github.UshakovVasilii.freon.' + name + '.policy'; - this._actions = '/usr/share/polkit-1/actions' - this._pkexec = GLib.find_program_in_path('pkexec'); - // Currently hardcoded in policy file. - this._bin = '/usr/sbin/' + name; - this._dir = this.dir(); - } - - dir() { - let uri = (new Error()).stack.split('\n')[1]; - let prefix = this.constructor.name + '@file://' - if (!uri.startsWith(prefix)) { - log('[FREON] failed to guess extension directory'); - return null; - } - return Gio.File.new_for_path(uri.substring(prefix.length)).get_parent().get_path(); - } - - available_pkexec() { - return !!this._pkexec; - } - - available_bin() { - return GLib.find_program_in_path(this._name) == this._bin; - } - - installed() { - return GLib.file_test(this._actions + '/' + this._policy, GLib.FileTest.EXISTS); - } - - run(command) { - return GLib.spawn_command_line_sync(this._pkexec + ' ' + command); - } - - install() { - if (!this._dir) - { - log('[FREON] cannot find ' + this._name + ' pkexec policy file ' + this._policy); - return false; - } - try { - this.run('install "' + this._dir + '/policies/' + this._policy + '" ' + this._actions); - } catch(e) {} - if (!this.installed()) - { - log('[FREON] failed to install ' + this._name + ' pkexec policy'); - return false; - } - return true; - } - - checkOrInstall() { - if (!this.available_pkexec()) { - log('[FREON] pkexec is not available'); - return false; - } - if (!this.available_bin()) { - log('[FREON] ' + this._bin + ' is not available'); - return false; - } - if (!this.installed()) { - log('[FREON] ' + this._name + ' policy is not installed yet'); - return this.install(); - } - return true; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/po/.keep b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/po/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/policies/com.github.UshakovVasilii.freon.ipmi-sensors.policy b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/policies/com.github.UshakovVasilii.freon.ipmi-sensors.policy deleted file mode 100644 index b4934295..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/policies/com.github.UshakovVasilii.freon.ipmi-sensors.policy +++ /dev/null @@ -1,18 +0,0 @@ - - - - Vasilii Ushakov - https://github.com/UshakovVasilii - - - Run ipmi-sensors - No Authorization required to run ipmi-sensors. - - yes - yes - yes - - /usr/sbin/ipmi-sensors - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/prefs.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/prefs.js deleted file mode 100644 index 1941ec92..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/prefs.js +++ /dev/null @@ -1,188 +0,0 @@ -import Gio from 'gi://Gio' -import Gtk from 'gi://Gtk' -import Adw from 'gi://Adw' - -import {ExtensionPreferences, gettext as _} from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; - - -export default class FreonPreferences extends ExtensionPreferences { - - fillPreferencesWindow(window) { - window.set_default_size(1010, 800); - - const grid = new Gtk.Grid({ - column_homogeneous: true, - column_spacing: 10, - row_homogeneous: false, - }); - - this._settings = this.getSettings() - const page = new Adw.PreferencesPage({ - title: _('General'), - icon_name: 'dialog-information-symbolic', - - }); - - const display_options = this._create_display_options(); - const generic_sensor_providers = this._create_generic_sensor_providers(); - const gpu_sensor_providers = this._create_gpu_sensor_providers(); - const drive_sensor_providers = this._create_drive_sensor_providers(); - const show_sensors = this._create_show_sensors(); - const item_group = this._create_item_grouping(); - - grid.attach(display_options, 0, 0, 1, 12); - grid.attach(generic_sensor_providers, 1, 0, 1, 4); - grid.attach(gpu_sensor_providers, 1, 4, 1, 4); - grid.attach(drive_sensor_providers, 1, 8, 1, 4); - grid.attach(show_sensors, 2, 0, 1, 6); - grid.attach(item_group, 2, 6, 1, 4); - - const widget = new Adw.PreferencesGroup({ - hexpand: true, - vexpand: true, - }) - widget.add(grid); - - page.add(widget); - - window.add(page); - } - - - _create_display_options() { - const group = new Adw.PreferencesGroup({ - title: _('Display Options'), - width_request: 320, - }) - - const sensor_poll_intervall = new Adw.SpinRow({ - title: _('Sensor Polling Interval'), - adjustment: new Gtk.Adjustment({ - lower: 1, - upper: 60, - value: 5, - step_increment: 1, - }) - }) - this._settings.bind('update-time', sensor_poll_intervall, 'value', Gio.SettingsBindFlags.DEFAULT) - group.add(sensor_poll_intervall) - - const position_in_panel = new Adw.ComboRow({ - title: _('Panel Position'), - model: new Gtk.StringList({strings: ["Left", "Center", "Right"] }), - }) - this._settings.bind("position-in-panel", position_in_panel, "selected", Gio.SettingsBindFlags.NO_SENSETIVITY); - group.add(position_in_panel) - - - const index_on_panel = new Adw.SpinRow({ - title: _('Index on Panel'), - adjustment: new Gtk.Adjustment({ - lower: -1, - upper: 25, - value: 1, - step_increment: 1, - }) - }); - group.add(index_on_panel); - this._settings.bind('panel-box-index', index_on_panel, 'value', Gio.SettingsBindFlags.DEFAULT); - - group.add(this._addSwitch("Show Icon on Panel", "show-icon-on-panel")); - - const unit_setting = new Adw.ComboRow({ - title: _('Temperature Unit'), - model: new Gtk.StringList({strings: ["\u00b0C", "\u00b0F"]}), - }); - this._settings.bind("unit", unit_setting, "selected", Gio.SettingsBindFlags.NO_SENSETIVITY); - group.add(unit_setting); - - group.add(this._addSwitch("Show Temperature Unit", "show-temperature-unit")); - group.add(this._addSwitch("Show Rotation Rate Unit", "show-rotationrate-unit")); - group.add(this._addSwitch("Show Voltage Unit", "show-voltage-unit")); - group.add(this._addSwitch("Show Power Unit", "show-power-unit")); - group.add(this._addSwitch("Show Decimal Values", "show-decimal-value", "Show additionnal digits after decimal point")); - return group; - } - - _create_generic_sensor_providers() { - const group = new Adw.PreferencesGroup({ - title: _('Generic Sensor Providers'), - width_request: 320, - }); - - group.add(this._addSwitch("lm-sensors", "use-generic-lmsensors", "Read sensors from lm-sensors")); - group.add(this._addSwitch("liquidctl", "use-generic-liquidctl", "Read sensors from liquidctl (v1.7.0+)")); - - const freeimpi = new Adw.ComboRow({ - title: _('FreeIMPI'), - model: new Gtk.StringList({strings: ["Disabled", "Direct", "pkexec"] }), - selected: this._settings.get_int("freeimpi-selected"), - subtitle: "Read sensors using ipmi-sensors from FreeIPMI" - }); - this._settings.bind("freeimpi-selected", freeimpi, "selected", Gio.SettingsBindFlags.NO_SENSETIVITY); - group.add(freeimpi); - - return group; - } - - _create_gpu_sensor_providers() { - const group = new Adw.PreferencesGroup({ - title: _('GPU Sensor Providers'), - width_request: 320, - }); - group.add(this._addSwitch("Nvidia", "use-gpu-nvidia")); - group.add(this._addSwitch("Bumblebee + Nvidia", "use-gpu-bumblebeenvidia")); - group.add(this._addSwitch("Catalyst", "use-gpu-aticonfig")); - - return group; - } - - _create_drive_sensor_providers() { - const group = new Adw.PreferencesGroup({ - title: _('Drive Sensor Providers'), - width_request: 320, - }); - group.add(this._addSwitch("Udisks2", "use-drive-udisks2")); - group.add(this._addSwitch("Hddtemp", "use-drive-hddtemp")); - group.add(this._addSwitch("smartctl", "use-drive-smartctl", "Read drive sensors using smartctl from smartmontools")); - group.add(this._addSwitch("nvme-cli", "use-drive-nvmecli")); - - return group; - } - - _create_show_sensors() { - const group = new Adw.PreferencesGroup({ - title: _('Show Sensors'), - width_request: 320, - }) - - group.add(this._addSwitch("Temperature", "show-temperature")); - group.add(this._addSwitch("Rotation Rate", "show-rotationrate")); - group.add(this._addSwitch("Voltage", "show-voltage")); - group.add(this._addSwitch("Power", "show-power")); - group.add(this._addSwitch("Battery", "show-battery-stats")); - return group - } - - _create_item_grouping() { - const group = new Adw.PreferencesGroup({ - title: _('Group Items'), - width_request: 320, - description: "Group three or more sensor of the same type", - }) - group.add(this._addSwitch("Temperature", "group-temperature")); - group.add(this._addSwitch("Rotation Rate", "group-rotationrate")); - group.add(this._addSwitch("Voltage", "group-voltage")); - return group; - } - - _addSwitch(title, key, help = "") { - const sw = new Adw.SwitchRow({ - title: _(title), - active: this._settings.get_boolean(key), - subtitle: help - }); - this._settings.bind(key, sw, 'active', Gio.SettingsBindFlags.DEFAULT); - return sw; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/private_metadata.json b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/private_metadata.json deleted file mode 100644 index c0765cab..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/private_metadata.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "_generated": "Generated by SweetTooth, do not edit", - "description": "Shows CPU temperature, disk temperature, video card temperature (NVIDIA/Catalyst/Bumblebee&NVIDIA), voltage and fan RPM (forked from xtranophilist/gnome-shell-extension-sensors)", - "gettext-domain": "freon", - "name": "Freon", - "settings-schema": "org.gnome.shell.extensions.freon", - "shell-version": [ - "45", - "46", - "47" - ], - "url": "https://github.com/UshakovVasilii/gnome-shell-extension-freon", - "uuid": "freon@UshakovVasilii_Github.yahoo.com", - "version": 57 -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/schemas/gschemas.compiled b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/schemas/gschemas.compiled deleted file mode 100644 index 5c0d0a2e..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/schemas/gschemas.compiled and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/schemas/org.gnome.shell.extensions.sensors.gschema.xml b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/schemas/org.gnome.shell.extensions.sensors.gschema.xml deleted file mode 100644 index 83536dc7..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/schemas/org.gnome.shell.extensions.sensors.gschema.xml +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - ["__average__", "__max__"] - Sensors to show in panel - Select the sensord whose values has to be shown in the panel - - - - 5 - Seconds before next update - This is the seconds after CPU temperature extension updates the data from the system - - - - 2 - Position in Panel - Position in Panel ('Left', 'Center', 'Right') - - - - 0 - Index in panel box - Index within the selected panel box (0: first, 1: second, ..., -1: last) - - - - true - Show Icon on Panel - Show sensor icon on top panel - - - - 0 - Select centigrade or fahrenheit - Choose wether to display the Number for centigrade or fahrenheit - - - - true - Enable the display of Temperature Unit on Panel - Enable the display of Temperature Unit on Panel - - - - true - Show RPM on Panel - Show RPM on Panel - - - - true - Show RPM on Panel - Show RPM on Panel - - - - true - Show volts on Panel - Show volts on Panel - - - - true - Display Power - Display power - - - - true - Show Watts on Panel - Show Watts on Panel - - - - false - Show decimal value - Show one digit after decimal - - - - true - Read sensors from lm-sensors - Read sensors from lm-sensors - - - - 0 - Selected element number in the FreeIMPI-Dropdown - Selected element number in the FreeIMPI-Dropdown - - - - 'Disabled' - Method to run FreeIPMI utility - Method to run FreeIPMI utility - - - - false - Read sensors from liquidctl - Read sensors from (requires liquidctl v1.7.0 or later) - - - - false - Read GPU sensors from NVIDIA driver - Read GPU sensors from NVIDIA driver - - - - false - Read GPU sensors from Bumblebee + NVIDIA driver - Read GPU sensors from Bumblebee + NVIDIA driver - - - - false - Read GPU sensors from Catalyst driver - Read GPU sensors from Catalyst driver - - - - false - Read drive sensors from Udisks2 - Read drive sensors from Udisks2 - - - - false - Read drive sensors using Hddtemp - Read drive sensors using Hddtemp - - - - false - Read drive sensors using smartctl - Read drive sensors using smartctl from smartmontool - - - - false - Read drive sensors using nvme-cli - Read drive sensors using nvme-cli - - - - true - Display rotationrate - Display rotation rate (per minute) - - - - true - Display voltage - Display voltage of various components - - - - true - Show battery statistics - If a battery is available, battery stats will be retrieved - - - - true - Group temperature menu items - Group three or more temperature sensors - - - - true - Group Fan speed menu items - Group three or more fan sensors - - - - true - Group voltage menu items - Group three or more voltage sensors - - - - false - Enable debug logging - Enable debug logging from the extension - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/sensorsUtil.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/sensorsUtil.js deleted file mode 100644 index 90c6ca93..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/sensorsUtil.js +++ /dev/null @@ -1,104 +0,0 @@ -import GLib from 'gi://GLib'; - -import CommandLineUtil from './commandLineUtil.js'; - -export default class SensorsUtil extends CommandLineUtil { - - constructor() { - super(); - let path = GLib.find_program_in_path('sensors'); - // -A: Do not show adapter -j: JSON output - this._argv = path ? [path, '-A', '-j'] : null; - } - - // Avoid parsing the data more than once. - execute(callback) { - super.execute(() => { - let data = []; - try { - data = JSON.parse(this._output.join('')); - } catch (e) { - try { - // fix for wrong lm_sensors output - // https://github.com/UshakovVasilii/gnome-shell-extension-freon/issues/114#issuecomment-491613545 - let lineRemoved = this._output.filter(l => l.trim() !== ',').join('\n'); - let errorRemoved = lineRemoved.replace(/ERROR.*Can't read/, ""); - errorRemoved = errorRemoved.replace(/ERROR.*I\/O error/, ""); - data = JSON.parse(errorRemoved); - } catch (e) { - logError(e); - return []; - } - } - this._data = data; - callback(); - }); - } - - get temp() { - return this._parseSensorsOutput(/^temp\d+_input/, 'temp', 'generic'); - } - - get gpu() { - return this._parseSensorsOutput(/^temp\d+_input/, 'temp', 'gpu'); - } - - get disks() { - return this._parseSensorsOutput(/^temp\d+_input/, 'temp', 'disk'); - } - - get rpm() { - return this._parseSensorsOutput(/^fan\d+_input/, 'rpm', 'generic'); - } - - get volt() { - return this._parseSensorsOutput(/^in\d+_input/, 'volt', 'generic'); - } - - get power() { - return this._parseSensorsOutput(/^power\d+_average/, 'power', 'gpu'); - } - - _parseSensorsOutput(sensorFilter, sensorType, sensorFamily) { - if(!this._data) - return []; - - const data = this._data; - - let sensors = []; - for (var chipset in data) { - let tempType = (sensorType === 'temp') - let powerType = (sensorType === 'power') - - let gpuFilter = /(radeon|amdgpu|nouveau)/; - let gpuFamily = (sensorFamily === 'gpu') - - if (!data.hasOwnProperty(chipset) || (gpuFamily != gpuFilter.test(chipset) && (tempType || powerType))) - continue; - - let diskFilter = /(drivetemp|nvme)/; - let diskFamily = (sensorFamily === 'disk') - if (!data.hasOwnProperty(chipset) || (diskFamily != diskFilter.test(chipset) && tempType)) - continue; - - let chipsetSensors = data[chipset] - for (var sensor in chipsetSensors) { - if (!chipsetSensors.hasOwnProperty(sensor)) - continue; - - let fields = chipsetSensors[sensor]; - for (var key in fields) { - if (fields.hasOwnProperty(key) && sensorFilter.test(key)) { - let feature = { - label: sensor, - [sensorType]: parseFloat(fields[key]) - }; - sensors.push(feature); - break; - } - } - } - } - return sensors; - } -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/smartctlUtil.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/smartctlUtil.js deleted file mode 100644 index dbe05e9b..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/smartctlUtil.js +++ /dev/null @@ -1,61 +0,0 @@ -import GLib from 'gi://GLib'; - -function getSmartData (argv){ - const smartctl = GLib.find_program_in_path('smartctl') - return JSON.parse(new TextDecoder().decode( GLib.spawn_command_line_sync(`'${smartctl}' ${argv} -j`)[1] )) -} - -export default class SmartctlUtil { - - constructor(callback) { - this._smartDevices = []; - try { - this._smartDevices = getSmartData("--scan")["devices"] - } catch (e) { - logError(e, '[FREON] Unable to find smart devices'); - } - this._updated = true; - } - - get available(){ - return this._smartDevices.length > 0; - } - - get updated (){ - return this._updated; - } - - set updated (updated){ - this._updated = updated; - } - - get temp() { - return this._smartDevices.map(device => { - const info = getSmartData(`--info ${device["name"]}`); - if (info["smartctl"]["exit_status"] != 0) - return null; - - const attributes = getSmartData(`--attributes ${device["name"]}`); - if (attributes["smartctl"]["exit_status"] != 0) - return null; - - if(!attributes.temperature) { - return null; - } - - return { - label: info["model_name"], - temp: parseFloat(attributes.temperature.current) - } - }).filter(entry => entry != null); - } - - destroy(callback) { - this._smartDevices = []; - } - - execute(callback) { - this._updated = true; - } - -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/stylesheet.css b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/stylesheet.css deleted file mode 100644 index 9b101820..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/stylesheet.css +++ /dev/null @@ -1,7 +0,0 @@ -.freon-panel-icon-label { - padding: 0 0; -} - -.freon-panel-no-icon-label { - padding: 0 4px; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/udisks2.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/udisks2.js deleted file mode 100644 index d61f90d5..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/udisks2.js +++ /dev/null @@ -1,117 +0,0 @@ -import Gio from 'gi://Gio'; - -const UDisksDriveProxy = Gio.DBusProxy.makeProxyWrapper( -' \ - \ - \ - \ -'); - -const UDisksDriveAtaProxy = Gio.DBusProxy.makeProxyWrapper( -' \ - \ - \ - \ -'); - -// Poor man's async.js -const Async = { - // mapping will be done in parallel - map(arr, mapClb /* function(in, successClb)) */, resClb /* function(result) */) { - let counter = arr.length; - let result = []; - for (let i = 0; i < arr.length; ++i) { - mapClb(arr[i], (function(i, newVal) { - result[i] = newVal; - if (--counter == 0) resClb(result); - }).bind(null, i)); // i needs to be bound since it will be changed during the next iteration - } - } -} - -// routines for handling of udisks2 -export default class UDisks2 { - - constructor(callback) { - this._udisksProxies = []; - this._get_drive_ata_proxies((proxies) => { - this._udisksProxies = proxies; - callback(); - }); - this._updated = true; - } - - get available(){ - return this._udisksProxies.length > 0; - } - - get updated (){ - return this._updated; - } - - set updated (updated){ - this._updated = updated; - } - - // creates a list of sensor objects from the list of proxies given - get temp() { - return this._udisksProxies.filter(function(proxy) { - // 0K means no data available - return proxy.ata.SmartTemperature > 0; - }).map(function(proxy) { - return { - label: proxy.drive.Model, - temp: proxy.ata.SmartTemperature - 273.15 - }; - }); - } - - // calls callback with [{ drive: UDisksDriveProxy, ata: UDisksDriveAtaProxy }, ... ] for every drive that implements both interfaces - _get_drive_ata_proxies(callback) { - Gio.DBusObjectManagerClient.new(Gio.DBus.system, 0, "org.freedesktop.UDisks2", "/org/freedesktop/UDisks2", null, null, function(src, res) { - try { - let objMgr = Gio.DBusObjectManagerClient.new_finish(res); //might throw - - let objPaths = objMgr.get_objects().filter(function(o) { - return o.get_interface("org.freedesktop.UDisks2.Drive") != null - && o.get_interface("org.freedesktop.UDisks2.Drive.Ata") != null; - }).map(function(o) { return o.get_object_path() }); - - // now create the proxy objects, log and ignore every failure - Async.map(objPaths, function(obj, callback) { - // create the proxies object - let driveProxy = new UDisksDriveProxy(Gio.DBus.system, "org.freedesktop.UDisks2", obj, function(res, error) { - if (error) { //very unlikely - we even checked the interfaces before! - logError(error, '[FREON] Could not create proxy on ' + obj); - callback(null); - return; - } - let ataProxy = new UDisksDriveAtaProxy(Gio.DBus.system, "org.freedesktop.UDisks2", obj, function(res, error) { - if (error) { - logError(error, '[FREON] Could not create proxy on ' + obj); - callback(null); - return; - } - - callback({ drive: driveProxy, ata: ataProxy }); - }); - }); - }, function(proxies) { - // filter out failed attempts == null values - callback(proxies.filter(function(a) { return a != null; })); - }); - } catch (e) { - logError(e, '[FREON] Could not find UDisks2 objects'); - } - }); - } - - destroy(callback) { - this._udisksProxies = []; - } - - execute(callback) { - this._updated = true; - } - -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/config.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/config.js deleted file mode 100644 index 17403638..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/config.js +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -export default { - PACKAGE_VERSION: 57, - PACKAGE_URL: 'https://github.com/GSConnect/gnome-shell-extension-gsconnect', - PACKAGE_BUGREPORT: 'https://github.com/GSConnect/gnome-shell-extension-gsconnect/issues/new', - PACKAGE_DATADIR: '/usr/local/share/gnome-shell/extensions/gsconnect@andyholmes.github.io', - PACKAGE_LOCALEDIR: '/usr/local/share/locale', - GSETTINGS_SCHEMA_DIR: '/usr/local/share/glib-2.0/schemas', - GNOME_SHELL_LIBDIR: '/usr/local/lib64', - - APP_ID: 'org.gnome.Shell.Extensions.GSConnect', - APP_PATH: '/org/gnome/Shell/Extensions/GSConnect', - - IS_USER: false, - - // External binary paths - OPENSSL_PATH: 'openssl', - SSHADD_PATH: 'ssh-add', - SSHKEYGEN_PATH: 'ssh-keygen', - FFMPEG_PATH: 'ffmpeg', -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/executable_gsconnect-preferences b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/executable_gsconnect-preferences deleted file mode 100644 index b16ddc7d..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/executable_gsconnect-preferences +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env -S gjs -m - -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -// -*- mode: js; -*- - -import Gdk from 'gi://Gdk?version=3.0'; -import 'gi://GdkPixbuf?version=2.0'; -import Gio from 'gi://Gio?version=2.0'; -import GLib from 'gi://GLib?version=2.0'; -import GObject from 'gi://GObject?version=2.0'; -import Gtk from 'gi://Gtk?version=3.0'; - -import system from 'system'; - -import './preferences/init.js'; -import {Window} from './preferences/service.js'; -import Config from './config.js'; - -import('gi://GioUnix?version=2.0').catch(() => {}); // Set version for optional dependency - - -/** - * Class representing the GSConnect service daemon. - */ -const Preferences = GObject.registerClass({ - GTypeName: 'GSConnectPreferences', - Implements: [Gio.ActionGroup], -}, class Preferences extends Gtk.Application { - - _init() { - super._init({ - application_id: 'org.gnome.Shell.Extensions.GSConnect.Preferences', - resource_base_path: '/org/gnome/Shell/Extensions/GSConnect', - }); - - GLib.set_prgname('gsconnect-preferences'); - GLib.set_application_name(_('GSConnect Preferences')); - } - - vfunc_activate() { - if (this._window === undefined) { - this._window = new Window({ - application: this, - }); - } - - this._window.present(); - } - - vfunc_startup() { - super.vfunc_startup(); - - // Init some resources - const provider = new Gtk.CssProvider(); - provider.load_from_resource(`${Config.APP_PATH}/application.css`); - Gtk.StyleContext.add_provider_for_screen( - Gdk.Screen.get_default(), - provider, - Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION - ); - - const actions = [ - ['refresh', null], - ['connect', GLib.VariantType.new('s')], - ]; - - for (const [name, type] of actions) { - const action = new Gio.SimpleAction({ - name: name, - parameter_type: type, - }); - this.add_action(action); - } - } - - vfunc_activate_action(action_name, parameter) { - try { - const paramArray = []; - - if (parameter instanceof GLib.Variant) - paramArray[0] = parameter; - - this.get_dbus_connection().call( - 'org.gnome.Shell.Extensions.GSConnect', - '/org/gnome/Shell/Extensions/GSConnect', - 'org.freedesktop.Application', - 'ActivateAction', - GLib.Variant.new('(sava{sv})', [action_name, paramArray, {}]), - null, - Gio.DBusCallFlags.NONE, - -1, - null, - null - ); - } catch (e) { - logError(e); - } - } -}); - -await (new Preferences()).runAsync([system.programInvocationName].concat(ARGV)); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/extension.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/extension.js deleted file mode 100644 index 9d960ac1..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/extension.js +++ /dev/null @@ -1,407 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GObject from 'gi://GObject'; - -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js'; -import * as QuickSettings from 'resource:///org/gnome/shell/ui/quickSettings.js'; - -// Bootstrap -import { - Extension, - gettext as _, - ngettext -} from 'resource:///org/gnome/shell/extensions/extension.js'; - -import Config from './config.js'; -import * as Clipboard from './shell/clipboard.js'; -import * as Device from './shell/device.js'; -import * as Keybindings from './shell/keybindings.js'; -import * as Notification from './shell/notification.js'; -import * as Input from './shell/input.js'; -import * as Utils from './shell/utils.js'; -import * as Remote from './utils/remote.js'; -import setup from './utils/setup.js'; - -const QuickSettingsMenu = Main.panel.statusArea.quickSettings; - - -/** - * A System Indicator used as the hub for spawning device indicators and - * indicating that the extension is active when there are none. - */ -const ServiceToggle = GObject.registerClass({ - GTypeName: 'GSConnectServiceIndicator', -}, class ServiceToggle extends QuickSettings.QuickMenuToggle { - - _init() { - super._init({ - title: 'GSConnect', - toggleMode: true, - }); - - this.set({iconName: 'org.gnome.Shell.Extensions.GSConnect-symbolic'}); - - // Set QuickMenuToggle header. - this.menu.setHeader('org.gnome.Shell.Extensions.GSConnect-symbolic', 'GSConnect', - _('Sync between your devices')); - - this._menus = {}; - - this._keybindings = new Keybindings.Manager(); - - // GSettings - this.settings = new Gio.Settings({ - settings_schema: Config.GSCHEMA.lookup( - 'org.gnome.Shell.Extensions.GSConnect', - null - ), - path: '/org/gnome/shell/extensions/gsconnect/', - }); - - // Bind the toggle to enabled key - this.settings.bind('enabled', - this, 'checked', - Gio.SettingsBindFlags.DEFAULT); - - this._enabledId = this.settings.connect( - 'changed::enabled', - this._onEnabledChanged.bind(this) - ); - - this._panelModeId = this.settings.connect( - 'changed::show-indicators', - this._sync.bind(this) - ); - - // Service Proxy - this.service = new Remote.Service(); - - this._deviceAddedId = this.service.connect( - 'device-added', - this._onDeviceAdded.bind(this) - ); - - this._deviceRemovedId = this.service.connect( - 'device-removed', - this._onDeviceRemoved.bind(this) - ); - - this._serviceChangedId = this.service.connect( - 'notify::active', - this._onServiceChanged.bind(this) - ); - - // Service Menu -> Devices Section - this.deviceSection = new PopupMenu.PopupMenuSection(); - this.deviceSection.actor.add_style_class_name('gsconnect-device-section'); - this.settings.bind( - 'show-indicators', - this.deviceSection.actor, - 'visible', - Gio.SettingsBindFlags.INVERT_BOOLEAN - ); - this.menu.addMenuItem(this.deviceSection); - - // Service Menu -> Separator - this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); - - // Service Menu -> "Mobile Settings" - this.menu.addSettingsAction( - _('Mobile Settings'), - 'org.gnome.Shell.Extensions.GSConnect.Preferences.desktop'); - - // Prime the service - this._initService(); - } - - async _initService() { - try { - if (this.settings.get_boolean('enabled')) - await this.service.start(); - else - await this.service.reload(); - } catch (e) { - logError(e, 'GSConnect'); - } - } - - _sync() { - const available = this.service.devices.filter(device => { - return (device.connected && device.paired); - }); - const panelMode = this.settings.get_boolean('show-indicators'); - - // Hide status indicator if in Panel mode or no devices are available - serviceIndicator._indicator.visible = (!panelMode && available.length); - - // Show device indicators in Panel mode if available - for (const device of this.service.devices) { - const isAvailable = available.includes(device); - const indicator = Main.panel.statusArea[device.g_object_path]; - - indicator.visible = panelMode && isAvailable; - - const menu = this._menus[device.g_object_path]; - menu.actor.visible = !panelMode && isAvailable; - menu._title.actor.visible = !panelMode && isAvailable; - } - - // Set subtitle on Quick Settings tile - if (available.length === 1) { - this.subtitle = available[0].name; - } else if (available.length > 1) { - // TRANSLATORS: %d is the number of devices connected - this.subtitle = ngettext( - '%d Connected', - '%d Connected', - available.length - ).format(available.length); - } else { - this.subtitle = null; - } - } - - _onDeviceChanged(device, changed, invalidated) { - try { - const properties = changed.deepUnpack(); - - if (properties.hasOwnProperty('Connected') || - properties.hasOwnProperty('Paired')) - this._sync(); - } catch (e) { - logError(e, 'GSConnect'); - } - } - - _onDeviceAdded(service, device) { - try { - // Device Indicator - const indicator = new Device.Indicator({device: device}); - Main.panel.addToStatusArea(device.g_object_path, indicator); - - // Device Menu - const menu = new Device.Menu({ - device: device, - menu_type: 'list', - }); - this._menus[device.g_object_path] = menu; - this.deviceSection.addMenuItem(menu); - - // Device Settings - device.settings = new Gio.Settings({ - settings_schema: Config.GSCHEMA.lookup( - 'org.gnome.Shell.Extensions.GSConnect.Device', - true - ), - path: `/org/gnome/shell/extensions/gsconnect/device/${device.id}/`, - }); - - // Keyboard Shortcuts - device.__keybindingsChangedId = device.settings.connect( - 'changed::keybindings', - this._onDeviceKeybindingsChanged.bind(this, device) - ); - this._onDeviceKeybindingsChanged(device); - - // Watch the for status changes - device.__deviceChangedId = device.connect( - 'g-properties-changed', - this._onDeviceChanged.bind(this) - ); - - this._sync(); - } catch (e) { - logError(e, 'GSConnect'); - } - } - - _onDeviceRemoved(service, device, sync = true) { - try { - // Stop watching for status changes - if (device.__deviceChangedId) - device.disconnect(device.__deviceChangedId); - - // Release keybindings - if (device.__keybindingsChangedId) { - device.settings.disconnect(device.__keybindingsChangedId); - device._keybindings.map(id => this._keybindings.remove(id)); - } - - // Destroy the indicator - Main.panel.statusArea[device.g_object_path].destroy(); - - // Destroy the menu - this._menus[device.g_object_path].destroy(); - delete this._menus[device.g_object_path]; - - if (sync) - this._sync(); - } catch (e) { - logError(e, 'GSConnect'); - } - } - - _onDeviceKeybindingsChanged(device) { - try { - // Reset any existing keybindings - if (device.hasOwnProperty('_keybindings')) - device._keybindings.map(id => this._keybindings.remove(id)); - - device._keybindings = []; - - // Get the keybindings - const keybindings = device.settings.get_value('keybindings').deepUnpack(); - - // Apply the keybindings - for (const [action, accelerator] of Object.entries(keybindings)) { - const [, name, parameter] = Gio.Action.parse_detailed_name(action); - - const actionId = this._keybindings.add( - accelerator, - () => device.action_group.activate_action(name, parameter) - ); - - if (actionId !== 0) - device._keybindings.push(actionId); - } - } catch (e) { - logError(e, 'GSConnect'); - } - } - - async _onEnabledChanged(settings, key) { - try { - if (this.settings.get_boolean('enabled')) - await this.service.start(); - else - await this.service.stop(); - } catch (e) { - logError(e, 'GSConnect'); - } - } - - async _onServiceChanged(service, pspec) { - try { - // If it's enabled, we should try to restart now - if (this.settings.get_boolean('enabled')) - await this.service.start(); - } catch (e) { - logError(e, 'GSConnect'); - } - } - - destroy() { - // Unhook from Remote.Service - if (this.service) { - this.service.disconnect(this._serviceChangedId); - this.service.disconnect(this._deviceAddedId); - this.service.disconnect(this._deviceRemovedId); - - for (const device of this.service.devices) - this._onDeviceRemoved(this.service, device, false); - - if (!this.settings.get_boolean('keep-alive-when-locked')) - this.service.stop(); - this.service.destroy(); - } - - // Disconnect any keybindings - this._keybindings.destroy(); - - // Disconnect from any GSettings changes - this.settings.disconnect(this._enabledId); - this.settings.disconnect(this._panelModeId); - this.settings.run_dispose(); - - // Destroy the PanelMenu.SystemIndicator actors - this.menu.destroy(); - - super.destroy(); - } -}); - -const ServiceIndicator = GObject.registerClass( -class ServiceIndicator extends QuickSettings.SystemIndicator { - _init() { - super._init(); - - // Create the icon for the indicator - this._indicator = this._addIndicator(); - this._indicator.icon_name = 'org.gnome.Shell.Extensions.GSConnect-symbolic'; - // Hide the indicator by default - this._indicator.visible = false; - - // Create the toggle menu and associate it with the indicator - this.quickSettingsItems.push(new ServiceToggle()); - - // Add the indicator to the panel and the toggle to the menu - QuickSettingsMenu.addExternalIndicator(this); - } - - destroy() { - // Set enabled state to false to kill the service on destroy - this.quickSettingsItems.forEach(item => item.destroy()); - // Destroy the indicator - this._indicator.destroy(); - super.destroy(); - } -}); - -let serviceIndicator = null; - -export default class GSConnectExtension extends Extension { - lockscreenInput = null; - - constructor(metadata) { - super(metadata); - setup(this.path); - - // If installed as a user extension, this checks the permissions - // on certain critical files in the extension directory - // to ensure that they have the executable bit set, - // and makes them executable if not. Some packaging methods - // (particularly GitHub Actions artifacts) automatically remove - // executable bits from all contents, presumably for security. - Utils.ensurePermissions(); - - // If installed as a user extension, this will install the Desktop entry, - // DBus and systemd service files necessary for DBus activation and - // GNotifications. Since there's no uninit()/uninstall() hook for extensions - // and they're only used *by* GSConnect, they should be okay to leave. - Utils.installService(); - - // These modify the notification source for GSConnect's GNotifications and - // need to be active even when the extension is disabled (eg. lock screen). - // Since they *only* affect notifications from GSConnect, it should be okay - // to leave them applied. - Notification.patchGSConnectNotificationSource(); - Notification.patchGtkNotificationDaemon(); - - // This watches for the service to start and exports a custom clipboard - // portal for use on Wayland - Clipboard.watchService(); - } - - enable() { - serviceIndicator = new ServiceIndicator(); - Notification.patchGtkNotificationSources(); - - this.lockscreenInput = new Input.LockscreenRemoteAccess(); - this.lockscreenInput.patchInhibitor(); - } - - disable() { - serviceIndicator.destroy(); - serviceIndicator = null; - Notification.unpatchGtkNotificationSources(); - - if (this.lockscreenInput) { - this.lockscreenInput.unpatchInhibitor(); - this.lockscreenInput = null; - } - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/ar/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/ar/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index 78e91a6f..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/ar/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/be/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/be/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index 5e783fb0..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/be/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/ca/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/ca/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index cfb89881..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/ca/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/cs/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/cs/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index 281c7578..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/cs/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/da/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/da/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index 3fcc2a5a..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/da/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/de/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/de/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index 9ae06773..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/de/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/el/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/el/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index aa446e31..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/el/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/es/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/es/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index a2fa920a..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/es/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/et/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/et/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index e8ec924a..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/et/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/fa/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/fa/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index d792ee91..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/fa/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/fi/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/fi/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index 1ecfc388..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/fi/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/fr/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/fr/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index 80b6edbb..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/fr/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/fy/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/fy/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index 7b7cc55d..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/fy/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/gl/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/gl/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index a26f6b62..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/gl/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/he/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/he/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index 6643a6ab..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/he/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/hu/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/hu/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index 783cc39a..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/hu/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/id/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/id/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index 15e8fa04..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/id/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/it/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/it/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index 499500d3..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/it/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/ko/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/ko/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index 16bb28eb..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/ko/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/lt/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/lt/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index 13f9d1c6..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/lt/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/nl/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/nl/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index e01ae547..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/nl/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/nl_BE/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/nl_BE/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index f03a29f3..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/nl_BE/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/pl/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/pl/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index 73ed9e24..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/pl/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/pt/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/pt/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index 8aa61374..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/pt/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/pt_BR/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/pt_BR/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index bc26e361..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/pt_BR/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/ru/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/ru/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index d504fad4..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/ru/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/sk/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/sk/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index f6831f55..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/sk/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/sr/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/sr/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index a2a03e40..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/sr/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/sr@latin/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/sr@latin/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index ddb718ce..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/sr@latin/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/sv/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/sv/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index d17330ce..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/sv/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/tr/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/tr/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index 761537d9..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/tr/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/uk/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/uk/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index a47d1e67..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/uk/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/zh_CN/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/zh_CN/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index 284c9303..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/zh_CN/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/zh_TW/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/zh_TW/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo deleted file mode 100644 index f47aad68..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/locale/zh_TW/LC_MESSAGES/org.gnome.Shell.Extensions.GSConnect.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/nautilus-gsconnect.py b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/nautilus-gsconnect.py deleted file mode 100644 index 05a71b0f..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/nautilus-gsconnect.py +++ /dev/null @@ -1,212 +0,0 @@ -# SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -# -# SPDX-License-Identifier: GPL-2.0-or-later - -""" -nautilus-gsconnect.py - A Nautilus extension for sending files via GSConnect. - -A great deal of credit and appreciation is owed to the indicator-kdeconnect -developers for the sister Python script 'kdeconnect-send-nautilus.py': - -https://github.com/Bajoja/indicator-kdeconnect/blob/master/data/extensions/kdeconnect-send-nautilus.py -""" - -import gettext -import os.path -import sys - -import gi - -gi.require_version("Gio", "2.0") -gi.require_version("GLib", "2.0") -gi.require_version("GObject", "2.0") -from gi.repository import Gio, GLib, GObject - - -# Host application detection -# -# Nemo seems to reliably identify itself as 'nemo' in argv[0], so we -# can test for that. Nautilus detection is less reliable, so don't try. -# See https://github.com/linuxmint/nemo-extensions/issues/330 -if "nemo" in sys.argv[0].lower(): - # Host runtime is nemo-python - gi.require_version("Nemo", "3.0") - from gi.repository import Nemo as FileManager -else: - # Otherwise, just assume it's nautilus-python - from gi.repository import Nautilus as FileManager - - -SERVICE_NAME = "org.gnome.Shell.Extensions.GSConnect" -SERVICE_PATH = "/org/gnome/Shell/Extensions/GSConnect" - -# Init gettext translations -LOCALE_DIR = os.path.join( - GLib.get_user_data_dir(), - "gnome-shell", - "extensions", - "gsconnect@andyholmes.github.io", - "locale", -) - -if not os.path.exists(LOCALE_DIR): - LOCALE_DIR = None - -try: - i18n = gettext.translation(SERVICE_NAME, localedir=LOCALE_DIR) - _ = i18n.gettext - -except (IOError, OSError) as e: - print("GSConnect: {0}".format(str(e))) - i18n = gettext.translation( - SERVICE_NAME, localedir=LOCALE_DIR, fallback=True - ) - _ = i18n.gettext - - -class GSConnectShareExtension(GObject.Object, FileManager.MenuProvider): - """A context menu for sending files via GSConnect.""" - - def __init__(self): - """Initialize the DBus ObjectManager.""" - GObject.Object.__init__(self) - - self.devices = {} - - Gio.DBusProxy.new_for_bus( - Gio.BusType.SESSION, - Gio.DBusProxyFlags.DO_NOT_AUTO_START, - None, - SERVICE_NAME, - SERVICE_PATH, - "org.freedesktop.DBus.ObjectManager", - None, - self._init_async, - None, - ) - - def _init_async(self, proxy, res, user_data): - proxy = proxy.new_for_bus_finish(res) - proxy.connect("notify::g-name-owner", self._on_name_owner_changed) - proxy.connect("g-signal", self._on_g_signal) - - self._on_name_owner_changed(proxy, None) - - def _on_g_signal(self, proxy, sender_name, signal_name, parameters): - # Wait until the service is ready - if proxy.props.g_name_owner is None: - return - - objects = parameters.unpack() - - if signal_name == "InterfacesAdded": - for object_path, props in objects.items(): - props = props["org.gnome.Shell.Extensions.GSConnect.Device"] - - self.devices[object_path] = ( - props["Name"], - Gio.DBusActionGroup.get( - proxy.get_connection(), SERVICE_NAME, object_path - ), - ) - elif signal_name == "InterfacesRemoved": - for object_path in objects: - try: - del self.devices[object_path] - except KeyError: - pass - - def _on_name_owner_changed(self, proxy, pspec): - # Wait until the service is ready - if proxy.props.g_name_owner is None: - self.devices = {} - else: - proxy.call( - "GetManagedObjects", - None, - Gio.DBusCallFlags.NO_AUTO_START, - -1, - None, - self._get_managed_objects, - None, - ) - - def _get_managed_objects(self, proxy, res, user_data): - objects = proxy.call_finish(res)[0] - - for object_path, props in objects.items(): - props = props["org.gnome.Shell.Extensions.GSConnect.Device"] - if not props: - continue - - self.devices[object_path] = ( - props["Name"], - Gio.DBusActionGroup.get( - proxy.get_connection(), SERVICE_NAME, object_path - ), - ) - - def send_files(self, menu, files, action_group): - """Send *files* to *device_id*.""" - for file in files: - variant = GLib.Variant("(sb)", (file.get_uri(), False)) - action_group.activate_action("shareFile", variant) - - def get_file_items(self, *args): - """Return a list of select files to be sent.""" - # 'args' will depend on the Nautilus API version. - # * Nautilus 4.0: - # `[files: List[Nautilus.FileInfo]]` - # * Nautilus 3.0: - # `[window: Gtk.Widget, files: List[Nautilus.FileInfo]]` - files = args[-1] - - # Only accept regular files - for uri in files: - if uri.get_uri_scheme() != "file" or uri.is_directory(): - return () - - # Enumerate capable devices - devices = [] - - for name, action_group in self.devices.values(): - if action_group.get_action_enabled("shareFile"): - devices.append([name, action_group]) - - # No capable devices; don't show menu entry - if not devices: - return () - - # If there's exactly 1 device, no submenu - if len(devices) == 1: - name, action_group = devices[0] - menu = FileManager.MenuItem( - name="GSConnectShareExtension::Device" + name, - # TRANSLATORS: Send to , for file manager - # context menu - label=_("Send to %s") % name, - ) - menu.connect("activate", self.send_files, files, action_group) - - else: - # Context Menu Item - menu = FileManager.MenuItem( - name="GSConnectShareExtension::Devices", - label=_("Send To Mobile Device"), - ) - - # Context Submenu - submenu = FileManager.Menu() - menu.set_submenu(submenu) - - # Context Submenu Items - for name, action_group in devices: - item = FileManager.MenuItem( - name="GSConnectShareExtension::Device" + name, label=name - ) - - item.connect("activate", self.send_files, files, action_group) - - submenu.append_item(item) - - return (menu,) diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/org.gnome.Shell.Extensions.GSConnect.gresource b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/org.gnome.Shell.Extensions.GSConnect.gresource deleted file mode 100644 index 17fe4851..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/org.gnome.Shell.Extensions.GSConnect.gresource and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/preferences/device.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/preferences/device.js deleted file mode 100644 index 76fc0c73..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/preferences/device.js +++ /dev/null @@ -1,1111 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Gtk from 'gi://Gtk'; -import Pango from 'gi://Pango'; - -import Config from '../config.js'; -import plugins from '../service/plugins/index.js'; -import * as Keybindings from './keybindings.js'; - - -// Build a list of plugins and shortcuts for devices -const DEVICE_PLUGINS = []; -const DEVICE_SHORTCUTS = {}; - -for (const name in plugins) { - const module = plugins[name]; - - if (module.Metadata === undefined) - continue; - - // Plugins - DEVICE_PLUGINS.push(name); - - // Shortcuts (GActions without parameters) - for (const [name, action] of Object.entries(module.Metadata.actions)) { - if (action.parameter_type === null) - DEVICE_SHORTCUTS[name] = [action.icon_name, action.label]; - } -} - - -/** - * A Gtk.ListBoxHeaderFunc for sections that adds separators between each row. - * - * @param {Gtk.ListBoxRow} row - The current row - * @param {Gtk.ListBoxRow} before - The previous row - */ -export function rowSeparators(row, before) { - const header = row.get_header(); - - if (before === null) { - if (header !== null) - header.destroy(); - - return; - } - - if (header === null) - row.set_header(new Gtk.Separator({visible: true})); -} - - -/** - * A Gtk.ListBoxSortFunc for SectionRow rows - * - * @param {Gtk.ListBoxRow} row1 - The first row - * @param {Gtk.ListBoxRow} row2 - The second row - * @return {number} -1, 0 or 1 - */ -export function titleSortFunc(row1, row2) { - if (!row1.title || !row2.title) - return 0; - - return row1.title.localeCompare(row2.title); -} - - -/** - * A row for a section of settings - */ -const SectionRow = GObject.registerClass({ - GTypeName: 'GSConnectPreferencesSectionRow', - Template: 'resource:///org/gnome/Shell/Extensions/GSConnect/ui/preferences-section-row.ui', - Children: ['icon-image', 'title-label', 'subtitle-label'], - Properties: { - 'gicon': GObject.ParamSpec.object( - 'gicon', - 'GIcon', - 'A GIcon for the row', - GObject.ParamFlags.READWRITE, - Gio.Icon.$gtype - ), - 'icon-name': GObject.ParamSpec.string( - 'icon-name', - 'Icon Name', - 'An icon name for the row', - GObject.ParamFlags.READWRITE, - null - ), - 'subtitle': GObject.ParamSpec.string( - 'subtitle', - 'Subtitle', - 'A subtitle for the row', - GObject.ParamFlags.READWRITE, - null - ), - 'title': GObject.ParamSpec.string( - 'title', - 'Title', - 'A title for the row', - GObject.ParamFlags.READWRITE, - null - ), - 'widget': GObject.ParamSpec.object( - 'widget', - 'Widget', - 'An action widget for the row', - GObject.ParamFlags.READWRITE, - Gtk.Widget.$gtype - ), - }, -}, class SectionRow extends Gtk.ListBoxRow { - - _init(params = {}) { - super._init(); - - // NOTE: we can't pass construct properties to _init() because the - // template children are not assigned until after it runs. - this.freeze_notify(); - Object.assign(this, params); - this.thaw_notify(); - } - - get icon_name() { - return this.icon_image.icon_name; - } - - set icon_name(icon_name) { - if (this.icon_name === icon_name) - return; - - this.icon_image.visible = !!icon_name; - this.icon_image.icon_name = icon_name; - this.notify('icon-name'); - } - - get gicon() { - return this.icon_image.gicon; - } - - set gicon(gicon) { - if (this.gicon === gicon) - return; - - this.icon_image.visible = !!gicon; - this.icon_image.gicon = gicon; - this.notify('gicon'); - } - - get title() { - return this.title_label.label; - } - - set title(text) { - if (this.title === text) - return; - - this.title_label.visible = !!text; - this.title_label.label = text; - this.notify('title'); - } - - get subtitle() { - return this.subtitle_label.label; - } - - set subtitle(text) { - if (this.subtitle === text) - return; - - this.subtitle_label.visible = !!text; - this.subtitle_label.label = text; - this.notify('subtitle'); - } - - get widget() { - if (this._widget === undefined) - this._widget = null; - - return this._widget; - } - - set widget(widget) { - if (this.widget === widget) - return; - - if (this.widget instanceof Gtk.Widget) - this.widget.destroy(); - - // Add the widget - this._widget = widget; - this.get_child().attach(widget, 2, 0, 1, 2); - this.notify('widget'); - } -}); - - -/** - * Command Editor Dialog - */ -const CommandEditor = GObject.registerClass({ - GTypeName: 'GSConnectPreferencesCommandEditor', - Template: 'resource:///org/gnome/Shell/Extensions/GSConnect/ui/preferences-command-editor.ui', - Children: [ - 'cancel-button', 'save-button', - 'command-entry', 'name-entry', 'command-chooser', - ], -}, class CommandEditor extends Gtk.Dialog { - - _onBrowseCommand(entry, icon_pos, event) { - this.command_chooser.present(); - } - - _onCommandChosen(dialog, response_id) { - if (response_id === Gtk.ResponseType.OK) - this.command_entry.text = dialog.get_filename(); - - dialog.hide(); - } - - _onEntryChanged(entry, pspec) { - this.save_button.sensitive = (this.command_name && this.command_line); - } - - get command_line() { - return this.command_entry.text; - } - - set command_line(text) { - this.command_entry.text = text; - } - - get command_name() { - return this.name_entry.text; - } - - set command_name(text) { - this.name_entry.text = text; - } -}); - - -/** - * A widget for configuring a remote device. - */ -export const Panel = GObject.registerClass({ - GTypeName: 'GSConnectPreferencesDevicePanel', - Properties: { - 'device': GObject.ParamSpec.object( - 'device', - 'Device', - 'The device being configured', - GObject.ParamFlags.READWRITE, - GObject.Object.$gtype - ), - }, - Template: 'resource:///org/gnome/Shell/Extensions/GSConnect/ui/preferences-device-panel.ui', - Children: [ - 'sidebar', 'stack', 'infobar', - - // Sharing - 'sharing', 'sharing-page', - 'desktop-list', 'clipboard', 'clipboard-sync', 'mousepad', 'mpris', 'systemvolume', - 'share', 'share-list', 'receive-files', 'receive-directory', - - // Battery - 'battery', - 'battery-device-label', 'battery-device', 'battery-device-list', - 'battery-system-label', 'battery-system', 'battery-system-list', - 'battery-custom-notification-value', - - // RunCommand - 'runcommand', 'runcommand-page', - 'command-list', 'command-add', - - // Notifications - 'notification', 'notification-page', - 'notification-list', 'notification-apps', - - // Telephony - 'telephony', 'telephony-page', - 'ringing-list', 'ringing-volume', 'talking-list', 'talking-volume', - - // Shortcuts - 'shortcuts-page', - 'shortcuts-actions', 'shortcuts-actions-title', 'shortcuts-actions-list', - - // Advanced - 'advanced-page', - 'plugin-list', 'experimental-list', - - 'device-menu', - ], -}, class Panel extends Gtk.Grid { - - _init(device) { - super._init({ - device: device, - }); - - // GSettings - this.settings = new Gio.Settings({ - settings_schema: Config.GSCHEMA.lookup( - 'org.gnome.Shell.Extensions.GSConnect.Device', - true - ), - path: `/org/gnome/shell/extensions/gsconnect/device/${device.id}/`, - }); - - // Infobar - this.device.bind_property( - 'paired', - this.infobar, - 'reveal-child', - (GObject.BindingFlags.SYNC_CREATE | - GObject.BindingFlags.INVERT_BOOLEAN) - ); - - this._setupActions(); - - // Settings Pages - this._sharingSettings(); - this._batterySettings(); - this._runcommandSettings(); - this._notificationSettings(); - this._telephonySettings(); - // -------------------------- - this._keybindingSettings(); - this._advancedSettings(); - - // Separate plugins and other settings - this.sidebar.set_header_func((row, before) => { - if (row.get_name() === 'shortcuts') - row.set_header(new Gtk.Separator({visible: true})); - }); - } - - get menu() { - if (this._menu === undefined) { - this._menu = this.device_menu; - this._menu.prepend_section(null, this.device.menu); - this.insert_action_group('device', this.device.action_group); - } - - return this._menu; - } - - get_incoming_supported(type) { - const incoming = this.settings.get_strv('incoming-capabilities'); - return incoming.includes(`kdeconnect.${type}`); - } - - get_outgoing_supported(type) { - const outgoing = this.settings.get_strv('outgoing-capabilities'); - return outgoing.includes(`kdeconnect.${type}`); - } - - _onKeynavFailed(widget, direction) { - if (direction === Gtk.DirectionType.UP && widget.prev) - widget.prev.child_focus(direction); - - else if (direction === Gtk.DirectionType.DOWN && widget.next) - widget.next.child_focus(direction); - - return true; - } - - _onSwitcherRowSelected(box, row) { - this.stack.set_visible_child_name(row.get_name()); - } - - _onSectionRowActivated(box, row) { - if (row.widget !== undefined) - row.widget.active = !row.widget.active; - } - - _onToggleRowActivated(box, row) { - const widget = row.get_child().get_child_at(1, 0); - widget.active = !widget.active; - } - - _onEncryptionInfo() { - const dialog = new Gtk.MessageDialog({ - buttons: Gtk.ButtonsType.OK, - text: _('Encryption Info'), - secondary_text: this.device.encryption_info, - modal: true, - transient_for: this.get_toplevel(), - }); - dialog.connect('response', (dialog) => dialog.destroy()); - dialog.present(); - } - - _deviceAction(action, parameter) { - this.action_group.activate_action(action.name, parameter); - } - - dispose() { - if (this._commandEditor !== undefined) - this._commandEditor.destroy(); - - // Device signals - this.device.action_group.disconnect(this._actionAddedId); - this.device.action_group.disconnect(this._actionRemovedId); - - // GSettings - for (const settings of Object.values(this._pluginSettings)) - settings.run_dispose(); - - this.settings.disconnect(this._keybindingsId); - this.settings.disconnect(this._disabledPluginsId); - this.settings.disconnect(this._supportedPluginsId); - this.settings.run_dispose(); - } - - pluginSettings(name) { - if (this._pluginSettings === undefined) - this._pluginSettings = {}; - - if (!this._pluginSettings.hasOwnProperty(name)) { - const meta = plugins[name].Metadata; - - this._pluginSettings[name] = new Gio.Settings({ - settings_schema: Config.GSCHEMA.lookup(meta.id, -1), - path: `${this.settings.path}plugin/${name}/`, - }); - } - - return this._pluginSettings[name]; - } - - _setupActions() { - this.actions = new Gio.SimpleActionGroup(); - this.insert_action_group('settings', this.actions); - - let settings = this.pluginSettings('battery'); - this.actions.add_action(settings.create_action('send-statistics')); - this.actions.add_action(settings.create_action('low-battery-notification')); - this.actions.add_action(settings.create_action('custom-battery-notification')); - this.actions.add_action(settings.create_action('custom-battery-notification-value')); - this.actions.add_action(settings.create_action('full-battery-notification')); - - settings = this.pluginSettings('clipboard'); - this.actions.add_action(settings.create_action('send-content')); - this.actions.add_action(settings.create_action('receive-content')); - - settings = this.pluginSettings('contacts'); - this.actions.add_action(settings.create_action('contacts-source')); - - settings = this.pluginSettings('mousepad'); - this.actions.add_action(settings.create_action('share-control')); - - settings = this.pluginSettings('mpris'); - this.actions.add_action(settings.create_action('share-players')); - - settings = this.pluginSettings('notification'); - this.actions.add_action(settings.create_action('send-notifications')); - this.actions.add_action(settings.create_action('send-active')); - - settings = this.pluginSettings('sftp'); - this.actions.add_action(settings.create_action('automount')); - - settings = this.pluginSettings('share'); - this.actions.add_action(settings.create_action('receive-files')); - - settings = this.pluginSettings('sms'); - this.actions.add_action(settings.create_action('legacy-sms')); - - settings = this.pluginSettings('systemvolume'); - this.actions.add_action(settings.create_action('share-sinks')); - - settings = this.pluginSettings('telephony'); - this.actions.add_action(settings.create_action('ringing-volume')); - this.actions.add_action(settings.create_action('ringing-pause')); - this.actions.add_action(settings.create_action('talking-volume')); - this.actions.add_action(settings.create_action('talking-pause')); - this.actions.add_action(settings.create_action('talking-microphone')); - - // Pair Actions - const encryption_info = new Gio.SimpleAction({name: 'encryption-info'}); - encryption_info.connect('activate', this._onEncryptionInfo.bind(this)); - this.actions.add_action(encryption_info); - - const status_pair = new Gio.SimpleAction({name: 'pair'}); - status_pair.connect('activate', this._deviceAction.bind(this.device)); - this.settings.bind('paired', status_pair, 'enabled', 16); - this.actions.add_action(status_pair); - - const status_unpair = new Gio.SimpleAction({name: 'unpair'}); - status_unpair.connect('activate', this._deviceAction.bind(this.device)); - this.settings.bind('paired', status_unpair, 'enabled', 0); - this.actions.add_action(status_unpair); - } - - /** - * Sharing Settings - */ - _sharingSettings() { - // Share Plugin - const settings = this.pluginSettings('share'); - - settings.connect( - 'changed::receive-directory', - this._onReceiveDirectoryChanged.bind(this) - ); - this._onReceiveDirectoryChanged(settings, 'receive-directory'); - - // Visibility - this.desktop_list.foreach(row => { - const name = row.get_name(); - row.visible = this.get_outgoing_supported(`${name}.request`); - }); - - // Separators & Sorting - this.desktop_list.set_header_func(rowSeparators); - - this.desktop_list.set_sort_func((row1, row2) => { - row1 = row1.get_child().get_child_at(0, 0); - row2 = row2.get_child().get_child_at(0, 0); - return row1.label.localeCompare(row2.label); - }); - this.share_list.set_header_func(rowSeparators); - - // Scroll with keyboard focus - const sharing_box = this.sharing_page.get_child().get_child(); - sharing_box.set_focus_vadjustment(this.sharing_page.vadjustment); - - // Continue focus chain between lists - this.desktop_list.next = this.share_list; - this.share_list.prev = this.desktop_list; - } - - _onReceiveDirectoryChanged(settings, key) { - let receiveDir = settings.get_string(key); - - if (receiveDir.length === 0) { - receiveDir = GLib.get_user_special_dir( - GLib.UserDirectory.DIRECTORY_DOWNLOAD - ); - - // Account for some corner cases with a fallback - const homeDir = GLib.get_home_dir(); - - if (!receiveDir || receiveDir === homeDir) - receiveDir = GLib.build_filenamev([homeDir, 'Downloads']); - - settings.set_string(key, receiveDir); - } - - if (this.receive_directory.get_filename() !== receiveDir) - this.receive_directory.set_filename(receiveDir); - } - - _onReceiveDirectorySet(button) { - const settings = this.pluginSettings('share'); - const receiveDir = settings.get_string('receive-directory'); - const filename = button.get_filename(); - - if (filename !== receiveDir) - settings.set_string('receive-directory', filename); - } - - /** - * Battery Settings - */ - async _batterySettings() { - try { - this.battery_device_list.set_header_func(rowSeparators); - this.battery_system_list.set_header_func(rowSeparators); - const settings = this.pluginSettings('battery'); - const oldLevel = settings.get_uint('custom-battery-notification-value'); - this.battery_custom_notification_value.set_value(oldLevel); - - // If the device can't handle statistics we're done - if (!this.get_incoming_supported('battery')) { - this.battery_system_label.visible = false; - this.battery_system.visible = false; - return; - } - - // Check UPower for a battery - const hasBattery = await new Promise((resolve, reject) => { - Gio.DBus.system.call( - 'org.freedesktop.UPower', - '/org/freedesktop/UPower/devices/DisplayDevice', - 'org.freedesktop.DBus.Properties', - 'Get', - new GLib.Variant('(ss)', [ - 'org.freedesktop.UPower.Device', - 'IsPresent', - ]), - null, - Gio.DBusCallFlags.NONE, - -1, - null, - (connection, res) => { - try { - const variant = connection.call_finish(res); - const value = variant.deepUnpack()[0]; - const isPresent = value.get_boolean(); - - resolve(isPresent); - } catch (e) { - resolve(false); - } - } - ); - }); - - this.battery_system_label.visible = hasBattery; - this.battery_system.visible = hasBattery; - } catch (e) { - this.battery_system_label.visible = false; - this.battery_system.visible = false; - } - } - - _setCustomChargeLevel(spin) { - const settings = this.pluginSettings('battery'); - settings.set_uint('custom-battery-notification-value', spin.get_value_as_int()); - } - - /** - * RunCommand Page - */ - _runcommandSettings() { - // Scroll with keyboard focus - const runcommand_box = this.runcommand_page.get_child().get_child(); - runcommand_box.set_focus_vadjustment(this.runcommand_page.vadjustment); - - // Local Command List - const settings = this.pluginSettings('runcommand'); - this._commands = settings.get_value('command-list').recursiveUnpack(); - - this.command_list.set_sort_func(this._sortCommands); - this.command_list.set_header_func(rowSeparators); - - for (const uuid of Object.keys(this._commands)) - this._insertCommand(uuid); - } - - _sortCommands(row1, row2) { - if (!row1.title || !row2.title) - return 1; - - return row1.title.localeCompare(row2.title); - } - - _insertCommand(uuid) { - const row = new SectionRow({ - title: this._commands[uuid].name, - subtitle: this._commands[uuid].command, - activatable: false, - }); - row.set_name(uuid); - row.subtitle_label.ellipsize = Pango.EllipsizeMode.MIDDLE; - - const editButton = new Gtk.Button({ - image: new Gtk.Image({ - icon_name: 'document-edit-symbolic', - pixel_size: 16, - visible: true, - }), - tooltip_text: _('Edit'), - valign: Gtk.Align.CENTER, - vexpand: true, - visible: true, - }); - editButton.connect('clicked', this._onEditCommand.bind(this)); - editButton.get_accessible().set_name(_('Edit')); - row.get_child().attach(editButton, 2, 0, 1, 2); - - const deleteButton = new Gtk.Button({ - image: new Gtk.Image({ - icon_name: 'edit-delete-symbolic', - pixel_size: 16, - visible: true, - }), - tooltip_text: _('Remove'), - valign: Gtk.Align.CENTER, - vexpand: true, - visible: true, - }); - deleteButton.connect('clicked', this._onDeleteCommand.bind(this)); - deleteButton.get_accessible().set_name(_('Remove')); - row.get_child().attach(deleteButton, 3, 0, 1, 2); - - this.command_list.add(row); - } - - _onEditCommand(widget) { - if (this._commandEditor === undefined) { - this._commandEditor = new CommandEditor({ - modal: true, - transient_for: this.get_toplevel(), - use_header_bar: true, - }); - - this._commandEditor.connect( - 'response', - this._onSaveCommand.bind(this) - ); - - this._commandEditor.resize(1, 1); - } - - if (widget instanceof Gtk.Button) { - const row = widget.get_ancestor(Gtk.ListBoxRow.$gtype); - const uuid = row.get_name(); - - this._commandEditor.uuid = uuid; - this._commandEditor.command_name = this._commands[uuid].name; - this._commandEditor.command_line = this._commands[uuid].command; - } else { - this._commandEditor.uuid = GLib.uuid_string_random(); - this._commandEditor.command_name = ''; - this._commandEditor.command_line = ''; - } - - this._commandEditor.present(); - } - - _storeCommands() { - const variant = {}; - - for (const [uuid, command] of Object.entries(this._commands)) - variant[uuid] = new GLib.Variant('a{ss}', command); - - this.pluginSettings('runcommand').set_value( - 'command-list', - new GLib.Variant('a{sv}', variant) - ); - } - - _onDeleteCommand(button) { - const row = button.get_ancestor(Gtk.ListBoxRow.$gtype); - delete this._commands[row.get_name()]; - row.destroy(); - - this._storeCommands(); - } - - _onSaveCommand(dialog, response_id) { - if (response_id === Gtk.ResponseType.ACCEPT) { - this._commands[dialog.uuid] = { - name: dialog.command_name, - command: dialog.command_line, - }; - - this._storeCommands(); - - // - let row = null; - - for (const child of this.command_list.get_children()) { - if (child.get_name() === dialog.uuid) { - row = child; - break; - } - } - - if (row === null) { - this._insertCommand(dialog.uuid); - } else { - row.set_name(dialog.uuid); - row.title = dialog.command_name; - row.subtitle = dialog.command_line; - } - } - - dialog.hide(); - } - - /** - * Notification Settings - */ - _notificationSettings() { - const settings = this.pluginSettings('notification'); - - settings.bind( - 'send-notifications', - this.notification_apps, - 'sensitive', - Gio.SettingsBindFlags.DEFAULT - ); - - // Separators & Sorting - this.notification_list.set_header_func(rowSeparators); - - // Scroll with keyboard focus - const notification_box = this.notification_page.get_child().get_child(); - notification_box.set_focus_vadjustment(this.notification_page.vadjustment); - - // Continue focus chain between lists - this.notification_list.next = this.notification_apps; - this.notification_apps.prev = this.notification_list; - - this.notification_apps.set_sort_func(titleSortFunc); - this.notification_apps.set_header_func(rowSeparators); - - this._populateApplications(settings); - } - - _toggleNotification(widget) { - try { - const row = widget.get_ancestor(Gtk.ListBoxRow.$gtype); - const settings = this.pluginSettings('notification'); - let applications = {}; - - try { - applications = JSON.parse(settings.get_string('applications')); - } catch (e) { - applications = {}; - } - - applications[row.title].enabled = !applications[row.title].enabled; - row.widget.state = applications[row.title].enabled; - settings.set_string('applications', JSON.stringify(applications)); - - } catch (e) { - logError(e); - } - } - - - - _populateApplications(settings) { - const applications = this._queryApplications(settings); - - for (const name in applications) { - const row = new SectionRow({ - gicon: Gio.Icon.new_for_string(applications[name].iconName), - title: name, - height_request: 48, - widget: new Gtk.Switch({ - state: applications[name].enabled, - margin_start: 12, - margin_end: 12, - halign: Gtk.Align.END, - valign: Gtk.Align.CENTER, - vexpand: true, - visible: true, - }), - }); - - row.widget.connect('notify::active', this._toggleNotification.bind(this)); - this.notification_apps.add(row); - } - } - - _queryApplications(settings) { - let applications = {}; - - try { - applications = JSON.parse(settings.get_string('applications')); - } catch (e) { - applications = {}; - } - - // Scan applications that statically declare to show notifications - const ignoreId = 'org.gnome.Shell.Extensions.GSConnect.desktop'; - - for (const appInfo of Gio.AppInfo.get_all()) { - if (appInfo.get_id() === ignoreId) - continue; - - if (!appInfo.get_boolean('X-GNOME-UsesNotifications')) - continue; - - const appName = appInfo.get_name(); - - if (appName === null || applications.hasOwnProperty(appName)) - continue; - - let icon = appInfo.get_icon(); - icon = (icon) ? icon.to_string() : 'application-x-executable'; - - applications[appName] = { - iconName: icon, - enabled: true, - }; - } - - settings.set_string('applications', JSON.stringify(applications)); - - return applications; - } - - /** - * Telephony Settings - */ - _telephonySettings() { - // Continue focus chain between lists - this.ringing_list.next = this.talking_list; - this.talking_list.prev = this.ringing_list; - - this.ringing_list.set_header_func(rowSeparators); - this.talking_list.set_header_func(rowSeparators); - } - - /** - * Keyboard Shortcuts - */ - _keybindingSettings() { - // Scroll with keyboard focus - const shortcuts_box = this.shortcuts_page.get_child().get_child(); - shortcuts_box.set_focus_vadjustment(this.shortcuts_page.vadjustment); - - // Filter & Sort - this.shortcuts_actions_list.set_filter_func(this._filterPluginKeybindings.bind(this)); - this.shortcuts_actions_list.set_header_func(rowSeparators); - this.shortcuts_actions_list.set_sort_func(titleSortFunc); - - // Init - for (const name in DEVICE_SHORTCUTS) - this._addPluginKeybinding(name); - - this._setPluginKeybindings(); - - // Watch for GAction and Keybinding changes - this._actionAddedId = this.device.action_group.connect( - 'action-added', - () => this.shortcuts_actions_list.invalidate_filter() - ); - this._actionRemovedId = this.device.action_group.connect( - 'action-removed', - () => this.shortcuts_actions_list.invalidate_filter() - ); - this._keybindingsId = this.settings.connect( - 'changed::keybindings', - this._setPluginKeybindings.bind(this) - ); - } - - _addPluginKeybinding(name) { - const [icon_name, label] = DEVICE_SHORTCUTS[name]; - - const widget = new Gtk.Label({ - label: _('Disabled'), - visible: true, - }); - widget.get_style_context().add_class('dim-label'); - - const row = new SectionRow({ - height_request: 48, - icon_name: icon_name, - title: label, - widget: widget, - }); - row.icon_image.pixel_size = 16; - row.action = name; - this.shortcuts_actions_list.add(row); - } - - _filterPluginKeybindings(row) { - return this.device.action_group.has_action(row.action); - } - - _setPluginKeybindings() { - const keybindings = this.settings.get_value('keybindings').deepUnpack(); - - this.shortcuts_actions_list.foreach(row => { - if (keybindings[row.action]) { - const accel = Gtk.accelerator_parse(keybindings[row.action]); - row.widget.label = Gtk.accelerator_get_label(...accel); - } else { - row.widget.label = _('Disabled'); - } - }); - } - - _onResetActionShortcuts(button) { - const keybindings = this.settings.get_value('keybindings').deepUnpack(); - - for (const action in keybindings) { - // Don't reset remote command shortcuts - if (!action.includes('::')) - delete keybindings[action]; - } - - this.settings.set_value( - 'keybindings', - new GLib.Variant('a{ss}', keybindings) - ); - } - - async _onShortcutRowActivated(box, row) { - try { - const keybindings = this.settings.get_value('keybindings').deepUnpack(); - let accel = keybindings[row.action] || null; - - accel = await Keybindings.getAccelerator(row.title, accel); - - if (accel) - keybindings[row.action] = accel; - else - delete keybindings[row.action]; - - this.settings.set_value( - 'keybindings', - new GLib.Variant('a{ss}', keybindings) - ); - } catch (e) { - logError(e); - } - } - - /** - * Advanced Page - */ - _advancedSettings() { - // Scroll with keyboard focus - const advanced_box = this.advanced_page.get_child().get_child(); - advanced_box.set_focus_vadjustment(this.advanced_page.vadjustment); - - // Sort & Separate - this.plugin_list.set_header_func(rowSeparators); - this.plugin_list.set_sort_func(titleSortFunc); - this.experimental_list.set_header_func(rowSeparators); - - // Continue focus chain between lists - this.plugin_list.next = this.experimental_list; - this.experimental_list.prev = this.plugin_list; - - this._disabledPluginsId = this.settings.connect( - 'changed::disabled-plugins', - this._onPluginsChanged.bind(this) - ); - this._supportedPluginsId = this.settings.connect( - 'changed::supported-plugins', - this._onPluginsChanged.bind(this) - ); - this._onPluginsChanged(this.settings, null); - - for (const name of DEVICE_PLUGINS) - this._addPlugin(name); - } - - _onPluginsChanged(settings, key) { - if (key === 'disabled-plugins' || this._disabledPlugins === undefined) - this._disabledPlugins = settings.get_strv('disabled-plugins'); - - if (key === 'supported-plugins' || this._supportedPlugins === undefined) - this._supportedPlugins = settings.get_strv('supported-plugins'); - - this._enabledPlugins = this._supportedPlugins.filter(name => { - return !this._disabledPlugins.includes(name); - }); - - if (key !== null) - this._updatePlugins(); - } - - _addPlugin(name) { - const plugin = plugins[name]; - - const row = new SectionRow({ - height_request: 48, - title: plugin.Metadata.label, - subtitle: plugin.Metadata.description || '', - visible: this._supportedPlugins.includes(name), - widget: new Gtk.Switch({ - active: this._enabledPlugins.includes(name), - valign: Gtk.Align.CENTER, - vexpand: true, - visible: true, - }), - }); - row.widget.connect('notify::active', this._togglePlugin.bind(this)); - row.set_name(name); - - if (this.hasOwnProperty(name)) - this[name].visible = row.widget.active; - - this.plugin_list.add(row); - } - - _updatePlugins(settings, key) { - for (const row of this.plugin_list.get_children()) { - const name = row.get_name(); - - row.visible = this._supportedPlugins.includes(name); - row.widget.active = this._enabledPlugins.includes(name); - - if (this.hasOwnProperty(name)) - this[name].visible = row.widget.active; - } - } - - _togglePlugin(widget) { - try { - const name = widget.get_ancestor(Gtk.ListBoxRow.$gtype).get_name(); - const index = this._disabledPlugins.indexOf(name); - - // Either add or remove the plugin from the disabled list - if (index > -1) - this._disabledPlugins.splice(index, 1); - else - this._disabledPlugins.push(name); - - this.settings.set_strv('disabled-plugins', this._disabledPlugins); - } catch (e) { - logError(e); - } - } -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/preferences/init.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/preferences/init.js deleted file mode 100644 index 038f60e7..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/preferences/init.js +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import GLib from 'gi://GLib'; - -import setup, {setupGettext} from '../utils/setup.js'; - - -// Bootstrap -setup(GLib.path_get_dirname(GLib.path_get_dirname(GLib.filename_from_uri(import.meta.url)[0]))); -setupGettext(); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/preferences/keybindings.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/preferences/keybindings.js deleted file mode 100644 index be80dfea..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/preferences/keybindings.js +++ /dev/null @@ -1,314 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gdk from 'gi://Gdk'; -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Gtk from 'gi://Gtk'; - - -/* - * A list of modifier keysyms we ignore - */ -const _MODIFIERS = [ - Gdk.KEY_Alt_L, - Gdk.KEY_Alt_R, - Gdk.KEY_Caps_Lock, - Gdk.KEY_Control_L, - Gdk.KEY_Control_R, - Gdk.KEY_Meta_L, - Gdk.KEY_Meta_R, - Gdk.KEY_Num_Lock, - Gdk.KEY_Shift_L, - Gdk.KEY_Shift_R, - Gdk.KEY_Super_L, - Gdk.KEY_Super_R, -]; - -/** - * Response enum for ShortcutChooserDialog - */ -export const ResponseType = { - CANCEL: Gtk.ResponseType.CANCEL, - SET: Gtk.ResponseType.APPLY, - UNSET: 2, -}; - - -/** - * A simplified version of the shortcut editor from GNOME Control Center - */ -export const ShortcutChooserDialog = GObject.registerClass({ - GTypeName: 'GSConnectPreferencesShortcutEditor', - Template: 'resource:///org/gnome/Shell/Extensions/GSConnect/ui/preferences-shortcut-editor.ui', - Children: [ - 'cancel-button', 'set-button', - 'stack', 'summary-label', - 'shortcut-label', 'conflict-label', - ], -}, class ShortcutChooserDialog extends Gtk.Dialog { - - _init(params) { - super._init({ - transient_for: Gio.Application.get_default().get_active_window(), - use_header_bar: true, - }); - - this._seat = Gdk.Display.get_default().get_default_seat(); - - // Current accelerator or %null - this.accelerator = params.accelerator; - - // TRANSLATORS: Summary of a keyboard shortcut function - // Example: Enter a new shortcut to change Messaging - this.summary = _('Enter a new shortcut to change %s').format( - params.summary - ); - } - - get accelerator() { - return this.shortcut_label.accelerator; - } - - set accelerator(value) { - this.shortcut_label.accelerator = value; - } - - get summary() { - return this.summary_label.label; - } - - set summary(value) { - this.summary_label.label = value; - } - - vfunc_key_press_event(event) { - let keyvalLower = Gdk.keyval_to_lower(event.keyval); - let realMask = event.state & Gtk.accelerator_get_default_mod_mask(); - - // TODO: Critical: 'WIDGET_REALIZED_FOR_EVENT (widget, event)' failed - if (_MODIFIERS.includes(keyvalLower)) - return true; - - // Normalize Tab - if (keyvalLower === Gdk.KEY_ISO_Left_Tab) - keyvalLower = Gdk.KEY_Tab; - - // Put shift back if it changed the case of the key, not otherwise. - if (keyvalLower !== event.keyval) - realMask |= Gdk.ModifierType.SHIFT_MASK; - - // HACK: we don't want to use SysRq as a keybinding (but we do want - // Alt+Print), so we avoid translation from Alt+Print to SysRq - if (keyvalLower === Gdk.KEY_Sys_Req && (realMask & Gdk.ModifierType.MOD1_MASK) !== 0) - keyvalLower = Gdk.KEY_Print; - - // A single Escape press cancels the editing - if (realMask === 0 && keyvalLower === Gdk.KEY_Escape) { - this.response(ResponseType.CANCEL); - return false; - } - - // Backspace disables the current shortcut - if (realMask === 0 && keyvalLower === Gdk.KEY_BackSpace) { - this.response(ResponseType.UNSET); - return false; - } - - // CapsLock isn't supported as a keybinding modifier, so keep it from - // confusing us - realMask &= ~Gdk.ModifierType.LOCK_MASK; - - if (keyvalLower !== 0 && realMask !== 0) { - this._ungrab(); - - // Set the accelerator property/label - this.accelerator = Gtk.accelerator_name(keyvalLower, realMask); - - // TRANSLATORS: When a keyboard shortcut is unavailable - // Example: [Ctrl]+[S] is already being used - this.conflict_label.label = _('%s is already being used').format( - Gtk.accelerator_get_label(keyvalLower, realMask) - ); - - // Show Cancel button and switch to confirm/conflict page - this.cancel_button.visible = true; - this.stack.visible_child_name = 'confirm'; - - this._check(); - } - - return true; - } - - async _check() { - try { - const available = await checkAccelerator(this.accelerator); - this.set_button.visible = available; - this.conflict_label.visible = !available; - } catch (e) { - logError(e); - this.response(ResponseType.CANCEL); - } - } - - _grab() { - const success = this._seat.grab( - this.get_window(), - Gdk.SeatCapabilities.KEYBOARD, - true, // owner_events - null, // cursor - null, // event - null - ); - - if (success !== Gdk.GrabStatus.SUCCESS) - return this.response(ResponseType.CANCEL); - - if (!this._seat.get_keyboard() && !this._seat.get_pointer()) - return this.response(ResponseType.CANCEL); - - this.grab_add(); - } - - _ungrab() { - this._seat.ungrab(); - this.grab_remove(); - } - - // Override to use our own ungrab process - response(response_id) { - this.hide(); - this._ungrab(); - - return super.response(response_id); - } - - // Override with a non-blocking version of Gtk.Dialog.run() - run() { - this.show(); - - // Wait a bit before attempting grab - GLib.timeout_add(GLib.PRIORITY_DEFAULT, 100, () => { - this._grab(); - return GLib.SOURCE_REMOVE; - }); - } -}); - - -/** - * Check the availability of an accelerator using GNOME Shell's DBus interface. - * - * @param {string} accelerator - An accelerator - * @param {number} [modeFlags] - Mode Flags - * @param {number} [grabFlags] - Grab Flags - * @param {boolean} %true if available, %false on error or unavailable - */ -export async function checkAccelerator(accelerator, modeFlags = 0, grabFlags = 0) { - try { - let result = false; - - // Try to grab the accelerator - const action = await new Promise((resolve, reject) => { - Gio.DBus.session.call( - 'org.gnome.Shell', - '/org/gnome/Shell', - 'org.gnome.Shell', - 'GrabAccelerator', - new GLib.Variant('(suu)', [accelerator, modeFlags, grabFlags]), - null, - Gio.DBusCallFlags.NONE, - -1, - null, - (connection, res) => { - try { - res = connection.call_finish(res); - resolve(res.deepUnpack()[0]); - } catch (e) { - reject(e); - } - } - ); - }); - - // If successful, use the result of ungrabbing as our return - if (action !== 0) { - result = await new Promise((resolve, reject) => { - Gio.DBus.session.call( - 'org.gnome.Shell', - '/org/gnome/Shell', - 'org.gnome.Shell', - 'UngrabAccelerator', - new GLib.Variant('(u)', [action]), - null, - Gio.DBusCallFlags.NONE, - -1, - null, - (connection, res) => { - try { - res = connection.call_finish(res); - resolve(res.deepUnpack()[0]); - } catch (e) { - reject(e); - } - } - ); - }); - } - - return result; - } catch (e) { - logError(e); - return false; - } -} - - -/** - * Show a dialog to get a keyboard shortcut from a user. - * - * @param {string} summary - A description of the keybinding's function - * @param {string} accelerator - An accelerator as taken by Gtk.ShortcutLabel - * @return {string} An accelerator or %null if it should be unset. - */ -export async function getAccelerator(summary, accelerator = null) { - try { - const dialog = new ShortcutChooserDialog({ - summary: summary, - accelerator: accelerator, - }); - - accelerator = await new Promise((resolve, reject) => { - dialog.connect('response', (dialog, response) => { - switch (response) { - case ResponseType.SET: - accelerator = dialog.accelerator; - break; - - case ResponseType.UNSET: - accelerator = null; - break; - - case ResponseType.CANCEL: - // leave the accelerator as passed in - break; - } - - dialog.destroy(); - - resolve(accelerator); - }); - - dialog.run(); - }); - - return accelerator; - } catch (e) { - logError(e); - return accelerator; - } -} - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/preferences/service.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/preferences/service.js deleted file mode 100644 index e258f225..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/preferences/service.js +++ /dev/null @@ -1,648 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gdk from 'gi://Gdk'; -import GdkPixbuf from 'gi://GdkPixbuf'; -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Gtk from 'gi://Gtk'; - -import system from 'system'; - -import Config from '../config.js'; -import {Panel, rowSeparators} from './device.js'; -import {Service} from '../utils/remote.js'; - - -/* - * Header for support logs - */ -const LOG_HEADER = new GLib.Bytes(` -GSConnect: ${Config.PACKAGE_VERSION} (${Config.IS_USER ? 'user' : 'system'}) -GJS: ${system.version} -Session: ${GLib.getenv('XDG_SESSION_TYPE')} -OS: ${GLib.get_os_info('PRETTY_NAME')} --------------------------------------------------------------------------------- -`); - - -/** - * Generate a support log. - * - * @param {string} time - Start time as a string (24-hour notation) - */ -async function generateSupportLog(time) { - try { - const [file, stream] = Gio.File.new_tmp('gsconnect.XXXXXX'); - const logFile = stream.get_output_stream(); - - await new Promise((resolve, reject) => { - logFile.write_bytes_async(LOG_HEADER, 0, null, (file, res) => { - try { - resolve(file.write_bytes_finish(res)); - } catch (e) { - reject(e); - } - }); - }); - - // FIXME: BSD??? - const proc = new Gio.Subprocess({ - flags: (Gio.SubprocessFlags.STDOUT_PIPE | - Gio.SubprocessFlags.STDERR_MERGE), - argv: ['journalctl', '--no-host', '--since', time], - }); - proc.init(null); - - logFile.splice_async( - proc.get_stdout_pipe(), - Gio.OutputStreamSpliceFlags.CLOSE_TARGET, - GLib.PRIORITY_DEFAULT, - null, - (source, res) => { - try { - source.splice_finish(res); - } catch (e) { - logError(e); - } - } - ); - - await new Promise((resolve, reject) => { - proc.wait_check_async(null, (proc, res) => { - try { - resolve(proc.wait_finish(res)); - } catch (e) { - reject(e); - } - }); - }); - - const uri = file.get_uri(); - Gio.AppInfo.launch_default_for_uri_async(uri, null, null, null); - } catch (e) { - logError(e); - } -} - - -/** - * "Connect to..." Dialog - */ -const ConnectDialog = GObject.registerClass({ - GTypeName: 'GSConnectConnectDialog', - Template: 'resource:///org/gnome/Shell/Extensions/GSConnect/ui/connect-dialog.ui', - Children: [ - 'cancel-button', 'connect-button', - 'lan-grid', 'lan-ip', 'lan-port', - ], -}, class ConnectDialog extends Gtk.Dialog { - - _init(params = {}) { - super._init(Object.assign({ - use_header_bar: true, - }, params)); - } - - vfunc_response(response_id) { - if (response_id === Gtk.ResponseType.OK) { - try { - let address; - - // Lan host/port entered - if (this.lan_ip.text) { - const host = this.lan_ip.text; - const port = this.lan_port.value; - address = GLib.Variant.new_string(`lan://${host}:${port}`); - } else { - return false; - } - - this.application.activate_action('connect', address); - } catch (e) { - logError(e); - } - } - - this.destroy(); - return false; - } -}); - - -export const Window = GObject.registerClass({ - GTypeName: 'GSConnectPreferencesWindow', - Properties: { - 'display-mode': GObject.ParamSpec.string( - 'display-mode', - 'Display Mode', - 'Display devices in either the Panel or User Menu', - GObject.ParamFlags.READWRITE, - null - ), - }, - Template: 'resource:///org/gnome/Shell/Extensions/GSConnect/ui/preferences-window.ui', - Children: [ - // HeaderBar - 'headerbar', 'infobar', 'stack', - 'service-menu', 'service-edit', 'refresh-button', - 'device-menu', 'prev-button', - - // Popover - 'rename-popover', 'rename', 'rename-label', 'rename-entry', 'rename-submit', - - // Focus Box - 'service-window', 'service-box', - - // Device List - 'device-list', 'device-list-spinner', 'device-list-placeholder', - ], -}, class PreferencesWindow extends Gtk.ApplicationWindow { - - _init(params = {}) { - super._init(params); - - // Service Settings - this.settings = new Gio.Settings({ - settings_schema: Config.GSCHEMA.lookup( - 'org.gnome.Shell.Extensions.GSConnect', - true - ), - }); - - // Service Proxy - this.service = new Service(); - - this._deviceAddedId = this.service.connect( - 'device-added', - this._onDeviceAdded.bind(this) - ); - - this._deviceRemovedId = this.service.connect( - 'device-removed', - this._onDeviceRemoved.bind(this) - ); - - this._serviceChangedId = this.service.connect( - 'notify::active', - this._onServiceChanged.bind(this) - ); - - // HeaderBar (Service Name) - this.headerbar.title = this.settings.get_string('name'); - this.rename_entry.text = this.headerbar.title; - - // Scroll with keyboard focus - this.service_box.set_focus_vadjustment(this.service_window.vadjustment); - - // Device List - this.device_list.set_header_func(rowSeparators); - - // Discoverable InfoBar - this.settings.bind( - 'discoverable', - this.infobar, - 'reveal-child', - Gio.SettingsBindFlags.INVERT_BOOLEAN - ); - this.add_action(this.settings.create_action('discoverable')); - - // Application Menu - this._initMenu(); - - // Setting: Keep Alive When Locked - this.add_action(this.settings.create_action('keep-alive-when-locked')); - - // Broadcast automatically every 5 seconds if there are no devices yet - this._refreshSource = GLib.timeout_add_seconds( - GLib.PRIORITY_DEFAULT, - 5, - this._refresh.bind(this) - ); - - // Restore window size/maximized/position - this._restoreGeometry(); - - // Prime the service - this._initService(); - } - - get display_mode() { - if (this.settings.get_boolean('show-indicators')) - return 'panel'; - - return 'user-menu'; - } - - set display_mode(mode) { - this.settings.set_boolean('show-indicators', (mode === 'panel')); - } - - vfunc_delete_event(event) { - if (this.service) { - this.service.disconnect(this._deviceAddedId); - this.service.disconnect(this._deviceRemovedId); - this.service.disconnect(this._serviceChangedId); - this.service.destroy(); - this.service = null; - } - - this._saveGeometry(); - GLib.source_remove(this._refreshSource); - - return false; - } - - async _initService() { - try { - this.refresh_button.grab_focus(); - - this._onServiceChanged(this.service, null); - await this.service.reload(); - } catch (e) { - logError(e, 'GSConnect'); - } - } - - _initMenu() { - // Panel/User Menu mode - const displayMode = new Gio.PropertyAction({ - name: 'display-mode', - property_name: 'display-mode', - object: this, - }); - this.add_action(displayMode); - - // About Dialog - const aboutDialog = new Gio.SimpleAction({name: 'about'}); - aboutDialog.connect('activate', this._aboutDialog.bind(this)); - this.add_action(aboutDialog); - - // "Connect to..." Dialog - const connectDialog = new Gio.SimpleAction({name: 'connect'}); - connectDialog.connect('activate', this._connectDialog.bind(this)); - this.add_action(connectDialog); - - // "Generate Support Log" GAction - const generateSupportLog = new Gio.SimpleAction({name: 'support-log'}); - generateSupportLog.connect('activate', this._generateSupportLog.bind(this)); - this.add_action(generateSupportLog); - - // "Help" GAction - const help = new Gio.SimpleAction({name: 'help'}); - help.connect('activate', this._help); - this.add_action(help); - } - - _refresh() { - if (this.service.active && this.device_list.get_children().length < 1) { - this.device_list_spinner.active = true; - this.service.activate_action('refresh', null); - } else { - this.device_list_spinner.active = false; - } - - return GLib.SOURCE_CONTINUE; - } - - /* - * Window State - */ - _restoreGeometry() { - this._windowState = new Gio.Settings({ - settings_schema: Config.GSCHEMA.lookup( - 'org.gnome.Shell.Extensions.GSConnect.WindowState', - true - ), - path: '/org/gnome/shell/extensions/gsconnect/preferences/', - }); - - // Size - const [width, height] = this._windowState.get_value('window-size').deepUnpack(); - - if (width && height) - this.set_default_size(width, height); - - // Maximized State - if (this._windowState.get_boolean('window-maximized')) - this.maximize(); - } - - _saveGeometry() { - const state = this.get_window().get_state(); - - // Maximized State - const maximized = (state & Gdk.WindowState.MAXIMIZED); - this._windowState.set_boolean('window-maximized', maximized); - - // Leave the size at the value before maximizing - if (maximized || (state & Gdk.WindowState.FULLSCREEN)) - return; - - // Size - const size = this.get_size(); - this._windowState.set_value('window-size', new GLib.Variant('(ii)', size)); - } - - /** - * About Dialog - */ - _aboutDialog() { - if (this._about === undefined) { - this._about = new Gtk.AboutDialog({ - application: Gio.Application.get_default(), - authors: [ - 'Andy Holmes ', - 'Bertrand Lacoste ', - 'Frank Dana ', - ], - comments: _('A complete KDE Connect implementation for GNOME'), - logo: GdkPixbuf.Pixbuf.new_from_resource_at_scale( - '/org/gnome/Shell/Extensions/GSConnect/icons/org.gnome.Shell.Extensions.GSConnect.svg', - 128, - 128, - true - ), - program_name: 'GSConnect', - // TRANSLATORS: eg. 'Translator Name ' - translator_credits: _('translator-credits'), - version: Config.PACKAGE_VERSION.toString(), - website: Config.PACKAGE_URL, - license_type: Gtk.License.GPL_2_0, - modal: true, - transient_for: this, - }); - - // Persist - this._about.connect('response', (dialog) => dialog.hide_on_delete()); - this._about.connect('delete-event', (dialog) => dialog.hide_on_delete()); - } - - this._about.present(); - } - - /** - * Connect to..." Dialog - */ - _connectDialog() { - new ConnectDialog({ - application: Gio.Application.get_default(), - modal: true, - transient_for: this, - }); - } - - /* - * "Generate Support Log" GAction - */ - _generateSupportLog() { - const dialog = new Gtk.MessageDialog({ - text: _('Generate Support Log'), - secondary_text: _('Debug messages are being logged. Take any steps necessary to reproduce a problem then review the log.'), - }); - dialog.add_button(_('Cancel'), Gtk.ResponseType.CANCEL); - dialog.add_button(_('Review Log'), Gtk.ResponseType.OK); - - // Enable debug logging and mark the current time - this.settings.set_boolean('debug', true); - const now = GLib.DateTime.new_now_local().format('%R'); - - dialog.connect('response', (dialog, response_id) => { - // Disable debug logging and destroy the dialog - this.settings.set_boolean('debug', false); - dialog.destroy(); - - // Only generate a log if instructed - if (response_id === Gtk.ResponseType.OK) - generateSupportLog(now); - }); - - dialog.show_all(); - } - - /* - * "Help" GAction - */ - _help(action, parameter) { - const uri = `${Config.PACKAGE_URL}/wiki/Help`; - Gio.AppInfo.launch_default_for_uri_async(uri, null, null, null); - } - - /* - * HeaderBar Callbacks - */ - _onPrevious(button, event) { - // HeaderBar (Service) - this.prev_button.visible = false; - this.device_menu.visible = false; - - this.refresh_button.visible = true; - this.service_edit.visible = true; - this.service_menu.visible = true; - - this.headerbar.title = this.settings.get_string('name'); - this.headerbar.subtitle = null; - - // Panel - this.stack.visible_child_name = 'service'; - this._setDeviceMenu(); - } - - _onEditServiceName(button, event) { - this.rename_entry.text = this.headerbar.title; - this.rename_entry.has_focus = true; - } - - _onSetServiceName(widget) { - if (this.rename_entry.text.length) { - this.headerbar.title = this.rename_entry.text; - this.settings.set_string('name', this.rename_entry.text); - } - - this.service_edit.active = false; - this.service_edit.grab_focus(); - } - - /* - * Context Switcher - */ - _getTypeLabel(device) { - switch (device.type) { - case 'laptop': - return _('Laptop'); - case 'phone': - return _('Smartphone'); - case 'tablet': - return _('Tablet'); - case 'tv': - return _('Television'); - default: - return _('Desktop'); - } - } - - _setDeviceMenu(panel = null) { - this.device_menu.insert_action_group('device', null); - this.device_menu.insert_action_group('settings', null); - this.device_menu.set_menu_model(null); - - if (panel === null) - return; - - this.device_menu.insert_action_group('device', panel.device.action_group); - this.device_menu.insert_action_group('settings', panel.actions); - this.device_menu.set_menu_model(panel.menu); - } - - _onDeviceChanged(statusLabel, device, pspec) { - switch (false) { - case device.paired: - statusLabel.label = _('Unpaired'); - break; - - case device.connected: - statusLabel.label = _('Disconnected'); - break; - - default: - statusLabel.label = _('Connected'); - } - } - - _createDeviceRow(device) { - const row = new Gtk.ListBoxRow({ - height_request: 52, - selectable: false, - visible: true, - }); - row.set_name(device.id); - - const grid = new Gtk.Grid({ - column_spacing: 12, - margin_left: 20, - margin_right: 20, - margin_bottom: 8, - margin_top: 8, - visible: true, - }); - row.add(grid); - - const icon = new Gtk.Image({ - gicon: new Gio.ThemedIcon({name: device.icon_name}), - icon_size: Gtk.IconSize.BUTTON, - visible: true, - }); - grid.attach(icon, 0, 0, 1, 1); - - const title = new Gtk.Label({ - halign: Gtk.Align.START, - hexpand: true, - valign: Gtk.Align.CENTER, - vexpand: true, - visible: true, - }); - grid.attach(title, 1, 0, 1, 1); - - const status = new Gtk.Label({ - halign: Gtk.Align.END, - hexpand: true, - valign: Gtk.Align.CENTER, - vexpand: true, - visible: true, - }); - grid.attach(status, 2, 0, 1, 1); - - // Keep name up to date - device.bind_property( - 'name', - title, - 'label', - GObject.BindingFlags.SYNC_CREATE - ); - - // Keep status up to date - device.connect( - 'notify::connected', - this._onDeviceChanged.bind(null, status) - ); - device.connect( - 'notify::paired', - this._onDeviceChanged.bind(null, status) - ); - this._onDeviceChanged(status, device, null); - - return row; - } - - _onDeviceAdded(service, device) { - try { - if (!this.stack.get_child_by_name(device.id)) { - // Add the device preferences - const prefs = new Panel(device); - this.stack.add_titled(prefs, device.id, device.name); - - // Add a row to the device list - prefs.row = this._createDeviceRow(device); - this.device_list.add(prefs.row); - } - } catch (e) { - logError(e); - } - } - - _onDeviceRemoved(service, device) { - try { - const prefs = this.stack.get_child_by_name(device.id); - - if (prefs === null) - return; - - if (prefs === this.stack.get_visible_child()) - this._onPrevious(); - - prefs.row.destroy(); - prefs.row = null; - - prefs.dispose(); - prefs.destroy(); - } catch (e) { - logError(e); - } - } - - _onDeviceSelected(box, row) { - try { - if (row === null) - return this._onPrevious(); - - // Transition the panel - const name = row.get_name(); - const prefs = this.stack.get_child_by_name(name); - - this.stack.visible_child = prefs; - this._setDeviceMenu(prefs); - - // HeaderBar (Device) - this.refresh_button.visible = false; - this.service_edit.visible = false; - this.service_menu.visible = false; - - this.prev_button.visible = true; - this.device_menu.visible = true; - - this.headerbar.title = prefs.device.name; - this.headerbar.subtitle = this._getTypeLabel(prefs.device); - } catch (e) { - logError(e); - } - } - - _onServiceChanged(service, pspec) { - if (this.service.active) - this.device_list_placeholder.label = _('Searching for devices…'); - else - this.device_list_placeholder.label = _('Waiting for service…'); - } -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/prefs.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/prefs.js deleted file mode 100644 index 4a94ca7b..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/prefs.js +++ /dev/null @@ -1,32 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import Adw from 'gi://Adw'; - -// Bootstrap -import * as Utils from './shell/utils.js'; -import setup from './utils/setup.js'; -import {ExtensionPreferences} from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; - -export default class GSConnectExtensionPreferences extends ExtensionPreferences { - constructor(metadata) { - super(metadata); - setup(this.path); - Utils.installService(); - } - - fillPreferencesWindow(window) { - const widget = new Adw.PreferencesPage(); - window.add(widget); - - GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => { - window.close(); - }); - - Gio.Subprocess.new([`${this.path}/gsconnect-preferences`], 0); - } -} - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/private_metadata.json b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/private_metadata.json deleted file mode 100644 index a50493f4..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/private_metadata.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "_generated": "Generated by SweetTooth, do not edit", - "description": "GSConnect is a complete implementation of KDE Connect especially for GNOME Shell with Nautilus, Chrome and Firefox integration. It does not rely on the KDE Connect desktop application and will not work with it installed.\n\nKDE Connect allows devices to securely share content like notifications or files and other features like SMS messaging and remote control. The KDE Connect team has applications for Linux, BSD, Android, Sailfish, iOS, macOS and Windows.\n\nPlease report issues on Github!", - "name": "GSConnect", - "shell-version": [ - "46" - ], - "url": "https://github.com/GSConnect/gnome-shell-extension-gsconnect/wiki", - "uuid": "gsconnect@andyholmes.github.io", - "version": 57 -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/schemas/gschemas.compiled b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/schemas/gschemas.compiled deleted file mode 100644 index 60e8035b..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/schemas/gschemas.compiled and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/schemas/org.gnome.Shell.Extensions.GSConnect.gschema.xml b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/schemas/org.gnome.Shell.Extensions.GSConnect.gschema.xml deleted file mode 100644 index 4dfaddb3..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/schemas/org.gnome.Shell.Extensions.GSConnect.gschema.xml +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - - - true - - - false - - - true - - - true - - - - - "" - - - "" - - - [] - - - false - - - true - - - - - - - (0, 0) - - - false - - - - - - - "" - - - {} - - - ["sms", "ring", "mount", "commands", "share", "keyboard"] - - - "" - - - false - - - "smartphone" - - - [] - - - [] - - - [] - - - [] - - - "" - - - - - - false - - - true - - - false - Enables custom battery notification - - - - 80 - - - false - - - - - false - - - false - - - - - true - - - - - - true - - - - - true - - - - - true - - - true - - - '{}' - - - - - - - , 'restart': <{'name': 'Restart', 'command': 'systemctl reboot'}>, 'logout': <{'name': 'Log Out', 'command': 'gnome-session-quit --logout --no-prompt'}>, 'poweroff': <{'name': 'Power Off', 'command': 'systemctl poweroff'}>, 'suspend': <{'name': 'Suspend', 'command': 'systemctl suspend'}>}]]> - - - - - true - - - - - true - - - "" - - - - - false - - - - - true - - - - - "lower" - - - false - - - "mute" - - - true - - - true - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/backends/lan.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/backends/lan.js deleted file mode 100644 index 758e24bf..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/backends/lan.js +++ /dev/null @@ -1,889 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; - -import Config from '../../config.js'; -import * as Core from '../core.js'; - -// Retain compatibility with GLib < 2.80, which lacks GioUnix -let GioUnix; -try { - GioUnix = (await import('gi://GioUnix')).default; -} catch (e) { - GioUnix = { - InputStream: Gio.UnixInputStream, - OutputStream: Gio.UnixOutputStream, - }; -} - -/** - * TCP Port Constants - */ -const PROTOCOL_PORT_DEFAULT = 1716; -const PROTOCOL_PORT_MIN = 1716; -const PROTOCOL_PORT_MAX = 1764; -const TRANSFER_MIN = 1739; -const TRANSFER_MAX = 1764; - - -/* - * One-time check for Linux/FreeBSD socket options - */ -export let _LINUX_SOCKETS = true; - -try { - // This should throw on FreeBSD - Gio.Socket.new( - Gio.SocketFamily.IPV4, - Gio.SocketType.STREAM, - Gio.SocketProtocol.TCP - ).get_option(6, 5); -} catch (e) { - _LINUX_SOCKETS = false; -} - - -/** - * Configure a socket connection for the KDE Connect protocol. - * - * @param {Gio.SocketConnection} connection - The connection to configure - */ -export function _configureSocket(connection) { - try { - if (_LINUX_SOCKETS) { - connection.socket.set_option(6, 4, 10); // TCP_KEEPIDLE - connection.socket.set_option(6, 5, 5); // TCP_KEEPINTVL - connection.socket.set_option(6, 6, 3); // TCP_KEEPCNT - - // FreeBSD constants - // https://github.com/freebsd/freebsd/blob/master/sys/netinet/tcp.h#L159 - } else { - connection.socket.set_option(6, 256, 10); // TCP_KEEPIDLE - connection.socket.set_option(6, 512, 5); // TCP_KEEPINTVL - connection.socket.set_option(6, 1024, 3); // TCP_KEEPCNT - } - - // Do this last because an error setting the keepalive options would - // result in a socket that never times out - connection.socket.set_keepalive(true); - } catch (e) { - debug(e, 'Configuring Socket'); - } -} - - -/** - * Lan.ChannelService consists of two parts: - * - * The TCP Listener listens on a port and constructs a Channel object from the - * incoming Gio.TcpConnection. - * - * The UDP Listener listens on a port for incoming JSON identity packets which - * include the TCP port, while the IP address is taken from the UDP packet - * itself. We respond by opening a TCP connection to that address. - */ -export const ChannelService = GObject.registerClass({ - GTypeName: 'GSConnectLanChannelService', - Properties: { - 'certificate': GObject.ParamSpec.object( - 'certificate', - 'Certificate', - 'The TLS certificate', - GObject.ParamFlags.READWRITE, - Gio.TlsCertificate.$gtype - ), - 'port': GObject.ParamSpec.uint( - 'port', - 'Port', - 'The port used by the service', - GObject.ParamFlags.READWRITE, - 0, GLib.MAXUINT16, - PROTOCOL_PORT_DEFAULT - ), - }, -}, class LanChannelService extends Core.ChannelService { - - _init(params = {}) { - super._init(params); - - // Track hosts we identify to directly, allowing them to ignore the - // discoverable state of the service. - this._allowed = new Set(); - - // - this._tcp = null; - this._tcpPort = PROTOCOL_PORT_DEFAULT; - this._udp4 = null; - this._udp6 = null; - - // Monitor network status - this._networkMonitor = Gio.NetworkMonitor.get_default(); - this._networkAvailable = false; - this._networkChangedId = 0; - } - - get certificate() { - if (this._certificate === undefined) - this._certificate = null; - - return this._certificate; - } - - set certificate(certificate) { - if (this.certificate === certificate) - return; - - this._certificate = certificate; - this.notify('certificate'); - } - - get channels() { - if (this._channels === undefined) - this._channels = new Map(); - - return this._channels; - } - - get port() { - if (this._port === undefined) - this._port = PROTOCOL_PORT_DEFAULT; - - return this._port; - } - - set port(port) { - if (this.port === port) - return; - - this._port = port; - this.notify('port'); - } - - _onNetworkChanged(monitor, network_available) { - if (this._networkAvailable === network_available) - return; - - this._networkAvailable = network_available; - this.broadcast(); - } - - _initCertificate() { - if (GLib.find_program_in_path(Config.OPENSSL_PATH) === null) { - const error = new Error(); - error.name = _('OpenSSL not found'); - error.url = `${Config.PACKAGE_URL}/wiki/Error#openssl-not-found`; - throw error; - } - - const certPath = GLib.build_filenamev([ - Config.CONFIGDIR, - 'certificate.pem', - ]); - const keyPath = GLib.build_filenamev([ - Config.CONFIGDIR, - 'private.pem', - ]); - - // Ensure a certificate exists with our id as the common name - this._certificate = Gio.TlsCertificate.new_for_paths(certPath, keyPath, - this.id); - - // If the service ID doesn't match the common name, this is probably a - // certificate from an older version and we should amend ours to match - if (this.id !== this._certificate.common_name) - this._id = this._certificate.common_name; - } - - _initTcpListener() { - try { - this._tcp = new Gio.SocketService(); - - let tcpPort = this.port; - const tcpPortMax = tcpPort + - (PROTOCOL_PORT_MAX - PROTOCOL_PORT_MIN); - - while (tcpPort <= tcpPortMax) { - try { - this._tcp.add_inet_port(tcpPort, null); - break; - } catch (e) { - if (tcpPort < tcpPortMax) { - tcpPort++; - continue; - } - - throw e; - } - } - - this._tcpPort = tcpPort; - this._tcp.connect('incoming', this._onIncomingChannel.bind(this)); - } catch (e) { - this._tcp.stop(); - this._tcp.close(); - this._tcp = null; - - throw e; - } - } - - async _onIncomingChannel(listener, connection) { - try { - const host = connection.get_remote_address().address.to_string(); - - // Create a channel - const channel = new Channel({ - backend: this, - certificate: this.certificate, - host: host, - port: this.port, - }); - - // Accept the connection - await channel.accept(connection); - channel.identity.body.tcpHost = channel.host; - channel.identity.body.tcpPort = this._tcpPort; - channel.allowed = this._allowed.has(host); - - this.channel(channel); - } catch (e) { - debug(e); - } - } - - _initUdpListener() { - // Default broadcast address - this._udp_address = Gio.InetSocketAddress.new_from_string( - '255.255.255.255', this.port); - - try { - this._udp6 = Gio.Socket.new(Gio.SocketFamily.IPV6, - Gio.SocketType.DATAGRAM, Gio.SocketProtocol.UDP); - this._udp6.set_broadcast(true); - - // Bind the socket - const inetAddr = Gio.InetAddress.new_any(Gio.SocketFamily.IPV6); - const sockAddr = Gio.InetSocketAddress.new(inetAddr, this.port); - this._udp6.bind(sockAddr, true); - - // Input stream - this._udp6_stream = new Gio.DataInputStream({ - base_stream: new GioUnix.InputStream({ - fd: this._udp6.fd, - close_fd: false, - }), - }); - - // Watch socket for incoming packets - this._udp6_source = this._udp6.create_source(GLib.IOCondition.IN, null); - this._udp6_source.set_callback(this._onIncomingIdentity.bind(this, this._udp6)); - this._udp6_source.attach(null); - } catch (e) { - this._udp6 = null; - } - - // Our IPv6 socket also supports IPv4; we're all done - if (this._udp6 && this._udp6.speaks_ipv4()) { - this._udp4 = null; - return; - } - - try { - this._udp4 = Gio.Socket.new(Gio.SocketFamily.IPV4, - Gio.SocketType.DATAGRAM, Gio.SocketProtocol.UDP); - this._udp4.set_broadcast(true); - - // Bind the socket - const inetAddr = Gio.InetAddress.new_any(Gio.SocketFamily.IPV4); - const sockAddr = Gio.InetSocketAddress.new(inetAddr, this.port); - this._udp4.bind(sockAddr, true); - - // Input stream - this._udp4_stream = new Gio.DataInputStream({ - base_stream: new GioUnix.InputStream({ - fd: this._udp4.fd, - close_fd: false, - }), - }); - - // Watch input socket for incoming packets - this._udp4_source = this._udp4.create_source(GLib.IOCondition.IN, null); - this._udp4_source.set_callback(this._onIncomingIdentity.bind(this, this._udp4)); - this._udp4_source.attach(null); - } catch (e) { - this._udp4 = null; - - // We failed to get either an IPv4 or IPv6 socket to bind - if (this._udp6 === null) - throw e; - } - } - - _onIncomingIdentity(socket) { - let host; - - // Try to peek the remote address - try { - host = socket.receive_message([], Gio.SocketMsgFlags.PEEK, null)[1] - .address.to_string(); - } catch (e) { - logError(e); - } - - // Whether or not we peeked the address, we need to read the packet - try { - let data; - - if (socket === this._udp6) - data = this._udp6_stream.read_line_utf8(null)[0]; - else - data = this._udp4_stream.read_line_utf8(null)[0]; - - // Discard the packet if we failed to peek the address - if (host === undefined) - return GLib.SOURCE_CONTINUE; - - const packet = new Core.Packet(data); - packet.body.tcpHost = host; - this._onIdentity(packet); - } catch (e) { - logError(e); - } - - return GLib.SOURCE_CONTINUE; - } - - async _onIdentity(packet) { - try { - // Bail if the deviceId is missing - if (!packet.body.hasOwnProperty('deviceId')) - return; - - // Silently ignore our own broadcasts - if (packet.body.deviceId === this.identity.body.deviceId) - return; - - debug(packet); - - // Create a new channel - const channel = new Channel({ - backend: this, - certificate: this.certificate, - host: packet.body.tcpHost, - port: packet.body.tcpPort, - identity: packet, - }); - - // Check if channel is already open with this address - if (this.channels.has(channel.address)) - return; - - this._channels.set(channel.address, channel); - - // Open a TCP connection - const address = Gio.InetSocketAddress.new_from_string( - packet.body.tcpHost, packet.body.tcpPort); - - const client = new Gio.SocketClient({enable_proxy: false}); - const connection = await client.connect_async(address, - this.cancellable); - - // Connect the channel and attach it to the device on success - await channel.open(connection); - - this.channel(channel); - } catch (e) { - logError(e); - } - } - - /** - * Broadcast an identity packet - * - * If @address is not %null it may specify an IPv4 or IPv6 address to send - * the identity packet directly to, otherwise it will be broadcast to the - * default address, 255.255.255.255. - * - * @param {string} [address] - An optional target IPv4 or IPv6 address - */ - broadcast(address = null) { - try { - if (!this._networkAvailable) - return; - - // Try to parse strings as : - if (typeof address === 'string') { - const [host, portstr] = address.split(':'); - const port = parseInt(portstr) || this.port; - address = Gio.InetSocketAddress.new_from_string(host, port); - } - - // If we succeed, remember this host - if (address instanceof Gio.InetSocketAddress) { - this._allowed.add(address.address.to_string()); - - // Broadcast to the network if no address is specified - } else { - debug('Broadcasting to LAN'); - address = this._udp_address; - } - - // Broadcast on each open socket - if (this._udp6 !== null) - this._udp6.send_to(address, this.identity.serialize(), null); - - if (this._udp4 !== null) - this._udp4.send_to(address, this.identity.serialize(), null); - } catch (e) { - debug(e, address); - } - } - - buildIdentity() { - // Chain-up, then add the TCP port - super.buildIdentity(); - this.identity.body.tcpPort = this._tcpPort; - } - - start() { - if (this.active) - return; - - // Ensure a certificate exists - if (this.certificate === null) - this._initCertificate(); - - // Start TCP/UDP listeners - try { - if (this._tcp === null) - this._initTcpListener(); - - if (this._udp4 === null && this._udp6 === null) - this._initUdpListener(); - } catch (e) { - // Known case of another application using the protocol defined port - if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.ADDRESS_IN_USE)) { - e.name = _('Port already in use'); - e.url = `${Config.PACKAGE_URL}/wiki/Error#port-already-in-use`; - } - - throw e; - } - - // Monitor network changes - if (this._networkChangedId === 0) { - this._networkAvailable = this._networkMonitor.network_available; - this._networkChangedId = this._networkMonitor.connect( - 'network-changed', this._onNetworkChanged.bind(this)); - } - - this._active = true; - this.notify('active'); - } - - stop() { - if (this._networkChangedId) { - this._networkMonitor.disconnect(this._networkChangedId); - this._networkChangedId = 0; - this._networkAvailable = false; - } - - if (this._tcp !== null) { - this._tcp.stop(); - this._tcp.close(); - this._tcp = null; - } - - if (this._udp6 !== null) { - this._udp6_source.destroy(); - this._udp6_stream.close(null); - this._udp6.close(); - this._udp6 = null; - } - - if (this._udp4 !== null) { - this._udp4_source.destroy(); - this._udp4_stream.close(null); - this._udp4.close(); - this._udp4 = null; - } - - for (const channel of this.channels.values()) - channel.close(); - - this._active = false; - this.notify('active'); - } - - destroy() { - try { - this.stop(); - } catch (e) { - debug(e); - } - } -}); - - -/** - * Lan Channel - * - * This class essentially just extends Core.Channel to set TCP socket options - * and negotiate TLS encrypted connections. - */ -export const Channel = GObject.registerClass({ - GTypeName: 'GSConnectLanChannel', -}, class LanChannel extends Core.Channel { - - _init(params) { - super._init(); - Object.assign(this, params); - } - - get address() { - return `lan://${this.host}:${this.port}`; - } - - get certificate() { - if (this._certificate === undefined) - this._certificate = null; - - return this._certificate; - } - - set certificate(certificate) { - this._certificate = certificate; - } - - get peer_certificate() { - if (this._connection instanceof Gio.TlsConnection) - return this._connection.get_peer_certificate(); - - return null; - } - - get host() { - if (this._host === undefined) - this._host = null; - - return this._host; - } - - set host(host) { - this._host = host; - } - - get port() { - if (this._port === undefined) { - if (this.identity && this.identity.body.tcpPort) - this._port = this.identity.body.tcpPort; - else - return PROTOCOL_PORT_DEFAULT; - } - - return this._port; - } - - set port(port) { - this._port = port; - } - - /** - * Authenticate a TLS connection. - * - * @param {Gio.TlsConnection} connection - A TLS connection - * @return {Promise} A promise for the operation - */ - async _authenticate(connection) { - // Standard TLS Handshake - connection.validation_flags = Gio.TlsCertificateFlags.EXPIRED; - connection.authentication_mode = Gio.TlsAuthenticationMode.REQUIRED; - - await connection.handshake_async(GLib.PRIORITY_DEFAULT, - this.cancellable); - - // Get a settings object for the device - let settings; - - if (this.device) { - settings = this.device.settings; - } else { - const id = this.identity.body.deviceId; - settings = new Gio.Settings({ - settings_schema: Config.GSCHEMA.lookup( - 'org.gnome.Shell.Extensions.GSConnect.Device', - true - ), - path: `/org/gnome/shell/extensions/gsconnect/device/${id}/`, - }); - } - - // If we have a certificate for this deviceId, we can verify it - const cert_pem = settings.get_string('certificate-pem'); - - if (cert_pem !== '') { - let certificate = null; - let verified = false; - - try { - certificate = Gio.TlsCertificate.new_from_pem(cert_pem, -1); - verified = certificate.is_same(connection.peer_certificate); - } catch (e) { - logError(e); - } - - /* The certificate is incorrect for one of two reasons, but both - * result in us resetting the certificate and unpairing the device. - * - * If the certificate failed to load, it is probably corrupted or - * otherwise invalid. In this case, if we try to continue we will - * certainly crash the Android app. - * - * If the certificate did not match what we expected the obvious - * thing to do is to notify the user, however experience tells us - * this is a result of the user doing something masochistic like - * nuking the Android app data or copying settings between machines. - */ - if (verified === false) { - if (this.device) { - this.device.unpair(); - } else { - settings.reset('paired'); - settings.reset('certificate-pem'); - } - - const name = this.identity.body.deviceName; - throw new Error(`${name}: Authentication Failure`); - } - } - - return connection; - } - - /** - * Wrap the connection in Gio.TlsClientConnection and initiate handshake - * - * @param {Gio.TcpConnection} connection - The unauthenticated connection - * @return {Gio.TlsClientConnection} The authenticated connection - */ - _encryptClient(connection) { - _configureSocket(connection); - - connection = Gio.TlsClientConnection.new(connection, - connection.socket.remote_address); - connection.set_certificate(this.certificate); - - return this._authenticate(connection); - } - - /** - * Wrap the connection in Gio.TlsServerConnection and initiate handshake - * - * @param {Gio.TcpConnection} connection - The unauthenticated connection - * @return {Gio.TlsServerConnection} The authenticated connection - */ - _encryptServer(connection) { - _configureSocket(connection); - - connection = Gio.TlsServerConnection.new(connection, this.certificate); - - // We're the server so we trust-on-first-use and verify after - const _id = connection.connect('accept-certificate', (connection) => { - connection.disconnect(_id); - return true; - }); - - return this._authenticate(connection); - } - - /** - * Negotiate an incoming connection - * - * @param {Gio.TcpConnection} connection - The incoming connection - */ - async accept(connection) { - debug(`${this.address} (${this.uuid})`); - - try { - this._connection = connection; - this.backend.channels.set(this.address, this); - - // In principle this disposable wrapper could buffer more than the - // identity packet, but in practice the remote device shouldn't send - // any more data until the TLS connection is negotiated. - const stream = new Gio.DataInputStream({ - base_stream: connection.input_stream, - close_base_stream: false, - }); - - const data = await stream.read_line_async(GLib.PRIORITY_DEFAULT, - this.cancellable); - stream.close_async(GLib.PRIORITY_DEFAULT, null, null); - - this.identity = new Core.Packet(data[0]); - - if (!this.identity.body.deviceId) - throw new Error('missing deviceId'); - - this._connection = await this._encryptClient(connection); - } catch (e) { - this.close(); - throw e; - } - } - - /** - * Negotiate an outgoing connection - * - * @param {Gio.SocketConnection} connection - The remote connection - */ - async open(connection) { - debug(`${this.address} (${this.uuid})`); - - try { - this._connection = connection; - this.backend.channels.set(this.address, this); - - await connection.get_output_stream().write_all_async( - this.backend.identity.serialize(), - GLib.PRIORITY_DEFAULT, - this.cancellable); - - this._connection = await this._encryptServer(connection); - } catch (e) { - this.close(); - throw e; - } - } - - /** - * Close all streams associated with this channel, silencing any errors - */ - close() { - if (this.closed) - return; - - debug(`${this.address} (${this.uuid})`); - this._closed = true; - this.notify('closed'); - - this.backend.channels.delete(this.address); - this.cancellable.cancel(); - - if (this._connection) - this._connection.close_async(GLib.PRIORITY_DEFAULT, null, null); - - if (this.input_stream) - this.input_stream.close_async(GLib.PRIORITY_DEFAULT, null, null); - - if (this.output_stream) - this.output_stream.close_async(GLib.PRIORITY_DEFAULT, null, null); - } - - async download(packet, target, cancellable = null) { - const address = Gio.InetSocketAddress.new_from_string(this.host, - packet.payloadTransferInfo.port); - - const client = new Gio.SocketClient({enable_proxy: false}); - const connection = await client.connect_async(address, cancellable) - .then(this._encryptClient.bind(this)); - - // Start the transfer - const transferredSize = await target.splice_async( - connection.input_stream, - (Gio.OutputStreamSpliceFlags.CLOSE_SOURCE | - Gio.OutputStreamSpliceFlags.CLOSE_TARGET), - GLib.PRIORITY_DEFAULT, cancellable); - - // If we get less than expected, we've certainly got corruption - if (transferredSize < packet.payloadSize) { - throw new Gio.IOErrorEnum({ - code: Gio.IOErrorEnum.FAILED, - message: `Incomplete: ${transferredSize}/${packet.payloadSize}`, - }); - - // TODO: sometimes kdeconnect-android under-reports a file's size - // https://github.com/GSConnect/gnome-shell-extension-gsconnect/issues/1157 - } else if (transferredSize > packet.payloadSize) { - logError(new Gio.IOErrorEnum({ - code: Gio.IOErrorEnum.FAILED, - message: `Extra Data: ${transferredSize - packet.payloadSize}`, - })); - } - } - - async upload(packet, source, size, cancellable = null) { - // Start listening on the first available port between 1739-1764 - const listener = new Gio.SocketListener(); - let port = TRANSFER_MIN; - - while (port <= TRANSFER_MAX) { - try { - listener.add_inet_port(port, null); - break; - } catch (e) { - if (port < TRANSFER_MAX) { - port++; - continue; - } else { - throw e; - } - } - } - - // Listen for the incoming connection - const acceptConnection = listener.accept_async(cancellable) - .then(result => this._encryptServer(result[0])); - - // Create an upload request - packet.body.payloadHash = this.checksum; - packet.payloadSize = size; - packet.payloadTransferInfo = {port: port}; - const requestUpload = this.sendPacket(new Core.Packet(packet), - cancellable); - - // Request an upload stream, accept the connection and get the output - const [, connection] = await Promise.all([requestUpload, - acceptConnection]); - - // Start the transfer - const transferredSize = await connection.output_stream.splice_async( - source, - (Gio.OutputStreamSpliceFlags.CLOSE_SOURCE | - Gio.OutputStreamSpliceFlags.CLOSE_TARGET), - GLib.PRIORITY_DEFAULT, cancellable); - - if (transferredSize !== size) { - throw new Gio.IOErrorEnum({ - code: Gio.IOErrorEnum.PARTIAL_INPUT, - message: 'Transfer incomplete', - }); - } - } - - async rejectTransfer(packet) { - try { - if (!packet || !packet.hasPayload()) - return; - - if (packet.payloadTransferInfo.port === undefined) - return; - - const address = Gio.InetSocketAddress.new_from_string(this.host, - packet.payloadTransferInfo.port); - - const client = new Gio.SocketClient({enable_proxy: false}); - const connection = await client.connect_async(address, null) - .then(this._encryptClient.bind(this)); - - connection.close_async(GLib.PRIORITY_DEFAULT, null, null); - } catch (e) { - debug(e, this.device.name); - } - } -}); - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/atspi.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/atspi.js deleted file mode 100644 index 97581d7a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/atspi.js +++ /dev/null @@ -1,312 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Atspi from 'gi://Atspi?version=2.0'; -import Gdk from 'gi://Gdk'; - - -/** - * Printable ASCII range - */ -const _ASCII = /[\x20-\x7E]/; - - -/** - * Modifier Keycode Defaults - */ -const XKeycode = { - Alt_L: 0x40, - Control_L: 0x25, - Shift_L: 0x32, - Super_L: 0x85, -}; - - -/** - * A thin wrapper around Atspi for X11 sessions without Pipewire support. - */ -export default class Controller { - constructor() { - // Atspi.init() return 2 on fail, but still marks itself as inited. We - // uninit before throwing an error otherwise any future call to init() - // will appear successful and other calls will cause GSConnect to exit. - // See: https://gitlab.gnome.org/GNOME/at-spi2-core/blob/master/atspi/atspi-misc.c - if (Atspi.init() === 2) { - this.destroy(); - throw new Error('Failed to start AT-SPI'); - } - - try { - this._display = Gdk.Display.get_default(); - this._seat = this._display.get_default_seat(); - this._pointer = this._seat.get_pointer(); - } catch (e) { - this.destroy(); - throw e; - } - - // Try to read modifier keycodes from Gdk - try { - const keymap = Gdk.Keymap.get_for_display(this._display); - let modifier; - - modifier = keymap.get_entries_for_keyval(Gdk.KEY_Alt_L)[1][0]; - XKeycode.Alt_L = modifier.keycode; - - modifier = keymap.get_entries_for_keyval(Gdk.KEY_Control_L)[1][0]; - XKeycode.Control_L = modifier.keycode; - - modifier = keymap.get_entries_for_keyval(Gdk.KEY_Shift_L)[1][0]; - XKeycode.Shift_L = modifier.keycode; - - modifier = keymap.get_entries_for_keyval(Gdk.KEY_Super_L)[1][0]; - XKeycode.Super_L = modifier.keycode; - } catch (e) { - debug('using default modifier keycodes'); - } - } - - /* - * Pointer events - */ - clickPointer(button) { - try { - const [, x, y] = this._pointer.get_position(); - const monitor = this._display.get_monitor_at_point(x, y); - const scale = monitor.get_scale_factor(); - Atspi.generate_mouse_event(scale * x, scale * y, `b${button}c`); - } catch (e) { - logError(e); - } - } - - doubleclickPointer(button) { - try { - const [, x, y] = this._pointer.get_position(); - const monitor = this._display.get_monitor_at_point(x, y); - const scale = monitor.get_scale_factor(); - Atspi.generate_mouse_event(scale * x, scale * y, `b${button}d`); - } catch (e) { - logError(e); - } - } - - movePointer(dx, dy) { - try { - const [, x, y] = this._pointer.get_position(); - const monitor = this._display.get_monitor_at_point(x, y); - const scale = monitor.get_scale_factor(); - Atspi.generate_mouse_event(scale * dx, scale * dy, 'rel'); - } catch (e) { - logError(e); - } - } - - pressPointer(button) { - try { - const [, x, y] = this._pointer.get_position(); - const monitor = this._display.get_monitor_at_point(x, y); - const scale = monitor.get_scale_factor(); - Atspi.generate_mouse_event(scale * x, scale * y, `b${button}p`); - } catch (e) { - logError(e); - } - } - - releasePointer(button) { - try { - const [, x, y] = this._pointer.get_position(); - const monitor = this._display.get_monitor_at_point(x, y); - const scale = monitor.get_scale_factor(); - Atspi.generate_mouse_event(scale * x, scale * y, `b${button}r`); - } catch (e) { - logError(e); - } - } - - scrollPointer(dx, dy) { - if (dy > 0) - this.clickPointer(4); - else if (dy < 0) - this.clickPointer(5); - } - - /* - * Phony virtual keyboard helpers - */ - _modeLock(keycode) { - Atspi.generate_keyboard_event( - keycode, - null, - Atspi.KeySynthType.PRESS - ); - } - - _modeUnlock(keycode) { - Atspi.generate_keyboard_event( - keycode, - null, - Atspi.KeySynthType.RELEASE - ); - } - - /* - * Simulate a printable-ASCII character. - * - */ - _pressASCII(key, modifiers) { - try { - // Press Modifiers - if (modifiers & Gdk.ModifierType.MOD1_MASK) - this._modeLock(XKeycode.Alt_L); - if (modifiers & Gdk.ModifierType.CONTROL_MASK) - this._modeLock(XKeycode.Control_L); - if (modifiers & Gdk.ModifierType.SHIFT_MASK) - this._modeLock(XKeycode.Shift_L); - if (modifiers & Gdk.ModifierType.SUPER_MASK) - this._modeLock(XKeycode.Super_L); - - Atspi.generate_keyboard_event( - 0, - key, - Atspi.KeySynthType.STRING - ); - - // Release Modifiers - if (modifiers & Gdk.ModifierType.MOD1_MASK) - this._modeUnlock(XKeycode.Alt_L); - if (modifiers & Gdk.ModifierType.CONTROL_MASK) - this._modeUnlock(XKeycode.Control_L); - if (modifiers & Gdk.ModifierType.SHIFT_MASK) - this._modeUnlock(XKeycode.Shift_L); - if (modifiers & Gdk.ModifierType.SUPER_MASK) - this._modeUnlock(XKeycode.Super_L); - } catch (e) { - logError(e); - } - } - - _pressKeysym(keysym, modifiers) { - try { - // Press Modifiers - if (modifiers & Gdk.ModifierType.MOD1_MASK) - this._modeLock(XKeycode.Alt_L); - if (modifiers & Gdk.ModifierType.CONTROL_MASK) - this._modeLock(XKeycode.Control_L); - if (modifiers & Gdk.ModifierType.SHIFT_MASK) - this._modeLock(XKeycode.Shift_L); - if (modifiers & Gdk.ModifierType.SUPER_MASK) - this._modeLock(XKeycode.Super_L); - - Atspi.generate_keyboard_event( - keysym, - null, - Atspi.KeySynthType.PRESSRELEASE | Atspi.KeySynthType.SYM - ); - - // Release Modifiers - if (modifiers & Gdk.ModifierType.MOD1_MASK) - this._modeUnlock(XKeycode.Alt_L); - if (modifiers & Gdk.ModifierType.CONTROL_MASK) - this._modeUnlock(XKeycode.Control_L); - if (modifiers & Gdk.ModifierType.SHIFT_MASK) - this._modeUnlock(XKeycode.Shift_L); - if (modifiers & Gdk.ModifierType.SUPER_MASK) - this._modeUnlock(XKeycode.Super_L); - } catch (e) { - logError(e); - } - } - - /** - * Simulate the composition of a unicode character with: - * Control+Shift+u, [hex], Return - * - * @param {number} key - An XKeycode - * @param {number} modifiers - A modifier mask - */ - _pressUnicode(key, modifiers) { - try { - if (modifiers > 0) - log('GSConnect: ignoring modifiers for unicode keyboard event'); - - // TODO: Using Control and Shift keysym is not working (it triggers - // key release). Probably using LOCKMODIFIERS will not work either - // as unlocking the modifier will not trigger a release - - // Activate compose sequence - this._modeLock(XKeycode.Control_L); - this._modeLock(XKeycode.Shift_L); - - this.pressreleaseKeysym(Gdk.KEY_U); - - this._modeUnlock(XKeycode.Control_L); - this._modeUnlock(XKeycode.Shift_L); - - // Enter the unicode sequence - const ucode = key.charCodeAt(0).toString(16); - let keysym; - - for (let h = 0, len = ucode.length; h < len; h++) { - keysym = Gdk.unicode_to_keyval(ucode.charAt(h).codePointAt(0)); - this.pressreleaseKeysym(keysym); - } - - // Finish the compose sequence - this.pressreleaseKeysym(Gdk.KEY_Return); - } catch (e) { - logError(e); - } - } - - /* - * Keyboard Events - */ - pressKeysym(keysym) { - Atspi.generate_keyboard_event( - keysym, - null, - Atspi.KeySynthType.PRESS | Atspi.KeySynthType.SYM - ); - } - - releaseKeysym(keysym) { - Atspi.generate_keyboard_event( - keysym, - null, - Atspi.KeySynthType.RELEASE | Atspi.KeySynthType.SYM - ); - } - - pressreleaseKeysym(keysym) { - Atspi.generate_keyboard_event( - keysym, - null, - Atspi.KeySynthType.PRESSRELEASE | Atspi.KeySynthType.SYM - ); - } - - pressKey(input, modifiers) { - // We were passed a keysym - if (typeof input === 'number') - this._pressKeysym(input, modifiers); - - // Regular ASCII - else if (_ASCII.test(input)) - this._pressASCII(input, modifiers); - - // Unicode - else - this._pressUnicode(input, modifiers); - } - - destroy() { - try { - Atspi.exit(); - } catch (e) { - // Silence errors - } - } -} - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/clipboard.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/clipboard.js deleted file mode 100644 index 2d6170c4..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/clipboard.js +++ /dev/null @@ -1,225 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gdk from 'gi://Gdk'; -import GLib from 'gi://GLib'; -import Gtk from 'gi://Gtk'; -import Gio from 'gi://Gio'; -import GObject from 'gi://GObject'; - - -const DBUS_NAME = 'org.gnome.Shell.Extensions.GSConnect.Clipboard'; -const DBUS_PATH = '/org/gnome/Shell/Extensions/GSConnect/Clipboard'; - - -/** - * The service class for this component - */ -const Clipboard = GObject.registerClass({ - GTypeName: 'GSConnectClipboard', - Properties: { - 'text': GObject.ParamSpec.string( - 'text', - 'Text Content', - 'The current text content of the clipboard', - GObject.ParamFlags.READWRITE, - '' - ), - }, -}, class Clipboard extends GObject.Object { - - _init() { - super._init(); - - this._cancellable = new Gio.Cancellable(); - this._clipboard = null; - - this._ownerChangeId = 0; - this._nameWatcherId = Gio.bus_watch_name( - Gio.BusType.SESSION, - DBUS_NAME, - Gio.BusNameWatcherFlags.NONE, - this._onNameAppeared.bind(this), - this._onNameVanished.bind(this) - ); - } - - get text() { - if (this._text === undefined) - this._text = ''; - - return this._text; - } - - set text(content) { - if (this.text === content) - return; - - this._text = content; - this.notify('text'); - - if (typeof content !== 'string') - return; - - if (this._clipboard instanceof Gtk.Clipboard) - this._clipboard.set_text(content, -1); - - if (this._clipboard instanceof Gio.DBusProxy) { - this._clipboard.call('SetText', new GLib.Variant('(s)', [content]), - Gio.DBusCallFlags.NO_AUTO_START, -1, this._cancellable) - .catch(debug); - } - } - - async _onNameAppeared(connection, name, name_owner) { - try { - // Cleanup the GtkClipboard - if (this._clipboard && this._ownerChangeId > 0) { - this._clipboard.disconnect(this._ownerChangeId); - this._ownerChangeId = 0; - } - - // Create a proxy for the remote clipboard - this._clipboard = new Gio.DBusProxy({ - g_bus_type: Gio.BusType.SESSION, - g_name: DBUS_NAME, - g_object_path: DBUS_PATH, - g_interface_name: DBUS_NAME, - g_flags: Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES, - }); - - await this._clipboard.init_async(GLib.PRIORITY_DEFAULT, - this._cancellable); - - this._ownerChangeId = this._clipboard.connect('g-signal', - this._onOwnerChange.bind(this)); - - this._onOwnerChange(); - if (!globalThis.HAVE_GNOME) { - // Directly subscrible signal - this.signalHandler = Gio.DBus.session.signal_subscribe( - DBUS_NAME, - DBUS_NAME, - 'OwnerChange', - DBUS_PATH, - null, - Gio.DBusSignalFlags.NONE, - this._onOwnerChange.bind(this) - ); - } - - } catch (e) { - if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) { - debug(e); - this._onNameVanished(null, null); - } - } - } - - _onNameVanished(connection, name) { - if (this._clipboard && this._ownerChangeId > 0) { - this._clipboard.disconnect(this._ownerChangeId); - this._clipboardChangedId = 0; - } - - const display = Gdk.Display.get_default(); - this._clipboard = Gtk.Clipboard.get_default(display); - - this._ownerChangeId = this._clipboard.connect('owner-change', - this._onOwnerChange.bind(this)); - - this._onOwnerChange(); - } - - async _onOwnerChange() { - try { - if (this._clipboard instanceof Gtk.Clipboard) - await this._gtkUpdateText(); - - else if (this._clipboard instanceof Gio.DBusProxy) - await this._proxyUpdateText(); - } catch (e) { - if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) - debug(e); - } - } - - _applyUpdate(text) { - if (typeof text !== 'string' || this.text === text) - return; - - this._text = text; - this.notify('text'); - } - - /* - * Proxy Clipboard - */ - async _proxyUpdateText() { - let reply = await this._clipboard.call('GetMimetypes', null, - Gio.DBusCallFlags.NO_AUTO_START, -1, this._cancellable); - const mimetypes = reply.deepUnpack()[0]; - - // Special case for a cleared clipboard - if (mimetypes.length === 0) - return this._applyUpdate(''); - - // Special case to ignore copied files - if (mimetypes.includes('text/uri-list')) - return; - - reply = await this._clipboard.call('GetText', null, - Gio.DBusCallFlags.NO_AUTO_START, -1, this._cancellable); - const text = reply.deepUnpack()[0]; - - this._applyUpdate(text); - } - - /* - * GtkClipboard - */ - async _gtkUpdateText() { - const mimetypes = await new Promise((resolve, reject) => { - this._clipboard.request_targets((clipboard, atoms) => resolve(atoms)); - }); - - // Special case for a cleared clipboard - if (mimetypes.length === 0) - return this._applyUpdate(''); - - // Special case to ignore copied files - if (mimetypes.includes('text/uri-list')) - return; - - const text = await new Promise((resolve, reject) => { - this._clipboard.request_text((clipboard, text) => resolve(text)); - }); - - this._applyUpdate(text); - } - - destroy() { - if (this._cancellable.is_cancelled()) - return; - - this._cancellable.cancel(); - - if (this._clipboard && this._ownerChangeId > 0) { - this._clipboard.disconnect(this._ownerChangeId); - this._ownerChangedId = 0; - } - - if (this._nameWatcherId > 0) { - Gio.bus_unwatch_name(this._nameWatcherId); - this._nameWatcherId = 0; - } - - if (!globalThis.HAVE_GNOME && this.signalHandler) - Gio.DBus.session.signal_unsubscribe(this.signalHandler); - } -}); - -export default Clipboard; - -// vim:tabstop=2:shiftwidth=2:expandtab diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/contacts.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/contacts.js deleted file mode 100644 index 3070f408..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/contacts.js +++ /dev/null @@ -1,613 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; - -import Config from '../../config.js'; - -let HAVE_EDS = true; -let EBook = null; -let EBookContacts = null; -let EDataServer = null; - -try { - EBook = (await import('gi://EBook')).default; - EBookContacts = (await import('gi://EBookContacts')).default; - EDataServer = (await import('gi://EDataServer')).default; -} catch (e) { - HAVE_EDS = false; -} - - -/** - * A store for contacts - */ -const Store = GObject.registerClass({ - GTypeName: 'GSConnectContactsStore', - Properties: { - 'context': GObject.ParamSpec.string( - 'context', - 'Context', - 'Used as the cache directory, relative to Config.CACHEDIR', - GObject.ParamFlags.CONSTRUCT_ONLY | GObject.ParamFlags.READWRITE, - null - ), - }, - Signals: { - 'contact-added': { - flags: GObject.SignalFlags.RUN_FIRST, - param_types: [GObject.TYPE_STRING], - }, - 'contact-removed': { - flags: GObject.SignalFlags.RUN_FIRST, - param_types: [GObject.TYPE_STRING], - }, - 'contact-changed': { - flags: GObject.SignalFlags.RUN_FIRST, - param_types: [GObject.TYPE_STRING], - }, - }, -}, class Store extends GObject.Object { - - _init(context = null) { - super._init({ - context: context, - }); - - this._cacheData = {}; - this._edsPrepared = false; - } - - /** - * Parse an EContact and add it to the store. - * - * @param {EBookContacts.Contact} econtact - an EContact to parse - * @param {string} [origin] - an optional origin string - */ - async _parseEContact(econtact, origin = 'desktop') { - try { - const contact = { - id: econtact.id, - name: _('Unknown Contact'), - numbers: [], - origin: origin, - timestamp: 0, - }; - - // Try to get a contact name - if (econtact.full_name) - contact.name = econtact.full_name; - - // Parse phone numbers - const nums = econtact.get_attributes(EBookContacts.ContactField.TEL); - - for (const attr of nums) { - const number = { - value: attr.get_value(), - type: 'unknown', - }; - - if (attr.has_type('CELL')) - number.type = 'cell'; - else if (attr.has_type('HOME')) - number.type = 'home'; - else if (attr.has_type('WORK')) - number.type = 'work'; - - contact.numbers.push(number); - } - - // Try and get a contact photo - const photo = econtact.photo; - - if (photo) { - if (photo.type === EBookContacts.ContactPhotoType.INLINED) { - const data = photo.get_inlined()[0]; - contact.avatar = await this.storeAvatar(data); - - } else if (photo.type === EBookContacts.ContactPhotoType.URI) { - const uri = econtact.photo.get_uri(); - contact.avatar = uri.replace('file://', ''); - } - } - - this.add(contact, false); - } catch (e) { - logError(e, `Failed to parse VCard contact ${econtact.id}`); - } - } - - /* - * AddressBook DBus callbacks - */ - _onObjectsAdded(connection, sender, path, iface, signal, params) { - try { - const adds = params.get_child_value(0).get_strv(); - - // NOTE: sequential pairs of vcard, id - for (let i = 0, len = adds.length; i < len; i += 2) { - try { - const vcard = adds[i]; - const econtact = EBookContacts.Contact.new_from_vcard(vcard); - this._parseEContact(econtact); - } catch (e) { - debug(e); - } - } - } catch (e) { - debug(e); - } - } - - _onObjectsRemoved(connection, sender, path, iface, signal, params) { - try { - const changes = params.get_child_value(0).get_strv(); - - for (const id of changes) { - try { - this.remove(id, false); - } catch (e) { - debug(e); - } - } - } catch (e) { - debug(e); - } - } - - _onObjectsModified(connection, sender, path, iface, signal, params) { - try { - const changes = params.get_child_value(0).get_strv(); - - // NOTE: sequential pairs of vcard, id - for (let i = 0, len = changes.length; i < len; i += 2) { - try { - const vcard = changes[i]; - const econtact = EBookContacts.Contact.new_from_vcard(vcard); - this._parseEContact(econtact); - } catch (e) { - debug(e); - } - } - } catch (e) { - debug(e); - } - } - - /* - * SourceRegistryWatcher callbacks - */ - async _onAppeared(watcher, source) { - try { - // Get an EBookClient and EBookView - const uid = source.get_uid(); - const client = await EBook.BookClient.connect(source, null); - const [view] = await client.get_view('exists "tel"', null); - - // Watch the view for changes to the address book - const connection = view.get_connection(); - const objectPath = view.get_object_path(); - - view._objectsAddedId = connection.signal_subscribe( - null, - 'org.gnome.evolution.dataserver.AddressBookView', - 'ObjectsAdded', - objectPath, - null, - Gio.DBusSignalFlags.NONE, - this._onObjectsAdded.bind(this) - ); - - view._objectsRemovedId = connection.signal_subscribe( - null, - 'org.gnome.evolution.dataserver.AddressBookView', - 'ObjectsRemoved', - objectPath, - null, - Gio.DBusSignalFlags.NONE, - this._onObjectsRemoved.bind(this) - ); - - view._objectsModifiedId = connection.signal_subscribe( - null, - 'org.gnome.evolution.dataserver.AddressBookView', - 'ObjectsModified', - objectPath, - null, - Gio.DBusSignalFlags.NONE, - this._onObjectsModified.bind(this) - ); - - view.start(); - - // Store the EBook in a map - this._ebooks.set(uid, { - source: source, - client: client, - view: view, - }); - } catch (e) { - debug(e); - } - } - - _onDisappeared(watcher, source) { - try { - const uid = source.get_uid(); - const ebook = this._ebooks.get(uid); - - if (ebook === undefined) - return; - - // Disconnect the EBookView - if (ebook.view) { - const connection = ebook.view.get_connection(); - connection.signal_unsubscribe(ebook.view._objectsAddedId); - connection.signal_unsubscribe(ebook.view._objectsRemovedId); - connection.signal_unsubscribe(ebook.view._objectsModifiedId); - - ebook.view.stop(); - } - - this._ebooks.delete(uid); - } catch (e) { - debug(e); - } - } - - async _initEvolutionDataServer() { - try { - if (this._edsPrepared) - return; - - this._edsPrepared = true; - this._ebooks = new Map(); - - // Get the current EBooks - const registry = await this._getESourceRegistry(); - - for (const source of registry.list_sources('Address Book')) - await this._onAppeared(null, source); - - // Watch for new and removed sources - this._watcher = new EDataServer.SourceRegistryWatcher({ - registry: registry, - extension_name: 'Address Book', - }); - - this._appearedId = this._watcher.connect( - 'appeared', - this._onAppeared.bind(this) - ); - this._disappearedId = this._watcher.connect( - 'disappeared', - this._onDisappeared.bind(this) - ); - } catch (e) { - const service = Gio.Application.get_default(); - - if (service !== null) - service.notify_error(e); - else - logError(e); - } - } - - *[Symbol.iterator]() { - const contacts = Object.values(this._cacheData); - - for (let i = 0, len = contacts.length; i < len; i++) - yield contacts[i]; - } - - get contacts() { - return Object.values(this._cacheData); - } - - get context() { - if (this._context === undefined) - this._context = null; - - return this._context; - } - - set context(context) { - this._context = context; - this._cacheDir = Gio.File.new_for_path(Config.CACHEDIR); - - if (context !== null) - this._cacheDir = this._cacheDir.get_child(context); - - GLib.mkdir_with_parents(this._cacheDir.get_path(), 448); - this._cacheFile = this._cacheDir.get_child('contacts.json'); - } - - /** - * Save a Uint8Array to file and return the path - * - * @param {Uint8Array} contents - An image byte array - * @return {string|undefined} File path or %undefined on failure - */ - async storeAvatar(contents) { - const md5 = GLib.compute_checksum_for_data(GLib.ChecksumType.MD5, - contents); - const file = this._cacheDir.get_child(`${md5}`); - - if (!file.query_exists(null)) { - try { - await file.replace_contents_bytes_async( - new GLib.Bytes(contents), - null, false, Gio.FileCreateFlags.REPLACE_DESTINATION, null); - } catch (e) { - debug(e, 'Storing avatar'); - return undefined; - } - } - - return file.get_path(); - } - - /** - * Query the Store for a contact by name and/or number. - * - * @param {Object} query - A query object - * @param {string} [query.name] - The contact's name - * @param {string} query.number - The contact's number - * @return {Object} A contact object - */ - query(query) { - // First look for an existing contact by number - const contacts = this.contacts; - const matches = []; - const qnumber = query.number.toPhoneNumber(); - - for (let i = 0, len = contacts.length; i < len; i++) { - const contact = contacts[i]; - - for (const num of contact.numbers) { - const cnumber = num.value.toPhoneNumber(); - - if (qnumber.endsWith(cnumber) || cnumber.endsWith(qnumber)) { - // If no query name or exact match, return immediately - if (!query.name || query.name === contact.name) - return contact; - - // Otherwise we might find an exact name match that shares - // the number with another contact - matches.push(contact); - } - } - } - - // Return the first match (pretty much what Android does) - if (matches.length > 0) - return matches[0]; - - // No match; return a mock contact with a unique ID - let id = GLib.uuid_string_random(); - - while (this._cacheData.hasOwnProperty(id)) - id = GLib.uuid_string_random(); - - return { - id: id, - name: query.name || query.number, - numbers: [{value: query.number, type: 'unknown'}], - origin: 'gsconnect', - }; - } - - get_contact(position) { - if (this._cacheData[position] !== undefined) - return this._cacheData[position]; - - return null; - } - - /** - * Add a contact, checking for validity - * - * @param {Object} contact - A contact object - * @param {boolean} write - Write to disk - */ - add(contact, write = true) { - // Ensure the contact has a unique id - if (!contact.id) { - let id = GLib.uuid_string_random(); - - while (this._cacheData[id]) - id = GLib.uuid_string_random(); - - contact.id = id; - } - - // Ensure the contact has an origin - if (!contact.origin) - contact.origin = 'gsconnect'; - - // This is an updated contact - if (this._cacheData[contact.id]) { - this._cacheData[contact.id] = contact; - this.emit('contact-changed', contact.id); - - // This is a new contact - } else { - this._cacheData[contact.id] = contact; - this.emit('contact-added', contact.id); - } - - // Write if requested - if (write) - this.save(); - } - - /** - * Remove a contact by id - * - * @param {string} id - The id of the contact to delete - * @param {boolean} write - Write to disk - */ - remove(id, write = true) { - // Only remove if the contact actually exists - if (this._cacheData[id]) { - delete this._cacheData[id]; - this.emit('contact-removed', id); - - // Write if requested - if (write) - this.save(); - } - } - - /** - * Lookup a contact for each address object in @addresses and return a - * dictionary of address (eg. phone number) to contact object. - * - * { "555-5555": { "name": "...", "numbers": [], ... } } - * - * @param {Object[]} addresses - A list of address objects - * @return {Object} A dictionary of phone numbers and contacts - */ - lookupAddresses(addresses) { - const contacts = {}; - - // Lookup contacts for each address - for (let i = 0, len = addresses.length; i < len; i++) { - const address = addresses[i].address; - - contacts[address] = this.query({ - number: address, - }); - } - - return contacts; - } - - async clear() { - try { - const contacts = this.contacts; - - for (let i = 0, len = contacts.length; i < len; i++) - await this.remove(contacts[i].id, false); - - await this.save(); - } catch (e) { - debug(e); - } - } - - /** - * Update the contact store from a dictionary of our custom contact objects. - * - * @param {Object} json - an Object of contact Objects - */ - async update(json = {}) { - try { - let contacts = Object.values(json); - - for (let i = 0, len = contacts.length; i < len; i++) { - const new_contact = contacts[i]; - const contact = this._cacheData[new_contact.id]; - - if (!contact || new_contact.timestamp !== contact.timestamp) - await this.add(new_contact, false); - } - - // Prune contacts - contacts = this.contacts; - - for (let i = 0, len = contacts.length; i < len; i++) { - const contact = contacts[i]; - - if (!json[contact.id]) - await this.remove(contact.id, false); - } - - await this.save(); - } catch (e) { - debug(e, 'Updating contacts'); - } - } - - /** - * Fetch and update the contact store from its source. - * - * The default function initializes the EDS server, or logs a debug message - * if EDS is unavailable. Derived classes should request an update from the - * remote source. - */ - async fetch() { - try { - if (this.context === null && HAVE_EDS) - await this._initEvolutionDataServer(); - else - throw new Error('Evolution Data Server not available'); - } catch (e) { - debug(e); - } - } - - /** - * Load the contacts from disk. - */ - async load() { - try { - const [contents] = await this._cacheFile.load_contents_async(null); - this._cacheData = JSON.parse(new TextDecoder().decode(contents)); - } catch (e) { - debug(e); - } finally { - this.notify('context'); - } - } - - /** - * Save the contacts to disk. - */ - async save() { - // EDS is handling storage - if (this.context === null && HAVE_EDS) - return; - - if (this.__cache_lock) { - this.__cache_queue = true; - return; - } - - try { - this.__cache_lock = true; - - const contents = new GLib.Bytes(JSON.stringify(this._cacheData, null, 2)); - await this._cacheFile.replace_contents_bytes_async(contents, null, - false, Gio.FileCreateFlags.REPLACE_DESTINATION, null); - } catch (e) { - debug(e); - } finally { - this.__cache_lock = false; - - if (this.__cache_queue) { - this.__cache_queue = false; - this.save(); - } - } - } - - destroy() { - if (this._watcher !== undefined) { - this._watcher.disconnect(this._appearedId); - this._watcher.disconnect(this._disappearedId); - this._watcher = undefined; - - for (const ebook of this._ebooks.values()) - this._onDisappeared(null, ebook.source); - - this._edsPrepared = false; - } - } -}); - -export default Store; - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/index.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/index.js deleted file mode 100644 index 249c7ee8..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/index.js +++ /dev/null @@ -1,102 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import * as atspi from './atspi.js'; -import * as clipboard from './clipboard.js'; -import * as contacts from './contacts.js'; -import * as input from './input.js'; -import * as mpris from './mpris.js'; -import * as notification from './notification.js'; -import * as pulseaudio from './pulseaudio.js'; -import * as session from './session.js'; -import * as sound from './sound.js'; -import * as upower from './upower.js'; -import * as ydotool from './ydotool.js'; - -export const functionOverrides = {}; - -const components = { - atspi, - clipboard, - contacts, - input, - mpris, - notification, - pulseaudio, - session, - sound, - upower, - ydotool, -}; - -/* - * Singleton Tracker - */ -const Default = new Map(); - - -/** - * Acquire a reference to a component. Calls to this function should always be - * followed by a call to `release()`. - * - * @param {string} name - The module name - * @return {*} The default instance of a component - */ -export function acquire(name) { - if (functionOverrides.acquire) - return functionOverrides.acquire(name); - - let component; - - try { - let info = Default.get(name); - - if (info === undefined) { - const module = components[name]; - - info = { - instance: new module.default(), - refcount: 0, - }; - - Default.set(name, info); - } - - info.refcount++; - component = info.instance; - } catch (e) { - debug(e, name); - } - - return component; -} - - -/** - * Release a reference on a component. If the caller was the last reference - * holder, the component will be freed. - * - * @param {string} name - The module name - * @return {null} A %null value, useful for overriding a traced variable - */ -export function release(name) { - if (functionOverrides.release) - return functionOverrides.release(name); - - try { - const info = Default.get(name); - - if (info.refcount === 1) { - info.instance.destroy(); - Default.delete(name); - } - - info.refcount--; - } catch (e) { - debug(e, name); - } - - return null; -} - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/input.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/input.js deleted file mode 100644 index 49fd65f9..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/input.js +++ /dev/null @@ -1,514 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gdk from 'gi://Gdk'; -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; - -import AtspiController from './atspi.js'; - - -const SESSION_TIMEOUT = 15; - - -const RemoteSession = GObject.registerClass({ - GTypeName: 'GSConnectRemoteSession', - Implements: [Gio.DBusInterface], - Signals: { - 'closed': { - flags: GObject.SignalFlags.RUN_FIRST, - }, - }, -}, class RemoteSession extends Gio.DBusProxy { - - _init(objectPath) { - super._init({ - g_bus_type: Gio.BusType.SESSION, - g_name: 'org.gnome.Mutter.RemoteDesktop', - g_object_path: objectPath, - g_interface_name: 'org.gnome.Mutter.RemoteDesktop.Session', - g_flags: Gio.DBusProxyFlags.NONE, - }); - - this._started = false; - } - - vfunc_g_signal(sender_name, signal_name, parameters) { - if (signal_name === 'Closed') - this.emit('closed'); - } - - _call(name, parameters = null) { - if (!this._started) - return; - - // Pass a null callback to allow this call to finish itself - this.call(name, parameters, Gio.DBusCallFlags.NONE, -1, null, null); - } - - get session_id() { - try { - return this.get_cached_property('SessionId').unpack(); - } catch (e) { - return null; - } - } - - async start() { - try { - if (this._started) - return; - - // Initialize the proxy, and start the session - await this.init_async(GLib.PRIORITY_DEFAULT, null); - await this.call('Start', null, Gio.DBusCallFlags.NONE, -1, null); - - this._started = true; - } catch (e) { - this.destroy(); - - Gio.DBusError.strip_remote_error(e); - throw e; - } - } - - stop() { - if (this._started) { - this._started = false; - - // Pass a null callback to allow this call to finish itself - this.call('Stop', null, Gio.DBusCallFlags.NONE, -1, null, null); - } - } - - _translateButton(button) { - switch (button) { - case Gdk.BUTTON_PRIMARY: - return 0x110; - - case Gdk.BUTTON_MIDDLE: - return 0x112; - - case Gdk.BUTTON_SECONDARY: - return 0x111; - - case 4: - return 0; // FIXME - - case 5: - return 0x10F; // up - } - } - - movePointer(dx, dy) { - this._call( - 'NotifyPointerMotionRelative', - GLib.Variant.new('(dd)', [dx, dy]) - ); - } - - pressPointer(button) { - button = this._translateButton(button); - - this._call( - 'NotifyPointerButton', - GLib.Variant.new('(ib)', [button, true]) - ); - } - - releasePointer(button) { - button = this._translateButton(button); - - this._call( - 'NotifyPointerButton', - GLib.Variant.new('(ib)', [button, false]) - ); - } - - clickPointer(button) { - button = this._translateButton(button); - - this._call( - 'NotifyPointerButton', - GLib.Variant.new('(ib)', [button, true]) - ); - - this._call( - 'NotifyPointerButton', - GLib.Variant.new('(ib)', [button, false]) - ); - } - - doubleclickPointer(button) { - this.clickPointer(button); - this.clickPointer(button); - } - - scrollPointer(dx, dy) { - if (dy > 0) { - this._call( - 'NotifyPointerAxisDiscrete', - GLib.Variant.new('(ui)', [Gdk.ScrollDirection.UP, 1]) - ); - } else if (dy < 0) { - this._call( - 'NotifyPointerAxisDiscrete', - GLib.Variant.new('(ui)', [Gdk.ScrollDirection.UP, -1]) - ); - } - } - - /* - * Keyboard Events - */ - pressKeysym(keysym) { - this._call( - 'NotifyKeyboardKeysym', - GLib.Variant.new('(ub)', [keysym, true]) - ); - } - - releaseKeysym(keysym) { - this._call( - 'NotifyKeyboardKeysym', - GLib.Variant.new('(ub)', [keysym, false]) - ); - } - - pressreleaseKeysym(keysym) { - this._call( - 'NotifyKeyboardKeysym', - GLib.Variant.new('(ub)', [keysym, true]) - ); - this._call( - 'NotifyKeyboardKeysym', - GLib.Variant.new('(ub)', [keysym, false]) - ); - } - - /* - * High-level keyboard input - */ - pressKey(input, modifiers) { - // Press Modifiers - if (modifiers & Gdk.ModifierType.MOD1_MASK) - this.pressKeysym(Gdk.KEY_Alt_L); - if (modifiers & Gdk.ModifierType.CONTROL_MASK) - this.pressKeysym(Gdk.KEY_Control_L); - if (modifiers & Gdk.ModifierType.SHIFT_MASK) - this.pressKeysym(Gdk.KEY_Shift_L); - if (modifiers & Gdk.ModifierType.SUPER_MASK) - this.pressKeysym(Gdk.KEY_Super_L); - - if (typeof input === 'string') { - const keysym = Gdk.unicode_to_keyval(input.codePointAt(0)); - this.pressreleaseKeysym(keysym); - } else { - this.pressreleaseKeysym(input); - } - - // Release Modifiers - if (modifiers & Gdk.ModifierType.MOD1_MASK) - this.releaseKeysym(Gdk.KEY_Alt_L); - if (modifiers & Gdk.ModifierType.CONTROL_MASK) - this.releaseKeysym(Gdk.KEY_Control_L); - if (modifiers & Gdk.ModifierType.SHIFT_MASK) - this.releaseKeysym(Gdk.KEY_Shift_L); - if (modifiers & Gdk.ModifierType.SUPER_MASK) - this.releaseKeysym(Gdk.KEY_Super_L); - } - - destroy() { - if (this.__disposed === undefined) { - this.__disposed = true; - GObject.signal_handlers_destroy(this); - } - } -}); - - -export default class Controller { - constructor() { - this._nameAppearedId = 0; - this._session = null; - this._sessionCloseId = 0; - this._sessionExpiry = 0; - this._sessionExpiryId = 0; - this._sessionStarting = false; - - // Watch for the RemoteDesktop portal - this._nameWatcherId = Gio.bus_watch_name( - Gio.BusType.SESSION, - 'org.gnome.Mutter.RemoteDesktop', - Gio.BusNameWatcherFlags.NONE, - this._onNameAppeared.bind(this), - this._onNameVanished.bind(this) - ); - } - - get connection() { - if (this._connection === undefined) - this._connection = null; - - return this._connection; - } - - _onNameAppeared(connection, name, name_owner) { - try { - this._connection = connection; - } catch (e) { - logError(e); - } - } - - _onNameVanished(connection, name) { - try { - if (this._session !== null) - this._onSessionClosed(this._session); - } catch (e) { - logError(e); - } - } - - _onSessionClosed(session) { - // Disconnect from the session - if (this._sessionClosedId > 0) { - session.disconnect(this._sessionClosedId); - this._sessionClosedId = 0; - } - - // Destroy the session - session.destroy(); - this._session = null; - } - - _onSessionExpired() { - // If the session has been used recently, schedule a new expiry - const remainder = Math.floor(this._sessionExpiry - (Date.now() / 1000)); - - if (remainder > 0) { - this._sessionExpiryId = GLib.timeout_add_seconds( - GLib.PRIORITY_DEFAULT, - remainder, - this._onSessionExpired.bind(this) - ); - - return GLib.SOURCE_REMOVE; - } - - // Otherwise if there's an active session, close it - if (this._session !== null) - this._session.stop(); - - // Reset the GSource Id - this._sessionExpiryId = 0; - - return GLib.SOURCE_REMOVE; - } - - async _createRemoteDesktopSession() { - if (this.connection === null) - return Promise.reject(new Error('No DBus connection')); - - const reply = await this.connection.call( - 'org.gnome.Mutter.RemoteDesktop', - '/org/gnome/Mutter/RemoteDesktop', - 'org.gnome.Mutter.RemoteDesktop', - 'CreateSession', - null, - null, - Gio.DBusCallFlags.NONE, - -1, - null); - - return reply.deepUnpack()[0]; - } - - async _ensureAdapter() { - try { - // Update the timestamp of the last event - this._sessionExpiry = Math.floor((Date.now() / 1000) + SESSION_TIMEOUT); - - // Session is active - if (this._session !== null) - return; - - // Mutter's RemoteDesktop is not available, fall back to Atspi - if (this.connection === null) { - debug('Falling back to Atspi'); - - this._session = new AtspiController(); - - // Mutter is available and there isn't another session starting - } else if (this._sessionStarting === false) { - this._sessionStarting = true; - - debug('Creating Mutter RemoteDesktop session'); - - // This takes three steps: creating the remote desktop session, - // starting the session, and creating a screencast session for - // the remote desktop session. - const objectPath = await this._createRemoteDesktopSession(); - - this._session = new RemoteSession(objectPath); - await this._session.start(); - - // Watch for the session ending - this._sessionClosedId = this._session.connect( - 'closed', - this._onSessionClosed.bind(this) - ); - - if (this._sessionExpiryId === 0) { - this._sessionExpiryId = GLib.timeout_add_seconds( - GLib.PRIORITY_DEFAULT, - SESSION_TIMEOUT, - this._onSessionExpired.bind(this) - ); - } - - this._sessionStarting = false; - } - } catch (e) { - logError(e); - - if (this._session !== null) { - this._session.destroy(); - this._session = null; - } - - this._sessionStarting = false; - } - } - - /* - * Pointer Events - */ - movePointer(dx, dy) { - try { - if (dx === 0 && dy === 0) - return; - - this._ensureAdapter(); - this._session.movePointer(dx, dy); - } catch (e) { - debug(e); - } - } - - pressPointer(button) { - try { - this._ensureAdapter(); - this._session.pressPointer(button); - } catch (e) { - debug(e); - } - } - - releasePointer(button) { - try { - this._ensureAdapter(); - this._session.releasePointer(button); - } catch (e) { - debug(e); - } - } - - clickPointer(button) { - try { - this._ensureAdapter(); - this._session.clickPointer(button); - } catch (e) { - debug(e); - } - } - - doubleclickPointer(button) { - try { - this._ensureAdapter(); - this._session.doubleclickPointer(button); - } catch (e) { - debug(e); - } - } - - scrollPointer(dx, dy) { - if (dx === 0 && dy === 0) - return; - - try { - this._ensureAdapter(); - this._session.scrollPointer(dx, dy); - } catch (e) { - debug(e); - } - } - - /* - * Keyboard Events - */ - pressKeysym(keysym) { - try { - this._ensureAdapter(); - this._session.pressKeysym(keysym); - } catch (e) { - debug(e); - } - } - - releaseKeysym(keysym) { - try { - this._ensureAdapter(); - this._session.releaseKeysym(keysym); - } catch (e) { - debug(e); - } - } - - pressreleaseKeysym(keysym) { - try { - this._ensureAdapter(); - this._session.pressreleaseKeysym(keysym); - } catch (e) { - debug(e); - } - } - - /* - * High-level keyboard input - */ - pressKeys(input, modifiers) { - try { - this._ensureAdapter(); - - if (typeof input === 'string') { - for (let i = 0; i < input.length; i++) - this._session.pressKey(input[i], modifiers); - } else { - this._session.pressKey(input, modifiers); - } - } catch (e) { - debug(e); - } - } - - destroy() { - if (this._session !== null) { - // Disconnect from the session - if (this._sessionClosedId > 0) { - this._session.disconnect(this._sessionClosedId); - this._sessionClosedId = 0; - } - - this._session.destroy(); - this._session = null; - } - - if (this._nameWatcherId > 0) { - Gio.bus_unwatch_name(this._nameWatcherId); - this._nameWatcherId = 0; - } - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/mpris.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/mpris.js deleted file mode 100644 index 70c42255..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/mpris.js +++ /dev/null @@ -1,1003 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; - - -export const Player = GObject.registerClass({ - GTypeName: 'GSConnectMediaPlayerInterface', - Properties: { - // Application Properties - 'CanQuit': GObject.ParamSpec.boolean( - 'CanQuit', - 'Can Quit', - 'Whether the client can call the Quit method.', - GObject.ParamFlags.READABLE, - false - ), - 'Fullscreen': GObject.ParamSpec.boolean( - 'Fullscreen', - 'Fullscreen', - 'Whether the player is in fullscreen mode.', - GObject.ParamFlags.READWRITE, - false - ), - 'CanSetFullscreen': GObject.ParamSpec.boolean( - 'CanSetFullscreen', - 'Can Set Fullscreen', - 'Whether the client can set the Fullscreen property.', - GObject.ParamFlags.READABLE, - false - ), - 'CanRaise': GObject.ParamSpec.boolean( - 'CanRaise', - 'Can Raise', - 'Whether the client can call the Raise method.', - GObject.ParamFlags.READABLE, - false - ), - 'HasTrackList': GObject.ParamSpec.boolean( - 'HasTrackList', - 'Has Track List', - 'Whether the player has a track list.', - GObject.ParamFlags.READABLE, - false - ), - 'Identity': GObject.ParamSpec.string( - 'Identity', - 'Identity', - 'The application name.', - GObject.ParamFlags.READABLE, - null - ), - 'DesktopEntry': GObject.ParamSpec.string( - 'DesktopEntry', - 'DesktopEntry', - 'The basename of an installed .desktop file.', - GObject.ParamFlags.READABLE, - null - ), - 'SupportedUriSchemes': GObject.param_spec_variant( - 'SupportedUriSchemes', - 'Supported URI Schemes', - 'The URI schemes supported by the media player.', - new GLib.VariantType('as'), - null, - GObject.ParamFlags.READABLE - ), - 'SupportedMimeTypes': GObject.param_spec_variant( - 'SupportedMimeTypes', - 'Supported MIME Types', - 'The mime-types supported by the media player.', - new GLib.VariantType('as'), - null, - GObject.ParamFlags.READABLE - ), - - // Player Properties - 'PlaybackStatus': GObject.ParamSpec.string( - 'PlaybackStatus', - 'Playback Status', - 'The current playback status.', - GObject.ParamFlags.READABLE, - null - ), - 'LoopStatus': GObject.ParamSpec.string( - 'LoopStatus', - 'Loop Status', - 'The current loop status.', - GObject.ParamFlags.READWRITE, - null - ), - 'Rate': GObject.ParamSpec.double( - 'Rate', - 'Rate', - 'The current playback rate.', - GObject.ParamFlags.READWRITE, - 0.0, 1.0, - 1.0 - ), - 'MinimumRate': GObject.ParamSpec.double( - 'MinimumRate', - 'Minimum Rate', - 'The minimum playback rate.', - GObject.ParamFlags.READWRITE, - 0.0, 1.0, - 1.0 - ), - 'MaximimRate': GObject.ParamSpec.double( - 'MaximumRate', - 'Maximum Rate', - 'The maximum playback rate.', - GObject.ParamFlags.READWRITE, - 0.0, 1.0, - 1.0 - ), - 'Shuffle': GObject.ParamSpec.boolean( - 'Shuffle', - 'Shuffle', - 'Whether track changes are linear.', - GObject.ParamFlags.READWRITE, - null - ), - 'Metadata': GObject.param_spec_variant( - 'Metadata', - 'Metadata', - 'The metadata of the current element.', - new GLib.VariantType('a{sv}'), - null, - GObject.ParamFlags.READABLE - ), - 'Volume': GObject.ParamSpec.double( - 'Volume', - 'Volume', - 'The volume level.', - GObject.ParamFlags.READWRITE, - 0.0, 1.0, - 1.0 - ), - 'Position': GObject.ParamSpec.int64( - 'Position', - 'Position', - 'The current track position in microseconds.', - GObject.ParamFlags.READABLE, - 0, Number.MAX_SAFE_INTEGER, - 0 - ), - 'CanGoNext': GObject.ParamSpec.boolean( - 'CanGoNext', - 'Can Go Next', - 'Whether the client can call the Next method.', - GObject.ParamFlags.READABLE, - false - ), - 'CanGoPrevious': GObject.ParamSpec.boolean( - 'CanGoPrevious', - 'Can Go Previous', - 'Whether the client can call the Previous method.', - GObject.ParamFlags.READABLE, - false - ), - 'CanPlay': GObject.ParamSpec.boolean( - 'CanPlay', - 'Can Play', - 'Whether playback can be started using Play or PlayPause.', - GObject.ParamFlags.READABLE, - false - ), - 'CanPause': GObject.ParamSpec.boolean( - 'CanPause', - 'Can Pause', - 'Whether playback can be paused using Play or PlayPause.', - GObject.ParamFlags.READABLE, - false - ), - 'CanSeek': GObject.ParamSpec.boolean( - 'CanSeek', - 'Can Seek', - 'Whether the client can control the playback position using Seek and SetPosition.', - GObject.ParamFlags.READABLE, - false - ), - 'CanControl': GObject.ParamSpec.boolean( - 'CanControl', - 'Can Control', - 'Whether the media player may be controlled over this interface.', - GObject.ParamFlags.READABLE, - false - ), - }, - Signals: { - 'Seeked': { - flags: GObject.SignalFlags.RUN_FIRST, - param_types: [GObject.TYPE_INT64], - }, - }, -}, class Player extends GObject.Object { - - /* - * The org.mpris.MediaPlayer2 Interface - */ - get CanQuit() { - if (this._CanQuit === undefined) - this._CanQuit = false; - - return this._CanQuit; - } - - get CanRaise() { - if (this._CanRaise === undefined) - this._CanRaise = false; - - return this._CanRaise; - } - - get CanSetFullscreen() { - if (this._CanFullscreen === undefined) - this._CanFullscreen = false; - - return this._CanFullscreen; - } - - get DesktopEntry() { - if (this._DesktopEntry === undefined) - return 'org.gnome.Shell.Extensions.GSConnect'; - - return this._DesktopEntry; - } - - get Fullscreen() { - if (this._Fullscreen === undefined) - this._Fullscreen = false; - - return this._Fullscreen; - } - - set Fullscreen(mode) { - if (this.Fullscreen === mode) - return; - - this._Fullscreen = mode; - this.notify('Fullscreen'); - } - - get HasTrackList() { - if (this._HasTrackList === undefined) - this._HasTrackList = false; - - return this._HasTrackList; - } - - get Identity() { - if (this._Identity === undefined) - this._Identity = ''; - - return this._Identity; - } - - get SupportedMimeTypes() { - if (this._SupportedMimeTypes === undefined) - this._SupportedMimeTypes = []; - - return this._SupportedMimeTypes; - } - - get SupportedUriSchemes() { - if (this._SupportedUriSchemes === undefined) - this._SupportedUriSchemes = []; - - return this._SupportedUriSchemes; - } - - Quit() { - throw new GObject.NotImplementedError(); - } - - Raise() { - throw new GObject.NotImplementedError(); - } - - /* - * The org.mpris.MediaPlayer2.Player Interface - */ - get CanControl() { - if (this._CanControl === undefined) - this._CanControl = false; - - return this._CanControl; - } - - get CanGoNext() { - if (this._CanGoNext === undefined) - this._CanGoNext = false; - - return this._CanGoNext; - } - - get CanGoPrevious() { - if (this._CanGoPrevious === undefined) - this._CanGoPrevious = false; - - return this._CanGoPrevious; - } - - get CanPause() { - if (this._CanPause === undefined) - this._CanPause = false; - - return this._CanPause; - } - - get CanPlay() { - if (this._CanPlay === undefined) - this._CanPlay = false; - - return this._CanPlay; - } - - get CanSeek() { - if (this._CanSeek === undefined) - this._CanSeek = false; - - return this._CanSeek; - } - - get LoopStatus() { - if (this._LoopStatus === undefined) - this._LoopStatus = 'None'; - - return this._LoopStatus; - } - - set LoopStatus(status) { - if (this.LoopStatus === status) - return; - - this._LoopStatus = status; - this.notify('LoopStatus'); - } - - get MaximumRate() { - if (this._MaximumRate === undefined) - this._MaximumRate = 1.0; - - return this._MaximumRate; - } - - get Metadata() { - if (this._Metadata === undefined) { - this._Metadata = { - 'xesam:artist': [_('Unknown')], - 'xesam:album': _('Unknown'), - 'xesam:title': _('Unknown'), - 'mpris:length': 0, - }; - } - - return this._Metadata; - } - - get MinimumRate() { - if (this._MinimumRate === undefined) - this._MinimumRate = 1.0; - - return this._MinimumRate; - } - - get PlaybackStatus() { - if (this._PlaybackStatus === undefined) - this._PlaybackStatus = 'Stopped'; - - return this._PlaybackStatus; - } - - get Position() { - if (this._Position === undefined) - this._Position = 0; - - return this._Position; - } - - get Rate() { - if (this._Rate === undefined) - this._Rate = 1.0; - - return this._Rate; - } - - set Rate(rate) { - if (this.Rate === rate) - return; - - this._Rate = rate; - this.notify('Rate'); - } - - get Shuffle() { - if (this._Shuffle === undefined) - this._Shuffle = false; - - return this._Shuffle; - } - - set Shuffle(mode) { - if (this.Shuffle === mode) - return; - - this._Shuffle = mode; - this.notify('Shuffle'); - } - - get Volume() { - if (this._Volume === undefined) - this._Volume = 1.0; - - return this._Volume; - } - - set Volume(level) { - if (this.Volume === level) - return; - - this._Volume = level; - this.notify('Volume'); - } - - Next() { - throw new GObject.NotImplementedError(); - } - - OpenUri(uri) { - throw new GObject.NotImplementedError(); - } - - Previous() { - throw new GObject.NotImplementedError(); - } - - Pause() { - throw new GObject.NotImplementedError(); - } - - Play() { - throw new GObject.NotImplementedError(); - } - - PlayPause() { - throw new GObject.NotImplementedError(); - } - - Seek(offset) { - throw new GObject.NotImplementedError(); - } - - SetPosition(trackId, position) { - throw new GObject.NotImplementedError(); - } - - Stop() { - throw new GObject.NotImplementedError(); - } -}); - - -/** - * An aggregate of the org.mpris.MediaPlayer2 and org.mpris.MediaPlayer2.Player - * interfaces. - */ -const PlayerProxy = GObject.registerClass({ - GTypeName: 'GSConnectMPRISPlayer', -}, class PlayerProxy extends Player { - - _init(name) { - super._init(); - - this._application = new Gio.DBusProxy({ - g_bus_type: Gio.BusType.SESSION, - g_name: name, - g_object_path: '/org/mpris/MediaPlayer2', - g_interface_name: 'org.mpris.MediaPlayer2', - }); - - this._applicationChangedId = this._application.connect( - 'g-properties-changed', - this._onPropertiesChanged.bind(this) - ); - - this._player = new Gio.DBusProxy({ - g_bus_type: Gio.BusType.SESSION, - g_name: name, - g_object_path: '/org/mpris/MediaPlayer2', - g_interface_name: 'org.mpris.MediaPlayer2.Player', - }); - - this._playerChangedId = this._player.connect( - 'g-properties-changed', - this._onPropertiesChanged.bind(this) - ); - - this._playerSignalId = this._player.connect( - 'g-signal', - this._onSignal.bind(this) - ); - - this._cancellable = new Gio.Cancellable(); - } - - _onSignal(proxy, sender_name, signal_name, parameters) { - try { - if (signal_name !== 'Seeked') - return; - - this.emit('Seeked', parameters.deepUnpack()[0]); - } catch (e) { - debug(e, proxy.g_name); - } - } - - _call(proxy, name, parameters = null) { - proxy.call( - name, - parameters, - Gio.DBusCallFlags.NO_AUTO_START, - -1, - this._cancellable, - (proxy, result) => { - try { - proxy.call_finish(result); - } catch (e) { - Gio.DBusError.strip_remote_error(e); - debug(e, proxy.g_name); - } - } - ); - } - - _get(proxy, name, fallback = null) { - try { - return proxy.get_cached_property(name).recursiveUnpack(); - } catch (e) { - return fallback; - } - } - - _set(proxy, name, value) { - try { - proxy.set_cached_property(name, value); - - proxy.call( - 'org.freedesktop.DBus.Properties.Set', - new GLib.Variant('(ssv)', [proxy.g_interface_name, name, value]), - Gio.DBusCallFlags.NO_AUTO_START, - -1, - this._cancellable, - (proxy, result) => { - try { - proxy.call_finish(result); - } catch (e) { - Gio.DBusError.strip_remote_error(e); - debug(e, proxy.g_name); - } - } - ); - } catch (e) { - debug(e, proxy.g_name); - } - } - - _onPropertiesChanged(proxy, changed, invalidated) { - try { - this.freeze_notify(); - - for (const name in changed.deepUnpack()) - this.notify(name); - - this.thaw_notify(); - } catch (e) { - debug(e, proxy.g_name); - } - } - - /* - * The org.mpris.MediaPlayer2 Interface - */ - get CanQuit() { - return this._get(this._application, 'CanQuit', false); - } - - get CanRaise() { - return this._get(this._application, 'CanRaise', false); - } - - get CanSetFullscreen() { - return this._get(this._application, 'CanSetFullscreen', false); - } - - get DesktopEntry() { - return this._get(this._application, 'DesktopEntry', null); - } - - get Fullscreen() { - return this._get(this._application, 'Fullscreen', false); - } - - set Fullscreen(mode) { - this._set(this._application, 'Fullscreen', new GLib.Variant('b', mode)); - } - - get HasTrackList() { - return this._get(this._application, 'HasTrackList', false); - } - - get Identity() { - return this._get(this._application, 'Identity', _('Unknown')); - } - - get SupportedMimeTypes() { - return this._get(this._application, 'SupportedMimeTypes', []); - } - - get SupportedUriSchemes() { - return this._get(this._application, 'SupportedUriSchemes', []); - } - - Quit() { - this._call(this._application, 'Quit'); - } - - Raise() { - this._call(this._application, 'Raise'); - } - - /* - * The org.mpris.MediaPlayer2.Player Interface - */ - get CanControl() { - return this._get(this._player, 'CanControl', false); - } - - get CanGoNext() { - return this._get(this._player, 'CanGoNext', false); - } - - get CanGoPrevious() { - return this._get(this._player, 'CanGoPrevious', false); - } - - get CanPause() { - return this._get(this._player, 'CanPause', false); - } - - get CanPlay() { - return this._get(this._player, 'CanPlay', false); - } - - get CanSeek() { - return this._get(this._player, 'CanSeek', false); - } - - get LoopStatus() { - return this._get(this._player, 'LoopStatus', 'None'); - } - - set LoopStatus(status) { - this._set(this._player, 'LoopStatus', new GLib.Variant('s', status)); - } - - get MaximumRate() { - return this._get(this._player, 'MaximumRate', 1.0); - } - - get Metadata() { - if (this._metadata === undefined) { - this._metadata = { - 'xesam:artist': [_('Unknown')], - 'xesam:album': _('Unknown'), - 'xesam:title': _('Unknown'), - 'mpris:length': 0, - }; - } - - return this._get(this._player, 'Metadata', this._metadata); - } - - get MinimumRate() { - return this._get(this._player, 'MinimumRate', 1.0); - } - - get PlaybackStatus() { - return this._get(this._player, 'PlaybackStatus', 'Stopped'); - } - - // g-properties-changed is not emitted for this property - get Position() { - try { - const reply = this._player.call_sync( - 'org.freedesktop.DBus.Properties.Get', - new GLib.Variant('(ss)', [ - 'org.mpris.MediaPlayer2.Player', - 'Position', - ]), - Gio.DBusCallFlags.NONE, - -1, - null - ); - - return reply.recursiveUnpack()[0]; - } catch (e) { - return 0; - } - } - - get Rate() { - return this._get(this._player, 'Rate', 1.0); - } - - set Rate(rate) { - this._set(this._player, 'Rate', new GLib.Variant('d', rate)); - } - - get Shuffle() { - return this._get(this._player, 'Shuffle', false); - } - - set Shuffle(mode) { - this._set(this._player, 'Shuffle', new GLib.Variant('b', mode)); - } - - get Volume() { - return this._get(this._player, 'Volume', 1.0); - } - - set Volume(level) { - this._set(this._player, 'Volume', new GLib.Variant('d', level)); - } - - Next() { - this._call(this._player, 'Next'); - } - - OpenUri(uri) { - this._call(this._player, 'OpenUri', new GLib.Variant('(s)', [uri])); - } - - Previous() { - this._call(this._player, 'Previous'); - } - - Pause() { - this._call(this._player, 'Pause'); - } - - Play() { - this._call(this._player, 'Play'); - } - - PlayPause() { - this._call(this._player, 'PlayPause'); - } - - Seek(offset) { - this._call(this._player, 'Seek', new GLib.Variant('(x)', [offset])); - } - - SetPosition(trackId, position) { - this._call(this._player, 'SetPosition', - new GLib.Variant('(ox)', [trackId, position])); - } - - Stop() { - this._call(this._player, 'Stop'); - } - - destroy() { - if (this._cancellable.is_cancelled()) - return; - - this._cancellable.cancel(); - this._application.disconnect(this._applicationChangedId); - this._player.disconnect(this._playerChangedId); - this._player.disconnect(this._playerSignalId); - } -}); - - -/** - * A manager for media players - */ -const Manager = GObject.registerClass({ - GTypeName: 'GSConnectMPRISManager', - Signals: { - 'player-added': { - param_types: [GObject.TYPE_OBJECT], - }, - 'player-removed': { - param_types: [GObject.TYPE_OBJECT], - }, - 'player-changed': { - param_types: [GObject.TYPE_OBJECT], - }, - 'player-seeked': { - param_types: [GObject.TYPE_OBJECT, GObject.TYPE_INT64], - }, - }, -}, class Manager extends GObject.Object { - - _init() { - super._init(); - - // Asynchronous setup - this._cancellable = new Gio.Cancellable(); - this._connection = Gio.DBus.session; - this._players = new Map(); - this._paused = new Map(); - - this._nameOwnerChangedId = Gio.DBus.session.signal_subscribe( - 'org.freedesktop.DBus', - 'org.freedesktop.DBus', - 'NameOwnerChanged', - '/org/freedesktop/DBus', - 'org.mpris.MediaPlayer2', - Gio.DBusSignalFlags.MATCH_ARG0_NAMESPACE, - this._onNameOwnerChanged.bind(this) - ); - - this._loadPlayers(); - } - - async _loadPlayers() { - try { - const reply = await this._connection.call( - 'org.freedesktop.DBus', - '/org/freedesktop/DBus', - 'org.freedesktop.DBus', - 'ListNames', - null, - null, - Gio.DBusCallFlags.NONE, - -1, - this._cancellable); - - const names = reply.deepUnpack()[0]; - - for (let i = 0, len = names.length; i < len; i++) { - const name = names[i]; - - if (!name.startsWith('org.mpris.MediaPlayer2')) - continue; - - if (!name.includes('GSConnect')) - this._addPlayer(name); - } - } catch (e) { - if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) - logError(e); - } - } - - _onNameOwnerChanged(connection, sender, object, iface, signal, parameters) { - const [name, oldOwner, newOwner] = parameters.deepUnpack(); - - if (name.includes('GSConnect')) - return; - - if (newOwner.length) - this._addPlayer(name); - else if (oldOwner.length) - this._removePlayer(name); - } - - async _addPlayer(name) { - try { - if (!this._players.has(name)) { - const player = new PlayerProxy(name); - await Promise.all([ - player._application.init_async(GLib.PRIORITY_DEFAULT, - this._cancellable), - player._player.init_async(GLib.PRIORITY_DEFAULT, - this._cancellable), - ]); - - player.connect('notify', - (player) => this.emit('player-changed', player)); - - player.connect('Seeked', this.emit.bind(this, 'player-seeked')); - - this._players.set(name, player); - this.emit('player-added', player); - } - } catch (e) { - debug(e, name); - } - } - - _removePlayer(name) { - try { - const player = this._players.get(name); - - if (player !== undefined) { - this._paused.delete(name); - this._players.delete(name); - this.emit('player-removed', player); - - player.destroy(); - } - } catch (e) { - debug(e, name); - } - } - - /** - * Check for a player by its Identity. - * - * @param {string} identity - A player name - * @return {boolean} %true if the player was found - */ - hasPlayer(identity) { - for (const player of this._players.values()) { - if (player.Identity === identity) - return true; - } - - return false; - } - - /** - * Get a player by its Identity. - * - * @param {string} identity - A player name - * @return {GSConnectMPRISPlayer|null} A player or %null - */ - getPlayer(identity) { - for (const player of this._players.values()) { - if (player.Identity === identity) - return player; - } - - return null; - } - - /** - * Get a list of player identities. - * - * @return {string[]} A list of player identities - */ - getIdentities() { - const identities = []; - - for (const player of this._players.values()) { - const identity = player.Identity; - - if (identity) - identities.push(identity); - } - - return identities; - } - - /** - * A convenience function for pausing all players currently playing. - */ - pauseAll() { - for (const [name, player] of this._players) { - if (player.PlaybackStatus === 'Playing' && player.CanPause) { - player.Pause(); - this._paused.set(name, player); - } - } - } - - /** - * A convenience function for restarting all players paused with pauseAll(). - */ - unpauseAll() { - for (const player of this._paused.values()) { - if (player.PlaybackStatus === 'Paused' && player.CanPlay) - player.Play(); - } - - this._paused.clear(); - } - - destroy() { - if (this._cancellable.is_cancelled()) - return; - - this._cancellable.cancel(); - this._connection.signal_unsubscribe(this._nameOwnerChangedId); - - this._paused.clear(); - this._players.forEach(player => player.destroy()); - this._players.clear(); - } -}); - - -/** - * The service class for this component - */ -export default Manager; - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/notification.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/notification.js deleted file mode 100644 index 0566a257..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/notification.js +++ /dev/null @@ -1,409 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GjsPrivate from 'gi://GjsPrivate'; -import GObject from 'gi://GObject'; - -import * as DBus from '../utils/dbus.js'; - - -const _nodeInfo = Gio.DBusNodeInfo.new_for_xml(` - - - - - - - - - - - - - - - - - - - - - - - - - -`); - - -const FDO_IFACE = _nodeInfo.lookup_interface('org.freedesktop.Notifications'); -const FDO_MATCH = "interface='org.freedesktop.Notifications',member='Notify',type='method_call'"; - -const GTK_IFACE = _nodeInfo.lookup_interface('org.gtk.Notifications'); -const GTK_MATCH = "interface='org.gtk.Notifications',member='AddNotification',type='method_call'"; - - -/** - * A class for snooping Freedesktop (libnotify) and Gtk (GNotification) - * notifications and forwarding them to supporting devices. - */ -const Listener = GObject.registerClass({ - GTypeName: 'GSConnectNotificationListener', - Signals: { - 'notification-added': { - flags: GObject.SignalFlags.RUN_LAST, - param_types: [GLib.Variant.$gtype], - }, - }, -}, class Listener extends GObject.Object { - - _init() { - super._init(); - - // Respect desktop notification settings - this._settings = new Gio.Settings({ - schema_id: 'org.gnome.desktop.notifications', - }); - - // Watch for new application policies - this._settingsId = this._settings.connect( - 'changed::application-children', - this._onSettingsChanged.bind(this) - ); - - // Cache for appName->desktop-id lookups - this._names = {}; - - // Asynchronous setup - this._init_async(); - } - - get applications() { - if (this._applications === undefined) - this._onSettingsChanged(); - - return this._applications; - } - - /** - * Update application notification settings - */ - _onSettingsChanged() { - this._applications = {}; - - for (const app of this._settings.get_strv('application-children')) { - const appSettings = new Gio.Settings({ - schema_id: 'org.gnome.desktop.notifications.application', - path: `/org/gnome/desktop/notifications/application/${app}/`, - }); - - const appInfo = Gio.DesktopAppInfo.new( - appSettings.get_string('application-id') - ); - - if (appInfo !== null) - this._applications[appInfo.get_name()] = appSettings; - } - } - - async _listNames() { - const reply = await this._session.call( - 'org.freedesktop.DBus', - '/org/freedesktop/DBus', - 'org.freedesktop.DBus', - 'ListNames', - null, - null, - Gio.DBusCallFlags.NONE, - -1, - null); - - return reply.deepUnpack()[0]; - } - - async _getNameOwner(name) { - const reply = await this._session.call( - 'org.freedesktop.DBus', - '/org/freedesktop/DBus', - 'org.freedesktop.DBus', - 'GetNameOwner', - new GLib.Variant('(s)', [name]), - null, - Gio.DBusCallFlags.NONE, - -1, - null); - - return reply.deepUnpack()[0]; - } - - /** - * Try and find a well-known name for @sender on the session bus - * - * @param {string} sender - A DBus unique name (eg. :1.2282) - * @param {string} appName - @appName passed to Notify() (Optional) - * @return {string} A well-known name or %null - */ - async _getAppId(sender, appName) { - try { - // Get a list of well-known names, ignoring @sender - const names = await this._listNames(); - names.splice(names.indexOf(sender), 1); - - // Make a short list for substring matches (fractal/org.gnome.Fractal) - const appLower = appName.toLowerCase(); - - const shortList = names.filter(name => { - return name.toLowerCase().includes(appLower); - }); - - // Run the short list first - for (const name of shortList) { - const nameOwner = await this._getNameOwner(name); - - if (nameOwner === sender) - return name; - - names.splice(names.indexOf(name), 1); - } - - // Run the full list - for (const name of names) { - const nameOwner = await this._getNameOwner(name); - - if (nameOwner === sender) - return name; - } - - return null; - } catch (e) { - debug(e); - return null; - } - } - - /** - * Try and find the application name for @sender - * - * @param {string} sender - A DBus unique name - * @param {string} [appName] - `appName` supplied by Notify() - * @return {string} A well-known name or %null - */ - async _getAppName(sender, appName = null) { - // Check the cache first - if (appName && this._names.hasOwnProperty(appName)) - return this._names[appName]; - - try { - const appId = await this._getAppId(sender, appName); - const appInfo = Gio.DesktopAppInfo.new(`${appId}.desktop`); - this._names[appName] = appInfo.get_name(); - appName = appInfo.get_name(); - } catch (e) { - // Silence errors - } - - return appName; - } - - /** - * Callback for AddNotification()/Notify() - * - * @param {DBus.Interface} iface - The DBus interface - * @param {string} name - The DBus method name - * @param {GLib.Variant} parameters - The method parameters - * @param {Gio.DBusMethodInvocation} invocation - The method invocation info - */ - async _onHandleMethodCall(iface, name, parameters, invocation) { - try { - // Check if notifications are disabled in desktop settings - if (!this._settings.get_boolean('show-banners')) - return; - - parameters = parameters.full_unpack(); - - // GNotification - if (name === 'AddNotification') { - this.AddNotification(...parameters); - - // libnotify - } else if (name === 'Notify') { - const message = invocation.get_message(); - const destination = message.get_destination(); - - // Deduplicate notifications; only accept messages - // directed to the notification bus, or its owner. - if (destination !== 'org.freedesktop.Notifications') { - if (this._fdoNameOwner === undefined) { - this._fdoNameOwner = await this._getNameOwner( - 'org.freedesktop.Notifications'); - } - - if (this._fdoNameOwner !== destination) - return; - } - - // Try to brute-force an application name using DBus - if (!this.applications.hasOwnProperty(parameters[0])) { - const sender = message.get_sender(); - parameters[0] = await this._getAppName(sender, parameters[0]); - } - - this.Notify(...parameters); - } - } catch (e) { - debug(e); - } - } - - /** - * Export interfaces for proxying notifications and become a monitor - * - * @return {Promise} A promise for the operation - */ - _monitorConnection() { - // libnotify Interface - this._fdoNotifications = new GjsPrivate.DBusImplementation({ - g_interface_info: FDO_IFACE, - }); - this._fdoMethodCallId = this._fdoNotifications.connect( - 'handle-method-call', this._onHandleMethodCall.bind(this)); - this._fdoNotifications.export(this._monitor, - '/org/freedesktop/Notifications'); - - this._fdoNameOwnerChangedId = this._session.signal_subscribe( - 'org.freedesktop.DBus', - 'org.freedesktop.DBus', - 'NameOwnerChanged', - '/org/freedesktop/DBus', - 'org.freedesktop.Notifications', - Gio.DBusSignalFlags.MATCH_ARG0_NAMESPACE, - this._onFdoNameOwnerChanged.bind(this) - ); - - // GNotification Interface - this._gtkNotifications = new GjsPrivate.DBusImplementation({ - g_interface_info: GTK_IFACE, - }); - this._gtkMethodCallId = this._gtkNotifications.connect( - 'handle-method-call', this._onHandleMethodCall.bind(this)); - this._gtkNotifications.export(this._monitor, '/org/gtk/Notifications'); - - // Become a monitor for Fdo & Gtk notifications - return this._monitor.call( - 'org.freedesktop.DBus', - '/org/freedesktop/DBus', - 'org.freedesktop.DBus.Monitoring', - 'BecomeMonitor', - new GLib.Variant('(asu)', [[FDO_MATCH, GTK_MATCH], 0]), - null, - Gio.DBusCallFlags.NONE, - -1, - null); - } - - async _init_async() { - try { - this._session = Gio.DBus.session; - this._monitor = await DBus.newConnection(); - await this._monitorConnection(); - } catch (e) { - const service = Gio.Application.get_default(); - - if (service !== null) - service.notify_error(e); - else - logError(e); - } - } - - _onFdoNameOwnerChanged(connection, sender, object, iface, signal, parameters) { - this._fdoNameOwner = parameters.deepUnpack()[2]; - } - - _sendNotification(notif) { - // Check if this application is disabled in desktop settings - const appSettings = this.applications[notif.appName]; - - if (appSettings && !appSettings.get_boolean('enable')) - return; - - // Send the notification to each supporting device - // TODO: avoid the overhead of the GAction framework with a signal? - const variant = GLib.Variant.full_pack(notif); - this.emit('notification-added', variant); - } - - Notify(appName, replacesId, iconName, summary, body, actions, hints, timeout) { - // Ignore notifications without an appName - if (!appName) - return; - - this._sendNotification({ - appName: appName, - id: `fdo|null|${replacesId}`, - title: summary, - text: body, - ticker: `${summary}: ${body}`, - isClearable: (replacesId !== 0), - icon: iconName, - }); - } - - AddNotification(application, id, notification) { - // Ignore our own notifications or we'll cause a notification loop - if (application === 'org.gnome.Shell.Extensions.GSConnect') - return; - - const appInfo = Gio.DesktopAppInfo.new(`${application}.desktop`); - - // Try to get an icon for the notification - if (!notification.hasOwnProperty('icon')) - notification.icon = appInfo.get_icon() || undefined; - - this._sendNotification({ - appName: appInfo.get_name(), - id: `gtk|${application}|${id}`, - title: notification.title, - text: notification.body, - ticker: `${notification.title}: ${notification.body}`, - isClearable: true, - icon: notification.icon, - }); - } - - destroy() { - try { - if (this._fdoNotifications) { - this._fdoNotifications.disconnect(this._fdoMethodCallId); - this._fdoNotifications.unexport(); - this._session.signal_unsubscribe(this._fdoNameOwnerChangedId); - } - - if (this._gtkNotifications) { - this._gtkNotifications.disconnect(this._gtkMethodCallId); - this._gtkNotifications.unexport(); - } - - if (this._settings) { - this._settings.disconnect(this._settingsId); - this._settings.run_dispose(); - } - - // TODO: Gio.IOErrorEnum: The connection is closed - // this._monitor.close_sync(null); - - GObject.signal_handlers_destroy(this); - } catch (e) { - debug(e); - } - } -}); - - -/** - * The service class for this component - */ -export default Listener; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/pulseaudio.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/pulseaudio.js deleted file mode 100644 index 1165fc02..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/pulseaudio.js +++ /dev/null @@ -1,271 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import GIRepository from 'gi://GIRepository'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; - -import Config from '../../config.js'; - -const Tweener = imports.tweener.tweener; - - -let Gvc = null; -try { - // Add gnome-shell's typelib dir to the search path - const typelibDir = GLib.build_filenamev([Config.GNOME_SHELL_LIBDIR, 'gnome-shell']); - GIRepository.Repository.prepend_search_path(typelibDir); - GIRepository.Repository.prepend_library_path(typelibDir); - - Gvc = (await import('gi://Gvc')).default; -} catch (e) {} - - -/** - * Extend Gvc.MixerStream with a property for returning a user-visible name - */ -if (Gvc) { - Object.defineProperty(Gvc.MixerStream.prototype, 'display_name', { - get: function () { - try { - if (!this.get_ports().length) - return this.description; - - return `${this.get_port().human_port} (${this.description})`; - } catch (e) { - return this.description; - } - }, - }); -} - - -/** - * A convenience wrapper for Gvc.MixerStream - */ -class Stream { - constructor(mixer, stream) { - this._mixer = mixer; - this._stream = stream; - - this._max = mixer.get_vol_max_norm(); - } - - get muted() { - return this._stream.is_muted; - } - - set muted(bool) { - this._stream.change_is_muted(bool); - } - - // Volume is a double in the range 0-1 - get volume() { - return Math.floor(100 * this._stream.volume / this._max) / 100; - } - - set volume(num) { - this._stream.volume = Math.floor(num * this._max); - this._stream.push_volume(); - } - - /** - * Gradually raise or lower the stream volume to @value - * - * @param {number} value - A number in the range 0-1 - * @param {number} [duration] - Duration to fade in seconds - */ - fade(value, duration = 1) { - Tweener.removeTweens(this); - - if (this._stream.volume > value) { - this._mixer.fading = true; - - Tweener.addTween(this, { - volume: value, - time: duration, - transition: 'easeOutCubic', - onComplete: () => { - this._mixer.fading = false; - }, - }); - } else if (this._stream.volume < value) { - this._mixer.fading = true; - - Tweener.addTween(this, { - volume: value, - time: duration, - transition: 'easeInCubic', - onComplete: () => { - this._mixer.fading = false; - }, - }); - } - } -} - - -/** - * A subclass of Gvc.MixerControl with convenience functions for controlling the - * default input/output volumes. - * - * The Mixer class uses GNOME Shell's Gvc library to control the system volume - * and offers a few convenience functions. - */ -const Mixer = !Gvc ? null : GObject.registerClass({ - GTypeName: 'GSConnectAudioMixer', -}, class Mixer extends Gvc.MixerControl { - _init(params) { - super._init({name: 'GSConnect'}); - - this._previousVolume = undefined; - this._volumeMuted = false; - this._microphoneMuted = false; - - this.open(); - } - - get fading() { - if (this._fading === undefined) - this._fading = false; - - return this._fading; - } - - set fading(bool) { - if (this.fading === bool) - return; - - this._fading = bool; - - if (this.fading) - this.emit('stream-changed', this._output._stream.id); - } - - get input() { - if (this._input === undefined) - this.vfunc_default_source_changed(); - - return this._input; - } - - get output() { - if (this._output === undefined) - this.vfunc_default_sink_changed(); - - return this._output; - } - - vfunc_default_sink_changed(id) { - try { - const sink = this.get_default_sink(); - this._output = (sink) ? new Stream(this, sink) : null; - } catch (e) { - logError(e); - } - } - - vfunc_default_source_changed(id) { - try { - const source = this.get_default_source(); - this._input = (source) ? new Stream(this, source) : null; - } catch (e) { - logError(e); - } - } - - vfunc_state_changed(new_state) { - try { - if (new_state === Gvc.MixerControlState.READY) { - this.vfunc_default_sink_changed(null); - this.vfunc_default_source_changed(null); - } - } catch (e) { - logError(e); - } - } - - /** - * Store the current output volume then lower it to %15 - * - * @param {number} duration - Duration in seconds to fade - */ - lowerVolume(duration = 1) { - try { - if (this.output && this.output.volume > 0.15) { - this._previousVolume = Number(this.output.volume); - this.output.fade(0.15, duration); - } - } catch (e) { - logError(e); - } - } - - /** - * Mute the output volume (speakers) - */ - muteVolume() { - try { - if (!this.output || this.output.muted) - return; - - this.output.muted = true; - this._volumeMuted = true; - } catch (e) { - logError(e); - } - } - - /** - * Mute the input volume (microphone) - */ - muteMicrophone() { - try { - if (!this.input || this.input.muted) - return; - - this.input.muted = true; - this._microphoneMuted = true; - } catch (e) { - logError(e); - } - } - - /** - * Restore all mixer levels to their previous state - */ - restore() { - try { - // If we muted the microphone, unmute it before restoring the volume - if (this._microphoneMuted) { - this.input.muted = false; - this._microphoneMuted = false; - } - - // If we muted the volume, unmute it before restoring the volume - if (this._volumeMuted) { - this.output.muted = false; - this._volumeMuted = false; - } - - // If a previous volume is defined, raise it back up to that level - if (this._previousVolume !== undefined) { - this.output.fade(this._previousVolume); - this._previousVolume = undefined; - } - } catch (e) { - logError(e); - } - } - - destroy() { - this.close(); - } -}); - - -/** - * The service class for this component - */ -export default Mixer; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/session.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/session.js deleted file mode 100644 index 5d574502..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/session.js +++ /dev/null @@ -1,84 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; - - -const Session = class { - constructor() { - this._connection = Gio.DBus.system; - this._session = null; - - this._initAsync(); - } - - async _initAsync() { - try { - const reply = await this._connection.call( - 'org.freedesktop.login1', - '/org/freedesktop/login1', - 'org.freedesktop.login1.Manager', - 'ListSessions', - null, - null, - Gio.DBusCallFlags.NONE, - -1, - null); - - const sessions = reply.deepUnpack()[0]; - const userName = GLib.get_user_name(); - let sessionPath = '/org/freedesktop/login1/session/auto'; - - // eslint-disable-next-line no-unused-vars - for (const [num, uid, name, seat, objectPath] of sessions) { - if (name === userName) { - sessionPath = objectPath; - break; - } - } - - this._session = new Gio.DBusProxy({ - g_connection: this._connection, - g_name: 'org.freedesktop.login1', - g_object_path: sessionPath, - g_interface_name: 'org.freedesktop.login1.Session', - }); - await this._session.init_async(GLib.PRIORITY_DEFAULT, null); - } catch (e) { - this._session = null; - logError(e); - } - } - - get idle() { - if (this._session === null) - return false; - - return this._session.get_cached_property('IdleHint').unpack(); - } - - get locked() { - if (this._session === null) - return false; - - return this._session.get_cached_property('LockedHint').unpack(); - } - - get active() { - // Active if not idle and not locked - return !(this.idle || this.locked); - } - - destroy() { - this._session = null; - } -}; - - -/** - * The service class for this component - */ -export default Session; - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/sound.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/sound.js deleted file mode 100644 index 0845acfb..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/sound.js +++ /dev/null @@ -1,172 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gdk from 'gi://Gdk'; -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; - -let GSound = null; -try { - GSound = (await import('gi://GSound')).default; -} catch (e) {} - - -const Player = class Player { - - constructor() { - this._playing = new Set(); - } - - get backend() { - if (this._backend === undefined) { - // Prefer GSound - if (GSound !== null) { - this._gsound = new GSound.Context(); - this._gsound.init(null); - this._backend = 'gsound'; - - // Try falling back to libcanberra, otherwise just re-run the test - // in case one or the other is installed later - } else if (GLib.find_program_in_path('canberra-gtk-play') !== null) { - this._canberra = new Gio.SubprocessLauncher({ - flags: Gio.SubprocessFlags.NONE, - }); - this._backend = 'libcanberra'; - } else { - return null; - } - } - - return this._backend; - } - - _canberraPlaySound(name, cancellable) { - const proc = this._canberra.spawnv(['canberra-gtk-play', '-i', name]); - return proc.wait_check_async(cancellable); - } - - async _canberraLoopSound(name, cancellable) { - while (!cancellable.is_cancelled()) - await this._canberraPlaySound(name, cancellable); - } - - _gsoundPlaySound(name, cancellable) { - return new Promise((resolve, reject) => { - this._gsound.play_full( - {'event.id': name}, - cancellable, - (source, res) => { - try { - resolve(source.play_full_finish(res)); - } catch (e) { - reject(e); - } - } - ); - }); - } - - async _gsoundLoopSound(name, cancellable) { - while (!cancellable.is_cancelled()) - await this._gsoundPlaySound(name, cancellable); - } - - _gdkPlaySound(name, cancellable) { - if (this._display === undefined) - this._display = Gdk.Display.get_default(); - - let count = 0; - - GLib.timeout_add(GLib.PRIORITY_DEFAULT, 200, () => { - try { - if (count++ < 4 && !cancellable.is_cancelled()) { - this._display.beep(); - return GLib.SOURCE_CONTINUE; - } - - return GLib.SOURCE_REMOVE; - } catch (e) { - logError(e); - return GLib.SOURCE_REMOVE; - } - }); - - return !cancellable.is_cancelled(); - } - - _gdkLoopSound(name, cancellable) { - this._gdkPlaySound(name, cancellable); - GLib.timeout_add( - GLib.PRIORITY_DEFAULT, - 1500, - this._gdkPlaySound.bind(this, name, cancellable) - ); - } - - async playSound(name, cancellable) { - try { - if (!(cancellable instanceof Gio.Cancellable)) - cancellable = new Gio.Cancellable(); - - this._playing.add(cancellable); - - switch (this.backend) { - case 'gsound': - await this._gsoundPlaySound(name, cancellable); - break; - - case 'canberra': - await this._canberraPlaySound(name, cancellable); - break; - - default: - await this._gdkPlaySound(name, cancellable); - } - } catch (e) { - if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) - logError(e); - } finally { - this._playing.delete(cancellable); - } - } - - async loopSound(name, cancellable) { - try { - if (!(cancellable instanceof Gio.Cancellable)) - cancellable = new Gio.Cancellable(); - - this._playing.add(cancellable); - - switch (this.backend) { - case 'gsound': - await this._gsoundLoopSound(name, cancellable); - break; - - case 'canberra': - await this._canberraLoopSound(name, cancellable); - break; - - default: - await this._gdkLoopSound(name, cancellable); - } - } catch (e) { - if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) - logError(e); - } finally { - this._playing.delete(cancellable); - } - } - - destroy() { - for (const cancellable of this._playing) - cancellable.cancel(); - } -}; - - -/** - * The service class for this component - */ -export default Player; - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/upower.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/upower.js deleted file mode 100644 index 722387b8..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/upower.js +++ /dev/null @@ -1,215 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; - - -/** - * The warning level of a battery. - * - * @readonly - * @enum {number} - */ -const DeviceLevel = { - UNKNOWN: 0, - NONE: 1, - DISCHARGING: 2, - LOW: 3, - CRITICAL: 4, - ACTION: 5, - NORMAL: 6, - HIGH: 7, - FULL: 8, - LAST: 9, -}; - -/** - * The device state. - * - * @readonly - * @enum {number} - */ -const DeviceState = { - UNKNOWN: 0, - CHARGING: 1, - DISCHARGING: 2, - EMPTY: 3, - FULLY_CHARGED: 4, - PENDING_CHARGE: 5, - PENDING_DISCHARGE: 6, - LAST: 7, -}; - - -/** - * A class representing the system battery. - */ -const Battery = GObject.registerClass({ - GTypeName: 'GSConnectSystemBattery', - Signals: { - 'changed': { - flags: GObject.SignalFlags.RUN_FIRST, - }, - }, - Properties: { - 'charging': GObject.ParamSpec.boolean( - 'charging', - 'Charging', - 'The current charging state.', - GObject.ParamFlags.READABLE, - false - ), - 'level': GObject.ParamSpec.int( - 'level', - 'Level', - 'The current power level.', - GObject.ParamFlags.READABLE, - -1, 100, - -1 - ), - 'threshold': GObject.ParamSpec.uint( - 'threshold', - 'Threshold', - 'The current threshold state.', - GObject.ParamFlags.READABLE, - 0, 1, - 0 - ), - }, -}, class Battery extends GObject.Object { - - _init() { - super._init(); - - this._cancellable = new Gio.Cancellable(); - this._proxy = null; - this._propertiesChangedId = 0; - - this._loadUPower(); - } - - async _loadUPower() { - try { - this._proxy = new Gio.DBusProxy({ - g_bus_type: Gio.BusType.SYSTEM, - g_name: 'org.freedesktop.UPower', - g_object_path: '/org/freedesktop/UPower/devices/DisplayDevice', - g_interface_name: 'org.freedesktop.UPower.Device', - g_flags: Gio.DBusProxyFlags.DO_NOT_AUTO_START, - }); - - await this._proxy.init_async(GLib.PRIORITY_DEFAULT, - this._cancellable); - - this._propertiesChangedId = this._proxy.connect( - 'g-properties-changed', this._onPropertiesChanged.bind(this)); - - this._initProperties(this._proxy); - } catch (e) { - if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) { - const service = Gio.Application.get_default(); - - if (service !== null) - service.notify_error(e); - else - logError(e); - } - - this._proxy = null; - } - } - - _initProperties(proxy) { - if (proxy.g_name_owner === null) - return; - - const percentage = proxy.get_cached_property('Percentage').unpack(); - const state = proxy.get_cached_property('State').unpack(); - const level = proxy.get_cached_property('WarningLevel').unpack(); - - this._level = Math.floor(percentage); - this._charging = (state !== DeviceState.DISCHARGING); - this._threshold = (!this.charging && level >= DeviceLevel.LOW); - - this.emit('changed'); - } - - _onPropertiesChanged(proxy, changed, invalidated) { - let emitChanged = false; - const properties = changed.deepUnpack(); - - if (properties.hasOwnProperty('Percentage')) { - emitChanged = true; - - const value = proxy.get_cached_property('Percentage').unpack(); - this._level = Math.floor(value); - this.notify('level'); - } - - if (properties.hasOwnProperty('State')) { - emitChanged = true; - - const value = proxy.get_cached_property('State').unpack(); - this._charging = (value !== DeviceState.DISCHARGING); - this.notify('charging'); - } - - if (properties.hasOwnProperty('WarningLevel')) { - emitChanged = true; - - const value = proxy.get_cached_property('WarningLevel').unpack(); - this._threshold = (!this.charging && value >= DeviceLevel.LOW); - this.notify('threshold'); - } - - if (emitChanged) - this.emit('changed'); - } - - get charging() { - if (this._charging === undefined) - this._charging = false; - - return this._charging; - } - - get is_present() { - return (this._proxy && this._proxy.g_name_owner); - } - - get level() { - if (this._level === undefined) - this._level = -1; - - return this._level; - } - - get threshold() { - if (this._threshold === undefined) - this._threshold = 0; - - return this._threshold; - } - - destroy() { - if (this._cancellable.is_cancelled()) - return; - - this._cancellable.cancel(); - - if (this._proxy && this._propertiesChangedId > 0) { - this._proxy.disconnect(this._propertiesChangedId); - this._propertiesChangedId = 0; - } - } -}); - - -/** - * The service class for this component - */ -export default Battery; - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/ydotool.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/ydotool.js deleted file mode 100644 index de044185..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/components/ydotool.js +++ /dev/null @@ -1,160 +0,0 @@ -// SPDX-FileCopyrightText: JingMatrix https://github.com/JingMatrix -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import Gdk from 'gi://Gdk'; - -const keyCodes = new Map([ - ['1', 2], - ['2', 3], - ['3', 4], - ['4', 5], - ['5', 6], - ['6', 7], - ['7', 8], - ['8', 9], - ['9', 10], - ['0', 11], - ['-', 12], - ['=', 13], - ['Q', 16], - ['W', 17], - ['E', 18], - ['R', 19], - ['T', 20], - ['Y', 21], - ['U', 22], - ['I', 23], - ['O', 24], - ['P', 25], - ['[', 26], - [']', 27], - ['A', 30], - ['S', 31], - ['D', 32], - ['F', 33], - ['G', 34], - ['H', 35], - ['J', 36], - ['K', 37], - ['L', 38], - [';', 39], - ["'", 40], - ['Z', 44], - ['X', 45], - ['C', 46], - ['V', 47], - ['B', 48], - ['N', 49], - ['M', 50], - [',', 51], - ['.', 52], - ['/', 53], - ['\\', 43], -]); -export default class Controller { - constructor() { - // laucher for wl-clipboard - this._launcher = new Gio.SubprocessLauncher({ - flags: - Gio.SubprocessFlags.STDOUT_PIPE | - Gio.SubprocessFlags.STDERR_MERGE, - }); - this._args = []; - this.buttonMap = new Map([ - [Gdk.BUTTON_PRIMARY, '0'], - [Gdk.BUTTON_MIDDLE, '2'], - [Gdk.BUTTON_SECONDARY, '1'], - ]); - } - - get args() { - return this._args; - } - - set args(opts) { - this._args = ['ydotool'].concat(opts); - try { - this._launcher.spawnv(this._args); - } catch (e) { - debug(e, this._args); - } - } - - /* - * Pointer Events - */ - movePointer(dx, dy) { - if (dx === 0 && dy === 0) - return; - this.args = ['mousemove', '--', dx.toString(), dy.toString()]; - } - - pressPointer(button) { - this.args = ['click', '0x4' + this.buttonMap.get(button)]; - } - - releasePointer(button) { - this.args = ['click', '0x8' + this.buttonMap.get(button)]; - } - - clickPointer(button) { - this.args = ['click', '0xC' + this.buttonMap.get(button)]; - } - - doubleclickPointer(button) { - this.args = [ - 'click', - '0xC' + this.buttonMap.get(button), - 'click', - '0xC' + this.buttonMap.get(button), - ]; - } - - scrollPointer(dx, dy) { - if (dx === 0 && dy === 0) - return; - this.args = ['mousemove', '-w', '--', dx.toString(), dy.toString()]; - } - - /* - * Keyboard Events - */ - - pressKeys(input, modifiers_codes) { - if (typeof input === 'string' && modifiers_codes.length === 0) { - try { - this._launcher.spawnv(['wtype', input]); - } catch (e) { - debug(e); - this.arg = ['type', '--', input]; - } - } else { - if (typeof input === 'number') { - modifiers_codes.push(input); - } else if (typeof input === 'string') { - input = input.toUpperCase(); - for (let i = 0; i < input.length; i++) { - if (keyCodes.get(input[i])) { - modifiers_codes.push(keyCodes.get(input[i])); - } else { - debug('Keycode for ' + input[i] + ' not found'); - return; - } - } - - } - this._args = ['key']; - modifiers_codes.forEach((code) => this._args.push(code + ':1')); - modifiers_codes - .reverse() - .forEach((code) => this._args.push(code + ':0')); - this.args = this._args; - } - } - - destroy() { - this._args = []; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/core.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/core.js deleted file mode 100644 index 02b89bb6..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/core.js +++ /dev/null @@ -1,694 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; - -import plugins from './plugins/index.js'; - - -/** - * Get the local device type. - * - * @return {string} A device type string - */ -export function _getDeviceType() { - try { - let type = GLib.file_get_contents('/sys/class/dmi/id/chassis_type')[1]; - - type = Number(new TextDecoder().decode(type)); - - if ([8, 9, 10, 14].includes(type)) - return 'laptop'; - - return 'desktop'; - } catch (e) { - return 'desktop'; - } -} - - -/** - * The packet class is a simple Object-derived class, offering some conveniences - * for working with KDE Connect packets. - */ -export class Packet { - - constructor(data = null) { - this.id = 0; - this.type = undefined; - this.body = {}; - - if (typeof data === 'string') - Object.assign(this, JSON.parse(data)); - else if (data !== null) - Object.assign(this, data); - } - - [Symbol.toPrimitive](hint) { - this.id = Date.now(); - - if (hint === 'string') - return `${JSON.stringify(this)}\n`; - - if (hint === 'number') - return `${JSON.stringify(this)}\n`.length; - - return true; - } - - get [Symbol.toStringTag]() { - return `Packet:${this.type}`; - } - - /** - * Deserialize and return a new Packet from an Object or string. - * - * @param {Object|string} data - A string or dictionary to deserialize - * @return {Core.Packet} A new packet object - */ - static deserialize(data) { - return new Packet(data); - } - - /** - * Serialize the packet as a single line with a terminating new-line (`\n`) - * character, ready to be written to a channel. - * - * @return {string} A serialized packet - */ - serialize() { - this.id = Date.now(); - return `${JSON.stringify(this)}\n`; - } - - /** - * Update the packet from a dictionary or string of JSON - * - * @param {Object|string} data - Source data - */ - update(data) { - try { - if (typeof data === 'string') - Object.assign(this, JSON.parse(data)); - else - Object.assign(this, data); - } catch (e) { - throw Error(`Malformed data: ${e.message}`); - } - } - - /** - * Check if the packet has a payload. - * - * @return {boolean} %true if @packet has a payload - */ - hasPayload() { - if (!this.hasOwnProperty('payloadSize')) - return false; - - if (!this.hasOwnProperty('payloadTransferInfo')) - return false; - - return (Object.keys(this.payloadTransferInfo).length > 0); - } -} - - -/** - * Channel objects handle KDE Connect packet exchange and data transfers for - * devices. The implementation is responsible for all negotiation of the - * underlying protocol. - */ -export const Channel = GObject.registerClass({ - GTypeName: 'GSConnectChannel', - Properties: { - 'closed': GObject.ParamSpec.boolean( - 'closed', - 'Closed', - 'Whether the channel has been closed', - GObject.ParamFlags.READABLE, - false - ), - }, -}, class Channel extends GObject.Object { - - get address() { - throw new GObject.NotImplementedError(); - } - - get backend() { - if (this._backend === undefined) - this._backend = null; - - return this._backend; - } - - set backend(backend) { - this._backend = backend; - } - - get cancellable() { - if (this._cancellable === undefined) - this._cancellable = new Gio.Cancellable(); - - return this._cancellable; - } - - get closed() { - if (this._closed === undefined) - this._closed = false; - - return this._closed; - } - - get input_stream() { - if (this._input_stream === undefined) { - if (this._connection instanceof Gio.IOStream) - return this._connection.get_input_stream(); - - return null; - } - - return this._input_stream; - } - - set input_stream(stream) { - this._input_stream = stream; - } - - get output_stream() { - if (this._output_stream === undefined) { - if (this._connection instanceof Gio.IOStream) - return this._connection.get_output_stream(); - - return null; - } - - return this._output_stream; - } - - set output_stream(stream) { - this._output_stream = stream; - } - - get uuid() { - if (this._uuid === undefined) - this._uuid = GLib.uuid_string_random(); - - return this._uuid; - } - - set uuid(uuid) { - this._uuid = uuid; - } - - /** - * Close the channel. - */ - close() { - throw new GObject.NotImplementedError(); - } - - /** - * Read a packet. - * - * @param {Gio.Cancellable} [cancellable] - A cancellable - * @return {Promise} The packet - */ - async readPacket(cancellable = null) { - if (cancellable === null) - cancellable = this.cancellable; - - if (!(this.input_stream instanceof Gio.DataInputStream)) { - this.input_stream = new Gio.DataInputStream({ - base_stream: this.input_stream, - }); - } - - const [data] = await this.input_stream.read_line_async( - GLib.PRIORITY_DEFAULT, cancellable); - - if (data === null) { - throw new Gio.IOErrorEnum({ - message: 'End of stream', - code: Gio.IOErrorEnum.CONNECTION_CLOSED, - }); - } - - return new Packet(data); - } - - /** - * Send a packet. - * - * @param {Core.Packet} packet - The packet to send - * @param {Gio.Cancellable} [cancellable] - A cancellable - * @return {Promise} %true if successful - */ - sendPacket(packet, cancellable = null) { - if (cancellable === null) - cancellable = this.cancellable; - - return this.output_stream.write_all_async(packet.serialize(), - GLib.PRIORITY_DEFAULT, cancellable); - } - - /** - * Reject a transfer. - * - * @param {Core.Packet} packet - A packet with payload info - */ - rejectTransfer(packet) { - throw new GObject.NotImplementedError(); - } - - /** - * Download a payload from a device. Typically implementations will override - * this with an async function. - * - * @param {Core.Packet} packet - A packet - * @param {Gio.OutputStream} target - The target stream - * @param {Gio.Cancellable} [cancellable] - A cancellable for the upload - */ - download(packet, target, cancellable = null) { - throw new GObject.NotImplementedError(); - } - - - /** - * Upload a payload to a device. Typically implementations will override - * this with an async function. - * - * @param {Core.Packet} packet - The packet describing the transfer - * @param {Gio.InputStream} source - The source stream - * @param {number} size - The payload size - * @param {Gio.Cancellable} [cancellable] - A cancellable for the upload - */ - upload(packet, source, size, cancellable = null) { - throw new GObject.NotImplementedError(); - } -}); - - -/** - * ChannelService implementations provide Channel objects, emitting the - * ChannelService::channel signal when a new connection has been accepted. - */ -export const ChannelService = GObject.registerClass({ - GTypeName: 'GSConnectChannelService', - Properties: { - 'active': GObject.ParamSpec.boolean( - 'active', - 'Active', - 'Whether the service is active', - GObject.ParamFlags.READABLE, - false - ), - 'id': GObject.ParamSpec.string( - 'id', - 'ID', - 'The hostname or other network unique id', - GObject.ParamFlags.READWRITE, - null - ), - 'name': GObject.ParamSpec.string( - 'name', - 'Name', - 'The name of the backend', - GObject.ParamFlags.READWRITE, - null - ), - }, - Signals: { - 'channel': { - flags: GObject.SignalFlags.RUN_LAST, - param_types: [Channel.$gtype], - return_type: GObject.TYPE_BOOLEAN, - }, - }, -}, class ChannelService extends GObject.Object { - - get active() { - if (this._active === undefined) - this._active = false; - - return this._active; - } - - get cancellable() { - if (this._cancellable === undefined) - this._cancellable = new Gio.Cancellable(); - - return this._cancellable; - } - - get name() { - if (this._name === undefined) - this._name = GLib.get_host_name(); - - return this._name; - } - - set name(name) { - if (this.name === name) - return; - - this._name = name; - this.notify('name'); - } - - get id() { - if (this._id === undefined) - this._id = GLib.uuid_string_random(); - - return this._id; - } - - set id(id) { - if (this.id === id) - return; - - this._id = id; - } - - get identity() { - if (this._identity === undefined) - this.buildIdentity(); - - return this._identity; - } - - /** - * Broadcast directly to @address or the whole network if %null - * - * @param {string} [address] - A string address - */ - broadcast(address = null) { - throw new GObject.NotImplementedError(); - } - - /** - * Rebuild the identity packet used to identify the local device. An - * implementation may override this to make modifications to the default - * capabilities if necessary (eg. bluez without SFTP support). - */ - buildIdentity() { - this._identity = new Packet({ - id: 0, - type: 'kdeconnect.identity', - body: { - deviceId: this.id, - deviceName: this.name, - deviceType: _getDeviceType(), - protocolVersion: 7, - incomingCapabilities: [], - outgoingCapabilities: [], - }, - }); - - for (const name in plugins) { - const meta = plugins[name].Metadata; - - if (meta === undefined) - continue; - - for (const type of meta.incomingCapabilities) - this._identity.body.incomingCapabilities.push(type); - - for (const type of meta.outgoingCapabilities) - this._identity.body.outgoingCapabilities.push(type); - } - } - - /** - * Emit Core.ChannelService::channel - * - * @param {Core.Channel} channel - The new channel - */ - channel(channel) { - if (!this.emit('channel', channel)) - channel.close(); - } - - /** - * Start the channel service. Implementations should throw an error if the - * service fails to meet any of its requirements for opening or accepting - * connections. - */ - start() { - throw new GObject.NotImplementedError(); - } - - /** - * Stop the channel service. - */ - stop() { - throw new GObject.NotImplementedError(); - } - - /** - * Destroy the channel service. - */ - destroy() { - } -}); - - -/** - * A class representing a file transfer. - */ -export const Transfer = GObject.registerClass({ - GTypeName: 'GSConnectTransfer', - Properties: { - 'channel': GObject.ParamSpec.object( - 'channel', - 'Channel', - 'The channel that owns this transfer', - GObject.ParamFlags.READWRITE, - Channel.$gtype - ), - 'completed': GObject.ParamSpec.boolean( - 'completed', - 'Completed', - 'Whether the transfer has completed', - GObject.ParamFlags.READABLE, - false - ), - 'device': GObject.ParamSpec.object( - 'device', - 'Device', - 'The device that created this transfer', - GObject.ParamFlags.READWRITE, - GObject.Object.$gtype - ), - }, -}, class Transfer extends GObject.Object { - - _init(params = {}) { - super._init(params); - - this._cancellable = new Gio.Cancellable(); - this._items = []; - } - - get channel() { - if (this._channel === undefined) - this._channel = null; - - return this._channel; - } - - set channel(channel) { - if (this.channel === channel) - return; - - this._channel = channel; - } - - get completed() { - if (this._completed === undefined) - this._completed = false; - - return this._completed; - } - - get device() { - if (this._device === undefined) - this._device = null; - - return this._device; - } - - set device(device) { - if (this.device === device) - return; - - this._device = device; - } - - get uuid() { - if (this._uuid === undefined) - this._uuid = GLib.uuid_string_random(); - - return this._uuid; - } - - /** - * Ensure there is a stream for the transfer item. - * - * @param {Object} item - A transfer item - * @param {Gio.Cancellable} [cancellable] - A cancellable - */ - async _ensureStream(item, cancellable = null) { - // This is an upload from a remote device - if (item.packet.hasPayload()) { - if (item.target instanceof Gio.OutputStream) - return; - - if (item.file instanceof Gio.File) { - item.target = await item.file.replace_async( - null, - false, - Gio.FileCreateFlags.REPLACE_DESTINATION, - GLib.PRIORITY_DEFAULT, - this._cancellable); - } - } else { - if (item.source instanceof Gio.InputStream) - return; - - if (item.file instanceof Gio.File) { - const read = item.file.read_async(GLib.PRIORITY_DEFAULT, - cancellable); - - const query = item.file.query_info_async( - Gio.FILE_ATTRIBUTE_STANDARD_SIZE, - Gio.FileQueryInfoFlags.NONE, - GLib.PRIORITY_DEFAULT, - cancellable); - - const [stream, info] = await Promise.all([read, query]); - item.source = stream; - item.size = info.get_size(); - } - } - } - - /** - * Add a file to the transfer. - * - * @param {Core.Packet} packet - A packet - * @param {Gio.File} file - A file to transfer - */ - addFile(packet, file) { - const item = { - packet: new Packet(packet), - file: file, - source: null, - target: null, - }; - - this._items.push(item); - } - - /** - * Add a filepath to the transfer. - * - * @param {Core.Packet} packet - A packet - * @param {string} path - A filepath to transfer - */ - addPath(packet, path) { - const item = { - packet: new Packet(packet), - file: Gio.File.new_for_path(path), - source: null, - target: null, - }; - - this._items.push(item); - } - - /** - * Add a stream to the transfer. - * - * @param {Core.Packet} packet - A packet - * @param {Gio.InputStream|Gio.OutputStream} stream - A stream to transfer - * @param {number} [size] - Payload size - */ - addStream(packet, stream, size = 0) { - const item = { - packet: new Packet(packet), - file: null, - source: null, - target: null, - size: size, - }; - - if (stream instanceof Gio.InputStream) - item.source = stream; - else if (stream instanceof Gio.OutputStream) - item.target = stream; - - this._items.push(item); - } - - /** - * Execute a transfer operation. Implementations may override this, while - * the default uses g_output_stream_splice(). - * - * @param {Gio.Cancellable} [cancellable] - A cancellable - */ - async start(cancellable = null) { - let error = null; - - try { - let item; - - // If a cancellable is passed in, chain to its signal - if (cancellable instanceof Gio.Cancellable) - cancellable.connect(() => this._cancellable.cancel()); - - while ((item = this._items.shift())) { - // If created for a device, ignore connection changes by - // ensuring we have the most recent channel - if (this.device !== null) - this._channel = this.device.channel; - - // TODO: transfer queueing? - if (this.channel === null || this.channel.closed) { - throw new Gio.IOErrorEnum({ - code: Gio.IOErrorEnum.CONNECTION_CLOSED, - message: 'Channel is closed', - }); - } - - await this._ensureStream(item, this._cancellable); - - if (item.packet.hasPayload()) { - await this.channel.download(item.packet, item.target, - this._cancellable); - } else { - await this.channel.upload(item.packet, item.source, - item.size, this._cancellable); - } - } - } catch (e) { - error = e; - } finally { - this._completed = true; - this.notify('completed'); - } - - if (error !== null) - throw error; - } - - cancel() { - if (this._cancellable.is_cancelled() === false) - this._cancellable.cancel(); - } -}); - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/device.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/device.js deleted file mode 100644 index aef96a2e..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/device.js +++ /dev/null @@ -1,1105 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; - -import Config from '../config.js'; -import * as Components from './components/index.js'; -import * as Core from './core.js'; -import plugins from './plugins/index.js'; - -/** - * An object representing a remote device. - * - * Device class is subclassed from Gio.SimpleActionGroup so it implements the - * GActionGroup and GActionMap interfaces, like Gio.Application. - * - */ -const Device = GObject.registerClass({ - GTypeName: 'GSConnectDevice', - Properties: { - 'connected': GObject.ParamSpec.boolean( - 'connected', - 'Connected', - 'Whether the device is connected', - GObject.ParamFlags.READABLE, - false - ), - 'contacts': GObject.ParamSpec.object( - 'contacts', - 'Contacts', - 'The contacts store for this device', - GObject.ParamFlags.READABLE, - GObject.Object - ), - 'encryption-info': GObject.ParamSpec.string( - 'encryption-info', - 'Encryption Info', - 'A formatted string with the local and remote fingerprints', - GObject.ParamFlags.READABLE, - null - ), - 'icon-name': GObject.ParamSpec.string( - 'icon-name', - 'Icon Name', - 'Icon name representing the device', - GObject.ParamFlags.READABLE, - null - ), - 'id': GObject.ParamSpec.string( - 'id', - 'Id', - 'The device hostname or other network unique id', - GObject.ParamFlags.READABLE, - '' - ), - 'name': GObject.ParamSpec.string( - 'name', - 'Name', - 'The device name', - GObject.ParamFlags.READABLE, - null - ), - 'paired': GObject.ParamSpec.boolean( - 'paired', - 'Paired', - 'Whether the device is paired', - GObject.ParamFlags.READABLE, - false - ), - 'type': GObject.ParamSpec.string( - 'type', - 'Type', - 'The device type', - GObject.ParamFlags.READABLE, - null - ), - }, -}, class Device extends Gio.SimpleActionGroup { - - _init(identity) { - super._init(); - - this._id = identity.body.deviceId; - - // GLib.Source timeout id's for pairing requests - this._incomingPairRequest = 0; - this._outgoingPairRequest = 0; - - // Maps of name->Plugin, packet->Plugin, uuid->Transfer - this._plugins = new Map(); - this._handlers = new Map(); - this._procs = new Set(); - this._transfers = new Map(); - - this._outputLock = false; - this._outputQueue = []; - - // GSettings - this.settings = new Gio.Settings({ - settings_schema: Config.GSCHEMA.lookup( - 'org.gnome.Shell.Extensions.GSConnect.Device', - true - ), - path: `/org/gnome/shell/extensions/gsconnect/device/${this.id}/`, - }); - this._migratePlugins(); - - // Watch for changes to supported and disabled plugins - this._disabledPluginsChangedId = this.settings.connect( - 'changed::disabled-plugins', - this._onAllowedPluginsChanged.bind(this) - ); - this._supportedPluginsChangedId = this.settings.connect( - 'changed::supported-plugins', - this._onAllowedPluginsChanged.bind(this) - ); - - this._registerActions(); - this.menu = new Gio.Menu(); - - // Parse identity if initialized with a proper packet, otherwise load - if (identity.id !== undefined) - this._handleIdentity(identity); - else - this._loadPlugins(); - } - - get channel() { - if (this._channel === undefined) - this._channel = null; - - return this._channel; - } - - get connected() { - if (this._connected === undefined) - this._connected = false; - - return this._connected; - } - - get connection_type() { - const lastConnection = this.settings.get_string('last-connection'); - - return lastConnection.split('://')[0]; - } - - get contacts() { - const contacts = this._plugins.get('contacts'); - - if (contacts && contacts.settings.get_boolean('contacts-source')) - return contacts._store; - - if (this._contacts === undefined) - this._contacts = Components.acquire('contacts'); - - return this._contacts; - } - - // FIXME: backend should do this stuff - get encryption_info() { - let localCert = null; - let remoteCert = null; - - // Bluetooth connections have no certificate so we use the host address - if (this.connection_type === 'bluetooth') { - // TRANSLATORS: Bluetooth address for remote device - return _('Bluetooth device at %s').format('???'); - - // If the device is connected use the certificate from the connection - } else if (this.connected) { - remoteCert = this.channel.peer_certificate; - - // Otherwise pull it out of the settings - } else if (this.paired) { - remoteCert = Gio.TlsCertificate.new_from_pem( - this.settings.get_string('certificate-pem'), - -1 - ); - } - - // FIXME: another ugly reach-around - let lanBackend; - - if (this.service !== null) - lanBackend = this.service.manager.backends.get('lan'); - - if (lanBackend && lanBackend.certificate) - localCert = lanBackend.certificate; - - - let verificationKey = ''; - if (localCert && remoteCert) { - let a = localCert.pubkey_der(); - let b = remoteCert.pubkey_der(); - if (a.compare(b) < 0) - [a, b] = [b, a]; // swap - const checksum = new GLib.Checksum(GLib.ChecksumType.SHA256); - checksum.update(a.toArray()); - checksum.update(b.toArray()); - verificationKey = checksum.get_string(); - } - - // TRANSLATORS: Label for TLS connection verification key - // - // Example: - // - // Verification key: 0123456789abcdef000000000000000000000000 - return _('Verification key: %s').format(verificationKey); - } - - get id() { - return this._id; - } - - get name() { - return this.settings.get_string('name'); - } - - get paired() { - return this.settings.get_boolean('paired'); - } - - get icon_name() { - switch (this.type) { - case 'laptop': - return 'laptop-symbolic'; - case 'phone': - return 'smartphone-symbolic'; - case 'tablet': - return 'tablet-symbolic'; - case 'tv': - return 'tv-symbolic'; - case 'desktop': - default: - return 'computer-symbolic'; - } - } - - get service() { - if (this._service === undefined) - this._service = Gio.Application.get_default(); - - return this._service; - } - - get type() { - return this.settings.get_string('type'); - } - - _migratePlugins() { - const deprecated = ['photo']; - const supported = this.settings - .get_strv('supported-plugins') - .filter(name => !deprecated.includes(name)); - - this.settings.set_strv('supported-plugins', supported); - } - - _handleIdentity(packet) { - this.freeze_notify(); - - // If we're connected, record the reconnect URI - if (this.channel !== null) - this.settings.set_string('last-connection', this.channel.address); - - // The type won't change, but it might not be properly set yet - if (this.type !== packet.body.deviceType) { - this.settings.set_string('type', packet.body.deviceType); - this.notify('type'); - this.notify('icon-name'); - } - - // The name may change so we check and notify if so - if (this.name !== packet.body.deviceName) { - this.settings.set_string('name', packet.body.deviceName); - this.notify('name'); - } - - // Packets - const incoming = packet.body.incomingCapabilities.sort(); - const outgoing = packet.body.outgoingCapabilities.sort(); - const inc = this.settings.get_strv('incoming-capabilities'); - const out = this.settings.get_strv('outgoing-capabilities'); - - // Only write GSettings if something has changed - if (incoming.join('') !== inc.join('') || outgoing.join('') !== out.join('')) { - this.settings.set_strv('incoming-capabilities', incoming); - this.settings.set_strv('outgoing-capabilities', outgoing); - } - - // Determine supported plugins by matching incoming to outgoing types - const supported = []; - - for (const name in plugins) { - const meta = plugins[name].Metadata; - - if (meta === undefined) - continue; - - // If we can handle packets it sends or send packets it can handle - if (meta.incomingCapabilities.some(t => outgoing.includes(t)) || - meta.outgoingCapabilities.some(t => incoming.includes(t))) - supported.push(name); - } - - // Only write GSettings if something has changed - const currentSupported = this.settings.get_strv('supported-plugins'); - - if (currentSupported.join('') !== supported.sort().join('')) - this.settings.set_strv('supported-plugins', supported); - - this.thaw_notify(); - } - - /** - * Set the channel and start sending/receiving packets. If %null is passed - * the device becomes disconnected. - * - * @param {Core.Channel} [channel] - The new channel - */ - setChannel(channel = null) { - if (this.channel === channel) - return; - - if (this.channel !== null) - this.channel.close(); - - this._channel = channel; - - // If we've disconnected empty the queue, otherwise restart the read - // loop and update the device metadata - if (this.channel === null) { - this._outputQueue.length = 0; - } else { - this._handleIdentity(this.channel.identity); - this._readLoop(channel); - } - - // The connected state didn't change - if (this.connected === !!this.channel) - return; - - // Notify and trigger plugins - this._connected = !!this.channel; - this.notify('connected'); - this._triggerPlugins(); - } - - async _readLoop(channel) { - try { - let packet = null; - - while ((packet = await this.channel.readPacket())) { - debug(packet, this.name); - this.handlePacket(packet); - } - } catch (e) { - if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) - debug(e, this.name); - - if (this.channel === channel) - this.setChannel(null); - } - } - - _processExit(proc, result) { - try { - proc.wait_check_finish(result); - } catch (e) { - debug(e); - } - - this.delete(proc); - } - - /** - * Launch a subprocess for the device. If the device becomes unpaired, it is - * assumed the device is no longer trusted and all subprocesses will be - * killed. - * - * @param {string[]} args - process arguments - * @param {Gio.Cancellable} [cancellable] - optional cancellable - * @return {Gio.Subprocess} The subprocess - */ - launchProcess(args, cancellable = null) { - if (this._launcher === undefined) { - const application = GLib.build_filenamev([ - Config.PACKAGE_DATADIR, - 'service', - 'daemon.js', - ]); - - this._launcher = new Gio.SubprocessLauncher(); - this._launcher.setenv('GSCONNECT', application, false); - this._launcher.setenv('GSCONNECT_DEVICE_ID', this.id, false); - this._launcher.setenv('GSCONNECT_DEVICE_NAME', this.name, false); - this._launcher.setenv('GSCONNECT_DEVICE_ICON', this.icon_name, false); - this._launcher.setenv( - 'GSCONNECT_DEVICE_DBUS', - `${Config.APP_PATH}/Device/${this.id.replace(/\W+/g, '_')}`, - false - ); - } - - // Create and track the process - const proc = this._launcher.spawnv(args); - proc.wait_check_async(cancellable, this._processExit.bind(this._procs)); - this._procs.add(proc); - - return proc; - } - - /** - * Handle a packet and pass it to the appropriate plugin. - * - * @param {Core.Packet} packet - The incoming packet object - * @return {undefined} no return value - */ - handlePacket(packet) { - try { - if (packet.type === 'kdeconnect.pair') - return this._handlePair(packet); - - // The device must think we're paired; inform it we are not - if (!this.paired) - return this.unpair(); - - const handler = this._handlers.get(packet.type); - - if (handler !== undefined) - handler.handlePacket(packet); - else - debug(`Unsupported packet type (${packet.type})`, this.name); - } catch (e) { - debug(e, this.name); - } - } - - /** - * Send a packet to the device. - * - * @param {Object} packet - An object of packet data... - */ - async sendPacket(packet) { - try { - if (!this.connected) - return; - - if (!this.paired && packet.type !== 'kdeconnect.pair') - return; - - this._outputQueue.push(new Core.Packet(packet)); - - if (this._outputLock) - return; - - this._outputLock = true; - let next; - - while ((next = this._outputQueue.shift())) { - await this.channel.sendPacket(next); - debug(next, this.name); - } - - this._outputLock = false; - } catch (e) { - if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) - debug(e, this.name); - - this._outputLock = false; - } - } - - /** - * Actions - */ - _registerActions() { - // Pairing notification actions - const acceptPair = new Gio.SimpleAction({name: 'pair'}); - acceptPair.connect('activate', this.pair.bind(this)); - this.add_action(acceptPair); - - const rejectPair = new Gio.SimpleAction({name: 'unpair'}); - rejectPair.connect('activate', this.unpair.bind(this)); - this.add_action(rejectPair); - - // Transfer notification actions - const cancelTransfer = new Gio.SimpleAction({ - name: 'cancelTransfer', - parameter_type: new GLib.VariantType('s'), - }); - cancelTransfer.connect('activate', this.cancelTransfer.bind(this)); - this.add_action(cancelTransfer); - - const openPath = new Gio.SimpleAction({ - name: 'openPath', - parameter_type: new GLib.VariantType('s'), - }); - openPath.connect('activate', this.openPath); - this.add_action(openPath); - - const showPathInFolder = new Gio.SimpleAction({ - name: 'showPathInFolder', - parameter_type: new GLib.VariantType('s'), - }); - showPathInFolder.connect('activate', this.showPathInFolder); - this.add_action(showPathInFolder); - - // Preference helpers - const clearCache = new Gio.SimpleAction({ - name: 'clearCache', - parameter_type: null, - }); - clearCache.connect('activate', this._clearCache.bind(this)); - this.add_action(clearCache); - } - - /** - * Get the position of a GMenuItem with @actionName in the top level of the - * device menu. - * - * @param {string} actionName - An action name with scope (eg. device.foo) - * @return {number} An 0-based index or -1 if not found - */ - getMenuAction(actionName) { - for (let i = 0, len = this.menu.get_n_items(); i < len; i++) { - try { - const val = this.menu.get_item_attribute_value(i, 'action', null); - - if (val.unpack() === actionName) - return i; - } catch (e) { - continue; - } - } - - return -1; - } - - /** - * Add a GMenuItem to the top level of the device menu - * - * @param {Gio.MenuItem} menuItem - A GMenuItem - * @param {number} [index] - The position to place the item - * @return {number} The position the item was placed - */ - addMenuItem(menuItem, index = -1) { - try { - if (index > -1) { - this.menu.insert_item(index, menuItem); - return index; - } - - this.menu.append_item(menuItem); - return this.menu.get_n_items(); - } catch (e) { - debug(e, this.name); - return -1; - } - } - - /** - * Add a Device GAction to the top level of the device menu - * - * @param {Gio.Action} action - A GAction - * @param {number} [index] - The position to place the item - * @param {string} label - A label for the item - * @param {string} icon_name - A themed icon name for the item - * @return {number} The position the item was placed - */ - addMenuAction(action, index = -1, label, icon_name) { - try { - const item = new Gio.MenuItem(); - - if (label) - item.set_label(label); - - if (icon_name) - item.set_icon(new Gio.ThemedIcon({name: icon_name})); - - item.set_attribute_value( - 'hidden-when', - new GLib.Variant('s', 'action-disabled') - ); - - item.set_detailed_action(`device.${action.name}`); - - return this.addMenuItem(item, index); - } catch (e) { - debug(e, this.name); - return -1; - } - } - - /** - * Remove a GAction from the top level of the device menu by action name - * - * @param {string} actionName - A GAction name, including scope - * @return {number} The position the item was removed from or -1 - */ - removeMenuAction(actionName) { - try { - const index = this.getMenuAction(actionName); - - if (index > -1) - this.menu.remove(index); - - return index; - } catch (e) { - debug(e, this.name); - return -1; - } - } - - /** - * Withdraw a device notification. - * - * @param {string} id - Id for the notification to withdraw - */ - hideNotification(id) { - if (this.service === null) - return; - - this.service.withdraw_notification(`${this.id}|${id}`); - } - - /** - * Show a device notification. - * - * @param {Object} params - A dictionary of notification parameters - * @param {number} [params.id] - A UNIX epoch timestamp (ms) - * @param {string} [params.title] - A title - * @param {string} [params.body] - A body - * @param {Gio.Icon} [params.icon] - An icon - * @param {Gio.NotificationPriority} [params.priority] - The priority - * @param {Array} [params.actions] - A dictionary of action parameters - * @param {Array} [params.buttons] - An Array of buttons - */ - showNotification(params) { - if (this.service === null) - return; - - // KDE Connect on Android can sometimes give an undefined for params.body - Object.keys(params) - .forEach(key => params[key] === undefined && delete params[key]); - - params = Object.assign({ - id: Date.now(), - title: this.name, - body: '', - icon: new Gio.ThemedIcon({name: this.icon_name}), - priority: Gio.NotificationPriority.NORMAL, - action: null, - buttons: [], - }, params); - - const notif = new Gio.Notification(); - notif.set_title(params.title); - notif.set_body(params.body); - notif.set_icon(params.icon); - notif.set_priority(params.priority); - - // Default Action - if (params.action) { - const hasParameter = (params.action.parameter !== null); - - if (!hasParameter) - params.action.parameter = new GLib.Variant('s', ''); - - notif.set_default_action_and_target( - 'app.device', - new GLib.Variant('(ssbv)', [ - this.id, - params.action.name, - hasParameter, - params.action.parameter, - ]) - ); - } - - // Buttons - for (const button of params.buttons) { - const hasParameter = (button.parameter !== null); - - if (!hasParameter) - button.parameter = new GLib.Variant('s', ''); - - notif.add_button_with_target( - button.label, - 'app.device', - new GLib.Variant('(ssbv)', [ - this.id, - button.action, - hasParameter, - button.parameter, - ]) - ); - } - - this.service.send_notification(`${this.id}|${params.id}`, notif); - } - - /** - * Cancel an ongoing file transfer. - * - * @param {Gio.Action} action - The GAction - * @param {GLib.Variant} parameter - The activation parameter - */ - cancelTransfer(action, parameter) { - try { - const uuid = parameter.unpack(); - const transfer = this._transfers.get(uuid); - - if (transfer === undefined) - return; - - this._transfers.delete(uuid); - transfer.cancel(); - } catch (e) { - logError(e, this.name); - } - } - - /** - * Create a transfer object. - * - * @return {Core.Transfer} A new transfer - */ - createTransfer() { - const transfer = new Core.Transfer({device: this}); - - // Track the transfer - this._transfers.set(transfer.uuid, transfer); - - transfer.connect('notify::completed', (transfer) => { - this._transfers.delete(transfer.uuid); - }); - - return transfer; - } - - /** - * Reject the transfer payload described by @packet. - * - * @param {Core.Packet} packet - A packet - * @return {Promise} A promise for the operation - */ - rejectTransfer(packet) { - if (!packet || !packet.hasPayload()) - return; - - return this.channel.rejectTransfer(packet); - } - - openPath(action, parameter) { - const path = parameter.unpack(); - - // Normalize paths to URIs, assuming local file - const uri = path.includes('://') ? path : `file://${path}`; - Gio.AppInfo.launch_default_for_uri_async(uri, null, null, null); - } - - showPathInFolder(action, parameter) { - const path = parameter.unpack(); - const uri = path.includes('://') ? path : `file://${path}`; - - const connection = Gio.DBus.session; - connection.call( - 'org.freedesktop.FileManager1', - '/org/freedesktop/FileManager1', - 'org.freedesktop.FileManager1', - 'ShowItems', - new GLib.Variant('(ass)', [[uri], 's']), - null, - Gio.DBusCallFlags.NONE, - -1, - null, - (connection, res) => { - try { - connection.call_finish(res); - } catch (e) { - Gio.DBusError.strip_remote_error(e); - logError(e); - } - } - ); - } - - _clearCache(action, parameter) { - for (const plugin of this._plugins.values()) { - try { - plugin.clearCache(); - } catch (e) { - debug(e, this.name); - } - } - } - - /** - * Pair request handler - * - * @param {Core.Packet} packet - A complete kdeconnect.pair packet - */ - _handlePair(packet) { - // A pair has been requested/confirmed - if (packet.body.pair) { - // The device is accepting our request - if (this._outgoingPairRequest) { - this._setPaired(true); - this._loadPlugins(); - - // The device thinks we're unpaired - } else if (this.paired) { - this._setPaired(true); - this.sendPacket({ - type: 'kdeconnect.pair', - body: {pair: true}, - }); - this._triggerPlugins(); - - // The device is requesting pairing - } else { - this._notifyPairRequest(); - } - // Device is requesting unpairing/rejecting our request - } else { - this._setPaired(false); - this._unloadPlugins(); - } - } - - /** - * Notify the user of an incoming pair request and set a 30s timeout - */ - _notifyPairRequest() { - // Reset any active request - this._resetPairRequest(); - - this.showNotification({ - id: 'pair-request', - // TRANSLATORS: eg. Pair Request from Google Pixel - title: _('Pair Request from %s').format(this.name), - body: this.encryption_info, - icon: new Gio.ThemedIcon({name: 'channel-insecure-symbolic'}), - priority: Gio.NotificationPriority.URGENT, - buttons: [ - { - action: 'unpair', - label: _('Reject'), - parameter: null, - }, - { - action: 'pair', - label: _('Accept'), - parameter: null, - }, - ], - }); - - // Start a 30s countdown - this._incomingPairRequest = GLib.timeout_add_seconds( - GLib.PRIORITY_DEFAULT, - 30, - this._setPaired.bind(this, false) - ); - } - - /** - * Reset pair request timeouts and withdraw any notifications - */ - _resetPairRequest() { - this.hideNotification('pair-request'); - - if (this._incomingPairRequest) { - GLib.source_remove(this._incomingPairRequest); - this._incomingPairRequest = 0; - } - - if (this._outgoingPairRequest) { - GLib.source_remove(this._outgoingPairRequest); - this._outgoingPairRequest = 0; - } - } - - /** - * Set the internal paired state of the device and emit ::notify - * - * @param {boolean} paired - The paired state to set - */ - _setPaired(paired) { - this._resetPairRequest(); - - // For TCP connections we store or reset the TLS Certificate - if (this.connection_type === 'lan') { - if (paired) { - this.settings.set_string( - 'certificate-pem', - this.channel.peer_certificate.certificate_pem - ); - } else { - this.settings.reset('certificate-pem'); - } - } - - // If we've become unpaired, stop all subprocesses and transfers - if (!paired) { - for (const proc of this._procs) - proc.force_exit(); - - this._procs.clear(); - - for (const transfer of this._transfers.values()) - transfer.close(); - - this._transfers.clear(); - } - - this.settings.set_boolean('paired', paired); - this.notify('paired'); - } - - /** - * Send or accept an incoming pair request; also exported as a GAction - */ - pair() { - try { - // If we're accepting an incoming pair request, set the internal - // paired state and send the confirmation before loading plugins. - if (this._incomingPairRequest) { - this._setPaired(true); - - this.sendPacket({ - type: 'kdeconnect.pair', - body: {pair: true}, - }); - - this._loadPlugins(); - - // If we're initiating an outgoing pair request, be sure the timer - // is reset before sending the request and setting a 30s timeout. - } else if (!this.paired) { - this._resetPairRequest(); - - this.sendPacket({ - type: 'kdeconnect.pair', - body: {pair: true}, - }); - - this._outgoingPairRequest = GLib.timeout_add_seconds( - GLib.PRIORITY_DEFAULT, - 30, - this._setPaired.bind(this, false) - ); - } - } catch (e) { - logError(e, this.name); - } - } - - /** - * Unpair or reject an incoming pair request; also exported as a GAction - */ - unpair() { - try { - if (this.connected) { - this.sendPacket({ - type: 'kdeconnect.pair', - body: {pair: false}, - }); - } - - this._setPaired(false); - this._unloadPlugins(); - } catch (e) { - logError(e, this.name); - } - } - - /* - * Plugin Functions - */ - _onAllowedPluginsChanged(settings) { - const disabled = this.settings.get_strv('disabled-plugins'); - const supported = this.settings.get_strv('supported-plugins'); - const allowed = supported.filter(name => !disabled.includes(name)); - - // Unload any plugins that are disabled or unsupported - this._plugins.forEach(plugin => { - if (!allowed.includes(plugin.name)) - this._unloadPlugin(plugin.name); - }); - - // Make sure we change the contacts store if the plugin was disabled - if (!allowed.includes('contacts')) - this.notify('contacts'); - - // Load allowed plugins - for (const name of allowed) - this._loadPlugin(name); - } - - _loadPlugin(name) { - let handler, plugin; - - try { - if (this.paired && !this._plugins.has(name)) { - // Instantiate the handler - handler = plugins[name]; - plugin = new handler.default(this); - - // Register packet handlers - for (const packetType of handler.Metadata.incomingCapabilities) - this._handlers.set(packetType, plugin); - - // Register plugin - this._plugins.set(name, plugin); - - // Run the connected()/disconnected() handler - if (this.connected) - plugin.connected(); - else - plugin.disconnected(); - } - } catch (e) { - if (plugin !== undefined) - plugin.destroy(); - - if (this.service !== null) - this.service.notify_error(e); - else - logError(e, this.name); - } - } - - async _loadPlugins() { - const disabled = this.settings.get_strv('disabled-plugins'); - - for (const name of this.settings.get_strv('supported-plugins')) { - if (!disabled.includes(name)) - await this._loadPlugin(name); - } - } - - _unloadPlugin(name) { - let handler, plugin; - - try { - if (this._plugins.has(name)) { - // Unregister packet handlers - handler = plugins[name]; - - for (const type of handler.Metadata.incomingCapabilities) - this._handlers.delete(type); - - // Unregister plugin - plugin = this._plugins.get(name); - this._plugins.delete(name); - plugin.destroy(); - } - } catch (e) { - logError(e, this.name); - } - } - - async _unloadPlugins() { - for (const name of this._plugins.keys()) - await this._unloadPlugin(name); - } - - _triggerPlugins() { - for (const plugin of this._plugins.values()) { - if (this.connected) - plugin.connected(); - else - plugin.disconnected(); - } - } - - destroy() { - // Drop the default contacts store if we were using it - if (this._contacts !== undefined) - this._contacts = Components.release('contacts'); - - // Close the channel if still connected - if (this.channel !== null) - this.channel.close(); - - // Synchronously destroy plugins - this._plugins.forEach(plugin => plugin.destroy()); - this._plugins.clear(); - - // Dispose GSettings - this.settings.disconnect(this._disabledPluginsChangedId); - this.settings.disconnect(this._supportedPluginsChangedId); - this.settings.run_dispose(); - - GObject.signal_handlers_destroy(this); - } -}); - -export default Device; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/executable_daemon.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/executable_daemon.js deleted file mode 100644 index 1ddb3569..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/executable_daemon.js +++ /dev/null @@ -1,702 +0,0 @@ -#!/usr/bin/env -S gjs -m - -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gdk from 'gi://Gdk?version=3.0'; -import 'gi://GdkPixbuf?version=2.0'; -import Gio from 'gi://Gio?version=2.0'; -import 'gi://GIRepository?version=2.0'; -import GLib from 'gi://GLib?version=2.0'; -import GObject from 'gi://GObject?version=2.0'; -import Gtk from 'gi://Gtk?version=3.0'; -import 'gi://Pango?version=1.0'; - -import system from 'system'; - -import './init.js'; - -import Config from '../config.js'; -import Manager from './manager.js'; -import * as ServiceUI from './ui/service.js'; - -import('gi://GioUnix?version=2.0').catch(() => {}); // Set version for optional dependency - - -/** - * Class representing the GSConnect service daemon. - */ -const Service = GObject.registerClass({ - GTypeName: 'GSConnectService', -}, class Service extends Gtk.Application { - - _init() { - super._init({ - application_id: 'org.gnome.Shell.Extensions.GSConnect', - flags: Gio.ApplicationFlags.HANDLES_OPEN, - resource_base_path: '/org/gnome/Shell/Extensions/GSConnect', - }); - - GLib.set_prgname('gsconnect'); - GLib.set_application_name('GSConnect'); - - // Command-line - this._initOptions(); - } - - get settings() { - if (this._settings === undefined) { - this._settings = new Gio.Settings({ - settings_schema: Config.GSCHEMA.lookup(Config.APP_ID, true), - }); - } - - return this._settings; - } - - /* - * GActions - */ - _initActions() { - const actions = [ - ['connect', this._identify.bind(this), new GLib.VariantType('s')], - ['device', this._device.bind(this), new GLib.VariantType('(ssbv)')], - ['error', this._error.bind(this), new GLib.VariantType('a{ss}')], - ['preferences', this._preferences, null], - ['quit', () => this.quit(), null], - ['refresh', this._identify.bind(this), null], - ]; - - for (const [name, callback, type] of actions) { - const action = new Gio.SimpleAction({ - name: name, - parameter_type: type, - }); - action.connect('activate', callback); - this.add_action(action); - } - } - - /** - * A wrapper for Device GActions. This is used to route device notification - * actions to their device, since GNotifications need an 'app' level action. - * - * @param {Gio.Action} action - The GAction - * @param {GLib.Variant} parameter - The activation parameter - */ - _device(action, parameter) { - try { - parameter = parameter.unpack(); - - // Select the appropriate device(s) - let devices; - const id = parameter[0].unpack(); - - if (id === '*') - devices = this.manager.devices.values(); - else - devices = [this.manager.devices.get(id)]; - - // Unpack the action data and activate the action - const name = parameter[1].unpack(); - const target = parameter[2].unpack() ? parameter[3].unpack() : null; - - for (const device of devices) - device.activate_action(name, target); - } catch (e) { - logError(e); - } - } - - _error(action, parameter) { - try { - const error = parameter.deepUnpack(); - - // If there's a URL, we have better information in the Wiki - if (error.url !== undefined) { - Gio.AppInfo.launch_default_for_uri_async( - error.url, - null, - null, - null - ); - return; - } - - const dialog = new ServiceUI.ErrorDialog(error); - dialog.present(); - } catch (e) { - logError(e); - } - } - - _identify(action, parameter) { - try { - let uri = null; - - if (parameter instanceof GLib.Variant) - uri = parameter.unpack(); - - this.manager.identify(uri); - } catch (e) { - logError(e); - } - } - - _preferences() { - Gio.Subprocess.new( - [`${Config.PACKAGE_DATADIR}/gsconnect-preferences`], - Gio.SubprocessFlags.NONE - ); - } - - /** - * Report a service-level error - * - * @param {Object} error - An Error or object with name, message and stack - */ - notify_error(error) { - try { - // Always log the error - logError(error); - - // Create an new notification - let id, body, priority; - const notif = new Gio.Notification(); - const icon = new Gio.ThemedIcon({name: 'dialog-error'}); - let target = null; - - if (error.name === undefined) - error.name = 'Error'; - - if (error.url !== undefined) { - id = error.url; - body = _('Click for help troubleshooting'); - priority = Gio.NotificationPriority.URGENT; - - target = new GLib.Variant('a{ss}', { - name: error.name.trim(), - message: error.message.trim(), - stack: error.stack.trim(), - url: error.url, - }); - } else { - id = error.message.trim(); - body = _('Click for more information'); - priority = Gio.NotificationPriority.HIGH; - - target = new GLib.Variant('a{ss}', { - name: error.name.trim(), - message: error.message.trim(), - stack: error.stack.trim(), - }); - } - - notif.set_title(`GSConnect: ${error.name.trim()}`); - notif.set_body(body); - notif.set_icon(icon); - notif.set_priority(priority); - notif.set_default_action_and_target('app.error', target); - - this.send_notification(id, notif); - } catch (e) { - logError(e); - } - } - - vfunc_activate() { - super.vfunc_activate(); - } - - vfunc_startup() { - super.vfunc_startup(); - - this.hold(); - - // Watch *this* file and stop the service if it's updated/uninstalled - this._serviceMonitor = Gio.File.new_for_path( - `${Config.PACKAGE_DATADIR}/service/daemon.js` - ).monitor(Gio.FileMonitorFlags.WATCH_MOVES, null); - this._serviceMonitor.connect('changed', () => this.quit()); - - // Init some resources - const provider = new Gtk.CssProvider(); - provider.load_from_resource(`${Config.APP_PATH}/application.css`); - Gtk.StyleContext.add_provider_for_screen( - Gdk.Screen.get_default(), - provider, - Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION - ); - - // Ensure our handlers are registered - try { - const appInfo = Gio.DesktopAppInfo.new(`${Config.APP_ID}.desktop`); - appInfo.add_supports_type('x-scheme-handler/sms'); - appInfo.add_supports_type('x-scheme-handler/tel'); - } catch (e) { - debug(e); - } - - // GActions & GSettings - this._initActions(); - - this.manager.start(); - } - - vfunc_dbus_register(connection, object_path) { - if (!super.vfunc_dbus_register(connection, object_path)) - return false; - - this.manager = new Manager({ - connection: connection, - object_path: object_path, - }); - - return true; - } - - vfunc_dbus_unregister(connection, object_path) { - this.manager.destroy(); - - super.vfunc_dbus_unregister(connection, object_path); - } - - vfunc_open(files, hint) { - super.vfunc_open(files, hint); - - for (const file of files) { - let action, parameter, title; - - try { - switch (file.get_uri_scheme()) { - case 'sms': - title = _('Send SMS'); - action = 'uriSms'; - parameter = new GLib.Variant('s', file.get_uri()); - break; - - case 'tel': - title = _('Dial Number'); - action = 'shareUri'; - parameter = new GLib.Variant('s', file.get_uri()); - break; - - case 'file': - title = _('Share File'); - action = 'shareFile'; - parameter = new GLib.Variant('(sb)', [file.get_uri(), false]); - break; - - default: - throw new Error(`Unsupported URI: ${file.get_uri()}`); - } - - // Show chooser dialog - new ServiceUI.DeviceChooser({ - title: title, - action_name: action, - action_target: parameter, - }); - } catch (e) { - logError(e, `GSConnect: Opening ${file.get_uri()}`); - } - } - } - - vfunc_shutdown() { - // Dispose GSettings - if (this._settings !== undefined) - this.settings.run_dispose(); - - this.manager.stop(); - - // Exhaust the event loop to ensure any pending operations complete - const context = GLib.MainContext.default(); - - while (context.iteration(false)) - continue; - - // Force a GC to prevent any more calls back into JS, then chain-up - system.gc(); - super.vfunc_shutdown(); - } - - /* - * CLI - */ - _initOptions() { - /* - * Device Listings - */ - this.add_main_option( - 'list-devices', - 'l'.charCodeAt(0), - GLib.OptionFlags.NONE, - GLib.OptionArg.NONE, - _('List available devices'), - null - ); - - this.add_main_option( - 'list-all', - 'a'.charCodeAt(0), - GLib.OptionFlags.NONE, - GLib.OptionArg.NONE, - _('List all devices'), - null - ); - - this.add_main_option( - 'device', - 'd'.charCodeAt(0), - GLib.OptionFlags.NONE, - GLib.OptionArg.STRING, - _('Target Device'), - '' - ); - - /** - * Pairing - */ - this.add_main_option( - 'pair', - 0, - GLib.OptionFlags.NONE, - GLib.OptionArg.NONE, - _('Pair'), - null - ); - - this.add_main_option( - 'unpair', - 0, - GLib.OptionFlags.NONE, - GLib.OptionArg.NONE, - _('Unpair'), - null - ); - - /* - * Messaging - */ - this.add_main_option( - 'message', - 0, - GLib.OptionFlags.NONE, - GLib.OptionArg.STRING_ARRAY, - _('Send SMS'), - '' - ); - - this.add_main_option( - 'message-body', - 0, - GLib.OptionFlags.NONE, - GLib.OptionArg.STRING, - _('Message Body'), - '' - ); - - /* - * Notifications - */ - this.add_main_option( - 'notification', - 0, - GLib.OptionFlags.NONE, - GLib.OptionArg.STRING, - _('Send Notification'), - '' - ); - - this.add_main_option( - 'notification-appname', - 0, - GLib.OptionFlags.NONE, - GLib.OptionArg.STRING, - _('Notification App Name'), - '<name>' - ); - - this.add_main_option( - 'notification-body', - 0, - GLib.OptionFlags.NONE, - GLib.OptionArg.STRING, - _('Notification Body'), - '<text>' - ); - - this.add_main_option( - 'notification-icon', - 0, - GLib.OptionFlags.NONE, - GLib.OptionArg.STRING, - _('Notification Icon'), - '<icon-name>' - ); - - this.add_main_option( - 'notification-id', - 0, - GLib.OptionFlags.NONE, - GLib.OptionArg.STRING, - _('Notification ID'), - '<id>' - ); - - this.add_main_option( - 'ping', - 0, - GLib.OptionFlags.NONE, - GLib.OptionArg.NONE, - _('Ping'), - null - ); - - this.add_main_option( - 'ring', - 0, - GLib.OptionFlags.NONE, - GLib.OptionArg.NONE, - _('Ring'), - null - ); - - /* - * Sharing - */ - this.add_main_option( - 'share-file', - 0, - GLib.OptionFlags.NONE, - GLib.OptionArg.FILENAME_ARRAY, - _('Share File'), - '<filepath|URI>' - ); - - this.add_main_option( - 'share-link', - 0, - GLib.OptionFlags.NONE, - GLib.OptionArg.STRING_ARRAY, - _('Share Link'), - '<URL>' - ); - - this.add_main_option( - 'share-text', - 0, - GLib.OptionFlags.NONE, - GLib.OptionArg.STRING, - _('Share Text'), - '<text>' - ); - - /* - * Misc - */ - this.add_main_option( - 'version', - 'v'.charCodeAt(0), - GLib.OptionFlags.NONE, - GLib.OptionArg.NONE, - _('Show release version'), - null - ); - } - - _cliAction(id, name, parameter = null) { - const parameters = []; - - if (parameter instanceof GLib.Variant) - parameters[0] = parameter; - - id = id.replace(/\W+/g, '_'); - - Gio.DBus.session.call_sync( - 'org.gnome.Shell.Extensions.GSConnect', - `/org/gnome/Shell/Extensions/GSConnect/Device/${id}`, - 'org.gtk.Actions', - 'Activate', - GLib.Variant.new('(sava{sv})', [name, parameters, {}]), - null, - Gio.DBusCallFlags.NONE, - -1, - null - ); - } - - _cliListDevices(full = true) { - const result = Gio.DBus.session.call_sync( - 'org.gnome.Shell.Extensions.GSConnect', - '/org/gnome/Shell/Extensions/GSConnect', - 'org.freedesktop.DBus.ObjectManager', - 'GetManagedObjects', - null, - null, - Gio.DBusCallFlags.NONE, - -1, - null - ); - - const variant = result.unpack()[0].unpack(); - let device; - - for (let object of Object.values(variant)) { - object = object.recursiveUnpack(); - device = object['org.gnome.Shell.Extensions.GSConnect.Device']; - - if (full) - print(`${device.Id}\t${device.Name}\t${device.Connected}\t${device.Paired}`); - else if (device.Connected && device.Paired) - print(device.Id); - } - } - - _cliMessage(id, options) { - if (!options.contains('message-body')) - throw new TypeError('missing --message-body option'); - - // TODO: currently we only support single-recipient messaging - const addresses = options.lookup_value('message', null).deepUnpack(); - const body = options.lookup_value('message-body', null).deepUnpack(); - - this._cliAction( - id, - 'sendSms', - GLib.Variant.new('(ss)', [addresses[0], body]) - ); - } - - _cliNotify(id, options) { - const title = options.lookup_value('notification', null).unpack(); - let body = ''; - let icon = null; - let nid = `${Date.now()}`; - let appName = 'GSConnect CLI'; - - if (options.contains('notification-id')) - nid = options.lookup_value('notification-id', null).unpack(); - - if (options.contains('notification-body')) - body = options.lookup_value('notification-body', null).unpack(); - - if (options.contains('notification-appname')) - appName = options.lookup_value('notification-appname', null).unpack(); - - if (options.contains('notification-icon')) { - icon = options.lookup_value('notification-icon', null).unpack(); - icon = Gio.Icon.new_for_string(icon); - } else { - icon = new Gio.ThemedIcon({ - name: 'org.gnome.Shell.Extensions.GSConnect', - }); - } - - const notification = new GLib.Variant('a{sv}', { - appName: GLib.Variant.new_string(appName), - id: GLib.Variant.new_string(nid), - title: GLib.Variant.new_string(title), - text: GLib.Variant.new_string(body), - ticker: GLib.Variant.new_string(`${title}: ${body}`), - time: GLib.Variant.new_string(`${Date.now()}`), - isClearable: GLib.Variant.new_boolean(true), - icon: icon.serialize(), - }); - - this._cliAction(id, 'sendNotification', notification); - } - - _cliShareFile(device, options) { - const files = options.lookup_value('share-file', null).deepUnpack(); - - for (let file of files) { - file = new TextDecoder().decode(file); - this._cliAction(device, 'shareFile', GLib.Variant.new('(sb)', [file, false])); - } - } - - _cliShareLink(device, options) { - const uris = options.lookup_value('share-link', null).unpack(); - - for (const uri of uris) - this._cliAction(device, 'shareUri', uri); - } - - _cliShareText(device, options) { - const text = options.lookup_value('share-text', null).unpack(); - - this._cliAction(device, 'shareText', GLib.Variant.new_string(text)); - } - - vfunc_handle_local_options(options) { - try { - if (options.contains('version')) { - print(`GSConnect ${Config.PACKAGE_VERSION}`); - return 0; - } - - this.register(null); - - if (options.contains('list-devices')) { - this._cliListDevices(false); - return 0; - } - - if (options.contains('list-all')) { - this._cliListDevices(true); - return 0; - } - - // We need a device for anything else; exit since this is probably - // the daemon being started. - if (!options.contains('device')) - return -1; - - const id = options.lookup_value('device', null).unpack(); - - // Pairing - if (options.contains('pair')) { - this._cliAction(id, 'pair'); - return 0; - } - - if (options.contains('unpair')) { - this._cliAction(id, 'unpair'); - return 0; - } - - // Plugins - if (options.contains('message')) - this._cliMessage(id, options); - - if (options.contains('notification')) - this._cliNotify(id, options); - - if (options.contains('ping')) - this._cliAction(id, 'ping', GLib.Variant.new_string('')); - - if (options.contains('ring')) - this._cliAction(id, 'ring'); - - if (options.contains('share-file')) - this._cliShareFile(id, options); - - if (options.contains('share-link')) - this._cliShareLink(id, options); - - if (options.contains('share-text')) - this._cliShareText(id, options); - - return 0; - } catch (e) { - logError(e); - return 1; - } - } -}); - -await (new Service()).runAsync([system.programInvocationName].concat(ARGV)); - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/executable_nativeMessagingHost.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/executable_nativeMessagingHost.js deleted file mode 100644 index 297d180a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/executable_nativeMessagingHost.js +++ /dev/null @@ -1,225 +0,0 @@ -#!/usr/bin/env -S gjs -m - -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio?version=2.0'; -import GLib from 'gi://GLib?version=2.0'; -import GObject from 'gi://GObject?version=2.0'; - -import system from 'system'; - -// Retain compatibility with GLib < 2.80, which lacks GioUnix -let GioUnix; -try { - GioUnix = (await import('gi://GioUnix?version=2.0')).default; -} catch (e) { - GioUnix = { - InputStream: Gio.UnixInputStream, - OutputStream: Gio.UnixOutputStream, - }; -} - - -const NativeMessagingHost = GObject.registerClass({ - GTypeName: 'GSConnectNativeMessagingHost', -}, class NativeMessagingHost extends Gio.Application { - - _init() { - super._init({ - application_id: 'org.gnome.Shell.Extensions.GSConnect.NativeMessagingHost', - flags: Gio.ApplicationFlags.NON_UNIQUE, - }); - } - - get devices() { - if (this._devices === undefined) - this._devices = {}; - - return this._devices; - } - - vfunc_activate() { - super.vfunc_activate(); - } - - vfunc_startup() { - super.vfunc_startup(); - this.hold(); - - // IO Channels - this._stdin = new Gio.DataInputStream({ - base_stream: new GioUnix.InputStream({fd: 0}), - byte_order: Gio.DataStreamByteOrder.HOST_ENDIAN, - }); - - this._stdout = new Gio.DataOutputStream({ - base_stream: new GioUnix.OutputStream({fd: 1}), - byte_order: Gio.DataStreamByteOrder.HOST_ENDIAN, - }); - - const source = this._stdin.base_stream.create_source(null); - source.set_callback(this.receive.bind(this)); - source.attach(null); - - // Device Manager - try { - this._manager = Gio.DBusObjectManagerClient.new_for_bus_sync( - Gio.BusType.SESSION, - Gio.DBusObjectManagerClientFlags.DO_NOT_AUTO_START, - 'org.gnome.Shell.Extensions.GSConnect', - '/org/gnome/Shell/Extensions/GSConnect', - null, - null - ); - } catch (e) { - logError(e); - this.quit(); - } - - // Add currently managed devices - for (const object of this._manager.get_objects()) { - for (const iface of object.get_interfaces()) - this._onInterfaceAdded(this._manager, object, iface); - } - - // Watch for new and removed devices - this._manager.connect( - 'interface-added', - this._onInterfaceAdded.bind(this) - ); - this._manager.connect( - 'object-removed', - this._onObjectRemoved.bind(this) - ); - - // Watch for device property changes - this._manager.connect( - 'interface-proxy-properties-changed', - this.sendDeviceList.bind(this) - ); - - // Watch for service restarts - this._manager.connect( - 'notify::name-owner', - this.sendDeviceList.bind(this) - ); - - this.send({ - type: 'connected', - data: (this._manager.name_owner !== null), - }); - } - - receive() { - try { - // Read the message - const length = this._stdin.read_int32(null); - const bytes = this._stdin.read_bytes(length, null).toArray(); - const message = JSON.parse(new TextDecoder().decode(bytes)); - - // A request for a list of devices - if (message.type === 'devices') { - this.sendDeviceList(); - - // A request to invoke an action - } else if (message.type === 'share') { - let actionName; - const device = this.devices[message.data.device]; - - if (device) { - if (message.data.action === 'share') - actionName = 'shareUri'; - else if (message.data.action === 'telephony') - actionName = 'shareSms'; - - device.actions.activate_action( - actionName, - new GLib.Variant('s', message.data.url) - ); - } - } - - return GLib.SOURCE_CONTINUE; - } catch (e) { - this.quit(); - } - } - - send(message) { - try { - const data = JSON.stringify(message); - this._stdout.put_int32(data.length, null); - this._stdout.put_string(data, null); - } catch (e) { - this.quit(); - } - } - - sendDeviceList() { - // Inform the WebExtension we're disconnected from the service - if (this._manager && this._manager.name_owner === null) - return this.send({type: 'connected', data: false}); - - // Collect all the devices with supported actions - const available = []; - - for (const device of Object.values(this.devices)) { - const share = device.actions.get_action_enabled('shareUri'); - const telephony = device.actions.get_action_enabled('shareSms'); - - if (share || telephony) { - available.push({ - id: device.g_object_path, - name: device.name, - type: device.type, - share: share, - telephony: telephony, - }); - } - } - - this.send({type: 'devices', data: available}); - } - - _proxyGetter(name) { - try { - return this.get_cached_property(name).unpack(); - } catch (e) { - return null; - } - } - - _onInterfaceAdded(manager, object, iface) { - Object.defineProperties(iface, { - 'name': { - get: this._proxyGetter.bind(iface, 'Name'), - enumerable: true, - }, - // TODO: phase this out for icon-name - 'type': { - get: this._proxyGetter.bind(iface, 'Type'), - enumerable: true, - }, - }); - - iface.actions = Gio.DBusActionGroup.get( - iface.g_connection, - iface.g_name, - iface.g_object_path - ); - - this.devices[iface.g_object_path] = iface; - this.sendDeviceList(); - } - - _onObjectRemoved(manager, object) { - delete this.devices[object.g_object_path]; - this.sendDeviceList(); - } -}); - -// NOTE: must not pass ARGV -await (new NativeMessagingHost()).runAsync([system.programInvocationName]); - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/init.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/init.js deleted file mode 100644 index 313c70bd..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/init.js +++ /dev/null @@ -1,428 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import {watchService} from '../wl_clipboard.js'; - -import Gio from 'gi://Gio'; -import GIRepository from 'gi://GIRepository'; -import GLib from 'gi://GLib'; - -import Config from '../config.js'; -import setup, {setupGettext} from '../utils/setup.js'; - - -// Promise Wrappers -// We don't use top-level await since it returns control flow to importing module, causing bugs -import('gi://EBook').then(({default: EBook}) => { - Gio._promisify(EBook.BookClient, 'connect'); - Gio._promisify(EBook.BookClient.prototype, 'get_view'); - Gio._promisify(EBook.BookClient.prototype, 'get_contacts'); -}).catch(console.debug); -import('gi://EDataServer').then(({default: EDataServer}) => { - Gio._promisify(EDataServer.SourceRegistry, 'new'); -}).catch(console.debug); - -Gio._promisify(Gio.AsyncInitable.prototype, 'init_async'); -Gio._promisify(Gio.DBusConnection.prototype, 'call'); -Gio._promisify(Gio.DBusProxy.prototype, 'call'); -Gio._promisify(Gio.DataInputStream.prototype, 'read_line_async', - 'read_line_finish_utf8'); -Gio._promisify(Gio.File.prototype, 'delete_async'); -Gio._promisify(Gio.File.prototype, 'enumerate_children_async'); -Gio._promisify(Gio.File.prototype, 'load_contents_async'); -Gio._promisify(Gio.File.prototype, 'mount_enclosing_volume'); -Gio._promisify(Gio.File.prototype, 'query_info_async'); -Gio._promisify(Gio.File.prototype, 'read_async'); -Gio._promisify(Gio.File.prototype, 'replace_async'); -Gio._promisify(Gio.File.prototype, 'replace_contents_bytes_async', - 'replace_contents_finish'); -Gio._promisify(Gio.FileEnumerator.prototype, 'next_files_async'); -Gio._promisify(Gio.Mount.prototype, 'unmount_with_operation'); -Gio._promisify(Gio.InputStream.prototype, 'close_async'); -Gio._promisify(Gio.OutputStream.prototype, 'close_async'); -Gio._promisify(Gio.OutputStream.prototype, 'splice_async'); -Gio._promisify(Gio.OutputStream.prototype, 'write_all_async'); -Gio._promisify(Gio.SocketClient.prototype, 'connect_async'); -Gio._promisify(Gio.SocketListener.prototype, 'accept_async'); -Gio._promisify(Gio.Subprocess.prototype, 'communicate_utf8_async'); -Gio._promisify(Gio.Subprocess.prototype, 'wait_check_async'); -Gio._promisify(Gio.TlsConnection.prototype, 'handshake_async'); -Gio._promisify(Gio.DtlsConnection.prototype, 'handshake_async'); - - -// User Directories -Config.CACHEDIR = GLib.build_filenamev([GLib.get_user_cache_dir(), 'gsconnect']); -Config.CONFIGDIR = GLib.build_filenamev([GLib.get_user_config_dir(), 'gsconnect']); -Config.RUNTIMEDIR = GLib.build_filenamev([GLib.get_user_runtime_dir(), 'gsconnect']); - -// Bootstrap -const serviceFolder = GLib.path_get_dirname(GLib.filename_from_uri(import.meta.url)[0]); -const extensionFolder = GLib.path_get_dirname(serviceFolder); -setup(extensionFolder); -setupGettext(); - -if (Config.IS_USER) { - // Infer libdir by assuming gnome-shell shares a common prefix with gjs; - // assume the parent directory if it's not there - let libdir = GIRepository.Repository.get_search_path().find(path => { - return path.endsWith('/gjs/girepository-1.0'); - }).replace('/gjs/girepository-1.0', ''); - - const gsdir = GLib.build_filenamev([libdir, 'gnome-shell']); - - if (!GLib.file_test(gsdir, GLib.FileTest.IS_DIR)) { - const currentDir = `/${GLib.path_get_basename(libdir)}`; - libdir = libdir.replace(currentDir, ''); - } - - Config.GNOME_SHELL_LIBDIR = libdir; -} - - -// Load DBus interfaces -Config.DBUS = (() => { - const bytes = Gio.resources_lookup_data( - GLib.build_filenamev([Config.APP_PATH, `${Config.APP_ID}.xml`]), - Gio.ResourceLookupFlags.NONE - ); - - const xml = new TextDecoder().decode(bytes.toArray()); - const dbus = Gio.DBusNodeInfo.new_for_xml(xml); - dbus.nodes.forEach(info => info.cache_build()); - - return dbus; -})(); - - -// Init User Directories -for (const path of [Config.CACHEDIR, Config.CONFIGDIR, Config.RUNTIMEDIR]) - GLib.mkdir_with_parents(path, 0o755); - - -globalThis.HAVE_GNOME = GLib.getenv('GSCONNECT_MODE')?.toLowerCase() !== 'cli' && (GLib.getenv('GNOME_SETUP_DISPLAY') !== null || GLib.getenv('XDG_CURRENT_DESKTOP')?.toUpperCase()?.includes('GNOME') || GLib.getenv('XDG_SESSION_DESKTOP')?.toLowerCase() === 'gnome'); - - -/** - * A custom debug function that logs at LEVEL_MESSAGE to avoid the need for env - * variables to be set. - * - * @param {Error|string} message - A string or Error to log - * @param {string} [prefix] - An optional prefix for the warning - */ -const _debugCallerMatch = new RegExp(/([^@]*)@([^:]*):([^:]*)/); -// eslint-disable-next-line func-style -const _debugFunc = function (error, prefix = null) { - let caller, message; - - if (error.stack) { - caller = error.stack.split('\n')[0]; - message = `${error.message}\n${error.stack}`; - } else { - caller = (new Error()).stack.split('\n')[1]; - message = JSON.stringify(error, null, 2); - } - - if (prefix) - message = `${prefix}: ${message}`; - - const [, func, file, line] = _debugCallerMatch.exec(caller); - const script = file.replace(Config.PACKAGE_DATADIR, ''); - - GLib.log_structured('GSConnect', GLib.LogLevelFlags.LEVEL_MESSAGE, { - 'MESSAGE': `[${script}:${func}:${line}]: ${message}`, - 'SYSLOG_IDENTIFIER': 'org.gnome.Shell.Extensions.GSConnect', - 'CODE_FILE': file, - 'CODE_FUNC': func, - 'CODE_LINE': line, - }); -}; - -// Swap the function out for a no-op anonymous function for speed -const settings = new Gio.Settings({ - settings_schema: Config.GSCHEMA.lookup(Config.APP_ID, true), -}); - -settings.connect('changed::debug', (settings, key) => { - globalThis.debug = settings.get_boolean(key) ? _debugFunc : () => {}; -}); - -if (settings.get_boolean('debug')) - globalThis.debug = _debugFunc; -else - globalThis.debug = () => {}; - - -/** - * Start wl_clipboard if not under Gnome - */ -if (!globalThis.HAVE_GNOME) { - debug('Not running as a Gnome extension'); - watchService(); -} - - -/** - * A simple (for now) pre-comparison sanitizer for phone numbers - * See: https://github.com/KDE/kdeconnect-kde/blob/master/smsapp/conversationlistmodel.cpp#L200-L210 - * - * @return {string} Return the string stripped of leading 0, and ' ()-+' - */ -String.prototype.toPhoneNumber = function () { - const strippedNumber = this.replace(/^0*|[ ()+-]/g, ''); - - if (strippedNumber.length) - return strippedNumber; - - return this; -}; - - -/** - * A simple equality check for phone numbers based on `toPhoneNumber()` - * - * @param {string} number - A phone number string to compare - * @return {boolean} If `this` and @number are equivalent phone numbers - */ -String.prototype.equalsPhoneNumber = function (number) { - const a = this.toPhoneNumber(); - const b = number.toPhoneNumber(); - - return (a.length && b.length && (a.endsWith(b) || b.endsWith(a))); -}; - - -/** - * An implementation of `rm -rf` in Gio - * - * @param {Gio.File|string} file - a GFile or filepath - */ -Gio.File.rm_rf = function (file) { - try { - if (typeof file === 'string') - file = Gio.File.new_for_path(file); - - try { - const iter = file.enumerate_children( - 'standard::name', - Gio.FileQueryInfoFlags.NOFOLLOW_SYMLINKS, - null - ); - - let info; - - while ((info = iter.next_file(null))) - Gio.File.rm_rf(iter.get_child(info)); - - iter.close(null); - } catch (e) { - // Silence errors - } - - file.delete(null); - } catch (e) { - // Silence errors - } -}; - - -/** - * Extend GLib.Variant with a static method to recursively pack a variant - * - * @param {*} [obj] - May be a GLib.Variant, Array, standard Object or literal. - * @return {GLib.Variant} The resulting GVariant - */ -function _full_pack(obj) { - let packed; - const type = typeof obj; - - switch (true) { - case (obj instanceof GLib.Variant): - return obj; - - case (type === 'string'): - return GLib.Variant.new('s', obj); - - case (type === 'number'): - return GLib.Variant.new('d', obj); - - case (type === 'boolean'): - return GLib.Variant.new('b', obj); - - case (obj instanceof Uint8Array): - return GLib.Variant.new('ay', obj); - - case (obj === null): - return GLib.Variant.new('mv', null); - - case (typeof obj.map === 'function'): - return GLib.Variant.new( - 'av', - obj.filter(e => e !== undefined).map(e => _full_pack(e)) - ); - - case (obj instanceof Gio.Icon): - return obj.serialize(); - - case (type === 'object'): - packed = {}; - - for (const [key, val] of Object.entries(obj)) { - if (val !== undefined) - packed[key] = _full_pack(val); - } - - return GLib.Variant.new('a{sv}', packed); - - default: - throw Error(`Unsupported type '${type}': ${obj}`); - } -} - -GLib.Variant.full_pack = _full_pack; - - -/** - * Extend GLib.Variant with a method to recursively deepUnpack() a variant - * - * @param {*} [obj] - May be a GLib.Variant, Array, standard Object or literal. - * @return {*} The resulting object - */ -function _full_unpack(obj) { - obj = (obj === undefined) ? this : obj; - const unpacked = {}; - - switch (true) { - case (obj === null): - return obj; - - case (obj instanceof GLib.Variant): - return _full_unpack(obj.deepUnpack()); - - case (obj instanceof Uint8Array): - return obj; - - case (typeof obj.map === 'function'): - return obj.map(e => _full_unpack(e)); - - case (typeof obj === 'object'): - for (const [key, value] of Object.entries(obj)) { - // Try to detect and deserialize GIcons - try { - if (key === 'icon' && value.get_type_string() === '(sv)') - unpacked[key] = Gio.Icon.deserialize(value); - else - unpacked[key] = _full_unpack(value); - } catch (e) { - unpacked[key] = _full_unpack(value); - } - } - - return unpacked; - - default: - return obj; - } -} - -GLib.Variant.prototype.full_unpack = _full_unpack; - - -/** - * Creates a GTlsCertificate from the PEM-encoded data in @cert_path and - * @key_path. If either are missing a new pair will be generated. - * - * Additionally, the private key will be added using ssh-add to allow sftp - * connections using Gio. - * - * See: https://github.com/KDE/kdeconnect-kde/blob/master/core/kdeconnectconfig.cpp#L119 - * - * @param {string} certPath - Absolute path to a x509 certificate in PEM format - * @param {string} keyPath - Absolute path to a private key in PEM format - * @param {string} commonName - A unique common name for the certificate - * @return {Gio.TlsCertificate} A TLS certificate - */ -Gio.TlsCertificate.new_for_paths = function (certPath, keyPath, commonName = null) { - // Check if the certificate/key pair already exists - const certExists = GLib.file_test(certPath, GLib.FileTest.EXISTS); - const keyExists = GLib.file_test(keyPath, GLib.FileTest.EXISTS); - - // Create a new certificate and private key if necessary - if (!certExists || !keyExists) { - // If we weren't passed a common name, generate a random one - if (!commonName) - commonName = GLib.uuid_string_random(); - - const proc = new Gio.Subprocess({ - argv: [ - Config.OPENSSL_PATH, 'req', - '-new', '-x509', '-sha256', - '-out', certPath, - '-newkey', 'rsa:4096', '-nodes', - '-keyout', keyPath, - '-days', '3650', - '-subj', `/O=andyholmes.github.io/OU=GSConnect/CN=${commonName}`, - ], - flags: (Gio.SubprocessFlags.STDOUT_SILENCE | - Gio.SubprocessFlags.STDERR_SILENCE), - }); - proc.init(null); - proc.wait_check(null); - } - - return Gio.TlsCertificate.new_from_files(certPath, keyPath); -}; - -Object.defineProperties(Gio.TlsCertificate.prototype, { - /** - * The common name of the certificate. - */ - 'common_name': { - get: function () { - if (!this.__common_name) { - const proc = new Gio.Subprocess({ - argv: [Config.OPENSSL_PATH, 'x509', '-noout', '-subject', '-inform', 'pem'], - flags: Gio.SubprocessFlags.STDIN_PIPE | Gio.SubprocessFlags.STDOUT_PIPE, - }); - proc.init(null); - - const stdout = proc.communicate_utf8(this.certificate_pem, null)[1]; - this.__common_name = /(?:cn|CN) ?= ?([^,\n]*)/.exec(stdout)[1]; - } - - return this.__common_name; - }, - configurable: true, - enumerable: true, - }, - - /** - * Get just the pubkey as a DER ByteArray of a certificate. - * - * @return {GLib.Bytes} The pubkey as DER of the certificate. - */ - 'pubkey_der': { - value: function () { - if (!this.__pubkey_der) { - let proc = new Gio.Subprocess({ - argv: [Config.OPENSSL_PATH, 'x509', '-noout', '-pubkey', '-inform', 'pem'], - flags: Gio.SubprocessFlags.STDIN_PIPE | Gio.SubprocessFlags.STDOUT_PIPE, - }); - proc.init(null); - - const pubkey = proc.communicate_utf8(this.certificate_pem, null)[1]; - proc = new Gio.Subprocess({ - argv: [Config.OPENSSL_PATH, 'pkey', '-pubin', '-inform', 'pem', '-outform', 'der'], - flags: Gio.SubprocessFlags.STDIN_PIPE | Gio.SubprocessFlags.STDOUT_PIPE, - }); - proc.init(null); - this.__pubkey_der = proc.communicate(new TextEncoder().encode(pubkey), null)[1]; - } - - return this.__pubkey_der; - }, - configurable: true, - enumerable: false, - }, - -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/manager.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/manager.js deleted file mode 100644 index 1f3f86d1..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/manager.js +++ /dev/null @@ -1,515 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; - -import Config from '../config.js'; -import * as DBus from './utils/dbus.js'; -import Device from './device.js'; - -import * as LanBackend from './backends/lan.js'; - -const DEVICE_NAME = 'org.gnome.Shell.Extensions.GSConnect.Device'; -const DEVICE_PATH = '/org/gnome/Shell/Extensions/GSConnect/Device'; -const DEVICE_IFACE = Config.DBUS.lookup_interface(DEVICE_NAME); - - -const backends = { - lan: LanBackend, -}; - - -/** - * A manager for devices. - */ -const Manager = GObject.registerClass({ - GTypeName: 'GSConnectManager', - Properties: { - 'active': GObject.ParamSpec.boolean( - 'active', - 'Active', - 'Whether the manager is active', - GObject.ParamFlags.READABLE, - false - ), - 'discoverable': GObject.ParamSpec.boolean( - 'discoverable', - 'Discoverable', - 'Whether the service responds to discovery requests', - GObject.ParamFlags.READWRITE, - false - ), - 'id': GObject.ParamSpec.string( - 'id', - 'Id', - 'The hostname or other network unique id', - GObject.ParamFlags.READWRITE, - null - ), - 'name': GObject.ParamSpec.string( - 'name', - 'Name', - 'The name announced to the network', - GObject.ParamFlags.READWRITE, - 'GSConnect' - ), - }, -}, class Manager extends Gio.DBusObjectManagerServer { - - _init(params = {}) { - super._init(params); - - this._exported = new WeakMap(); - this._reconnectId = 0; - - this._settings = new Gio.Settings({ - settings_schema: Config.GSCHEMA.lookup(Config.APP_ID, true), - }); - this._initSettings(); - } - - get active() { - if (this._active === undefined) - this._active = false; - - return this._active; - } - - get backends() { - if (this._backends === undefined) - this._backends = new Map(); - - return this._backends; - } - - get devices() { - if (this._devices === undefined) - this._devices = new Map(); - - return this._devices; - } - - get discoverable() { - if (this._discoverable === undefined) - this._discoverable = this.settings.get_boolean('discoverable'); - - return this._discoverable; - } - - set discoverable(value) { - if (this.discoverable === value) - return; - - this._discoverable = value; - this.notify('discoverable'); - - // FIXME: This whole thing just keeps getting uglier - const application = Gio.Application.get_default(); - - if (application === null) - return; - - if (this.discoverable) { - Gio.Application.prototype.withdraw_notification.call( - application, - 'discovery-warning' - ); - } else { - const notif = new Gio.Notification(); - notif.set_title(_('Discovery Disabled')); - notif.set_body(_('Discovery has been disabled due to the number of devices on this network.')); - notif.set_icon(new Gio.ThemedIcon({name: 'dialog-warning'})); - notif.set_priority(Gio.NotificationPriority.HIGH); - notif.set_default_action('app.preferences'); - - Gio.Application.prototype.withdraw_notification.call( - application, - 'discovery-warning', - notif - ); - } - } - - get id() { - if (this._id === undefined) - this._id = this.settings.get_string('id'); - - return this._id; - } - - set id(value) { - if (this.id === value) - return; - - this._id = value; - this.notify('id'); - } - - get name() { - if (this._name === undefined) - this._name = this.settings.get_string('name'); - - return this._name; - } - - set name(value) { - if (this.name === value) - return; - - this._name = value; - this.notify('name'); - - // Broadcast changes to the network - for (const backend of this.backends.values()) { - backend.name = this.name; - backend.buildIdentity(); - } - - this.identify(); - } - - get settings() { - if (this._settings === undefined) { - this._settings = new Gio.Settings({ - settings_schema: Config.GSCHEMA.lookup(Config.APP_ID, true), - }); - } - - return this._settings; - } - - vfunc_notify(pspec) { - if (pspec.name !== 'connection') - return; - - if (this.connection !== null) - this._exportDevices(); - else - this._unexportDevices(); - } - - /* - * GSettings - */ - _initSettings() { - // Initialize the ID and name of the service - if (this.settings.get_string('id').length === 0) - this.settings.set_string('id', GLib.uuid_string_random()); - - if (this.settings.get_string('name').length === 0) - this.settings.set_string('name', GLib.get_host_name()); - - // Bound Properties - this.settings.bind('discoverable', this, 'discoverable', 0); - this.settings.bind('id', this, 'id', 0); - this.settings.bind('name', this, 'name', 0); - } - - /* - * Backends - */ - _onChannel(backend, channel) { - try { - let device = this.devices.get(channel.identity.body.deviceId); - - switch (true) { - // Proceed if this is an existing device... - case (device !== undefined): - break; - - // Or the connection is allowed... - case this.discoverable || channel.allowed: - device = this._ensureDevice(channel.identity); - break; - - // ...otherwise bail - default: - debug(`${channel.identity.body.deviceName}: not allowed`); - return false; - } - - device.setChannel(channel); - return true; - } catch (e) { - logError(e, backend.name); - return false; - } - } - - _loadBackends() { - for (const name in backends) { - try { - const module = backends[name]; - - if (module.ChannelService === undefined) - continue; - - // Try to create the backend and track it if successful - const backend = new module.ChannelService({ - id: this.id, - name: this.name, - }); - this.backends.set(name, backend); - - // Connect to the backend - backend.__channelId = backend.connect( - 'channel', - this._onChannel.bind(this) - ); - - // Now try to start the backend, allowing us to retry if we fail - backend.start(); - } catch (e) { - if (Gio.Application.get_default()) - Gio.Application.get_default().notify_error(e); - } - } - } - - /* - * Devices - */ - _loadDevices() { - // Load cached devices - for (const id of this.settings.get_strv('devices')) { - const device = new Device({body: {deviceId: id}}); - this._exportDevice(device); - this.devices.set(id, device); - } - } - - _exportDevice(device) { - if (this.connection === null) - return; - - const info = { - object: null, - interface: null, - actions: 0, - menu: 0, - }; - - const objectPath = `${DEVICE_PATH}/${device.id.replace(/\W+/g, '_')}`; - - // Export an object path for the device - info.object = new Gio.DBusObjectSkeleton({ - g_object_path: objectPath, - }); - this.export(info.object); - - // Export GActions & GMenu - info.actions = Gio.DBus.session.export_action_group(objectPath, device); - info.menu = Gio.DBus.session.export_menu_model(objectPath, device.menu); - - // Export the Device interface - info.interface = new DBus.Interface({ - g_instance: device, - g_interface_info: DEVICE_IFACE, - }); - info.object.add_interface(info.interface); - - this._exported.set(device, info); - } - - _exportDevices() { - if (this.connection === null) - return; - - for (const device of this.devices.values()) - this._exportDevice(device); - } - - _unexportDevice(device) { - const info = this._exported.get(device); - - if (info === undefined) - return; - - // Unexport GActions and GMenu - Gio.DBus.session.unexport_action_group(info.actions); - Gio.DBus.session.unexport_menu_model(info.menu); - - // Unexport the Device interface and object - info.interface.flush(); - info.object.remove_interface(info.interface); - info.object.flush(); - this.unexport(info.object.g_object_path); - - this._exported.delete(device); - } - - _unexportDevices() { - for (const device of this.devices.values()) - this._unexportDevice(device); - } - - /** - * Return a device for @packet, creating it and adding it to the list of - * of known devices if it doesn't exist. - * - * @param {Core.Packet} packet - An identity packet for the device - * @return {Device} A device object - */ - _ensureDevice(packet) { - let device = this.devices.get(packet.body.deviceId); - - if (device === undefined) { - debug(`Adding ${packet.body.deviceName}`); - - // TODO: Remove when all clients support bluetooth-like discovery - // - // If this is the third unpaired device to connect, we disable - // discovery to avoid choking on networks with many devices - const unpaired = Array.from(this.devices.values()).filter(dev => { - return !dev.paired; - }); - - if (unpaired.length === 3) - this.discoverable = false; - - device = new Device(packet); - this._exportDevice(device); - this.devices.set(device.id, device); - - // Notify - this.settings.set_strv('devices', Array.from(this.devices.keys())); - } - - return device; - } - - /** - * Permanently remove a device. - * - * Removes the device from the list of known devices, deletes all GSettings - * and files. - * - * @param {string} id - The id of the device to delete - */ - _removeDevice(id) { - // Delete all GSettings - const settings_path = `/org/gnome/shell/extensions/gsconnect/${id}/`; - GLib.spawn_command_line_async(`dconf reset -f ${settings_path}`); - - // Delete the cache - const cache = GLib.build_filenamev([Config.CACHEDIR, id]); - Gio.File.rm_rf(cache); - - // Forget the device - this.devices.delete(id); - this.settings.set_strv('devices', Array.from(this.devices.keys())); - } - - /** - * A GSourceFunc that tries to reconnect to each paired device, while - * pruning unpaired devices that have disconnected. - * - * @return {boolean} Always %true - */ - _reconnect() { - for (const [id, device] of this.devices) { - if (device.connected) - continue; - - if (device.paired) { - this.identify(device.settings.get_string('last-connection')); - continue; - } - - this._unexportDevice(device); - this._removeDevice(id); - device.destroy(); - } - - return GLib.SOURCE_CONTINUE; - } - - /** - * Identify to an address or broadcast to the network. - * - * @param {string} [uri] - An address URI or %null to broadcast - */ - identify(uri = null) { - try { - // If we're passed a parameter, try and find a backend for it - if (uri !== null) { - const [scheme, address] = uri.split('://'); - - const backend = this.backends.get(scheme); - - if (backend !== undefined) - backend.broadcast(address); - - // If we're not discoverable, only try to reconnect known devices - } else if (!this.discoverable) { - this._reconnect(); - - // Otherwise have each backend broadcast to it's network - } else { - this.backends.forEach(backend => backend.broadcast()); - } - } catch (e) { - logError(e); - } - } - - /** - * Start managing devices. - */ - start() { - if (this.active) - return; - - this._loadDevices(); - this._loadBackends(); - - if (this._reconnectId === 0) { - this._reconnectId = GLib.timeout_add_seconds( - GLib.PRIORITY_LOW, - 5, - this._reconnect.bind(this) - ); - } - - this._active = true; - this.notify('active'); - } - - /** - * Stop managing devices. - */ - stop() { - if (!this.active) - return; - - if (this._reconnectId > 0) { - GLib.Source.remove(this._reconnectId); - this._reconnectId = 0; - } - - this._unexportDevices(); - - this.backends.forEach(backend => backend.destroy()); - this.backends.clear(); - - this.devices.forEach(device => device.destroy()); - this.devices.clear(); - - this._active = false; - this.notify('active'); - } - - /** - * Stop managing devices and free any resources. - */ - destroy() { - this.stop(); - this.set_connection(null); - } -}); - -export default Manager; - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugin.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugin.js deleted file mode 100644 index ed2a5ef3..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugin.js +++ /dev/null @@ -1,251 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; - -import Config from '../config.js'; -import plugins from './plugins/index.js'; - - -/** - * Base class for device plugins. - */ -const Plugin = GObject.registerClass({ - GTypeName: 'GSConnectPlugin', - Properties: { - 'device': GObject.ParamSpec.object( - 'device', - 'Device', - 'The device that owns this plugin', - GObject.ParamFlags.READABLE, - GObject.Object - ), - 'name': GObject.ParamSpec.string( - 'name', - 'Name', - 'The device name', - GObject.ParamFlags.READABLE, - null - ), - }, -}, class Plugin extends GObject.Object { - - _init(device, name, meta = null) { - super._init(); - - this._device = device; - this._name = name; - this._meta = meta; - - if (this._meta === null) - this._meta = plugins[name].Metadata; - - // GSettings - const schema = Config.GSCHEMA.lookup(this._meta.id, false); - - if (schema !== null) { - this.settings = new Gio.Settings({ - settings_schema: schema, - path: `${device.settings.path}plugin/${name}/`, - }); - } - - // GActions - this._gactions = []; - - if (this._meta.actions) { - const menu = this.device.settings.get_strv('menu-actions'); - - for (const name in this._meta.actions) { - const info = this._meta.actions[name]; - this._registerAction(name, menu.indexOf(name), info); - } - } - } - - get cancellable() { - if (this._cancellable === undefined) - this._cancellable = new Gio.Cancellable(); - - return this._cancellable; - } - - get device() { - return this._device; - } - - get name() { - return this._name; - } - - _activateAction(action, parameter) { - try { - let args = null; - - if (parameter instanceof GLib.Variant) - args = parameter.full_unpack(); - - if (Array.isArray(args)) - this[action.name](...args); - else - this[action.name](args); - } catch (e) { - logError(e, action.name); - } - } - - _registerAction(name, menuIndex, info) { - try { - // Device Action - const action = new Gio.SimpleAction({ - name: name, - parameter_type: info.parameter_type, - enabled: false, - }); - action.connect('activate', this._activateAction.bind(this)); - - this.device.add_action(action); - - // Menu - if (menuIndex > -1) { - this.device.addMenuAction( - action, - menuIndex, - info.label, - info.icon_name - ); - } - - this._gactions.push(action); - } catch (e) { - logError(e, `${this.device.name}: ${this.name}`); - } - } - - /** - * Called when the device connects. - */ - connected() { - // Enabled based on device capabilities, which might change - const incoming = this.device.settings.get_strv('incoming-capabilities'); - const outgoing = this.device.settings.get_strv('outgoing-capabilities'); - - for (const action of this._gactions) { - const info = this._meta.actions[action.name]; - - if (info.incoming.every(type => outgoing.includes(type)) && - info.outgoing.every(type => incoming.includes(type))) - action.set_enabled(true); - } - } - - /** - * Called when the device disconnects. - */ - disconnected() { - for (const action of this._gactions) - action.set_enabled(false); - } - - /** - * Called when a packet is received that the plugin is a handler for. - * - * @param {Core.Packet} packet - A KDE Connect packet - */ - handlePacket(packet) { - throw new GObject.NotImplementedError(); - } - - /** - * Cache JSON parseable properties on this object for persistence. The - * filename ~/.cache/gsconnect/<device-id>/<plugin-name>.json will be used - * to store the properties and values. - * - * Calling cacheProperties() opens a JSON cache file and reads any stored - * properties and values onto the current instance. When destroy() - * is called the properties are automatically stored in the same file. - * - * @param {Array} names - A list of this object's property names to cache - */ - async cacheProperties(names) { - try { - this._cacheProperties = names; - - // Ensure the device's cache directory exists - const cachedir = GLib.build_filenamev([ - Config.CACHEDIR, - this.device.id, - ]); - GLib.mkdir_with_parents(cachedir, 448); - - this._cacheFile = Gio.File.new_for_path( - GLib.build_filenamev([cachedir, `${this.name}.json`])); - - // Read the cache from disk - const [contents] = await this._cacheFile.load_contents_async( - this.cancellable); - const cache = JSON.parse(new TextDecoder().decode(contents)); - Object.assign(this, cache); - } catch (e) { - debug(e.message, `${this.device.name}: ${this.name}`); - } finally { - this.cacheLoaded(); - } - } - - /** - * An overridable function that is invoked when the on-disk cache is being - * cleared. Implementations should use this function to clear any in-memory - * cache data. - */ - clearCache() {} - - /** - * An overridable function that is invoked when the cache is done loading - */ - cacheLoaded() {} - - /** - * Unregister plugin actions, write the cache (if applicable) and destroy - * any dangling signal handlers. - */ - destroy() { - // Cancel any pending plugin operations - if (this._cancellable !== undefined) - this._cancellable.cancel(); - - for (const action of this._gactions) { - this.device.removeMenuAction(`device.${action.name}`); - this.device.remove_action(action.name); - } - - // Write the cache to disk synchronously - if (this._cacheFile !== undefined) { - try { - // Build the cache - const cache = {}; - - for (const name of this._cacheProperties) - cache[name] = this[name]; - - this._cacheFile.replace_contents( - JSON.stringify(cache, null, 2), - null, - false, - Gio.FileCreateFlags.REPLACE_DESTINATION, - null - ); - } catch (e) { - debug(e.message, `${this.device.name}: ${this.name}`); - } - } - - GObject.signal_handlers_destroy(this); - } -}); - -export default Plugin; - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/battery.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/battery.js deleted file mode 100644 index c7dbe042..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/battery.js +++ /dev/null @@ -1,433 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; - -import * as Components from '../components/index.js'; -import Plugin from '../plugin.js'; - - -export const Metadata = { - label: _('Battery'), - description: _('Exchange battery information'), - id: 'org.gnome.Shell.Extensions.GSConnect.Plugin.Battery', - incomingCapabilities: [ - 'kdeconnect.battery', - 'kdeconnect.battery.request', - ], - outgoingCapabilities: [ - 'kdeconnect.battery', - 'kdeconnect.battery.request', - ], - actions: {}, -}; - - -/** - * Battery Plugin - * https://github.com/KDE/kdeconnect-kde/tree/master/plugins/battery - */ -const BatteryPlugin = GObject.registerClass({ - GTypeName: 'GSConnectBatteryPlugin', -}, class BatteryPlugin extends Plugin { - - _init(device) { - super._init(device, 'battery'); - - // Setup Cache; defaults are 90 minute charge, 1 day discharge - this._chargeState = [54, 0, -1]; - this._dischargeState = [864, 0, -1]; - this._thresholdLevel = 25; - - this.cacheProperties([ - '_chargeState', - '_dischargeState', - '_thresholdLevel', - ]); - - // Export battery state as GAction - this.__state = new Gio.SimpleAction({ - name: 'battery', - parameter_type: new GLib.VariantType('(bsii)'), - state: this.state, - }); - this.device.add_action(this.__state); - - // Local Battery (UPower) - this._upower = null; - this._sendStatisticsId = this.settings.connect( - 'changed::send-statistics', - this._onSendStatisticsChanged.bind(this) - ); - this._onSendStatisticsChanged(this.settings); - } - - get charging() { - if (this._charging === undefined) - this._charging = false; - - return this._charging; - } - - get icon_name() { - let icon; - - if (this.level === -1) - return 'battery-missing-symbolic'; - else if (this.level === 100) - return 'battery-full-charged-symbolic'; - else if (this.level < 3) - icon = 'battery-empty'; - else if (this.level < 10) - icon = 'battery-caution'; - else if (this.level < 30) - icon = 'battery-low'; - else if (this.level < 60) - icon = 'battery-good'; - else if (this.level >= 60) - icon = 'battery-full'; - - if (this.charging) - return `${icon}-charging-symbolic`; - - return `${icon}-symbolic`; - } - - get level() { - // This is what KDE Connect returns if the remote battery plugin is - // disabled or still being loaded - if (this._level === undefined) - this._level = -1; - - return this._level; - } - - get time() { - if (this._time === undefined) - this._time = 0; - - return this._time; - } - - get state() { - return new GLib.Variant( - '(bsii)', - [this.charging, this.icon_name, this.level, this.time] - ); - } - - cacheLoaded() { - this._initEstimate(); - this._sendState(); - } - - clearCache() { - this._chargeState = [54, 0, -1]; - this._dischargeState = [864, 0, -1]; - this._thresholdLevel = 25; - this._initEstimate(); - } - - connected() { - super.connected(); - - this._requestState(); - this._sendState(); - } - - handlePacket(packet) { - switch (packet.type) { - case 'kdeconnect.battery': - this._receiveState(packet); - break; - - case 'kdeconnect.battery.request': - this._sendState(); - break; - } - } - - _onSendStatisticsChanged() { - if (this.settings.get_boolean('send-statistics')) - this._monitorState(); - else - this._unmonitorState(); - } - - /** - * Recalculate and update the estimated time remaining, but not the rate. - */ - _initEstimate() { - let rate, level; - - // elision of [rate, time, level] - if (this.charging) - [rate,, level] = this._chargeState; - else - [rate,, level] = this._dischargeState; - - if (!Number.isFinite(rate) || rate < 1) - rate = this.charging ? 864 : 90; - - if (!Number.isFinite(level) || level < 0) - level = this.level; - - // Update the time remaining - if (rate && this.charging) - this._time = Math.floor(rate * (100 - level)); - else if (rate && !this.charging) - this._time = Math.floor(rate * level); - - this.__state.state = this.state; - } - - /** - * Recalculate the (dis)charge rate and update the estimated time remaining. - */ - _updateEstimate() { - let rate, time, level; - const newTime = Math.floor(Date.now() / 1000); - const newLevel = this.level; - - // Load the state; ensure we have sane values for calculation - if (this.charging) - [rate, time, level] = this._chargeState; - else - [rate, time, level] = this._dischargeState; - - if (!Number.isFinite(rate) || rate < 1) - rate = this.charging ? 54 : 864; - - if (!Number.isFinite(time) || time <= 0) - time = newTime; - - if (!Number.isFinite(level) || level < 0) - level = newLevel; - - // Update the rate; use a weighted average to account for missed changes - // NOTE: (rate = seconds/percent) - const ldiff = this.charging ? newLevel - level : level - newLevel; - const tdiff = newTime - time; - const newRate = tdiff / ldiff; - - if (newRate && Number.isFinite(newRate)) - rate = Math.floor((rate * 0.4) + (newRate * 0.6)); - - // Store the state for the next recalculation - if (this.charging) - this._chargeState = [rate, newTime, newLevel]; - else - this._dischargeState = [rate, newTime, newLevel]; - - // Update the time remaining - if (rate && this.charging) - this._time = Math.floor(rate * (100 - newLevel)); - else if (rate && !this.charging) - this._time = Math.floor(rate * newLevel); - - this.__state.state = this.state; - } - - /** - * Notify the user the remote battery is full. - */ - _fullBatteryNotification() { - if (!this.settings.get_boolean('full-battery-notification')) - return; - - // Offer the option to ring the device, if available - let buttons = []; - - if (this.device.get_action_enabled('ring')) { - buttons = [{ - label: _('Ring'), - action: 'ring', - parameter: null, - }]; - } - - this.device.showNotification({ - id: 'battery|full', - // TRANSLATORS: eg. Google Pixel: Battery is full - title: _('%s: Battery is full').format(this.device.name), - // TRANSLATORS: when the battery is fully charged - body: _('Fully Charged'), - icon: Gio.ThemedIcon.new('battery-full-charged-symbolic'), - buttons: buttons, - }); - } - - /** - * Notify the user the remote battery is at custom charge level. - */ - _customBatteryNotification() { - if (!this.settings.get_boolean('custom-battery-notification')) - return; - - // Offer the option to ring the device, if available - let buttons = []; - - if (this.device.get_action_enabled('ring')) { - buttons = [{ - label: _('Ring'), - action: 'ring', - parameter: null, - }]; - } - - this.device.showNotification({ - id: 'battery|custom', - // TRANSLATORS: eg. Google Pixel: Battery has reached custom charge level - title: _('%s: Battery has reached custom charge level').format(this.device.name), - // TRANSLATORS: when the battery has reached custom charge level - body: _('%d%% Charged').format(this.level), - icon: Gio.ThemedIcon.new('battery-full-charged-symbolic'), - buttons: buttons, - }); - } - - /** - * Notify the user the remote battery is low. - */ - _lowBatteryNotification() { - if (!this.settings.get_boolean('low-battery-notification')) - return; - - // Offer the option to ring the device, if available - let buttons = []; - - if (this.device.get_action_enabled('ring')) { - buttons = [{ - label: _('Ring'), - action: 'ring', - parameter: null, - }]; - } - - this.device.showNotification({ - id: 'battery|low', - // TRANSLATORS: eg. Google Pixel: Battery is low - title: _('%s: Battery is low').format(this.device.name), - // TRANSLATORS: eg. 15% remaining - body: _('%d%% remaining').format(this.level), - icon: Gio.ThemedIcon.new('battery-caution-symbolic'), - buttons: buttons, - }); - } - - /** - * Handle a remote battery update. - * - * @param {Core.Packet} packet - A kdeconnect.battery packet - */ - _receiveState(packet) { - // Charging state changed - this._charging = packet.body.isCharging; - - // Level changed - if (this._level !== packet.body.currentCharge) { - this._level = packet.body.currentCharge; - - // If the level is above the threshold hide the notification - if (this._level > this._thresholdLevel) - this.device.hideNotification('battery|low'); - - // The level just changed to/from custom level while charging - if ((this._level === this.settings.get_uint('custom-battery-notification-value')) && this._charging) - this._customBatteryNotification(); - else - this.device.hideNotification('battery|custom'); - - // The level just changed to/from full - if (this._level === 100) - this._fullBatteryNotification(); - else - this.device.hideNotification('battery|full'); - } - - // Device considers the level low - if (packet.body.thresholdEvent > 0) { - this._lowBatteryNotification(); - this._thresholdLevel = this.level; - } - - this._updateEstimate(); - } - - /** - * Request the remote battery's current state - */ - _requestState() { - this.device.sendPacket({ - type: 'kdeconnect.battery.request', - body: {request: true}, - }); - } - - /** - * Report the local battery's current state - */ - _sendState() { - if (this._upower === null || !this._upower.is_present) - return; - - this.device.sendPacket({ - type: 'kdeconnect.battery', - body: { - currentCharge: this._upower.level, - isCharging: this._upower.charging, - thresholdEvent: this._upower.threshold, - }, - }); - } - - /* - * UPower monitoring methods - */ - _monitorState() { - try { - // Currently only true if the remote device is a desktop (rare) - const incoming = this.device.settings.get_strv('incoming-capabilities'); - - if (!incoming.includes('kdeconnect.battery')) - return; - - this._upower = Components.acquire('upower'); - - this._upowerId = this._upower.connect( - 'changed', - this._sendState.bind(this) - ); - - this._sendState(); - } catch (e) { - logError(e, this.device.name); - this._unmonitorState(); - } - } - - _unmonitorState() { - try { - if (this._upower === null) - return; - - this._upower.disconnect(this._upowerId); - this._upower = Components.release('upower'); - } catch (e) { - logError(e, this.device.name); - } - } - - destroy() { - this.device.remove_action('battery'); - this.settings.disconnect(this._sendStatisticsId); - this._unmonitorState(); - - super.destroy(); - } -}); - -export default BatteryPlugin; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/clipboard.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/clipboard.js deleted file mode 100644 index 7a065747..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/clipboard.js +++ /dev/null @@ -1,182 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import GObject from 'gi://GObject'; - -import * as Components from '../components/index.js'; -import Plugin from '../plugin.js'; - - -export const Metadata = { - label: _('Clipboard'), - description: _('Share the clipboard content'), - id: 'org.gnome.Shell.Extensions.GSConnect.Plugin.Clipboard', - incomingCapabilities: [ - 'kdeconnect.clipboard', - 'kdeconnect.clipboard.connect', - ], - outgoingCapabilities: [ - 'kdeconnect.clipboard', - 'kdeconnect.clipboard.connect', - ], - actions: { - clipboardPush: { - label: _('Clipboard Push'), - icon_name: 'edit-paste-symbolic', - - parameter_type: null, - incoming: [], - outgoing: ['kdeconnect.clipboard'], - }, - clipboardPull: { - label: _('Clipboard Pull'), - icon_name: 'edit-copy-symbolic', - - parameter_type: null, - incoming: ['kdeconnect.clipboard'], - outgoing: [], - }, - }, -}; - - -/** - * Clipboard Plugin - * https://github.com/KDE/kdeconnect-kde/tree/master/plugins/clipboard - */ -const ClipboardPlugin = GObject.registerClass({ - GTypeName: 'GSConnectClipboardPlugin', -}, class ClipboardPlugin extends Plugin { - - _init(device) { - super._init(device, 'clipboard'); - - this._clipboard = Components.acquire('clipboard'); - - // Watch local clipboard for changes - this._textChangedId = this._clipboard.connect( - 'notify::text', - this._onLocalClipboardChanged.bind(this) - ); - - // Buffer content to allow selective sync - this._localBuffer = this._clipboard.text; - this._localTimestamp = 0; - this._remoteBuffer = null; - } - - connected() { - super.connected(); - - // TODO: if we're not auto-syncing local->remote, but we are doing the - // reverse, it's possible older remote content will end up - // overwriting newer local content. - if (!this.settings.get_boolean('send-content')) - return; - - if (this._localBuffer === null && this._localTimestamp === 0) - return; - - this.device.sendPacket({ - type: 'kdeconnect.clipboard.connect', - body: { - content: this._localBuffer, - timestamp: this._localTimestamp, - }, - }); - } - - handlePacket(packet) { - if (!packet.body.hasOwnProperty('content')) - return; - - switch (packet.type) { - case 'kdeconnect.clipboard': - this._handleContent(packet); - break; - - case 'kdeconnect.clipboard.connect': - this._handleConnectContent(packet); - break; - } - } - - _handleContent(packet) { - this._onRemoteClipboardChanged(packet.body.content); - } - - _handleConnectContent(packet) { - if (packet.body.hasOwnProperty('timestamp') && - packet.body.timestamp > this._localTimestamp) - this._onRemoteClipboardChanged(packet.body.content); - } - - /* - * Store the local clipboard content and forward it if enabled - */ - _onLocalClipboardChanged(clipboard, pspec) { - this._localBuffer = clipboard.text; - this._localTimestamp = Date.now(); - - if (this.settings.get_boolean('send-content')) - this.clipboardPush(); - } - - /* - * Store the remote clipboard content and apply it if enabled - */ - _onRemoteClipboardChanged(text) { - this._remoteBuffer = text; - - if (this.settings.get_boolean('receive-content')) - this.clipboardPull(); - } - - /** - * Copy to the remote clipboard; called by _onLocalClipboardChanged() - */ - clipboardPush() { - // Don't sync if the clipboard is empty or not text - if (this._localTimestamp === 0) - return; - - if (this._remoteBuffer !== this._localBuffer) { - this._remoteBuffer = this._localBuffer; - - // If the buffer is %null, the clipboard contains non-text content, - // so we neither clear the remote clipboard nor pass the content - if (this._localBuffer !== null) { - this.device.sendPacket({ - type: 'kdeconnect.clipboard', - body: { - content: this._localBuffer, - }, - }); - } - } - } - - /** - * Copy from the remote clipboard; called by _onRemoteClipboardChanged() - */ - clipboardPull() { - if (this._localBuffer !== this._remoteBuffer) { - this._localBuffer = this._remoteBuffer; - this._localTimestamp = Date.now(); - - this._clipboard.text = this._remoteBuffer; - } - } - - destroy() { - if (this._clipboard && this._textChangedId) { - this._clipboard.disconnect(this._textChangedId); - this._clipboard = Components.release('clipboard'); - } - - super.destroy(); - } -}); - -export default ClipboardPlugin; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/connectivity_report.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/connectivity_report.js deleted file mode 100644 index 7107ff7a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/connectivity_report.js +++ /dev/null @@ -1,163 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; - -import Plugin from '../plugin.js'; - - -export const Metadata = { - label: _('Connectivity Report'), - description: _('Display connectivity status'), - id: 'org.gnome.Shell.Extensions.GSConnect.Plugin.ConnectivityReport', - incomingCapabilities: [ - 'kdeconnect.connectivity_report', - ], - outgoingCapabilities: [ - 'kdeconnect.connectivity_report.request', - ], - actions: {}, -}; - - -/** - * Connectivity Report Plugin - * https://invent.kde.org/network/kdeconnect-kde/-/tree/master/plugins/connectivity_report - */ -const ConnectivityReportPlugin = GObject.registerClass({ - GTypeName: 'GSConnectConnectivityReportPlugin', -}, class ConnectivityReportPlugin extends Plugin { - - _init(device) { - super._init(device, 'connectivity_report'); - - // Export connectivity state as GAction - this.__state = new Gio.SimpleAction({ - name: 'connectivityReport', - // ( - // cellular_network_type, - // cellular_network_type_icon, - // cellular_network_strength(0..4), - // cellular_network_strength_icon, - // ) - parameter_type: new GLib.VariantType('(ssis)'), - state: this.state, - }); - this.device.add_action(this.__state); - } - - get signal_strength() { - if (this._signalStrength === undefined) - this._signalStrength = -1; - - return this._signalStrength; - } - - get network_type() { - if (this._networkType === undefined) - this._networkType = ''; - - return this._networkType; - } - - get signal_strength_icon_name() { - if (this.signal_strength === 0) - return 'network-cellular-signal-none-symbolic'; // SIGNAL_STRENGTH_NONE_OR_UNKNOWN - else if (this.signal_strength === 1) - return 'network-cellular-signal-weak-symbolic'; // SIGNAL_STRENGTH_POOR - else if (this.signal_strength === 2) - return 'network-cellular-signal-ok-symbolic'; // SIGNAL_STRENGTH_MODERATE - else if (this.signal_strength === 3) - return 'network-cellular-signal-good-symbolic'; // SIGNAL_STRENGTH_GOOD - else if (this.signal_strength >= 4) - return 'network-cellular-signal-excellent-symbolic'; // SIGNAL_STRENGTH_GREAT - - return 'network-cellular-offline-symbolic'; // OFF (signal_strength == -1) - } - - get network_type_icon_name() { - if (this.network_type === 'GSM' || this.network_type === 'CDMA' || this.network_type === 'iDEN') - return 'network-cellular-2g-symbolic'; - else if (this.network_type === 'UMTS' || this.network_type === 'CDMA2000') - return 'network-cellular-3g-symbolic'; - else if (this.network_type === 'LTE') - return 'network-cellular-4g-symbolic'; - else if (this.network_type === 'EDGE') - return 'network-cellular-edge-symbolic'; - else if (this.network_type === 'GPRS') - return 'network-cellular-gprs-symbolic'; - else if (this.network_type === 'HSPA') - return 'network-cellular-hspa-symbolic'; - else if (this.network_type === '5G') - return 'network-cellular-5g-symbolic'; - - return 'network-cellular-symbolic'; - } - - get state() { - return new GLib.Variant( - '(ssis)', - [ - this.network_type, - this.network_type_icon_name, - this.signal_strength, - this.signal_strength_icon_name, - ] - ); - } - - connected() { - super.connected(); - - this._requestState(); - } - - handlePacket(packet) { - switch (packet.type) { - case 'kdeconnect.connectivity_report': - this._receiveState(packet); - break; - } - } - - /** - * Handle a remote state update. - * - * @param {Core.Packet} packet - A kdeconnect.connectivity_report packet - */ - _receiveState(packet) { - if (packet.body.signalStrengths) { - // TODO: Only first SIM (subscriptionID) is supported at the moment - const subs = Object.keys(packet.body.signalStrengths); - const firstSub = Math.min.apply(null, subs); - const data = packet.body.signalStrengths[firstSub]; - - this._networkType = data.networkType; - this._signalStrength = data.signalStrength; - } - - // Update DBus state - this.__state.state = this.state; - } - - /** - * Request the remote device's connectivity state - */ - _requestState() { - this.device.sendPacket({ - type: 'kdeconnect.connectivity_report.request', - body: {}, - }); - } - - destroy() { - this.device.remove_action('connectivity_report'); - - super.destroy(); - } -}); - -export default ConnectivityReportPlugin; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/contacts.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/contacts.js deleted file mode 100644 index 21687127..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/contacts.js +++ /dev/null @@ -1,463 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; - -import Plugin from '../plugin.js'; -import Contacts from '../components/contacts.js'; - -/* - * We prefer libebook's vCard parser if it's available - */ -let EBookContacts; -export const setEBookContacts = (ebook) => { // This function is only for tests to call! - EBookContacts = ebook; -}; - -try { - EBookContacts = (await import('gi://EBookContacts')).default; -} catch (e) { - EBookContacts = null; -} - - -export const Metadata = { - label: _('Contacts'), - description: _('Access contacts of the paired device'), - id: 'org.gnome.Shell.Extensions.GSConnect.Plugin.Contacts', - incomingCapabilities: [ - 'kdeconnect.contacts.response_uids_timestamps', - 'kdeconnect.contacts.response_vcards', - ], - outgoingCapabilities: [ - 'kdeconnect.contacts.request_all_uids_timestamps', - 'kdeconnect.contacts.request_vcards_by_uid', - ], - actions: {}, -}; - - -/* - * vCard 2.1 Patterns - */ -const VCARD_FOLDING = /\r\n |\r |\n |=\n/g; -const VCARD_SUPPORTED = /^fn|tel|photo|x-kdeconnect/i; -const VCARD_BASIC = /^([^:;]+):(.+)$/; -const VCARD_TYPED = /^([^:;]+);([^:]+):(.+)$/; -const VCARD_TYPED_KEY = /item\d{1,2}\./; -const VCARD_TYPED_META = /([a-z]+)=(.*)/i; - - -/** - * Contacts Plugin - * https://github.com/KDE/kdeconnect-kde/tree/master/plugins/contacts - */ -const ContactsPlugin = GObject.registerClass({ - GTypeName: 'GSConnectContactsPlugin', -}, class ContactsPlugin extends Plugin { - - _init(device) { - super._init(device, 'contacts'); - - this._store = new Contacts(device.id); - this._store.fetch = this._requestUids.bind(this); - - // Notify when the store is ready - this._contactsStoreReadyId = this._store.connect( - 'notify::context', - () => this.device.notify('contacts') - ); - - // Notify if the contacts source changes - this._contactsSourceChangedId = this.settings.connect( - 'changed::contacts-source', - () => this.device.notify('contacts') - ); - - // Load the cache - this._store.load(); - } - - clearCache() { - this._store.clear(); - } - - connected() { - super.connected(); - this._requestUids(); - } - - handlePacket(packet) { - switch (packet.type) { - case 'kdeconnect.contacts.response_uids_timestamps': - this._handleUids(packet); - break; - - case 'kdeconnect.contacts.response_vcards': - this._handleVCards(packet); - break; - } - } - - _handleUids(packet) { - try { - const contacts = this._store.contacts; - const remote_uids = packet.body.uids; - let removed = false; - delete packet.body.uids; - - // Usually a failed request, so avoid wiping the cache - if (remote_uids.length === 0) - return; - - // Delete any contacts that were removed on the device - for (let i = 0, len = contacts.length; i < len; i++) { - const contact = contacts[i]; - - if (!remote_uids.includes(contact.id)) { - this._store.remove(contact.id, false); - removed = true; - } - } - - // Build a list of new or updated contacts - const uids = []; - - for (const [uid, timestamp] of Object.entries(packet.body)) { - const contact = this._store.get_contact(uid); - - if (!contact || contact.timestamp !== timestamp) - uids.push(uid); - } - - // Send a request for any new or updated contacts - if (uids.length) - this._requestVCards(uids); - - // If we removed any contacts, save the cache - if (removed) - this._store.save(); - } catch (e) { - logError(e); - } - } - - /** - * Decode a string encoded as "QUOTED-PRINTABLE" and return a regular string - * - * See: https://github.com/mathiasbynens/quoted-printable/blob/master/src/quoted-printable.js - * - * @param {string} input - The QUOTED-PRINTABLE string - * @return {string} The decoded string - */ - _decodeQuotedPrintable(input) { - return input - // https://tools.ietf.org/html/rfc2045#section-6.7, rule 3 - .replace(/[\t\x20]$/gm, '') - // Remove hard line breaks preceded by `=` - .replace(/=(?:\r\n?|\n|$)/g, '') - // https://tools.ietf.org/html/rfc2045#section-6.7, note 1. - .replace(/=([a-fA-F0-9]{2})/g, ($0, $1) => { - const codePoint = parseInt($1, 16); - return String.fromCharCode(codePoint); - }); - } - - /** - * Decode a string encoded as "UTF-8" and return a regular string - * - * See: https://github.com/kvz/locutus/blob/master/src/php/xml/utf8_decode.js - * - * @param {string} input - The UTF-8 string - * @return {string} The decoded string - */ - _decodeUTF8(input) { - try { - const output = []; - let i = 0; - let c1 = 0; - let seqlen = 0; - - while (i < input.length) { - c1 = input.charCodeAt(i) & 0xFF; - seqlen = 0; - - if (c1 <= 0xBF) { - c1 &= 0x7F; - seqlen = 1; - } else if (c1 <= 0xDF) { - c1 &= 0x1F; - seqlen = 2; - } else if (c1 <= 0xEF) { - c1 &= 0x0F; - seqlen = 3; - } else { - c1 &= 0x07; - seqlen = 4; - } - - for (let ai = 1; ai < seqlen; ++ai) - c1 = ((c1 << 0x06) | (input.charCodeAt(ai + i) & 0x3F)); - - if (seqlen === 4) { - c1 -= 0x10000; - output.push(String.fromCharCode(0xD800 | ((c1 >> 10) & 0x3FF))); - output.push(String.fromCharCode(0xDC00 | (c1 & 0x3FF))); - } else { - output.push(String.fromCharCode(c1)); - } - - i += seqlen; - } - - return output.join(''); - - // Fallback to old unfaithful - } catch (e) { - try { - return decodeURIComponent(escape(input)); - - // Say "chowdah" frenchie! - } catch (e) { - debug(e, `Failed to decode UTF-8 VCard field ${input}`); - return input; - } - } - } - - /** - * Parse a vCard (v2.1 only) and return a dictionary of the fields - * - * See: http://jsfiddle.net/ARTsinn/P2t2P/ - * - * @param {string} vcard_data - The raw VCard data - * @return {Object} dictionary of vCard data - */ - _parseVCard21(vcard_data) { - // vcard skeleton - const vcard = { - fn: _('Unknown Contact'), - tel: [], - }; - - // Remove line folding and split - const unfolded = vcard_data.replace(VCARD_FOLDING, ''); - const lines = unfolded.split(/\r\n|\r|\n/); - - for (let i = 0, len = lines.length; i < len; i++) { - const line = lines[i]; - let results, key, type, value; - - // Empty line or a property we aren't interested in - if (!line || !line.match(VCARD_SUPPORTED)) - continue; - - // Basic Fields (fn, x-kdeconnect-timestamp, etc) - if ((results = line.match(VCARD_BASIC))) { - [, key, value] = results; - vcard[key.toLowerCase()] = value; - continue; - } - - // Typed Fields (tel, adr, etc) - if ((results = line.match(VCARD_TYPED))) { - [, key, type, value] = results; - key = key.replace(VCARD_TYPED_KEY, '').toLowerCase(); - value = value.split(';'); - type = type.split(';'); - - // Type(s) - const meta = {}; - - for (let i = 0, len = type.length; i < len; i++) { - const res = type[i].match(VCARD_TYPED_META); - - if (res) - meta[res[1]] = res[2]; - else - meta[`type${i === 0 ? '' : i}`] = type[i].toLowerCase(); - } - - // Value(s) - if (vcard[key] === undefined) - vcard[key] = []; - - // Decode QUOTABLE-PRINTABLE - if (meta.ENCODING && meta.ENCODING === 'QUOTED-PRINTABLE') { - delete meta.ENCODING; - value = value.map(v => this._decodeQuotedPrintable(v)); - } - - // Decode UTF-8 - if (meta.CHARSET && meta.CHARSET === 'UTF-8') { - delete meta.CHARSET; - value = value.map(v => this._decodeUTF8(v)); - } - - // Special case for FN (full name) - if (key === 'fn') - vcard[key] = value[0]; - else - vcard[key].push({meta: meta, value: value}); - } - } - - return vcard; - } - - /** - * Parse a vCard (v2.1 only) using native JavaScript and add it to the - * contact store. - * - * @param {string} uid - The contact UID - * @param {string} vcard_data - The raw vCard data - */ - async _parseVCardNative(uid, vcard_data) { - try { - const vcard = this._parseVCard21(vcard_data); - - const contact = { - id: uid, - name: vcard.fn, - numbers: [], - origin: 'device', - timestamp: parseInt(vcard['x-kdeconnect-timestamp']), - }; - - // Phone Numbers - contact.numbers = vcard.tel.map(entry => { - let type = 'unknown'; - - if (entry.meta && entry.meta.type) - type = entry.meta.type; - - return {type: type, value: entry.value[0]}; - }); - - // Avatar - if (vcard.photo) { - const data = GLib.base64_decode(vcard.photo[0].value[0]); - contact.avatar = await this._store.storeAvatar(data); - } - - this._store.add(contact); - } catch (e) { - debug(e, `Failed to parse VCard contact ${uid}`); - } - } - - /** - * Parse a vCard using libebook and add it to the contact store. - * - * @param {string} uid - The contact UID - * @param {string} vcard_data - The raw vCard data - */ - async _parseVCard(uid, vcard_data) { - try { - const contact = { - id: uid, - name: _('Unknown Contact'), - numbers: [], - origin: 'device', - timestamp: 0, - }; - - const evcard = EBookContacts.VCard.new_from_string(vcard_data); - const attrs = evcard.get_attributes(); - - for (let i = 0, len = attrs.length; i < len; i++) { - const attr = attrs[i]; - let data, number; - - switch (attr.get_name().toLowerCase()) { - case 'fn': - contact.name = attr.get_value(); - break; - - case 'tel': - number = {value: attr.get_value(), type: 'unknown'}; - - if (attr.has_type('CELL')) - number.type = 'cell'; - else if (attr.has_type('HOME')) - number.type = 'home'; - else if (attr.has_type('WORK')) - number.type = 'work'; - - contact.numbers.push(number); - break; - - case 'x-kdeconnect-timestamp': - contact.timestamp = parseInt(attr.get_value()); - break; - - case 'photo': - data = GLib.base64_decode(attr.get_value()); - contact.avatar = await this._store.storeAvatar(data); - break; - } - } - - this._store.add(contact); - } catch (e) { - debug(e, `Failed to parse VCard contact ${uid}`); - } - } - - /** - * Handle an incoming list of contact vCards and pass them to the best - * available parser. - * - * @param {Core.Packet} packet - A `kdeconnect.contacts.response_vcards` - */ - _handleVCards(packet) { - try { - // We don't use this - delete packet.body.uids; - - // Parse each vCard and add the contact - for (const [uid, vcard] of Object.entries(packet.body)) { - if (EBookContacts) - this._parseVCard(uid, vcard); - else - this._parseVCardNative(uid, vcard); - } - } catch (e) { - logError(e, this.device.name); - } - } - - /** - * Request a list of contact UIDs with timestamps. - */ - _requestUids() { - this.device.sendPacket({ - type: 'kdeconnect.contacts.request_all_uids_timestamps', - }); - } - - /** - * Request the vCards for @uids. - * - * @param {string[]} uids - A list of contact UIDs - */ - _requestVCards(uids) { - this.device.sendPacket({ - type: 'kdeconnect.contacts.request_vcards_by_uid', - body: { - uids: uids, - }, - }); - } - - destroy() { - this._store.disconnect(this._contactsStoreReadyId); - this.settings.disconnect(this._contactsSourceChangedId); - - super.destroy(); - } -}); - -export default ContactsPlugin; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/findmyphone.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/findmyphone.js deleted file mode 100644 index b5226bb9..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/findmyphone.js +++ /dev/null @@ -1,249 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gdk from 'gi://Gdk'; -import Gio from 'gi://Gio'; -import GObject from 'gi://GObject'; -import Gtk from 'gi://Gtk'; - -import * as Components from '../components/index.js'; -import Plugin from '../plugin.js'; - - -export const Metadata = { - label: _('Find My Phone'), - description: _('Ring your paired device'), - id: 'org.gnome.Shell.Extensions.GSConnect.Plugin.FindMyPhone', - incomingCapabilities: ['kdeconnect.findmyphone.request'], - outgoingCapabilities: ['kdeconnect.findmyphone.request'], - actions: { - ring: { - label: _('Ring'), - icon_name: 'phonelink-ring-symbolic', - - parameter_type: null, - incoming: [], - outgoing: ['kdeconnect.findmyphone.request'], - }, - }, -}; - - -/** - * FindMyPhone Plugin - * https://github.com/KDE/kdeconnect-kde/tree/master/plugins/findmyphone - */ -const FindMyPhonePlugin = GObject.registerClass({ - GTypeName: 'GSConnectFindMyPhonePlugin', -}, class FindMyPhonePlugin extends Plugin { - - _init(device) { - super._init(device, 'findmyphone'); - - this._dialog = null; - this._player = Components.acquire('sound'); - this._mixer = Components.acquire('pulseaudio'); - } - - handlePacket(packet) { - switch (packet.type) { - case 'kdeconnect.findmyphone.request': - this._handleRequest(); - break; - } - } - - /** - * Handle an incoming location request. - */ - _handleRequest() { - try { - // If this is a second request, stop announcing and return - if (this._dialog !== null) { - this._dialog.response(Gtk.ResponseType.DELETE_EVENT); - return; - } - - this._dialog = new Dialog({ - device: this.device, - plugin: this, - }); - - this._dialog.connect('response', () => { - this._dialog = null; - }); - } catch (e) { - this._cancelRequest(); - logError(e, this.device.name); - } - } - - /** - * Cancel any ongoing ringing and destroy the dialog. - */ - _cancelRequest() { - if (this._dialog !== null) - this._dialog.response(Gtk.ResponseType.DELETE_EVENT); - } - - /** - * Request that the remote device announce it's location - */ - ring() { - this.device.sendPacket({ - type: 'kdeconnect.findmyphone.request', - body: {}, - }); - } - - destroy() { - this._cancelRequest(); - - if (this._mixer !== undefined) - this._mixer = Components.release('pulseaudio'); - - if (this._player !== undefined) - this._player = Components.release('sound'); - - super.destroy(); - } -}); - - -/* - * Used to ensure 'audible-bell' is enabled for fallback - */ -const _WM_SETTINGS = new Gio.Settings({ - schema_id: 'org.gnome.desktop.wm.preferences', - path: '/org/gnome/desktop/wm/preferences/', -}); - - -/** - * A custom GtkMessageDialog for alerting of incoming requests - */ -const Dialog = GObject.registerClass({ - GTypeName: 'GSConnectFindMyPhoneDialog', - Properties: { - 'device': GObject.ParamSpec.object( - 'device', - 'Device', - 'The device associated with this window', - GObject.ParamFlags.READWRITE, - GObject.Object - ), - 'plugin': GObject.ParamSpec.object( - 'plugin', - 'Plugin', - 'The plugin providing messages', - GObject.ParamFlags.READWRITE, - GObject.Object - ), - }, -}, class Dialog extends Gtk.MessageDialog { - _init(params) { - super._init({ - buttons: Gtk.ButtonsType.CLOSE, - device: params.device, - image: new Gtk.Image({ - icon_name: 'phonelink-ring-symbolic', - pixel_size: 512, - halign: Gtk.Align.CENTER, - hexpand: true, - valign: Gtk.Align.CENTER, - vexpand: true, - visible: true, - }), - plugin: params.plugin, - urgency_hint: true, - }); - - this.set_keep_above(true); - this.maximize(); - this.message_area.destroy(); - - // If an output stream is available start fading the volume up - if (this.plugin._mixer && this.plugin._mixer.output) { - this._stream = this.plugin._mixer.output; - - this._previousMuted = this._stream.muted; - this._previousVolume = this._stream.volume; - - this._stream.muted = false; - this._stream.fade(0.85, 15); - - // Otherwise ensure audible-bell is enabled - } else { - this._previousBell = _WM_SETTINGS.get_boolean('audible-bell'); - _WM_SETTINGS.set_boolean('audible-bell', true); - } - - // Start the alarm - if (this.plugin._player !== undefined) - this.plugin._player.loopSound('phone-incoming-call', this.cancellable); - - // Show the dialog - this.show_all(); - } - - vfunc_key_press_event(event) { - this.response(Gtk.ResponseType.DELETE_EVENT); - - return Gdk.EVENT_STOP; - } - - vfunc_motion_notify_event(event) { - this.response(Gtk.ResponseType.DELETE_EVENT); - - return Gdk.EVENT_STOP; - } - - vfunc_response(response_id) { - // Stop the alarm - this.cancellable.cancel(); - - // Restore the mixer level - if (this._stream) { - this._stream.muted = this._previousMuted; - this._stream.fade(this._previousVolume); - - // Restore the audible-bell - } else { - _WM_SETTINGS.set_boolean('audible-bell', this._previousBell); - } - - this.destroy(); - } - - get cancellable() { - if (this._cancellable === undefined) - this._cancellable = new Gio.Cancellable(); - - return this._cancellable; - } - - get device() { - if (this._device === undefined) - this._device = null; - - return this._device; - } - - set device(device) { - this._device = device; - } - - get plugin() { - if (this._plugin === undefined) - this._plugin = null; - - return this._plugin; - } - - set plugin(plugin) { - this._plugin = plugin; - } -}); - -export default FindMyPhonePlugin; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/index.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/index.js deleted file mode 100644 index 3d304a04..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/index.js +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import * as battery from './battery.js'; -import * as clipboard from './clipboard.js'; -import * as connectivity_report from './connectivity_report.js'; -import * as contacts from './contacts.js'; -import * as findmyphone from './findmyphone.js'; -import * as mousepad from './mousepad.js'; -import * as mpris from './mpris.js'; -import * as notification from './notification.js'; -import * as ping from './ping.js'; -import * as presenter from './presenter.js'; -import * as runcommand from './runcommand.js'; -import * as sftp from './sftp.js'; -import * as share from './share.js'; -import * as sms from './sms.js'; -import * as systemvolume from './systemvolume.js'; -import * as telephony from './telephony.js'; - -export default { - battery, - clipboard, - connectivity_report, - contacts, - findmyphone, - mousepad, - mpris, - notification, - ping, - presenter, - runcommand, - sftp, - share, - sms, - systemvolume, - telephony, -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/mousepad.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/mousepad.js deleted file mode 100644 index a4e40aed..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/mousepad.js +++ /dev/null @@ -1,381 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gdk from 'gi://Gdk'; -import GObject from 'gi://GObject'; - -import * as Components from '../components/index.js'; -import {InputDialog} from '../ui/mousepad.js'; -import Plugin from '../plugin.js'; - - -export const Metadata = { - label: _('Mousepad'), - description: _('Enables the paired device to act as a remote mouse and keyboard'), - id: 'org.gnome.Shell.Extensions.GSConnect.Plugin.Mousepad', - incomingCapabilities: [ - 'kdeconnect.mousepad.echo', - 'kdeconnect.mousepad.request', - 'kdeconnect.mousepad.keyboardstate', - ], - outgoingCapabilities: [ - 'kdeconnect.mousepad.echo', - 'kdeconnect.mousepad.request', - 'kdeconnect.mousepad.keyboardstate', - ], - actions: { - keyboard: { - label: _('Remote Input'), - icon_name: 'input-keyboard-symbolic', - - parameter_type: null, - incoming: [ - 'kdeconnect.mousepad.echo', - 'kdeconnect.mousepad.keyboardstate', - ], - outgoing: ['kdeconnect.mousepad.request'], - }, - }, -}; - -/** - * A map of "KDE Connect" keyvals to Gdk - */ -const KeyMap = new Map([ - [1, Gdk.KEY_BackSpace], - [2, Gdk.KEY_Tab], - [3, Gdk.KEY_Linefeed], - [4, Gdk.KEY_Left], - [5, Gdk.KEY_Up], - [6, Gdk.KEY_Right], - [7, Gdk.KEY_Down], - [8, Gdk.KEY_Page_Up], - [9, Gdk.KEY_Page_Down], - [10, Gdk.KEY_Home], - [11, Gdk.KEY_End], - [12, Gdk.KEY_Return], - [13, Gdk.KEY_Delete], - [14, Gdk.KEY_Escape], - [15, Gdk.KEY_Sys_Req], - [16, Gdk.KEY_Scroll_Lock], - [17, 0], - [18, 0], - [19, 0], - [20, 0], - [21, Gdk.KEY_F1], - [22, Gdk.KEY_F2], - [23, Gdk.KEY_F3], - [24, Gdk.KEY_F4], - [25, Gdk.KEY_F5], - [26, Gdk.KEY_F6], - [27, Gdk.KEY_F7], - [28, Gdk.KEY_F8], - [29, Gdk.KEY_F9], - [30, Gdk.KEY_F10], - [31, Gdk.KEY_F11], - [32, Gdk.KEY_F12], -]); - -const KeyMapCodes = new Map([ - [1, 14], - [2, 15], - [3, 101], - [4, 105], - [5, 103], - [6, 106], - [7, 108], - [8, 104], - [9, 109], - [10, 102], - [11, 107], - [12, 28], - [13, 111], - [14, 1], - [15, 99], - [16, 70], - [17, 0], - [18, 0], - [19, 0], - [20, 0], - [21, 59], - [22, 60], - [23, 61], - [24, 62], - [25, 63], - [26, 64], - [27, 65], - [28, 66], - [29, 67], - [30, 68], - [31, 87], - [32, 88], -]); - -/** - * Mousepad Plugin - * https://github.com/KDE/kdeconnect-kde/tree/master/plugins/mousepad - * - * TODO: support outgoing mouse events? - */ -const MousepadPlugin = GObject.registerClass({ - GTypeName: 'GSConnectMousepadPlugin', - Properties: { - 'state': GObject.ParamSpec.boolean( - 'state', - 'State', - 'Remote keyboard state', - GObject.ParamFlags.READABLE, - false - ), - }, -}, class MousepadPlugin extends Plugin { - _init(device) { - super._init(device, 'mousepad'); - - if (!globalThis.HAVE_GNOME) - this._input = Components.acquire('ydotool'); - else - this._input = Components.acquire('input'); - - this._shareControlChangedId = this.settings.connect( - 'changed::share-control', - this._sendState.bind(this) - ); - } - - get state() { - if (this._state === undefined) - this._state = false; - - return this._state; - } - - connected() { - super.connected(); - - this._sendState(); - } - - disconnected() { - super.disconnected(); - - this._state = false; - this.notify('state'); - } - - handlePacket(packet) { - switch (packet.type) { - case 'kdeconnect.mousepad.request': - this._handleInput(packet.body); - break; - - case 'kdeconnect.mousepad.echo': - this._handleEcho(packet.body); - break; - - case 'kdeconnect.mousepad.keyboardstate': - this._handleState(packet); - break; - } - } - - /** - * Handle a input event. - * - * @param {Object} input - The body of a `kdeconnect.mousepad.request` - */ - _handleInput(input) { - if (!this.settings.get_boolean('share-control')) - return; - - let keysym; - let modifiers = 0; - const modifiers_codes = []; - - // These are ordered, as much as possible, to create the shortest code - // path for high-frequency, low-latency events (eg. mouse movement) - switch (true) { - case input.hasOwnProperty('scroll'): - this._input.scrollPointer(input.dx, input.dy); - break; - - case (input.hasOwnProperty('dx') && input.hasOwnProperty('dy')): - this._input.movePointer(input.dx, input.dy); - break; - - case (input.hasOwnProperty('key') || input.hasOwnProperty('specialKey')): - // NOTE: \u0000 sometimes sent in advance of a specialKey packet - if (input.key && input.key === '\u0000') - return; - - // Modifiers - if (input.alt) { - modifiers |= Gdk.ModifierType.MOD1_MASK; - modifiers_codes.push(56); - } - - if (input.ctrl) { - modifiers |= Gdk.ModifierType.CONTROL_MASK; - modifiers_codes.push(29); - } - - if (input.shift) { - modifiers |= Gdk.ModifierType.SHIFT_MASK; - modifiers_codes.push(42); - } - - if (input.super) { - modifiers |= Gdk.ModifierType.SUPER_MASK; - modifiers_codes.push(125); - } - - // Regular key (printable ASCII or Unicode) - if (input.key) { - if (!globalThis.HAVE_GNOME) - this._input.pressKeys(input.key, modifiers_codes); - else - this._input.pressKeys(input.key, modifiers); - - this._sendEcho(input); - - // Special key (eg. non-printable ASCII) - } else if (input.specialKey && KeyMap.has(input.specialKey)) { - if (!globalThis.HAVE_GNOME) { - keysym = KeyMapCodes.get(input.specialKey); - this._input.pressKeys(keysym, modifiers_codes); - } else { - keysym = KeyMap.get(input.specialKey); - this._input.pressKeys(keysym, modifiers); - } - - this._sendEcho(input); - } - break; - - case input.hasOwnProperty('singleclick'): - this._input.clickPointer(Gdk.BUTTON_PRIMARY); - break; - - case input.hasOwnProperty('doubleclick'): - this._input.doubleclickPointer(Gdk.BUTTON_PRIMARY); - break; - - case input.hasOwnProperty('middleclick'): - this._input.clickPointer(Gdk.BUTTON_MIDDLE); - break; - - case input.hasOwnProperty('rightclick'): - this._input.clickPointer(Gdk.BUTTON_SECONDARY); - break; - - case input.hasOwnProperty('singlehold'): - this._input.pressPointer(Gdk.BUTTON_PRIMARY); - break; - - case input.hasOwnProperty('singlerelease'): - this._input.releasePointer(Gdk.BUTTON_PRIMARY); - break; - - default: - logError(new Error('Unknown input')); - } - } - - /** - * Handle an echo/ACK of a event we sent, displaying it the dialog entry. - * - * @param {Object} input - The body of a `kdeconnect.mousepad.echo` - */ - _handleEcho(input) { - if (!this._dialog || !this._dialog.visible) - return; - - // Skip modifiers - if (input.alt || input.ctrl || input.super) - return; - - if (input.key) { - this._dialog._isAck = true; - this._dialog.entry.buffer.text += input.key; - this._dialog._isAck = false; - } else if (KeyMap.get(input.specialKey) === Gdk.KEY_BackSpace) { - this._dialog.entry.emit('backspace'); - } - } - - /** - * Handle a state change from the remote keyboard. This is an indication - * that the remote keyboard is ready to accept input. - * - * @param {Object} packet - A `kdeconnect.mousepad.keyboardstate` packet - */ - _handleState(packet) { - this._state = !!packet.body.state; - this.notify('state'); - } - - /** - * Send an echo/ACK of @input, if requested - * - * @param {Object} input - The body of a 'kdeconnect.mousepad.request' - */ - _sendEcho(input) { - if (!input.sendAck) - return; - - delete input.sendAck; - input.isAck = true; - - this.device.sendPacket({ - type: 'kdeconnect.mousepad.echo', - body: input, - }); - } - - /** - * Send the local keyboard state - * - * @param {boolean} state - Whether we're ready to accept input - */ - _sendState() { - this.device.sendPacket({ - type: 'kdeconnect.mousepad.keyboardstate', - body: { - state: this.settings.get_boolean('share-control'), - }, - }); - } - - /** - * Open the Keyboard Input dialog - */ - keyboard() { - if (this._dialog === undefined) { - this._dialog = new InputDialog({ - device: this.device, - plugin: this, - }); - } - - this._dialog.present(); - } - - destroy() { - if (this._input !== undefined) { - if (!globalThis.HAVE_GNOME) - this._input = Components.release('ydotool'); - else - this._input = Components.release('input'); - } - - if (this._dialog !== undefined) - this._dialog.destroy(); - - this.settings.disconnect(this._shareControlChangedId); - - super.destroy(); - } -}); - -export default MousepadPlugin; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/mpris.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/mpris.js deleted file mode 100644 index 2fd6a50f..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/mpris.js +++ /dev/null @@ -1,917 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; - -import * as Components from '../components/index.js'; -import Config from '../../config.js'; -import * as DBus from '../utils/dbus.js'; -import {Player} from '../components/mpris.js'; -import Plugin from '../plugin.js'; - - -export const Metadata = { - label: _('MPRIS'), - description: _('Bidirectional remote media playback control'), - id: 'org.gnome.Shell.Extensions.GSConnect.Plugin.MPRIS', - incomingCapabilities: ['kdeconnect.mpris', 'kdeconnect.mpris.request'], - outgoingCapabilities: ['kdeconnect.mpris', 'kdeconnect.mpris.request'], - actions: {}, -}; - - -/** - * MPRIS Plugin - * https://github.com/KDE/kdeconnect-kde/tree/master/plugins/mpriscontrol - * - * See also: - * https://specifications.freedesktop.org/mpris-spec/latest/ - * https://github.com/GNOME/gnome-shell/blob/master/js/ui/mpris.js - */ -const MPRISPlugin = GObject.registerClass({ - GTypeName: 'GSConnectMPRISPlugin', -}, class MPRISPlugin extends Plugin { - - _init(device) { - super._init(device, 'mpris'); - - this._players = new Map(); - this._transferring = new WeakSet(); - this._updating = new WeakSet(); - - this._mpris = Components.acquire('mpris'); - - this._playerAddedId = this._mpris.connect( - 'player-added', - this._sendPlayerList.bind(this) - ); - - this._playerRemovedId = this._mpris.connect( - 'player-removed', - this._sendPlayerList.bind(this) - ); - - this._playerChangedId = this._mpris.connect( - 'player-changed', - this._onPlayerChanged.bind(this) - ); - - this._playerSeekedId = this._mpris.connect( - 'player-seeked', - this._onPlayerSeeked.bind(this) - ); - } - - connected() { - super.connected(); - - this._requestPlayerList(); - this._sendPlayerList(); - } - - disconnected() { - super.disconnected(); - - for (const [identity, player] of this._players) { - this._players.delete(identity); - player.destroy(); - } - } - - handlePacket(packet) { - switch (packet.type) { - case 'kdeconnect.mpris': - this._handleUpdate(packet); - break; - - case 'kdeconnect.mpris.request': - this._handleRequest(packet); - break; - } - } - - /** - * Handle a remote player update. - * - * @param {Core.Packet} packet - A `kdeconnect.mpris` - */ - _handleUpdate(packet) { - try { - if (packet.body.hasOwnProperty('playerList')) - this._handlePlayerList(packet.body.playerList); - else if (packet.body.hasOwnProperty('player')) - this._handlePlayerUpdate(packet); - } catch (e) { - debug(e, this.device.name); - } - } - - /** - * Handle an updated list of remote players. - * - * @param {string[]} playerList - A list of remote player names - */ - _handlePlayerList(playerList) { - // Destroy removed players before adding new ones - for (const player of this._players.values()) { - if (!playerList.includes(player.Identity)) { - this._players.delete(player.Identity); - player.destroy(); - } - } - - for (const identity of playerList) { - if (!this._players.has(identity)) { - const player = new PlayerRemote(this.device, identity); - this._players.set(identity, player); - } - - // Always request player updates; packets are cheap - this.device.sendPacket({ - type: 'kdeconnect.mpris.request', - body: { - player: identity, - requestNowPlaying: true, - requestVolume: true, - }, - }); - } - } - - /** - * Handle an update for a remote player. - * - * @param {Object} packet - A `kdeconnect.mpris` packet - */ - _handlePlayerUpdate(packet) { - const player = this._players.get(packet.body.player); - - if (player === undefined) - return; - - if (packet.body.hasOwnProperty('transferringAlbumArt')) - player.handleAlbumArt(packet); - else - player.update(packet.body); - } - - /** - * Request a list of remote players. - */ - _requestPlayerList() { - this.device.sendPacket({ - type: 'kdeconnect.mpris.request', - body: { - requestPlayerList: true, - }, - }); - } - - /** - * Handle a request for player information or action. - * - * @param {Core.Packet} packet - a `kdeconnect.mpris.request` - * @return {undefined} no return value - */ - _handleRequest(packet) { - // A request for the list of players - if (packet.body.hasOwnProperty('requestPlayerList')) - return this._sendPlayerList(); - - // A request for an unknown player; send the list of players - if (!this._mpris.hasPlayer(packet.body.player)) - return this._sendPlayerList(); - - // An album art request - if (packet.body.hasOwnProperty('albumArtUrl')) - return this._sendAlbumArt(packet); - - // A player command - this._handleCommand(packet); - } - - /** - * Handle an incoming player command or information request - * - * @param {Core.Packet} packet - A `kdeconnect.mpris.request` - */ - async _handleCommand(packet) { - if (!this.settings.get_boolean('share-players')) - return; - - let player; - - try { - player = this._mpris.getPlayer(packet.body.player); - - if (player === undefined || this._updating.has(player)) - return; - - this._updating.add(player); - - // Player Actions - if (packet.body.hasOwnProperty('action')) { - switch (packet.body.action) { - case 'PlayPause': - case 'Play': - case 'Pause': - case 'Next': - case 'Previous': - case 'Stop': - player[packet.body.action](); - break; - - default: - debug(`unknown action: ${packet.body.action}`); - } - } - - // Player Properties - if (packet.body.hasOwnProperty('setLoopStatus')) - player.LoopStatus = packet.body.setLoopStatus; - - if (packet.body.hasOwnProperty('setShuffle')) - player.Shuffle = packet.body.setShuffle; - - if (packet.body.hasOwnProperty('setVolume')) - player.Volume = packet.body.setVolume / 100; - - if (packet.body.hasOwnProperty('Seek')) - await player.Seek(packet.body.Seek); - - if (packet.body.hasOwnProperty('SetPosition')) { - // We want to avoid implementing this as a seek operation, - // because some players seek a fixed amount for every - // seek request, only respecting the sign of the parameter. - // (Chrome, for example, will only seek ±5 seconds, regardless - // what value is passed to Seek().) - const position = packet.body.SetPosition; - const metadata = player.Metadata; - if (metadata.hasOwnProperty('mpris:trackid')) { - const trackId = metadata['mpris:trackid']; - await player.SetPosition(trackId, position * 1000); - } else { - await player.Seek(position * 1000 - player.Position); - } - } - - // Information Request - let hasResponse = false; - - const response = { - type: 'kdeconnect.mpris', - body: { - player: packet.body.player, - }, - }; - - if (packet.body.hasOwnProperty('requestNowPlaying')) { - hasResponse = true; - - Object.assign(response.body, { - pos: Math.floor(player.Position / 1000), - isPlaying: (player.PlaybackStatus === 'Playing'), - canPause: player.CanPause, - canPlay: player.CanPlay, - canGoNext: player.CanGoNext, - canGoPrevious: player.CanGoPrevious, - canSeek: player.CanSeek, - loopStatus: player.LoopStatus, - shuffle: player.Shuffle, - - // default values for members that will be filled conditionally - albumArtUrl: '', - length: 0, - artist: '', - title: '', - album: '', - nowPlaying: '', - volume: 0, - }); - - const metadata = player.Metadata; - - if (metadata.hasOwnProperty('mpris:artUrl')) { - const file = Gio.File.new_for_uri(metadata['mpris:artUrl']); - response.body.albumArtUrl = file.get_uri(); - } - - if (metadata.hasOwnProperty('mpris:length')) { - const trackLen = Math.floor(metadata['mpris:length'] / 1000); - response.body.length = trackLen; - } - - if (metadata.hasOwnProperty('xesam:artist')) { - const artists = metadata['xesam:artist']; - response.body.artist = artists.join(', '); - } - - if (metadata.hasOwnProperty('xesam:title')) - response.body.title = metadata['xesam:title']; - - if (metadata.hasOwnProperty('xesam:album')) - response.body.album = metadata['xesam:album']; - - // Now Playing - if (response.body.artist && response.body.title) { - response.body.nowPlaying = [ - response.body.artist, - response.body.title, - ].join(' - '); - } else if (response.body.artist) { - response.body.nowPlaying = response.body.artist; - } else if (response.body.title) { - response.body.nowPlaying = response.body.title; - } else { - response.body.nowPlaying = _('Unknown'); - } - } - - if (packet.body.hasOwnProperty('requestVolume')) { - hasResponse = true; - response.body.volume = Math.floor(player.Volume * 100); - } - - if (hasResponse) - this.device.sendPacket(response); - } catch (e) { - debug(e, this.device.name); - } finally { - this._updating.delete(player); - } - } - - _onPlayerChanged(mpris, player) { - if (!this.settings.get_boolean('share-players')) - return; - - this._handleCommand({ - body: { - player: player.Identity, - requestNowPlaying: true, - requestVolume: true, - }, - }); - } - - _onPlayerSeeked(mpris, player, offset) { - // TODO: although we can handle full seeked signals, kdeconnect-android - // does not, and expects a position update instead - this.device.sendPacket({ - type: 'kdeconnect.mpris', - body: { - player: player.Identity, - pos: Math.floor(player.Position / 1000), - // Seek: Math.floor(offset / 1000), - }, - }); - } - - async _sendAlbumArt(packet) { - let player; - - try { - // Reject concurrent requests for album art - player = this._mpris.getPlayer(packet.body.player); - - if (player === undefined || this._transferring.has(player)) - return; - - // Ensure the requested albumArtUrl matches the current mpris:artUrl - const metadata = player.Metadata; - - if (!metadata.hasOwnProperty('mpris:artUrl')) - return; - - const file = Gio.File.new_for_uri(metadata['mpris:artUrl']); - const request = Gio.File.new_for_uri(packet.body.albumArtUrl); - - if (file.get_uri() !== request.get_uri()) - throw RangeError(`invalid URI "${packet.body.albumArtUrl}"`); - - // Transfer the album art - this._transferring.add(player); - - const transfer = this.device.createTransfer(); - - transfer.addFile({ - type: 'kdeconnect.mpris', - body: { - transferringAlbumArt: true, - player: packet.body.player, - albumArtUrl: packet.body.albumArtUrl, - }, - }, file); - - await transfer.start(); - } catch (e) { - debug(e, this.device.name); - } finally { - this._transferring.delete(player); - } - } - - /** - * Send the list of player identities and indicate whether we support - * transferring album art - */ - _sendPlayerList() { - let playerList = []; - - if (this.settings.get_boolean('share-players')) - playerList = this._mpris.getIdentities(); - - this.device.sendPacket({ - type: 'kdeconnect.mpris', - body: { - playerList: playerList, - supportAlbumArtPayload: true, - }, - }); - } - - destroy() { - if (this._mpris !== undefined) { - this._mpris.disconnect(this._playerAddedId); - this._mpris.disconnect(this._playerRemovedId); - this._mpris.disconnect(this._playerChangedId); - this._mpris.disconnect(this._playerSeekedId); - this._mpris = Components.release('mpris'); - } - - for (const [identity, player] of this._players) { - this._players.delete(identity); - player.destroy(); - } - - super.destroy(); - } -}); - - -/* - * A class for mirroring a remote Media Player on DBus - */ -const PlayerRemote = GObject.registerClass({ - GTypeName: 'GSConnectMPRISPlayerRemote', -}, class PlayerRemote extends Player { - - _init(device, identity) { - super._init(); - - this._device = device; - this._Identity = identity; - this._isPlaying = false; - - this._artist = null; - this._title = null; - this._album = null; - this._length = 0; - this._artUrl = null; - - this._ownerId = 0; - this._connection = null; - this._applicationIface = null; - this._playerIface = null; - } - - _getFile(albumArtUrl) { - const hash = GLib.compute_checksum_for_string(GLib.ChecksumType.MD5, - albumArtUrl, -1); - const path = GLib.build_filenamev([Config.CACHEDIR, hash]); - - return Gio.File.new_for_uri(`file://${path}`); - } - - _requestAlbumArt(state) { - if (this._artUrl === state.albumArtUrl) - return; - - const file = this._getFile(state.albumArtUrl); - - if (file.query_exists(null)) { - this._artUrl = file.get_uri(); - this._Metadata = undefined; - this.notify('Metadata'); - } else { - this.device.sendPacket({ - type: 'kdeconnect.mpris.request', - body: { - player: this.Identity, - albumArtUrl: state.albumArtUrl, - }, - }); - } - } - - _updateMetadata(state) { - let metadataChanged = false; - - if (state.hasOwnProperty('artist')) { - if (this._artist !== state.artist) { - this._artist = state.artist; - metadataChanged = true; - } - } else if (this._artist) { - this._artist = null; - metadataChanged = true; - } - - if (state.hasOwnProperty('title')) { - if (this._title !== state.title) { - this._title = state.title; - metadataChanged = true; - } - } else if (this._title) { - this._title = null; - metadataChanged = true; - } - - if (state.hasOwnProperty('album')) { - if (this._album !== state.album) { - this._album = state.album; - metadataChanged = true; - } - } else if (this._album) { - this._album = null; - metadataChanged = true; - } - - if (state.hasOwnProperty('length')) { - if (this._length !== state.length * 1000) { - this._length = state.length * 1000; - metadataChanged = true; - } - } else if (this._length) { - this._length = 0; - metadataChanged = true; - } - - if (state.hasOwnProperty('albumArtUrl')) { - this._requestAlbumArt(state); - } else if (this._artUrl) { - this._artUrl = null; - metadataChanged = true; - } - - if (metadataChanged) { - this._Metadata = undefined; - this.notify('Metadata'); - } - } - - async export() { - try { - if (this._connection === null) { - this._connection = await DBus.newConnection(); - const MPRISIface = Config.DBUS.lookup_interface('org.mpris.MediaPlayer2'); - const MPRISPlayerIface = Config.DBUS.lookup_interface('org.mpris.MediaPlayer2.Player'); - - if (this._applicationIface === null) { - this._applicationIface = new DBus.Interface({ - g_instance: this, - g_connection: this._connection, - g_object_path: '/org/mpris/MediaPlayer2', - g_interface_info: MPRISIface, - }); - } - - if (this._playerIface === null) { - this._playerIface = new DBus.Interface({ - g_instance: this, - g_connection: this._connection, - g_object_path: '/org/mpris/MediaPlayer2', - g_interface_info: MPRISPlayerIface, - }); - } - } - - if (this._ownerId !== 0) - return; - - const name = [ - this.device.name, - this.Identity, - ].join('').replace(/[\W]*/g, ''); - - this._ownerId = Gio.bus_own_name_on_connection( - this._connection, - `org.mpris.MediaPlayer2.GSConnect.${name}`, - Gio.BusNameOwnerFlags.NONE, - null, - null - ); - } catch (e) { - debug(e, this.Identity); - } - } - - unexport() { - if (this._ownerId === 0) - return; - - Gio.bus_unown_name(this._ownerId); - this._ownerId = 0; - } - - /** - * Download album art for the current track of the remote player. - * - * @param {Core.Packet} packet - A `kdeconnect.mpris` packet - */ - async handleAlbumArt(packet) { - let file; - - try { - file = this._getFile(packet.body.albumArtUrl); - - // Transfer the album art - const transfer = this.device.createTransfer(); - transfer.addFile(packet, file); - - await transfer.start(); - - this._artUrl = file.get_uri(); - this._Metadata = undefined; - this.notify('Metadata'); - } catch (e) { - debug(e, this.device.name); - - if (file) - file.delete_async(GLib.PRIORITY_DEFAULT, null, null); - } - } - - /** - * Update the internal state of the media player. - * - * @param {Core.Packet} state - The body of a `kdeconnect.mpris` packet - */ - update(state) { - this.freeze_notify(); - - // Metadata - if (state.hasOwnProperty('nowPlaying') || - state.hasOwnProperty('artist') || - state.hasOwnProperty('title')) - this._updateMetadata(state); - - // Playback Status - if (state.hasOwnProperty('isPlaying')) { - if (this._isPlaying !== state.isPlaying) { - this._isPlaying = state.isPlaying; - this.notify('PlaybackStatus'); - } - } - - if (state.hasOwnProperty('canPlay')) { - if (this.CanPlay !== state.canPlay) { - this._CanPlay = state.canPlay; - this.notify('CanPlay'); - } - } - - if (state.hasOwnProperty('canPause')) { - if (this.CanPause !== state.canPause) { - this._CanPause = state.canPause; - this.notify('CanPause'); - } - } - - if (state.hasOwnProperty('canGoNext')) { - if (this.CanGoNext !== state.canGoNext) { - this._CanGoNext = state.canGoNext; - this.notify('CanGoNext'); - } - } - - if (state.hasOwnProperty('canGoPrevious')) { - if (this.CanGoPrevious !== state.canGoPrevious) { - this._CanGoPrevious = state.canGoPrevious; - this.notify('CanGoPrevious'); - } - } - - if (state.hasOwnProperty('pos')) - this._Position = state.pos * 1000; - - if (state.hasOwnProperty('volume')) { - if (this.Volume !== state.volume / 100) { - this._Volume = state.volume / 100; - this.notify('Volume'); - } - } - - this.thaw_notify(); - - if (!this._isPlaying && !this.CanControl) - this.unexport(); - else - this.export(); - } - - /* - * Native properties - */ - get device() { - return this._device; - } - - /* - * The org.mpris.MediaPlayer2.Player Interface - */ - get CanControl() { - return (this.CanPlay || this.CanPause); - } - - get Metadata() { - if (this._Metadata === undefined) { - this._Metadata = {}; - - if (this._artist) { - this._Metadata['xesam:artist'] = new GLib.Variant('as', - [this._artist]); - } - - if (this._title) { - this._Metadata['xesam:title'] = new GLib.Variant('s', - this._title); - } - - if (this._album) { - this._Metadata['xesam:album'] = new GLib.Variant('s', - this._album); - } - - if (this._artUrl) { - this._Metadata['mpris:artUrl'] = new GLib.Variant('s', - this._artUrl); - } - - this._Metadata['mpris:length'] = new GLib.Variant('x', - this._length); - } - - return this._Metadata; - } - - get PlaybackStatus() { - if (this._isPlaying) - return 'Playing'; - - return 'Stopped'; - } - - get Volume() { - if (this._Volume === undefined) - this._Volume = 0.3; - - return this._Volume; - } - - set Volume(level) { - if (this._Volume === level) - return; - - this._Volume = level; - this.notify('Volume'); - - this.device.sendPacket({ - type: 'kdeconnect.mpris.request', - body: { - player: this.Identity, - setVolume: Math.floor(this._Volume * 100), - }, - }); - } - - Next() { - if (!this.CanGoNext) - return; - - this.device.sendPacket({ - type: 'kdeconnect.mpris.request', - body: { - player: this.Identity, - action: 'Next', - }, - }); - } - - Pause() { - if (!this.CanPause) - return; - - this.device.sendPacket({ - type: 'kdeconnect.mpris.request', - body: { - player: this.Identity, - action: 'Pause', - }, - }); - } - - Play() { - if (!this.CanPlay) - return; - - this.device.sendPacket({ - type: 'kdeconnect.mpris.request', - body: { - player: this.Identity, - action: 'Play', - }, - }); - } - - PlayPause() { - if (!this.CanPlay && !this.CanPause) - return; - - this.device.sendPacket({ - type: 'kdeconnect.mpris.request', - body: { - player: this.Identity, - action: 'PlayPause', - }, - }); - } - - Previous() { - if (!this.CanGoPrevious) - return; - - this.device.sendPacket({ - type: 'kdeconnect.mpris.request', - body: { - player: this.Identity, - action: 'Previous', - }, - }); - } - - Seek(offset) { - if (!this.CanSeek) - return; - - this.device.sendPacket({ - type: 'kdeconnect.mpris.request', - body: { - player: this.Identity, - Seek: offset, - }, - }); - } - - SetPosition(trackId, position) { - debug(`${this._Identity}: SetPosition(${trackId}, ${position})`); - - if (!this.CanControl || !this.CanSeek) - return; - - this.device.sendPacket({ - type: 'kdeconnect.mpris.request', - body: { - player: this.Identity, - SetPosition: position / 1000, - }, - }); - } - - Stop() { - if (!this.CanControl) - return; - - this.device.sendPacket({ - type: 'kdeconnect.mpris.request', - body: { - player: this.Identity, - action: 'Stop', - }, - }); - } - - destroy() { - this.unexport(); - - if (this._connection) { - this._connection.close(null, null); - this._connection = null; - - if (this._applicationIface) { - this._applicationIface.destroy(); - this._applicationIface = null; - } - - if (this._playerIface) { - this._playerIface.destroy(); - this._playerIface = null; - } - } - } -}); - -export default MPRISPlugin; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/notification.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/notification.js deleted file mode 100644 index bb317db6..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/notification.js +++ /dev/null @@ -1,694 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Gtk from 'gi://Gtk'; - -import * as Components from '../components/index.js'; -import Config from '../../config.js'; -import Plugin from '../plugin.js'; -import ReplyDialog from '../ui/notification.js'; - - -export const Metadata = { - label: _('Notifications'), - description: _('Share notifications with the paired device'), - id: 'org.gnome.Shell.Extensions.GSConnect.Plugin.Notification', - incomingCapabilities: [ - 'kdeconnect.notification', - 'kdeconnect.notification.request', - ], - outgoingCapabilities: [ - 'kdeconnect.notification', - 'kdeconnect.notification.action', - 'kdeconnect.notification.reply', - 'kdeconnect.notification.request', - ], - actions: { - withdrawNotification: { - label: _('Cancel Notification'), - icon_name: 'preferences-system-notifications-symbolic', - - parameter_type: new GLib.VariantType('s'), - incoming: [], - outgoing: ['kdeconnect.notification'], - }, - closeNotification: { - label: _('Close Notification'), - icon_name: 'preferences-system-notifications-symbolic', - - parameter_type: new GLib.VariantType('s'), - incoming: [], - outgoing: ['kdeconnect.notification.request'], - }, - replyNotification: { - label: _('Reply Notification'), - icon_name: 'preferences-system-notifications-symbolic', - - parameter_type: new GLib.VariantType('(ssa{ss})'), - incoming: ['kdeconnect.notification'], - outgoing: ['kdeconnect.notification.reply'], - }, - sendNotification: { - label: _('Send Notification'), - icon_name: 'preferences-system-notifications-symbolic', - - parameter_type: new GLib.VariantType('a{sv}'), - incoming: [], - outgoing: ['kdeconnect.notification'], - }, - activateNotification: { - label: _('Activate Notification'), - icon_name: 'preferences-system-notifications-symbolic', - - parameter_type: new GLib.VariantType('(ss)'), - incoming: [], - outgoing: ['kdeconnect.notification.action'], - }, - }, -}; - - -// A regex for our custom notificaiton ids -const ID_REGEX = /^(fdo|gtk)\|([^|]+)\|(.*)$/; - -// A list of known SMS apps -const SMS_APPS = [ - // Popular apps that don't contain the string 'sms' - 'com.android.messaging', // AOSP - 'com.google.android.apps.messaging', // Google Messages - 'com.textra', // Textra - 'xyz.klinker.messenger', // Pulse - 'com.calea.echo', // Mood Messenger - 'com.moez.QKSMS', // QKSMS - 'rpkandrodev.yaata', // YAATA - 'com.tencent.mm', // WeChat - 'com.viber.voip', // Viber - 'com.kakao.talk', // KakaoTalk - 'com.concentriclivers.mms.com.android.mms', // AOSP Clone - 'fr.slvn.mms', // AOSP Clone - 'com.promessage.message', // - 'com.htc.sense.mms', // HTC Messages - - // Known not to work with sms plugin - 'org.thoughtcrime.securesms', // Signal Private Messenger - 'com.samsung.android.messaging', // Samsung Messages -]; - - -/** - * Try to determine if an notification is from an SMS app - * - * @param {Core.Packet} packet - A `kdeconnect.notification` - * @return {boolean} Whether the notification is from an SMS app - */ -function _isSmsNotification(packet) { - const id = packet.body.id; - - if (id.includes('sms')) - return true; - - for (let i = 0, len = SMS_APPS.length; i < len; i++) { - if (id.includes(SMS_APPS[i])) - return true; - } - - return false; -} - - -/** - * Remove a local libnotify or Gtk notification. - * - * @param {String|Number} id - Gtk (string) or libnotify id (uint32) - * @param {String|null} application - Application Id if Gtk or null - */ -function _removeNotification(id, application = null) { - let name, path, method, variant; - - if (application !== null) { - name = 'org.gtk.Notifications'; - method = 'RemoveNotification'; - path = '/org/gtk/Notifications'; - variant = new GLib.Variant('(ss)', [application, id]); - } else { - name = 'org.freedesktop.Notifications'; - path = '/org/freedesktop/Notifications'; - method = 'CloseNotification'; - variant = new GLib.Variant('(u)', [id]); - } - - Gio.DBus.session.call( - name, path, name, method, variant, null, - Gio.DBusCallFlags.NONE, -1, null, - (connection, res) => { - try { - connection.call_finish(res); - } catch (e) { - logError(e); - } - } - ); -} - - -/** - * Notification Plugin - * https://github.com/KDE/kdeconnect-kde/tree/master/plugins/notifications - * https://github.com/KDE/kdeconnect-kde/tree/master/plugins/sendnotifications - */ -const NotificationPlugin = GObject.registerClass({ - GTypeName: 'GSConnectNotificationPlugin', -}, class NotificationPlugin extends Plugin { - - _init(device) { - super._init(device, 'notification'); - - this._listener = Components.acquire('notification'); - this._session = Components.acquire('session'); - - this._notificationAddedId = this._listener.connect( - 'notification-added', - this._onNotificationAdded.bind(this) - ); - - // Load application notification settings - this._applicationsChangedId = this.settings.connect( - 'changed::applications', - this._onApplicationsChanged.bind(this) - ); - this._onApplicationsChanged(this.settings, 'applications'); - this._applicationsChangedSkip = false; - } - - connected() { - super.connected(); - - this._requestNotifications(); - } - - handlePacket(packet) { - switch (packet.type) { - case 'kdeconnect.notification': - this._handleNotification(packet); - break; - - // TODO - case 'kdeconnect.notification.action': - this._handleNotificationAction(packet); - break; - - // No Linux/BSD desktop notifications are repliable as yet - case 'kdeconnect.notification.reply': - debug(`Not implemented: ${packet.type}`); - break; - - case 'kdeconnect.notification.request': - this._handleNotificationRequest(packet); - break; - - default: - debug(`Unknown notification packet: ${packet.type}`); - } - } - - _onApplicationsChanged(settings, key) { - if (this._applicationsChangedSkip) - return; - - try { - const json = settings.get_string(key); - this._applications = JSON.parse(json); - } catch (e) { - debug(e, this.device.name); - - this._applicationsChangedSkip = true; - settings.set_string(key, '{}'); - this._applicationsChangedSkip = false; - } - } - - _onNotificationAdded(listener, notification) { - try { - const notif = notification.full_unpack(); - - // An unconfigured application - if (notif.appName && !this._applications[notif.appName]) { - this._applications[notif.appName] = { - iconName: 'system-run-symbolic', - enabled: true, - }; - - // Store the themed icons for the device preferences window - if (notif.icon === undefined) { - // Keep default - - } else if (typeof notif.icon === 'string') { - this._applications[notif.appName].iconName = notif.icon; - - } else if (notif.icon instanceof Gio.ThemedIcon) { - const iconName = notif.icon.get_names()[0]; - this._applications[notif.appName].iconName = iconName; - } - - this._applicationsChangedSkip = true; - this.settings.set_string( - 'applications', - JSON.stringify(this._applications) - ); - this._applicationsChangedSkip = false; - } - - // Sending notifications forbidden - if (!this.settings.get_boolean('send-notifications')) - return; - - // Sending when the session is active is forbidden - if (!this.settings.get_boolean('send-active') && this._session.active) - return; - - // Notifications disabled for this application - if (notif.appName && !this._applications[notif.appName].enabled) - return; - - this.sendNotification(notif); - } catch (e) { - debug(e, this.device.name); - } - } - - /** - * Handle an incoming notification or closed report. - * - * FIXME: upstream kdeconnect-android is tagging many notifications as - * `silent`, causing them to never be shown. Since we already handle - * duplicates in the Shell, we ignore that flag for now. - * - * @param {Core.Packet} packet - A `kdeconnect.notification` - */ - _handleNotification(packet) { - // A report that a remote notification has been dismissed - if (packet.body.hasOwnProperty('isCancel')) - this.device.hideNotification(packet.body.id); - - // A normal, remote notification - else - this._receiveNotification(packet); - } - - /** - * Handle an incoming request to activate a notification action. - * - * @param {Core.Packet} packet - A `kdeconnect.notification.action` - */ - _handleNotificationAction(packet) { - throw new GObject.NotImplementedError(); - } - - /** - * Handle an incoming request to close or list notifications. - * - * @param {Core.Packet} packet - A `kdeconnect.notification.request` - */ - _handleNotificationRequest(packet) { - // A request for our notifications. This isn't implemented and would be - // pretty hard to without communicating with GNOME Shell. - if (packet.body.hasOwnProperty('request')) - return; - - // A request to close a local notification - // - // TODO: kdeconnect-android doesn't send these, and will instead send a - // kdeconnect.notification packet with isCancel and an id of "0". - // - // For clients that do support it, we report notification ids in the - // form "type|application-id|notification-id" so we can close it with - // the appropriate service. - if (packet.body.hasOwnProperty('cancel')) { - const [, type, application, id] = ID_REGEX.exec(packet.body.cancel); - - if (type === 'fdo') - _removeNotification(parseInt(id)); - else if (type === 'gtk') - _removeNotification(id, application); - } - } - - /** - * Upload an icon from a GLib.Bytes object. - * - * @param {Core.Packet} packet - The packet for the notification - * @param {GLib.Bytes} bytes - The icon bytes - */ - _uploadBytesIcon(packet, bytes) { - const stream = Gio.MemoryInputStream.new_from_bytes(bytes); - this._uploadIconStream(packet, stream, bytes.get_size()); - } - - /** - * Upload an icon from a Gio.File object. - * - * @param {Core.Packet} packet - A `kdeconnect.notification` - * @param {Gio.File} file - A file object for the icon - */ - async _uploadFileIcon(packet, file) { - const read = file.read_async(GLib.PRIORITY_DEFAULT, null); - const query = file.query_info_async('standard::size', - Gio.FileQueryInfoFlags.NONE, GLib.PRIORITY_DEFAULT, null); - const [stream, info] = await Promise.all([read, query]); - - this._uploadIconStream(packet, stream, info.get_size()); - } - - /** - * A function for uploading GThemedIcons - * - * @param {Core.Packet} packet - The packet for the notification - * @param {Gio.ThemedIcon} icon - The GIcon to upload - */ - _uploadThemedIcon(packet, icon) { - const theme = Gtk.IconTheme.get_default(); - let file = null; - - for (const name of icon.names) { - // NOTE: kdeconnect-android doesn't support SVGs - const size = Math.max.apply(null, theme.get_icon_sizes(name)); - const info = theme.lookup_icon(name, size, Gtk.IconLookupFlags.NO_SVG); - - // Send the first icon we find from the options - if (info) { - file = Gio.File.new_for_path(info.get_filename()); - break; - } - } - - if (file) - this._uploadFileIcon(packet, file); - else - this.device.sendPacket(packet); - } - - /** - * All icon types end up being uploaded in this function. - * - * @param {Core.Packet} packet - The packet for the notification - * @param {Gio.InputStream} stream - A stream to read the icon bytes from - * @param {number} size - Size of the icon in bytes - */ - async _uploadIconStream(packet, stream, size) { - try { - const transfer = this.device.createTransfer(); - transfer.addStream(packet, stream, size); - - await transfer.start(); - } catch (e) { - debug(e); - - this.device.sendPacket(packet); - } - } - - /** - * Upload an icon from a GIcon or themed icon name. - * - * @param {Core.Packet} packet - A `kdeconnect.notification` - * @param {Gio.Icon|string|null} icon - An icon or %null - * @return {Promise} A promise for the operation - */ - _uploadIcon(packet, icon = null) { - // Normalize strings into GIcons - if (typeof icon === 'string') - icon = Gio.Icon.new_for_string(icon); - - if (icon instanceof Gio.ThemedIcon) - return this._uploadThemedIcon(packet, icon); - - if (icon instanceof Gio.FileIcon) - return this._uploadFileIcon(packet, icon.get_file()); - - if (icon instanceof Gio.BytesIcon) - return this._uploadBytesIcon(packet, icon.get_bytes()); - - return this.device.sendPacket(packet); - } - - /** - * Send a local notification to the remote device. - * - * @param {Object} notif - A dictionary of notification parameters - * @param {string} notif.appName - The notifying application - * @param {string} notif.id - The notification ID - * @param {string} notif.title - The notification title - * @param {string} notif.body - The notification body - * @param {string} notif.ticker - The notification title & body - * @param {boolean} notif.isClearable - If the notification can be closed - * @param {string|Gio.Icon} notif.icon - An icon name or GIcon - */ - async sendNotification(notif) { - try { - const icon = notif.icon || null; - delete notif.icon; - - await this._uploadIcon({ - type: 'kdeconnect.notification', - body: notif, - }, icon); - } catch (e) { - logError(e); - } - } - - async _downloadIcon(packet) { - try { - if (!packet.hasPayload()) - return null; - - // Save the file in the global cache - const path = GLib.build_filenamev([ - Config.CACHEDIR, - packet.body.payloadHash || `${Date.now()}`, - ]); - - // Check if we've already downloaded this icon - // NOTE: if we reject the transfer kdeconnect-android will resend - // the notification packet, which may cause problems wrt #789 - const file = Gio.File.new_for_path(path); - - if (file.query_exists(null)) - return new Gio.FileIcon({file: file}); - - // Open the target path and create a transfer - const transfer = this.device.createTransfer(); - - transfer.addFile(packet, file); - - try { - await transfer.start(); - - return new Gio.FileIcon({file: file}); - } catch (e) { - debug(e, this.device.name); - - file.delete_async(GLib.PRIORITY_DEFAULT, null, null); - return null; - } - } catch (e) { - debug(e, this.device.name); - return null; - } - } - - /** - * Receive an incoming notification. - * - * @param {Core.Packet} packet - A `kdeconnect.notification` - */ - async _receiveNotification(packet) { - try { - // Set defaults - let action = null; - let buttons = []; - let id = packet.body.id; - let title = packet.body.appName; - let body = `${packet.body.title}: ${packet.body.text}`; - let icon = await this._downloadIcon(packet); - - // Repliable Notification - if (packet.body.requestReplyId) { - id = `${packet.body.id}|${packet.body.requestReplyId}`; - action = { - name: 'replyNotification', - parameter: new GLib.Variant('(ssa{ss})', [ - packet.body.requestReplyId, - '', - { - appName: packet.body.appName, - title: packet.body.title, - text: packet.body.text, - }, - ]), - }; - } - - // Notification Actions - if (packet.body.actions) { - buttons = packet.body.actions.map(action => { - return { - label: action, - action: 'activateNotification', - parameter: new GLib.Variant('(ss)', [id, action]), - }; - }); - } - - // Special case for Missed Calls - if (packet.body.id.includes('MissedCall')) { - title = packet.body.title; - body = packet.body.text; - - if (icon === null) - icon = new Gio.ThemedIcon({name: 'call-missed-symbolic'}); - - // Special case for SMS notifications - } else if (_isSmsNotification(packet)) { - title = packet.body.title; - body = packet.body.text; - action = { - name: 'replySms', - parameter: new GLib.Variant('s', packet.body.title), - }; - - if (icon === null) - icon = new Gio.ThemedIcon({name: 'sms-symbolic'}); - - // Special case where 'appName' is the same as 'title' - } else if (packet.body.appName === packet.body.title) { - body = packet.body.text; - } - - // Use the device icon if we still don't have one - if (icon === null) - icon = new Gio.ThemedIcon({name: this.device.icon_name}); - - // Show the notification - this.device.showNotification({ - id: id, - title: title, - body: body, - icon: icon, - action: action, - buttons: buttons, - }); - } catch (e) { - logError(e); - } - } - - /** - * Request the remote notifications be sent - */ - _requestNotifications() { - this.device.sendPacket({ - type: 'kdeconnect.notification.request', - body: {request: true}, - }); - } - - /** - * Report that a local notification has been closed/dismissed. - * TODO: kdeconnect-android doesn't handle incoming isCancel packets. - * - * @param {string} id - The local notification id - */ - withdrawNotification(id) { - this.device.sendPacket({ - type: 'kdeconnect.notification', - body: { - isCancel: true, - id: id, - }, - }); - } - - /** - * Close a remote notification. - * TODO: ignore local notifications - * - * @param {string} id - The remote notification id - */ - closeNotification(id) { - this.device.sendPacket({ - type: 'kdeconnect.notification.request', - body: {cancel: id}, - }); - } - - /** - * Reply to a notification sent with a requestReplyId UUID - * - * @param {string} uuid - The requestReplyId for the repliable notification - * @param {string} message - The message to reply with - * @param {Object} notification - The original notification packet - */ - replyNotification(uuid, message, notification) { - // If this happens for some reason, things will explode - if (!uuid) - throw Error('Missing UUID'); - - // If the message has no content, open a dialog for the user to add one - if (!message) { - const dialog = new ReplyDialog({ - device: this.device, - uuid: uuid, - notification: notification, - plugin: this, - }); - dialog.present(); - - // Otherwise just send the reply - } else { - this.device.sendPacket({ - type: 'kdeconnect.notification.reply', - body: { - requestReplyId: uuid, - message: message, - }, - }); - } - } - - /** - * Activate a remote notification action - * - * @param {string} id - The remote notification id - * @param {string} action - The notification action (label) - */ - activateNotification(id, action) { - this.device.sendPacket({ - type: 'kdeconnect.notification.action', - body: { - action: action, - key: id, - }, - }); - } - - destroy() { - this.settings.disconnect(this._applicationsChangedId); - - if (this._listener !== undefined) { - this._listener.disconnect(this._notificationAddedId); - this._listener = Components.release('notification'); - } - - if (this._session !== undefined) - this._session = Components.release('session'); - - super.destroy(); - } -}); - -export default NotificationPlugin; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/ping.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/ping.js deleted file mode 100644 index 011ecf02..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/ping.js +++ /dev/null @@ -1,73 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; - -import Plugin from '../plugin.js'; - - -export const Metadata = { - label: _('Ping'), - description: _('Send and receive pings'), - id: 'org.gnome.Shell.Extensions.GSConnect.Plugin.Ping', - incomingCapabilities: ['kdeconnect.ping'], - outgoingCapabilities: ['kdeconnect.ping'], - actions: { - ping: { - label: _('Ping'), - icon_name: 'dialog-information-symbolic', - - parameter_type: new GLib.VariantType('s'), - incoming: [], - outgoing: ['kdeconnect.ping'], - }, - }, -}; - - -/** - * Ping Plugin - * https://github.com/KDE/kdeconnect-kde/tree/master/plugins/ping - */ -const PingPlugin = GObject.registerClass({ - GTypeName: 'GSConnectPingPlugin', -}, class PingPlugin extends Plugin { - - _init(device) { - super._init(device, 'ping'); - } - - handlePacket(packet) { - // Notification - const notif = { - title: this.device.name, - body: _('Ping'), - icon: new Gio.ThemedIcon({name: `${this.device.icon_name}`}), - }; - - if (packet.body.message) { - // TRANSLATORS: An optional message accompanying a ping, rarely if ever used - // eg. Ping: A message sent with ping - notif.body = _('Ping: %s').format(packet.body.message); - } - - this.device.showNotification(notif); - } - - ping(message = '') { - const packet = { - type: 'kdeconnect.ping', - body: {}, - }; - - if (message.length) - packet.body.message = message; - - this.device.sendPacket(packet); - } -}); - -export default PingPlugin; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/presenter.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/presenter.js deleted file mode 100644 index 3cccab03..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/presenter.js +++ /dev/null @@ -1,63 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import GObject from 'gi://GObject'; - -import * as Components from '../components/index.js'; -import Plugin from '../plugin.js'; - - -export const Metadata = { - label: _('Presentation'), - description: _('Use the paired device as a presenter'), - id: 'org.gnome.Shell.Extensions.GSConnect.Plugin.Presenter', - incomingCapabilities: ['kdeconnect.presenter'], - outgoingCapabilities: [], - actions: {}, -}; - - -/** - * Presenter Plugin - * https://github.com/KDE/kdeconnect-kde/tree/master/plugins/presenter - * https://github.com/KDE/kdeconnect-android/tree/master/src/org/kde/kdeconnect/Plugins/PresenterPlugin/ - */ -const PresenterPlugin = GObject.registerClass({ - GTypeName: 'GSConnectPresenterPlugin', -}, class PresenterPlugin extends Plugin { - - _init(device) { - super._init(device, 'presenter'); - - if (!globalThis.HAVE_GNOME) - this._input = Components.acquire('ydotool'); - else - this._input = Components.acquire('input'); - } - - handlePacket(packet) { - if (packet.body.hasOwnProperty('dx')) { - this._input.movePointer( - packet.body.dx * 1000, - packet.body.dy * 1000 - ); - } else if (packet.body.stop) { - // Currently unsupported and unnecessary as we just re-use the mouse - // pointer instead of showing an arbitrary window. - } - } - - destroy() { - if (this._input !== undefined) { - if (!globalThis.HAVE_GNOME) - this._input = Components.release('ydotool'); - else - this._input = Components.release('input'); - } - - super.destroy(); - } -}); - -export default PresenterPlugin; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/runcommand.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/runcommand.js deleted file mode 100644 index c57c6c0f..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/runcommand.js +++ /dev/null @@ -1,254 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; - -import Plugin from '../plugin.js'; - - -export const Metadata = { - label: _('Run Commands'), - id: 'org.gnome.Shell.Extensions.GSConnect.Plugin.RunCommand', - description: _('Run commands on your paired device or let the device run predefined commands on this PC'), - incomingCapabilities: [ - 'kdeconnect.runcommand', - 'kdeconnect.runcommand.request', - ], - outgoingCapabilities: [ - 'kdeconnect.runcommand', - 'kdeconnect.runcommand.request', - ], - actions: { - commands: { - label: _('Commands'), - icon_name: 'system-run-symbolic', - - parameter_type: new GLib.VariantType('s'), - incoming: ['kdeconnect.runcommand'], - outgoing: ['kdeconnect.runcommand.request'], - }, - executeCommand: { - label: _('Commands'), - icon_name: 'system-run-symbolic', - - parameter_type: new GLib.VariantType('s'), - incoming: ['kdeconnect.runcommand'], - outgoing: ['kdeconnect.runcommand.request'], - }, - }, -}; - - -/** - * RunCommand Plugin - * https://github.com/KDE/kdeconnect-kde/tree/master/plugins/remotecommands - * https://github.com/KDE/kdeconnect-kde/tree/master/plugins/runcommand - */ -const RunCommandPlugin = GObject.registerClass({ - GTypeName: 'GSConnectRunCommandPlugin', - Properties: { - 'remote-commands': GObject.param_spec_variant( - 'remote-commands', - 'Remote Command List', - 'A list of the device\'s remote commands', - new GLib.VariantType('a{sv}'), - null, - GObject.ParamFlags.READABLE - ), - }, -}, class RunCommandPlugin extends Plugin { - - _init(device) { - super._init(device, 'runcommand'); - - // Local Commands - this._commandListChangedId = this.settings.connect( - 'changed::command-list', - this._sendCommandList.bind(this) - ); - - // We cache remote commands so they can be used in the settings even - // when the device is offline. - this._remote_commands = {}; - this.cacheProperties(['_remote_commands']); - } - - get remote_commands() { - return this._remote_commands; - } - - connected() { - super.connected(); - - this._sendCommandList(); - this._requestCommandList(); - this._handleCommandList(this.remote_commands); - } - - clearCache() { - this._remote_commands = {}; - this.notify('remote-commands'); - } - - cacheLoaded() { - if (!this.device.connected) - return; - - this._sendCommandList(); - this._requestCommandList(); - this._handleCommandList(this.remote_commands); - } - - handlePacket(packet) { - switch (packet.type) { - case 'kdeconnect.runcommand': - this._handleCommandList(packet.body.commandList); - break; - - case 'kdeconnect.runcommand.request': - if (packet.body.hasOwnProperty('key')) - this._handleCommand(packet.body.key); - - else if (packet.body.hasOwnProperty('requestCommandList')) - this._sendCommandList(); - - break; - } - } - - /** - * Handle a request to execute the local command with the UUID @key - * - * @param {string} key - The UUID of the local command - */ - _handleCommand(key) { - try { - const commands = this.settings.get_value('command-list'); - const commandList = commands.recursiveUnpack(); - - if (!commandList.hasOwnProperty(key)) { - throw new Gio.IOErrorEnum({ - code: Gio.IOErrorEnum.PERMISSION_DENIED, - message: `Unknown command: ${key}`, - }); - } - - this.device.launchProcess([ - '/bin/sh', - '-c', - commandList[key].command, - ]); - } catch (e) { - logError(e, this.device.name); - } - } - - /** - * Parse the response to a request for the remote command list. Remove the - * command menu if there are no commands, otherwise amend the menu. - * - * @param {string|Object[]} commandList - A list of remote commands - */ - _handleCommandList(commandList) { - // See: https://github.com/GSConnect/gnome-shell-extension-gsconnect/issues/1051 - if (typeof commandList === 'string') { - try { - commandList = JSON.parse(commandList); - } catch (e) { - commandList = {}; - } - } - - this._remote_commands = commandList; - this.notify('remote-commands'); - - const commandEntries = Object.entries(this.remote_commands); - - // If there are no commands, hide the menu by disabling the action - this.device.lookup_action('commands').enabled = (commandEntries.length > 0); - - // Commands Submenu - const submenu = new Gio.Menu(); - - for (const [uuid, info] of commandEntries) { - const item = new Gio.MenuItem(); - item.set_label(info.name); - item.set_icon( - new Gio.ThemedIcon({name: 'application-x-executable-symbolic'}) - ); - item.set_detailed_action(`device.executeCommand::${uuid}`); - submenu.append_item(item); - } - - // Commands Item - const item = new Gio.MenuItem(); - item.set_detailed_action('device.commands::menu'); - item.set_attribute_value( - 'hidden-when', - new GLib.Variant('s', 'action-disabled') - ); - item.set_icon(new Gio.ThemedIcon({name: 'system-run-symbolic'})); - item.set_label(_('Commands')); - item.set_submenu(submenu); - - // If the submenu item is already present it will be replaced - const menuActions = this.device.settings.get_strv('menu-actions'); - const index = menuActions.indexOf('commands'); - - if (index > -1) { - this.device.removeMenuAction('device.commands'); - this.device.addMenuItem(item, index); - } - } - - /** - * Send a request for the remote command list - */ - _requestCommandList() { - this.device.sendPacket({ - type: 'kdeconnect.runcommand.request', - body: {requestCommandList: true}, - }); - } - - /** - * Send the local command list - */ - _sendCommandList() { - const commands = this.settings.get_value('command-list').recursiveUnpack(); - const commandList = JSON.stringify(commands); - - this.device.sendPacket({ - type: 'kdeconnect.runcommand', - body: {commandList: commandList}, - }); - } - - /** - * Placeholder function for command action - */ - commands() {} - - /** - * Send a request to execute the remote command with the UUID @key - * - * @param {string} key - The UUID of the remote command - */ - executeCommand(key) { - this.device.sendPacket({ - type: 'kdeconnect.runcommand.request', - body: {key: key}, - }); - } - - destroy() { - this.settings.disconnect(this._commandListChangedId); - - super.destroy(); - } -}); - -export default RunCommandPlugin; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/sftp.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/sftp.js deleted file mode 100644 index 2789ff36..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/sftp.js +++ /dev/null @@ -1,487 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; - -import Config from '../../config.js'; -import Plugin from '../plugin.js'; - - -export const Metadata = { - label: _('SFTP'), - id: 'org.gnome.Shell.Extensions.GSConnect.Plugin.SFTP', - description: _('Browse the paired device filesystem'), - incomingCapabilities: ['kdeconnect.sftp'], - outgoingCapabilities: ['kdeconnect.sftp.request'], - actions: { - mount: { - label: _('Mount'), - icon_name: 'folder-remote-symbolic', - - parameter_type: null, - incoming: ['kdeconnect.sftp'], - outgoing: ['kdeconnect.sftp.request'], - }, - unmount: { - label: _('Unmount'), - icon_name: 'media-eject-symbolic', - - parameter_type: null, - incoming: ['kdeconnect.sftp'], - outgoing: ['kdeconnect.sftp.request'], - }, - }, -}; - - -const MAX_MOUNT_DIRS = 12; - - -/** - * SFTP Plugin - * https://github.com/KDE/kdeconnect-kde/tree/master/plugins/sftp - * https://github.com/KDE/kdeconnect-android/tree/master/src/org/kde/kdeconnect/Plugins/SftpPlugin - */ -const SFTPPlugin = GObject.registerClass({ - GTypeName: 'GSConnectSFTPPlugin', -}, class SFTPPlugin extends Plugin { - - _init(device) { - super._init(device, 'sftp'); - - this._gmount = null; - this._mounting = false; - - // A reusable launcher for ssh processes - this._launcher = new Gio.SubprocessLauncher({ - flags: (Gio.SubprocessFlags.STDOUT_PIPE | - Gio.SubprocessFlags.STDERR_MERGE), - }); - - // Watch the volume monitor - this._volumeMonitor = Gio.VolumeMonitor.get(); - - this._mountAddedId = this._volumeMonitor.connect( - 'mount-added', - this._onMountAdded.bind(this) - ); - - this._mountRemovedId = this._volumeMonitor.connect( - 'mount-removed', - this._onMountRemoved.bind(this) - ); - } - - get gmount() { - if (this._gmount === null && this.device.connected) { - const host = this.device.channel.host; - - const regex = new RegExp( - `sftp://(${host}):(1739|17[4-5][0-9]|176[0-4])` - ); - - for (const mount of this._volumeMonitor.get_mounts()) { - const uri = mount.get_root().get_uri(); - - if (regex.test(uri)) { - this._gmount = mount; - this._addSubmenu(mount); - this._addSymlink(mount); - - break; - } - } - } - - return this._gmount; - } - - connected() { - super.connected(); - - // Only enable for Lan connections - if (this.device.channel.constructor.name === 'LanChannel') { // FIXME: Circular import workaround - if (this.settings.get_boolean('automount')) - this.mount(); - } else { - this.device.lookup_action('mount').enabled = false; - this.device.lookup_action('unmount').enabled = false; - } - } - - handlePacket(packet) { - switch (packet.type) { - case 'kdeconnect.sftp': - if (packet.body.hasOwnProperty('errorMessage')) - this._handleError(packet); - else - this._handleMount(packet); - - break; - } - } - - _onMountAdded(monitor, mount) { - if (this._gmount !== null || !this.device.connected) - return; - - const host = this.device.channel.host; - const regex = new RegExp(`sftp://(${host}):(1739|17[4-5][0-9]|176[0-4])`); - const uri = mount.get_root().get_uri(); - - if (!regex.test(uri)) - return; - - this._gmount = mount; - this._addSubmenu(mount); - this._addSymlink(mount); - } - - _onMountRemoved(monitor, mount) { - if (this.gmount !== mount) - return; - - this._gmount = null; - this._removeSubmenu(); - } - - async _listDirectories(mount) { - const file = mount.get_root(); - - const iter = await file.enumerate_children_async( - Gio.FILE_ATTRIBUTE_STANDARD_NAME, - Gio.FileQueryInfoFlags.NOFOLLOW_SYMLINKS, - GLib.PRIORITY_DEFAULT, - this.cancellable); - - const infos = await iter.next_files_async(MAX_MOUNT_DIRS, - GLib.PRIORITY_DEFAULT, this.cancellable); - iter.close_async(GLib.PRIORITY_DEFAULT, null, null); - - const directories = {}; - - for (const info of infos) { - const name = info.get_name(); - directories[name] = `${file.get_uri()}${name}/`; - } - - return directories; - } - - _onAskQuestion(op, message, choices) { - op.reply(Gio.MountOperationResult.HANDLED); - } - - _onAskPassword(op, message, user, domain, flags) { - op.reply(Gio.MountOperationResult.HANDLED); - } - - /** - * Handle an error reported by the remote device. - * - * @param {Core.Packet} packet - a `kdeconnect.sftp` - */ - _handleError(packet) { - this.device.showNotification({ - id: 'sftp-error', - title: _('%s reported an error').format(this.device.name), - body: packet.body.errorMessage, - icon: new Gio.ThemedIcon({name: 'dialog-error-symbolic'}), - priority: Gio.NotificationPriority.HIGH, - }); - } - - /** - * Mount the remote device using the provided information. - * - * @param {Core.Packet} packet - a `kdeconnect.sftp` - */ - async _handleMount(packet) { - try { - // Already mounted or mounting - if (this.gmount !== null || this._mounting) - return; - - this._mounting = true; - - // Ensure the private key is in the keyring - await this._addPrivateKey(); - - // Create a new mount operation - const op = new Gio.MountOperation({ - username: packet.body.user || null, - password: packet.body.password || null, - password_save: Gio.PasswordSave.NEVER, - }); - - op.connect('ask-question', this._onAskQuestion); - op.connect('ask-password', this._onAskPassword); - - // This is the actual call to mount the device - const host = this.device.channel.host; - const uri = `sftp://${host}:${packet.body.port}/`; - const file = Gio.File.new_for_uri(uri); - - await file.mount_enclosing_volume(GLib.PRIORITY_DEFAULT, op, - this.cancellable); - } catch (e) { - // Special case when the GMount didn't unmount properly but is still - // on the same port and can be reused. - if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.ALREADY_MOUNTED)) - return; - - // There's a good chance this is a host key verification error; - // regardless we'll remove the key for security. - this._removeHostKey(this.device.channel.host); - logError(e, this.device.name); - } finally { - this._mounting = false; - } - } - - /** - * Add GSConnect's private key identity to the authentication agent so our - * identity can be verified by Android during private key authentication. - * - * @return {Promise} A promise for the operation - */ - async _addPrivateKey() { - const ssh_add = this._launcher.spawnv([ - Config.SSHADD_PATH, - GLib.build_filenamev([Config.CONFIGDIR, 'private.pem']), - ]); - - const [stdout] = await ssh_add.communicate_utf8_async(null, - this.cancellable); - - if (ssh_add.get_exit_status() !== 0) - debug(stdout.trim(), this.device.name); - } - - /** - * Remove all host keys from ~/.ssh/known_hosts for @host in the port range - * used by KDE Connect (1739-1764). - * - * @param {string} host - A hostname or IP address - */ - async _removeHostKey(host) { - for (let port = 1739; port <= 1764; port++) { - try { - const ssh_keygen = this._launcher.spawnv([ - Config.SSHKEYGEN_PATH, - '-R', - `[${host}]:${port}`, - ]); - - const [stdout] = await ssh_keygen.communicate_utf8_async(null, - this.cancellable); - - const status = ssh_keygen.get_exit_status(); - - if (status !== 0) { - throw new Gio.IOErrorEnum({ - code: Gio.io_error_from_errno(status), - message: `${GLib.strerror(status)}\n${stdout}`.trim(), - }); - } - } catch (e) { - logError(e, this.device.name); - } - } - } - - /* - * Mount menu helpers - */ - _getUnmountSection() { - if (this._unmountSection === undefined) { - this._unmountSection = new Gio.Menu(); - - const unmountItem = new Gio.MenuItem(); - unmountItem.set_label(Metadata.actions.unmount.label); - unmountItem.set_icon(new Gio.ThemedIcon({ - name: Metadata.actions.unmount.icon_name, - })); - unmountItem.set_detailed_action('device.unmount'); - this._unmountSection.append_item(unmountItem); - } - - return this._unmountSection; - } - - _getFilesMenuItem() { - if (this._filesMenuItem === undefined) { - // Files menu icon - const emblem = new Gio.Emblem({ - icon: new Gio.ThemedIcon({name: 'emblem-default'}), - }); - - const mountedIcon = new Gio.EmblemedIcon({ - gicon: new Gio.ThemedIcon({name: 'folder-remote-symbolic'}), - }); - mountedIcon.add_emblem(emblem); - - // Files menu item - this._filesMenuItem = new Gio.MenuItem(); - this._filesMenuItem.set_detailed_action('device.mount'); - this._filesMenuItem.set_icon(mountedIcon); - this._filesMenuItem.set_label(_('Files')); - } - - return this._filesMenuItem; - } - - async _addSubmenu(mount) { - try { - const directories = await this._listDirectories(mount); - - // Submenu sections - const dirSection = new Gio.Menu(); - const unmountSection = this._getUnmountSection(); - - for (const [name, uri] of Object.entries(directories)) - dirSection.append(name, `device.openPath::${uri}`); - - // Files submenu - const filesSubmenu = new Gio.Menu(); - filesSubmenu.append_section(null, dirSection); - filesSubmenu.append_section(null, unmountSection); - - // Files menu item - const filesMenuItem = this._getFilesMenuItem(); - filesMenuItem.set_submenu(filesSubmenu); - - // Replace the existing menu item - const index = this.device.removeMenuAction('device.mount'); - this.device.addMenuItem(filesMenuItem, index); - } catch (e) { - if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) - debug(e, this.device.name); - - // Reset to allow retrying - this._gmount = null; - } - } - - _removeSubmenu() { - try { - const index = this.device.removeMenuAction('device.mount'); - const action = this.device.lookup_action('mount'); - - if (action !== null) { - this.device.addMenuAction( - action, - index, - Metadata.actions.mount.label, - Metadata.actions.mount.icon_name - ); - } - } catch (e) { - logError(e, this.device.name); - } - } - - /** - * Create a symbolic link referring to the device by name - * - * @param {Gio.Mount} mount - A GMount to link to - */ - async _addSymlink(mount) { - try { - const by_name_dir = Gio.File.new_for_path( - `${Config.RUNTIMEDIR}/by-name/` - ); - - try { - by_name_dir.make_directory_with_parents(null); - } catch (e) { - if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.EXISTS)) - throw e; - } - - // Replace path separator with a Unicode lookalike: - let safe_device_name = this.device.name.replace('/', '∕'); - - if (safe_device_name === '.') - safe_device_name = '·'; - else if (safe_device_name === '..') - safe_device_name = '··'; - - const link_target = mount.get_root().get_path(); - const link = Gio.File.new_for_path( - `${by_name_dir.get_path()}/${safe_device_name}`); - - // Check for and remove any existing stale link - try { - const link_stat = await link.query_info_async( - 'standard::symlink-target', - Gio.FileQueryInfoFlags.NOFOLLOW_SYMLINKS, - GLib.PRIORITY_DEFAULT, - this.cancellable); - - if (link_stat.get_symlink_target() === link_target) - return; - - await link.delete_async(GLib.PRIORITY_DEFAULT, - this.cancellable); - } catch (e) { - if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND)) - throw e; - } - - link.make_symbolic_link(link_target, this.cancellable); - } catch (e) { - debug(e, this.device.name); - } - } - - /** - * Send a request to mount the remote device - */ - mount() { - if (this.gmount !== null) - return; - - this.device.sendPacket({ - type: 'kdeconnect.sftp.request', - body: { - startBrowsing: true, - }, - }); - } - - /** - * Remove the menu items, unmount the filesystem, replace the mount item - */ - async unmount() { - try { - if (this.gmount === null) - return; - - this._removeSubmenu(); - this._mounting = false; - - await this.gmount.unmount_with_operation( - Gio.MountUnmountFlags.FORCE, - new Gio.MountOperation(), - this.cancellable); - } catch (e) { - debug(e, this.device.name); - } - } - - destroy() { - if (this._volumeMonitor) { - this._volumeMonitor.disconnect(this._mountAddedId); - this._volumeMonitor.disconnect(this._mountRemovedId); - this._volumeMonitor = null; - } - - super.destroy(); - } -}); - -export default SFTPPlugin; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/share.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/share.js deleted file mode 100644 index 73963971..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/share.js +++ /dev/null @@ -1,492 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import GdkPixbuf from 'gi://GdkPixbuf'; -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Gtk from 'gi://Gtk'; - -import Plugin from '../plugin.js'; -import * as URI from '../utils/uri.js'; - - -export const Metadata = { - label: _('Share'), - id: 'org.gnome.Shell.Extensions.GSConnect.Plugin.Share', - description: _('Share files and URLs between devices'), - incomingCapabilities: ['kdeconnect.share.request'], - outgoingCapabilities: ['kdeconnect.share.request'], - actions: { - share: { - label: _('Share'), - icon_name: 'send-to-symbolic', - - parameter_type: null, - incoming: [], - outgoing: ['kdeconnect.share.request'], - }, - shareFile: { - label: _('Share File'), - icon_name: 'document-send-symbolic', - - parameter_type: new GLib.VariantType('(sb)'), - incoming: [], - outgoing: ['kdeconnect.share.request'], - }, - shareText: { - label: _('Share Text'), - icon_name: 'send-to-symbolic', - - parameter_type: new GLib.VariantType('s'), - incoming: [], - outgoing: ['kdeconnect.share.request'], - }, - shareUri: { - label: _('Share Link'), - icon_name: 'send-to-symbolic', - - parameter_type: new GLib.VariantType('s'), - incoming: [], - outgoing: ['kdeconnect.share.request'], - }, - }, -}; - - -/** - * Share Plugin - * https://github.com/KDE/kdeconnect-kde/tree/master/plugins/share - * - * TODO: receiving 'text' TODO: Window with textview & 'Copy to Clipboard.. - * https://github.com/KDE/kdeconnect-kde/commit/28f11bd5c9a717fb9fbb3f02ddd6cea62021d055 - */ -const SharePlugin = GObject.registerClass({ - GTypeName: 'GSConnectSharePlugin', -}, class SharePlugin extends Plugin { - - _init(device) { - super._init(device, 'share'); - } - - handlePacket(packet) { - // TODO: composite jobs (lastModified, numberOfFiles, totalPayloadSize) - if (packet.body.hasOwnProperty('filename')) { - if (this.settings.get_boolean('receive-files')) - this._handleFile(packet); - else - this._refuseFile(packet); - } else if (packet.body.hasOwnProperty('text')) { - this._handleText(packet); - } else if (packet.body.hasOwnProperty('url')) { - this._handleUri(packet); - } - } - - _ensureReceiveDirectory() { - let receiveDir = this.settings.get_string('receive-directory'); - - // Ensure a directory is set - if (receiveDir.length === 0) { - receiveDir = GLib.get_user_special_dir( - GLib.UserDirectory.DIRECTORY_DOWNLOAD - ); - - // Fallback to ~/Downloads - const homeDir = GLib.get_home_dir(); - - if (!receiveDir || receiveDir === homeDir) - receiveDir = GLib.build_filenamev([homeDir, 'Downloads']); - - this.settings.set_string('receive-directory', receiveDir); - } - - // Ensure the directory exists - if (!GLib.file_test(receiveDir, GLib.FileTest.IS_DIR)) - GLib.mkdir_with_parents(receiveDir, 448); - - return receiveDir; - } - - _getFile(filename) { - const dirpath = this._ensureReceiveDirectory(); - const basepath = GLib.build_filenamev([dirpath, filename]); - let filepath = basepath; - let copyNum = 0; - - while (GLib.file_test(filepath, GLib.FileTest.EXISTS)) - filepath = `${basepath} (${++copyNum})`; - - return Gio.File.new_for_path(filepath); - } - - _refuseFile(packet) { - try { - this.device.rejectTransfer(packet); - - this.device.showNotification({ - id: `${Date.now()}`, - title: _('Transfer Failed'), - // TRANSLATORS: eg. Google Pixel is not allowed to upload files - body: _('%s is not allowed to upload files').format( - this.device.name - ), - icon: new Gio.ThemedIcon({name: 'dialog-error-symbolic'}), - }); - } catch (e) { - debug(e, this.device.name); - } - } - - async _handleFile(packet) { - try { - const file = this._getFile(packet.body.filename); - - // Create the transfer - const transfer = this.device.createTransfer(); - - transfer.addFile(packet, file); - - // Notify that we're about to start the transfer - this.device.showNotification({ - id: transfer.uuid, - title: _('Transferring File'), - // TRANSLATORS: eg. Receiving 'book.pdf' from Google Pixel - body: _('Receiving “%s” from %s').format( - packet.body.filename, - this.device.name - ), - buttons: [{ - label: _('Cancel'), - action: 'cancelTransfer', - parameter: new GLib.Variant('s', transfer.uuid), - }], - icon: new Gio.ThemedIcon({name: 'document-save-symbolic'}), - }); - - // We'll show a notification (success or failure) - let title, body, action, iconName; - let buttons = []; - - try { - await transfer.start(); - - title = _('Transfer Successful'); - // TRANSLATORS: eg. Received 'book.pdf' from Google Pixel - body = _('Received “%s” from %s').format( - packet.body.filename, - this.device.name - ); - action = { - name: 'showPathInFolder', - parameter: new GLib.Variant('s', file.get_uri()), - }; - buttons = [ - { - label: _('Show File Location'), - action: 'showPathInFolder', - parameter: new GLib.Variant('s', file.get_uri()), - }, - { - label: _('Open File'), - action: 'openPath', - parameter: new GLib.Variant('s', file.get_uri()), - }, - ]; - iconName = 'document-save-symbolic'; - - if (packet.body.open) { - const uri = file.get_uri(); - Gio.AppInfo.launch_default_for_uri_async(uri, null, null, null); - } - } catch (e) { - debug(e, this.device.name); - - title = _('Transfer Failed'); - // TRANSLATORS: eg. Failed to receive 'book.pdf' from Google Pixel - body = _('Failed to receive “%s” from %s').format( - packet.body.filename, - this.device.name - ); - iconName = 'dialog-warning-symbolic'; - - // Clean up the downloaded file on failure - file.delete_async(GLib.PRIORITY_DEAFAULT, null, null); - } - - this.device.hideNotification(transfer.uuid); - this.device.showNotification({ - id: transfer.uuid, - title: title, - body: body, - action: action, - buttons: buttons, - icon: new Gio.ThemedIcon({name: iconName}), - }); - } catch (e) { - logError(e, this.device.name); - } - } - - _handleUri(packet) { - const uri = packet.body.url; - Gio.AppInfo.launch_default_for_uri_async(uri, null, null, null); - } - - _handleText(packet) { - const dialog = new Gtk.MessageDialog({ - text: _('Text Shared By %s').format(this.device.name), - secondary_text: URI.linkify(packet.body.text), - secondary_use_markup: true, - buttons: Gtk.ButtonsType.CLOSE, - }); - dialog.message_area.get_children()[1].selectable = true; - dialog.set_keep_above(true); - dialog.connect('response', (dialog) => dialog.destroy()); - dialog.show(); - } - - /** - * Open the file chooser dialog for selecting a file or inputing a URI. - */ - share() { - const dialog = new FileChooserDialog(this.device); - dialog.show(); - } - - /** - * Share local file path or URI - * - * @param {string} path - Local file path or URI - * @param {boolean} open - Whether the file should be opened after transfer - */ - async shareFile(path, open = false) { - try { - let file = null; - - if (path.includes('://')) - file = Gio.File.new_for_uri(path); - else - file = Gio.File.new_for_path(path); - - // Create the transfer - const transfer = this.device.createTransfer(); - - transfer.addFile({ - type: 'kdeconnect.share.request', - body: { - filename: file.get_basename(), - open: open, - }, - }, file); - - // Notify that we're about to start the transfer - this.device.showNotification({ - id: transfer.uuid, - title: _('Transferring File'), - // TRANSLATORS: eg. Sending 'book.pdf' to Google Pixel - body: _('Sending “%s” to %s').format( - file.get_basename(), - this.device.name - ), - buttons: [{ - label: _('Cancel'), - action: 'cancelTransfer', - parameter: new GLib.Variant('s', transfer.uuid), - }], - icon: new Gio.ThemedIcon({name: 'document-send-symbolic'}), - }); - - // We'll show a notification (success or failure) - let title, body, iconName; - - try { - await transfer.start(); - - title = _('Transfer Successful'); - // TRANSLATORS: eg. Sent "book.pdf" to Google Pixel - body = _('Sent “%s” to %s').format( - file.get_basename(), - this.device.name - ); - iconName = 'document-send-symbolic'; - } catch (e) { - debug(e, this.device.name); - - title = _('Transfer Failed'); - // TRANSLATORS: eg. Failed to send "book.pdf" to Google Pixel - body = _('Failed to send “%s” to %s').format( - file.get_basename(), - this.device.name - ); - iconName = 'dialog-warning-symbolic'; - } - - this.device.hideNotification(transfer.uuid); - this.device.showNotification({ - id: transfer.uuid, - title: title, - body: body, - icon: new Gio.ThemedIcon({name: iconName}), - }); - } catch (e) { - debug(e, this.device.name); - } - } - - /** - * Share a string of text. Remote behaviour is undefined. - * - * @param {string} text - A string of unicode text - */ - shareText(text) { - this.device.sendPacket({ - type: 'kdeconnect.share.request', - body: {text: text}, - }); - } - - /** - * Share a URI. Generally the remote device opens it with the scheme default - * - * @param {string} uri - A URI to share - */ - shareUri(uri) { - if (GLib.uri_parse_scheme(uri) === 'file') { - this.shareFile(uri); - return; - } - - this.device.sendPacket({ - type: 'kdeconnect.share.request', - body: {url: uri}, - }); - } -}); - - -/** A simple FileChooserDialog for sharing files */ -const FileChooserDialog = GObject.registerClass({ - GTypeName: 'GSConnectShareFileChooserDialog', -}, class FileChooserDialog extends Gtk.FileChooserDialog { - - _init(device) { - super._init({ - // TRANSLATORS: eg. Send files to Google Pixel - title: _('Send files to %s').format(device.name), - select_multiple: true, - extra_widget: new Gtk.CheckButton({ - // TRANSLATORS: Mark the file to be opened once completed - label: _('Open when done'), - visible: true, - }), - use_preview_label: false, - }); - - this.device = device; - - // Align checkbox with sidebar - const box = this.get_content_area().get_children()[0].get_children()[0]; - const paned = box.get_children()[0]; - paned.bind_property( - 'position', - this.extra_widget, - 'margin-left', - GObject.BindingFlags.SYNC_CREATE - ); - - // Preview Widget - this.preview_widget = new Gtk.Image(); - this.preview_widget_active = false; - this.connect('update-preview', this._onUpdatePreview); - - // URI entry - this._uriEntry = new Gtk.Entry({ - placeholder_text: 'https://', - hexpand: true, - visible: true, - }); - this._uriEntry.connect('activate', this._sendLink.bind(this)); - - // URI/File toggle - this._uriButton = new Gtk.ToggleButton({ - image: new Gtk.Image({ - icon_name: 'web-browser-symbolic', - pixel_size: 16, - }), - valign: Gtk.Align.CENTER, - // TRANSLATORS: eg. Send a link to Google Pixel - tooltip_text: _('Send a link to %s').format(device.name), - visible: true, - }); - this._uriButton.connect('toggled', this._onUriButtonToggled.bind(this)); - - this.add_button(_('Cancel'), Gtk.ResponseType.CANCEL); - const sendButton = this.add_button(_('Send'), Gtk.ResponseType.OK); - sendButton.connect('clicked', this._sendLink.bind(this)); - - this.get_header_bar().pack_end(this._uriButton); - this.set_default_response(Gtk.ResponseType.OK); - } - - _onUpdatePreview(chooser) { - try { - const pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size( - chooser.get_preview_filename(), - chooser.get_scale_factor() * 128, - -1 - ); - chooser.preview_widget.pixbuf = pixbuf; - chooser.preview_widget.visible = true; - chooser.preview_widget_active = true; - } catch (e) { - chooser.preview_widget.visible = false; - chooser.preview_widget_active = false; - } - } - - _onUriButtonToggled(button) { - const header = this.get_header_bar(); - - // Show the URL entry - if (button.active) { - this.extra_widget.sensitive = false; - header.set_custom_title(this._uriEntry); - this.set_response_sensitive(Gtk.ResponseType.OK, true); - - // Hide the URL entry - } else { - header.set_custom_title(null); - this.set_response_sensitive( - Gtk.ResponseType.OK, - this.get_uris().length > 1 - ); - this.extra_widget.sensitive = true; - } - } - - _sendLink(widget) { - if (this._uriButton.active && this._uriEntry.text.length) - this.response(1); - } - - vfunc_response(response_id) { - if (response_id === Gtk.ResponseType.OK) { - for (const uri of this.get_uris()) { - const parameter = new GLib.Variant( - '(sb)', - [uri, this.extra_widget.active] - ); - this.device.activate_action('shareFile', parameter); - } - } else if (response_id === 1) { - const parameter = new GLib.Variant('s', this._uriEntry.text); - this.device.activate_action('shareUri', parameter); - } - - this.destroy(); - } -}); - -export default SharePlugin; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/sms.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/sms.js deleted file mode 100644 index 4a359fd2..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/sms.js +++ /dev/null @@ -1,536 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; - -import Plugin from '../plugin.js'; -import LegacyMessagingDialog from '../ui/legacyMessaging.js'; -import * as Messaging from '../ui/messaging.js'; -import SmsURI from '../utils/uri.js'; - - -export const Metadata = { - label: _('SMS'), - description: _('Send and read SMS of the paired device and be notified of new SMS'), - id: 'org.gnome.Shell.Extensions.GSConnect.Plugin.SMS', - incomingCapabilities: [ - 'kdeconnect.sms.messages', - ], - outgoingCapabilities: [ - 'kdeconnect.sms.request', - 'kdeconnect.sms.request_conversation', - 'kdeconnect.sms.request_conversations', - ], - actions: { - // SMS Actions - sms: { - label: _('Messaging'), - icon_name: 'sms-symbolic', - - parameter_type: null, - incoming: [], - outgoing: ['kdeconnect.sms.request'], - }, - uriSms: { - label: _('New SMS (URI)'), - icon_name: 'sms-symbolic', - - parameter_type: new GLib.VariantType('s'), - incoming: [], - outgoing: ['kdeconnect.sms.request'], - }, - replySms: { - label: _('Reply SMS'), - icon_name: 'sms-symbolic', - - parameter_type: new GLib.VariantType('s'), - incoming: [], - outgoing: ['kdeconnect.sms.request'], - }, - sendMessage: { - label: _('Send Message'), - icon_name: 'sms-send', - - parameter_type: new GLib.VariantType('(aa{sv})'), - incoming: [], - outgoing: ['kdeconnect.sms.request'], - }, - sendSms: { - label: _('Send SMS'), - icon_name: 'sms-send', - - parameter_type: new GLib.VariantType('(ss)'), - incoming: [], - outgoing: ['kdeconnect.sms.request'], - }, - shareSms: { - label: _('Share SMS'), - icon_name: 'sms-send', - - parameter_type: new GLib.VariantType('s'), - incoming: [], - outgoing: ['kdeconnect.sms.request'], - }, - }, -}; - - -/** - * SMS Message event type. Currently all events are TEXT_MESSAGE. - * - * TEXT_MESSAGE: Has a "body" field which contains pure, human-readable text - */ -export const MessageEventType = { - TEXT_MESSAGE: 0x1, -}; - - -/** - * SMS Message status. READ/UNREAD match the 'read' field from the Android App - * message packet. - * - * UNREAD: A message not marked as read - * READ: A message marked as read - */ -export const MessageStatus = { - UNREAD: 0, - READ: 1, -}; - - -/** - * SMS Message type, set from the 'type' field in the Android App - * message packet. - * - * See: https://developer.android.com/reference/android/provider/Telephony.TextBasedSmsColumns.html - * - * ALL: all messages - * INBOX: Received messages - * SENT: Sent messages - * DRAFT: Message drafts - * OUTBOX: Outgoing messages - * FAILED: Failed outgoing messages - * QUEUED: Messages queued to send later - */ -export const MessageBox = { - ALL: 0, - INBOX: 1, - SENT: 2, - DRAFT: 3, - OUTBOX: 4, - FAILED: 5, - QUEUED: 6, -}; - - -/** - * SMS Plugin - * https://github.com/KDE/kdeconnect-kde/tree/master/plugins/sms - * https://github.com/KDE/kdeconnect-android/tree/master/src/org/kde/kdeconnect/Plugins/SMSPlugin/ - */ -const SMSPlugin = GObject.registerClass({ - GTypeName: 'GSConnectSMSPlugin', - Properties: { - 'threads': GObject.param_spec_variant( - 'threads', - 'Conversation List', - 'A list of threads', - new GLib.VariantType('aa{sv}'), - null, - GObject.ParamFlags.READABLE - ), - }, -}, class SMSPlugin extends Plugin { - - _init(device) { - super._init(device, 'sms'); - - this.cacheProperties(['_threads']); - } - - get threads() { - if (this._threads === undefined) - this._threads = {}; - - return this._threads; - } - - get window() { - if (this.settings.get_boolean('legacy-sms')) { - return new LegacyMessagingDialog({ - device: this.device, - plugin: this, - }); - } - - if (this._window === undefined) { - this._window = new Messaging.Window({ - application: Gio.Application.get_default(), - device: this.device, - plugin: this, - }); - - this._window.connect('destroy', () => { - this._window = undefined; - }); - } - - return this._window; - } - - clearCache() { - this._threads = {}; - this.notify('threads'); - } - - cacheLoaded() { - this.notify('threads'); - } - - connected() { - super.connected(); - this._requestConversations(); - } - - handlePacket(packet) { - switch (packet.type) { - case 'kdeconnect.sms.messages': - this._handleMessages(packet.body.messages); - break; - } - } - - /** - * Handle a digest of threads. - * - * @param {Object[]} messages - A list of message objects - * @param {string[]} thread_ids - A list of thread IDs as strings - */ - _handleDigest(messages, thread_ids) { - // Prune threads - for (const thread_id of Object.keys(this.threads)) { - if (!thread_ids.includes(thread_id)) - delete this.threads[thread_id]; - } - - // Request each new or newer thread - for (let i = 0, len = messages.length; i < len; i++) { - const message = messages[i]; - const cache = this.threads[message.thread_id]; - - if (cache === undefined) { - this._requestConversation(message.thread_id); - continue; - } - - // If this message is marked read, mark the rest as read - if (message.read === MessageStatus.READ) { - for (const msg of cache) - msg.read = MessageStatus.READ; - } - - // If we don't have a thread for this message or it's newer - // than the last message in the cache, request the thread - if (!cache.length || cache[cache.length - 1].date < message.date) - this._requestConversation(message.thread_id); - } - - this.notify('threads'); - } - - /** - * Handle a new single message - * - * @param {Object} message - A message object - */ - _handleMessage(message) { - let conversation = null; - - // If the window is open, try and find an active conversation - if (this._window) - conversation = this._window.getConversationForMessage(message); - - // If there's an active conversation, we should log the message now - if (conversation) - conversation.logNext(message); - } - - /** - * Parse a conversation (thread of messages) and sort them - * - * @param {Object[]} thread - A list of sms message objects from a thread - */ - _handleThread(thread) { - // If there are no addresses this will cause major problems... - if (!thread[0].addresses || !thread[0].addresses[0]) - return; - - const thread_id = thread[0].thread_id; - const cache = this.threads[thread_id] || []; - - // Handle each message - for (let i = 0, len = thread.length; i < len; i++) { - const message = thread[i]; - - // TODO: We only cache messages of a known MessageBox since we - // have no reliable way to determine its direction, let alone - // what to do with it. - if (message.type < 0 || message.type > 6) - continue; - - // If the message exists, just update it - const cacheMessage = cache.find(m => m.date === message.date); - - if (cacheMessage) { - Object.assign(cacheMessage, message); - } else { - cache.push(message); - this._handleMessage(message); - } - } - - // Sort the thread by ascending date and notify - this.threads[thread_id] = cache.sort((a, b) => a.date - b.date); - this.notify('threads'); - } - - /** - * Handle a response to telephony.request_conversation(s) - * - * @param {Object[]} messages - A list of sms message objects - */ - _handleMessages(messages) { - try { - // If messages is empty there's nothing to do... - if (messages.length === 0) - return; - - const thread_ids = []; - - // Perform some modification of the messages - for (let i = 0, len = messages.length; i < len; i++) { - const message = messages[i]; - - // COERCION: thread_id's to strings - message.thread_id = `${message.thread_id}`; - thread_ids.push(message.thread_id); - - // TODO: Remove bogus `insert-address-token` entries - let a = message.addresses.length; - - while (a--) { - if (message.addresses[a].address === undefined || - message.addresses[a].address === 'insert-address-token') - message.addresses.splice(a, 1); - } - } - - // If there's multiple thread_id's it's a summary of threads - if (thread_ids.some(id => id !== thread_ids[0])) - this._handleDigest(messages, thread_ids); - - // Otherwise this is single thread or new message - else - this._handleThread(messages); - } catch (e) { - debug(e, this.device.name); - } - } - - /** - * Request a list of messages from a single thread. - * - * @param {number} thread_id - The id of the thread to request - */ - _requestConversation(thread_id) { - this.device.sendPacket({ - type: 'kdeconnect.sms.request_conversation', - body: { - threadID: thread_id, - }, - }); - } - - /** - * Request a list of the last message in each unarchived thread. - */ - _requestConversations() { - this.device.sendPacket({ - type: 'kdeconnect.sms.request_conversations', - }); - } - - /** - * A notification action for replying to SMS messages (or missed calls). - * - * @param {string} hint - Could be either a contact name or phone number - */ - replySms(hint) { - this.window.present(); - // FIXME: causes problems now that non-numeric addresses are allowed - // this.window.address = hint.toPhoneNumber(); - } - - /** - * Send an SMS message - * - * @param {string} phoneNumber - The phone number to send the message to - * @param {string} messageBody - The message to send - */ - sendSms(phoneNumber, messageBody) { - this.device.sendPacket({ - type: 'kdeconnect.sms.request', - body: { - sendSms: true, - phoneNumber: phoneNumber, - messageBody: messageBody, - }, - }); - } - - /** - * Send a message - * - * @param {Object[]} addresses - A list of address objects - * @param {string} messageBody - The message text - * @param {number} [event] - An event bitmask - * @param {boolean} [forceSms] - Whether to force SMS - * @param {number} [subId] - The SIM card to use - */ - sendMessage(addresses, messageBody, event = 1, forceSms = false, subId = undefined) { - // TODO: waiting on support in kdeconnect-android - // if (this._version === 1) { - this.device.sendPacket({ - type: 'kdeconnect.sms.request', - body: { - sendSms: true, - phoneNumber: addresses[0].address, - messageBody: messageBody, - }, - }); - // } else if (this._version === 2) { - // this.device.sendPacket({ - // type: 'kdeconnect.sms.request', - // body: { - // version: 2, - // addresses: addresses, - // messageBody: messageBody, - // forceSms: forceSms, - // sub_id: subId - // } - // }); - // } - } - - /** - * Share a text content by SMS message. This is used by the WebExtension to - * share URLs from the browser, but could be used to initiate sharing of any - * text content. - * - * @param {string} url - The link to be shared - */ - shareSms(url) { - // Legacy Mode - if (this.settings.get_boolean('legacy-sms')) { - const window = this.window; - window.present(); - window.setMessage(url); - - // If there are active threads, show the chooser dialog - } else if (Object.values(this.threads).length > 0) { - const window = new Messaging.ConversationChooser({ - application: Gio.Application.get_default(), - device: this.device, - message: url, - plugin: this, - }); - - window.present(); - - // Otherwise show the window and wait for a contact to be chosen - } else { - this.window.present(); - this.window.setMessage(url, true); - } - } - - /** - * Open and present the messaging window - */ - sms() { - this.window.present(); - } - - /** - * This is the sms: URI scheme handler - * - * @param {string} uri - The URI the handle (sms:|sms://|sms:///) - */ - uriSms(uri) { - try { - uri = new SmsURI(uri); - - // Lookup contacts - const addresses = uri.recipients.map(number => { - return {address: number.toPhoneNumber()}; - }); - const contacts = this.device.contacts.lookupAddresses(addresses); - - // Present the window and show the conversation - const window = this.window; - window.present(); - window.setContacts(contacts); - - // Set the outgoing message if the uri has a body variable - if (uri.body) - window.setMessage(uri.body); - } catch (e) { - debug(e, `${this.device.name}: "${uri}"`); - } - } - - _threadHasAddress(thread, addressObj) { - const number = addressObj.address.toPhoneNumber(); - - for (const taddressObj of thread[0].addresses) { - const tnumber = taddressObj.address.toPhoneNumber(); - - if (number.endsWith(tnumber) || tnumber.endsWith(number)) - return true; - } - - return false; - } - - /** - * Try to find a thread_id in @smsPlugin for @addresses. - * - * @param {Object[]} addresses - a list of address objects - * @return {string|null} a thread ID - */ - getThreadIdForAddresses(addresses = []) { - const threads = Object.values(this.threads); - - for (const thread of threads) { - if (addresses.length !== thread[0].addresses.length) - continue; - - if (addresses.every(addressObj => this._threadHasAddress(thread, addressObj))) - return thread[0].thread_id; - } - - return null; - } - - destroy() { - if (this._window !== undefined) - this._window.destroy(); - - super.destroy(); - } -}); - -export default SMSPlugin; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/systemvolume.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/systemvolume.js deleted file mode 100644 index 9db02d1d..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/systemvolume.js +++ /dev/null @@ -1,204 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import GObject from 'gi://GObject'; - -import * as Components from '../components/index.js'; -import Config from '../../config.js'; -import Plugin from '../plugin.js'; - - -export const Metadata = { - label: _('System Volume'), - description: _('Enable the paired device to control the system volume'), - id: 'org.gnome.Shell.Extensions.GSConnect.Plugin.SystemVolume', - incomingCapabilities: ['kdeconnect.systemvolume.request'], - outgoingCapabilities: ['kdeconnect.systemvolume'], - actions: {}, -}; - - -/** - * SystemVolume Plugin - * https://github.com/KDE/kdeconnect-kde/tree/master/plugins/systemvolume - * https://github.com/KDE/kdeconnect-android/tree/master/src/org/kde/kdeconnect/Plugins/SystemvolumePlugin/ - */ -const SystemVolumePlugin = GObject.registerClass({ - GTypeName: 'GSConnectSystemVolumePlugin', -}, class SystemVolumePlugin extends Plugin { - - _init(device) { - super._init(device, 'systemvolume'); - - // Cache stream properties - this._cache = new WeakMap(); - - // Connect to the mixer - try { - this._mixer = Components.acquire('pulseaudio'); - - this._streamChangedId = this._mixer.connect( - 'stream-changed', - this._sendSink.bind(this) - ); - - this._outputAddedId = this._mixer.connect( - 'output-added', - this._sendSinkList.bind(this) - ); - - this._outputRemovedId = this._mixer.connect( - 'output-removed', - this._sendSinkList.bind(this) - ); - - // Modify the error to redirect to the wiki - } catch (e) { - e.name = _('PulseAudio not found'); - e.url = `${Config.PACKAGE_URL}/wiki/Error#pulseaudio-not-found`; - throw e; - } - } - - handlePacket(packet) { - switch (true) { - case packet.body.hasOwnProperty('requestSinks'): - this._sendSinkList(); - break; - - case packet.body.hasOwnProperty('name'): - this._changeSink(packet); - break; - } - } - - connected() { - super.connected(); - - this._sendSinkList(); - } - - /** - * Handle a request to change an output - * - * @param {Core.Packet} packet - a `kdeconnect.systemvolume.request` - */ - _changeSink(packet) { - let stream; - - for (const sink of this._mixer.get_sinks()) { - if (sink.name === packet.body.name) { - stream = sink; - break; - } - } - - // No sink with the given name - if (stream === undefined) { - this._sendSinkList(); - return; - } - - // Get a cache and store volume and mute states if changed - const cache = this._cache.get(stream) || {}; - - if (packet.body.hasOwnProperty('muted')) { - cache.muted = packet.body.muted; - this._cache.set(stream, cache); - stream.change_is_muted(packet.body.muted); - } - - if (packet.body.hasOwnProperty('volume')) { - cache.volume = packet.body.volume; - this._cache.set(stream, cache); - stream.volume = packet.body.volume; - stream.push_volume(); - } - } - - /** - * Update the cache for @stream - * - * @param {Gvc.MixerStream} stream - The stream to cache - * @return {Object} The updated cache object - */ - _updateCache(stream) { - const state = { - name: stream.name, - description: stream.display_name, - muted: stream.is_muted, - volume: stream.volume, - maxVolume: this._mixer.get_vol_max_norm(), - }; - - this._cache.set(stream, state); - - return state; - } - - /** - * Send the state of a local sink - * - * @param {Gvc.MixerControl} mixer - The mixer that owns the stream - * @param {number} id - The Id of the stream that changed - */ - _sendSink(mixer, id) { - // Avoid starving the packet channel when fading - if (this._mixer.fading) - return; - - // Check the cache - const stream = this._mixer.lookup_stream_id(id); - const cache = this._cache.get(stream) || {}; - - // If the port has changed we have to send the whole list to update the - // display name - if (!cache.display_name || cache.display_name !== stream.display_name) { - this._sendSinkList(); - return; - } - - // If only volume and/or mute are set, send a single update - if (cache.volume !== stream.volume || cache.muted !== stream.is_muted) { - // Update the cache - const state = this._updateCache(stream); - - // Send the stream update - this.device.sendPacket({ - type: 'kdeconnect.systemvolume', - body: state, - }); - } - } - - /** - * Send a list of local sinks - */ - _sendSinkList() { - const sinkList = this._mixer.get_sinks().map(sink => { - return this._updateCache(sink); - }); - - // Send the sinkList - this.device.sendPacket({ - type: 'kdeconnect.systemvolume', - body: { - sinkList: sinkList, - }, - }); - } - - destroy() { - if (this._mixer !== undefined) { - this._mixer.disconnect(this._streamChangedId); - this._mixer.disconnect(this._outputAddedId); - this._mixer.disconnect(this._outputRemovedId); - this._mixer = Components.release('pulseaudio'); - } - - super.destroy(); - } -}); - -export default SystemVolumePlugin; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/telephony.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/telephony.js deleted file mode 100644 index af1dae16..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/telephony.js +++ /dev/null @@ -1,245 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import GdkPixbuf from 'gi://GdkPixbuf'; -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; - -import * as Components from '../components/index.js'; -import Plugin from '../plugin.js'; - - -export const Metadata = { - label: _('Telephony'), - description: _('Be notified about calls and adjust system volume during ringing/ongoing calls'), - id: 'org.gnome.Shell.Extensions.GSConnect.Plugin.Telephony', - incomingCapabilities: [ - 'kdeconnect.telephony', - ], - outgoingCapabilities: [ - 'kdeconnect.telephony.request', - 'kdeconnect.telephony.request_mute', - ], - actions: { - muteCall: { - // TRANSLATORS: Silence the actively ringing call - label: _('Mute Call'), - icon_name: 'audio-volume-muted-symbolic', - - parameter_type: null, - incoming: ['kdeconnect.telephony'], - outgoing: ['kdeconnect.telephony.request_mute'], - }, - }, -}; - - -/** - * Telephony Plugin - * https://github.com/KDE/kdeconnect-kde/tree/master/plugins/telephony - * https://github.com/KDE/kdeconnect-android/tree/master/src/org/kde/kdeconnect/Plugins/TelephonyPlugin - */ -const TelephonyPlugin = GObject.registerClass({ - GTypeName: 'GSConnectTelephonyPlugin', -}, class TelephonyPlugin extends Plugin { - - _init(device) { - super._init(device, 'telephony'); - - // Neither of these are crucial for the plugin to work - this._mpris = Components.acquire('mpris'); - this._mixer = Components.acquire('pulseaudio'); - } - - handlePacket(packet) { - switch (packet.type) { - case 'kdeconnect.telephony': - this._handleEvent(packet); - break; - } - } - - /** - * Change volume, microphone and media player state in response to an - * incoming or answered call. - * - * @param {string} eventType - 'ringing' or 'talking' - */ - _setMediaState(eventType) { - // Mixer Volume - if (this._mixer !== undefined) { - switch (this.settings.get_string(`${eventType}-volume`)) { - case 'restore': - this._mixer.restore(); - break; - - case 'lower': - this._mixer.lowerVolume(); - break; - - case 'mute': - this._mixer.muteVolume(); - break; - } - - if (eventType === 'talking' && this.settings.get_boolean('talking-microphone')) - this._mixer.muteMicrophone(); - } - - // Media Playback - if (this._mpris && this.settings.get_boolean(`${eventType}-pause`)) - this._mpris.pauseAll(); - } - - /** - * Restore volume, microphone and media player state (if changed), making - * sure to unpause before raising volume. - * - * TODO: there's a possibility we might revert a media/mixer state set for - * another device. - */ - _restoreMediaState() { - // Media Playback - if (this._mpris) - this._mpris.unpauseAll(); - - // Mixer Volume - if (this._mixer) - this._mixer.restore(); - } - - /** - * Load a Gdk.Pixbuf from base64 encoded data - * - * @param {string} data - Base64 encoded JPEG data - * @return {Gdk.Pixbuf|null} A contact photo - */ - _getThumbnailPixbuf(data) { - const loader = new GdkPixbuf.PixbufLoader(); - - try { - data = GLib.base64_decode(data); - loader.write(data); - loader.close(); - } catch (e) { - debug(e, this.device.name); - } - - return loader.get_pixbuf(); - } - - /** - * Handle a telephony event (ringing, talking), showing or hiding a - * notification and possibly adjusting the media/mixer state. - * - * @param {Core.Packet} packet - A `kdeconnect.telephony` - */ - _handleEvent(packet) { - // Only handle 'ringing' or 'talking' events; leave the notification - // plugin to handle 'missedCall' since they're often repliable - if (!['ringing', 'talking'].includes(packet.body.event)) - return; - - // This is the end of a telephony event - if (packet.body.isCancel) - this._cancelEvent(packet); - else - this._notifyEvent(packet); - } - - _cancelEvent(packet) { - // Ensure we have a sender - // TRANSLATORS: No name or phone number - let sender = _('Unknown Contact'); - - if (packet.body.contactName) - sender = packet.body.contactName; - else if (packet.body.phoneNumber) - sender = packet.body.phoneNumber; - - this.device.hideNotification(`${packet.body.event}|${sender}`); - this._restoreMediaState(); - } - - _notifyEvent(packet) { - let body; - let buttons = []; - let icon = null; - let priority = Gio.NotificationPriority.NORMAL; - - // Ensure we have a sender - // TRANSLATORS: No name or phone number - let sender = _('Unknown Contact'); - - if (packet.body.contactName) - sender = packet.body.contactName; - else if (packet.body.phoneNumber) - sender = packet.body.phoneNumber; - - // If there's a photo, use it as the notification icon - if (packet.body.phoneThumbnail) - icon = this._getThumbnailPixbuf(packet.body.phoneThumbnail); - - if (icon === null) - icon = new Gio.ThemedIcon({name: 'call-start-symbolic'}); - - // Notify based based on the event type - if (packet.body.event === 'ringing') { - this._setMediaState('ringing'); - - // TRANSLATORS: The phone is ringing - body = _('Incoming call'); - buttons = [{ - action: 'muteCall', - // TRANSLATORS: Silence the actively ringing call - label: _('Mute'), - parameter: null, - }]; - priority = Gio.NotificationPriority.URGENT; - } - - if (packet.body.event === 'talking') { - this.device.hideNotification(`ringing|${sender}`); - this._setMediaState('talking'); - - // TRANSLATORS: A phone call is active - body = _('Ongoing call'); - } - - this.device.showNotification({ - id: `${packet.body.event}|${sender}`, - title: sender, - body: body, - icon: icon, - priority: priority, - buttons: buttons, - }); - } - - /** - * Silence an incoming call and restore the previous mixer/media state, if - * applicable. - */ - muteCall() { - this.device.sendPacket({ - type: 'kdeconnect.telephony.request_mute', - body: {}, - }); - - this._restoreMediaState(); - } - - destroy() { - if (this._mixer !== undefined) - this._mixer = Components.release('pulseaudio'); - - if (this._mpris !== undefined) - this._mpris = Components.release('mpris'); - - super.destroy(); - } -}); - -export default TelephonyPlugin; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/ui/contacts.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/ui/contacts.js deleted file mode 100644 index 3ead9600..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/ui/contacts.js +++ /dev/null @@ -1,642 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gdk from 'gi://Gdk'; -import GdkPixbuf from 'gi://GdkPixbuf'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Gtk from 'gi://Gtk'; - -import system from 'system'; - - -/** - * Return a random color - * - * @param {*} [salt] - If not %null, will be used as salt for generating a color - * @param {number} alpha - A value in the [0...1] range for the alpha channel - * @return {Gdk.RGBA} A new Gdk.RGBA object generated from the input - */ -function randomRGBA(salt = null, alpha = 1.0) { - let red, green, blue; - - if (salt !== null) { - const hash = new GLib.Variant('s', `${salt}`).hash(); - red = ((hash & 0xFF0000) >> 16) / 255; - green = ((hash & 0x00FF00) >> 8) / 255; - blue = (hash & 0x0000FF) / 255; - } else { - red = Math.random(); - green = Math.random(); - blue = Math.random(); - } - - return new Gdk.RGBA({red: red, green: green, blue: blue, alpha: alpha}); -} - - -/** - * Get the relative luminance of a RGB set - * See: https://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef - * - * @param {Gdk.RGBA} rgba - A GdkRGBA object - * @return {number} The relative luminance of the color - */ -function relativeLuminance(rgba) { - const {red, green, blue} = rgba; - - const R = (red > 0.03928) ? red / 12.92 : Math.pow(((red + 0.055) / 1.055), 2.4); - const G = (green > 0.03928) ? green / 12.92 : Math.pow(((green + 0.055) / 1.055), 2.4); - const B = (blue > 0.03928) ? blue / 12.92 : Math.pow(((blue + 0.055) / 1.055), 2.4); - - return 0.2126 * R + 0.7152 * G + 0.0722 * B; -} - - -/** - * Get a GdkRGBA contrasted for the input - * See: https://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef - * - * @param {Gdk.RGBA} rgba - A GdkRGBA object for the background color - * @return {Gdk.RGBA} A GdkRGBA object for the foreground color - */ -function getFgRGBA(rgba) { - const bgLuminance = relativeLuminance(rgba); - const lightContrast = (0.07275541795665634 + 0.05) / (bgLuminance + 0.05); - const darkContrast = (bgLuminance + 0.05) / (0.0046439628482972135 + 0.05); - - const value = (darkContrast > lightContrast) ? 0.06 : 0.94; - return new Gdk.RGBA({red: value, green: value, blue: value, alpha: 0.5}); -} - - -/** - * Get a GdkPixbuf for @path, allowing the corrupt JPEG's KDE Connect sometimes - * sends. This function is synchronous. - * - * @param {string} path - A local file path - * @param {number} size - Size in pixels - * @param {scale} [scale] - Scale factor for the size - * @return {Gdk.Pixbuf} A pixbuf - */ -function getPixbufForPath(path, size, scale = 1.0) { - let data, loader; - - // Catch missing avatar files - try { - data = GLib.file_get_contents(path)[1]; - } catch (e) { - debug(e, path); - return undefined; - } - - // Consider errors from partially corrupt JPEGs to be warnings - try { - loader = new GdkPixbuf.PixbufLoader(); - loader.write(data); - loader.close(); - } catch (e) { - debug(e, path); - } - - const pixbuf = loader.get_pixbuf(); - - // Scale to monitor - size = Math.floor(size * scale); - return pixbuf.scale_simple(size, size, GdkPixbuf.InterpType.HYPER); -} - -function getPixbufForIcon(name, size, scale, bgColor) { - const color = getFgRGBA(bgColor); - const theme = Gtk.IconTheme.get_default(); - const info = theme.lookup_icon_for_scale( - name, - size, - scale, - Gtk.IconLookupFlags.FORCE_SYMBOLIC - ); - - return info.load_symbolic(color, null, null, null)[0]; -} - - -/** - * Return a localized string for a phone number type - * See: http://www.ietf.org/rfc/rfc2426.txt - * - * @param {string} type - An RFC2426 phone number type - * @return {string} A localized string like 'Mobile' - */ -function getNumberTypeLabel(type) { - if (type.includes('fax')) - // TRANSLATORS: A fax number - return _('Fax'); - - if (type.includes('work')) - // TRANSLATORS: A work or office phone number - return _('Work'); - - if (type.includes('cell')) - // TRANSLATORS: A mobile or cellular phone number - return _('Mobile'); - - if (type.includes('home')) - // TRANSLATORS: A home phone number - return _('Home'); - - // TRANSLATORS: All other phone number types - return _('Other'); -} - -/** - * Get a display number from @contact for @address. - * - * @param {Object} contact - A contact object - * @param {string} address - A phone number - * @return {string} A (possibly) better display number for the address - */ -export function getDisplayNumber(contact, address) { - const number = address.toPhoneNumber(); - - for (const contactNumber of contact.numbers) { - const cnumber = contactNumber.value.toPhoneNumber(); - - if (number.endsWith(cnumber) || cnumber.endsWith(number)) - return GLib.markup_escape_text(contactNumber.value, -1); - } - - return GLib.markup_escape_text(address, -1); -} - - -/** - * Contact Avatar - */ -const AvatarCache = new WeakMap(); - -export const Avatar = GObject.registerClass({ - GTypeName: 'GSConnectContactAvatar', -}, class ContactAvatar extends Gtk.DrawingArea { - - _init(contact = null) { - super._init({ - height_request: 32, - width_request: 32, - valign: Gtk.Align.CENTER, - visible: true, - }); - - this.contact = contact; - } - - get rgba() { - if (this._rgba === undefined) { - if (this.contact) - this._rgba = randomRGBA(this.contact.name); - else - this._rgba = randomRGBA(GLib.uuid_string_random()); - } - - return this._rgba; - } - - get contact() { - if (this._contact === undefined) - this._contact = null; - - return this._contact; - } - - set contact(contact) { - if (this.contact === contact) - return; - - this._contact = contact; - this._surface = undefined; - this._rgba = undefined; - this._offset = 0; - } - - _loadSurface() { - // Get the monitor scale - const display = Gdk.Display.get_default(); - const monitor = display.get_monitor_at_window(this.get_window()); - const scale = monitor.get_scale_factor(); - - // If there's a contact with an avatar, try to load it - if (this.contact && this.contact.avatar) { - // Check the cache - this._surface = AvatarCache.get(this.contact); - - // Try loading the pixbuf - if (!this._surface) { - const pixbuf = getPixbufForPath( - this.contact.avatar, - this.width_request, - scale - ); - - if (pixbuf) { - this._surface = Gdk.cairo_surface_create_from_pixbuf( - pixbuf, - 0, - this.get_window() - ); - AvatarCache.set(this.contact, this._surface); - } - } - } - - // If we still don't have a surface, load a fallback - if (!this._surface) { - let iconName; - - // If we were given a contact, it's direct message otherwise group - if (this.contact) - iconName = 'avatar-default-symbolic'; - else - iconName = 'group-avatar-symbolic'; - - // Center the icon - this._offset = (this.width_request - 24) / 2; - - // Load the fallback - const pixbuf = getPixbufForIcon(iconName, 24, scale, this.rgba); - - this._surface = Gdk.cairo_surface_create_from_pixbuf( - pixbuf, - 0, - this.get_window() - ); - } - } - - vfunc_draw(cr) { - if (!this._surface) - this._loadSurface(); - - // Clip to a circle - const rad = this.width_request / 2; - cr.arc(rad, rad, rad, 0, 2 * Math.PI); - cr.clipPreserve(); - - // Fill the background if the the surface is offset - if (this._offset > 0) { - Gdk.cairo_set_source_rgba(cr, this.rgba); - cr.fill(); - } - - // Draw the avatar/icon - cr.setSourceSurface(this._surface, this._offset, this._offset); - cr.paint(); - - cr.$dispose(); - return Gdk.EVENT_PROPAGATE; - } -}); - - -/** - * A row for a contact address (usually a phone number). - */ -const AddressRow = GObject.registerClass({ - GTypeName: 'GSConnectContactsAddressRow', - Template: 'resource:///org/gnome/Shell/Extensions/GSConnect/ui/contacts-address-row.ui', - Children: ['avatar', 'name-label', 'address-label', 'type-label'], -}, class AddressRow extends Gtk.ListBoxRow { - - _init(contact, index = 0) { - super._init(); - - this._index = index; - this._number = contact.numbers[index]; - this.contact = contact; - } - - get contact() { - if (this._contact === undefined) - this._contact = null; - - return this._contact; - } - - set contact(contact) { - if (this.contact === contact) - return; - - this._contact = contact; - - if (this._index === 0) { - this.avatar.contact = contact; - this.avatar.visible = true; - - this.name_label.label = GLib.markup_escape_text(contact.name, -1); - this.name_label.visible = true; - - this.address_label.margin_start = 0; - this.address_label.margin_end = 0; - } else { - this.avatar.visible = false; - this.name_label.visible = false; - - // TODO: rtl inverts margin-start so the number don't align - this.address_label.margin_start = 38; - this.address_label.margin_end = 38; - } - - this.address_label.label = GLib.markup_escape_text(this.number.value, -1); - - if (this.number.type !== undefined) - this.type_label.label = getNumberTypeLabel(this.number.type); - } - - get number() { - if (this._number === undefined) - return {value: 'unknown', type: 'unknown'}; - - return this._number; - } -}); - - -/** - * A widget for selecting contact addresses (usually phone numbers) - */ -export const ContactChooser = GObject.registerClass({ - GTypeName: 'GSConnectContactChooser', - Properties: { - 'device': GObject.ParamSpec.object( - 'device', - 'Device', - 'The device associated with this window', - GObject.ParamFlags.READWRITE, - GObject.Object - ), - 'store': GObject.ParamSpec.object( - 'store', - 'Store', - 'The contacts store', - GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT, - GObject.Object - ), - }, - Signals: { - 'number-selected': { - flags: GObject.SignalFlags.RUN_FIRST, - param_types: [GObject.TYPE_STRING], - }, - }, - Template: 'resource:///org/gnome/Shell/Extensions/GSConnect/ui/contact-chooser.ui', - Children: ['entry', 'list', 'scrolled'], -}, class ContactChooser extends Gtk.Grid { - - _init(params) { - super._init(params); - - // Setup the contact list - this.list._entry = this.entry.text; - this.list.set_filter_func(this._filter); - this.list.set_sort_func(this._sort); - - // Make sure we're using the correct contacts store - this.device.bind_property( - 'contacts', - this, - 'store', - GObject.BindingFlags.SYNC_CREATE - ); - - // Cleanup on ::destroy - this.connect('destroy', this._onDestroy); - } - - get store() { - if (this._store === undefined) - this._store = null; - - return this._store; - } - - set store(store) { - if (this.store === store) - return; - - // Unbind the old store - if (this._store) { - // Disconnect from the store - this._store.disconnect(this._contactAddedId); - this._store.disconnect(this._contactRemovedId); - this._store.disconnect(this._contactChangedId); - - // Clear the contact list - const rows = this.list.get_children(); - - for (let i = 0, len = rows.length; i < len; i++) { - rows[i].destroy(); - // HACK: temporary mitigator for mysterious GtkListBox leak - system.gc(); - } - } - - // Set the store - this._store = store; - - // Bind the new store - if (this._store) { - // Connect to the new store - this._contactAddedId = store.connect( - 'contact-added', - this._onContactAdded.bind(this) - ); - - this._contactRemovedId = store.connect( - 'contact-removed', - this._onContactRemoved.bind(this) - ); - - this._contactChangedId = store.connect( - 'contact-changed', - this._onContactChanged.bind(this) - ); - - // Populate the list - this._populate(); - } - } - - /* - * ContactStore Callbacks - */ - _onContactAdded(store, id) { - const contact = this.store.get_contact(id); - this._addContact(contact); - } - - _onContactRemoved(store, id) { - const rows = this.list.get_children(); - - for (let i = 0, len = rows.length; i < len; i++) { - const row = rows[i]; - - if (row.contact.id === id) { - row.destroy(); - // HACK: temporary mitigator for mysterious GtkListBox leak - system.gc(); - } - } - } - - _onContactChanged(store, id) { - this._onContactRemoved(store, id); - this._onContactAdded(store, id); - } - - _onDestroy(chooser) { - chooser.store = null; - } - - _onSearchChanged(entry) { - this.list._entry = entry.text; - let dynamic = this.list.get_row_at_index(0); - - // If the entry contains string with 2 or more digits... - if (entry.text.replace(/\D/g, '').length >= 2) { - // ...ensure we have a dynamic contact for it - if (!dynamic || !dynamic.__tmp) { - dynamic = new AddressRow({ - // TRANSLATORS: A phone number (eg. "Send to 555-5555") - name: _('Send to %s').format(entry.text), - numbers: [{type: 'unknown', value: entry.text}], - }); - dynamic.__tmp = true; - this.list.add(dynamic); - - // ...or if we already do, then update it - } else { - const address = entry.text; - - // Update contact object - dynamic.contact.name = address; - dynamic.contact.numbers[0].value = address; - - // Update UI - dynamic.name_label.label = _('Send to %s').format(address); - dynamic.address_label.label = address; - } - - // ...otherwise remove any dynamic contact that's been created - } else if (dynamic && dynamic.__tmp) { - dynamic.destroy(); - } - - this.list.invalidate_filter(); - this.list.invalidate_sort(); - } - - // GtkListBox::row-activated - _onNumberSelected(box, row) { - if (row === null) - return; - - // Emit the number - const address = row.number.value; - this.emit('number-selected', address); - - // Reset the contact list - this.entry.text = ''; - this.list.select_row(null); - this.scrolled.vadjustment.value = 0; - } - - _filter(row) { - // Dynamic contact always shown - if (row.__tmp) - return true; - - const query = row.get_parent()._entry; - - // Show contact if text is substring of name - const queryName = query.toLocaleLowerCase(); - - if (row.contact.name.toLocaleLowerCase().includes(queryName)) - return true; - - // Show contact if text is substring of number - const queryNumber = query.toPhoneNumber(); - - if (queryNumber.length) { - for (const number of row.contact.numbers) { - if (number.value.toPhoneNumber().includes(queryNumber)) - return true; - } - - // Query is effectively empty - } else if (/^0+/.test(query)) { - return true; - } - - return false; - } - - _sort(row1, row2) { - if (row1.__tmp) - return -1; - - if (row2.__tmp) - return 1; - - return row1.contact.name.localeCompare(row2.contact.name); - } - - _populate() { - // Add each contact - const contacts = this.store.contacts; - - for (let i = 0, len = contacts.length; i < len; i++) - this._addContact(contacts[i]); - } - - _addContactNumber(contact, index) { - const row = new AddressRow(contact, index); - this.list.add(row); - - return row; - } - - _addContact(contact) { - try { - // HACK: fix missing contact names - if (contact.name === undefined) - contact.name = _('Unknown Contact'); - - if (contact.numbers.length === 1) - return this._addContactNumber(contact, 0); - - for (let i = 0, len = contact.numbers.length; i < len; i++) - this._addContactNumber(contact, i); - } catch (e) { - logError(e); - } - } - - /** - * Get a dictionary of number-contact pairs for each selected phone number. - * - * @return {Object[]} A dictionary of contacts - */ - getSelected() { - try { - const selected = {}; - - for (const row of this.list.get_selected_rows()) - selected[row.number.value] = row.contact; - - return selected; - } catch (e) { - logError(e); - return {}; - } - } -}); - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/ui/legacyMessaging.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/ui/legacyMessaging.js deleted file mode 100644 index bda1ab31..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/ui/legacyMessaging.js +++ /dev/null @@ -1,227 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GObject from 'gi://GObject'; -import Gtk from 'gi://Gtk'; - -import * as Contacts from '../ui/contacts.js'; -import * as Messaging from '../ui/messaging.js'; -import * as URI from '../utils/uri.js'; -import '../utils/ui.js'; - - -const Dialog = GObject.registerClass({ - GTypeName: 'GSConnectLegacyMessagingDialog', - Properties: { - 'device': GObject.ParamSpec.object( - 'device', - 'Device', - 'The device associated with this window', - GObject.ParamFlags.READWRITE, - GObject.Object - ), - 'plugin': GObject.ParamSpec.object( - 'plugin', - 'Plugin', - 'The plugin providing messages', - GObject.ParamFlags.READWRITE, - GObject.Object - ), - }, - Template: 'resource:///org/gnome/Shell/Extensions/GSConnect/ui/legacy-messaging-dialog.ui', - Children: [ - 'infobar', 'stack', - 'message-box', 'message-avatar', 'message-label', 'entry', - ], -}, class Dialog extends Gtk.Dialog { - - _init(params) { - super._init({ - application: Gio.Application.get_default(), - device: params.device, - plugin: params.plugin, - use_header_bar: true, - }); - - this.set_response_sensitive(Gtk.ResponseType.OK, false); - - // Dup some functions - this.headerbar = this.get_titlebar(); - this._setHeaderBar = Messaging.Window.prototype._setHeaderBar; - - // Info bar - this.device.bind_property( - 'connected', - this.infobar, - 'reveal-child', - GObject.BindingFlags.INVERT_BOOLEAN - ); - - // Message Entry/Send Button - this.device.bind_property( - 'connected', - this.entry, - 'sensitive', - GObject.BindingFlags.DEFAULT - ); - - this._connectedId = this.device.connect( - 'notify::connected', - this._onStateChanged.bind(this) - ); - - this._entryChangedId = this.entry.buffer.connect( - 'changed', - this._onStateChanged.bind(this) - ); - - // Set the message if given - if (params.message) { - this.message = params.message; - this.addresses = params.message.addresses; - - this.message_avatar.contact = this.device.contacts.query({ - number: this.addresses[0].address, - }); - this.message_label.label = URI.linkify(this.message.body); - this.message_box.visible = true; - - // Otherwise set the address(es) if we were passed those - } else if (params.addresses) { - this.addresses = params.addresses; - } - - // Load the contact list if we weren't supplied with an address - if (this.addresses.length === 0) { - this.contact_chooser = new Contacts.ContactChooser({ - device: this.device, - }); - this.stack.add_named(this.contact_chooser, 'contact-chooser'); - this.stack.child_set_property(this.contact_chooser, 'position', 0); - - this._numberSelectedId = this.contact_chooser.connect( - 'number-selected', - this._onNumberSelected.bind(this) - ); - - this.stack.visible_child_name = 'contact-chooser'; - } - - this.restoreGeometry('legacy-messaging-dialog'); - - this.connect('destroy', this._onDestroy); - } - - _onDestroy(dialog) { - if (dialog._numberSelectedId !== undefined) { - dialog.contact_chooser.disconnect(dialog._numberSelectedId); - dialog.contact_chooser.destroy(); - } - - dialog.entry.buffer.disconnect(dialog._entryChangedId); - dialog.device.disconnect(dialog._connectedId); - } - - vfunc_delete_event() { - this.saveGeometry(); - - return false; - } - - vfunc_response(response_id) { - if (response_id === Gtk.ResponseType.OK) { - // Refuse to send empty or whitespace only texts - if (!this.entry.buffer.text.trim()) - return; - - this.plugin.sendMessage( - this.addresses, - this.entry.buffer.text, - 1, - true - ); - } - - this.destroy(); - } - - get addresses() { - if (this._addresses === undefined) - this._addresses = []; - - return this._addresses; - } - - set addresses(addresses = []) { - this._addresses = addresses; - - // Set the headerbar - this._setHeaderBar(this._addresses); - - // Show the message editor - this.stack.visible_child_name = 'message-editor'; - this._onStateChanged(); - } - - get device() { - if (this._device === undefined) - this._device = null; - - return this._device; - } - - set device(device) { - this._device = device; - } - - get plugin() { - if (this._plugin === undefined) - this._plugin = null; - - return this._plugin; - } - - set plugin(plugin) { - this._plugin = plugin; - } - - _onActivateLink(label, uri) { - Gtk.show_uri_on_window( - this.get_toplevel(), - uri.includes('://') ? uri : `https://${uri}`, - Gtk.get_current_event_time() - ); - - return true; - } - - _onNumberSelected(chooser, number) { - const contacts = chooser.getSelected(); - - this.addresses = Object.keys(contacts).map(address => { - return {address: address}; - }); - } - - _onStateChanged() { - if (this.device.connected && - this.entry.buffer.text.trim() && - this.stack.visible_child_name === 'message-editor') - this.set_response_sensitive(Gtk.ResponseType.OK, true); - else - this.set_response_sensitive(Gtk.ResponseType.OK, false); - } - - /** - * Set the contents of the message entry - * - * @param {string} text - The message to place in the entry - */ - setMessage(text) { - this.entry.buffer.text = text; - } -}); - -export default Dialog; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/ui/messaging.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/ui/messaging.js deleted file mode 100644 index 6f535840..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/ui/messaging.js +++ /dev/null @@ -1,1320 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gdk from 'gi://Gdk'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Gtk from 'gi://Gtk'; -import Pango from 'gi://Pango'; - -import system from 'system'; - -import * as Contacts from './contacts.js'; -import * as Sms from '../plugins/sms.js'; -import * as URI from '../utils/uri.js'; -import '../utils/ui.js'; - -const Tweener = imports.tweener.tweener; - - -/* - * Useful time constants - */ -const TIME_SPAN_MINUTE = 60000; -const TIME_SPAN_HOUR = 3600000; -const TIME_SPAN_DAY = 86400000; -const TIME_SPAN_WEEK = 604800000; - - -// Less than an hour (eg. 42 minutes ago) -const _lthLong = new Intl.RelativeTimeFormat('default', { - numeric: 'auto', - style: 'long', -}); - -// Less than a day ago (eg. 11:42 PM) -const _ltdFormat = new Intl.DateTimeFormat('default', { - hour: 'numeric', - minute: 'numeric', -}); - -// Less than a week ago (eg. Monday) -const _ltwLong = new Intl.DateTimeFormat('default', { - weekday: 'long', -}); - -// Less than a week ago (eg. Mon) -const _ltwShort = new Intl.DateTimeFormat('default', { - weekday: 'short', -}); - -// Less than a year (eg. Oct 31) -const _ltyShort = new Intl.DateTimeFormat('default', { - day: 'numeric', - month: 'short', -}); - -// Less than a year (eg. October 31) -const _ltyLong = new Intl.DateTimeFormat('default', { - day: 'numeric', - month: 'long', -}); - -// Greater than a year (eg. October 31, 2019) -const _gtyLong = new Intl.DateTimeFormat('default', { - day: 'numeric', - month: 'long', - year: 'numeric', -}); - -// Greater than a year (eg. 10/31/2019) -const _gtyShort = new Intl.DateTimeFormat('default', { - day: 'numeric', - month: 'numeric', - year: 'numeric', -}); - -// Pretty close to strftime's %c -const _cFormat = new Intl.DateTimeFormat('default', { - year: 'numeric', - month: 'short', - day: 'numeric', - weekday: 'short', - hour: 'numeric', - minute: 'numeric', - second: 'numeric', - timeZoneName: 'short', -}); - - -/** - * Return a human-readable timestamp, formatted for longer contexts. - * - * @param {number} time - Milliseconds since the epoch (local time) - * @return {string} A localized timestamp similar to what Android Messages uses - */ -function getTime(time) { - const date = new Date(time); - const now = new Date(); - const diff = now - time; - - // Super recent - if (diff < TIME_SPAN_MINUTE) - // TRANSLATORS: Less than a minute ago - return _('Just now'); - - // Under an hour (TODO: these labels aren't updated) - if (diff < TIME_SPAN_HOUR) - return _lthLong.format(-Math.floor(diff / TIME_SPAN_MINUTE), 'minute'); - - // Yesterday, but less than 24 hours ago - if (diff < TIME_SPAN_DAY && now.getDay() !== date.getDay()) - // TRANSLATORS: Yesterday, but less than 24 hours (eg. Yesterday · 11:29 PM) - return _('Yesterday・%s').format(_ltdFormat.format(time)); - - // Less than a day ago - if (diff < TIME_SPAN_DAY) - return _ltdFormat.format(time); - - // Less than a week ago - if (diff < TIME_SPAN_WEEK) - return _ltwLong.format(time); - - // Sometime this year - if (date.getFullYear() === now.getFullYear()) - return _ltyLong.format(time); - - // Earlier than that - return _gtyLong.format(time); -} - - -/** - * Return a human-readable timestamp, formatted for shorter contexts. - * - * @param {number} time - Milliseconds since the epoch (local time) - * @return {string} A localized timestamp similar to what Android Messages uses - */ -function getShortTime(time) { - const date = new Date(time); - const now = new Date(); - const diff = now - time; - - if (diff < TIME_SPAN_MINUTE) - // TRANSLATORS: Less than a minute ago - return _('Just now'); - - if (diff < TIME_SPAN_HOUR) { - // TRANSLATORS: Time duration in minutes (eg. 15 minutes) - return ngettext( - '%d minute', - '%d minutes', - (diff / TIME_SPAN_MINUTE) - ).format(diff / TIME_SPAN_MINUTE); - } - - // Less than a day ago - if (diff < TIME_SPAN_DAY) - return _ltdFormat.format(time); - - // Less than a week ago - if (diff < TIME_SPAN_WEEK) - return _ltwShort.format(time); - - // Sometime this year - if (date.getFullYear() === now.getFullYear()) - return _ltyShort.format(time); - - // Earlier than that - return _gtyShort.format(time); -} - - -/** - * Return a human-readable timestamp, similar to `strftime()` with `%c`. - * - * @param {number} time - Milliseconds since the epoch (local time) - * @return {string} A localized timestamp - */ -function getDetailedTime(time) { - return _cFormat.format(time); -} - - -function setAvatarVisible(row, visible) { - const incoming = row.message.type === Sms.MessageBox.INBOX; - - // Adjust the margins - if (visible) { - row.grid.margin_start = incoming ? 6 : 56; - row.grid.margin_bottom = 6; - } else { - row.grid.margin_start = incoming ? 44 : 56; - row.grid.margin_bottom = 0; - } - - // Show hide the avatar - if (incoming) - row.avatar.visible = visible; -} - - -/** - * A ListBoxRow for a preview of a conversation - */ -const ConversationMessage = GObject.registerClass({ - GTypeName: 'GSConnectMessagingConversationMessage', - Template: 'resource:///org/gnome/Shell/Extensions/GSConnect/ui/messaging-conversation-message.ui', - Children: ['grid', 'avatar', 'sender-label', 'message-label'], -}, class ConversationMessage extends Gtk.ListBoxRow { - _init(contact, message) { - super._init(); - - this.contact = contact; - this.message = message; - - // Sort properties - this.sender = message.addresses[0].address || 'unknown'; - this.message_label.label = URI.linkify(message.body); - this.message_label.tooltip_text = getDetailedTime(message.date); - - // Add avatar for incoming messages - if (message.type === Sms.MessageBox.INBOX) { - this.grid.margin_end = 18; - this.grid.halign = Gtk.Align.START; - - this.avatar.contact = this.contact; - this.avatar.visible = true; - - this.sender_label.label = contact.name; - this.sender_label.visible = true; - - this.message_label.get_style_context().add_class('message-in'); - this.message_label.halign = Gtk.Align.START; - } else { - this.message_label.get_style_context().add_class('message-out'); - } - } - - _onActivateLink(label, uri) { - Gtk.show_uri_on_window( - this.get_toplevel(), - uri.includes('://') ? uri : `https://${uri}`, - Gtk.get_current_event_time() - ); - - return true; - } - - get date() { - return this._message.date; - } - - get thread_id() { - return this._message.thread_id; - } - - get message() { - if (this._message === undefined) - this._message = null; - - return this._message; - } - - set message(message) { - this._message = message; - } -}); - - -/** - * A widget for displaying a conversation thread, with an entry for responding. - */ -const Conversation = GObject.registerClass({ - GTypeName: 'GSConnectMessagingConversation', - Properties: { - 'device': GObject.ParamSpec.object( - 'device', - 'Device', - 'The device associated with this conversation', - GObject.ParamFlags.READWRITE, - GObject.Object - ), - 'plugin': GObject.ParamSpec.object( - 'plugin', - 'Plugin', - 'The plugin providing this conversation', - GObject.ParamFlags.READWRITE, - GObject.Object - ), - 'has-pending': GObject.ParamSpec.boolean( - 'has-pending', - 'Has Pending', - 'Whether there are sent messages pending confirmation', - GObject.ParamFlags.READABLE, - false - ), - 'thread-id': GObject.ParamSpec.string( - 'thread-id', - 'Thread ID', - 'The current thread', - GObject.ParamFlags.READWRITE, - '' - ), - }, - Template: 'resource:///org/gnome/Shell/Extensions/GSConnect/ui/messaging-conversation.ui', - Children: [ - 'entry', 'list', 'scrolled', - 'pending', 'pending-box', - ], -}, class MessagingConversation extends Gtk.Grid { - - _init(params) { - super._init({ - device: params.device, - plugin: params.plugin, - }); - Object.assign(this, params); - - this.device.bind_property( - 'connected', - this.entry, - 'sensitive', - GObject.BindingFlags.SYNC_CREATE - ); - - // If we're disconnected pending messages might not succeed, but we'll - // leave them until reconnect when we'll ask for an update - this._connectedId = this.device.connect( - 'notify::connected', - this._onConnected.bind(this) - ); - - // Pending messages - this.pending.message = { - date: Number.MAX_SAFE_INTEGER, - type: Sms.MessageBox.OUTBOX, - }; - - // Auto-scrolling - this._vadj = this.scrolled.get_vadjustment(); - this._scrolledId = this._vadj.connect( - 'value-changed', - this._holdPosition.bind(this) - ); - - // Message List - this.list.set_header_func(this._headerMessages); - this.list.set_sort_func(this._sortMessages); - this._populateMessages(); - - // Cleanup on ::destroy - this.connect('destroy', this._onDestroy); - } - - get addresses() { - if (this._addresses === undefined) - this._addresses = []; - - return this._addresses; - } - - set addresses(addresses) { - if (!addresses || addresses.length === 0) { - this._addresses = []; - this._contacts = {}; - return; - } - - // Lookup a contact for each address object, then loop back to correct - // each address carried by the message. - this._addresses = addresses; - - for (let i = 0, len = this.addresses.length; i < len; i++) { - // Lookup the contact - const address = this.addresses[i].address; - const contact = this.device.contacts.query({number: address}); - - // Get corrected address - let number = address.toPhoneNumber(); - - if (!number) - continue; - - for (const contactNumber of contact.numbers) { - const cnumber = contactNumber.value.toPhoneNumber(); - - if (cnumber && (number.endsWith(cnumber) || cnumber.endsWith(number))) { - number = contactNumber.value; - break; - } - } - - // Store the final result - this.addresses[i].address = number; - this.contacts[address] = contact; - } - - // TODO: Mark the entry as insensitive for group messages - if (this.addresses.length > 1) { - this.entry.placeholder_text = _('Not available'); - this.entry.secondary_icon_name = null; - this.entry.secondary_icon_tooltip_text = null; - this.entry.sensitive = false; - this.entry.tooltip_text = null; - } - } - - get contacts() { - if (this._contacts === undefined) - this._contacts = {}; - - return this._contacts; - } - - get has_pending() { - if (this.pending_box === undefined) - return false; - - return (this.pending_box.get_children().length > 0); - } - - get plugin() { - if (this._plugin === undefined) - this._plugin = null; - - return this._plugin; - } - - set plugin(plugin) { - this._plugin = plugin; - } - - get thread_id() { - if (this._thread_id === undefined) - this._thread_id = null; - - return this._thread_id; - } - - set thread_id(thread_id) { - const thread = this.plugin.threads[thread_id]; - const message = (thread) ? thread[0] : null; - - if (message && this.addresses.length === 0) { - this.addresses = message.addresses; - this._thread_id = thread_id; - } - } - - _onConnected(device) { - if (device.connected) - this.pending_box.foreach(msg => msg.destroy()); - } - - _onDestroy(conversation) { - conversation.device.disconnect(conversation._connectedId); - conversation._vadj.disconnect(conversation._scrolledId); - - conversation.list.foreach(message => { - // HACK: temporary mitigator for mysterious GtkListBox leak - message.destroy(); - system.gc(); - }); - } - - _onEdgeReached(scrolled_window, pos) { - // Try to load more messages - if (pos === Gtk.PositionType.TOP) - this.logPrevious(); - - // Release any hold to resume auto-scrolling - else if (pos === Gtk.PositionType.BOTTOM) - this._releasePosition(); - } - - _onEntryChanged(entry) { - entry.secondary_icon_sensitive = (entry.text.length); - } - - _onKeyPressEvent(entry, event) { - const keyval = event.get_keyval()[1]; - const state = event.get_state()[1]; - const mask = state & Gtk.accelerator_get_default_mod_mask(); - - if (keyval === Gdk.KEY_Return && (mask & Gdk.ModifierType.SHIFT_MASK)) { - entry.emit('insert-at-cursor', '\n'); - return true; - } - - return false; - } - - _onSendMessage(entry, signal_id, event) { - // Don't send empty texts - if (!this.entry.text.trim()) - return; - - // Send the message - this.plugin.sendMessage(this.addresses, this.entry.text); - - // Add a phony message in the pending box - const message = new Gtk.Label({ - label: URI.linkify(this.entry.text), - halign: Gtk.Align.END, - selectable: true, - use_markup: true, - visible: true, - wrap: true, - wrap_mode: Pango.WrapMode.WORD_CHAR, - xalign: 0, - }); - message.get_style_context().add_class('message-out'); - message.date = Date.now(); - message.type = Sms.MessageBox.SENT; - - // Notify to reveal the pending box - this.pending_box.add(message); - this.notify('has-pending'); - - // Clear the entry - this.entry.text = ''; - } - - _onSizeAllocate(listbox, allocation) { - const upper = this._vadj.get_upper(); - const pageSize = this._vadj.get_page_size(); - - // If the scrolled window hasn't been filled yet, load another message - if (upper <= pageSize) { - this.logPrevious(); - this.scrolled.get_child().check_resize(); - - // We've been asked to hold the position, so we'll reset the adjustment - // value and update the hold position - } else if (this.__pos) { - this._vadj.set_value(upper - this.__pos); - - // Otherwise we probably appended a message and should scroll to it - } else { - this._scrollPosition(Gtk.PositionType.BOTTOM); - } - } - - /** - * Create a message row, ensuring a contact object has been retrieved or - * generated for the message. - * - * @param {Object} message - A dictionary of message data - * @return {ConversationMessage} A message row - */ - _createMessageRow(message) { - // Ensure we have a contact - const sender = message.addresses[0].address || 'unknown'; - - if (this.contacts[sender] === undefined) { - this.contacts[sender] = this.device.contacts.query({ - number: sender, - }); - } - - return new ConversationMessage(this.contacts[sender], message); - } - - _populateMessages() { - this.__first = null; - this.__last = null; - this.__pos = 0; - this.__messages = []; - - // Try and find a thread_id for this number - if (this.thread_id === null && this.addresses.length) - this._thread_id = this.plugin.getThreadIdForAddresses(this.addresses); - - // Make a copy of the thread and fill the window with messages - if (this.plugin.threads[this.thread_id]) { - this.__messages = this.plugin.threads[this.thread_id].slice(0); - this.logPrevious(); - } - } - - _headerMessages(row, before) { - // Skip pending - if (row.get_name() === 'pending') - return; - - if (before === null) - return setAvatarVisible(row, true); - - // Add date header if the last message was more than an hour ago - let header = row.get_header(); - - if ((row.message.date - before.message.date) > TIME_SPAN_HOUR) { - if (!header) { - header = new Gtk.Label({visible: true, selectable: true}); - header.get_style_context().add_class('dim-label'); - row.set_header(header); - } - - header.label = getTime(row.message.date); - - // Also show the avatar - setAvatarVisible(row, true); - - row.sender_label.visible = row.message.addresses.length > 1; - - // Or if the previous sender was the same, hide its avatar - } else if (row.message.type === before.message.type && - row.sender.equalsPhoneNumber(before.sender)) { - setAvatarVisible(before, false); - setAvatarVisible(row, true); - - row.sender_label.visible = false; - - // otherwise show the avatar - } else { - setAvatarVisible(row, true); - } - } - - _holdPosition() { - this.__pos = this._vadj.get_upper() - this._vadj.get_value(); - } - - _releasePosition() { - this.__pos = 0; - } - - _scrollPosition(pos = Gtk.PositionType.BOTTOM, animate = true) { - let vpos = pos; - this._vadj.freeze_notify(); - - if (pos === Gtk.PositionType.BOTTOM) - vpos = this._vadj.get_upper() - this._vadj.get_page_size(); - - if (animate) { - Tweener.addTween(this._vadj, { - value: vpos, - time: 0.5, - transition: 'easeInOutCubic', - onComplete: () => this._vadj.thaw_notify(), - }); - } else { - GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => { - this._vadj.set_value(vpos); - this._vadj.thaw_notify(); - }); - } - } - - _sortMessages(row1, row2) { - return (row1.message.date > row2.message.date) ? 1 : -1; - } - - /** - * Log the next message in the conversation. - * - * @param {Object} message - A message object - */ - logNext(message) { - try { - // TODO: Unsupported MessageBox - if (message.type !== Sms.MessageBox.INBOX && - message.type !== Sms.MessageBox.SENT) - throw TypeError(`invalid message box ${message.type}`); - - // Append the message - const row = this._createMessageRow(message); - this.list.add(row); - this.list.invalidate_headers(); - - // Remove the first pending message - if (this.has_pending && message.type === Sms.MessageBox.SENT) { - this.pending_box.get_children()[0].destroy(); - this.notify('has-pending'); - } - } catch (e) { - debug(e); - } - } - - /** - * Log the previous message in the thread - */ - logPrevious() { - try { - const message = this.__messages.pop(); - - if (!message) - return; - - // TODO: Unsupported MessageBox - if (message.type !== Sms.MessageBox.INBOX && - message.type !== Sms.MessageBox.SENT) - throw TypeError(`invalid message box ${message.type}`); - - // Prepend the message - const row = this._createMessageRow(message); - this.list.prepend(row); - this.list.invalidate_headers(); - } catch (e) { - debug(e); - } - } - - /** - * Set the contents of the message entry - * - * @param {string} text - The message to place in the entry - */ - setMessage(text) { - this.entry.text = text; - this.entry.emit('move-cursor', 0, text.length, false); - } -}); - - -/** - * A ListBoxRow for a preview of a conversation - */ -const ConversationSummary = GObject.registerClass({ - GTypeName: 'GSConnectMessagingConversationSummary', - Template: 'resource:///org/gnome/Shell/Extensions/GSConnect/ui/messaging-conversation-summary.ui', - Children: ['avatar', 'name-label', 'time-label', 'body-label'], -}, class ConversationSummary extends Gtk.ListBoxRow { - _init(contacts, message) { - super._init(); - - this.contacts = contacts; - this.message = message; - } - - get date() { - return this._message.date; - } - - get thread_id() { - return this._message.thread_id; - } - - get message() { - return this._message; - } - - set message(message) { - this._message = message; - this._sender = message.addresses[0].address || 'unknown'; - - // Contact Name - let nameLabel = _('Unknown Contact'); - - // Update avatar for single-recipient messages - if (message.addresses.length === 1) { - this.avatar.contact = this.contacts[this._sender]; - nameLabel = GLib.markup_escape_text(this.avatar.contact.name, -1); - } else { - this.avatar.contact = null; - nameLabel = _('Group Message'); - const participants = []; - message.addresses.forEach((address) => { - participants.push(this.contacts[address.address].name); - }); - this.name_label.tooltip_text = participants.join(', '); - } - - // Contact Name & Message body - let bodyLabel = message.body.split(/\r|\n/)[0]; - bodyLabel = GLib.markup_escape_text(bodyLabel, -1); - - // Ignore the 'read' flag if it's an outgoing message - if (message.type === Sms.MessageBox.SENT) { - // TRANSLATORS: An outgoing message body in a conversation summary - bodyLabel = _('You: %s').format(bodyLabel); - - // Otherwise make it bold if it's unread - } else if (message.read === Sms.MessageStatus.UNREAD) { - nameLabel = `<b>${nameLabel}</b>`; - bodyLabel = `<b>${bodyLabel}</b>`; - } - - // Set the labels, body always smaller - this.name_label.label = nameLabel; - this.body_label.label = `<small>${bodyLabel}</small>`; - - // Time - const timeLabel = `<small>${getShortTime(message.date)}</small>`; - this.time_label.label = timeLabel; - } - - /** - * Update the relative time label. - */ - update() { - const timeLabel = `<small>${getShortTime(this.message.date)}</small>`; - this.time_label.label = timeLabel; - } -}); - - -/** - * A Gtk.ApplicationWindow for SMS conversations - */ -export const Window = GObject.registerClass({ - GTypeName: 'GSConnectMessagingWindow', - Properties: { - 'device': GObject.ParamSpec.object( - 'device', - 'Device', - 'The device associated with this window', - GObject.ParamFlags.READWRITE, - GObject.Object - ), - 'plugin': GObject.ParamSpec.object( - 'plugin', - 'Plugin', - 'The plugin providing messages', - GObject.ParamFlags.READWRITE, - GObject.Object - ), - 'thread-id': GObject.ParamSpec.string( - 'thread-id', - 'Thread ID', - 'The current thread', - GObject.ParamFlags.READWRITE, - '' - ), - }, - Template: 'resource:///org/gnome/Shell/Extensions/GSConnect/ui/messaging-window.ui', - Children: [ - 'headerbar', 'infobar', - 'thread-list', 'stack', - ], -}, class MessagingWindow extends Gtk.ApplicationWindow { - - _init(params) { - super._init(params); - this.headerbar.subtitle = this.device.name; - - this.insert_action_group('device', this.device); - - // Device Status - this.device.bind_property( - 'connected', - this.infobar, - 'reveal-child', - GObject.BindingFlags.INVERT_BOOLEAN - ); - - // Contacts - this.contact_chooser = new Contacts.ContactChooser({ - device: this.device, - }); - this.stack.add_named(this.contact_chooser, 'contact-chooser'); - - this._numberSelectedId = this.contact_chooser.connect( - 'number-selected', - this._onNumberSelected.bind(this) - ); - - // Threads - this.thread_list.set_sort_func(this._sortThreads); - - this._threadsChangedId = this.plugin.connect( - 'notify::threads', - this._onThreadsChanged.bind(this) - ); - - this._timestampThreadsId = GLib.timeout_add_seconds( - GLib.PRIORITY_DEFAULT_IDLE, - 60, - this._timestampThreads.bind(this) - ); - - this._sync(); - this._onThreadsChanged(); - this.restoreGeometry('messaging'); - } - - vfunc_delete_event(event) { - this.saveGeometry(); - - GLib.source_remove(this._timestampThreadsId); - this.contact_chooser.disconnect(this._numberSelectedId); - this.plugin.disconnect(this._threadsChangedId); - - return false; - } - - get plugin() { - return this._plugin || null; - } - - set plugin(plugin) { - this._plugin = plugin; - } - - get thread_id() { - return this.stack.visible_child_name; - } - - set thread_id(thread_id) { - thread_id = `${thread_id}`; // FIXME - - // Reset to the empty placeholder - if (!thread_id) { - this.thread_list.select_row(null); - this.stack.set_visible_child_name('placeholder'); - return; - } - - // Create a conversation widget if there isn't one - let conversation = this.stack.get_child_by_name(thread_id); - const thread = this.plugin.threads[thread_id]; - - if (conversation === null) { - if (!thread) { - debug(`Thread ID ${thread_id} not found`); - return; - } - - conversation = new Conversation({ - device: this.device, - plugin: this.plugin, - thread_id: thread_id, - }); - - this.stack.add_named(conversation, thread_id); - } - - // Figure out whether this is a multi-recipient thread - this._setHeaderBar(thread[0].addresses); - - // Select the conversation and entry active - this.stack.visible_child = conversation; - this.stack.visible_child.entry.has_focus = true; - - // There was a pending message waiting for a conversation to be chosen - if (this._pendingShare) { - conversation.setMessage(this._pendingShare); - this._pendingShare = null; - } - - this._thread_id = thread_id; - this.notify('thread_id'); - } - - _setHeaderBar(addresses = []) { - const address = addresses[0].address; - const contact = this.device.contacts.query({number: address}); - - if (addresses.length === 1) { - this.headerbar.title = contact.name; - this.headerbar.subtitle = Contacts.getDisplayNumber(contact, address); - } else { - const otherLength = addresses.length - 1; - - this.headerbar.title = contact.name; - this.headerbar.subtitle = ngettext( - 'And %d other contact', - 'And %d others', - otherLength - ).format(otherLength); - } - } - - _sync() { - this.device.contacts.fetch(); - this.plugin.connected(); - } - - _onNewConversation() { - this._sync(); - this.stack.set_visible_child_name('contact-chooser'); - this.thread_list.select_row(null); - this.contact_chooser.entry.has_focus = true; - } - - _onNumberSelected(chooser, number) { - const contacts = chooser.getSelected(); - const row = this._getRowForContacts(contacts); - - if (row) - row.emit('activate'); - else - this.setContacts(contacts); - } - - /** - * Threads - */ - _onThreadsChanged() { - // Get the last message in each thread - const messages = {}; - - for (const [thread_id, thread] of Object.entries(this.plugin.threads)) { - const message = thread[thread.length - 1]; - - // Skip messages without a body (eg. MMS messages without text) - if (message.body) - messages[thread_id] = thread[thread.length - 1]; - } - - // Update existing summaries and destroy old ones - for (const row of this.thread_list.get_children()) { - const message = messages[row.thread_id]; - - // If it's an existing conversation, update it - if (message) { - // Ensure there's a contact mapping - const sender = message.addresses[0].address || 'unknown'; - - if (row.contacts[sender] === undefined) { - row.contacts[sender] = this.device.contacts.query({ - number: sender, - }); - } - - row.message = message; - delete messages[row.thread_id]; - - // Otherwise destroy it - } else { - // Destroy the conversation widget - const conversation = this.stack.get_child_by_name(`${row.thread_id}`); - - if (conversation) { - conversation.destroy(); - system.gc(); - } - - // Then the summary widget - row.destroy(); - // HACK: temporary mitigator for mysterious GtkListBox leak - system.gc(); - } - } - - // What's left in the dictionary is new summaries - for (const message of Object.values(messages)) { - const contacts = this.device.contacts.lookupAddresses(message.addresses); - const conversation = new ConversationSummary(contacts, message); - this.thread_list.add(conversation); - } - - // Re-sort the summaries - this.thread_list.invalidate_sort(); - } - - // GtkListBox::row-activated - _onThreadSelected(box, row) { - // Show the conversation for this number (if applicable) - if (row) { - this.thread_id = row.thread_id; - - // Show the placeholder - } else { - this.headerbar.title = _('Messaging'); - this.headerbar.subtitle = this.device.name; - } - } - - _sortThreads(row1, row2) { - return (row1.date > row2.date) ? -1 : 1; - } - - _timestampThreads() { - if (this.visible) - this.thread_list.foreach(row => row.update()); - - return GLib.SOURCE_CONTINUE; - } - - /** - * Find the thread row for @contacts - * - * @param {Object[]} contacts - A contact group - * @return {ConversationSummary|null} The thread row or %null - */ - _getRowForContacts(contacts) { - const addresses = Object.keys(contacts).map(address => { - return {address: address}; - }); - - // Try to find a thread_id - const thread_id = this.plugin.getThreadIdForAddresses(addresses); - - for (const row of this.thread_list.get_children()) { - if (row.message.thread_id === thread_id) - return row; - } - - return null; - } - - setContacts(contacts) { - // Group the addresses - const addresses = []; - - for (const address of Object.keys(contacts)) - addresses.push({address: address}); - - // Try to find a thread ID for this address group - let thread_id = this.plugin.getThreadIdForAddresses(addresses); - - if (thread_id === null) - thread_id = GLib.uuid_string_random(); - else - thread_id = thread_id.toString(); - - // Try to find a thread row for the ID - const row = this._getRowForContacts(contacts); - - if (row !== null) { - this.thread_list.select_row(row); - return; - } - - // We're creating a new conversation - const conversation = new Conversation({ - device: this.device, - plugin: this.plugin, - addresses: addresses, - }); - - // Set the headerbar - this._setHeaderBar(addresses); - - // Select the conversation and entry active - this.stack.add_named(conversation, thread_id); - this.stack.visible_child = conversation; - this.stack.visible_child.entry.has_focus = true; - - // There was a pending message waiting for a conversation to be chosen - if (this._pendingShare) { - conversation.setMessage(this._pendingShare); - this._pendingShare = null; - } - - this._thread_id = thread_id; - this.notify('thread-id'); - } - - _includesAddress(addresses, addressObj) { - const number = addressObj.address.toPhoneNumber(); - - for (const haystackObj of addresses) { - const tnumber = haystackObj.address.toPhoneNumber(); - - if (number.endsWith(tnumber) || tnumber.endsWith(number)) - return true; - } - - return false; - } - - /** - * Try and find an existing conversation widget for @message. - * - * @param {Object} message - A message object - * @return {Conversation|null} A conversation widget or %null - */ - getConversationForMessage(message) { - // TODO: This shouldn't happen? - if (message === null) - return null; - - // First try to find a conversation by thread_id - const thread_id = `${message.thread_id}`; - const conversation = this.stack.get_child_by_name(thread_id); - - if (conversation !== null) - return conversation; - - // Try and find one by matching addresses, which is necessary if we've - // started a thread locally and haven't set the thread_id - const addresses = message.addresses; - - for (const conversation of this.stack.get_children()) { - if (conversation.addresses === undefined || - conversation.addresses.length !== addresses.length) - continue; - - const caddrs = conversation.addresses; - - // If we find a match, set `thread-id` on the conversation and the - // child property `name`. - if (addresses.every(addr => this._includesAddress(caddrs, addr))) { - conversation._thread_id = thread_id; - this.stack.child_set_property(conversation, 'name', thread_id); - - return conversation; - } - } - - return null; - } - - /** - * Set the contents of the message entry. If @pending is %false set the - * message of the currently selected conversation, otherwise mark the - * message to be set for the next selected conversation. - * - * @param {string} message - The message to place in the entry - * @param {boolean} pending - Wait for a conversation to be selected - */ - setMessage(message, pending = false) { - try { - if (pending) - this._pendingShare = message; - else - this.stack.visible_child.setMessage(message); - } catch (e) { - debug(e); - } - } -}); - - -/** - * A Gtk.ApplicationWindow for selecting from open conversations - */ -export const ConversationChooser = GObject.registerClass({ - GTypeName: 'GSConnectConversationChooser', - Properties: { - 'device': GObject.ParamSpec.object( - 'device', - 'Device', - 'The device associated with this window', - GObject.ParamFlags.READWRITE, - GObject.Object - ), - 'message': GObject.ParamSpec.string( - 'message', - 'Message', - 'The message to share', - GObject.ParamFlags.READWRITE, - '' - ), - 'plugin': GObject.ParamSpec.object( - 'plugin', - 'Plugin', - 'The plugin providing messages', - GObject.ParamFlags.READWRITE, - GObject.Object - ), - }, -}, class ConversationChooser extends Gtk.ApplicationWindow { - - _init(params) { - super._init(Object.assign({ - title: _('Share Link'), - default_width: 300, - default_height: 200, - }, params)); - this.set_keep_above(true); - - // HeaderBar - this.headerbar = new Gtk.HeaderBar({ - title: _('Share Link'), - subtitle: this.message, - show_close_button: true, - tooltip_text: this.message, - }); - this.set_titlebar(this.headerbar); - - const newButton = new Gtk.Button({ - image: new Gtk.Image({icon_name: 'list-add-symbolic'}), - tooltip_text: _('New Conversation'), - always_show_image: true, - }); - newButton.connect('clicked', this._new.bind(this)); - this.headerbar.pack_start(newButton); - - // Threads - const scrolledWindow = new Gtk.ScrolledWindow({ - can_focus: false, - hexpand: true, - vexpand: true, - hscrollbar_policy: Gtk.PolicyType.NEVER, - }); - this.add(scrolledWindow); - - this.thread_list = new Gtk.ListBox({ - activate_on_single_click: false, - }); - this.thread_list.set_sort_func(Window.prototype._sortThreads); - this.thread_list.connect('row-activated', this._select.bind(this)); - scrolledWindow.add(this.thread_list); - - // Filter Setup - Window.prototype._onThreadsChanged.call(this); - this.show_all(); - } - - get plugin() { - return this._plugin || null; - } - - set plugin(plugin) { - this._plugin = plugin; - } - - _new(button) { - const message = this.message; - this.destroy(); - - this.plugin.sms(); - this.plugin.window._onNewConversation(); - this.plugin.window._pendingShare = message; - } - - _select(box, row) { - this.plugin.sms(); - this.plugin.window.thread_id = row.message.thread_id.toString(); - this.plugin.window.setMessage(this.message); - - this.destroy(); - } -}); - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/ui/mousepad.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/ui/mousepad.js deleted file mode 100644 index 5c28603f..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/ui/mousepad.js +++ /dev/null @@ -1,460 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import GLib from 'gi://GLib'; -import Gdk from 'gi://Gdk'; -import GObject from 'gi://GObject'; -import Gtk from 'gi://Gtk'; - - -/** - * A map of Gdk to "KDE Connect" keyvals - */ -const ReverseKeyMap = new Map([ - [Gdk.KEY_BackSpace, 1], - [Gdk.KEY_Tab, 2], - [Gdk.KEY_Linefeed, 3], - [Gdk.KEY_Left, 4], - [Gdk.KEY_Up, 5], - [Gdk.KEY_Right, 6], - [Gdk.KEY_Down, 7], - [Gdk.KEY_Page_Up, 8], - [Gdk.KEY_Page_Down, 9], - [Gdk.KEY_Home, 10], - [Gdk.KEY_End, 11], - [Gdk.KEY_Return, 12], - [Gdk.KEY_Delete, 13], - [Gdk.KEY_Escape, 14], - [Gdk.KEY_Sys_Req, 15], - [Gdk.KEY_Scroll_Lock, 16], - [Gdk.KEY_F1, 21], - [Gdk.KEY_F2, 22], - [Gdk.KEY_F3, 23], - [Gdk.KEY_F4, 24], - [Gdk.KEY_F5, 25], - [Gdk.KEY_F6, 26], - [Gdk.KEY_F7, 27], - [Gdk.KEY_F8, 28], - [Gdk.KEY_F9, 29], - [Gdk.KEY_F10, 30], - [Gdk.KEY_F11, 31], - [Gdk.KEY_F12, 32], -]); - - -/* - * A list of keyvals we consider modifiers - */ -const MOD_KEYS = [ - Gdk.KEY_Alt_L, - Gdk.KEY_Alt_R, - Gdk.KEY_Caps_Lock, - Gdk.KEY_Control_L, - Gdk.KEY_Control_R, - Gdk.KEY_Meta_L, - Gdk.KEY_Meta_R, - Gdk.KEY_Num_Lock, - Gdk.KEY_Shift_L, - Gdk.KEY_Shift_R, - Gdk.KEY_Super_L, - Gdk.KEY_Super_R, -]; - - -/* - * Some convenience functions for checking keyvals for modifiers - */ -const isAlt = (key) => [Gdk.KEY_Alt_L, Gdk.KEY_Alt_R].includes(key); -const isCtrl = (key) => [Gdk.KEY_Control_L, Gdk.KEY_Control_R].includes(key); -const isShift = (key) => [Gdk.KEY_Shift_L, Gdk.KEY_Shift_R].includes(key); -const isSuper = (key) => [Gdk.KEY_Super_L, Gdk.KEY_Super_R].includes(key); - - -export const InputDialog = GObject.registerClass({ - GTypeName: 'GSConnectMousepadInputDialog', - Properties: { - 'device': GObject.ParamSpec.object( - 'device', - 'Device', - 'The device associated with this window', - GObject.ParamFlags.READWRITE, - GObject.Object - ), - 'plugin': GObject.ParamSpec.object( - 'plugin', - 'Plugin', - 'The mousepad plugin associated with this window', - GObject.ParamFlags.READWRITE, - GObject.Object - ), - }, - Template: 'resource:///org/gnome/Shell/Extensions/GSConnect/ui/mousepad-input-dialog.ui', - Children: [ - 'infobar', 'infobar-label', - 'touchpad-eventbox', 'mouse-left-button', 'mouse-middle-button', 'mouse-right-button', - 'touchpad-drag', 'touchpad-long-press', - 'shift-label', 'ctrl-label', 'alt-label', 'super-label', 'entry', - ], -}, class InputDialog extends Gtk.Dialog { - - _init(params) { - super._init(Object.assign({ - use_header_bar: true, - }, params)); - - const headerbar = this.get_titlebar(); - headerbar.title = _('Remote Input'); - headerbar.subtitle = this.device.name; - - // Main Box - const content = this.get_content_area(); - content.border_width = 0; - - // TRANSLATORS: Displayed when the remote keyboard is not ready to accept input - this.infobar_label.label = _('Remote keyboard on %s is not active').format(this.device.name); - - // Text Input - this.entry.buffer.connect( - 'insert-text', - this._onInsertText.bind(this) - ); - - this.infobar.connect('notify::reveal-child', this._onState.bind(this)); - this.plugin.bind_property('state', this.infobar, 'reveal-child', 6); - - // Mouse Pad - this._resetTouchpadMotion(); - this.touchpad_motion_timeout_id = 0; - this.touchpad_holding = false; - - // Scroll Input - this.add_events(Gdk.EventMask.SCROLL_MASK); - - this.show_all(); - } - - vfunc_delete_event(event) { - this._ungrab(); - return this.hide_on_delete(); - } - - vfunc_grab_broken_event(event) { - if (event.keyboard) - this._ungrab(); - - return false; - } - - vfunc_key_release_event(event) { - if (!this.plugin.state) - debug('ignoring remote keyboard state'); - - const keyvalLower = Gdk.keyval_to_lower(event.keyval); - const realMask = event.state & Gtk.accelerator_get_default_mod_mask(); - - this.alt_label.sensitive = !isAlt(keyvalLower) && (realMask & Gdk.ModifierType.MOD1_MASK); - this.ctrl_label.sensitive = !isCtrl(keyvalLower) && (realMask & Gdk.ModifierType.CONTROL_MASK); - this.shift_label.sensitive = !isShift(keyvalLower) && (realMask & Gdk.ModifierType.SHIFT_MASK); - this.super_label.sensitive = !isSuper(keyvalLower) && (realMask & Gdk.ModifierType.SUPER_MASK); - - return super.vfunc_key_release_event(event); - } - - vfunc_key_press_event(event) { - if (!this.plugin.state) - debug('ignoring remote keyboard state'); - - let keyvalLower = Gdk.keyval_to_lower(event.keyval); - let realMask = event.state & Gtk.accelerator_get_default_mod_mask(); - - this.alt_label.sensitive = isAlt(keyvalLower) || (realMask & Gdk.ModifierType.MOD1_MASK); - this.ctrl_label.sensitive = isCtrl(keyvalLower) || (realMask & Gdk.ModifierType.CONTROL_MASK); - this.shift_label.sensitive = isShift(keyvalLower) || (realMask & Gdk.ModifierType.SHIFT_MASK); - this.super_label.sensitive = isSuper(keyvalLower) || (realMask & Gdk.ModifierType.SUPER_MASK); - - // Wait for a real key before sending - if (MOD_KEYS.includes(keyvalLower)) - return false; - - // Normalize Tab - if (keyvalLower === Gdk.KEY_ISO_Left_Tab) - keyvalLower = Gdk.KEY_Tab; - - // Put shift back if it changed the case of the key, not otherwise. - if (keyvalLower !== event.keyval) - realMask |= Gdk.ModifierType.SHIFT_MASK; - - // HACK: we don't want to use SysRq as a keybinding (but we do want - // Alt+Print), so we avoid translation from Alt+Print to SysRq - if (keyvalLower === Gdk.KEY_Sys_Req && (realMask & Gdk.ModifierType.MOD1_MASK) !== 0) - keyvalLower = Gdk.KEY_Print; - - // CapsLock isn't supported as a keybinding modifier, so keep it from - // confusing us - realMask &= ~Gdk.ModifierType.LOCK_MASK; - - if (keyvalLower === 0) - return false; - - debug(`keyval: ${event.keyval}, mask: ${realMask}`); - - const request = { - alt: !!(realMask & Gdk.ModifierType.MOD1_MASK), - ctrl: !!(realMask & Gdk.ModifierType.CONTROL_MASK), - shift: !!(realMask & Gdk.ModifierType.SHIFT_MASK), - super: !!(realMask & Gdk.ModifierType.SUPER_MASK), - sendAck: true, - }; - - // specialKey - if (ReverseKeyMap.has(event.keyval)) { - request.specialKey = ReverseKeyMap.get(event.keyval); - - // key - } else { - const codePoint = Gdk.keyval_to_unicode(event.keyval); - request.key = String.fromCodePoint(codePoint); - } - - this.device.sendPacket({ - type: 'kdeconnect.mousepad.request', - body: request, - }); - - // Pass these key combinations rather than using the echo reply - if (request.alt || request.ctrl || request.super) - return super.vfunc_key_press_event(event); - - return false; - } - - vfunc_scroll_event(event) { - if (event.delta_x === 0 && event.delta_y === 0) - return true; - - this.device.sendPacket({ - type: 'kdeconnect.mousepad.request', - body: { - scroll: true, - dx: event.delta_x * 200, - dy: event.delta_y * 200, - }, - }); - return true; - } - - vfunc_window_state_event(event) { - if (!this.plugin.state) - debug('ignoring remote keyboard state'); - - if (event.new_window_state & Gdk.WindowState.FOCUSED) - this._grab(); - else - this._ungrab(); - - return super.vfunc_window_state_event(event); - } - - _onInsertText(buffer, location, text, len) { - if (this._isAck) - return; - - debug(`insert-text: ${text} (chars ${[...text].length})`); - - for (const char of [...text]) { - if (!char) - continue; - - // TODO: modifiers? - this.device.sendPacket({ - type: 'kdeconnect.mousepad.request', - body: { - alt: false, - ctrl: false, - shift: false, - super: false, - sendAck: false, - key: char, - }, - }); - } - } - - _onState(widget) { - if (!this.plugin.state) - debug('ignoring remote keyboard state'); - - if (this.is_active) - this._grab(); - else - this._ungrab(); - } - - _grab() { - if (!this.visible || this._keyboard) - return; - - const seat = Gdk.Display.get_default().get_default_seat(); - const status = seat.grab( - this.get_window(), - Gdk.SeatCapabilities.KEYBOARD, - false, - null, - null, - null - ); - - if (status !== Gdk.GrabStatus.SUCCESS) { - logError(new Error('Grabbing keyboard failed')); - return; - } - - this._keyboard = seat.get_keyboard(); - this.grab_add(); - this.entry.has_focus = true; - } - - _ungrab() { - if (this._keyboard) { - this._keyboard.get_seat().ungrab(); - this._keyboard = null; - this.grab_remove(); - } - - this.entry.buffer.text = ''; - } - - _resetTouchpadMotion() { - this.touchpad_motion_prev_x = 0; - this.touchpad_motion_prev_y = 0; - this.touchpad_motion_x = 0; - this.touchpad_motion_y = 0; - } - - _onMouseLeftButtonClicked(button) { - this.device.sendPacket({ - type: 'kdeconnect.mousepad.request', - body: { - singleclick: true, - }, - }); - } - - _onMouseMiddleButtonClicked(button) { - this.device.sendPacket({ - type: 'kdeconnect.mousepad.request', - body: { - middleclick: true, - }, - }); - } - - _onMouseRightButtonClicked(button) { - this.device.sendPacket({ - type: 'kdeconnect.mousepad.request', - body: { - rightclick: true, - }, - }); - } - - _onTouchpadDragBegin(gesture) { - this._resetTouchpadMotion(); - - this.touchpad_motion_timeout_id = - GLib.timeout_add(GLib.PRIORITY_DEFAULT, 10, - this._onTouchpadMotionTimeout.bind(this)); - } - - _onTouchpadDragUpdate(gesture, offset_x, offset_y) { - this.touchpad_motion_x = offset_x; - this.touchpad_motion_y = offset_y; - } - - _onTouchpadDragEnd(gesture) { - this._resetTouchpadMotion(); - - GLib.Source.remove(this.touchpad_motion_timeout_id); - this.touchpad_motion_timeout_id = 0; - } - - _onTouchpadLongPressCancelled(gesture) { - const gesture_button = gesture.get_current_button(); - - // Check user dragged less than certain distances. - const is_click = - (Math.abs(this.touchpad_motion_x) < 4) && - (Math.abs(this.touchpad_motion_y) < 4); - - if (is_click) { - const click_body = {}; - switch (gesture_button) { - case 1: - click_body.singleclick = true; - break; - - case 2: - click_body.middleclick = true; - break; - - case 3: - click_body.rightclick = true; - break; - - default: - return; - } - - this.device.sendPacket({ - type: 'kdeconnect.mousepad.request', - body: click_body, - }); - } - } - - _onTouchpadLongPressPressed(gesture) { - const gesture_button = gesture.get_current_button(); - - if (gesture_button !== 1) { - debug('Long press on other type of buttons are not handled.'); - } else { - this.device.sendPacket({ - type: 'kdeconnect.mousepad.request', - body: { - singlehold: true, - }, - }); - this.touchpad_holding = true; - } - } - - _onTouchpadLongPressEnd(gesture) { - if (this.touchpad_holding) { - this.device.sendPacket({ - type: 'kdeconnect.mousepad.request', - body: { - singlerelease: true, - }, - }); - this.touchpad_holding = false; - } - } - - _onTouchpadMotionTimeout() { - const diff_x = this.touchpad_motion_x - this.touchpad_motion_prev_x; - const diff_y = this.touchpad_motion_y - this.touchpad_motion_prev_y; - - this.device.sendPacket({ - type: 'kdeconnect.mousepad.request', - body: { - dx: diff_x, - dy: diff_y, - }, - }); - - this.touchpad_motion_prev_x = this.touchpad_motion_x; - this.touchpad_motion_prev_y = this.touchpad_motion_y; - return true; - } -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/ui/notification.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/ui/notification.js deleted file mode 100644 index 654e4655..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/ui/notification.js +++ /dev/null @@ -1,178 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GObject from 'gi://GObject'; -import Gtk from 'gi://Gtk'; - -import * as URI from '../utils/uri.js'; -import '../utils/ui.js'; - - -/** - * A dialog for repliable notifications. - */ -const ReplyDialog = GObject.registerClass({ - GTypeName: 'GSConnectNotificationReplyDialog', - Properties: { - 'device': GObject.ParamSpec.object( - 'device', - 'Device', - 'The device associated with this window', - GObject.ParamFlags.READWRITE, - GObject.Object - ), - 'plugin': GObject.ParamSpec.object( - 'plugin', - 'Plugin', - 'The plugin that owns this notification', - GObject.ParamFlags.READWRITE, - GObject.Object - ), - 'uuid': GObject.ParamSpec.string( - 'uuid', - 'UUID', - 'The notification reply UUID', - GObject.ParamFlags.READWRITE, - null - ), - }, - Template: 'resource:///org/gnome/Shell/Extensions/GSConnect/ui/notification-reply-dialog.ui', - Children: ['infobar', 'notification-title', 'notification-body', 'entry'], -}, class ReplyDialog extends Gtk.Dialog { - - _init(params) { - super._init({ - application: Gio.Application.get_default(), - device: params.device, - plugin: params.plugin, - uuid: params.uuid, - use_header_bar: true, - }); - - this.set_response_sensitive(Gtk.ResponseType.OK, false); - - // Info bar - this.device.bind_property( - 'connected', - this.infobar, - 'reveal-child', - GObject.BindingFlags.INVERT_BOOLEAN - ); - - // Notification Data - const headerbar = this.get_titlebar(); - headerbar.title = params.notification.appName; - headerbar.subtitle = this.device.name; - - this.notification_title.label = params.notification.title; - this.notification_body.label = URI.linkify(params.notification.text); - - // Message Entry/Send Button - this.device.bind_property( - 'connected', - this.entry, - 'sensitive', - GObject.BindingFlags.DEFAULT - ); - - this._connectedId = this.device.connect( - 'notify::connected', - this._onStateChanged.bind(this) - ); - - this._entryChangedId = this.entry.buffer.connect( - 'changed', - this._onStateChanged.bind(this) - ); - - this.restoreGeometry('notification-reply-dialog'); - - this.connect('destroy', this._onDestroy); - } - - _onDestroy(dialog) { - dialog.entry.buffer.disconnect(dialog._entryChangedId); - dialog.device.disconnect(dialog._connectedId); - } - - vfunc_delete_event() { - this.saveGeometry(); - - return false; - } - - vfunc_response(response_id) { - if (response_id === Gtk.ResponseType.OK) { - // Refuse to send empty or whitespace only messages - if (!this.entry.buffer.text.trim()) - return; - - this.plugin.replyNotification( - this.uuid, - this.entry.buffer.text - ); - } - - this.destroy(); - } - - get device() { - if (this._device === undefined) - this._device = null; - - return this._device; - } - - set device(device) { - this._device = device; - } - - get plugin() { - if (this._plugin === undefined) - this._plugin = null; - - return this._plugin; - } - - set plugin(plugin) { - this._plugin = plugin; - } - - get uuid() { - if (this._uuid === undefined) - this._uuid = null; - - return this._uuid; - } - - set uuid(uuid) { - this._uuid = uuid; - - // We must have a UUID - if (!uuid) { - this.destroy(); - debug('no uuid for repliable notification'); - } - } - - _onActivateLink(label, uri) { - Gtk.show_uri_on_window( - this.get_toplevel(), - uri.includes('://') ? uri : `https://${uri}`, - Gtk.get_current_event_time() - ); - - return true; - } - - _onStateChanged() { - if (this.device.connected && this.entry.buffer.text.trim()) - this.set_response_sensitive(Gtk.ResponseType.OK, true); - else - this.set_response_sensitive(Gtk.ResponseType.OK, false); - } -}); - -export default ReplyDialog; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/ui/service.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/ui/service.js deleted file mode 100644 index b84bb3d2..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/ui/service.js +++ /dev/null @@ -1,252 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import GLib from 'gi://GLib'; -import Gio from 'gi://Gio'; -import GObject from 'gi://GObject'; -import Gtk from 'gi://Gtk'; - -import system from 'system'; - -import Config from '../../config.js'; - - -/* - * Issue Header - */ -const ISSUE_HEADER = ` -GSConnect: ${Config.PACKAGE_VERSION} (${Config.IS_USER ? 'user' : 'system'}) -GJS: ${system.version} -Session: ${GLib.getenv('XDG_SESSION_TYPE')} -OS: ${GLib.get_os_info('PRETTY_NAME')} -`; - - -/** - * A dialog for selecting a device - */ -export const DeviceChooser = GObject.registerClass({ - GTypeName: 'GSConnectServiceDeviceChooser', - Properties: { - 'action-name': GObject.ParamSpec.string( - 'action-name', - 'Action Name', - 'The name of the associated action, like "sendFile"', - GObject.ParamFlags.READWRITE, - null - ), - 'action-target': GObject.param_spec_variant( - 'action-target', - 'Action Target', - 'The parameter for action invocations', - new GLib.VariantType('*'), - null, - GObject.ParamFlags.READWRITE - ), - }, - Template: 'resource:///org/gnome/Shell/Extensions/GSConnect/ui/service-device-chooser.ui', - Children: ['device-list', 'cancel-button', 'select-button'], -}, class DeviceChooser extends Gtk.Dialog { - - _init(params = {}) { - super._init({ - use_header_bar: true, - application: Gio.Application.get_default(), - }); - this.set_keep_above(true); - - // HeaderBar - this.get_header_bar().subtitle = params.title; - - // Dialog Action - this.action_name = params.action_name; - this.action_target = params.action_target; - - // Device List - this.device_list.set_sort_func(this._sortDevices); - - this._devicesChangedId = this.application.settings.connect( - 'changed::devices', - this._onDevicesChanged.bind(this) - ); - this._onDevicesChanged(); - } - - vfunc_response(response_id) { - if (response_id === Gtk.ResponseType.OK) { - try { - const device = this.device_list.get_selected_row().device; - device.activate_action(this.action_name, this.action_target); - } catch (e) { - logError(e); - } - } - - this.destroy(); - } - - get action_name() { - if (this._action_name === undefined) - this._action_name = null; - - return this._action_name; - } - - set action_name(name) { - this._action_name = name; - } - - get action_target() { - if (this._action_target === undefined) - this._action_target = null; - - return this._action_target; - } - - set action_target(variant) { - this._action_target = variant; - } - - _onDeviceActivated(box, row) { - this.response(Gtk.ResponseType.OK); - } - - _onDeviceSelected(box) { - this.set_response_sensitive( - Gtk.ResponseType.OK, - (box.get_selected_row()) - ); - } - - _onDevicesChanged() { - // Collect known devices - const devices = {}; - - for (const [id, device] of this.application.manager.devices.entries()) - devices[id] = device; - - // Prune device rows - this.device_list.foreach(row => { - if (!devices.hasOwnProperty(row.name)) - row.destroy(); - else - delete devices[row.name]; - }); - - // Add new devices - for (const device of Object.values(devices)) { - const action = device.lookup_action(this.action_name); - - if (action === null) - continue; - - const row = new Gtk.ListBoxRow({ - visible: action.enabled, - }); - row.set_name(device.id); - row.device = device; - - action.bind_property( - 'enabled', - row, - 'visible', - Gio.SettingsBindFlags.DEFAULT - ); - - const grid = new Gtk.Grid({ - column_spacing: 12, - margin: 6, - visible: true, - }); - row.add(grid); - - const icon = new Gtk.Image({ - icon_name: device.icon_name, - pixel_size: 32, - visible: true, - }); - grid.attach(icon, 0, 0, 1, 1); - - const name = new Gtk.Label({ - label: device.name, - halign: Gtk.Align.START, - hexpand: true, - visible: true, - }); - grid.attach(name, 1, 0, 1, 1); - - this.device_list.add(row); - } - - if (this.device_list.get_selected_row() === null) - this.device_list.select_row(this.device_list.get_row_at_index(0)); - } - - _sortDevices(row1, row2) { - return row1.device.name.localeCompare(row2.device.name); - } -}); - - -/** - * A dialog for reporting an error. - */ -export const ErrorDialog = GObject.registerClass({ - GTypeName: 'GSConnectServiceErrorDialog', - Template: 'resource:///org/gnome/Shell/Extensions/GSConnect/ui/service-error-dialog.ui', - Children: [ - 'error-stack', - 'expander-arrow', - 'gesture', - 'report-button', - 'revealer', - ], -}, class ErrorDialog extends Gtk.Window { - - _init(error) { - super._init({ - application: Gio.Application.get_default(), - title: `GSConnect: ${error.name}`, - }); - this.set_keep_above(true); - - this.error = error; - this.error_stack.buffer.text = `${error.message}\n\n${error.stack}`; - this.gesture.connect('released', this._onReleased.bind(this)); - } - - _onClicked(button) { - if (this.report_button === button) { - const uri = this._buildUri(this.error.message, this.error.stack); - Gio.AppInfo.launch_default_for_uri_async(uri, null, null, null); - } - - this.destroy(); - } - - _onReleased(gesture, n_press) { - if (n_press === 1) - this.revealer.reveal_child = !this.revealer.reveal_child; - } - - _onRevealChild(revealer, pspec) { - this.expander_arrow.icon_name = this.revealer.reveal_child - ? 'pan-down-symbolic' - : 'pan-end-symbolic'; - } - - _buildUri(message, stack) { - const body = `\`\`\`${ISSUE_HEADER}\n${stack}\n\`\`\``; - const titleQuery = encodeURIComponent(message).replace('%20', '+'); - const bodyQuery = encodeURIComponent(body).replace('%20', '+'); - const uri = `${Config.PACKAGE_BUGREPORT}?title=${titleQuery}&body=${bodyQuery}`; - - // Reasonable URI length limit - if (uri.length > 2000) - return uri.substr(0, 2000); - - return uri; - } -}); - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/utils/dbus.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/utils/dbus.js deleted file mode 100644 index f4a9d676..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/utils/dbus.js +++ /dev/null @@ -1,255 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GjsPrivate from 'gi://GjsPrivate'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; - - -/* - * Some utility methods - */ -function toDBusCase(string) { - return string.replace(/(?:^\w|[A-Z]|\b\w)/g, (ltr, offset) => { - return ltr.toUpperCase(); - }).replace(/[\s_-]+/g, ''); -} - -function toUnderscoreCase(string) { - return string.replace(/(?:^\w|[A-Z]|_|\b\w)/g, (ltr, offset) => { - if (ltr === '_') - return ''; - - return (offset > 0) ? `_${ltr.toLowerCase()}` : ltr.toLowerCase(); - }).replace(/[\s-]+/g, ''); -} - - -/** - * DBus.Interface represents a DBus interface bound to an object instance, meant - * to be exported over DBus. - */ -export const Interface = GObject.registerClass({ - GTypeName: 'GSConnectDBusInterface', - Implements: [Gio.DBusInterface], - Properties: { - 'g-instance': GObject.ParamSpec.object( - 'g-instance', - 'Instance', - 'The delegate GObject', - GObject.ParamFlags.READWRITE, - GObject.Object.$gtype - ), - }, -}, class Interface extends GjsPrivate.DBusImplementation { - - _init(params) { - super._init({ - g_instance: params.g_instance, - g_interface_info: params.g_interface_info, - }); - - // Cache member lookups - this._instanceHandlers = []; - this._instanceMethods = {}; - this._instanceProperties = {}; - - const info = this.get_info(); - this.connect('handle-method-call', this._call.bind(this._instance, info)); - this.connect('handle-property-get', this._get.bind(this._instance, info)); - this.connect('handle-property-set', this._set.bind(this._instance, info)); - - // Automatically forward known signals - const id = this._instance.connect('notify', this._notify.bind(this)); - this._instanceHandlers.push(id); - - for (const signal of info.signals) { - const type = `(${signal.args.map(arg => arg.signature).join('')})`; - const id = this._instance.connect( - signal.name, - this._emit.bind(this, signal.name, type) - ); - - this._instanceHandlers.push(id); - } - - // Export if connection and object path were given - if (params.g_connection && params.g_object_path) - this.export(params.g_connection, params.g_object_path); - } - - get g_instance() { - if (this._instance === undefined) - this._instance = null; - - return this._instance; - } - - set g_instance(instance) { - this._instance = instance; - } - - /** - * Invoke an instance's method for a DBus method call. - * - * @param {Gio.DBusInterfaceInfo} info - The DBus interface - * @param {DBus.Interface} iface - The DBus interface - * @param {string} name - The DBus method name - * @param {GLib.Variant} parameters - The method parameters - * @param {Gio.DBusMethodInvocation} invocation - The method invocation info - */ - async _call(info, iface, name, parameters, invocation) { - let retval; - - // Invoke the instance method - try { - const args = parameters.unpack().map(parameter => { - if (parameter.get_type_string() === 'h') { - const message = invocation.get_message(); - const fds = message.get_unix_fd_list(); - const idx = parameter.deepUnpack(); - return fds.get(idx); - } else { - return parameter.recursiveUnpack(); - } - }); - - retval = await this[name](...args); - } catch (e) { - if (e instanceof GLib.Error) { - invocation.return_gerror(e); - } else { - // likely to be a normal JS error - if (!e.name.includes('.')) - e.name = `org.gnome.gjs.JSError.${e.name}`; - - invocation.return_dbus_error(e.name, e.message); - } - - logError(e, `${this}: ${name}`); - return; - } - - // `undefined` is an empty tuple on DBus - if (retval === undefined) - retval = new GLib.Variant('()', []); - - // Return the instance result or error - try { - if (!(retval instanceof GLib.Variant)) { - const args = info.lookup_method(name).out_args; - retval = new GLib.Variant( - `(${args.map(arg => arg.signature).join('')})`, - (args.length === 1) ? [retval] : retval - ); - } - - invocation.return_value(retval); - } catch (e) { - invocation.return_dbus_error( - 'org.gnome.gjs.JSError.ValueError', - 'Service implementation returned an incorrect value type' - ); - - logError(e, `${this}: ${name}`); - } - } - - _nativeProp(obj, name) { - if (this._instanceProperties[name] === undefined) { - let propName = name; - - if (propName in obj) - this._instanceProperties[name] = propName; - - if (this._instanceProperties[name] === undefined) { - propName = toUnderscoreCase(name); - - if (propName in obj) - this._instanceProperties[name] = propName; - } - } - - return this._instanceProperties[name]; - } - - _emit(name, type, obj, ...args) { - this.emit_signal(name, new GLib.Variant(type, args)); - } - - _get(info, iface, name) { - const nativeValue = this[iface._nativeProp(this, name)]; - const propertyInfo = info.lookup_property(name); - - if (nativeValue === undefined || propertyInfo === null) - return null; - - return new GLib.Variant(propertyInfo.signature, nativeValue); - } - - _set(info, iface, name, value) { - const nativeValue = value.recursiveUnpack(); - - this[iface._nativeProp(this, name)] = nativeValue; - } - - _notify(obj, pspec) { - const name = toDBusCase(pspec.name); - const propertyInfo = this.get_info().lookup_property(name); - - if (propertyInfo === null) - return; - - this.emit_property_changed( - name, - new GLib.Variant( - propertyInfo.signature, - // Adjust for GJS's '-'/'_' conversion - this._instance[pspec.name.replace(/-/gi, '_')] - ) - ); - } - - destroy() { - try { - for (const id of this._instanceHandlers) - this._instance.disconnect(id); - this._instanceHandlers = []; - - this.flush(); - this.unexport(); - } catch (e) { - logError(e); - } - } -}); - -/** - * Get a new, dedicated DBus connection on @busType - * - * @param {Gio.BusType} [busType] - a Gio.BusType constant - * @param {Gio.Cancellable} [cancellable] - an optional Gio.Cancellable - * @return {Promise<Gio.DBusConnection>} A new DBus connection - */ -export function newConnection(busType = Gio.BusType.SESSION, cancellable = null) { - return new Promise((resolve, reject) => { - Gio.DBusConnection.new_for_address( - Gio.dbus_address_get_for_bus_sync(busType, cancellable), - Gio.DBusConnectionFlags.AUTHENTICATION_CLIENT | - Gio.DBusConnectionFlags.MESSAGE_BUS_CONNECTION, - null, - cancellable, - (connection, res) => { - try { - resolve(Gio.DBusConnection.new_for_address_finish(res)); - } catch (e) { - reject(e); - } - } - ); - - }); -} - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/utils/ui.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/utils/ui.js deleted file mode 100644 index d0f31aa9..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/utils/ui.js +++ /dev/null @@ -1,51 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gdk from 'gi://Gdk'; -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import Gtk from 'gi://Gtk'; - -import Config from '../../config.js'; - - -/* - * Window State - */ -Gtk.Window.prototype.restoreGeometry = function (context = 'default') { - this._windowState = new Gio.Settings({ - settings_schema: Config.GSCHEMA.lookup( - 'org.gnome.Shell.Extensions.GSConnect.WindowState', - true - ), - path: `/org/gnome/shell/extensions/gsconnect/${context}/`, - }); - - // Size - const [width, height] = this._windowState.get_value('window-size').deepUnpack(); - - if (width && height) - this.set_default_size(width, height); - - // Maximized State - if (this._windowState.get_boolean('window-maximized')) - this.maximize(); -}; - -Gtk.Window.prototype.saveGeometry = function () { - const state = this.get_window().get_state(); - - // Maximized State - const maximized = (state & Gdk.WindowState.MAXIMIZED); - this._windowState.set_boolean('window-maximized', maximized); - - // Leave the size at the value before maximizing - if (maximized || (state & Gdk.WindowState.FULLSCREEN)) - return; - - // Size - const size = this.get_size(); - this._windowState.set_value('window-size', new GLib.Variant('(ii)', size)); -}; - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/utils/uri.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/utils/uri.js deleted file mode 100644 index e7fca2c4..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/service/utils/uri.js +++ /dev/null @@ -1,169 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import GLib from 'gi://GLib'; - - -/** - * The same regular expression used in GNOME Shell - * - * http://daringfireball.net/2010/07/improved_regex_for_matching_urls - */ -const _balancedParens = '\\((?:[^\\s()<>]+|(?:\\(?:[^\\s()<>]+\\)))*\\)'; -const _leadingJunk = '[\\s`(\\[{\'\\"<\u00AB\u201C\u2018]'; -const _notTrailingJunk = '[^\\s`!()\\[\\]{};:\'\\".,<>?\u00AB\u00BB\u201C\u201D\u2018\u2019]'; - -const _urlRegexp = new RegExp( - '(^|' + _leadingJunk + ')' + - '(' + - '(?:' + - '(?:http|https)://' + // scheme:// - '|' + - 'www\\d{0,3}[.]' + // www. - '|' + - '[a-z0-9.\\-]+[.][a-z]{2,4}/' + // foo.xx/ - ')' + - '(?:' + // one or more: - '[^\\s()<>]+' + // run of non-space non-() - '|' + // or - _balancedParens + // balanced parens - ')+' + - '(?:' + // end with: - _balancedParens + // balanced parens - '|' + // or - _notTrailingJunk + // last non-junk char - ')' + - ')', 'gi'); - - -/** - * sms/tel URI RegExp (https://tools.ietf.org/html/rfc5724) - * - * A fairly lenient regexp for sms: URIs that allows tel: numbers with chars - * from global-number, local-number (without phone-context) and single spaces. - * This allows passing numbers directly from libfolks or GData without - * pre-processing. It also makes an allowance for URIs passed from Gio.File - * that always come in the form "sms:///". - */ -const _smsParam = "[\\w.!~*'()-]+=(?:[\\w.!~*'()-]|%[0-9A-F]{2})*"; -const _telParam = ";[a-zA-Z0-9-]+=(?:[\\w\\[\\]/:&+$.!~*'()-]|%[0-9A-F]{2})+"; -const _lenientDigits = '[+]?(?:[0-9A-F*#().-]| (?! )|%20(?!%20))+'; -const _lenientNumber = `${_lenientDigits}(?:${_telParam})*`; - -const _smsRegex = new RegExp( - '^' + - 'sms:' + // scheme - '(?:[/]{2,3})?' + // Gio.File returns ":///" - '(' + // one or more... - _lenientNumber + // phone numbers - '(?:,' + _lenientNumber + ')*' + // separated by commas - ')' + - '(?:\\?(' + // followed by optional... - _smsParam + // parameters... - '(?:&' + _smsParam + ')*' + // separated by "&" (unescaped) - '))?' + - '$', 'g'); // fragments (#foo) not allowed - - -const _numberRegex = new RegExp( - '^' + - '(' + _lenientDigits + ')' + // phone number digits - '((?:' + _telParam + ')*)' + // followed by optional parameters - '$', 'g'); - - -/** - * Searches @str for URLs and returns an array of objects with %url - * properties showing the matched URL string, and %pos properties indicating - * the position within @str where the URL was found. - * - * @param {string} str - the string to search - * @return {Object[]} the list of match objects, as described above - */ -export function findUrls(str) { - _urlRegexp.lastIndex = 0; - - const res = []; - let match; - - while ((match = _urlRegexp.exec(str))) { - const name = match[2]; - const url = GLib.uri_parse_scheme(name) ? name : `http://${name}`; - res.push({name, url, pos: match.index + match[1].length}); - } - - return res; -} - - -/** - * Return a string with URLs couched in <a> tags, parseable by Pango and - * using the same RegExp as GNOME Shell. - * - * @param {string} str - The string to be modified - * @param {string} [title] - An optional title (eg. alt text, tooltip) - * @return {string} the modified text - */ -export function linkify(str, title = null) { - const text = GLib.markup_escape_text(str, -1); - - _urlRegexp.lastIndex = 0; - - if (title) { - return text.replace( - _urlRegexp, - `$1<a href="$2" title="${title}">$2</a>` - ); - } else { - return text.replace(_urlRegexp, '$1<a href="$2">$2</a>'); - } -} - - -/** - * A simple parsing class for sms: URI's (https://tools.ietf.org/html/rfc5724) - */ -export default class URI { - constructor(uri) { - _smsRegex.lastIndex = 0; - const [, recipients, query] = _smsRegex.exec(uri); - - this.recipients = recipients.split(',').map(recipient => { - _numberRegex.lastIndex = 0; - const [, number, params] = _numberRegex.exec(recipient); - - if (params) { - for (const param of params.substr(1).split(';')) { - const [key, value] = param.split('='); - - // add phone-context to beginning of - if (key === 'phone-context' && value.startsWith('+')) - return value + unescape(number); - } - } - - return unescape(number); - }); - - if (query) { - for (const field of query.split('&')) { - const [key, value] = field.split('='); - - if (key === 'body') { - if (this.body) - throw URIError('duplicate "body" field'); - - this.body = value ? decodeURIComponent(value) : undefined; - } - } - } - } - - toString() { - const uri = `sms:${this.recipients.join(',')}`; - - return this.body ? `${uri}?body=${escape(this.body)}` : uri; - } -} - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/clipboard.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/clipboard.js deleted file mode 100644 index c9b61f35..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/clipboard.js +++ /dev/null @@ -1,380 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GjsPrivate from 'gi://GjsPrivate'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; - -import Meta from 'gi://Meta'; - - -/* - * DBus Interface Info - */ -const DBUS_NAME = 'org.gnome.Shell.Extensions.GSConnect.Clipboard'; -const DBUS_PATH = '/org/gnome/Shell/Extensions/GSConnect/Clipboard'; -const DBUS_NODE = Gio.DBusNodeInfo.new_for_xml(` -<node> - <interface name="org.gnome.Shell.Extensions.GSConnect.Clipboard"> - <!-- Methods --> - <method name="GetMimetypes"> - <arg direction="out" type="as" name="mimetypes"/> - </method> - <method name="GetText"> - <arg direction="out" type="s" name="text"/> - </method> - <method name="SetText"> - <arg direction="in" type="s" name="text"/> - </method> - <method name="GetValue"> - <arg direction="in" type="s" name="mimetype"/> - <arg direction="out" type="ay" name="value"/> - </method> - <method name="SetValue"> - <arg direction="in" type="ay" name="value"/> - <arg direction="in" type="s" name="mimetype"/> - </method> - - <!-- Signals --> - <signal name="OwnerChange"/> - </interface> -</node> -`); -const DBUS_INFO = DBUS_NODE.lookup_interface(DBUS_NAME); - - -/* - * Text Mimetypes - */ -const TEXT_MIMETYPES = [ - 'text/plain;charset=utf-8', - 'UTF8_STRING', - 'text/plain', - 'STRING', -]; - - -/* GSConnectClipboardPortal: - * - * A simple clipboard portal, especially useful on Wayland where GtkClipboard - * doesn't work in the background. - */ -export const Clipboard = GObject.registerClass({ - GTypeName: 'GSConnectShellClipboard', -}, class GSConnectShellClipboard extends GjsPrivate.DBusImplementation { - - _init(params = {}) { - super._init({ - g_interface_info: DBUS_INFO, - }); - - this._transferring = false; - - // Watch global selection - this._selection = global.display.get_selection(); - this._ownerChangedId = this._selection.connect( - 'owner-changed', - this._onOwnerChanged.bind(this) - ); - - // Prepare DBus interface - this._handleMethodCallId = this.connect( - 'handle-method-call', - this._onHandleMethodCall.bind(this) - ); - - this._nameId = Gio.DBus.own_name( - Gio.BusType.SESSION, - DBUS_NAME, - Gio.BusNameOwnerFlags.NONE, - this._onBusAcquired.bind(this), - null, - this._onNameLost.bind(this) - ); - } - - _onOwnerChanged(selection, type, source) { - /* We're only interested in the standard clipboard */ - if (type !== Meta.SelectionType.SELECTION_CLIPBOARD) - return; - - /* In Wayland an intermediate GMemoryOutputStream is used which triggers - * a second ::owner-changed emission, so we need to ensure we ignore - * that while the transfer is resolving. - */ - if (this._transferring) - return; - - this._transferring = true; - - /* We need to put our signal emission in an idle callback to ensure that - * Mutter's internal calls have finished resolving in the loop, or else - * we'll end up with the previous selection's content. - */ - GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => { - this.emit_signal('OwnerChange', null); - this._transferring = false; - - return GLib.SOURCE_REMOVE; - }); - } - - _onBusAcquired(connection, name) { - try { - this.export(connection, DBUS_PATH); - } catch (e) { - logError(e); - } - } - - _onNameLost(connection, name) { - try { - this.unexport(); - } catch (e) { - logError(e); - } - } - - async _onHandleMethodCall(iface, name, parameters, invocation) { - let retval; - - try { - const args = parameters.recursiveUnpack(); - - retval = await this[name](...args); - } catch (e) { - if (e instanceof GLib.Error) { - invocation.return_gerror(e); - } else { - if (!e.name.includes('.')) - e.name = `org.gnome.gjs.JSError.${e.name}`; - - invocation.return_dbus_error(e.name, e.message); - } - - return; - } - - if (retval === undefined) - retval = new GLib.Variant('()', []); - - try { - if (!(retval instanceof GLib.Variant)) { - const args = DBUS_INFO.lookup_method(name).out_args; - retval = new GLib.Variant( - `(${args.map(arg => arg.signature).join('')})`, - (args.length === 1) ? [retval] : retval - ); - } - - invocation.return_value(retval); - - // Without a response, the client will wait for timeout - } catch (e) { - invocation.return_dbus_error( - 'org.gnome.gjs.JSError.ValueError', - 'Service implementation returned an incorrect value type' - ); - } - } - - /** - * Get the available mimetypes of the current clipboard content - * - * @return {Promise<string[]>} A list of mime-types - */ - GetMimetypes() { - return new Promise((resolve, reject) => { - try { - const mimetypes = this._selection.get_mimetypes( - Meta.SelectionType.SELECTION_CLIPBOARD - ); - - resolve(mimetypes); - } catch (e) { - reject(e); - } - }); - } - - /** - * Get the text content of the clipboard - * - * @return {Promise<string>} Text content of the clipboard - */ - GetText() { - return new Promise((resolve, reject) => { - const mimetypes = this._selection.get_mimetypes( - Meta.SelectionType.SELECTION_CLIPBOARD); - - const mimetype = TEXT_MIMETYPES.find(type => mimetypes.includes(type)); - - if (mimetype !== undefined) { - const stream = Gio.MemoryOutputStream.new_resizable(); - - this._selection.transfer_async( - Meta.SelectionType.SELECTION_CLIPBOARD, - mimetype, -1, - stream, null, - (selection, res) => { - try { - selection.transfer_finish(res); - - const bytes = stream.steal_as_bytes(); - const bytearray = bytes.get_data(); - - resolve(new TextDecoder().decode(bytearray)); - } catch (e) { - reject(e); - } - } - ); - } else { - reject(new Error('text not available')); - } - }); - } - - /** - * Set the text content of the clipboard - * - * @param {string} text - text content to set - * @return {Promise} A promise for the operation - */ - SetText(text) { - return new Promise((resolve, reject) => { - try { - if (typeof text !== 'string') { - throw new Gio.DBusError({ - code: Gio.DBusError.INVALID_ARGS, - message: 'expected string', - }); - } - - const source = Meta.SelectionSourceMemory.new( - 'text/plain;charset=utf-8', GLib.Bytes.new(text)); - - this._selection.set_owner( - Meta.SelectionType.SELECTION_CLIPBOARD, source); - - resolve(); - } catch (e) { - reject(e); - } - }); - } - - /** - * Get the content of the clipboard with the type @mimetype. - * - * @param {string} mimetype - the mimetype to request - * @return {Promise<Uint8Array>} The content of the clipboard - */ - GetValue(mimetype) { - return new Promise((resolve, reject) => { - const stream = Gio.MemoryOutputStream.new_resizable(); - - this._selection.transfer_async( - Meta.SelectionType.SELECTION_CLIPBOARD, - mimetype, -1, - stream, null, - (selection, res) => { - try { - selection.transfer_finish(res); - - const bytes = stream.steal_as_bytes(); - - resolve(bytes.get_data()); - } catch (e) { - reject(e); - } - } - ); - }); - } - - /** - * Set the content of the clipboard to @value with the type @mimetype. - * - * @param {Uint8Array} value - the value to set - * @param {string} mimetype - the mimetype of the value - * @return {Promise} - A promise for the operation - */ - SetValue(value, mimetype) { - return new Promise((resolve, reject) => { - try { - const source = Meta.SelectionSourceMemory.new(mimetype, - GLib.Bytes.new(value)); - - this._selection.set_owner( - Meta.SelectionType.SELECTION_CLIPBOARD, source); - - resolve(); - } catch (e) { - reject(e); - } - }); - } - - destroy() { - if (this._selection && this._ownerChangedId > 0) { - this._selection.disconnect(this._ownerChangedId); - this._ownerChangedId = 0; - } - - if (this._nameId > 0) { - Gio.bus_unown_name(this._nameId); - this._nameId = 0; - } - - if (this._handleMethodCallId > 0) { - this.disconnect(this._handleMethodCallId); - this._handleMethodCallId = 0; - this.unexport(); - } - } -}); - - -let _portal = null; -let _portalId = 0; - -/** - * Watch for the service to start and export the clipboard portal when it does. - */ -export function watchService() { - if (GLib.getenv('XDG_SESSION_TYPE') !== 'wayland') - return; - - if (_portalId > 0) - return; - - _portalId = Gio.bus_watch_name( - Gio.BusType.SESSION, - 'org.gnome.Shell.Extensions.GSConnect', - Gio.BusNameWatcherFlags.NONE, - () => { - if (_portal === null) - _portal = new Clipboard(); - }, - () => { - if (_portal !== null) { - _portal.destroy(); - _portal = null; - } - } - ); -} - -/** - * Stop watching the service and export the portal if currently running. - */ -export function unwatchService() { - if (_portalId > 0) { - Gio.bus_unwatch_name(_portalId); - _portalId = 0; - } -} - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/device.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/device.js deleted file mode 100644 index 59e4d96e..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/device.js +++ /dev/null @@ -1,380 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Clutter from 'gi://Clutter'; -import GObject from 'gi://GObject'; -import St from 'gi://St'; - -import * as PanelMenu from 'resource:///org/gnome/shell/ui/panelMenu.js'; -import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js'; - -import {gettext as _} from 'resource:///org/gnome/shell/extensions/extension.js'; -import {getIcon} from './utils.js'; - -import * as GMenu from './gmenu.js'; -import Tooltip from './tooltip.js'; - - -/** - * A battery widget with an icon, text percentage and time estimate tooltip - */ -export const Battery = GObject.registerClass({ - GTypeName: 'GSConnectShellDeviceBattery', -}, class Battery extends St.BoxLayout { - - _init(params) { - super._init({ - reactive: true, - style_class: 'gsconnect-device-battery', - track_hover: true, - }); - Object.assign(this, params); - - // Percent Label - this.label = new St.Label({ - y_align: Clutter.ActorAlign.CENTER, - }); - this.label.clutter_text.ellipsize = 0; - this.add_child(this.label); - - // Battery Icon - this.icon = new St.Icon({ - fallback_icon_name: 'battery-missing-symbolic', - icon_size: 16, - }); - this.add_child(this.icon); - - // Battery Estimate - this.tooltip = new Tooltip({ - parent: this, - text: null, - }); - - // Battery GAction - this._actionAddedId = this.device.action_group.connect( - 'action-added', - this._onActionChanged.bind(this) - ); - this._actionRemovedId = this.device.action_group.connect( - 'action-removed', - this._onActionChanged.bind(this) - ); - this._actionStateChangedId = this.device.action_group.connect( - 'action-state-changed', - this._onStateChanged.bind(this) - ); - - this._onActionChanged(this.device.action_group, 'battery'); - - // Cleanup on destroy - this.connect('destroy', this._onDestroy); - } - - _onActionChanged(action_group, action_name) { - if (action_name !== 'battery') - return; - - if (action_group.has_action('battery')) { - const value = action_group.get_action_state('battery'); - const [charging, icon_name, level, time] = value.deepUnpack(); - - this._state = { - charging: charging, - icon_name: icon_name, - level: level, - time: time, - }; - } else { - this._state = null; - } - - this._sync(); - } - - _onStateChanged(action_group, action_name, value) { - if (action_name !== 'battery') - return; - - const [charging, icon_name, level, time] = value.deepUnpack(); - - this._state = { - charging: charging, - icon_name: icon_name, - level: level, - time: time, - }; - - this._sync(); - } - - _getBatteryLabel() { - if (!this._state) - return null; - - const {charging, level, time} = this._state; - - if (level === 100) - // TRANSLATORS: When the battery level is 100% - return _('Fully Charged'); - - if (time === 0) - // TRANSLATORS: When no time estimate for the battery is available - // EXAMPLE: 42% (Estimating…) - return _('%d%% (Estimating…)').format(level); - - const total = time / 60; - const minutes = Math.floor(total % 60); - const hours = Math.floor(total / 60); - - if (charging) { - // TRANSLATORS: Estimated time until battery is charged - // EXAMPLE: 42% (1:15 Until Full) - return _('%d%% (%d\u2236%02d Until Full)').format( - level, - hours, - minutes - ); - } else { - // TRANSLATORS: Estimated time until battery is empty - // EXAMPLE: 42% (12:15 Remaining) - return _('%d%% (%d\u2236%02d Remaining)').format( - level, - hours, - minutes - ); - } - } - - _onDestroy(actor) { - actor.device.action_group.disconnect(actor._actionAddedId); - actor.device.action_group.disconnect(actor._actionRemovedId); - actor.device.action_group.disconnect(actor._actionStateChangedId); - } - - _sync() { - this.visible = !!this._state; - - if (!this.visible) - return; - - this.icon.icon_name = this._state.icon_name; - this.label.text = (this._state.level > -1) ? `${this._state.level}%` : ''; - this.tooltip.text = this._getBatteryLabel(); - } -}); - - -/** - * A cell signal strength widget with two icons - */ -export const SignalStrength = GObject.registerClass({ - GTypeName: 'GSConnectShellDeviceSignalStrength', -}, class SignalStrength extends St.BoxLayout { - - _init(params) { - super._init({ - reactive: true, - style_class: 'gsconnect-device-signal-strength', - track_hover: true, - }); - Object.assign(this, params); - - // Network Type Icon - this.networkTypeIcon = new St.Icon({ - fallback_icon_name: 'network-cellular-symbolic', - icon_size: 16, - }); - this.add_child(this.networkTypeIcon); - - // Signal Strength Icon - this.signalStrengthIcon = new St.Icon({ - fallback_icon_name: 'network-cellular-offline-symbolic', - icon_size: 16, - }); - this.add_child(this.signalStrengthIcon); - - // Network Type Text - this.tooltip = new Tooltip({ - parent: this, - text: null, - }); - - // ConnectivityReport GAction - this._actionAddedId = this.device.action_group.connect( - 'action-added', - this._onActionChanged.bind(this) - ); - this._actionRemovedId = this.device.action_group.connect( - 'action-removed', - this._onActionChanged.bind(this) - ); - this._actionStateChangedId = this.device.action_group.connect( - 'action-state-changed', - this._onStateChanged.bind(this) - ); - - this._onActionChanged(this.device.action_group, 'connectivityReport'); - - // Cleanup on destroy - this.connect('destroy', this._onDestroy); - } - - _onActionChanged(action_group, action_name) { - if (action_name !== 'connectivityReport') - return; - - if (action_group.has_action('connectivityReport')) { - const value = action_group.get_action_state('connectivityReport'); - const [ - cellular_network_type, - cellular_network_type_icon, - cellular_network_strength, - cellular_network_strength_icon, - hotspot_name, - hotspot_bssid, - ] = value.deepUnpack(); - - this._state = { - cellular_network_type: cellular_network_type, - cellular_network_type_icon: cellular_network_type_icon, - cellular_network_strength: cellular_network_strength, - cellular_network_strength_icon: cellular_network_strength_icon, - hotspot_name: hotspot_name, - hotspot_bssid: hotspot_bssid, - }; - } else { - this._state = null; - } - - this._sync(); - } - - _onStateChanged(action_group, action_name, value) { - if (action_name !== 'connectivityReport') - return; - - const [ - cellular_network_type, - cellular_network_type_icon, - cellular_network_strength, - cellular_network_strength_icon, - hotspot_name, - hotspot_bssid, - ] = value.deepUnpack(); - - this._state = { - cellular_network_type: cellular_network_type, - cellular_network_type_icon: cellular_network_type_icon, - cellular_network_strength: cellular_network_strength, - cellular_network_strength_icon: cellular_network_strength_icon, - hotspot_name: hotspot_name, - hotspot_bssid: hotspot_bssid, - }; - - this._sync(); - } - - _onDestroy(actor) { - actor.device.action_group.disconnect(actor._actionAddedId); - actor.device.action_group.disconnect(actor._actionRemovedId); - actor.device.action_group.disconnect(actor._actionStateChangedId); - } - - _sync() { - this.visible = !!this._state; - - if (!this.visible) - return; - - this.networkTypeIcon.icon_name = this._state.cellular_network_type_icon; - this.signalStrengthIcon.icon_name = this._state.cellular_network_strength_icon; - this.tooltip.text = this._state.cellular_network_type; - } -}); - - -/** - * A PopupMenu used as an information and control center for a device - */ -export class Menu extends PopupMenu.PopupMenuSection { - - constructor(params) { - super(); - Object.assign(this, params); - - this.actor.add_style_class_name('gsconnect-device-menu'); - - // Title - this._title = new PopupMenu.PopupSeparatorMenuItem(this.device.name); - this.addMenuItem(this._title); - - // Title -> Name - this._title.label.style_class = 'gsconnect-device-name'; - this._title.label.clutter_text.ellipsize = 0; - this.device.bind_property( - 'name', - this._title.label, - 'text', - GObject.BindingFlags.SYNC_CREATE - ); - - // Title -> Cellular Signal Strength - this._signalStrength = new SignalStrength({device: this.device}); - this._title.actor.add_child(this._signalStrength); - - // Title -> Battery - this._battery = new Battery({device: this.device}); - this._title.actor.add_child(this._battery); - - // Actions - let actions; - - if (this.menu_type === 'icon') { - actions = new GMenu.IconBox({ - action_group: this.device.action_group, - model: this.device.menu, - }); - } else if (this.menu_type === 'list') { - actions = new GMenu.ListBox({ - action_group: this.device.action_group, - model: this.device.menu, - }); - } - - this.addMenuItem(actions); - } - - isEmpty() { - return false; - } -} - - -/** - * An indicator representing a Device in the Status Area - */ -export const Indicator = GObject.registerClass({ - GTypeName: 'GSConnectDeviceIndicator', -}, class Indicator extends PanelMenu.Button { - - _init(params) { - super._init(0.0, `${params.device.name} Indicator`, false); - Object.assign(this, params); - - // Device Icon - this._icon = new St.Icon({ - gicon: getIcon(this.device.icon_name), - style_class: 'system-status-icon gsconnect-device-indicator', - }); - this.add_child(this._icon); - - // Menu - const menu = new Menu({ - device: this.device, - menu_type: 'icon', - }); - this.menu.addMenuItem(menu); - } -}); - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/gmenu.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/gmenu.js deleted file mode 100644 index 62ae0f1a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/gmenu.js +++ /dev/null @@ -1,647 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Atk from 'gi://Atk'; -import Clutter from 'gi://Clutter'; -import Gio from 'gi://Gio'; -import GObject from 'gi://GObject'; -import St from 'gi://St'; - -import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js'; - -import {getIcon} from './utils.js'; - -import Tooltip from './tooltip.js'; - - -/** - * Get a dictionary of a GMenuItem's attributes - * - * @param {Gio.MenuModel} model - The menu model containing the item - * @param {number} index - The index of the item in @model - * @return {Object} A dictionary of the item's attributes - */ -function getItemInfo(model, index) { - const info = { - target: null, - links: [], - }; - - // - let iter = model.iterate_item_attributes(index); - - while (iter.next()) { - const name = iter.get_name(); - let value = iter.get_value(); - - switch (name) { - case 'icon': - value = Gio.Icon.deserialize(value); - - if (value instanceof Gio.ThemedIcon) - value = getIcon(value.names[0]); - - info[name] = value; - break; - - case 'target': - info[name] = value; - break; - - default: - info[name] = value.unpack(); - } - } - - // Submenus & Sections - iter = model.iterate_item_links(index); - - while (iter.next()) { - info.links.push({ - name: iter.get_name(), - value: iter.get_value(), - }); - } - - return info; -} - - -/** - * - */ -export class ListBox extends PopupMenu.PopupMenuSection { - - constructor(params) { - super(); - Object.assign(this, params); - - // Main Actor - this.actor = new St.BoxLayout({ - x_expand: true, - clip_to_allocation: true, - }); - this.actor._delegate = this; - - // Item Box - this.box.clip_to_allocation = true; - this.box.x_expand = true; - this.box.add_style_class_name('gsconnect-list-box'); - this.box.set_pivot_point(1, 1); - this.actor.add_child(this.box); - - // Submenu Container - this.sub = new St.BoxLayout({ - clip_to_allocation: true, - vertical: false, - visible: false, - x_expand: true, - }); - this.sub.set_pivot_point(1, 1); - this.sub._delegate = this; - this.actor.add_child(this.sub); - - // Handle transitions - this._boxTransitionsCompletedId = this.box.connect( - 'transitions-completed', - this._onTransitionsCompleted.bind(this) - ); - - this._subTransitionsCompletedId = this.sub.connect( - 'transitions-completed', - this._onTransitionsCompleted.bind(this) - ); - - // Handle keyboard navigation - this._submenuCloseKeyId = this.sub.connect( - 'key-press-event', - this._onSubmenuCloseKey.bind(this) - ); - - // Refresh the menu when mapped - this._mappedId = this.actor.connect( - 'notify::mapped', - this._onMapped.bind(this) - ); - - // Watch the model for changes - this._itemsChangedId = this.model.connect( - 'items-changed', - this._onItemsChanged.bind(this) - ); - this._onItemsChanged(); - } - - _onMapped(actor) { - if (actor.mapped) { - this._onItemsChanged(); - - // We use this instead of close() to avoid touching finalized objects - } else { - this.box.set_opacity(255); - this.box.set_width(-1); - this.box.set_height(-1); - this.box.visible = true; - - this._submenu = null; - this.sub.set_opacity(0); - this.sub.set_width(0); - this.sub.set_height(0); - this.sub.visible = false; - this.sub.get_children().map(menu => menu.hide()); - } - } - - _onSubmenuCloseKey(actor, event) { - if (this.submenu && event.get_key_symbol() === Clutter.KEY_Left) { - this.submenu.submenu_for.setActive(true); - this.submenu = null; - return Clutter.EVENT_STOP; - } - - return Clutter.EVENT_PROPAGATE; - } - - _onSubmenuOpenKey(actor, event) { - const item = actor._delegate; - - if (item.submenu && event.get_key_symbol() === Clutter.KEY_Right) { - this.submenu = item.submenu; - item.submenu.firstMenuItem.setActive(true); - } - - return Clutter.EVENT_PROPAGATE; - } - - _onGMenuItemActivate(item, event) { - this.emit('activate', item); - - if (item.submenu) { - this.submenu = item.submenu; - } else if (item.action_name) { - this.action_group.activate_action( - item.action_name, - item.action_target - ); - this.itemActivated(); - } - } - - _addGMenuItem(info) { - const item = new PopupMenu.PopupMenuItem(info.label); - this.addMenuItem(item); - - if (info.action !== undefined) { - item.action_name = info.action.split('.')[1]; - item.action_target = info.target; - - item.actor.visible = this.action_group.get_action_enabled( - item.action_name - ); - } - - item.connectObject( - 'activate', - this._onGMenuItemActivate.bind(this), - this - ); - - return item; - } - - _addGMenuSection(model) { - const section = new ListBox({ - model: model, - action_group: this.action_group, - }); - this.addMenuItem(section); - } - - _addGMenuSubmenu(model, item) { - // Add an expander arrow to the item - const arrow = PopupMenu.arrowIcon(St.Side.RIGHT); - arrow.x_align = Clutter.ActorAlign.END; - arrow.x_expand = true; - item.actor.add_child(arrow); - - // Mark it as an expandable and open on right-arrow - item.actor.add_accessible_state(Atk.StateType.EXPANDABLE); - - item.actor.connect( - 'key-press-event', - this._onSubmenuOpenKey.bind(this) - ); - - // Create the submenu - item.submenu = new ListBox({ - model: model, - action_group: this.action_group, - submenu_for: item, - _parent: this, - }); - item.submenu.actor.hide(); - - // Add to the submenu container - this.sub.add_child(item.submenu.actor); - } - - _onItemsChanged(model, position, removed, added) { - // Clear the menu - this.removeAll(); - this.sub.get_children().map(child => child.destroy()); - - for (let i = 0, len = this.model.get_n_items(); i < len; i++) { - const info = getItemInfo(this.model, i); - let item; - - // A regular item - if (info.hasOwnProperty('label')) - item = this._addGMenuItem(info); - - for (const link of info.links) { - // Submenu - if (link.name === 'submenu') { - this._addGMenuSubmenu(link.value, item); - - // Section - } else if (link.name === 'section') { - this._addGMenuSection(link.value); - - // len is length starting at 1 - if (i + 1 < len) - this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); - } - } - } - - // If this is a submenu of another item... - if (this.submenu_for) { - // Prepend an "<= Go Back" item, bold with a unicode arrow - const prev = new PopupMenu.PopupMenuItem(this.submenu_for.label.text); - prev.label.style = 'font-weight: bold;'; - const prevArrow = PopupMenu.arrowIcon(St.Side.LEFT); - prev.replace_child(prev._ornamentIcon, prevArrow); - this.addMenuItem(prev, 0); - - prev.connectObject('activate', (item, event) => { - this.emit('activate', item); - this._parent.submenu = null; - }, this); - } - } - - _onTransitionsCompleted(actor) { - if (this.submenu) { - this.box.visible = false; - } else { - this.sub.visible = false; - this.sub.get_children().map(menu => menu.hide()); - } - } - - get submenu() { - return this._submenu || null; - } - - set submenu(submenu) { - // Get the current allocation to hold the menu width - const allocation = this.actor.allocation; - const width = Math.max(0, allocation.x2 - allocation.x1); - - // Prepare the appropriate child for tweening - if (submenu) { - this.sub.set_opacity(0); - this.sub.set_width(0); - this.sub.set_height(0); - this.sub.visible = true; - } else { - this.box.set_opacity(0); - this.box.set_width(0); - this.sub.set_height(0); - this.box.visible = true; - } - - // Setup the animation - this.box.save_easing_state(); - this.box.set_easing_mode(Clutter.AnimationMode.EASE_IN_OUT_CUBIC); - this.box.set_easing_duration(250); - - this.sub.save_easing_state(); - this.sub.set_easing_mode(Clutter.AnimationMode.EASE_IN_OUT_CUBIC); - this.sub.set_easing_duration(250); - - if (submenu) { - submenu.actor.show(); - - this.sub.set_opacity(255); - this.sub.set_width(width); - this.sub.set_height(-1); - - this.box.set_opacity(0); - this.box.set_width(0); - this.box.set_height(0); - } else { - this.box.set_opacity(255); - this.box.set_width(width); - this.box.set_height(-1); - - this.sub.set_opacity(0); - this.sub.set_width(0); - this.sub.set_height(0); - } - - // Reset the animation - this.box.restore_easing_state(); - this.sub.restore_easing_state(); - - // - this._submenu = submenu; - } - - destroy() { - this.actor.disconnect(this._mappedId); - this.box.disconnect(this._boxTransitionsCompletedId); - this.sub.disconnect(this._subTransitionsCompletedId); - this.sub.disconnect(this._submenuCloseKeyId); - this.model.disconnect(this._itemsChangedId); - - super.destroy(); - } -} - - -/** - * A St.Button subclass for iconic GMenu items - */ -export const IconButton = GObject.registerClass({ - GTypeName: 'GSConnectShellIconButton', -}, class Button extends St.Button { - - _init(params) { - super._init({ - style_class: 'gsconnect-icon-button', - can_focus: true, - }); - Object.assign(this, params); - - // Item attributes - if (params.info.hasOwnProperty('action')) - this.action_name = params.info.action.split('.')[1]; - - if (params.info.hasOwnProperty('target')) - this.action_target = params.info.target; - - if (params.info.hasOwnProperty('label')) { - this.tooltip = new Tooltip({ - parent: this, - markup: params.info.label, - }); - - this.accessible_name = params.info.label; - } - - if (params.info.hasOwnProperty('icon')) - this.child = new St.Icon({gicon: params.info.icon}); - - // Submenu - for (const link of params.info.links) { - if (link.name === 'submenu') { - this.add_accessible_state(Atk.StateType.EXPANDABLE); - this.toggle_mode = true; - this.connect('notify::checked', this._onChecked); - - this.submenu = new ListBox({ - model: link.value, - action_group: this.action_group, - _parent: this._parent, - }); - - this.submenu.actor.style_class = 'popup-sub-menu'; - this.submenu.actor.visible = false; - } - } - } - - // This is (reliably?) emitted before ::clicked - _onChecked(button) { - if (button.checked) { - button.add_accessible_state(Atk.StateType.EXPANDED); - button.add_style_pseudo_class('active'); - } else { - button.remove_accessible_state(Atk.StateType.EXPANDED); - button.remove_style_pseudo_class('active'); - } - } - - // This is (reliably?) emitted after notify::checked - vfunc_clicked(clicked_button) { - // Unless this has a submenu, activate the action and close the menu - if (!this.toggle_mode) { - this._parent._getTopMenu().close(); - - this.action_group.activate_action( - this.action_name, - this.action_target - ); - - // StButton.checked has already been toggled so we're opening - } else if (this.checked) { - this._parent.submenu = this.submenu; - - // If this is the active submenu being closed, animate-close it - } else if (this._parent.submenu === this.submenu) { - this._parent.submenu = null; - } - } -}); - - -export class IconBox extends PopupMenu.PopupMenuSection { - - constructor(params) { - super(); - Object.assign(this, params); - - // Main Actor - this.actor = new St.BoxLayout({ - vertical: true, - x_expand: true, - }); - this.actor._delegate = this; - - // Button Box - this.box._delegate = this; - this.box.style_class = 'gsconnect-icon-box'; - this.box.vertical = false; - this.actor.add_child(this.box); - - // Submenu Container - this.sub = new St.BoxLayout({ - clip_to_allocation: true, - vertical: true, - x_expand: true, - }); - this.sub.connect('transitions-completed', this._onTransitionsCompleted); - this.sub._delegate = this; - this.actor.add_child(this.sub); - - // Track menu items so we can use ::items-changed - this._menu_items = new Map(); - - // PopupMenu - this._mappedId = this.actor.connect( - 'notify::mapped', - this._onMapped.bind(this) - ); - - // GMenu - this._itemsChangedId = this.model.connect( - 'items-changed', - this._onItemsChanged.bind(this) - ); - - // GActions - this._actionAddedId = this.action_group.connect( - 'action-added', - this._onActionChanged.bind(this) - ); - this._actionEnabledChangedId = this.action_group.connect( - 'action-enabled-changed', - this._onActionChanged.bind(this) - ); - this._actionRemovedId = this.action_group.connect( - 'action-removed', - this._onActionChanged.bind(this) - ); - } - - destroy() { - this.actor.disconnect(this._mappedId); - this.model.disconnect(this._itemsChangedId); - this.action_group.disconnect(this._actionAddedId); - this.action_group.disconnect(this._actionEnabledChangedId); - this.action_group.disconnect(this._actionRemovedId); - - super.destroy(); - } - - get submenu() { - return this._submenu || null; - } - - set submenu(submenu) { - if (submenu) { - for (const button of this.box.get_children()) { - if (button.submenu && this._submenu && button.submenu !== submenu) { - button.checked = false; - button.submenu.actor.hide(); - } - } - - this.sub.set_height(0); - submenu.actor.show(); - } - - this.sub.save_easing_state(); - this.sub.set_easing_duration(250); - this.sub.set_easing_mode(Clutter.AnimationMode.EASE_IN_OUT_CUBIC); - - this.sub.set_height(submenu ? submenu.actor.get_preferred_size()[1] : 0); - this.sub.restore_easing_state(); - - this._submenu = submenu; - } - - _onMapped(actor) { - if (!actor.mapped) { - this._submenu = null; - - for (const button of this.box.get_children()) - button.checked = false; - - for (const submenu of this.sub.get_children()) - submenu.hide(); - } - } - - _onActionChanged(group, name, enabled) { - const menuItem = this._menu_items.get(name); - - if (menuItem !== undefined) - menuItem.visible = group.get_action_enabled(name); - } - - _onItemsChanged(model, position, removed, added) { - // Remove items - while (removed > 0) { - const button = this.box.get_child_at_index(position); - const action_name = button.action_name; - - if (button.submenu) - button.submenu.destroy(); - - button.destroy(); - - this._menu_items.delete(action_name); - removed--; - } - - // Add items - for (let i = 0; i < added; i++) { - const index = position + i; - - // Create an iconic button - const button = new IconButton({ - action_group: this.action_group, - info: getItemInfo(model, index), - // NOTE: Because this doesn't derive from a PopupMenu class - // it lacks some things its parent will expect from it - _parent: this, - _delegate: null, - }); - - // Set the visibility based on the enabled state - if (button.action_name !== undefined) { - button.visible = this.action_group.get_action_enabled( - button.action_name - ); - } - - // If it has a submenu, add it as a sibling - if (button.submenu) - this.sub.add_child(button.submenu.actor); - - // Track the item if it has an action - if (button.action_name !== undefined) - this._menu_items.set(button.action_name, button); - - // Insert it in the box at the defined position - this.box.insert_child_at_index(button, index); - } - } - - _onTransitionsCompleted(actor) { - const menu = actor._delegate; - - for (const button of menu.box.get_children()) { - if (button.submenu && button.submenu !== menu.submenu) { - button.checked = false; - button.submenu.actor.hide(); - } - } - - menu.sub.set_height(-1); - } - - // PopupMenu.PopupMenuBase overrides - isEmpty() { - return (this.box.get_children().length === 0); - } - - _setParent(parent) { - super._setParent(parent); - this._onItemsChanged(this.model, 0, 0, this.model.get_n_items()); - } -} - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/input.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/input.js deleted file mode 100644 index b2ef07e2..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/input.js +++ /dev/null @@ -1,38 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; - -import Config from '../config.js'; - -export class LockscreenRemoteAccess { - - constructor() { - this._inhibitor = null; - this._settings = new Gio.Settings({ - settings_schema: Config.GSCHEMA.lookup( - 'org.gnome.Shell.Extensions.GSConnect', - null - ), - path: '/org/gnome/shell/extensions/gsconnect/', - }); - } - - patchInhibitor() { - if (this._inhibitor) - return; - - if (this._settings.get_boolean('keep-alive-when-locked')) { - this._inhibitor = global.backend.get_remote_access_controller().inhibit_remote_access; - global.backend.get_remote_access_controller().inhibit_remote_access = () => {}; - } - } - - unpatchInhibitor() { - if (!this._inhibitor) - return; - global.backend.get_remote_access_controller().inhibit_remote_access = this._inhibitor; - this._inhibitor = null; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/keybindings.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/keybindings.js deleted file mode 100644 index 442fa0df..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/keybindings.js +++ /dev/null @@ -1,103 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import Meta from 'gi://Meta'; -import Shell from 'gi://Shell'; - - -/** - * Keybindings.Manager is a simple convenience class for managing keyboard - * shortcuts in GNOME Shell. You bind a shortcut using add(), which on success - * will return a non-zero action id that can later be used with remove() to - * unbind the shortcut. - * - * Accelerators are accepted in the form returned by Gtk.accelerator_name() and - * callbacks are invoked directly, so should be complete closures. - * - * References: - * https://developer.gnome.org/gtk3/stable/gtk3-Keyboard-Accelerators.html - * https://developer.gnome.org/meta/stable/MetaDisplay.html - * https://developer.gnome.org/meta/stable/meta-MetaKeybinding.html - * https://gitlab.gnome.org/GNOME/gnome-shell/blob/master/js/ui/windowManager.js#L1093-1112 - */ -export class Manager { - - constructor() { - this._keybindings = new Map(); - - this._acceleratorActivatedId = global.display.connect( - 'accelerator-activated', - this._onAcceleratorActivated.bind(this) - ); - } - - _onAcceleratorActivated(display, action, inputDevice, timestamp) { - try { - const binding = this._keybindings.get(action); - - if (binding !== undefined) - binding.callback(); - } catch (e) { - logError(e); - } - } - - /** - * Add a keybinding with callback - * - * @param {string} accelerator - An accelerator in the form '<Control>q' - * @param {Function} callback - A callback for the accelerator - * @return {number} A non-zero action id on success, or 0 on failure - */ - add(accelerator, callback) { - try { - const action = global.display.grab_accelerator(accelerator, 0); - - if (action === Meta.KeyBindingAction.NONE) - throw new Error(`Failed to add keybinding: '${accelerator}'`); - - const name = Meta.external_binding_name_for_action(action); - Main.wm.allowKeybinding(name, Shell.ActionMode.ALL); - this._keybindings.set(action, {name: name, callback: callback}); - - return action; - } catch (e) { - logError(e); - } - } - - /** - * Remove a keybinding - * - * @param {number} action - A non-zero action id returned by add() - */ - remove(action) { - try { - const binding = this._keybindings.get(action); - global.display.ungrab_accelerator(action); - Main.wm.allowKeybinding(binding.name, Shell.ActionMode.NONE); - this._keybindings.delete(action); - } catch (e) { - logError(new Error(`Failed to remove keybinding: ${e.message}`)); - } - } - - /** - * Remove all keybindings - */ - removeAll() { - for (const action of this._keybindings.keys()) - this.remove(action); - } - - /** - * Destroy the keybinding manager and remove all keybindings - */ - destroy() { - global.display.disconnect(this._acceleratorActivatedId); - this.removeAll(); - } -} - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/notification.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/notification.js deleted file mode 100644 index 78b7f54b..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/notification.js +++ /dev/null @@ -1,453 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import St from 'gi://St'; - -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import * as MessageTray from 'resource:///org/gnome/shell/ui/messageTray.js'; -import * as Calendar from 'resource:///org/gnome/shell/ui/calendar.js'; -import * as NotificationDaemon from 'resource:///org/gnome/shell/ui/notificationDaemon.js'; - -import {gettext as _} from 'resource:///org/gnome/shell/extensions/extension.js'; -import {getIcon} from './utils.js'; - -const APP_ID = 'org.gnome.Shell.Extensions.GSConnect'; -const APP_PATH = '/org/gnome/Shell/Extensions/GSConnect'; - - -// deviceId Pattern (<device-id>|<remote-id>) -const DEVICE_REGEX = new RegExp(/^([^|]+)\|([\s\S]+)$/); - -// requestReplyId Pattern (<device-id>|<remote-id>)|<reply-id>) -const REPLY_REGEX = new RegExp(/^([^|]+)\|([\s\S]+)\|([0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})$/, 'i'); - - -/** - * Extracted from notificationDaemon.js, as it's no longer exported - * https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/notificationDaemon.js#L556 - * @returns {{ 'desktop-startup-id': string }} Object with ID containing current time - */ -function getPlatformData() { - const startupId = GLib.Variant.new('s', `_TIME${global.get_current_time()}`); - return {'desktop-startup-id': startupId}; -} - -// This is no longer directly exported, so we do this instead for now -const GtkNotificationDaemon = Main.notificationDaemon._gtkNotificationDaemon.constructor; - - -/** - * A slightly modified Notification Banner with an entry field - */ -const NotificationBanner = GObject.registerClass({ - GTypeName: 'GSConnectNotificationBanner', -}, class NotificationBanner extends Calendar.NotificationMessage { - - constructor(notification) { - super(notification); - if (notification.requestReplyId !== undefined) - this._addReplyAction(); - } - - _addReplyAction() { - if (!this._buttonBox) { - this._buttonBox = new St.BoxLayout({ - style_class: 'notification-buttons-bin', - x_expand: true, - }); - this.setActionArea(this._buttonBox); - global.focus_manager.add_group(this._buttonBox); - } - - // Reply Button - const button = new St.Button({ - style_class: 'notification-button', - label: _('Reply'), - x_expand: true, - can_focus: true, - }); - - button.connect( - 'clicked', - this._onEntryRequested.bind(this) - ); - - this._buttonBox.add_child(button); - - // Reply Entry - this._replyEntry = new St.Entry({ - can_focus: true, - hint_text: _('Type a message'), - style_class: 'chat-response', - x_expand: true, - visible: false, - }); - - this._buttonBox.add_child(this._replyEntry); - } - - _onEntryRequested(button) { - this.focused = true; - - for (const child of this._buttonBox.get_children()) - child.visible = (child === this._replyEntry); - - // Release the notification focus with the entry focus - this._replyEntry.connect( - 'key-focus-out', - this._onEntryDismissed.bind(this) - ); - - this._replyEntry.clutter_text.connect( - 'activate', - this._onEntryActivated.bind(this) - ); - - this._replyEntry.grab_key_focus(); - } - - _onEntryDismissed(entry) { - this.focused = false; - this.emit('unfocused'); - } - - _onEntryActivated(clutter_text) { - // Refuse to send empty replies - if (clutter_text.text === '') - return; - - // Copy the text, then clear the entry - const text = clutter_text.text; - clutter_text.text = ''; - - const {deviceId, requestReplyId} = this.notification; - - const target = new GLib.Variant('(ssbv)', [ - deviceId, - 'replyNotification', - true, - new GLib.Variant('(ssa{ss})', [requestReplyId, text, {}]), - ]); - const platformData = getPlatformData(); - - Gio.DBus.session.call( - APP_ID, - APP_PATH, - 'org.freedesktop.Application', - 'ActivateAction', - GLib.Variant.new('(sava{sv})', ['device', [target], platformData]), - null, - Gio.DBusCallFlags.NO_AUTO_START, - -1, - null, - (connection, res) => { - try { - connection.call_finish(res); - } catch (e) { - // Silence errors - } - } - ); - - this.close(); - } -}); - - -/** - * A custom notification source for spawning notifications and closing device - * notifications. This source isn't actually used, but it's methods are patched - * into existing sources. - */ -const Source = GObject.registerClass({ - GTypeName: 'GSConnectNotificationSource', -}, class Source extends NotificationDaemon.GtkNotificationDaemonAppSource { - - _closeGSConnectNotification(notification, reason) { - if (reason !== MessageTray.NotificationDestroyedReason.DISMISSED) - return; - - // Avoid sending the request multiple times - if (notification._remoteClosed || notification.remoteId === undefined) - return; - - notification._remoteClosed = true; - - const target = new GLib.Variant('(ssbv)', [ - notification.deviceId, - 'closeNotification', - true, - new GLib.Variant('s', notification.remoteId), - ]); - const platformData = getPlatformData(); - - Gio.DBus.session.call( - APP_ID, - APP_PATH, - 'org.freedesktop.Application', - 'ActivateAction', - GLib.Variant.new('(sava{sv})', ['device', [target], platformData]), - null, - Gio.DBusCallFlags.NO_AUTO_START, - -1, - null, - (connection, res) => { - try { - connection.call_finish(res); - } catch (e) { - // If we fail, reset in case we can try again - notification._remoteClosed = false; - } - } - ); - } - - /* - * Parse the id to determine if it's a repliable notification, device - * notification or a regular local notification - */ - _parseNotificationId(notificationId) { - let idMatch, deviceId, requestReplyId, remoteId, localId; - - if ((idMatch = REPLY_REGEX.exec(notificationId))) { - [, deviceId, remoteId, requestReplyId] = idMatch; - localId = `${deviceId}|${remoteId}`; - - } else if ((idMatch = DEVICE_REGEX.exec(notificationId))) { - [, deviceId, remoteId] = idMatch; - localId = `${deviceId}|${remoteId}`; - - } else { - localId = notificationId; - } - return [idMatch, deviceId, requestReplyId, remoteId, localId]; - } - - /* - * Add notification to source or update existing notification with extra - * GsConnect information - */ - _createNotification(notification) { - const [idMatch, deviceId, requestReplyId, remoteId, localId] = this._parseNotificationId(notification.id); - const cachedNotification = this._notifications[localId]; - - // Check if this is a repeat - if (cachedNotification) { - cachedNotification.requestReplyId = requestReplyId; - - // Bail early If @notificationParams represents an exact repeat - const title = notification.title; - const body = notification.body - ? notification.body - : null; - - if (cachedNotification.title === title && - cachedNotification.body === body) - return cachedNotification; - - cachedNotification.title = title; - cachedNotification.body = body; - - return cachedNotification; - } - - // Device Notification - if (idMatch) { - notification.deviceId = deviceId; - notification.remoteId = remoteId; - notification.requestReplyId = requestReplyId; - - notification.connect('destroy', (notification, reason) => { - this._closeGSConnectNotification(notification, reason); - delete this._notifications[localId]; - }); - - // Service Notification - } else { - notification.connect('destroy', (notification, reason) => { - delete this._notifications[localId]; - }); - } - - this._notifications[localId] = notification; - return notification; - } - - /* - * Override to control notification spawning - */ - addNotification(notification) { - this._notificationPending = true; - - // Fix themed icons - if (notification.icon) { - let gicon = notification.icon; - - if (gicon instanceof Gio.ThemedIcon) { - gicon = getIcon(gicon.names[0]); - notification.icon = gicon.serialize(); - } - } - - const createdNotification = this._createNotification(notification); - this._addNotificationToMessageTray(createdNotification); - - this._notificationPending = false; - } - - /* - * Reimplementation of MessageTray.addNotification to raise the usual - * notification limit (3) - */ - _addNotificationToMessageTray(notification) { - if (this.notifications.includes(notification)) { - notification.acknowledged = false; - return; - } - - while (this.notifications.length >= 10) { - const [oldest] = this.notifications; - oldest.destroy(MessageTray.NotificationDestroyedReason.EXPIRED); - } - - notification.connect('destroy', this._onNotificationDestroy.bind(this)); - notification.connect('notify::acknowledged', () => { - this.countUpdated(); - - // If acknowledged was set to false try to show the notification again - if (!notification.acknowledged) - this.emit('notification-request-banner', notification); - }); - this.notifications.push(notification); - - this.emit('notification-added', notification); - this.emit('notification-request-banner', notification); - } - - createBanner(notification) { - return new NotificationBanner(notification); - } -}); - - -/** - * If there is an active GtkNotificationDaemonAppSource for GSConnect when the - * extension is loaded, it has to be patched in place. - */ -export function patchGSConnectNotificationSource() { - const source = Main.notificationDaemon._gtkNotificationDaemon._sources[APP_ID]; - - if (source !== undefined) { - // Patch in the subclassed methods - source._closeGSConnectNotification = Source.prototype._closeGSConnectNotification; - source._parseNotificationId = Source.prototype._parseNotificationId; - source._createNotification = Source.prototype._createNotification; - source.addNotification = Source.prototype.addNotification; - source._addNotificationToMessageTray = Source.prototype._addNotificationToMessageTray; - source.createBanner = Source.prototype.createBanner; - - // Connect to existing notifications - for (const notification of Object.values(source._notifications)) { - - const _id = notification.connect('destroy', (notification, reason) => { - source._closeGSConnectNotification(notification, reason); - notification.disconnect(_id); - }); - } - } -} - - -/** - * Wrap GtkNotificationDaemon._ensureAppSource() to patch GSConnect's app source - * https://gitlab.gnome.org/GNOME/gnome-shell/blob/master/js/ui/notificationDaemon.js#L742-755 - */ -const __ensureAppSource = GtkNotificationDaemon.prototype._ensureAppSource; - -// eslint-disable-next-line func-style -const _ensureAppSource = function (appId) { - const source = __ensureAppSource.call(this, appId); - - if (source._appId === APP_ID) { - source._closeGSConnectNotification = Source.prototype._closeGSConnectNotification; - source._parseNotificationId = Source.prototype._parseNotificationId; - source._createNotification = Source.prototype._createNotification; - source.addNotification = Source.prototype.addNotification; - source._addNotificationToMessageTray = Source.prototype._addNotificationToMessageTray; - source.createBanner = Source.prototype.createBanner; - } - - return source; -}; - - -export function patchGtkNotificationDaemon() { - GtkNotificationDaemon.prototype._ensureAppSource = _ensureAppSource; -} - - -export function unpatchGtkNotificationDaemon() { - GtkNotificationDaemon.prototype._ensureAppSource = __ensureAppSource; -} - -/** - * We patch other Gtk notification sources so we can notify remote devices when - * notifications have been closed locally. - */ -const _addNotification = NotificationDaemon.GtkNotificationDaemonAppSource.prototype.addNotification; - -export function patchGtkNotificationSources() { - // eslint-disable-next-line func-style - const _withdrawGSConnectNotification = function (id, notification, reason) { - if (reason !== MessageTray.NotificationDestroyedReason.DISMISSED) - return; - - // Avoid sending the request multiple times - if (notification._remoteWithdrawn) - return; - - notification._remoteWithdrawn = true; - - // Recreate the notification id as it would've been sent - const target = new GLib.Variant('(ssbv)', [ - '*', - 'withdrawNotification', - true, - new GLib.Variant('s', `gtk|${this._appId}|${id}`), - ]); - const platformData = getPlatformData(); - - Gio.DBus.session.call( - APP_ID, - APP_PATH, - 'org.freedesktop.Application', - 'ActivateAction', - GLib.Variant.new('(sava{sv})', ['device', [target], platformData]), - null, - Gio.DBusCallFlags.NO_AUTO_START, - -1, - null, - (connection, res) => { - try { - connection.call_finish(res); - } catch (e) { - // If we fail, reset in case we can try again - notification._remoteWithdrawn = false; - } - } - ); - }; - - NotificationDaemon.GtkNotificationDaemonAppSource.prototype._withdrawGSConnectNotification = _withdrawGSConnectNotification; -} - - -export function unpatchGtkNotificationSources() { - NotificationDaemon.GtkNotificationDaemonAppSource.prototype.addNotification = _addNotification; - delete NotificationDaemon.GtkNotificationDaemonAppSource.prototype._withdrawGSConnectNotification; -} - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/tooltip.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/tooltip.js deleted file mode 100644 index 2996ce8e..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/tooltip.js +++ /dev/null @@ -1,309 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Clutter from 'gi://Clutter'; -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import Pango from 'gi://Pango'; -import St from 'gi://St'; - -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; - - -/** - * An StTooltip for ClutterActors - * - * Adapted from: https://github.com/RaphaelRochet/applications-overview-tooltip - * See also: https://github.com/GNOME/gtk/blob/master/gtk/gtktooltip.c - */ -export let TOOLTIP_BROWSE_ID = 0; -export let TOOLTIP_BROWSE_MODE = false; - -export default class Tooltip { - - constructor(params) { - Object.assign(this, params); - - this._bin = null; - this._hoverTimeoutId = 0; - this._showing = false; - - this._destroyId = this.parent.connect( - 'destroy', - this.destroy.bind(this) - ); - - this._hoverId = this.parent.connect( - 'notify::hover', - this._onHover.bind(this) - ); - - this._buttonPressEventId = this.parent.connect( - 'button-press-event', - this._hide.bind(this) - ); - } - - get custom() { - if (this._custom === undefined) - this._custom = null; - - return this._custom; - } - - set custom(actor) { - this._custom = actor; - this._markup = null; - this._text = null; - - if (this._showing) - this._show(); - } - - get gicon() { - if (this._gicon === undefined) - this._gicon = null; - - return this._gicon; - } - - set gicon(gicon) { - this._gicon = gicon; - - if (this._showing) - this._show(); - } - - get icon() { - return (this.gicon) ? this.gicon.name : null; - } - - set icon(icon_name) { - if (!icon_name) - this.gicon = null; - else - this.gicon = new Gio.ThemedIcon({name: icon_name}); - } - - get markup() { - if (this._markup === undefined) - this._markup = null; - - return this._markup; - } - - set markup(text) { - this._markup = text; - this._text = null; - - if (this._showing) - this._show(); - } - - get text() { - if (this._text === undefined) - this._text = null; - - return this._text; - } - - set text(text) { - this._markup = null; - this._text = text; - - if (this._showing) - this._show(); - } - - get x_offset() { - if (this._x_offset === undefined) - this._x_offset = 0; - - return this._x_offset; - } - - set x_offset(offset) { - this._x_offset = (Number.isInteger(offset)) ? offset : 0; - } - - get y_offset() { - if (this._y_offset === undefined) - this._y_offset = 0; - - return this._y_offset; - } - - set y_offset(offset) { - this._y_offset = (Number.isInteger(offset)) ? offset : 0; - } - - _show() { - if (this.text === null && this.markup === null) - return this._hide(); - - if (this._bin === null) { - this._bin = new St.Bin({ - style_class: 'osd-window gsconnect-tooltip', - opacity: 232, - }); - - if (this.custom) { - this._bin.child = this.custom; - } else { - this._bin.child = new St.BoxLayout({vertical: false}); - - if (this.gicon) { - this._bin.child.icon = new St.Icon({ - gicon: this.gicon, - y_align: St.Align.START, - }); - this._bin.child.icon.set_y_align(Clutter.ActorAlign.START); - this._bin.child.add_child(this._bin.child.icon); - } - - this.label = new St.Label({text: this.markup || this.text}); - this.label.clutter_text.line_wrap = true; - this.label.clutter_text.line_wrap_mode = Pango.WrapMode.WORD; - this.label.clutter_text.ellipsize = Pango.EllipsizeMode.NONE; - this.label.clutter_text.use_markup = (this.markup); - this._bin.child.add_child(this.label); - } - - Main.layoutManager.uiGroup.add_child(this._bin); - Main.layoutManager.uiGroup.set_child_above_sibling(this._bin, null); - } else if (this.custom) { - this._bin.child = this.custom; - } else { - if (this._bin.child.icon) - this._bin.child.icon.destroy(); - - if (this.gicon) { - this._bin.child.icon = new St.Icon({gicon: this.gicon}); - this._bin.child.insert_child_at_index(this._bin.child.icon, 0); - } - - this.label.clutter_text.text = this.markup || this.text; - this.label.clutter_text.use_markup = (this.markup); - } - - // Position tooltip - let [x, y] = this.parent.get_transformed_position(); - x = (x + (this.parent.width / 2)) - Math.round(this._bin.width / 2); - - x += this.x_offset; - y += this.y_offset; - - // Show tooltip - if (this._showing) { - this._bin.ease({ - x: x, - y: y, - time: 0.15, - transition: Clutter.AnimationMode.EASE_OUT_QUAD, - }); - } else { - this._bin.set_position(x, y); - this._bin.ease({ - opacity: 232, - time: 0.15, - transition: Clutter.AnimationMode.EASE_OUT_QUAD, - }); - - this._showing = true; - } - - // Enable browse mode - TOOLTIP_BROWSE_MODE = true; - - if (TOOLTIP_BROWSE_ID) { - GLib.source_remove(TOOLTIP_BROWSE_ID); - TOOLTIP_BROWSE_ID = 0; - } - - if (this._hoverTimeoutId) { - GLib.source_remove(this._hoverTimeoutId); - this._hoverTimeoutId = 0; - } - } - - _hide() { - if (this._bin) { - this._bin.ease({ - opacity: 0, - time: 0.10, - transition: Clutter.AnimationMode.EASE_OUT_QUAD, - onComplete: () => { - Main.layoutManager.uiGroup.remove_actor(this._bin); - - if (this.custom) - this._bin.remove_child(this.custom); - - this._bin.destroy(); - this._bin = null; - }, - }); - } - - TOOLTIP_BROWSE_ID = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 500, () => { - TOOLTIP_BROWSE_MODE = false; - TOOLTIP_BROWSE_ID = 0; - return false; - }); - - if (this._hoverTimeoutId) { - GLib.source_remove(this._hoverTimeoutId); - this._hoverTimeoutId = 0; - } - - this._showing = false; - this._hoverTimeoutId = 0; - } - - _onHover() { - if (this.parent.hover) { - if (!this._hoverTimeoutId) { - if (this._showing) { - this._show(); - } else { - this._hoverTimeoutId = GLib.timeout_add( - GLib.PRIORITY_DEFAULT, - (TOOLTIP_BROWSE_MODE) ? 60 : 500, - () => { - this._show(); - this._hoverTimeoutId = 0; - return false; - } - ); - } - } - } else { - this._hide(); - } - } - - destroy() { - this.parent.disconnect(this._destroyId); - this.parent.disconnect(this._hoverId); - this.parent.disconnect(this._buttonPressEventId); - - if (this.custom) - this.custom.destroy(); - - if (this._bin) { - Main.layoutManager.uiGroup.remove_actor(this._bin); - this._bin.destroy(); - } - - if (TOOLTIP_BROWSE_ID) { - GLib.source_remove(TOOLTIP_BROWSE_ID); - TOOLTIP_BROWSE_ID = 0; - } - - if (this._hoverTimeoutId) { - GLib.source_remove(this._hoverTimeoutId); - this._hoverTimeoutId = 0; - } - } -} - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/utils.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/utils.js deleted file mode 100644 index beea4624..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/shell/utils.js +++ /dev/null @@ -1,283 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import Gtk from 'gi://Gtk'; - -import Config from '../config.js'; - -let St = null; // St is not available for prefs.js importing this file. -try { - St = (await import('gi://St')).default; -} catch (e) { } - - -/** - * Get a themed icon, using fallbacks from GSConnect's GResource when necessary. - * - * @param {string} name - A themed icon name - * @return {Gio.Icon} A themed icon - */ -export function getIcon(name) { - if (getIcon._resource === undefined) { - // Setup the desktop icons - const settings = St.Settings.get(); - getIcon._desktop = new Gtk.IconTheme(); - getIcon._desktop.set_theme_name(settings.gtk_icon_theme); - settings.connect('notify::gtk-icon-theme', (settings_, key_) => { - getIcon._desktop.set_theme_name(settings_.gtk_icon_theme); - }); - - // Preload our fallbacks - const iconPath = 'resource://org/gnome/Shell/Extensions/GSConnect/icons'; - const iconNames = [ - 'org.gnome.Shell.Extensions.GSConnect', - 'org.gnome.Shell.Extensions.GSConnect-symbolic', - 'computer-symbolic', - 'laptop-symbolic', - 'smartphone-symbolic', - 'tablet-symbolic', - 'tv-symbolic', - 'phonelink-ring-symbolic', - 'sms-symbolic', - ]; - - getIcon._resource = {}; - - for (const iconName of iconNames) { - getIcon._resource[iconName] = new Gio.FileIcon({ - file: Gio.File.new_for_uri(`${iconPath}/${iconName}.svg`), - }); - } - } - - // Check the desktop icon theme - if (getIcon._desktop.has_icon(name)) - return new Gio.ThemedIcon({name: name}); - - // Check our GResource - if (getIcon._resource[name] !== undefined) - return getIcon._resource[name]; - - // Fallback to hoping it's in the theme somewhere - return new Gio.ThemedIcon({name: name}); -} - - -/** - * Get the contents of a GResource file, replacing `@PACKAGE_DATADIR@` where - * necessary. - * - * @param {string} relativePath - A path relative to GSConnect's resource path - * @return {string} The file contents as a string - */ -function getResource(relativePath) { - try { - const bytes = Gio.resources_lookup_data( - GLib.build_filenamev([Config.APP_PATH, relativePath]), - Gio.ResourceLookupFlags.NONE - ); - - const source = new TextDecoder().decode(bytes.toArray()); - - return source.replace('@PACKAGE_DATADIR@', Config.PACKAGE_DATADIR); - } catch (e) { - logError(e, 'GSConnect'); - return null; - } -} - - -/** - * Install file contents, to an absolute directory path. - * - * @param {string} dirname - An absolute directory path - * @param {string} basename - The file name - * @param {string} contents - The file contents - * @return {boolean} A success boolean - */ -function _installFile(dirname, basename, contents) { - try { - const filename = GLib.build_filenamev([dirname, basename]); - GLib.mkdir_with_parents(dirname, 0o755); - - return GLib.file_set_contents(filename, contents); - } catch (e) { - logError(e, 'GSConnect'); - return false; - } -} - -/** - * Install file contents from a GResource, to an absolute directory path. - * - * @param {string} dirname - An absolute directory path - * @param {string} basename - The file name - * @param {string} relativePath - A path relative to GSConnect's resource path - * @return {boolean} A success boolean - */ -function _installResource(dirname, basename, relativePath) { - try { - const contents = getResource(relativePath); - - return _installFile(dirname, basename, contents); - } catch (e) { - logError(e, 'GSConnect'); - return false; - } -} - -/** - * Use Gio.File to ensure a file's executable bits are set. - * - * @param {string} filepath - An absolute path to a file - * @returns {boolean} - True if the file already was, or is now, executable - */ -function _setExecutable(filepath) { - try { - const file = Gio.File.new_for_path(filepath); - const finfo = file.query_info( - `${Gio.FILE_ATTRIBUTE_STANDARD_TYPE},${Gio.FILE_ATTRIBUTE_UNIX_MODE}`, - Gio.FileQueryInfoFlags.NOFOLLOW_SYMLINKS, - null); - - if (!finfo.has_attribute(Gio.FILE_ATTRIBUTE_UNIX_MODE)) - return false; - - const mode = finfo.get_attribute_uint32( - Gio.FILE_ATTRIBUTE_UNIX_MODE); - const new_mode = (mode | 0o111); - if (mode === new_mode) - return true; - - return file.set_attribute_uint32( - Gio.FILE_ATTRIBUTE_UNIX_MODE, - new_mode, - Gio.FileQueryInfoFlags.NOFOLLOW_SYMLINKS, - null); - } catch (e) { - logError(e, 'GSConnect'); - return false; - } -} - -/** - * Ensure critical files in the extension directory have the - * correct permissions. - */ -export function ensurePermissions() { - if (Config.IS_USER) { - const executableFiles = [ - 'gsconnect-preferences', - 'service/daemon.js', - 'service/nativeMessagingHost.js', - ]; - for (const file of executableFiles) - _setExecutable(GLib.build_filenamev([Config.PACKAGE_DATADIR, file])); - } -} - -/** - * Install the files necessary for the GSConnect service to run. - */ -export function installService() { - const settings = new Gio.Settings({ - settings_schema: Config.GSCHEMA.lookup( - 'org.gnome.Shell.Extensions.GSConnect', - null - ), - path: '/org/gnome/shell/extensions/gsconnect/', - }); - - const confDir = GLib.get_user_config_dir(); - const dataDir = GLib.get_user_data_dir(); - const homeDir = GLib.get_home_dir(); - - // DBus Service - const dbusDir = GLib.build_filenamev([dataDir, 'dbus-1', 'services']); - const dbusFile = `${Config.APP_ID}.service`; - - // Desktop Entry - const appDir = GLib.build_filenamev([dataDir, 'applications']); - const appFile = `${Config.APP_ID}.desktop`; - const appPrefsFile = `${Config.APP_ID}.Preferences.desktop`; - - // Application Icon - const iconDir = GLib.build_filenamev([dataDir, 'icons', 'hicolor', 'scalable', 'apps']); - const iconFull = `${Config.APP_ID}.svg`; - const iconSym = `${Config.APP_ID}-symbolic.svg`; - - // File Manager Extensions - const fileManagers = [ - [`${dataDir}/nautilus-python/extensions`, 'nautilus-gsconnect.py'], - [`${dataDir}/nemo-python/extensions`, 'nemo-gsconnect.py'], - ]; - - // WebExtension Manifests - const manifestFile = 'org.gnome.shell.extensions.gsconnect.json'; - const google = getResource(`webextension/${manifestFile}.google.in`); - const mozilla = getResource(`webextension/${manifestFile}.mozilla.in`); - const manifests = [ - [`${confDir}/chromium/NativeMessagingHosts/`, google], - [`${confDir}/google-chrome/NativeMessagingHosts/`, google], - [`${confDir}/google-chrome-beta/NativeMessagingHosts/`, google], - [`${confDir}/google-chrome-unstable/NativeMessagingHosts/`, google], - [`${confDir}/BraveSoftware/Brave-Browser/NativeMessagingHosts/`, google], - [`${confDir}/BraveSoftware/Brave-Browser-Beta/NativeMessagingHosts/`, google], - [`${confDir}/BraveSoftware/Brave-Browser-Nightly/NativeMessagingHosts/`, google], - [`${homeDir}/.mozilla/native-messaging-hosts/`, mozilla], - [`${homeDir}/.config/microsoft-edge-dev/NativeMessagingHosts`, google], - [`${homeDir}/.config/microsoft-edge-beta/NativeMessagingHosts`, google], - ]; - - // If running as a user extension, ensure the DBus service, desktop entry, - // file manager scripts, and WebExtension manifests are installed. - if (Config.IS_USER) { - // DBus Service - if (!_installResource(dbusDir, dbusFile, `${dbusFile}.in`)) - throw Error('GSConnect: Failed to install DBus Service'); - - // Desktop Entries - _installResource(appDir, appFile, appFile); - _installResource(appDir, appPrefsFile, appPrefsFile); - - // Application Icon - _installResource(iconDir, iconFull, `icons/${iconFull}`); - _installResource(iconDir, iconSym, `icons/${iconSym}`); - - // File Manager Extensions - const target = `${Config.PACKAGE_DATADIR}/nautilus-gsconnect.py`; - - for (const [dir, name] of fileManagers) { - const script = Gio.File.new_for_path(GLib.build_filenamev([dir, name])); - - if (!script.query_exists(null)) { - GLib.mkdir_with_parents(dir, 0o755); - script.make_symbolic_link(target, null); - } - } - - // WebExtension Manifests - if (settings.get_boolean('create-native-messaging-hosts')) { - for (const [dirname, contents] of manifests) - _installFile(dirname, manifestFile, contents); - } - - // Otherwise, if running as a system extension, ensure anything previously - // installed when running as a user extension is removed. - } else { - GLib.unlink(GLib.build_filenamev([dbusDir, dbusFile])); - GLib.unlink(GLib.build_filenamev([appDir, appFile])); - GLib.unlink(GLib.build_filenamev([appDir, appPrefsFile])); - GLib.unlink(GLib.build_filenamev([iconDir, iconFull])); - GLib.unlink(GLib.build_filenamev([iconDir, iconSym])); - - for (const [dir, name] of fileManagers) - GLib.unlink(GLib.build_filenamev([dir, name])); - - for (const manifest of manifests) - GLib.unlink(GLib.build_filenamev([manifest[0], manifestFile])); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/stylesheet.css b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/stylesheet.css deleted file mode 100644 index ea455d0e..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/stylesheet.css +++ /dev/null @@ -1,127 +0,0 @@ -/* - * SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ - -/* Device Menu - -PopupMenu.PopupMenuSection.gsconnect-device-section - PopupMenu.PopupMenuSection.gsconnect-device-menu - PopupMenu.PopupSeparatorMenuItem - StLabel.gsconnect-device-name - StBoxLayout.gsconnect-device-battery - PopupMenu.PopupMenuSection - StBoxLayout.gsconnect-list-box - StBoxLayout (Submenu Container) -*/ -.gsconnect-device-section { -} - -/* Title Bar */ -.gsconnect-device-name { - font-weight: bold; -} - -.gsconnect-device-menu .popup-separator-menu-item { - margin-left: 0; - margin-right: 0; -} - -/* Battery Widget */ -.gsconnect-device-battery { - spacing: 3px; -} - -.gsconnect-device-battery StLabel { - font-size: 0.75em; -} - -.gsconnect-device-battery StIcon { - icon-size: 16px; -} - -/* Signal Strength Widget */ -.gsconnect-device-signal-strength { - spacing: 3px; -} - -.gsconnect-device-signal-strength StLabel { - font-size: 0.75em; -} - -.gsconnect-device-signal-strength StIcon { - icon-size: 16px; -} - -/* List Box */ -.gsconnect-list-box { -} - - -/* Device Panel Indicator - -PanelMenu.Button.gsconnect-device-indicator - PopupMenu.PopupMenu - PopupMenu.PopupMenuSection.gsconnect-device-menu - PopupMenu.PopupSeparatorMenuItem - StLabel.gsconnect-device-name - StBoxLayout.gsconnect-device-battery - PopupMenu.PopupMenuSection - StBoxLayout.gsconnect-icon-box - StBoxLayout (Submenu Container) - */ -.gsconnect-device-indicator { - -st-icon-style: symbolic; -} - -/* Icon Box */ -.gsconnect-icon-box { - margin: 0em 2em 0.5em; - spacing: 6px; -} - -.gsconnect-icon-button { - border-radius: 1em; - padding: 0.5em; -} - -.gsconnect-icon-button:hover, .gsconnect-icon-button:focus { - background-color: rgba(255, 255, 255, 0.125); -} - -.gsconnect-icon-button StIcon { - icon-size: 1em; -} - - -/* Tooltip - -StBin.gsconnect-tooltip (inherits from .osd-window) - StBoxLayout || [ Custom ClutterActor ] - StIcon - StLabel -*/ -.gsconnect-tooltip { - border-radius: 3px; - min-width: 0; - min-height: 0; - padding: 6px; -} - -.gsconnect-tooltip > StBoxLayout { - spacing: 6px; -} - -.gsconnect-tooltip StIcon { - icon-size: 16px; -} - -.gsconnect-tooltip StLabel { - font-weight: normal; - text-align: left; -} - -.gsconnect-tooltip StLabel:rtl { - text-align: right; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/utils/remote.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/utils/remote.js deleted file mode 100644 index 44760cd2..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/utils/remote.js +++ /dev/null @@ -1,516 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; - -const SERVICE_NAME = 'org.gnome.Shell.Extensions.GSConnect'; -const SERVICE_PATH = '/org/gnome/Shell/Extensions/GSConnect'; -const DEVICE_NAME = 'org.gnome.Shell.Extensions.GSConnect.Device'; - - -const _PROPERTIES = { - 'Connected': 'connected', - 'EncryptionInfo': 'encryption-info', - 'IconName': 'icon-name', - 'Id': 'id', - 'Name': 'name', - 'Paired': 'paired', - 'Type': 'type', -}; - - -function _proxyInit(proxy, cancellable = null) { - if (proxy.__initialized !== undefined) - return Promise.resolve(); - - return new Promise((resolve, reject) => { - proxy.init_async( - GLib.PRIORITY_DEFAULT, - cancellable, - (proxy, res) => { - try { - proxy.init_finish(res); - proxy.__initialized = true; - resolve(); - } catch (e) { - Gio.DBusError.strip_remote_error(e); - reject(e); - } - } - ); - }); -} - - -/** - * A simple proxy wrapper for devices exported over DBus. - */ -export const Device = GObject.registerClass({ - GTypeName: 'GSConnectRemoteDevice', - Implements: [Gio.DBusInterface], - Properties: { - 'connected': GObject.ParamSpec.boolean( - 'connected', - 'Connected', - 'Whether the device is connected', - GObject.ParamFlags.READABLE, - null - ), - 'encryption-info': GObject.ParamSpec.string( - 'encryption-info', - 'Encryption Info', - 'A formatted string with the local and remote fingerprints', - GObject.ParamFlags.READABLE, - null - ), - 'icon-name': GObject.ParamSpec.string( - 'icon-name', - 'Icon Name', - 'Icon name representing the device', - GObject.ParamFlags.READABLE, - null - ), - 'id': GObject.ParamSpec.string( - 'id', - 'deviceId', - 'The device hostname or other unique id', - GObject.ParamFlags.READABLE, - '' - ), - 'name': GObject.ParamSpec.string( - 'name', - 'deviceName', - 'The device name', - GObject.ParamFlags.READABLE, - null - ), - 'paired': GObject.ParamSpec.boolean( - 'paired', - 'Paired', - 'Whether the device is paired', - GObject.ParamFlags.READABLE, - null - ), - 'type': GObject.ParamSpec.string( - 'type', - 'deviceType', - 'The device type', - GObject.ParamFlags.READABLE, - null - ), - }, -}, class Device extends Gio.DBusProxy { - - _init(service, object_path) { - this._service = service; - - super._init({ - g_connection: service.g_connection, - g_name: SERVICE_NAME, - g_object_path: object_path, - g_interface_name: DEVICE_NAME, - }); - } - - vfunc_g_properties_changed(changed, invalidated) { - try { - for (const name in changed.deepUnpack()) - this.notify(_PROPERTIES[name]); - } catch (e) { - logError(e); - } - } - - _get(name, fallback = null) { - try { - return this.get_cached_property(name).unpack(); - } catch (e) { - return fallback; - } - } - - get connected() { - return this._get('Connected', false); - } - - get encryption_info() { - return this._get('EncryptionInfo', ''); - } - - get icon_name() { - return this._get('IconName', 'computer'); - } - - get id() { - return this._get('Id', '0'); - } - - get name() { - return this._get('Name', 'Unknown'); - } - - get paired() { - return this._get('Paired', false); - } - - get service() { - return this._service; - } - - get type() { - return this._get('Type', 'desktop'); - } - - async start() { - try { - await _proxyInit(this); - - // For GActions & GMenu we pass the service's name owner to avoid - // any mixup with instances. - this.action_group = Gio.DBusActionGroup.get( - this.g_connection, - this.service.g_name_owner, - this.g_object_path - ); - - this.menu = Gio.DBusMenuModel.get( - this.g_connection, - this.service.g_name_owner, - this.g_object_path - ); - - // Poke the GMenu to ensure it's ready for us - await new Promise((resolve, reject) => { - this.g_connection.call( - SERVICE_NAME, - this.g_object_path, - 'org.gtk.Menus', - 'Start', - new GLib.Variant('(au)', [[0]]), - null, - Gio.DBusCallFlags.NONE, - -1, - null, - (proxy, res) => { - try { - resolve(proxy.call_finish(res)); - } catch (e) { - Gio.DBusError.strip_remote_error(e); - reject(e); - } - } - ); - }); - } catch (e) { - this.destroy(); - throw e; - } - } - - destroy() { - GObject.signal_handlers_destroy(this); - } -}); - - -/** - * A simple proxy wrapper for the GSConnect service. - */ -export const Service = GObject.registerClass({ - GTypeName: 'GSConnectRemoteService', - Implements: [Gio.DBusInterface], - Properties: { - 'active': GObject.ParamSpec.boolean( - 'active', - 'Active', - 'Whether the service is active', - GObject.ParamFlags.READABLE, - false - ), - }, - Signals: { - 'device-added': { - flags: GObject.SignalFlags.RUN_FIRST, - param_types: [Device.$gtype], - }, - 'device-removed': { - flags: GObject.SignalFlags.RUN_FIRST, - param_types: [Device.$gtype], - }, - }, -}, class Service extends Gio.DBusProxy { - - _init() { - super._init({ - g_bus_type: Gio.BusType.SESSION, - g_name: SERVICE_NAME, - g_object_path: SERVICE_PATH, - g_interface_name: 'org.freedesktop.DBus.ObjectManager', - g_flags: Gio.DBusProxyFlags.DO_NOT_AUTO_START_AT_CONSTRUCTION, - }); - - this._active = false; - this._devices = new Map(); - this._starting = false; - - // Watch the service - this._nameOwnerChangedId = this.connect( - 'notify::g-name-owner', - this._onNameOwnerChanged.bind(this) - ); - } - - get active() { - return this._active; - } - - get devices() { - return Array.from(this._devices.values()); - } - - vfunc_g_signal(sender_name, signal_name, parameters) { - try { - // Don't emit signals until the ObjectManager has started - if (!this.active) - return; - - parameters = parameters.deepUnpack(); - - switch (true) { - case (signal_name === 'InterfacesAdded'): - this._onInterfacesAdded(...parameters); - break; - - case (signal_name === 'InterfacesRemoved'): - this._onInterfacesRemoved(...parameters); - break; - } - } catch (e) { - logError(e); - } - } - - /** - * org.freedesktop.DBus.ObjectManager.InterfacesAdded - * - * @param {string} object_path - Path interfaces have been added to - * @param {Object} interfaces - A dictionary of interface objects - */ - async _onInterfacesAdded(object_path, interfaces) { - try { - // An empty list means only the object has been added - if (Object.values(interfaces).length === 0) - return; - - // Skip existing proxies - if (this._devices.has(object_path)) - return; - - // Create a proxy - const device = new Device(this, object_path); - await device.start(); - - // Hold the proxy and emit ::device-added - this._devices.set(object_path, device); - this.emit('device-added', device); - } catch (e) { - logError(e, object_path); - } - } - - /** - * org.freedesktop.DBus.ObjectManager.InterfacesRemoved - * - * @param {string} object_path - Path interfaces have been removed from - * @param {string[]} interfaces - List of interface names removed - */ - _onInterfacesRemoved(object_path, interfaces) { - try { - // An empty interface list means the object is being removed - if (interfaces.length === 0) - return; - - // Get the proxy - const device = this._devices.get(object_path); - - if (device === undefined) - return; - - // Release the proxy and emit ::device-removed - this._devices.delete(object_path); - this.emit('device-removed', device); - - // Destroy the device and force disposal - device.destroy(); - } catch (e) { - logError(e, object_path); - } - } - - async _addDevices() { - const objects = await new Promise((resolve, reject) => { - this.call( - 'GetManagedObjects', - null, - Gio.DBusCallFlags.NONE, - -1, - null, - (proxy, res) => { - try { - const variant = proxy.call_finish(res); - resolve(variant.deepUnpack()[0]); - } catch (e) { - Gio.DBusError.strip_remote_error(e); - reject(e); - } - } - ); - }); - - for (const [object_path, object] of Object.entries(objects)) - await this._onInterfacesAdded(object_path, object); - } - - _clearDevices() { - for (const [object_path, device] of this._devices) { - this._devices.delete(object_path); - this.emit('device-removed', device); - device.destroy(); - } - } - - async _onNameOwnerChanged() { - try { - // If the service stopped, remove each device and mark it inactive - if (this.g_name_owner === null) { - this._clearDevices(); - - this._active = false; - this.notify('active'); - - // If the service started, mark it active and add each device - } else { - this._active = true; - this.notify('active'); - - await this._addDevices(); - } - } catch (e) { - logError(e); - } - } - - /** - * Reload all devices without affecting the remote service. This amounts to - * removing and adding each device while emitting the appropriate signals. - */ - async reload() { - try { - if (this._starting === false) { - this._starting = true; - - this._clearDevices(); - await _proxyInit(this); - await this._onNameOwnerChanged(); - - this._starting = false; - } - } catch (e) { - this._starting = false; - throw e; - } - } - - /** - * Start the service - */ - async start() { - try { - if (this._starting === false && this.active === false) { - this._starting = true; - - await _proxyInit(this); - await this._onNameOwnerChanged(); - - // Activate the service if it's not already running - if (!this.active) { - await new Promise((resolve, reject) => { - this.g_connection.call( - SERVICE_NAME, - SERVICE_PATH, - 'org.freedesktop.Application', - 'Activate', - GLib.Variant.new('(a{sv})', [{}]), - null, - Gio.DBusCallFlags.NONE, - -1, - null, - (proxy, res) => { - try { - resolve(proxy.call_finish(res)); - } catch (e) { - Gio.DBusError.strip_remote_error(e); - reject(e); - } - } - ); - }); - } - - this._starting = false; - } - } catch (e) { - this._starting = false; - throw e; - } - } - - /** - * Stop the service - */ - stop() { - if (this.active) - this.activate_action('quit'); - } - - activate_action(name, parameter = null) { - try { - const paramArray = []; - - if (parameter instanceof GLib.Variant) - paramArray[0] = parameter; - - const connection = this.g_connection || Gio.DBus.session; - - connection.call( - SERVICE_NAME, - SERVICE_PATH, - 'org.freedesktop.Application', - 'ActivateAction', - GLib.Variant.new('(sava{sv})', [name, paramArray, {}]), - null, - Gio.DBusCallFlags.NONE, - -1, - null, - null - ); - } catch (e) { - logError(e); - } - } - - destroy() { - if (this._nameOwnerChangedId > 0) { - this.disconnect(this._nameOwnerChangedId); - this._nameOwnerChangedId = 0; - - this._clearDevices(); - this._active = false; - - GObject.signal_handlers_destroy(this); - } - } -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/utils/setup.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/utils/setup.js deleted file mode 100644 index eef58dc9..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/utils/setup.js +++ /dev/null @@ -1,51 +0,0 @@ -// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; - -import Gettext from 'gettext'; - -import Config from '../config.js'; - - -/** - * Initialise and setup Gettext. - */ -export function setupGettext() { - // Init Gettext - String.prototype.format = imports.format.format; - Gettext.bindtextdomain(Config.APP_ID, Config.PACKAGE_LOCALEDIR); - globalThis._ = GLib.dgettext.bind(null, Config.APP_ID); - globalThis.ngettext = GLib.dngettext.bind(null, Config.APP_ID); -} - -/** - * Initialise and setup Config, GResources and GSchema. - * @param {string} extensionPath - The absolute path to the extension directory - */ -export default function setup(extensionPath) { - // Ensure config.js is setup properly - Config.PACKAGE_DATADIR = extensionPath; - const userDir = GLib.build_filenamev([GLib.get_user_data_dir(), 'gnome-shell']); - - if (Config.PACKAGE_DATADIR.startsWith(userDir)) { - Config.IS_USER = true; - - Config.GSETTINGS_SCHEMA_DIR = `${Config.PACKAGE_DATADIR}/schemas`; - Config.PACKAGE_LOCALEDIR = `${Config.PACKAGE_DATADIR}/locale`; - } - - // Init GResources - Gio.Resource.load( - GLib.build_filenamev([Config.PACKAGE_DATADIR, `${Config.APP_ID}.gresource`]) - )._register(); - - // Init GSchema - Config.GSCHEMA = Gio.SettingsSchemaSource.new_from_directory( - Config.GSETTINGS_SCHEMA_DIR, - Gio.SettingsSchemaSource.get_default(), - false - ); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/wl_clipboard.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/wl_clipboard.js deleted file mode 100644 index 8e1dedd9..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/gsconnect@andyholmes.github.io/wl_clipboard.js +++ /dev/null @@ -1,296 +0,0 @@ -// SPDX-FileCopyrightText: JingMatrix https://github.com/JingMatrix -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import Gio from 'gi://Gio'; -import GjsPrivate from 'gi://GjsPrivate'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; - -// laucher for wl-clipboard -const launcher = new Gio.SubprocessLauncher({ - flags: Gio.SubprocessFlags.STDOUT_PIPE | Gio.SubprocessFlags.STDERR_MERGE, -}); - -/* - * DBus Interface Info - */ -const DBUS_NAME = 'org.gnome.Shell.Extensions.GSConnect.Clipboard'; -const DBUS_PATH = '/org/gnome/Shell/Extensions/GSConnect/Clipboard'; -const DBUS_NODE = Gio.DBusNodeInfo.new_for_xml(` -<node> - <interface name="org.gnome.Shell.Extensions.GSConnect.Clipboard"> - <!-- Methods --> - <method name="GetMimetypes"> - <arg direction="out" type="as" name="mimetypes"/> - </method> - <method name="GetText"> - <arg direction="out" type="s" name="text"/> - </method> - <method name="SetText"> - <arg direction="in" type="s" name="text"/> - </method> - - <!-- Signals --> - <signal name="OwnerChange"/> - </interface> -</node> -`); -const DBUS_INFO = DBUS_NODE.lookup_interface(DBUS_NAME); - -/* - * Text Mimetypes - */ -const TEXT_MIMETYPES = [ - 'text/plain;charset=utf-8', - 'UTF8_STRING', - 'text/plain', - 'STRING', -]; - -/* GSConnectClipboardPortal: - * - * A simple clipboard portal, especially useful on Wayland where GtkClipboard - * doesn't work in the background. - */ -export const Clipboard = GObject.registerClass( - { - GTypeName: 'GSConnectShellClipboard', - }, - class GSConnectShellClipboard extends GjsPrivate.DBusImplementation { - _init() { - super._init({ - g_interface_info: DBUS_INFO, - }); - - this._transferring = false; - - this.watcher = Gio.Subprocess.new([ - 'wl-paste', - '-w', - 'dbus-send', - DBUS_PATH, - '--dest=' + DBUS_NAME, - DBUS_NAME + '.OwnerChange', - ], Gio.SubprocessFlags.NONE); - - // Prepare DBus interface - this._handleMethodCallId = this.connect( - 'handle-method-call', - this._onHandleMethodCall.bind(this) - ); - - this._nameId = Gio.DBus.own_name( - Gio.BusType.SESSION, - DBUS_NAME, - Gio.BusNameOwnerFlags.NONE, - this._onBusAcquired.bind(this), - null, - this._onNameLost.bind(this) - ); - } - - _onBusAcquired(connection, name) { - try { - this.export(connection, DBUS_PATH); - } catch (e) { - logError(e); - } - } - - _onNameLost(connection, name) { - try { - this.unexport(); - } catch (e) { - logError(e); - } - } - - async _onHandleMethodCall(iface, name, parameters, invocation) { - let retval; - - try { - const args = parameters.recursiveUnpack(); - - retval = await this[name](...args); - } catch (e) { - if (e instanceof GLib.Error) { - invocation.return_gerror(e); - } else { - if (!e.name.includes('.')) - e.name = `org.gnome.gjs.JSError.${e.name}`; - - invocation.return_dbus_error(e.name, e.message); - } - - return; - } - - if (retval === undefined) - retval = new GLib.Variant('()', []); - - try { - if (!(retval instanceof GLib.Variant)) { - const args = DBUS_INFO.lookup_method(name).out_args; - retval = new GLib.Variant( - `(${args.map((arg) => arg.signature).join('')})`, - args.length === 1 ? [retval] : retval - ); - } - - invocation.return_value(retval); - - // Without a response, the client will wait for timeout - } catch (e) { - invocation.return_dbus_error( - 'org.gnome.gjs.JSError.ValueError', - 'Service implementation returned an incorrect value type' - ); - } - } - - /** - * Get the available mimetypes of the current clipboard content - * - * @return {Promise<string[]>} A list of mime-types - */ - - GetMimetypes() { - return new Promise((resolve, reject) => { - const proc = launcher.spawnv([ - 'wl-paste', - '--list-types', - '-n', - ]); - proc.communicate_utf8_async(null, null, (proc, res) => { - try { - const [, stdout, stderr] = - proc.communicate_utf8_finish(res); - if (proc.get_successful()) - resolve(stdout.trim().split('\n')); - else - logError(stderr); - - } catch (e) { - reject(e); - } - }); - }); - } - - /** - * Get the text content of the clipboard - * - * @return {Promise<string>} Text content of the clipboard - */ - GetText() { - return new Promise((resolve, reject) => { - this.GetMimetypes().then((mimetypes) => { - const mimetype = TEXT_MIMETYPES.find((type) => - mimetypes.includes(type) - ); - - if (mimetype !== undefined) { - const proc = launcher.spawnv(['wl-paste', '-n']); - proc.communicate_utf8_async(null, null, (proc, res) => { - try { - const [, stdout, stderr] = - proc.communicate_utf8_finish(res); - if (proc.get_successful()) - resolve(stdout); - else - logError(stderr); - - } catch (e) { - reject(e); - } - }); - } else { - reject(new Error('text not available')); - } - }); - }); - } - - /** - * Set the text content of the clipboard - * - * @param {string} text - text content to set - * @return {Promise} A promise for the operation - */ - SetText(text) { - return new Promise((resolve, reject) => { - try { - if (typeof text !== 'string') { - throw new Gio.DBusError({ - code: Gio.DBusError.INVALID_ARGS, - message: 'expected string', - }); - } - - launcher.spawnv(['wl-copy', text]); - resolve(); - } catch (e) { - reject(e); - } - }); - } - - - - destroy() { - if (this._nameId > 0) { - Gio.bus_unown_name(this._nameId); - this._nameId = 0; - } - - if (this._handleMethodCallId > 0) { - this.disconnect(this._handleMethodCallId); - this._handleMethodCallId = 0; - this.unexport(); - } - if (this.watcher) - this.watcher.force_exit(); - - } - } -); - -let _portal = null; -let _portalId = 0; - -/** - * Watch for the service to start and export the clipboard portal when it does. - */ -export function watchService() { - if (_portalId > 0) - return; - - _portalId = Gio.bus_watch_name( - Gio.BusType.SESSION, - 'org.gnome.Shell.Extensions.GSConnect', - Gio.BusNameWatcherFlags.NONE, - () => { - if (_portal === null) - _portal = new Clipboard(); - }, - () => { - if (_portal !== null) { - _portal.destroy(); - _portal = null; - } - } - ); -} - -/** - * Stop watching the service and export the portal if currently running. - */ -export function unwatchService() { - if (_portalId > 0) { - Gio.bus_unwatch_name(_portalId); - _portalId = 0; - } -} - -// vim:tabstop=2:shiftwidth=2:expandtab diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/impatience@gfxmonk.net/extension.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/impatience@gfxmonk.net/extension.js deleted file mode 100644 index 61ed3e68..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/impatience@gfxmonk.net/extension.js +++ /dev/null @@ -1,52 +0,0 @@ -import St from 'gi://St'; -const DEFAULT_SPEED = 0.75; -import { Extension } from 'resource:///org/gnome/shell/extensions/extension.js'; -import * as Settings from './settings.js'; - -function LOG(m){ - console.log("[impatience] " + m); -}; - -var noop = function() {}; - -export default class Impatience extends Extension { - constructor(metadata) { - super(metadata); - this.enabled = false; - this.original_speed = St.Settings.get().slow_down_factor; - this.modified_speed = DEFAULT_SPEED; - this.unbind = noop; - }; - - enable() { - this.enabled = true; - var pref = (new Settings.Prefs(this)).SPEED; - LOG("enabled"); - var binding = pref.changed(() => { - this.set_speed(pref.get()); - }); - this.unbind = () => { - pref.disconnect(binding); - this.unbind = noop; - }; - this.set_speed(pref.get()); - }; - - disable() { - this.enabled = false; - this.unbind(); - St.Settings.get().slow_down_factor = this.original_speed; - }; - - set_speed(new_speed) { - if(!this.enabled) { - LOG("NOT setting new speed, since the extension is disabled."); - return; - } - if(new_speed !== undefined) { - this.modified_speed = new_speed; - } - LOG("setting new speed: " + this.modified_speed); - St.Settings.get().slow_down_factor = this.modified_speed; - }; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/impatience@gfxmonk.net/prefs.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/impatience@gfxmonk.net/prefs.js deleted file mode 100644 index e55867a0..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/impatience@gfxmonk.net/prefs.js +++ /dev/null @@ -1,61 +0,0 @@ -import Gtk from 'gi://Gtk'; - -import { ExtensionPreferences } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; -import * as Settings from './settings.js'; - -export default class ImpatiencePrefs extends ExtensionPreferences { - getPreferencesWidget() { - let config = new Settings.Prefs(this); - let frame = new Gtk.Box({ - orientation: Gtk.Orientation.VERTICAL, - 'margin-top': 20, - 'margin-bottom': 20, - 'margin-start': 20, - 'margin-end': 20 - }); - - (function() { - let hbox = new Gtk.Box({ - orientation: Gtk.Orientation.HORIZONTAL, - spacing: 20 - }); - - let label = new Gtk.Label({ - label: "Speed scaling\n<small>(1 = normal, 0.5 = twice as fast)</small>", - use_markup: true, - }); - let adjustment = new Gtk.Adjustment({ - lower: 0, - upper: 2, - step_increment: 0.05 - }); - let scale = new Gtk.Scale({ - orientation: Gtk.Orientation.HORIZONTAL, - digits:2, - adjustment: adjustment, - hexpand: true, - value_pos: Gtk.PositionType.RIGHT - }); - - hbox.append(label); - hbox.append(scale); - frame.append(hbox); - - var pref = config.SPEED; - scale.set_value(pref.get()); - [0.25, 0.5, 1.0, 2.0].forEach( - mark => scale.add_mark(mark, Gtk.PositionType.TOP, "<small>" + mark + "</small>") - ); - scale.connect('value-changed', function(sw) { - var oldval = pref.get(); - var newval = sw.get_value(); - if (newval != pref.get()) { - pref.set(newval); - } - }); - })(); - - frame.show(); - return frame; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/impatience@gfxmonk.net/private_metadata.json b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/impatience@gfxmonk.net/private_metadata.json deleted file mode 100644 index 66f450cc..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/impatience@gfxmonk.net/private_metadata.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_generated": "Generated by SweetTooth, do not edit", - "description": "Speed up the gnome-shell animation speed", - "name": "Impatience", - "settings-schema": "org.gnome.shell.extensions.net.gfxmonk.impatience", - "shell-version": [ - "45", - "46", - "47" - ], - "url": "http://gfxmonk.net/dist/0install/gnome-shell-impatience.xml", - "uuid": "impatience@gfxmonk.net", - "version": 27 -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/impatience@gfxmonk.net/schemas/gschemas.compiled b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/impatience@gfxmonk.net/schemas/gschemas.compiled deleted file mode 100644 index 8be15e0d..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/impatience@gfxmonk.net/schemas/gschemas.compiled and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/impatience@gfxmonk.net/schemas/org.gnome.shell.extensions.net.gfxmonk.impatience.gschema.xml b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/impatience@gfxmonk.net/schemas/org.gnome.shell.extensions.net.gfxmonk.impatience.gschema.xml deleted file mode 100644 index ffd0c931..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/impatience@gfxmonk.net/schemas/org.gnome.shell.extensions.net.gfxmonk.impatience.gschema.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<schemalist> - <schema id="org.gnome.shell.extensions.net.gfxmonk.impatience" path="/org/gnome/shell/extensions/net/gfxmonk/impatience/"> - <key type="d" name="speed-factor"> - <default>0.75</default> - <summary>speed factor</summary> - <description/> - </key> - </schema> -</schemalist> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/impatience@gfxmonk.net/settings.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/impatience@gfxmonk.net/settings.js deleted file mode 100644 index 5f25f975..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/impatience@gfxmonk.net/settings.js +++ /dev/null @@ -1,10 +0,0 @@ -export function Prefs(extension) { - var settings = this.settings = extension.getSettings(); - this.SPEED = { - key: 'speed-factor', - get: function() { return settings.get_double(this.key); }, - set: function(v) { settings.set_double(this.key, v); }, - changed: function(cb) { return settings.connect('changed::' + this.key, cb); }, - disconnect: function() { return settings.disconnect.apply(settings, arguments); }, - }; -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/executable_CHANGELOG.md b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/executable_CHANGELOG.md deleted file mode 100644 index 5474176a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/executable_CHANGELOG.md +++ /dev/null @@ -1,555 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -We go to the next version after each release on the -[GNOME Shell Extensions website](https://extensions.gnome.org/). - -## [Unreleased] - -## [30.0] - 2024-07-31 - -### Added - -- GNOME Shell 47 Support. - -## [29.0] - 2024-07-06 - -### Added - -- Dark Mode Toggle Button Visibility in Quick Settings. -- Maximum Displayed Search Results feature (GNOME Shell 45 and higher). -- Gresources compiled file for the preferences window to load faster. - -### Fixed - -- Alt-Tab Switcher list Item Background Color for Shell Theme Override (GNOME Shell 46). -- Hidden panel timeout priority on Wayland. -- Panel Menu not Showing Up On Bottom Panel When the Height is Larger than the Screen Height. -- The dash app running indicator visibility. -- Workspace Popup visibility CPU usage. -- Japanese Translation by [@gnuey56](https://gitlab.gnome.org/gnuey56). - -### Changed - -- The clock menu position widget to `AdwSpinRow`. -- The panel height maximum size to 64. - -## [28.0 Lear] - 2024-03-06 - -### Added - -- Buy Me a Coffee donation link. -- GNOME Shell 46 Support. -- Option to maximize windows on creation by [@droserasprout](https://gitlab.gnome.org/droserasprout). - -### Fixed - -- The world clock visibility coming back after reboot or install change. - -### Removed - -- Window Picker Shell Theme Override. -- Search Shell Theme Override. -- Workspace Animation Shell Theme Override. -- Dash Background Shell Theme Override. - -## [27.0 Durer] - 2023-09-14 - -### Changed - -- The world clocks visibility from CSS to JS. - -### Added - -- "Almost none" option to animation speed feature (GNOME Shell 45). -- GNOME Shell 45 Support. -- Japanese Translation by [@gnuey56](https://gitlab.gnome.org/gnuey56). - -### Removed - -- Activities button icon feature (GNOME Shell 45). -- App menu indicator (GNOME Shell 45). - -## [26.0 Rosa] - 2023-08-07 - -### Fixed - -- Remove not defined. - -## [25.0 Rosa] - 2023-08-07 - -### Changed - -- The behavior of the panel is shown only in the overview. - Rather than sliding in from the top, it is now rendered behind the workspaces - by [Schneegans](https://gitlab.gnome.org/Schneegans). - -### Fixed - -- a11y error in GNOME Shell mobile. -- Activities button error in GNOME Shell mobile. -- Marked as an urgent signal for window demand attention focus feature. -- Panel flickering when its position is at the bottom. -- `.set_icon_size` is not a function error (Date Menu). -- Unwanted padding on the disabled power icon. -- Unwanted shadow for workspace in the app grid. - -### Added - -- Dash app running visibility. -- Disable the overlay key. -- EGO donations. -- Workspace peek (GNOME Shell 42 and higher). - -### Removed - -- GNOME Shell support (3.36, 3.38, 40 and 41 no longer getting new features). - -## [24.0 Hals] - 2023-03-01 - -### Changed - -- Window preview close button for super minimal profile (to disabled). - -### Added - -- GNOME Shell 44 support. -- Transparent dash background for shell theme override (GNOME Shell 4x only). - -## [23.0 Goya] - 2023-02-10 - -### Changed - -- Clock menu offset maximum to 20. -- Fastest animation speed (twice as fast as before). - -### Fixed - -- App menu label visibility compatibility issue with open whether extension. -- Hidden workspace switcher padding in overview. -- Keep the clock menu position when another widget is added to the panel. -- Looking Glass API conflicts with the "Dash to Panel" extension. -- Looking Glass error when primary monitor doesn't exist. -- Window preview gap when window picker close button is disabled. -- Workspace boxes top margin in the app grid when the search entry is disabled. -- Italian translation by [@svityboy](https://gitlab.gnome.org/svityboy). - -### Added - -- More dash icon size (16px, 22px, 24px, 40px and 56px). -- Overview spacing size. -- Screen recording indicator visibility. -- Screen sharing indicator visibility. -- Switcher popup delay by [@koplo199](https://gitlab.gnome.org/koplo199). - -## [22.0 Millet] - 2022-09-10 - -### Fixed - -- Dash app button visibility height. -- Looking glass error after unlock. - -### Added - -- App menu label visibility. -- GNOME Shell 43 support. -- Quick settings menu visibility. - -### Removed - -- Aggregate menu for GNOME Shell 43 and higher. - -## [21.0 Reynolds] - 2022-08-06 - -### Changed - -- Prefs compatibility layer checking to GTK and Adw instead of GNOME Shell version. - -### Fixed - -- Application button visibility in Ubuntu 22.04. -- Prefs window size for scaled displays. -- Prefs window size for small displays in GNOME Shell 42. -- Racy prefs window size. -- Window caption going out of display area when dash is disabled in GNOME Shell 40 and higher. -- Russian translation by [@librusekus35790](https://gitlab.gnome.org/librusekus35790). -- Spanish translation by [@Luci](https://gitlab.gnome.org/Luci). - -### Added - -- Alt-Tab window preview icon size. -- Alt-Tab window preview size. -- Alt-Tab icon size. -- Dash separator visibility. -- Looking glass size by [@AdvendraDeswanta](https://gitlab.gnome.org/AdvendraDeswanta). -- OSD position. -- Take the screenshot button in the window menu visibility. - -### Removed - -- Gesture API for GNOME Shell 40 and higher. -- List box separators for GNOME Shell 40 and 41 (EOS). -- Prefs intro. - -## [20.0 Hayez] - 2022-04-01 - -### Fixed - -- Dynamic workspaces getting disabled by workspace popup. -- Flickering panel after Unlock. -- Notification banner position on GNOME Shell 42. -- Window demands attention focus on GNOME Shell 42. -- French translation by [@GeoffreyCoulaud](https://gitlab.gnome.org/GeoffreyCoulaud). -- Italian translation by [@svityboy](https://gitlab.gnome.org/svityboy). - -### Added - -- Events visibility in the clock menu. -- Calendar visibility in the clock menu. -- Dutch translation by [@Vistaus](https://gitlab.gnome.org/Vistaus). - -## [19.0 Ancher] - 2022-03-02 - -### Fixed - -- Blurry search entry on GNOME Shell themes with "box-shadow". -- Prefs file chooser recursion. -- SecondaryMonitorDisplay error on GNOME Shell 42. -- Shell theme overrides OSD on GNOME Shell 42. -- Shell theme overrides the workspace switcher on GNOME Shell 42. -- Workspace popup visibility in GNOME Shell 42. - -### Added - -- Libadwaita for GNOME Shell 42 prefs. -- Panel icon size. -- Panel world clock visibility. -- Weather visibility. - -## [18.0 Roslin] - 2022-02-12 - -### Fixed - -- GNOME 3.x prefs error. - -## [17.0 Roslin] - 2022-02-11 - -### Fixed - -- Emitting panel show when panel is visible. -- Looking glass not showing up. -- Looking glass position on startup when panel is hidden. -- Prefs height going off the screen in small displays. -- Prefs lunching url freeze on Wayland. -- Prefs padding in GNOME Shell 42. -- Prefs UI Improvement by [@muqtxdir](https://gitlab.gnome.org/muqtxdir). -- Startup animation for hiding panel when panel is disabled. -- Type to search when text entry content is replaced with another content. -- Window goes under panel after unlock on Wayland. -- Window picker caption visibility issue on Pop Shell. -- Galician translation by [@frandieguez](https://gitlab.gnome.org/frandieguez). - -### Added - -- Bottom to notification banner position. - -### Removed - -- Panel corner size option for GNOME Shell 42. - -## [16.0 Rembrandt] - 2021-11-15 - -### Fixed - -- Animation jump when search entry is disabled and entering app grid. -- Clock menu revealing in lockscreen when the position is left or right. -- Startup status for Ubuntu. -- Workspace switcher visibility in GNOME Shell 41. - -### Removed - -- Hot corner for GNOME Shell 41. -- Hot corner library for all supported Shell versions. - -### Added - -- Double supper to app grid for GNOME Shell 40 and 41. -- Panel corner size when panel is disabled. -- Panel visibility in overview when panel is disabled. -- Prefs window intro. -- Profile selector to the prefs window. -- Ripple box. - -## [15.0 Magnetized] - 2021-09-22 - -### Fixed - -- unlock recursion error. - -### Added - -- Hot corner support for GNOME Shell 41. - -## [14.0 Magnetized] - 2021-09-22 - -### Changed - -- Repo folder structure to have better organization. - -### Fixed - -- Bottom panel position for multi monitors by [@harshadgavali](https://gitlab.gnome.org/harshadgavali). -- First swipe up in desktop startup status. -- Looking glass position on bottom panel. -- Maximized window gap on Wayland. -- Search entry animation for type to search when search entry is disabled. -- Search entry API to avoid conflicting with other extensions. -- Window picker caption border on disable. -- Window picker disapearing on wayland with shell theme override. -- Galician translation by [@frandieguez](https://gitlab.gnome.org/frandieguez). -- Spanish translation by [@DiegoIvanME](https://gitlab.gnome.org/DiegoIvanME). - -### Removed - -- Donation popover in prefs. -- Hot corner for GNOME Shell 41. - -### Added - -- GNOME Shell 41 support. -- Panel indicator padding size. -- Window picker close button visibility. - -## [13.0 Ring] - 2021-08-10 - -### Changed - -- Search button position in prefs window. - -### Fixed - -- Accessing dash in case the original dash has been removed by third party extensions. -- API.monitorGetInfo for "pMonitor is null" error. -- Dropdown align in preferences dialog. -- Startup status blocking shortcut keys. -- Unwanted window demands attention focus. -- Russian translation by [@librusekus35790](https://gitlab.gnome.org/librusekus35790). - -### Removed - -- Settings and Translation library and using ExtensionUtils instead. - -### Added - -- Panel button padding size. -- Panel height. -- Window picker caption visibility. -- Workspace background corner size in overview. -- Workspace wraparound (modified version of WorkspaceSwitcherWrapAround by [@war1025](https://github.com/war1025)). - -## [12.0 Queen Red] - 2021-06-29 - -### Changed - -- Lighter background color for switcher list (alt+tab) in override theme. -- Workspace switcher max size now maxed out to 30%. - -### Fixed - -- Combobox scroll issue on GTK4. -- Window demands attention focus notification popup. -- French translation by [@GeoffreyCoulaud](https://gitlab.gnome.org/GeoffreyCoulaud). -- Russian translation by [@librusekus35790](https://gitlab.gnome.org/librusekus35790). - -### Added - -- Always show workspace switcher on dynamic workspaces. -- More descriptions to the preferences dialog. -- Notification banner position. -- Startup status for GNOME Shell 40. -- Workspace animation background color for shell theme override. -- Workspaces visibility in app grid by [@fmuellner](https://gitlab.gnome.org/fmuellner). -- Chinese (Taiwan) translation by [@r0930514](https://gitlab.com/r0930514). - -## [11.0 Whisper] - 2021-05-20 - -### Changed - -- App gesture now only works on GNOME 3.36 and 3.38. -- Donation icon to GTK4 non-compatible icon sets. -- Shell theme override is now disabled by default. -- Workspace switcher size for GNOME Shell 40 is now maxed out to 15%. - -### Fixed - -- Gap when panel position is at the bottom and shell override theme happens. -- Panel menu margin when panel is in bottom. -- Window picker icon visibility on drag. -- Workspace switcher size for multi monitor setup. -- Arabic translation by [@AliGalal](https://gitlab.com/AliGalal). -- Chinese translation by [@wsxy162](https://gitlab.com/wsxy162). -- Italian translation by [@l3nn4rt](https://gitlab.com/l3nn4rt). -- Swedish translation by [@MorganAntonsson](https://gitlab.com/MorganAntonsson). - -### Added - -- Activities button icon. -- Dash icon size. -- Window demands attention focus. - -## [10.0] - 2021-03-26 - -### Changed - -- Organized prefs UI for icons and behavior. -- Removed quotes and side bar image from prefs UI. - -### Fixed - -- Fake hot corner primary monitor position. -- Horizontal scroll in prefs. -- Primary Monitor Panel Position. -- Arabic translation by [@karem34](https://gitlab.com/karem34). -- Russian translation by [@librusekus35790](https://gitlab.com/librusekus35790). - -### Added - -- Clock menu position. -- Disable animation or change the animation speed. -- Disable applications button in dash. -- Disable app menu icon. -- Disable panel arrow in GNOME 3.36 and 3.38. -- Disable panel notification icon. -- No results found for prefs window. -- Brazilian Portuguese translation by [@Zelling](https://gitlab.com/Zelling). -- Catalan translation by [@juxuanu](https://gitlab.com/juxuanu). -- Galician translation by [@frandieguez](https://gitlab.com/frandieguez). - -## [9.0] - 2021-03-06 - -### Changed - -- Prefs interface. - -### Fixed - -- Default value for hot corner on extension disable. -- GNOME Shell 40.beta version. - -### Added - -- Disable power icon. -- Panel position. -- Support to prefs window. - -## [8.0] - 2021-02-22 - -### Changed - -- Holding back lonely overview until the final GNOME 40 release. - -### Fixed - -- Dash override theme on GNOME Shell 40 beta. -- Focus for find entry on prefs. -- Search controller for GNOME Shell 40 beta. -- Start search for GNOME Shell 40 beta. -- Workspace switcher enable related to workspace switcher size. -- Nepali translation filename by [@IBA4](https://gitlab.com/IBA4). - -## [7.0] - 2021-02-12 - -### Fixed - -- GNOME Shell 40 hidden side by side workspace preview. -- GNOME Shell 40 search padding when panel is disabled. -- Initial prefs window size. - -### Added - -- GNOME Shell 40 window picker icon visibility to the settings. -- GNOME Shell 40 workspace switcher size to the settings. -- Panel corner size to the settings. -- Search feature to the settings. -- Type to Search to the settings. -- Nepali translation by [@IBA4](https://gitlab.com/IBA4). -- Spanish translation by [@oscfdezdz](https://gitlab.com/oscfdezdz). - -## [6.0] - 2021-01-29 - -### Fixed - -- GNOME Shell 3.38 extra padding on no workspace switcher. -- GNOME Shell 40 and GTK4 support for prefs. -- GNOME Shell 40 support for search entry. -- GNOME Shell 40 support for workspace switcher. - -## [5.0] - 2021-01-05 - -### Added - -- Accessibility Menu visibility to the settings. -- Activities button visibility to the settings. -- App menu visibility to the settings. -- Clock menu visibility to the settings. -- Keyboard Layout visibility to the settings. -- System Menu (Aggregate Menu) visibility to the settings. - -### Changed - -- OSD in settings to "On Screen Display (OSD)". - -### Fixed - -- Hot corner when top panel is visible. -- Padding on no dash. -- Search top padding on no top panel. - -## [4.0] 2020-12-25 - -### Added - -- API to decouple all libraries from using GNOME Shell ui directly. -- Automate build process by [@daPhipz](https://gitlab.com/daPhipz). -- CHANGELOG.md file. -- Compatibility layer for API. -- Translation automation script by [@daPhipz](https://gitlab.com/daPhipz). - -### Changed - -- Default settings to enable. -- Displaying error for generate-mo.sh by [@daPhipz](https://gitlab.com/daPhipz). -- German translation by [@M4he](https://gitlab.com/M4he). - -### Fixed - -- Top padding on no search and no top panel. - -## [3.0] - 2020-12-21 - -### Added - -- CONTRIBUTING.md file. -- Decoupled library from GNOME Shell ui. -- Extension logo. -- Initial Translations. -- Prefs as extension settings. - -## [2.0] - 2020-11-18 - -### Fixed - -- Destroy hot corner on disable. - - -### Added - -- Disable app gesture. -- Disable background menu. -- Hide dash. -- Hide search. -- Hide top panel. -- Hide workspace switcher. -- Hot corner to toggle overview visibility. - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/executable_LICENSE b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/executable_LICENSE deleted file mode 100644 index c4dc63ae..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/executable_LICENSE +++ /dev/null @@ -1,675 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - Just Perfection GNOME Shell Desktop - Copyright (C) 2020-2024 Javad Rahmatzadeh - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Just Perfection GNOME Shell Desktop - Copyright (C) 2020-2024 Javad Rahmatzadeh - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -<http://www.gnu.org/licenses/>. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -<http://www.gnu.org/philosophy/why-not-lgpl.html>. diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/executable_extension.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/executable_extension.js deleted file mode 100644 index 960017db..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/executable_extension.js +++ /dev/null @@ -1,134 +0,0 @@ -/** - * Extension - * - * @author Javad Rahmatzadeh <j.rahmatzadeh@gmail.com> - * @copyright 2020-2024 - * @license GPL-3.0-only - */ - -import Clutter from 'gi://Clutter'; -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Meta from 'gi://Meta'; -import St from 'gi://St'; - -import * as AltTab from 'resource:///org/gnome/shell/ui/altTab.js'; -import * as BackgroundMenu from 'resource:///org/gnome/shell/ui/backgroundMenu.js'; -import * as LookingGlass from 'resource:///org/gnome/shell/ui/lookingGlass.js'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import * as MessageTray from 'resource:///org/gnome/shell/ui/messageTray.js'; -import * as OSDWindow from 'resource:///org/gnome/shell/ui/osdWindow.js'; -import * as OverviewControls from 'resource:///org/gnome/shell/ui/overviewControls.js'; -import * as Panel from 'resource:///org/gnome/shell/ui/panel.js'; -import * as PanelMenu from 'resource:///org/gnome/shell/ui/panelMenu.js'; -import * as Search from 'resource:///org/gnome/shell/ui/search.js'; -import * as SearchController from 'resource:///org/gnome/shell/ui/searchController.js'; -import * as SwitcherPopup from 'resource:///org/gnome/shell/ui/switcherPopup.js'; -import * as WindowMenu from 'resource:///org/gnome/shell/ui/windowMenu.js'; -import * as WindowPreview from 'resource:///org/gnome/shell/ui/windowPreview.js'; -import * as Workspace from 'resource:///org/gnome/shell/ui/workspace.js'; -import * as WorkspacesView from 'resource:///org/gnome/shell/ui/workspacesView.js'; -import * as WorkspaceSwitcherPopup from 'resource:///org/gnome/shell/ui/workspaceSwitcherPopup.js'; -import * as WorkspaceThumbnail from 'resource:///org/gnome/shell/ui/workspaceThumbnail.js'; - -import * as Config from 'resource:///org/gnome/shell/misc/config.js'; -import * as Util from 'resource:///org/gnome/shell/misc/util.js'; - -import {Extension} from 'resource:///org/gnome/shell/extensions/extension.js'; - -import {API} from './lib/API.js'; -import {Manager} from './lib/Manager.js'; - -/** - * Extension entry point - */ -export default class JustPerfection extends Extension -{ - /** - * Instance of API - * - * @type {API|null} - */ - #api = null; - - /** - * Instance of Manager - * - * @type {Manager|null} - */ - #manager = null; - - /** - * Enable extension - * - * @returns {void} - */ - enable() - { - const shellVersion = parseFloat(Config.PACKAGE_VERSION); - - let InterfaceSettings = new Gio.Settings({schema_id: 'org.gnome.desktop.interface'}); - - this.#api = new API( - { - Main, - BackgroundMenu, - OverviewControls, - WorkspaceSwitcherPopup, - SwitcherPopup, - InterfaceSettings, - Search, - SearchController, - WorkspaceThumbnail, - WorkspacesView, - Panel, - PanelMenu, - WindowPreview, - Workspace, - LookingGlass, - MessageTray, - OSDWindow, - WindowMenu, - AltTab, - St, - GLib, - Clutter, - Util, - Meta, - GObject, - }, - shellVersion - ); - - this.#api.open(); - - let settings = this.getSettings(); - - this.#manager = new Manager( - { - API: this.#api, - Settings: settings, - }, - shellVersion - ); - - this.#manager.registerSettingsSignals(); - this.#manager.applyAll(); - } - - /** - * Disable extension - * - * @returns {void} - */ - disable() - { - this.#manager?.revertAll(); - this.#manager = null; - - this.#api?.close(); - this.#api = null; - } -} - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/executable_prefs.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/executable_prefs.js deleted file mode 100644 index f7cea09d..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/executable_prefs.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Prefs Dialog - * - * @author Javad Rahmatzadeh <j.rahmatzadeh@gmail.com> - * @copyright 2020-2024 - * @license GPL-3.0-only - */ - -import Gtk from 'gi://Gtk'; -import Gdk from 'gi://Gdk'; -import Gio from 'gi://Gio'; - -import {ExtensionPreferences} from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; -import * as Config from 'resource:///org/gnome/Shell/Extensions/js/misc/config.js'; - -import {Prefs} from './lib/Prefs/Prefs.js'; -import {PrefsKeys} from './lib/Prefs/PrefsKeys.js'; - -/** - * Preferences window entry point - */ -export default class JustPerfectionPrefs extends ExtensionPreferences -{ - /** - * fill preferences window - * - * @returns {void} - */ - fillPreferencesWindow(window) - { - const shellVersion = parseFloat(Config.PACKAGE_VERSION); - const gettextDomain = this.metadata['gettext-domain']; - - let ResourcesFolderPath = this.path; - let prefsKeys = new PrefsKeys(shellVersion); - - let prefs = new Prefs( - { - Builder: new Gtk.Builder(), - Settings: this.getSettings(), - Gdk, - Gio, - }, - prefsKeys, - shellVersion - ); - - prefs.fillPrefsWindow(window, ResourcesFolderPath, gettextDomain); - } -} - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/executable_stylesheet.css b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/executable_stylesheet.css deleted file mode 100644 index 974d8e27..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/executable_stylesheet.css +++ /dev/null @@ -1,714 +0,0 @@ -.just-perfection -{ - font-size: small; -} - -.just-perfection .switcher-popup -{ - padding: 8px; - spacing: 24px; - font-size: small; -} - -.just-perfection .switcher-list -{ - color: #eeeeec; - background-color: rgba(0, 0, 0, .99); - border: 0 solid rgba(255, 255, 255, .16); - border-radius: 15px; - padding: 12px; - box-shadow: none; -} - -.just-perfection .switcher-list .item-box -{ - padding: 8px; - border-radius: 14px; - border: 1px solid transparent; - background-color: transparent; -} - -.just-perfection .switcher-list .item-box:outlined -{ - border: 0; - background-color: rgba(255, 255, 255, .1); - box-shadow: inset 0 2px 2px 0 rgba(0, 0, 0, .4); -} - -.just-perfection .switcher-list .item-box:selected -{ - background-color: #404040; - color: #eeeeec; -} - -.just-perfection .switcher-list .thumbnail-box -{ - padding: 2px; - spacing: 6px; -} - -.just-perfection .switcher-list .thumbnail -{ - width: 256px; -} - -.just-perfection .switcher-list .separator -{ - width: 1px; - background: #272727; -} - -.just-perfection .switcher-list .switcher-list-item-container -{ - spacing: 12px; -} - -.just-perfection .workspace-switcher-container -{ - background-color: rgba(0, 0, 0, .7); - box-shadow: none; - padding: 3px; - border: 0; - border-radius: 3px; -} - -.just-perfection .workspace-switcher -{ - background: transparent; - border: none; - border-radius: 0; - padding: 0; - spacing: 4px; -} - -.just-perfection .workspace-switcher -{ - background: rgba(0, 0, 0, .7); - box-shadow: none; - border: none; - border-radius: 5px; - padding: 0; - spacing: 4px; -} - -.just-perfection .ws-switcher-indicator, -.just-perfection .ws-switcher-indicator:active -{ - background: transparent; - background-color: rgba(255, 255, 255, .02); - height: 8px; - width: 20px; - border: 0; - border-radius: 2px; - padding: 2px; - margin: 5px; -} - -.just-perfection .ws-switcher-indicator:active -{ - background-color: rgba(255, 255, 255, .8); -} - -.just-perfection .ws-switcher-box -{ - background: transparent; - background-color: rgba(255, 255, 255, .02); - height: 10px; - background-size: 0; - border: 0; - border-radius: 1px; -} - -.just-perfection .ws-switcher-active-up, -.just-perfection .ws-switcher-active-down, -.just-perfection .ws-switcher-active-left, -.just-perfection .ws-switcher-active-right -{ - height: 10px; - background-color: rgba(255, 255, 255, .8); - border: 0; - border-radius: 1px; -} - -.just-perfection .osd-window -{ - background-color: rgba(0, 0, 0, 1); - border: 0; - border-radius: 8px; - padding: 10px; - box-shadow: none; -} - -.just-perfection .osd-window StIcon -{ - width: 22px; - height: 22px; -} - -.just-perfection .tile-preview -{ - background-color: rgba(255, 255, 255, 0.15); - border: 1px solid rgba(255, 255, 255, 0.6); - border-radius: 0; -} - -.just-perfection-api-no-search #overview -{ - spacing: 0; -} - -.just-perfection-api-no-search .overview-controls -{ - padding-top: 36px; - padding-bottom: 36px; -} - -/* commented because the icon will be shown when the window is getting dragged */ -/* icon-dropshadow isn't specific to the window picker icon but that's a quick fix for now */ -/* .just-perfection-api-no-window-picker-icon .workspaces-view StIcon */ -.just-perfection-api-no-window-picker-icon .icon-dropshadow -{ - width: 0; - height: 0; - padding: 0; -} - -.just-perfection-api-bottom-panel #overview -{ - margin-bottom: 24px; -} - -.just-perfection-api-bottom-panel .popup-menu.panel-menu -{ - margin-bottom: 0; -} - -.just-perfection-api-bottom-panel.just-perfection-api-no-panel #overview -{ - margin-bottom: 0; -} - -.just-perfection-api-no-panel #panel -{ - background-color: transparent; -} - -.just-perfection-api-no-panel-arrow .panel-button .popup-menu-arrow -{ - width: 0; - height: 0; -} - -.just-perfection-api-no-panel-notification-icon .clock-display StIcon -{ - width: 0; - height: 0; - padding: 0; -} - -.just-perfection-api-no-panel-notification-icon .clock-display-box -{ - padding: 0; - spacing: 0; -} - -.just-perfection-api-no-show-apps-button .show-apps, -.just-perfection-api-no-show-apps-button .show-apps StIcon -{ - width: 0; - margin: 0; - spacing: 0; -} - -.just-perfection-api-dash-icon-size16 #dash StIcon { height: 16px; width: 16px; } -.just-perfection-api-dash-icon-size22 #dash StIcon { height: 22px; width: 22px; } -.just-perfection-api-dash-icon-size24 #dash StIcon { height: 24px; width: 24px; } -.just-perfection-api-dash-icon-size32 #dash StIcon { height: 32px; width: 32px; } -.just-perfection-api-dash-icon-size40 #dash StIcon { height: 40px; width: 40px; } -.just-perfection-api-dash-icon-size48 #dash StIcon { height: 48px; width: 48px; } -.just-perfection-api-dash-icon-size56 #dash StIcon { height: 56px; width: 56px; } -.just-perfection-api-dash-icon-size64 #dash StIcon { height: 64px; width: 64px; } - - -.just-perfection-api-panel-button-padding-size0 .panel-button { -natural-hpadding: 0px; -minimum-hpadding: 0px; } -.just-perfection-api-panel-button-padding-size1 .panel-button { -natural-hpadding: 1px; -minimum-hpadding: 1px; } -.just-perfection-api-panel-button-padding-size2 .panel-button { -natural-hpadding: 2px; -minimum-hpadding: 2px; } -.just-perfection-api-panel-button-padding-size3 .panel-button { -natural-hpadding: 3px; -minimum-hpadding: 3px; } -.just-perfection-api-panel-button-padding-size4 .panel-button { -natural-hpadding: 4px; -minimum-hpadding: 4px; } -.just-perfection-api-panel-button-padding-size5 .panel-button { -natural-hpadding: 5px; -minimum-hpadding: 5px; } -.just-perfection-api-panel-button-padding-size6 .panel-button { -natural-hpadding: 6px; -minimum-hpadding: 6px; } -.just-perfection-api-panel-button-padding-size7 .panel-button { -natural-hpadding: 7px; -minimum-hpadding: 7px; } -.just-perfection-api-panel-button-padding-size8 .panel-button { -natural-hpadding: 8px; -minimum-hpadding: 8px; } -.just-perfection-api-panel-button-padding-size9 .panel-button { -natural-hpadding: 9px; -minimum-hpadding: 9px; } -.just-perfection-api-panel-button-padding-size10 .panel-button { -natural-hpadding: 10px; -minimum-hpadding: 10px; } -.just-perfection-api-panel-button-padding-size11 .panel-button { -natural-hpadding: 11px; -minimum-hpadding: 11px; } -.just-perfection-api-panel-button-padding-size12 .panel-button { -natural-hpadding: 12px; -minimum-hpadding: 12px; } -.just-perfection-api-panel-button-padding-size13 .panel-button { -natural-hpadding: 13px; -minimum-hpadding: 13px; } -.just-perfection-api-panel-button-padding-size14 .panel-button { -natural-hpadding: 14px; -minimum-hpadding: 14px; } -.just-perfection-api-panel-button-padding-size15 .panel-button { -natural-hpadding: 15px; -minimum-hpadding: 15px; } -.just-perfection-api-panel-button-padding-size16 .panel-button { -natural-hpadding: 16px; -minimum-hpadding: 16px; } -.just-perfection-api-panel-button-padding-size17 .panel-button { -natural-hpadding: 17px; -minimum-hpadding: 17px; } -.just-perfection-api-panel-button-padding-size18 .panel-button { -natural-hpadding: 18px; -minimum-hpadding: 18px; } -.just-perfection-api-panel-button-padding-size19 .panel-button { -natural-hpadding: 19px; -minimum-hpadding: 19px; } -.just-perfection-api-panel-button-padding-size20 .panel-button { -natural-hpadding: 20px; -minimum-hpadding: 20px; } -.just-perfection-api-panel-button-padding-size21 .panel-button { -natural-hpadding: 21px; -minimum-hpadding: 21px; } -.just-perfection-api-panel-button-padding-size22 .panel-button { -natural-hpadding: 22px; -minimum-hpadding: 22px; } -.just-perfection-api-panel-button-padding-size23 .panel-button { -natural-hpadding: 23px; -minimum-hpadding: 23px; } -.just-perfection-api-panel-button-padding-size24 .panel-button { -natural-hpadding: 24px; -minimum-hpadding: 24px; } -.just-perfection-api-panel-button-padding-size25 .panel-button { -natural-hpadding: 25px; -minimum-hpadding: 25px; } -.just-perfection-api-panel-button-padding-size26 .panel-button { -natural-hpadding: 26px; -minimum-hpadding: 26px; } -.just-perfection-api-panel-button-padding-size27 .panel-button { -natural-hpadding: 27px; -minimum-hpadding: 27px; } -.just-perfection-api-panel-button-padding-size28 .panel-button { -natural-hpadding: 28px; -minimum-hpadding: 28px; } -.just-perfection-api-panel-button-padding-size29 .panel-button { -natural-hpadding: 29px; -minimum-hpadding: 29px; } -.just-perfection-api-panel-button-padding-size30 .panel-button { -natural-hpadding: 30px; -minimum-hpadding: 30px; } -.just-perfection-api-panel-button-padding-size31 .panel-button { -natural-hpadding: 31px; -minimum-hpadding: 31px; } -.just-perfection-api-panel-button-padding-size32 .panel-button { -natural-hpadding: 32px; -minimum-hpadding: 32px; } -.just-perfection-api-panel-button-padding-size33 .panel-button { -natural-hpadding: 33px; -minimum-hpadding: 33px; } -.just-perfection-api-panel-button-padding-size34 .panel-button { -natural-hpadding: 34px; -minimum-hpadding: 34px; } -.just-perfection-api-panel-button-padding-size35 .panel-button { -natural-hpadding: 35px; -minimum-hpadding: 35px; } -.just-perfection-api-panel-button-padding-size36 .panel-button { -natural-hpadding: 36px; -minimum-hpadding: 36px; } -.just-perfection-api-panel-button-padding-size37 .panel-button { -natural-hpadding: 37px; -minimum-hpadding: 37px; } -.just-perfection-api-panel-button-padding-size38 .panel-button { -natural-hpadding: 38px; -minimum-hpadding: 38px; } -.just-perfection-api-panel-button-padding-size39 .panel-button { -natural-hpadding: 39px; -minimum-hpadding: 39px; } -.just-perfection-api-panel-button-padding-size40 .panel-button { -natural-hpadding: 40px; -minimum-hpadding: 40px; } -.just-perfection-api-panel-button-padding-size41 .panel-button { -natural-hpadding: 41px; -minimum-hpadding: 41px; } -.just-perfection-api-panel-button-padding-size42 .panel-button { -natural-hpadding: 42px; -minimum-hpadding: 42px; } -.just-perfection-api-panel-button-padding-size43 .panel-button { -natural-hpadding: 43px; -minimum-hpadding: 43px; } -.just-perfection-api-panel-button-padding-size44 .panel-button { -natural-hpadding: 44px; -minimum-hpadding: 44px; } -.just-perfection-api-panel-button-padding-size45 .panel-button { -natural-hpadding: 45px; -minimum-hpadding: 45px; } -.just-perfection-api-panel-button-padding-size46 .panel-button { -natural-hpadding: 46px; -minimum-hpadding: 46px; } -.just-perfection-api-panel-button-padding-size47 .panel-button { -natural-hpadding: 47px; -minimum-hpadding: 47px; } -.just-perfection-api-panel-button-padding-size48 .panel-button { -natural-hpadding: 48px; -minimum-hpadding: 48px; } -.just-perfection-api-panel-button-padding-size49 .panel-button { -natural-hpadding: 49px; -minimum-hpadding: 49px; } -.just-perfection-api-panel-button-padding-size50 .panel-button { -natural-hpadding: 50px; -minimum-hpadding: 50px; } -.just-perfection-api-panel-button-padding-size51 .panel-button { -natural-hpadding: 51px; -minimum-hpadding: 51px; } -.just-perfection-api-panel-button-padding-size52 .panel-button { -natural-hpadding: 52px; -minimum-hpadding: 52px; } -.just-perfection-api-panel-button-padding-size53 .panel-button { -natural-hpadding: 53px; -minimum-hpadding: 53px; } -.just-perfection-api-panel-button-padding-size54 .panel-button { -natural-hpadding: 54px; -minimum-hpadding: 54px; } -.just-perfection-api-panel-button-padding-size55 .panel-button { -natural-hpadding: 55px; -minimum-hpadding: 55px; } -.just-perfection-api-panel-button-padding-size56 .panel-button { -natural-hpadding: 56px; -minimum-hpadding: 56px; } -.just-perfection-api-panel-button-padding-size57 .panel-button { -natural-hpadding: 57px; -minimum-hpadding: 57px; } -.just-perfection-api-panel-button-padding-size58 .panel-button { -natural-hpadding: 58px; -minimum-hpadding: 58px; } -.just-perfection-api-panel-button-padding-size59 .panel-button { -natural-hpadding: 59px; -minimum-hpadding: 59px; } -.just-perfection-api-panel-button-padding-size60 .panel-button { -natural-hpadding: 60px; -minimum-hpadding: 60px; } - -.just-perfection-api-no-window-caption .window-caption -{ - spacing: 0; - background-color: transparent; - border-radius: 0; - border: 0; - padding: 0; - font-size: 0; -} - -.just-perfection-api-workspace-background-radius-size0 .workspace-background { border-radius: 0; } -.just-perfection-api-workspace-background-radius-size1 .workspace-background { border-radius: 1px; } -.just-perfection-api-workspace-background-radius-size2 .workspace-background { border-radius: 2px; } -.just-perfection-api-workspace-background-radius-size3 .workspace-background { border-radius: 3px; } -.just-perfection-api-workspace-background-radius-size4 .workspace-background { border-radius: 4px; } -.just-perfection-api-workspace-background-radius-size5 .workspace-background { border-radius: 5px; } -.just-perfection-api-workspace-background-radius-size6 .workspace-background { border-radius: 6px; } -.just-perfection-api-workspace-background-radius-size7 .workspace-background { border-radius: 7px; } -.just-perfection-api-workspace-background-radius-size8 .workspace-background { border-radius: 8px; } -.just-perfection-api-workspace-background-radius-size9 .workspace-background { border-radius: 9px; } -.just-perfection-api-workspace-background-radius-size10 .workspace-background { border-radius: 10px; } -.just-perfection-api-workspace-background-radius-size11 .workspace-background { border-radius: 11px; } -.just-perfection-api-workspace-background-radius-size12 .workspace-background { border-radius: 12px; } -.just-perfection-api-workspace-background-radius-size13 .workspace-background { border-radius: 13px; } -.just-perfection-api-workspace-background-radius-size14 .workspace-background { border-radius: 14px; } -.just-perfection-api-workspace-background-radius-size15 .workspace-background { border-radius: 15px; } -.just-perfection-api-workspace-background-radius-size16 .workspace-background { border-radius: 16px; } -.just-perfection-api-workspace-background-radius-size17 .workspace-background { border-radius: 17px; } -.just-perfection-api-workspace-background-radius-size18 .workspace-background { border-radius: 18px; } -.just-perfection-api-workspace-background-radius-size19 .workspace-background { border-radius: 19px; } -.just-perfection-api-workspace-background-radius-size20 .workspace-background { border-radius: 20px; } -.just-perfection-api-workspace-background-radius-size21 .workspace-background { border-radius: 21px; } -.just-perfection-api-workspace-background-radius-size22 .workspace-background { border-radius: 22px; } -.just-perfection-api-workspace-background-radius-size23 .workspace-background { border-radius: 23px; } -.just-perfection-api-workspace-background-radius-size24 .workspace-background { border-radius: 24px; } -.just-perfection-api-workspace-background-radius-size25 .workspace-background { border-radius: 25px; } -.just-perfection-api-workspace-background-radius-size26 .workspace-background { border-radius: 26px; } -.just-perfection-api-workspace-background-radius-size27 .workspace-background { border-radius: 27px; } -.just-perfection-api-workspace-background-radius-size28 .workspace-background { border-radius: 28px; } -.just-perfection-api-workspace-background-radius-size29 .workspace-background { border-radius: 29px; } -.just-perfection-api-workspace-background-radius-size30 .workspace-background { border-radius: 30px; } -.just-perfection-api-workspace-background-radius-size31 .workspace-background { border-radius: 31px; } -.just-perfection-api-workspace-background-radius-size32 .workspace-background { border-radius: 32px; } -.just-perfection-api-workspace-background-radius-size33 .workspace-background { border-radius: 33px; } -.just-perfection-api-workspace-background-radius-size34 .workspace-background { border-radius: 34px; } -.just-perfection-api-workspace-background-radius-size35 .workspace-background { border-radius: 35px; } -.just-perfection-api-workspace-background-radius-size36 .workspace-background { border-radius: 36px; } -.just-perfection-api-workspace-background-radius-size37 .workspace-background { border-radius: 37px; } -.just-perfection-api-workspace-background-radius-size38 .workspace-background { border-radius: 38px; } -.just-perfection-api-workspace-background-radius-size39 .workspace-background { border-radius: 39px; } -.just-perfection-api-workspace-background-radius-size40 .workspace-background { border-radius: 40px; } -.just-perfection-api-workspace-background-radius-size41 .workspace-background { border-radius: 41px; } -.just-perfection-api-workspace-background-radius-size42 .workspace-background { border-radius: 42px; } -.just-perfection-api-workspace-background-radius-size43 .workspace-background { border-radius: 43px; } -.just-perfection-api-workspace-background-radius-size44 .workspace-background { border-radius: 44px; } -.just-perfection-api-workspace-background-radius-size45 .workspace-background { border-radius: 45px; } -.just-perfection-api-workspace-background-radius-size46 .workspace-background { border-radius: 46px; } -.just-perfection-api-workspace-background-radius-size47 .workspace-background { border-radius: 47px; } -.just-perfection-api-workspace-background-radius-size48 .workspace-background { border-radius: 48px; } -.just-perfection-api-workspace-background-radius-size49 .workspace-background { border-radius: 49px; } -.just-perfection-api-workspace-background-radius-size50 .workspace-background { border-radius: 50px; } -.just-perfection-api-workspace-background-radius-size51 .workspace-background { border-radius: 51px; } -.just-perfection-api-workspace-background-radius-size52 .workspace-background { border-radius: 52px; } -.just-perfection-api-workspace-background-radius-size53 .workspace-background { border-radius: 53px; } -.just-perfection-api-workspace-background-radius-size54 .workspace-background { border-radius: 54px; } -.just-perfection-api-workspace-background-radius-size55 .workspace-background { border-radius: 55px; } -.just-perfection-api-workspace-background-radius-size56 .workspace-background { border-radius: 56px; } -.just-perfection-api-workspace-background-radius-size57 .workspace-background { border-radius: 57px; } -.just-perfection-api-workspace-background-radius-size58 .workspace-background { border-radius: 58px; } -.just-perfection-api-workspace-background-radius-size59 .workspace-background { border-radius: 59px; } -.just-perfection-api-workspace-background-radius-size60 .workspace-background { border-radius: 60px; } - -.just-perfection-api-panel-indicator-padding-size0 .panel-status-indicators-box { spacing: 0; } -.just-perfection-api-panel-indicator-padding-size1 .panel-status-indicators-box { spacing: 1px; } -.just-perfection-api-panel-indicator-padding-size2 .panel-status-indicators-box { spacing: 2px; } -.just-perfection-api-panel-indicator-padding-size3 .panel-status-indicators-box { spacing: 3px; } -.just-perfection-api-panel-indicator-padding-size4 .panel-status-indicators-box { spacing: 4px; } -.just-perfection-api-panel-indicator-padding-size5 .panel-status-indicators-box { spacing: 5px; } -.just-perfection-api-panel-indicator-padding-size6 .panel-status-indicators-box { spacing: 6px; } -.just-perfection-api-panel-indicator-padding-size7 .panel-status-indicators-box { spacing: 7px; } -.just-perfection-api-panel-indicator-padding-size8 .panel-status-indicators-box { spacing: 8px; } -.just-perfection-api-panel-indicator-padding-size9 .panel-status-indicators-box { spacing: 9px; } -.just-perfection-api-panel-indicator-padding-size10 .panel-status-indicators-box { spacing: 10px; } -.just-perfection-api-panel-indicator-padding-size11 .panel-status-indicators-box { spacing: 11px; } -.just-perfection-api-panel-indicator-padding-size12 .panel-status-indicators-box { spacing: 12px; } -.just-perfection-api-panel-indicator-padding-size13 .panel-status-indicators-box { spacing: 13px; } -.just-perfection-api-panel-indicator-padding-size14 .panel-status-indicators-box { spacing: 14px; } -.just-perfection-api-panel-indicator-padding-size15 .panel-status-indicators-box { spacing: 15px; } -.just-perfection-api-panel-indicator-padding-size16 .panel-status-indicators-box { spacing: 16px; } -.just-perfection-api-panel-indicator-padding-size17 .panel-status-indicators-box { spacing: 17px; } -.just-perfection-api-panel-indicator-padding-size18 .panel-status-indicators-box { spacing: 18px; } -.just-perfection-api-panel-indicator-padding-size19 .panel-status-indicators-box { spacing: 19px; } -.just-perfection-api-panel-indicator-padding-size20 .panel-status-indicators-box { spacing: 20px; } -.just-perfection-api-panel-indicator-padding-size21 .panel-status-indicators-box { spacing: 21px; } -.just-perfection-api-panel-indicator-padding-size22 .panel-status-indicators-box { spacing: 22px; } -.just-perfection-api-panel-indicator-padding-size23 .panel-status-indicators-box { spacing: 23px; } -.just-perfection-api-panel-indicator-padding-size24 .panel-status-indicators-box { spacing: 24px; } -.just-perfection-api-panel-indicator-padding-size25 .panel-status-indicators-box { spacing: 25px; } -.just-perfection-api-panel-indicator-padding-size26 .panel-status-indicators-box { spacing: 26px; } -.just-perfection-api-panel-indicator-padding-size27 .panel-status-indicators-box { spacing: 27px; } -.just-perfection-api-panel-indicator-padding-size28 .panel-status-indicators-box { spacing: 28px; } -.just-perfection-api-panel-indicator-padding-size29 .panel-status-indicators-box { spacing: 29px; } -.just-perfection-api-panel-indicator-padding-size30 .panel-status-indicators-box { spacing: 30px; } -.just-perfection-api-panel-indicator-padding-size31 .panel-status-indicators-box { spacing: 31px; } -.just-perfection-api-panel-indicator-padding-size32 .panel-status-indicators-box { spacing: 32px; } -.just-perfection-api-panel-indicator-padding-size33 .panel-status-indicators-box { spacing: 33px; } -.just-perfection-api-panel-indicator-padding-size34 .panel-status-indicators-box { spacing: 34px; } -.just-perfection-api-panel-indicator-padding-size35 .panel-status-indicators-box { spacing: 35px; } -.just-perfection-api-panel-indicator-padding-size36 .panel-status-indicators-box { spacing: 36px; } -.just-perfection-api-panel-indicator-padding-size37 .panel-status-indicators-box { spacing: 37px; } -.just-perfection-api-panel-indicator-padding-size38 .panel-status-indicators-box { spacing: 38px; } -.just-perfection-api-panel-indicator-padding-size39 .panel-status-indicators-box { spacing: 39px; } -.just-perfection-api-panel-indicator-padding-size40 .panel-status-indicators-box { spacing: 40px; } -.just-perfection-api-panel-indicator-padding-size41 .panel-status-indicators-box { spacing: 41px; } -.just-perfection-api-panel-indicator-padding-size42 .panel-status-indicators-box { spacing: 42px; } -.just-perfection-api-panel-indicator-padding-size43 .panel-status-indicators-box { spacing: 43px; } -.just-perfection-api-panel-indicator-padding-size44 .panel-status-indicators-box { spacing: 44px; } -.just-perfection-api-panel-indicator-padding-size45 .panel-status-indicators-box { spacing: 45px; } -.just-perfection-api-panel-indicator-padding-size46 .panel-status-indicators-box { spacing: 46px; } -.just-perfection-api-panel-indicator-padding-size47 .panel-status-indicators-box { spacing: 47px; } -.just-perfection-api-panel-indicator-padding-size48 .panel-status-indicators-box { spacing: 48px; } -.just-perfection-api-panel-indicator-padding-size49 .panel-status-indicators-box { spacing: 49px; } -.just-perfection-api-panel-indicator-padding-size50 .panel-status-indicators-box { spacing: 50px; } -.just-perfection-api-panel-indicator-padding-size51 .panel-status-indicators-box { spacing: 51px; } -.just-perfection-api-panel-indicator-padding-size52 .panel-status-indicators-box { spacing: 52px; } -.just-perfection-api-panel-indicator-padding-size53 .panel-status-indicators-box { spacing: 53px; } -.just-perfection-api-panel-indicator-padding-size54 .panel-status-indicators-box { spacing: 54px; } -.just-perfection-api-panel-indicator-padding-size55 .panel-status-indicators-box { spacing: 55px; } -.just-perfection-api-panel-indicator-padding-size56 .panel-status-indicators-box { spacing: 56px; } -.just-perfection-api-panel-indicator-padding-size57 .panel-status-indicators-box { spacing: 57px; } -.just-perfection-api-panel-indicator-padding-size58 .panel-status-indicators-box { spacing: 58px; } -.just-perfection-api-panel-indicator-padding-size59 .panel-status-indicators-box { spacing: 59px; } -.just-perfection-api-panel-indicator-padding-size60 .panel-status-indicators-box { spacing: 60px; } - -.just-perfection-api-no-window-close .window-close, -.just-perfection-api-no-window-close.just-perfection .window-close -{ - height: 0; - width: 30px; - background: transparent; - border-radius: 0; - border: 0; - spacing: 0; - box-shadow: none; -} - -.just-perfection-api-no-ripple-box .ripple-box -{ - background-color: transparent; -} - -/** - * This can refresh other styles that is not inculding any standard css styles. - * values are not important here. Just do something that can change the look - */ -.just-perfection-api-refresh-styles .panel-button, -.just-perfection-api-refresh-styles .panel-status-indicators-box, -.just-perfection-api-refresh-styles .panel-button StIcon, -.just-perfection-api-refresh-styles .system-status-icon -{ - background-color: gold; - color: gold; - border-radius: 100px; -} - -.just-perfection-api-no-weather .weather-button, -.just-perfection-api-no-weather .weather-button *, -.just-perfection-api-no-events-button .events-button, -.just-perfection-api-no-events-button .events-button *, -.just-perfection-api-no-screen-sharing-indicator .screen-sharing-indicator, -.just-perfection-api-no-screen-sharing-indicator .screen-sharing-indicator *, -.just-perfection-api-no-screen-recording-indicator .screen-recording-indicator, -.just-perfection-api-no-screen-recording-indicator .screen-recording-indicator * -{ - padding: 0; - margin: 0; - border: 0; - height: 0; - width: 0; -} - -.just-perfection-api-panel-icon-size1 .system-status-icon, .just-perfection-api-panel-icon-size1 .panel-button StIcon { icon-size: 1px; } -.just-perfection-api-panel-icon-size2 .system-status-icon, .just-perfection-api-panel-icon-size2 .panel-button StIcon { icon-size: 2px; } -.just-perfection-api-panel-icon-size3 .system-status-icon, .just-perfection-api-panel-icon-size3 .panel-button StIcon { icon-size: 3px; } -.just-perfection-api-panel-icon-size4 .system-status-icon, .just-perfection-api-panel-icon-size4 .panel-button StIcon { icon-size: 4px; } -.just-perfection-api-panel-icon-size5 .system-status-icon, .just-perfection-api-panel-icon-size5 .panel-button StIcon { icon-size: 5px; } -.just-perfection-api-panel-icon-size6 .system-status-icon, .just-perfection-api-panel-icon-size6 .panel-button StIcon { icon-size: 6px; } -.just-perfection-api-panel-icon-size7 .system-status-icon, .just-perfection-api-panel-icon-size7 .panel-button StIcon { icon-size: 7px; } -.just-perfection-api-panel-icon-size8 .system-status-icon, .just-perfection-api-panel-icon-size8 .panel-button StIcon { icon-size: 8px; } -.just-perfection-api-panel-icon-size9 .system-status-icon, .just-perfection-api-panel-icon-size9 .panel-button StIcon { icon-size: 9px; } -.just-perfection-api-panel-icon-size10 .system-status-icon, .just-perfection-api-panel-icon-size10 .panel-button StIcon { icon-size: 10px; } -.just-perfection-api-panel-icon-size11 .system-status-icon, .just-perfection-api-panel-icon-size11 .panel-button StIcon { icon-size: 11px; } -.just-perfection-api-panel-icon-size12 .system-status-icon, .just-perfection-api-panel-icon-size12 .panel-button StIcon { icon-size: 12px; } -.just-perfection-api-panel-icon-size13 .system-status-icon, .just-perfection-api-panel-icon-size13 .panel-button StIcon { icon-size: 13px; } -.just-perfection-api-panel-icon-size14 .system-status-icon, .just-perfection-api-panel-icon-size14 .panel-button StIcon { icon-size: 14px; } -.just-perfection-api-panel-icon-size15 .system-status-icon, .just-perfection-api-panel-icon-size15 .panel-button StIcon { icon-size: 15px; } -.just-perfection-api-panel-icon-size16 .system-status-icon, .just-perfection-api-panel-icon-size16 .panel-button StIcon { icon-size: 16px; } -.just-perfection-api-panel-icon-size17 .system-status-icon, .just-perfection-api-panel-icon-size17 .panel-button StIcon { icon-size: 17px; } -.just-perfection-api-panel-icon-size18 .system-status-icon, .just-perfection-api-panel-icon-size18 .panel-button StIcon { icon-size: 18px; } -.just-perfection-api-panel-icon-size19 .system-status-icon, .just-perfection-api-panel-icon-size19 .panel-button StIcon { icon-size: 19px; } -.just-perfection-api-panel-icon-size20 .system-status-icon, .just-perfection-api-panel-icon-size20 .panel-button StIcon { icon-size: 20px; } -.just-perfection-api-panel-icon-size21 .system-status-icon, .just-perfection-api-panel-icon-size21 .panel-button StIcon { icon-size: 21px; } -.just-perfection-api-panel-icon-size22 .system-status-icon, .just-perfection-api-panel-icon-size22 .panel-button StIcon { icon-size: 22px; } -.just-perfection-api-panel-icon-size23 .system-status-icon, .just-perfection-api-panel-icon-size23 .panel-button StIcon { icon-size: 23px; } -.just-perfection-api-panel-icon-size24 .system-status-icon, .just-perfection-api-panel-icon-size24 .panel-button StIcon { icon-size: 24px; } -.just-perfection-api-panel-icon-size25 .system-status-icon, .just-perfection-api-panel-icon-size25 .panel-button StIcon { icon-size: 25px; } -.just-perfection-api-panel-icon-size26 .system-status-icon, .just-perfection-api-panel-icon-size26 .panel-button StIcon { icon-size: 26px; } -.just-perfection-api-panel-icon-size27 .system-status-icon, .just-perfection-api-panel-icon-size27 .panel-button StIcon { icon-size: 27px; } -.just-perfection-api-panel-icon-size28 .system-status-icon, .just-perfection-api-panel-icon-size28 .panel-button StIcon { icon-size: 28px; } -.just-perfection-api-panel-icon-size29 .system-status-icon, .just-perfection-api-panel-icon-size29 .panel-button StIcon { icon-size: 29px; } -.just-perfection-api-panel-icon-size30 .system-status-icon, .just-perfection-api-panel-icon-size30 .panel-button StIcon { icon-size: 30px; } -.just-perfection-api-panel-icon-size31 .system-status-icon, .just-perfection-api-panel-icon-size31 .panel-button StIcon { icon-size: 31px; } -.just-perfection-api-panel-icon-size32 .system-status-icon, .just-perfection-api-panel-icon-size32 .panel-button StIcon { icon-size: 32px; } -.just-perfection-api-panel-icon-size33 .system-status-icon, .just-perfection-api-panel-icon-size33 .panel-button StIcon { icon-size: 33px; } -.just-perfection-api-panel-icon-size34 .system-status-icon, .just-perfection-api-panel-icon-size34 .panel-button StIcon { icon-size: 34px; } -.just-perfection-api-panel-icon-size35 .system-status-icon, .just-perfection-api-panel-icon-size35 .panel-button StIcon { icon-size: 35px; } -.just-perfection-api-panel-icon-size36 .system-status-icon, .just-perfection-api-panel-icon-size36 .panel-button StIcon { icon-size: 36px; } -.just-perfection-api-panel-icon-size37 .system-status-icon, .just-perfection-api-panel-icon-size37 .panel-button StIcon { icon-size: 37px; } -.just-perfection-api-panel-icon-size38 .system-status-icon, .just-perfection-api-panel-icon-size38 .panel-button StIcon { icon-size: 38px; } -.just-perfection-api-panel-icon-size39 .system-status-icon, .just-perfection-api-panel-icon-size39 .panel-button StIcon { icon-size: 39px; } -.just-perfection-api-panel-icon-size40 .system-status-icon, .just-perfection-api-panel-icon-size40 .panel-button StIcon { icon-size: 40px; } -.just-perfection-api-panel-icon-size41 .system-status-icon, .just-perfection-api-panel-icon-size41 .panel-button StIcon { icon-size: 41px; } -.just-perfection-api-panel-icon-size42 .system-status-icon, .just-perfection-api-panel-icon-size42 .panel-button StIcon { icon-size: 42px; } -.just-perfection-api-panel-icon-size43 .system-status-icon, .just-perfection-api-panel-icon-size43 .panel-button StIcon { icon-size: 43px; } -.just-perfection-api-panel-icon-size44 .system-status-icon, .just-perfection-api-panel-icon-size44 .panel-button StIcon { icon-size: 44px; } -.just-perfection-api-panel-icon-size45 .system-status-icon, .just-perfection-api-panel-icon-size45 .panel-button StIcon { icon-size: 45px; } -.just-perfection-api-panel-icon-size46 .system-status-icon, .just-perfection-api-panel-icon-size46 .panel-button StIcon { icon-size: 46px; } -.just-perfection-api-panel-icon-size47 .system-status-icon, .just-perfection-api-panel-icon-size47 .panel-button StIcon { icon-size: 47px; } -.just-perfection-api-panel-icon-size48 .system-status-icon, .just-perfection-api-panel-icon-size48 .panel-button StIcon { icon-size: 48px; } -.just-perfection-api-panel-icon-size49 .system-status-icon, .just-perfection-api-panel-icon-size49 .panel-button StIcon { icon-size: 49px; } -.just-perfection-api-panel-icon-size50 .system-status-icon, .just-perfection-api-panel-icon-size50 .panel-button StIcon { icon-size: 50px; } -.just-perfection-api-panel-icon-size51 .system-status-icon, .just-perfection-api-panel-icon-size51 .panel-button StIcon { icon-size: 51px; } -.just-perfection-api-panel-icon-size52 .system-status-icon, .just-perfection-api-panel-icon-size52 .panel-button StIcon { icon-size: 52px; } -.just-perfection-api-panel-icon-size53 .system-status-icon, .just-perfection-api-panel-icon-size53 .panel-button StIcon { icon-size: 53px; } -.just-perfection-api-panel-icon-size54 .system-status-icon, .just-perfection-api-panel-icon-size54 .panel-button StIcon { icon-size: 54px; } -.just-perfection-api-panel-icon-size55 .system-status-icon, .just-perfection-api-panel-icon-size55 .panel-button StIcon { icon-size: 55px; } -.just-perfection-api-panel-icon-size56 .system-status-icon, .just-perfection-api-panel-icon-size56 .panel-button StIcon { icon-size: 56px; } -.just-perfection-api-panel-icon-size57 .system-status-icon, .just-perfection-api-panel-icon-size57 .panel-button StIcon { icon-size: 57px; } -.just-perfection-api-panel-icon-size58 .system-status-icon, .just-perfection-api-panel-icon-size58 .panel-button StIcon { icon-size: 58px; } -.just-perfection-api-panel-icon-size59 .system-status-icon, .just-perfection-api-panel-icon-size59 .panel-button StIcon { icon-size: 59px; } -.just-perfection-api-panel-icon-size60 .system-status-icon, .just-perfection-api-panel-icon-size60 .panel-button StIcon { icon-size: 60px; } - -.just-perfection-api-controls-manager-spacing-size0 .controls-manager, .just-perfection-api-controls-manager-spacing-size0 .secondary-monitor-workspaces { spacing: 0; } -.just-perfection-api-controls-manager-spacing-size1 .controls-manager, .just-perfection-api-controls-manager-spacing-size1 .secondary-monitor-workspaces { spacing: 1px; } -.just-perfection-api-controls-manager-spacing-size2 .controls-manager, .just-perfection-api-controls-manager-spacing-size2 .secondary-monitor-workspaces { spacing: 2px; } -.just-perfection-api-controls-manager-spacing-size3 .controls-manager, .just-perfection-api-controls-manager-spacing-size3 .secondary-monitor-workspaces { spacing: 3px; } -.just-perfection-api-controls-manager-spacing-size4 .controls-manager, .just-perfection-api-controls-manager-spacing-size4 .secondary-monitor-workspaces { spacing: 4px; } -.just-perfection-api-controls-manager-spacing-size5 .controls-manager, .just-perfection-api-controls-manager-spacing-size5 .secondary-monitor-workspaces { spacing: 5px; } -.just-perfection-api-controls-manager-spacing-size6 .controls-manager, .just-perfection-api-controls-manager-spacing-size6 .secondary-monitor-workspaces { spacing: 6px; } -.just-perfection-api-controls-manager-spacing-size7 .controls-manager, .just-perfection-api-controls-manager-spacing-size7 .secondary-monitor-workspaces { spacing: 7px; } -.just-perfection-api-controls-manager-spacing-size8 .controls-manager, .just-perfection-api-controls-manager-spacing-size8 .secondary-monitor-workspaces { spacing: 8px; } -.just-perfection-api-controls-manager-spacing-size9 .controls-manager, .just-perfection-api-controls-manager-spacing-size9 .secondary-monitor-workspaces { spacing: 9px; } -.just-perfection-api-controls-manager-spacing-size10 .controls-manager, .just-perfection-api-controls-manager-spacing-size10 .secondary-monitor-workspaces { spacing: 10px; } -.just-perfection-api-controls-manager-spacing-size11 .controls-manager, .just-perfection-api-controls-manager-spacing-size11 .secondary-monitor-workspaces { spacing: 11px; } -.just-perfection-api-controls-manager-spacing-size12 .controls-manager, .just-perfection-api-controls-manager-spacing-size12 .secondary-monitor-workspaces { spacing: 12px; } -.just-perfection-api-controls-manager-spacing-size13 .controls-manager, .just-perfection-api-controls-manager-spacing-size13 .secondary-monitor-workspaces { spacing: 13px; } -.just-perfection-api-controls-manager-spacing-size14 .controls-manager, .just-perfection-api-controls-manager-spacing-size14 .secondary-monitor-workspaces { spacing: 14px; } -.just-perfection-api-controls-manager-spacing-size15 .controls-manager, .just-perfection-api-controls-manager-spacing-size15 .secondary-monitor-workspaces { spacing: 15px; } -.just-perfection-api-controls-manager-spacing-size16 .controls-manager, .just-perfection-api-controls-manager-spacing-size16 .secondary-monitor-workspaces { spacing: 16px; } -.just-perfection-api-controls-manager-spacing-size17 .controls-manager, .just-perfection-api-controls-manager-spacing-size17 .secondary-monitor-workspaces { spacing: 17px; } -.just-perfection-api-controls-manager-spacing-size18 .controls-manager, .just-perfection-api-controls-manager-spacing-size18 .secondary-monitor-workspaces { spacing: 18px; } -.just-perfection-api-controls-manager-spacing-size19 .controls-manager, .just-perfection-api-controls-manager-spacing-size19 .secondary-monitor-workspaces { spacing: 19px; } -.just-perfection-api-controls-manager-spacing-size20 .controls-manager, .just-perfection-api-controls-manager-spacing-size20 .secondary-monitor-workspaces { spacing: 20px; } -.just-perfection-api-controls-manager-spacing-size21 .controls-manager, .just-perfection-api-controls-manager-spacing-size21 .secondary-monitor-workspaces { spacing: 21px; } -.just-perfection-api-controls-manager-spacing-size22 .controls-manager, .just-perfection-api-controls-manager-spacing-size22 .secondary-monitor-workspaces { spacing: 22px; } -.just-perfection-api-controls-manager-spacing-size23 .controls-manager, .just-perfection-api-controls-manager-spacing-size23 .secondary-monitor-workspaces { spacing: 23px; } -.just-perfection-api-controls-manager-spacing-size24 .controls-manager, .just-perfection-api-controls-manager-spacing-size24 .secondary-monitor-workspaces { spacing: 24px; } -.just-perfection-api-controls-manager-spacing-size25 .controls-manager, .just-perfection-api-controls-manager-spacing-size25 .secondary-monitor-workspaces { spacing: 25px; } -.just-perfection-api-controls-manager-spacing-size26 .controls-manager, .just-perfection-api-controls-manager-spacing-size26 .secondary-monitor-workspaces { spacing: 26px; } -.just-perfection-api-controls-manager-spacing-size27 .controls-manager, .just-perfection-api-controls-manager-spacing-size27 .secondary-monitor-workspaces { spacing: 27px; } -.just-perfection-api-controls-manager-spacing-size28 .controls-manager, .just-perfection-api-controls-manager-spacing-size28 .secondary-monitor-workspaces { spacing: 28px; } -.just-perfection-api-controls-manager-spacing-size29 .controls-manager, .just-perfection-api-controls-manager-spacing-size29 .secondary-monitor-workspaces { spacing: 29px; } -.just-perfection-api-controls-manager-spacing-size30 .controls-manager, .just-perfection-api-controls-manager-spacing-size30 .secondary-monitor-workspaces { spacing: 30px; } -.just-perfection-api-controls-manager-spacing-size31 .controls-manager, .just-perfection-api-controls-manager-spacing-size31 .secondary-monitor-workspaces { spacing: 31px; } -.just-perfection-api-controls-manager-spacing-size32 .controls-manager, .just-perfection-api-controls-manager-spacing-size32 .secondary-monitor-workspaces { spacing: 32px; } -.just-perfection-api-controls-manager-spacing-size33 .controls-manager, .just-perfection-api-controls-manager-spacing-size33 .secondary-monitor-workspaces { spacing: 33px; } -.just-perfection-api-controls-manager-spacing-size34 .controls-manager, .just-perfection-api-controls-manager-spacing-size34 .secondary-monitor-workspaces { spacing: 34px; } -.just-perfection-api-controls-manager-spacing-size35 .controls-manager, .just-perfection-api-controls-manager-spacing-size35 .secondary-monitor-workspaces { spacing: 35px; } -.just-perfection-api-controls-manager-spacing-size36 .controls-manager, .just-perfection-api-controls-manager-spacing-size36 .secondary-monitor-workspaces { spacing: 36px; } -.just-perfection-api-controls-manager-spacing-size37 .controls-manager, .just-perfection-api-controls-manager-spacing-size37 .secondary-monitor-workspaces { spacing: 37px; } -.just-perfection-api-controls-manager-spacing-size38 .controls-manager, .just-perfection-api-controls-manager-spacing-size38 .secondary-monitor-workspaces { spacing: 38px; } -.just-perfection-api-controls-manager-spacing-size39 .controls-manager, .just-perfection-api-controls-manager-spacing-size39 .secondary-monitor-workspaces { spacing: 39px; } -.just-perfection-api-controls-manager-spacing-size40 .controls-manager, .just-perfection-api-controls-manager-spacing-size40 .secondary-monitor-workspaces { spacing: 40px; } -.just-perfection-api-controls-manager-spacing-size41 .controls-manager, .just-perfection-api-controls-manager-spacing-size41 .secondary-monitor-workspaces { spacing: 41px; } -.just-perfection-api-controls-manager-spacing-size42 .controls-manager, .just-perfection-api-controls-manager-spacing-size42 .secondary-monitor-workspaces { spacing: 42px; } -.just-perfection-api-controls-manager-spacing-size43 .controls-manager, .just-perfection-api-controls-manager-spacing-size43 .secondary-monitor-workspaces { spacing: 43px; } -.just-perfection-api-controls-manager-spacing-size44 .controls-manager, .just-perfection-api-controls-manager-spacing-size44 .secondary-monitor-workspaces { spacing: 44px; } -.just-perfection-api-controls-manager-spacing-size45 .controls-manager, .just-perfection-api-controls-manager-spacing-size45 .secondary-monitor-workspaces { spacing: 45px; } -.just-perfection-api-controls-manager-spacing-size46 .controls-manager, .just-perfection-api-controls-manager-spacing-size46 .secondary-monitor-workspaces { spacing: 46px; } -.just-perfection-api-controls-manager-spacing-size47 .controls-manager, .just-perfection-api-controls-manager-spacing-size47 .secondary-monitor-workspaces { spacing: 47px; } -.just-perfection-api-controls-manager-spacing-size48 .controls-manager, .just-perfection-api-controls-manager-spacing-size48 .secondary-monitor-workspaces { spacing: 48px; } -.just-perfection-api-controls-manager-spacing-size49 .controls-manager, .just-perfection-api-controls-manager-spacing-size49 .secondary-monitor-workspaces { spacing: 49px; } -.just-perfection-api-controls-manager-spacing-size50 .controls-manager, .just-perfection-api-controls-manager-spacing-size50 .secondary-monitor-workspaces { spacing: 50px; } -.just-perfection-api-controls-manager-spacing-size51 .controls-manager, .just-perfection-api-controls-manager-spacing-size51 .secondary-monitor-workspaces { spacing: 51px; } -.just-perfection-api-controls-manager-spacing-size52 .controls-manager, .just-perfection-api-controls-manager-spacing-size52 .secondary-monitor-workspaces { spacing: 52px; } -.just-perfection-api-controls-manager-spacing-size53 .controls-manager, .just-perfection-api-controls-manager-spacing-size53 .secondary-monitor-workspaces { spacing: 53px; } -.just-perfection-api-controls-manager-spacing-size54 .controls-manager, .just-perfection-api-controls-manager-spacing-size54 .secondary-monitor-workspaces { spacing: 54px; } -.just-perfection-api-controls-manager-spacing-size55 .controls-manager, .just-perfection-api-controls-manager-spacing-size55 .secondary-monitor-workspaces { spacing: 55px; } -.just-perfection-api-controls-manager-spacing-size56 .controls-manager, .just-perfection-api-controls-manager-spacing-size56 .secondary-monitor-workspaces { spacing: 56px; } -.just-perfection-api-controls-manager-spacing-size57 .controls-manager, .just-perfection-api-controls-manager-spacing-size57 .secondary-monitor-workspaces { spacing: 57px; } -.just-perfection-api-controls-manager-spacing-size58 .controls-manager, .just-perfection-api-controls-manager-spacing-size58 .secondary-monitor-workspaces { spacing: 58px; } -.just-perfection-api-controls-manager-spacing-size59 .controls-manager, .just-perfection-api-controls-manager-spacing-size59 .secondary-monitor-workspaces { spacing: 59px; } -.just-perfection-api-controls-manager-spacing-size60 .controls-manager, .just-perfection-api-controls-manager-spacing-size60 .secondary-monitor-workspaces { spacing: 60px; } -.just-perfection-api-controls-manager-spacing-size61 .controls-manager, .just-perfection-api-controls-manager-spacing-size61 .secondary-monitor-workspaces { spacing: 61px; } -.just-perfection-api-controls-manager-spacing-size62 .controls-manager, .just-perfection-api-controls-manager-spacing-size62 .secondary-monitor-workspaces { spacing: 62px; } -.just-perfection-api-controls-manager-spacing-size63 .controls-manager, .just-perfection-api-controls-manager-spacing-size63 .secondary-monitor-workspaces { spacing: 63px; } -.just-perfection-api-controls-manager-spacing-size64 .controls-manager, .just-perfection-api-controls-manager-spacing-size64 .secondary-monitor-workspaces { spacing: 64px; } -.just-perfection-api-controls-manager-spacing-size65 .controls-manager, .just-perfection-api-controls-manager-spacing-size65 .secondary-monitor-workspaces { spacing: 65px; } -.just-perfection-api-controls-manager-spacing-size66 .controls-manager, .just-perfection-api-controls-manager-spacing-size66 .secondary-monitor-workspaces { spacing: 66px; } -.just-perfection-api-controls-manager-spacing-size67 .controls-manager, .just-perfection-api-controls-manager-spacing-size67 .secondary-monitor-workspaces { spacing: 67px; } -.just-perfection-api-controls-manager-spacing-size68 .controls-manager, .just-perfection-api-controls-manager-spacing-size68 .secondary-monitor-workspaces { spacing: 68px; } -.just-perfection-api-controls-manager-spacing-size69 .controls-manager, .just-perfection-api-controls-manager-spacing-size69 .secondary-monitor-workspaces { spacing: 69px; } -.just-perfection-api-controls-manager-spacing-size70 .controls-manager, .just-perfection-api-controls-manager-spacing-size70 .secondary-monitor-workspaces { spacing: 70px; } -.just-perfection-api-controls-manager-spacing-size71 .controls-manager, .just-perfection-api-controls-manager-spacing-size71 .secondary-monitor-workspaces { spacing: 71px; } -.just-perfection-api-controls-manager-spacing-size72 .controls-manager, .just-perfection-api-controls-manager-spacing-size72 .secondary-monitor-workspaces { spacing: 72px; } -.just-perfection-api-controls-manager-spacing-size73 .controls-manager, .just-perfection-api-controls-manager-spacing-size73 .secondary-monitor-workspaces { spacing: 73px; } -.just-perfection-api-controls-manager-spacing-size74 .controls-manager, .just-perfection-api-controls-manager-spacing-size74 .secondary-monitor-workspaces { spacing: 74px; } -.just-perfection-api-controls-manager-spacing-size75 .controls-manager, .just-perfection-api-controls-manager-spacing-size75 .secondary-monitor-workspaces { spacing: 75px; } -.just-perfection-api-controls-manager-spacing-size76 .controls-manager, .just-perfection-api-controls-manager-spacing-size76 .secondary-monitor-workspaces { spacing: 76px; } -.just-perfection-api-controls-manager-spacing-size77 .controls-manager, .just-perfection-api-controls-manager-spacing-size77 .secondary-monitor-workspaces { spacing: 77px; } -.just-perfection-api-controls-manager-spacing-size78 .controls-manager, .just-perfection-api-controls-manager-spacing-size78 .secondary-monitor-workspaces { spacing: 78px; } -.just-perfection-api-controls-manager-spacing-size79 .controls-manager, .just-perfection-api-controls-manager-spacing-size79 .secondary-monitor-workspaces { spacing: 79px; } -.just-perfection-api-controls-manager-spacing-size80 .controls-manager, .just-perfection-api-controls-manager-spacing-size80 .secondary-monitor-workspaces { spacing: 80px; } -.just-perfection-api-controls-manager-spacing-size81 .controls-manager, .just-perfection-api-controls-manager-spacing-size81 .secondary-monitor-workspaces { spacing: 81px; } -.just-perfection-api-controls-manager-spacing-size82 .controls-manager, .just-perfection-api-controls-manager-spacing-size82 .secondary-monitor-workspaces { spacing: 82px; } -.just-perfection-api-controls-manager-spacing-size83 .controls-manager, .just-perfection-api-controls-manager-spacing-size83 .secondary-monitor-workspaces { spacing: 83px; } -.just-perfection-api-controls-manager-spacing-size84 .controls-manager, .just-perfection-api-controls-manager-spacing-size84 .secondary-monitor-workspaces { spacing: 84px; } -.just-perfection-api-controls-manager-spacing-size85 .controls-manager, .just-perfection-api-controls-manager-spacing-size85 .secondary-monitor-workspaces { spacing: 85px; } -.just-perfection-api-controls-manager-spacing-size86 .controls-manager, .just-perfection-api-controls-manager-spacing-size86 .secondary-monitor-workspaces { spacing: 86px; } -.just-perfection-api-controls-manager-spacing-size87 .controls-manager, .just-perfection-api-controls-manager-spacing-size87 .secondary-monitor-workspaces { spacing: 87px; } -.just-perfection-api-controls-manager-spacing-size88 .controls-manager, .just-perfection-api-controls-manager-spacing-size88 .secondary-monitor-workspaces { spacing: 88px; } -.just-perfection-api-controls-manager-spacing-size89 .controls-manager, .just-perfection-api-controls-manager-spacing-size89 .secondary-monitor-workspaces { spacing: 89px; } -.just-perfection-api-controls-manager-spacing-size90 .controls-manager, .just-perfection-api-controls-manager-spacing-size90 .secondary-monitor-workspaces { spacing: 90px; } -.just-perfection-api-controls-manager-spacing-size91 .controls-manager, .just-perfection-api-controls-manager-spacing-size91 .secondary-monitor-workspaces { spacing: 91px; } -.just-perfection-api-controls-manager-spacing-size92 .controls-manager, .just-perfection-api-controls-manager-spacing-size92 .secondary-monitor-workspaces { spacing: 92px; } -.just-perfection-api-controls-manager-spacing-size93 .controls-manager, .just-perfection-api-controls-manager-spacing-size93 .secondary-monitor-workspaces { spacing: 93px; } -.just-perfection-api-controls-manager-spacing-size94 .controls-manager, .just-perfection-api-controls-manager-spacing-size94 .secondary-monitor-workspaces { spacing: 94px; } -.just-perfection-api-controls-manager-spacing-size95 .controls-manager, .just-perfection-api-controls-manager-spacing-size95 .secondary-monitor-workspaces { spacing: 95px; } -.just-perfection-api-controls-manager-spacing-size96 .controls-manager, .just-perfection-api-controls-manager-spacing-size96 .secondary-monitor-workspaces { spacing: 96px; } -.just-perfection-api-controls-manager-spacing-size97 .controls-manager, .just-perfection-api-controls-manager-spacing-size97 .secondary-monitor-workspaces { spacing: 97px; } -.just-perfection-api-controls-manager-spacing-size98 .controls-manager, .just-perfection-api-controls-manager-spacing-size98 .secondary-monitor-workspaces { spacing: 98px; } -.just-perfection-api-controls-manager-spacing-size99 .controls-manager, .just-perfection-api-controls-manager-spacing-size99 .secondary-monitor-workspaces { spacing: 99px; } -.just-perfection-api-controls-manager-spacing-size100 .controls-manager, .just-perfection-api-controls-manager-spacing-size100 .secondary-monitor-workspaces { spacing: 100px; } -.just-perfection-api-controls-manager-spacing-size101 .controls-manager, .just-perfection-api-controls-manager-spacing-size101 .secondary-monitor-workspaces { spacing: 101px; } -.just-perfection-api-controls-manager-spacing-size102 .controls-manager, .just-perfection-api-controls-manager-spacing-size102 .secondary-monitor-workspaces { spacing: 102px; } -.just-perfection-api-controls-manager-spacing-size103 .controls-manager, .just-perfection-api-controls-manager-spacing-size103 .secondary-monitor-workspaces { spacing: 103px; } -.just-perfection-api-controls-manager-spacing-size104 .controls-manager, .just-perfection-api-controls-manager-spacing-size104 .secondary-monitor-workspaces { spacing: 104px; } -.just-perfection-api-controls-manager-spacing-size105 .controls-manager, .just-perfection-api-controls-manager-spacing-size105 .secondary-monitor-workspaces { spacing: 105px; } -.just-perfection-api-controls-manager-spacing-size106 .controls-manager, .just-perfection-api-controls-manager-spacing-size106 .secondary-monitor-workspaces { spacing: 106px; } -.just-perfection-api-controls-manager-spacing-size107 .controls-manager, .just-perfection-api-controls-manager-spacing-size107 .secondary-monitor-workspaces { spacing: 107px; } -.just-perfection-api-controls-manager-spacing-size108 .controls-manager, .just-perfection-api-controls-manager-spacing-size108 .secondary-monitor-workspaces { spacing: 108px; } -.just-perfection-api-controls-manager-spacing-size109 .controls-manager, .just-perfection-api-controls-manager-spacing-size109 .secondary-monitor-workspaces { spacing: 109px; } -.just-perfection-api-controls-manager-spacing-size110 .controls-manager, .just-perfection-api-controls-manager-spacing-size110 .secondary-monitor-workspaces { spacing: 110px; } -.just-perfection-api-controls-manager-spacing-size111 .controls-manager, .just-perfection-api-controls-manager-spacing-size111 .secondary-monitor-workspaces { spacing: 111px; } -.just-perfection-api-controls-manager-spacing-size112 .controls-manager, .just-perfection-api-controls-manager-spacing-size112 .secondary-monitor-workspaces { spacing: 112px; } -.just-perfection-api-controls-manager-spacing-size113 .controls-manager, .just-perfection-api-controls-manager-spacing-size113 .secondary-monitor-workspaces { spacing: 113px; } -.just-perfection-api-controls-manager-spacing-size114 .controls-manager, .just-perfection-api-controls-manager-spacing-size114 .secondary-monitor-workspaces { spacing: 114px; } -.just-perfection-api-controls-manager-spacing-size115 .controls-manager, .just-perfection-api-controls-manager-spacing-size115 .secondary-monitor-workspaces { spacing: 115px; } -.just-perfection-api-controls-manager-spacing-size116 .controls-manager, .just-perfection-api-controls-manager-spacing-size116 .secondary-monitor-workspaces { spacing: 116px; } -.just-perfection-api-controls-manager-spacing-size117 .controls-manager, .just-perfection-api-controls-manager-spacing-size117 .secondary-monitor-workspaces { spacing: 117px; } -.just-perfection-api-controls-manager-spacing-size118 .controls-manager, .just-perfection-api-controls-manager-spacing-size118 .secondary-monitor-workspaces { spacing: 118px; } -.just-perfection-api-controls-manager-spacing-size119 .controls-manager, .just-perfection-api-controls-manager-spacing-size119 .secondary-monitor-workspaces { spacing: 119px; } -.just-perfection-api-controls-manager-spacing-size120 .controls-manager, .just-perfection-api-controls-manager-spacing-size120 .secondary-monitor-workspaces { spacing: 120px; } -.just-perfection-api-controls-manager-spacing-size121 .controls-manager, .just-perfection-api-controls-manager-spacing-size121 .secondary-monitor-workspaces { spacing: 121px; } -.just-perfection-api-controls-manager-spacing-size122 .controls-manager, .just-perfection-api-controls-manager-spacing-size122 .secondary-monitor-workspaces { spacing: 122px; } -.just-perfection-api-controls-manager-spacing-size123 .controls-manager, .just-perfection-api-controls-manager-spacing-size123 .secondary-monitor-workspaces { spacing: 123px; } -.just-perfection-api-controls-manager-spacing-size124 .controls-manager, .just-perfection-api-controls-manager-spacing-size124 .secondary-monitor-workspaces { spacing: 124px; } -.just-perfection-api-controls-manager-spacing-size125 .controls-manager, .just-perfection-api-controls-manager-spacing-size125 .secondary-monitor-workspaces { spacing: 125px; } -.just-perfection-api-controls-manager-spacing-size126 .controls-manager, .just-perfection-api-controls-manager-spacing-size126 .secondary-monitor-workspaces { spacing: 126px; } -.just-perfection-api-controls-manager-spacing-size127 .controls-manager, .just-perfection-api-controls-manager-spacing-size127 .secondary-monitor-workspaces { spacing: 127px; } -.just-perfection-api-controls-manager-spacing-size128 .controls-manager, .just-perfection-api-controls-manager-spacing-size128 .secondary-monitor-workspaces { spacing: 128px; } -.just-perfection-api-controls-manager-spacing-size129 .controls-manager, .just-perfection-api-controls-manager-spacing-size129 .secondary-monitor-workspaces { spacing: 129px; } -.just-perfection-api-controls-manager-spacing-size130 .controls-manager, .just-perfection-api-controls-manager-spacing-size130 .secondary-monitor-workspaces { spacing: 130px; } -.just-perfection-api-controls-manager-spacing-size131 .controls-manager, .just-perfection-api-controls-manager-spacing-size131 .secondary-monitor-workspaces { spacing: 131px; } -.just-perfection-api-controls-manager-spacing-size132 .controls-manager, .just-perfection-api-controls-manager-spacing-size132 .secondary-monitor-workspaces { spacing: 132px; } -.just-perfection-api-controls-manager-spacing-size133 .controls-manager, .just-perfection-api-controls-manager-spacing-size133 .secondary-monitor-workspaces { spacing: 133px; } -.just-perfection-api-controls-manager-spacing-size134 .controls-manager, .just-perfection-api-controls-manager-spacing-size134 .secondary-monitor-workspaces { spacing: 134px; } -.just-perfection-api-controls-manager-spacing-size135 .controls-manager, .just-perfection-api-controls-manager-spacing-size135 .secondary-monitor-workspaces { spacing: 135px; } -.just-perfection-api-controls-manager-spacing-size136 .controls-manager, .just-perfection-api-controls-manager-spacing-size136 .secondary-monitor-workspaces { spacing: 136px; } -.just-perfection-api-controls-manager-spacing-size137 .controls-manager, .just-perfection-api-controls-manager-spacing-size137 .secondary-monitor-workspaces { spacing: 137px; } -.just-perfection-api-controls-manager-spacing-size138 .controls-manager, .just-perfection-api-controls-manager-spacing-size138 .secondary-monitor-workspaces { spacing: 138px; } -.just-perfection-api-controls-manager-spacing-size139 .controls-manager, .just-perfection-api-controls-manager-spacing-size139 .secondary-monitor-workspaces { spacing: 139px; } -.just-perfection-api-controls-manager-spacing-size140 .controls-manager, .just-perfection-api-controls-manager-spacing-size140 .secondary-monitor-workspaces { spacing: 140px; } -.just-perfection-api-controls-manager-spacing-size141 .controls-manager, .just-perfection-api-controls-manager-spacing-size141 .secondary-monitor-workspaces { spacing: 141px; } -.just-perfection-api-controls-manager-spacing-size142 .controls-manager, .just-perfection-api-controls-manager-spacing-size142 .secondary-monitor-workspaces { spacing: 142px; } -.just-perfection-api-controls-manager-spacing-size143 .controls-manager, .just-perfection-api-controls-manager-spacing-size143 .secondary-monitor-workspaces { spacing: 143px; } -.just-perfection-api-controls-manager-spacing-size144 .controls-manager, .just-perfection-api-controls-manager-spacing-size144 .secondary-monitor-workspaces { spacing: 144px; } -.just-perfection-api-controls-manager-spacing-size145 .controls-manager, .just-perfection-api-controls-manager-spacing-size145 .secondary-monitor-workspaces { spacing: 145px; } -.just-perfection-api-controls-manager-spacing-size146 .controls-manager, .just-perfection-api-controls-manager-spacing-size146 .secondary-monitor-workspaces { spacing: 146px; } -.just-perfection-api-controls-manager-spacing-size147 .controls-manager, .just-perfection-api-controls-manager-spacing-size147 .secondary-monitor-workspaces { spacing: 147px; } -.just-perfection-api-controls-manager-spacing-size148 .controls-manager, .just-perfection-api-controls-manager-spacing-size148 .secondary-monitor-workspaces { spacing: 148px; } -.just-perfection-api-controls-manager-spacing-size149 .controls-manager, .just-perfection-api-controls-manager-spacing-size149 .secondary-monitor-workspaces { spacing: 149px; } -.just-perfection-api-controls-manager-spacing-size150 .controls-manager, .just-perfection-api-controls-manager-spacing-size150 .secondary-monitor-workspaces { spacing: 150px; } - -.just-perfection-api-osd-position-top .osd-window { margin: 4em 2.5em; } -.just-perfection-api-osd-position-center .osd-window { margin: 4em 3.5em; } -.just-perfection-api-osd-position-bottom .osd-window { margin: 4em 3em; } - -.just-perfection-api-no-dash-separator .dash-separator, -.just-perfection-api-no-dash-app-running-dot #dash .app-well-app-running-dot -{ - width: 0; - height: 0; - spacing: 0; - padding: 0; - margin: 0; -} - -.just-perfection-api-no-workspaces-in-app-grid .workspace-background -{ - background-color: transparent; - box-shadow: 0 4px 16px 4px transparent; -} - -.just-perfection-api-no-power-icon .power-status StIcon -{ - width: 0; - height: 0; - padding: 0; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/lib/Prefs/executable_Prefs.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/lib/Prefs/executable_Prefs.js deleted file mode 100644 index 04b1e7e8..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/lib/Prefs/executable_Prefs.js +++ /dev/null @@ -1,410 +0,0 @@ -/** - * Prefs Library - * - * @author Javad Rahmatzadeh <j.rahmatzadeh@gmail.com> - * @copyright 2020-2024 - * @license GPL-3.0-only - */ - -/** - * prefs widget for showing prefs window - */ -export class Prefs -{ - /** - * Current shell version - * - * @type {number|null} - */ - #shellVersion = null; - - /** - * Instance of PrefsKeys - * - * @type {PrefsKeys|null} - */ - #prefsKeys = null; - - /** - * Instance of Gtk.Builder - * - * @type {Gtk.Builder|null} - */ - #builder = null; - - /** - * Instance of Gio.Settings - * - * @type {Settings|null} - */ - #settings = null; - - /** - * Instance of Resource - * - * @type {Gio.Resource|null} - */ - #resource = null; - - /** - * Instance of Gdk - * - * @type {Gdk|null} - */ - #gdk = null; - - /** - * Instance of Gio - * - * @type {Gio|null} - */ - #gio = null; - - /** - * All available profile names - * - * @type {Array} - */ - #profiles = [ - 'default', - 'minimal', - 'superminimal', - ]; - - /** - * class constructor - * - * @param {Object} dependencies - * 'Builder' instance of Gtk::Builder - * 'Settings' instance of Gio::Settings - * 'Gdk' reference to Gdk - * 'Gio' reference to Gio - * @param {PrefsKeys.PrefsKeys} prefsKeys instance of PrefsKeys - * @param {number} shellVersion float in major.minor format - */ - constructor(dependencies, prefsKeys, shellVersion) - { - this.#settings = dependencies['Settings'] || null; - this.#builder = dependencies['Builder'] || null; - this.#gdk = dependencies['Gdk'] || null; - this.#gio = dependencies['Gio'] || null; - - this.#prefsKeys = prefsKeys; - this.#shellVersion = shellVersion; - } - - /** - * fill prefs window - * - * @param {Adw.PreferencesWindow} window prefs dialog - * @param {string} ResourcesFolderPath folder path to resources folder - * @param {string} gettextDomain gettext domain - * - * @returns {void} - */ - fillPrefsWindow(window, ResourcesFolderPath, gettextDomain) - { - // changing the order here can change the elements order in ui - let uiFilenames = [ - 'profile', - 'visibility', - 'icons', - 'behavior', - 'customize', - ]; - - this.#loadResource(ResourcesFolderPath); - - this.#builder.set_translation_domain(gettextDomain); - for (let uiFilename of uiFilenames) { - this.#builder.add_from_resource( - `/org/gnome/Shell/Extensions/justperfection/ui/${uiFilename}.ui` - ); - } - - for (let uiFilename of uiFilenames) { - let page = this.#builder.get_object(uiFilename); - window.add(page); - } - - this.#setValues(); - this.#guessProfile(); - this.#onlyShowSupportedRows(); - this.#registerAllSignals(window); - - this.#setWindowSize(window); - - window.search_enabled = true; - } - - /** - * load resource - * - * @param {string} folder path to the resources folder - * - * @returns {void} - */ - #loadResource(path) - { - this.#resource = this.#gio.Resource.load(`${path}/resources.gresource`); - this.#gio.resources_register(this.#resource); - } - - /** - * set window size - * - * @param {Adw.PreferencesWindow} window prefs window - * - * @returns {void} - */ - #setWindowSize(window) - { - let [pmWidth, pmHeight, pmScale] = this.#getPrimaryMonitorInfo(); - let sizeTolerance = 50; - let width = 600; - let height = 730; - - if ( - (pmWidth / pmScale) - sizeTolerance >= width && - (pmHeight / pmScale) - sizeTolerance >= height - ) { - window.set_default_size(width, height); - } - } - - /** - * get primary monitor info - * - * @returns {Array} [width, height, scale] - */ - #getPrimaryMonitorInfo() - { - let display = this.#gdk.Display.get_default(); - - let pm = display.get_monitors().get_item(0); - - if (!pm) { - return [700, 500, 1]; - } - - let geo = pm.get_geometry(); - let scale = pm.get_scale_factor(); - - return [geo.width, geo.height, scale]; - } - - /** - * register all signals - * - * @param {Adw.PreferencesWindow} window prefs dialog - * - * @returns {void} - */ - #registerAllSignals(window) - { - this.#registerKeySignals(); - this.#registerProfileSignals(); - this.#registerCloseSignal(window); - } - - /** - * register close signal - * - * @param {Adw.PreferencesWindow} window prefs dialog - * - * @returns {void} - */ - #registerCloseSignal(window) - { - window.connect('close-request', () => { - if (this.#resource) { - this.#gio.resources_unregister(this.#resource); - } - }); - } - - /** - * register signals of all prefs keys - * - * @returns {void} - */ - #registerKeySignals() - { - // all available keys - for (let [, key] of Object.entries(this.#prefsKeys.keys)) { - - switch (key.widgetType) { - - case 'GtkSwitch': - this.#builder.get_object(key.widgetId).connect('state-set', (w) => { - this.#settings.set_boolean(key.name, w.get_active()); - this.#guessProfile(); - }); - break; - - case 'AdwActionRow': - this.#builder.get_object(key.widgetId).connect('notify::selected-item', (w) => { - let index = w.get_selected(); - let value = (index in key.maps) ? key.maps[index] : index; - this.#settings.set_int(key.name, value); - this.#guessProfile(); - }); - break; - - case 'AdwSpinRow': - this.#builder.get_object(key.widgetId).connect('notify::value', (w) => { - let value = w.get_value(); - this.#settings.set_int(key.name, value); - this.#guessProfile(); - }); - break; - } - } - } - - /** - * register profile signals - * - * @returns {void} - */ - #registerProfileSignals() - { - for (let profile of this.#profiles) { - let widget = this.#builder.get_object(`profile_${profile}`); - if (!widget) { - break; - } - widget.connect('clicked', (w) => { - this.#setValues(profile); - }); - } - } - - /** - * can check all current values and guess the profile based on the values - * - * @returns {void} - */ - #guessProfile() - { - let totalCount = 0; - let matchCount = {}; - - for (let profile of this.#profiles) { - matchCount[profile] = 0; - } - - for (let [, key] of Object.entries(this.#prefsKeys.keys)) { - - if (!key.supported) { - continue; - } - - let value; - - switch (key.widgetType) { - case 'GtkSwitch': - value = this.#builder.get_object(key.widgetId).get_active(); - break; - case 'AdwActionRow': - value = this.#builder.get_object(key.widgetId).get_selected(); - break; - case 'AdwSpinRow': - value = this.#builder.get_object(key.widgetId).get_value(); - break; - default: - value = ''; - continue; - } - - for (let profile of this.#profiles) { - if (key.profiles[profile] === value) { - matchCount[profile]++; - } - } - - totalCount++; - } - - let currentProfile = 'custom'; - for (let profile of this.#profiles) { - if (matchCount[profile] === totalCount) { - currentProfile = profile; - break; - } - } - - let widget = this.#builder.get_object(`profile_${currentProfile}`); - if (widget) { - widget.set_active(true); - } - } - - /** - * set values for all elements - * - * @param {string} profile profile name or null for get it from gsettings - * - * @returns {void} - */ - #setValues(profile) - { - for (let [, key] of Object.entries(this.#prefsKeys.keys)) { - - let widget = this.#builder.get_object(key.widgetId); - - let value; - - switch (key.widgetType) { - - case 'GtkSwitch': - value - = (profile) - ? key.profiles[profile] - : this.#settings.get_boolean(key.name); - - widget.set_active(value); - break; - - case 'AdwActionRow': - let index - = (profile) - ? key.profiles[profile] - : this.#settings.get_int(key.name); - - for (let k in key.maps) { - if (key.maps[k] === index) { - index = k; - break; - } - } - widget.set_selected(index); - break; - - case 'AdwSpinRow': - value - = (profile) - ? key.profiles[profile] - : this.#settings.get_int(key.name); - - widget.set_value(value); - break; - } - } - } - - /** - * apply all supported keys to the elements - * - * @returns {void} - */ - #onlyShowSupportedRows() - { - for (let [, key] of Object.entries(this.#prefsKeys.keys)) { - let row = this.#builder.get_object(`${key.id}_row`); - let visible = key.supported; - row.visible = visible; - } - } -}; - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/lib/Prefs/executable_PrefsKeys.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/lib/Prefs/executable_PrefsKeys.js deleted file mode 100644 index 398c09ae..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/lib/Prefs/executable_PrefsKeys.js +++ /dev/null @@ -1,880 +0,0 @@ -/** - * PrefsKeys Library - * - * @author Javad Rahmatzadeh <j.rahmatzadeh@gmail.com> - * @copyright 2020-2024 - * @license GPL-3.0-only - */ - -/** - * prefs keys - */ -export class PrefsKeys -{ - /** - * Current shell version - * - * @type {number|null} - */ - #shellVersion = null; - - /** - * class constructor - * - * @param {number} shellVersion float in major.minor format - */ - constructor(shellVersion) - { - this.#shellVersion = shellVersion; - - /** - * holds all keys generated by this.#setKey() - * - * @member {Object} - */ - this.keys = {}; - - this.#setDefaults(); - } - - /** - * set all default keys - * - * @returns {void} - */ - #setDefaults() - { - this.#setKey( - 'visibility', - 'panel', - 'GtkSwitch', - true, - { - default: true, - minimal: false, - superminimal: false, - } - ); - - this.#setKey( - 'visibility', - 'panel-in-overview', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: false, - } - ); - - this.#setKey( - 'visibility', - 'activities-button', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: true, - } - ); - - this.#setKey( - 'visibility', - 'clock-menu', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: true, - } - ); - - this.#setKey( - 'visibility', - 'keyboard-layout', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: true, - } - ); - - this.#setKey( - 'visibility', - 'accessibility-menu', - 'GtkSwitch', - true, - { - default: true, - minimal: false, - superminimal: true, - } - ); - - this.#setKey( - 'visibility', - 'quick-settings', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: true, - } - ); - - this.#setKey( - 'visibility', - 'quick-settings-dark-mode', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: true, - } - ); - - this.#setKey( - 'visibility', - 'screen-sharing-indicator', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: true, - } - ); - - this.#setKey( - 'visibility', - 'screen-recording-indicator', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: true, - } - ); - - this.#setKey( - 'visibility', - 'search', - 'GtkSwitch', - true, - { - default: true, - minimal: false, - superminimal: false, - } - ); - - this.#setKey( - 'visibility', - 'dash', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: false, - } - ); - - this.#setKey( - 'visibility', - 'dash-separator', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: true, - } - ); - - this.#setKey( - 'visibility', - 'dash-app-running', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: true, - } - ); - - this.#setKey( - 'visibility', - 'osd', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: false, - } - ); - - this.#setKey( - 'visibility', - 'workspace-popup', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: false, - } - ); - - this.#setKey( - 'visibility', - 'workspace', - 'GtkSwitch', - true, - { - default: true, - minimal: false, - superminimal: false, - } - ); - - this.#setKey( - 'visibility', - 'background-menu', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: false, - } - ); - - this.#setKey( - 'visibility', - 'show-apps-button', - 'GtkSwitch', - true, - { - default: true, - minimal: false, - superminimal: true, - } - ); - - this.#setKey( - 'visibility', - 'workspaces-in-app-grid', - 'GtkSwitch', - true, - { - default: true, - minimal: false, - superminimal: false, - } - ); - - this.#setKey( - 'visibility', - 'window-preview-caption', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: false, - } - ); - - this.#setKey( - 'visibility', - 'window-preview-close-button', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: false, - } - ); - - this.#setKey( - 'visibility', - 'ripple-box', - 'GtkSwitch', - true, - { - default: true, - minimal: false, - superminimal: false, - } - ); - - this.#setKey( - 'visibility', - 'world-clock', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: true, - } - ); - - this.#setKey( - 'visibility', - 'weather', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: true, - } - ); - - this.#setKey( - 'visibility', - 'calendar', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: true, - } - ); - - this.#setKey( - 'visibility', - 'events-button', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: true, - } - ); - - this.#setKey( - 'visibility', - 'window-menu-take-screenshot-button', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: true, - } - ); - - this.#setKey( - 'icons', - 'panel-notification-icon', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: true, - } - ); - - this.#setKey( - 'icons', - 'power-icon', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: true, - } - ); - - this.#setKey( - 'icons', - 'window-picker-icon', - 'GtkSwitch', - true, - { - default: true, - minimal: false, - superminimal: false, - } - ); - - this.#setKey( - 'behavior', - 'type-to-search', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: true, - } - ); - - this.#setKey( - 'behavior', - 'window-demands-attention-focus', - 'GtkSwitch', - true, - { - default: false, - minimal: true, - superminimal: true, - } - ); - - this.#setKey( - 'behavior', - 'window-maximized-on-create', - 'GtkSwitch', - true, - { - default: false, - minimal: false, - superminimal: false, - } - ); - - this.#setKey( - 'behavior', - 'workspace-switcher-should-show', - 'GtkSwitch', - true, - { - default: false, - minimal: false, - superminimal: false, - } - ); - - this.#setKey( - 'behavior', - 'startup-status', - 'AdwActionRow', - true, - { - default: 1, - minimal: 0, - superminimal: 0, - } - ); - - this.#setKey( - 'behavior', - 'workspace-wrap-around', - 'GtkSwitch', - true, - { - default: false, - minimal: false, - superminimal: false, - } - ); - - this.#setKey( - 'behavior', - 'workspace-peek', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: true, - } - ); - - this.#setKey( - 'behavior', - 'overlay-key', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: true, - } - ); - - this.#setKey( - 'behavior', - 'double-super-to-appgrid', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: false, - } - ); - - this.#setKey( - 'behavior', - 'switcher-popup-delay', - 'GtkSwitch', - true, - { - default: true, - minimal: true, - superminimal: true, - } - ); - - this.#setKey( - 'customize', - 'controls-manager-spacing-size', - 'AdwActionRow', - true, - { - default: 0, - minimal: 0, - superminimal: 22, - } - ); - - this.#setKey( - 'customize', - 'workspace-background-corner-size', - 'AdwActionRow', - true, - { - default: 0, - minimal: 0, - superminimal: 15, - } - ); - - this.#setKey( - 'customize', - 'top-panel-position', - 'AdwActionRow', - true, - { - default: 0, - minimal: 0, - superminimal: 0, - } - ); - - this.#setKey( - 'customize', - 'clock-menu-position', - 'AdwActionRow', - true, - { - default: 0, - minimal: 0, - superminimal: 0, - } - ); - - this.#setKey( - 'customize', - 'clock-menu-position-offset', - 'AdwSpinRow', - true, - { - default: 0, - minimal: 0, - superminimal: 0, - } - ); - - this.#setKey( - 'customize', - 'workspace-switcher-size', - 'AdwActionRow', - true, - { - default: 0, - minimal: 0, - superminimal: 0, - } - ); - - this.#setKey( - 'customize', - 'animation', - 'AdwActionRow', - true, - { - default: 1, - minimal: 1, - superminimal: 1, - } - ); - - this.#setKey( - 'customize', - 'dash-icon-size', - 'AdwActionRow', - true, - { - default: 0, - minimal: 1, - superminimal: 0, - }, - { - '1': 16, - '2': 22, - '3': 24, - '4': 32, - '5': 40, - '6': 48, - '7': 56, - '8': 64, - } - ); - - this.#setKey( - 'customize', - 'notification-banner-position', - 'AdwActionRow', - true, - { - default: 1, - minimal: 1, - superminimal: 1, - } - ); - - this.#setKey( - 'customize', - 'panel-size', - 'AdwActionRow', - true, - { - default: 0, - minimal: 0, - superminimal: 0, - } - ); - - this.#setKey( - 'customize', - 'panel-button-padding-size', - 'AdwActionRow', - true, - { - default: 0, - minimal: 0, - superminimal: 0, - } - ); - - this.#setKey( - 'customize', - 'panel-indicator-padding-size', - 'AdwActionRow', - true, - { - default: 0, - minimal: 0, - superminimal: 0, - } - ); - - this.#setKey( - 'customize', - 'panel-icon-size', - 'AdwActionRow', - true, - { - default: 0, - minimal: 0, - superminimal: 0, - } - ); - - this.#setKey( - 'customize', - 'osd-position', - 'AdwActionRow', - true, - { - default: 0, - minimal: 0, - superminimal: 0, - } - ); - - this.#setKey( - 'customize', - 'looking-glass-width', - 'AdwActionRow', - true, - { - default: 0, - minimal: 0, - superminimal: 0, - } - ); - - this.#setKey( - 'customize', - 'looking-glass-height', - 'AdwActionRow', - true, - { - default: 0, - minimal: 0, - superminimal: 0, - } - ); - - this.#setKey( - 'customize', - 'alt-tab-window-preview-size', - 'AdwActionRow', - true, - { - default: 0, - minimal: 0, - superminimal: 0, - }, - { - '0': 0, - '1': 32, - '2': 64, - '3': 128, - '4': 256, - '5': 512, - } - ); - - this.#setKey( - 'customize', - 'alt-tab-small-icon-size', - 'AdwActionRow', - true, - { - default: 0, - minimal: 0, - superminimal: 0, - }, - { - '0': 0, - '1': 32, - '2': 64, - '3': 128, - '4': 256, - '5': 512, - } - ); - - this.#setKey( - 'customize', - 'alt-tab-icon-size', - 'AdwActionRow', - true, - { - default: 0, - minimal: 0, - superminimal: 0, - }, - { - '0': 0, - '1': 32, - '2': 64, - '3': 128, - '4': 256, - '5': 512, - } - ); - - this.#setKey( - 'customize', - 'max-displayed-search-results', - 'AdwActionRow', - true, - { - default: 0, - minimal: 0, - superminimal: 0, - } - ); - - this.#setKey( - 'override', - 'theme', - 'GtkSwitch', - true, - { - default: false, - minimal: true, - superminimal: true, - } - ); - } - - /** - * set key - * - * @param {string} category possible values: - * - visibility - * - icons - * - behavior - * - customize - * - override - * @param {string} name should be the same as gsettings key name - * @param {string} widgetType gtk widget type like 'GtkSwitch'. - * @param {boolean} supported whether supported in the current shell - * @param {Object} profiles values for each profile. for example: - * {default: true, minimal: false} - * @param {Object} [maps] for example for combobox you can specify - * if the index is 1 use 32 as value: - * {1 : 32} - * - * @returns {void} - */ - #setKey(category, name, widgetType, supported, profiles, maps = {}) - { - let id = name.replace(/-/g, '_'); - let widgetName = widgetType.toLowerCase().replace('gtk', ''); - - let widgetId - = (widgetType === 'AdwActionRow' || widgetType === 'AdwSpinRow') - ? `${id}_row` - : `${id}_${widgetName}`; - - this.keys[id] = { - category, - widgetType, - name, - id, - widgetId, - supported, - profiles, - maps, - }; - } - - /** - * delete key - * - * @param {string} id key id - * - * @returns {void} - */ - deleteKey(id) - { - delete(this.keys[id]); - } -}; - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/lib/executable_API.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/lib/executable_API.js deleted file mode 100644 index 707914a8..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/lib/executable_API.js +++ /dev/null @@ -1,3226 +0,0 @@ -/** - * API Library - * - * @author Javad Rahmatzadeh <j.rahmatzadeh@gmail.com> - * @copyright 2020-2024 - * @license GPL-3.0-only - */ - -const XY_POSITION = { - TOP_START: 0, - TOP_CENTER: 1, - TOP_END: 2, - BOTTOM_START: 3, - BOTTOM_CENTER: 4, - BOTTOM_END: 5, - CENTER_START: 6, - CENTER_CENTER: 7, - CENTER_END: 8, -}; - -const PANEL_POSITION = { - TOP: 0, - BOTTOM: 1, -}; - -const PANEL_BOX_POSITION = { - CENTER: 0, - RIGHT: 1, - LEFT: 2, -}; - -const PANEL_HIDE_MODE = { - ALL: 0, - DESKTOP: 1, -}; - -const SHELL_STATUS = { - NONE: 0, - OVERVIEW: 1, -}; - -const DASH_ICON_SIZES = [16, 22, 24, 32, 40, 48, 56, 64]; - -/** - * API to avoid calling GNOME Shell directly - * and make all parts compatible with different GNOME Shell versions - */ -export class API -{ - /** - * Current shell version - * - * @type {number|null} - */ - #shellVersion = null; - - /** - * Originals holder - * - * @type {object} - */ - #originals = {}; - - /** - * Timeout ids - * - * @type {object} - */ - #timeoutIds = {}; - - /** - * Class Constructor - * - * @param {Object} dependencies - * 'Main' reference to ui::main - * 'BackgroundMenu' reference to ui::backgroundMenu - * 'OverviewControls' reference to ui::overviewControls - * 'WorkspaceSwitcherPopup' reference to ui::workspaceSwitcherPopup - * 'SwitcherPopup' reference to ui::switcherPopup - * 'InterfaceSettings' reference to Gio::Settings for 'org.gnome.desktop.interface' - * 'Search' reference to ui::search - * 'SearchController' reference to ui::searchController - * 'WorkspaceThumbnail' reference to ui::workspaceThumbnail - * 'WorkspacesView' reference to ui::workspacesView - * 'Panel' reference to ui::panel - * 'PanelMenu' reference to ui::panelMenu - * 'WindowPreview' reference to ui::windowPreview - * 'Workspace' reference to ui::workspace - * 'LookingGlass' reference to ui::lookingGlass - * 'MessageTray' reference to ui::messageTray - * 'OSDWindow' reference to ui::osdTray - * 'WindowMenu' reference to ui::windowMenu - * 'AltTab' reference to ui::altTab - * 'St' reference to St - * 'GLib' reference to GLib - * 'Clutter' reference to Clutter - * 'Util' reference to misc::util - * 'Meta' reference to Meta - * 'GObject' reference to GObject - * @param {number} shellVersion float in major.minor format - */ - constructor(dependencies, shellVersion) - { - this._main = dependencies['Main'] || null; - this._backgroundMenu = dependencies['BackgroundMenu'] || null; - this._overviewControls = dependencies['OverviewControls'] || null; - this._workspaceSwitcherPopup = dependencies['WorkspaceSwitcherPopup'] || null; - this._switcherPopup = dependencies['SwitcherPopup'] || null; - this._interfaceSettings = dependencies['InterfaceSettings'] || null; - this._search = dependencies['Search'] || null; - this._searchController = dependencies['SearchController'] || null; - this._workspaceThumbnail = dependencies['WorkspaceThumbnail'] || null; - this._workspacesView = dependencies['WorkspacesView'] || null; - this._panel = dependencies['Panel'] || null; - this._panelMenu = dependencies['PanelMenu'] || null; - this._windowPreview = dependencies['WindowPreview'] || null; - this._workspace = dependencies['Workspace'] || null; - this._lookingGlass = dependencies['LookingGlass'] || null; - this._messageTray = dependencies['MessageTray'] || null; - this._osdWindow = dependencies['OSDWindow'] || null; - this._windowMenu = dependencies['WindowMenu'] || null; - this._altTab = dependencies['AltTab'] || null; - this._st = dependencies['St'] || null; - this._glib = dependencies['GLib'] || null; - this._clutter = dependencies['Clutter'] || null; - this._util = dependencies['Util'] || null; - this._meta = dependencies['Meta'] || null; - this._gobject = dependencies['GObject'] || null; - - this.#shellVersion = shellVersion; - - /** - * whether search entry is visible - * - * @member {boolean} - */ - this._searchEntryVisibility = true; - } - - /** - * prepare everything needed for API - * - * @returns {void} - */ - open() - { - this.UIStyleClassAdd(this.#getAPIClassname('shell-version')); - } - - /** - * remove everything from GNOME Shell been added by this class - * - * @returns {void} - */ - close() - { - this.UIStyleClassRemove(this.#getAPIClassname('shell-version')); - this.#startSearchSignal(false); - this.#computeWorkspacesBoxForStateSetDefault(); - this.#altTabSizesSetDefault(); - - for (let [name, id] of Object.entries(this.#timeoutIds)) { - this._glib.source_remove(id); - delete(this.#timeoutIds[name]); - } - } - - /** - * get x and y align for position - * - * @param int pos position - * see XY_POSITION - * - * @returns {array} - * - 0 Clutter.ActorAlign - * - 1 Clutter.ActorAlign - */ - #xyAlignGet(pos) - { - if (XY_POSITION.TOP_START === pos) { - return [this._clutter.ActorAlign.START, this._clutter.ActorAlign.START]; - } - - if (XY_POSITION.TOP_CENTER === pos) { - return [this._clutter.ActorAlign.CENTER, this._clutter.ActorAlign.START]; - } - - if (XY_POSITION.TOP_END === pos) { - return [this._clutter.ActorAlign.END, this._clutter.ActorAlign.START]; - } - - if (XY_POSITION.CENTER_START === pos) { - return [this._clutter.ActorAlign.START, this._clutter.ActorAlign.CENTER]; - } - - if (XY_POSITION.CENTER_CENTER === pos) { - return [this._clutter.ActorAlign.CENTER, this._clutter.ActorAlign.CENTER]; - } - - if (XY_POSITION.CENTER_END === pos) { - return [this._clutter.ActorAlign.END, this._clutter.ActorAlign.CENTER]; - } - - if (XY_POSITION.BOTTOM_START === pos) { - return [this._clutter.ActorAlign.START, this._clutter.ActorAlign.END]; - } - - if (XY_POSITION.BOTTOM_CENTER === pos) { - return [this._clutter.ActorAlign.CENTER, this._clutter.ActorAlign.END]; - } - - if (XY_POSITION.BOTTOM_END === pos) { - return [this._clutter.ActorAlign.END, this._clutter.ActorAlign.END]; - } - } - - /** - * add to animation duration - * - * @param {number} duration in milliseconds - * - * @returns {number} - */ - #addToAnimationDuration(duration) - { - let settings = this._st.Settings.get(); - - return (settings.enable_animations) ? settings.slow_down_factor * duration : 1; - } - - /** - * get signal id of the event - * - * @param {Gtk.Widget} widget to find signal in - * @param {string} signalName signal name - * - * @returns {number} - */ - #getSignalId(widget, signalName) - { - return this._gobject.signal_handler_find(widget, {signalId: signalName}); - } - - /** - * get the css class name for API - * - * @param {string} type - * - * @returns {string} - */ - #getAPIClassname(type) - { - let starter = 'just-perfection-api-'; - - if (type === 'shell-version') { - let shellVerMajor = Math.trunc(this.#shellVersion); - return `${starter}gnome${shellVerMajor}`; - } - - return `${starter}${type}`; - } - - /** - * set panel size to default - * - * @returns {void} - */ - panelSetDefaultSize() - { - if (!this.#originals['panelHeight']) { - return; - } - - this.panelSetSize(this.#originals['panelHeight'], false); - } - - /** - * change panel size - * - * @param {number} size 0 to 100 - * @param {boolean} fake true means it shouldn't change the last size, - * false otherwise - * - * @returns {void} - */ - panelSetSize(size, fake) - { - if (!this.#originals['panelHeight']) { - this.#originals['panelHeight'] = this._main.panel.height; - } - - if (size > 100 || size < 0) { - return; - } - - this._main.panel.height = size; - - if (!fake) { - this._panelSize = size; - } - } - - /** - * get the last size of the panel - * - * @returns {number} - */ - panelGetSize() - { - if (this._panelSize !== undefined) { - return this._panelSize; - } - - if (this.#originals['panelHeight']) { - return this.#originals['panelHeight']; - } - - return this._main.panel.height; - } - - /** - * emit refresh styles - * this is useful when changed style doesn't emit change because doesn't have - * standard styles. for example, style with only `-natural-hpadding` - * won't notify any change. so you need to call this function - * to refresh that - * - * @returns {void} - */ - #emitRefreshStyles() - { - let classname = this.#getAPIClassname('refresh-styles'); - - this.UIStyleClassAdd(classname); - this.UIStyleClassRemove(classname); - } - - /** - * show panel - * - * @returns {void} - */ - panelShow() - { - this._panelVisibility = true; - - let classname = this.#getAPIClassname('no-panel'); - - if (!this.UIStyleClassContain(classname)) { - return; - } - - // The class name should be removed before addChrome the panelBox - // removing after can cause `st_theme_node_lookup_shadow` crash - this.UIStyleClassRemove(classname); - - let overview = this._main.overview; - let searchEntryParent = overview.searchEntry.get_parent(); - let panelBox = this._main.layoutManager.panelBox; - - panelBox.translation_y = 0; - - this._main.layoutManager.overviewGroup.remove_child(panelBox); - this._main.layoutManager.addChrome(panelBox, { - affectsStruts: true, - trackFullscreen: true, - }); - - if (this._hidePanelWorkareasChangedSignal) { - global.display.disconnect(this._hidePanelWorkareasChangedSignal); - delete(this._hidePanelWorkareasChangedSignal); - } - - if (this._hidePanelHeightSignal) { - panelBox.disconnect(this._hidePanelHeightSignal); - delete(this._hidePanelHeightSignal); - } - - searchEntryParent.set_style(`margin-top: 0;`); - - // hide and show can fix windows going under panel - panelBox.hide(); - panelBox.show(); - this.#fixLookingGlassPosition(); - - if (this.#timeoutIds.panelHide) { - this._glib.source_remove(this.#timeoutIds.panelHide); - delete(this.#timeoutIds.panelHide); - } - } - - /** - * hide panel - * - * @param {mode} hide mode see PANEL_HIDE_MODE. defaults to hide all - * @param {boolean} force apply hide even if it is hidden - * - * @returns {void} - */ - panelHide(mode) - { - this._panelVisibility = false; - this._panelHideMode = mode; - - let overview = this._main.overview; - let searchEntryParent = overview.searchEntry.get_parent(); - let panelBox = this._main.layoutManager.panelBox; - let panelHeight = this._main.panel.height; - let panelPosition = this.panelGetPosition(); - let direction = (panelPosition === PANEL_POSITION.BOTTOM) ? 1 : -1; - - if (panelBox.get_parent() === this._main.layoutManager.uiGroup) { - this._main.layoutManager.removeChrome(panelBox); - this._main.layoutManager.overviewGroup.insert_child_at_index(panelBox, 0); - } - - panelBox.translation_y = (mode === PANEL_HIDE_MODE.DESKTOP) ? 0 : panelHeight * direction; - - if (panelPosition === PANEL_POSITION.TOP) { - // when panel is hidden the first element gets too close to the top, - // so we fix it with top margin in search entry - let marginTop = (mode === PANEL_HIDE_MODE.ALL) ? 15 : panelHeight; - searchEntryParent.set_style(`margin-top: ${marginTop}px;`); - } else { - searchEntryParent.set_style(`margin-top: 0;`); - } - - // hide and show can fix windows going under panel - panelBox.hide(); - panelBox.show(); - this.#fixLookingGlassPosition(); - - if (this._hidePanelWorkareasChangedSignal) { - global.display.disconnect(this._hidePanelWorkareasChangedSignal); - delete(this._hidePanelWorkareasChangedSignal); - } - - this._hidePanelWorkareasChangedSignal = global.display.connect( - 'workareas-changed', - () => { - this.panelHide(this._panelHideMode); - } - ); - - if (!this._hidePanelHeightSignal) { - this._hidePanelHeightSignal = panelBox.connect( - 'notify::height', - () => { - this.panelHide(this._panelHideMode); - } - ); - } - - let classname = this.#getAPIClassname('no-panel'); - this.UIStyleClassAdd(classname); - - // update hot corners since we need to make them available - // outside overview - this._main.layoutManager._updateHotCorners(); - - // Maximized windows will have bad maximized gap after unlock in Wayland - // This is a Mutter issue, - // See https://gitlab.gnome.org/GNOME/mutter/-/issues/1627 - // TODO remove after the issue is fixed on Mutter - if (this._meta.is_wayland_compositor()) { - let duration = this.#addToAnimationDuration(180); - this.#timeoutIds.panelHide = this._glib.timeout_add( - this._glib.PRIORITY_DEFAULT, - duration, - () => { - panelBox.hide(); - panelBox.show(); - return this._glib.SOURCE_REMOVE; - } - ); - } - } - - /** - * check whether panel is visible - * - * @returns {boolean} - */ - isPanelVisible() - { - if (this._panelVisibility === undefined) { - return true; - } - - return this._panelVisibility; - } - - /** - * check whether dash is visible - * - * @returns {boolean} - */ - isDashVisible() - { - return this._dashVisibility === undefined || this._dashVisibility; - } - - /** - * show dash - * - * @returns {void} - */ - dashShow() - { - if (!this._main.overview.dash || this.isDashVisible()) { - return; - } - - this._dashVisibility = true; - - this._main.overview.dash.show(); - - this._main.overview.dash.height = -1; - this._main.overview.dash.setMaxSize(-1, -1); - - this.#updateWindowPreviewOverlap(); - } - - /** - * hide dash - * - * @returns {void} - */ - dashHide() - { - if (!this._main.overview.dash || !this.isDashVisible()) { - return; - } - - this._dashVisibility = false; - - this._main.overview.dash.hide(); - - this._main.overview.dash.height = 0; - - this.#updateWindowPreviewOverlap(); - } - - /** - * update window preview overlap - * - * @returns {void} - */ - #updateWindowPreviewOverlap() - { - let wpp = this._windowPreview.WindowPreview.prototype; - - if (this.isDashVisible() && wpp.overlapHeightsOld) { - wpp.overlapHeights = wpp.overlapHeightsOld; - delete(wpp.overlapHeightsOld); - return; - } - - if (!this.isDashVisible()) { - wpp.overlapHeightsOld = wpp.overlapHeights; - wpp.overlapHeights = function () { - let [top, bottom] = this.overlapHeightsOld(); - return [top + 24, bottom + 24]; - }; - } - } - - /** - * add class name to the UI group - * - * @param {string} classname class name - * - * @returns {void} - */ - UIStyleClassAdd(classname) - { - this._main.layoutManager.uiGroup.add_style_class_name(classname); - } - - /** - * remove class name from UI group - * - * @param {string} classname class name - * - * @returns {void} - */ - UIStyleClassRemove(classname) - { - this._main.layoutManager.uiGroup.remove_style_class_name(classname); - } - - /** - * check whether UI group has class name - * - * @param {string} classname class name - * - * @returns {boolean} - */ - UIStyleClassContain(classname) - { - return this._main.layoutManager.uiGroup.has_style_class_name(classname); - } - - /** - * enable background menu - * - * @returns {void} - */ - backgroundMenuEnable() - { - if (!this.#originals['backgroundMenuOpen']) { - return; - } - - this._backgroundMenu.BackgroundMenu.prototype.open = this.#originals['backgroundMenuOpen']; - } - - /** - * disable background menu - * - * @returns {void} - */ - backgroundMenuDisable() - { - let backgroundMenuProto = this._backgroundMenu.BackgroundMenu.prototype; - - if (!this.#originals['backgroundMenuOpen']) { - this.#originals['backgroundMenuOpen'] = backgroundMenuProto.open; - } - - backgroundMenuProto.open = () => {}; - } - - /** - * show search - * - * @param {boolean} fake true means it just needs to do the job but - * don't need to change the search visibility status - * - * @returns {void} - */ - searchEntryShow(fake) - { - let classname = this.#getAPIClassname('no-search'); - - if (!this.UIStyleClassContain(classname)) { - return; - } - - this.UIStyleClassRemove(classname); - - let searchEntry = this._main.overview.searchEntry; - let searchEntryParent = searchEntry.get_parent(); - - searchEntryParent.ease({ - height: searchEntry.height, - opacity: 255, - mode: this._clutter.AnimationMode.EASE, - duration: 110, - onComplete: () => { - searchEntryParent.height = -1; - searchEntry.ease({ - opacity: 255, - mode: this._clutter.AnimationMode.EASE, - duration: 700, - }); - }, - }); - - if (!fake) { - this._searchEntryVisibility = true; - } - - this.#computeWorkspacesBoxForStateChanged(); - } - - /** - * hide search - * - * @param {boolean} fake true means it just needs to do the job - * but don't need to change the search visibility status - * - * @returns {void} - */ - searchEntryHide(fake) - { - this.UIStyleClassAdd(this.#getAPIClassname('no-search')); - - let searchEntry = this._main.overview.searchEntry; - let searchEntryParent = searchEntry.get_parent(); - - searchEntry.ease({ - opacity: 0, - mode: this._clutter.AnimationMode.EASE, - duration: 50, - }); - - searchEntryParent.ease({ - height: 0, - opacity: 0, - mode: this._clutter.AnimationMode.EASE, - duration: 120, - }); - - if (!fake) { - this._searchEntryVisibility = false; - } - - this.#computeWorkspacesBoxForStateChanged(); - } - - /** - * enable start search - * - * @returns {void} - */ - startSearchEnable() - { - this.#startSearchSignal(true); - - if (!this.#originals['startSearch']) { - return; - } - - this._searchController.SearchController.prototype.startSearch = this.#originals['startSearch']; - } - - /** - * disable start search - * - * @returns {void} - */ - startSearchDisable() - { - this.#startSearchSignal(false); - - if (!this.#originals['startSearch']) { - this.#originals['startSearch'] = this._searchController.SearchController.prototype.startSearch - } - - this._searchController.SearchController.prototype.startSearch = () => {}; - } - - /** - * add search signals that needs to be show search entry when the - * search entry is hidden - * - * @param {boolean} add true means add the signal, false means remove - * the signal - * - * @returns {void} - */ - #startSearchSignal(add) - { - let controller - = this._main.overview.viewSelector || - this._main.overview._overview.viewSelector || - this._main.overview._overview.controls._searchController; - - // remove - if (!add) { - if (this._searchActiveSignal) { - controller.disconnect(this._searchActiveSignal); - this._searchActiveSignal = null; - } - return; - } - - // add - if (this._searchActiveSignal) { - return; - } - - this._searchActiveSignal = controller.connect('notify::search-active', () => { - if (this._searchEntryVisibility) { - return; - } - - let inSearch = controller.searchActive; - - if (inSearch) { - this.UIStyleClassAdd(this.#getAPIClassname('type-to-search')); - this.searchEntryShow(true); - } else { - this.UIStyleClassRemove(this.#getAPIClassname('type-to-search')); - this.searchEntryHide(true); - } - }); - } - - /** - * Set maximum displayed search result to default value - * - * @returns {void} - */ - setMaxDisplayedSearchResultToDefault() - { - if (!this.#originals['searchGetMaxDisplayedResults']) { - return; - } - - let ListSearchResultsProto = this._search.ListSearchResults.prototype; - - ListSearchResultsProto._getMaxDisplayedResults = this.#originals['searchGetMaxDisplayedResults']; - } - - /** - * Set maximum displayed search result - * - * @param {number} items max items - * - * @returns {void} - */ - setMaxDisplayedSearchResult(items) - { - let ListSearchResultsProto = this._search.ListSearchResults.prototype; - - if (!this.#originals['searchGetMaxDisplayedResults']) { - this.#originals['searchGetMaxDisplayedResults'] = ListSearchResultsProto._getMaxDisplayedResults; - } - - ListSearchResultsProto._getMaxDisplayedResults = () => { - return items; - } - } - - /** - * enable OSD - * - * @returns {void} - */ - OSDEnable() - { - if (!this.#originals['osdWindowManagerShow']) { - return; - } - - this._main.osdWindowManager.show = this.#originals['osdWindowManagerShow']; - } - - /** - * disable OSD - * - * @returns {void} - */ - OSDDisable() - { - if (!this.#originals['osdWindowManagerShow']) { - this.#originals['osdWindowManagerShow'] - = this._main.osdWindowManager.show; - } - - this._main.osdWindowManager.show = () => {}; - } - - /** - * enable workspace popup - * - * @returns {void} - */ - workspacePopupEnable() - { - if (!this.#originals['workspaceSwitcherPopupDisplay']) { - return; - } - - this._workspaceSwitcherPopup.WorkspaceSwitcherPopup.prototype.display - = this.#originals['workspaceSwitcherPopupDisplay'] - } - - /** - * disable workspace popup - * - * @returns {void} - */ - workspacePopupDisable() - { - if (!this.#originals['workspaceSwitcherPopupDisplay']) { - this.#originals['workspaceSwitcherPopupDisplay'] - = this._workspaceSwitcherPopup.WorkspaceSwitcherPopup.prototype.display; - } - - this._workspaceSwitcherPopup.WorkspaceSwitcherPopup.prototype.display = function (index) { - this.destroy(); - }; - } - - /** - * show workspace switcher - * - * @returns {void} - */ - workspaceSwitcherShow() - { - this.UIStyleClassRemove(this.#getAPIClassname('no-workspace')); - - this.#workspaceSwitcherShouldShowSetToLast(); - } - - /** - * hide workspace switcher - * - * @returns {void} - */ - workspaceSwitcherHide() - { - this.workspaceSwitcherShouldShow(false, true); - - // should be after `this.workspaceSwitcherShouldShow()` - // since it checks whether it's visible or not - this.UIStyleClassAdd(this.#getAPIClassname('no-workspace')); - } - - /** - * check whether workspace switcher is visible - * - * @returns {boolean} - */ - isWorkspaceSwitcherVisible() - { - return !this.UIStyleClassContain(this.#getAPIClassname('no-workspace')); - } - - /** - * set workspace switcher to its default size - * - * @returns {void} - */ - workspaceSwitcherSetDefaultSize() - { - let thumbnailsBox = this._main.overview._overview._controls._thumbnailsBox; - let ThumbnailsBoxProto = this._workspaceThumbnail.ThumbnailsBox.prototype; - - if (!ThumbnailsBoxProto._initOld) { - return; - } - - ThumbnailsBoxProto._init = ThumbnailsBoxProto._initOld; - delete(ThumbnailsBoxProto._initOld); - - thumbnailsBox._maxThumbnailScale = this._workspaceThumbnail.MAX_THUMBNAIL_SCALE; - } - - /** - * set workspace switcher size - * - * @param {number} size in float - * - * @returns {void} - */ - workspaceSwitcherSetSize(size) - { - let thumbnailsBox = this._main.overview._overview._controls._thumbnailsBox; - let ThumbnailsBoxProto = this._workspaceThumbnail.ThumbnailsBox.prototype; - - thumbnailsBox._maxThumbnailScale = size; - - if (!ThumbnailsBoxProto._initOld) { - ThumbnailsBoxProto._initOld = ThumbnailsBoxProto._init; - } - - ThumbnailsBoxProto._init = function(...params) { - this._maxThumbnailScale = size; - this._initOld(...params); - }; - } - - /** - * add element to stage - * - * @param {St.Widget} element widget - * - * @returns {void} - */ - chromeAdd(element) - { - this._main.layoutManager.addChrome(element, { - affectsInputRegion : true, - affectsStruts : false, - trackFullscreen : true, - }); - } - - /** - * remove element from stage - * - * @param {St.Widget} element widget - * - * @returns {void} - */ - chromeRemove(element) - { - this._main.layoutManager.removeChrome(element); - } - - /** - * show activities button - * - * @returns {void} - */ - activitiesButtonShow() - { - let activities = this._main.panel.statusArea.activities; - - if (!this.isLocked() && activities) { - activities.container.show(); - } - } - - /** - * hide activities button - * - * @returns {void} - */ - activitiesButtonHide() - { - let activities = this._main.panel.statusArea.activities; - - if (activities) { - activities.container.hide(); - } - } - - /** - * show date menu - * - * @returns {void} - */ - dateMenuShow() - { - if (!this.isLocked()) { - this._main.panel.statusArea.dateMenu.container.show(); - } - } - - /** - * hide date menu - * - * @returns {void} - */ - dateMenuHide() - { - this._main.panel.statusArea.dateMenu.container.hide(); - } - - /** - * show keyboard layout - * - * @returns {void} - */ - keyboardLayoutShow() - { - this._main.panel.statusArea.keyboard.container.show(); - } - - /** - * hide keyboard layout - * - * @returns {void} - */ - keyboardLayoutHide() - { - this._main.panel.statusArea.keyboard.container.hide(); - } - - /** - * show accessibility menu - * - * @returns {void} - */ - accessibilityMenuShow() - { - this._main.panel.statusArea.a11y?.container.show(); - } - - /** - * hide accessibility menu - * - * @returns {void} - */ - accessibilityMenuHide() - { - this._main.panel.statusArea.a11y?.container.hide(); - } - - /** - * show quick settings menu - * - * @returns {void} - */ - quickSettingsMenuShow() - { - this._main.panel.statusArea.quickSettings.container.show(); - } - - /** - * hide quick settings menu - * - * @returns {void} - */ - quickSettingsMenuHide() - { - this._main.panel.statusArea.quickSettings.container.hide(); - } - - /** - * check whether lock dialog is currently showing - * - * @returns {boolean} - */ - isLocked() - { - return this._main.sessionMode.isLocked; - } - - /** - * enable window picker icon - * - * @returns {void} - */ - windowPickerIconEnable() - { - this.UIStyleClassRemove(this.#getAPIClassname('no-window-picker-icon')); - } - - /** - * disable window picker icon - * - * @returns {void} - */ - windowPickerIconDisable() - { - this.UIStyleClassAdd(this.#getAPIClassname('no-window-picker-icon')); - } - - /** - * show power icon - * - * @returns {void} - */ - powerIconShow() - { - this.UIStyleClassRemove(this.#getAPIClassname('no-power-icon')); - } - - /** - * hide power icon - * - * @returns {void} - */ - powerIconHide() - { - this.UIStyleClassAdd(this.#getAPIClassname('no-power-icon')); - } - - /** - * get primary monitor information - * - * @returns {false|Object} false when monitor does not exist | object - * x: int - * y: int - * width: int - * height: int - * geometryScale: float - */ - monitorGetInfo() - { - let pMonitor = this._main.layoutManager.primaryMonitor; - - if (!pMonitor) { - return false; - } - - return { - 'x': pMonitor.x, - 'y': pMonitor.y, - 'width': pMonitor.width, - 'height': pMonitor.height, - 'geometryScale': pMonitor.geometry_scale, - }; - } - - /** - * get panel position - * - * @returns {number} see PANEL_POSITION - */ - panelGetPosition() - { - if (this._panelPosition === undefined) { - return PANEL_POSITION.TOP; - } - - return this._panelPosition; - } - - /** - * move panel position - * - * @param {number} position see PANEL_POSITION - * @param {boolean} force allow to set even when the current position - * is the same - * - * @returns {void} - */ - panelSetPosition(position, force = false) - { - let monitorInfo = this.monitorGetInfo(); - let panelBox = this._main.layoutManager.panelBox; - - if (!force && position === this.panelGetPosition()) { - return; - } - - if (position === PANEL_POSITION.TOP) { - this._panelPosition = PANEL_POSITION.TOP; - if (this._workareasChangedSignal) { - global.display.disconnect(this._workareasChangedSignal); - this._workareasChangedSignal = null; - } - if (this._panelHeightSignal) { - panelBox.disconnect(this._panelHeightSignal); - this._panelHeightSignal = null; - } - let topX = (monitorInfo) ? monitorInfo.x : 0; - let topY = (monitorInfo) ? monitorInfo.y : 0; - panelBox.set_position(topX, topY); - this.UIStyleClassRemove(this.#getAPIClassname('bottom-panel')); - this.#fixPanelMenuSide(this._st.Side.TOP); - this.#fixLookingGlassPosition(); - return; - } - - this._panelPosition = PANEL_POSITION.BOTTOM; - - // only change it when a monitor detected - // 'workareas-changed' signal will do the job on next monitor detection - if (monitorInfo) { - let BottomX = monitorInfo.x; - let BottomY = monitorInfo.y + monitorInfo.height - this.panelGetSize(); - - panelBox.set_position(BottomX, BottomY); - this.UIStyleClassAdd(this.#getAPIClassname('bottom-panel')); - } - - if (!this._workareasChangedSignal) { - this._workareasChangedSignal - = global.display.connect('workareas-changed', () => { - this.panelSetPosition(PANEL_POSITION.BOTTOM, true); - }); - } - - if (!this._panelHeightSignal) { - this._panelHeightSignal = panelBox.connect('notify::height', () => { - this.panelSetPosition(PANEL_POSITION.BOTTOM, true); - }); - } - - this.#fixPanelMenuSide(this._st.Side.BOTTOM); - this.#fixLookingGlassPosition(); - } - - /** - * fix panel menu opening side based on panel position - * - * @param {number} position St.Side value - * is the same - * - * @returns {void} - */ - #fixPanelMenuSide(position) - { - let PanelMenuButton = this._panelMenu.Button; - let PanelMenuButtonProto = PanelMenuButton.prototype; - - // Set Instances - let findPanelMenus = (widget) => { - if (widget instanceof PanelMenuButton && widget.menu?._boxPointer) { - widget.menu._boxPointer._userArrowSide = position; - } - widget.get_children().forEach(subWidget => { - findPanelMenus(subWidget) - }); - } - - let panelBoxes = [ - this._main.panel._centerBox, - this._main.panel._rightBox, - this._main.panel._leftBox, - ]; - panelBoxes.forEach(panelBox => findPanelMenus(panelBox)); - - // Set Prototypes - if (position === this._st.Side.TOP) { - // reset to default since GNOME Shell panel is top by default - if (PanelMenuButtonProto._setMenuOld) { - PanelMenuButtonProto.setMenu = PanelMenuButtonProto._setMenuOld; - } - return; - } - - if (!PanelMenuButtonProto._setMenuOld) { - PanelMenuButtonProto._setMenuOld = PanelMenuButtonProto.setMenu; - } - - PanelMenuButtonProto.setMenu = function (menu) { - this._setMenuOld(menu); - if (menu) { - menu._boxPointer._userArrowSide = position; - } - } - } - - /** - * fix looking glass position - * - * @returns {void} - */ - #fixLookingGlassPosition() - { - let lookingGlassProto = this._lookingGlass.LookingGlass.prototype; - - if (this.#originals['lookingGlassResize'] === undefined) { - this.#originals['lookingGlassResize'] = lookingGlassProto._resize; - } - - if (this.panelGetPosition() === PANEL_POSITION.TOP && this.isPanelVisible()) { - - lookingGlassProto._resize = this.#originals['lookingGlassResize']; - delete(lookingGlassProto._oldResizeMethod); - delete(this.#originals['lookingGlassResize']); - - return; - } - - if (lookingGlassProto._oldResizeMethod === undefined) { - lookingGlassProto._oldResizeMethod = this.#originals['lookingGlassResize']; - - const Main = this._main; - - lookingGlassProto._resize = function () { - let panelHeight = Main.layoutManager.panelBox.height; - this._oldResizeMethod(); - this._targetY -= panelHeight; - this._hiddenY -= panelHeight; - }; - } - } - - /** - * enable panel notification icon - * - * @returns {void} - */ - panelNotificationIconEnable() - { - this.UIStyleClassRemove(this.#getAPIClassname('no-panel-notification-icon')); - } - - /** - * disable panel notification icon - * - * @returns {void} - */ - panelNotificationIconDisable() - { - this.UIStyleClassAdd(this.#getAPIClassname('no-panel-notification-icon')); - } - - /** - * disconnect all clock menu position signals - * - * @returns {void} - */ - #disconnectClockMenuPositionSignals() - { - let panelBoxes = [ - this._main.panel._centerBox, - this._main.panel._rightBox, - this._main.panel._leftBox, - ]; - - if (this._clockMenuPositionSignals) { - for (let i = 0; i <= 2; i++) { - panelBoxes[i].disconnect(this._clockMenuPositionSignals[i]); - } - delete(this._clockMenuPositionSignals); - } - } - - /** - * set the clock menu position to default - * - * @returns {void} - */ - clockMenuPositionSetDefault() - { - this.clockMenuPositionSet(0, 0); - this.#disconnectClockMenuPositionSignals(); - } - - /** - * set the clock menu position - * - * @param {number} pos see PANEL_BOX_POSITION - * @param {number} offset starts from 0 - * - * @returns {void} - */ - clockMenuPositionSet(pos, offset) - { - let dateMenu = this._main.panel.statusArea.dateMenu; - - let panelBoxes = [ - this._main.panel._centerBox, - this._main.panel._rightBox, - this._main.panel._leftBox, - ]; - - this.#disconnectClockMenuPositionSignals(); - - let fromPos = -1; - let fromIndex = -1; - let toIndex = -1; - let childLength = 0; - for (let i = 0; i <= 2; i++) { - let child = panelBoxes[i].get_children(); - let childIndex = child.indexOf(dateMenu.container); - if (childIndex !== -1) { - fromPos = i; - fromIndex = childIndex; - childLength = panelBoxes[pos].get_children().length; - toIndex = (offset > childLength) ? childLength : offset; - break; - } - } - - // couldn't find the from and to position because it has been removed - if (fromPos === -1 || fromIndex === -1 || toIndex === -1) { - return; - } - - if (pos === fromPos && toIndex === fromIndex) { - return; - } - - panelBoxes[fromPos].remove_child(dateMenu.container); - panelBoxes[pos].insert_child_at_index(dateMenu.container, toIndex); - - if (this.isLocked()) { - this.dateMenuHide(); - } - - if (!this._clockMenuPositionSignals) { - this._clockMenuPositionSignals = [null, null, null]; - for (let i = 0; i <= 2; i++) { - this._clockMenuPositionSignals[i] = panelBoxes[i].connect( - (this.#shellVersion >= 46) ? 'child-added' : 'actor-added', - () => { - this.clockMenuPositionSet(pos, offset); - } - ); - } - } - } - - /** - * enable show apps button - * - * @returns {void} - */ - showAppsButtonEnable() - { - this.UIStyleClassRemove(this.#getAPIClassname('no-show-apps-button')); - } - - /** - * disable show apps button - * - * @returns {void} - */ - showAppsButtonDisable() - { - this.UIStyleClassAdd(this.#getAPIClassname('no-show-apps-button')); - } - - /** - * set animation speed as default - * - * @returns {void} - */ - animationSpeedSetDefault() - { - if (this.#originals['StSlowDownFactor'] === undefined) { - return; - } - - this._st.Settings.get().slow_down_factor = this.#originals['StSlowDownFactor']; - } - - /** - * change animation speed - * - * @param {number} factor in float. bigger number means slower - * - * @returns {void} - */ - animationSpeedSet(factor) - { - if (this.#originals['StSlowDownFactor'] === undefined) { - this.#originals['StSlowDownFactor'] - = this._st.Settings.get().slow_down_factor; - } - - this._st.Settings.get().slow_down_factor = factor; - } - - /** - * set the enable animation as default - * - * @returns {void} - */ - enableAnimationsSetDefault() - { - if (this.#originals['enableAnimations'] === undefined) { - return; - } - - let status = this.#originals['enableAnimations']; - - this._interfaceSettings.set_boolean('enable-animations', status); - } - - /** - * set the enable animation status - * - * @param {boolean} status true to enable, false otherwise - * - * @returns {void} - */ - enableAnimationsSet(status) - { - if (this.#originals['enableAnimations'] === undefined) { - this.#originals['enableAnimations'] - = this._interfaceSettings.get_boolean('enable-animations'); - } - - this._interfaceSettings.set_boolean('enable-animations', status); - } - - /** - * enable focus when window demands attention happens - * - * @returns {void} - */ - windowDemandsAttentionFocusEnable() - { - if ( - this._displayWindowDemandsAttentionSignal || - this._displayWindowMarkedUrgentSignal - ) { - return; - } - - let display = global.display; - - let demandFunction = (display, window) => { - if (!window || window.has_focus() || window.is_skip_taskbar()) { - return; - } - this._main.activateWindow(window); - }; - - this._displayWindowDemandsAttentionSignal - = display.connect('window-demands-attention', demandFunction); - this._displayWindowMarkedUrgentSignal - = display.connect('window-marked-urgent', demandFunction); - - // since removing '_windowDemandsAttentionId' doesn't have any effect - // we remove the original signal and re-connect it on disable - let signalId = this.#getSignalId(global.display, 'window-demands-attention'); - let signalId2 = this.#getSignalId(global.display, 'window-marked-urgent'); - display.disconnect(signalId); - display.disconnect(signalId2); - } - - /** - * disable focus when window demands attention happens - * - * @returns {void} - */ - windowDemandsAttentionFocusDisable() - { - if ( - !this._displayWindowDemandsAttentionSignal || - !this._displayWindowMarkedUrgentSignal - ) { - return; - } - - let display = global.display; - - display.disconnect(this._displayWindowDemandsAttentionSignal); - display.disconnect(this._displayWindowMarkedUrgentSignal); - this._displayWindowDemandsAttentionSignal = null; - this._displayWindowMarkedUrgentSignal = null; - - let wah = this._main.windowAttentionHandler; - wah._windowDemandsAttentionId = display.connect( - 'window-demands-attention', - wah._onWindowDemandsAttention.bind(wah) - ); - wah._windowDemandsAttentionId = display.connect( - 'window-marked-urgent', - wah._onWindowDemandsAttention.bind(wah) - ); - } - - /** - * enable maximizing windows on creation - * - * @returns {void} - */ - windowMaximizedOnCreateEnable() - { - if (this._displayWindowCreatedSignal) { - return; - } - - let display = global.display; - - let createdFunction = (display, window) => { - if (window.can_maximize()) { - window.maximize(this._meta.MaximizeFlags.HORIZONTAL | this._meta.MaximizeFlags.VERTICAL); - } - }; - - this._displayWindowCreatedSignal = display.connect('window-created', createdFunction); - } - - /** - * disable maximizing windows on creation - * - * @returns {void} - */ - windowMaximizedOnCreateDisable() - { - if (!this._displayWindowCreatedSignal) { - return; - } - - let display = global.display; - - display.disconnect(this._displayWindowCreatedSignal); - delete(this._displayWindowCreatedSignal); - } - - /** - * set startup status - * - * @param {number} status see SHELL_STATUS for available status - * - * @returns {void} - */ - startupStatusSet(status) - { - let sessionMode = this._main.sessionMode; - let layoutManager = this._main.layoutManager; - - if (!layoutManager._startingUp) { - return; - } - - if (this.#originals['sessionModeHasOverview'] === undefined) { - this.#originals['sessionModeHasOverview'] = sessionMode.hasOverview; - } - - let ControlsState = this._overviewControls.ControlsState; - let Controls = this._main.overview._overview.controls; - - switch (status) { - - case SHELL_STATUS.NONE: - sessionMode.hasOverview = false; - layoutManager.startInOverview = false; - Controls._stateAdjustment.value = ControlsState.HIDDEN; - break; - - case SHELL_STATUS.OVERVIEW: - default: - sessionMode.hasOverview = true; - layoutManager.startInOverview = true; - break; - } - - if (!this._startupCompleteSignal) { - this._startupCompleteSignal - = layoutManager.connect('startup-complete', () => { - sessionMode.hasOverview = this.#originals['sessionModeHasOverview']; - }); - } - } - - /** - * set startup status to default - * - * @returns {void} - */ - startupStatusSetDefault() - { - if (this.#originals['sessionModeHasOverview'] === undefined) { - return; - } - - if (this._startupCompleteSignal) { - this._main.layoutManager.disconnect(this._startupCompleteSignal); - } - } - - /** - * set dash icon size to default - * - * @returns {void} - */ - dashIconSizeSetDefault() - { - let classnameStarter = this.#getAPIClassname('dash-icon-size'); - - DASH_ICON_SIZES.forEach(size => { - this.UIStyleClassRemove(classnameStarter + size); - }); - } - - /** - * set dash icon size - * - * @param {number} size in pixels - * see DASH_ICON_SIZES for available sizes - * - * @returns {void} - */ - dashIconSizeSet(size) - { - this.dashIconSizeSetDefault(); - - if (!DASH_ICON_SIZES.includes(size)) { - return; - } - - let classnameStarter = this.#getAPIClassname('dash-icon-size'); - - this.UIStyleClassAdd(classnameStarter + size); - } - - /** - * change ControlsManagerLayout._computeWorkspacesBoxForState - * base on the current state - * - * @returns {void} - */ - #computeWorkspacesBoxForStateChanged() - { - let controlsLayout = this._main.overview._overview._controls.layout_manager; - - if (!this.#originals['computeWorkspacesBoxForState']) { - this.#originals['computeWorkspacesBoxForState'] - = controlsLayout._computeWorkspacesBoxForState; - } - - controlsLayout._computeWorkspacesBoxForState = (state, box, searchHeight, ...args) => { - - let inAppGrid = state === this._overviewControls.ControlsState.APP_GRID; - - if (inAppGrid && !this._searchEntryVisibility) { - // We need some spacing on top of workspace box in app grid - // when the search entry is not visible. - searchHeight = 40; - } - - box = this.#originals['computeWorkspacesBoxForState'].call( - controlsLayout, state, box, searchHeight, ...args); - - if (inAppGrid && this._workspacesInAppGridHeight !== undefined) { - box.set_size( - box.get_width(), - this._workspacesInAppGridHeight - ); - } - - return box; - }; - - // Since workspace background has shadow around it, it can cause - // unwanted shadows in app grid when the workspace height is 0. - // so we are removing the shadow when we are in app grid - if (!this._appButtonForComputeWorkspacesSignal) { - this._appButtonForComputeWorkspacesSignal = - this._main.overview.dash.showAppsButton.connect( - 'notify::checked', - () => { - let checked = this._main.overview.dash.showAppsButton.checked; - let classname = this.#getAPIClassname('no-workspaces-in-app-grid'); - if (checked) { - this.UIStyleClassAdd(classname); - } else { - this.UIStyleClassRemove(classname); - } - } - ); - } - } - - /** - * change ControlsManagerLayout._computeWorkspacesBoxForState to its default - * - * @returns {void} - */ - #computeWorkspacesBoxForStateSetDefault() - { - if (!this.#originals['computeWorkspacesBoxForState']) { - return; - } - - let controlsLayout = this._main.overview._overview._controls.layout_manager; - - controlsLayout._computeWorkspacesBoxForState - = this.#originals['computeWorkspacesBoxForState']; - - if (this._appButtonForComputeWorkspacesSignal) { - let showAppsButton = this._main.overview.dash.showAppsButton; - showAppsButton.disconnect(this._appButtonForComputeWorkspacesSignal); - delete(this._appButtonForComputeWorkspacesSignal); - this.UIStyleClassRemove(this.#getAPIClassname('no-workspaces-in-app-grid')); - } - } - - /** - * disable workspaces in app grid - * - * @returns {void} - */ - workspacesInAppGridDisable() - { - this._workspacesInAppGridHeight = 0; - this.#computeWorkspacesBoxForStateChanged(); - } - - /** - * enable workspaces in app grid - * - * @returns {void} - */ - workspacesInAppGridEnable() - { - if (this._workspacesInAppGridHeight === undefined) { - return; - } - - delete(this._workspacesInAppGridHeight); - this.#computeWorkspacesBoxForStateChanged(); - } - - /** - * change notification banner position - * - * @param {number} pos - * see XY_POSITION for available positions - * - * @returns {void} - */ - notificationBannerPositionSet(pos) - { - let messageTray = this._main.messageTray; - let bannerBin = messageTray._bannerBin; - - if (this.#originals['bannerAlignmentX'] === undefined) { - this.#originals['bannerAlignmentX'] = messageTray.bannerAlignment; - } - - if (this.#originals['bannerAlignmentY'] === undefined) { - this.#originals['bannerAlignmentY'] = bannerBin.get_y_align(); - } - - if (this.#originals['hideNotification'] === undefined) { - this.#originals['hideNotification'] = messageTray._hideNotification; - } - - // TOP - messageTray._hideNotification = this.#originals['hideNotification']; - - bannerBin.set_y_align(this._clutter.ActorAlign.START); - - if (pos === XY_POSITION.TOP_START) { - messageTray.bannerAlignment = this._clutter.ActorAlign.START; - return; - } - - if (pos === XY_POSITION.TOP_END) { - messageTray.bannerAlignment = this._clutter.ActorAlign.END; - return; - } - - if (pos === XY_POSITION.TOP_CENTER) { - messageTray.bannerAlignment = this._clutter.ActorAlign.CENTER; - return; - } - - // BOTTOM - - // >> - // This block is going to fix the animation when the notification is - // in bottom area - // this is the same function from (ui.messageTray.messageTray._hideNotification) - // with clutter animation mode set to EASE. - // because the EASE_OUT_BACK (original code) causes glitch when - // the tray is on bottom - const State = this._messageTray.State; - const ANIMATION_TIME = this._messageTray.ANIMATION_TIME; - const Clutter = this._clutter; - - messageTray._hideNotification = function (animate) { - this._notificationFocusGrabber.ungrabFocus(); - this._banner.disconnectObject(this); - this._resetNotificationLeftTimeout(); - this._bannerBin.remove_all_transitions(); - - if (animate) { - this._notificationState = State.HIDING; - this._bannerBin.ease({ - opacity: 0, - duration: ANIMATION_TIME, - mode: Clutter.AnimationMode.EASE, - }); - this._bannerBin.ease({ - opacity: 0, - y: this._bannerBin.height, - duration: ANIMATION_TIME, - mode: Clutter.AnimationMode.EASE, - onComplete: () => { - this._notificationState = State.HIDDEN; - this._hideNotificationCompleted(); - this._updateState(); - }, - }); - } else { - this._bannerBin.y = this._bannerBin.height; - this._bannerBin.opacity = 0; - this._notificationState = State.HIDDEN; - this._hideNotificationCompleted(); - } - } - // << - - bannerBin.set_y_align(this._clutter.ActorAlign.END); - - if (pos === XY_POSITION.BOTTOM_START) { - messageTray.bannerAlignment = this._clutter.ActorAlign.START; - return; - } - - if (pos === XY_POSITION.BOTTOM_END) { - messageTray.bannerAlignment = this._clutter.ActorAlign.END; - return; - } - - if (pos === XY_POSITION.BOTTOM_CENTER) { - messageTray.bannerAlignment = this._clutter.ActorAlign.CENTER; - return; - } - } - - /** - * set notification banner position to default position - * - * @returns {void} - */ - notificationBannerPositionSetDefault() - { - if (this.#originals['bannerAlignmentX'] === undefined || - this.#originals['bannerAlignmentY'] === undefined || - this.#originals['hideNotification'] === undefined - ) { - return; - } - - let messageTray = this._main.messageTray; - let bannerBin = messageTray._bannerBin; - - messageTray.bannerAlignment = this.#originals['bannerAlignmentX']; - bannerBin.set_y_align(this.#originals['bannerAlignmentY']); - messageTray._hideNotification = this.#originals['hideNotification']; - } - - /** - * set the workspace switcher to always/never show - * - * @param {boolean} show true for always show, false for never show - * @param {boolean} fake true means set the current should show status - * - * @returns {void} - */ - workspaceSwitcherShouldShow(shouldShow = true, fake = false) - { - if (!fake) { - this._shouldShow = shouldShow; - } - - if (!this.isWorkspaceSwitcherVisible()) { - return; - } - - let ThumbnailsBoxProto = this._workspaceThumbnail.ThumbnailsBox.prototype; - - if (!this.#originals['updateShouldShow']) { - this.#originals['updateShouldShow'] = ThumbnailsBoxProto._updateShouldShow; - } - - ThumbnailsBoxProto._updateShouldShow = function () { - if (this._shouldShow === shouldShow) { - return; - } - this._shouldShow = shouldShow; - this.notify('should-show'); - }; - } - - /** - * set the always show workspace switcher status to last real status - * - * @returns {void} - */ - #workspaceSwitcherShouldShowSetToLast() - { - if (this._shouldShow === undefined) { - this.workspaceSwitcherShouldShowSetDefault(); - return; - } - - this.workspaceSwitcherShouldShow(this._shouldShow); - } - - /** - * set the always show workspace switcher status to default - * - * @returns {void} - */ - workspaceSwitcherShouldShowSetDefault() - { - if (!this.#originals['updateShouldShow'] || !this.isWorkspaceSwitcherVisible()) { - return; - } - - let ThumbnailsBoxProto = this._workspaceThumbnail.ThumbnailsBox.prototype; - ThumbnailsBoxProto._updateShouldShow = this.#originals['updateShouldShow']; - delete(this.#originals['updateShouldShow']); - delete(this._shouldShow); - } - - /** - * set panel button hpadding to default - * - * @returns {void} - */ - panelButtonHpaddingSetDefault() - { - if (this._panelButtonHpaddingSize === undefined) { - return; - } - - let classnameStarter = this.#getAPIClassname('panel-button-padding-size'); - this.UIStyleClassRemove(classnameStarter + this._panelButtonHpaddingSize); - this.#emitRefreshStyles(); - - delete this._panelButtonHpaddingSize; - } - - /** - * set panel button hpadding size - * - * @param {number} size in pixels (0 - 60) - * - * @returns {void} - */ - panelButtonHpaddingSizeSet(size) - { - this.panelButtonHpaddingSetDefault(); - - if (size < 0 || size > 60) { - return; - } - - this._panelButtonHpaddingSize = size; - - let classnameStarter = this.#getAPIClassname('panel-button-padding-size'); - this.UIStyleClassAdd(classnameStarter + size); - this.#emitRefreshStyles(); - } - - /** - * set panel indicator padding to default - * - * @returns {void} - */ - panelIndicatorPaddingSetDefault() - { - if (this._panelIndicatorPaddingSize === undefined) { - return; - } - - let classnameStarter = this.#getAPIClassname('panel-indicator-padding-size'); - this.UIStyleClassRemove(classnameStarter + this._panelIndicatorPaddingSize); - this.#emitRefreshStyles(); - - delete this._panelIndicatorPaddingSize; - } - - /** - * set panel indicator padding size - * - * @param {number} size in pixels (0 - 60) - * - * @returns {void} - */ - panelIndicatorPaddingSizeSet(size) - { - this.panelIndicatorPaddingSetDefault(); - - if (size < 0 || size > 60) { - return; - } - - this._panelIndicatorPaddingSize = size; - - let classnameStarter = this.#getAPIClassname('panel-indicator-padding-size'); - this.UIStyleClassAdd(classnameStarter + size); - this.#emitRefreshStyles(); - } - - /** - * get window preview prototype - * - * @returns {Object} - */ - #windowPreviewGetPrototype() - { - return this._windowPreview.WindowPreview.prototype; - } - - /** - * enable window preview caption - * - * @returns {void} - */ - windowPreviewCaptionEnable() - { - if (!this.#originals['windowPreviewGetCaption']) { - return; - } - - let windowPreviewProto = this.#windowPreviewGetPrototype(); - windowPreviewProto._getCaption = this.#originals['windowPreviewGetCaption']; - - this.UIStyleClassRemove(this.#getAPIClassname('no-window-caption')); - } - - /** - * disable window preview caption - * - * @returns {void} - */ - windowPreviewCaptionDisable() - { - let windowPreviewProto = this.#windowPreviewGetPrototype(); - - if (!this.#originals['windowPreviewGetCaption']) { - this.#originals['windowPreviewGetCaption'] = windowPreviewProto._getCaption; - } - - windowPreviewProto._getCaption = () => { - return ''; - }; - - this.UIStyleClassAdd(this.#getAPIClassname('no-window-caption')); - } - - /** - * set workspace background border radius to default size - * - * @returns {void} - */ - workspaceBackgroundRadiusSetDefault() - { - if (this._workspaceBackgroundRadiusSize === undefined) { - return; - } - - let workspaceBackgroundProto = this._workspace.WorkspaceBackground.prototype; - - workspaceBackgroundProto._updateBorderRadius - = this.#originals['workspaceBackgroundUpdateBorderRadius']; - - let classnameStarter = this.#getAPIClassname('workspace-background-radius-size'); - this.UIStyleClassRemove(classnameStarter + this._workspaceBackgroundRadiusSize); - - delete this._workspaceBackgroundRadiusSize; - } - - /** - * set workspace background border radius size - * - * @param {number} size in pixels (0 - 60) - * - * @returns {void} - */ - workspaceBackgroundRadiusSet(size) - { - if (size < 0 || size > 60) { - return; - } - - this.workspaceBackgroundRadiusSetDefault(); - - let workspaceBackgroundProto = this._workspace.WorkspaceBackground.prototype; - - if (!this.#originals['workspaceBackgroundUpdateBorderRadius']) { - this.#originals['workspaceBackgroundUpdateBorderRadius'] - = workspaceBackgroundProto._updateBorderRadius; - } - - const Util = this._util; - const St = this._st; - - workspaceBackgroundProto._updateBorderRadius = function () { - const {scaleFactor} = St.ThemeContext.get_for_stage(global.stage); - const cornerRadius = scaleFactor * size; - - const backgroundContent = this._bgManager.backgroundActor.content; - backgroundContent.rounded_clip_radius = - Util.lerp(0, cornerRadius, this._stateAdjustment.value); - } - - this._workspaceBackgroundRadiusSize = size; - - let classnameStarter = this.#getAPIClassname('workspace-background-radius-size'); - this.UIStyleClassAdd(classnameStarter + size); - } - - /** - * enable workspace wraparound - * - * @returns {void} - */ - workspaceWraparoundEnable() - { - let metaWorkspaceProto = this._meta.Workspace.prototype; - - if (!this.#originals['metaWorkspaceGetNeighbor']) { - this.#originals['metaWorkspaceGetNeighbor'] - = metaWorkspaceProto.get_neighbor; - } - - const Meta = this._meta; - - metaWorkspaceProto.get_neighbor = function (dir) { - - let index = this.index(); - let lastIndex = global.workspace_manager.n_workspaces - 1; - let neighborIndex; - - if (dir === Meta.MotionDirection.UP || dir === Meta.MotionDirection.LEFT) { - // prev - neighborIndex = (index > 0) ? index - 1 : lastIndex; - } else { - // next - neighborIndex = (index < lastIndex) ? index + 1 : 0; - } - - return global.workspace_manager.get_workspace_by_index(neighborIndex); - }; - } - - /** - * disable workspace wraparound - * - * @returns {void} - */ - workspaceWraparoundDisable() - { - if (!this.#originals['metaWorkspaceGetNeighbor']) { - return; - } - - let metaWorkspaceProto = this._meta.Workspace.prototype; - metaWorkspaceProto.get_neighbor = this.#originals['metaWorkspaceGetNeighbor']; - } - - /** - * enable window preview close button - * - * @returns {void} - */ - windowPreviewCloseButtonEnable() - { - this.UIStyleClassRemove(this.#getAPIClassname('no-window-close')); - } - - /** - * disable window preview close button - * - * @returns {void} - */ - windowPreviewCloseButtonDisable() - { - this.UIStyleClassAdd(this.#getAPIClassname('no-window-close')); - } - - /** - * enable ripple box - * - * @returns {void} - */ - rippleBoxEnable() - { - this.UIStyleClassRemove(this.#getAPIClassname('no-ripple-box')); - } - - /** - * disable ripple box - * - * @returns {void} - */ - rippleBoxDisable() - { - this.UIStyleClassAdd(this.#getAPIClassname('no-ripple-box')); - } - - /** - * unblock overlay key - * - * @returns {void} - */ - unblockOverlayKey() - { - if (!this._overlayKeyOldSignalId) { - return; - } - - this._gobject.signal_handler_unblock( - global.display, - this._overlayKeyOldSignalId - ); - - delete(this._overlayKeyOldSignalId); - } - - /** - * block overlay key - * - * @returns {void} - */ - blockOverlayKey() - { - this._overlayKeyOldSignalId = this.#getSignalId(global.display, 'overlay-key'); - - if (!this._overlayKeyOldSignalId) { - return; - } - - this._gobject.signal_handler_block(global.display, this._overlayKeyOldSignalId); - } - - /** - * enable double super press to toggle app grid - * - * @returns {void} - */ - doubleSuperToAppGridEnable() - { - if (this._isDoubleSuperToAppGrid === true) { - return; - } - - if (!this._overlayKeyNewSignalId) { - return; - } - - global.display.disconnect(this._overlayKeyNewSignalId); - delete(this._overlayKeyNewSignalId); - this.unblockOverlayKey(); - - this._isDoubleSuperToAppGrid = true; - } - - /** - * disable double super press to toggle app grid - * - * @returns {void} - */ - doubleSuperToAppGridDisable() - { - if (this._isDoubleSuperToAppGrid === false) { - return; - } - - this.blockOverlayKey(); - - this._overlayKeyNewSignalId = global.display.connect('overlay-key', () => { - this._main.overview.toggle(); - }); - - this._isDoubleSuperToAppGrid = false; - } - - /** - * disable the removal of switcher popup delay - * - * @returns {void} - */ - switcherPopupDelaySetDefault() - { - let SwitcherPopupProto = this._switcherPopup.SwitcherPopup.prototype; - - if (!SwitcherPopupProto.showOld) { - return; - } - - SwitcherPopupProto.show = SwitcherPopupProto.showOld; - delete(SwitcherPopupProto.showOld); - } - - /** - * enable the removal of switcher popup delay - * - * @returns {void} - */ - removeSwitcherPopupDelay() - { - let SwitcherPopupProto = this._switcherPopup.SwitcherPopup.prototype; - - SwitcherPopupProto.showOld = SwitcherPopupProto.show; - - SwitcherPopupProto.show = function (...args) { - let res = this.showOld(...args); - if (res) { - this._showImmediately(); - } - return res; - }; - } - - /** - * set default OSD position - * - * @returns {void} - */ - osdPositionSetDefault() - { - if (!this.#originals['osdWindowShow']) { - return; - } - - let osdWindowProto = this._osdWindow.OsdWindow.prototype; - - osdWindowProto.show = this.#originals['osdWindowShow']; - - delete(osdWindowProto._oldShow); - delete(this.#originals['osdWindowShow']); - - if ( - this.#originals['osdWindowXAlign'] !== undefined && - this.#originals['osdWindowYAlign'] !== undefined - ) { - let osdWindows = this._main.osdWindowManager._osdWindows; - osdWindows.forEach(osdWindow => { - osdWindow.x_align = this.#originals['osdWindowXAlign']; - osdWindow.y_align = this.#originals['osdWindowYAlign']; - }); - delete(this.#originals['osdWindowXAlign']); - delete(this.#originals['osdWindowYAlign']); - } - - this.UIStyleClassRemove(this.#getAPIClassname('osd-position-top')); - this.UIStyleClassRemove(this.#getAPIClassname('osd-position-bottom')); - this.UIStyleClassRemove(this.#getAPIClassname('osd-position-center')); - } - - /** - * set OSD position - * - * @param int pos position XY_POSITION - * - * @returns {void} - */ - osdPositionSet(pos) - { - let osdWindowProto = this._osdWindow.OsdWindow.prototype; - - if (!this.#originals['osdWindowShow']) { - this.#originals['osdWindowShow'] = osdWindowProto.show; - } - - if ( - this.#originals['osdWindowXAlign'] === undefined || - this.#originals['osdWindowYAlign'] === undefined - ) { - let osdWindows = this._main.osdWindowManager._osdWindows; - this.#originals['osdWindowXAlign'] = osdWindows[0].x_align; - this.#originals['osdWindowYAlign'] = osdWindows[0].y_align; - } - - if (osdWindowProto._oldShow === undefined) { - osdWindowProto._oldShow = this.#originals['osdWindowShow']; - } - - let [xAlign, yAlign] = this.#xyAlignGet(pos); - osdWindowProto.show = function () { - this.x_align = xAlign; - this.y_align = yAlign; - this._oldShow(); - }; - - if ( - pos === XY_POSITION.TOP_START || - pos === XY_POSITION.TOP_CENTER || - pos === XY_POSITION.TOP_END - ) { - this.UIStyleClassAdd(this.#getAPIClassname('osd-position-top')); - } - - if ( - pos === XY_POSITION.BOTTOM_START || - pos === XY_POSITION.BOTTOM_CENTER || - pos === XY_POSITION.BOTTOM_END - ) { - this.UIStyleClassAdd(this.#getAPIClassname('osd-position-bottom')); - } - - if ( - pos === XY_POSITION.CENTER_START || - pos === XY_POSITION.CENTER_CENTER || - pos === XY_POSITION.CENTER_END - ) { - this.UIStyleClassAdd(this.#getAPIClassname('osd-position-center')); - } - } - - /** - * show weather in date menu - * - * @returns {void} - */ - weatherShow() - { - this.UIStyleClassRemove(this.#getAPIClassname('no-weather')); - } - - /** - * hide weather in date menu - * - * @returns {void} - */ - weatherHide() - { - this.UIStyleClassAdd(this.#getAPIClassname('no-weather')); - } - - /** - * show world clocks in date menu - * - * @returns {void} - */ - worldClocksShow() - { - if (!this.#originals['clocksItemSync']) { - return; - } - - let clocksItem = this._main.panel.statusArea.dateMenu._clocksItem; - - clocksItem._sync = this.#originals['clocksItemSync']; - delete(this.#originals['clocksItemSync']); - - if (this._clocksItemShowSignal) { - clocksItem.disconnect(this._clocksItemShowSignal); - delete(this._clocksItemShowSignal); - } - - clocksItem._sync(); - } - - /** - * hide world clocks in date menu - * - * @returns {void} - */ - worldClocksHide() - { - let clocksItem = this._main.panel.statusArea.dateMenu._clocksItem; - - if (!this.#originals['clocksItemSync']) { - this.#originals['clocksItemSync'] = clocksItem._sync; - } - - clocksItem._sync = function () { - this.visible = false; - }; - - if (!this._clocksItemShowSignal) { - this._clocksItemShowSignal = clocksItem.connect('show', () => { - clocksItem._sync(); - }); - } - - clocksItem._sync(); - } - - /** - * show events button in date menu - * - * @returns {void} - */ - eventsButtonShow() - { - this.UIStyleClassRemove(this.#getAPIClassname('no-events-button')); - } - - /** - * hide events button in date menu - * - * @returns {void} - */ - eventsButtonHide() - { - this.UIStyleClassAdd(this.#getAPIClassname('no-events-button')); - } - - /** - * show calendar in date menu - * - * @returns {void} - */ - calendarShow() - { - this._main.panel.statusArea.dateMenu._calendar.show(); - } - - /** - * hide calendar in date menu - * - * @returns {void} - */ - calendarHide() - { - this._main.panel.statusArea.dateMenu._calendar.hide(); - } - - /** - * set default panel icon size - * - * @returns {void} - */ - panelIconSetDefaultSize() - { - if (this._panelIconSize === undefined || !this.#originals['panelIconSize']) { - return; - } - - let classnameStarter = this.#getAPIClassname('panel-icon-size'); - this.UIStyleClassRemove(classnameStarter + this._panelIconSize); - this.#emitRefreshStyles(); - - let defaultSize = this.#originals['panelIconSize']; - this.#changeDateMenuIndicatorIconSize(defaultSize); - - delete(this._panelIconSize); - } - - /** - * set panel icon size - * - * @param {number} size 1-60 - * - * @returns {void} - */ - panelIconSetSize(size) - { - if (size < 1 || size > 60) { - return; - } - - if (!this.#originals['panelIconSize']) { - this.#originals['panelIconSize'] = this._panel.PANEL_ICON_SIZE; - } - - let classnameStarter = this.#getAPIClassname('panel-icon-size'); - this.UIStyleClassRemove(classnameStarter + this.panelIconGetSize()); - this.UIStyleClassAdd(classnameStarter + size); - this.#emitRefreshStyles(); - - this.#changeDateMenuIndicatorIconSize(size); - - this._panelIconSize = size; - } - - /** - * change date menu indicator icon size - * - * @param {number} size - * - * @returns {void} - */ - #changeDateMenuIndicatorIconSize(size) - { - let dateMenu = this._main.panel.statusArea.dateMenu; - - // we get set_icon_size is not a function in some setups - // in case the date menu has been removed or not created - if ( - dateMenu && - dateMenu._indicator && - dateMenu._indicator.set_icon_size - ) { - dateMenu._indicator.set_icon_size(size); - } - } - - /** - * get panel icon size - * - * @returns {void} - */ - panelIconGetSize() - { - if (this._panelIconSize !== undefined) { - return this._panelIconSize; - } - - return this._panel.PANEL_ICON_SIZE; - } - - /** - * show dash separator - * - * @returns {void} - */ - dashSeparatorShow() - { - this.UIStyleClassRemove(this.#getAPIClassname('no-dash-separator')); - } - - /** - * hide dash separator - * - * @returns {void} - */ - dashSeparatorHide() - { - this.UIStyleClassAdd(this.#getAPIClassname('no-dash-separator')); - } - - /** - * get looking glass size - * - * @returns {array} - * width: int - * height: int - */ - #lookingGlassGetSize() - { - let lookingGlass = this._main.createLookingGlass(); - - return [lookingGlass.width, lookingGlass.height]; - } - - /** - * set default looking glass size - * - * @returns {void} - */ - lookingGlassSetDefaultSize() - { - if (!this._lookingGlassShowSignal) { - return; - } - - this._main.lookingGlass.disconnect(this._lookingGlassShowSignal); - - delete(this._lookingGlassShowSignal); - delete(this._lookingGlassOriginalSize); - delete(this._monitorsChangedSignal); - } - - /** - * set looking glass size - * - * @param {number} width in float - * @param {number} height in float - * - * @returns {void} - */ - lookingGlassSetSize(width, height) - { - let lookingGlass = this._main.createLookingGlass(); - - if (!this._lookingGlassOriginalSize) { - this._lookingGlassOriginalSize = this.#lookingGlassGetSize(); - } - - if (this._lookingGlassShowSignal) { - lookingGlass.disconnect(this._lookingGlassShowSignal); - delete(this._lookingGlassShowSignal); - } - - this._lookingGlassShowSignal = lookingGlass.connect('show', () => { - let [, currentHeight] = this.#lookingGlassGetSize(); - let [originalWidth, originalHeight] = this._lookingGlassOriginalSize; - - let monitorInfo = this.monitorGetInfo(); - - let dialogWidth - = (width !== null) - ? monitorInfo.width * width - : originalWidth; - - let x = monitorInfo.x + (monitorInfo.width - dialogWidth) / 2; - lookingGlass.set_x(x); - - let keyboardHeight = this._main.layoutManager.keyboardBox.height; - let availableHeight = monitorInfo.height - keyboardHeight; - let dialogHeight - = (height !== null) - ? Math.min(monitorInfo.height * height, availableHeight * 0.9) - : originalHeight; - - let hiddenY = lookingGlass._hiddenY + currentHeight - dialogHeight; - lookingGlass.set_y(hiddenY); - lookingGlass._hiddenY = hiddenY; - - lookingGlass.set_size(dialogWidth, dialogHeight); - }); - - if (!this._monitorsChangedSignal) { - this._monitorsChangedSignal = this._main.layoutManager.connect('monitors-changed', - () => { - this.lookingGlassSetSize(width, height); - }); - } - } - - /** - * show screenshot in window menu - * - * @returns {void} - */ - screenshotInWindowMenuShow() - { - let windowMenuProto = this._windowMenu.WindowMenu.prototype; - - if (windowMenuProto._oldBuildMenu === undefined) { - return; - } - - windowMenuProto._buildMenu = this.#originals['WindowMenubuildMenu']; - - delete(windowMenuProto._oldBuildMenu); - } - - /** - * hide screenshot in window menu - * - * @returns {void} - */ - screenshotInWindowMenuHide() - { - let windowMenuProto = this._windowMenu.WindowMenu.prototype; - - if (!this.#originals['WindowMenubuildMenu']) { - this.#originals['WindowMenubuildMenu'] = windowMenuProto._buildMenu; - } - - if (windowMenuProto._oldBuildMenu === undefined) { - windowMenuProto._oldBuildMenu = this.#originals['WindowMenubuildMenu']; - } - - windowMenuProto._buildMenu = function (window) { - this._oldBuildMenu(window); - this.firstMenuItem.hide(); - }; - } - - /** - * set all alt tab sizes to default - * - * @returns {void} - */ - #altTabSizesSetDefault() - { - let WindowIconProto = this._altTab.WindowIcon.prototype; - if (WindowIconProto._initOld) { - WindowIconProto._init = WindowIconProto._initOld; - delete(WindowIconProto._initOld); - } - - delete(this._altTabAPP_ICON_SIZE); - delete(this._altTabAPP_ICON_SIZE_SMALL); - delete(this._altTabWINDOW_PREVIEW_SIZE); - } - - /** - * set alt tab sizes - * - * @param {number|null} appIconSize - * @param {number|null} appIconSizeSmall - * @param {number|null} windowPreviewSize - * - * @returns {void} - */ - #altTabSizesSet(appIconSize, appIconSizeSmall, windowPreviewSize) - { - let WindowIconProto = this._altTab.WindowIcon.prototype; - if (!WindowIconProto._initOld) { - WindowIconProto._initOld = WindowIconProto._init; - } - - this._altTabAPP_ICON_SIZE ||= this._altTab.APP_ICON_SIZE; - this._altTabAPP_ICON_SIZE_SMALL ||= this._altTab.APP_ICON_SIZE_SMALL; - this._altTabWINDOW_PREVIEW_SIZE ||= this._altTab.WINDOW_PREVIEW_SIZE; - - const APP_ICON_SIZE = appIconSize || this._altTabAPP_ICON_SIZE; - const APP_ICON_SIZE_SMALL = appIconSizeSmall || this._altTabAPP_ICON_SIZE_SMALL; - const WINDOW_PREVIEW_SIZE = windowPreviewSize || this._altTabWINDOW_PREVIEW_SIZE; - - WindowIconProto._init = function(window, mode) { - this._initOld(window, mode); - } - } - - /** - * set default alt tab window preview size - * - * @returns {void} - */ - altTabWindowPreviewSetDefaultSize() - { - if (!this.#originals['altTabWindowPreviewSize']) { - return; - } - - this.#altTabSizesSet(null, null, this.#originals['altTabWindowPreviewSize']); - } - - /** - * set alt tab window preview size - * - * @param {number} size 1-512 - * - * @returns {void} - */ - altTabWindowPreviewSetSize(size) - { - if (size < 1 || size > 512) { - return; - } - - if (!this.#originals['altTabWindowPreviewSize']) { - this.#originals['altTabWindowPreviewSize'] = this._altTab.WINDOW_PREVIEW_SIZE; - } - - this.#altTabSizesSet(null, null, size); - } - - /** - * set default alt tab small icon size - * - * @returns {void} - */ - altTabSmallIconSetDefaultSize() - { - if (!this.#originals['altTabAppIconSizeSmall']) { - return; - } - - this.#altTabSizesSet(null, this.#originals['altTabAppIconSizeSmall'], null); - } - - /** - * set alt tab small icon size - * - * @param {number} size 1-512 - * - * @returns {void} - */ - altTabSmallIconSetSize(size) - { - if (size < 1 || size > 512) { - return; - } - - if (!this.#originals['altTabAppIconSizeSmall']) { - this.#originals['altTabAppIconSizeSmall'] = this._altTab.APP_ICON_SIZE_SMALL; - } - - this.#altTabSizesSet(null, size, null); - } - - /** - * set default alt tab icon size - * - * @returns {void} - */ - altTabIconSetDefaultSize() - { - if (!this.#originals['altTabAppIconSize']) { - return; - } - - this.#altTabSizesSet(this.#originals['altTabAppIconSize'], null, null); - } - - /** - * set alt tab icon size - * - * @param {number} size 1-512 - * - * @returns {void} - */ - altTabIconSetSize(size) - { - if (size < 1 || size > 512) { - return; - } - - if (!this.#originals['altTabAppIconSize']) { - this.#originals['altTabAppIconSize'] = this._altTab.APP_ICON_SIZE; - } - - this.#altTabSizesSet(size, null, null); - } - - /** - * enable screen sharing indicator - * - * @returns {void} - */ - screenSharingIndicatorEnable() - { - this.UIStyleClassRemove(this.#getAPIClassname('no-screen-sharing-indicator')); - } - - /** - * disable screen sharing indicator - * - * @returns {void} - */ - screenSharingIndicatorDisable() - { - this.UIStyleClassAdd(this.#getAPIClassname('no-screen-sharing-indicator')); - } - - /** - * enable screen recording indicator - * - * @returns {void} - */ - screenRecordingIndicatorEnable() - { - this.UIStyleClassRemove(this.#getAPIClassname('no-screen-recording-indicator')); - } - - /** - * disable screen recording indicator - * - * @returns {void} - */ - screenRecordingIndicatorDisable() - { - this.UIStyleClassAdd(this.#getAPIClassname('no-screen-recording-indicator')); - } - - /** - * set controls manager spacing to default - * - * @returns {void} - */ - controlsManagerSpacingSetDefault() - { - if (this._controlsManagerSpacingSize === undefined) { - return; - } - - let classnameStarter = this.#getAPIClassname('controls-manager-spacing-size'); - this.UIStyleClassRemove(classnameStarter + this._controlsManagerSpacingSize); - - delete this._controlsManagerSpacingSize; - } - - /** - * set controls manager spacing size - * - * @param {number} size in pixels (0 - 150) - * - * @returns {void} - */ - controlsManagerSpacingSizeSet(size) - { - this.controlsManagerSpacingSetDefault(); - - if (size < 0 || size > 150) { - return; - } - - this._controlsManagerSpacingSize = size; - - let classnameStarter = this.#getAPIClassname('controls-manager-spacing-size'); - this.UIStyleClassAdd(classnameStarter + size); - } - - /** - * set workspaces view spacing to default - * - * @returns {void} - */ - workspacesViewSpacingSetDefault() - { - let wsvp = this._workspacesView.WorkspacesView.prototype; - - if (wsvp._getSpacingOld === undefined) { - return; - } - - wsvp._getSpacing = wsvp._getSpacingOld; - delete wsvp._getSpacingOld; - } - - /** - * set workspaces view spacing size - * - * @param {number} size in pixels (0 - 500) - * - * @returns {void} - */ - workspacesViewSpacingSizeSet(size) - { - if (size < 0 || size > 500) { - return; - } - - let wsvp = this._workspacesView.WorkspacesView.prototype; - - if (wsvp._getSpacingOld === undefined) { - wsvp._getSpacingOld = wsvp._getSpacing; - } - - wsvp._getSpacing = function (box, fitMode, vertical) { - if (fitMode === 0) { - return size; - } - return this._getSpacingOld(box, fitMode, vertical); - }; - } - - /** - * show dash app running dot - * - * @returns {void} - */ - dashAppRunningDotShow() - { - this.UIStyleClassRemove(this.#getAPIClassname('no-dash-app-running-dot')); - } - - /** - * hide dash app running dot - * - * @returns {void} - */ - dashAppRunningDotHide() - { - this.UIStyleClassAdd(this.#getAPIClassname('no-dash-app-running-dot')); - } - - /** - * show dark style toggle button in quick settings - * - * @returns {void} - */ - quickSettingsDarkStyleToggleShow() - { - this.#onQuickSettingsPropertyCall('_darkMode', (darkMode) => { - darkMode.quickSettingsItems[0].show(); - }); - } - - /** - * hide dark style toggle button in quick settings - * - * @returns {void} - */ - quickSettingsDarkStyleToggleHide() - { - this.#onQuickSettingsPropertyCall('_darkMode', (darkMode) => { - darkMode.quickSettingsItems[0].hide(); - }); - } - - /** - * set workspaces view spacing size - * - * @param {string} propertyName - * @param {Function} func function to call when the property is available - * - * @returns {void} - */ - #onQuickSettingsPropertyCall(propertyName, func) - { - const quickSettings = this._main.panel.statusArea.quickSettings; - - this._glib.idle_add(this._glib.PRIORITY_DEFAULT_IDLE, () => { - if (!quickSettings[propertyName]) { - return this._glib.SOURCE_CONTINUE; - } - func(quickSettings[propertyName]); - return this._glib.SOURCE_REMOVE; - }); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/lib/executable_Manager.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/lib/executable_Manager.js deleted file mode 100644 index 95b14d17..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/lib/executable_Manager.js +++ /dev/null @@ -1,1481 +0,0 @@ -/** - * Manager Library - * - * @author Javad Rahmatzadeh <j.rahmatzadeh@gmail.com> - * @copyright 2020-2024 - * @license GPL-3.0-only - */ - -/** - * Apply settings to the GNOME Shell - */ -export class Manager -{ - /** - * Current shell version - * - * @type {number|null} - */ - #shellVersion = null; - - /** - * Instance of API - * - * @type {API|null} - */ - #api = null; - - /** - * Instance of Gio.Settings - * - * @type {Settings|null} - */ - #settings = null; - - /** - * Class Constructor - * - * @param {Object} dependencies - * 'API' instance of lib::API - * 'Settings' instance of Gio::Settings - * @param {number} shellVersion float in major.minor format - */ - constructor(dependencies, shellVersion) - { - this.#api = dependencies['API'] || null; - this.#settings = dependencies['Settings'] || null; - - this.#shellVersion = shellVersion; - } - - /** - * register all signals for settings - * - * @returns {void} - */ - registerSettingsSignals() - { - this.#settings.connect('changed::panel', () => { - this.#applyPanel(false); - }); - - this.#settings.connect('changed::panel-in-overview', () => { - this.#applyPanel(false); - }); - - this.#settings.connect('changed::search', () => { - this.#applySearch(false); - }); - - this.#settings.connect('changed::dash', () => { - this.#applyDash(false); - }); - - this.#settings.connect('changed::osd', () => { - this.#applyOSD(false); - }); - - this.#settings.connect('changed::workspace-popup', () => { - this.#applyWorkspacePopup(false); - }); - - this.#settings.connect('changed::workspace', () => { - this.#applyWorkspace(false); - }); - - this.#settings.connect('changed::background-menu', () => { - this.#applyBackgroundMenu(false); - }); - - this.#settings.connect('changed::theme', () => { - this.#applyTheme(false); - }); - - this.#settings.connect('changed::activities-button', () => { - this.#applyActivitiesButton(false); - }); - - this.#settings.connect('changed::clock-menu', () => { - this.#applyClockMenu(false); - }); - - this.#settings.connect('changed::keyboard-layout', () => { - this.#applyKeyboardLayout(false); - }); - - this.#settings.connect('changed::accessibility-menu', () => { - this.#applyAccessibilityMenu(false); - }); - - this.#settings.connect('changed::quick-settings', () => { - this.#applyQuickSettings(false); - }); - - this.#settings.connect('changed::quick-settings-dark-mode', () => { - this.#applyQuickSettingsDarkMode(false); - }); - - this.#settings.connect('changed::window-picker-icon', () => { - this.#applyWindowPickerIcon(false); - }); - - this.#settings.connect('changed::type-to-search', () => { - this.#applyTypeToSearch(false); - }); - - this.#settings.connect('changed::workspace-switcher-size', () => { - this.#applyWorkspaceSwitcherSize(false); - }); - - this.#settings.connect('changed::power-icon', () => { - this.#applyPowerIcon(false); - }); - - this.#settings.connect('changed::top-panel-position', () => { - this.#applyTopPanelPosition(false); - }); - - this.#settings.connect('changed::panel-notification-icon', () => { - this.#applyPanelNotificationIcon(false); - }); - - this.#settings.connect('changed::clock-menu-position', () => { - this.#applyClockMenuPosition(false); - }); - - this.#settings.connect('changed::clock-menu-position-offset', () => { - this.#applyClockMenuPosition(false); - }); - - this.#settings.connect('changed::show-apps-button', () => { - this.#applyShowAppsButton(false); - }); - - this.#settings.connect('changed::animation', () => { - this.#applyAnimation(false); - }); - - this.#settings.connect('changed::window-demands-attention-focus', () => { - this.#applyWindowDemandsAttentionFocus(false); - }); - - this.#settings.connect('changed::window-maximized-on-create', () => { - this.#applyWindowMaximizedOnCreate(false); - }); - - this.#settings.connect('changed::dash-icon-size', () => { - this.#applyDashIconSize(false); - }); - - this.#settings.connect('changed::startup-status', () => { - this.#applyStartupStatus(false); - }); - - this.#settings.connect('changed::workspaces-in-app-grid', () => { - this.#applyWorkspacesInAppGrid(false); - }); - - this.#settings.connect('changed::notification-banner-position', () => { - this.#applyNotificationBannerPosition(false); - }); - - this.#settings.connect('changed::workspace-switcher-should-show', () => { - this.#applyWorkspaceSwitcherShouldShow(false); - }); - - this.#settings.connect('changed::panel-size', () => { - this.#applyPanelSize(false); - }); - - this.#settings.connect('changed::panel-button-padding-size', () => { - this.#applyPanelButtonPaddingSize(false); - }); - - this.#settings.connect('changed::panel-indicator-padding-size', () => { - this.#applyPanelIndicatorPaddingSize(false); - }); - - this.#settings.connect('changed::window-preview-caption', () => { - this.#applyWindowPreviewCaption(false); - }); - - this.#settings.connect('changed::window-preview-close-button', () => { - this.#applyWindowPreviewCloseButton(false); - }); - - this.#settings.connect('changed::workspace-background-corner-size', () => { - this.#applyWorkspaceBackgroundCornerSize(false); - }); - - this.#settings.connect('changed::workspace-wrap-around', () => { - this.#applyWorkspaceWrapAround(false); - }); - - this.#settings.connect('changed::ripple-box', () => { - this.#applyRippleBox(false); - }); - - this.#settings.connect('changed::overlay-key', () => { - this.#applyOverlayKey(false); - }); - - this.#settings.connect('changed::double-super-to-appgrid', () => { - this.#applyOverlayKey(false); - }); - - this.#settings.connect('changed::switcher-popup-delay', () => { - this.#applySwitcherPopupDelay(false); - }); - - this.#settings.connect('changed::world-clock', () => { - this.#applyWorldClock(false); - }); - - this.#settings.connect('changed::weather', () => { - this.#applyWeather(false); - }); - - this.#settings.connect('changed::calendar', () => { - this.#applyCalendar(false); - }); - - this.#settings.connect('changed::events-button', () => { - this.#applyEventsButton(false); - }); - - this.#settings.connect('changed::panel-icon-size', () => { - this.#applyPanelIconSize(false); - }); - - this.#settings.connect('changed::dash-separator', () => { - this.#applyDashSeparator(false); - }); - - this.#settings.connect('changed::looking-glass-width', () => { - this.#applyLookingGlassSize(false); - }); - - this.#settings.connect('changed::looking-glass-height', () => { - this.#applyLookingGlassSize(false); - }); - - this.#settings.connect('changed::osd-position', () => { - this.#applyOSDPosition(false); - }); - - this.#settings.connect('changed::window-menu-take-screenshot-button', () => { - this.#applyWindowMenuTakeScreenshotButton(false); - }); - - this.#settings.connect('changed::alt-tab-window-preview-size', () => { - this.#applyAltTabWindowPreviewSize(false); - }); - - this.#settings.connect('changed::alt-tab-small-icon-size', () => { - this.#applyAltTabSmallIconSize(false); - }); - - this.#settings.connect('changed::alt-tab-icon-size', () => { - this.#applyAltTabIconSize(false); - }); - - this.#settings.connect('changed::screen-sharing-indicator', () => { - this.#applyScreenSharingIndicator(false); - }); - - this.#settings.connect('changed::screen-recording-indicator', () => { - this.#applyScreenRecordingIndicator(false); - }); - - this.#settings.connect('changed::controls-manager-spacing-size', () => { - this.#applyControlsManagerSpacingSize(false); - }); - - this.#settings.connect('changed::workspace-peek', () => { - this.#applyWorkspacePeek(false); - }); - - this.#settings.connect('changed::dash-app-running', () => { - this.#applyDashAppRunning(false); - }); - - this.#settings.connect('changed::max-displayed-search-results', () => { - this.#applyMaxDisplayedSearchResults(false); - }); - } - - /** - * apply everything to the GNOME Shell - * - * @returns {void} - */ - applyAll() - { - this.#applyTheme(false); - this.#applyPanel(false); - this.#applySearch(false); - this.#applyDash(false); - this.#applyOSD(false); - this.#applyWorkspacePopup(false); - this.#applyWorkspace(false); - this.#applyBackgroundMenu(false); - this.#applyActivitiesButton(false); - this.#applyClockMenu(false); - this.#applyKeyboardLayout(false); - this.#applyAccessibilityMenu(false); - this.#applyQuickSettings(false); - this.#applyQuickSettingsDarkMode(false); - this.#applyWindowPickerIcon(false); - this.#applyTypeToSearch(false); - this.#applyWorkspaceSwitcherSize(false); - this.#applyPowerIcon(false); - this.#applyTopPanelPosition(false); - this.#applyPanelNotificationIcon(false); - this.#applyClockMenuPosition(false); - this.#applyShowAppsButton(false); - this.#applyAnimation(false); - this.#applyWindowDemandsAttentionFocus(false); - this.#applyWindowMaximizedOnCreate(false); - this.#applyDashIconSize(false); - this.#applyStartupStatus(false); - this.#applyWorkspacesInAppGrid(false); - this.#applyNotificationBannerPosition(false); - this.#applyWorkspaceSwitcherShouldShow(false); - this.#applyPanelSize(false); - this.#applyPanelButtonPaddingSize(false); - this.#applyPanelIndicatorPaddingSize(false); - this.#applyWindowPreviewCaption(false); - this.#applyWindowPreviewCloseButton(false); - this.#applyWorkspaceBackgroundCornerSize(false); - this.#applyWorkspaceWrapAround(false); - this.#applyRippleBox(false); - this.#applyOverlayKey(false); - this.#applySwitcherPopupDelay(false); - this.#applyWorldClock(false); - this.#applyWeather(false); - this.#applyPanelIconSize(false); - this.#applyEventsButton(false); - this.#applyCalendar(false); - this.#applyDashSeparator(false); - this.#applyLookingGlassSize(false); - this.#applyOSDPosition(false); - this.#applyWindowMenuTakeScreenshotButton(false); - this.#applyAltTabWindowPreviewSize(false); - this.#applyAltTabSmallIconSize(false); - this.#applyAltTabIconSize(false); - this.#applyScreenSharingIndicator(false); - this.#applyScreenRecordingIndicator(false); - this.#applyControlsManagerSpacingSize(false); - this.#applyWorkspacePeek(false); - this.#applyDashAppRunning(false); - this.#applyMaxDisplayedSearchResults(false); - } - - /** - * revert everything done by this class to the GNOME Shell - * - * @returns {void} - */ - revertAll() - { - this.#applyTheme(true); - this.#applyPanel(true); - this.#applySearch(true); - this.#applyDash(true); - this.#applyOSD(true); - this.#applyWorkspace(true); - this.#applyWorkspacePopup(true); - this.#applyBackgroundMenu(true); - this.#applyActivitiesButton(true); - this.#applyClockMenu(true); - this.#applyKeyboardLayout(true); - this.#applyAccessibilityMenu(true); - this.#applyQuickSettings(true); - this.#applyQuickSettingsDarkMode(true); - this.#applyWindowPickerIcon(true); - this.#applyTypeToSearch(true); - this.#applyWorkspaceSwitcherSize(true); - this.#applyPowerIcon(true); - this.#applyTopPanelPosition(true); - this.#applyPanelNotificationIcon(true); - this.#applyClockMenuPosition(true); - this.#applyShowAppsButton(true); - this.#applyAnimation(true); - this.#applyWindowDemandsAttentionFocus(true); - this.#applyWindowMaximizedOnCreate(true); - this.#applyDashIconSize(true); - this.#applyStartupStatus(true); - this.#applyWorkspacesInAppGrid(true); - this.#applyNotificationBannerPosition(true); - this.#applyWorkspaceSwitcherShouldShow(true); - this.#applyPanelSize(true); - this.#applyPanelButtonPaddingSize(true); - this.#applyPanelIndicatorPaddingSize(true); - this.#applyWindowPreviewCaption(true); - this.#applyWindowPreviewCloseButton(true); - this.#applyWorkspaceBackgroundCornerSize(true); - this.#applyWorkspaceWrapAround(true); - this.#applyRippleBox(true); - this.#applyOverlayKey(true); - this.#applySwitcherPopupDelay(true); - this.#applyWorldClock(true); - this.#applyWeather(true); - this.#applyPanelIconSize(true); - this.#applyEventsButton(true); - this.#applyCalendar(true); - this.#applyDashSeparator(true); - this.#applyLookingGlassSize(true); - this.#applyOSDPosition(true); - this.#applyWindowMenuTakeScreenshotButton(true); - this.#applyAltTabWindowPreviewSize(true); - this.#applyAltTabSmallIconSize(true); - this.#applyAltTabIconSize(true); - this.#applyScreenSharingIndicator(true); - this.#applyScreenRecordingIndicator(true); - this.#applyControlsManagerSpacingSize(true); - this.#applyWorkspacePeek(true); - this.#applyDashAppRunning(true); - this.#applyMaxDisplayedSearchResults(true); - } - - /** - * apply panel settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyPanel(forceOriginal) - { - let panel = this.#settings.get_boolean('panel'); - let panelInOverview = this.#settings.get_boolean('panel-in-overview'); - - if (forceOriginal || panel) { - this.#api.panelShow(); - } else { - let mode = (panelInOverview) ? 1 : 0; - this.#api.panelHide(mode); - } - } - - /** - * apply search settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applySearch(forceOriginal) - { - if (forceOriginal || this.#settings.get_boolean('search')) { - this.#api.searchEntryShow(false); - } else { - this.#api.searchEntryHide(false); - } - } - - /** - * apply type to search settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyTypeToSearch(forceOriginal) - { - if (forceOriginal || this.#settings.get_boolean('type-to-search')) { - this.#api.startSearchEnable(); - } else { - this.#api.startSearchDisable(); - } - } - - /** - * apply dash settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyDash(forceOriginal) - { - if (forceOriginal || this.#settings.get_boolean('dash')) { - this.#api.dashShow(); - } else { - this.#api.dashHide(); - } - } - - /** - * apply osd settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyOSD(forceOriginal) - { - if (forceOriginal || this.#settings.get_boolean('osd')) { - this.#api.OSDEnable(); - } else { - this.#api.OSDDisable(); - } - } - - /** - * apply workspace popup settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyWorkspacePopup(forceOriginal) - { - if (forceOriginal || this.#settings.get_boolean('workspace-popup')) { - this.#api.workspacePopupEnable(); - } else { - this.#api.workspacePopupDisable(); - } - } - - /** - * apply workspace settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyWorkspace(forceOriginal) - { - if (forceOriginal || this.#settings.get_boolean('workspace')) { - this.#api.workspaceSwitcherShow(); - } else { - this.#api.workspaceSwitcherHide(); - } - } - - /** - * apply background menu settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyBackgroundMenu(forceOriginal) - { - if (forceOriginal || this.#settings.get_boolean('background-menu')) { - this.#api.backgroundMenuEnable(); - } else { - this.#api.backgroundMenuDisable(); - } - } - - /** - * apply theme settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyTheme(forceOriginal) - { - let className = 'just-perfection'; - - if (forceOriginal || !this.#settings.get_boolean('theme')) { - this.#api.UIStyleClassRemove(className); - } else { - this.#api.UIStyleClassAdd(className); - } - } - - /** - * apply activities button settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyActivitiesButton(forceOriginal) - { - if (forceOriginal || this.#settings.get_boolean('activities-button')) { - this.#api.activitiesButtonShow(); - } else { - this.#api.activitiesButtonHide(); - } - } - - /** - * apply clock menu (aka date menu) settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyClockMenu(forceOriginal) - { - if (forceOriginal || this.#settings.get_boolean('clock-menu')) { - this.#api.dateMenuShow(); - } else { - this.#api.dateMenuHide(); - } - } - - /** - * apply keyboard layout settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyKeyboardLayout(forceOriginal) - { - if (forceOriginal || this.#settings.get_boolean('keyboard-layout')) { - this.#api.keyboardLayoutShow(); - } else { - this.#api.keyboardLayoutHide(); - } - } - - /** - * apply accessibility menu settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyAccessibilityMenu(forceOriginal) - { - if (forceOriginal || this.#settings.get_boolean('accessibility-menu')) { - this.#api.accessibilityMenuShow(); - } else { - this.#api.accessibilityMenuHide(); - } - } - - /** - * apply quick settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyQuickSettings(forceOriginal) - { - if (forceOriginal || this.#settings.get_boolean('quick-settings')) { - this.#api.quickSettingsMenuShow(); - } else { - this.#api.quickSettingsMenuHide(); - } - } - - /** - * apply quick settings dark mode - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyQuickSettingsDarkMode(forceOriginal) - { - if (forceOriginal || this.#settings.get_boolean('quick-settings-dark-mode')) { - this.#api.quickSettingsDarkStyleToggleShow(); - } else { - this.#api.quickSettingsDarkStyleToggleHide(); - } - } - - /** - * apply window picker icon settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyWindowPickerIcon(forceOriginal) - { - if (forceOriginal || this.#settings.get_boolean('window-picker-icon')) { - this.#api.windowPickerIconEnable(); - } else { - this.#api.windowPickerIconDisable(); - } - } - - /** - * apply workspace switcher size settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyWorkspaceSwitcherSize(forceOriginal) - { - let size = this.#settings.get_int('workspace-switcher-size'); - - if (forceOriginal || size === 0) { - this.#api.workspaceSwitcherSetDefaultSize(); - } else { - this.#api.workspaceSwitcherSetSize(size / 100); - } - } - - /** - * apply power icon settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyPowerIcon(forceOriginal) - { - if (forceOriginal || this.#settings.get_boolean('power-icon')) { - this.#api.powerIconShow(); - } else { - this.#api.powerIconHide(); - } - } - - /** - * apply top panel position settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyTopPanelPosition(forceOriginal) - { - if (forceOriginal || this.#settings.get_int('top-panel-position') === 0) { - this.#api.panelSetPosition(0); - } else { - this.#api.panelSetPosition(1); - } - } - - /** - * apply panel notification icon settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyPanelNotificationIcon(forceOriginal) - { - if (forceOriginal || this.#settings.get_boolean('panel-notification-icon')) { - this.#api.panelNotificationIconEnable(); - } else { - this.#api.panelNotificationIconDisable(); - } - } - - /** - * apply clock menu position settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyClockMenuPosition(forceOriginal) - { - if (forceOriginal) { - this.#api.clockMenuPositionSetDefault(); - } else { - let pos = this.#settings.get_int('clock-menu-position'); - let offset = this.#settings.get_int('clock-menu-position-offset'); - this.#api.clockMenuPositionSet(pos, offset); - } - } - - /** - * apply show apps button settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyShowAppsButton(forceOriginal) - { - if (forceOriginal || this.#settings.get_boolean('show-apps-button')) { - this.#api.showAppsButtonEnable(); - } else { - this.#api.showAppsButtonDisable(); - } - } - - /** - * apply animation settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyAnimation(forceOriginal) - { - let animation = this.#settings.get_int('animation'); - - let factors = [ - 0.01, // almost none - 0.2, // fastest - 0.6, // faster - 0.8, // fast - 1.3, // slow - 1.6, // slower - 2.8, // slowest - ]; - - if (forceOriginal) { - this.#api.animationSpeedSetDefault(); - this.#api.enableAnimationsSetDefault(); - } else if (animation === 0) { - // disabled - this.#api.animationSpeedSetDefault(); - this.#api.enableAnimationsSet(false); - } else if (animation === 1) { - // default speed - this.#api.animationSpeedSetDefault(); - this.#api.enableAnimationsSet(true); - } else if (factors[animation - 2] !== undefined) { - // custom speed - this.#api.animationSpeedSet(factors[animation - 2]); - this.#api.enableAnimationsSet(true); - } - } - - /** - * apply window demands attention focus settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyWindowDemandsAttentionFocus(forceOriginal) - { - let focus = this.#settings.get_boolean('window-demands-attention-focus'); - - if (forceOriginal || !focus) { - this.#api.windowDemandsAttentionFocusDisable(); - } else { - this.#api.windowDemandsAttentionFocusEnable(); - } - } - - /** - * apply window maximized on create settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyWindowMaximizedOnCreate(forceOriginal) - { - let maximize = this.#settings.get_boolean('window-maximized-on-create'); - - if (forceOriginal || !maximize) { - this.#api.windowMaximizedOnCreateDisable(); - } else { - this.#api.windowMaximizedOnCreateEnable(); - } - } - - /** - * apply dash icon size settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyDashIconSize(forceOriginal) - { - let size = this.#settings.get_int('dash-icon-size'); - - if (forceOriginal || size === 0) { - this.#api.dashIconSizeSetDefault(); - } else { - this.#api.dashIconSizeSet(size); - } - } - - /** - * apply startup status settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyStartupStatus(forceOriginal) - { - let status = this.#settings.get_int('startup-status'); - - if (forceOriginal) { - this.#api.startupStatusSetDefault(); - } else { - this.#api.startupStatusSet(status); - } - } - - /** - * apply workspaces in app grid status settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyWorkspacesInAppGrid(forceOriginal) - { - let status = this.#settings.get_boolean('workspaces-in-app-grid'); - - if (forceOriginal || status) { - this.#api.workspacesInAppGridEnable(); - } else { - this.#api.workspacesInAppGridDisable(); - } - } - - /** - * apply notification banner position settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyNotificationBannerPosition(forceOriginal) - { - let pos = this.#settings.get_int('notification-banner-position'); - - if (forceOriginal) { - this.#api.notificationBannerPositionSetDefault(); - } else { - this.#api.notificationBannerPositionSet(pos); - } - } - - /** - * apply workspace switcher should show settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyWorkspaceSwitcherShouldShow(forceOriginal) - { - let shouldShow = this.#settings.get_boolean('workspace-switcher-should-show'); - - if (forceOriginal || !shouldShow) { - this.#api.workspaceSwitcherShouldShowSetDefault(); - } else { - this.#api.workspaceSwitcherShouldShow(true); - } - } - - /** - * apply panel size settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyPanelSize(forceOriginal) - { - let size = this.#settings.get_int('panel-size'); - - if (forceOriginal || size === 0) { - this.#api.panelSetDefaultSize(); - } else { - this.#api.panelSetSize(size, false); - } - } - - /** - * apply panel button padding size settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyPanelButtonPaddingSize(forceOriginal) - { - let size = this.#settings.get_int('panel-button-padding-size'); - - if (forceOriginal || size === 0) { - this.#api.panelButtonHpaddingSetDefault(); - } else { - this.#api.panelButtonHpaddingSizeSet(size - 1); - } - } - - /** - * apply panel indicator padding size settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyPanelIndicatorPaddingSize(forceOriginal) - { - let size = this.#settings.get_int('panel-indicator-padding-size'); - - if (forceOriginal || size === 0) { - this.#api.panelIndicatorPaddingSetDefault(); - } else { - this.#api.panelIndicatorPaddingSizeSet(size - 1); - } - } - - /** - * apply window preview caption settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyWindowPreviewCaption(forceOriginal) - { - let status = this.#settings.get_boolean('window-preview-caption'); - - if (forceOriginal || status) { - this.#api.windowPreviewCaptionEnable(); - } else { - this.#api.windowPreviewCaptionDisable(); - } - } - - /** - * apply window preview close button settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyWindowPreviewCloseButton(forceOriginal) - { - let status = this.#settings.get_boolean('window-preview-close-button'); - - if (forceOriginal || status) { - this.#api.windowPreviewCloseButtonEnable(); - } else { - this.#api.windowPreviewCloseButtonDisable(); - } - } - - /** - * apply workspace background corner size settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyWorkspaceBackgroundCornerSize(forceOriginal) - { - let size = this.#settings.get_int('workspace-background-corner-size'); - - if (forceOriginal || size === 0) { - this.#api.workspaceBackgroundRadiusSetDefault(); - } else { - this.#api.workspaceBackgroundRadiusSet(size - 1); - } - } - - /** - * apply workspace wrap around settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyWorkspaceWrapAround(forceOriginal) - { - let status = this.#settings.get_boolean('workspace-wrap-around'); - - if (forceOriginal || !status) { - this.#api.workspaceWraparoundDisable(); - } else { - this.#api.workspaceWraparoundEnable(); - } - } - - /** - * apply ripple box settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyRippleBox(forceOriginal) - { - let status = this.#settings.get_boolean('ripple-box'); - - if (forceOriginal || status) { - this.#api.rippleBoxEnable(); - } else { - this.#api.rippleBoxDisable(); - } - } - - /** - * apply overlay key - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyOverlayKey(forceOriginal) - { - let overlayKey = this.#settings.get_boolean('overlay-key'); - let doubleSuper = this.#settings.get_boolean('double-super-to-appgrid'); - - if (forceOriginal) { - this.#api.doubleSuperToAppGridEnable(); - this.#api.unblockOverlayKey(); - } else if (!overlayKey) { - this.#api.doubleSuperToAppGridEnable(); - this.#api.blockOverlayKey(); - } else { - this.#api.unblockOverlayKey(); - if (doubleSuper) { - this.#api.doubleSuperToAppGridEnable(); - } else { - this.#api.doubleSuperToAppGridDisable(); - } - } - } - - /** - * apply switcher popup delay settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applySwitcherPopupDelay(forceOriginal) - { - let status = this.#settings.get_boolean('switcher-popup-delay'); - - if (forceOriginal || status) { - this.#api.switcherPopupDelaySetDefault(); - } else { - this.#api.removeSwitcherPopupDelay(); - } - } - - /** - * apply world clock settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyWorldClock(forceOriginal) - { - let status = this.#settings.get_boolean('world-clock'); - - if (forceOriginal || status) { - this.#api.worldClocksShow(); - } else { - this.#api.worldClocksHide(); - } - } - - /** - * apply weather settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyWeather(forceOriginal) - { - let status = this.#settings.get_boolean('weather'); - - if (forceOriginal || status) { - this.#api.weatherShow(); - } else { - this.#api.weatherHide(); - } - } - - /** - * apply calendar settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyCalendar(forceOriginal) - { - let status = this.#settings.get_boolean('calendar'); - - if (forceOriginal || status) { - this.#api.calendarShow(); - } else { - this.#api.calendarHide(); - } - } - - /** - * apply events button settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyEventsButton(forceOriginal) - { - let status = this.#settings.get_boolean('events-button'); - - if (forceOriginal || status) { - this.#api.eventsButtonShow(); - } else { - this.#api.eventsButtonHide(); - } - } - - /** - * apply panel icon size settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyPanelIconSize(forceOriginal) - { - let size = this.#settings.get_int('panel-icon-size'); - - if (forceOriginal || size === 0) { - this.#api.panelIconSetDefaultSize(); - } else { - this.#api.panelIconSetSize(size); - } - } - - /** - * apply dash separator settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyDashSeparator(forceOriginal) - { - let status = this.#settings.get_boolean('dash-separator'); - - if (forceOriginal || status) { - this.#api.dashSeparatorShow(); - } else { - this.#api.dashSeparatorHide(); - } - } - - /** - * apply looking glass size settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyLookingGlassSize(forceOriginal) - { - let widthSize = this.#settings.get_int('looking-glass-width'); - let heightSize = this.#settings.get_int('looking-glass-height'); - - if (forceOriginal) { - this.#api.lookingGlassSetDefaultSize(); - } else { - let width = (widthSize !== 0) ? widthSize / 10 : null; - let height = (heightSize !== 0) ? heightSize / 10 : null; - this.#api.lookingGlassSetSize(width, height); - } - } - - /** - * apply osd position settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyOSDPosition(forceOriginal) - { - let pos = this.#settings.get_int('osd-position'); - - if (forceOriginal || pos === 0) { - this.#api.osdPositionSetDefault(); - } else { - this.#api.osdPositionSet(pos - 1); - } - } - - /** - * apply window menu take screenshot button settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyWindowMenuTakeScreenshotButton(forceOriginal) - { - let status = this.#settings.get_boolean('window-menu-take-screenshot-button'); - - if (forceOriginal || status) { - this.#api.screenshotInWindowMenuShow(); - } else { - this.#api.screenshotInWindowMenuHide(); - } - } - - /** - * apply alt tab window preview size settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyAltTabWindowPreviewSize(forceOriginal) - { - let size = this.#settings.get_int('alt-tab-window-preview-size'); - - if (forceOriginal || size === 0) { - this.#api.altTabWindowPreviewSetDefaultSize(); - } else { - this.#api.altTabWindowPreviewSetSize(size); - } - } - - /** - * apply alt tab small icon size settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyAltTabSmallIconSize(forceOriginal) - { - let size = this.#settings.get_int('alt-tab-small-icon-size'); - - if (forceOriginal || size === 0) { - this.#api.altTabSmallIconSetDefaultSize(); - } else { - this.#api.altTabSmallIconSetSize(size); - } - } - - /** - * apply alt tab icon size settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyAltTabIconSize(forceOriginal) - { - let size = this.#settings.get_int('alt-tab-icon-size'); - - if (forceOriginal || size === 0) { - this.#api.altTabIconSetDefaultSize(); - } else { - this.#api.altTabIconSetSize(size); - } - } - - /** - * apply screen sharing indicator settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyScreenSharingIndicator(forceOriginal) - { - let status = this.#settings.get_boolean('screen-sharing-indicator'); - - if (forceOriginal || status) { - this.#api.screenSharingIndicatorEnable(); - } else { - this.#api.screenSharingIndicatorDisable(); - } - } - - /** - * apply screen recording indicator settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyScreenRecordingIndicator(forceOriginal) - { - let status = this.#settings.get_boolean('screen-recording-indicator'); - - if (forceOriginal || status) { - this.#api.screenRecordingIndicatorEnable(); - } else { - this.#api.screenRecordingIndicatorDisable(); - } - } - - /** - * apply controls manager spacing size settings - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyControlsManagerSpacingSize(forceOriginal) - { - let size = this.#settings.get_int('controls-manager-spacing-size'); - - if (forceOriginal || size === 0) { - this.#api.controlsManagerSpacingSetDefault(); - } else { - this.#api.controlsManagerSpacingSizeSet(size); - } - } - - /** - * apply workspace peek - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyWorkspacePeek(forceOriginal) - { - if (forceOriginal || this.#settings.get_boolean('workspace-peek')) { - this.#api.workspacesViewSpacingSetDefault(); - } else { - this.#api.workspacesViewSpacingSizeSet(400); - } - } - - /** - * apply dash app running - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyDashAppRunning(forceOriginal) - { - if (forceOriginal || this.#settings.get_boolean('dash-app-running')) { - this.#api.dashAppRunningDotShow(); - } else { - this.#api.dashAppRunningDotHide(); - } - } - - /** - * apply max displayed search results - * - * @param {boolean} forceOriginal force original shell setting - * - * @returns {void} - */ - #applyMaxDisplayedSearchResults(forceOriginal) - { - let items = this.#settings.get_int('max-displayed-search-results'); - - if (forceOriginal || items === 0) { - this.#api.setMaxDisplayedSearchResultToDefault(); - } else { - this.#api.setMaxDisplayedSearchResult(items); - } - } -} - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/af/LC_MESSAGES/just-perfection.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/af/LC_MESSAGES/just-perfection.mo deleted file mode 100644 index 64b1c7b6..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/af/LC_MESSAGES/just-perfection.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/ar/LC_MESSAGES/just-perfection.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/ar/LC_MESSAGES/just-perfection.mo deleted file mode 100644 index fd2f0c5d..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/ar/LC_MESSAGES/just-perfection.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/be/LC_MESSAGES/just-perfection.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/be/LC_MESSAGES/just-perfection.mo deleted file mode 100644 index e84ec4b5..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/be/LC_MESSAGES/just-perfection.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/bg/LC_MESSAGES/just-perfection.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/bg/LC_MESSAGES/just-perfection.mo deleted file mode 100644 index 09909ff0..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/bg/LC_MESSAGES/just-perfection.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/ca/LC_MESSAGES/just-perfection.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/ca/LC_MESSAGES/just-perfection.mo deleted file mode 100644 index 1ccd83b8..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/ca/LC_MESSAGES/just-perfection.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/de/LC_MESSAGES/just-perfection.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/de/LC_MESSAGES/just-perfection.mo deleted file mode 100644 index 9149e9e3..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/de/LC_MESSAGES/just-perfection.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/es/LC_MESSAGES/just-perfection.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/es/LC_MESSAGES/just-perfection.mo deleted file mode 100644 index 1dce3287..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/es/LC_MESSAGES/just-perfection.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/fr/LC_MESSAGES/just-perfection.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/fr/LC_MESSAGES/just-perfection.mo deleted file mode 100644 index 306a63be..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/fr/LC_MESSAGES/just-perfection.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/gl/LC_MESSAGES/just-perfection.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/gl/LC_MESSAGES/just-perfection.mo deleted file mode 100644 index 6a78ab44..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/gl/LC_MESSAGES/just-perfection.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/it/LC_MESSAGES/just-perfection.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/it/LC_MESSAGES/just-perfection.mo deleted file mode 100644 index b3c07fba..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/it/LC_MESSAGES/just-perfection.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/ja/LC_MESSAGES/just-perfection.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/ja/LC_MESSAGES/just-perfection.mo deleted file mode 100644 index d4900147..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/ja/LC_MESSAGES/just-perfection.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/ne/LC_MESSAGES/just-perfection.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/ne/LC_MESSAGES/just-perfection.mo deleted file mode 100644 index 662e547e..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/ne/LC_MESSAGES/just-perfection.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/nl/LC_MESSAGES/just-perfection.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/nl/LC_MESSAGES/just-perfection.mo deleted file mode 100644 index 60fb2fa8..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/nl/LC_MESSAGES/just-perfection.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/pt_BR/LC_MESSAGES/just-perfection.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/pt_BR/LC_MESSAGES/just-perfection.mo deleted file mode 100644 index b3682f00..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/pt_BR/LC_MESSAGES/just-perfection.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/ru/LC_MESSAGES/just-perfection.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/ru/LC_MESSAGES/just-perfection.mo deleted file mode 100644 index a4fac19d..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/ru/LC_MESSAGES/just-perfection.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/sv/LC_MESSAGES/just-perfection.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/sv/LC_MESSAGES/just-perfection.mo deleted file mode 100644 index 2aa36565..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/sv/LC_MESSAGES/just-perfection.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/zh_CN/LC_MESSAGES/just-perfection.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/zh_CN/LC_MESSAGES/just-perfection.mo deleted file mode 100644 index 72ac65e6..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/zh_CN/LC_MESSAGES/just-perfection.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/zh_TW/LC_MESSAGES/just-perfection.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/zh_TW/LC_MESSAGES/just-perfection.mo deleted file mode 100644 index 67192c23..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/locale/zh_TW/LC_MESSAGES/just-perfection.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/private_metadata.json b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/private_metadata.json deleted file mode 100644 index bec7eee8..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/private_metadata.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "_generated": "Generated by SweetTooth, do not edit", - "description": "Tweak Tool to Customize GNOME Shell, Change the Behavior and Disable UI Elements", - "donations": { - "buymeacoffee": "justperfection", - "patreon": "justperfection" - }, - "gettext-domain": "just-perfection", - "name": "Just Perfection", - "settings-schema": "org.gnome.shell.extensions.just-perfection", - "shell-version": [ - "45", - "46", - "47" - ], - "url": "https://gitlab.gnome.org/jrahmatzadeh/just-perfection", - "uuid": "just-perfection-desktop@just-perfection", - "version": 30 -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/resources.gresource b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/resources.gresource deleted file mode 100644 index a93f5c1b..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/resources.gresource and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/schemas/executable_org.gnome.shell.extensions.just-perfection.gschema.xml b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/schemas/executable_org.gnome.shell.extensions.just-perfection.gschema.xml deleted file mode 100644 index b732d5fa..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/schemas/executable_org.gnome.shell.extensions.just-perfection.gschema.xml +++ /dev/null @@ -1,409 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<schemalist> - - <schema id="org.gnome.shell.extensions.just-perfection" - path="/org/gnome/shell/extensions/just-perfection/"> - - <key type="b" name="panel"> - <default>true</default> - <summary>Panel</summary> - <description>Panel Visibility Status</description> - </key> - - <key type="b" name="panel-in-overview"> - <default>false</default> - <summary>Panel in Overview</summary> - <description>Panel in Overview Visibility Status</description> - </key> - - <key type="b" name="background-menu"> - <default>true</default> - <summary>Background Menu</summary> - <description>Background Menu Status</description> - </key> - - <key type="b" name="search"> - <default>true</default> - <summary>Search Box</summary> - <description>Search Box Visibility Status</description> - </key> - - <key type="b" name="workspace"> - <default>true</default> - <summary>Workspace Switcher</summary> - <description>Workspace Switcher Visibility Status</description> - </key> - - <key type="b" name="dash"> - <default>true</default> - <summary>Dash</summary> - <description>Dash Visibility Status</description> - </key> - - <key type="b" name="osd"> - <default>true</default> - <summary>OSD</summary> - <description>OSD Visibility Status</description> - </key> - - <key type="b" name="workspace-popup"> - <default>true</default> - <summary>Workspace Popup</summary> - <description>Workspace Popup Visibility Status</description> - </key> - - <key type="b" name="theme"> - <default>false</default> - <summary>Theme</summary> - <description>Theme Status</description> - </key> - - <key type="b" name="activities-button"> - <default>true</default> - <summary>Activities Button</summary> - <description>Activities Button Visibility Status</description> - </key> - - <key type="b" name="clock-menu"> - <default>true</default> - <summary>Clock Menu</summary> - <description>Clock Menu Visibility Status</description> - </key> - - <key type="b" name="panel-notification-icon"> - <default>true</default> - <summary>Panel Notification Icon</summary> - <description>Panel Notification Icon Visibility Status</description> - </key> - - <key type="b" name="keyboard-layout"> - <default>true</default> - <summary>Keyboard Layout</summary> - <description>Keyboard Layout Visibility Status</description> - </key> - - <key type="b" name="accessibility-menu"> - <default>true</default> - <summary>Accessibility Menu</summary> - <description>Accessibility Menu Visibility Status</description> - </key> - - <key type="b" name="quick-settings"> - <default>true</default> - <summary>Quick Settings Menu</summary> - <description>Quick Settings Visibility Status</description> - </key> - - <key type="b" name="power-icon"> - <default>true</default> - <summary>Power Icon</summary> - <description>Power Icon Visibility Status</description> - </key> - - <key type="b" name="window-picker-icon"> - <default>true</default> - <summary>Window Picker Icon</summary> - <description>Window Picker Icon Visiblity</description> - </key> - - <key type="b" name="type-to-search"> - <default>true</default> - <summary>Type to Search</summary> - <description>Type to Search Behavior</description> - </key> - - <key type="i" name="panel-corner-size"> - <default>0</default> - <range min="0" max="61"/> - <summary>0 means use Shell theme, 1 means no border, 2 - 61 means border size</summary> - <description>Panel Corner Size</description> - </key> - - <key type="i" name="workspace-switcher-size"> - <default>0</default> - <range min="0" max="30"/> - <summary>Workspace Switcher Size in percent, 0 means use default size</summary> - <description>Workspace Switcher Size</description> - </key> - - <key type="i" name="top-panel-position"> - <default>0</default> - <range min="0" max="1"/> - <summary>Top Panel Position</summary> - <description>Top Panel Position Status</description> - </key> - - <key type="i" name="clock-menu-position"> - <default>0</default> - <range min="0" max="2"/> - <summary>0 means center, 1 means right, 2 means left</summary> - <description>Clock Menu Position Status</description> - </key> - - <key type="i" name="clock-menu-position-offset"> - <default>0</default> - <range min="0" max="20"/> - <summary>0 means start of the position</summary> - <description>Clock Menu Position Offset</description> - </key> - - <key type="b" name="show-apps-button"> - <default>true</default> - <summary>Show Apps Button Visiblity</summary> - <description>Show Apps Button Visiblity Status</description> - </key> - - <key type="i" name="animation"> - <default>1</default> - <range min="0" max="7"/> - <summary>0 means disabled, 1 means default speed, animation speed otherwise</summary> - <description>Animation Status</description> - </key> - - <key type="b" name="window-demands-attention-focus"> - <default>false</default> - <summary>Window Demands Attention Focus</summary> - <description>Window Demands Attention Focus Status</description> - </key> - - <key type="b" name="window-maximized-on-create"> - <default>false</default> - <summary>Window Maximized on Create</summary> - <description>Window Maximized on Create Status</description> - </key> - - <key type="i" name="dash-icon-size"> - <default>0</default> - <range min="0" max="64"/> - <summary>0 means default, 16, 22, 24, 32, 40, 48, 56, 64</summary> - <description>Dash Icon Size</description> - </key> - - <key type="i" name="startup-status"> - <default>1</default> - <range min="0" max="1"/> - <summary>0 means desktop, 1 means overview</summary> - <description>Startup Status</description> - </key> - - <key type="b" name="workspaces-in-app-grid"> - <default>true</default> - <summary>Workspaces Visiblity in App Grid</summary> - <description>Workspaces Visiblity in App Grid Status</description> - </key> - - <key type="i" name="notification-banner-position"> - <default>1</default> - <range min="0" max="5"/> - <summary>0: top start, 1: top center, 2: top end, 3: bottom start, 4: bottom center, 5: bottom end</summary> - <description>Notification Banner Position</description> - </key> - - <key type="b" name="workspace-switcher-should-show"> - <default>false</default> - <summary>Always Show Workspaces Switcher</summary> - <description>Always Show Workspace Switcher Status</description> - </key> - - <key type="i" name="panel-size"> - <default>0</default> - <range min="0" max="64"/> - <summary>0 means use Shell theme, 1 - 64 means size in pixels</summary> - <description>Panel Size</description> - </key> - - <key type="i" name="panel-button-padding-size"> - <default>0</default> - <range min="0" max="61"/> - <summary>0 means use Shell theme, 1 means no padding, 2 - 61 means padding size</summary> - <description>Panel Button Padding Size</description> - </key> - - <key type="i" name="panel-indicator-padding-size"> - <default>0</default> - <range min="0" max="61"/> - <summary>0 means use Shell theme, 1 means no padding, 2 - 61 means padding size</summary> - <description>Panel Indicator Padding Size</description> - </key> - - <key type="b" name="window-preview-caption"> - <default>true</default> - <summary>Window Preview Caption</summary> - <description>Window Preview Caption Status</description> - </key> - - <key type="b" name="window-preview-close-button"> - <default>true</default> - <summary>Window Preview Close Button</summary> - <description>Window Preview Close Button Status</description> - </key> - - <key type="i" name="workspace-background-corner-size"> - <default>0</default> - <range min="0" max="61"/> - <summary>0 means use default shell size, 1 means no radius, 2 - 61 means radius size</summary> - <description>Workspace Background Corner Size</description> - </key> - - <key type="b" name="workspace-wrap-around"> - <default>false</default> - <summary>Workspace Wrap Around</summary> - <description>Workspace Wrap Around Status</description> - </key> - - <key type="b" name="ripple-box"> - <default>true</default> - <summary>Ripple Box</summary> - <description>Ripple Box Status</description> - </key> - - <key type="b" name="double-super-to-appgrid"> - <default>true</default> - <summary>Double Supper To App Grid</summary> - <description>Double Supper To App Grid Status</description> - </key> - - <key type="b" name="overlay-key"> - <default>true</default> - <summary>Overlay Key</summary> - <description>Overlay Key to Overview Status</description> - </key> - - <key type="b" name="switcher-popup-delay"> - <default>true</default> - <summary>Switcher Popup Delay</summary> - <description>Removes the delay for all switcher popups like alt-tab, ctrl-alt-tab, keyboard layout, ...</description> - </key> - - <key type="b" name="world-clock"> - <default>true</default> - <summary>World Clock Visibility in Clock Menu</summary> - <description>World Clock Visibility Status</description> - </key> - - <key type="b" name="weather"> - <default>true</default> - <summary>Weather Visibility in Clock Menu</summary> - <description>Weather Visibility Status</description> - </key> - - <key type="b" name="events-button"> - <default>true</default> - <summary>Events Button Visibility in Clock Menu</summary> - <description>Events Button Visibility Status</description> - </key> - - <key type="b" name="calendar"> - <default>true</default> - <summary>Calendar Visibility in Clock Menu</summary> - <description>Calendar Visibility Status</description> - </key> - - <key type="i" name="panel-icon-size"> - <default>0</default> - <range min="0" max="60"/> - <summary>0 means use Shell theme, 1 - 60 means panel icon size</summary> - <description>Panel Icon Size</description> - </key> - - <key type="b" name="dash-separator"> - <default>true</default> - <summary>Dash Separator Visibility</summary> - <description>Dash Separator Visibility Status</description> - </key> - - <key type="b" name="workspace-peek"> - <default>true</default> - <summary>Workspace Peek</summary> - <description>Workspace Peek Status</description> - </key> - - <key type="i" name="looking-glass-width"> - <default>0</default> - <range min="0" max="9"/> - <summary>Width Size in percent, 0 means use default size</summary> - <description>Looking Glass Width size</description> - </key> - - <key type="i" name="looking-glass-height"> - <default>0</default> - <range min="0" max="9"/> - <summary>Height Size in percent, 0 means use default size</summary> - <description>Looking Glass Height size</description> - </key> - - <key type="i" name="osd-position"> - <default>0</default> - <range min="0" max="9"/> - <summary>OSD Position</summary> - <description>OSD Position Status</description> - </key> - - <key type="b" name="window-menu-take-screenshot-button"> - <default>true</default> - <summary>Window Menu Take Screenshot Button Visibility</summary> - <description>Window Menu Take Screenshot Button Visibility Status</description> - </key> - - <key type="i" name="alt-tab-window-preview-size"> - <default>0</default> - <range min="0" max="512"/> - <summary>0 means default size</summary> - <description>Alt Tab Window Preview Size</description> - </key> - - <key type="i" name="alt-tab-small-icon-size"> - <default>0</default> - <range min="0" max="512"/> - <summary>0 means default size</summary> - <description>Alt Tab Small Icon Size (Window Preview Icon Size)</description> - </key> - - <key type="i" name="alt-tab-icon-size"> - <default>0</default> - <range min="0" max="512"/> - <summary>0 means default size</summary> - <description>Alt Tab Icon Size</description> - </key> - - <key type="b" name="screen-sharing-indicator"> - <default>true</default> - <summary>Screen Sharing Indicator Visibility in Panel</summary> - <description>Screen Sharing Indicator Visibility Status</description> - </key> - - <key type="b" name="screen-recording-indicator"> - <default>true</default> - <summary>Screen Recording Indicator Visibility in Panel</summary> - <description>Screen Recording Indicator Visibility Status</description> - </key> - - <key type="i" name="controls-manager-spacing-size"> - <default>0</default> - <range min="0" max="150"/> - <summary>0 means default size</summary> - <description>Controls manager spacing Size (overview spacing)</description> - </key> - - <key type="b" name="dash-app-running"> - <default>true</default> - <summary>Dash app running dot</summary> - <description>Dash app running dot visibility status</description> - </key> - - <key type="i" name="max-displayed-search-results"> - <default>1</default> - <range min="0" max="40"/> - <summary>0 means default, max displayed search results otherwise</summary> - <description>Max Displayed Search Results</description> - </key> - - <key type="b" name="quick-settings-dark-mode"> - <default>true</default> - <summary>Dark Mode Toggle Button Visibility In Quick Settings</summary> - <description>Dark Mode Toggle Button Visibility Status</description> - </key> - - </schema> - -</schemalist> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/schemas/gschemas.compiled b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/schemas/gschemas.compiled deleted file mode 100644 index c75050fe..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/just-perfection-desktop@just-perfection/schemas/gschemas.compiled and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/launch-new-instance@gnome-shell-extensions.gcampax.github.com/COPYING b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/launch-new-instance@gnome-shell-extensions.gcampax.github.com/COPYING deleted file mode 100644 index e55e5b8a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/launch-new-instance@gnome-shell-extensions.gcampax.github.com/COPYING +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. <http://fsf.org> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/launch-new-instance@gnome-shell-extensions.gcampax.github.com/NEWS b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/launch-new-instance@gnome-shell-extensions.gcampax.github.com/NEWS deleted file mode 100644 index 716a8894..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/launch-new-instance@gnome-shell-extensions.gcampax.github.com/NEWS +++ /dev/null @@ -1,1462 +0,0 @@ -46.2 -==== -* apps-menu: Fix a11y of category labels [Florian; !319] -* window-list: Fix long-press support [Florian; !320] -* Misc. bug fixes and cleanups [Florian; !324] - -Contributors: - Florian Müllner - -Translators: - Hugo Carvalho [pt], Jose Riha [sk], Jordi Mas i Hernandez [ca], - Scrambled 777 [hi] - -46.1 -==== -* screenshot-window-sizer: Add flathub-recommended size [Florian; !317] - -Contributors: - Florian Müllner - -Translators: - Rachida SACI [kab], Matheus Polkorny [pt_BR], Fabio Tomat [fur] - -46.0 -==== -* system-monitor: Fix net speed [Florian; !313] -* Misc. bug fixes and cleanups [Aral; !311] - -Contributors: - Aral Balkan, Florian Müllner - -Translators: - Anders Jonsson [sv], Piotr Drąg [pl], Balázs Úr [hu], Milo Casagrande [it], - Quentin PAGÈS [oc], Athmane MOKRAOUI [kab], Changwoo Ryu [ko], - Ask Hjorth Larsen [da] - -46.rc -===== -* Fix window previews in workspace indicator [Florian; !304] -* Fix menu ornament in workspace indicator [Florian; !305] -* Misc. bug fixes and cleanups [Florian; !306, !309] - -Contributors: - Florian Müllner - -Translators: - Danial Behzadi [fa], Ekaterine Papava [ka], Sabri Ünal [tr], Artur S0 [ru], - Yuri Chornoivan [uk], Vasil Pupkin [be], Asier Sarasua Garmendia [eu], - Yaron Shahrabani [he], Brage Fuglseth [nb], Nathan Follens [nl], - Aurimas Černius [lt], Matej Urbančič [sl], Boyuan Yang [zh_CN], - Kukuh Syafaat [id], Fran Dieguez [gl], Andi Chandler [en_GB], - Baurzhan Muftakhidinov [kk], Rūdolfs Mazurs [lv], Guillaume Bernard [fr], - Daniel Mustieles [es], Jiri Grönroos [fi] - -46.beta -======= -* apps-menu: Rename Applications to Apps [Allan; !299] -* Misc. bug fixes and cleanups [Florian; !296, !297, !300, !301, !302] - -Contributors: - Allan Day, Florian Müllner - -Translators: - Gabriel Brand [de], Daniel Rusek [cs], Fran Dieguez [gl], - Aefgh Threenine [th], Vasil Pupkin [be], Artur S0 [ru], Yosef Or Boczko [he], - Sabri Ünal [tr] - -46.alpha -======== -* workspace-indicator: Fix initial preview visibility [Florian; !280, !292] -* screenshot-window-sizer: Fix cycling between sizes backwards [Florian; !284] -* Add back overview in Classic session [Florian; !287] -* Allow running Classic session headless [Jonas; !289] -* window-list: Fix buttons not being clickable at the screen edge - [Florian; !291] -* Add system-monitor extension [Florian; !277] -* Fixed crash [Florian; !290] -* Misc. bug fixes and cleanups [Florian; !276, !275, !278, !281, !286, !288] - -Contributors: - Jonas Ådahl, Florian Müllner - -Translators: - Kristjan SCHMIDT [eo], Brage Fuglseth [nb] - -45.0 -==== - -Contributors: - Andre Klapper - -Translators: - Bruce Cowan [en_GB] - -45.rc -===== -* Misc. bug fixes and cleanups [Florian; !267, !224, !272] - -Contributors: - Florian Müllner - -Translators: - Sabri Ünal [tr], Florentina Musat [ro], A S Alam [pa] - -45.beta -======= -* Port extensions to ESM [Florian; !259, !266, !268, !269] -* Misc. bug fixes and cleanups [Florian; !260, !261, !262, !263, !264] - -Contributors: - Florian Müllner - -Translators: - Efstathios Iosifidis [el] - -45.alpha -======== -* window-list: Modernize default styling [Alexander; !253] -* Replace classic styling with built-in light style [Florian; !254] -* window-list: Add tooltip for long window titles [Arik; !251] -* light-style: New extension [Florian; !256] -* Misc. bug fixes and cleanups [Florian; !255, !257] - -Contributors: - Florian Müllner, Arik W, Alexander Weichart - -44.0 -==== -* Bump version - -44.rc -===== -* Bump version - -44.beta -======= -* Tweak menu alignment [robxnano; !246] - -Contributors: - Florian Müllner, robxnano - -Translators: - Vasil Pupkin [be] - -43.1 -==== -* Fixed crash [Florian; !243] -* Misc. bug fixes and cleanups [mowemcfc; !244] - -Contributors: - Florian Müllner, mowemcfc - -Translators: - Sabri Ünal [tr] - -43.0 -==== - -Contributors: - Florian Müllner - -Translators: - Pawan Chitrakar [ne], Zurab Kargareteli [ka], Aleksandr Melman [ru] - -43.rc -===== -* Misc. bug fixes and cleanups [Florian; !240] - -Contributors: - Florian Müllner - -43.beta -======= -* Misc. bug fixes and cleanups [Florian; !237, !238] - -Contributors: - Florian Müllner - -Translators: - Nart Tlisha [ab] - -43.alpha -======== - -Contributors: - Florian Müllner - -Translators: - Marco Ciampa [it] - -42.3 -==== -* screenshot-window-sizer: Fix reported sizes on wayland [Florian; !232] -* window-list: Improve touch support [Florian; !233] - -Contributors: - Florian Müllner - -42.2 -==== -* native-window-placement: Adjust to gnome-shell 42 changes [Florian; !229] -* window-list: Fix visibility on non-primary monitors [Jason; !230] - -Contributors: - Jason Lynch, Florian Müllner - -Translators: - Cheng-Chia Tseng [zh_TW] - -42.1 -==== -* Misc. bug fixes and cleanups [Florian; !223, !222, !225] - -Contributors: - Florian Müllner - -Translators: - Milo Casagrande [it], Rūdolfs Mazurs [lv], Nathan Follens [nl], - Ngọc Quân Trần [vi], Zurab Kargareteli [ka] - -42.0 -==== - -Translators: - Philipp Kiemle [de], Balázs Úr [hu], Марко Костић [sr], sicklylife [ja], - Baurzhan Muftakhidinov [kk] - -42.rc -===== -* Misc. bug fixes and cleanups [Florian; !215, !218] - -Contributors: - Florian Müllner - -Translators: - Marek Černocký [cs], Dušan Kazik [sk], Piotr Drąg [pl], Jiri Grönroos [fi], - Luna Jernberg [sv], Alan Mortensen [da], Charles Monzat [fr], - Changwoo Ryu [ko] - -42.beta -======= -* workspace-indicator: Fix cancelling editing with Esc [Florian; !208] -* window-list: Update window tracking to avoid missing icons [Florian; !207] -* Use libadwaita for preferences [Florian; !209, !213] -* Adapt to Clutter grab API changes [Florian; !212] -* Misc. bug fixes and cleanups [Jan, Florian; !210, !214] - -Contributors: - Jan Beich, Florian Müllner, Naala Nanba - -Translators: - Boyuan Yang [zh_CN], Matej Urbančič [sl], Naala Nanba [ab], - Alexander Shopov [bg], Emin Tufan Çetin [tr] - -42.alpha -======== -* native-window-placement: Fix distorted layout in app grid [Sebastian; !189] -* window-list: Fix on-screen keyboard [Florian; !199] -* Misc. bug fixes and cleanups [Neal; Just; !195, !197] - -Contributors: - Piotr Drąg, Neal Gompa, Sebastian Keller, Florian Müllner, Just Perfection - -Translators: - Goran Vidović [hr], Sveinn í Felli [is], Yuri Chornoivan [uk], - Fabio Tomat [fur], Quentin PAGÈS [oc], Hugo Carvalho [pt], - Yaron Shahrabani [he], Jordi Mas i Hernandez [ca], MohammadSaleh Kamyab [fa], - Fran Dieguez [gl], Daniel Mustieles [es], Aleksandr Melman [ru], - Aurimas Černius [lt], Asier Sarasua Garmendia [eu], Kukuh Syafaat [id], - Rafael Fontenelle [pt_BR] - -41.0 -==== -* Bump version - -41.rc.1 -======= -* Fix pre-generating stylesheets in tarball [Florian; !190] - -Contributors: - Florian Müllner - -41.rc -===== -* window-list: Adapt to overview-on-startup [Florian; !185] -* apps-menu: Use a custom 'toggle-menu' shortcut [Florian; !173] -* Misc. bug fixes and cleanups [Florian; !186] - -Contributors: - Florian Müllner - -41.beta -======= -* window-list: Extend reactive area of minimap to screen edges [Adam; !171] -* drive-menu: Improve detection of network mounts [Florian; !27, !176] -* Use distinct gettext domain for e.g.o uploads [Florian; #335] -* Misc. bug fixes and cleanups [Florian; !172, !174, !177, !167, !178, !180, - !181, !182, !183] - -Contributors: - Marco Trevisan (Treviño), Adam Goode, Florian Müllner - -Translators: - Hugo Carvalho [pt], Juliano de Souza Camargo [pt], Alexander Shopov [bg] - -40.1 -==== -* Disable welcome dialog in classic session [Florian; !169] -* windowsNavigator: Adjust to a late gnome-shell change [Florian; !170] - -Contributors: - Florian Müllner - -Translators: - Ngọc Quân Trần [vi], Anders Jonsson [sv], Carmen Bianca BAKKER [eo], - Pawan Chitrakar [ne], Quentin PAGÈS [oc] - -40.0 -==== - -Translators: - Jiri Grönroos [fi] - -40.rc -===== -* native-window-placement: Adjust to gnome-shell changes [Florian; !164] -* windows-navigator: Adjust to gnome-shell changes [Florian; !163] -* window-list, workspace-indicator: Only show previews for up to six workspaces - [Florian; !165] -* window-list, workspace-indicator: Improve workspace preview appearance - [Florian; !166] - -Contributors: - Florian Müllner - -Translators: - Fran Dieguez [gl] - -40.beta -======= -* Add tooltips to workspace thumbnails [Florian; !155] -* Drop arrows from top bar menus [Florian; !156] -* drive-menu: Mark mounts that can be unmounted as removable [Michael; !152] -* Remove horizontal-workspaces extension [Florian; !158] -* Adjust to shell overview changes [Florian; !159, !160] -* Fix crashes [Daniel; !157] -* Misc. bug fixes and cleanups [Florian; !154, !161] - -Contributors: - Michael Lawton, Florian Müllner, Daniel van Vugt - -Translators: - Аляксей [be], A S Alam [pa] - -40.alpha.1 -========== -* Don't depend on sassc when building from tarball [Florian; !150] -* Port extensions preferences to GTK4 [Florian; !148] -* Misc. bug fixes and cleanups [Florian, Jonas; !149, !151, !153] - -Contributors: - Jonas Dreßler, Florian Müllner - -40.alpha -======== -* window-list: Honor changes in skip-taskbar property [Sergio; !130] -* window-list, workspace-indicator: Adjust to 3.38 changes [Florian; !133] -* window-list, workspace-indicator: Improve previews in workspace thumbs - [Florian; #260, !142] -* auto-move: Improve behavior on multi-monitor setups [Florian; !135] -* windowNavigator: Adjust to 3.38 changes [Thun; #259] -* Misc. bug fixes and cleanups [Florian, Jonas Å, Jordan, Ray; !131, !136, - !137, !140, !141, !144, !146, !145] - -Contributors: - Sergio Costas, Florian Müllner, Jordan Petridis, Thun Pin, Ray Strode, - Jonas Ådahl - -Translators: - Fabio Tomat [fur], Jordi Mas [ca] - -3.38.1 -====== - -Contributors: - Yacine Bouklif, Florian Müllner - -Translators: - Yacine Bouklif [kab], Cheng-Chia Tseng [zh_TW], Stas Solovey [ru], - Yosef Or Boczko [he] - -3.38.0 -====== - -Translators: - Balázs Meskó [hu], Alan Mortensen [da], Juliano Camargo [pt], Tim Sabsch [de], - Milo Casagrande [it], Rūdolfs Mazurs [lv] - -3.37.92 -======= - -Translators: - Nathan Follens [nl], Zander Brown [en_GB], Aurimas Černius [lt], - Marek Černocký [cs], Changwoo Ryu [ko], Dušan Kazik [sk] - -3.37.91 -======= - -Contributors: - Florian Müllner - -Translators: - Fran Dieguez [gl], Akarshan Biswas [bn_IN], Kukuh Syafaat [id], - Piotr Drąg [pl], Rafael Fontenelle [pt_BR], Jiri Grönroos [fi], - Марко Костић [sr], Goran Vidović [hr] - -3.37.90 -======= -* Misc. bug fixes and cleanups [Florian, Piotr; !126, !128] - -Contributors: - Piotr Drąg, Florian Müllner - -Translators: - Fabio Tomat [fur], Efstathios Iosifidis [el], Anders Jonsson [sv], - Asier Sarasua Garmendia [eu], Alexandre Franke [fr] - -3.37.3 -====== -* window-list, native-window-placement: Adjust to shell changes [Florian; !124] - -Contributors: - Florian Müllner - -Translators: - Jordi Mas [ca], sicklylife [ja], Boyuan Yang [zh_CN], - Baurzhan Muftakhidinov [kk] - -3.37.2 -====== -* window-list, auto-move: Modernize preference dialogs [Florian; !121] -* Adjust to gnome-shell changes [Florian; !122] - -Contributors: - Florian Müllner - -Translators: - Cheng-Chia Tseng [zh_TW], Yuri Chornoivan [uk], Daniel Mustieles [es], - Emin Tufan Çetin [tr], Danial Behzadi [fa], Daniel Șerbănescu [ro], - Matej Urbančič [sl] - -3.37.1 -====== -* drive-menu: Emphasize eject buttons [Florian; #223] -* user-theme: Add preference dialog [Florian; !117] -* window-list: Fix inconsistent state in preference dialog [Milan; !119] -* workspace-indicator: Overhaul preference dialog [Florian; !120] -* user-theme: Support session mode styles [Florian; !118] -* Misc. bug fixes and cleanups [Florian, Xiaoguang; !113, !106, !114, !116] - -Contributors: - Milan Crha, Florian Müllner, Xiaoguang Wang - -Translators: - Daniel Korostil [uk], Yosef Or Boczko [he], Kristjan SCHMIDT [eo], - Dz Chen [zh_CN], Danial Behzadi [fa], Yuri Chornoivan [uk], - Anders Jonsson [sv], Daniel Mustieles [es] - -3.36.0 -====== - -Contributors: - Florian Müllner - -3.35.91 -======= - -Contributors: - Florian Müllner - -Translators: - Zander Brown [en_GB] - -3.35.90 -======= -* Adjust to gnome-shell changes [Florian; !100, !101, !102] -* Force single-line window titles in window list [Florian; #202] -* Misc. bug fixes and cleanup [Florian; !104, !105] - -Contributors: - Florian Müllner - -Translators: - sicklylife [ja], Umarzuki Bin Mochlis Moktar [ms] - -3.35.3 -====== - -Translators: - Fran Dieguez [gl] - -3.35.2 -====== -* Adjust to gnome-shell changes [Marco, Florian; !89, !95, !96] -* window-list, workspace-indicator: Exclude DESKTOP windows from previews - [Florian; !93] -* screenshot-window-sizer: Fix cycling through all valid sizes [Willy; !97] - -Contributors: - Marco Trevisan (Treviño), Florian Müllner, Willy Stadnick - -3.34.1 -====== -* Adjust to gnome-settings-daemon plugin removals [Xiaoguang; !94] - -Contributors: - Florian Müllner, Xiaoguang Wang - -Translators: - Nathan Follens [nl], Dušan Kazik [sk], Ask Hjorth Larsen [da], - Yi-Jyun Pan [zh_TW] - -3.34.0 -====== - -Translators: - Rafael Fontenelle [pt_BR], Efstathios Iosifidis [el], Milo Casagrande [it], - Sabri Ünal [tr] - -3.33.92 -======= - -Translators: - Марко Костић [sr], Tim Sabsch [de], Rūdolfs Mazurs [lv], Matej Urbančič [sl], - Balázs Úr [hu], Claude Paroz [fr], Fran Dieguez [gl], Changwoo Ryu [ko], - Ryuta Fujii [ja], Fabio Tomat [fur], Goran Vidović [hr] - -3.33.91 -======= -* Misc. bug fixes and cleanups [Florian; !88, !90, !91, !92] - -Contributors: - Florian Müllner - -Translators: - Asier Sarasua Garmendia [eu], Anders Jonsson [sv], Marek Černocký [cs], - Kukuh Syafaat [id], Jiri Grönroos [fi], Florentina Mușat [ro], - Aurimas Černius [lt], Daniel Mustieles [es], Piotr Drąg [pl], Jordi Mas [ca], - Danial Behzadi [fa] -3.33.90 -======= -* window-list: Support showing windows from all workspaces [Florian; #154] -* Misc. bug fixes and cleanups [Florian; !86, !87] - -Contributors: - Florian Müllner - -Translators: - Jor Teron [mjw] - -3.33.4 -====== -* Make GNOME Classic more classic: - - Disable GNOME 3 overview [Florian; !69] - - Add window picker button to window list [Florian; !73, !80] - - Style improvements and fixes [Jakub; #169, !82] - - Support horizontal workspace layout in window list [Florian; !70] - - Add draggable previews to window list workspace switcher [Florian; !74] - - Arrange workspaces horizontally [Florian; !72] -* workspace-indicator: Support horizontal workspace layout [Florian; !71] -* workspace-indicator: Add draggable previews [Florian; !77] -* Misc. bug fixes and cleanups [Florian; !75, !76, !79, !78, #168, !84] - -Contributors: - Florian Müllner, Jakub Steiner, Jor Teron - -Translators: - Jor Teron [mjw] - -3.33.3 -====== -* Misc. bug fixes [Florian, Marco; !67, !68] - -Contributors: - Florian Müllner, Marco Trevisan (Treviño) - -3.33.2 -====== -* Misc. bug fixes and cleanups [Florian; !66] - -Contributors: - Florian Müllner - -3.33.1 -====== -* Misc. bug fixes [Florian; !64] - -Contributors: - Florian Müllner - -3.32.1 -====== -* Fix windowsNavigator extension after ES6 port [Florian; #143] -* screenshot-window-sizer: Add phone screenshot sizes [Adrien; !65] -* Misc. bug fixes and cleanups [Fabian; !62] - -Contributors: - Florian Müllner, Adrien Plazas, Fabian P. Schmidt - -3.32.0 -====== - -Contributors: - Florian Müllner - -Translations: - Victor Ibragimov [tg], Kristjan SCHMIDT [eo], Mart Raudsepp [et] - -3.31.92 -======= -* Misc. bug fixes and cleanups [Florian; !57, !58, !59, !60] - -Contributors: - Florian Müllner - -3.31.91 -======= -* apps-menu: Remove outdated legacy-tray handling [Florian; !53] -* user-theme: Allow using XDG user data dir [Tomasz; !55] -* Misc. bug fixes and cleanups [Florian; !52, !54, !56] - -Contributors: - Tomasz Gąsior, Florian Müllner - -Translators: - Matej Urbančič [sl], Gun Chleoc [gd] - -3.31.90 -======= -* Misc. bug fixes and cleanups [Florian; !49, !50, !51] - -Contributors: - Florian Müllner - -Translators: - Ryuta Fujii [ja], Charles Monzat [fr], Pieter Schalk Schoeman [af] - -3.31.2 -====== -* Remove obsolete alternate-tab extension [Florian; #786496] -* Adjust to gnome-shell changes [Florian; #113] - -Contributors: - Florian Müllner - -3.30.1 -====== -* apps-menu: Fix height on HiDPI systems [Florian; #102] -* window-list: Only switch between windows on active workspace when scrolling - [Florian; #78] - -Contributors: - Florian Müllner - -3.30.0 -====== -* Bump version - -3.29.91 -======= -* Misc. bug fixes [Florian; #90] - -Contributors: - Florian Müllner - -3.29.90 -======= -* Misc. bug fixes [Florian; #786496] - -Contributors: - Florian Müllner - -3.29.3 -====== -* Adjust to global.screen removal [Jonas; #759538] - -Contributors: - Jonas Ådahl, Florian Müllner - -3.29.2 -====== -* Misc. bug fixes [Florian; #69] - -Contributors: - Florian Müllner - -3.28.1 -====== -* Misc. bug fixes [Xiaoguang, Florian; #59, #62] - -Contributors: - Florian Müllner, Xiaoguang Wang - -Translators: - Dz Chen [zh_CN] - -3.28.0 -====== - -Contributors: - Florian Müllner, Xiaoguang Wang - -Translators: - Aman Alam [pa], Bruce Cowan [en_GB] - -3.27.92 -======= - -Contributors: - Florian Müllner - -Translators: - Piotr Drąg [es], GNOME Translation Robot [gd], Daniel Șerbănescu [ro] - -3.27.91 -======= -* places-menu: Support unmounting ejectable places [Rémy; #17] -* apps-menu: Support separators and custom sort order [Florian; #27] -* Port to meson [Florian; #31, #45] -* window-list: Fix missing icons on wayland [Florian; #10] -* places-menu: Fix terminating gnome-shell with recent gjs [Florian; #44] -* auto-move: Make it work with wayland windows [Florian; #33] -* Classic theme fixes [Florian, Jonas; #26, #41, #39, #40] -* Require sassc for classic styling [Florian; !28] -* Misc. bug fixes [Piotr, Florian; #772211, #32, #30] - -Contributors: - Jeremy Bicha, Piotr Drąg, Jonas Kümmerlin, Rémy Lefevre, Iñigo Martínez, - Florian Müllner - -Translators: - Matej Urbančič [sl], Kjartan Maraas [nb] - -3.27.1 -====== -* updated translations (ca@valencia) - -3.26.1 -====== -* native-window-placement: Adjust to gnome-shell changes -* updated translations: el, fa, ru, sv - -3.26.0 -====== -* updated translations (be, bg, ca, da, eu, fi, is, it, ko, lv, ml, - nl, pt_BR, vi, zh_TW) - -3.25.91 -======= -* updated translations (ca, fr, it, pl, pt_BR, sr, sr@latin, tr) - -3.25.90 -======= -* updated translations (es, gl, hr, hu, kk, sl, sv, sv) - -3.25.4 -====== -* screenshot-window-sizer: Fix backward cycling -* updated translations (ar, be, ca, cs, de, fur, id, lt, pl, sk) - -3.25.3 -====== -* places-menu: Use mount operation if necessary -* window-list: Respect MWM hints -* updated translations (es, fur, kk) - -3.25.2 -====== -* places-menu: Make URI launching asynchronous -* updated translations (de, fur, hr, hu, id, sl) - -3.25.1 -====== -* apps-menu: Mark copied launchers as trusted -* places-menu: Make icon lookup asynchronous -* updated translations (hr) - -3.24.1 -====== -* apps-menu: Allow creating desktop launchers via DND -* updated translations (el, vi) - -3.24.0 -====== -* updated translations (lv, tr) - -3.23.92 -======= -* update classic theme -* updated translations (be, ko, ca, da, cs, ru, lt) - -3.23.91 -======= -* updated translations (de, es, eu, fi, fr, fur, gl, hu, id, it, kk, nb, pl, pt_BR, - sk, sr, sr@latin, sv, uk, zh_TW) - -3.23.90 -======= -* window-list: Improve styling -* window-list: Hide workspace indicator when there's a single (static) workspace -* new translation (be) - -3.23.2 -====== -* alternateTab: Don't take over 'switch-group' shortcut -* updated translations (zh_CN) - -3.22.1 -====== -* window-list: Update icon on app changes - -3.22.0 -====== -* updated translations (en_GB) - -3.21.92 -======= -* update style -* updated translations (pl, vi) - -3.21.91 -======= -* updated translations (pl) - -3.21.90 -======= -* updated translations (es, gu) - -3.21.4 -====== -* apps-menu: Fix entries from non-standard AppDir directories - -3.21.3 -====== -* adjust to gnome-shell changes -* updated translations (oc) - -3.21.2 -====== -* version bump, nothing to see here - -3.20.1 -====== -* update classic style -* updated translations (gd, oc) - -3.20.0 -====== -* version bump, nothing to see here - -3.19.92 -======= -* version bump, nothing to see here - -3.19.91 -======= -* updated translations (oc) - -3.19.90 -======= -* version bump, nothing to see here - -3.19.4 -====== -* screenshot-window-sizer: HiDPI support -* Fix gnome-shell component in classic session -* updated translations (lt) - -3.19.3 -====== -* native-window-placement: Don't let border overlap title -* apps-menu: Fix handling of .desktop files in subdirectories -* updated translations (is) - -3.19.2 -====== -* updated translations (gd) - -3.19.1 -====== -* Fix some theme issues - -3.18.1 -====== -* window-list: Fix accessibility of window buttons -* apps-menu: Fix unreliable highlight -* updated translations (ar) - -3.18.0 -====== -* Bump version - -3.17.92 -======= -* places: Include DESKTOP when desktop icons are enabled -* updated translations (fa) - -3.17.91 -======= -* updated translations (nl, pl, zh_TW) - -3.17.90 -======= -* window-list: Improve application ordering -* workspace-indicator: Use consistent workspace numbering - -3.17.4 -====== -* updated translations (fur) - -3.17.3 -====== -* window-list: Adjust with text-scaling-factor -* classic style updates -* updated translations (pt, ro) - -3.17.2 -====== -* updated translations (oc, pt, zh_CN) - -3.17.1 -====== -* style updates -* updated translations (oc) - -3.16.1 -====== -* window-list: Fix workspace indicators popup menu position -* apps-menu: Fix taking over panel-main-menu shortcut -* updated translations (et, ja, lv) - -3.16.0 -====== -* updated translations (ca) - -3.15.92 -======= -* classic: Update theme -* update for mutter API changes -* updated translations (bg, bs, da, fi, pa, ru, sr, sr@latin, tg) - -3.15.91 -======= -* classic: Update theme -* systemMonitor extension was removed, as the message tray where it - put its indicator no longer exists -* window-list: Adjust for gnome-shell changes -* updated translations (gl, it, kk, ko, lt, pl, sk, uk, zh_TW) - -3.15.90 -======= -* classic: Visual refresh based on new shell theme -* window-list: Adjust for gnome-shell changes -* updated translations (an, el, eo, eu, fr, he, is, sv, tr) - -3.15.4 -====== -* window-list: Improve interaction with system modal dialogs -* updated translations (cs, de, es, eu, fur, hu, id, nb, pt_BR, ru, sl, vi) - -3.15.3.1 -======== -* adjust to gnome-shell change - -3.15.3 -====== -* classic-mode: Add high-contrast theme variant, drop .desktop file -* places-menu: Fix error when XDG user directories are not set up -* window-list: Add option to show on all monitors -* updated translations (eu, hu, kk, ro, tr) - -3.15.2 -====== -* removable-drive, user-theme, window-list: Update for gnome-shell changes -* apps-menu: Fix some visual glitches -* Fix classic mode style -* updated translations (an, cs, he, vi) - -3.15.1 -====== - * updated translations (es, nb) - -3.14.1 -====== - * alternateTab: Fix dismissing popup with Escape - * some improvements to the window-list - (spacing in app buttons, no flash when closing windows with auto-grouping) - * updated translations (lv, it, pt, bg) - -3.14.0 -====== - * updated translations (bn_IN, hi, kn, sr, sr@latin, uk) - -3.13.92 -======= -* new extension: screenshot-window-sizer -* window-list: Don't add sticky windows more than once -* updated translations (da, de, fi, ko, mr, ms, ne, pa, pl, sk, sv, ta, te, tr) - -3.13.91 -======= -* window-list: restore fitts'ability of workspace button -* updated for gnome-shell changes -* updated translations (cs, kk, fr, or, fa, ja, gu, id) - -3.13.90 -======= -* updated translations (as, ca, eu, nl, zh_CN, zh_HK, zh_TW) - -3.13.4 -====== -* Updated for gnome-shell changes -* updated translations (el, gl, ru) - -3.13.3 -====== -* Tweak preference UIs some more -* Fix classic mode schema overrides -* updated translations (es, he, hu, lt, nb, pt_BR, sl, tr) - -3.13.2 -====== -* Fix sorting of grouped buttons in window list -* Tweak preference UIs -* updated translations (en_GB) - -3.13.1 -====== -* add DesktopNames key to the classic session file -* classic theme: remove rounded corners from tile previews -* window-list: don't shift message tray on other monitors -* auto-move-windows: several fixes and updates for api changes -* launch-new-instances: updates for api changes -* updated translations (ja, km) - -3.12.0 -====== -* updated translations (zh_HK, zh_TW) - -3.11.92 -======= -* nothing to see here, move on - -3.11.91 -======= -* updated translations (ko, fur) - -3.11.90 -======= -* several fixes and improvements to the window-list - (can be scrolled, works correctly with the OSD - keyboard, filters skip-taskbar windows, does not - force all notifications to bold) -* drive-menu fixed not to show shadowed mounts -* updates for gnome-shell changes (launch-new-instance, - auto-move-windows, places-menu) -* build system fixes for systems without /bin/bash -* updated translations (or, tr, uk) - -3.11.5 -====== -* updates for gnome-shell changes -* updated translations (kn) - -3.11.4 -====== -* classic mode now supports session saving -* updates for gnome-shell changes -* updated translations (ar, kn) - -3.11.3 -====== -* workspace-indicator is vertically aligned now -* updated translations (ar, eo, ta, te) - -3.11.2 -====== -* updated translations (zh_CN) - -3.11.1 -====== -* ignore shadowed mounts in drive-menu extension -* updates for gnome-shell/gjs changes -* updated translations (el, th) - -3.10.1 -====== -* updated translations (af, ca, ca@valencia, de, et, eu, fa, - hu, lt, lv, nb, nl, pa, pt, sk, sr, sr@latin, tr) - -3.10.0 -====== -* updated translations (as, cs, da, es, et, fi, fr, gl, - he, id, it, kk, lt, lv, pa, pl, pt, pt_BR, ru, sl, tg, - uk, zh_HK, zh_TW) - -3.9.92 -====== -* more updates and fixes for gnome-shell master changes - and regressions (systemMonitor, window-list, apps-menu) -* lots of updated translations (ar, as, cs, da, de, el, es, - eu, fi, gl, he, hu, it, ja, kk, ko, lv, nb, nl, pa, pl, - pt_BR, ru, sk, sr, sr@latin, ta, tg) - -3.9.91 -====== -* update the classic mode session and theme to work with the - new system menu -* the usual round of updates and fixes for gnome-shell - API changes -* updated translations (de, it, lt, nl, pl, pt_BR, sk, - zh_HK, zh_TW) - -3.9.90 -====== -* xrandr-indicator was removed, as the implementation - was incompatible with the new DisplayConfig mutter API -* various extensions were updated for the 3.9.90 gnome-shell API -* updated translations (cs, es, fur, gl, he, hu, id, ja, sl, tg, - zh_CN, zh_HK, zh_TW) - -3.9.5 -===== -* alternative-status-menu was removed entirely, as - it does not fit in the designs of the new unified - status menu -* updated translations (as, gu, it, ru) - -3.9.4 -===== -* apps-menu: fixed handling of hot corner in case - of screen reconfiguration -* alternative-status-menu now correctly honors polkit - for hibernation -* user-menu now loads themes from $XDG_DATA_HOME too -* translation updates (de, id, pt_BR, vi, zh_CN, ml) - -3.9.3 -===== -* classic mode mini extensions were replaced with a - GSettings override specified in the .json file -* styling of classic mode improved -* native-window-placement is back working on 3.9 -* misc bug fixes -* traslation updates (an, cs, el, es, gl, nb, pl, sk, tg) - -3.9.2 -===== -* apps-menu: appearance of the scrollbars was improved -* window-list is a little taller in classic mode (to account - for the workspace switcher) -* alternative-status-menu honors again the dconf configuration -* translation updates (sr) - -3.9.1 -===== -* updates to window-list, xrandr-indicator, - workspace-indicator, windowsNavigator for gnome-shell - changes -* translation updates (cs, es, lt, pl, pt_BR, sl) - -3.8.1 -===== -* many improvements to window-list: - - windows are activated by DND over them - - window buttons now have the right size, - even if the text is smaller or larger - than the ideal - - window buttons can be grouped automatically - when the panel becomes crowded - - added a workspace switcher menu -* added keyboard navigation to apps-menu -* small tweaks to classic-mode theme, in particular - for menus -* translation updates (gl, ko, sr) - -3.8.0 -===== -* translation updates (hu, ja, fi, it) - -3.7.92 -====== -* misc bug fixes to app-menu and window-list -* translation updates (de, sl, pt_BR, ru) - -3.7.91 -====== -* various updates for shell changes -* update window-list to always use application icons -* update apps-menu to not load subdirectories as - separate categories -* translation updates (lt, zh_CN) - -3.7.90 -====== -* various fixes to make places-menu behave more - like Nautilus, including showing the machine - name in place of File System -* various updates for shell changes -* alternative-status-menu no longer supports - ConsoleKit systems, you need to install logind - to have suspend or hibernate -* translation updates (es, cz, pl, sr) - -3.7.5.1 -======= -* new extension forgotten in previous NEWS entry: - windows-list -* also forgotten previously: classic mode got a new - GNOME2 style -* build fixes - -3.7.5 -===== -* places-menu is back in the classic extensions, with - a new old GNOME-2 look -* classic mode moved the date menu to right, where we - all know it rightly belongs -* apps-menu received a face-lift, with the inclusion - of a reduced form of AxeMenu -* new extension in the classic set: launch-new-instance, - which modifies the behavior of clicking in the dash - and app launcher -* alternate-tab, native-window-placement and windowsNavigator - updated for gnome-shell changes -* translation updates (es, cz, pl) - -3.7.4 -===== -* a separate configure switch has been added to enable - classic mode session definitions -* places-menu is no longer part of the classic-mode - extension set -* updated translations (ar, gl, hu, lt, pt_BR, sr) - -3.7.3 -===== -* new extensions: default-min-max, static-workspaces -* alternate-tab now uses the built-in window switcher and just - takes over the switch-application keybinding -* workspace-indicator: is no longer part of classic-mode -* we now install classic-mode data files for gdm, gnome-session - and gnome-shell, so if you enable classic-mode you get a new - session option in GDM -* updated translations (ar, es, pl, ru, sl, zh_HK, zh_TW) - -3.7.2 -===== -* fixed crashes with places-menu, windowsNavigator, alternate-tab - and native-window-placement -* alternate-tab now hides attached modal dialogs -* places-menu has restored support for Nautilus 3.4 -* the default for hibernate is now to show in alternative-status-menu -* some extensions are now tagged as "classic", and can be chosen with - --enable-extensions=classic-mode -* dock and gajim were removed at the beginning of the 3.7.1 cycle, - as they were buggy and unmaintained -* updated translations (ar, cs, de, el, es, gl, id, lt, lv, pa, pl - ru, sk, sl, sr, sr@latin) - -3.6.1 -===== -* fixed alternative-status-menu for the new lock screen -* squashed some alternate-tab warnings -* drive-menu now works with 3.6 again -* updated translations (ar, cs, el, es, gl, id, lv, pl, sl) - -3.6.0 -===== -* major rework in places menu, to make it work without - removed supporting code in the shell and to make it look like - the nautilus sidebar - (similar work would be needed for drive-menu, not done yet) -* updated translations (ca, cs, de, el, en_GB, es, fi, hu, id, lt, - pl, pt_BR, ru, sl, sr) - -3.5.91 -====== -* various crashers were fixed in alternative-tab -* auto-move-windows now can be made to work with static workspaces -* place-menu is now on the left and uses symbolic icons like Files -* StIconType usage was removed from all extensions, after it was - removed in core -* systemMonitor, xrandr-indicator, apps-menu, places-menu, - alternative-status-menu were updated for the newer shell -* updated translations (es, gl, it, pl, sl) - -3.5.90 -====== -* alternate-tab has been reworked again, the old mode switch - was removed and the all&thumbnails code extended to handle - icons and filtering to the workspace -* alternate-tab thumbnails now reflect the aspect ratio of the windows -* systemMonitor now shows a tooltip above the indicator -* native-window-placement, systemMonitor and windowsNavigator have been updated - for the newer shell -* updated translations (es, pa) - -3.5.5 -===== -* convenience module has been relicensed to BSD, - for compatibility with GPLv3 extensions -* alternate-tab has been refactored and seen various - improvements to all&thumbnails mode, including a new - overlaid application icon -* updated translations (lt, id, sr) - -3.5.4 -===== -* updated translations (de, es, ar, sl, lv, zh_CN) - -3.5.2 -===== -* removable-drive-menu is now a11y friendly -* the dock can now be placed on any monitor, not just the primary -* dock is now clipped to its monitor -* alternative-status-menu now exposes GSettings for Suspend - and Hibernate visibility - no UI yet -* more gnome-shell API changes (places-menu, removable-drive-menu, - alternative-status-menu) -* miscellaneous bug fixes (native-window-placement, gajim, - auto-move-windows) -* updated translations - -3.4.0 -===== -* build system improvements -* updated translations (ar, cs, fr) - -3.3.92 -====== -* various updates for gnome-shell API changes (dock, - native-window-placement) -* local-install is now a make rule, not a shell script -* updated translations (zh, es, sw, ga, hu, it, no, pt_BR, de, sl, - pl, la, fi, sr) - -3.3.90 -====== -* system wide installation via "make install" is possible - again -* alternate-tab can now pre-activate the selected window -* auto-move-windows, workspace-indicator and example gained - new preference dialogs -* workspace-indicator: fixed a bug wrt focus stealing prevention -* updated translations (es, pt_BR, it, sl, gl, sr) - -3.3.5 -===== -* improvements to the build system and convenience module, - making it easier for other extensions to use, and bringing - it up to date with gnome-shell changes -* all extensions were ported to the Lang.Class framework - (except xrandr-indicator, which is pending GDBus merge) -* alternate-tab and dock were slightly refactored to clean up - some old code - -3.3.4 -===== -* improved styling of windowsNavigator tooltips -* fixed windowsNavigator when used with the numeric keypad -* fixed native-window-placement with custom button layout -* updated translations (pt_BR, cz) - -3.3.3 -===== -* windowsNavigator was fixed to work with azerty keyboards -* drive-menu was changed to use media-eject icon instead of media-optical -* dock: the default value of hide-effect is now move -* dock: if autohide is disabled, now it pushes maximized windows aside -* dock was updated to match current core shell styling -* native-window-placement: position stategy setting was removed -* alternative-status-menu no longer conflicts with other extensions - in the user menu -* various other minor bug fixes -* updated translations (zh, uk, es, it, cz, sl, sk, fi) - -3.3.2 -===== -* all extensions are now self-contained, including l10n and settings -* introduce a convenience module that can be shared among all extensions -* you can know build an installable zip file with make zip-file -* apps-menu no longer shows NoDisplay apps -* alternative-status-menu, alternate-tab: fix for master shell - -3.2.1 -===== -* dock: added "move" hide effect -* systemMonitor: now it enables/disables properly -* systemMonitor: improved styling -* alternate-tab: both modes now work with gnome-shell 3.2 -* various other bug fixes -* updated translations - -3.2.0 -===== - -* various: update for gnome-shell API changes - -3.1.91 -====== - -* gajim: update for gnome-shell API changes - -3.1.90 -====== - -* All extensions have been ported to the new extension - system (including live enable/disable) -* Updated translations -* xrandr-indicator no longer requires a specific gjs version -* windowsNavigator fixed for more than 2 workspaces - -3.1.4 -===== - -* New extension: a menu for changing workspace (workspace-indicator) -* systemMonitor: lower the requirement on libgtop -* auto-move-windows: open overview when last window on - last workspace is closed -* dock: implement autohiding, with various configurable - effects -* alternate-tab: more configurable implementations available -* native-window-placement: don't rearrange the windows when - the workspace switcher is shown/hidden -* update for gnome-shell 3.1.4 API changes - -3.1.3 -===== - -* New extension: a menu for removable drives (drive-menu -* New extensions: GNOME 2 like menus for apps and places - (apps-menu, places-menu) -* New extension: additional configurability for the window - layout in the overview, including a mechanism similar to - KDE4 (native-window-placement) -* New extension: a message tray indicator for CPU and memory - usage (uses libgtop) (systemMonitor) -* user-theme: fixed resetting theme -* user-theme: support themes installed in /usr/share/themes -* alternative-status-menu: ported to gnome-shell master -* dock: ported to gnome-shell master -* dock: make position configurable (can be left or right) -* Updated translations - -3.0.2 -===== - -* Updated translations. -* Fixed bug #647386 (reverting of user-theme to default) -* Fixed bug #647599 (support globally installed themes) -* Added license and README diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/launch-new-instance@gnome-shell-extensions.gcampax.github.com/extension.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/launch-new-instance@gnome-shell-extensions.gcampax.github.com/extension.js deleted file mode 100644 index f390ccb9..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/launch-new-instance@gnome-shell-extensions.gcampax.github.com/extension.js +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-FileCopyrightText: 2013 Gabriel Rossetti <rossetti.gabriel@gmail.com> -// SPDX-FileCopyrightText: 2013 Florian Müllner <fmuellner@gnome.org> -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import {AppIcon} from 'resource:///org/gnome/shell/ui/appDisplay.js'; -import {InjectionManager} from 'resource:///org/gnome/shell/extensions/extension.js'; - -export default class Extension { - constructor() { - this._injectionManager = new InjectionManager(); - } - - enable() { - this._injectionManager.overrideMethod(AppIcon.prototype, 'activate', - originalMethod => { - return function () { - // eslint-disable-next-line no-invalid-this - originalMethod.call(this, 2); - }; - }); - } - - disable() { - this._injectionManager.clear(); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/launch-new-instance@gnome-shell-extensions.gcampax.github.com/private_metadata.json b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/launch-new-instance@gnome-shell-extensions.gcampax.github.com/private_metadata.json deleted file mode 100644 index 73d3a634..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/launch-new-instance@gnome-shell-extensions.gcampax.github.com/private_metadata.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_generated": "Generated by SweetTooth, do not edit", - "description": "Always launch a new instance when clicking in the dash or the application view.\nThis extension is part of Classic Mode and is officially supported by GNOME. Please do not report bugs using the form below, use GNOME's GitLab instance instead.", - "extension-id": "launch-new-instance", - "gettext-domain": "gnome-shell-extension-launch-new-instance", - "name": "Launch new instance", - "settings-schema": "org.gnome.shell.extensions.launch-new-instance", - "shell-version": [ - "46" - ], - "url": "https://gitlab.gnome.org/GNOME/gnome-shell-extensions", - "uuid": "launch-new-instance@gnome-shell-extensions.gcampax.github.com", - "version": 42 -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/dbus/mprisNode.xml b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/dbus/mprisNode.xml deleted file mode 100644 index 1b7ad0b2..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/dbus/mprisNode.xml +++ /dev/null @@ -1,74 +0,0 @@ -<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" - "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> -<!-- GDBus 2.76.6 --> -<node> - <interface name="org.freedesktop.DBus.Properties"> - <method name="Get"> - <arg type="s" name="interface_name" direction="in"/> - <arg type="s" name="property_name" direction="in"/> - <arg type="v" name="value" direction="out"/> - </method> - <method name="GetAll"> - <arg type="s" name="interface_name" direction="in"/> - <arg type="a{sv}" name="properties" direction="out"/> - </method> - <method name="Set"> - <arg type="s" name="interface_name" direction="in"/> - <arg type="s" name="property_name" direction="in"/> - <arg type="v" name="value" direction="in"/> - </method> - <signal name="PropertiesChanged"> - <arg type="s" name="interface_name"/> - <arg type="a{sv}" name="changed_properties"/> - <arg type="as" name="invalidated_properties"/> - </signal> - </interface> - <interface name="org.mpris.MediaPlayer2"> - <method name="Raise"/> - <method name="Quit"/> - <property type="b" name="CanQuit" access="read"/> - <property type="b" name="CanSetFullscreen" access="read"/> - <property type="b" name="CanRaise" access="read"/> - <property type="b" name="HasTrackList" access="read"/> - <property type="s" name="Identity" access="read"/> - <property type="s" name="DesktopEntry" access="read"/> - <property type="as" name="SupportedUriSchemes" access="read"/> - <property type="as" name="SupportedMimeTypes" access="read"/> - </interface> - <interface name="org.mpris.MediaPlayer2.Player"> - <method name="Next"/> - <method name="Previous"/> - <method name="Pause"/> - <method name="PlayPause"/> - <method name="Stop"/> - <method name="Play"/> - <method name="Seek"> - <arg type="x" name="Offset" direction="in"/> - </method> - <method name="SetPosition"> - <arg type="o" name="TrackId" direction="in"/> - <arg type="x" name="Position" direction="in"/> - </method> - <method name="OpenUri"> - <arg type="s" name="Uri" direction="in"/> - </method> - <signal name="Seeked"> - <arg type="x" name="Position"/> - </signal> - <property type="s" name="PlaybackStatus" access="read"/> - <property type="s" name="LoopStatus" access="readwrite"/> - <property type="d" name="Rate" access="readwrite"/> - <property type="b" name="Shuffle" access="readwrite"/> - <property type="a{sv}" name="Metadata" access="read"/> - <property type="d" name="Volume" access="readwrite"/> - <property type="x" name="Position" access="read"/> - <property type="d" name="MinimumRate" access="read"/> - <property type="d" name="MaximumRate" access="read"/> - <property type="b" name="CanGoNext" access="read"/> - <property type="b" name="CanGoPrevious" access="read"/> - <property type="b" name="CanPlay" access="read"/> - <property type="b" name="CanPause" access="read"/> - <property type="b" name="CanSeek" access="read"/> - <property type="b" name="CanControl" access="read"/> - </interface> -</node> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/dbus/watchNode.xml b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/dbus/watchNode.xml deleted file mode 100644 index 30dcc3d6..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/dbus/watchNode.xml +++ /dev/null @@ -1,20 +0,0 @@ -<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" -"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> -<node> - <interface name="org.freedesktop.DBus"> - <method name="ListNames"> - <arg direction="out" type="as"/> - </method> - <signal name="NameOwnerChanged"> - <arg type="s"/> - <arg type="s"/> - <arg type="s"/> - </signal> - <signal name="NameLost"> - <arg type="s"/> - </signal> - <signal name="NameAcquired"> - <arg type="s"/> - </signal> - </interface> -</node> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/extension.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/extension.js deleted file mode 100644 index 19abbdfb..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/extension.js +++ /dev/null @@ -1,496 +0,0 @@ -import Gio from "gi://Gio"; -import GLib from "gi://GLib"; -import Meta from "gi://Meta"; -import Shell from "gi://Shell"; -import * as Main from "resource:///org/gnome/shell/ui/main.js"; -import * as Mpris from "resource:///org/gnome/shell/ui/mpris.js"; -import { Extension } from "resource:///org/gnome/shell/extensions/extension.js"; -import PanelButton from "./helpers/shell/PanelButton.js"; -import PlayerProxy from "./helpers/shell/PlayerProxy.js"; -import { debugLog, enumValueByIndex, errorLog, handleError } from "./utils/common.js"; -import { getAppByIdAndEntry, createDbusProxy } from "./utils/shell_only.js"; -import { PlaybackStatus, WidgetFlags, MPRIS_PLAYER_IFACE_NAME, DBUS_PROPERTIES_IFACE_NAME, MPRIS_IFACE_NAME, DBUS_OBJECT_PATH, DBUS_IFACE_NAME, ExtensionPositions, } from "./types/enums/common.js"; - -Gio._promisify(Gio.File.prototype, "load_contents_async", "load_contents_finish"); - -export default class MediaControls extends Extension { - labelWidth; - isFixedLabelWidth; - scrollLabels; - hideMediaNotification; - showLabel; - showPlayerIcon; - showControlIcons; - showControlIconsPlay; - showControlIconsNext; - showControlIconsPrevious; - showControlIconsSeekForward; - showControlIconsSeekBackward; - coloredPlayerIcon; - extensionPosition; - extensionIndex; - elementsOrder; - labelsOrder; - shortcutShowMenu; - mouseActionLeft; - mouseActionMiddle; - mouseActionRight; - mouseActionDouble; - mouseActionScrollUp; - mouseActionScrollDown; - cacheArt; - blacklistedPlayers; - settings; - panelBtn; - watchProxy; - playerProxies; - watchIfaceInfo; - mprisIfaceInfo; - mprisPlayerIfaceInfo; - propertiesIfaceInfo; - mediaSectionAddFunc; - enable() { - this.playerProxies = new Map(); - this.initSettings(); - this.initProxies().catch(handleError); - this.updateMediaNotificationVisiblity(); - - Main.wm.addKeybinding("mediacontrols-show-popup-menu", this.settings, Meta.KeyBindingFlags.NONE, Shell.ActionMode.NORMAL, () => { - this.panelBtn?.menu.toggle(); - }); - - debugLog("Enabled"); - } - disable() { - this.playerProxies = null; - this.destroySettings(); - this.watchIfaceInfo = null; - this.mprisIfaceInfo = null; - this.mprisPlayerIfaceInfo = null; - this.propertiesIfaceInfo = null; - this.watchProxy = null; - this.removePanelButton(); - this.updateMediaNotificationVisiblity(true); - Main.wm.removeKeybinding("mediacontrols-show-popup-menu"); - debugLog("Disabled"); - } - getPlayers() { - const players = []; - - for (const player of this.playerProxies.values()) { - if (player.isInvalid) { - continue; - } - - players.push(player); - } - - return players; - } - initSettings() { - this.settings = this.getSettings(); - this.labelWidth = this.settings.get_uint("label-width"); - this.isFixedLabelWidth = this.settings.get_boolean("fixed-label-width"); - this.scrollLabels = this.settings.get_boolean("scroll-labels"); - this.hideMediaNotification = this.settings.get_boolean("hide-media-notification"); - this.showLabel = this.settings.get_boolean("show-label"); - this.showPlayerIcon = this.settings.get_boolean("show-player-icon"); - this.showControlIcons = this.settings.get_boolean("show-control-icons"); - this.showControlIconsPlay = this.settings.get_boolean("show-control-icons-play"); - this.showControlIconsNext = this.settings.get_boolean("show-control-icons-next"); - this.showControlIconsPrevious = this.settings.get_boolean("show-control-icons-previous"); - this.showControlIconsSeekForward = this.settings.get_boolean("show-control-icons-seek-forward"); - this.showControlIconsSeekBackward = this.settings.get_boolean("show-control-icons-seek-backward"); - this.coloredPlayerIcon = this.settings.get_boolean("colored-player-icon"); - this.extensionPosition = enumValueByIndex(ExtensionPositions, this.settings.get_enum("extension-position")); - this.extensionIndex = this.settings.get_uint("extension-index"); - this.elementsOrder = this.settings.get_strv("elements-order"); - this.labelsOrder = this.settings.get_strv("labels-order"); - this.mouseActionLeft = this.settings.get_enum("mouse-action-left"); - this.mouseActionMiddle = this.settings.get_enum("mouse-action-middle"); - this.mouseActionRight = this.settings.get_enum("mouse-action-right"); - this.mouseActionDouble = this.settings.get_enum("mouse-action-double"); - this.mouseActionScrollUp = this.settings.get_enum("mouse-action-scroll-up"); - this.mouseActionScrollDown = this.settings.get_enum("mouse-action-scroll-down"); - this.cacheArt = this.settings.get_boolean("cache-art"); - this.blacklistedPlayers = this.settings.get_strv("blacklisted-players"); - - this.settings.connect("changed::label-width", () => { - this.labelWidth = this.settings.get_uint("label-width"); - this.panelBtn?.updateWidgets(WidgetFlags.PANEL_LABEL | WidgetFlags.MENU_LABELS | WidgetFlags.MENU_IMAGE); - }); - - this.settings.connect("changed::fixed-label-width", () => { - this.isFixedLabelWidth = this.settings.get_boolean("fixed-label-width"); - this.panelBtn?.updateWidgets(WidgetFlags.PANEL_LABEL | WidgetFlags.MENU_LABELS | WidgetFlags.MENU_IMAGE); - }); - - this.settings.connect("changed::scroll-labels", () => { - this.scrollLabels = this.settings.get_boolean("scroll-labels"); - this.panelBtn?.updateWidgets(WidgetFlags.PANEL_LABEL | WidgetFlags.MENU_LABELS); - }); - - this.settings.connect("changed::hide-media-notification", () => { - this.hideMediaNotification = this.settings.get_boolean("hide-media-notification"); - this.updateMediaNotificationVisiblity(); - }); - - this.settings.connect("changed::show-label", () => { - this.showLabel = this.settings.get_boolean("show-label"); - this.panelBtn?.updateWidgets(WidgetFlags.PANEL_LABEL); - }); - - this.settings.connect("changed::show-player-icon", () => { - this.showPlayerIcon = this.settings.get_boolean("show-player-icon"); - this.panelBtn?.updateWidgets(WidgetFlags.PANEL_ICON); - }); - - this.settings.connect("changed::show-control-icons", () => { - this.showControlIcons = this.settings.get_boolean("show-control-icons"); - this.panelBtn?.updateWidgets(WidgetFlags.PANEL_CONTROLS); - }); - - this.settings.connect("changed::show-control-icons-play", () => { - this.showControlIconsPlay = this.settings.get_boolean("show-control-icons-play"); - this.panelBtn?.updateWidgets(WidgetFlags.PANEL_CONTROLS_PLAYPAUSE); - }); - - this.settings.connect("changed::show-control-icons-next", () => { - this.showControlIconsNext = this.settings.get_boolean("show-control-icons-next"); - this.panelBtn?.updateWidgets(WidgetFlags.PANEL_CONTROLS_NEXT); - }); - - this.settings.connect("changed::show-control-icons-previous", () => { - this.showControlIconsPrevious = this.settings.get_boolean("show-control-icons-previous"); - this.panelBtn?.updateWidgets(WidgetFlags.PANEL_CONTROLS_PREVIOUS); - }); - - this.settings.connect("changed::show-control-icons-seek-forward", () => { - this.showControlIconsSeekForward = this.settings.get_boolean("show-control-icons-seek-forward"); - this.panelBtn?.updateWidgets(WidgetFlags.PANEL_CONTROLS_SEEK_FORWARD); - }); - - this.settings.connect("changed::show-control-icons-seek-backward", () => { - this.showControlIconsSeekBackward = this.settings.get_boolean("show-control-icons-seek-backward"); - this.panelBtn?.updateWidgets(WidgetFlags.PANEL_CONTROLS_SEEK_BACKWARD); - }); - - this.settings.connect("changed::colored-player-icon", () => { - this.coloredPlayerIcon = this.settings.get_boolean("colored-player-icon"); - this.panelBtn?.updateWidgets(WidgetFlags.PANEL_ICON); - }); - - this.settings.connect("changed::extension-position", () => { - const enumIndex = this.settings.get_enum("extension-position"); - this.extensionPosition = enumValueByIndex(ExtensionPositions, enumIndex); - this.removePanelButton(); - this.setActivePlayer(); - }); - - this.settings.connect("changed::extension-index", () => { - this.extensionIndex = this.settings.get_uint("extension-index"); - this.removePanelButton(); - this.setActivePlayer(); - }); - - this.settings.connect("changed::elements-order", () => { - this.elementsOrder = this.settings.get_strv("elements-order"); - this.panelBtn?.updateWidgets(WidgetFlags.PANEL_NO_REPLACE); - }); - - this.settings.connect("changed::labels-order", () => { - this.labelsOrder = this.settings.get_strv("labels-order"); - this.panelBtn?.updateWidgets(WidgetFlags.PANEL_LABEL); - }); - - this.settings.connect("changed::mouse-action-left", () => { - this.mouseActionLeft = this.settings.get_enum("mouse-action-left"); - }); - - this.settings.connect("changed::mouse-action-middle", () => { - this.mouseActionMiddle = this.settings.get_enum("mouse-action-middle"); - }); - - this.settings.connect("changed::mouse-action-right", () => { - this.mouseActionRight = this.settings.get_enum("mouse-action-right"); - }); - - this.settings.connect("changed::mouse-action-double", () => { - this.mouseActionDouble = this.settings.get_enum("mouse-action-double"); - }); - - this.settings.connect("changed::mouse-action-scroll-up", () => { - this.mouseActionScrollUp = this.settings.get_enum("mouse-action-scroll-up"); - }); - - this.settings.connect("changed::mouse-action-scroll-down", () => { - this.mouseActionScrollDown = this.settings.get_enum("mouse-action-scroll-down"); - }); - - this.settings.connect("changed::cache-art", () => { - this.cacheArt = this.settings.get_boolean("cache-art"); - }); - - this.settings.connect("changed::blacklisted-players", () => { - this.blacklistedPlayers = this.settings.get_strv("blacklisted-players"); - - for (const playerProxy of this.playerProxies.values()) { - if (this.isPlayerBlacklisted(playerProxy.identity, playerProxy.desktopEntry)) { - this.removePlayer(playerProxy.busName); - } - } - - this.addRunningPlayers(); - }); - } - async initProxies() { - const mprisXmlFile = Gio.File.new_for_path(`${this.path}/dbus/mprisNode.xml`); - const watchXmlFile = Gio.File.new_for_path(`${this.path}/dbus/watchNode.xml`); - const mprisResult = mprisXmlFile.load_contents_async(null); - const watchResult = watchXmlFile.load_contents_async(null); - const readResults = await Promise.all([mprisResult, watchResult]).catch(handleError); - - if (readResults == null) { - errorLog("Failed to read xml files"); - return; - } - - const mprisBytes = readResults[0]; - const watchBytes = readResults[1]; - const textDecoder = new TextDecoder(); - const watchNodeXml = textDecoder.decode(watchBytes[0]); - const mprisNodeXml = textDecoder.decode(mprisBytes[0]); - const watchNodeInfo = Gio.DBusNodeInfo.new_for_xml(watchNodeXml); - const watchInterface = watchNodeInfo.interfaces.find((iface) => iface.name === DBUS_IFACE_NAME); - this.watchIfaceInfo = watchInterface; - const mprisNodeInfo = Gio.DBusNodeInfo.new_for_xml(mprisNodeXml); - const mprisInterface = mprisNodeInfo.interfaces.find((iface) => iface.name === MPRIS_IFACE_NAME); - const mprisPlayerInterface = mprisNodeInfo.interfaces.find((iface) => iface.name === MPRIS_PLAYER_IFACE_NAME); - const propertiesInterface = mprisNodeInfo.interfaces.find((iface) => iface.name === DBUS_PROPERTIES_IFACE_NAME); - const mprisInterfaceString = new GLib.String(""); - mprisInterface.generate_xml(4, mprisInterfaceString); - const mprisPlayerInterfaceString = new GLib.String(""); - mprisPlayerInterface.generate_xml(4, mprisPlayerInterfaceString); - const propertiesInterfaceString = new GLib.String(""); - propertiesInterface.generate_xml(4, propertiesInterfaceString); - this.mprisIfaceInfo = mprisInterface; - this.mprisPlayerIfaceInfo = mprisPlayerInterface; - this.propertiesIfaceInfo = propertiesInterface; - const initWatchSuccess = await this.initWatchProxy().catch(handleError); - - if (initWatchSuccess === false) { - errorLog("Failed to init watch proxy"); - return; - } - - await this.addRunningPlayers(); - } - async initWatchProxy() { - this.watchProxy = await createDbusProxy(this.watchIfaceInfo, DBUS_IFACE_NAME, DBUS_OBJECT_PATH).catch(handleError); - - if (this.watchProxy == null) { - return false; - } - - this.watchProxy.connectSignal("NameOwnerChanged", (proxy, senderName, [busName, oldOwner, newOwner]) => { - if (busName.startsWith(MPRIS_IFACE_NAME) === false) { - return; - } - - if (newOwner === "") { - this.removePlayer(busName); - } - else if (oldOwner === "") { - this.addPlayer(busName); - } - }); - - return true; - } - async addRunningPlayers() { - const namesResult = await this.watchProxy.ListNamesAsync().catch(handleError); - - if (namesResult == null) { - errorLog("Failed to get bus names"); - return; - } - - const busNames = namesResult[0]; - const promises = []; - - for (const busName of busNames) { - if (busName.startsWith(MPRIS_IFACE_NAME) === false) - continue; - if (this.playerProxies.has(busName)) - continue; - promises.push(this.addPlayer(busName)); - } - - await Promise.all(promises).catch(handleError); - } - async addPlayer(busName) { - debugLog("Adding player:", busName); - - try { - const playerProxy = new PlayerProxy(busName); - const initSuccess = await playerProxy - .initPlayer(this.mprisIfaceInfo, this.mprisPlayerIfaceInfo, this.propertiesIfaceInfo) - .catch(handleError); - - if (initSuccess == null || initSuccess === false) { - errorLog("Failed to init player:", busName); - return; - } - - const isPlayerBlacklisted = this.isPlayerBlacklisted(playerProxy.identity, playerProxy.desktopEntry); - - if (isPlayerBlacklisted) { - return; - } - - playerProxy.onChanged("IsPinned", this.setActivePlayer.bind(this)); - playerProxy.onChanged("PlaybackStatus", this.setActivePlayer.bind(this)); - - playerProxy.onChanged("IsInvalid", () => { - this.setActivePlayer(); - this.panelBtn?.updateWidgets(WidgetFlags.MENU_PLAYERS); - }); - - this.playerProxies.set(busName, playerProxy); - this.panelBtn?.updateWidgets(WidgetFlags.MENU_PLAYERS); - this.setActivePlayer(); - } - catch (e) { - errorLog("Failed to add player:", busName, e); - } - } - removePlayer(busName) { - debugLog("Removing player:", busName); - this.playerProxies.get(busName)?.onDestroy(); - this.playerProxies.delete(busName); - this.panelBtn?.updateWidgets(WidgetFlags.MENU_PLAYERS); - this.setActivePlayer(); - } - setActivePlayer() { - if (this.playerProxies.size === 0) { - if (this.panelBtn != null) { - this.removePanelButton(); - } - - return; - } - - let chosenPlayer = null; - - for (const [, playerProxy] of this.playerProxies) { - if (playerProxy.isInvalid) { - continue; - } - - if (playerProxy.isPlayerPinned()) { - chosenPlayer = playerProxy; - break; - } - - if (chosenPlayer == null) { - chosenPlayer = playerProxy; - continue; - } - - if (chosenPlayer?.playbackStatus !== PlaybackStatus.PLAYING) { - if (playerProxy.playbackStatus === PlaybackStatus.PLAYING) { - chosenPlayer = playerProxy; - } - else if (this.panelBtn?.isSamePlayer(playerProxy)) { - chosenPlayer = playerProxy; - } - } - } - - debugLog("Chosen player:", chosenPlayer?.busName); - - if (chosenPlayer == null) { - this.removePanelButton(); - } - else { - if (this.panelBtn == null) { - this.addPanelButton(chosenPlayer.busName); - } - else { - this.panelBtn.updateProxy(chosenPlayer); - } - } - } - isPlayerBlacklisted(id, entry) { - const app = getAppByIdAndEntry(id, entry); - - if (app == null) { - return false; - } - - const appId = app.get_id(); - return this.blacklistedPlayers.includes(appId); - } - updateMediaNotificationVisiblity(shouldReset = false) { - if (this.mediaSectionAddFunc && (shouldReset || this.hideMediaNotification === false)) { - Mpris.MediaSection.prototype._addPlayer = this.mediaSectionAddFunc; - this.mediaSectionAddFunc = null; - Main.panel.statusArea.dateMenu._messageList._mediaSection._onProxyReady(); - } - else { - this.mediaSectionAddFunc = Mpris.MediaSection.prototype._addPlayer; - - Mpris.MediaSection.prototype._addPlayer = function () { }; - - if (Main.panel.statusArea.dateMenu._messageList._mediaSection._players != null) { - for (const player of Main.panel.statusArea.dateMenu._messageList._mediaSection._players.values()) { - player._close(); - } - } - } - } - addPanelButton(busName) { - debugLog("Adding panel button"); - const playerProxy = this.playerProxies.get(busName); - - if (playerProxy == null) { - return; - } - - this.panelBtn = new PanelButton(playerProxy, this); - Main.panel.addToStatusArea("Media Controls", this.panelBtn, this.extensionIndex, this.extensionPosition); - } - removePanelButton() { - debugLog("Removing panel button"); - this.panelBtn?.destroy(); - this.panelBtn = null; - } - destroySettings() { - this.settings = null; - this.labelWidth = null; - this.hideMediaNotification = null; - this.scrollLabels = null; - this.showLabel = null; - this.showPlayerIcon = null; - this.showControlIcons = null; - this.showControlIconsPlay = null; - this.showControlIconsNext = null; - this.showControlIconsPrevious = null; - this.showControlIconsSeekForward = null; - this.showControlIconsSeekBackward = null; - this.coloredPlayerIcon = null; - this.extensionPosition = null; - this.extensionIndex = null; - this.elementsOrder = null; - this.labelsOrder = null; - this.shortcutShowMenu = null; - this.mouseActionLeft = null; - this.mouseActionMiddle = null; - this.mouseActionRight = null; - this.mouseActionDouble = null; - this.mouseActionScrollUp = null; - this.mouseActionScrollDown = null; - this.cacheArt = null; - this.blacklistedPlayers = null; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/prefs/AppChooser.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/prefs/AppChooser.js deleted file mode 100644 index f546cd6f..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/prefs/AppChooser.js +++ /dev/null @@ -1,46 +0,0 @@ -import Adw from "gi://Adw"; -import Gio from "gi://Gio"; -import Gtk from "gi://Gtk"; -class AppChooser extends Adw.Window { - listBox; - selectBtn; - cancelBtn; - constructor(params = {}) { - super(params); - // @ts-expect-error Typescript doesn't know about the internal children - this.listBox = this._list_box; - // @ts-expect-error Typescript doesn't know about the internal children - this.selectBtn = this._select_btn; - // @ts-expect-error Typescript doesn't know about the internal children - this.cancelBtn = this._cancel_btn; - const apps = Gio.AppInfo.get_all(); - - for (const app of apps) { - if (app.should_show() === false) - continue; - const row = new Adw.ActionRow(); - row.title = app.get_display_name(); - row.subtitle = app.get_id(); - row.subtitleLines = 1; - const icon = new Gtk.Image({ gicon: app.get_icon() }); - row.add_prefix(icon); - this.listBox.append(row); - } - - this.cancelBtn.connect("clicked", () => { - this.close(); - }); - } - showChooser() { - return new Promise((resolve) => { - const signalId = this.selectBtn.connect("clicked", () => { - this.close(); - this.selectBtn.disconnect(signalId); - const row = this.listBox.get_selected_row(); - resolve(row.subtitle); - }); - this.present(); - }); - } -} -export default AppChooser; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/prefs/BlacklistedPlayers.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/prefs/BlacklistedPlayers.js deleted file mode 100644 index b7aadab9..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/prefs/BlacklistedPlayers.js +++ /dev/null @@ -1,77 +0,0 @@ -import Adw from "gi://Adw"; -import Gio from "gi://Gio"; -import Gtk from "gi://Gtk"; -import { gettext as _ } from "resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js"; -import { AppChooser } from "../../prefs.js"; -import { handleError } from "../../utils/common.js"; -class BlacklistedPlayers extends Adw.PreferencesGroup { - players; - appChooser; - listBox; - addBtn; - constructor(params = {}) { - super(params); - // @ts-expect-error Typescript doesn't know about the internal children - this.listBox = this._list_box; - // @ts-expect-error Typescript doesn't know about the internal children - this.addBtn = this._add_btn; - // @ts-expect-error Typescript doesn't know about the internal children - this.appChooser = this._app_chooser; - this.appChooser = new AppChooser(); - - this.addBtn.connect("clicked", async () => { - const appId = await this.appChooser.showChooser().catch(handleError); - if (appId == null) - return; - this.players.unshift(appId); - this.notify("players"); - this.addElements(); - }); - } - initPlayers(players) { - this.players = players; - this.addElements(); - } - addElements() { - this.listBox.remove_all(); - - if (this.players.length === 0) { - const row = new Adw.ActionRow(); - const label = new Gtk.Label(); - label.label = _("<span size='x-large' weight='bold' color='#ccc'>No players are blacklisted</span>"); - label.useMarkup = true; - label.halign = Gtk.Align.CENTER; - label.marginTop = 20; - label.marginBottom = 20; - row.set_child(label); - this.listBox.append(row); - return; - } - - const apps = Gio.AppInfo.get_all(); - - for (const player of this.players) { - const row = new Adw.ActionRow(); - const app = apps.find((app) => app.get_id() === player); - row.title = app.get_display_name(); - const icon = new Gtk.Image({ gicon: app.get_icon(), iconSize: Gtk.IconSize.LARGE }); - row.add_prefix(icon); - const deleteBtn = new Gtk.Button({ icon_name: "user-trash-symbolic" }); - deleteBtn.marginTop = 10; - deleteBtn.marginBottom = 10; - deleteBtn.add_css_class("flat"); - deleteBtn.add_css_class("circular"); - row.add_suffix(deleteBtn); - - deleteBtn.connect("clicked", () => { - const index = this.players.indexOf(player); - this.players.splice(index, 1); - this.notify("players"); - this.addElements(); - }); - - this.listBox.append(row); - } - } -} -export default BlacklistedPlayers; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/prefs/ElementList.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/prefs/ElementList.js deleted file mode 100644 index b63337bb..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/prefs/ElementList.js +++ /dev/null @@ -1,117 +0,0 @@ -import Adw from "gi://Adw"; -import GObject from "gi://GObject"; -import Gdk from "gi://Gdk"; -import Graphene from "gi://Graphene"; -import Gtk from "gi://Gtk"; -import { PanelElements } from "../../types/enums/common.js"; -class ElementList extends Adw.PreferencesGroup { - elements; - listBox; - iconRow; - labelRow; - controlsRow; - constructor(params = {}) { - super(params); - // @ts-expect-error Typescript doesn't know about the internal children - this.listBox = this._list_box; - // @ts-expect-error Typescript doesn't know about the internal children - this.iconRow = this._icon_row; - this.iconRow.elementKey = "ICON"; - // @ts-expect-error Typescript doesn't know about the internal children - this.labelRow = this._label_row; - this.labelRow.elementKey = "LABEL"; - // @ts-expect-error Typescript doesn't know about the internal children - this.controlsRow = this._controls_row; - this.controlsRow.elementKey = "CONTROLS"; - this.elements = []; - const dropTarget = Gtk.DropTarget.new(GObject.TYPE_UINT, Gdk.DragAction.MOVE); - - dropTarget.connect("drop", (_, sourceIndex, x, y) => { - const targetRow = this.listBox.get_row_at_y(y); - if (targetRow == null || sourceIndex == null) - return; - const sourceValue = this.elements[sourceIndex]; - const targetIndex = targetRow.get_index(); - this.elements.splice(targetIndex > sourceIndex ? targetIndex + 1 : targetIndex, 0, sourceValue); - this.elements.splice(sourceIndex > targetIndex ? sourceIndex + 1 : sourceIndex, 1); - this.notify("elements"); - this.listBox.drag_unhighlight_row(); - this.listBox.invalidate_sort(); - }); - - this.listBox.add_controller(dropTarget); - - this.listBox.set_sort_func((firstRow, secondRow) => { - const firstIndex = this.elements.indexOf(firstRow.elementKey); - const secondIndex = this.elements.indexOf(secondRow.elementKey); - return firstIndex - secondIndex; - }); - } - initElements(elements) { - for (let i = 0; i < elements.length; i++) { - let dragX = 0; - let dragY = 0; - const dragSource = new Gtk.DragSource({ actions: Gdk.DragAction.MOVE }); - const dropController = new Gtk.DropControllerMotion(); - - dragSource.connect("prepare", (dragSource, x, y) => { - dragX = x; - dragY = y; - const row = dragSource.widget; - const index = row.get_index(); - const value = new GObject.Value(); - value.init(GObject.TYPE_UINT); - value.set_uint(index); - const content = Gdk.ContentProvider.new_for_value(value); - return content; - }); - - dragSource.connect("drag-begin", (dragSource) => { - const row = dragSource.widget; - const icon = this.snapshotRow(row); - dragSource.set_icon(icon, dragX, dragY); - }); - - dropController.connect("enter", (dropController) => { - const row = dropController.widget; - this.listBox.drag_highlight_row(row); - }); - - dropController.connect("leave", () => { - this.listBox.drag_unhighlight_row(); - }); - - const element = PanelElements[elements[i]]; - - if (element === PanelElements.ICON) { - this.iconRow.add_controller(dragSource); - this.iconRow.add_controller(dropController); - } - else if (element === PanelElements.LABEL) { - this.labelRow.add_controller(dragSource); - this.labelRow.add_controller(dropController); - } - else if (element === PanelElements.CONTROLS) { - this.controlsRow.add_controller(dragSource); - this.controlsRow.add_controller(dropController); - } - } - - this.elements = elements; - this.listBox.invalidate_sort(); - } - snapshotRow(row) { - const paintable = new Gtk.WidgetPaintable({ widget: row }); - const width = row.get_allocated_width(); - const height = row.get_allocated_height(); - const snapshot = new Gtk.Snapshot(); - paintable.snapshot(snapshot, width, height); - const node = snapshot.to_node(); - const renderer = row.get_native().get_renderer(); - const rect = new Graphene.Rect(); - rect.init(0, 0, width, height); - const texture = renderer.render_texture(node, rect); - return texture; - } -} -export default ElementList; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/prefs/LabelList.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/prefs/LabelList.js deleted file mode 100644 index e373e05f..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/prefs/LabelList.js +++ /dev/null @@ -1,170 +0,0 @@ -import Adw from "gi://Adw"; -import GObject from "gi://GObject"; -import Gdk from "gi://Gdk"; -import Graphene from "gi://Graphene"; -import Gtk from "gi://Gtk"; -import { gettext as _ } from "resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js"; -import { LabelTypes } from "../../types/enums/common.js"; -class LabelList extends Adw.PreferencesGroup { - labels; - labelsList; - listBox; - addItemBtn; - addTextBtn; - constructor(params = {}) { - super(params); - // @ts-expect-error Typescript doesn't know about internal children - this.listBox = this._list_box; - // @ts-expect-error Typescript doesn't know about internal children - this.addItemBtn = this._add_item_btn; - // @ts-expect-error Typescript doesn't know about internal children - this.addTextBtn = this._add_text_btn; - - this.labelsList = new Gtk.StringList({ - strings: Object.values(LabelTypes).map(_), - }); - - const dropTarget = Gtk.DropTarget.new(GObject.TYPE_UINT, Gdk.DragAction.MOVE); - - dropTarget.connect("drop", (_, sourceIndex, x, y) => { - const targetRow = this.listBox.get_row_at_y(y); - if (targetRow == null || sourceIndex == null) - return; - const sourceValue = this.labels[sourceIndex]; - const targetIndex = targetRow.get_index(); - this.labels.splice(targetIndex > sourceIndex ? targetIndex + 1 : targetIndex, 0, sourceValue); - this.labels.splice(sourceIndex > targetIndex ? sourceIndex + 1 : sourceIndex, 1); - this.notify("labels"); - this.listBox.drag_unhighlight_row(); - this.addElements(); - }); - - this.addItemBtn.connect("clicked", () => { - this.labels.push("ALBUM"); - this.notify("labels"); - this.addElements(); - }); - - this.addTextBtn.connect("clicked", () => { - this.labels.push(""); - this.notify("labels"); - this.addElements(); - }); - - this.listBox.add_controller(dropTarget); - } - initLabels(labels) { - this.labels = labels; - this.addElements(); - } - addElements() { - this.listBox.remove_all(); - - if (this.labels.length === 0) { - const row = new Adw.ActionRow(); - const label = new Gtk.Label(); - label.label = "<span size='x-large' weight='bold' color='#ccc'>No labels added</span>"; - label.useMarkup = true; - label.halign = Gtk.Align.CENTER; - label.marginTop = 20; - label.marginBottom = 20; - row.set_child(label); - this.listBox.append(row); - return; - } - - for (let i = 0; i < this.labels.length; i++) { - const element = this.labels[i]; - - if (Object.keys(LabelTypes).includes(element)) { - const row = new Adw.ComboRow(); - row.title = _(LabelTypes[element]); - row.model = this.labelsList; - row.selected = Object.keys(LabelTypes).indexOf(element); - this.handleComboBoxChange(row); - this.completeRowCreation(row, i); - } - else { - const row = new Adw.EntryRow(); - row.title = _("Custom text"); - row.text = element; - this.handleEntryChange(row); - this.completeRowCreation(row, i); - } - } - } - completeRowCreation(row, index) { - const dragIcon = new Gtk.Image({ icon_name: "list-drag-handle-symbolic" }); - row.add_prefix(dragIcon); - const deleteBtn = new Gtk.Button({ icon_name: "user-trash-symbolic" }); - deleteBtn.marginTop = 10; - deleteBtn.marginBottom = 10; - deleteBtn.add_css_class("flat"); - deleteBtn.add_css_class("circular"); - row.add_suffix(deleteBtn); - - deleteBtn.connect("clicked", () => { - this.labels.splice(index, 1); - this.notify("labels"); - this.addElements(); - }); - - const value = new GObject.Value(); - value.init(GObject.TYPE_UINT); - value.set_uint(index); - const content = Gdk.ContentProvider.new_for_value(value); - const dragSource = new Gtk.DragSource({ actions: Gdk.DragAction.MOVE, content }); - const dropController = new Gtk.DropControllerMotion(); - - dragSource.connect("prepare", (dragSource, x, y) => { - const row = dragSource.widget; - const snapshot = this.snapshotRow(row); - dragSource.set_icon(snapshot, x, y); - return dragSource.content; - }); - - dropController.connect("enter", (dropController) => { - const row = dropController.widget; - this.listBox.drag_highlight_row(row); - }); - - dropController.connect("leave", () => { - this.listBox.drag_unhighlight_row(); - }); - - row.add_controller(dragSource); - row.add_controller(dropController); - this.listBox.append(row); - } - handleComboBoxChange(row) { - row.connect("notify::selected", () => { - const rowIndex = row.get_index(); - const labelListKeys = Object.keys(LabelTypes); - const labelKey = labelListKeys[row.selected]; - this.labels.splice(rowIndex, 1, labelKey); - this.notify("labels"); - this.addElements(); - }); - } - handleEntryChange(row) { - row.connect("notify::text", () => { - const rowIndex = row.get_index(); - this.labels.splice(rowIndex, 1, row.text); - this.notify("labels"); - }); - } - snapshotRow(row) { - const paintable = new Gtk.WidgetPaintable({ widget: row }); - const width = row.get_allocated_width(); - const height = row.get_allocated_height(); - const snapshot = new Gtk.Snapshot(); - paintable.snapshot(snapshot, width, height); - const node = snapshot.to_node(); - const renderer = row.get_native().get_renderer(); - const rect = new Graphene.Rect(); - rect.init(0, 0, width, height); - const texture = renderer.render_texture(node, rect); - return texture; - } -} -export default LabelList; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/shell/MenuSlider.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/shell/MenuSlider.js deleted file mode 100644 index 55be97aa..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/shell/MenuSlider.js +++ /dev/null @@ -1,161 +0,0 @@ -import Clutter from "gi://Clutter"; -import GObject from "gi://GObject"; -import St from "gi://St"; -import * as Slider from "resource:///org/gnome/shell/ui/slider.js"; -import { msToHHMMSS } from "../../utils/common.js"; -class MenuSlider extends St.BoxLayout { - transition; - slider; - textBox; - elapsedLabel; - durationLabel; - dragPaused; - disabled; - rate; - constructor() { - super({ vertical: true }); - this.rate = 1.0; - this.slider = new Slider.Slider(0); - this.textBox = new St.BoxLayout(); - - this.elapsedLabel = new St.Label({ - text: "00:00", - xExpand: true, - xAlign: Clutter.ActorAlign.START, - }); - - this.durationLabel = new St.Label({ - text: "00:00", - xExpand: true, - xAlign: Clutter.ActorAlign.END, - }); - - this.slider.connect("drag-begin", () => { - if (this.transition.is_playing() && this.disabled === false) { - this.transition.pause(); - this.dragPaused = true; - } - - return Clutter.EVENT_PROPAGATE; - }); - - this.slider.connect("drag-end", () => { - const ms = this.slider.value * this.transition.duration; - this.emit("seeked", Math.floor(ms * 1000)); - - if (this.dragPaused) { - this.transition.advance(ms); - this.transition.start(); - this.dragPaused = false; - } - - return Clutter.EVENT_PROPAGATE; - }); - - this.slider.connect("scroll-event", () => { - return Clutter.EVENT_STOP; - }); - - this.transition = new Clutter.PropertyTransition({ - propertyName: "value", - progressMode: Clutter.AnimationMode.LINEAR, - repeatCount: 1, - interval: new Clutter.Interval({ - valueType: GObject.TYPE_DOUBLE, - initial: 0, - final: 1, - }), - }); - - this.transition.connect("marker-reached", (_, name) => { - this.elapsedLabel.text = name; - }); - - this.textBox.add_child(this.elapsedLabel); - this.textBox.add_child(this.durationLabel); - this.add_child(this.textBox); - this.add_child(this.slider); - this.slider.add_transition("progress", this.transition); - this.connect("destroy", this.onDestroy.bind(this)); - this.setDisabled(true); - } - updateSlider(position, length, rate) { - this.rate = rate || 1.0; - this.setLength(length); - this.setPosition(position); - } - setRate(rate) { - const oldRate = this.rate; - this.rate = rate || 1.0; - this.setPosition(this.transition.get_elapsed_time() * oldRate * 1000); - this.setLength(this.transition.duration * oldRate * 1000); - } - setPosition(position) { - position = position / 1000; - this.elapsedLabel.text = msToHHMMSS(position); - this.slider.value = position / this.rate / this.transition.duration; - this.transition.advance(position / this.rate); - } - setLength(length) { - length = length / 1000; - this.durationLabel.text = msToHHMMSS(length); - this.slider.value = 0; - this.transition.set_duration(length / this.rate); - this.transition.rewind(); - this.updateMarkers(); - } - pauseTransition() { - if (this.disabled === false) { - this.transition.pause(); - } - } - resumeTransition() { - if (this.disabled === false) { - this.transition.start(); - } - } - setDisabled(disabled) { - this.disabled = disabled; - this.slider.reactive = !disabled; - this.opacity = disabled ? 127 : 255; - - if (disabled) { - this.durationLabel.text = "00:00"; - this.elapsedLabel.text = "00:00"; - this.transition.set_duration(1); - this.transition.stop(); - this.slider.value = 0; - } - else { - this.updateMarkers(); - } - } - updateMarkers() { - const noOfSecs = Math.floor(this.transition.duration / (1000 / this.rate)); - const markers = this.transition.list_markers(-1); - - for (const marker of markers) { - this.transition.remove_marker(marker); - } - - for (let i = 0; i <= noOfSecs; i++) { - const ms = i * 1000; - const elapsedText = msToHHMMSS(ms); - this.transition.add_marker_at_time(elapsedText, ms / this.rate); - } - } - onDestroy() { - this.slider.remove_transition("progress"); - this.slider.destroy(); - this.textBox.destroy(); - } -} -const GMenuSlider = GObject.registerClass({ - GTypeName: "MenuSlider", - Signals: { - seeked: { - param_types: [GObject.TYPE_INT], - }, - }, -}, MenuSlider); -export default GMenuSlider; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/shell/PanelButton.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/shell/PanelButton.js deleted file mode 100644 index 2e88f003..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/shell/PanelButton.js +++ /dev/null @@ -1,953 +0,0 @@ -import GObject from "gi://GObject"; -import Clutter from "gi://Clutter"; -import GdkPixbuf from "gi://GdkPixbuf"; -import GLib from "gi://GLib"; -import Cogl from "gi://Cogl"; -import Gio from "gi://Gio"; -import St from "gi://St"; -import * as PanelMenu from "resource:///org/gnome/shell/ui/panelMenu.js"; -import * as PopupMenu from "resource:///org/gnome/shell/ui/popupMenu.js"; -import { gettext as _ } from "resource:///org/gnome/shell/extensions/extension.js"; -import ScrollingLabel from "./ScrollingLabel.js"; -import MenuSlider from "./MenuSlider.js"; -import { debugLog, handleError } from "../../utils/common.js"; -import { getAppByIdAndEntry, getImage } from "../../utils/shell_only.js"; -import { ControlIconOptions } from "../../types/enums/shell_only.js"; -import { LabelTypes, PanelElements, MouseActions, LoopStatus, PlaybackStatus, WidgetFlags, } from "../../types/enums/common.js"; - -Gio._promisify(GdkPixbuf.Pixbuf, "new_from_stream_async", "new_from_stream_finish"); -Gio._promisify(Gio.File.prototype, "query_info_async", "query_info_finish"); - -function find_child_by_name(parent, name) { - if (Clutter.Container === undefined) { - const children = parent.get_children(); - - for (const child of children) { - if (child.get_name() === name) { - return child; - } - } - } - else { - return parent.find_child_by_name(name); - } -} - -class PanelButton extends PanelMenu.Button { - playerProxy; - extension; - buttonIcon; - buttonLabel; - buttonControls; - buttonBox; - menuBox; - menuPlayers; - menuImage; - menuLabels; - menuSlider; - menuControls; - menuPlayersTextBox; - menuPlayersTextBoxIcon; - menuPlayersTextBoxLabel; - menuPlayersTextBoxPin; - menuPlayerIcons; - menuLabelTitle; - menuLabelSubtitle; - doubleTapSourceId; - changeListenerIds; - constructor(playerProxy, extension) { - super(0.5, "Media Controls", false); - this.playerProxy = playerProxy; - this.extension = extension; - this.changeListenerIds = new Map(); - this.updateWidgets(WidgetFlags.ALL); - this.addProxyListeners(); - this.initActions(); - this.menu.box.add_style_class_name("popup-menu-container"); - this.connect("destroy", this.onDestroy.bind(this)); - } - updateProxy(playerProxy) { - if (this.isSamePlayer(playerProxy) === false) { - debugLog(`Updating proxy to ${playerProxy.busName}`); - this.playerProxy = playerProxy; - this.updateWidgets(WidgetFlags.ALL); - this.addProxyListeners(); - } - } - isSamePlayer(playerProxy) { - return this.playerProxy.busName === playerProxy.busName; - } - updateWidgets(flags) { - if (this.buttonBox == null) { - this.buttonBox = new St.BoxLayout({ - styleClass: "panel-button-box", - }); - } - else if (flags & WidgetFlags.PANEL_NO_REPLACE) { - this.buttonBox.remove_all_children(); - } - - if (this.menuBox == null) { - this.menuBox = new PopupMenu.PopupBaseMenuItem({ - style_class: "no-padding popup-menu-box", - activate: false, - }); - - this.menuBox.set_vertical(true); - this.menuBox.remove_style_class_name("popup-menu-item"); - this.menuBox.remove_all_children(); - } - - for (let i = 0; i < this.extension.elementsOrder.length; i++) { - const element = PanelElements[this.extension.elementsOrder[i]]; - - if (element === PanelElements.ICON && - (flags & WidgetFlags.PANEL_ICON || flags & WidgetFlags.PANEL_NO_REPLACE)) { - if (this.extension.showPlayerIcon) { - this.addButtonIcon(i); - } - else if (this.buttonIcon != null) { - this.buttonBox.remove_child(this.buttonIcon); - this.buttonIcon = null; - } - } - - if (element === PanelElements.LABEL && - (flags & WidgetFlags.PANEL_LABEL || flags & WidgetFlags.PANEL_NO_REPLACE)) { - if (this.extension.showLabel) { - this.addButtonLabel(i); - } - else if (this.buttonLabel != null) { - this.buttonBox.remove_child(this.buttonLabel); - this.buttonLabel = null; - } - } - - if (element === PanelElements.CONTROLS && - (flags & WidgetFlags.PANEL_CONTROLS || flags & WidgetFlags.PANEL_NO_REPLACE)) { - if (this.extension.showControlIcons) { - this.addButtonControls(i, flags); - } - else if (this.buttonControls != null) { - this.buttonBox.remove_child(this.buttonControls); - this.buttonControls = null; - } - } - } - - if (flags & WidgetFlags.MENU_PLAYERS) { - this.addMenuPlayers(); - } - - if (flags & WidgetFlags.MENU_IMAGE) { - this.addMenuImage().catch(handleError); - } - - if (flags & WidgetFlags.MENU_LABELS) { - this.addMenuLabels(); - } - - if (flags & WidgetFlags.MENU_SLIDER) { - this.addMenuSlider().catch(handleError); - } - - if (flags & WidgetFlags.MENU_CONTROLS) { - this.addMenuControls(flags); - } - - if (this.buttonBox.get_parent() == null) { - this.add_child(this.buttonBox); - } - - if (this.menuBox.get_parent() == null) { - this.menu.addMenuItem(this.menuBox); - } - } - addMenuPlayers() { - if (this.menuPlayers == null) { - this.menuPlayers = new St.BoxLayout({ - vertical: true, - }); - } - - if (this.menuPlayersTextBox == null) { - this.menuPlayersTextBox = new St.BoxLayout({ - marginBottom: 3, - }); - } - - if (this.menuPlayersTextBoxIcon == null) { - this.menuPlayersTextBoxIcon = new St.Icon({ - styleClass: "popup-menu-icon", - yAlign: Clutter.ActorAlign.END, - xAlign: Clutter.ActorAlign.END, - xExpand: true, - yExpand: true, - }); - } - - if (this.menuPlayersTextBoxLabel == null) { - this.menuPlayersTextBoxLabel = new St.Label({ - styleClass: "popup-menu-player-label", - yAlign: Clutter.ActorAlign.END, - yExpand: true, - }); - } - - if (this.menuPlayersTextBoxPin == null) { - this.menuPlayersTextBoxPin = new St.Icon({ - iconName: "view-pin-symbolic", - styleClass: "popup-menu-icon", - yAlign: Clutter.ActorAlign.END, - xAlign: Clutter.ActorAlign.START, - yExpand: true, - xExpand: true, - reactive: true, - }); - - const tapAction = new Clutter.TapAction(); - - tapAction.connect("tap", () => { - if (this.playerProxy.isPlayerPinned()) { - this.playerProxy.unpinPlayer(); - } - else { - this.playerProxy.pinPlayer(); - } - }); - - this.menuPlayersTextBoxPin.add_action(tapAction); - } - - const players = this.extension.getPlayers(); - - if (players.length > 1 && this.menuPlayerIcons == null) { - this.menuPlayerIcons = new St.BoxLayout({ - styleClass: "popup-menu-player-icons", - }); - } - else if (players.length === 1 && this.menuPlayerIcons != null) { - this.menuPlayers.remove_child(this.menuPlayerIcons); - this.menuPlayerIcons = null; - } - else { - this.menuPlayerIcons?.remove_all_children(); - } - - const isPinned = this.playerProxy.isPlayerPinned(); - this.menuPlayersTextBoxPin.opacity = isPinned ? 255 : 160; - - if (this.menuPlayerIcons != null) { - this.menuPlayerIcons.opacity = isPinned ? 160 : 255; - } - - for (let i = 0; i < players.length; i++) { - const player = players[i]; - const app = getAppByIdAndEntry(player.identity, player.desktopEntry); - const isSamePlayer = this.isSamePlayer(player); - const appName = app?.get_name() ?? (player.identity || _("Unknown player")); - const appIcon = app?.get_icon() ?? Gio.Icon.new_for_string("audio-x-generic-symbolic"); - - if (isSamePlayer) { - this.menuPlayersTextBoxLabel.text = appName; - - if (this.menuPlayersTextBoxIcon?.get_parent() != null) { - this.menuPlayersTextBox.remove_child(this.menuPlayersTextBoxIcon); - } - - if (this.menuPlayersTextBoxPin.get_parent() != null) { - this.menuPlayersTextBox.remove_child(this.menuPlayersTextBoxPin); - } - - if (players.length > 1) { - this.menuPlayersTextBoxIcon.gicon = null; - this.menuPlayersTextBoxLabel.xAlign = Clutter.ActorAlign.END; - this.menuPlayersTextBoxLabel.xExpand = true; - this.menuPlayersTextBox.insert_child_at_index(this.menuPlayersTextBoxPin, 1); - } - else { - this.menuPlayersTextBoxIcon.gicon = appIcon; - this.menuPlayersTextBox.insert_child_at_index(this.menuPlayersTextBoxIcon, 0); - this.menuPlayersTextBoxLabel.xAlign = Clutter.ActorAlign.START; - this.menuPlayersTextBoxLabel.xExpand = true; - } - } - - if (players.length > 1) { - const icon = new St.Icon({ - styleClass: "popup-menu-icon popup-menu-player-icons-icon", - gicon: appIcon, - reactive: isPinned === false, - trackHover: isPinned === false, - xAlign: Clutter.ActorAlign.FILL, - xExpand: true, - }); - - if (i === 0) { - icon.add_style_class_name("popup-menu-player-icons-icon-first"); - } - else if (i === players.length - 1) { - icon.add_style_class_name("popup-menu-player-icons-icon-last"); - } - - if (isSamePlayer) { - icon.add_style_class_name("popup-menu-player-icons-icon-active"); - } - else { - const tapAction = new Clutter.TapAction(); - tapAction.connect("tap", this.updateProxy.bind(this, player)); - icon.add_action(tapAction); - } - - this.menuPlayerIcons.add_child(icon); - } - } - - if (this.menuPlayersTextBoxLabel.get_parent() == null) { - this.menuPlayersTextBox.add_child(this.menuPlayersTextBoxLabel); - } - - if (this.menuPlayersTextBox.get_parent() == null) { - this.menuPlayers.add_child(this.menuPlayersTextBox); - } - - if (this.menuPlayerIcons && this.menuPlayerIcons.get_parent() == null) { - this.menuPlayers.add_child(this.menuPlayerIcons); - } - - if (this.menuPlayers.get_parent() == null) { - this.menuBox.add_child(this.menuPlayers); - } - - debugLog("Added menu players"); - } - async addMenuImage() { - if (this.menuImage == null) { - this.menuImage = new St.Icon({ - xExpand: false, - yExpand: false, - xAlign: Clutter.ActorAlign.CENTER, - }); - } - - let artSet = false; - let stream = await getImage(this.playerProxy.metadata["mpris:artUrl"]); - - if (stream == null && this.playerProxy.metadata["xesam:url"] != null) { - const trackUri = GLib.uri_parse(this.playerProxy.metadata["xesam:url"], GLib.UriFlags.NONE); - - if (trackUri != null && trackUri.get_scheme() === "file") { - const file = Gio.File.new_for_uri(trackUri.to_string()); - const info = await file - .query_info_async(Gio.FILE_ATTRIBUTE_THUMBNAIL_PATH, Gio.FileQueryInfoFlags.NONE, null, null) - .catch(handleError); - - if (info != null) { - const path = info.get_attribute_byte_string(Gio.FILE_ATTRIBUTE_THUMBNAIL_PATH); - - if (path == null) { - this.menuImage.gicon = info.get_icon(); - } - else { - const thumb = Gio.File.new_for_path(path); - stream = await getImage(thumb.get_uri()); - } - } - } - } - - const width = this.extension.labelWidth > 0 ? this.getMenuItemWidth() : this.menuLabels.width; - - if (stream != null) { - // @ts-expect-error Types are wrong - const pixbufPromise = GdkPixbuf.Pixbuf.new_from_stream_async(stream, null); - const pixbuf = await pixbufPromise.catch(handleError); - - if (pixbuf != null) { - const aspectRatio = pixbuf.width / pixbuf.height; - const height = width / aspectRatio; - const format = pixbuf.hasAlpha ? Cogl.PixelFormat.RGBA_8888 : Cogl.PixelFormat.RGB_888; - const image = St.ImageContent.new_with_preferred_size(width, height); - image.set_bytes(pixbuf.pixelBytes, format, pixbuf.width, pixbuf.height, pixbuf.rowstride); - this.menuImage.iconSize = -1; - this.menuImage.gicon = null; - this.menuImage.width = width; - this.menuImage.height = height; - this.menuImage.content = image; - artSet = true; - } - } - - if (artSet === false) { - this.menuImage.content = null; - this.menuImage.gicon = Gio.ThemedIcon.new("audio-x-generic-symbolic"); - this.menuImage.width = width; - this.menuImage.height = width; - this.menuImage.iconSize = width; - } - - if (this.menuImage.get_parent() == null) { - this.menuBox.insert_child_above(this.menuImage, this.menuPlayers); - } - - debugLog("Added menu image"); - } - addMenuLabels() { - if (this.menuLabels == null) { - this.menuLabels = new St.BoxLayout({ - vertical: true, - }); - } - - if (this.menuLabelTitle != null) { - this.menuLabels.remove_child(this.menuLabelTitle); - } - - if (this.menuLabelSubtitle != null) { - this.menuLabels.remove_child(this.menuLabelSubtitle); - } - - const width = this.extension.labelWidth > 0 ? this.getMenuItemWidth() : 0; - - this.menuLabelTitle = new ScrollingLabel({ - text: this.playerProxy.metadata["xesam:title"], - isScrolling: this.extension.scrollLabels, - initPaused: this.playerProxy.playbackStatus !== PlaybackStatus.PLAYING, - width, - }); - - const artistText = this.playerProxy.metadata["xesam:artist"]?.join(", ") || _("Unknown artist"); - const albumText = this.playerProxy.metadata["xesam:album"] || ""; - - this.menuLabelSubtitle = new ScrollingLabel({ - text: albumText === "" ? artistText : `${artistText} / ${albumText}`, - isScrolling: this.extension.scrollLabels, - initPaused: this.playerProxy.playbackStatus !== PlaybackStatus.PLAYING, - direction: Clutter.TimelineDirection.BACKWARD, - width, - }); - - this.menuLabelTitle.label.add_style_class_name("popup-menu-label-title"); - this.menuLabelTitle.box.xAlign = Clutter.ActorAlign.CENTER; - this.menuLabelSubtitle.box.xAlign = Clutter.ActorAlign.CENTER; - this.menuLabels.add_child(this.menuLabelTitle); - this.menuLabels.add_child(this.menuLabelSubtitle); - - if (this.menuLabels.get_parent() == null) { - this.menuBox.add_child(this.menuLabels); - } - - debugLog("Added menu labels"); - } - async addMenuSlider() { - const position = await this.playerProxy.position.catch(handleError); - const length = this.playerProxy.metadata["mpris:length"]; - const rate = this.playerProxy.rate; - - if (this.menuSlider == null) { - this.menuSlider = new MenuSlider(); - - this.menuSlider.connect("seeked", (_, position) => { - this.playerProxy.setPosition(this.playerProxy.metadata["mpris:trackid"], position); - }); - } - - if (position != null && length != null && length > 0) { - this.menuSlider.setDisabled(false); - this.menuSlider.updateSlider(position, length, rate); - - if (this.playerProxy.playbackStatus === PlaybackStatus.PLAYING) { - this.menuSlider.resumeTransition(); - } - else { - this.menuSlider.pauseTransition(); - } - } - else { - this.menuSlider.setDisabled(true); - } - - if (this.menuSlider.get_parent() == null) { - this.menuBox.insert_child_above(this.menuSlider, this.menuLabels); - } - - debugLog("Added menu slider"); - } - addMenuControls(flags) { - if (this.menuControls == null) { - this.menuControls = new St.BoxLayout(); - } - - if (flags & WidgetFlags.MENU_CONTROLS_LOOP) { - this.addMenuControlIcon(this.playerProxy.loopStatus === LoopStatus.NONE - ? ControlIconOptions.LOOP_NONE - : this.playerProxy.loopStatus === LoopStatus.TRACK - ? ControlIconOptions.LOOP_TRACK - : ControlIconOptions.LOOP_PLAYLIST, this.playerProxy.loopStatus != null, this.playerProxy.toggleLoop.bind(this.playerProxy)); - } - - if (flags & WidgetFlags.MENU_CONTROLS_PREV) { - this.addMenuControlIcon(ControlIconOptions.PREVIOUS, this.playerProxy.canGoPrevious && this.playerProxy.canControl, this.playerProxy.previous.bind(this.playerProxy)); - } - - if (flags & WidgetFlags.MENU_CONTROLS_PLAYPAUSE) { - if (this.playerProxy.playbackStatus !== PlaybackStatus.PLAYING) { - this.addMenuControlIcon(ControlIconOptions.PLAY, this.playerProxy.canPlay && this.playerProxy.canControl, this.playerProxy.play.bind(this.playerProxy)); - } - else { - this.addMenuControlIcon(ControlIconOptions.PAUSE, this.playerProxy.canPause && this.playerProxy.canControl, this.playerProxy.pause.bind(this.playerProxy)); - } - } - - if (flags & WidgetFlags.MENU_CONTROLS_NEXT) { - this.addMenuControlIcon(ControlIconOptions.NEXT, this.playerProxy.canGoNext && this.playerProxy.canControl, this.playerProxy.next.bind(this.playerProxy)); - } - - if (flags & WidgetFlags.MENU_CONTROLS_SHUFFLE) { - this.addMenuControlIcon(this.playerProxy.shuffle ? ControlIconOptions.SHUFFLE_OFF : ControlIconOptions.SHUFFLE_ON, this.playerProxy.shuffle != null, this.playerProxy.toggleShuffle.bind(this.playerProxy)); - } - - if (this.menuControls.get_parent() == null) { - this.menuBox.add_child(this.menuControls); - } - - debugLog("Added menu controls"); - } - addMenuControlIcon(options, reactive, onClick) { - const icon = new St.Icon({ - name: options.name, - iconName: options.iconName, - styleClass: "popup-menu-icon popup-menu-control-icon", - trackHover: reactive, - opacity: reactive ? 255 : 160, - reactive, - ...options.menuProps.options, - }); - const tapAction = new Clutter.TapAction(); - tapAction.connect("tap", onClick); - icon.add_action(tapAction); - const oldIcon = find_child_by_name(this.menuControls, options.name); - - if (oldIcon?.get_parent() === this.menuControls) { - this.menuControls.replace_child(oldIcon, icon); - } - else { - this.menuControls.insert_child_at_index(icon, options.menuProps.index); - } - } - addButtonIcon(index) { - const app = getAppByIdAndEntry(this.playerProxy.identity, this.playerProxy.desktopEntry); - const appIcon = app?.get_icon() ?? Gio.Icon.new_for_string("audio-x-generic-symbolic"); - const coloredClass = this.extension.coloredPlayerIcon ? "colored-icon" : "symbolic-icon"; - const icon = new St.Icon({ - gicon: appIcon, - styleClass: `system-status-icon no-margin ${coloredClass}`, - }); - - if (this.buttonIcon?.get_parent() === this.buttonBox) { - this.buttonBox.replace_child(this.buttonIcon, icon); - } - else { - this.buttonBox.insert_child_at_index(icon, index); - } - - this.buttonIcon = icon; - debugLog("Added icon"); - } - addButtonLabel(index) { - const label = new ScrollingLabel({ - text: this.getButtonLabelText(), - width: this.extension.labelWidth, - isFixedWidth: this.extension.isFixedLabelWidth, - isScrolling: this.extension.scrollLabels, - initPaused: this.playerProxy.playbackStatus !== PlaybackStatus.PLAYING, - }); - - if (this.buttonLabel?.get_parent() === this.buttonBox) { - this.buttonBox.replace_child(this.buttonLabel, label); - } - else { - this.buttonBox.insert_child_at_index(label, index); - } - - this.buttonLabel = label; - debugLog("Added label"); - } - addButtonControls(index, flags) { - if (this.buttonControls == null) { - this.buttonControls = new St.BoxLayout({ - name: "controls-box", - styleClass: "panel-controls-box", - }); - } - - if (flags & WidgetFlags.PANEL_CONTROLS_SEEK_BACKWARD) { - if (this.extension.showControlIconsSeekBackward) { - this.addButtonControlIcon(ControlIconOptions.SEEK_BACKWARD, this.playerProxy.seek.bind(this.playerProxy, -5000000), this.playerProxy.canSeek && this.playerProxy.canControl); - } - else { - this.removeButtonControlIcon(ControlIconOptions.SEEK_BACKWARD); - } - } - - if (flags & WidgetFlags.PANEL_CONTROLS_PREVIOUS) { - if (this.extension.showControlIconsPrevious) { - this.addButtonControlIcon(ControlIconOptions.PREVIOUS, this.playerProxy.previous.bind(this.playerProxy), this.playerProxy.canGoPrevious && this.playerProxy.canControl); - } - else { - this.removeButtonControlIcon(ControlIconOptions.PREVIOUS); - } - } - - if (flags & WidgetFlags.PANEL_CONTROLS_PLAYPAUSE) { - if (this.extension.showControlIconsPlay) { - if (this.playerProxy.playbackStatus !== PlaybackStatus.PLAYING) { - this.addButtonControlIcon(ControlIconOptions.PLAY, this.playerProxy.play.bind(this.playerProxy), this.playerProxy.canPlay && this.playerProxy.canControl); - } - else { - this.addButtonControlIcon(ControlIconOptions.PAUSE, this.playerProxy.pause.bind(this.playerProxy), this.playerProxy.canPause && this.playerProxy.canControl); - } - } - else { - this.removeButtonControlIcon(ControlIconOptions.PLAY); - } - } - - if (flags & WidgetFlags.PANEL_CONTROLS_NEXT) { - if (this.extension.showControlIconsNext) { - this.addButtonControlIcon(ControlIconOptions.NEXT, this.playerProxy.next.bind(this.playerProxy), this.playerProxy.canGoNext && this.playerProxy.canControl); - } - else { - this.removeButtonControlIcon(ControlIconOptions.NEXT); - } - } - - if (flags & WidgetFlags.PANEL_CONTROLS_SEEK_FORWARD) { - if (this.extension.showControlIconsSeekForward) { - this.addButtonControlIcon(ControlIconOptions.SEEK_FORWARD, this.playerProxy.seek.bind(this.playerProxy, 5000000), this.playerProxy.canSeek && this.playerProxy.canControl); - } - else { - this.removeButtonControlIcon(ControlIconOptions.SEEK_FORWARD); - } - } - - if (this.buttonControls.get_parent() == null) { - this.buttonBox.insert_child_at_index(this.buttonControls, index); - } - - debugLog("Added controls"); - } - addButtonControlIcon(options, onClick, reactive) { - const icon = new St.Icon({ - name: options.name, - iconName: options.iconName, - styleClass: "system-status-icon no-margin", - opacity: reactive ? 255 : 160, - reactive, - }); - const tapAction = new Clutter.TapAction(); - tapAction.connect("tap", onClick); - icon.add_action(tapAction); - const oldIcon = find_child_by_name(this.buttonControls, options.name); - - if (oldIcon != null) { - this.buttonControls.replace_child(oldIcon, icon); - } - else { - this.buttonControls.insert_child_at_index(icon, options.panelProps.index); - } - } - removeButtonControlIcon(options) { - const icon = find_child_by_name(this.buttonControls, options.name); - - if (icon != null) { - this.buttonControls.remove_child(icon); - } - } - getButtonLabelText() { - const labelTextElements = []; - - for (const labelElement of this.extension.labelsOrder) { - if (LabelTypes[labelElement] === LabelTypes.TITLE) { - labelTextElements.push(this.playerProxy.metadata["xesam:title"]); - } - else if (LabelTypes[labelElement] === LabelTypes.ARTIST) { - labelTextElements.push(this.playerProxy.metadata["xesam:artist"]?.join(", ") || _("Unknown artist")); - } - else if (LabelTypes[labelElement] === LabelTypes.ALBUM) { - labelTextElements.push(this.playerProxy.metadata["xesam:album"] || _("Unknown album")); - } - else if (LabelTypes[labelElement] === LabelTypes.DISC_NUMBER) { - labelTextElements.push(this.playerProxy.metadata["xesam:discNumber"]); - } - else if (LabelTypes[labelElement] === LabelTypes.TRACK_NUMBER) { - labelTextElements.push(this.playerProxy.metadata["xesam:trackNumber"]); - } - else { - labelTextElements.push(labelElement); - } - } - - return labelTextElements.join(" "); - } - getMenuItemWidth() { - const menuContainer = this.menu.box.get_parent().get_parent(); - const minWidth = menuContainer.get_theme_node().get_min_width() - 24; - return Math.max(minWidth, this.extension.labelWidth); - } - addProxyListeners() { - this.removeProxyListeners(); - - this.addProxyListener("Metadata", () => { - this.updateWidgets(WidgetFlags.PANEL_LABEL | WidgetFlags.MENU_IMAGE | WidgetFlags.MENU_LABELS | WidgetFlags.MENU_SLIDER); - }); - - this.addProxyListener("PlaybackStatus", () => { - this.updateWidgets(WidgetFlags.PANEL_CONTROLS_PLAYPAUSE | WidgetFlags.MENU_CONTROLS_PLAYPAUSE); - - if (this.playerProxy.playbackStatus !== PlaybackStatus.PLAYING) { - this.buttonLabel?.pauseScrolling(); - this.menuLabelTitle.pauseScrolling(); - this.menuLabelSubtitle.pauseScrolling(); - this.menuSlider.pauseTransition(); - } - else { - this.buttonLabel?.resumeScrolling(); - this.menuLabelTitle.resumeScrolling(); - this.menuLabelSubtitle.resumeScrolling(); - this.menuSlider.resumeTransition(); - } - }); - - this.addProxyListener("CanPlay", () => { - this.updateWidgets(WidgetFlags.PANEL_CONTROLS_PLAYPAUSE | WidgetFlags.MENU_CONTROLS_PLAYPAUSE); - }); - - this.addProxyListener("CanPause", () => { - this.updateWidgets(WidgetFlags.PANEL_CONTROLS_PLAYPAUSE | WidgetFlags.MENU_CONTROLS_PLAYPAUSE); - }); - - this.addProxyListener("CanSeek", () => { - this.updateWidgets(WidgetFlags.PANEL_CONTROLS_SEEK_FORWARD | WidgetFlags.PANEL_CONTROLS_SEEK_BACKWARD); - }); - - this.addProxyListener("CanGoNext", () => { - this.updateWidgets(WidgetFlags.PANEL_CONTROLS_NEXT | WidgetFlags.MENU_CONTROLS_NEXT); - }); - - this.addProxyListener("CanGoPrevious", () => { - this.updateWidgets(WidgetFlags.PANEL_CONTROLS_PREVIOUS | WidgetFlags.MENU_CONTROLS_PREV); - }); - - this.addProxyListener("CanControl", () => { - this.updateWidgets(WidgetFlags.PANEL_CONTROLS | WidgetFlags.MENU_CONTROLS); - }); - - this.addProxyListener("Shuffle", () => { - this.updateWidgets(WidgetFlags.MENU_CONTROLS_SHUFFLE); - }); - - this.addProxyListener("LoopStatus", () => { - this.updateWidgets(WidgetFlags.MENU_CONTROLS_LOOP); - }); - - this.addProxyListener("IsPinned", () => { - this.updateWidgets(WidgetFlags.MENU_PLAYERS); - }); - - this.addProxyListener("Rate", () => { - this.menuSlider.setRate(this.playerProxy.rate); - }); - - this.playerProxy.onSeeked((position) => { - this.menuSlider.setPosition(position); - }); - } - removeProxyListeners() { - for (const [property, id] of this.changeListenerIds.entries()) { - this.playerProxy.removeListener(property, id); - } - } - addProxyListener(property, callback) { - const safeCallback = () => { - if (this.playerProxy != null) { - callback(); - } - }; - - const id = this.playerProxy.onChanged(property, safeCallback); - this.changeListenerIds.set(property, id); - } - initActions() { - const tapAction = new Clutter.TapAction(); - const swipeAction = new Clutter.SwipeAction(); - - tapAction.connect("tap", () => { - const device = tapAction.get_device(tapAction.nTouchPoints - 1); - const event = tapAction.get_last_event(tapAction.nTouchPoints - 1); - const button = event.get_button(); - - if (this.doubleTapSourceId != null) { - GLib.source_remove(this.doubleTapSourceId); - this.doubleTapSourceId = null; - this.doMouseAction(this.extension.mouseActionDouble); - return; - } - - this.doubleTapSourceId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 250, () => { - this.doubleTapSourceId = null; - - if (device.deviceType !== Clutter.InputDeviceType.POINTER_DEVICE) { - this.doMouseAction(this.extension.mouseActionLeft); - return GLib.SOURCE_REMOVE; - } - - if (button === Clutter.BUTTON_PRIMARY) { - this.doMouseAction(this.extension.mouseActionLeft); - } - - if (button === Clutter.BUTTON_MIDDLE) { - this.doMouseAction(this.extension.mouseActionMiddle); - } - - if (button === Clutter.BUTTON_SECONDARY) { - this.doMouseAction(this.extension.mouseActionRight); - } - - return GLib.SOURCE_REMOVE; - }); - }); - - swipeAction.connect("swipe", (_, __, direction) => { - if (direction === Clutter.SwipeDirection.RIGHT) { - this.doMouseAction(this.extension.mouseActionScrollUp); - } - - if (direction === Clutter.SwipeDirection.LEFT) { - this.doMouseAction(this.extension.mouseActionScrollDown); - } - }); - - this.connect("scroll-event", (_, event) => { - const direction = event.get_scroll_direction(); - - if (direction === Clutter.ScrollDirection.UP) { - this.doMouseAction(this.extension.mouseActionScrollUp); - } - - if (direction === Clutter.ScrollDirection.DOWN) { - this.doMouseAction(this.extension.mouseActionScrollDown); - } - }); - - // Tap action is added last to prevent it from blocking button press events - this.add_action(swipeAction); - this.add_action(tapAction); - } - doMouseAction(action) { - switch (action) { - case MouseActions.PLAY_PAUSE: { - this.playerProxy.playPause(); - break; - } - - case MouseActions.PLAY: { - this.playerProxy.play(); - break; - } - - case MouseActions.PAUSE: { - this.playerProxy.pause(); - break; - } - - case MouseActions.NEXT_TRACK: { - this.playerProxy.next(); - break; - } - - case MouseActions.PREVIOUS_TRACK: { - this.playerProxy.previous(); - break; - } - - case MouseActions.VOLUME_UP: { - this.playerProxy.volume = Math.min(this.playerProxy.volume + 0.05, 1); - break; - } - - case MouseActions.VOLUME_DOWN: { - this.playerProxy.volume = Math.max(this.playerProxy.volume - 0.05, 0); - break; - } - - case MouseActions.TOGGLE_LOOP: { - this.playerProxy.toggleLoop(); - break; - } - - case MouseActions.TOGGLE_SHUFFLE: { - this.playerProxy.toggleShuffle(); - break; - } - - case MouseActions.SHOW_POPUP_MENU: { - this.menu.toggle(); - break; - } - - case MouseActions.RAISE_PLAYER: { - this.playerProxy.raise(); - break; - } - - case MouseActions.QUIT_PLAYER: { - this.playerProxy.quit(); - break; - } - - case MouseActions.OPEN_PREFERENCES: { - this.extension.openPreferences(); - break; - } - - default: - break; - } - } - onDestroy() { - this.removeProxyListeners(); - this.playerProxy = null; - this.buttonIcon?.destroy(); - this.buttonLabel?.destroy(); - this.buttonControls?.destroy(); - this.buttonBox?.destroy(); - this.buttonIcon = null; - this.buttonLabel = null; - this.buttonControls = null; - this.buttonBox = null; - this.menuBox = null; - this.menuPlayers = null; - this.menuImage = null; - this.menuLabels = null; - this.menuSlider = null; - this.menuControls = null; - this.menuPlayersTextBox = null; - this.menuPlayersTextBoxIcon = null; - this.menuPlayersTextBoxLabel = null; - this.menuPlayersTextBoxPin = null; - this.menuPlayerIcons = null; - this.menuLabelTitle = null; - this.menuLabelSubtitle = null; - - if (this.doubleTapSourceId != null) { - GLib.source_remove(this.doubleTapSourceId); - this.doubleTapSourceId = null; - } - } -} -const GPanelButton = GObject.registerClass({ - GTypeName: "PanelButton", - Properties: {}, -}, PanelButton); -export default GPanelButton; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/shell/PlayerProxy.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/shell/PlayerProxy.js deleted file mode 100644 index d9b9d36f..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/shell/PlayerProxy.js +++ /dev/null @@ -1,292 +0,0 @@ -import { MPRIS_PLAYER_IFACE_NAME, MPRIS_OBJECT_PATH, LoopStatus } from "../../types/enums/common.js"; -import { errorLog, handleError } from "../../utils/common.js"; -import { createDbusProxy } from "../../utils/shell_only.js"; -import GLib from "gi://GLib"; -export default class PlayerProxy { - isPinned; - mprisProxy; - mprisPlayerProxy; - propertiesProxy; - changeListeners; - pollSourceId; - busName; - isInvalid; - constructor(busName) { - this.busName = busName; - this.isPinned = false; - this.isInvalid = true; - this.changeListeners = new Map(); - } - async initPlayer(mprisIface, mprisPlayerIface, propertiesIface) { - const mprisProxy = createDbusProxy(mprisIface, this.busName, MPRIS_OBJECT_PATH).catch(handleError); - const mprisPlayerProxy = createDbusProxy(mprisPlayerIface, this.busName, MPRIS_OBJECT_PATH).catch(handleError); - const propertiesProxy = createDbusProxy(propertiesIface, this.busName, MPRIS_OBJECT_PATH).catch(handleError); - const proxies = await Promise.all([mprisProxy, mprisPlayerProxy, propertiesProxy]).catch(handleError); - - if (proxies == null) { - errorLog("Failed to create proxies"); - return false; - } - - this.mprisProxy = proxies[0]; - this.mprisPlayerProxy = proxies[1]; - this.propertiesProxy = proxies[2]; - - this.propertiesProxy.connectSignal("PropertiesChanged", (proxy, senderName, [, changedProperties]) => { - for (const [property, value] of Object.entries(changedProperties)) { - this.callOnChangedListeners(property, value.recursiveUnpack()); - } - }); - - this.onChanged("Metadata", this.validatePlayer.bind(this)); - this.onChanged("Identity", this.validatePlayer.bind(this)); - this.onChanged("DesktopEntry", this.validatePlayer.bind(this)); - this.validatePlayer(); - this.pollTillInitialized(); - return true; - } - pinPlayer() { - this.isPinned = true; - this.callOnChangedListeners("IsPinned", this.isPinned); - } - unpinPlayer() { - this.isPinned = false; - this.callOnChangedListeners("IsPinned", this.isPinned); - } - isPlayerPinned() { - return this.isPinned; - } - /** - * Some players don't set the initial position and metadata immediately on startup - */ - pollTillInitialized() { - const timeout = 5000; - const interval = 250; - let count = Math.ceil(timeout / interval); - - this.pollSourceId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, interval, () => { - count--; - const positionPromise = this.propertiesProxy.GetAsync(MPRIS_PLAYER_IFACE_NAME, "Position"); - const metadataPromise = this.propertiesProxy.GetAsync(MPRIS_PLAYER_IFACE_NAME, "Metadata"); - - Promise.all([positionPromise, metadataPromise]) - .then(([positionVariant, metadataVariant]) => { - const unpackedPosition = positionVariant[0].recursiveUnpack(); - const unpackedMetadata = metadataVariant[0].recursiveUnpack(); - - if (unpackedPosition > 0 && unpackedMetadata["mpris:length"] > 0) { - this.mprisPlayerProxy.set_cached_property("Position", positionVariant[0]); - this.mprisPlayerProxy.set_cached_property("Metadata", metadataVariant[0]); - this.callOnChangedListeners("Metadata", unpackedMetadata); - GLib.source_remove(this.pollSourceId); - } - else if (count <= 0) { - GLib.source_remove(this.pollSourceId); - } - }) - .catch(() => { - GLib.source_remove(this.pollSourceId); - }); - - return GLib.SOURCE_CONTINUE; - }); - } - validatePlayer() { - const isValidName = this.mprisProxy.Identity || this.mprisProxy.DesktopEntry; - const isValidMetadata = this.metadata && this.metadata["xesam:title"]; - this.isInvalid = !isValidName || !isValidMetadata; - this.callOnChangedListeners("IsInvalid", this.isInvalid); - } - unpackMetadata(metadata) { - const unpackedMetadata = {}; - - for (const [key, value] of Object.entries(metadata)) { - unpackedMetadata[key] = value.recursiveUnpack(); - } - - return unpackedMetadata; - } - callOnChangedListeners(property, value) { - const listeners = this.changeListeners.get(property); - - if (listeners == null) { - return; - } - - for (const listener of listeners) { - try { - listener(value); - } - catch (error) { - errorLog(`Failed to call listener for property ${property}:`, error); - } - } - } - get playbackStatus() { - return this.mprisPlayerProxy.PlaybackStatus; - } - get loopStatus() { - return this.mprisPlayerProxy.LoopStatus; - } - get rate() { - return this.mprisPlayerProxy.Rate; - } - get shuffle() { - return this.mprisPlayerProxy.Shuffle; - } - get metadata() { - return this.unpackMetadata(this.mprisPlayerProxy.Metadata); - } - get volume() { - return this.mprisPlayerProxy.Volume; - } - get position() { - return this.propertiesProxy - .GetAsync(MPRIS_PLAYER_IFACE_NAME, "Position") - .then((result) => { - return result[0].get_int64(); - }) - .catch(() => { - return null; - }); - } - get minimumRate() { - return this.mprisPlayerProxy.MinimumRate; - } - get maximumRate() { - return this.mprisPlayerProxy.MaximumRate; - } - get canGoNext() { - return this.mprisPlayerProxy.CanGoNext; - } - get canGoPrevious() { - return this.mprisPlayerProxy.CanGoPrevious; - } - get canPlay() { - return this.mprisPlayerProxy.CanPlay; - } - get canPause() { - return this.mprisPlayerProxy.CanPause; - } - get canSeek() { - return this.mprisPlayerProxy.CanSeek; - } - get canControl() { - return this.mprisPlayerProxy.CanControl; - } - get canQuit() { - return this.mprisProxy.CanQuit; - } - get canRaise() { - return this.mprisProxy.CanRaise; - } - get canSetFullscreen() { - return this.mprisProxy.CanSetFullscreen; - } - get desktopEntry() { - return this.mprisProxy.DesktopEntry; - } - get hasTrackList() { - return this.mprisProxy.HasTrackList; - } - get identity() { - return this.mprisProxy.Identity; - } - get supportedMimeTypes() { - return this.mprisProxy.SupportedMimeTypes; - } - get supportedUriSchemes() { - return this.mprisProxy.SupportedUriSchemes; - } - set loopStatus(loopStatus) { - this.mprisPlayerProxy.LoopStatus = loopStatus; - } - set rate(rate) { - this.mprisPlayerProxy.Rate = rate; - } - set shuffle(shuffle) { - this.mprisPlayerProxy.Shuffle = shuffle; - } - set volume(volume) { - this.mprisPlayerProxy.Volume = volume; - } - set fullscreen(fullscreen) { - this.mprisProxy.Fullscreen = fullscreen; - } - async next() { - await this.mprisPlayerProxy.NextAsync().catch(handleError); - } - async previous() { - await this.mprisPlayerProxy.PreviousAsync().catch(handleError); - } - async pause() { - await this.mprisPlayerProxy.PauseAsync().catch(handleError); - } - async playPause() { - await this.mprisPlayerProxy.PlayPauseAsync().catch(handleError); - } - async stop() { - await this.mprisPlayerProxy.StopAsync().catch(handleError); - } - async play() { - await this.mprisPlayerProxy.PlayAsync().catch(handleError); - } - async seek(offset) { - await this.mprisPlayerProxy.SeekAsync(offset).catch(handleError); - } - async setPosition(trackId, position) { - await this.mprisPlayerProxy.SetPositionAsync(trackId, position).catch(handleError); - } - async openUri(uri) { - await this.mprisPlayerProxy.OpenUriAsync(uri).catch(handleError); - } - async raise() { - await this.mprisProxy.RaiseAsync().catch(handleError); - } - async quit() { - await this.mprisProxy.QuitAsync().catch(handleError); - } - toggleLoop() { - const loopStatuses = Object.values(LoopStatus); - const currentIndex = loopStatuses.findIndex((loop) => loop === this.loopStatus); - const nextIndex = (currentIndex + 1 + loopStatuses.length) % loopStatuses.length; - this.loopStatus = loopStatuses[nextIndex]; - } - toggleShuffle() { - this.shuffle = !this.shuffle; - } - onSeeked(callback) { - const signalId = this.mprisPlayerProxy.connectSignal("Seeked", () => { - this.position.then(callback); - }); - return this.mprisPlayerProxy.disconnectSignal.bind(this.mprisPlayerProxy, signalId); - } - onChanged(property, callback) { - const listeners = this.changeListeners.get(property); - let id; - - if (listeners == null) { - id = 0; - this.changeListeners.set(property, [callback]); - } - else { - id = listeners.push(callback); - } - - return id; - } - removeListener(property, id) { - const listeners = this.changeListeners.get(property); - - if (listeners == null) { - return; - } - - listeners.splice(id, 1); - } - onDestroy() { - if (this.pollSourceId != null) { - GLib.source_remove(this.pollSourceId); - } - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/shell/ScrollingLabel.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/shell/ScrollingLabel.js deleted file mode 100644 index 52e9c417..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/helpers/shell/ScrollingLabel.js +++ /dev/null @@ -1,134 +0,0 @@ -import Clutter from "gi://Clutter"; -import GObject from "gi://GObject"; -import Pango from "gi://Pango"; -import St from "gi://St"; -const SCROLL_ANIMATION_SPEED = 0.04; -class ScrollingLabel extends St.ScrollView { - label; - box; - onAdjustmentChangedId; - onShowChangedId; - isScrolling; - isFixedWidth; - initPaused; - labelWidth; - direction; - transition; - constructor(params) { - super({ - hscrollbarPolicy: St.PolicyType.NEVER, - vscrollbarPolicy: St.PolicyType.NEVER, - }); - - const defaultParams = { - direction: Clutter.TimelineDirection.FORWARD, - isFixedWidth: true, - }; - const { text, width, direction, isFixedWidth, isScrolling, initPaused } = { - ...defaultParams, - ...params, - }; - this.isScrolling = isScrolling; - this.isFixedWidth = isFixedWidth; - this.initPaused = initPaused; - this.labelWidth = width; - this.direction = direction; - - this.box = new St.BoxLayout({ - xExpand: true, - yExpand: true, - }); - - this.label = new St.Label({ - text, - yAlign: Clutter.ActorAlign.CENTER, - xAlign: Clutter.ActorAlign.START, - }); - - this.onShowChangedId = this.label.connect("show", this.onShowChanged.bind(this)); - this.box.add_child(this.label); - - if (Clutter.Container === undefined) { - this.add_child(this.box); - } - else { - this.add_actor(this.box); - } - } - pauseScrolling() { - this.transition?.pause(); - this.initPaused = true; - } - resumeScrolling() { - this.transition?.start(); - this.initPaused = false; - } - initScrolling() { - const adjustment = this.hscroll.adjustment; - const origText = this.label.text; - this.onAdjustmentChangedId = adjustment.connect("changed", this.onAdjustmentChanged.bind(this, adjustment, origText)); - this.label.text = `${origText} `; - this.label.clutterText.ellipsize = Pango.EllipsizeMode.NONE; - } - onAdjustmentChanged(adjustment, origText) { - if (adjustment.upper <= adjustment.pageSize) { - return; - } - - const initial = adjustment.value; - const final = adjustment.upper; - const duration = adjustment.upper / SCROLL_ANIMATION_SPEED; - const pspec = adjustment.find_property("value"); - const interval = new Clutter.Interval({ - valueType: pspec.value_type, - initial, - final, - }); - - this.transition = new Clutter.PropertyTransition({ - propertyName: "value", - progressMode: Clutter.AnimationMode.LINEAR, - direction: this.direction, - repeatCount: -1, - duration, - interval, - }); - - this.label.text = `${origText} ${origText}`; - adjustment.add_transition("scroll", this.transition); - adjustment.disconnect(this.onAdjustmentChangedId); - - if (this.initPaused) { - this.transition.pause(); - } - } - onShowChanged() { - if (this.label.visible === false) { - return; - } - - const isLabelWider = this.label.width > this.labelWidth && this.labelWidth > 0; - - if (isLabelWider && this.isScrolling) { - this.initScrolling(); - } - - if (this.isFixedWidth && this.labelWidth > 0) { - this.box.width = this.labelWidth; - this.label.xAlign = Clutter.ActorAlign.CENTER; - this.label.xExpand = true; - } - else if (isLabelWider) { - this.box.width = Math.min(this.label.width, this.labelWidth); - } - - this.label.disconnect(this.onShowChangedId); - } - vfunc_scroll_event() { - return Clutter.EVENT_PROPAGATE; - } -} -const GScrollingLabel = GObject.registerClass({ - GTypeName: "ScrollingLabel", -}, ScrollingLabel); -export default GScrollingLabel; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/locale/ca/LC_MESSAGES/mediacontrols@cliffniff.github.com.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/locale/ca/LC_MESSAGES/mediacontrols@cliffniff.github.com.mo deleted file mode 100644 index 32295d52..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/locale/ca/LC_MESSAGES/mediacontrols@cliffniff.github.com.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/locale/cs/LC_MESSAGES/mediacontrols@cliffniff.github.com.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/locale/cs/LC_MESSAGES/mediacontrols@cliffniff.github.com.mo deleted file mode 100644 index eb38c403..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/locale/cs/LC_MESSAGES/mediacontrols@cliffniff.github.com.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/locale/de/LC_MESSAGES/mediacontrols@cliffniff.github.com.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/locale/de/LC_MESSAGES/mediacontrols@cliffniff.github.com.mo deleted file mode 100644 index 2c806ff0..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/locale/de/LC_MESSAGES/mediacontrols@cliffniff.github.com.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/locale/es/LC_MESSAGES/mediacontrols@cliffniff.github.com.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/locale/es/LC_MESSAGES/mediacontrols@cliffniff.github.com.mo deleted file mode 100644 index 96d22c2d..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/locale/es/LC_MESSAGES/mediacontrols@cliffniff.github.com.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/locale/pt_BR/LC_MESSAGES/mediacontrols@cliffniff.github.com.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/locale/pt_BR/LC_MESSAGES/mediacontrols@cliffniff.github.com.mo deleted file mode 100644 index f19cd21e..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/locale/pt_BR/LC_MESSAGES/mediacontrols@cliffniff.github.com.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/org.gnome.shell.extensions.mediacontrols.gresource b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/org.gnome.shell.extensions.mediacontrols.gresource deleted file mode 100644 index 82318d00..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/org.gnome.shell.extensions.mediacontrols.gresource and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/prefs.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/prefs.js deleted file mode 100644 index dde15d1a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/prefs.js +++ /dev/null @@ -1,326 +0,0 @@ -import Adw from "gi://Adw"; -import GLib from "gi://GLib"; -import Gdk from "gi://Gdk"; -import Gio from "gi://Gio"; -import Gtk from "gi://Gtk"; -import GObject from "gi://GObject"; -import { ExtensionPreferences, gettext as _ } from "resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js"; -import BlacklistedPlayersOrig from "./helpers/prefs/BlacklistedPlayers.js"; -import ElementListOrig from "./helpers/prefs/ElementList.js"; -import LabelListOrig from "./helpers/prefs/LabelList.js"; -import AppChooserorig from "./helpers/prefs/AppChooser.js"; -import { isValidBinding, isValidAccelerator } from "./utils/prefs_only.js"; -import { handleError } from "./utils/common.js"; -export let BlacklistedPlayers; -export let ElementList; -export let LabelList; -export let AppChooser; -Gio._promisify(Gio.File.prototype, "trash_async", "trash_finish"); -Gio._promisify(Gio.File.prototype, "query_info_async", "query_info_finish"); -Gio._promisify(Gio.File.prototype, "enumerate_children_async", "enumerate_children_finish"); -Gio._promisify(Gio.FileEnumerator.prototype, "next_files_async", "next_files_finish"); - -export default class MediaControlsPreferences extends ExtensionPreferences { - window; - settings; - builder; - generalPage; - panelPage; - positionsPage; - shortcutsPage; - otherPage; - fillPreferencesWindow(window) { - const resourcePath = GLib.build_filenamev([this.path, "org.gnome.shell.extensions.mediacontrols.gresource"]); - Gio.resources_register(Gio.resource_load(resourcePath)); - - if (AppChooser == null) { - AppChooser = GObject.registerClass({ - GTypeName: "AppChooser", - Template: "resource:///org/gnome/shell/extensions/mediacontrols/ui/app-chooser.ui", - InternalChildren: ["list-box", "select-btn", "cancel-btn"], - }, AppChooserorig); - } - - if (BlacklistedPlayers == null) { - BlacklistedPlayers = GObject.registerClass({ - GTypeName: "BlacklistedPlayers", - Template: "resource:///org/gnome/shell/extensions/mediacontrols/ui/blacklisted-players.ui", - Properties: { - players: GObject.ParamSpec.jsobject("players", "Blacklisted players", "Blacklisted players", GObject.ParamFlags.READABLE), - }, - InternalChildren: ["list-box", "add-btn"], - }, BlacklistedPlayersOrig); - } - - if (LabelList == null) { - LabelList = GObject.registerClass({ - GTypeName: "LabelList", - Template: "resource:///org/gnome/shell/extensions/mediacontrols/ui/label-list.ui", - InternalChildren: ["list-box", "add-item-btn", "add-text-btn"], - Properties: { - labels: GObject.ParamSpec.jsobject("labels", "Labels", "Labels", GObject.ParamFlags.READABLE), - }, - }, LabelListOrig); - } - - if (ElementList == null) { - ElementList = GObject.registerClass({ - GTypeName: "ElementList", - Template: "resource:///org/gnome/shell/extensions/mediacontrols/ui/element-list.ui", - InternalChildren: ["list-box", "icon-row", "label-row", "controls-row"], - Properties: { - elements: GObject.ParamSpec.jsobject("elements", "Elements", "Elements", GObject.ParamFlags.READABLE), - }, - }, ElementListOrig); - } - - GObject.type_ensure(AppChooser.$gtype); - GObject.type_ensure(BlacklistedPlayers.$gtype); - GObject.type_ensure(LabelList.$gtype); - GObject.type_ensure(ElementList.$gtype); - this.window = window; - this.settings = this.getSettings(); - this.builder = Gtk.Builder.new_from_resource("/org/gnome/shell/extensions/mediacontrols/ui/prefs.ui"); - this.generalPage = this.builder.get_object("page-general"); - this.panelPage = this.builder.get_object("page-panel"); - this.positionsPage = this.builder.get_object("page-positions"); - this.shortcutsPage = this.builder.get_object("page-shortcuts"); - this.otherPage = this.builder.get_object("page-other"); - this.window.add(this.generalPage); - this.window.add(this.panelPage); - this.window.add(this.positionsPage); - this.window.add(this.shortcutsPage); - this.window.add(this.otherPage); - this.initWidgets(); - this.bindSettings(); - - this.window.connect("close-request", () => { - this.window = null; - this.settings = null; - this.builder = null; - this.generalPage = null; - this.panelPage = null; - this.positionsPage = null; - this.shortcutsPage = null; - this.otherPage = null; - }); - } - initWidgets() { - const elementsOrder = this.settings.get_strv("elements-order"); - const elementsGroup = this.builder.get_object("gp-positions-elements"); - elementsGroup.initElements(elementsOrder); - - elementsGroup.connect("notify::elements", () => { - this.settings.set_strv("elements-order", elementsGroup.elements); - }); - - const labelsGroup = this.builder.get_object("gp-positions-labels"); - const labelsOrder = this.settings.get_strv("labels-order"); - labelsGroup.initLabels(labelsOrder); - - labelsGroup.connect("notify::labels", () => { - this.settings.set_strv("labels-order", labelsGroup.labels); - }); - - const shortcutRow = this.builder.get_object("row-shortcuts-popup"); - const shortcutLabel = this.builder.get_object("sl-shortcuts-popup"); - const shortcutEditorWindow = this.builder.get_object("win-shortcut-editor"); - const shortcutEditorLabel = this.builder.get_object("sl-shortcut-editor"); - - shortcutRow.connect("activated", () => { - const controller = new Gtk.EventControllerKey(); - shortcutEditorWindow.add_controller(controller); - const currentShortcut = this.settings.get_strv("mediacontrols-show-popup-menu"); - shortcutEditorLabel.accelerator = currentShortcut[0]; - - controller.connect("key-pressed", (_, keyval, keycode, state) => { - let mask = state & Gtk.accelerator_get_default_mod_mask(); - mask &= ~Gdk.ModifierType.LOCK_MASK; - - if (!mask && keyval === Gdk.KEY_Escape) { - shortcutEditorWindow.close(); - return Gdk.EVENT_STOP; - } - - if (!mask && keyval === Gdk.KEY_BackSpace) { - shortcutEditorLabel.accelerator = ""; - return Gdk.EVENT_STOP; - } - - if (!mask && keyval === Gdk.KEY_Return) { - const shortcut = shortcutEditorLabel.accelerator; - shortcutLabel.accelerator = shortcut; - this.settings.set_strv("mediacontrols-show-popup-menu", [shortcut]); - shortcutEditorWindow.close(); - return Gdk.EVENT_STOP; - } - - if (isValidBinding(mask, keycode, keyval) && isValidAccelerator(mask, keyval)) { - shortcutEditorLabel.accelerator = Gtk.accelerator_name_with_keycode(null, keyval, keycode, mask); - } - - return Gdk.EVENT_STOP; - }); - - shortcutEditorWindow.present(); - }); - - const cacheClearRow = this.builder.get_object("row-other-cache-clear"); - const cacheClearBtn = this.builder.get_object("btn-other-cache-clear"); - - cacheClearBtn.connect("clicked", () => { - const dialog = Adw.MessageDialog.new(this.window, "", _("Are you sure you want to clear the cache?")); - dialog.add_response("cancel", _("Cancel")); - dialog.add_response("clear", _("Clear cache")); - dialog.set_response_appearance("clear", Adw.ResponseAppearance.DESTRUCTIVE); - - dialog.connect("response", (self, response) => { - if (response === "cancel") - return; - - this.clearCache().then(() => { - cacheClearRow.subtitle = _("Cache size: %s").format(GLib.format_size(0)); - }); - }); - - dialog.present(); - }); - - this.getCacheSize().then((size) => { - const sizeReadable = GLib.format_size(size); - cacheClearRow.subtitle = _("Cache size: %s").format(sizeReadable); - }); - - const blacklistedGrp = this.builder.get_object("gp-other-blacklist"); - const blacklistedPlayers = this.settings.get_strv("blacklisted-players"); - blacklistedGrp.initPlayers(blacklistedPlayers); - - blacklistedGrp.connect("notify::players", () => { - this.settings.set_strv("blacklisted-players", blacklistedGrp.players); - }); - } - bindSettings() { - this.bindSetting("label-width", "sr-general-label-width", "value"); - this.bindSetting("fixed-label-width", "sr-general-label-fixed", "active"); - this.bindSetting("scroll-labels", "sr-general-scroll-labels", "active"); - this.bindSetting("hide-media-notification", "sr-general-hide-media-notification", "active"); - this.bindSetting("show-label", "sr-panel-show-label", "active"); - this.bindSetting("show-control-icons", "sr-panel-show-controls", "active"); - this.bindSetting("show-control-icons-play", "sr-panel-show-play", "active"); - this.bindSetting("show-control-icons-next", "sr-panel-show-next", "active"); - this.bindSetting("show-control-icons-previous", "sr-panel-show-prev", "active"); - this.bindSetting("show-control-icons-seek-forward", "sr-panel-show-seek-forward", "active"); - this.bindSetting("show-control-icons-seek-backward", "sr-panel-show-seek-backward", "active"); - this.bindSetting("show-player-icon", "sr-panel-show-player", "active"); - this.bindSetting("colored-player-icon", "sr-panel-colored-player", "active"); - this.bindSetting("extension-position", "cr-positions-extension-position", "selected"); - this.bindSetting("extension-index", "sr-positions-extension-index", "value"); - this.bindSetting("mediacontrols-show-popup-menu", "sl-shortcuts-popup", "accelerator"); - this.bindSetting("mouse-action-left", "cr-shortcuts-mouse-left", "selected"); - this.bindSetting("mouse-action-middle", "cr-shortcuts-mouse-middle", "selected"); - this.bindSetting("mouse-action-right", "cr-shortcuts-mouse-right", "selected"); - this.bindSetting("mouse-action-double", "cr-shortcuts-mouse-double", "selected"); - this.bindSetting("mouse-action-scroll-up", "cr-shortcuts-mouse-scroll-up", "selected"); - this.bindSetting("mouse-action-scroll-down", "cr-shortcuts-mouse-scroll-down", "selected"); - this.bindSetting("cache-art", "sr-other-cache", "active"); - } - bindSetting(key, widgetName, property) { - if (property === "selected") { - const widget = this.builder.get_object(widgetName); - widget[property] = this.settings.get_enum(key); - - widget.connect(`notify::${property}`, () => { - this.settings.set_enum(key, widget[property]); - }); - - this.settings.connect(`changed::${key}`, () => { - widget[property] = this.settings.get_enum(key); - }); - } - else if (property === "accelerator") { - const widget = this.builder.get_object(widgetName); - widget[property] = this.settings.get_strv(key)[0]; - - widget.connect(`notify::${property}`, () => { - this.settings.set_strv(key, [widget[property]]); - }); - - this.settings.connect(`changed::${key}`, () => { - widget[property] = this.settings.get_strv(key)[0]; - }); - } - else { - const widget = this.builder.get_object(widgetName); - widget[property] = this.settings.get_value(key).recursiveUnpack(); - const bindingFlags = Gio.SettingsBindFlags.DEFAULT | Gio.SettingsBindFlags.NO_SENSITIVITY; - this.settings.bind(key, widget, property, bindingFlags); - } - } - sendToast(title) { - const toast = new Adw.Toast({ title, timeout: 3 }); - this.window.add_toast(toast); - } - async clearCache() { - const cacheDir = GLib.build_pathv("/", [GLib.get_user_cache_dir(), "mediacontrols@cliffniff.github.com"]); - - if (GLib.file_test(cacheDir, GLib.FileTest.EXISTS)) { - const folder = Gio.File.new_for_path(cacheDir); - const success = await folder.trash_async(null, null).catch(handleError); - - if (success) { - this.sendToast(_("Cache cleared successfully!")); - } - else { - this.sendToast(_("Failed to clear cache!")); - } - } - } - async getCacheSize() { - const cacheDir = GLib.build_pathv("/", [GLib.get_user_cache_dir(), "mediacontrols@cliffniff.github.com"]); - - if (GLib.file_test(cacheDir, GLib.FileTest.EXISTS)) { - const folder = Gio.File.new_for_path(cacheDir); - const enumerator = await folder - .enumerate_children_async("standard::*", Gio.FileQueryInfoFlags.NONE, 0, null) - .catch(handleError); - - if (enumerator == null) { - return 0; - } - - let size = 0; - let retries = 0; - - while (true) { - const fileInfos = await enumerator.next_files_async(10, null, null).catch(handleError); - - if (fileInfos == null) { - if (retries < 3) { - retries++; - continue; - } - else { - break; - } - } - - if (fileInfos.length === 0) { - break; - } - - for (const fileInfo of fileInfos) { - const file = enumerator.get_child(fileInfo); - const info = await file - .query_info_async("standard::size", Gio.FileQueryInfoFlags.NONE, 0, null) - .catch(handleError); - const fileSize = info?.get_size() ?? 0; - size += fileSize; - } - } - - return size; - } - - return 0; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/private_metadata.json b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/private_metadata.json deleted file mode 100644 index b79fbbef..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/private_metadata.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "_generated": "Generated by SweetTooth, do not edit", - "description": "Show controls and information of the currently playing media in the panel.", - "gettext-domain": "mediacontrols@cliffniff.github.com", - "name": "Media Controls", - "settings-schema": "org.gnome.shell.extensions.mediacontrols", - "shell-version": [ - "45", - "46", - "47" - ], - "url": "https://github.com/cliffniff/media-controls", - "uuid": "mediacontrols@cliffniff.github.com", - "version": 37, - "version-name": "2.0.2" -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/schemas/gschemas.compiled b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/schemas/gschemas.compiled deleted file mode 100644 index 67bd5f0b..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/schemas/gschemas.compiled and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/schemas/org.gnome.shell.extensions.mediacontrols.gschema.xml b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/schemas/org.gnome.shell.extensions.mediacontrols.gschema.xml deleted file mode 100644 index bfd2debb..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/schemas/org.gnome.shell.extensions.mediacontrols.gschema.xml +++ /dev/null @@ -1,104 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<schemalist> - <enum id="org.gnome.shell.extensions.mediacontrols.mouseactions"> - <value nick="NONE" value="0" /> - <value nick="PLAY_PAUSE" value="1" /> - <value nick="PLAY" value="2" /> - <value nick="pAUSE" value="3" /> - <value nick="NEXT_TRACK" value="4" /> - <value nick="PREVIOUS_TRACK" value="5" /> - <value nick="VOLUME_UP" value="6" /> - <value nick="VOLUME_DOWN" value="7" /> - <value nick="TOGGLE_LOOP" value="8" /> - <value nick="TOGGLE_SHUFFLE" value="9" /> - <value nick="SHOW_POPUP_MENU" value="10" /> - <value nick="RAISE_PLAYER" value="11" /> - <value nick="QUIT_PLAYER" value="12" /> - <value nick="OPEN_PREFERENCES" value="13" /> - </enum> - <enum id="org.gnome.shell.extensions.mediacontrols.positions"> - <value nick="Left" value="0" /> - <value nick="Center" value="1" /> - <value nick="Right" value="2" /> - </enum> - <schema id="org.gnome.shell.extensions.mediacontrols" path="/org/gnome/shell/extensions/mediacontrols/"> - <key name="label-width" type="u"> - <default>200</default> - </key> - <key name="fixed-label-width" type="b"> - <default>false</default> - </key> - <key name="scroll-labels" type="b"> - <default>true</default> - </key> - <key name="hide-media-notification" type="b"> - <default>true</default> - </key> - <key name="show-label" type="b"> - <default>true</default> - </key> - <key name="show-player-icon" type="b"> - <default>true</default> - </key> - <key name="show-control-icons" type="b"> - <default>true</default> - </key> - <key name="show-control-icons-play" type="b"> - <default>true</default> - </key> - <key name="show-control-icons-next" type="b"> - <default>true</default> - </key> - <key name="show-control-icons-previous" type="b"> - <default>true</default> - </key> - <key name="show-control-icons-seek-forward" type="b"> - <default>true</default> - </key> - <key name="show-control-icons-seek-backward" type="b"> - <default>true</default> - </key> - <key name="colored-player-icon" type="b"> - <default>true</default> - </key> - <key name="extension-position" enum="org.gnome.shell.extensions.mediacontrols.positions"> - <default>'Center'</default> - </key> - <key name="extension-index" type="u"> - <default>0</default> - </key> - <key name="elements-order" type="as"> - <default>['ICON', 'LABEL', 'CONTROLS']</default> - </key> - <key name="labels-order" type="as"> - <default>['TITLE', '-', 'ARTIST']</default> - </key> - <key name="mouse-action-left" enum="org.gnome.shell.extensions.mediacontrols.mouseactions"> - <default>'SHOW_POPUP_MENU'</default> - </key> - <key name="mouse-action-middle" enum="org.gnome.shell.extensions.mediacontrols.mouseactions"> - <default>'OPEN_PREFERENCES'</default> - </key> - <key name="mouse-action-right" enum="org.gnome.shell.extensions.mediacontrols.mouseactions"> - <default>'RAISE_PLAYER'</default> - </key> - <key name="mouse-action-double" enum="org.gnome.shell.extensions.mediacontrols.mouseactions"> - <default>'NONE'</default> - </key> - <key name="mouse-action-scroll-up" enum="org.gnome.shell.extensions.mediacontrols.mouseactions"> - <default>'VOLUME_UP'</default> - </key> - <key name="mouse-action-scroll-down" enum="org.gnome.shell.extensions.mediacontrols.mouseactions"> - <default>'VOLUME_DOWN'</default> - </key> - <key name="cache-art" type="b"> - <default>true</default> - </key> - <key name="blacklisted-players" type="as"> - <default>[]</default> - </key> - <key name="mediacontrols-show-popup-menu" type="as"> - <default><![CDATA[['']]]></default> - </key> - </schema> -</schemalist> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/stylesheet.css b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/stylesheet.css deleted file mode 100644 index 4dcc2f03..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/stylesheet.css +++ /dev/null @@ -1,100 +0,0 @@ -.colored-icon { - -st-icon-style: requested; -} - -.symbolic-icon { - -st-icon-style: symbolic; -} - -.no-margin { - margin: 0; -} - -.no-padding { - padding: 0; -} - -.panel-button { - padding-left: 6px; - padding-right: 6px; -} - -.panel-button-box > * { - padding-left: 6px; - padding-right: 6px; -} - -.panel-button-box > *:last-child:not(.controls-box) { - padding-left: 6px; - padding-right: 6px; -} - -.panel-controls-box { - padding-left: 0px; - padding-right: 0px; -} - -.panel-controls-box > * { - padding-left: 6px; - padding-right: 6px; -} - -.popup-menu-container { - padding: 12px; -} - -.popup-menu-box { - border-width: 0px; -} - -.popup-menu-box > * { - margin-top: 6px; - margin-bottom: 6px; -} - -.popup-menu-player-icons { - margin-top: 6px; - border-radius: 6px; -} - -.popup-menu-player-icons-icon { - padding: 6px; - background-color: rgba(0, 0, 0, 0.125); - transition-property: background-color; - transition-duration: 200ms; -} - -.popup-menu-player-icons-icon-last { - border-radius: 0px 6px 6px 0px; -} - -.popup-menu-player-icons-icon-first { - border-radius: 6px 0px 0px 6px; -} - -.popup-menu-player-icons-icon:hover { - background-color: rgba(160, 160, 160, 0.25); -} - -.popup-menu-player-icons-icon-active { - background-color: rgba(160, 160, 160, 0.25); -} - -.popup-menu-player-label { - font-size: small; - margin-right: 6px; - margin-left: 6px; -} - -.popup-menu-label-title { - font-size: large; -} - -.popup-menu-control-icon { - padding: 6px; - border-radius: 99px; -} - -.popup-menu-control-icon:hover { - background-color: rgba(160, 160, 160, 0.25); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/types/enums/common.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/types/enums/common.js deleted file mode 100644 index 3fb076b4..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/types/enums/common.js +++ /dev/null @@ -1,73 +0,0 @@ -export const DBUS_IFACE_NAME = "org.freedesktop.DBus"; -export const MPRIS_OBJECT_PATH = "/org/mpris/MediaPlayer2"; -export const DBUS_OBJECT_PATH = "/org/freedesktop/DBus"; -export const MPRIS_IFACE_NAME = "org.mpris.MediaPlayer2"; -export const DBUS_PROPERTIES_IFACE_NAME = "org.freedesktop.DBus.Properties"; -export const MPRIS_PLAYER_IFACE_NAME = "org.mpris.MediaPlayer2.Player"; -export const PlaybackStatus = { - PLAYING: "Playing", - PAUSED: "Paused", - STOPPED: "Stopped", -}; -export const LoopStatus = { - NONE: "None", - TRACK: "Track", - PLAYLIST: "Playlist", -}; -export const ExtensionPositions = { - LEFT: "left", - CENTER: "center", - RIGHT: "right", -}; -export const LabelTypes = { - ARTIST: "Artist", - TITLE: "Title", - ALBUM: "Album", - DISC_NUMBER: "Disc Number", - TRACK_NUMBER: "Track Number", -}; -export const PanelElements = { - ICON: 0, - LABEL: 1, - CONTROLS: 2, -}; -export const MouseActions = { - NONE: 0, - PLAY_PAUSE: 1, - PLAY: 2, - PAUSE: 3, - NEXT_TRACK: 4, - PREVIOUS_TRACK: 5, - VOLUME_UP: 6, - VOLUME_DOWN: 7, - TOGGLE_LOOP: 8, - TOGGLE_SHUFFLE: 9, - SHOW_POPUP_MENU: 10, - RAISE_PLAYER: 11, - QUIT_PLAYER: 12, - OPEN_PREFERENCES: 13, -}; -export const WidgetFlags = { - PANEL_ICON: 1 << 0, - PANEL_LABEL: 1 << 1, - PANEL_CONTROLS_SEEK_BACKWARD: 1 << 2, - PANEL_CONTROLS_PREVIOUS: 1 << 3, - PANEL_CONTROLS_PLAYPAUSE: 1 << 4, - PANEL_CONTROLS_NEXT: 1 << 5, - PANEL_CONTROLS_SEEK_FORWARD: 1 << 6, - PANEL_CONTROLS: (1 << 2) | (1 << 3) | (1 << 4) | (1 << 5) | (1 << 6), - PANEL: (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4) | (1 << 5) | (1 << 6), - PANEL_NO_REPLACE: 1 << 7, - MENU_PLAYERS: 1 << 8, - MENU_IMAGE: 1 << 9, - MENU_LABELS: 1 << 10, - MENU_SLIDER: 1 << 11, - MENU_CONTROLS_LOOP: 1 << 12, - MENU_CONTROLS_PREV: 1 << 13, - MENU_CONTROLS_PLAYPAUSE: 1 << 14, - MENU_CONTROLS_NEXT: 1 << 15, - MENU_CONTROLS_SHUFFLE: 1 << 16, - MENU_CONTROLS: (1 << 12) | (1 << 13) | (1 << 14) | (1 << 15) | (1 << 16), - MENU: (1 << 8) | (1 << 9) | (1 << 10) | (1 << 11) | (1 << 12) | (1 << 13) | (1 << 14) | (1 << 15) | (1 << 16), - ALL: ~(-1 << 17), -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/types/enums/shell_only.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/types/enums/shell_only.js deleted file mode 100644 index 748e0e48..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/types/enums/shell_only.js +++ /dev/null @@ -1,131 +0,0 @@ -import Clutter from "gi://Clutter"; -export const ControlIconOptions = { - LOOP_NONE: { - name: "loop", - iconName: "media-playlist-repeat-symbolic", - menuProps: { - index: 0, - options: { - xExpand: false, - xAlign: Clutter.ActorAlign.START, - opacity: 160, - }, - }, - }, - LOOP_TRACK: { - name: "loop", - iconName: "media-playlist-repeat-song-symbolic", - menuProps: { - index: 0, - options: { - xExpand: false, - xAlign: Clutter.ActorAlign.START, - }, - }, - }, - LOOP_PLAYLIST: { - name: "loop", - iconName: "media-playlist-repeat-symbolic", - menuProps: { - index: 0, - options: { - xExpand: false, - xAlign: Clutter.ActorAlign.START, - }, - }, - }, - SEEK_BACKWARD: { - name: "seekbackward", - iconName: "media-seek-backward-symbolic", - panelProps: { - index: 0, - }, - }, - PREVIOUS: { - name: "previous", - iconName: "media-skip-backward-symbolic", - menuProps: { - index: 1, - options: { - xExpand: true, - xAlign: Clutter.ActorAlign.END, - marginRight: 5, - }, - }, - panelProps: { - index: 1, - }, - }, - PLAY: { - name: "playpause", - iconName: "media-playback-start-symbolic", - menuProps: { - index: 2, - options: { - xExpand: false, - xAlign: Clutter.ActorAlign.CENTER, - }, - }, - panelProps: { - index: 2, - }, - }, - PAUSE: { - name: "playpause", - iconName: "media-playback-pause-symbolic", - menuProps: { - index: 2, - options: { - xExpand: false, - xAlign: Clutter.ActorAlign.CENTER, - }, - }, - panelProps: { - index: 2, - }, - }, - NEXT: { - name: "next", - iconName: "media-skip-forward-symbolic", - menuProps: { - index: 3, - options: { - xExpand: true, - xAlign: Clutter.ActorAlign.START, - marginLeft: 5, - }, - }, - panelProps: { - index: 3, - }, - }, - SEEK_FORWARD: { - name: "seekforward", - iconName: "media-seek-forward-symbolic", - panelProps: { - index: 4, - }, - }, - SHUFFLE_ON: { - name: "shuffle", - iconName: "media-playlist-shuffle-symbolic", - menuProps: { - index: 4, - options: { - xExpand: false, - xAlign: Clutter.ActorAlign.END, - }, - }, - }, - SHUFFLE_OFF: { - name: "shuffle", - iconName: "media-playlist-no-shuffle-symbolic", - menuProps: { - index: 4, - options: { - xExpand: false, - xAlign: Clutter.ActorAlign.END, - }, - }, - }, -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/utils/common.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/utils/common.js deleted file mode 100644 index 9b9a7985..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/utils/common.js +++ /dev/null @@ -1,40 +0,0 @@ -const DEBUG = false; - -export const enumValueByIndex = (enumObject, index) => { - return Object.values(enumObject)[index]; -}; - -export const enumKeyByValue = (enumObject, value) => { - return Object.keys(enumObject).find((key) => enumObject[key] === value); -}; - -export const debugLog = (...args) => { - if (DEBUG) { - console.log("[Media Controls]", ...args); - } -}; - -export const errorLog = (...args) => { - console.error("[Media Controls]", "Error:", ...args); -}; - -export const handleError = (error) => { - errorLog(error); - return null; -}; - -export const msToHHMMSS = (ms) => { - const seconds = Math.floor(ms / 1000); - const minutes = Math.floor(ms / 60000); - const hours = Math.floor(ms / 3600000); - const secondsString = String(seconds % 60).padStart(2, "0"); - const minutesString = String(minutes % 60).padStart(2, "0"); - const hoursString = String(hours).padStart(2, "0"); - - if (hours > 0) { - return `${hoursString}:${minutesString}:${secondsString}`; - } - else { - return `${minutesString}:${secondsString}`; - } -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/utils/prefs_only.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/utils/prefs_only.js deleted file mode 100644 index b1c5c05a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/utils/prefs_only.js +++ /dev/null @@ -1,64 +0,0 @@ -import Gdk from "gi://Gdk"; -import Gtk from "gi://Gtk"; -export const FORBIDDEN_KEYVALS = [ - Gdk.KEY_Home, - Gdk.KEY_Left, - Gdk.KEY_Up, - Gdk.KEY_Right, - Gdk.KEY_Down, - Gdk.KEY_Page_Up, - Gdk.KEY_Page_Down, - Gdk.KEY_End, - Gdk.KEY_Tab, - Gdk.KEY_KP_Enter, - Gdk.KEY_Return, - Gdk.KEY_Mode_switch, -]; - -export const isValidAccelerator = (mask, keyval) => { - return Gtk.accelerator_valid(keyval, mask) || (keyval === Gdk.KEY_Tab && mask !== 0); -}; - -export const isValidBinding = (mask, keycode, keyval) => { - if (mask === 0) { - return false; - } - - if (mask === Gdk.ModifierType.SHIFT_MASK && keycode !== 0) { - if (keyval >= Gdk.KEY_a && keyval <= Gdk.KEY_z) { - return false; - } - else if (keyval >= Gdk.KEY_A && keyval <= Gdk.KEY_Z) { - return false; - } - else if (keyval >= Gdk.KEY_0 && keyval <= Gdk.KEY_9) { - return false; - } - else if (keyval >= Gdk.KEY_kana_fullstop && keyval <= Gdk.KEY_semivoicedsound) { - return false; - } - else if (keyval >= Gdk.KEY_Arabic_comma && keyval <= Gdk.KEY_Arabic_sukun) { - return false; - } - else if (keyval >= Gdk.KEY_Serbian_dje && keyval <= Gdk.KEY_Cyrillic_HARDSIGN) { - return false; - } - else if (keyval >= Gdk.KEY_Greek_ALPHAaccent && keyval <= Gdk.KEY_Greek_omega) { - return false; - } - else if (keyval >= Gdk.KEY_hebrew_doublelowline && keyval <= Gdk.KEY_hebrew_taf) { - return false; - } - else if (keyval >= Gdk.KEY_Thai_kokai && keyval <= Gdk.KEY_Thai_lekkao) { - return false; - } - else if (keyval >= Gdk.KEY_Hangul_Kiyeog && keyval <= Gdk.KEY_Hangul_J_YeorinHieuh) { - return false; - } - else if (FORBIDDEN_KEYVALS.includes(keyval)) { - return false; - } - } - - return true; -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/utils/shell_only.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/utils/shell_only.js deleted file mode 100644 index f56eb41b..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/mediacontrols@cliffniff.github.com/utils/shell_only.js +++ /dev/null @@ -1,130 +0,0 @@ -// Utils only used in the extension. Do not import this file in the preferences window because Shell is not available there. -import GLib from "gi://GLib"; -import Soup from "gi://Soup"; -import Shell from "gi://Shell"; -import Gio from "gi://Gio"; -import { errorLog, handleError } from "./common.js"; - -Gio._promisify(Gio.DBusProxy, "new", "new_finish"); -Gio._promisify(Gio.File.prototype, "replace_contents_bytes_async", "replace_contents_finish"); -Gio._promisify(Gio.File.prototype, "read_async", "read_finish"); -Gio._promisify(Soup.Session.prototype, "send_and_read_async", "send_and_read_finish"); - -export const getAppByIdAndEntry = (id, entry) => { - const appSystem = Shell.AppSystem.get_default(); - const runningApps = appSystem.get_running(); - const idResults = Shell.AppSystem.search(id ?? ""); - const entryResults = Shell.AppSystem.search(entry ?? ""); - - if (entryResults?.length > 0) { - const app = runningApps.find((app) => entryResults[0].includes(app.get_id())); - - if (app != null) { - return app; - } - } - - if (idResults?.length > 0) { - const app = runningApps.find((app) => idResults[0].includes(app.get_id())); - - if (app != null) { - return app; - } - } - - return null; -}; - -export const getImage = async (url) => { - if (url == null || url == "") { - return null; - } - - const encoder = new TextEncoder(); - const urlBytes = encoder.encode(url); - const encodedUrl = GLib.base64_encode(urlBytes); - const path = GLib.build_filenamev([GLib.get_user_cache_dir(), "mediacontrols@cliffniff.github.com", encodedUrl]); - const exitCode = GLib.mkdir_with_parents(GLib.path_get_dirname(path), 493); - - if (exitCode === -1) { - errorLog(`Failed to create cache directory: ${path}`); - return null; - } - - const file = Gio.File.new_for_path(path); - - if (file.query_exists(null)) { - const stream = await file.read_async(null, null).catch(handleError); - - if (stream == null) { - errorLog(`Failed to load image from cache: ${encodedUrl}`); - return null; - } - - return stream; - } - else { - const uri = GLib.Uri.parse(url, GLib.UriFlags.NONE); - - if (uri == null) { - return null; - } - - const scheme = uri.get_scheme(); - - if (scheme === "file") { - const file = Gio.File.new_for_uri(uri.to_string()); - - if (file.query_exists(null) === false) { - return null; - } - - const stream = await file.read_async(null, null).catch(handleError); - - if (stream == null) { - errorLog(`Failed to load local image: ${encodedUrl}`); - return null; - } - - return stream; - } - else if (scheme === "http" || scheme === "https") { - const session = new Soup.Session(); - const message = new Soup.Message({ method: "GET", uri }); - const bytes = await session.send_and_read_async(message, null, null).catch(handleError); - - if (bytes == null) { - errorLog(`Failed to load image: ${url}`); - return null; - } - - // @ts-expect-error Types are wrong - const resultPromise = file.replace_contents_bytes_async(bytes, null, false, Gio.FileCreateFlags.NONE, null); - const result = await resultPromise.catch(handleError); - - if (result?.[0] === false) { - errorLog(`Failed to cache image: ${url}`); - return null; - } - - const stream = await file.read_async(null, null).catch(handleError); - - if (stream == null) { - errorLog(`Failed to load cached image: ${url}`); - return null; - } - - return stream; - } - else { - errorLog(`Invalid scheme: ${scheme}`); - return null; - } - } -}; - -export const createDbusProxy = async (ifaceInfo, name, object) => { - // @ts-expect-error Types have not been promisified yet - const proxy = Gio.DBusProxy.new(Gio.DBus.session, Gio.DBusProxyFlags.NONE, ifaceInfo, name, object, ifaceInfo.name, null); - return proxy; -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/native-window-placement@gnome-shell-extensions.gcampax.github.com/COPYING b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/native-window-placement@gnome-shell-extensions.gcampax.github.com/COPYING deleted file mode 100644 index e55e5b8a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/native-window-placement@gnome-shell-extensions.gcampax.github.com/COPYING +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. <http://fsf.org> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/native-window-placement@gnome-shell-extensions.gcampax.github.com/NEWS b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/native-window-placement@gnome-shell-extensions.gcampax.github.com/NEWS deleted file mode 100644 index 716a8894..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/native-window-placement@gnome-shell-extensions.gcampax.github.com/NEWS +++ /dev/null @@ -1,1462 +0,0 @@ -46.2 -==== -* apps-menu: Fix a11y of category labels [Florian; !319] -* window-list: Fix long-press support [Florian; !320] -* Misc. bug fixes and cleanups [Florian; !324] - -Contributors: - Florian Müllner - -Translators: - Hugo Carvalho [pt], Jose Riha [sk], Jordi Mas i Hernandez [ca], - Scrambled 777 [hi] - -46.1 -==== -* screenshot-window-sizer: Add flathub-recommended size [Florian; !317] - -Contributors: - Florian Müllner - -Translators: - Rachida SACI [kab], Matheus Polkorny [pt_BR], Fabio Tomat [fur] - -46.0 -==== -* system-monitor: Fix net speed [Florian; !313] -* Misc. bug fixes and cleanups [Aral; !311] - -Contributors: - Aral Balkan, Florian Müllner - -Translators: - Anders Jonsson [sv], Piotr Drąg [pl], Balázs Úr [hu], Milo Casagrande [it], - Quentin PAGÈS [oc], Athmane MOKRAOUI [kab], Changwoo Ryu [ko], - Ask Hjorth Larsen [da] - -46.rc -===== -* Fix window previews in workspace indicator [Florian; !304] -* Fix menu ornament in workspace indicator [Florian; !305] -* Misc. bug fixes and cleanups [Florian; !306, !309] - -Contributors: - Florian Müllner - -Translators: - Danial Behzadi [fa], Ekaterine Papava [ka], Sabri Ünal [tr], Artur S0 [ru], - Yuri Chornoivan [uk], Vasil Pupkin [be], Asier Sarasua Garmendia [eu], - Yaron Shahrabani [he], Brage Fuglseth [nb], Nathan Follens [nl], - Aurimas Černius [lt], Matej Urbančič [sl], Boyuan Yang [zh_CN], - Kukuh Syafaat [id], Fran Dieguez [gl], Andi Chandler [en_GB], - Baurzhan Muftakhidinov [kk], Rūdolfs Mazurs [lv], Guillaume Bernard [fr], - Daniel Mustieles [es], Jiri Grönroos [fi] - -46.beta -======= -* apps-menu: Rename Applications to Apps [Allan; !299] -* Misc. bug fixes and cleanups [Florian; !296, !297, !300, !301, !302] - -Contributors: - Allan Day, Florian Müllner - -Translators: - Gabriel Brand [de], Daniel Rusek [cs], Fran Dieguez [gl], - Aefgh Threenine [th], Vasil Pupkin [be], Artur S0 [ru], Yosef Or Boczko [he], - Sabri Ünal [tr] - -46.alpha -======== -* workspace-indicator: Fix initial preview visibility [Florian; !280, !292] -* screenshot-window-sizer: Fix cycling between sizes backwards [Florian; !284] -* Add back overview in Classic session [Florian; !287] -* Allow running Classic session headless [Jonas; !289] -* window-list: Fix buttons not being clickable at the screen edge - [Florian; !291] -* Add system-monitor extension [Florian; !277] -* Fixed crash [Florian; !290] -* Misc. bug fixes and cleanups [Florian; !276, !275, !278, !281, !286, !288] - -Contributors: - Jonas Ådahl, Florian Müllner - -Translators: - Kristjan SCHMIDT [eo], Brage Fuglseth [nb] - -45.0 -==== - -Contributors: - Andre Klapper - -Translators: - Bruce Cowan [en_GB] - -45.rc -===== -* Misc. bug fixes and cleanups [Florian; !267, !224, !272] - -Contributors: - Florian Müllner - -Translators: - Sabri Ünal [tr], Florentina Musat [ro], A S Alam [pa] - -45.beta -======= -* Port extensions to ESM [Florian; !259, !266, !268, !269] -* Misc. bug fixes and cleanups [Florian; !260, !261, !262, !263, !264] - -Contributors: - Florian Müllner - -Translators: - Efstathios Iosifidis [el] - -45.alpha -======== -* window-list: Modernize default styling [Alexander; !253] -* Replace classic styling with built-in light style [Florian; !254] -* window-list: Add tooltip for long window titles [Arik; !251] -* light-style: New extension [Florian; !256] -* Misc. bug fixes and cleanups [Florian; !255, !257] - -Contributors: - Florian Müllner, Arik W, Alexander Weichart - -44.0 -==== -* Bump version - -44.rc -===== -* Bump version - -44.beta -======= -* Tweak menu alignment [robxnano; !246] - -Contributors: - Florian Müllner, robxnano - -Translators: - Vasil Pupkin [be] - -43.1 -==== -* Fixed crash [Florian; !243] -* Misc. bug fixes and cleanups [mowemcfc; !244] - -Contributors: - Florian Müllner, mowemcfc - -Translators: - Sabri Ünal [tr] - -43.0 -==== - -Contributors: - Florian Müllner - -Translators: - Pawan Chitrakar [ne], Zurab Kargareteli [ka], Aleksandr Melman [ru] - -43.rc -===== -* Misc. bug fixes and cleanups [Florian; !240] - -Contributors: - Florian Müllner - -43.beta -======= -* Misc. bug fixes and cleanups [Florian; !237, !238] - -Contributors: - Florian Müllner - -Translators: - Nart Tlisha [ab] - -43.alpha -======== - -Contributors: - Florian Müllner - -Translators: - Marco Ciampa [it] - -42.3 -==== -* screenshot-window-sizer: Fix reported sizes on wayland [Florian; !232] -* window-list: Improve touch support [Florian; !233] - -Contributors: - Florian Müllner - -42.2 -==== -* native-window-placement: Adjust to gnome-shell 42 changes [Florian; !229] -* window-list: Fix visibility on non-primary monitors [Jason; !230] - -Contributors: - Jason Lynch, Florian Müllner - -Translators: - Cheng-Chia Tseng [zh_TW] - -42.1 -==== -* Misc. bug fixes and cleanups [Florian; !223, !222, !225] - -Contributors: - Florian Müllner - -Translators: - Milo Casagrande [it], Rūdolfs Mazurs [lv], Nathan Follens [nl], - Ngọc Quân Trần [vi], Zurab Kargareteli [ka] - -42.0 -==== - -Translators: - Philipp Kiemle [de], Balázs Úr [hu], Марко Костић [sr], sicklylife [ja], - Baurzhan Muftakhidinov [kk] - -42.rc -===== -* Misc. bug fixes and cleanups [Florian; !215, !218] - -Contributors: - Florian Müllner - -Translators: - Marek Černocký [cs], Dušan Kazik [sk], Piotr Drąg [pl], Jiri Grönroos [fi], - Luna Jernberg [sv], Alan Mortensen [da], Charles Monzat [fr], - Changwoo Ryu [ko] - -42.beta -======= -* workspace-indicator: Fix cancelling editing with Esc [Florian; !208] -* window-list: Update window tracking to avoid missing icons [Florian; !207] -* Use libadwaita for preferences [Florian; !209, !213] -* Adapt to Clutter grab API changes [Florian; !212] -* Misc. bug fixes and cleanups [Jan, Florian; !210, !214] - -Contributors: - Jan Beich, Florian Müllner, Naala Nanba - -Translators: - Boyuan Yang [zh_CN], Matej Urbančič [sl], Naala Nanba [ab], - Alexander Shopov [bg], Emin Tufan Çetin [tr] - -42.alpha -======== -* native-window-placement: Fix distorted layout in app grid [Sebastian; !189] -* window-list: Fix on-screen keyboard [Florian; !199] -* Misc. bug fixes and cleanups [Neal; Just; !195, !197] - -Contributors: - Piotr Drąg, Neal Gompa, Sebastian Keller, Florian Müllner, Just Perfection - -Translators: - Goran Vidović [hr], Sveinn í Felli [is], Yuri Chornoivan [uk], - Fabio Tomat [fur], Quentin PAGÈS [oc], Hugo Carvalho [pt], - Yaron Shahrabani [he], Jordi Mas i Hernandez [ca], MohammadSaleh Kamyab [fa], - Fran Dieguez [gl], Daniel Mustieles [es], Aleksandr Melman [ru], - Aurimas Černius [lt], Asier Sarasua Garmendia [eu], Kukuh Syafaat [id], - Rafael Fontenelle [pt_BR] - -41.0 -==== -* Bump version - -41.rc.1 -======= -* Fix pre-generating stylesheets in tarball [Florian; !190] - -Contributors: - Florian Müllner - -41.rc -===== -* window-list: Adapt to overview-on-startup [Florian; !185] -* apps-menu: Use a custom 'toggle-menu' shortcut [Florian; !173] -* Misc. bug fixes and cleanups [Florian; !186] - -Contributors: - Florian Müllner - -41.beta -======= -* window-list: Extend reactive area of minimap to screen edges [Adam; !171] -* drive-menu: Improve detection of network mounts [Florian; !27, !176] -* Use distinct gettext domain for e.g.o uploads [Florian; #335] -* Misc. bug fixes and cleanups [Florian; !172, !174, !177, !167, !178, !180, - !181, !182, !183] - -Contributors: - Marco Trevisan (Treviño), Adam Goode, Florian Müllner - -Translators: - Hugo Carvalho [pt], Juliano de Souza Camargo [pt], Alexander Shopov [bg] - -40.1 -==== -* Disable welcome dialog in classic session [Florian; !169] -* windowsNavigator: Adjust to a late gnome-shell change [Florian; !170] - -Contributors: - Florian Müllner - -Translators: - Ngọc Quân Trần [vi], Anders Jonsson [sv], Carmen Bianca BAKKER [eo], - Pawan Chitrakar [ne], Quentin PAGÈS [oc] - -40.0 -==== - -Translators: - Jiri Grönroos [fi] - -40.rc -===== -* native-window-placement: Adjust to gnome-shell changes [Florian; !164] -* windows-navigator: Adjust to gnome-shell changes [Florian; !163] -* window-list, workspace-indicator: Only show previews for up to six workspaces - [Florian; !165] -* window-list, workspace-indicator: Improve workspace preview appearance - [Florian; !166] - -Contributors: - Florian Müllner - -Translators: - Fran Dieguez [gl] - -40.beta -======= -* Add tooltips to workspace thumbnails [Florian; !155] -* Drop arrows from top bar menus [Florian; !156] -* drive-menu: Mark mounts that can be unmounted as removable [Michael; !152] -* Remove horizontal-workspaces extension [Florian; !158] -* Adjust to shell overview changes [Florian; !159, !160] -* Fix crashes [Daniel; !157] -* Misc. bug fixes and cleanups [Florian; !154, !161] - -Contributors: - Michael Lawton, Florian Müllner, Daniel van Vugt - -Translators: - Аляксей [be], A S Alam [pa] - -40.alpha.1 -========== -* Don't depend on sassc when building from tarball [Florian; !150] -* Port extensions preferences to GTK4 [Florian; !148] -* Misc. bug fixes and cleanups [Florian, Jonas; !149, !151, !153] - -Contributors: - Jonas Dreßler, Florian Müllner - -40.alpha -======== -* window-list: Honor changes in skip-taskbar property [Sergio; !130] -* window-list, workspace-indicator: Adjust to 3.38 changes [Florian; !133] -* window-list, workspace-indicator: Improve previews in workspace thumbs - [Florian; #260, !142] -* auto-move: Improve behavior on multi-monitor setups [Florian; !135] -* windowNavigator: Adjust to 3.38 changes [Thun; #259] -* Misc. bug fixes and cleanups [Florian, Jonas Å, Jordan, Ray; !131, !136, - !137, !140, !141, !144, !146, !145] - -Contributors: - Sergio Costas, Florian Müllner, Jordan Petridis, Thun Pin, Ray Strode, - Jonas Ådahl - -Translators: - Fabio Tomat [fur], Jordi Mas [ca] - -3.38.1 -====== - -Contributors: - Yacine Bouklif, Florian Müllner - -Translators: - Yacine Bouklif [kab], Cheng-Chia Tseng [zh_TW], Stas Solovey [ru], - Yosef Or Boczko [he] - -3.38.0 -====== - -Translators: - Balázs Meskó [hu], Alan Mortensen [da], Juliano Camargo [pt], Tim Sabsch [de], - Milo Casagrande [it], Rūdolfs Mazurs [lv] - -3.37.92 -======= - -Translators: - Nathan Follens [nl], Zander Brown [en_GB], Aurimas Černius [lt], - Marek Černocký [cs], Changwoo Ryu [ko], Dušan Kazik [sk] - -3.37.91 -======= - -Contributors: - Florian Müllner - -Translators: - Fran Dieguez [gl], Akarshan Biswas [bn_IN], Kukuh Syafaat [id], - Piotr Drąg [pl], Rafael Fontenelle [pt_BR], Jiri Grönroos [fi], - Марко Костић [sr], Goran Vidović [hr] - -3.37.90 -======= -* Misc. bug fixes and cleanups [Florian, Piotr; !126, !128] - -Contributors: - Piotr Drąg, Florian Müllner - -Translators: - Fabio Tomat [fur], Efstathios Iosifidis [el], Anders Jonsson [sv], - Asier Sarasua Garmendia [eu], Alexandre Franke [fr] - -3.37.3 -====== -* window-list, native-window-placement: Adjust to shell changes [Florian; !124] - -Contributors: - Florian Müllner - -Translators: - Jordi Mas [ca], sicklylife [ja], Boyuan Yang [zh_CN], - Baurzhan Muftakhidinov [kk] - -3.37.2 -====== -* window-list, auto-move: Modernize preference dialogs [Florian; !121] -* Adjust to gnome-shell changes [Florian; !122] - -Contributors: - Florian Müllner - -Translators: - Cheng-Chia Tseng [zh_TW], Yuri Chornoivan [uk], Daniel Mustieles [es], - Emin Tufan Çetin [tr], Danial Behzadi [fa], Daniel Șerbănescu [ro], - Matej Urbančič [sl] - -3.37.1 -====== -* drive-menu: Emphasize eject buttons [Florian; #223] -* user-theme: Add preference dialog [Florian; !117] -* window-list: Fix inconsistent state in preference dialog [Milan; !119] -* workspace-indicator: Overhaul preference dialog [Florian; !120] -* user-theme: Support session mode styles [Florian; !118] -* Misc. bug fixes and cleanups [Florian, Xiaoguang; !113, !106, !114, !116] - -Contributors: - Milan Crha, Florian Müllner, Xiaoguang Wang - -Translators: - Daniel Korostil [uk], Yosef Or Boczko [he], Kristjan SCHMIDT [eo], - Dz Chen [zh_CN], Danial Behzadi [fa], Yuri Chornoivan [uk], - Anders Jonsson [sv], Daniel Mustieles [es] - -3.36.0 -====== - -Contributors: - Florian Müllner - -3.35.91 -======= - -Contributors: - Florian Müllner - -Translators: - Zander Brown [en_GB] - -3.35.90 -======= -* Adjust to gnome-shell changes [Florian; !100, !101, !102] -* Force single-line window titles in window list [Florian; #202] -* Misc. bug fixes and cleanup [Florian; !104, !105] - -Contributors: - Florian Müllner - -Translators: - sicklylife [ja], Umarzuki Bin Mochlis Moktar [ms] - -3.35.3 -====== - -Translators: - Fran Dieguez [gl] - -3.35.2 -====== -* Adjust to gnome-shell changes [Marco, Florian; !89, !95, !96] -* window-list, workspace-indicator: Exclude DESKTOP windows from previews - [Florian; !93] -* screenshot-window-sizer: Fix cycling through all valid sizes [Willy; !97] - -Contributors: - Marco Trevisan (Treviño), Florian Müllner, Willy Stadnick - -3.34.1 -====== -* Adjust to gnome-settings-daemon plugin removals [Xiaoguang; !94] - -Contributors: - Florian Müllner, Xiaoguang Wang - -Translators: - Nathan Follens [nl], Dušan Kazik [sk], Ask Hjorth Larsen [da], - Yi-Jyun Pan [zh_TW] - -3.34.0 -====== - -Translators: - Rafael Fontenelle [pt_BR], Efstathios Iosifidis [el], Milo Casagrande [it], - Sabri Ünal [tr] - -3.33.92 -======= - -Translators: - Марко Костић [sr], Tim Sabsch [de], Rūdolfs Mazurs [lv], Matej Urbančič [sl], - Balázs Úr [hu], Claude Paroz [fr], Fran Dieguez [gl], Changwoo Ryu [ko], - Ryuta Fujii [ja], Fabio Tomat [fur], Goran Vidović [hr] - -3.33.91 -======= -* Misc. bug fixes and cleanups [Florian; !88, !90, !91, !92] - -Contributors: - Florian Müllner - -Translators: - Asier Sarasua Garmendia [eu], Anders Jonsson [sv], Marek Černocký [cs], - Kukuh Syafaat [id], Jiri Grönroos [fi], Florentina Mușat [ro], - Aurimas Černius [lt], Daniel Mustieles [es], Piotr Drąg [pl], Jordi Mas [ca], - Danial Behzadi [fa] -3.33.90 -======= -* window-list: Support showing windows from all workspaces [Florian; #154] -* Misc. bug fixes and cleanups [Florian; !86, !87] - -Contributors: - Florian Müllner - -Translators: - Jor Teron [mjw] - -3.33.4 -====== -* Make GNOME Classic more classic: - - Disable GNOME 3 overview [Florian; !69] - - Add window picker button to window list [Florian; !73, !80] - - Style improvements and fixes [Jakub; #169, !82] - - Support horizontal workspace layout in window list [Florian; !70] - - Add draggable previews to window list workspace switcher [Florian; !74] - - Arrange workspaces horizontally [Florian; !72] -* workspace-indicator: Support horizontal workspace layout [Florian; !71] -* workspace-indicator: Add draggable previews [Florian; !77] -* Misc. bug fixes and cleanups [Florian; !75, !76, !79, !78, #168, !84] - -Contributors: - Florian Müllner, Jakub Steiner, Jor Teron - -Translators: - Jor Teron [mjw] - -3.33.3 -====== -* Misc. bug fixes [Florian, Marco; !67, !68] - -Contributors: - Florian Müllner, Marco Trevisan (Treviño) - -3.33.2 -====== -* Misc. bug fixes and cleanups [Florian; !66] - -Contributors: - Florian Müllner - -3.33.1 -====== -* Misc. bug fixes [Florian; !64] - -Contributors: - Florian Müllner - -3.32.1 -====== -* Fix windowsNavigator extension after ES6 port [Florian; #143] -* screenshot-window-sizer: Add phone screenshot sizes [Adrien; !65] -* Misc. bug fixes and cleanups [Fabian; !62] - -Contributors: - Florian Müllner, Adrien Plazas, Fabian P. Schmidt - -3.32.0 -====== - -Contributors: - Florian Müllner - -Translations: - Victor Ibragimov [tg], Kristjan SCHMIDT [eo], Mart Raudsepp [et] - -3.31.92 -======= -* Misc. bug fixes and cleanups [Florian; !57, !58, !59, !60] - -Contributors: - Florian Müllner - -3.31.91 -======= -* apps-menu: Remove outdated legacy-tray handling [Florian; !53] -* user-theme: Allow using XDG user data dir [Tomasz; !55] -* Misc. bug fixes and cleanups [Florian; !52, !54, !56] - -Contributors: - Tomasz Gąsior, Florian Müllner - -Translators: - Matej Urbančič [sl], Gun Chleoc [gd] - -3.31.90 -======= -* Misc. bug fixes and cleanups [Florian; !49, !50, !51] - -Contributors: - Florian Müllner - -Translators: - Ryuta Fujii [ja], Charles Monzat [fr], Pieter Schalk Schoeman [af] - -3.31.2 -====== -* Remove obsolete alternate-tab extension [Florian; #786496] -* Adjust to gnome-shell changes [Florian; #113] - -Contributors: - Florian Müllner - -3.30.1 -====== -* apps-menu: Fix height on HiDPI systems [Florian; #102] -* window-list: Only switch between windows on active workspace when scrolling - [Florian; #78] - -Contributors: - Florian Müllner - -3.30.0 -====== -* Bump version - -3.29.91 -======= -* Misc. bug fixes [Florian; #90] - -Contributors: - Florian Müllner - -3.29.90 -======= -* Misc. bug fixes [Florian; #786496] - -Contributors: - Florian Müllner - -3.29.3 -====== -* Adjust to global.screen removal [Jonas; #759538] - -Contributors: - Jonas Ådahl, Florian Müllner - -3.29.2 -====== -* Misc. bug fixes [Florian; #69] - -Contributors: - Florian Müllner - -3.28.1 -====== -* Misc. bug fixes [Xiaoguang, Florian; #59, #62] - -Contributors: - Florian Müllner, Xiaoguang Wang - -Translators: - Dz Chen [zh_CN] - -3.28.0 -====== - -Contributors: - Florian Müllner, Xiaoguang Wang - -Translators: - Aman Alam [pa], Bruce Cowan [en_GB] - -3.27.92 -======= - -Contributors: - Florian Müllner - -Translators: - Piotr Drąg [es], GNOME Translation Robot [gd], Daniel Șerbănescu [ro] - -3.27.91 -======= -* places-menu: Support unmounting ejectable places [Rémy; #17] -* apps-menu: Support separators and custom sort order [Florian; #27] -* Port to meson [Florian; #31, #45] -* window-list: Fix missing icons on wayland [Florian; #10] -* places-menu: Fix terminating gnome-shell with recent gjs [Florian; #44] -* auto-move: Make it work with wayland windows [Florian; #33] -* Classic theme fixes [Florian, Jonas; #26, #41, #39, #40] -* Require sassc for classic styling [Florian; !28] -* Misc. bug fixes [Piotr, Florian; #772211, #32, #30] - -Contributors: - Jeremy Bicha, Piotr Drąg, Jonas Kümmerlin, Rémy Lefevre, Iñigo Martínez, - Florian Müllner - -Translators: - Matej Urbančič [sl], Kjartan Maraas [nb] - -3.27.1 -====== -* updated translations (ca@valencia) - -3.26.1 -====== -* native-window-placement: Adjust to gnome-shell changes -* updated translations: el, fa, ru, sv - -3.26.0 -====== -* updated translations (be, bg, ca, da, eu, fi, is, it, ko, lv, ml, - nl, pt_BR, vi, zh_TW) - -3.25.91 -======= -* updated translations (ca, fr, it, pl, pt_BR, sr, sr@latin, tr) - -3.25.90 -======= -* updated translations (es, gl, hr, hu, kk, sl, sv, sv) - -3.25.4 -====== -* screenshot-window-sizer: Fix backward cycling -* updated translations (ar, be, ca, cs, de, fur, id, lt, pl, sk) - -3.25.3 -====== -* places-menu: Use mount operation if necessary -* window-list: Respect MWM hints -* updated translations (es, fur, kk) - -3.25.2 -====== -* places-menu: Make URI launching asynchronous -* updated translations (de, fur, hr, hu, id, sl) - -3.25.1 -====== -* apps-menu: Mark copied launchers as trusted -* places-menu: Make icon lookup asynchronous -* updated translations (hr) - -3.24.1 -====== -* apps-menu: Allow creating desktop launchers via DND -* updated translations (el, vi) - -3.24.0 -====== -* updated translations (lv, tr) - -3.23.92 -======= -* update classic theme -* updated translations (be, ko, ca, da, cs, ru, lt) - -3.23.91 -======= -* updated translations (de, es, eu, fi, fr, fur, gl, hu, id, it, kk, nb, pl, pt_BR, - sk, sr, sr@latin, sv, uk, zh_TW) - -3.23.90 -======= -* window-list: Improve styling -* window-list: Hide workspace indicator when there's a single (static) workspace -* new translation (be) - -3.23.2 -====== -* alternateTab: Don't take over 'switch-group' shortcut -* updated translations (zh_CN) - -3.22.1 -====== -* window-list: Update icon on app changes - -3.22.0 -====== -* updated translations (en_GB) - -3.21.92 -======= -* update style -* updated translations (pl, vi) - -3.21.91 -======= -* updated translations (pl) - -3.21.90 -======= -* updated translations (es, gu) - -3.21.4 -====== -* apps-menu: Fix entries from non-standard AppDir directories - -3.21.3 -====== -* adjust to gnome-shell changes -* updated translations (oc) - -3.21.2 -====== -* version bump, nothing to see here - -3.20.1 -====== -* update classic style -* updated translations (gd, oc) - -3.20.0 -====== -* version bump, nothing to see here - -3.19.92 -======= -* version bump, nothing to see here - -3.19.91 -======= -* updated translations (oc) - -3.19.90 -======= -* version bump, nothing to see here - -3.19.4 -====== -* screenshot-window-sizer: HiDPI support -* Fix gnome-shell component in classic session -* updated translations (lt) - -3.19.3 -====== -* native-window-placement: Don't let border overlap title -* apps-menu: Fix handling of .desktop files in subdirectories -* updated translations (is) - -3.19.2 -====== -* updated translations (gd) - -3.19.1 -====== -* Fix some theme issues - -3.18.1 -====== -* window-list: Fix accessibility of window buttons -* apps-menu: Fix unreliable highlight -* updated translations (ar) - -3.18.0 -====== -* Bump version - -3.17.92 -======= -* places: Include DESKTOP when desktop icons are enabled -* updated translations (fa) - -3.17.91 -======= -* updated translations (nl, pl, zh_TW) - -3.17.90 -======= -* window-list: Improve application ordering -* workspace-indicator: Use consistent workspace numbering - -3.17.4 -====== -* updated translations (fur) - -3.17.3 -====== -* window-list: Adjust with text-scaling-factor -* classic style updates -* updated translations (pt, ro) - -3.17.2 -====== -* updated translations (oc, pt, zh_CN) - -3.17.1 -====== -* style updates -* updated translations (oc) - -3.16.1 -====== -* window-list: Fix workspace indicators popup menu position -* apps-menu: Fix taking over panel-main-menu shortcut -* updated translations (et, ja, lv) - -3.16.0 -====== -* updated translations (ca) - -3.15.92 -======= -* classic: Update theme -* update for mutter API changes -* updated translations (bg, bs, da, fi, pa, ru, sr, sr@latin, tg) - -3.15.91 -======= -* classic: Update theme -* systemMonitor extension was removed, as the message tray where it - put its indicator no longer exists -* window-list: Adjust for gnome-shell changes -* updated translations (gl, it, kk, ko, lt, pl, sk, uk, zh_TW) - -3.15.90 -======= -* classic: Visual refresh based on new shell theme -* window-list: Adjust for gnome-shell changes -* updated translations (an, el, eo, eu, fr, he, is, sv, tr) - -3.15.4 -====== -* window-list: Improve interaction with system modal dialogs -* updated translations (cs, de, es, eu, fur, hu, id, nb, pt_BR, ru, sl, vi) - -3.15.3.1 -======== -* adjust to gnome-shell change - -3.15.3 -====== -* classic-mode: Add high-contrast theme variant, drop .desktop file -* places-menu: Fix error when XDG user directories are not set up -* window-list: Add option to show on all monitors -* updated translations (eu, hu, kk, ro, tr) - -3.15.2 -====== -* removable-drive, user-theme, window-list: Update for gnome-shell changes -* apps-menu: Fix some visual glitches -* Fix classic mode style -* updated translations (an, cs, he, vi) - -3.15.1 -====== - * updated translations (es, nb) - -3.14.1 -====== - * alternateTab: Fix dismissing popup with Escape - * some improvements to the window-list - (spacing in app buttons, no flash when closing windows with auto-grouping) - * updated translations (lv, it, pt, bg) - -3.14.0 -====== - * updated translations (bn_IN, hi, kn, sr, sr@latin, uk) - -3.13.92 -======= -* new extension: screenshot-window-sizer -* window-list: Don't add sticky windows more than once -* updated translations (da, de, fi, ko, mr, ms, ne, pa, pl, sk, sv, ta, te, tr) - -3.13.91 -======= -* window-list: restore fitts'ability of workspace button -* updated for gnome-shell changes -* updated translations (cs, kk, fr, or, fa, ja, gu, id) - -3.13.90 -======= -* updated translations (as, ca, eu, nl, zh_CN, zh_HK, zh_TW) - -3.13.4 -====== -* Updated for gnome-shell changes -* updated translations (el, gl, ru) - -3.13.3 -====== -* Tweak preference UIs some more -* Fix classic mode schema overrides -* updated translations (es, he, hu, lt, nb, pt_BR, sl, tr) - -3.13.2 -====== -* Fix sorting of grouped buttons in window list -* Tweak preference UIs -* updated translations (en_GB) - -3.13.1 -====== -* add DesktopNames key to the classic session file -* classic theme: remove rounded corners from tile previews -* window-list: don't shift message tray on other monitors -* auto-move-windows: several fixes and updates for api changes -* launch-new-instances: updates for api changes -* updated translations (ja, km) - -3.12.0 -====== -* updated translations (zh_HK, zh_TW) - -3.11.92 -======= -* nothing to see here, move on - -3.11.91 -======= -* updated translations (ko, fur) - -3.11.90 -======= -* several fixes and improvements to the window-list - (can be scrolled, works correctly with the OSD - keyboard, filters skip-taskbar windows, does not - force all notifications to bold) -* drive-menu fixed not to show shadowed mounts -* updates for gnome-shell changes (launch-new-instance, - auto-move-windows, places-menu) -* build system fixes for systems without /bin/bash -* updated translations (or, tr, uk) - -3.11.5 -====== -* updates for gnome-shell changes -* updated translations (kn) - -3.11.4 -====== -* classic mode now supports session saving -* updates for gnome-shell changes -* updated translations (ar, kn) - -3.11.3 -====== -* workspace-indicator is vertically aligned now -* updated translations (ar, eo, ta, te) - -3.11.2 -====== -* updated translations (zh_CN) - -3.11.1 -====== -* ignore shadowed mounts in drive-menu extension -* updates for gnome-shell/gjs changes -* updated translations (el, th) - -3.10.1 -====== -* updated translations (af, ca, ca@valencia, de, et, eu, fa, - hu, lt, lv, nb, nl, pa, pt, sk, sr, sr@latin, tr) - -3.10.0 -====== -* updated translations (as, cs, da, es, et, fi, fr, gl, - he, id, it, kk, lt, lv, pa, pl, pt, pt_BR, ru, sl, tg, - uk, zh_HK, zh_TW) - -3.9.92 -====== -* more updates and fixes for gnome-shell master changes - and regressions (systemMonitor, window-list, apps-menu) -* lots of updated translations (ar, as, cs, da, de, el, es, - eu, fi, gl, he, hu, it, ja, kk, ko, lv, nb, nl, pa, pl, - pt_BR, ru, sk, sr, sr@latin, ta, tg) - -3.9.91 -====== -* update the classic mode session and theme to work with the - new system menu -* the usual round of updates and fixes for gnome-shell - API changes -* updated translations (de, it, lt, nl, pl, pt_BR, sk, - zh_HK, zh_TW) - -3.9.90 -====== -* xrandr-indicator was removed, as the implementation - was incompatible with the new DisplayConfig mutter API -* various extensions were updated for the 3.9.90 gnome-shell API -* updated translations (cs, es, fur, gl, he, hu, id, ja, sl, tg, - zh_CN, zh_HK, zh_TW) - -3.9.5 -===== -* alternative-status-menu was removed entirely, as - it does not fit in the designs of the new unified - status menu -* updated translations (as, gu, it, ru) - -3.9.4 -===== -* apps-menu: fixed handling of hot corner in case - of screen reconfiguration -* alternative-status-menu now correctly honors polkit - for hibernation -* user-menu now loads themes from $XDG_DATA_HOME too -* translation updates (de, id, pt_BR, vi, zh_CN, ml) - -3.9.3 -===== -* classic mode mini extensions were replaced with a - GSettings override specified in the .json file -* styling of classic mode improved -* native-window-placement is back working on 3.9 -* misc bug fixes -* traslation updates (an, cs, el, es, gl, nb, pl, sk, tg) - -3.9.2 -===== -* apps-menu: appearance of the scrollbars was improved -* window-list is a little taller in classic mode (to account - for the workspace switcher) -* alternative-status-menu honors again the dconf configuration -* translation updates (sr) - -3.9.1 -===== -* updates to window-list, xrandr-indicator, - workspace-indicator, windowsNavigator for gnome-shell - changes -* translation updates (cs, es, lt, pl, pt_BR, sl) - -3.8.1 -===== -* many improvements to window-list: - - windows are activated by DND over them - - window buttons now have the right size, - even if the text is smaller or larger - than the ideal - - window buttons can be grouped automatically - when the panel becomes crowded - - added a workspace switcher menu -* added keyboard navigation to apps-menu -* small tweaks to classic-mode theme, in particular - for menus -* translation updates (gl, ko, sr) - -3.8.0 -===== -* translation updates (hu, ja, fi, it) - -3.7.92 -====== -* misc bug fixes to app-menu and window-list -* translation updates (de, sl, pt_BR, ru) - -3.7.91 -====== -* various updates for shell changes -* update window-list to always use application icons -* update apps-menu to not load subdirectories as - separate categories -* translation updates (lt, zh_CN) - -3.7.90 -====== -* various fixes to make places-menu behave more - like Nautilus, including showing the machine - name in place of File System -* various updates for shell changes -* alternative-status-menu no longer supports - ConsoleKit systems, you need to install logind - to have suspend or hibernate -* translation updates (es, cz, pl, sr) - -3.7.5.1 -======= -* new extension forgotten in previous NEWS entry: - windows-list -* also forgotten previously: classic mode got a new - GNOME2 style -* build fixes - -3.7.5 -===== -* places-menu is back in the classic extensions, with - a new old GNOME-2 look -* classic mode moved the date menu to right, where we - all know it rightly belongs -* apps-menu received a face-lift, with the inclusion - of a reduced form of AxeMenu -* new extension in the classic set: launch-new-instance, - which modifies the behavior of clicking in the dash - and app launcher -* alternate-tab, native-window-placement and windowsNavigator - updated for gnome-shell changes -* translation updates (es, cz, pl) - -3.7.4 -===== -* a separate configure switch has been added to enable - classic mode session definitions -* places-menu is no longer part of the classic-mode - extension set -* updated translations (ar, gl, hu, lt, pt_BR, sr) - -3.7.3 -===== -* new extensions: default-min-max, static-workspaces -* alternate-tab now uses the built-in window switcher and just - takes over the switch-application keybinding -* workspace-indicator: is no longer part of classic-mode -* we now install classic-mode data files for gdm, gnome-session - and gnome-shell, so if you enable classic-mode you get a new - session option in GDM -* updated translations (ar, es, pl, ru, sl, zh_HK, zh_TW) - -3.7.2 -===== -* fixed crashes with places-menu, windowsNavigator, alternate-tab - and native-window-placement -* alternate-tab now hides attached modal dialogs -* places-menu has restored support for Nautilus 3.4 -* the default for hibernate is now to show in alternative-status-menu -* some extensions are now tagged as "classic", and can be chosen with - --enable-extensions=classic-mode -* dock and gajim were removed at the beginning of the 3.7.1 cycle, - as they were buggy and unmaintained -* updated translations (ar, cs, de, el, es, gl, id, lt, lv, pa, pl - ru, sk, sl, sr, sr@latin) - -3.6.1 -===== -* fixed alternative-status-menu for the new lock screen -* squashed some alternate-tab warnings -* drive-menu now works with 3.6 again -* updated translations (ar, cs, el, es, gl, id, lv, pl, sl) - -3.6.0 -===== -* major rework in places menu, to make it work without - removed supporting code in the shell and to make it look like - the nautilus sidebar - (similar work would be needed for drive-menu, not done yet) -* updated translations (ca, cs, de, el, en_GB, es, fi, hu, id, lt, - pl, pt_BR, ru, sl, sr) - -3.5.91 -====== -* various crashers were fixed in alternative-tab -* auto-move-windows now can be made to work with static workspaces -* place-menu is now on the left and uses symbolic icons like Files -* StIconType usage was removed from all extensions, after it was - removed in core -* systemMonitor, xrandr-indicator, apps-menu, places-menu, - alternative-status-menu were updated for the newer shell -* updated translations (es, gl, it, pl, sl) - -3.5.90 -====== -* alternate-tab has been reworked again, the old mode switch - was removed and the all&thumbnails code extended to handle - icons and filtering to the workspace -* alternate-tab thumbnails now reflect the aspect ratio of the windows -* systemMonitor now shows a tooltip above the indicator -* native-window-placement, systemMonitor and windowsNavigator have been updated - for the newer shell -* updated translations (es, pa) - -3.5.5 -===== -* convenience module has been relicensed to BSD, - for compatibility with GPLv3 extensions -* alternate-tab has been refactored and seen various - improvements to all&thumbnails mode, including a new - overlaid application icon -* updated translations (lt, id, sr) - -3.5.4 -===== -* updated translations (de, es, ar, sl, lv, zh_CN) - -3.5.2 -===== -* removable-drive-menu is now a11y friendly -* the dock can now be placed on any monitor, not just the primary -* dock is now clipped to its monitor -* alternative-status-menu now exposes GSettings for Suspend - and Hibernate visibility - no UI yet -* more gnome-shell API changes (places-menu, removable-drive-menu, - alternative-status-menu) -* miscellaneous bug fixes (native-window-placement, gajim, - auto-move-windows) -* updated translations - -3.4.0 -===== -* build system improvements -* updated translations (ar, cs, fr) - -3.3.92 -====== -* various updates for gnome-shell API changes (dock, - native-window-placement) -* local-install is now a make rule, not a shell script -* updated translations (zh, es, sw, ga, hu, it, no, pt_BR, de, sl, - pl, la, fi, sr) - -3.3.90 -====== -* system wide installation via "make install" is possible - again -* alternate-tab can now pre-activate the selected window -* auto-move-windows, workspace-indicator and example gained - new preference dialogs -* workspace-indicator: fixed a bug wrt focus stealing prevention -* updated translations (es, pt_BR, it, sl, gl, sr) - -3.3.5 -===== -* improvements to the build system and convenience module, - making it easier for other extensions to use, and bringing - it up to date with gnome-shell changes -* all extensions were ported to the Lang.Class framework - (except xrandr-indicator, which is pending GDBus merge) -* alternate-tab and dock were slightly refactored to clean up - some old code - -3.3.4 -===== -* improved styling of windowsNavigator tooltips -* fixed windowsNavigator when used with the numeric keypad -* fixed native-window-placement with custom button layout -* updated translations (pt_BR, cz) - -3.3.3 -===== -* windowsNavigator was fixed to work with azerty keyboards -* drive-menu was changed to use media-eject icon instead of media-optical -* dock: the default value of hide-effect is now move -* dock: if autohide is disabled, now it pushes maximized windows aside -* dock was updated to match current core shell styling -* native-window-placement: position stategy setting was removed -* alternative-status-menu no longer conflicts with other extensions - in the user menu -* various other minor bug fixes -* updated translations (zh, uk, es, it, cz, sl, sk, fi) - -3.3.2 -===== -* all extensions are now self-contained, including l10n and settings -* introduce a convenience module that can be shared among all extensions -* you can know build an installable zip file with make zip-file -* apps-menu no longer shows NoDisplay apps -* alternative-status-menu, alternate-tab: fix for master shell - -3.2.1 -===== -* dock: added "move" hide effect -* systemMonitor: now it enables/disables properly -* systemMonitor: improved styling -* alternate-tab: both modes now work with gnome-shell 3.2 -* various other bug fixes -* updated translations - -3.2.0 -===== - -* various: update for gnome-shell API changes - -3.1.91 -====== - -* gajim: update for gnome-shell API changes - -3.1.90 -====== - -* All extensions have been ported to the new extension - system (including live enable/disable) -* Updated translations -* xrandr-indicator no longer requires a specific gjs version -* windowsNavigator fixed for more than 2 workspaces - -3.1.4 -===== - -* New extension: a menu for changing workspace (workspace-indicator) -* systemMonitor: lower the requirement on libgtop -* auto-move-windows: open overview when last window on - last workspace is closed -* dock: implement autohiding, with various configurable - effects -* alternate-tab: more configurable implementations available -* native-window-placement: don't rearrange the windows when - the workspace switcher is shown/hidden -* update for gnome-shell 3.1.4 API changes - -3.1.3 -===== - -* New extension: a menu for removable drives (drive-menu -* New extensions: GNOME 2 like menus for apps and places - (apps-menu, places-menu) -* New extension: additional configurability for the window - layout in the overview, including a mechanism similar to - KDE4 (native-window-placement) -* New extension: a message tray indicator for CPU and memory - usage (uses libgtop) (systemMonitor) -* user-theme: fixed resetting theme -* user-theme: support themes installed in /usr/share/themes -* alternative-status-menu: ported to gnome-shell master -* dock: ported to gnome-shell master -* dock: make position configurable (can be left or right) -* Updated translations - -3.0.2 -===== - -* Updated translations. -* Fixed bug #647386 (reverting of user-theme to default) -* Fixed bug #647599 (support globally installed themes) -* Added license and README diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/native-window-placement@gnome-shell-extensions.gcampax.github.com/extension.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/native-window-placement@gnome-shell-extensions.gcampax.github.com/extension.js deleted file mode 100644 index 03935275..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/native-window-placement@gnome-shell-extensions.gcampax.github.com/extension.js +++ /dev/null @@ -1,306 +0,0 @@ -// SPDX-FileCopyrightText: 2011 Giovanni Campagna <gcampagna@src.gnome.org> -// SPDX-FileCopyrightText: 2011 Stefano Facchini <stefano.facchini@gmail.com> -// SPDX-FileCopyrightText: 2011 Wepmaschda <wepmaschda@gmx.de> -// SPDX-FileCopyrightText: 2015 Florian Müllner <fmuellner@gnome.org> -// -// SPDX-License-Identifier: GPL-2.0-or-later - -// -*- mode: js2; indent-tabs-mode: nil; js2-basic-offset: 4 -*- -import Clutter from 'gi://Clutter'; - -import {Extension, InjectionManager} from 'resource:///org/gnome/shell/extensions/extension.js'; - -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import {WindowPreview} from 'resource:///org/gnome/shell/ui/windowPreview.js'; -import * as Workspace from 'resource:///org/gnome/shell/ui/workspace.js'; - -// testing settings for natural window placement strategy: -const WINDOW_PLACEMENT_NATURAL_ACCURACY = 20; // accuracy of window translate moves (KDE-default: 20) -const WINDOW_PLACEMENT_NATURAL_GAPS = 5; // half of the minimum gap between windows -const WINDOW_PLACEMENT_NATURAL_MAX_TRANSLATIONS = 5000; // safety limit for preventing endless loop if something is wrong in the algorithm - -class Rect { - constructor(x, y, width, height) { - [this.x, this.y, this.width, this.height] = [x, y, width, height]; - } - - // used in _calculateWindowTransformationsNatural to replace Meta.Rectangle that is too slow. - copy() { - return new Rect(this.x, this.y, this.width, this.height); - } - - union(rect2) { - let dest = this.copy(); - if (rect2.x < dest.x) { - dest.width += dest.x - rect2.x; - dest.x = rect2.x; - } - if (rect2.y < dest.y) { - dest.height += dest.y - rect2.y; - dest.y = rect2.y; - } - if (rect2.x + rect2.width > dest.x + dest.width) - dest.width = rect2.x + rect2.width - dest.x; - if (rect2.y + rect2.height > dest.y + dest.height) - dest.height = rect2.y + rect2.height - dest.y; - - return dest; - } - - adjusted(dx, dy, dx2, dy2) { - let dest = this.copy(); - dest.x += dx; - dest.y += dy; - dest.width += -dx + dx2; - dest.height += -dy + dy2; - return dest; - } - - overlap(rect2) { - return !(this.x + this.width <= rect2.x || - rect2.x + rect2.width <= this.x || - this.y + this.height <= rect2.y || - rect2.y + rect2.height <= this.y); - } - - center() { - return [this.x + this.width / 2, this.y + this.height / 2]; - } - - translate(dx, dy) { - this.x += dx; - this.y += dy; - } -} - -class NaturalLayoutStrategy extends Workspace.LayoutStrategy { - constructor(params, settings) { - super(params); - this._settings = settings; - } - - computeLayout(windows, _params) { - return { - windows, - }; - } - - /* - * Returns clones with matching target coordinates and scales to arrange windows in a natural way that no overlap exists and relative window size is preserved. - * This function is almost a 1:1 copy of the function - * PresentWindowsEffect::calculateWindowTransformationsNatural() from KDE, see: - * https://projects.kde.org/projects/kde/kdebase/kde-workspace/repository/revisions/master/entry/kwin/effects/presentwindows/presentwindows.cpp - */ - computeWindowSlots(layout, area) { - // As we are using pseudo-random movement (See "slot") we need to make sure the list - // is always sorted the same way no matter which window is currently active. - - let areaRect = new Rect(area.x, area.y, area.width, area.height); - let bounds = areaRect.copy(); - let clones = layout.windows; - - let direction = 0; - let directions = []; - let rects = []; - for (let i = 0; i < clones.length; i++) { - // save rectangles into 4-dimensional arrays representing two corners of the rectangular: [left_x, top_y, right_x, bottom_y] - let rect = clones[i].boundingBox; - rects[i] = new Rect(rect.x, rect.y, rect.width, rect.height); - bounds = bounds.union(rects[i]); - - // This is used when the window is on the edge of the screen to try to use as much screen real estate as possible. - directions[i] = direction; - direction++; - if (direction === 4) - direction = 0; - } - - let loopCounter = 0; - let overlap; - do { - overlap = false; - for (let i = 0; i < rects.length; i++) { - for (let j = 0; j < rects.length; j++) { - let adjustments = [-1, -1, 1, 1] - .map(v => (v *= WINDOW_PLACEMENT_NATURAL_GAPS)); - let iAdjusted = rects[i].adjusted(...adjustments); - let jAdjusted = rects[j].adjusted(...adjustments); - if (i !== j && iAdjusted.overlap(jAdjusted)) { - loopCounter++; - overlap = true; - - // TODO: something like a Point2D would be nicer here: - - // Determine pushing direction - let iCenter = rects[i].center(); - let jCenter = rects[j].center(); - let diff = [jCenter[0] - iCenter[0], jCenter[1] - iCenter[1]]; - - // Prevent dividing by zero and non-movement - if (diff[0] === 0 && diff[1] === 0) - diff[0] = 1; - // Try to keep screen/workspace aspect ratio - if (bounds.height / bounds.width > areaRect.height / areaRect.width) - diff[0] *= 2; - else - diff[1] *= 2; - - // Approximate a vector of between 10px and 20px in magnitude in the same direction - let length = Math.sqrt(diff[0] * diff[0] + diff[1] * diff[1]); - diff[0] = diff[0] * WINDOW_PLACEMENT_NATURAL_ACCURACY / length; - diff[1] = diff[1] * WINDOW_PLACEMENT_NATURAL_ACCURACY / length; - - // Move both windows apart - rects[i].translate(-diff[0], -diff[1]); - rects[j].translate(diff[0], diff[1]); - - - if (this._settings.get_boolean('use-more-screen')) { - // Try to keep the bounding rect the same aspect as the screen so that more - // screen real estate is utilised. We do this by splitting the screen into nine - // equal sections, if the window center is in any of the corner sections pull the - // window towards the outer corner. If it is in any of the other edge sections - // alternate between each corner on that edge. We don't want to determine it - // randomly as it will not produce consistant locations when using the filter. - // Only move one window so we don't cause large amounts of unnecessary zooming - // in some situations. We need to do this even when expanding later just in case - // all windows are the same size. - // (We are using an old bounding rect for this, hopefully it doesn't matter) - let xSection = Math.round((rects[i].x - bounds.x) / (bounds.width / 3)); - let ySection = Math.round((rects[i].y - bounds.y) / (bounds.height / 3)); - - iCenter = rects[i].center(); - diff[0] = 0; - diff[1] = 0; - if (xSection !== 1 || ySection !== 1) { // Remove this if you want the center to pull as well - if (xSection === 1) - xSection = directions[i] / 2 ? 2 : 0; - if (ySection === 1) - ySection = directions[i] % 2 ? 2 : 0; - } - if (xSection === 0 && ySection === 0) { - diff[0] = bounds.x - iCenter[0]; - diff[1] = bounds.y - iCenter[1]; - } - if (xSection === 2 && ySection === 0) { - diff[0] = bounds.x + bounds.width - iCenter[0]; - diff[1] = bounds.y - iCenter[1]; - } - if (xSection === 2 && ySection === 2) { - diff[0] = bounds.x + bounds.width - iCenter[0]; - diff[1] = bounds.y + bounds.height - iCenter[1]; - } - if (xSection === 0 && ySection === 2) { - diff[0] = bounds.x - iCenter[0]; - diff[1] = bounds.y + bounds.height - iCenter[1]; - } - if (diff[0] !== 0 || diff[1] !== 0) { - length = Math.sqrt(diff[0] * diff[0] + diff[1] * diff[1]); - diff[0] *= WINDOW_PLACEMENT_NATURAL_ACCURACY / length / 2; // /2 to make it less influencing than the normal center-move above - diff[1] *= WINDOW_PLACEMENT_NATURAL_ACCURACY / length / 2; - rects[i].translate(diff[0], diff[1]); - } - } - - // Update bounding rect - bounds = bounds.union(rects[i]); - bounds = bounds.union(rects[j]); - } - } - } - } while (overlap && loopCounter < WINDOW_PLACEMENT_NATURAL_MAX_TRANSLATIONS); - - // Work out scaling by getting the most top-left and most bottom-right window coords. - let scale; - scale = Math.min( - areaRect.width / bounds.width, - areaRect.height / bounds.height, - 1.0); - - // Make bounding rect fill the screen size for later steps - bounds.x -= (areaRect.width - bounds.width * scale) / 2; - bounds.y -= (areaRect.height - bounds.height * scale) / 2; - bounds.width = areaRect.width / scale; - bounds.height = areaRect.height / scale; - - // Move all windows back onto the screen and set their scale - for (let i = 0; i < rects.length; i++) - rects[i].translate(-bounds.x, -bounds.y); - - - // rescale to workspace - let slots = []; - for (let i = 0; i < rects.length; i++) { - rects[i].x = rects[i].x * scale + areaRect.x; - rects[i].y = rects[i].y * scale + areaRect.y; - rects[i].width *= scale; - rects[i].height *= scale; - - slots.push([rects[i].x, rects[i].y, rects[i].width, rects[i].height, clones[i]]); - } - - return slots; - } -} - -export default class NativeWindowPlacementExtension extends Extension { - constructor(metadata) { - super(metadata); - - this._injectionManager = new InjectionManager(); - } - - enable() { - const settings = this.getSettings(); - - const layoutProto = Workspace.WorkspaceLayout.prototype; - const previewProto = WindowPreview.prototype; - - this._injectionManager.overrideMethod(layoutProto, '_createBestLayout', () => { - /* eslint-disable no-invalid-this */ - return function () { - this._layoutStrategy = new NaturalLayoutStrategy({ - monitor: Main.layoutManager.monitors[this._monitorIndex], - }, settings); - return this._layoutStrategy.computeLayout(this._sortedWindows); - }; - /* eslint-enable no-invalid-this */ - }); - - // position window titles on top of windows in overlay - this._injectionManager.overrideMethod(previewProto, '_init', originalMethod => { - /* eslint-disable no-invalid-this */ - return function (...args) { - originalMethod.call(this, ...args); - - if (!settings.get_boolean('window-captions-on-top')) - return; - - const alignConstraint = this._title.get_constraints().find( - c => c.align_axis && c.align_axis === Clutter.AlignAxis.Y_AXIS); - alignConstraint.factor = 0; - - const bindConstraint = this._title.get_constraints().find( - c => c.coordinate && c.coordinate === Clutter.BindCoordinate.Y); - bindConstraint.offset = 0; - }; - /* eslint-enable no-invalid-this */ - }); - - this._injectionManager.overrideMethod(previewProto, '_adjustOverlayOffsets', originalMethod => { - /* eslint-disable no-invalid-this */ - return function (...args) { - originalMethod.call(this, ...args); - - if (settings.get_boolean('window-captions-on-top')) - this._title.translation_y = -this._title.translation_y; - }; - /* eslint-enable no-invalid-this */ - }); - } - - disable() { - this._injectionManager.clear(); - global.stage.queue_relayout(); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/native-window-placement@gnome-shell-extensions.gcampax.github.com/private_metadata.json b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/native-window-placement@gnome-shell-extensions.gcampax.github.com/private_metadata.json deleted file mode 100644 index 36e99bda..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/native-window-placement@gnome-shell-extensions.gcampax.github.com/private_metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "_generated": "Generated by SweetTooth, do not edit", - "description": "Arrange windows in overview in a more compact way.", - "extension-id": "native-window-placement", - "gettext-domain": "gnome-shell-extension-native-window-placement", - "name": "Native Window Placement", - "original-authors": [ - "wepmaschda@gmx.de" - ], - "settings-schema": "org.gnome.shell.extensions.native-window-placement", - "shell-version": [ - "46" - ], - "url": "https://gitlab.gnome.org/GNOME/gnome-shell-extensions", - "uuid": "native-window-placement@gnome-shell-extensions.gcampax.github.com", - "version": 59 -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/native-window-placement@gnome-shell-extensions.gcampax.github.com/schemas/gschemas.compiled b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/native-window-placement@gnome-shell-extensions.gcampax.github.com/schemas/gschemas.compiled deleted file mode 100644 index b14b0490..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/native-window-placement@gnome-shell-extensions.gcampax.github.com/schemas/gschemas.compiled and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/native-window-placement@gnome-shell-extensions.gcampax.github.com/schemas/org.gnome.shell.extensions.native-window-placement.gschema.xml b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/native-window-placement@gnome-shell-extensions.gcampax.github.com/schemas/org.gnome.shell.extensions.native-window-placement.gschema.xml deleted file mode 100644 index 7f25aab2..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/native-window-placement@gnome-shell-extensions.gcampax.github.com/schemas/org.gnome.shell.extensions.native-window-placement.gschema.xml +++ /dev/null @@ -1,22 +0,0 @@ -<!-- -SPDX-FileCopyrightText: 2016 Florian Müllner <fmuellner@gnome.org> - -SPDX-License-Identifier: GPL-2.0-or-later ---> - -<schemalist gettext-domain="gnome-shell-extensions"> - <schema id="org.gnome.shell.extensions.native-window-placement" path="/org/gnome/shell/extensions/native-window-placement/"> - <key name="use-more-screen" type="b"> - <default>true</default> - <summary>Use more screen for windows</summary> - <description>Try to use more screen for placing window thumbnails by adapting to screen aspect ratio, and consolidating - them further to reduce the bounding box. This setting applies only with the natural placement strategy.</description> - </key> - <key name="window-captions-on-top" type="b"> - <default>true</default> - <summary>Place window captions on top</summary> - <description>If true, place window captions on top the respective thumbnail, overriding shell default of placing it at - the bottom. Changing this setting requires restarting the shell to have any effect.</description> - </key> - </schema> -</schemalist> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/netspeedsimplified@prateekmedia.extension/LICENSE b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/netspeedsimplified@prateekmedia.extension/LICENSE deleted file mode 100644 index 9cecc1d4..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/netspeedsimplified@prateekmedia.extension/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - {one line to give the program's name and a brief idea of what it does.} - Copyright (C) {year} {name of author} - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - {project} Copyright (C) {year} {fullname} - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -<http://www.gnu.org/licenses/>. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -<http://www.gnu.org/philosophy/why-not-lgpl.html>. diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/netspeedsimplified@prateekmedia.extension/extension.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/netspeedsimplified@prateekmedia.extension/extension.js deleted file mode 100644 index 38ee10b1..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/netspeedsimplified@prateekmedia.extension/extension.js +++ /dev/null @@ -1,417 +0,0 @@ -//Imports -import Clutter from 'gi://Clutter'; -import St from 'gi://St'; -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import * as PanelMenu from 'resource:///org/gnome/shell/ui/panelMenu.js'; -import { Extension, gettext as _ } from 'resource:///org/gnome/shell/extensions/extension.js'; -const schema = 'org.gnome.shell.extensions.netspeedsimplified', - ButtonName = "ShowNetSpeedButton", - rCConst = 4; //Right Click 4 times to toggle Vertical Alignment - -let settings, timeout, - lastCount = 0, - lastSpeed = 0, - lastCountUp = 0, - resetNextCount = false, - resetCount = 0, - hideCount = 8, - B_UNITS; - -// Settings -var currentSettings; //Initialized in enable() - -function fetchSettings() { - currentSettings = { - refreshTime: settings.get_double('refreshtime'), - mode: settings.get_int('mode'), - fontmode: settings.get_int('fontmode'), - showTotalDwnld: settings.get_boolean('togglebool'), - isVertical: settings.get_boolean('isvertical'), - chooseIconSet: settings.get_int('chooseiconset'), - limitunit: settings.get_int('limitunit'), - revIndicator: settings.get_boolean('reverseindicators'), - lckMuseAct: settings.get_boolean('lockmouseactions'), - minWidth: settings.get_double('minwidth'), - iconsToRight: settings.get_boolean('iconstoright'), - textAlign: settings.get_int('textalign'), - cusFont: settings.get_string('customfont'), - hideInd: settings.get_boolean('hideindicator'), - shortenUnits: settings.get_boolean('shortenunits'), - nsPos: settings.get_int('wpos'), - systemColr: settings.get_boolean('systemcolr'), - nsPosAdv: settings.get_int('wposext'), - usColor: settings.get_string('uscolor'), - dsColor: settings.get_string('dscolor'), - tsColor: settings.get_string('tscolor'), - tdColor: settings.get_string('tdcolor') - }; - - B_UNITS = (currentSettings.shortenUnits) ? ['B', 'K', 'M', 'G', 'T', 'P', 'E', 'Z'] : [' B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB']; - - initNs(); -} - -function pushSettings() { - settings.set_int('mode', currentSettings.mode); - settings.set_int('fontmode', currentSettings.fontmode); - settings.set_boolean('togglebool', currentSettings.showTotalDwnld); - settings.set_boolean('isvertical', currentSettings.isVertical); - - initNs(); -} - -//Helper Functions -function DIcons(iNum) { - return [ - ["⬇", "⬆"], - ["🡳", "🡱"], - ["↓", "↑"] - ][currentSettings.chooseIconSet][iNum]; -} - -function nsPos() { - return ["right", "left", "center"][currentSettings.nsPos]; -} - -function nsPosAdv() { - return [3, 0][currentSettings.nsPosAdv]; -} - -function speedToString(amount, rMode = 0) { - - let speed_map = B_UNITS.map( - (rMode == 1 && (currentSettings.mode == 1 || currentSettings.mode == 3 || currentSettings.mode == 4)) ? v => v : //KB - (rMode == 1 && (currentSettings.mode == 0 || currentSettings.mode == 2)) ? v => v.toLowerCase() : //kb - (currentSettings.mode == 0 || currentSettings.mode == 2) ? v => v.toLowerCase() + "/s" : //kb/s - (currentSettings.mode == 1 || currentSettings.mode == 3) ? v => v + "/s" : //KB/s - v => v); // Others - - if (amount === 0) return " 0.0 " + speed_map[0]; - if (currentSettings.mode == 0 || currentSettings.mode == 2) amount = amount * 8; - - let unit = 0; - while (amount >= 1000) { // 1M=1024K, 1MB/s=1000MB/s - if (currentSettings.limitunit != 0 && unit >= currentSettings.limitunit) { - break; - } - amount /= 1000; - unit++; - } - - let digits = (currentSettings.mode == 4 || rMode != 0) ? 2 /* For floats like 21.11 and total speed mode */ : 1 //For floats like 21.2 - - let spaceNum = 3 - Math.ceil(Math.log10(amount + 1)); - spaceNum < 0 ? spaceNum = 0 : null - - return " ".repeat(spaceNum) + amount.toFixed(digits) + " " + speed_map[unit]; -} - -// NetSpeed Components -var usLabel, dsLabel, tsLabel, tdLabel, usIcon, dsIcon, tsIcon, tdIcon; - -function getStyle(isIcon = false) { - return (isIcon) ? 'size-' + (String(currentSettings.fontmode)) : ('forall size-' + String(currentSettings.fontmode)) -} - -function byteArrayToString(bytes) { - return new TextDecoder().decode(bytes); -} - -function initNsLabels() { - let extraInfo = currentSettings.cusFont ? "font-family: " + currentSettings.cusFont + "; " : ""; - let extraLabelInfo = extraInfo + "min-width: " + currentSettings.minWidth + "em; "; - extraLabelInfo += "text-align: " + ["left", "right", "center"][currentSettings.textAlign] + "; "; - - - usLabel = new St.Label({ - text: '--', - y_align: Clutter.ActorAlign.CENTER, - style_class: getStyle(), - style: extraLabelInfo + (currentSettings.systemColr ? "" : "color: " + currentSettings.usColor) - }); - - dsLabel = new St.Label({ - text: '--', - y_align: Clutter.ActorAlign.CENTER, - style_class: getStyle(), - style: extraLabelInfo + (currentSettings.systemColr ? "" : "color: " + currentSettings.dsColor) - }); - - tsLabel = new St.Label({ - text: '--', - y_align: Clutter.ActorAlign.CENTER, - style_class: getStyle(), - style: extraLabelInfo + (currentSettings.systemColr ? "" : "color: " + currentSettings.tsColor) - }); - - tdLabel = new St.Label({ - text: '--', - y_align: Clutter.ActorAlign.CENTER, - style_class: getStyle(), - style: extraLabelInfo + (currentSettings.systemColr ? "" : "color: " + currentSettings.tdColor) - }); - usIcon = new St.Label({ - text: DIcons(1), - y_align: Clutter.ActorAlign.CENTER, - style_class: getStyle(true), - style: extraInfo + (currentSettings.systemColr ? "" : "color: " + currentSettings.usColor) - }); - - dsIcon = new St.Label({ - text: DIcons(0), - y_align: Clutter.ActorAlign.CENTER, - style_class: getStyle(true), - style: extraInfo + (currentSettings.systemColr ? "" : "color: " + currentSettings.dsColor) - }); - - tsIcon = new St.Label({ - text: "⇅", - y_align: Clutter.ActorAlign.CENTER, - style_class: getStyle(true), - style: extraInfo + (currentSettings.systemColr ? "" : "color: " + currentSettings.tsColor) - }); - - tdIcon = new St.Label({ - text: "Σ", - y_align: Clutter.ActorAlign.CENTER, - style_class: getStyle(true), - style: extraInfo + (currentSettings.systemColr ? "" : "color: " + currentSettings.tdColor) - }); -} - -function updateNsLabels(up, down, up_down, total) { - usLabel.set_text(up); - dsLabel.set_text(down); - tsLabel.set_text(up_down); - tdLabel.set_text(total); -} - -// Initalize NetSpeed -var nsButton = null, - nsActor = null, - nsLayout = null; - -function initNs() { - - //Destroy the existing button. - nsDestroy(); - - //Initialize component Labels - initNsLabels(); - - //Allocate 3 * 3 grid (suited for all modes) - nsLayout = new Clutter.GridLayout(); - nsLayout.insert_row(1); - nsLayout.insert_row(2); - nsLayout.insert_column(1); - nsLayout.insert_column(2); - - nsActor = new Clutter.Actor({ - layout_manager: nsLayout, - y_align: Clutter.ActorAlign.CENTER - }) - - let verticalConstant = (currentSettings.isVertical) ? 1 : 0; - let heightConstant = 1 + verticalConstant; - let widthConstant = 2 * (1 - verticalConstant); - - //Attach the components to the grid. - if (currentSettings.mode == 0 || currentSettings.mode == 1) { - nsLayout.attach(!currentSettings.iconsToRight ? tsIcon : tsLabel, 0, 1, 1, 1); - nsLayout.attach(!currentSettings.iconsToRight ? tsLabel : tsIcon, 1, 1, 1, 1); - - if (currentSettings.showTotalDwnld) { - nsLayout.attach(!currentSettings.iconsToRight ? tdIcon : tdLabel, widthConstant, heightConstant, 1, 1); - nsLayout.attach(!currentSettings.iconsToRight ? tdLabel : tdIcon, 1 + widthConstant, heightConstant, 1, 1); - } - } else if (currentSettings.mode == 2 || currentSettings.mode == 3) { - if (currentSettings.revIndicator) { - nsLayout.attach(!currentSettings.iconsToRight ? usIcon : usLabel, 0, 1, 1, 1); - nsLayout.attach(!currentSettings.iconsToRight ? usLabel : usIcon, 1, 1, 1, 1); - nsLayout.attach(!currentSettings.iconsToRight ? dsIcon : dsLabel, widthConstant, heightConstant, 1, 1); - nsLayout.attach(!currentSettings.iconsToRight ? dsLabel : dsIcon, 1 + widthConstant, heightConstant, 1, 1); - } else { - nsLayout.attach(!currentSettings.iconsToRight ? dsIcon : dsLabel, 0, 1, 1, 1); - nsLayout.attach(!currentSettings.iconsToRight ? dsLabel : dsIcon, 1, 1, 1, 1); - nsLayout.attach(!currentSettings.iconsToRight ? usIcon : usLabel, widthConstant, heightConstant, 1, 1); - nsLayout.attach(!currentSettings.iconsToRight ? usLabel : usIcon, 1 + widthConstant, heightConstant, 1, 1); - } - - if (currentSettings.showTotalDwnld) { - nsLayout.attach(!currentSettings.iconsToRight ? tdIcon : tdLabel, 2 + widthConstant, heightConstant, 1, 1); - nsLayout.attach(!currentSettings.iconsToRight ? tdLabel : tdIcon, 3 + widthConstant, heightConstant, 1, 1); - } - } else { - nsLayout.attach(!currentSettings.iconsToRight ? tdIcon : tdLabel, 0, 1, 1, 1); - nsLayout.attach(!currentSettings.iconsToRight ? tdLabel : tdIcon, 1, 1, 1, 1); - } - - //Create the button and add to Main.panel - nsButton = new PanelMenu.Button(0.0, ButtonName); - - (!currentSettings.lckMuseAct) ? nsButton.connect('button-press-event', mouseEventHandler) : null; - nsButton.add_child(nsActor); - - Main.panel.addToStatusArea(ButtonName, nsButton, nsPosAdv(), nsPos()); -} - -function nsDestroy() { - nsButton != null ? nsButton.destroy() : null - nsButton = null; -} - -// Mouse Event Handler -var startTime = null, - rClickCount = 0; - -function mouseEventHandler(widget, event) { - if (event.get_button() == 3) { - if (currentSettings.mode == 4) - resetNextCount = true; // right click: reset downloaded sum - else - currentSettings.showTotalDwnld = !(currentSettings.showTotalDwnld); // right click on other modes brings total downloaded sum - - // Logic to toggle crStng.isVertical after rCConstant consequent right clicks. - if (startTime == null) { - startTime = new Date(); - } - - if (((new Date() - startTime) / 1000) <= currentSettings.refreshTime * 2) { - if (rClickCount == rCConst - 1) { - currentSettings.isVertical = !(currentSettings.isVertical); - startTime = null; - rClickCount = 0; - } else rClickCount++; - } else { - startTime = new Date(); - rClickCount = 1; - } - } else if (event.get_button() == 2) { // change font - currentSettings.fontmode++; - if (currentSettings.fontmode > 4) currentSettings.fontmode = 0; - } else if (event.get_button() == 1) { - currentSettings.mode++; - if (currentSettings.mode > 4) currentSettings.mode = 0; - } - - pushSettings(); - parseStat(); -} - -function parseStat() { - try { - let input_file = Gio.file_new_for_path('/proc/net/dev'); - let [, contents, etag] = input_file.load_contents(null); - contents = byteArrayToString(contents); - let lines = contents.split('\n'); - - let count = 0; - let countUp = 0; - let line; - - for (let i = 0; i < lines.length; i++) { - line = lines[i]; - line = line.trim(); - let fields = line.split(/\W+/); - if (fields.length <= 2) break; - - if (fields[0] != "lo" && - !fields[0].match(/^ifb[0-9]+/) && - !fields[0].match(/^lxdbr[0-9]+/) && - !fields[0].match(/^virbr[0-9]+/) && - !fields[0].match(/^br[0-9]+/) && - !fields[0].match(/^vnet[0-9]+/) && - !fields[0].match(/^veth[0-9a-zA-Z]+/) && - !fields[0].match(/^docker[0-9]+/) && - !fields[0].match(/^tun[0-9]+/) && - !fields[0].match(/^tap[0-9]+/) && - !fields[0].match(/^wg[0-9]+/) && - !fields[0].match(/^waydroid[0-9]+/) && - !isNaN(parseInt(fields[1]))) { - count = count + parseInt(fields[1]) + parseInt(fields[9]); - countUp = countUp + parseInt(fields[9]); - } - } - - if (lastCount === 0) lastCount = count; - if (lastCountUp === 0) lastCountUp = countUp; - - let speed = (count - lastCount) / currentSettings.refreshTime, - speedUp = (countUp - lastCountUp) / currentSettings.refreshTime; - - if (resetNextCount == true) { - resetNextCount = false; - resetCount = count; - } - - (speed || speedUp) ? hideCount = 0 : hideCount <= 8 ? hideCount++ : null - - if (hideCount <= 8) { - nsButton == null ? initNs() : null - - updateNsLabels(" " + speedToString(speedUp), - " " + speedToString(speed - speedUp), - " " + speedToString(speed), - " " + speedToString(count - resetCount, 1)); - } else { - if (currentSettings.hideInd) { - nsDestroy(); - } else { - nsButton == null ? initNs() : null - updateNsLabels('--', '--', '--', speedToString(count - resetCount, 1)); - } - } - - lastCount = count; - lastCountUp = countUp; - lastSpeed = speed; - - } catch (e) { - usLabel.set_text(e.message); - tsLabel.set_text(e.message); - tdLabel.set_text(e.message); - } - return true; -} - - -export default class NetSpeedSimplifiedExtension extends Extension { - _settingsChanged() { - if (settings.get_boolean('restartextension')) { - settings.set_boolean('restartextension', false); - this.disable(); - this.enable(); - parseStat(); - } - } - - enable() { - settings = this.getSettings(schema); - - fetchSettings(); // Automatically creates the netSpeed Button. - this._settingsChangedId = settings.connect('changed', () => this._settingsChanged()); - parseStat(); - - //Run infinite loop. - timeout = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, currentSettings.refreshTime, parseStat); - } - - disable() { - currentSettings = null; - settings = null; - - usLabel = null; - dsLabel = null; - tsLabel = null; - tdLabel = null; - usIcon = null; - dsIcon = null; - tsIcon = null; - tdIcon = null; - - GLib.source_remove(timeout); - nsDestroy(); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/netspeedsimplified@prateekmedia.extension/prefs.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/netspeedsimplified@prateekmedia.extension/prefs.js deleted file mode 100644 index 2f80d643..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/netspeedsimplified@prateekmedia.extension/prefs.js +++ /dev/null @@ -1,382 +0,0 @@ -import Gtk from 'gi://Gtk' -import Gdk from 'gi://Gdk' -import { ExtensionPreferences, gettext as _ } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js' -// import * as Config from 'resource:///org/gnome/Shell/Extensions/js/misc/config.js' -// const ShellVersion = parseFloat(Config.PACKAGE_VERSION) - -const schema = "org.gnome.shell.extensions.netspeedsimplified" - -let settings, currentSettings, vbox - -function fetchSettings() { - currentSettings = { - refreshtime: settings.get_double('refreshtime'), - mode: settings.get_int('mode'), - fontmode: settings.get_int('fontmode'), - togglebool: settings.get_boolean('togglebool'), - isvertical: settings.get_boolean('isvertical'), - chooseiconset: settings.get_int('chooseiconset'), - limitunit: settings.get_int('limitunit'), - reverseindicators: settings.get_boolean('reverseindicators'), - lockmouseactions: settings.get_boolean('lockmouseactions'), - minwidth: settings.get_double('minwidth'), - iconstoright: settings.get_boolean('iconstoright'), - textalign: settings.get_int('textalign'), - customfont: settings.get_string('customfont'), - hideindicator: settings.get_boolean('hideindicator'), - shortenunits: settings.get_boolean('shortenunits'), - wpos: settings.get_int('wpos'), - systemcolr: settings.get_boolean('systemcolr'), - wposext: settings.get_int('wposext'), - uscolor: settings.get_string('uscolor'), - dscolor: settings.get_string('dscolor'), - tscolor: settings.get_string('tscolor'), - tdcolor: settings.get_string('tdcolor') - } -} - -function addIt(element, child) { - element.append(child) -} - -function newGtkBox() { - return new Gtk.Box({ - orientation: Gtk.Orientation.HORIZONTAL, - margin_top: 10, - margin_bottom: 10 - }) -} - -class NssSpinBtn { - constructor(name, whichHbox, getLbl = "", getTooTip = "", lwer, uper, stpInc = 1, digs = 0, nume = true, pgeInc = 1, pgeSiz = 0, clmrate = 1) { - let boolComp = (currentSettings[name] === settings.get_default_value(name).unpack()) - getLbl = boolComp ? getLbl : - `<i>${getLbl}</i>` - let whichLbl = new Gtk.Label({ - label: getLbl, - use_markup: true, - xalign: 0, - tooltip_text: getTooTip - }) - let whichSpinBtn = new Gtk.SpinButton({ - adjustment: new Gtk.Adjustment({ - lower: lwer, - upper: uper, - step_increment: stpInc, - page_increment: pgeInc, - page_size: pgeSiz - }), - climb_rate: clmrate, - digits: digs, - numeric: nume, - }) - whichSpinBtn.set_value(currentSettings[name]) - whichSpinBtn.connect('value-changed', () => { - this.rTValue = parseFloat(whichSpinBtn.get_value().toFixed(1)) - if (currentSettings[name] !== this.rTValue) { - settings.set_double(name, this.rTValue) - settings.set_boolean('restartextension', true) - } - - currentSettings[name] = this.rTValue - }) - whichLbl.set_hexpand(true) - addIt(whichHbox, whichLbl) - addIt(whichHbox, whichSpinBtn) - - addIt(vbox, whichHbox) - } -} - -class NssComboBox { - constructor(name, whichHbox, getLbl, aRray = [], getTooTip = "") { - let boolComp = (currentSettings[name] == settings.get_default_value(name).unpack()) - getLbl = boolComp ? getLbl : - `<i>${getLbl}</i>` - let tootext = boolComp ? "" : "The Value is Changed" - - let whichLbl = new Gtk.Label({ - label: getLbl, - use_markup: true, - xalign: 0, - tooltip_text: getTooTip - }) - let whichVlue = new Gtk.ComboBoxText({ - halign: Gtk.Align.END, - tooltip_text: tootext - }) - - aRray.forEach((val, _, __) => whichVlue.append_text(val)) - - - whichVlue.set_active(currentSettings[name]) - whichVlue.connect('changed', (widget) => { - let valueMode = widget.get_active() - settings.set_int(name, valueMode) - settings.set_boolean('restartextension', true) - - currentSettings[name] = valueMode - }) - whichLbl.set_hexpand(true) - addIt(whichHbox, whichLbl) - addIt(whichHbox, whichVlue) - - addIt(vbox, whichHbox) - } -} - -class NssToggleBtn { - constructor(whichHbox, getLbl, name, getTooTip = "", func) { - let boolComp = true - if (func == undefined) { - boolComp = (currentSettings[name] == settings.get_default_value(name).unpack()) - getLbl = boolComp ? getLbl : - `<i>${getLbl}</i>` - } - let tootext = boolComp ? "" : "The Value is Changed" - let whichLbl = new Gtk.Label({ - label: getLbl, - use_markup: true, - xalign: 0, - tooltip_text: getTooTip - }) - let whichVlue = new Gtk.Switch({ - active: name ? currentSettings[name] : false, - tooltip_text: tootext - }) - whichVlue.connect('notify::active', (widget) => { - if (func != undefined) - func(widget.active) - else { - settings.set_boolean(name, widget.active) - settings.set_boolean('restartextension', true) - } - - currentSettings[name] = widget.active - }) - - whichLbl.set_hexpand(true) - addIt(whichHbox, whichLbl) - addIt(whichHbox, whichVlue) - - addIt(vbox, whichHbox) - } -} - -class NssColorBtn { - constructor(whichHbox, getLbl, name, getToolTip = "") { - //Deterime whether the option value is changed from default value - let boolComp = (currentSettings[name] == settings.get_default_value(name).unpack()) - getLbl = boolComp ? getLbl : `<i>${getLbl}</i>` - let tootext = boolComp ? "" : "The Value is Changed" - - //Create the option name - let whichLbl = new Gtk.Label({ - label: getLbl, - use_markup: true, - xalign: 0, - tooltip_text: getToolTip - }) - - //Create RGBA - let rgba = new Gdk.RGBA() - rgba.parse(currentSettings[name]) - - //Create ColorButton - let colorButton = new Gtk.ColorButton({ - tooltip_text: tootext - }) - colorButton.set_rgba(rgba) - colorButton.connect('color-set', (widget) => { - rgba = widget.get_rgba() - settings.set_string(name, rgba.to_string()) - settings.set_boolean('restartextension', true) - - currentSettings[name] = rgba.to_string() - }) - - whichLbl.set_hexpand(true) - addIt(whichHbox, whichLbl) - addIt(whichHbox, colorButton) - - addIt(vbox, whichHbox) - } -} - -class NssEntry { - constructor(whichHbox, getLbl, name, getTooTip = "", func) { - let boolComp = (currentSettings[name] == settings.get_default_value(name).unpack()) - getLbl = boolComp ? getLbl : - `<i>${getLbl}</i>` - let tootext = boolComp ? "" : "The Value is Changed" - let whichLbl = new Gtk.Label({ - label: getLbl, - use_markup: true, - xalign: 0, - tooltip_text: getTooTip - }) - let whichVlue = new Gtk.Entry({ - text: currentSettings[name], - tooltip_text: tootext, - placeholder_text: "Press Enter to apply" - }) - whichVlue.connect('activate', (widget) => { - settings.set_string(name, widget.get_text()) - if (func != undefined) { - func(widget.active) - } else { - settings.set_boolean('restartextension', true) - } - - currentSettings[name] = widget.get_text() - }) - - whichLbl.set_hexpand(true) - addIt(whichHbox, whichLbl) - addIt(whichHbox, whichVlue) - - addIt(vbox, whichHbox) - } -} - -export default class NetSpeedSimplifiedPreferences extends ExtensionPreferences { - async getPreferencesWidget() { - settings = this.getSettings(schema) - window._settings = settings - - await fetchSettings() - - let frame = new Gtk.ScrolledWindow() - let label = new Gtk.Label({ - label: "<b>General Settings</b>", - use_markup: true, - xalign: 0, - margin_top: 15 - }) - vbox = new Gtk.Box({ - orientation: Gtk.Orientation.VERTICAL, - margin_start: 25, - margin_end: 25, - vexpand: true, - }) - let resetBtn = new Gtk.Button({ - label: "Restore Defaults", - margin_bottom: 15 - }) - - resetBtn.connect("clicked", async () => { - let strArray = ["customfont", "uscolor", "dscolor", "tscolor", "tdcolor"] - let intArray = ["wpos", "wposext", "mode", "fontmode", "chooseiconset", "textalign"] - let doubleArray = ["refreshtime", "minwidth"] - let boolArray = ["isvertical", "togglebool", "reverseindicators", "lockmouseactions", "hideindicator", "shortenunits", "iconstoright"] - for (const i in strArray) { - settings.set_string(strArray[i], settings.get_default_value(strArray[i]).unpack()) - } - for (const j in intArray) { - settings.set_int(intArray[j], settings.get_default_value(intArray[j]).unpack()) - } - for (const k in doubleArray) { - settings.set_double(doubleArray[k], settings.get_default_value(doubleArray[k]).unpack()) - } - for (const l in boolArray) { - settings.set_boolean(boolArray[l], settings.get_default_value(boolArray[l]).unpack()) - } - settings.set_boolean('restartextension', true) - await fetchSettings() - }) - - addIt(vbox, label) - // For Position - let hboxWPos = newGtkBox() - new NssComboBox("wpos", hboxWPos, "Position on the Panel", ["Right", "Left", "Center"], "Choose where to Place the extension on the Panel") - - // For Position Extras - let hboxWPosExt = newGtkBox() - new NssComboBox("wposext", hboxWPosExt, "Position(Advanced)", ["Prefer Right Side", "Prefer Left Side"], "Choose further where to Place the extension") - - // Refresh time - let hboxRTime = newGtkBox() - new NssSpinBtn("refreshtime", hboxRTime, "Refresh Time", "Change Refresh time value from anywhere b/w 1 to 10", 1.0, 10.0, .1, 1) - - // For Modes - let hboxMode = newGtkBox() - new NssComboBox("mode", hboxMode, "Mode", ["Mode 1", "Mode 2", "Mode 3", "Mode 4", "Mode 5"], "Choose which mode to load") - - // For FontModes - let hboxFontMode = newGtkBox() - new NssComboBox("fontmode", hboxFontMode, "Font Mode", ["Default", "Smallest", "Smaller", "Small", "Large"], "Choose which font to display") - - // For Vertical Alignment - let hboxVertical = newGtkBox() - new NssToggleBtn(hboxVertical, "Vertical Align", "isvertical", "Changing it will toggle Vertical Alignment") - - // For Default sigma View - let hboxToggleBool = newGtkBox() - new NssToggleBtn(hboxToggleBool, "Show Total Data Transfer", "togglebool", "Enabling it will always show the sigma") - - // For Toggling Old Icons - let hboxIconset = newGtkBox() - new NssComboBox("chooseiconset", hboxIconset, "Choose Icons Set", [" ⬇, ⬆", " 🡳, 🡱", " ↓, ↑"], "Choose which icon set to display") - - // Text align for net speed - let hboxText = newGtkBox() - new NssComboBox("textalign", hboxText, "Text Align", ["Left", "Right", "Center"], "Align Text of net speed") - - // Toggle icon to right - let hboxIconsRight = newGtkBox() - new NssToggleBtn(hboxIconsRight, "Move icons to the right", "iconstoright", "Move icons to the right") - - // For Limiting upper limit of speed - let hboxLimitUnit = newGtkBox() - new NssComboBox("limitunit", hboxLimitUnit, "Limit Unit", ["(None)", 'K', 'M', 'G', 'T', 'P', 'E', 'Z'], "Choose unit limitation set to display") - - // For Hide When Disconnected - let hboxHideInd = newGtkBox() - new NssToggleBtn(hboxHideInd, "Hide When Disconnected", "hideindicator", "Enabling it will Hide Indicator when disconnected") - - // For Shorten Units - let hboxShUni = newGtkBox() - new NssToggleBtn(hboxShUni, "Shorten Units", "shortenunits", "Enabling it will result in shorten units like K instead of KB") - - // For Reversing the download and upload indicators - let hboxRevInd = newGtkBox() - new NssToggleBtn(hboxRevInd, "Show Upload First", "reverseindicators", "Enabling it will reverse the upload and download speed indicators") - - // For Lock Mouse Actions - let hboxLckMuseAct = newGtkBox() - new NssToggleBtn(hboxLckMuseAct, "Lock Mouse Actions", "lockmouseactions", "Enabling it will Lock Mouse Actions") - - // Minimum Width - let hboxMinWidth = newGtkBox() - new NssSpinBtn("minwidth", hboxMinWidth, "Minimum Width", "Change Minimum Width value from anywhere b/w 3em to 10em", 3.0, 10.0, .5, 1) - - // For Custom Font name - let hboxCustFont = newGtkBox() - new NssEntry(hboxCustFont, "Custom Font Name", "customfont", "Enter the font name you want, you can also write style here for all elements except indicators") - - // For Custom Font name - let hboxSysColr = newGtkBox() - new NssToggleBtn(hboxSysColr, "Use System Color Scheme", "systemcolr", "Enabling it will allow changing font color dynamically based on panel color") - - // Upload Speed Color - let usColorButton = newGtkBox() - new NssColorBtn(usColorButton, "Upload Speed Color", "uscolor", "Select the upload speed color") - - // Download Speed Color - let dsColorButton = newGtkBox() - new NssColorBtn(dsColorButton, "Download Speed Color", "dscolor", "Select the download speed color") - - // Total Speed Color - let tsColorButton = newGtkBox() - new NssColorBtn(tsColorButton, "Total Speed Color", "tscolor", "Select the total speed color") - - // Total Download Color - let tdColorButton = newGtkBox() - new NssColorBtn(tdColorButton, "Total Download Color", "tdcolor", "Select the total download color") - - addIt(vbox, resetBtn) - frame.child = vbox - - return frame - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/netspeedsimplified@prateekmedia.extension/private_metadata.json b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/netspeedsimplified@prateekmedia.extension/private_metadata.json deleted file mode 100644 index f7b780c9..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/netspeedsimplified@prateekmedia.extension/private_metadata.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "_generated": "Generated by SweetTooth, do not edit", - "description": "A Net Speed extension With Loads of Customization. Fork of simplenetspeed\n\nFull CHANGELOG can be found on github releases page\n\nFeatures \n1. Clean UI \n2. Adjustable Refresh rate \n3. Preferences to manage extension \n4. Vertical Alignment Support \n5. Two Icon sets for Indicators \n\nFeature Highlights for Preferences \n1. Lock Mouse Actions option \n2. Advance Position options to pinpoint where to place the indicator on the Panel. \n3. Refresh time option by which you can change refresh rate value between 1.0 and 10.0 seconds. \n4. Option to show upload speed first \n5. Color Customizations for speed indicators \n6. Option to Hide when Disconnected \n7. Option to use shorter units like K/s instead of KB/s \n8. Limit Unit option and more... \n\nModes \n1. Total net speed in terms of bits per second \n2. Total net speed in terms of bytes per second \n3. Combined Up & down speed in terms of bits per second \n4. Combined Up & down speed in terms of bytes per second \n5. Total transferred data in terms of bytes (Right click to reset counter) \n\nMouse Events \n- Left click to change modes \n- Right click(in 1-4 modes): Toggle the visibility of total transfer data. \n- Right click(in 5th mode): Reset total transfer data. \n- Right Click(Four consecutive times): Toggle through horizontal/vertical alignment. \n- Middle click: Cycle through the font sizes.", - "name": "Net speed Simplified", - "shell-version": [ - "45", - "46", - "47" - ], - "url": "https://github.com/prateekmedia/netspeedsimplified", - "uuid": "netspeedsimplified@prateekmedia.extension", - "version": 43 -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/netspeedsimplified@prateekmedia.extension/schemas/gschemas.compiled b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/netspeedsimplified@prateekmedia.extension/schemas/gschemas.compiled deleted file mode 100644 index b744b162..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/netspeedsimplified@prateekmedia.extension/schemas/gschemas.compiled and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/netspeedsimplified@prateekmedia.extension/schemas/org.gnome.shell.extensions.netspeedsimplified.gschema.xml b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/netspeedsimplified@prateekmedia.extension/schemas/org.gnome.shell.extensions.netspeedsimplified.gschema.xml deleted file mode 100644 index 96ed2a08..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/netspeedsimplified@prateekmedia.extension/schemas/org.gnome.shell.extensions.netspeedsimplified.gschema.xml +++ /dev/null @@ -1,82 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<schemalist gettext-domain="netspeedsimplified@prateekmedia.extension"> - <schema path="/org/gnome/shell/extensions/netspeedsimplified/" id="org.gnome.shell.extensions.netspeedsimplified"> - <key name="mode" type="i"> - <range min="0" max="4" /> - <default>1</default> - </key> - <key name="fontmode" type="i"> - <range min="0" max="4" /> - <default>0</default> - </key> - <key name="wpos" type="i"> - <range min="0" max="2" /> - <default>0</default> - </key> - <key name="wposext" type="i"> - <range min="0" max="1" /> - <default>0</default> - </key> - <key name="refreshtime" type="d"> - <range min="1.0" max="10.0" /> - <default>2.0</default> - </key> - <key name="iconstoright" type="b"> - <default>false</default> - </key> - <key name="textalign" type="i"> - <default>1</default> - </key> - <key name="togglebool" type="b"> - <default>true</default> - </key> - <key name="isvertical" type="b"> - <default>false</default> - </key> - <key name="restartextension" type="b"> - <default>false</default> - </key> - <key name="chooseiconset" type="i"> - <range min="0" max="2" /> - <default>0</default> - </key> - <key name="limitunit" type="i"> - <range min="0" max="7" /> - <default>0</default> - </key> - <key name="lockmouseactions" type="b"> - <default>false</default> - </key> - <key name="minwidth" type="d"> - <range min="3.0" max="10.0" /> - <default>3.0</default> - </key> - <key name="reverseindicators" type="b"> - <default>false</default> - </key> - <key name="hideindicator" type="b"> - <default>true</default> - </key> - <key name="shortenunits" type="b"> - <default>false</default> - </key> - <key name="customfont" type="s"> - <default>""</default> - </key> - <key name="systemcolr" type="b"> - <default>false</default> - </key> - <key name="uscolor" type="s"> - <default>"rgba(255, 255, 255, 1)"</default> - </key> - <key name="dscolor" type="s"> - <default>"rgba(255, 255, 255, 1)"</default> - </key> - <key name="tdcolor" type="s"> - <default>"rgba(255, 255, 255, 1)"</default> - </key> - <key name="tscolor" type="s"> - <default>"rgba(255, 255, 255, 1)"</default> - </key> - </schema> -</schemalist> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/netspeedsimplified@prateekmedia.extension/stylesheet.css b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/netspeedsimplified@prateekmedia.extension/stylesheet.css deleted file mode 100644 index 872808a1..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/netspeedsimplified@prateekmedia.extension/stylesheet.css +++ /dev/null @@ -1,27 +0,0 @@ -/* For all elements */ -.forall { - text-align: right; - margin: 0 8px; - min-width: 6.5em; -} - -/* Font change on middle click*/ -.size-0 { - font-size: 1em; -} - -.size-1 { - font-size: .65em; -} - -.size-2 { - font-size: .7em; -} - -.size-3 { - font-size: .9em; -} - -.size-4 { - font-size: 1.1em; -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/AUTHORS b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/AUTHORS deleted file mode 100644 index b996a1c0..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/AUTHORS +++ /dev/null @@ -1,25 +0,0 @@ -# This is the list of OpenWeather (Refined)'s significant contributors. -# -# This does not necessarily list everyone who has contributed -# code. To see the full list of contributors, see the revision -# history in source control. - -# Current Author - -2023-2024 - TealPenguin - -# The individuals below have contributed to the project prior -# to the projects current fork: - - 2023 - Kenneth Topp -2021-2023 - Jason Oickle -2013-2021 - Jens Lody - 2018 - Taylor Raack -2011-2013 - Christian Metzler - Elad Alfassa - Mark Benjamin - Simon Claessens - Ecyrbe - Timur Kristóf - Simon Legner - Mattia Meneguzzo diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/COPYING b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/COPYING deleted file mode 100644 index f288702d..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <https://www.gnu.org/licenses/>. - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - <program> Copyright (C) <year> <name of author> - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -<https://www.gnu.org/licenses/>. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/constants.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/constants.js deleted file mode 100644 index 34c1020a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/constants.js +++ /dev/null @@ -1,69 +0,0 @@ -const WeatherUnits = { - CELSIUS: 0, - FAHRENHEIT: 1, - KELVIN: 2, - RANKINE: 3, - REAUMUR: 4, - ROEMER: 5, - DELISLE: 6, - NEWTON: 7, -}; - -const WeatherWindSpeedUnits = { - KPH: 0, - MPH: 1, - MPS: 2, - KNOTS: 3, - FPS: 4, - BEAUFORT: 5, -}; - -const WeatherPressureUnits = { - HPA: 0, - INHG: 1, - BAR: 2, - PA: 3, - KPA: 4, - ATM: 5, - AT: 6, - TORR: 7, - PSI: 8, - MMHG: 9, - MBAR: 10, -}; - -const HiContrastStyle = { - NONE: 0, - WHITE: 1, - BLACK: 2 -}; - -const ClockFormat = { - _24H: 0, - _12H: 1, - SYSTEM: 2 -}; - -const WeatherPosition = { - CENTER: 0, - RIGHT: 1, - LEFT: 2, -}; - -// Keep enums in sync with GSettings schemas -const GeolocationProvider = { - OPENSTREETMAPS: 0, - /* Geocode.Farm is no longer valid but kept here for migration. */ - GEOCODE: 1, - MAPQUEST: 2, -}; - -export { - WeatherUnits, - WeatherWindSpeedUnits, - WeatherPressureUnits, - HiContrastStyle, - ClockFormat, - WeatherPosition, - GeolocationProvider, -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/extension.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/extension.js deleted file mode 100644 index e1f8aa03..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/extension.js +++ /dev/null @@ -1,2000 +0,0 @@ -/* - This file is part of OpenWeather (gnome-shell-extension-openweather). - - OpenWeather is free software: you can redistribute it and/or modify it under the terms of - the GNU General Public License as published by the Free Software Foundation, either - version 3 of the License, or (at your option) any later version. - - OpenWeather is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with OpenWeather. - If not, see <https://www.gnu.org/licenses/>. - - Copyright 2022 Jason Oickle -*/ -import Clutter from "gi://Clutter"; -import Gio from "gi://Gio"; -import GLib from "gi://GLib"; -import GObject from "gi://GObject"; -import St from "gi://St"; - -import { - Extension, - gettext as _, -} from "resource:///org/gnome/shell/extensions/extension.js"; - -import * as Main from "resource:///org/gnome/shell/ui/main.js"; -import * as PanelMenu from "resource:///org/gnome/shell/ui/panelMenu.js"; -import * as PopupMenu from "resource:///org/gnome/shell/ui/popupMenu.js"; - -import * as GnomeSession from "resource:///org/gnome/shell/misc/gnomeSession.js"; - -import * as OpenWeatherMap from "./openweathermap.js"; -import { - WeatherUnits, - WeatherWindSpeedUnits, - WeatherPressureUnits, - WeatherPosition, - HiContrastStyle, - ClockFormat -} from "./constants.js"; - -import { - freeSoup, - setLocationRefreshIntervalM, - getLocationInfo, - getCachedLocInfo, - MyLocProv, - geoclueGetLoc -} from "./myloc.js" - -import { Loc, settingsGetKeys, settingsGetLocs, settingsSetLocs } from "./locs.js"; -import { tryImportAndMigrate, tryMigrateFromOldVersion } from "./migration.js"; -import { - getWeatherProviderName, - getWeatherProviderUrl, - getWeatherProvider, - DEFAULT_KEYS -} from "./getweather.js"; - -let _firstBoot = 1; -let _timeCacheCurrentWeather; -let _timeCacheForecastWeather; -let _isFirstRun = null; -let _freezeSettingsChanged = false; -let _systemClockFormat = 1; - -function toYYYYMMDD(date) -{ - let d = date.getUTCDate(); - let m = date.getUTCMonth(); - let y = date.getUTCFullYear(); - return `${y}/${m < 10 ? '0' + m : m}/${d < 10 ? '0' + d : d}`; -} - -function hscroll(scrollView) -{ - return scrollView.hadjustment ?? scrollView.hscroll.adjustment; -} - -function vscroll(scrollView) -{ - return scrollView.vadjustment ?? scrollView.vscroll.adjustment; -} - -function st13AddActor(parent, child) -{ - // Online it seems like add_actor and add_child should be synonymous - // But in GNOME 45 add_child seems to cause GitHub issues #16, #17, and #18 - - // This function is needed for backwards GNOME 45 compatibility from 46 - if(parent.add_actor) parent.add_actor(child); - else parent.add_child(child); -} - -function st13AddActors(parent, ...children) -{ - for(let c of children) st13AddActor(parent, c); -} - -function st13RemoveActor(parent, child) -{ - // Because St 13 is weird (see st13AddActor function above) - if(parent.remove_actor) parent.remove_actor(child); - else parent.remove_child(child); -} - -class OpenWeatherMenuButton extends PanelMenu.Button { - static { - GObject.registerClass(this); - } - - _addWeatherToBox(topBox) - { - this._weatherIcon = new St.Icon({ - icon_name: "view-refresh-symbolic", - style_class: "system-status-icon openweather-icon", - }); - this._weatherInfo = new St.Label({ - style_class: "openweather-label", - text: "...", - y_align: Clutter.ActorAlign.CENTER, - y_expand: true, - }); - - topBox.add_child(this._weatherIcon); - topBox.add_child(this._weatherInfo); - } - - _addSunToBox(topBox) - { - let timeHrs = new Date().getHours(); - let isProbDay = timeHrs >= 6 && timeHrs <= 19; - - this.topBoxSunIcon = new St.Icon({ - icon_name: isProbDay ? "daytime-sunset-symbolic" : "daytime-sunrise-symbolic", - style_class: "system-status-icon openweather-icon" - }); - this.topBoxSunInfo = new St.Label({ - text: "...", - y_align: Clutter.ActorAlign.CENTER, - y_expand: true - }); - if(!this._show_sunriseset_in_panel) - { - this.topBoxSunIcon.hide(); - this.topBoxSunInfo.hide(); - } - - topBox.add_child(this.topBoxSunIcon); - topBox.add_child(this.topBoxSunInfo); - } - - _init(metadata, settings) { - super._init(0, "OpenWeatherMenuButton", false); - this.settings = settings; - this.metadata = metadata; - this.gSettings = Gio.Settings.new("org.gnome.desktop.interface"); - - // Putting the panel item together - let topBox = new St.BoxLayout({ - style_class: "panel-status-menu-box", - }); - - if(this._sun_in_panel_first) - { - this._addSunToBox(topBox); - this._addWeatherToBox(topBox); - } - else - { - this._addWeatherToBox(topBox); - this._addSunToBox(topBox); - } - - this.add_child(topBox); - if (Main.panel._menus === undefined) - Main.panel.menuManager.addMenu(this.menu); - else Main.panel._menus.addMenu(this.menu); - - this.loadConfig().then(() => - { - // Setup network things - this._idle = false; - this._connected = false; - this._network_monitor = Gio.network_monitor_get_default(); - - // Bind signals - this._presence = new GnomeSession.Presence((proxy, _error) => { - this._onStatusChanged(proxy.status); - }); - this._presence_connection = this._presence.connectSignal( - "StatusChanged", - (_proxy, _senderName, [status]) => { - this._onStatusChanged(status); - } - ); - this._network_monitor_connection = this._network_monitor.connect( - "network-changed", - this._onNetworkStateChanged.bind(this) - ); - - this.menu.connect("open-state-changed", this.recalcLayout.bind(this)); - - let _firstBootWait = this._startupDelay; - if (_firstBoot && _firstBootWait !== 0) - { - // Delay popup initialization and data fetch on the first - // extension load, ie: first log in / restart gnome shell - this._timeoutFirstBoot = GLib.timeout_add_seconds( - GLib.PRIORITY_DEFAULT, - _firstBootWait, - () => { - try - { - this._checkConnectionState(); - this.initOpenWeatherUI(); - _firstBoot = 0; - this._timeoutFirstBoot = null; - } - catch(e) - { - console.log("OpenWeather Refined: Error in first boot timeout."); - console.error(e); - } - return false; // run timer once then destroy - } - ); - } - else - { - try - { - this._checkConnectionState(); - this.initOpenWeatherUI(); - } - catch(e) - { - console.log("OpenWeather Refined: Error in immediate first boot."); - console.error(e); - } - } - }, (e) => - { - console.error(`OpenWeather Refined: Error '${e}' in loadConfig.`); - console.error(e); - Main.notify("OpenWeather Refined", _("Failed to initialize.")); - let now = new Date(); - this.settings.set_string("last-init-error", `(${toYYYYMMDD(now)}) ${e}`); - }); - } - - initOpenWeatherUI() { - this.owmCityId = 0; - this.useOpenWeatherMap(); - this.checkPositionInPanel(); - - this._currentWeather = new PopupMenu.PopupBaseMenuItem({ - reactive: false, - }); - if (!this._isForecastDisabled) { - this._currentForecast = new PopupMenu.PopupBaseMenuItem({ - reactive: false, - }); - if (this._forecastDays !== 0) { - this._forecastExpander = new PopupMenu.PopupSubMenuMenuItem(""); - } - } - this._buttonMenu = new PopupMenu.PopupBaseMenuItem({ - reactive: false, - style_class: "openweather-menu-button-container", - }); - this._selectCity = new PopupMenu.PopupSubMenuMenuItem(""); - this._selectCity.actor.set_height(0); - this._selectCity._triangle.set_height(0); - - this.rebuildCurrentWeatherUi(); - this.rebuildFutureWeatherUi(); - this.rebuildButtonMenu(); - this.rebuildSelectCityItem(); - - this.menu.addMenuItem(this._currentWeather); - if (!this._isForecastDisabled) { - this.menu.addMenuItem(this._currentForecast); - if (this._forecastDays !== 0) { - this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); - this.menu.addMenuItem(this._forecastExpander); - } - } - this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); - this.menu.addMenuItem(this._buttonMenu); - this.menu.addMenuItem(this._selectCity); - this.checkAlignment(); - } - - _onStatusChanged(status) { - this._idle = false; - - if (status === GnomeSession.PresenceStatus.IDLE) { - this._idle = true; - } - } - - stop() - { - freeSoup(); - - if (this._timeoutCurrent) { - GLib.source_remove(this._timeoutCurrent); - this._timeoutCurrent = null; - } - if (this._timeoutFirstBoot) { - GLib.source_remove(this._timeoutFirstBoot); - this._timeoutFirstBoot = null; - } - - if (this._timeoutMenuAlignent) { - GLib.source_remove(this._timeoutMenuAlignent); - this._timeoutMenuAlignent = null; - } - - if (this._timeoutCheckConnectionState) { - GLib.source_remove(this._timeoutCheckConnectionState); - this._timeoutCheckConnectionState = null; - } - - if (this._presence_connection) { - this._presence.disconnectSignal(this._presence_connection); - this._presence_connection = undefined; - } - - if (this._network_monitor_connection) { - this._network_monitor.disconnect(this._network_monitor_connection); - this._network_monitor_connection = undefined; - } - - if (this._settingsC) - { - this.settings.disconnect(this._settingsC); - this._settingsC = undefined; - } - - if (this._gSettingsC) - { - this.gSettings.disconnect(this._gSettingsC); - this._gSettingsC = undefined; - } - - if (this._settingsInterfaceC) { - this._settingsInterface.disconnect(this._settingsInterfaceC); - this._settingsInterfaceC = undefined; - } - - if (this._globalThemeChangedId) { - let context = St.ThemeContext.get_for_stage(global.stage); - context.disconnect(this._globalThemeChangedId); - this._globalThemeChangedId = undefined; - } - } - - get weatherProvider() - { - return getWeatherProvider(this.settings); - } - - useOpenWeatherMap() { - this.initWeatherData = OpenWeatherMap.initWeatherData; - this.reloadWeatherCache = OpenWeatherMap.reloadWeatherCache; - this.refreshWeatherData = OpenWeatherMap.refreshWeatherData; - this.populateCurrentUI = OpenWeatherMap.populateCurrentUI; - - if (!this._isForecastDisabled) { - this.populateTodaysUI = OpenWeatherMap.populateTodaysUI; - this.populateForecastUI = OpenWeatherMap.populateForecastUI; - } - - if (this.getWeatherKey().trim() === "") - Main.notify( - "OpenWeather Refined", - _( - "%s does not work without an api-key.\nEither set the switch to use the extensions default key in the preferences dialog to on or register at %s and paste your personal key into the preferences dialog." - ).format(getWeatherProviderName(this.weatherProvider), getWeatherProviderUrl(this.weatherProvider)) - ); - } - - isFirstRun(forceRecalc = false) - { - if(_isFirstRun === null || forceRecalc) - { - _isFirstRun = !this.settings.get_boolean("has-run"); - if(_isFirstRun) - { - this.freezeSettingsChanged(); - this.settings.set_boolean("has-run", true); - this.unfreezeSettingsChanged(); - } - } - return _isFirstRun; - } - - freezeSettingsChanged() - { - _freezeSettingsChanged = true; - } - - unfreezeSettingsChanged() - { - _freezeSettingsChanged = false; - } - - hasBattery() - { - let batt = Gio.File.new_for_path("/sys/class/power_supply/BAT0"); - return batt.query_exists(null); - } - - async getDefaultCity() - { - if(this.hasBattery()) return Loc.myLoc(); - else - { - let info = await getLocationInfo(this.settings); - if(!info || info.countryShort === "Unknown") return Loc.myLoc(); - - return Loc.fromNameCoords(info.name, info.lat, info.lon); - } - } - - async firstRunSetDefaults() - { - if(this.isFirstRun(true)) - { - this.freezeSettingsChanged(); - - let migrated = tryImportAndMigrate(this.settings); - if(migrated) - { - Main.notify("OpenWeather Refined", _("OpenWeather Refined: Imported settings from old extension.")); - } - - if(this.settings.get_enum("my-loc-prov") === MyLocProv.GEOCLUE) - { - try - { - // Don't use Nominatim to ensure it is Geoclue that failed - // and not Nominatim, the Internet connection, etc. - await geoclueGetLoc(false); - } - catch(e) - { - console.warn(`OpenWeather Refined: Geoclue failed ('${e}'); changing provider to ipinfo.io.`); - this.settings.set_enum("my-loc-prov", MyLocProv.INFOIPIO); - } - } - - if(!migrated) - { - let locInfo = await getLocationInfo(this.settings, true); - - if(locInfo && locInfo.countryShort === "US") - { - this.settings.set_enum("unit", WeatherUnits.FAHRENHEIT); - this.settings.set_enum("wind-speed-unit", WeatherWindSpeedUnits.MPH); - this.settings.set_enum("pressure-unit", WeatherPressureUnits.INHG); - } - - let defCity = await this.getDefaultCity(); - if(!defCity.equals(Loc.myLoc())) - { - settingsSetLocs(this.settings, [ defCity ]); - } - } - } - else - { - tryMigrateFromOldVersion(this.settings); - } - - this.unfreezeSettingsChanged(); - } - - toggleSunriseSunset() - { - if(this._show_sunriseset_in_panel) - { - this.topBoxSunIcon.show(); - this.topBoxSunInfo.show(); - } - else - { - this.topBoxSunIcon.hide(); - this.topBoxSunInfo.hide(); - } - } - - updateForecast() - { - if (this.disableForecastChanged()) - { - let _children = this._isForecastDisabled ? 4 : 7; - if (this._forecastDays === 0) { - _children = this.menu.box.get_children().length - 1; - } - for (let i = 0; i < _children; i++) { - this.menu.box.get_child_at_index(0).destroy(); - } - this._isForecastDisabled = this._disable_forecast; - this.initOpenWeatherUI(); - this._clearWeatherCache(); - this.initWeatherData(); - } - } - - async settingsHandler() - { - if(_freezeSettingsChanged || this.settings.get_boolean("frozen")) return; - - try - { - await this.firstRunSetDefaults(); - } - catch(e) - { - console.error(`OpenWeather Refined: Error '${e}' in firstRunSetDefaults.`); - throw e; - } - - try - { - this._cities = settingsGetLocs(this.settings); - if (!this._cities.length) - { - this._cities = [ await this.getDefaultCity() ]; - } - - setLocationRefreshIntervalM(this.settings.get_double("loc-refresh-interval")); - - this.toggleSunriseSunset(); - - _systemClockFormat = this.gSettings.get_enum("clock-format"); - - this.updateForecast(); - - if (await this.locationChanged()) - { - this.showRefreshing(); - if (this._selectCity._getOpenState()) this._selectCity.menu.toggle(); - this._currentLocation = await this._city.getCoords(this.settings); - this.rebuildSelectCityItem(); - this._clearWeatherCache(); - this.initWeatherData(); - } - - if (this.menuAlignmentChanged()) - { - if (this._timeoutMenuAlignent) - GLib.source_remove(this._timeoutMenuAlignent); - // Use 1 second timeout to avoid crashes and spamming - // the logs while changing the slider position in prefs - this._timeoutMenuAlignent = GLib.timeout_add( - GLib.PRIORITY_DEFAULT, - 1000, - () => { - this.checkAlignment(); - this._currentAlignment = this._menu_alignment; - this._timeoutMenuAlignent = null; - return false; // run once then destroy - } - ); - } - - if (this._forecastDays !== this._days_forecast) - { - let _oldDays = this._forecastDays; - let _newDays = this._days_forecast; - this._forecastDays = _newDays; - - if (_oldDays >= 1 && _newDays === 0) { - this._forecastExpander.destroy(); - return; - } else if (_oldDays === 0 && _newDays >= 1) { - let _children = this.menu.box.get_children().length - 1; - for (let i = 0; i < _children; i++) { - this.menu.box.get_child_at_index(0).destroy(); - } - this._clearWeatherCache(); - this.initOpenWeatherUI(); - this.initWeatherData(); - } else { - this.forecastJsonCache = undefined; - this.rebuildFutureWeatherUi(); - await this.reloadWeatherCache(); - } - } - - if (this._providerTranslations !== this._provider_translations) - { - this._providerTranslations = this._provider_translations; - if (this._providerTranslations) { - this.showRefreshing(); - this._clearWeatherCache(); - this.initWeatherData(); - } else { - await this.reloadWeatherCache(); - } - } - this.checkAlignment(); - this.checkPositionInPanel(); - this.rebuildCurrentWeatherUi(); - this.rebuildFutureWeatherUi(); - this.rebuildButtonMenu(); - await this.reloadWeatherCache(); - } - catch(e) - { - console.error(e); - throw e; - } - } - - async settingsChangedHandlerWrapper() - { - try - { - await this.settingsHandler(); - } - catch(e) - { - console.log("OpenWeather Refined Error in settings listener."); - console.error(e); - } - } - - bindSettingsChanged() - { - this._settingsC = this.settings.connect("changed", this.settingsChangedHandlerWrapper.bind(this)); - - this._gSettingsC = this.gSettings.connect("changed", this.settingsChangedHandlerWrapper.bind(this)); - } - - async loadConfig() - { - await this.firstRunSetDefaults(); - this._cities = settingsGetLocs(this.settings); - if (!this._cities.length) - { - this._cities = [ await this.getDefaultCity() ]; - } - - setLocationRefreshIntervalM(this.settings.get_double("loc-refresh-interval")); - - _systemClockFormat = this.gSettings.get_enum("clock-format"); - - this._currentLocation = await this._city.getCoords(this.settings); - this._isForecastDisabled = this._disable_forecast; - this._forecastDays = this._days_forecast; - this._currentAlignment = this._menu_alignment; - this._providerTranslations = this._provider_translations; - - // Get locale - this.locale = GLib.get_language_names()[0]; - if (this.locale.indexOf("_") !== -1) - this.locale = this.locale.split("_")[0]; - // Fallback for 'C', 'C.UTF-8', and unknown locales. - else this.locale = "en"; - - this.bindSettingsChanged(); - } - - loadConfigInterface() - { - this._settingsInterfaceC = this.settings.connect("changed", async () => { - if(this.settings.get_boolean("frozen")) return; - - try - { - this.rebuildCurrentWeatherUi(); - this.rebuildFutureWeatherUi(); - if (await this.locationChanged()) { - this.rebuildSelectCityItem(); - this._clearWeatherCache(); - this.initWeatherData(); - } else { - await this.reloadWeatherCache(); - } - } - catch(e) - { - console.error(`OpenWeather Refined: Error in settings changed listener '${e}'.\n\t${e.trace}`); - } - }); - } - - /** - * @property {(Weather | null)} - */ - currentWeatherCache = null; - - _clearWeatherCache() { - this.currentWeatherCache = undefined; - this.todaysWeatherCache = undefined; - this.forecastWeatherCache = undefined; - this.forecastJsonCache = undefined; - } - - _onNetworkStateChanged() { - this._checkConnectionState(); - } - - _checkConnectionState() { - this._checkConnectionStateRetries = 3; - this._oldConnected = this._connected; - this._connected = false; - - this._checkConnectionStateWithRetries(1250); - } - - _checkConnectionStateRetry() { - if (this._checkConnectionStateRetries > 0) { - let timeout; - if (this._checkConnectionStateRetries === 3) timeout = 10000; - else if (this._checkConnectionStateRetries === 2) timeout = 30000; - else if (this._checkConnectionStateRetries === 1) timeout = 60000; - - this._checkConnectionStateRetries -= 1; - this._checkConnectionStateWithRetries(timeout); - } - } - - _checkConnectionStateWithRetries(interval) { - if (this._timeoutCheckConnectionState) { - GLib.source_remove(this._timeoutCheckConnectionState); - this._timeoutCheckConnectionState = null; - } - - this._timeoutCheckConnectionState = GLib.timeout_add( - GLib.PRIORITY_DEFAULT, - interval, - () => { - // Nullify the variable holding the timeout-id, otherwise we can get errors, if we try to delete - // it manually, the timeout will be destroyed automatically if we return false. - // We just fetch it for the rare case, where the connection changes or the extension will be stopped during - // the timeout. - this._timeoutCheckConnectionState = null; - let url = getWeatherProviderUrl(this.weatherProvider); - let address = Gio.NetworkAddress.parse_uri(url, 80); - let cancellable = Gio.Cancellable.new(); - try { - this._network_monitor.can_reach_async( - address, - cancellable, - this._asyncReadyCallback.bind(this) - ); - } catch (err) { - let title = _("Can not connect to %s").format(url); - console.warn(title + "\n" + err.message); - this._checkConnectionStateRetry(); - } - return false; - } - ); - } - - _asyncReadyCallback(nm, res) { - try { - this._connected = this._network_monitor.can_reach_finish(res); - } catch (err) { - let title = _("Can not connect to %s").format( - getWeatherProviderUrl(this.weatherProvider) - ); - console.warn(title + "\n" + err.message); - this._checkConnectionStateRetry(); - return; - } - if (!this._oldConnected && this._connected) { - let now = new Date(); - if ( - _timeCacheCurrentWeather && - Math.floor(new Date(now - _timeCacheCurrentWeather).getTime() / 1000) > - this._refresh_interval_current - ) { - this.currentWeatherCache = undefined; - } - if ( - !this._isForecastDisabled && - _timeCacheForecastWeather && - Math.floor(new Date(now - _timeCacheForecastWeather).getTime() / 1000) > - this._refresh_interval_forecast - ) { - this.forecastWeatherCache = undefined; - this.todaysWeatherCache = undefined; - } - this.forecastJsonCache = undefined; - this.rebuildCurrentWeatherUi(); - this.initWeatherData(); - } - } - - disableForecastChanged() { - if (this._isForecastDisabled !== this._disable_forecast) { - return true; - } - return false; - } - - async locationChanged() - { - let location = await this._city?.getCoords(this.settings); - return this._currentLocation !== location; - } - - menuAlignmentChanged() { - if (this._currentAlignment !== this._menu_alignment) { - return true; - } - return false; - } - - get _units() { - return this.settings.get_enum("unit"); - } - - get _wind_speed_units() { - return this.settings.get_enum("wind-speed-unit"); - } - - get _wind_direction() { - return this.settings.get_boolean("wind-direction"); - } - - get _pressure_units() { - return this.settings.get_enum("pressure-unit"); - } - - get _actual_city() - { - let i = this.settings.get_int("actual-city"); - if(i > this._cities.length - 1) - { - console.warn("OpenWeather Refined: Got actual city too high."); - i = this._cities.length - 1; - } - - return i; - } - - getHiConrastClass() - { - let m = this.settings.get_enum("hi-contrast"); - switch(m) - { - case HiContrastStyle.WHITE: - return "openweather-white"; - case HiContrastStyle.BLACK: - return "openweather-black"; - default: - return null; - } - } - - _cities = [ ]; - - set _actual_city(i) - { - if(i > this._cities.length - 1) - { - console.warn("OpenWeather Refined: Set actual city too high."); - i = this._cities.length; - } - - this.settings.set_int("actual-city", i); - } - - get _city() - { - return this._cities[this._actual_city]; - } - - get _translate_condition() { - return this.settings.get_boolean("translate-condition"); - } - - get _provider_translations() { - return this.settings.get_boolean("owm-api-translate"); - } - - get _getUseSysIcons() { - return this.settings.get_boolean("use-system-icons") ? 1 : 0; - } - - get _startupDelay() { - return this.settings.get_int("delay-ext-init"); - } - - get _text_in_panel() { - return this.settings.get_boolean("show-text-in-panel"); - } - - get _position_in_panel() { - return this.settings.get_enum("position-in-panel"); - } - - get _position_index() { - return this.settings.get_int("position-index"); - } - - get _menu_alignment() { - return this.settings.get_double("menu-alignment"); - } - - get _comment_in_panel() { - return this.settings.get_boolean("show-comment-in-panel"); - } - - get _show_sunriseset_in_panel() - { - return this.settings.get_boolean("show-sunsetrise-in-panel"); - } - - get _sun_in_panel_first() - { - return this.settings.get_boolean("sun-in-panel-first"); - } - - get _disable_forecast() { - return this.settings.get_boolean("disable-forecast"); - } - - get _comment_in_forecast() { - return this.settings.get_boolean("show-comment-in-forecast"); - } - - get _refresh_interval_current() { - let v = this.settings.get_int("refresh-interval-current"); - return v >= 600 ? v : 600; - } - - get _refresh_interval_forecast() { - let v = this.settings.get_int("refresh-interval-forecast"); - return v >= 3600 ? v : 3600; - } - - get _loc_len_current() { - let v = this.settings.get_int("location-text-length"); - return v > 0 ? v : 0; - } - - get _center_forecast() { - return this.settings.get_boolean("center-forecast"); - } - - get _days_forecast() { - return this.settings.get_int("days-forecast"); - } - - get _decimal_places() { - return this.settings.get_int("decimal-places"); - } - - get _pressure_decimal_places() - { - let s = this.settings.get_int("pressure-decimal-places"); - switch(s) - { - case -2: - switch(this._pressure_units) - { - case WeatherPressureUnits.MBAR: - case WeatherPressureUnits.PA: - return 0; - case WeatherPressureUnits.KPA: - case WeatherPressureUnits.MMHG: - case WeatherPressureUnits.HPA: - case WeatherPressureUnits.TORR: - return 1; - case WeatherPressureUnits.INHG: - case WeatherPressureUnits.PSI: - return 2; - case WeatherPressureUnits.ATM: - case WeatherPressureUnits.AT: - case WeatherPressureUnits.BAR: - return 3; - } - case -1: - return this._decimal_places; - default: - return s; - } - } - - get _speed_decimal_places() - { - let s = this.settings.get_int("speed-decimal-places"); - if(s === -1) return this._decimal_places; - else return s; - } - - getWeatherKey() - { - let keys = settingsGetKeys(this.settings); - let selected = keys[this.weatherProvider - 1]; - return selected ? selected : DEFAULT_KEYS[this.weatherProvider - 1]; - } - - createButton(iconName, accessibleName) - { - let a11yClasses = this.getHiConrastClass() ?? ""; - let button; - - button = new St.Button({ - reactive: true, - can_focus: true, - track_hover: true, - accessible_name: accessibleName, - style_class: this.cssConcatClass("message-list-clear-button button openweather-button-action", a11yClasses), - }); - - button.child = new St.Icon({ - icon_name: iconName, - }); - - return button; - } - - usesNominatim() - { - return this._city.isMyLoc() && this.settings.get_enum("my-loc-prov") === MyLocProv.GEOCLUE; - } - - rebuildButtonMenu() { - this._buttonMenu.actor.destroy_all_children(); - - this._buttonBox1 = new St.BoxLayout({ - style_class: "openweather-button-box", - }); - this._buttonBox2 = new St.BoxLayout({ - style_class: "openweather-button-box", - }); - - this._locationButton = this.createButton( - "find-location-symbolic", - _("Locations") - ); - this._reloadButton = this.createButton( - "view-refresh-symbolic", - _("Reload Weather Information") - ); - this._provUrlButton = this.createButton( - "", - getWeatherProviderName(this.weatherProvider) - ); - this._provUrlButton.set_label(this._provUrlButton.get_accessible_name()); - if(this.usesNominatim()) - { - this._nominatimBtn = this.createButton( - "", - "Nominatim/OSM" - ); - this._nominatimBtn.set_label(this._nominatimBtn.get_accessible_name()); - } - - this._seeOnlineUrlBtn = this.createButton( - this.getGIcon("internet-web-browser-symbolic").to_string(), - _("See Online") - ); - - this._prefsButton = this.createButton( - "preferences-system-symbolic", - _("Weather Settings") - ); - - st13AddActors( - this._buttonBox1, - // Children: - this._locationButton, - this._reloadButton, - ); - - st13AddActor(this._buttonBox2, this._seeOnlineUrlBtn); - if(this.usesNominatim()) st13AddActor(this._buttonBox2, this._nominatimBtn); - st13AddActors( - this._buttonBox2, - // Children: - this._provUrlButton, - this._prefsButton, - ); - - this._locationButton.connect("clicked", () => { - this._selectCity._setOpenState(!this._selectCity._getOpenState()); - }); - this._reloadButton.connect("clicked", () => { - if (this._lastRefresh) { - let _twoMinsAgo = Date.now() - new Date(0).setMinutes(2.0); - if (this._lastRefresh > _twoMinsAgo) { - Main.notify( - "OpenWeather Refined", - _("Manual refreshes less than 2 minutes apart are ignored!") - ); - return; - } - } - this.showRefreshing(); - this.initWeatherData(true); - }); - this._provUrlButton.connect("clicked", () => { - this.menu.close(); - let url = getWeatherProviderUrl(this.weatherProvider); - this.openUrl(url); - }); - if(this.usesNominatim()) - { - this._nominatimBtn.connect("clicked", () => { - this.menu.close(); - this.openUrl("https://nominatim.org/"); - }); - } - this._seeOnlineUrlBtn.connect("clicked", async () => { - this.menu.close(); - let c = await this._city.getCoords(this.settings); - let url = `https://weather.com/weather/today/l/${c[0]},${c[1]}`; - this.openUrl(url); - }); - this._prefsButton.connect( - "clicked", - this._onPreferencesActivate.bind(this) - ); - - st13AddActors(this._buttonMenu, this._buttonBox1, this._buttonBox2); - } - - openUrl(url) - { - try - { - Gio.AppInfo.launch_default_for_uri(url, null); - } - catch(e) - { - let title = _("Cannot open %s").format(url); - Main.notifyError(title, String(e)); - } - } - - rebuildSelectCityItem() - { - this._selectCity.menu.removeAll(); - let item = null; - - let cities = this._cities; - if (!cities) return; - - for (let i = 0; cities.length > i; i++) - { - let locName = cities[i].getName(_); - if(cities[i].isMyLoc()) - { - locName += ` (${getCachedLocInfo().city})`; - } - - item = new PopupMenu.PopupMenuItem(locName); - item.location = i; - if (i === this._actual_city) { - item.setOrnament(PopupMenu.Ornament.DOT); - } - - this._selectCity.menu.addMenuItem(item); - // override the items default onActivate-handler, to keep the ui open while choosing the location - item.activate = this._onActivate.bind(this, item.location); - } - - if (cities.length === 1) this._selectCity.actor.hide(); - else this._selectCity.actor.show(); - } - - _onActivate(locIndex) - { - this._actual_city = locIndex; - } - - _onPreferencesActivate() { - this.menu.close(); - let extensionObject = Extension.lookupByUUID( - "openweather-extension@penguin-teal.github.io" - ); - extensionObject.openPreferences(); - return 0; - } - - recalcLayout() { - if (!this.menu.isOpen) return; - - if (!this._isForecastDisabled && this._currentForecast !== undefined) - this._currentForecast.set_width(this._currentWeather.get_width()); - - if ( - !this._isForecastDisabled && - this._forecastDays !== 0 && - this._forecastExpander !== undefined - ) { - this._forecastScrollBox.set_width( - this._forecastExpanderBox.get_width() - this._daysBox.get_width() - ); - this._forecastScrollBox.show(); - this._forecastScrollBox.hscrollbar_policy = St.PolicyType.ALWAYS; - - let expanded = this.settings.get_boolean("expand-forecast"); - this._forecastExpander.setSubmenuShown(expanded); - } - this._buttonBox1.set_width( - this._currentWeather.get_width() - this._buttonBox2.get_width() - ); - } - - _simplifyDegrees() - { - return this.settings.get_boolean("simplify-degrees"); - } - - unit_to_unicode() - { - if(this._units !== 2 && this._simplifyDegrees()) return "\u00B0"; - switch(this._units) - { - case WeatherUnits.CELSIUS: - // Don't use U+2013 because it looks weird - return _("\u00B0C"); - case WeatherUnits.FAHRENHEIT: - // Don't use U+2109 because it looks weird - return _("\u00B0F"); - case WeatherUnits.KELVIN: - return _("K"); - case WeatherUnits.RANKINE: - return _("\u00B0Ra"); - case WeatherUnits.REAUMUR: - return _("\u00B0R\u00E9"); - case WeatherUnits.ROEMER: - return _("\u00B0R\u00F8"); - case WeatherUnits.DELISLE: - return _("\u00B0De"); - case WeatherUnits.NEWTON: - return _("\u00B0N"); - default: - console.warn("OpenWeather Refined: Invalid tempeature unit."); - return "\u00B0"; - } - } - - toBeaufort(w, t) { - if (w < 0.3) return !t ? "0" : "(" + _("Calm") + ")"; - else if (w >= 0.3 && w <= 1.5) return !t ? "1" : "(" + _("Light air") + ")"; - else if (w > 1.5 && w <= 3.4) - return !t ? "2" : "(" + _("Light breeze") + ")"; - else if (w > 3.4 && w <= 5.4) - return !t ? "3" : "(" + _("Gentle breeze") + ")"; - else if (w > 5.4 && w <= 7.9) - return !t ? "4" : "(" + _("Moderate breeze") + ")"; - else if (w > 7.9 && w <= 10.7) - return !t ? "5" : "(" + _("Fresh breeze") + ")"; - else if (w > 10.7 && w <= 13.8) - return !t ? "6" : "(" + _("Strong breeze") + ")"; - else if (w > 13.8 && w <= 17.1) - return !t ? "7" : "(" + _("Moderate gale") + ")"; - else if (w > 17.1 && w <= 20.7) - return !t ? "8" : "(" + _("Fresh gale") + ")"; - else if (w > 20.7 && w <= 24.4) - return !t ? "9" : "(" + _("Strong gale") + ")"; - else if (w > 24.4 && w <= 28.4) return !t ? "10" : "(" + _("Storm") + ")"; - else if (w > 28.4 && w <= 32.6) - return !t ? "11" : "(" + _("Violent storm") + ")"; - else return !t ? "12" : "(" + _("Hurricane") + ")"; - } - - getLocaleDay(abr) { - let days = [ - _("Sunday"), - _("Monday"), - _("Tuesday"), - _("Wednesday"), - _("Thursday"), - _("Friday"), - _("Saturday"), - ]; - return days[abr]; - } - - getWindDirection(deg) { - let arrows = [ - "\u2193", - "\u2199", - "\u2190", - "\u2196", - "\u2191", - "\u2197", - "\u2192", - "\u2198", - ]; - let letters = [ - _("N"), - _("NE"), - _("E"), - _("SE"), - _("S"), - _("SW"), - _("W"), - _("NW"), - ]; - let idx = Math.round(deg / 45) % arrows.length; - return this._wind_direction ? arrows[idx] : letters[idx]; - } - - systemHasIcon(iconName) - { - return new St.IconTheme().has_icon(iconName); - } - - getPackagedIconName(iconName) - { - return `${this.metadata.path}/media/status/${iconName}.svg` - } - - getGIcon(iconName) - { - let noSystemIcon = false; - if (this._getUseSysIcons) - { - if(this.systemHasIcon(iconName)) return Gio.icon_new_for_string(iconName); - else noSystemIcon = true; - } - - let name = this.getPackagedIconName(iconName); - - // If a packaged icon is requested check if it even has it - let file = Gio.File.new_for_path(name); - if(!file.query_exists(null)) - { - name = iconName; - if(noSystemIcon) console.warn(`No icon packaged or on system for ${iconName}.`); - } - - return Gio.icon_new_for_string(name); - } - - checkAlignment() { - let menuAlignment = 1.0 - this._menu_alignment / 100; - if (Clutter.get_default_text_direction() === Clutter.TextDirection.RTL) - menuAlignment = 1.0 - menuAlignment; - this.menu._arrowAlignment = menuAlignment; - } - - checkPositionInPanel() { - if ( - this._old_position_in_panel === undefined || - this._old_position_in_panel !== this._position_in_panel || - this._is_first_run_cycle || - this._old_position_index !== this._position_index - ) { - st13RemoveActor(this.get_parent(), this); - - let children = null; - switch (this._position_in_panel) { - case WeatherPosition.LEFT: - children = Main.panel._leftBox.get_children(); - Main.panel._leftBox.insert_child_at_index(this, this._position_index); - break; - case WeatherPosition.CENTER: - children = Main.panel._centerBox.get_children(); - Main.panel._centerBox.insert_child_at_index( - this, - this._position_index - ); - break; - case WeatherPosition.RIGHT: - children = Main.panel._rightBox.get_children(); - Main.panel._rightBox.insert_child_at_index( - this, - this._position_index - ); - break; - } - this._old_position_in_panel = this._position_in_panel; - this._old_position_index = this._position_index; - this._is_first_run_cycle = 1; - } - } - - formatPressure(pressure) - { - let pressure_unit; - switch (this._pressure_units) - { - - case WeatherPressureUnits.INHG: - pressure *= 0.029528744; - pressure_unit = _("inHg"); - break; - - case WeatherPressureUnits.BAR: - pressure *= 0.001; - pressure_unit = _("bar"); - break; - - case WeatherPressureUnits.PA: - pressure *= 100; - pressure_unit = _("Pa"); - break; - - case WeatherPressureUnits.KPA: - pressure *= 0.1; - pressure_unit = _("kPa"); - break; - - case WeatherPressureUnits.ATM: - pressure *= 0.000986923267; - pressure_unit = _("atm"); - break; - - case WeatherPressureUnits.AT: - pressure *= 0.00101971621298; - pressure_unit = _("at"); - break; - - case WeatherPressureUnits.TORR: - pressure *= 0.750061683; - pressure_unit = _("Torr"); - break; - - case WeatherPressureUnits.PSI: - pressure *= 0.0145037738; - pressure_unit = _("psi"); - break; - - case WeatherPressureUnits.MMHG: - pressure *= 0.750061683; - pressure_unit = _("mmHg"); - break; - - case WeatherPressureUnits.MBAR: - pressure_unit = _("mbar"); - break; - - default: - throw new Error("Invalid pressure unit."); - } - - return (pressure - .toFixed(this._pressure_decimal_places) - .toLocaleString(this.locale) + - " " + pressure_unit); - } - - formatTemperature(tempC) - { - let isDegrees = true; - let tLocal; - switch (this._units) - { - case WeatherUnits.FAHRENHEIT: - tLocal = tempC * 1.8 + 32; - break; - - case WeatherUnits.CELSIUS: - tLocal = tempC; - break; - - case WeatherUnits.KELVIN: - tLocal = tempC + 273.15; - isDegrees = false; - break; - - case WeatherUnits.RANKINE: - tLocal = tempC * 1.8 + 491.67; - break; - - case WeatherUnits.REAUMUR: - tLocal = tempC / 1.25; - break; - - case WeatherUnits.ROEMER: - tLocal = tempC / 1.9047619 + 7.5; - break; - - case WeatherUnits.DELISLE: - tLocal = tempC * 1.5 - 100; - break; - - case WeatherUnits.NEWTON: - tLocal = tempC / 3.03030303; - break; - } - - let string = tLocal.toLocaleString(this.locale, { maximumFractionDigits: this._decimal_places }); - // - // turn a rounded '-0' into '0' - if(string === "-0") string = "0"; - - string = string.replace("-", "\u2212") - - return string + (isDegrees ? "" : " ") + this.unit_to_unicode(); - } - - formatWind(speed, direction) { - let conv_MPSinMPH = 2.23693629; - let conv_MPSinKPH = 3.6; - let conv_MPSinKNOTS = 1.94384449; - let conv_MPSinFPS = 3.2808399; - let unit = _("m/s"); - - switch (this._wind_speed_units) { - case WeatherWindSpeedUnits.MPH: - speed = (speed * conv_MPSinMPH).toFixed(this._speed_decimal_places); - unit = _("mph"); - break; - - case WeatherWindSpeedUnits.KPH: - speed = (speed * conv_MPSinKPH).toFixed(this._speed_decimal_places); - unit = _("km/h"); - break; - - case WeatherWindSpeedUnits.MPS: - speed = speed.toFixed(this._speed_decimal_places); - break; - - case WeatherWindSpeedUnits.KNOTS: - speed = (speed * conv_MPSinKNOTS).toFixed(this._speed_decimal_places); - unit = _("kn"); - break; - - case WeatherWindSpeedUnits.FPS: - speed = (speed * conv_MPSinFPS).toFixed(this._speed_decimal_places); - unit = _("ft/s"); - break; - - case WeatherWindSpeedUnits.BEAUFORT: - speed = this.toBeaufort(speed); - unit = this.toBeaufort(speed, true); - break; - } - - if (!speed) return "\u2013"; - else if (speed === 0 || !direction) - return parseFloat(speed).toLocaleString(this.locale) + " " + unit; - // i.e. speed > 0 && direction - else - return ( - direction + - " " + - parseFloat(speed).toLocaleString(this.locale) + - " " + - unit - ); - } - - formatTime(date) - { - let isHr12; - switch(this.settings.get_enum("clock-format")) - { - case ClockFormat._24H: - isHr12 = false; - break; - case ClockFormat._12H: - isHr12 = true; - break; - default: - console.warn("OpenWeather Refined invalid clock format."); - // FALL THRU - case ClockFormat.SYSTEM: - isHr12 = _systemClockFormat === ClockFormat._12H; - break; - } - return date.toLocaleTimeString(this.locale, { - // 12/24 hour and hide seconds - hour12: isHr12, - hour: "numeric", - minute: "numeric" - }); - } - - reloadWeatherCurrent(interval) { - if (this._timeoutCurrent) { - GLib.source_remove(this._timeoutCurrent); - this._timeoutCurrent = null; - } - _timeCacheCurrentWeather = new Date(); - this._timeoutCurrent = GLib.timeout_add_seconds( - GLib.PRIORITY_DEFAULT, - interval, - () => { - this.refreshWeatherData().catch((e) => console.error(e)); - - let intervalSetting = this._refresh_interval_current; - if(intervalSetting !== interval) this.reloadWeatherCurrent(intervalSetting); - return true; - } - ); - } - - showRefreshing() - { - this._currentWeatherSummary.text = _("Loading ..."); - this._currentWeatherIcon.icon_name = "view-refresh-symbolic"; - } - - cssConcatClass(left, right) - { - if(!left) return right; - else if(!right) return left; - else return `${left} ${right}`; - } - - rebuildCurrentWeatherUi() - { - this._currentWeather.actor.destroy_all_children(); - if (!this._isForecastDisabled) - this._currentForecast.actor.destroy_all_children(); - - let a11yClasses = this.getHiConrastClass() ?? ""; - - this._weatherInfo.text = "..."; - this._weatherIcon.icon_name = "view-refresh-symbolic"; - - // This will hold the icon for the current weather - this._currentWeatherIcon = new St.Icon({ - icon_size: 96, - icon_name: "view-refresh-symbolic", - style_class: "system-menu-action openweather-current-icon", - }); - - this._sunriseIcon = new St.Icon({ - icon_size: 15, - style_class: "openweather-sunrise-icon", - }); - this._sunsetIcon = new St.Icon({ - icon_size: 15, - style_class: "openweather-sunset-icon", - }); - this._sunriseIcon.set_gicon( - this.getGIcon("daytime-sunrise-symbolic") - ); - this._sunsetIcon.set_gicon(this.getGIcon("daytime-sunset-symbolic")); - - this._buildIcon = new St.Icon({ - icon_size: 15, - icon_name: "view-refresh-symbolic", - style_class: "openweather-build-icon", - }); - - // The summary of the current weather - this._currentWeatherSummary = new St.Label({ - text: _("Loading ..."), - style_class: this.cssConcatClass("openweather-current-summary", a11yClasses), - }); - this._currentWeatherLocation = new St.Label({ - text: _("Please wait"), - style_class: a11yClasses - }); - - let bb = new St.BoxLayout({ - vertical: true, - x_expand: true, - y_expand: true, - y_align: Clutter.ActorAlign.CENTER, - style_class: "system-menu-action openweather-current-summarybox", - }); - st13AddActors(bb, this._currentWeatherLocation, this._currentWeatherSummary); - - this._currentWeatherSunrise = new St.Label({ - text: "-", - style_class: a11yClasses - }); - this._currentWeatherSunset = new St.Label({ - text: "-", - style_class: a11yClasses - }); - this._currentWeatherBuild = new St.Label({ - text: "-", - style_class: a11yClasses - }); - - let ab = new St.BoxLayout({ - x_expand: true, - style_class: "openweather-current-infobox", - }); - - st13AddActors(ab, - this._sunriseIcon, this._currentWeatherSunrise, - this._sunsetIcon, this._currentWeatherSunset, - this._buildIcon, this._currentWeatherBuild); - st13AddActor(bb, ab); - - // Other labels - let rb = new St.BoxLayout({ - x_expand: true, - style_class: "openweather-current-databox", - }); - let rb_captions = new St.BoxLayout({ - x_expand: true, - vertical: true, - style_class: - "popup-menu-item popup-status-menu-item openweather-current-databox-captions", - }); - let rb_values = new St.BoxLayout({ - x_expand: true, - vertical: true, - style_class: "system-menu-action openweather-current-databox-values", - }); - st13AddActors(rb, rb_captions, rb_values); - - let sideStats = - [ - _("Feels Like:"), - _("Humidity:"), - _("Pressure:"), - _("Wind:"), - _("Gusts") + ":" - ]; - - this.detailsRbCaptions = rb_captions; - this.detailsRbValues = rb_values; - - const labelCss = this.cssConcatClass("openweather-current-databox-captions", a11yClasses); - const valueCss = this.cssConcatClass("openweather-current-databox-values", a11yClasses); - for(let i = 0; i < 5; i++) - { - let l = new St.Label({ - text: sideStats[i], - style_class: labelCss - }); - - let v = new St.Label({ - text: "\u2026", - style_class: valueCss - }); - - switch(i) - { - case 0: - this._currentWeatherFeelsLike = v; - break; - case 1: - this._currentWeatherHumidity = v; - break; - case 2: - this._currentWeatherPressure = v; - break; - case 3: - this._currentWeatherWind = v; - break; - case 4: - this._currentWeatherWindGustsLabel = l; - this._currentWeatherWindGusts = v; - break; - } - - st13AddActor(rb_captions, l); - st13AddActor(rb_values, v); - } - - let xb = new St.BoxLayout({ - x_expand: true, - }); - st13AddActors(xb, bb, rb); - - let box = new St.BoxLayout({ - x_expand: true, - style_class: "openweather-current-iconbox", - }); - - st13AddActors(box, this._currentWeatherIcon, xb); - this._currentWeather.actor.add_child(box); - - // Today's forecast if not disabled by user - if (this._isForecastDisabled) return; - - this._todays_forecast = []; - this._todaysBox = new St.BoxLayout({ - x_expand: true, - x_align: this._center_forecast - ? Clutter.ActorAlign.END - : Clutter.ActorAlign.START, - style_class: "openweather-today-box", - }); - - for (let i = 0; i < 4; i++) { - let todaysForecast = {}; - - todaysForecast.Time = new St.Label({ - style_class: this.cssConcatClass("openweather-forecast-time", a11yClasses), - }); - todaysForecast.Icon = new St.Icon({ - icon_size: 24, - icon_name: "view-refresh-symbolic", - style_class: "openweather-forecast-icon", - }); - todaysForecast.Temperature = new St.Label({ - style_class: this.cssConcatClass("openweather-forecast-temperature", a11yClasses), - }); - todaysForecast.Summary = new St.Label({ - style_class: this.cssConcatClass("openweather-forecast-summary", a11yClasses), - }); - todaysForecast.Summary.clutter_text.line_wrap = true; - - let fb = new St.BoxLayout({ - vertical: true, - x_expand: true, - style_class: "openweather-today-databox", - }); - let fib = new St.BoxLayout({ - x_expand: true, - x_align: Clutter.ActorAlign.CENTER, - style_class: "openweather-forecast-iconbox", - }); - - st13AddActors(fib, todaysForecast.Icon, todaysForecast.Temperature); - - st13AddActors(fb, todaysForecast.Time, fib); - if (this._comment_in_forecast) st13AddActor(fb, todaysForecast.Summary); - - this._todays_forecast[i] = todaysForecast; - st13AddActor(this._todaysBox, fb); - } - this._currentForecast.actor.add_child(this._todaysBox); - } - - setGustsPanelVisibility(isVisible) - { - let rb_captions = this.detailsRbCaptions; - let rb_values = this.detailsRbValues; - if(!isVisible) - { - st13RemoveActor(rb_captions, this._currentWeatherWindGustsLabel); - st13RemoveActor(rb_values, this._currentWeatherWindGusts); - } - else - { - st13AddActor(rb_captions, this._currentWeatherWindGustsLabel); - st13AddActor(rb_values, this._currentWeatherWindGusts); - } - } - - scrollForecastBy(delta) { - if (this._forecastScrollBox === undefined) return; - hscroll(this._forecastScrollBox).value += delta; - } - - rebuildFutureWeatherUi(cnt) { - if (this._isForecastDisabled || this._forecastDays === 0) return; - this._forecastExpander.menu.box.destroy_all_children(); - - let a11yClasses = this.getHiConrastClass() ?? ""; - - this._forecast = []; - this._forecastExpanderBox = new St.BoxLayout({ - x_expand: true, - opacity: 150, - style_class: this.cssConcatClass("openweather-forecast-expander", a11yClasses), - }); - st13AddActor(this._forecastExpander.menu.box, this._forecastExpanderBox); - - this._daysBox = new St.BoxLayout({ - vertical: true, - y_expand: true, - style_class: "openweather-forecast-box", - }); - this._forecastBox = new St.BoxLayout({ - vertical: true, - x_expand: true, - style_class: "openweather-forecast-box", - }); - this._forecastScrollBox = new St.ScrollView({ - x_expand: true, - style_class: "openweather-forecasts", - }); - let pan = new Clutter.PanAction({ - interpolate: true, - }); - pan.connect("pan", (action) => { - let [dist, dx, dy] = action.get_motion_delta(0); - - this.scrollForecastBy( - -1 * - ((dy + dx) / this._forecastScrollBox.width) * - hscroll(this._forecastScrollBox).page_size - ); - return false; - }); - this._forecastScrollBox.add_action(pan); - this._forecastScrollBox.connect("scroll-event", this._onScroll.bind(this)); - this._forecastScrollBox.vscrollbar_policy = St.PolicyType.NEVER; - this._forecastScrollBox.hscrollbar_policy = St.PolicyType.AUTOMATIC; - this._forecastScrollBox.enable_mouse_scrolling = true; - this._forecastScrollBox.hide(); - - if (cnt === undefined) cnt = this._days_forecast; - - let nDayForecast; - if (cnt === 1) nDayForecast = _("Tomorrow's Forecast"); - else nDayForecast = _("%s Day Forecast").format(cnt); - - this._forecastExpander.label.set_text(nDayForecast); - - for (let i = 0; i < cnt; i++) { - let forecastWeather = {}; - - forecastWeather.Day = new St.Label({ - style_class: "openweather-forecast-day", - }); - st13AddActor(this._daysBox, forecastWeather.Day); - - let forecastWeatherBox = new St.BoxLayout({ - x_expand: true, - x_align: Clutter.ActorAlign.CENTER, - }); - - for (let j = 0; j < 8; j++) { - forecastWeather[j] = {}; - - forecastWeather[j].Time = new St.Label({ - style_class: "openweather-forecast-time", - }); - forecastWeather[j].Icon = new St.Icon({ - icon_size: 24, - style_class: "openweather-forecast-icon", - }); - forecastWeather[j].Temperature = new St.Label({ - style_class: "openweather-forecast-temperature", - }); - forecastWeather[j].Summary = new St.Label({ - style_class: "openweather-forecast-summary", - }); - forecastWeather[j].Summary.clutter_text.line_wrap = true; - - let by = new St.BoxLayout({ - vertical: true, - x_expand: true, - style_class: "openweather-forecast-databox", - }); - let bib = new St.BoxLayout({ - x_expand: true, - x_align: Clutter.ActorAlign.CENTER, - style_class: "openweather-forecast-iconbox", - }); - - st13AddActors(bib, forecastWeather[j].Icon, forecastWeather[j].Temperature); - st13AddActors(by, forecastWeather[j].Time, bib); - - if (this._comment_in_forecast) st13AddActor(by, forecastWeather[j].Summary); - st13AddActor(forecastWeatherBox, by); - } - this._forecast[i] = forecastWeather; - st13AddActor(this._forecastBox, forecastWeatherBox); - } - - st13AddActor(this._forecastScrollBox, this._forecastBox); - st13AddActors(this._forecastExpanderBox, this._daysBox, this._forecastScrollBox); - } - - _onScroll(actor, event) { - if (this._isForecastDisabled) return; - - let dx = 0; - let dy = 0; - switch (event.get_scroll_direction()) { - case Clutter.ScrollDirection.UP: - case Clutter.ScrollDirection.RIGHT: - dy = -1; - break; - case Clutter.ScrollDirection.DOWN: - case Clutter.ScrollDirection.LEFT: - dy = 1; - break; - default: - return true; - } - - this.scrollForecastBy( - dy * hscroll(this._forecastScrollBox).stepIncrement - ); - return false; - } -} - -export default class OpenWeatherExtension extends Extension { - enable() { - console.log(`enabling ${this.metadata.name}`); - this.openWeatherMenu = new OpenWeatherMenuButton( - this.metadata, - this.getSettings() - ); - Main.panel.addToStatusArea("openWeatherMenu", this.openWeatherMenu); - } - - disable() { - console.log(`disabling ${this.metadata.name}`); - this.openWeatherMenu.stop(); - this.openWeatherMenu.destroy(); - this.openWeatherMenu = null; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/getweather.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/getweather.js deleted file mode 100644 index 451cc08b..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/getweather.js +++ /dev/null @@ -1,861 +0,0 @@ -/* - Copyright 2024 Teal Penguin - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -import GLib from "gi://GLib"; -import Soup from "gi://Soup"; -import { getSoupSession } from "./myloc.js" -import { getIconName, gettextCondition } from "./weathericons.js" - -export const DEFAULT_KEYS = -[ - "b4d6a638dd4af5e668ccd8574fd90cec", - "7a4baea97ef946c7864221259240804", - "ES25QFD3CP93EZ9DMSJ72MAX7" -]; - -export class TooManyReqError extends Error -{ - provider; - constructor(provider) - { - super(`Provider ${getWeatherProviderName(provider)} has received too many requests.`); - this.provider = provider; - this.name = "TooManyReqError"; - } -} - -/** - * @enum {number} - */ -export const WeatherProvider = -{ - DEFAULT: 0, - OPENWEATHERMAP: 1, - WEATHERAPICOM: 2, - VISUALCROSSING: 3, - OPENMETEO: 4, - - // Open-Meteo not ready - /** Count of usable providers (excludes Adaptive). */ - COUNT: 3 -}; - -// Corresponds to Weather providers -export const ForecastDaysSupport = -{ - 0: 0, - 1: 4, - 2: 2, - 3: 14, - 4: 15 -} - -export function getWeatherProviderName(prov) -{ - switch(prov) - { - case WeatherProvider.OPENWEATHERMAP: - return "OpenWeatherMap"; - case WeatherProvider.WEATHERAPICOM: - return "WeatherAPI.com"; - case WeatherProvider.VISUALCROSSING: - return "Visual Crossing"; - case WeatherProvider.OPENMETEO: - return "Open-Meteo"; - default: - return null; - } -} - -export function getWeatherProviderUrl(prov) -{ - switch(prov) - { - case WeatherProvider.OPENWEATHERMAP: - return "https://openweathermap.org/"; - case WeatherProvider.WEATHERAPICOM: - return "https://www.weatherapi.com/"; - case WeatherProvider.VISUALCROSSING: - return "https://www.visualcrossing.com/"; - case WeatherProvider.OPENMETEO: - return "https://open-meteo.com/"; - default: - return null; - } -} - -/** - * Convert a string in the form of '00:00 AM/PM' to milliseconds since - * 12:00 AM (0:00). - * @param {string} timeString - * @returns {number} - */ -function timeToMs(timeString) -{ - let isPm = timeString.endsWith("PM"); - let m = timeString.match(/^([0-9]{2}):([0-9]{2})/); - return m[1] * 3600000 + m[2] * 60000 + (isPm ? 12 * 3600000 : 0); -} - -// Choose a random provider each time to try to avoid rate limiting -let randomProvider = 0; -function chooseRandomProvider(settings) -{ - // WeatherAPI.com doesn't support as many forecast days as OpenWeatherMap - let forecastDays = settings.get_int("days-forecast"); - let rand = Math.floor(Math.random() * WeatherProvider.COUNT + 1); - - // Should be OpenMeteo in the future - if(ForecastDaysSupport[rand] < forecastDays) rand = WeatherProvider.OPENWEATHERMAP; - - randomProvider = rand; - // Visual Crossing doesn't work right now (blocked if reached rate limit) - if(rand === WeatherProvider.VISUALCROSSING) weatherProviderNotWorking(settings); -} - -export function getWeatherProvider(settings) -{ - let prov = settings.get_enum("weather-provider"); - if(prov === WeatherProvider.DEFAULT) - { - if(!randomProvider) chooseRandomProvider(settings); - return randomProvider; - } - else return prov; -} - -let providerNotWorking = 0; -/** - * Cycles the weather provider if weather provider is in random mode. - * @returns {boolean} `true` if the weather provider changed and the operation - * should be tried again, otherwise `false` if nothing changed. - */ -export function weatherProviderNotWorking(settings) -{ - let prov = settings.get_enum("weather-provider"); - if(prov === WeatherProvider.DEFAULT) - { - if(!providerNotWorking) providerNotWorking = randomProvider; - // if we've already cycled through them all, give up - else if(randomProvider === providerNotWorking) return false; - - randomProvider++; - - // Visual Crossing doesn't work right now (blocked if reached rate limit) - if(randomProvider === WeatherProvider.VISUALCROSSING) randomProvider++; - - if(randomProvider > WeatherProvider.COUNT) randomProvider = 1; - - console.log("inc rand " + typeof randomProvider + randomProvider); - - return true; - } - else return false; -} - -export class Weather -{ - #iconName; - #condition; - - #tempC; - #feelsLikeC; - #humidityPercent; - #pressureMBar; - #windMps; - #windDirDeg; - #gustsMps; - - #sunrise; - #sunset; - - #forecasts; - - /** - * @param {number} tempC - * @param {number} feelsLikeC - * @param {number} humidityPercent - * @param {number} pressureMBar - * @param {number} windMps - * @param {number} windDirDeg - * @param {number} gustsMps - * @param {string} iconName - * @param {string} condition - * @param {Date} sunrise - * @param {Date} sunset - * @param {(Forecast[][] | null)} forecasts - */ - constructor(tempC, feelsLikeC, humidityPercent, pressureMBar, windMps, windDirDeg, gustsMps, iconName, condition, sunrise, sunset, forecasts = null) - { - this.#tempC = tempC; - this.#feelsLikeC = feelsLikeC; - this.#humidityPercent = humidityPercent; - this.#pressureMBar = pressureMBar; - this.#windMps = windMps; - this.#windDirDeg = windDirDeg; - this.#gustsMps = gustsMps; - this.#iconName = iconName; - this.#sunrise = sunrise; - this.#sunset = sunset; - this.#forecasts = forecasts ? forecasts.length > 0 ? forecasts : null : null; - - if(typeof condition === "string") this.#condition = condition; - else throw new Error(`OpenWeather Refined Weather Condition '${condition}' was type '${typeof condition}' not string.`); - } - - /** - * @returns {string} - */ - getIconName() - { - return this.#iconName; - } - - /** - * @returns {string} - */ - displayCondition() - { - return this.#condition; - } - - /** - * @returns {string} - */ - displayTemperature(extension) - { - return extension.formatTemperature(this.#tempC); - } - - /** - * @returns {string} - */ - displayFeelsLike(extension) - { - return extension.formatTemperature(this.#feelsLikeC); - } - - /** - * @returns {string} - */ - displayHumidity() - { - return `${this.#humidityPercent}%`; - } - - /** - * @returns {string} - */ - displayPressure(extension) - { - return extension.formatPressure(this.#pressureMBar); - } - - /** - * @returns {string} - */ - displayWind(extension) - { - let dir = extension.getWindDirection(this.#windDirDeg); - return extension.formatWind(this.#windMps, dir); - } - - /** - * @returns {string} - */ - displayGusts(extension) - { - return extension.formatWind(this.#gustsMps); - } - - /** - * @returns {boolean} - */ - gustsAvailable() - { - return typeof this.#gustsMps === "number"; - } - - /** - * @returns {string} - */ - displaySunrise(extension) - { - return extension.formatTime(this.#sunrise); - } - - /** - * @returns {Date} - */ - getSunriseDate() - { - return this.#sunrise; - } - - /** - * @returns {string} - */ - displaySunset(extension) - { - return extension.formatTime(this.#sunset); - } - - /** - * @returns {Date} - */ - getSunsetDate() - { - return this.#sunset; - } - - hasForecast() - { - return this.#forecasts !== null; - } - - forecastDayCount() - { - return this.#forecasts.length; - } - - forecastHourCount(dayIndex) - { - return this.#forecasts[dayIndex].length; - } - - forecastDayHour(dayIndex, hourIndex) - { - return this.#forecasts[dayIndex][hourIndex]; - } - - forecastAtHour(dayIndex, hoursFromNow) - { - let day = this.#forecasts[dayIndex]; - return day[hoursFromNow / day[0].getDurationHours()]; - } - - forecastHoursFromNow(hoursFromNow) - { - let future = new Date().getTime() + 3600000 * hoursFromNow; - let days = this.#forecasts.length; - for(let i = 0; i < days; i++) - { - let d = this.#forecasts[i]; - let h = d[d.length - 1]; - let endTime = h.getEnd().getTime(); - - if(future > endTime) continue; - - let distanceHrs = (future - d[0].getStart().getTime()) / 3600000; - let index = Math.ceil(distanceHrs / h.getDurationHours()); - if(index >= this.#forecasts[i].length) index = this.#forecasts[i].length - 1; - return this.#forecasts[i][index]; - } - - let lastDay = this.#forecasts[days - 1]; - return lastDay[lastDay.length - 1]; - } - -} - -export class Forecast -{ - #start; - #end; - #weather; - - /** - * @param {Date} start - * @param {Date} end - * @param {Weather} weather - */ - constructor(start, end, weather) - { - this.#start = start; - this.#end = end; - this.#weather = weather; - } - - getStart() - { - return this.#start; - } - - getEnd() - { - return this.#end; - } - - getDurationHours() - { - return (this.#end - this.#start) / 3600000; - } - - displayTime(extension) - { - return extension.formatTime(this.#start); - } - - weather() - { - return this.#weather; - } -} - -async function loadJsonAsync(url, params) -{ - return new Promise((resolve, reject) => - { - let httpSession = getSoupSession(); - let paramsHash = Soup.form_encode_hash(params); - let message = Soup.Message.new_from_encoded_form("GET", url, paramsHash); - - httpSession.send_and_read_async( - message, - GLib.PRIORITY_DEFAULT, - null, - (sess, result) => - { - let bytes = sess.send_and_read_finish(result); - - let jsonString = bytes.get_data(); - if (jsonString instanceof Uint8Array) - { - jsonString = new TextDecoder().decode(jsonString); - } - - try - { - if (!jsonString) - { - reject("No data in response body."); - } - resolve([message.status_code, JSON.parse(jsonString)]); - } - catch(e) - { - sess.abort(); - reject(e); - } - } - ); - }); -} - -function isSuccess(httpStatusCode) -{ - return httpStatusCode >= 200 && httpStatusCode < 300; -} - -function clamp(lo, x, hi) -{ - return Math.min(Math.max(lo, x), hi); -} - -function getCondit(extension, code, condition, gettext) -{ - if(!extension._translate_condition || extension._providerTranslations || !gettext) - { - return condition; - } - else - { - return gettextCondition(getWeatherProvider(extension.settings), code, gettext); - } -} - -/** - * @returns {Promise<Weather | null>} - */ -export async function getWeatherInfo(extension, gettext) -{ - const settings = extension.settings; - - let location = await extension._city.getCoords(settings); - let lat = String(location[0]); - let lon = String(location[1]); - - let params; - switch(getWeatherProvider(extension.settings)) - { - case WeatherProvider.OPENWEATHERMAP: - { - params = - { - lat, - lon, - units: "metric" - }; - if(extension._providerTranslations) params.lang = extension.locale; - let apiKey = extension.getWeatherKey(); - if(apiKey) params.appid = apiKey; - - let response; - let forecastResponse; - try - { - let cur = loadJsonAsync("https://api.openweathermap.org/data/2.5/weather", params); - let fore = loadJsonAsync("https://api.openweathermap.org/data/2.5/forecast", params); - let allResp = await Promise.all([ cur, fore ]); - response = allResp[0]; - forecastResponse = allResp[1]; - } - catch(e) - { - console.error(`OpenWeather Refined: Failed to fetch weather from OpenWeatherMap ('${e.message}').`); - return null; - } - - if(!isSuccess(response[0]) || !isSuccess(forecastResponse[0])) - { - console.error(`OpenWeather Refined: Invalid API Response from OpenWeatherMap ` + - `${response[0]}/${forecastResponse[0]}: '${response[1]?.message}'` + - `/'${forecastResponse[1]?.message}'.`); - - if(response[0] === 429 || forecastResponse[0] === 429) throw new TooManyReqError(WeatherProvider.OPENWEATHERMAP); - else return null; - } - - let json = response[1]; - let m = json.main; - let iconId = json.weather[0].icon; - - // OpenWeatherMap bug? Sunrise/sunset seconds seems to always return - // for same day even if sunrise is tomorrow morning. Therefore just - // subtract today and we'll decide if it's tomorrow or not - let thisMorningMs = new Date().setHours(0, 0, 0, 0); - let midnightMs = thisMorningMs + 3600000 * 24; - let sunriseMs = json.sys.sunrise * 1000 - thisMorningMs; - let sunsetMs = json.sys.sunset * 1000 - thisMorningMs; - - let sunrise, sunset; - // "pod" = Part of Day, "d" = day, "n" = night - if(forecastResponse[1].list[0].sys.pod === "d") - { - sunrise = new Date(sunriseMs + midnightMs); - sunset = new Date(sunsetMs + thisMorningMs); - } - else - { - sunrise = new Date(sunriseMs + thisMorningMs); - sunset = new Date(sunsetMs + midnightMs); - } - - let forecastDays = clamp(1, extension._days_forecast + 1, 5); - extension._forecastDays = forecastDays - 1; - - let forecasts = [ ]; - for(let i = 0; i < forecastDays; i++) - { - let day = [ ]; - for(let j = 0; j < 8; j++) - { - let h = forecastResponse[1].list[i * 8 + j]; - let fIconId = h.weather[0].icon; - let isFNight = fIconId[fIconId.length - 1] === "n"; - - // Create Date from UTC timestamp - let match = h.dt_txt.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):/); - let dt = new Date(Date.UTC(match[1], match[2] - 1, match[3], match[4])); - - day.push(new Forecast( - dt, - new Date(dt.getTime() + 3600000 * 3), - new Weather( - h.main.temp, - h.main.feels_like, - h.main.humidity, - h.main.pressure, - h.wind?.speed, - h.wind?.deg, - h.wind?.gust, - getIconName(WeatherProvider.OPENWEATHERMAP, fIconId, isFNight, true), - getCondit(extension, h.weather[0].id, h.weather[0].description, gettext), - sunrise, - sunset - ) - )); - } - forecasts.push(day); - } - - return new Weather( - m.temp, - m.feels_like, - m.humidity, - m.pressure, - json.wind?.speed, - json.wind?.deg, - json.wind?.gust, - getIconName(WeatherProvider.OPENWEATHERMAP, iconId, iconId[iconId.length - 1] === "n", true), - getCondit(extension, json.weather[0].id, json.weather[0].description, gettext), - sunrise, - sunset, - forecasts - ); - } - - case WeatherProvider.WEATHERAPICOM: - { - params = - { - q: `${lat},${lon}`, - days: String(extension._days_forecast + 2) - }; - if(extension._providerTranslations) params.lang = extension.locale; - let apiKey = extension.getWeatherKey(); - if(apiKey) params.key = apiKey; - - let response; - try - { - response = await loadJsonAsync("https://api.weatherapi.com/v1/forecast.json", params); - } - catch(e) - { - console.error(`OpenWeather Refined: Failed to fetch weather from weatherapi.com ('${e.message}').`); - return null; - } - - let statusCode = response[0]; - let json = response[1]; - if(!isSuccess(statusCode)) - { - let f; - if(json && json.error) f = json.error.message; - else f = `Status Code ${statusCode}`; - console.error(`OpenWeather Refined: Invalid API Response from WeatherAPI.com '${f}'.`); - - if(statusCode === 403 && json?.error?.code === 2007) throw new TooManyReqError(WeatherProvider.WEATHERAPICOM); - return null; - } - - let m = json.current; - let astro; - try - { - astro = json.forecast.forecastday[0].astro; - } - catch(e) - { - console.log(m); - console.log(json.forecast); - console.log(json.forecast.forecastday); - throw e; - } - - const KPH_TO_MPS = 1.0 / 3.6; - - // Just a time is returned, we need to figure out if that time is - // today or tomorrow - let thisMorningMs = new Date().setHours(0, 0, 0, 0); - let midnightMs = thisMorningMs + 3600000 * 24; - let sunriseMs = timeToMs(astro.sunrise); - let sunsetMs = timeToMs(astro.sunset); - - let sunrise, sunset; - if(m.is_day) - { - sunrise = new Date(sunriseMs + midnightMs); - sunset = new Date(sunsetMs + thisMorningMs); - } - else - { - sunrise = new Date(sunriseMs + thisMorningMs); - sunset = new Date(sunsetMs + midnightMs); - } - - let gotDaysForecast = json.forecast.forecastday.length; - let forecastDays = clamp(1, extension._days_forecast + 1, gotDaysForecast); - extension._forecastDays = forecastDays - 1; - - let forecasts = [ ]; - for(let i = 0; i < forecastDays; i++) - { - let day = [ ]; - let d = json.forecast.forecastday[i]; - for(let j = 0; j < d.hour.length; j++) - { - let h = d.hour[j]; - let dt = new Date(h.time); - day.push(new Forecast( - dt, - new Date(dt.getTime() + 3600000), - new Weather( - h.temp_c, - h.feelslike_c, - h.humidity, - h.pressure_mb, - h.wind_kph * KPH_TO_MPS, - h.wind_degree, - h.gust_kph * KPH_TO_MPS, - getIconName(WeatherProvider.WEATHERAPICOM, h.condition.code, !h.is_day, true), - getCondit(extension, h.condition.code, h.condition.text, gettext), - sunrise, - sunset - ) - )); - } - forecasts.push(day); - } - - return new Weather( - m.temp_c, - m.feelslike_c, - m.humidity, - m.pressure_mb, - m.wind_kph * KPH_TO_MPS, - m.wind_degree, - m.gust_kph * KPH_TO_MPS, - getIconName(WeatherProvider.WEATHERAPICOM, m.condition.code, !m.is_day, true), - getCondit(extension, m.condition.code, m.condition.text, gettext), - sunrise, - sunset, - forecasts - ); - } - - case WeatherProvider.VISUALCROSSING: - { - params = - { - unitGroup: "metric", - contentType: "json", - timezone: "Z", - days: String(extension._days_forecast + 2) - }; - if(extension._providerTranslations) params.lang = extension.locale; - let apiKey = extension.getWeatherKey(); - if(apiKey) params.key = apiKey; - - let response; - try - { - // %2C = "," (comma) - response = await loadJsonAsync(`https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/${lat}%2C${lon}`, params); - } - catch(e) - { - console.error(`OpenWeather Refined: Failed to fetch weather from visualcrossing.com ('${e.message}').`); - return null; - } - - const KPH_TO_MPS = 1.0 / 3.6; - - let statusCode = response[0]; - let json = response[1]; - if(!isSuccess(statusCode)) - { - let f; - if(json && json.error) f = json.error.message; - else f = `Status Code ${statusCode}`; - console.error(`OpenWeather Refined: Invalid API Response from VisualCrossing.com '${f}'.`); - - if(statusCode === 429) throw new TooManyReqError(WeatherProvider.VISUALCROSSING); - return null; - } - - let gotDaysForecast = json.days.length; - let forecastDays = clamp(1, extension._days_forecast + 1, gotDaysForecast); - extension._forecastDays = forecastDays - 1; - - let forecasts = [ ]; - for(let i = 0; i < forecastDays; i++) - { - let day = [ ]; - let d = json.days[i]; - for(let j = 0; j < d.hours.length; j++) - { - let h = d.hours[j]; - let dt = new Date(h.datetimeEpoch * 1000); - let hSunriseDt = new Date(h.sunriseEpoch * 1000); - let hSunsetDt = new Date(h.sunsetEpoch * 1000); - day.push(new Forecast( - dt, - new Date(dt.getTime() + 3600000), - new Weather( - h.temp, - h.feelslike, - h.humidity, - h.pressure, - h.windspeed * KPH_TO_MPS, - h.winddir, - h.windgust * KPH_TO_MPS, - // Only partly cloudy and clear have "-day" or "-night" at the end but those are - // also the only icons with night variants - getIconName(WeatherProvider.VISUALCROSSING, h.icon, !h.icon.endsWith("-night"), true), - gettext(h.conditions), - hSunriseDt, - hSunsetDt - ) - )); - } - forecasts.push(day); - } - - let m = json.currentConditions; - let sunriseDt = new Date(m.sunriseEpoch * 1000); - let sunsetDt = new Date(m.sunsetEpoch * 1000); - - return new Weather( - m.temp, - m.feelslike, - m.humidity, - m.pressure, - m.windspeed * KPH_TO_MPS, - m.winddir, - m.windgust * KPH_TO_MPS, - // See comment in forecast - getIconName(WeatherProvider.VISUALCROSSING, m.icon, !m.icon.endsWith("-night"), true), - gettext(m.conditions), - sunriseDt, - sunsetDt, - forecasts - ); - } - - case WeatherProvider.OPENMETEO: - { - params = - { - latitude: lat, - longitude: lon, - forecast_days: String(extension._days_forecast + 2), - wind_speed_unit: "ms" - }; - if(extension._providerTranslations) params.lang = extension.locale; - let apiKey = extension.getWeatherKey(); - if(apiKey) params.key = apiKey; - - let response; - try - { - response = await loadJsonAsync("https://api.weatherapi.com/v1/forecast.json", params); - } - catch(e) - { - console.error(`OpenWeather Refined: Failed to fetch weather from weatherapi.com ('${e.message}').`); - return null; - } - } - - default: - console.error("OpenWeather Refined: Invalid weather provider."); - return null; - } -} - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/ar/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/ar/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index 2d0e2560..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/ar/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/be/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/be/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index 154bb1a7..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/be/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/bg/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/bg/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index 7c68702b..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/bg/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/ca/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/ca/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index 94f458c1..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/ca/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/cs/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/cs/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index 4accf5d5..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/cs/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/da/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/da/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index f4cb5982..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/da/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/de/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/de/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index b364ff8c..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/de/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/el/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/el/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index 28a833d9..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/el/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/en/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/en/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index ed83c80d..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/en/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/es/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/es/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index 484aa95d..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/es/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/eu/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/eu/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index 612bdd70..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/eu/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/fi/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/fi/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index 8dc1770d..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/fi/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/fr/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/fr/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index 564de0c5..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/fr/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/he/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/he/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index 2fcab766..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/he/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/hu/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/hu/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index 2bd7da6f..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/hu/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/id/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/id/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index 44ae8434..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/id/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/it/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/it/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index 349ff345..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/it/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/ja/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/ja/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index 61159017..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/ja/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/lt/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/lt/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index c7d34a26..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/lt/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/nb/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/nb/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index 107f30bb..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/nb/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/nl/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/nl/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index 29d10790..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/nl/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/pl/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/pl/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index a86eba3d..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/pl/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/pt/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/pt/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index ee437f1d..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/pt/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/pt_BR/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/pt_BR/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index cb437bdd..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/pt_BR/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/ro/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/ro/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index bb2704a4..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/ro/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/ru/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/ru/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index 2b89fbd6..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/ru/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/sk/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/sk/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index e736293b..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/sk/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/sr/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/sr/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index 72e82368..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/sr/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/sr@latin/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/sr@latin/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index cc91453c..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/sr@latin/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/sv/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/sv/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index b49eb64e..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/sv/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/tr/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/tr/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index d4da9caf..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/tr/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/uk/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/uk/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index 1f0a3226..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/uk/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/vi/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/vi/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index 47b892cd..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/vi/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/zh_CN/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/zh_CN/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index 7f664abb..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/zh_CN/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/zh_TW/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/zh_TW/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo deleted file mode 100644 index 4c205086..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locale/zh_TW/LC_MESSAGES/gnome-shell-extension-openweatherrefined.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locs.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locs.js deleted file mode 100644 index 8dd2eff2..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/locs.js +++ /dev/null @@ -1,383 +0,0 @@ -/* - This file is part of OpenWeather Refined (gnome-shell-extension-openweatherrefined). - - OpenWeather Refined is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - OpenWeather Refined is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - OpenWeather Refined. If not, see <https://www.gnu.org/licenses/>. - - Copyright 2024 TealPenguin -*/ - -import GLib from "gi://GLib"; - -import { getLocationInfo, getCachedLocInfo } from "./myloc.js"; -import { WeatherProvider } from "./getweather.js"; - -export const NAME_TYPE = { - CUSTOM: 0, - MY_LOC: 1 -}; - -export const PLACE_TYPE = { - COORDS: 0, - MY_LOC: 1 -}; - -export class Loc -{ - #nameType; - #name; - #placeType; - #place; - - /** - * Creates a location. - * @param {number} nameType The {@link NAME_TYPE}. - * @param {string} name The name string. - * @param {number} placeType The {@link PLACE_TYPE}. - * @param {string} place The place string. - * @see Loc.myLoc @see Loc.fromNameCoords - */ - constructor(nameType, name, placeType, place) - { - let error = false; - - if(typeof nameType !== "number") - { - error = true; - console.error(`OpenWeather Refined: NameType (${nameType}) not a number.`); - } - this.#nameType = nameType; - - if(typeof name !== "string") - { - error = true; - console.error(`OpenWeather Refined: Name (${name}) not a string.`); - } - this.#name = name; - - if(typeof placeType !== "number") - { - error = true; - console.error(`OpenWeather Refined: PlaceType (${placeType}) not a number.`); - } - this.#placeType = placeType; - - if(typeof place !== "string") - { - error = true; - console.error(`OpenWeather Refined: Place (${place}) not a string.`); - } - this.#place = place; - - if(error) console.trace("OpenWeather Refined: Loc ctor backtrace"); - } - - /** - * The name of the location to display. - * @returns {string} The name to display. - */ - getName(gettext) - { - if(gettext === undefined) - { - console.error("OpenWeather Refined: Loc#getName did not receive a gettext argument. Pass 'null' for no gettext."); - console.trace("OpenWeather Refined backtrace"); - } - - switch(this.#nameType) - { - case NAME_TYPE.CUSTOM: - return this.#name; - case NAME_TYPE.MY_LOC: - return gettext ? gettext("My Location") : "My Location"; - default: - console.warn(`OpenWeather Refined: Invalid name type (${this.#nameType}).`); - return null; - } - } - - /** - * Tests if the name is special (i.e. not user-entered). - * @returns {boolean} If the name is not a user-specified string. - */ - isSpecialName() - { - return this.#nameType !== NAME_TYPE.CUSTOM; - } - - /** - * Gets the coordinates of the location. - * @returns {Promise<[number, number]>} The [ latitude, longitude ]. - */ - async getCoords(settings) - { - let info; - switch(this.#placeType) - { - case PLACE_TYPE.COORDS: - return this.#place.split(","); - case PLACE_TYPE.MY_LOC: - try - { - info = await getLocationInfo(settings); - return [ info.lat, info.lon ]; - } - catch(e) - { - console.error(e); - if(!settings) return [ 0.0, 0.0 ]; - let locs = settingsGetLocs(settings); - for(let l of locs) - { - if(!l.isMyLoc()) return l.getCoords(); - } - return [ 0.0, 0.0 ]; - } - default: - console.warn(`OpenWeather Refined: Invalid place type (${this.#placeType}).`); - return null; - } - } - - /** - * Does a best chance at getting coords without doing any async calls. - * @returns {[number, number]} The [ latitude, longitude ]. - */ - getKnownCoordsSync() - { - let info; - switch(this.#placeType) - { - case PLACE_TYPE.COORDS: - return this.#place.split(","); - case PLACE_TYPE.MY_LOC: - info = getCachedLocInfo(); - return info ? [ 0, 0 ] : [ info.lat, info.lon ]; - default: - console.warn(`OpenWeather Refined: Invalid place type (${this.#placeType}).`); - return null; - } - } - - getPlaceDisplay(gettext) - { - if(gettext === undefined) - { - console.error("OpenWeather Refined: Loc#getPlaceDisplay did not receive a gettext argument. Pass 'null' for no gettext."); - } - - let coords; - switch(this.#placeType) - { - case PLACE_TYPE.COORDS: - coords = this.#place.split(","); - return `${coords[0]}, ${coords[1]}`; - case PLACE_TYPE.MY_LOC: - return gettext ? gettext("My Location") : "My Location"; - default: - console.warn(`OpenWeather Refined: Invalid place type (${this.#placeType}).`); - return null; - } - } - - /** - * Gets if this is a "My Location" type. - * @returns {boolean} If this has a "My Location" place type. - */ - isMyLoc() - { - return this.#placeType === PLACE_TYPE.MY_LOC; - } - - /** - * Checks if this and another {@link Loc} are equal. - * @param {Loc} other The location to compare this to. - * @returns {boolean} `true` if the two are equal. - */ - equals(other) - { - return this.#nameType === other.#nameType && - this.#name === other.#name && - this.#placeType === other.#placeType && - this.#place === other.#place; - } - - getNameType() - { - return this.#nameType; - } - - getPlaceType() - { - return this.#placeType; - } - - toArrayForm() - { - return [ this.#nameType, this.#name, this.#placeType, this.#place ]; - } - - static myLoc() - { - return new Loc(NAME_TYPE.MY_LOC, "", PLACE_TYPE.MY_LOC, ""); - } - - static fromNameCoords(name, lat, lon) - { - return new Loc(NAME_TYPE.CUSTOM, name, PLACE_TYPE.COORDS, `${lat},${lon}`); - } - - static arrsEqual(locArr1, locArr2) - { - // If one is null/undefined but the other is not not equal - if(Boolean(locArr1) !== Boolean(locArr2)) return false; - // If they compare true they must be equal - else if(locArr1 === locArr2) return true; - // If their lengths are different they're definitely not equal - else if(locArr1.length !== locArr2.length) return false; - - for(let i in locArr1) - { - if(!locArr1[i].equals(locArr2[i])) return false; - } - return true; - } - -} - -function fromLocsGVariant(val) -{ - val.get_data(); - let locCount = val.n_children(); - - let arr = [ ]; - - for(let i = 0; i < locCount; i++) - { - let tuple = val.get_child_value(i); - tuple.get_data(); - - let tupleCount = tuple.n_children(); - if(tupleCount !== 4) - { - console.error(`OpenWeather Refined: 'locs' tuple of count ${tupleCount}, not 4.`); - return [ ]; - } - - let nameTy = tuple.get_child_value(0).get_uint32(); - let name = tuple.get_child_value(1).get_string()[0]; - let placeTy = tuple.get_child_value(2).get_uint32(); - let place = tuple.get_child_value(3).get_string()[0]; - arr.push([ nameTy, name, placeTy, place ]); - } - - return arr; -} - -function fromKeysGVariant(val) -{ - val.get_data(); - let keyCount = val.n_children(); - - let arr = Array.from({ length: WeatherProvider.COUNT }, () => ""); - for(let i = 0; i < keyCount; i++) - { - let k = val.get_child_value(i); - arr[i] = k.get_string()[0]; - } - - return arr; -} - -function getLocsGVariantCount(val) -{ - val.get_data(); - return val.n_children(); -} - -export function toLocsGVariant(arr) -{ - let tuples = [ ]; - for(let l of arr) - { - let locArr = l.toArrayForm(); - let info = - [ - GLib.Variant.new_uint32(locArr[0]), - GLib.Variant.new_string(locArr[1]), - GLib.Variant.new_uint32(locArr[2]), - GLib.Variant.new_string(locArr[3]) - ]; - tuples.push(GLib.Variant.new_tuple(info)); - } - - let gArray = GLib.Variant.new_array(null, tuples); - - return gArray; -} - -export function toKeysGVariant(arr) -{ - let strings = [ ]; - for(let s of arr) - { - strings.push(GLib.Variant.new_string(s)); - } - return GLib.Variant.new_array(null, strings); -} - -export function settingsGetLocs(settings) -{ - let gvariant = settings.get_value("locs"); - if(!gvariant) return [ ]; - - let arr = fromLocsGVariant(gvariant); - - let locs = [ ]; - for(let a of arr) - { - locs.push(new Loc(a[0], a[1], a[2], a[3])); - } - - return locs; -} - -export function settingsGetKeys(settings) -{ - return fromKeysGVariant(settings.get_value("custom-keys")); -} - -export function settingsGetLocsCount(settings) -{ - let gvariant = settings.get_value("locs"); - return gvariant ? getLocsGVariantCount(gvariant) : 0; -} - -export function settingsSetLocs(settings, locs) -{ - if(!locs || !locs.length) - { - locs = [ Loc.myLoc() ]; - } - settings.set_value("locs", toLocsGVariant(locs)); -} - -export function settingsSetKeys(settings, keys) -{ - if(!keys || !keys.length) - { - keys = [ ]; - } - settings.set_value("custom-keys", toKeysGVariant(keys)); -} - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/openweather-icon.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/openweather-icon.svg deleted file mode 100644 index bb0935f1..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/openweather-icon.svg +++ /dev/null @@ -1 +0,0 @@ -<svg id="svg" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="400" height="400" viewBox="0, 0, 400,400"><g id="svgg"><path id="path0" d="M190.361 122.806 C 151.701 124.976,120.074 153.873,113.535 193.000 C 112.810 197.335,112.810 214.335,113.535 218.400 C 114.911 226.124,117.919 236.492,119.305 238.292 C 119.791 238.922,120.885 238.389,122.800 236.590 C 128.818 230.935,140.383 224.804,151.000 221.640 C 159.962 218.969,176.795 218.451,184.899 220.595 C 185.888 220.857,186.228 220.630,188.274 218.343 C 199.640 205.638,215.637 195.239,228.756 192.025 C 229.550 191.831,231.640 191.314,233.400 190.877 C 246.014 187.748,259.631 187.740,272.467 190.856 C 277.736 192.135,277.706 192.201,275.539 184.200 C 268.158 156.951,244.580 132.673,219.000 125.985 C 210.368 123.728,199.161 122.030,195.800 122.471 C 195.580 122.499,193.133 122.650,190.361 122.806 M249.900 204.696 C 251.275 204.774,253.525 204.774,254.900 204.696 C 256.275 204.618,255.150 204.554,252.400 204.554 C 249.650 204.554,248.525 204.618,249.900 204.696 M240.800 205.433 C 238.774 205.934,238.742 205.958,240.400 205.740 C 241.390 205.609,243.370 205.370,244.800 205.208 L 247.400 204.914 245.200 204.902 C 243.990 204.895,242.010 205.134,240.800 205.433 M258.900 205.087 C 259.505 205.178,260.495 205.178,261.100 205.087 C 261.705 204.995,261.210 204.920,260.000 204.920 C 258.790 204.920,258.295 204.995,258.900 205.087 M263.200 205.600 C 263.750 205.776,264.650 205.917,265.200 205.913 C 266.098 205.906,266.078 205.874,265.000 205.600 C 263.308 205.169,261.856 205.169,263.200 205.600 M236.200 206.400 C 235.181 206.838,236.232 206.838,237.600 206.400 C 238.404 206.143,238.443 206.077,237.800 206.068 C 237.360 206.062,236.640 206.211,236.200 206.400 M267.200 206.400 C 268.568 206.838,269.619 206.838,268.600 206.400 C 268.160 206.211,267.440 206.062,267.000 206.068 C 266.357 206.077,266.396 206.143,267.200 206.400 M232.600 207.315 C 216.195 213.193,206.550 220.276,196.156 234.078 C 195.140 235.427,193.840 236.593,192.756 237.130 C 191.790 237.608,191.288 238.000,191.641 238.000 C 192.918 238.000,195.022 236.117,197.899 232.396 C 207.157 220.425,218.466 212.399,232.600 207.768 C 234.140 207.263,235.040 206.858,234.600 206.868 C 234.160 206.877,233.260 207.079,232.600 207.315 M270.200 207.086 C 271.784 207.470,279.830 210.560,281.147 211.292 C 281.888 211.703,282.585 211.948,282.697 211.837 C 283.140 211.393,271.461 206.760,270.117 206.846 C 269.511 206.886,269.524 206.923,270.200 207.086 M284.535 212.918 C 296.903 220.026,306.083 229.497,312.312 241.576 C 314.691 246.191,315.243 247.065,314.223 244.606 C 310.624 235.924,302.128 225.141,293.818 218.708 C 290.498 216.137,283.950 211.977,283.288 212.018 C 283.129 212.027,283.691 212.432,284.535 212.918 M165.633 235.346 C 165.725 235.426,168.590 235.576,172.000 235.679 C 175.432 235.783,177.307 235.733,176.200 235.568 C 174.167 235.265,165.329 235.079,165.633 235.346 M162.505 235.887 C 163.114 235.979,164.014 235.977,164.505 235.882 C 164.997 235.787,164.500 235.711,163.400 235.714 C 162.300 235.717,161.897 235.795,162.505 235.887 M158.200 236.410 C 157.666 236.647,157.998 236.686,159.200 236.527 C 160.190 236.396,161.075 236.224,161.167 236.144 C 161.514 235.843,158.964 236.072,158.200 236.410 M152.040 238.002 C 135.658 243.594,123.336 255.447,117.445 271.283 C 116.650 273.418,116.009 275.398,116.020 275.683 C 116.031 275.967,116.660 274.490,117.417 272.400 C 123.827 254.713,139.006 241.027,156.600 237.073 C 157.230 236.931,157.188 236.889,156.400 236.874 C 155.850 236.864,153.888 237.371,152.040 238.002 M184.600 237.409 C 187.215 238.135,188.324 238.112,186.000 237.379 C 185.010 237.067,183.840 236.822,183.400 236.833 C 182.960 236.845,183.500 237.104,184.600 237.409 M188.705 238.283 C 189.202 238.379,189.922 238.375,190.305 238.275 C 190.687 238.175,190.280 238.096,189.400 238.101 C 188.520 238.105,188.207 238.187,188.705 238.283 M315.346 248.000 C 315.460 248.330,315.949 249.840,316.432 251.356 C 317.362 254.270,319.713 257.209,321.100 257.191 C 321.524 257.185,321.282 256.927,320.487 256.535 C 318.765 255.686,317.772 254.232,316.800 251.135 C 316.362 249.741,315.809 248.330,315.571 248.000 C 315.187 247.467,315.162 247.467,315.346 248.000 M322.400 257.582 C 322.730 257.805,323.345 257.991,323.767 257.994 C 324.790 258.002,324.471 257.773,323.000 257.444 C 322.124 257.248,321.962 257.285,322.400 257.582 M327.391 258.992 C 328.927 259.519,330.262 259.872,330.358 259.775 C 330.454 259.679,330.456 259.600,330.361 259.600 C 330.266 259.600,329.204 259.240,328.000 258.800 C 326.796 258.360,325.539 258.008,325.206 258.017 C 324.873 258.026,325.856 258.465,327.391 258.992 M334.346 262.004 C 342.542 266.355,349.974 273.586,353.559 280.700 C 354.031 281.635,354.519 282.400,354.645 282.400 C 355.065 282.400,351.958 277.084,350.219 274.828 C 346.225 269.647,339.602 264.198,333.711 261.247 C 329.765 259.270,330.221 259.814,334.346 262.004 M115.207 278.446 C 114.927 279.681,114.796 280.941,114.917 281.246 C 115.038 281.551,115.151 281.332,115.168 280.760 C 115.186 280.188,115.396 279.156,115.636 278.468 C 115.876 277.780,115.992 276.988,115.895 276.709 C 115.797 276.429,115.488 277.211,115.207 278.446 M114.259 283.488 C 114.121 284.319,114.030 285.720,114.056 286.600 C 114.087 287.647,114.223 287.173,114.448 285.230 C 114.811 282.096,114.683 280.919,114.259 283.488 M354.828 283.000 C 354.828 283.220,355.086 283.850,355.400 284.400 C 355.714 284.950,355.972 285.220,355.972 285.000 C 355.972 284.780,355.714 284.150,355.400 283.600 C 355.086 283.050,354.828 282.780,354.828 283.000 M356.063 285.800 C 356.062 286.020,356.303 286.830,356.600 287.600 C 356.897 288.370,357.145 288.730,357.152 288.400 C 357.158 288.070,356.917 287.260,356.614 286.600 C 356.312 285.940,356.064 285.580,356.063 285.800 M357.256 289.600 C 357.256 289.930,357.411 290.560,357.600 291.000 C 357.817 291.504,357.944 291.578,357.944 291.200 C 357.944 290.870,357.789 290.240,357.600 289.800 C 357.383 289.296,357.256 289.222,357.256 289.600 M358.307 294.000 C 358.468 295.210,358.600 298.540,358.600 301.400 C 358.600 304.260,358.468 307.590,358.307 308.800 C 358.024 310.922,358.034 310.908,358.582 308.400 C 358.895 306.970,359.151 303.820,359.151 301.400 C 359.151 298.980,358.895 295.830,358.582 294.400 C 358.034 291.892,358.024 291.878,358.307 294.000 M114.053 295.657 C 113.688 308.550,124.326 327.455,137.025 336.480 C 142.294 340.223,152.882 345.222,155.483 345.192 C 155.877 345.187,154.580 344.639,152.600 343.973 C 131.513 336.884,117.019 318.872,114.422 296.530 C 114.143 294.125,114.099 294.021,114.053 295.657 M357.632 311.634 C 357.614 311.983,357.229 313.397,356.776 314.777 C 356.323 316.157,356.041 317.374,356.148 317.481 C 356.442 317.776,358.079 312.021,357.856 311.474 C 357.743 311.196,357.650 311.262,357.632 311.634 M354.055 321.661 C 348.381 333.337,337.493 342.266,325.307 345.237 C 324.156 345.518,323.296 345.829,323.396 345.929 C 323.495 346.029,324.437 345.885,325.489 345.610 C 335.678 342.942,344.655 336.672,350.786 327.943 C 352.672 325.257,356.252 318.516,355.950 318.219 C 355.868 318.138,355.015 319.687,354.055 321.661 M157.000 345.600 C 157.440 345.789,158.160 345.938,158.600 345.932 C 159.243 345.923,159.204 345.857,158.400 345.600 C 157.032 345.162,155.981 345.162,157.000 345.600 M162.600 346.592 C 165.241 347.044,178.909 347.128,240.800 347.074 L 315.800 347.009 239.400 346.758 C 197.380 346.619,162.190 346.402,161.200 346.275 C 160.210 346.148,160.840 346.291,162.600 346.592 M317.800 346.400 C 315.891 346.662,315.872 346.676,317.400 346.702 C 318.280 346.717,319.900 346.590,321.000 346.418 C 323.699 345.998,320.850 345.982,317.800 346.400 " stroke="none" fill="#fab32c" fill-rule="evenodd"></path><path id="path1" d="M190.600 34.464 C 188.419 35.593,187.267 36.711,186.363 38.575 C 185.183 41.010,185.183 80.021,186.363 82.316 C 189.820 89.035,200.202 89.431,204.200 82.995 L 205.400 81.064 205.513 61.032 C 205.638 38.856,205.689 39.356,203.028 36.467 C 200.314 33.521,194.295 32.551,190.600 34.464 M111.868 55.426 C 104.999 57.301,102.259 64.549,106.000 70.951 C 106.880 72.457,107.600 73.733,107.600 73.787 C 107.600 73.882,108.248 75.012,114.602 86.000 C 125.497 104.843,125.459 104.800,131.328 104.800 C 139.538 104.800,144.196 96.577,140.143 89.238 C 138.430 86.136,129.970 71.403,128.407 68.800 C 127.813 67.810,126.201 65.069,124.825 62.708 C 120.763 55.739,117.482 53.895,111.868 55.426 M273.553 55.406 C 269.855 56.419,269.448 56.896,263.504 67.200 C 261.410 70.830,258.395 76.050,256.803 78.800 C 249.252 91.844,249.537 91.217,249.537 94.807 C 249.537 102.335,257.138 107.085,264.092 103.901 C 266.747 102.685,266.416 103.153,274.380 89.400 C 277.948 83.240,281.459 77.210,282.183 76.000 C 289.188 64.289,288.049 57.844,278.535 55.366 C 276.060 54.722,276.048 54.722,273.553 55.406 M182.200 105.012 C 181.320 105.329,179.803 105.591,178.828 105.594 C 177.854 105.597,176.504 105.764,175.828 105.965 C 173.946 106.525,171.173 107.218,169.400 107.571 C 167.868 107.876,163.078 109.332,161.400 110.002 C 160.960 110.178,159.340 110.815,157.800 111.418 C 128.632 122.835,105.881 148.174,98.020 178.000 C 97.759 178.990,97.345 180.430,97.099 181.200 C 96.575 182.842,96.094 185.504,95.619 189.400 C 95.431 190.940,95.080 192.829,94.838 193.597 C 94.247 195.481,94.245 216.908,94.836 218.803 C 95.075 219.571,95.427 221.370,95.618 222.800 C 96.155 226.830,96.642 229.296,97.142 230.526 C 97.394 231.145,97.600 232.170,97.600 232.802 C 97.600 233.435,97.780 234.064,98.000 234.200 C 98.220 234.336,98.401 234.842,98.402 235.324 C 98.404 235.806,98.674 236.716,99.002 237.346 C 99.331 237.976,99.600 238.729,99.600 239.019 C 99.600 239.310,100.069 240.684,100.643 242.074 C 101.217 243.463,101.835 244.960,102.016 245.400 C 102.198 245.840,103.030 247.640,103.865 249.400 C 104.700 251.160,105.509 252.894,105.662 253.253 C 105.832 253.653,105.457 254.820,104.700 256.253 C 103.113 259.257,100.400 265.582,100.400 266.277 C 100.400 266.571,100.238 267.123,100.040 267.505 C 99.842 267.887,99.375 269.280,99.003 270.600 C 98.631 271.920,98.163 273.553,97.963 274.228 C 97.763 274.904,97.600 276.096,97.600 276.878 C 97.600 277.660,97.330 279.065,97.000 280.000 C 96.265 282.083,96.127 300.117,96.829 302.403 C 97.065 303.171,97.413 304.790,97.604 306.000 C 98.256 310.155,98.573 311.214,101.298 318.361 C 107.993 335.922,123.205 351.779,139.863 358.563 C 141.368 359.176,142.960 359.825,143.400 360.005 C 144.119 360.299,146.375 361.012,149.821 362.033 C 151.671 362.581,154.707 363.195,157.600 363.605 C 159.030 363.808,161.280 364.145,162.600 364.353 C 165.871 364.870,319.057 364.872,322.000 364.355 C 323.210 364.143,325.280 363.808,326.600 363.612 C 329.193 363.225,331.950 362.489,334.800 361.421 C 335.790 361.050,336.948 360.639,337.373 360.508 C 340.952 359.400,349.300 354.322,354.554 350.056 C 364.484 341.995,373.762 326.546,375.608 315.000 C 375.784 313.900,376.120 312.280,376.354 311.400 C 376.887 309.401,376.890 295.298,376.358 292.600 C 376.141 291.500,375.810 289.790,375.623 288.800 C 375.027 285.649,372.592 278.077,371.963 277.420 C 371.764 277.211,371.600 276.837,371.600 276.590 C 371.600 275.708,367.146 267.849,364.834 264.652 C 357.612 254.666,346.095 246.143,334.400 242.131 C 332.256 241.395,331.600 240.915,331.600 240.082 C 331.600 238.229,324.742 226.295,320.061 220.000 C 315.320 213.626,305.589 204.531,299.414 200.704 L 297.000 199.207 296.487 195.504 C 296.206 193.467,295.810 190.630,295.608 189.200 C 295.406 187.770,294.951 185.430,294.597 184.000 C 294.243 182.570,293.859 180.950,293.742 180.400 C 293.477 179.144,292.446 175.660,292.026 174.600 C 291.852 174.160,291.390 172.810,290.999 171.600 C 290.608 170.390,290.133 169.229,289.944 169.020 C 289.755 168.811,289.600 168.392,289.600 168.090 C 289.600 167.301,285.502 158.790,283.302 155.008 C 274.066 139.135,261.062 126.208,245.200 117.131 C 241.573 115.056,236.308 112.400,235.821 112.400 C 235.695 112.400,234.828 112.044,233.896 111.609 C 230.659 110.100,226.255 108.562,222.400 107.596 C 218.764 106.684,217.306 106.303,216.172 105.965 C 215.496 105.764,214.236 105.598,213.372 105.596 C 212.507 105.593,210.916 105.323,209.836 104.996 C 207.034 104.146,184.568 104.158,182.200 105.012 M50.975 115.117 C 42.171 120.027,42.745 129.197,52.200 134.698 C 53.960 135.721,56.930 137.451,58.800 138.540 C 60.670 139.630,64.450 141.817,67.200 143.400 C 69.950 144.984,74.180 147.430,76.600 148.836 C 85.994 154.293,94.017 151.240,94.705 141.946 C 95.114 136.416,93.911 135.032,83.500 129.050 C 79.815 126.932,73.785 123.452,70.100 121.314 C 57.184 113.824,54.723 113.027,50.975 115.117 M330.200 115.917 C 321.302 120.802,300.770 132.899,299.471 134.023 C 292.627 139.941,297.186 151.600,306.343 151.600 C 309.631 151.600,309.090 151.858,324.600 142.902 C 344.889 131.186,344.893 131.184,345.693 127.329 C 347.669 117.814,338.733 111.232,330.200 115.917 M201.200 122.796 C 207.665 123.285,210.875 123.860,219.000 125.985 C 244.580 132.673,268.158 156.951,275.539 184.200 C 277.706 192.201,277.736 192.135,272.467 190.856 C 259.631 187.740,246.014 187.748,233.400 190.877 C 231.640 191.314,229.550 191.831,228.756 192.025 C 215.637 195.239,199.640 205.638,188.274 218.343 C 186.228 220.630,185.888 220.857,184.899 220.595 C 176.795 218.451,159.962 218.969,151.000 221.640 C 140.383 224.804,128.818 230.935,122.800 236.590 C 120.885 238.389,119.791 238.922,119.305 238.292 C 118.388 237.101,116.424 231.204,115.078 225.600 C 111.455 210.515,112.154 193.493,116.991 179.000 C 127.581 147.274,157.089 124.674,190.361 122.806 C 193.133 122.650,195.580 122.499,195.800 122.471 C 196.020 122.442,198.450 122.588,201.200 122.796 M28.600 196.465 C 21.333 200.234,21.615 211.078,29.080 214.938 C 30.221 215.528,32.535 215.600,50.393 215.600 L 70.427 215.600 72.378 214.611 C 79.276 211.116,79.255 200.074,72.344 196.572 L 70.427 195.600 50.313 195.618 C 30.757 195.635,30.156 195.658,28.600 196.465 M318.792 196.380 C 311.624 200.171,311.751 211.523,319.000 214.848 C 321.520 216.004,359.591 215.990,362.122 214.832 C 369.557 211.430,369.505 199.855,362.039 196.256 C 359.828 195.191,320.830 195.302,318.792 196.380 M264.000 205.385 C 279.612 208.624,290.946 214.742,301.200 225.464 C 308.440 233.034,314.923 243.926,317.175 252.303 C 317.871 254.895,319.784 256.551,323.057 257.397 C 352.985 265.132,367.500 295.058,354.339 321.891 C 347.444 335.949,335.000 344.706,319.200 346.618 C 312.053 347.483,168.148 347.463,162.377 346.597 C 127.291 341.327,105.896 307.210,116.645 273.672 C 125.942 244.667,155.050 229.538,186.283 237.478 C 191.114 238.706,193.539 237.642,197.275 232.657 C 213.107 211.527,240.211 200.449,264.000 205.385 M78.000 261.531 C 76.130 262.586,71.630 265.167,68.000 267.267 C 64.370 269.368,59.690 272.075,57.600 273.284 C 50.167 277.583,47.611 279.262,46.832 280.355 C 40.302 289.525,50.412 300.567,60.481 295.262 C 64.464 293.164,83.686 282.063,88.555 279.048 C 102.054 270.692,91.835 253.732,78.000 261.531 " stroke="none" fill="#241b14" fill-rule="evenodd"></path><path id="path2" d="M244.600 205.189 C 226.315 207.390,209.795 217.015,197.899 232.396 C 193.140 238.550,191.666 239.112,184.687 237.430 C 151.295 229.385,120.351 249.393,114.829 282.600 C 109.810 312.782,131.560 341.890,162.361 346.213 C 168.667 347.099,312.268 347.083,319.400 346.196 C 359.474 341.214,373.079 290.158,340.766 266.016 C 335.610 262.164,329.960 259.579,322.208 257.527 C 319.118 256.709,317.665 254.978,316.054 250.196 C 308.456 227.631,289.230 211.106,264.400 205.800 C 260.895 205.051,248.836 204.679,244.600 205.189 " stroke="none" fill="#fbfbfb" fill-rule="evenodd"></path></g></svg> \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/daytime-sunrise-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/daytime-sunrise-symbolic.svg deleted file mode 100644 index b9d840a7..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/daytime-sunrise-symbolic.svg +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg"> - <g fill="#2e3436"> - <path d="m 2.984375 7.84375 c -0.128906 0 -0.253906 0.046875 -0.355469 0.144531 l -0.707031 0.710938 c -0.195313 0.195312 -0.195313 0.507812 0 0.707031 l 1.417969 1.414062 c 0.195312 0.195313 0.507812 0.195313 0.703125 0 l 0.710937 -0.707031 c 0.195313 -0.199219 0.195313 -0.511719 0 -0.707031 l -1.417968 -1.417969 c -0.097657 -0.097656 -0.222657 -0.148437 -0.351563 -0.144531 z m 9.898437 0 c -0.125 -0.003906 -0.253906 0.046875 -0.351562 0.144531 l -1.414062 1.417969 c -0.195313 0.195312 -0.195313 0.507812 0 0.707031 l 0.707031 0.707031 c 0.195312 0.195313 0.511719 0.195313 0.707031 0 l 1.414062 -1.414062 c 0.195313 -0.199219 0.195313 -0.511719 0 -0.707031 l -0.707031 -0.710938 c -0.097656 -0.097656 -0.226562 -0.144531 -0.355469 -0.144531 z m -4.949218 2.15625 c -2.195313 0 -4 1.800781 -4 4 c 0.003906 0.550781 0.449218 1 1 1 h 6 c 0.554687 0 1 -0.449219 1 -1 c 0 -2.199219 -1.800782 -4 -4 -4 z m -7.5 3 c -0.273438 0 -0.5000002 0.222656 -0.5000002 0.5 v 1 c 0 0.277344 0.2265622 0.5 0.5000002 0.5 h 2 c 0.277344 0 0.5 -0.222656 0.5 -0.5 v -1 c 0 -0.277344 -0.222656 -0.5 -0.5 -0.5 z m 13 0 c -0.273438 0 -0.5 0.222656 -0.5 0.5 v 1 c 0 0.277344 0.226562 0.5 0.5 0.5 h 2 c 0.277344 0 0.5 -0.222656 0.5 -0.5 v -1 c 0 -0.277344 -0.222656 -0.5 -0.5 -0.5 z m 0 0"/> - <path d="m 8 9 c -0.550781 0 -1 -0.449219 -1 -1 v -3 h -2 v -1 h 0.007812 c -0.003906 -0.265625 0.101563 -0.519531 0.285157 -0.707031 l 2 -2 c 0.390625 -0.390625 1.023437 -0.390625 1.414062 0 l 2 2 c 0.183594 0.1875 0.289063 0.441406 0.289063 0.707031 h 0.003906 v 1 h -2 v 3 c 0 0.550781 -0.449219 1 -1 1 z m 0 0"/> - </g> -</svg> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/daytime-sunset-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/daytime-sunset-symbolic.svg deleted file mode 100644 index 9f25688e..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/daytime-sunset-symbolic.svg +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg"> - <g fill="#2e3436"> - <path d="m 2.984375 7.84375 c -0.128906 0 -0.253906 0.046875 -0.355469 0.144531 l -0.707031 0.710938 c -0.195313 0.195312 -0.195313 0.507812 0 0.707031 l 1.417969 1.414062 c 0.195312 0.195313 0.507812 0.195313 0.703125 0 l 0.710937 -0.707031 c 0.195313 -0.199219 0.195313 -0.511719 0 -0.707031 l -1.417968 -1.417969 c -0.097657 -0.097656 -0.222657 -0.148437 -0.351563 -0.144531 z m 9.898437 0 c -0.125 -0.003906 -0.253906 0.046875 -0.351562 0.144531 l -1.414062 1.417969 c -0.195313 0.195312 -0.195313 0.507812 0 0.707031 l 0.707031 0.707031 c 0.195312 0.195313 0.511719 0.195313 0.707031 0 l 1.414062 -1.414062 c 0.195313 -0.199219 0.195313 -0.511719 0 -0.707031 l -0.707031 -0.710938 c -0.097656 -0.097656 -0.226562 -0.144531 -0.355469 -0.144531 z m -4.949218 2.15625 c -2.195313 0 -4 1.800781 -4 4 c 0.003906 0.550781 0.449218 1 1 1 h 6 c 0.554687 0 1 -0.449219 1 -1 c 0 -2.199219 -1.800782 -4 -4 -4 z m -7.5 3 c -0.273438 0 -0.5000002 0.222656 -0.5000002 0.5 v 1 c 0 0.277344 0.2265622 0.5 0.5000002 0.5 h 2 c 0.277344 0 0.5 -0.222656 0.5 -0.5 v -1 c 0 -0.277344 -0.222656 -0.5 -0.5 -0.5 z m 13 0 c -0.273438 0 -0.5 0.222656 -0.5 0.5 v 1 c 0 0.277344 0.226562 0.5 0.5 0.5 h 2 c 0.277344 0 0.5 -0.222656 0.5 -0.5 v -1 c 0 -0.277344 -0.222656 -0.5 -0.5 -0.5 z m 0 0"/> - <path d="m 8 1 c -0.550781 0 -1 0.449219 -1 1 v 3 h -2 v 1 h 0.007812 c -0.003906 0.265625 0.101563 0.519531 0.285157 0.707031 l 2 2 c 0.390625 0.390625 1.023437 0.390625 1.414062 0 l 2 -2 c 0.183594 -0.1875 0.289063 -0.441406 0.289063 -0.707031 h 0.003906 v -1 h -2 v -3 c 0 -0.550781 -0.449219 -1 -1 -1 z m 0 0"/> - </g> -</svg> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/internet-web-browser-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/internet-web-browser-symbolic.svg deleted file mode 100644 index f33a9104..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/internet-web-browser-symbolic.svg +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg"> - <path d="m 8 1.992188 c -2.617188 0 -5.238281 0.933593 -7.195312 2.808593 l -0.496094 0.480469 c -0.3984378 0.378906 -0.410156 1.011719 -0.03125 1.410156 c 0.382812 0.398438 1.015625 0.410156 1.414062 0.03125 l 0.5 -0.476562 c 3.085938 -2.957032 8.53125 -2.957032 11.617188 0 l 0.5 0.476562 c 0.398437 0.378906 1.03125 0.367188 1.414062 -0.03125 c 0.378906 -0.398437 0.367188 -1.03125 -0.03125 -1.410156 l -0.496094 -0.484375 c -1.957031 -1.871094 -4.578124 -2.804687 -7.195312 -2.804687 z m -0.03125 4.007812 c -1.570312 0.011719 -3.128906 0.628906 -4.207031 1.8125 l -0.5 0.550781 c -0.179688 0.195313 -0.277344 0.453125 -0.261719 0.71875 c 0.011719 0.265625 0.128906 0.515625 0.328125 0.695313 c 0.195313 0.179687 0.453125 0.273437 0.71875 0.257812 c 0.265625 -0.011718 0.515625 -0.128906 0.695313 -0.328125 l 0.496093 -0.546875 c 1.277344 -1.402344 4.160157 -1.496094 5.523438 0.003906 l 0.5 0.542969 c 0.175781 0.199219 0.425781 0.316407 0.691406 0.328125 c 0.265625 0.015625 0.523437 -0.078125 0.722656 -0.257812 c 0.195313 -0.179688 0.3125 -0.429688 0.324219 -0.695313 c 0.011719 -0.261719 -0.082031 -0.523437 -0.261719 -0.71875 l -0.5 -0.546875 c -1.121093 -1.234375 -2.703125 -1.828125 -4.269531 -1.816406 z m 0.03125 4 c -0.511719 0 -1.023438 0.195312 -1.414062 0.585938 c -0.78125 0.78125 -0.78125 2.046874 0 2.828124 s 2.046874 0.78125 2.828124 0 s 0.78125 -2.046874 0 -2.828124 c -0.390624 -0.390626 -0.902343 -0.585938 -1.414062 -0.585938 z m 0 0" fill="#2e3436"/> -</svg> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-clear-night-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-clear-night-symbolic.svg deleted file mode 100644 index 20315b26..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-clear-night-symbolic.svg +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg"> - <path d="m 6.816406 1.105469 c -3.296875 0.566406 -5.824218 3.441406 -5.824218 6.894531 c 0 3.855469 3.148437 7 7.003906 7 c 1.75 0 3.347656 -0.652344 4.578125 -1.722656 c -3.773438 -0.980469 -6.582031 -4.417969 -6.582031 -8.492188 c 0 -1.3125 0.300781 -2.554687 0.824218 -3.679687 z m 0 0" fill="#2e3436"/> -</svg> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-clear-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-clear-symbolic.svg deleted file mode 100644 index fd211601..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-clear-symbolic.svg +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg"> - <path d="m 7.5 0 c -0.277344 0 -0.5 0.222656 -0.5 0.5 v 2 c 0 0.277344 0.222656 0.5 0.5 0.5 h 1 c 0.277344 0 0.5 -0.222656 0.5 -0.5 v -2 c 0 -0.277344 -0.222656 -0.5 -0.5 -0.5 z m -4.449219 1.84375 c -0.128906 0 -0.253906 0.046875 -0.351562 0.144531 l -0.710938 0.710938 c -0.195312 0.195312 -0.195312 0.507812 0 0.707031 l 1.417969 1.414062 c 0.195312 0.195313 0.507812 0.195313 0.707031 0 l 0.707031 -0.707031 c 0.195313 -0.199219 0.195313 -0.511719 0 -0.707031 l -1.414062 -1.417969 c -0.101562 -0.097656 -0.226562 -0.144531 -0.355469 -0.144531 z m 9.898438 0 c -0.128907 0 -0.253907 0.046875 -0.355469 0.144531 l -1.414062 1.417969 c -0.195313 0.195312 -0.195313 0.507812 0 0.707031 l 0.707031 0.707031 c 0.199219 0.195313 0.511719 0.195313 0.707031 0 l 1.417969 -1.414062 c 0.195312 -0.199219 0.195312 -0.511719 0 -0.707031 l -0.710938 -0.710938 c -0.097656 -0.097656 -0.222656 -0.144531 -0.351562 -0.144531 z m -4.949219 2.164062 c -2.195312 0 -4 1.804688 -4 4 c 0 2.191407 1.804688 4 4 4 s 4 -1.808593 4 -4 c 0 -2.195312 -1.804688 -4 -4 -4 z m -7.5 2.992188 c -0.277344 0 -0.5 0.222656 -0.5 0.5 v 1 c 0 0.277344 0.222656 0.5 0.5 0.5 h 2 c 0.277344 0 0.5 -0.222656 0.5 -0.5 v -1 c 0 -0.277344 -0.222656 -0.5 -0.5 -0.5 z m 13 0 c -0.277344 0 -0.5 0.222656 -0.5 0.5 v 1 c 0 0.277344 0.222656 0.5 0.5 0.5 h 2 c 0.277344 0 0.5 -0.222656 0.5 -0.5 v -1 c 0 -0.277344 -0.222656 -0.5 -0.5 -0.5 z m -9.742188 4.035156 c -0.128906 0 -0.253906 0.046875 -0.351562 0.144532 l -1.417969 1.414062 c -0.195312 0.199219 -0.195312 0.511719 0 0.707031 l 0.710938 0.710938 c 0.195312 0.195312 0.507812 0.195312 0.707031 0 l 1.414062 -1.417969 c 0.195313 -0.195312 0.195313 -0.507812 0 -0.707031 l -0.707031 -0.707031 c -0.101562 -0.097657 -0.226562 -0.144532 -0.355469 -0.144532 z m 8.484376 0 c -0.128907 0 -0.253907 0.046875 -0.355469 0.144532 l -0.707031 0.707031 c -0.195313 0.199219 -0.195313 0.511719 0 0.707031 l 1.414062 1.417969 c 0.199219 0.195312 0.511719 0.195312 0.707031 0 l 0.710938 -0.710938 c 0.195312 -0.195312 0.195312 -0.507812 0 -0.707031 l -1.417969 -1.414062 c -0.097656 -0.097657 -0.222656 -0.144532 -0.351562 -0.144532 z m -4.742188 1.964844 c -0.277344 0 -0.5 0.222656 -0.5 0.5 v 2 c 0 0.277344 0.222656 0.5 0.5 0.5 h 1 c 0.277344 0 0.5 -0.222656 0.5 -0.5 v -2 c 0 -0.277344 -0.222656 -0.5 -0.5 -0.5 z m 0 0" fill="#2e3436"/> -</svg> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-few-clouds-night-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-few-clouds-night-symbolic.svg deleted file mode 100644 index 1f4d32cf..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-few-clouds-night-symbolic.svg +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg"> - <path d="m 6.820312 1.105469 c -3.296874 0.566406 -5.824218 3.441406 -5.824218 6.894531 c 0 2.328125 1.15625 4.394531 2.917968 5.667969 c 0.3125 -0.8125 1.0625 -1.394531 1.941407 -1.636719 c 0.140625 -1.046875 0.707031 -1.960938 1.515625 -2.554688 c -0.867188 -1.359374 -1.375 -2.964843 -1.375 -4.691406 c 0 -1.3125 0.300781 -2.554687 0.824218 -3.679687 z m 2.679688 8.894531 c -1.378906 0 -2.5 1.121094 -2.5 2.5 c 0 0.21875 0.042969 0.421875 0.09375 0.625 c -0.179688 -0.074219 -0.386719 -0.125 -0.59375 -0.125 c -0.828125 0 -1.5 0.671875 -1.5 1.5 s 0.671875 1.5 1.5 1.5 h 8 c 0.828125 0 1.5 -0.671875 1.5 -1.5 s -0.671875 -1.5 -1.5 -1.5 c 0 -1.105469 -0.894531 -2 -2 -2 c -0.316406 0 -0.609375 0.089844 -0.875 0.21875 c -0.4375 -0.726562 -1.214844 -1.21875 -2.125 -1.21875 z m 0 0" fill="#2e3436"/> -</svg> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-few-clouds-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-few-clouds-symbolic.svg deleted file mode 100644 index ebcc92a8..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-few-clouds-symbolic.svg +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg"> - <path d="m 6.5 1 c -0.277344 0 -0.5 0.222656 -0.5 0.5 v 1 c 0 0.277344 0.222656 0.5 0.5 0.5 h 1 c 0.277344 0 0.5 -0.222656 0.5 -0.5 v -1 c 0 -0.277344 -0.222656 -0.5 -0.5 -0.5 z m -3.742188 1.550781 c -0.128906 0 -0.253906 0.046875 -0.351562 0.148438 l -0.707031 0.707031 c -0.199219 0.195312 -0.199219 0.507812 0 0.707031 l 0.707031 0.707031 c 0.195312 0.195313 0.507812 0.195313 0.707031 0 l 0.707031 -0.707031 c 0.195313 -0.199219 0.195313 -0.511719 0 -0.707031 l -0.707031 -0.707031 c -0.101562 -0.101563 -0.226562 -0.148438 -0.355469 -0.148438 z m 8.484376 0 c -0.128907 -0.003906 -0.253907 0.046875 -0.355469 0.148438 l -0.707031 0.707031 c -0.195313 0.195312 -0.195313 0.507812 0 0.707031 l 0.707031 0.707031 c 0.199219 0.195313 0.511719 0.195313 0.707031 0 l 0.707031 -0.707031 c 0.199219 -0.199219 0.199219 -0.511719 0 -0.707031 l -0.707031 -0.707031 c -0.097656 -0.101563 -0.222656 -0.148438 -0.351562 -0.148438 z m -4.253907 1.457031 c -2.195312 0 -4 1.804688 -4 4 c 0 1.894532 1.347657 3.492188 3.128907 3.894532 c 0 -0.003906 0 -0.007813 0.003906 -0.011719 c 0.476562 -2.085937 2.136718 -3.003906 4.042968 -2.808594 c 0.191407 0.046875 0.371094 0.117188 0.546876 0.195313 c 0.015624 0.003906 0.03125 0.007812 0.042968 0.015625 c 0.140625 -0.40625 0.234375 -0.835938 0.234375 -1.289063 c 0 -2.191406 -1.804687 -4 -4 -4 z m -6.488281 2.992188 c -0.277344 0 -0.5 0.222656 -0.5 0.5 v 1 c 0 0.277344 0.222656 0.5 0.5 0.5 h 1 c 0.277344 0 0.5 -0.222656 0.5 -0.5 v -1 c 0 -0.277344 -0.222656 -0.5 -0.5 -0.5 z m 12 0 c -0.277344 0 -0.5 0.222656 -0.5 0.5 v 1 c 0 0.277344 0.222656 0.5 0.5 0.5 h 1 c 0.277344 0 0.5 -0.222656 0.5 -0.5 v -1 c 0 -0.277344 -0.222656 -0.5 -0.5 -0.5 z m -3 3 c -1.378906 0 -2.5 1.121094 -2.5 2.5 c 0 0.21875 0.042969 0.421875 0.09375 0.625 c -0.179688 -0.074219 -0.386719 -0.125 -0.59375 -0.125 c -0.828125 0 -1.5 0.671875 -1.5 1.5 s 0.671875 1.5 1.5 1.5 h 8 c 0.828125 0 1.5 -0.671875 1.5 -1.5 s -0.671875 -1.5 -1.5 -1.5 c 0 -1.105469 -0.894531 -2 -2 -2 c -0.316406 0 -0.609375 0.089844 -0.875 0.21875 c -0.4375 -0.726562 -1.214844 -1.21875 -2.125 -1.21875 z m -6.742188 1.035156 c -0.128906 0 -0.253906 0.046875 -0.351562 0.144532 l -0.707031 0.707031 c -0.199219 0.199219 -0.199219 0.511719 0 0.707031 l 0.707031 0.707031 c 0.195312 0.199219 0.507812 0.199219 0.707031 0 l 0.707031 -0.707031 c 0.195313 -0.195312 0.195313 -0.507812 0 -0.707031 l -0.707031 -0.707031 c -0.101562 -0.097657 -0.226562 -0.144532 -0.355469 -0.144532 z m 0 0" fill="#2e3436"/> -</svg> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-fog-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-fog-symbolic.svg deleted file mode 100644 index d1c31ba1..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-fog-symbolic.svg +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg"> - <path d="m 3.316406 0.992188 c -0.621094 0 -1 0.332031 -1.273437 0.59375 c -0.273438 0.265624 -0.480469 0.542968 -0.675781 0.796874 c -0.191407 0.25 -0.371094 0.46875 -0.484376 0.578126 c -0.113281 0.113281 -0.121093 0.03125 0.113282 0.03125 c -0.546875 0 -0.996094 0.449218 -0.996094 0.996093 c 0 0.265625 0.105469 0.519531 0.292969 0.707031 s 0.441406 0.292969 0.703125 0.292969 c 0.625 0 1.003906 -0.328125 1.273437 -0.59375 c 0.273438 -0.265625 0.484375 -0.542969 0.675781 -0.792969 c 0.148438 -0.191406 0.261719 -0.324218 0.371094 -0.445312 c 0.109375 0.121094 0.222656 0.253906 0.371094 0.445312 c 0.191406 0.25 0.402344 0.53125 0.671875 0.792969 c 0.273437 0.265625 0.652344 0.59375 1.277344 0.59375 c 0.625 0.003907 1 -0.328125 1.273437 -0.59375 c 0.273438 -0.261719 0.484375 -0.542969 0.675782 -0.792969 c 0.148437 -0.191406 0.261718 -0.324218 0.371093 -0.445312 c 0.109375 0.121094 0.222657 0.257812 0.367188 0.445312 c 0.195312 0.253907 0.402343 0.53125 0.675781 0.796876 c 0.273438 0.265624 0.652344 0.59375 1.273438 0.59375 c 0.625 0 1.003906 -0.328126 1.273437 -0.59375 c 0.273437 -0.265626 0.484375 -0.542969 0.675781 -0.792969 c 0.148438 -0.191407 0.261719 -0.324219 0.371094 -0.445313 c 0.109375 0.121094 0.222656 0.253906 0.371094 0.445313 c 0.191406 0.25 0.402344 0.53125 0.675781 0.792969 c 0.273437 0.265624 0.648437 0.59375 1.273437 0.59375 c 0.550782 0.003906 0.996094 -0.445313 0.996094 -0.996094 c 0 -0.480469 -0.34375 -0.894532 -0.820312 -0.980469 c -0.011719 -0.007813 -0.03125 -0.019531 -0.058594 -0.046875 c -0.117188 -0.109375 -0.296875 -0.332031 -0.488281 -0.582031 c -0.191407 -0.25 -0.402344 -0.53125 -0.671875 -0.796875 c -0.273438 -0.261719 -0.652344 -0.589844 -1.273438 -0.59375 c -0.625 0 -1.003906 0.332031 -1.277344 0.59375 c -0.273437 0.265625 -0.480468 0.542968 -0.671874 0.792968 c -0.148438 0.191407 -0.265626 0.324219 -0.371094 0.445313 c -0.109375 -0.121094 -0.226563 -0.253906 -0.371094 -0.445313 c -0.195312 -0.25 -0.402344 -0.527343 -0.675781 -0.792968 c -0.273438 -0.265625 -0.648438 -0.59375 -1.273438 -0.59375 s -1.003906 0.328125 -1.273437 0.59375 c -0.273438 0.265625 -0.484375 0.542968 -0.675782 0.792968 c -0.148437 0.191407 -0.261718 0.324219 -0.371093 0.441407 c -0.109375 -0.117188 -0.222657 -0.25 -0.371094 -0.441407 c -0.191406 -0.25 -0.402344 -0.53125 -0.671875 -0.796874 c -0.273438 -0.261719 -0.652344 -0.589844 -1.273438 -0.59375 z m 0 5.003906 c -0.621094 0 -1 0.328125 -1.273437 0.59375 c -0.273438 0.265625 -0.480469 0.542968 -0.675781 0.792968 c -0.191407 0.25 -0.371094 0.472657 -0.484376 0.582032 c -0.113281 0.109375 -0.121093 0.03125 0.113282 0.03125 c -0.546875 0 -0.996094 0.445312 -0.996094 0.996094 c 0 0.265624 0.105469 0.519531 0.292969 0.707031 s 0.441406 0.292969 0.703125 0.289062 c 0.625 0.003907 1.003906 -0.328125 1.273437 -0.59375 c 0.273438 -0.261719 0.484375 -0.542969 0.675781 -0.792969 c 0.148438 -0.1875 0.261719 -0.320312 0.371094 -0.441406 c 0.109375 0.121094 0.222656 0.253906 0.371094 0.441406 c 0.191406 0.253907 0.402344 0.53125 0.671875 0.796876 c 0.273437 0.265624 0.652344 0.59375 1.277344 0.59375 s 1 -0.328126 1.273437 -0.59375 c 0.273438 -0.265626 0.484375 -0.542969 0.675782 -0.792969 c 0.148437 -0.191407 0.261718 -0.324219 0.371093 -0.445313 c 0.109375 0.121094 0.222657 0.253906 0.367188 0.445313 c 0.195312 0.25 0.402343 0.53125 0.675781 0.792969 c 0.273438 0.265624 0.652344 0.59375 1.273438 0.59375 c 0.625 0.003906 1.003906 -0.328126 1.273437 -0.59375 c 0.273437 -0.261719 0.484375 -0.542969 0.675781 -0.792969 c 0.148438 -0.1875 0.261719 -0.324219 0.371094 -0.445313 c 0.109375 0.121094 0.222656 0.253906 0.371094 0.445313 c 0.191406 0.253906 0.402344 0.53125 0.671875 0.796875 c 0.273437 0.265625 0.652343 0.59375 1.277343 0.59375 c 0.550782 0 0.996094 -0.445313 0.996094 -0.996094 c 0 -0.484375 -0.34375 -0.894531 -0.820312 -0.980469 c -0.011719 -0.007812 -0.03125 -0.023437 -0.058594 -0.046875 c -0.117188 -0.113281 -0.296875 -0.332031 -0.488281 -0.582031 c -0.191407 -0.253906 -0.402344 -0.53125 -0.671875 -0.796875 c -0.273438 -0.265625 -0.652344 -0.59375 -1.273438 -0.59375 c -0.625 0 -1.003906 0.328125 -1.277344 0.59375 c -0.273437 0.265625 -0.480468 0.542969 -0.671874 0.792969 c -0.148438 0.191406 -0.265626 0.324219 -0.371094 0.445312 c -0.109375 -0.121093 -0.226563 -0.253906 -0.371094 -0.445312 c -0.195312 -0.25 -0.402344 -0.53125 -0.675781 -0.792969 c -0.273438 -0.265625 -0.648438 -0.59375 -1.273438 -0.59375 c -0.625 -0.003906 -1.003906 0.328125 -1.273437 0.59375 c -0.273438 0.261719 -0.484375 0.542969 -0.675782 0.792969 c -0.148437 0.1875 -0.261718 0.320312 -0.371093 0.441406 c -0.109375 -0.121094 -0.222657 -0.253906 -0.371094 -0.441406 c -0.191406 -0.253907 -0.402344 -0.53125 -0.671875 -0.796875 c -0.273438 -0.265625 -0.652344 -0.59375 -1.273438 -0.59375 z m 0 5.003906 c -0.621094 -0.003906 -1 0.328125 -1.273437 0.59375 c -0.273438 0.261719 -0.480469 0.539062 -0.675781 0.792969 c -0.191407 0.25 -0.371094 0.46875 -0.484376 0.582031 c -0.113281 0.109375 -0.121093 0.027344 0.113282 0.027344 c -0.546875 0 -0.996094 0.449218 -0.996094 0.996094 c 0 0.265624 0.105469 0.519531 0.292969 0.707031 s 0.441406 0.292969 0.703125 0.292969 c 0.625 0 1.003906 -0.328126 1.273437 -0.59375 c 0.273438 -0.265626 0.484375 -0.542969 0.675781 -0.792969 c 0.148438 -0.191407 0.261719 -0.324219 0.371094 -0.445313 c 0.109375 0.121094 0.222656 0.253906 0.371094 0.445313 c 0.191406 0.25 0.402344 0.53125 0.671875 0.792969 c 0.273437 0.265624 0.652344 0.59375 1.277344 0.59375 c 0.625 0.003906 1 -0.328126 1.273437 -0.59375 c 0.273438 -0.261719 0.484375 -0.542969 0.675782 -0.792969 c 0.148437 -0.191407 0.261718 -0.324219 0.371093 -0.445313 c 0.109375 0.121094 0.222657 0.257813 0.367188 0.445313 c 0.195312 0.253906 0.402343 0.53125 0.675781 0.796875 s 0.652344 0.59375 1.273438 0.59375 c 0.625 0 1.003906 -0.328125 1.273437 -0.59375 c 0.273437 -0.265625 0.484375 -0.542969 0.675781 -0.792969 c 0.148438 -0.191406 0.261719 -0.324219 0.371094 -0.445313 c 0.109375 0.121094 0.222656 0.253907 0.371094 0.445313 c 0.191406 0.25 0.402344 0.53125 0.675781 0.792969 c 0.273437 0.265625 0.648437 0.59375 1.273437 0.59375 c 0.550782 0.003906 0.996094 -0.445313 0.996094 -0.996094 c 0 -0.480469 -0.34375 -0.894531 -0.820312 -0.980469 c -0.011719 -0.007812 -0.03125 -0.019531 -0.058594 -0.046875 c -0.117188 -0.109375 -0.296875 -0.332031 -0.488281 -0.582031 c -0.191407 -0.25 -0.402344 -0.527344 -0.671875 -0.792969 c -0.273438 -0.265625 -0.652344 -0.59375 -1.273438 -0.597656 c -0.625 0 -1.003906 0.332031 -1.277344 0.59375 c -0.273437 0.265625 -0.480468 0.542969 -0.671874 0.792969 c -0.148438 0.191406 -0.265626 0.324219 -0.371094 0.445312 c -0.109375 -0.121093 -0.226563 -0.253906 -0.371094 -0.445312 c -0.195312 -0.25 -0.402344 -0.527344 -0.675781 -0.792969 c -0.273438 -0.265625 -0.648438 -0.59375 -1.273438 -0.59375 s -1.003906 0.328125 -1.273437 0.59375 c -0.273438 0.265625 -0.484375 0.542969 -0.675782 0.792969 c -0.148437 0.191406 -0.261718 0.324219 -0.371093 0.441406 c -0.109375 -0.117187 -0.222657 -0.25 -0.371094 -0.441406 c -0.191406 -0.25 -0.402344 -0.53125 -0.671875 -0.796875 c -0.273438 -0.261719 -0.652344 -0.589844 -1.273438 -0.59375 z m 0 0" fill="#2e3436" fill-opacity="0.34902"/> -</svg> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-freezing-rain-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-freezing-rain-symbolic.svg deleted file mode 100644 index 1cf4e3b0..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-freezing-rain-symbolic.svg +++ /dev/null @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><g fill="#2e3436"><path d="m 9.492188 1 c -1.277344 0 -2.3125 0.972656 -2.457032 2.21875 c -0.324218 -0.121094 -0.65625 -0.21875 -1.023437 -0.21875 c -1.648438 0 -2.984375 1.34375 -2.984375 3 c 0 0.097656 0.023437 0.183594 0.03125 0.28125 c -0.296875 -0.179688 -0.652344 -0.28125 -1.027344 -0.28125 c -1.097656 0 -1.9882812 0.894531 -1.9882812 2 s 0.8906252 2 1.9882812 2 h 0.375 c 0.164062 -0.351562 0.367188 -0.679688 0.652344 -0.96875 l 2.453125 -2.46875 l 2.457031 2.46875 c 0.285156 0.285156 0.464844 0.621094 0.621094 0.96875 h 0.464844 l 1.429687 -1.4375 l 1.429687 1.4375 h 2.550782 c 0.824218 0 1.492187 -0.671875 1.492187 -1.5 s -0.667969 -1.5 -1.492187 -1.5 c -0.207032 0 -0.414063 0.050781 -0.589844 0.125 c 0.050781 -0.203125 0.089844 -0.40625 0.089844 -0.625 c 0 -1.230469 -0.886719 -2.226562 -2.050782 -2.4375 c 0.042969 -0.179688 0.0625 -0.367188 0.0625 -0.5625 c 0 -1.378906 -1.113281 -2.5 -2.484374 -2.5 z m 0 0"/><path d="m 5.5 7.917969 l -1.769531 1.769531 c -0.96875 0.972656 -0.96875 2.5625 0 3.535156 c 0.972656 0.972656 2.566406 0.972656 3.535156 0 c 0.972656 -0.972656 0.972656 -2.5625 0 -3.535156 z m 0 1.414062 l 1.058594 1.0625 c 0.589844 0.589844 0.589844 1.53125 0 2.121094 s -1.53125 0.589844 -2.121094 0 s -0.589844 -1.53125 0 -2.121094 z m 0 0"/><path d="m 10.5 9.917969 l -1.769531 1.769531 c -0.96875 0.972656 -0.96875 2.5625 0 3.535156 c 0.972656 0.972656 2.566406 0.972656 3.535156 0 c 0.972656 -0.972656 0.972656 -2.5625 0 -3.535156 z m 0 1.414062 l 1.058594 1.0625 c 0.589844 0.589844 0.589844 1.53125 0 2.121094 s -1.53125 0.589844 -2.121094 0 s -0.589844 -1.53125 0 -2.121094 z m 0 0"/></g></svg> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-overcast-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-overcast-symbolic.svg deleted file mode 100644 index 51cfb4e8..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-overcast-symbolic.svg +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg"> - <path d="m 9.5 2 c -1.285156 0 -2.328125 0.972656 -2.46875 2.21875 c -0.328125 -0.121094 -0.660156 -0.21875 -1.03125 -0.21875 c -1.65625 0 -3 1.34375 -3 3 c 0 0.097656 0.023438 0.183594 0.03125 0.28125 c -0.300781 -0.179688 -0.65625 -0.28125 -1.03125 -0.28125 c -1.105469 0 -2 0.894531 -2 2 s 0.894531 2 2 2 h 3.101562 c 0.25 -1.679688 1.652344 -3 3.398438 -3 c 0.980469 0 1.785156 0.488281 2.417969 1.144531 c 0.195312 -0.046875 0.359375 -0.144531 0.582031 -0.144531 c 1.261719 0 2.1875 0.875 2.605469 2 h 0.394531 c 0.828125 0 1.5 -0.671875 1.5 -1.5 s -0.671875 -1.5 -1.5 -1.5 c -0.207031 0 -0.414062 0.050781 -0.59375 0.125 c 0.050781 -0.203125 0.09375 -0.40625 0.09375 -0.625 c 0 -1.230469 -0.894531 -2.226562 -2.0625 -2.4375 c 0.042969 -0.179688 0.0625 -0.367188 0.0625 -0.5625 c 0 -1.378906 -1.121094 -2.5 -2.5 -2.5 z m -1 7 c -1.378906 0 -2.5 1.121094 -2.5 2.5 c 0 0.21875 0.042969 0.421875 0.09375 0.625 c -0.179688 -0.074219 -0.386719 -0.125 -0.59375 -0.125 c -0.828125 0 -1.5 0.671875 -1.5 1.5 s 0.671875 1.5 1.5 1.5 h 8 c 0.828125 0 1.5 -0.671875 1.5 -1.5 s -0.671875 -1.5 -1.5 -1.5 c 0 -1.105469 -0.894531 -2 -2 -2 c -0.316406 0 -0.609375 0.089844 -0.875 0.21875 c -0.4375 -0.726562 -1.214844 -1.21875 -2.125 -1.21875 z m 0 0" fill="#2e3436"/> -</svg> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-severe-alert-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-severe-alert-symbolic.svg deleted file mode 100644 index 19321a17..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-severe-alert-symbolic.svg +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg"> - <path d="m 9.5 2 c -1.285156 0 -2.328125 0.972656 -2.46875 2.21875 c -0.328125 -0.121094 -0.664062 -0.21875 -1.03125 -0.21875 c -1.65625 0 -3 1.34375 -3 3 c 0 0.097656 0.023438 0.183594 0.03125 0.28125 c -0.300781 -0.179688 -0.65625 -0.28125 -1.03125 -0.28125 c -1.105469 0 -2 0.894531 -2 2 s 0.894531 2 2 2 h 5 v -2.125 c 0 -1.011719 0.863281 -1.875 1.875 -1.875 h 5.0625 c -0.210938 -0.984375 -1 -1.757812 -2 -1.9375 c 0.042969 -0.179688 0.0625 -0.367188 0.0625 -0.5625 c 0 -1.378906 -1.121094 -2.5 -2.5 -2.5 z m 0 0" fill="#2e3436"/> - <path class="warning" d="m 8.875 8 c -0.492188 0 -0.875 0.382812 -0.875 0.875 v 6.25 c 0 0.492188 0.382812 0.875 0.875 0.875 h 6.25 c 0.492188 0 0.875 -0.382812 0.875 -0.875 v -6.25 c 0 -0.492188 -0.382812 -0.875 -0.875 -0.875 z m 2.125 1 h 2 v 2.5 s 0 0.5 -0.5 0.5 h -1 c -0.5 0 -0.5 -0.5 -0.5 -0.5 z m 0.5 4 h 1 c 0.277344 0 0.5 0.222656 0.5 0.5 v 1 c 0 0.277344 -0.222656 0.5 -0.5 0.5 h -1 c -0.277344 0 -0.5 -0.222656 -0.5 -0.5 v -1 c 0 -0.277344 0.222656 -0.5 0.5 -0.5 z m 0 0" fill="#ff7800"/> -</svg> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-showers-scattered-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-showers-scattered-symbolic.svg deleted file mode 100644 index 3f5b3680..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-showers-scattered-symbolic.svg +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg"> - <path d="m 5 1.761719 c -0.214844 0 -0.429688 0.082031 -0.570312 0.25 c -0.25 0.289062 -2.429688 2.898437 -2.429688 4.988281 c 0 0.773438 0.265625 1.5 0.75 2.042969 c 0.390625 0.4375 1.09375 0.957031 2.25 0.957031 c 1.96875 0 3 -1.507812 3 -3 c 0 -2.09375 -2.183594 -4.699219 -2.429688 -4.988281 c -0.144531 -0.167969 -0.355468 -0.25 -0.570312 -0.25 z m 6 4 c -0.214844 0 -0.429688 0.082031 -0.570312 0.25 c -0.25 0.289062 -2.429688 2.898437 -2.429688 4.988281 c 0 0.773438 0.265625 1.5 0.75 2.042969 c 0.390625 0.4375 1.09375 0.957031 2.25 0.957031 c 1.96875 0 3 -1.507812 3 -3 c 0 -2.09375 -2.183594 -4.699219 -2.429688 -4.988281 c -0.144531 -0.167969 -0.355468 -0.25 -0.570312 -0.25 z m 0 0" fill="#2e3436"/> -</svg> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-showers-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-showers-symbolic.svg deleted file mode 100644 index 2de4ac39..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-showers-symbolic.svg +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg"> - <path d="m 9.464844 0 c -1.273438 0 -2.304688 0.972656 -2.449219 2.21875 c -0.320313 -0.121094 -0.65625 -0.21875 -1.023437 -0.21875 c -1.640626 0 -2.972657 1.34375 -2.972657 3 c 0 0.097656 0.023438 0.183594 0.03125 0.28125 c -0.296875 -0.179688 -0.652343 -0.28125 -1.023437 -0.28125 c -1.09375 0 -1.9843752 0.894531 -1.9843752 2 s 0.8906252 2 1.9843752 2 h 12.394531 c 0.824219 0 1.488281 -0.671875 1.488281 -1.5 s -0.664062 -1.5 -1.488281 -1.5 c -0.203125 0 -0.410156 0.050781 -0.589844 0.125 c 0.054688 -0.203125 0.09375 -0.40625 0.09375 -0.625 c 0 -1.230469 -0.882812 -2.226562 -2.042969 -2.4375 c 0.042969 -0.179688 0.0625 -0.367188 0.0625 -0.5625 c 0 -1.378906 -1.109374 -2.5 -2.480468 -2.5 z m -7.027344 10 c -0.210938 0.027344 -0.386719 0.1875 -0.429688 0.394531 l -1 4.921875 c -0.023437 0.128906 0 0.261719 0.074219 0.375 c 0.070313 0.109375 0.183594 0.183594 0.3125 0.210938 c 0.132813 0.027344 0.265625 0 0.375 -0.074219 c 0.109375 -0.070313 0.1875 -0.183594 0.210938 -0.316406 l 1 -4.917969 c 0.027343 -0.128906 0.003906 -0.261719 -0.070313 -0.371094 c -0.070312 -0.109375 -0.183594 -0.1875 -0.316406 -0.210937 c -0.050781 -0.011719 -0.101562 -0.015625 -0.15625 -0.011719 z m 8.007812 0 c -0.214843 0.027344 -0.386718 0.1875 -0.429687 0.394531 l -1 4.921875 c -0.027344 0.128906 0 0.261719 0.070313 0.375 c 0.074218 0.109375 0.1875 0.183594 0.316406 0.210938 s 0.265625 0 0.375 -0.074219 c 0.109375 -0.070313 0.183594 -0.183594 0.210937 -0.316406 l 1 -4.917969 c 0.027344 -0.128906 0 -0.261719 -0.070312 -0.371094 c -0.074219 -0.109375 -0.1875 -0.1875 -0.316407 -0.210937 c -0.050781 -0.011719 -0.105468 -0.015625 -0.15625 -0.011719 z m 2 0 c -0.210937 0.027344 -0.386718 0.1875 -0.429687 0.394531 l -1 4.921875 c -0.023437 0.128906 0 0.261719 0.074219 0.375 c 0.070312 0.109375 0.183594 0.183594 0.3125 0.210938 c 0.132812 0.027344 0.265625 0 0.375 -0.074219 c 0.109375 -0.070313 0.1875 -0.183594 0.210937 -0.316406 l 1 -4.917969 c 0.027344 -0.128906 0.003907 -0.261719 -0.070312 -0.371094 c -0.070313 -0.109375 -0.183594 -0.1875 -0.316407 -0.210937 c -0.050781 -0.011719 -0.101562 -0.015625 -0.15625 -0.011719 z m -6.003906 0.003906 c -0.210937 0.023438 -0.382812 0.183594 -0.429687 0.394532 l -1 4.917968 c -0.023438 0.128906 0 0.261719 0.074219 0.375 c 0.070312 0.109375 0.183593 0.183594 0.3125 0.210938 c 0.269531 0.054687 0.53125 -0.121094 0.585937 -0.386719 l 1 -4.917969 c 0.027344 -0.132812 0.003906 -0.265625 -0.070313 -0.375 c -0.074218 -0.109375 -0.1875 -0.1875 -0.316406 -0.210937 c -0.050781 -0.011719 -0.101562 -0.015625 -0.15625 -0.007813 z m 2.003906 0 c -0.214843 0.023438 -0.386718 0.183594 -0.429687 0.394532 l -1.003906 4.917968 c -0.023438 0.128906 0 0.265625 0.074219 0.375 c 0.074218 0.109375 0.1875 0.183594 0.316406 0.210938 c 0.269531 0.054687 0.53125 -0.121094 0.582031 -0.386719 l 1 -4.917969 c 0.027344 -0.132812 0.003906 -0.265625 -0.070313 -0.375 c -0.070312 -0.109375 -0.183593 -0.1875 -0.316406 -0.210937 c -0.050781 -0.011719 -0.101562 -0.015625 -0.152344 -0.007813 z m -4.003906 0.003906 c -0.210937 0.023438 -0.386718 0.183594 -0.429687 0.394532 l -1 4.914062 c -0.027344 0.128906 0 0.261719 0.070312 0.375 c 0.074219 0.109375 0.1875 0.183594 0.316407 0.210938 c 0.128906 0.027344 0.265624 0 0.375 -0.074219 c 0.109374 -0.070313 0.183593 -0.183594 0.210937 -0.3125 l 1 -4.914063 c 0.027344 -0.128906 0.003906 -0.265624 -0.070313 -0.375 c -0.070312 -0.109374 -0.183593 -0.1875 -0.316406 -0.210937 c -0.050781 -0.011719 -0.101562 -0.015625 -0.15625 -0.011719 z m 0 0" fill="#2e3436"/> -</svg> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-snow-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-snow-symbolic.svg deleted file mode 100644 index 60fe5c87..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-snow-symbolic.svg +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg"> - <path d="m 7.5 0.5 c -0.277344 0 -0.5 0.222656 -0.5 0.5 v 1.53125 l -1.253906 -0.714844 c -0.238282 -0.136718 -0.542969 -0.054687 -0.679688 0.183594 c -0.136718 0.242188 -0.054687 0.546875 0.183594 0.683594 l 1.75 1 v 3.449218 l -2.988281 -1.726562 l 0.007812 -2.011719 c 0 -0.273437 -0.222656 -0.5 -0.496093 -0.5 c -0.277344 0 -0.5 0.222657 -0.5 0.496094 l -0.007813 1.441406 l -1.328125 -0.765625 c -0.113281 -0.066406 -0.25 -0.085937 -0.378906 -0.050781 s -0.238282 0.121094 -0.304688 0.234375 s -0.085937 0.25 -0.050781 0.378906 s 0.121094 0.238282 0.234375 0.304688 l 1.328125 0.765625 l -1.246094 0.726562 c -0.238281 0.136719 -0.320312 0.445313 -0.179687 0.683594 c 0.136718 0.238281 0.441406 0.320313 0.683594 0.179687 l 1.738281 -1.015624 l 2.988281 1.726562 l -2.988281 1.726562 l -1.738281 -1.015624 c -0.242188 -0.140626 -0.546876 -0.058594 -0.683594 0.183593 c -0.140625 0.238281 -0.058594 0.542969 0.179687 0.679688 l 1.246094 0.726562 l -1.328125 0.765625 c -0.113281 0.066406 -0.199219 0.175782 -0.234375 0.304688 s -0.015625 0.265625 0.050781 0.378906 h 0.003906 c 0.136719 0.238281 0.441407 0.320312 0.679688 0.183594 l 1.328125 -0.765625 l 0.007813 1.441406 c 0 0.273437 0.222656 0.5 0.5 0.496094 c 0.273437 0 0.496093 -0.222657 0.496093 -0.5 l -0.007812 -2.011719 l 2.988281 -1.726562 v 3.5 l -1.746094 0.988281 c -0.117187 0.0625 -0.199218 0.171875 -0.234375 0.300781 c -0.039062 0.125 -0.019531 0.261719 0.046875 0.378906 c 0.0625 0.117188 0.171875 0.199219 0.300782 0.234375 c 0.125 0.039063 0.261718 0.019531 0.378906 -0.042969 l 1.253906 -0.710937 v 1.484375 c 0 0.277344 0.222656 0.5 0.5 0.5 s 0.5 -0.222656 0.5 -0.5 v -1.484375 l 1.253906 0.710937 c 0.117188 0.0625 0.253906 0.082032 0.378906 0.042969 c 0.128907 -0.035156 0.238282 -0.117187 0.304688 -0.234375 c 0.0625 -0.117187 0.082031 -0.253906 0.042969 -0.378906 c -0.035157 -0.128906 -0.117188 -0.238281 -0.234375 -0.300781 l -1.746094 -0.988281 v -3.5 l 3.03125 1.75 l -0.015625 2.007812 c -0.003906 0.273438 0.21875 0.5 0.492187 0.5 c 0.132813 0.003906 0.261719 -0.046875 0.355469 -0.140625 s 0.148438 -0.21875 0.152344 -0.351563 l 0.011719 -1.441406 l 1.285156 0.742188 c 0.238281 0.136718 0.542969 0.054687 0.683594 -0.183594 c 0.136718 -0.238281 0.054687 -0.546875 -0.183594 -0.683594 l -1.285156 -0.742187 l 1.242187 -0.730469 c 0.113281 -0.066406 0.195313 -0.175781 0.226563 -0.304688 c 0.035156 -0.128906 0.015625 -0.265624 -0.050782 -0.382812 c -0.140624 -0.234375 -0.449218 -0.3125 -0.683593 -0.175781 l -1.730469 1.019531 l -3.03125 -1.75 l 3.03125 -1.75 l 1.730469 1.019531 c 0.234375 0.140625 0.542969 0.058594 0.683593 -0.175781 c 0.066407 -0.117188 0.085938 -0.253906 0.050782 -0.382812 c -0.03125 -0.128907 -0.113282 -0.238282 -0.226563 -0.304688 l -1.242187 -0.730469 l 1.285156 -0.742187 c 0.238281 -0.136719 0.320312 -0.445313 0.183594 -0.683594 c -0.140625 -0.238281 -0.445313 -0.320312 -0.683594 -0.183594 l -1.285156 0.742188 l -0.011719 -1.441406 c -0.003906 -0.132813 -0.058594 -0.257813 -0.152344 -0.351563 s -0.222656 -0.144531 -0.355469 -0.140625 c -0.277343 0 -0.496093 0.226562 -0.492187 0.503906 l 0.015625 2.003906 l -3.03125 1.75 v -3.449218 l 1.75 -1 c 0.238281 -0.136719 0.320312 -0.441406 0.183594 -0.683594 c -0.136719 -0.238281 -0.441406 -0.320312 -0.679688 -0.183594 l -1.253906 0.714844 v -1.53125 c 0 -0.277344 -0.222656 -0.5 -0.5 -0.5 z m 0 0" fill="#2e3436"/> -</svg> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-storm-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-storm-symbolic.svg deleted file mode 100644 index 099fee7e..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-storm-symbolic.svg +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg"> - <path d="m 9.507812 0.0429688 c -1.269531 0 -2.304687 0.9726562 -2.449218 2.2187502 c -0.320313 -0.121094 -0.652344 -0.21875 -1.019532 -0.21875 c -1.644531 0 -2.976562 1.34375 -2.976562 3 c 0 0.101562 0.023438 0.1875 0.03125 0.28125 c -0.296875 -0.175781 -0.648438 -0.28125 -1.023438 -0.28125 c -1.09375 0 -1.9804682 0.898437 -1.9804682 2 c 0 1.105469 0.8164062 1.957031 1.9101562 1.957031 h 5 v -1.5 c -0.015625 -0.785156 0.738281 -1.46875 1.515625 -1.488281 c 0.800781 -0.015625 1.5 0.683593 1.484375 1.488281 v 1.5 h 4.5 c 0.820312 0 1.453125 -0.625 1.453125 -1.457031 c 0 -0.828125 -0.664063 -1.5 -1.488281 -1.5 c -0.203125 0 -0.40625 0.050781 -0.585938 0.125 c 0.050782 -0.199219 0.089844 -0.40625 0.089844 -0.625 c 0 -1.226563 -0.882812 -2.226563 -2.042969 -2.4375 c 0.042969 -0.179688 0.0625 -0.367188 0.0625 -0.5625 c 0 -1.378907 -1.109375 -2.5000002 -2.480469 -2.5000002 z m -1.007812 6.9570312 c -0.132812 0 -0.261719 0.050781 -0.355469 0.144531 s -0.144531 0.222657 -0.144531 0.355469 v 2.5 h -3 v 1 h -1.707031 l -2.648438 2.644531 c -0.09375 0.09375 -0.144531 0.222657 -0.144531 0.355469 s 0.050781 0.261719 0.144531 0.355469 s 0.222657 0.144531 0.355469 0.144531 s 0.261719 -0.050781 0.351562 -0.144531 l 2.355469 -2.355469 h 1.292969 v 3 c 0 0.132812 0.050781 0.261719 0.144531 0.355469 s 0.222657 0.144531 0.355469 0.144531 s 0.261719 -0.050781 0.355469 -0.144531 s 0.144531 -0.222657 0.144531 -0.355469 v -4 h 2 v 0.707031 l 2 2 v 1.292969 c 0 0.132812 0.050781 0.261719 0.144531 0.355469 s 0.222657 0.144531 0.355469 0.144531 s 0.261719 -0.050781 0.355469 -0.144531 s 0.144531 -0.222657 0.144531 -0.355469 v -1 h 1.359375 l 2.382813 1.425781 c 0.238281 0.144531 0.542968 0.066407 0.683593 -0.167969 c 0.144531 -0.234374 0.066407 -0.542968 -0.167969 -0.683593 l -2.621093 -1.574219 h -1.929688 l -1.707031 -1.707031 v -3.792969 c 0 -0.132812 -0.050781 -0.261719 -0.144531 -0.355469 s -0.222657 -0.144531 -0.355469 -0.144531 z m 0 0" fill="#2e3436"/> -</svg> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-tornado-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-tornado-symbolic.svg deleted file mode 100644 index fe96c9ef..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-tornado-symbolic.svg +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg"> - <path d="m 1.972656 0.992188 c -1.339844 0 -1.339844 2.015624 0 2.015624 h 0.289063 c 0.128906 0 0.222656 0.113282 0.03125 0.226563 c -0.632813 0.535156 -0.355469 1.785156 0.683593 1.773437 h 2.261719 c 0.207031 0.007813 0.148438 0.148438 0.082031 0.207032 c -0.519531 0.417968 -0.480468 1.304687 0.121094 1.652344 c 0.089844 0.046874 0.054688 0.121093 -0.039062 0.121093 h -0.421875 c -1.398438 -0.050781 -1.398438 2.074219 0 2.023438 h 1.296875 c 0.109375 0 0.179687 0.125 0.035156 0.207031 c -0.519531 0.429688 -0.464844 1.3125 0.140625 1.664062 c 0.175781 0.101563 0.066406 0.183594 -0.015625 0.246094 c -0.597656 0.351563 -0.648438 1.242188 -0.109375 1.664063 c 0.125 0.097656 0.050781 0.1875 -0.046875 0.1875 h -0.289062 c -1.363282 0 -1.363282 2.039062 0 2.039062 h 1.019531 c 1.015625 0.019531 1.347656 -1.199219 0.722656 -1.769531 c -0.128906 -0.15625 -0.03125 -0.234375 0.039063 -0.234375 h 1.242187 c 1.355469 0 1.355469 -2.03125 0 -2.03125 h -0.289063 c -0.144531 0 -0.152343 -0.105469 -0.078124 -0.171875 c 0.503906 -0.382812 0.523437 -1.160156 0.066406 -1.574219 c -0.152344 -0.148437 -0.074219 -0.226562 0.039062 -0.226562 h 0.265625 c 1.007813 0.003906 1.308594 -1.195313 0.710938 -1.753907 c -0.113281 -0.113281 -0.089844 -0.246093 0.035156 -0.246093 h 1.253906 c 1.042969 0.011719 1.328125 -1.253907 0.679688 -1.789063 c -0.082031 -0.082031 -0.082031 -0.214844 0.070312 -0.214844 h 1.253907 c 1.34375 0 1.34375 -2.015624 0 -2.015624 h -0.320313 c -0.117187 0 -0.152344 -0.097657 -0.070313 -0.167969 c 0.726563 -0.503907 0.464844 -1.84375 -0.609374 -1.828125 z m 0 0" fill="#2e3436"/> -</svg> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-windy-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-windy-symbolic.svg deleted file mode 100644 index 70657ef5..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/media/status/weather-windy-symbolic.svg +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg"> - <path d="m 5.441406 1 c -0.101562 0.003906 -0.199218 0.011719 -0.300781 0.023438 c -0.53125 0.070312 -1.042969 0.308593 -1.441406 0.707031 c -0.386719 0.394531 -0.386719 1.027343 0.003906 1.414062 c 0.390625 0.390625 1.023437 0.390625 1.414063 0 c 0.164062 -0.164062 0.398437 -0.191406 0.597656 -0.078125 c 0.199218 0.113282 0.289062 0.339844 0.230468 0.566406 c -0.058593 0.222657 -0.25 0.367188 -0.476562 0.367188 h -5.46875 v 2 h 5.46875 c 1.125 0 2.121094 -0.765625 2.410156 -1.855469 c 0.289063 -1.085937 -0.1875 -2.246093 -1.160156 -2.808593 c -0.398438 -0.230469 -0.839844 -0.339844 -1.277344 -0.335938 z m 7.039063 1 c -1.617188 0.011719 -3.058594 1.148438 -3.40625 2.769531 c -0.054688 0.261719 -0.003907 0.53125 0.140625 0.753907 c 0.144531 0.226562 0.371094 0.378906 0.632812 0.433593 c 0.539063 0.117188 1.070313 -0.230469 1.183594 -0.769531 c 0.167969 -0.78125 0.886719 -1.285156 1.675781 -1.175781 c 0.792969 0.113281 1.34375 0.796875 1.289063 1.59375 c -0.054688 0.796875 -0.699219 1.394531 -1.496094 1.394531 h -12.5 v 2 h 12.5 c 1.828125 0 3.363281 -1.429688 3.492188 -3.257812 c 0.128906 -1.824219 -1.195313 -3.453126 -3.003907 -3.710938 c -0.171875 -0.023438 -0.339843 -0.03125 -0.507812 -0.03125 z m -12.480469 8 v 2 h 10 h 0.003906 c 0.464844 0 0.859375 0.3125 0.96875 0.769531 s -0.105468 0.914063 -0.523437 1.125 c -0.417969 0.210938 -0.910157 0.105469 -1.210938 -0.25 c -0.171875 -0.207031 -0.414062 -0.332031 -0.679687 -0.355469 c -0.265625 -0.023437 -0.527344 0.058594 -0.730469 0.230469 c -0.421875 0.355469 -0.476563 0.984375 -0.121094 1.40625 c 0.441407 0.53125 1.042969 0.875 1.691407 1.011719 c 0.644531 0.132812 1.332031 0.054688 1.949218 -0.257812 c 1.238282 -0.621094 1.890625 -2.023438 1.574219 -3.371094 c -0.320313 -1.347656 -1.535156 -2.308594 -2.921875 -2.308594 z m 0 0" fill="#2e3436"/> -</svg> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/migration.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/migration.js deleted file mode 100644 index 3b32b450..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/migration.js +++ /dev/null @@ -1,153 +0,0 @@ -/* - This file is part of OpenWeather Refined (gnome-shell-extension-openweatherrefined). - - OpenWeather Refined is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - OpenWeather Refined is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - OpenWeather Refined. If not, see <https://www.gnu.org/licenses/>. - - Copyright 2024 TealPenguin -*/ - -import Gio from "gi://Gio"; - -import { GeolocationProvider, WeatherPressureUnits } from "./constants.js"; -import { Loc, NAME_TYPE, PLACE_TYPE, settingsSetLocs, settingsGetLocsCount, settingsSetKeys } from "./locs.js"; -import { WeatherProvider } from "./getweather.js"; - -const THIS_SCHEMA_ID = "org.gnome.shell.extensions.openweatherrefined"; -const OICKLE_SCHEMA_ID = "org.gnome.shell.extensions.openweather"; - -function tryMigrateOickle(settings) -{ - let keys = settings.list_keys(); - if(!keys || !keys.length) return false; - - let schemaSrc = Gio.SettingsSchemaSource.get_default(); - let oldSchema = schemaSrc.lookup(OICKLE_SCHEMA_ID, true); - if(!oldSchema) return false; - - let oldSettings = Gio.Settings.new(oldSchema.get_id()); - let oldKs = oldSettings.list_keys(); - if(!oldKs || !oldKs.length) return false; - - let schema = schemaSrc.lookup(THIS_SCHEMA_ID, true); - for(let k of oldKs) - { - if(!schema.has_key(k) && k !== "city") continue; - - settings.set_value(k.get_value()); - } - - console.log("OpenWeather Refined: Imported settings from old extension."); - return true; -} - -function tryMigratePre128(settings) -{ - let city = settings.get_string("city"); - if(!city) return false; - - let arr = [ ]; - let sections = city.split(" && "); - for(let l of sections) - { - let place = l.split(">")[0]; - place = place.replace(/\s/g, ""); - let name = l.split(">")[1]; - let isMyLoc = place === "here"; - let isMyLocName = isMyLoc && !name; - arr.push( - new Loc( - isMyLocName ? NAME_TYPE.MY_LOC : NAME_TYPE.CUSTOM, - name, - isMyLoc ? PLACE_TYPE.MY_LOC : PLACE_TYPE.COORDS, - isMyLoc ? "" : place - ) - ); - } - - settings.reset("city"); - settingsSetLocs(settings, arr); - - console.log("OpenWeather Refined: Migrated from cities to v128 locs."); - return true; -} - -function tryMigratePre130(settings) -{ - if(settings.get_enum("pressure-unit") === WeatherPressureUnits.HPA) - { - settings.set_enum("pressure-unit", WeatherPressureUnits.MBAR); - } - - let locCount = settingsGetLocsCount(settings); - let selIndex = settings.get_int("actual-city"); - if(selIndex < 0 || selIndex > locCount) - { - settings.set_int("actual-city", selIndex < 0 ? 0 : locCount - 1); - } - -} - -function tryMigratePre136(settings) -{ - // Create an array of empty strings with the length of weather - // providers available - let keys = Array.from({ length: WeatherProvider.COUNT }, () => ""); - - let owmKey = settings.get_string("appid"); - if(!settings.get_boolean("use-default-owm-key")) - { - keys[0] = owmKey; - settings.reset("appid"); - settings.reset("use-default-owm-key"); - } - let weatherApiKey = settings.get_string("weatherapidotcom-key"); - if(!settings.get_boolean("use-default-weatherapidotcom-key")) - { - keys[1] = weatherApiKey; - settings.reset("weatherapidotcom-key"); - settings.reset("use-default-weatherapidotcom-key"); - } - - if(keys[0] !== "" || keys[1] !== "") settingsSetKeys(keys); -} - -function migrateProviders(settings) -{ - let geoSearch = settings.get_enum("geolocation-provider"); - if(geoSearch === GeolocationProvider.GEOCODE) settings.set_enum("geolocation-provider", GeolocationProvider.OPENSTREETMAPS); -} - -/** - * Migrates settings if needed. - * Imports from original OpenWeather extension. - * Migrates 'cities' (127-) -> 'locs' (v128+). - * Migrates 'pressure-unit' (130+). - * Migrates custom keys (136+). - * @param {Gio.Settings} Settings to read/modify. - * @returns {boolean} `true` if settings were IMPORTED (NOT just if migrated). - */ -export function tryImportAndMigrate(settings) -{ - let imported = tryMigrateOickle(settings); - tryMigrateFromOldVersion(settings); - return imported; -} - -export function tryMigrateFromOldVersion(settings) -{ - tryMigratePre128(settings); - tryMigratePre130(settings); - tryMigratePre136(settings); - migrateProviders(settings); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/myloc.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/myloc.js deleted file mode 100644 index e5125a7b..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/myloc.js +++ /dev/null @@ -1,339 +0,0 @@ -/* - This file is part of OpenWeather Refined (gnome-shell-extension-openweatherrefined). - - OpenWeather Refined is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - OpenWeather Refined is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - OpenWeather Refined. If not, see <https://www.gnu.org/licenses/>. - - Copyright 2024 TealPenguin -*/ - -import GLib from "gi://GLib"; -import Soup from "gi://Soup"; -import Geoclue from "gi://Geoclue"; - -// Chrome 120.0 on Windows (common user agent) -export const USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) " + - "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.3"; - -let soupSession = null; -let locationInfo = null; -let locationTime = new Date(0); -let locationRefreshInterval = new Date(0).setMinutes(60); -let lastMylocProv = -1; - -let fetchingLocation = false; - -export const MyLocProv = -{ - GEOCLUE: 0, - INFOIPIO: 1 -} - -const DEF_LOC_INFO = -{ - lat: 0.0, - lon: 0.0, - city: "Unknown", - state: "Unknown", - country: "Unknown", - countryShort: "Unknown", - name: "Unknown" -}; - -function initSoup() -{ - soupSession = new Soup.Session(); - soupSession.user_agent = USER_AGENT; -} - -export function freeSoup() -{ - if(soupSession) soupSession.abort(); - soupSession = null; -} - -export function getSoupSession() -{ - if(soupSession === null) initSoup(); - return soupSession; -} - -export function setLocationRefreshIntervalM(minutes) -{ - locationRefreshInterval = new Date(0).setMinutes(minutes); -} - -/** - * @param {string} countryShort - * @param {string | null} city - * @param {string | null} state - * @returns {string} - */ -function getNameFromCountryShort(countryShort, city, state) -{ - switch(countryShort) - { - case "US": - return `${city}, ${state}`; - default: - if(city === "Unknown") return "Unknown"; - else return `${locationInfo.city}, ${locationInfo.country}`; - } -} - -/** - * @param {MyLocProv} locProv - * @returns {Promise<object>} - */ -async function httpGetLoc(locProv) -{ - let addr; - switch(locProv) - { - case MyLocProv.INFOIPIO: - addr = "https://api.infoip.io"; - break; - default: - console.error(`OpenWeather Refined: HTTP Get Loc called when it shouldn't have been.`); - return Promise.reject("Illegal call"); - } - - fetchingLocation = true; - let sess = getSoupSession(); - let msg = Soup.Message.new("GET", addr); - return new Promise((resolve, reject) => { - sess.send_and_read_async( - msg, - GLib.PRIORITY_DEFAULT, - null, - (s, m) => - { - let response; - try - { - response = s.send_and_read_finish(m); - } - catch(e) - { - locationInfo = null; - fetchingLocation = false; - locationTime = new Date(); - reject(e); - return; - } - if(!response || !(response = response.get_data())) - { - locationInfo = null; - fetchingLocation = false; - locationTime = new Date(); - reject("OpenWeather Refined: Invalid response"); - return; - } - - let str = new TextDecoder().decode(response); - if(!str) - { - locationInfo = null; - fetchingLocation = false; - locationTime = new Date(); - reject("OpenWeather Refined: No data in JSON My Location HTTP response."); - return; - } - let obj = JSON.parse(str); - - locationTime = new Date(); - locationInfo = - { - lat: obj.latitude, - lon: obj.longitude, - city: obj.city, - state: obj.region, - country: obj.country_long, - countryShort: obj.country_short, - name: getNameFromCountryShort(obj.country_short, obj.city, obj.region) - }; - - fetchingLocation = false; - resolve(locationInfo); - } - ); - }); -} - -export async function geoclueGetLoc(useNominatim = true) -{ - let locInfo = await new Promise((resolve, reject) => { - fetchingLocation = true; - Geoclue.Simple.new( - "gnome-shell-extension-openweatherrefined", - Geoclue.AccuracyLevel.NEIGHBORHOOD, - null, - (_s, result) => { - let loc; - try - { - let simple = Geoclue.Simple.new_finish(result); - loc = simple.get_location(); - } - catch(e) - { - fetchingLocation = false; - locationTime = new Date(); - reject(`OpenWeather Refined: ${e}`); - return; - } - - let locI = - { - lat: loc.latitude, - lon: loc.longitude, - city: "Unknown", - state: "Unknown", - country: "Unknown", - countryShort: "Unknown", - name: "Unknown" - }; - - resolve(locI); - } - ); - }); - - if(!useNominatim) return locInfo; - - return await new Promise((resolve, reject) => { - let sess = Soup.Session.new(); - // Policy mandates specific user agent - sess.user_agent = "openweather-extension@penguin-teal.github.io"; - - let params = - { - lat: String(locInfo.lat), - lon: String(locInfo.lon), - format: "json", - // Zoom 13: "Village/suburb" - zoom: "13" - }; - let paramsHash = Soup.form_encode_hash(params); - let msg = Soup.Message.new_from_encoded_form( - "GET", - "https://nominatim.openstreetmap.org/reverse", - paramsHash - ); - - sess.send_and_read_async( - msg, - GLib.PRIORITY_DEFAULT, - null, - (s, m) => - { - let response; - try - { - response = s.send_and_read_finish(m); - } - catch(e) - { - locationInfo = locInfo; - fetchingLocation = false; - locationTime = new Date(); - reject(e); - return; - } - if(!response || !(response = response.get_data())) - { - locationInfo = locInfo; - fetchingLocation = false; - locationTime = new Date(); - reject("OpenWeather Refined: Invalid response from Nominatim."); - return; - } - - let str = new TextDecoder().decode(response); - if(!str) - { - locationInfo = locInfo; - fetchingLocation = false; - locationTime = new Date(); - reject("OpenWeather Refined: No data in JSON Nominatim HTTP response."); - return; - } - let obj = JSON.parse(str); - let addr = obj.address; - - fetchingLocation = false; - locationTime = new Date(); - - let city = addr?.city ?? "Unknown"; - let state = addr?.state ?? "Unknown"; - let countryShort = addr?.country_code?.toUpperCase() ?? "Unknown"; - locationInfo = - { - lat: locInfo.lat, - lon: locInfo.lon, - city: city, - state: state, - country: addr?.country ?? "Unknown", - countryShort: countryShort, - name: getNameFromCountryShort(countryShort, city, state) - }; - - resolve(locationInfo); - } - ); - }); -} - -export async function getLocationInfo(settings, forceRefresh = false) -{ - if(settings === undefined) - { - console.error("OpenWeather Refined: getLocationInfo did not receive a settings argument. Pass 'null' to get settings automatically."); - console.trace("OpenWeather Refined backtrace"); - } - - let now = new Date(); - if(fetchingLocation) - { - console.warn("OpenWeather Refined: Location requested while fetching it; returning cached location."); - } - else - { - let myLocProv = settings ? settings.get_enum("my-loc-prov") : MyLocProv.GEOCLUE; - if(forceRefresh || now - locationTime > locationRefreshInterval || lastMylocProv !== myLocProv) - { - try - { - if(myLocProv === MyLocProv.GEOCLUE) - { - return await geoclueGetLoc(); - } - else - { - return httpGetLoc(myLocProv); - } - } - catch(e) - { - console.error(e); - } - } - } - return locationInfo ?? DEF_LOC_INFO; -} - -export function getCachedLocInfo() -{ - return locationInfo ?? DEF_LOC_INFO; -} - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/openweathermap.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/openweathermap.js deleted file mode 100644 index 4cb59313..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/openweathermap.js +++ /dev/null @@ -1,321 +0,0 @@ -/* - This file is part of OpenWeather (gnome-shell-extension-openweather). - - OpenWeather is free software: you can redistribute it and/or modify it under the terms of - the GNU General Public License as published by the Free Software Foundation, either - version 3 of the License, or (at your option) any later version. - - OpenWeather is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with OpenWeather. - If not, see <https://www.gnu.org/licenses/>. - - Copyright 2022 Jason Oickle -*/ -import { gettext as _ } from "resource:///org/gnome/shell/extensions/extension.js"; -import * as Main from "resource:///org/gnome/shell/ui/main.js"; - -import { getCachedLocInfo, getLocationInfo } from "./myloc.js"; -import { getWeatherInfo, getWeatherProviderName, weatherProviderNotWorking } from "./getweather.js"; - -async function initWeatherData(refresh) { - if (refresh) { - this._lastRefresh = Date.now(); - } - try { - await this.refreshWeatherData().then(async () => { - try - { - if(this._city.isMyLoc()) - { - await getLocationInfo(this.settings); - } - this.recalcLayout(); - - } catch (e) { - console.error(e); - } - }); - } catch (e) { - console.error(e); - } -} - -async function reloadWeatherCache() -{ - try - { - await this.populateCurrentUI(); - if (!this._isForecastDisabled) - { - await this.populateTodaysUI(); - await this.populateForecastUI(); - this.recalcLayout(); - } - } - catch (e) - { - console.error(e); - } -} - -async function refreshWeatherData() -{ - try - { - let weather; - try - { - weather = await getWeatherInfo(this, _); - } - catch(e) - { - let title, msg; - if(e.name === "TooManyReqError") - { - let provName = getWeatherProviderName(e.provider); - let tryAgain = weatherProviderNotWorking(this.settings); - - if(tryAgain) - { - this._provUrlButton.label = getWeatherProviderName(this.weatherProvider); - this.reloadWeatherCurrent(1); - } - else - { - Main.notify(_("OpenWeather Refined Too Many Requests"), - _("Provider %s has too many users. Try switching weather providers in settings.").format(provName)); - - // Try reloading after 10 minutes - this.reloadWeatherCurrent(600); - } - - return; - } - else throw e; - } - - if(!weather) - { - console.warn("OpenWeather Refined: getWeatherInfo failed without an error."); - // Try reloading after 10 minutes - this.reloadWeatherCurrent(600); - return; - } - - this.currentWeatherCache = weather; - - await this.populateCurrentUI(); - await this.populateTodaysUI(); - await this.populateForecastUI(); - this.reloadWeatherCurrent(this._refresh_interval_current); - } - catch(e) - { - console.error(`OpenWeather Refined: ${e}`); - console.log(e.stack); - } -} - -function populateCurrentUI() -{ - return new Promise((resolve, reject) => - { - try - { - /** @type {(Weather | null)} */ - let w = this.currentWeatherCache; - if(!w) reject("OpenWeather Refined: No weather cached."); - - let location = this._city.getName(_); - if(this._city.isMyLoc()) - { - let locObj = getCachedLocInfo(); - let cityName = locObj.city; - if(cityName === "Unknown") cityName = _("Unknown"); - location += ` (${cityName})`; - } - - let iconName = w.getIconName(); - this._currentWeatherIcon.set_gicon(this.getGIcon(iconName)); - this._weatherIcon.set_gicon(this.getGIcon(iconName)); - - let sunrise = w.getSunriseDate(); - let sunset = w.getSunsetDate(); - let lastBuild = new Date(); - - // Is sunset approaching before the sunrise? - let ms = lastBuild.getTime(); - if(sunrise.getTime() - ms > sunset.getTime() - ms) - { - this.topBoxSunIcon.set_gicon(this.getGIcon("daytime-sunset-symbolic")); - this.topBoxSunInfo.text = w.displaySunset(this); - } - else - { - this.topBoxSunIcon.set_gicon(this.getGIcon("daytime-sunrise-symbolic")); - this.topBoxSunInfo.text = w.displaySunrise(this); - } - - let weatherInfoC = ""; - let weatherInfoT = ""; - - let condition = w.displayCondition(); - let temp = w.displayTemperature(this); - - if (this._comment_in_panel) weatherInfoC = condition; - if (this._text_in_panel) weatherInfoT = temp; - - this._weatherInfo.text = - weatherInfoC + - (weatherInfoC && weatherInfoT ? _(", ") : "") + - weatherInfoT; - - this._currentWeatherSummary.text = condition + (", ") + temp; - - let locText; - if (this._loc_len_current !== 0 && - location.length > this._loc_len_current) - { - locText = location.substring(0, this._loc_len_current - 3) + "..."; - } - else - { - locText = location; - } - - let feelsLikeText = w.displayFeelsLike(this); - let humidityText = w.displayHumidity(); - let pressureText = w.displayPressure(this); - let windText = w.displayWind(this); - - this._currentWeatherSunrise.text = w.displaySunrise(this); - this._currentWeatherSunset.text = w.displaySunset(this); - this._currentWeatherBuild.text = this.formatTime(lastBuild); - - if(this._currentWeatherLocation) this._currentWeatherLocation.text = locText; - if(this._currentWeatherFeelsLike) this._currentWeatherFeelsLike.text = feelsLikeText; - if(this._currentWeatherHumidity) this._currentWeatherHumidity.text = humidityText; - if(this._currentWeatherPressure) this._currentWeatherPressure.text = pressureText; - if(this._currentWeatherWind) this._currentWeatherWind.text = windText; - if(this._currentWeatherWindGusts) - { - let available = w.gustsAvailable(); - this.setGustsPanelVisibility(available); - if(available) - { - this._currentWeatherWindGusts.text = w.displayGusts(this); - } - } - - if(this._forecast.length > this._forecastDays) - { - this._forecast.splice(this._forecastDays, this._forecast.length - this._forecastDays); - this.rebuildFutureWeatherUi(this._forecastDays); - } - - resolve(0); - } catch (e) { - reject(e); - } - }); -} - -function populateTodaysUI() { - return new Promise((resolve, reject) => { - try { - // Populate today's forecast UI - let weather = this.currentWeatherCache; - if(!weather) reject("OpenWeather Refined: No weather cached."); - if(!weather.hasForecast()) reject("OpenWeather Refined: No forecast."); - - for (let i = 0; i < 4; i++) - { - let h = weather.forecastHoursFromNow(i * 3); - let w = h.weather(); - - let forecastTodayUi = this._todays_forecast[i]; - forecastTodayUi.Time.text = h.displayTime(this); - forecastTodayUi.Icon.set_gicon(this.getGIcon(w.getIconName())); - forecastTodayUi.Temperature.text = w.displayTemperature(this); - forecastTodayUi.Summary.text = w.displayCondition(); - } - resolve(0); - } catch (e) { - reject(e); - } - }); -} - -function populateForecastUI() { - return new Promise((resolve, reject) => { - try { - // Populate N day / 3 hour forecast UI - let weather = this.currentWeatherCache; - if(!weather) reject("OpenWeather Refined: No weather cached."); - if(!weather.hasForecast()) reject("OpenWeather Refined: No forecast."); - - let hrsToMidnight = 24 - new Date().getHours(); - let dayCount = Math.min(this._days_forecast + 1, weather.forecastDayCount()); - for (let i = 0; i < dayCount - 1; i++) - { - let forecastUi = this._forecast[i]; - for (let j = 0; j < 8; j++) - { - let h = weather.forecastHoursFromNow(i * 24 + hrsToMidnight + j * 3); - let w = h.weather(); - - let forecastDate = h.getStart(); - if (j === 0) - { - let beginOfDay = new Date(new Date().setHours(0, 0, 0, 0)); - let dayLeft = Math.floor( - (forecastDate.getTime() - beginOfDay.getTime()) / 86400000 - ); - - if (dayLeft === 1) forecastUi.Day.text = "\n" + _("Tomorrow"); - else - forecastUi.Day.text = - "\n" + this.getLocaleDay(forecastDate.getDay()); - } - - forecastUi[j].Time.text = h.displayTime(this); - forecastUi[j].Icon.set_gicon(this.getGIcon(w.getIconName())); - forecastUi[j].Temperature.text = w.displayTemperature(this); - forecastUi[j].Summary.text = w.displayCondition(); - } - } - resolve(0); - } - catch (e) - { - reject(e); - } - }); -} - -function processTodaysData(json) { - return new Promise((resolve, reject) => { - try { - let data = json.list; - let todayList = []; - - for (let i = 0; i < 4; i++) todayList.push(data[i]); - - resolve(todayList); - } catch (e) { - reject(e); - } - }); -} - -export { - initWeatherData, - reloadWeatherCache, - refreshWeatherData, - populateCurrentUI, - populateTodaysUI, - populateForecastUI, -}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/preferences/aboutPage.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/preferences/aboutPage.js deleted file mode 100644 index 65f6815e..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/preferences/aboutPage.js +++ /dev/null @@ -1,346 +0,0 @@ -/* - This file is part of OpenWeather (gnome-shell-extension-openweather). - - OpenWeather is free software: you can redistribute it and/or modify it under the terms of - the GNU General Public License as published by the Free Software Foundation, either - version 3 of the License, or (at your option) any later version. - - OpenWeather is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with OpenWeather. - If not, see <https://www.gnu.org/licenses/>. - - Copyright 2022 Jason Oickle -*/ - -import Adw from "gi://Adw"; -import Gtk from "gi://Gtk"; -import GObject from "gi://GObject"; -import GLib from "gi://GLib"; - -import { PACKAGE_VERSION } from "resource:///org/gnome/Shell/Extensions/js/misc/config.js"; - -import { gettext as _ } from "resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js"; -import { Loc, settingsGetLocs, settingsGetKeys, toLocsGVariant } from "../locs.js"; -import { getWeatherProviderName, getWeatherProviderUrl } from "../getweather.js"; - -function getLocale() -{ - let locale = GLib.get_language_names()[0]; - if (locale.indexOf("_") !== -1) return locale.split("_")[0]; - // Fallback for 'C', 'C.UTF-8', and unknown locales. - else return "en"; -} - -class AboutPage extends Adw.PreferencesPage { - static { - GObject.registerClass(this); - } - - constructor(metadata, settings, wnd) - { - super({ - title: _("About"), - icon_name: "help-about-symbolic", - name: "AboutPage", - margin_start: 10, - margin_end: 10, - }); - - // Extension logo and description - let aboutGroup = new Adw.PreferencesGroup(); - let aboutBox = new Gtk.Box({ - orientation: Gtk.Orientation.VERTICAL, - hexpand: false, - vexpand: false, - }); - let openWeatherImage = new Gtk.Image({ - icon_name: "openweather-icon", - margin_bottom: 5, - pixel_size: 100, - }); - let openWeatherLabel = new Gtk.Label({ - label: '<span size="larger"><b>OpenWeather Refined</b></span>', - use_markup: true, - margin_bottom: 15, - vexpand: true, - valign: Gtk.Align.FILL, - }); - let aboutDescription = new Gtk.Label({ - label: _( - "Display weather information for any location on Earth in the GNOME Shell." - ), - margin_bottom: 3, - hexpand: false, - vexpand: false, - }); - - aboutBox.append(openWeatherImage); - aboutBox.append(openWeatherLabel); - aboutBox.append(aboutDescription); - aboutGroup.add(aboutBox); - this.add(aboutGroup); - - // Info group - let infoGroup = new Adw.PreferencesGroup(); - let releaseVersion = String(metadata["version-name"] ?? _("Unknown")); - let gitVersion = String(metadata["git-version"] ?? _("Unknown")); - - // Extension version - let openWeatherVersionRow = new Adw.ActionRow({ - title: _("OpenWeather Refined Version"), - }); - openWeatherVersionRow.add_suffix( - new Gtk.Label({ - label: releaseVersion, - }) - ); - - // Git version for self builds - let gitVersionRow = null; - if (gitVersion) { - gitVersionRow = new Adw.ActionRow({ - title: _("Git Version"), - }); - gitVersionRow.add_suffix( - new Gtk.Label({ - label: gitVersion, - }) - ); - } - - // shell version - let gnomeVersionRow = new Adw.ActionRow({ - title: _("GNOME Version"), - }); - gnomeVersionRow.add_suffix( - new Gtk.Label({ - label: String(PACKAGE_VERSION), - }) - ); - - // Copy settings - let copySettingsRow = new Adw.ActionRow({ - title: _("Copy Settings JSON"), - }); - let copySettingsBtn = new Gtk.Button({ - label: _("Copy") - }); - copySettingsRow.add_suffix(copySettingsBtn); - - let pasteSettingsBtn = new Gtk.Button({ - label: _("Paste") - }); - copySettingsRow.add_suffix(pasteSettingsBtn); - - copySettingsBtn.connect("clicked", (widget) => - { - // The settings of these keys will exist in the data but their value - // will be replaced with the string "<REDACTED>" - let redact = [ - "appid", "weatherapidotcom-key", - "geolocation-appid-mapquest" - ]; - - // This object will hold the data to turn to JSON - // Start with some extra info here that isn't in the settings - let obj = - { - "app-version": releaseVersion, - "git-version": gitVersion, - "gnome-version": String(PACKAGE_VERSION), - "user-locale": getLocale() - }; - let keys = settings.list_keys(); - for(let k of keys) - { - // Redact "locs" and older "cities" keys - if(k === "locs") - { - let locs = settingsGetLocs(settings); - for(let i in locs) - { - // Remove location names and coordinates - locs[i] = new Loc( - locs[i].getNameType(), locs[i].isMyLoc() ? "" : "<NAME>", - locs[i].getPlaceType(), locs[i].isMyLoc() ? "" : "<PLACE>" - ); - } - obj[k] = locs; - } - else if(k === "cities") - { - obj["cities"] = "<CITIES>"; - } - else if(redact.includes(k)) - { - obj[k] = "<REDACTED>"; - } - else if(k === "custom-keys") - { - let customKeys = settingsGetKeys(settings); - for(let i in customKeys) - { - customKeys[i] = customKeys[i] ? "<REDACTED>" : ""; - } - obj[k] = customKeys; - } - else - { - let val = settings.get_user_value(k); - if(val === null) continue; - - obj[k] = val.print(false); - } - } - - let clipboard = widget.get_clipboard(); - clipboard.set(JSON.stringify(obj)); - - let toast = new Adw.Toast({ - title: _("Copied settings JSON to clipboard.") - }); - wnd.add_toast(toast); - }); - - pasteSettingsBtn.connect("clicked", widget => { - let clipboard = widget.get_clipboard(); - clipboard.read_text_async(null, (c, result) => - { - let text; - try - { - text = clipboard.read_text_finish(result); - } - catch - { - wnd.add_toast(new Adw.Toast({ title: _("Clipboard contains no text.") })); - return; - } - - let obj = JSON.parse(text); - if(!obj) - { - wnd.add_toast(new Adw.Toast({ title: _("Clipboard didn't contain valid JSON.") })); - return; - } - - settings.set_boolean("frozen", true); - - let skipKeys = [ - "app-version", "gnome-version", "git-version", "user-locale", "locs", - "frozen", "appid", "weatherapidotcom-key", "custom-keys", - "use-default-owm-key", "use-default-weatherapidotcom-key", - "geolocation-appid-mapquest" - ]; - for(let k of Object.keys(obj)) - { - if(skipKeys.includes(k)) continue; - let v = obj[k]; - if(v[0] === "'" && v.endsWith("'")) settings.set_string(k, v); - else if(v === "true" || v === "false") settings.set_boolean(k, v === "true"); - else if(v.includes(".")) settings.set_double(k, parseFloat(v)); - else settings.set_int(k, parseInt(obj[k])); - } - - settings.set_boolean("frozen", false); - wnd.close(); - }); - }); - - infoGroup.add(openWeatherVersionRow); - if(gitVersion) infoGroup.add(gitVersionRow); - infoGroup.add(gnomeVersionRow); - infoGroup.add(copySettingsRow); - this.add(infoGroup); - - // Maintainer - let maintainerGroup = new Adw.PreferencesGroup(); - - let maintainerBox = new Gtk.Box({ - orientation: Gtk.Orientation.VERTICAL, - hexpand: false, - vexpand: false, - }); - let repoLink = "<a href=\"https://github.com/penguin-teal/gnome-openweather\">%s</a>"; - let maintainerAbout = new Gtk.Label({ - label: _("Maintained by: %s").format(repoLink.format("Teal Penguin")), - use_markup: true, - hexpand: false, - vexpand: false, - }); - let contribute = new Gtk.Label({ - label: _("Contribute or translate the project on %s.").format(repoLink.format("GitHub")), - use_markup: true, - hexpand: false, - vexpand: false - }); - let fork = new Gtk.Label({ - label: _("This is a fork of %s's extension.").format("Jason Oickle"), - use_markup: false, - hexpand: false, - vexpand: false - }); - - maintainerBox.append(maintainerAbout); - maintainerBox.append(contribute); - maintainerBox.append(fork); - maintainerGroup.add(maintainerBox); - this.add(maintainerGroup); - - // Provider - let curProv = settings.get_enum("weather-provider"); - - if(curProv !== 0) - { - let providerGroup = new Adw.PreferencesGroup(); - let providerBox = new Gtk.Box({ - orientation: Gtk.Orientation.VERTICAL, - margin_top: 15, - hexpand: false, - vexpand: false, - }); - let providerAbout = new Gtk.Label({ - label: _("Weather data provided by: %s").format( - `<a href="${getWeatherProviderUrl(curProv)}">${getWeatherProviderName(curProv)}</a>` - ), - use_markup: true, - hexpand: false, - vexpand: false, - }); - providerBox.append(providerAbout); - providerGroup.add(providerBox); - this.add(providerGroup); - } - - // License - let gnuLicense = - '<span size="small">' + - _("This program comes with ABSOLUTELY NO WARRANTY.") + - "\n" + - _("See the") + - ' <a href="https://gnu.org/licenses/old-licenses/gpl-2.0.html">' + - _("GNU General Public License, version 2 or later") + - "</a> " + - _("for details.") + - "</span>"; - let gplGroup = new Adw.PreferencesGroup(); - let gplLabel = new Gtk.Label({ - label: gnuLicense, - use_markup: true, - justify: Gtk.Justification.CENTER, - }); - let gplLabelBox = new Gtk.Box({ - orientation: Gtk.Orientation.VERTICAL, - valign: Gtk.Align.END, - vexpand: true, - }); - gplLabelBox.append(gplLabel); - gplGroup.add(gplLabelBox); - this.add(gplGroup); - } -} - -export { AboutPage }; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/preferences/generalPage.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/preferences/generalPage.js deleted file mode 100644 index 4375508e..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/preferences/generalPage.js +++ /dev/null @@ -1,542 +0,0 @@ -/* - This file is part of OpenWeather (gnome-shell-extension-openweather). - - OpenWeather is free software: you can redistribute it and/or modify it under the terms of - the GNU General Public License as published by the Free Software Foundation, either - version 3 of the License, or (at your option) any later version. - - OpenWeather is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with OpenWeather. - If not, see <https://www.gnu.org/licenses/>. - - Copyright 2022 Jason Oickle -*/ - -import Gtk from "gi://Gtk"; -import Adw from "gi://Adw"; -import GObject from "gi://GObject"; - -import { gettext as _ } from "resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js"; - -import { WeatherProvider, getWeatherProviderName } from "../getweather.js"; -import { settingsGetKeys, settingsSetKeys } from "../locs.js"; - -function getProviderTranslateRowTitle(prov) -{ - return _("Provider Multilingual Support"); -} - -function getDefaultApiKeyRowSubtitle(prov) -{ - let name = getWeatherProviderName(prov); - return _("Use a personal API key for %s").format(name ?? _("Provider")); -} - -function getDefaultApiKeyRowTooltip(prov) -{ - let name = getWeatherProviderName(prov); - return _("Enable this if you have your own API key from %s and enter it below." - ).format(name ?? _("Provider")); -} - -function isValidKey(provider, key) -{ - switch(provider) - { - case WeatherProvider.OPENWEATHERMAP: - return /^[a-z0-9]{32,}$/.test(key); - case WeatherProvider.WEATHERAPICOM: - return /^[a-z0-9]{31,}$/.test(key); - case WeatherProvider.VISUALCROSSING: - return /^[A-Z0-9]{25,}$/.test(key); - case WeatherProvider.OPENMETEO: - return true; - default: - return false; - } -} - -class GeneralPage extends Adw.PreferencesPage -{ - static { - GObject.registerClass(this); - } - - constructor(metadata, settings, wnd) - { - super({ - title: _("Settings"), - icon_name: "preferences-system-symbolic", - name: "GeneralPage", - }); - this._settings = settings; - this._window = wnd; - - // General Settings - let generalGroup = new Adw.PreferencesGroup({ - title: _("General"), - }); - - // Current weather refresh - let currentRefreshSpinButton = new Gtk.SpinButton({ - adjustment: new Gtk.Adjustment({ - lower: 10, - upper: 1440, - step_increment: 1, - page_increment: 10, - value: this._settings.get_int("refresh-interval-current") / 60, - }), - climb_rate: 5, - numeric: true, - update_policy: "if-valid", - valign: Gtk.Align.CENTER, - }); - let currentRefreshRow = new Adw.ActionRow({ - title: _("Current Weather Refresh"), - subtitle: _("Current weather refresh interval in minutes"), - activatable_widget: currentRefreshSpinButton, - }); - currentRefreshRow.add_suffix(currentRefreshSpinButton); - - // forecast refresh - let disableForecast = this._settings.get_boolean("disable-forecast"); - let forecastRefreshSpinButton = new Gtk.SpinButton({ - adjustment: new Gtk.Adjustment({ - lower: 60, - upper: 1440, - step_increment: 1, - page_increment: 10, - value: this._settings.get_int("refresh-interval-forecast") / 60, - }), - climb_rate: 5, - numeric: true, - update_policy: "if-valid", - sensitive: disableForecast ? false : true, - valign: Gtk.Align.CENTER, - }); - let forecastRefreshRow = new Adw.ActionRow({ - title: _("Weather Forecast Refresh"), - subtitle: _("Forecast refresh interval in minutes if enabled"), - activatable_widget: forecastRefreshSpinButton, - }); - forecastRefreshRow.add_suffix(forecastRefreshSpinButton); - - // My Location Refresh - let myLocRefreshSpinButton = new Gtk.SpinButton({ - adjustment: new Gtk.Adjustment({ - lower: 10, - upper: 1440, - step_increment: 1, - page_increment: 10, - value: this._settings.get_double("loc-refresh-interval") - }), - climb_rate: 5, - numeric: true, - update_policy: "if-valid", - valign: Gtk.Align.CENTER - }); - let myLocRefreshRow = new Adw.ActionRow({ - title: _("My Location Refresh"), - subtitle: _("My location refresh interval in minutes"), - activatable_widget: myLocRefreshSpinButton - }); - myLocRefreshRow.add_suffix(myLocRefreshSpinButton); - - // disable forecast - let disableForecastSwitch = new Gtk.Switch({ - valign: Gtk.Align.CENTER, - active: disableForecast, - }); - let disableForecastRow = new Adw.ActionRow({ - title: _("Disable Forecast"), - subtitle: _("Disables all fetching and processing of forecast data"), - activatable_widget: disableForecastSwitch, - }); - disableForecastRow.add_suffix(disableForecastSwitch); - - // Icons - let systemIconsSwitch = new Gtk.Switch({ - valign: Gtk.Align.CENTER, - active: this._settings.get_boolean("use-system-icons"), - }); - let systemIconsRow = new Adw.ActionRow({ - title: _("System Icons"), - subtitle: _("Disable to use packaged %s weather icons").format("Breeze"), - tooltip_text: _( - "If you have issues with your system icons displaying correctly disable this to fix it" - ), - activatable_widget: systemIconsSwitch, - }); - systemIconsRow.add_suffix(systemIconsSwitch); - - // Startup delay - let startupDelaySpinButton = new Gtk.SpinButton({ - adjustment: new Gtk.Adjustment({ - lower: 0, - upper: 30, - step_increment: 1, - page_increment: 10, - value: this._settings.get_int("delay-ext-init"), - }), - climb_rate: 1, - numeric: true, - update_policy: "if-valid", - valign: Gtk.Align.CENTER, - }); - let startupDelayRow = new Adw.ActionRow({ - title: _("First Boot Delay"), - subtitle: _("Seconds to delay popup initialization and data fetching"), - tooltip_text: _( - "This setting only applies to the first time the extension is loaded. (first log in / restarting gnome shell)" - ), - activatable_widget: startupDelaySpinButton, - }); - startupDelayRow.add_suffix(startupDelaySpinButton); - - generalGroup.add(currentRefreshRow); - generalGroup.add(forecastRefreshRow); - generalGroup.add(myLocRefreshRow); - generalGroup.add(disableForecastRow); - generalGroup.add(systemIconsRow); - generalGroup.add(startupDelayRow); - this.add(generalGroup); - - // Units Group - let unitsGroup = new Adw.PreferencesGroup({ - title: _("Units"), - }); - - // Temperature - let temperatureUnits = new Gtk.StringList(); - temperatureUnits.append(_("\u00B0C")); - temperatureUnits.append(_("\u00B0F")); - temperatureUnits.append(_("K")); - temperatureUnits.append(_("\u00B0Ra")); - temperatureUnits.append(_("\u00B0R\u00E9")); - temperatureUnits.append(_("\u00B0R\u00F8")); - temperatureUnits.append(_("\u00B0De")); - temperatureUnits.append(_("\u00B0N")); - let selTempUnit = this._settings.get_enum("unit"); - let unitIsDegs = selTempUnit !== 2; - let temperatureUnitRow = new Adw.ComboRow({ - title: _("Temperature"), - model: temperatureUnits, - selected: this._settings.get_enum("unit"), - }); - - // Wind speed - let windSpeedUnits = new Gtk.StringList(); - windSpeedUnits.append(_("km/h")); - windSpeedUnits.append(_("mph")); - windSpeedUnits.append(_("m/s")); - windSpeedUnits.append(_("kn")); - windSpeedUnits.append(_("ft/s")); - windSpeedUnits.append(_("Beaufort")); - let windSpeedUnitRow = new Adw.ComboRow({ - title: _("Wind Speed"), - model: windSpeedUnits, - selected: this._settings.get_enum("wind-speed-unit"), - }); - - // Pressure - let pressureUnits = new Gtk.StringList(); - // hPa - pressureUnits.append(_("inHg")); - pressureUnits.append(_("bar")); - pressureUnits.append(_("Pa")); - pressureUnits.append(_("kPa")); - pressureUnits.append(_("atm")); - pressureUnits.append(_("at")); - pressureUnits.append(_("Torr")); - pressureUnits.append(_("psi")); - pressureUnits.append(_("mmHg")); - pressureUnits.append(_("mbar")); - let pressureUnitRow = new Adw.ComboRow({ - title: _("Pressure"), - model: pressureUnits, - selected: this._settings.get_enum("pressure-unit") - 1, - }); - - // Clock Format - let clockFormat = new Gtk.StringList(); - clockFormat.append(_("24-hour")); - clockFormat.append(_("AM / PM")); - clockFormat.append(_("System")); - let clockFormatRow = new Adw.ComboRow({ - title: _("Time Format"), - model: clockFormat, - selected: this._settings.get_enum("clock-format") - }); - - let simplifyDegSwitch = new Gtk.Switch({ - valign: Gtk.Align.CENTER, - active: this._settings.get_boolean("simplify-degrees") - }); - simplifyDegSwitch.set_sensitive(unitIsDegs); - let simplifyDegRow = new Adw.ActionRow({ - title: _("Simplify Degrees"), - subtitle: _('Show "\u00B0" instead of "\u00B0C," "\u00B0F," etc.'), - tooltip_text: _("Enable this to cut off the \"C,\" \"F,\" etc. from degrees labels."), - activatable_widget: simplifyDegSwitch - }); - simplifyDegRow.add_suffix(simplifyDegSwitch); - - unitsGroup.add(temperatureUnitRow); - unitsGroup.add(windSpeedUnitRow); - unitsGroup.add(pressureUnitRow); - unitsGroup.add(clockFormatRow); - unitsGroup.add(simplifyDegRow); - this.add(unitsGroup); - - let notifGroup = new Adw.PreferencesGroup({ - title: _("Notifications") - }); - - let precipStartsNotifSwitch = new Gtk.Switch({ - valign: Gtk.Align.CENTER, - active: this._settings.get_boolean("precip-starts-notif") - }); - let precipStartsNotifRow = new Adw.ActionRow({ - title: _("Precipitation Starting"), - subtitle: _("Get notified when precipitation starts (e.g. rain or snow)."), - tooltip_text: _("Get notified when precipitation starts (e.g. rain or snow)."), - activatable_widget: precipStartsNotifSwitch - }); - precipStartsNotifRow.add_suffix(precipStartsNotifSwitch); - - notifGroup.add(precipStartsNotifRow); - //this.add(notifGroup); - - // Provider Settings - let apiGroup = new Adw.PreferencesGroup({ - title: _("Provider"), - }); - - - let curProv = this._settings.get_enum("weather-provider"); - - let weatherProvsList = new Gtk.StringList(); - weatherProvsList.append(_("Adaptive")); - weatherProvsList.append("OpenWeatherMap"); - weatherProvsList.append("WeatherAPI.com"); - weatherProvsList.append("Visual Crossing"); - //weatherProvsList.append("Open-Meteo"); - let weatherProvsListRow = new Adw.ComboRow({ - title: _("Weather Provider"), - subtitle: _("Provider used for weather and forecasts; choose \"%s\" if you don't care.").format(_("Adaptive")), - tooltip_text: _("Choose '%s' if you don't care, otherwise choose a specific provider.").format(_("Adaptive")), - model: weatherProvsList, - selected: curProv - }); - - // Provider Multilingual Support - let providerTranslateSwitch = new Gtk.Switch({ - valign: Gtk.Align.CENTER, - active: this._settings.get_boolean("owm-api-translate"), - }); - let providerTranslateRow = new Adw.ActionRow({ - title: getProviderTranslateRowTitle(curProv), - subtitle: _( - "Using provider translations applies to weather conditions only" - ), - tooltip_text: _( - "Enable this to use provider multilingual support if there's no built-in translations for your language yet." - ), - activatable_widget: providerTranslateSwitch, - }); - providerTranslateRow.add_suffix(providerTranslateSwitch); - - // Provider API key - let curProvKey = curProv ? settingsGetKeys(this._settings)[curProv - 1] : ""; - - let defaultApiKeySwitch = new Gtk.Switch({ - valign: Gtk.Align.CENTER, - active: curProvKey !== "", - sensitive: curProv !== 0 - }); - let defaultApiKeyRow = new Adw.ActionRow({ - title: _("Use Custom API Key"), - subtitle: getDefaultApiKeyRowSubtitle(curProv), - tooltip_text: getDefaultApiKeyRowTooltip(curProv), - activatable_widget: defaultApiKeySwitch, - }); - defaultApiKeyRow.add_suffix(defaultApiKeySwitch); - - // Personal API key - let personalApiKeyEntry = new Gtk.Entry({ - max_length: 32, - width_chars: 20, - vexpand: false, - sensitive: curProvKey !== "", - valign: Gtk.Align.CENTER, - }); - let personalApiKeyRow = new Adw.ActionRow({ - title: _("Personal API Key"), - activatable_widget: personalApiKeyEntry, - }); - - let provKeyIsValid = isValidKey(curProv, curProvKey); - personalApiKeyEntry.set_icon_from_icon_name(Gtk.PositionType.LEFT, - provKeyIsValid ? "checkbox-checked-symbolic" : "dialog-warning"); - personalApiKeyEntry.set_text(curProvKey); - personalApiKeyRow.add_suffix(personalApiKeyEntry); - - apiGroup.add(weatherProvsListRow); - apiGroup.add(providerTranslateRow); - apiGroup.add(defaultApiKeyRow); - apiGroup.add(personalApiKeyRow); - this.add(apiGroup); - - let resetGroup = new Adw.PreferencesGroup({ - title: _("Reset") - }); - - let resetToDefsBtn = new Gtk.Button({ - child: new Adw.ButtonContent({ - icon_name: "view-refresh-symbolic", - label: _("Reset"), - }), - }); - let resetToDefsRow = new Adw.ActionRow({ - title: _("Restore Defaults"), - tooltip_text: _( - "Restore all settings to the defaults." - ), - activatable_widget: resetToDefsBtn, - }); - resetToDefsRow.add_suffix(resetToDefsBtn); - - resetGroup.add(resetToDefsRow); - this.add(resetGroup); - - // Bind signals - currentRefreshSpinButton.connect("value-changed", (widget) => { - this._settings.set_int( - "refresh-interval-current", - 60 * widget.get_value() - ); - }); - forecastRefreshSpinButton.connect("value-changed", (widget) => { - this._settings.set_int( - "refresh-interval-forecast", - 60 * widget.get_value() - ); - }); - myLocRefreshSpinButton.connect("value-changed", (widget) => { - this._settings.set_double("loc-refresh-interval", widget.get_value()); - }); - disableForecastSwitch.connect("notify::active", (widget) => { - if (widget.get_active()) { - forecastRefreshSpinButton.set_sensitive(false); - } else { - forecastRefreshSpinButton.set_sensitive(true); - } - this._settings.set_boolean("disable-forecast", widget.get_active()); - }); - systemIconsSwitch.connect("notify::active", (widget) => { - this._settings.set_boolean("use-system-icons", widget.get_active()); - }); - startupDelaySpinButton.connect("value-changed", (widget) => { - this._settings.set_int("delay-ext-init", widget.get_value()); - }); - temperatureUnitRow.connect("notify::selected", (widget) => { - let unit = widget.selected; - simplifyDegSwitch.set_sensitive(unit !== 2); - this._settings.set_enum("unit", unit); - }); - windSpeedUnitRow.connect("notify::selected", (widget) => { - this._settings.set_enum("wind-speed-unit", widget.selected); - }); - pressureUnitRow.connect("notify::selected", (widget) => { - this._settings.set_enum("pressure-unit", widget.selected + 1); - }); - clockFormatRow.connect("notify::selected", (widget) => { - this._settings.set_enum("clock-format", widget.selected); - }); - simplifyDegSwitch.connect("notify::active", (widget) => { - this._settings.set_boolean("simplify-degrees", widget.get_active()); - }); - precipStartsNotifSwitch.connect("notify::active", widget => { - this._settings.set_boolean("precip-starts-notif", widget.get_active()); - }); - weatherProvsListRow.connect("notify::selected", widget => { - let prov = widget.selected; - this._settings.set_enum("weather-provider", prov); - providerTranslateRow.set_title(getProviderTranslateRowTitle(prov)); - defaultApiKeyRow.set_subtitle(getDefaultApiKeyRowSubtitle(prov)); - defaultApiKeyRow.set_tooltip_text(getDefaultApiKeyRowTooltip(prov)); - - let isAdaptive = prov === 0; - let keyArr = settingsGetKeys(this._settings); - // Array Index 0 is first provider, but in the provider enum 0 = adaptive - // and 1 = the first provider - let key = isAdaptive ? "" : keyArr[prov - 1]; - // Empty String = Default Key - let isDefKey = key === ""; - // Switched on if not Adaptive and not using Default Key - defaultApiKeySwitch.set_active(!isAdaptive && !isDefKey); - // Grey out if Adaptive - defaultApiKeySwitch.set_sensitive(!isAdaptive); - // Grey out if Adaptive or using Default key - personalApiKeyEntry.set_sensitive(!isAdaptive && !isDefKey); - // Set text to an empty string if using Default, or the key - personalApiKeyEntry.set_text(key); - }); - providerTranslateSwitch.connect("notify::active", (widget) => { - this._settings.set_boolean("owm-api-translate", widget.get_active()); - }); - defaultApiKeySwitch.connect("notify::active", (widget) => { - let prov = this._settings.get_enum("weather-provider"); - // If somehow provider is set to Adaptive - // (which this should be greyed out so shouldn't happen) - // we'll just get out here - if(prov === 0) return; - - let active = widget.get_active(); - // Grey out key text box if we turn this off - personalApiKeyEntry.set_sensitive(active); - - let keyArr = settingsGetKeys(this._settings); - // Set the corresponding provider (where 1 in the enum is 0 in the key - // array) to the key or an empty string to signify default - keyArr[prov - 1] = active ? personalApiKeyEntry.text : ""; - settingsSetKeys(this._settings, keyArr); - }); - personalApiKeyEntry.connect("notify::text", (widget) => { - let prov = this._settings.get_enum("weather-provider"); - if(prov === 0) return; - - let key = widget.text; - let isValid = isValidKey(prov, key); - personalApiKeyEntry.set_icon_from_icon_name(Gtk.PositionType.LEFT, - isValid ? "checkbox-checked-symbolic" : "dialog-warning"); - // Don't save if not a valid key - if(!isValid) return; - - let keyArr = settingsGetKeys(this._settings); - // 1 in enum is 0 in the key array - // Note if this is empty, that will turn default mode on - keyArr[prov - 1] = key; - settingsSetKeys(this._settings, keyArr); - }); - resetToDefsBtn.connect("clicked", () => - { - let keys = this._settings.list_keys(); - this._settings.set_boolean("frozen", true); - - for(let k of keys) - { - this._settings.reset(k); - } - - this._settings.reset("frozen"); - - this._window.close(); - } - ); - } -} -export { GeneralPage }; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/preferences/layoutPage.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/preferences/layoutPage.js deleted file mode 100644 index 86b261b4..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/preferences/layoutPage.js +++ /dev/null @@ -1,443 +0,0 @@ -/* - This file is part of OpenWeather (gnome-shell-extension-openweather). - - OpenWeather is free software: you can redistribute it and/or modify it under the terms of - the GNU General Public License as published by the Free Software Foundation, either - version 3 of the License, or (at your option) any later version. - - OpenWeather is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with OpenWeather. - If not, see <https://www.gnu.org/licenses/>. - - Copyright 2022 Jason Oickle -*/ - -import Gtk from "gi://Gtk"; -import Adw from "gi://Adw"; -import GObject from "gi://GObject"; - -import { gettext as _ } from "resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js"; - -class LayoutPage extends Adw.PreferencesPage { - static { - GObject.registerClass(this); - } - - constructor(metadata, settings) { - super({ - title: _("Layout"), - icon_name: "preferences-other-symbolic", - name: "LayoutPage", - }); - this._settings = settings; - - // Panel Options - let panelGroup = new Adw.PreferencesGroup({ - title: _("Panel"), - }); - - // Position in panel - let panelPositions = new Gtk.StringList(); - panelPositions.append(_("Center")); - panelPositions.append(_("Right")); - panelPositions.append(_("Left")); - let panelPositionRow = new Adw.ComboRow({ - title: _("Position In Panel"), - model: panelPositions, - selected: this._settings.get_enum("position-in-panel"), - }); - - // Position offset - let positionOffsetSpinButton = new Gtk.SpinButton({ - adjustment: new Gtk.Adjustment({ - lower: 0, - upper: 15, - step_increment: 1, - page_increment: 1, - page_size: 0, - value: this._settings.get_int("position-index"), - }), - climb_rate: 1, - digits: 0, - numeric: true, - valign: Gtk.Align.CENTER, - }); - let positionOffsetRow = new Adw.ActionRow({ - title: _("Position Offset"), - subtitle: _("The position relative to other items in the box"), - activatable_widget: positionOffsetSpinButton, - }); - positionOffsetRow.add_suffix(positionOffsetSpinButton); - - // Temp in panel - let temperatureInPanelSwitch = new Gtk.Switch({ - valign: Gtk.Align.CENTER, - tooltip_text: _("Show the temperature in the panel"), - active: this._settings.get_boolean("show-text-in-panel"), - }); - let temperatureInPanelRow = new Adw.ActionRow({ - title: _("Temperature In Panel"), - activatable_widget: temperatureInPanelSwitch, - }); - temperatureInPanelRow.add_suffix(temperatureInPanelSwitch); - - // Conditions in panel - let conditionsInPanelSwitch = new Gtk.Switch({ - valign: Gtk.Align.CENTER, - tooltip_text: _("Show the weather conditions in the panel"), - active: this._settings.get_boolean("show-comment-in-panel"), - }); - let conditionsInPanelRow = new Adw.ActionRow({ - title: _("Conditions In Panel"), - activatable_widget: conditionsInPanelSwitch, - }); - conditionsInPanelRow.add_suffix(conditionsInPanelSwitch); - - // Sunrise/Sunset in Panel - let sunsetriseInPanelSwitch = new Gtk.Switch({ - valign: Gtk.Align.CENTER, - tooltip_text: _("Show the time of sunrise/sunset in the panel."), - active: this._settings.get_boolean("show-sunsetrise-in-panel") - }); - let sunsetriseInPanelRow = new Adw.ActionRow({ - title: _("Sunrise/Sunset In Panel"), - activatable_widget: sunsetriseInPanelSwitch - }); - sunsetriseInPanelRow.add_suffix(sunsetriseInPanelSwitch); - - // Sunrise/Sunset in Panel - let sunsetriseFirstSwitch = new Gtk.Switch({ - valign: Gtk.Align.CENTER, - tooltip_text: _("Show the sunset/sunrise before the temperature/conditions. Requires restart."), - active: this._settings.get_boolean("sun-in-panel-first") - }); - let sunsetriseFirstRow = new Adw.ActionRow({ - title: _("Sunrise/Sunset First (Restart Required)"), - activatable_widget: sunsetriseInPanelSwitch - }); - sunsetriseFirstRow.add_suffix(sunsetriseFirstSwitch); - sunsetriseFirstRow.set_sensitive(this._settings.get_boolean("show-sunsetrise-in-panel")); - - panelGroup.add(panelPositionRow); - panelGroup.add(positionOffsetRow); - panelGroup.add(temperatureInPanelRow); - panelGroup.add(conditionsInPanelRow); - panelGroup.add(sunsetriseInPanelRow); - panelGroup.add(sunsetriseFirstRow); - this.add(panelGroup); - - // Weather Popup Options - let popupGroup = new Adw.PreferencesGroup({ - title: _("Popup"), - }); - - // Popup position - let weatherPopupPositionScale = new Gtk.Scale({ - adjustment: new Gtk.Adjustment({ - lower: 0, - upper: 100, - step_increment: 0.1, - page_increment: 2, - value: this._settings.get_double("menu-alignment"), - }), - width_request: 200, - show_fill_level: 1, - restrict_to_fill_level: 0, - fill_level: 100, - }); - let weatherPopupPositionRow = new Adw.ActionRow({ - title: _("Popup Position"), - subtitle: _("Alignment of the popup from left to right"), - activatable_widget: weatherPopupPositionScale, - }); - weatherPopupPositionRow.add_suffix(weatherPopupPositionScale); - - // Wind arrows - let windArrowsSwitch = new Gtk.Switch({ - valign: Gtk.Align.CENTER, - active: this._settings.get_boolean("wind-direction"), - }); - let windArrowsRow = new Adw.ActionRow({ - title: _("Wind Direction Arrows"), - activatable_widget: windArrowsSwitch, - }); - windArrowsRow.add_suffix(windArrowsSwitch); - - // Translate conditions - this.providerTranslations = this._settings.get_boolean("owm-api-translate"); - let translateConditionsSwitch = new Gtk.Switch({ - valign: Gtk.Align.CENTER, - active: this._settings.get_boolean("translate-condition"), - }); - let translateConditionsRow = new Adw.ActionRow({ - title: _("Translate Conditions"), - activatable_widget: translateConditionsSwitch, - visible: !this.providerTranslations, - }); - translateConditionsRow.add_suffix(translateConditionsSwitch); - - // Temp decimal places - let temperatureDigits = new Gtk.StringList(); - temperatureDigits.append(_("0")); - temperatureDigits.append(_("1")); - temperatureDigits.append(_("2")); - temperatureDigits.append(_("3")); - let temperatureDigitsRow = new Adw.ComboRow({ - title: _("Temperature Decimal Places"), - tooltip_text: _("Maximum number of digits after the decimal point"), - model: temperatureDigits, - selected: this._settings.get_int("decimal-places") - }); - - let pressureDigits = new Gtk.StringList(); - pressureDigits.append(_("Unit Default")); - pressureDigits.append(_("Follow Temp.")); - pressureDigits.append(_("0")); - pressureDigits.append(_("1")); - pressureDigits.append(_("2")); - pressureDigits.append(_("3")); - pressureDigits.append(_("4")); - let pressureDigitsRow = new Adw.ComboRow({ - title: _("Pressure Decimal Places"), - tooltip_text: _("Maximum number of digits after the decimal point"), - model: pressureDigits, - selected: this._settings.get_int("pressure-decimal-places") + 2 - }); - - let speedDigits = new Gtk.StringList(); - speedDigits.append(_("Follow Temp.")); - speedDigits.append(_("0")); - speedDigits.append(_("1")); - speedDigits.append(_("2")); - speedDigits.append(_("3")); - speedDigits.append(_("4")); - let speedDigitsRow = new Adw.ComboRow({ - title: _("Speed Decimal Places"), - tooltip_text: _("Maximum number of digits after the decimal point"), - model: speedDigits, - selected: this._settings.get_int("speed-decimal-places") + 1 - }); - - // Location length text - let locationLengthSpinButton = new Gtk.SpinButton({ - adjustment: new Gtk.Adjustment({ - lower: 0, - upper: 500, - step_increment: 1, - page_increment: 10, - value: this._settings.get_int("location-text-length"), - }), - climb_rate: 5, - digits: 0, - numeric: true, - valign: Gtk.Align.CENTER, - }); - let locationLengthRow = new Adw.ActionRow({ - title: _("Location Text Length"), - tooltip_text: _( - "Maximum length of the location text. A setting of '0' is unlimited" - ), - subtitle: _("Maximum length to cut off the location text at. \"0\" is unlimited."), - activatable_widget: locationLengthSpinButton, - }); - locationLengthRow.add_suffix(locationLengthSpinButton); - - // Hi Contrast Styles - let hiContrast = new Gtk.StringList(); - hiContrast.append(_("Off")); - hiContrast.append(_("White Text")); - hiContrast.append(_("Black Text")); - let hiContrastRow = new Adw.ComboRow({ - title: _("High Contrast"), - subtitle: _("Override GNOME shell text colors in the pop-up with hard-coded ones that may be easier to read. This may not be very effective depending on your shell theme."), - tooltip_text: _("Enable to override GNOME shell colors"), - model: hiContrast, - selected: this._settings.get_enum("hi-contrast") - }); - - popupGroup.add(weatherPopupPositionRow); - popupGroup.add(windArrowsRow); - popupGroup.add(translateConditionsRow); - popupGroup.add(temperatureDigitsRow); - popupGroup.add(pressureDigitsRow); - popupGroup.add(speedDigitsRow); - popupGroup.add(locationLengthRow); - popupGroup.add(hiContrastRow); - this.add(popupGroup); - - // Forecast Options - this.disableForecast = this._settings.get_boolean("disable-forecast"); - - let forecastGroup = new Adw.PreferencesGroup({ - title: _("Forecast"), - sensitive: !this.disableForecast, - }); - - // Center today's forecast - let centerForecastSwitch = new Gtk.Switch({ - valign: Gtk.Align.CENTER, - active: this._settings.get_boolean("center-forecast"), - }); - let centerForecastRow = new Adw.ActionRow({ - title: _("Center Today's Forecast"), - subtitle: _("Center today's forecast instead of left-aligning it."), - activatable_widget: centerForecastSwitch, - }); - centerForecastRow.add_suffix(centerForecastSwitch); - - // Conditions in forecast - let forecastConditionsSwitch = new Gtk.Switch({ - valign: Gtk.Align.CENTER, - active: this._settings.get_boolean("show-comment-in-forecast"), - }); - let forecastConditionsRow = new Adw.ActionRow({ - title: _("Conditions In Forecast"), - subtitle: _("Show the condition text (e.g. \"Cloudy\") in the forecast."), - activatable_widget: forecastConditionsSwitch, - }); - forecastConditionsRow.add_suffix(forecastConditionsSwitch); - - // Forecast days - let forecastDaysSpinButton = new Gtk.SpinButton({ - adjustment: new Gtk.Adjustment({ - lower: 0, - upper: 31, - step_increment: 1, - page_increment: 3, - value: this._settings.get_int("days-forecast"), - }), - climb_rate: 1, - digits: 0, - numeric: true, - valign: Gtk.Align.CENTER - }); - let forecastDaysRow = new Adw.ActionRow({ - title: _("Total Days In Forecast"), - tooltip_text: _( - "Number of days to show in forecast where a setting of \"0\" is only today" - ), - subtitle: _("Number of days to show in forecast. \"0\" means only show today.\nDifferent providers support different amounts of days.\nCurrently \"%s\" supports the furthest forecast of %s days.").format("Visual Crossing", "14"), - activatable_widget: forecastDaysSpinButton, - }); - forecastDaysRow.add_suffix(forecastDaysSpinButton); - - // Keep forecast expanded - let forecastExpandedSwitch = new Gtk.Switch({ - valign: Gtk.Align.CENTER, - active: this._settings.get_boolean("expand-forecast"), - }); - let forecastExpandedRow = new Adw.ActionRow({ - title: _("Keep Forecast Expanded"), - subtitle: _("Automatically open the forecast when the pop-up is opened."), - activatable_widget: forecastExpandedSwitch, - }); - forecastExpandedRow.add_suffix(forecastExpandedSwitch); - - forecastGroup.add(centerForecastRow); - forecastGroup.add(forecastConditionsRow); - forecastGroup.add(forecastDaysRow); - forecastGroup.add(forecastExpandedRow); - this.add(forecastGroup); - - // Bind signals - panelPositionRow.connect("notify::selected", (widget) => { - this._settings.set_enum("position-in-panel", widget.selected); - }); - positionOffsetSpinButton.connect("value-changed", (widget) => { - this._settings.set_int("position-index", widget.get_value()); - }); - temperatureInPanelSwitch.connect("notify::active", (widget) => { - this._settings.set_boolean("show-text-in-panel", widget.get_active()); - }); - conditionsInPanelSwitch.connect("notify::active", (widget) => { - this._settings.set_boolean("show-comment-in-panel", widget.get_active()); - }); - sunsetriseInPanelSwitch.connect("notify::active", (widget) => { - let active = widget.get_active(); - this._settings.set_boolean("show-sunsetrise-in-panel", active); - sunsetriseFirstRow.set_sensitive(active); - }); - sunsetriseFirstSwitch.connect("notify::active", (widget) => { - this._settings.set_boolean("sun-in-panel-first", widget.get_active()); - }); - weatherPopupPositionScale.connect("value-changed", (widget) => { - this._settings.set_double("menu-alignment", widget.get_value()); - }); - windArrowsSwitch.connect("notify::active", (widget) => { - this._settings.set_boolean("wind-direction", widget.get_active()); - }); - translateConditionsSwitch.connect("notify::active", (widget) => { - this._settings.set_boolean("translate-condition", widget.get_active()); - }); - temperatureDigitsRow.connect("notify::selected", (widget) => { - this._settings.set_int("decimal-places", widget.selected); - }); - pressureDigitsRow.connect("notify::selected", (widget) => { - // -2 because -2 = Unit Default, -1 = Follow Temperature - this._settings.set_int("pressure-decimal-places", widget.selected - 2); - }); - speedDigitsRow.connect("notify::selected", (widget) => { - // -1 because -1 = Follow Temperature - this._settings.set_int("speed-decimal-places", widget.selected - 1); - }); - locationLengthSpinButton.connect("value-changed", (widget) => { - this._settings.set_int("location-text-length", widget.get_value()); - }); - hiContrastRow.connect("notify::selected", (widget) => { - this._settings.set_enum("hi-contrast", widget.selected); - }); - centerForecastSwitch.connect("notify::active", (widget) => { - this._settings.set_boolean("center-forecast", widget.get_active()); - }); - forecastConditionsSwitch.connect("notify::active", (widget) => { - this._settings.set_boolean( - "show-comment-in-forecast", - widget.get_active() - ); - }); - forecastDaysSpinButton.connect("value-changed", (widget) => { - this._settings.set_int("days-forecast", widget.get_value()); - }); - forecastExpandedSwitch.connect("notify::active", (widget) => { - this._settings.set_boolean("expand-forecast", widget.get_active()); - }); - // Detect settings changes to enable/disable related options - this._settings.connect("changed", () => { - if(this._settings.get_boolean("frozen")) return; - - if (this._disableForecastChanged()) { - if (this._settings.get_boolean("disable-forecast")) { - forecastGroup.set_sensitive(false); - } else { - forecastGroup.set_sensitive(true); - } - } else if (this._providerTranslationsChanged()) { - if (this._settings.get_boolean("owm-api-translate")) { - translateConditionsRow.set_visible(false); - } else { - translateConditionsRow.set_visible(true); - } - } - }); - } - _disableForecastChanged() { - let _disableForecast = this._settings.get_boolean("disable-forecast"); - if (this.disableForecast !== _disableForecast) { - this.disableForecast = _disableForecast; - return true; - } - return false; - } - _providerTranslationsChanged() { - let _providerTranslations = this._settings.get_boolean("owm-api-translate"); - if (this.providerTranslations !== _providerTranslations) { - this.providerTranslations = _providerTranslations; - return true; - } - return false; - } -} -export { LayoutPage }; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/preferences/locationsPage.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/preferences/locationsPage.js deleted file mode 100644 index b1eb261a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/preferences/locationsPage.js +++ /dev/null @@ -1,659 +0,0 @@ -/* - This file is part of OpenWeather (gnome-shell-extension-openweather). - - OpenWeather is free software: you can redistribute it and/or modify it under the terms of - the GNU General Public License as published by the Free Software Foundation, either - version 3 of the License, or (at your option) any later version. - - OpenWeather is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with OpenWeather. - If not, see <https://www.gnu.org/licenses/>. - - Copyright 2022 Jason Oickle -*/ - -import Adw from "gi://Adw"; -import Gtk from "gi://Gtk"; -import GObject from "gi://GObject"; - -import { gettext as _ } from "resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js"; - -import { SearchResultsWindow } from "./searchResultsWindow.js"; -import { GeolocationProvider } from "../constants.js"; -import { Loc, settingsGetLocs, settingsSetLocs, NAME_TYPE, PLACE_TYPE } from "../locs.js"; - -class LocationsPage extends Adw.PreferencesPage -{ - static { - GObject.registerClass(this); - } - - cityIndex; - - constructor(metadata, settings, parent) - { - super({ - title: _("Locations"), - icon_name: "find-location-symbolic", - name: "LocationsPage", - }); - this.metadata = metadata; - this._window = parent; - this._settings = settings; - this._count = null; - this._locListUi = null; - this.cityIndex = this._settings.get_int("actual-city"); - let locationProvider = this._settings.get_enum("geolocation-provider"); - - // Locations list group - let addLocationButton = new Gtk.Button({ - child: new Adw.ButtonContent({ - icon_name: "list-add-symbolic", - label: _("Add"), - }), - }); - this.locationsGroup = new Adw.PreferencesGroup({ - title: _("Locations"), - header_suffix: addLocationButton, - }); - this._refreshLocations(); - this.add(this.locationsGroup); - - // Geolocation providers group - let providersGroup = new Adw.PreferencesGroup({ - title: _("Provider"), - }); - - let myLocProvsList = new Gtk.StringList(); - myLocProvsList.append("Built-In + Nominatim"); - myLocProvsList.append("infoip.io"); - this._lastMyLocProv = this._settings.get_enum("my-loc-prov"); - let myLocProvsListRow = new Adw.ComboRow({ - title: _("My Loc. Provider"), - subtitle: _("Provider for getting My Location"), - model: myLocProvsList, - selected: this._lastMyLocProv - }); - - let providersList = new Gtk.StringList(); - providersList.append("Nominatim/OSM"); - providersList.append("MapQuest"); - let providersListRow = new Adw.ComboRow({ - title: _("Geolocation Provider"), - subtitle: _("Provider used for location search"), - model: providersList, - selected: locationProvider > 0 ? locationProvider - 1 : 0, - }); - // Personal MapQuest API key - let personalApiKeyMQEntry = new Gtk.Entry({ - max_length: 32, - width_chars: 20, - vexpand: false, - sensitive: locationProvider === GeolocationProvider.MAPQUEST, - valign: Gtk.Align.CENTER, - }); - let personalApiKeyMQRow = new Adw.ActionRow({ - title: _("Personal MapQuest Key"), - subtitle: _("Personal API Key from developer.mapquest.com"), - activatable_widget: personalApiKeyMQEntry, - }); - let personalApiKeyMQ = this._settings.get_string( - "geolocation-appid-mapquest" - ); - if (personalApiKeyMQ !== "") { - if (personalApiKeyMQ.length !== 32) { - personalApiKeyMQEntry.set_icon_from_icon_name( - Gtk.PositionType.LEFT, - "dialog-warning" - ); - } else { - personalApiKeyMQEntry.set_icon_from_icon_name( - Gtk.PositionType.LEFT, - "" - ); - } - personalApiKeyMQEntry.set_text(personalApiKeyMQ); - } else { - personalApiKeyMQEntry.set_text(""); - personalApiKeyMQEntry.set_icon_from_icon_name( - Gtk.PositionType.LEFT, - "dialog-warning" - ); - } - - personalApiKeyMQRow.add_suffix(personalApiKeyMQEntry); - providersGroup.add(myLocProvsListRow); - providersGroup.add(providersListRow); - providersGroup.add(personalApiKeyMQRow); - this.add(providersGroup); - - // Bind signals - addLocationButton.connect("clicked", this._addLocation.bind(this)); - // Detect change in locations - this._settings.connect("changed", () => { - if(this._settings.get_boolean("frozen")) return; - - if (this._locationsChanged()) - { - this.cityIndex = this._settings.get_int("actual-city"); - this._refreshLocations(); - } - - if(this.myLocProvChanged()) - { - myLocProvsListRow.selected = this._settings.get_enum("my-loc-prov"); - } - }); - myLocProvsListRow.connect("notify::selected", widget => { - this._settings.set_enum("my-loc-prov", widget.selected); - }); - providersListRow.connect("notify::selected", (widget) => { - let isMapQuest = false; - let inx; - switch(widget.selected) - { - case 0: - inx = GeolocationProvider.OPENSTREETMAPS; - break; - case 1: - inx = GeolocationProvider.MAPQUEST; - isMapQuest = true; - break; - default: - inx = GeolocationProvider.OPENSTREETMAPS; - break; - } - personalApiKeyMQEntry.set_sensitive(isMapQuest); - this._settings.set_enum("geolocation-provider", inx); - }); - personalApiKeyMQEntry.connect("notify::text", (widget) => { - if (widget.text.length === 32) { - this._settings.set_string("geolocation-appid-mapquest", widget.text); - personalApiKeyMQEntry.set_icon_from_icon_name( - Gtk.PositionType.LEFT, - "" - ); - } else { - personalApiKeyMQEntry.set_icon_from_icon_name( - Gtk.PositionType.LEFT, - "dialog-warning" - ); - if (widget.text.length === 0) { - this._settings.set_string("geolocation-appid-mapquest", ""); - } - } - }); - } - - _refreshLocations() - { - let locs = settingsGetLocs(this._settings); - - // Check if the location list UI needs updating - if (this._locationsChanged(locs)) - { - if (locs.length > 0) - { - // Remove the old list - if (this._count) - { - for (let i = 0; i < this._count; i++) - { - this.locationsGroup.remove(this.location[i].Row); - } - this._count = null; - } - - this.location = []; - // Build new location UI list - for (let i = 0; i < locs.length; i++) - { - this.location[i] = {}; - this.location[i].ButtonBox = new Gtk.Box({ - orientation: Gtk.Orientation.HORIZONTAL, - halign: Gtk.Align.CENTER, - spacing: 5, - hexpand: false, - vexpand: false, - }); - this.location[i].EditButton = new Gtk.Button({ - icon_name: "document-edit-symbolic", - valign: Gtk.Align.CENTER, - hexpand: false, - vexpand: false, - }); - this.location[i].DeleteButton = new Gtk.Button({ - icon_name: "edit-delete-symbolic", - valign: Gtk.Align.CENTER, - css_classes: ["error"], - hexpand: false, - vexpand: false, - }); - this.location[i].Row = new Adw.ActionRow({ - title: locs[i].getName(_), - subtitle: locs[i].getPlaceDisplay(_), - activatable: true, - }); - this.location[i].ButtonBox.append(this.location[i].EditButton); - this.location[i].ButtonBox.append(this.location[i].DeleteButton); - this.location[i].Row.add_suffix(this.location[i].ButtonBox); - this.locationsGroup.add(this.location[i].Row); - this._setIcon(i, i === this.cityIndex); - } - // Bind signals - for (let i = 0; i < this.location.length; i++) - { - this.location[i].EditButton.connect("clicked", () => { - this._editLocation(i); - }); - this.location[i].DeleteButton.connect("clicked", () => { - this._deleteLocation(i); - }); - this.location[i].Row.connect("activated", () => { - if (i !== this.cityIndex) - { - this._setIcon(this.cityIndex, false); - this._setIcon(i, true); - - this.cityIndex = i; - this._settings.set_int("actual-city", i); - let _toast = new Adw.Toast({ - title: _("Location changed to: %s").format( - this.location[i].Row.get_title() - ), - }); - this._window.add_toast(_toast); - } - return 0; - }); - } - this._count = this.location.length; - } - this._locListUi = locs; - } - else if(this._count) - { - for(let i = 0; i < this.location.length; i++) - { - this._setIcon(i, i === this.cityIndex); - } - } - } - - _setIcon(index, isOn) - { - this.location[index].Row.set_icon_name(isOn ? "checkbox-checked-symbolic" : "checkbox-symbolic"); - } - - _addLocation() - { - let _dialog = new Gtk.Dialog({ - title: _("Add New Location"), - use_header_bar: true, - transient_for: this._window, - default_width: 600, - default_height: -1, - modal: true, - }); - let _dialogPage = new Adw.PreferencesPage(); - let _dialogGroup = new Adw.PreferencesGroup(); - let _dialogRow = new Adw.PreferencesRow({ - activatable: false, - focusable: false, - }); - let _dialogBox = new Gtk.Box({ - orientation: Gtk.Orientation.VERTICAL, - margin_top: 10, - margin_bottom: 10, - margin_start: 10, - margin_end: 10, - }); - let _findLabel = new Gtk.Label({ - label: _("Search by Location or Coordinates"), - halign: Gtk.Align.START, - margin_bottom: 5, - hexpand: true, - }); - let _findEntry = new Gtk.Entry({ - placeholder_text: _("e.g. London, England or 51.5074456,-0.1277653"), - secondary_icon_name: "edit-clear-symbolic", - secondary_icon_tooltip_text: _("Clear entry"), - valign: Gtk.Align.CENTER, - activates_default: true, - hexpand: true, - vexpand: false, - margin_bottom: 5 - }); - let myLocBtn = new Gtk.Button({ - label: _("My Location"), - valign: Gtk.Align.END, - hexpand: true, - vexpand: false, - margin_bottom: 5 - }); - let _searchButton = new Gtk.Button({ - child: new Adw.ButtonContent({ - icon_name: "edit-find-symbolic", - label: _("Search"), - }), - css_classes: ["suggested-action"], - }); - _dialog.add_action_widget(_searchButton, 0); - _dialog.set_default_response(0); - let _dialogArea = _dialog.get_content_area(); - - _dialogBox.append(_findLabel); - _dialogBox.append(_findEntry); - _dialogBox.append(myLocBtn); - _dialogRow.set_child(_dialogBox); - _dialogGroup.add(_dialogRow); - _dialogPage.add(_dialogGroup); - _dialogArea.append(_dialogPage); - _dialog.show(); - - // Bind signals - _dialog.connect("response", (w, response) => { - if (response === 0) - { - let location = _findEntry.get_text().trim(); - if (!location) - { - // no input - let _toast = new Adw.Toast({ - title: _("We need something to search for!"), - }); - this._window.add_toast(_toast); - return 0; - } - let resultsWindow = new SearchResultsWindow( - this.metadata, - this._window, - this._settings, - location - ); - resultsWindow.show(); - } - _dialog.close(); - return 0; - }); - _findEntry.connect("icon-release", (widget) => { - widget.set_text(""); - }); - myLocBtn.connect("clicked", () => - { - let locs = settingsGetLocs(this._settings); - if(!locs) locs = [ ]; - - locs.push(Loc.myLoc()); - - settingsSetLocs(this._settings, locs); - - let toast = new Adw.Toast({ - title: _("%s has been added").format(_("My Location")), - }); - this._window.add_toast(toast); - _dialog.destroy(); - }); - _dialog.connect("close-request", () => { - _dialog.destroy(); - }); - return 0; - } - - _editLocation(selected) - { - let locs = settingsGetLocs(this._settings); - - let _dialog = new Gtk.Dialog({ - title: _("Edit %s").format(locs[selected].getName(_)), - use_header_bar: true, - transient_for: this._window, - default_width: 600, - default_height: -1, - modal: true, - }); - let _dialogPage = new Adw.PreferencesPage(); - let _dialogGroup = new Adw.PreferencesGroup(); - let _dialogRow = new Adw.PreferencesRow({ - activatable: false, - focusable: false, - }); - let _dialogBox = new Gtk.Box({ - orientation: Gtk.Orientation.VERTICAL, - margin_top: 10, - margin_bottom: 10, - margin_start: 10, - margin_end: 10, - }); - // location display name - let _editNameLabel = new Gtk.Label({ - label: _("Edit Name"), - halign: Gtk.Align.START, - margin_bottom: 5, - hexpand: true, - }); - - let name = locs[selected].isSpecialName() ? "" : locs[selected].getName(_); - let place; - if(locs[selected].isMyLoc()) place = "here"; - else - { - let latLon = locs[selected].getKnownCoordsSync(); - place = `${latLon[0]}, ${latLon[1]}`; - } - - let _editNameEntry = new Gtk.Entry({ - text: name, - secondary_icon_name: "edit-clear-symbolic", - secondary_icon_tooltip_text: _("Clear entry"), - valign: Gtk.Align.CENTER, - activates_default: true, - hexpand: true, - vexpand: false, - }); - // location coordinates - let _editCoordLabel = new Gtk.Label({ - label: _("Edit Coordinates"), - halign: Gtk.Align.START, - margin_top: 10, - margin_bottom: 5, - hexpand: true, - }); - let _editCoordEntry = new Gtk.Entry({ - text: place, - secondary_icon_name: "edit-clear-symbolic", - secondary_icon_tooltip_text: _("Clear entry"), - valign: Gtk.Align.CENTER, - activates_default: true, - hexpand: true, - vexpand: false, - }); - let searchLocNotice = new Gtk.Label({ - label: _("If you meant to search up a new location by name, " + - "<b>add</b> a location instead."), - use_markup: true, - margin_top: 15, - margin_bottom: 5 - }); - let _saveButton = new Gtk.Button({ - child: new Adw.ButtonContent({ - icon_name: "document-save-symbolic", - label: _("Save"), - }), - css_classes: ["suggested-action"], - }); - _dialog.add_action_widget(_saveButton, 0); - _dialog.set_default_response(0); - let _dialogArea = _dialog.get_content_area(); - - _dialogBox.append(_editNameLabel); - _dialogBox.append(_editNameEntry); - _dialogBox.append(_editCoordLabel); - _dialogBox.append(_editCoordEntry); - _dialogBox.append(searchLocNotice); - _dialogRow.set_child(_dialogBox); - _dialogGroup.add(_dialogRow); - _dialogPage.add(_dialogGroup); - _dialogArea.append(_dialogPage); - _dialog.show(); - - // Bind signals - _editNameEntry.connect("icon-release", (widget) => { - widget.set_text(""); - }); - _editCoordEntry.connect("icon-release", (widget) => { - widget.set_text(""); - }); - _dialog.connect("response", (w, response) => { - if (response === 0) { - let _location = _editNameEntry.get_text(); - let _coord = _editCoordEntry.get_text(); - let _provider = 0; // preserved for future use - - if (!_coord) - { - let _toast = new Adw.Toast({ - title: _("Coordinates field cannot be empty."), - }); - this._window.add_toast(_toast); - return 0; - } - else if(_coord !== "here" && !/^\s*-?\s*[0-9]*\.[0-9]+\s*,\s*-?\s*[0-9]*\.[0-9]+\s*$/.test(_coord)) - { - let toast = new Adw.Toast({ - title: _("Coordinates field must be in the format of '%s' or the text '%s'.").format("0.0, 0.0", "here") - }); - this._window.add_toast(toast); - return 0; - } - else if(!_location && _coord !== "here") - { - let toast = new Adw.Toast({ - title: _("Name field can only be empty if coordinates are '%s'.").format("here") - }); - this._window.add_toast(toast); - return 0; - } - - let nameTy, placeTy, newPlace; - if(_coord === "here") - { - nameTy = !_location ? NAME_TYPE.MY_LOC : NAME_TYPE.CUSTOM; - placeTy = PLACE_TYPE.MY_LOC; - newPlace = ""; - } - else - { - nameTy = NAME_TYPE.CUSTOM; - placeTy = PLACE_TYPE.COORDS; - let split = _coord.split(","); - for(let i = 0; i < 2; i++) - { - split[i] = split[i].replace(/\s/g, ""); - } - newPlace = `${split[0]},${split[1]}`; - } - locs[selected] = new Loc(nameTy, _location, placeTy, newPlace); - - settingsSetLocs(this._settings, locs); - - let _toast = new Adw.Toast({ - title: _("%s has been updated").format(locs[selected].getName(_)), - }); - this._window.add_toast(_toast); - } - _dialog.close(); - return 0; - }); - _dialog.connect("close-request", () => { - _dialog.destroy(); - }); - return 0; - } - - _deleteLocation(selected) - { - let locs = settingsGetLocs(this._settings); - - if (!locs.length) return; - - let _dialog = new Gtk.Dialog({ - title: "", - use_header_bar: true, - transient_for: this._window, - resizable: false, - modal: true, - }); - let _dialogPage = new Adw.PreferencesPage(); - let _dialogGroup = new Adw.PreferencesGroup(); - let _selectedName = locs[selected].getName(_); - - let _dialogRow = new Adw.ActionRow({ - title: _('Are you sure you want to delete "%s"?').format(_selectedName), - icon_name: "help-about-symbolic", - activatable: false, - focusable: false, - }); - let _dialogButton = new Gtk.Button({ - child: new Adw.ButtonContent({ - icon_name: "edit-delete-symbolic", - label: _("Delete"), - }), - css_classes: ["destructive-action"], - }); - _dialog.add_button(_("Cancel"), 0); - _dialog.add_action_widget(_dialogButton, 1); - _dialog.set_default_response(0); - - let _dialogArea = _dialog.get_content_area(); - _dialogGroup.add(_dialogRow); - _dialogPage.add(_dialogGroup); - _dialogArea.append(_dialogPage); - _dialog.show(); - - _dialog.connect("response", (w, response) => { - if (response === 1) - { - if (locs.length) locs.splice(selected, 1); - - if (this.cityIndex >= selected) - { - let newI = selected ? selected - 1 : 0; - this._settings.set_int("actual-city", newI); - this.cityIndex = newI; - - // this may not change anything, - // or if the deleted one is selected select the last one - if(this.location && this.location[newI]) this._setIcon(newI, true); - } - - settingsSetLocs(this._settings, locs); - - let _toast = new Adw.Toast({ - title: _("%s has been deleted").format(_selectedName), - }); - this._window.add_toast(_toast); - } - _dialog.close(); - return; - }); - _dialog.connect("close-request", () => { - _dialog.destroy(); - }); - } - - _locationsChanged(current) - { - return !Loc.arrsEqual(this._locListUi, current); - } - - myLocProvChanged() - { - return this._lastMyLocProv !== this._settings.get_enum("my-loc-prov"); - } -} - -export { LocationsPage }; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/preferences/searchResultsWindow.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/preferences/searchResultsWindow.js deleted file mode 100644 index 49fb5b90..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/preferences/searchResultsWindow.js +++ /dev/null @@ -1,307 +0,0 @@ -import Adw from "gi://Adw"; -import Gtk from "gi://Gtk"; -import GObject from "gi://GObject"; -import Soup from "gi://Soup"; -import GLib from "gi://GLib"; - -import { gettext as _ } from "resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js"; - -import { GeolocationProvider } from "../constants.js"; -import { Loc, settingsGetLocs, settingsSetLocs } from "../locs.js"; - -class SearchResultsWindow extends Adw.PreferencesWindow -{ - static { - GObject.registerClass(this); - } - - constructor(metadata, parent, settings, location) - { - let provider = settings.get_enum("geolocation-provider"); - let provName; - switch(provider) - { - case GeolocationProvider.OPENSTREETMAPS: - provName = "Nominatim/OSM"; - break; - case GeolocationProvider.MAPQUEST: - provName = "MapQuest"; - break; - default: - provName = String(provider); - break; - } - - super({ - title: _("Search Results from %s").format(provName), - transient_for: parent, - search_enabled: false, - modal: true, - }); - let mainPage = new Adw.PreferencesPage(); - this.add(mainPage); - this.metadata = metadata; - this._window = parent; - this._settings = settings; - this._location = location; - this._provider = provider; - - // Search results group - let searchButton = new Gtk.Button({ - child: new Adw.ButtonContent({ - icon_name: "edit-find-symbolic", - label: _("New Search"), - }), - }); - this.resultsGroup = new Adw.PreferencesGroup({ - header_suffix: searchButton, - }); - this.resultsStatus = new Adw.StatusPage({ - title: _("Searching ..."), - description: _( - 'Please wait while searching for locations matching "%s"' - ).format(this._location), - icon_name: "edit-find-symbolic", - hexpand: true, - vexpand: true, - }); - this.resultsGroup.add(this.resultsStatus); - mainPage.add(this.resultsGroup); - // Query provider and load the results - this._findLocation(); - - // Bind signals - searchButton.connect("clicked", () => { - this._window.get_visible_page()._addLocation(); - this.close(); - return 0; - }); - this.connect("close-request", this._destroy.bind(this)); - } - - async _findLocation() - { - // OpenStreetMaps - if (this._provider === GeolocationProvider.OPENSTREETMAPS) { - let params = { - format: "json", - addressdetails: "1", - q: this._location, - }; - let _osmUrl = "https://nominatim.openstreetmap.org/search"; - try - { - let json = await this._loadJsonAsync(_osmUrl, params); - if(!json) - { - this._resultsError(true); - throw new Error("Server returned an invalid response"); - } - if(Number(json.length) < 1) - { - this._resultsError(false); - return 0; - } - - this._processResults(json); - } - catch (e) - { - console.warn("_findLocation OpenStreetMap error: " + e); - } - } - // MapQuest - else if (this._provider === GeolocationProvider.MAPQUEST) { - let _mqKey = this._settings.get_string("geolocation-appid-mapquest"); - if (_mqKey === "") { - this.resultsStatus.set_title(_("AppKey Required")); - this.resultsStatus.set_description( - _("You need an AppKey to use MapQuest, get one at: %s").format( - "developer.mapquest.com" - ) - ); - this.resultsStatus.set_icon_name("dialog-error-symbolic"); - return 0; - } - let params = { - key: _mqKey, - format: "json", - addressdetails: "1", - q: this._location, - }; - let _mqUrl = "https://open.mapquestapi.com/nominatim/v1/search.php"; - try - { - let json = await this._loadJsonAsync(_mqUrl, params); - if (!json) - { - this._resultsError(true); - throw new Error("Server returned an invalid response"); - } - if (Number(json.length) < 1) { - this._resultsError(false); - return 0; - } else { - this._processResults(json); - return 0; - } - } - catch(e) - { - console.warn("_findLocation MapQuest error: " + e); - } - } - - return null; - } - - _loadJsonAsync(url, params) - { - return new Promise((resolve, reject) => { - // Create user-agent string from uuid and the version - let _userAgent = this.metadata.uuid; - let _httpSession = new Soup.Session(); - let _paramsHash = Soup.form_encode_hash(params); - let _message = Soup.Message.new_from_encoded_form( - "GET", - url, - _paramsHash - ); - // add trailing space, so libsoup adds its own user-agent - _httpSession.user_agent = _userAgent + " "; - - _httpSession.send_and_read_async( - _message, - GLib.PRIORITY_DEFAULT, - null, - (sess, msg) => { - try - { - let jsonString = sess.send_and_read_finish(msg).get_data(); - if (jsonString instanceof Uint8Array) - { - jsonString = new TextDecoder().decode(jsonString); - } - - if (!jsonString) - { - throw new Error("No data in response body"); - } - - resolve(JSON.parse(jsonString)); - } - catch (e) - { - sess.abort(); - reject(e); - } - } - ); - }); - } - _processResults(json) - { - this.resultsUi = {}; - this.resultsGroup.remove(this.resultsStatus); - this.resultsGroup.set_title( - _('Results for "%s"').format(this._location) - ); - // Build search results list UI - for (let i in json) - { - this.resultsUi[i] = {}; - - let name; - let lat; - let lon; - - try - { - name = json[i].display_name; - lat = parseFloat(json[i].lat); - lon = parseFloat(json[i].lon); - } - catch(e) - { - console.error("OpenWeather Refined: Error processing results: " + e); - return; - } - - let coordsText = `${lat}, ${lon}`; - let simpleName = this._simplifyName(name); - - this.resultsUi[i].Row = new Adw.ActionRow({ - title: simpleName, - subtitle: coordsText, - tooltip_text: name, - icon_name: "find-location-symbolic", - activatable: true - }); - this.resultsGroup.add(this.resultsUi[i].Row); - - this.resultsUi[i].Row.connect("activated", () => { - this._saveResult(simpleName, lat, lon); - }); - } - } - - // Simplify the name returned by OSM. - _simplifyName(s) - { - // Locations in the USA I'd expect to be City, State. - // Plus a city isn't always in one county anyway so this is hardly - // accurate - let usa = s.match(/^(.+), .+ County, (.+), United States$/); - if(usa) - { - let city = usa[1]; - let state = usa[2]; - return `${city}, ${state}`; - } - else return s; - } - - _saveResult(name, lat, lon) - { - let locs = settingsGetLocs(this._settings); - - locs.push(Loc.fromNameCoords(name, lat, lon)); - - settingsSetLocs(this._settings, locs); - - let _toast = new Adw.Toast({ - title: _("%s has been added").format(name), - }); - this._window.add_toast(_toast); - this.close(); - return; - } - - _resultsError(error) - { - if (error) - { - this.resultsStatus.set_title(_("API Error")); - this.resultsStatus.set_description( - _('Invalid data when searching for "%s".').format(this._location) - ); - this.resultsStatus.set_icon_name("dialog-error-symbolic"); - } - else - { - this.resultsStatus.set_title(_("No Matches Found")); - this.resultsStatus.set_description( - _('No results found when searching for "%s".').format(this._location) - ); - } - return; - } - - _destroy() - { - this.destroy(); - return; - } -} - -export { SearchResultsWindow }; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/prefs.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/prefs.js deleted file mode 100644 index 19acbaf9..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/prefs.js +++ /dev/null @@ -1,77 +0,0 @@ -/* - This file is part of OpenWeather (gnome-shell-extension-openweather). - - OpenWeather is free software: you can redistribute it and/or modify it under the terms of - the GNU General Public License as published by the Free Software Foundation, either - version 3 of the License, or (at your option) any later version. - - OpenWeather is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with OpenWeather. - If not, see <https://www.gnu.org/licenses/>. - - Copyright 2022 Jason Oickle -*/ - -import Gdk from "gi://Gdk"; -import Gtk from "gi://Gtk"; - -import { - ExtensionPreferences, - gettext as _, -} from "resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js"; - -// Import preferences pages -import { GeneralPage } from "./preferences/generalPage.js"; -import { LayoutPage } from "./preferences/layoutPage.js"; -import { LocationsPage } from "./preferences/locationsPage.js"; -import { AboutPage } from "./preferences/aboutPage.js"; - -export default class OpenWeatherPreferences extends ExtensionPreferences { - constructor(metadata) { - super(metadata); - } - - fillPreferencesWindow(window) { - let iconTheme = Gtk.IconTheme.get_for_display(Gdk.Display.get_default()); - if (!iconTheme.get_search_path().includes(this.metadata.path + "/media")) { - iconTheme.add_search_path(this.metadata.path + "/media"); - } - - window._settings = this.getSettings(); - - const generalPage = new GeneralPage(this.metadata, window._settings, window); - const layoutPage = new LayoutPage(this.metadata, window._settings); - const locationsPage = new LocationsPage( - this.metadata, - window._settings, - window - ); - const aboutPage = new AboutPage(this.metadata, window._settings, window); - - let prefsWidth = window._settings.get_int("prefs-default-width"); - let prefsHeight = window._settings.get_int("prefs-default-height"); - - window.set_default_size(prefsWidth, prefsHeight); - window.set_search_enabled(true); - - window.add(generalPage); - window.add(layoutPage); - window.add(locationsPage); - window.add(aboutPage); - - window.connect("close-request", () => { - let currentWidth = window.default_width; - let currentHeight = window.default_height; - // Remember user window size adjustments. - if (currentWidth !== prefsWidth || currentHeight !== prefsHeight) - { - window._settings.set_int("prefs-default-width", currentWidth); - window._settings.set_int("prefs-default-height", currentHeight); - } - window.destroy(); - }); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/private_metadata.json b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/private_metadata.json deleted file mode 100644 index 119e95e0..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/private_metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "_generated": "Generated by SweetTooth, do not edit", - "description": "Display weather for the current or a specified location. Fork of OpenWeather.\nWeather data is provided by OpenWeatherMap.org or WeatherAPI.com or VisualCrossing.com.\nIf location is set to \"My Location,\" which is the case by default on laptops, this extension will use location services and Nominatim (from OpenStreetMap.org), or infoip.io if that failed.", - "gettext-domain": "gnome-shell-extension-openweatherrefined", - "git-version": "138.r1.g2406098", - "name": "OpenWeather Refined", - "settings-schema": "org.gnome.shell.extensions.openweatherrefined", - "shell-version": [ - "45", - "46", - "47" - ], - "url": "https://github.com/penguin-teal/gnome-openweather", - "uuid": "openweather-extension@penguin-teal.github.io", - "version": 18, - "version-name": "139" -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/schemas/gschemas.compiled b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/schemas/gschemas.compiled deleted file mode 100644 index 7c3033f4..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/schemas/gschemas.compiled and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/schemas/org.gnome.shell.extensions.openweatherrefined.gschema.xml b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/schemas/org.gnome.shell.extensions.openweatherrefined.gschema.xml deleted file mode 100644 index d3ae38d5..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/schemas/org.gnome.shell.extensions.openweatherrefined.gschema.xml +++ /dev/null @@ -1,267 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<schemalist gettext-domain="gnome-shell-extension-openweatherrefined"> - <enum id="org.gnome.shell.extensions.openweatherrefined.weather-provider"> - <value value="0" nick="default" /> - <value value="1" nick="openweathermap" /> - <value value="2" nick="weatherapicom" /> - <value value="3" nick="visualcrossing" /> - </enum> - <enum id="org.gnome.shell.extensions.openweatherrefined.geolocation-provider"> - <value value="0" nick="openstreetmaps"/> - <!-- Geocode.farm (1) is deprecated and will be changed to OSM (0) --> - <value value="1" nick="geocode"/> - <value value="2" nick="mapquest"/> - </enum> - <enum id="org.gnome.shell.extensions.openweatherrefined.unit"> - <value value="0" nick="celsius"/> - <value value="1" nick="fahrenheit"/> - <value value="2" nick="kelvin"/> - <value value="3" nick="rankine"/> - <value value="4" nick="reaumur"/> - <value value="5" nick="roemer"/> - <value value="6" nick="delisle"/> - <value value="7" nick="newton"/> - </enum> - <enum id="org.gnome.shell.extensions.openweatherrefined.pressure-unit"> - <value value="0" nick="hPa"/> - <value value="1" nick="inHg"/> - <value value="2" nick="bar"/> - <value value="3" nick="Pa"/> - <value value="4" nick="kPa"/> - <value value="5" nick="atm"/> - <value value="6" nick="at"/> - <value value="7" nick="Torr"/> - <value value="8" nick="psi"/> - <value value="9" nick="mmHg"/> - <value value="10" nick="mbar"/> - </enum> - <enum id="org.gnome.shell.extensions.openweatherrefined.wind-speed-unit"> - <value value="0" nick="kph"/> - <value value="1" nick="mph"/> - <value value="2" nick="m/s"/> - <value value="3" nick="knots"/> - <value value="4" nick="ft/s"/> - <value value="5" nick="Beaufort"/> - </enum> - <enum id="org.gnome.shell.extensions.openweatherrefined.position"> - <value value="0" nick="center"/> - <value value="1" nick="right"/> - <value value="2" nick="left"/> - </enum> - <enum id="org.gnome.shell.extensions.openweatherrefined.clock-format"> - <value value="0" nick="24h" /> - <value value="1" nick="12h" /> - <value value="2" nick="system" /> - </enum> - <enum id="org.gnome.shell.extensions.openweatherrefined.hi-contrast"> - <value value="0" nick="none"></value> - <value value="1" nick="white"></value> - <value value="2" nick="black"></value> - </enum> - <enum id="org.gnome.shell.extensions.openweatherrefined.my-loc-prov"> - <value value="0" nick="geoclue"></value> - <value value="1" nick="ipinfoio"></value> - </enum> - <schema path="/org/gnome/shell/extensions/openweatherrefined/" id="org.gnome.shell.extensions.openweatherrefined"> - <key name="weather-provider" enum="org.gnome.shell.extensions.openweatherrefined.weather-provider"> - <default>'default'</default> - <summary>Weather Provider</summary> - </key> - <key name="geolocation-provider" enum="org.gnome.shell.extensions.openweatherrefined.geolocation-provider"> - <default>'openstreetmaps'</default> - <summary>Geolocation Provider</summary> - </key> - <key name="unit" enum="org.gnome.shell.extensions.openweatherrefined.unit"> - <default>'celsius'</default> - <summary>Temperature Unit</summary> - </key> - <key name="pressure-unit" enum="org.gnome.shell.extensions.openweatherrefined.pressure-unit"> - <default>'kPa'</default> - <summary>Pressure Unit</summary> - </key> - <key name="wind-speed-unit" enum="org.gnome.shell.extensions.openweatherrefined.wind-speed-unit"> - <default>'kph'</default> - <summary>Wind Speed Units</summary> - <description>Choose the units used for wind speed. Allowed values are 'kph', 'mph', 'm/s', 'knots', 'ft/s' or 'Beaufort'.</description> - </key> - <key type="b" name="wind-direction"> - <default>false</default> - <summary>Wind Direction by Arrows</summary> - <description>True to display wind direction through arrows rather than letters.</description> - </key> - <!-- 'city' no longer in use, will be migrated to 'locs' --> - <key type="s" name="city"> - <default>''</default> - <summary>DEPRECATED, City to be displayed</summary> - </key> - <key type="i" name="actual-city"> - <default>0</default> - <summary>Index of the city to display by default.</summary> - </key> - <key type="b" name="translate-condition"> - <default>true</default> - <summary>Translate Conditions</summary> - </key> - <key type="b" name="owm-api-translate"> - <default>false</default> - <summary>Provider multilingual Support (weather descriptions only)</summary> - </key> - <key type="b" name="use-system-icons"> - <default>true</default> - <summary>System Icons</summary> - </key> - <key type="b" name="show-text-in-panel"> - <default>true</default> - <summary>True to show temperature in the panel</summary> - </key> - <key type="b" name="show-comment-in-panel"> - <default>false</default> - <summary>True to show conditions in the panel.</summary> - </key> - <key type="b" name="disable-forecast"> - <default>false</default> - <summary>Disable Forecast</summary> - </key> - <key type="b" name="show-comment-in-forecast"> - <default>true</default> - <summary>Conditions in Forecast</summary> - </key> - <key name="position-in-panel" enum="org.gnome.shell.extensions.openweatherrefined.position"> - <default>'right'</default> - <summary>Position in Panel</summary> - </key> - <key type="i" name="position-index"> - <default>0</default> - <summary>Position in Panel</summary> - </key> - <key name="menu-alignment" type="d"> - <default>75.0</default> - <summary>Horizontal position of menu-box.</summary> - </key> - <key type="i" name="refresh-interval-current"> - <default>600</default> - <summary>Refresh interval (actual weather)</summary> - </key> - <key type="i" name="location-text-length"> - <default>0</default> - <summary>Maximum length of the location text</summary> - </key> - <key type="i" name="refresh-interval-forecast"> - <default>3600</default> - <summary>Refresh interval (forecast)</summary> - </key> - <key type="b" name="center-forecast"> - <default>true</default> - <summary>Center forecastbox.</summary> - </key> - <key type="b" name="expand-forecast"> - <default>false</default> - <summary>Always keep forecast expanded</summary> - </key> - <key type="i" name="days-forecast"> - <default>2</default> - <summary>Number of days in forecast</summary> - </key> - <key type="i" name="decimal-places"> - <default>0</default> - <summary>Maximum number of digits after the decimal point for temperature</summary> - </key> - <key type="i" name="pressure-decimal-places"> - <default>-2</default> - <summary>Maximum number of digits after the decimal point for pressure</summary> - </key> - <key type="i" name="speed-decimal-places"> - <default>-1</default> - <summary>Maximum number of digits after the decimal point for wind speed</summary> - </key> - <!-- DEPRECATED. Use 'custom-keys' instead. --> - <key type="s" name="appid"> - <default>''</default> - <summary>DEPRECATED. Your personal API key from openweathermap.org</summary> - </key> - <!-- DEPRECATED. Use 'custom-keys' instead. --> - <key type="s" name="weatherapidotcom-key"> - <default>''</default> - <summary>DEPRECATED. Your personal API key from WeatherAPI.com</summary> - </key> - <!-- DEPRECATED. Use 'custom-keys' instead. --> - <key type="b" name="use-default-owm-key"> - <default>true</default> - <summary>DEPRECATED. Use the extensions default API key from openweathermap.org</summary> - </key> - <!-- DEPRECATED. Use 'custom-keys' instead. --> - <key type="b" name="use-default-weatherapidotcom-key"> - <default>true</default> - <summary>DEPRECATED. Use the extensions default API key from WeatherAPI.com</summary> - </key> - <key type="s" name="geolocation-appid-mapquest"> - <default>''</default> - <summary>Your personal AppKey from developer.mapquest.com</summary> - </key> - <key name="clock-format" enum="org.gnome.shell.extensions.openweatherrefined.clock-format"> - <default>'system'</default> - <summary>Time format for hours. Possible values are '24hr' for 24-hour clock, '12hr' for AM/PM, and 'system' to follow the GNOME setting.</summary> - </key> - <key type="i" name="delay-ext-init"> - <default>0</default> - <summary>Seconds to delay popup initialization and data fetch on the first load</summary> - </key> - <key type="i" name="prefs-default-width"> - <default>700</default> - <summary>Default width for the preferences window</summary> - </key> - <key type="i" name="prefs-default-height"> - <default>600</default> - <summary>Default height for the preferences window</summary> - </key> - <key name="hi-contrast" enum="org.gnome.shell.extensions.openweatherrefined.hi-contrast"> - <default>'none'</default> - <summary>High contrast style to use, possible values are 'none', 'white', or 'black'.</summary> - </key> - <key type="b" name="show-sunsetrise-in-panel"> - <default>false</default> - <summary>True to show the sunset/sunrise in the panel.</summary> - </key> - <key type="b" name="sun-in-panel-first"> - <default>false</default> - <summary>True to show the sunset/sunrise in the panel before the temperature/conditions if enabled.</summary> - </key> - <key type="b" name="has-run"> - <default>false</default> - <summary>False if this extension has never been initialized before.</summary> - </key> - <key type="d" name="loc-refresh-interval"> - <default>60.0</default> - <summary>How often, in minutes, to re-fetch My Location if selected.</summary> - </key> - <key type="b" name="simplify-degrees"> - <default>true</default> - <summary>True to cut off the "F" or "C" after the degree symbol.</summary> - </key> - <key type="b" name="frozen"> - <default>false</default> - <summary>Freezes the settings changed listener; user should not change this.</summary> - </key> - <!-- locs: [ ( NameType, Name, LocType, LocInfo ), ... ] --> - <key type="a(usus)" name="locs"> - <default>[ (1, '', 1, '') ]</default> - <summary>List of locations.</summary> - </key> - <key name="my-loc-prov" enum="org.gnome.shell.extensions.openweatherrefined.my-loc-prov"> - <default>'geoclue'</default> - <summary>Provider to use for "My Location."</summary> - </key> - <key type="s" name="last-init-error"> - <default>''</default> - <summary>Empty or the last initialization error message.</summary> - </key> - <key type="as" name="custom-keys"> - <default>[ '', '', '' ]</default> - <summary>Custom keys for weather providers.</summary> - </key> - <key type="b" name="precip-starts-notif"> - <default>false</default> - <summary>Get a notification when precipitation starts.</summary> - </key> - </schema> -</schemalist> diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/stylesheet.css b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/stylesheet.css deleted file mode 100644 index cd3acb0e..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/stylesheet.css +++ /dev/null @@ -1,180 +0,0 @@ -.openweather-button { - border-radius: 32px; - padding: 13px; -} - -.openweather-button:hover { - border: none; - padding: 14px; -} - -.openweather-button > StIcon { - icon-size: 6px; -} - -.openweather-button > StLabel { - padding: 6px; -} - -.openweather-menu-button-container { - padding: 0px; -} - -.openweather-button-box { - padding: 0px; - spacing: 12px; -} - -.openweather-current-summarybox, -.openweather-forecast-icon, -.openweather-current-databox-captions, -.openweather-current-databox-values, -.openweather-current-icon, -.openweather-forecast-summary, -.openweather-forecast-temperature { - border-radius: 0px; - padding: 0px; - border: 0px; -} - -.openweather-current-summarybox { - padding-top: 5px; - padding-right: 60px; -} - -.openweather-current-summary { - font-size: 36px; -} - -.openweather-current-databox { - padding: 5px 15px 0px; -} - -.openweather-current-icon { - padding-right: 40px; -} - -.openweather-current-iconbox { - padding-right: 20px; - padding-left: 20px; -} - -.openweather-icon:ltr { - padding-right: 5px; -} - -.openweather-icon:rtl { - padding-left: 5px; -} - -.openweather-label { - padding-right: 6px; -} - -.openweather-current-databox-captions { - text-align: right; - padding-right: 5px; - spacing: 0; -} - -.openweather-today-box { - padding-top: 15px; - padding-bottom: 15px; -} - -.openweather-forecast-expander { - padding-right: 15px; - padding-left: 15px; -} - -.openweather-forecast-box { - padding-top: 15px; -} - -.openweather-forecast-icon { - padding-right: 10px; -} - -.openweather-forecasts { - -st-hfade-offset: 60px; -} - -.openweather-today-databox { - text-align: center; - padding-right: 35px; - padding-left: 35px; -} - -.openweather-forecast-databox { - text-align: center; - min-width: 180px; - min-height: 120px; -} - -.openweather-forecast-day { - min-height: 120px; - padding: 0px 2px 0px 0px; - text-align: right; - font-weight: bold; - font-size: 90%; - spacing: 0; -} - -.openweather-forecast-time { - font-size: 85%; - padding-bottom: 5px; - spacing: 0; -} - -.openweather-forecast-iconbox { - text-align: center; - vertical-align: top; -} - -.openweather-forecast-summary { - padding-top: 5px; - font-size: 80%; -} - -.openweather-sunrise-icon { - padding-right: 5px; -} - -.openweather-sunset-icon { - padding-left: 15px; - padding-right: 5px; -} - -.openweather-build-icon { - padding-left: 15px; - padding-right: 5px; -} - -.openweather-button-action { - -st-icon-style: symbolic; - border-radius: 32px; - margin: 0px; - min-height: 22px; - min-width: 22px; - padding: 10px; - font-size: 100%; -} - -.openweather-button-action:hover, -.openweather-button-action:focus { - border: none; - padding: 11px; -} - -.openweather-button-action > StIcon { - icon-size: 16px; -} - -.openweather-white { - color: white; -} - -.openweather-black { - color: black; -} - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/weathericons.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/weathericons.js deleted file mode 100644 index 85d6385b..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/openweather-extension@penguin-teal.github.io/weathericons.js +++ /dev/null @@ -1,387 +0,0 @@ -/* - Copyright 2024 Teal Penguin - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - - import { WeatherProvider } from "./getweather.js" - -/** - * More icons than there currently are available because they follow - * the Breeze icon set, which I can't get working right now, so everything - * is mapped to available Adwaita icons. - * @enum {string} - */ -const WeatherIcons = -{ - CLEAR: "clear", - CLOUDS: "few-clouds", - FEW_CLOUDS: "few-clouds", - FOG: "fog", - FREEZING_RAIN: "freezing-rain", - FREEZING_SCATTERED_RAIN: "freezing-rain", - FREEZING_SCATTERED_RAIN_STORM: "freezing-rain", - FREEZING_STORM: "freezing-storm", - HAIL: "snow", - MANY_CLOUDS: "overcast", - MIST: "fog", - OVERCAST: "overcast", - SHOWERS: "showers", - SHOWERS_SCATTERED: "showers-scattered", - SHOWERS_SCATTERED_STORM: "storm", - SNOW: "snow", - SNOW_RAIN: "snow", - SNOW_SCATTERED: "snow", - SNOW_SCATTERED_STORM: "snow", - SNOW_STORM: "snow", - STORM: "storm", - WINDY: "windy", - TORNADO: "tornado" -}; - -// Map OpenWeatherMap icon codes to icon names -/** - * @enum {string} - */ -const OpenWeatherMapIconMap = -{ - "01d": WeatherIcons.CLEAR, // "clear sky" - "02d": WeatherIcons.FEW_CLOUDS, // "few clouds" - "03d": WeatherIcons.FEW_CLOUDS, // "scattered clouds" - "04d": WeatherIcons.CLOUDS, // "broken clouds" - "09d": WeatherIcons.SHOWERS_SCATTERED, // "shower rain" - "10d": WeatherIcons.SHOWERS, // "rain" - "11d": WeatherIcons.STORM, // "thunderstorm" - "13d": WeatherIcons.SNOW, // "snow" - "50d": WeatherIcons.MIST, // "mist" - "01n": WeatherIcons.CLEAR, // "clear sky night" - "02n": WeatherIcons.FEW_CLOUDS, // "few clouds night" - "03n": WeatherIcons.FEW_CLOUDS, // "scattered clouds night" - "04n": WeatherIcons.CLOUDS, // "broken clouds night" - "09n": WeatherIcons.SHOWERS_SCATTERED, // "shower rain night" - "10n": WeatherIcons.SHOWERS, // "rain night" - "11n": WeatherIcons.STORM, // "thunderstorm night" - "13n": WeatherIcons.SNOW, // "snow night" - "50n": WeatherIcons.MIST, // "mist night" -}; - -/** - * @enum {string} - */ -const WeatherApiComIconMap = -{ - 1000: WeatherIcons.CLEAR, // "Sunny" / "Clear" - 1003: WeatherIcons.FEW_CLOUDS, // "Partly cloudy" - 1006: WeatherIcons.CLOUDS, // "Cloudy" - 1009: WeatherIcons.OVERCAST, // "Overcast" - 1030: WeatherIcons.MIST, // "Mist" - 1063: WeatherIcons.SHOWERS_SCATTERED, // "Patchy rain possible" - 1066: WeatherIcons.SNOW, // "Patchy snow possible" - 1069: WeatherIcons.SNOW_RAIN, // "Patchy sleet possible" - 1072: WeatherIcons.FREEZING_SCATTERED_RAIN, // "Patchy freezing drizzle possible" - 1087: WeatherIcons.STORM, // "Thundery outbreaks possible" - 1114: WeatherIcons.SNOW_SCATTERED, // "Blowing snow" - 1117: WeatherIcons.SNOW_STORM, // "Blizzard" - 1135: WeatherIcons.FOG, // "Fog" - 1147: WeatherIcons.FOG, // "Freezing fog" - 1150: WeatherIcons.SHOWERS_SCATTERED, // "Patchy light drizzle" - 1153: WeatherIcons.SHOWERS_SCATTERED, // "Light drizzle" - 1168: WeatherIcons.FREEZING_RAIN, // "Freezing drizzle" - 1171: WeatherIcons.FREEZING_RAIN, // "Heavy freezing drizzle" - 1180: WeatherIcons.SHOWERS_SCATTERED, // "Patchy light rain" - 1183: WeatherIcons.SHOWERS_SCATTERED, // "Light rain" - 1186: WeatherIcons.SHOWERS, // "Moderate rain at times" - 1189: WeatherIcons.SHOWERS, // "Moderate rain" - 1192: WeatherIcons.SHOWERS, // "Heavy rain at times" - 1195: WeatherIcons.SHOWERS, // "Heavy rain" - 1198: WeatherIcons.FREEZING_SCATTERED_RAIN, // "Light freezing rain" - 1201: WeatherIcons.FREEZING_RAIN, // "Moderate or heavy freezing rain" - 1204: WeatherIcons.SNOW_RAIN, // "Light sleet" - 1207: WeatherIcons.SNOW_RAIN, // "Moderate or heavy sleet" - 1210: WeatherIcons.SNOW_SCATTERED, // "Patchy light snow" - 1213: WeatherIcons.SNOW_SCATTERED, // "Light snow" - 1216: WeatherIcons.SNOW, // "Patchy moderate snow" - 1219: WeatherIcons.SNOW, // "Moderate snow" - 1222: WeatherIcons.SNOW, // "Patchy heavy snow" - 1225: WeatherIcons.SNOW, // "Heavy snow" - 1237: WeatherIcons.HAIL, // "Ice pellets" - 1240: WeatherIcons.SHOWERS_SCATTERED, // "Light rain shower" - 1243: WeatherIcons.SHOWERS, // "Moderate or heavy rain shower" - 1246: WeatherIcons.SHOWERS, // "Torrential rain shower" - 1249: WeatherIcons.SNOW_RAIN, // "Light sleet showers" - 1252: WeatherIcons.SNOW_RAIN, // "Moderate or heavy sleet showers" - 1255: WeatherIcons.SNOW_SCATTERED, // "Light snow showers" - 1258: WeatherIcons.SNOW, // "Moderate or heavy snow showers" - 1261: WeatherIcons.HAIL, // "Light showers of ice pellets" - 1264: WeatherIcons.HAIL, // "Moderate or heavy showers of ice pellets" - 1273: WeatherIcons.STORM, // "Patchy light rain with thunder" - 1276: WeatherIcons.STORM, // "Moderate or heavy rain with thunder" - 1279: WeatherIcons.SNOW_SCATTERED_STORM, // "Patchy light snow with thunder" - 1282: WeatherIcons.SNOW_STORM, // "Moderate or heavy snow with thunder" -}; - -/** - * @enum {string} - */ -const VisualCrossingIconMap = -{ - "snow": WeatherIcons.SNOW, - "rain": WeatherIcons.SHOWERS, - "fog": WeatherIcons.FOG, - "wind": WeatherIcons.WINDY, - "cloudy": WeatherIcons.CLOUDS, - "partly-cloudy-day": WeatherIcons.FEW_CLOUDS, - "partly-cloudy-night": WeatherIcons.FEW_CLOUDS, - "clear-day": WeatherIcons.CLEAR, - "clear-night": WeatherIcons.CLEAR -}; - -function hasNightVariant(name) -{ - return name === "clear" || name === "few-clouds"; -} - -/** - * @param {boolean} isNight - * @param {boolean} useSymbolic - */ -export function getIconName(provider, key, isNight, useSymbolic) -{ - let name; - switch(provider) - { - case WeatherProvider.OPENWEATHERMAP: - name = OpenWeatherMapIconMap[key]; - break; - case WeatherProvider.WEATHERAPICOM: - name = WeatherApiComIconMap[key]; - break; - case WeatherProvider.VISUALCROSSING: - name = VisualCrossingIconMap[key]; - break; - } - - let fullName = "weather-" + name; - - if(isNight && hasNightVariant(name)) fullName += "-night"; - - // Ignore useSymbolic for now because we only package symbolic icons - fullName += "-symbolic"; - - return fullName; -} - -/** - * @enum {string} - */ -const OpenWeatherMapConditionMap = -{ - 200: "Thunderstorm with Light Rain", // Thunderstorm with light rain - 201: "Thunderstorm with Rain", // Thunderstorm with rain - 202: "Thunderstorm with Heavy Rain", // Thunderstorm with heavy rain - 210: "Light Thunderstorm", - 211: "Heavy Thunderstorm", - 212: "Ragged Thunderstorm", - 230: "Thunderstorm with Light Drizzle", // Thunderstorm with light drizzle - 231: "Thunderstorm with Drizzle", // Thunderstorm with drizzle - 232: "Thunderstorm with Heavy Drizzle", // Thunderstorm with heavy drizzle - 300: "Light Drizzle", - 301: "Drizzle", - 302: "Heavy Drizzle", - 310: "Light Drizzle Rain", - 311: "Drizzle Rain", - 312: "Heavy Drizzle Rain", - 313: "Shower Rain and Drizzle", - 314: "Heavy Rain and Drizzle", - 321: "Shower Drizzle", - 500: "Light Rain", - 501: "Moderate Rain", - 502: "Heavy Rain", - 503: "Very Heavy Rain", - 504: "Extreme Rain", - 511: "Freezing Rain", - 520: "Light Shower Rain", - 521: "Shower Rain", - 522: "Heavy Shower Rain", - 531: "Ragged Shower Rain", - 600: "Light Snow", - 601: "Snow", - 602: "Heavy Snow", - 611: "Sleet", - 612: "Light Shower Sleet", - 613: "Shower Sleet", - 615: "Light Rain and Snow", - 616: "Rain and Snow", - 620: "Light Shower Snow", - 621: "Shower Snow", - 622: "Heavy Shower Snow", - 701: "Mist", - 711: "Smoke", - 721: "Haze", - 731: "Sand/Dust Whirls", - 741: "Fog", - 751: "Sand", - 761: "Dust", - 762: "Volcanic Ash", - 771: "Squalls", - 781: "Tornado", - 800: "Clear Sky", - 801: "Few Clouds", - 802: "Scattered Clouds", - 803: "Broken Clouds", - 804: "Overcast Clouds" -}; - -/** - * @enum {string} - */ -const WeatherApiComConditionMap = -{ - 1000: "Clear", - 1003: "Partly Cloudy", - 1006: "Cloudy", - 1009: "Overcast", - 1030: "Mist", - 1063: "Patchy Rain Possible", - 1066: "Patchy Snow Possible", - 1069: "Patchy Sleet Possible", - 1072: "Patchy Freezing Drizzle Possible", - 1087: "Thundery Outbreaks Possible", - 1114: "Blowing Snow", - 1117: "Blizzard", - 1135: "Fog", - 1147: "Freezing Fog", - 1150: "Patchy Light Drizzle", - 1153: "Light Drizzle", - 1168: "Freezing Drizzle", - 1171: "Heavy Freezing Drizzle", - 1180: "Patchy Light Rain", - 1183: "Light Rain", - 1186: "Moderate Rain At Times", - 1189: "Moderate Rain", - 1192: "Heavy Rain At Times", - 1195: "Heavy Rain", - 1198: "Light Freezing Rain", - 1201: "Heavy Freezing Rain", // Moderate or heavy freezing rain - 1204: "Light Sleet", - 1207: "Moderate Or Heavy Sleet", - 1210: "Patchy Light Snow", - 1213: "Light Snow", - 1216: "Patchy Moderate Snow", - 1219: "Moderate Snow", - 1222: "Patchy Heavy Snow", - 1225: "Heavy Snow", - 1237: "Hail", // Ice pellets - 1240: "Light Shower", // Light Rain Shower - 1243: "Heavy Shower", // Moderate or heavy rain shower - 1246: "Torrential Rain Shower", - 1249: "Light Sleet Showers", - 1252: "Heavy Sleet Showers", // Moderate or Heavy Sleet Showers - 1255: "Light Snow Showers", - 1258: "Heavy Snow Showers", // Moderate or heavy snow showers - 1261: "Light Hail", // Light showers of ice pellets - 1264: "Heavy Hail", // Moderate Or Heavy Showers Of Ice Pellets - 1273: "Patchy Light Rain With Thunder", - 1276: "Heavy Rain with Thunder", // Moderate or heavy rain with thunder - 1279: "Patchy Light Snow with Thunder", - 1282: "Heavy Snow with Thunder" // Moderate or heavy snow with thunder -}; - -/** - * @enum {string} - */ -const VisualCrossingConditionMap = -{ - "clear": "Clear", // Clear conditions throughout the day - "clearingpm": "Clear Afternoon", // Clearing in the afternoon - "cloudcover": "Cloud Cover", // Cloud cover - "cloudierpm": "Coudy Afternoon", // Becoming cloudy in the afternoon - "coolingdown": "Cooling Down", // Cooling down - "overcast": "Overcast", // Cloudy skies throughout the day - "precip": "Precipitation", // Precipitation - "precipcover": "Precipitation Cover", // Precipitation cover - "rainallday": "Rain All Day", // A chance of rain throughout the day - "rainam": "Morning Rain", // Morning rain - "rainampm": "Rain", // Rain in the morning and afternoon - "rainchance": "Chance of Rain", // A chance of rain - "rainclearinglater": "Rain Clearing Later", // Rain clearing later - "raindays": "Chance of Rain", // A chance of rain - "raindefinite": "Rain", // Rain - "rainearlyam": "Early Morning Rain", // Early morning rain - "rainlatepm": "Late Afternoon Rain", // Late afternoon rain - "rainpm": "Afternoon Rain", // Afternoon rain - "type_1": "Drifting Snow", // Blowing or drifting snow - "type_2": "Drizzle", // Drizzle - "type_3": "Heavy Drizzle", // Heavy Drizzle - "type_4": "Light Drizzle", // Light Drizzle - "type_5": "Heavy Rain", // Heavy Drizzle/Rain - "type_6": "Light Rain", // Light Drizzle/Rain - "type_7": "Dust Storm", // Dust storm - "type_8": "Fog", // Fog - "type_9": "Freezing Drizzle", // Freezing Drizzle/Freezing Rain - "type_10": "Heavy Freezing Drizzle", // Heavy Freezing Drizzle/Freezing Rain - "type_11": "Light Freezing Drizzle", // Light Freezing Drizzle/Freezing Rain - "type_12": "Freezing Fog", // Freezing Fog - "type_13": "Heavy Freezing Rain", // Heavy Freezing Rain - "type_14": "Light Freezing Rain", // Light Freezing Rain - "type_15": "Tornado", // Funnel Cloud/Tornado - "type_16": "Hail Showers", // Hail Showers - "type_17": "Ice", // Ice - "type_18": "Lightning", // Lightning Without Thunder - "type_19": "Mist", // Mist - "type_20": "Precipitation", // Precipitation In Vicinity - "type_21": "Rain", // Rain - "type_22": "Heavy Rain & Snow", // Heavy Rain And Snow - "type_23": "Light Rain & Snow", // Light Rain And Snow - "type_24": "Rain Showers", // Rain Showers - "type_25": "Heavy Rain", // Heavy Rain - "type_26": "Light Rain", // Light Rain - "type_27": "Sky Coverage Decreasing", // Sky Coverage Decreasing - "type_28": "Sky Coverage Increasing", // Sky Coverage Increasing - "type_29": "Sky Unchanged", // Sky Unchanged - "type_30": "Haze", // Smoke Or Haze - "type_31": "Snow", // Snow - "type_32": "Snow & Rain Showers", // Snow And Rain Showers - "type_33": "Snow Showers", // Snow Showers - "type_34": "Heavy Snow", // Heavy Snow - "type_35": "Light Snow", // Light Snow - "type_36": "Squalls", // Squalls - "type_37": "Thunderstorm", // Thunderstorm - "type_38": "Storm No Rain", // Thunderstorm Without Precipitation - "type_39": "Ice Crystals", // Diamond Dust - "type_40": "Hail", // Hail - "type_41": "Overcast", // Overcast - "type_42": "Partially Cloudy", // Partially cloudy - "type_43": "Clear" // Clear -}; - -/** - * @returns {string} - */ -export function gettextCondition(provider, code, gettext) -{ - switch(provider) - { - case WeatherProvider.OPENWEATHERMAP: - return gettext(OpenWeatherMapConditionMap[code] ?? "Not available"); - case WeatherProvider.WEATHERAPICOM: - return gettext(WeatherApiComConditionMap[code] ?? "Not available"); - case WeatherProvider.VISUALCROSSING: - return gettext(VisualCrossingConditionMap[code] ?? "Not available"); - default: - return gettext("Not available"); - } -} - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/COPYING b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/COPYING deleted file mode 100644 index e55e5b8a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/COPYING +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. <http://fsf.org> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/NEWS b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/NEWS deleted file mode 100644 index 716a8894..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/NEWS +++ /dev/null @@ -1,1462 +0,0 @@ -46.2 -==== -* apps-menu: Fix a11y of category labels [Florian; !319] -* window-list: Fix long-press support [Florian; !320] -* Misc. bug fixes and cleanups [Florian; !324] - -Contributors: - Florian Müllner - -Translators: - Hugo Carvalho [pt], Jose Riha [sk], Jordi Mas i Hernandez [ca], - Scrambled 777 [hi] - -46.1 -==== -* screenshot-window-sizer: Add flathub-recommended size [Florian; !317] - -Contributors: - Florian Müllner - -Translators: - Rachida SACI [kab], Matheus Polkorny [pt_BR], Fabio Tomat [fur] - -46.0 -==== -* system-monitor: Fix net speed [Florian; !313] -* Misc. bug fixes and cleanups [Aral; !311] - -Contributors: - Aral Balkan, Florian Müllner - -Translators: - Anders Jonsson [sv], Piotr Drąg [pl], Balázs Úr [hu], Milo Casagrande [it], - Quentin PAGÈS [oc], Athmane MOKRAOUI [kab], Changwoo Ryu [ko], - Ask Hjorth Larsen [da] - -46.rc -===== -* Fix window previews in workspace indicator [Florian; !304] -* Fix menu ornament in workspace indicator [Florian; !305] -* Misc. bug fixes and cleanups [Florian; !306, !309] - -Contributors: - Florian Müllner - -Translators: - Danial Behzadi [fa], Ekaterine Papava [ka], Sabri Ünal [tr], Artur S0 [ru], - Yuri Chornoivan [uk], Vasil Pupkin [be], Asier Sarasua Garmendia [eu], - Yaron Shahrabani [he], Brage Fuglseth [nb], Nathan Follens [nl], - Aurimas Černius [lt], Matej Urbančič [sl], Boyuan Yang [zh_CN], - Kukuh Syafaat [id], Fran Dieguez [gl], Andi Chandler [en_GB], - Baurzhan Muftakhidinov [kk], Rūdolfs Mazurs [lv], Guillaume Bernard [fr], - Daniel Mustieles [es], Jiri Grönroos [fi] - -46.beta -======= -* apps-menu: Rename Applications to Apps [Allan; !299] -* Misc. bug fixes and cleanups [Florian; !296, !297, !300, !301, !302] - -Contributors: - Allan Day, Florian Müllner - -Translators: - Gabriel Brand [de], Daniel Rusek [cs], Fran Dieguez [gl], - Aefgh Threenine [th], Vasil Pupkin [be], Artur S0 [ru], Yosef Or Boczko [he], - Sabri Ünal [tr] - -46.alpha -======== -* workspace-indicator: Fix initial preview visibility [Florian; !280, !292] -* screenshot-window-sizer: Fix cycling between sizes backwards [Florian; !284] -* Add back overview in Classic session [Florian; !287] -* Allow running Classic session headless [Jonas; !289] -* window-list: Fix buttons not being clickable at the screen edge - [Florian; !291] -* Add system-monitor extension [Florian; !277] -* Fixed crash [Florian; !290] -* Misc. bug fixes and cleanups [Florian; !276, !275, !278, !281, !286, !288] - -Contributors: - Jonas Ådahl, Florian Müllner - -Translators: - Kristjan SCHMIDT [eo], Brage Fuglseth [nb] - -45.0 -==== - -Contributors: - Andre Klapper - -Translators: - Bruce Cowan [en_GB] - -45.rc -===== -* Misc. bug fixes and cleanups [Florian; !267, !224, !272] - -Contributors: - Florian Müllner - -Translators: - Sabri Ünal [tr], Florentina Musat [ro], A S Alam [pa] - -45.beta -======= -* Port extensions to ESM [Florian; !259, !266, !268, !269] -* Misc. bug fixes and cleanups [Florian; !260, !261, !262, !263, !264] - -Contributors: - Florian Müllner - -Translators: - Efstathios Iosifidis [el] - -45.alpha -======== -* window-list: Modernize default styling [Alexander; !253] -* Replace classic styling with built-in light style [Florian; !254] -* window-list: Add tooltip for long window titles [Arik; !251] -* light-style: New extension [Florian; !256] -* Misc. bug fixes and cleanups [Florian; !255, !257] - -Contributors: - Florian Müllner, Arik W, Alexander Weichart - -44.0 -==== -* Bump version - -44.rc -===== -* Bump version - -44.beta -======= -* Tweak menu alignment [robxnano; !246] - -Contributors: - Florian Müllner, robxnano - -Translators: - Vasil Pupkin [be] - -43.1 -==== -* Fixed crash [Florian; !243] -* Misc. bug fixes and cleanups [mowemcfc; !244] - -Contributors: - Florian Müllner, mowemcfc - -Translators: - Sabri Ünal [tr] - -43.0 -==== - -Contributors: - Florian Müllner - -Translators: - Pawan Chitrakar [ne], Zurab Kargareteli [ka], Aleksandr Melman [ru] - -43.rc -===== -* Misc. bug fixes and cleanups [Florian; !240] - -Contributors: - Florian Müllner - -43.beta -======= -* Misc. bug fixes and cleanups [Florian; !237, !238] - -Contributors: - Florian Müllner - -Translators: - Nart Tlisha [ab] - -43.alpha -======== - -Contributors: - Florian Müllner - -Translators: - Marco Ciampa [it] - -42.3 -==== -* screenshot-window-sizer: Fix reported sizes on wayland [Florian; !232] -* window-list: Improve touch support [Florian; !233] - -Contributors: - Florian Müllner - -42.2 -==== -* native-window-placement: Adjust to gnome-shell 42 changes [Florian; !229] -* window-list: Fix visibility on non-primary monitors [Jason; !230] - -Contributors: - Jason Lynch, Florian Müllner - -Translators: - Cheng-Chia Tseng [zh_TW] - -42.1 -==== -* Misc. bug fixes and cleanups [Florian; !223, !222, !225] - -Contributors: - Florian Müllner - -Translators: - Milo Casagrande [it], Rūdolfs Mazurs [lv], Nathan Follens [nl], - Ngọc Quân Trần [vi], Zurab Kargareteli [ka] - -42.0 -==== - -Translators: - Philipp Kiemle [de], Balázs Úr [hu], Марко Костић [sr], sicklylife [ja], - Baurzhan Muftakhidinov [kk] - -42.rc -===== -* Misc. bug fixes and cleanups [Florian; !215, !218] - -Contributors: - Florian Müllner - -Translators: - Marek Černocký [cs], Dušan Kazik [sk], Piotr Drąg [pl], Jiri Grönroos [fi], - Luna Jernberg [sv], Alan Mortensen [da], Charles Monzat [fr], - Changwoo Ryu [ko] - -42.beta -======= -* workspace-indicator: Fix cancelling editing with Esc [Florian; !208] -* window-list: Update window tracking to avoid missing icons [Florian; !207] -* Use libadwaita for preferences [Florian; !209, !213] -* Adapt to Clutter grab API changes [Florian; !212] -* Misc. bug fixes and cleanups [Jan, Florian; !210, !214] - -Contributors: - Jan Beich, Florian Müllner, Naala Nanba - -Translators: - Boyuan Yang [zh_CN], Matej Urbančič [sl], Naala Nanba [ab], - Alexander Shopov [bg], Emin Tufan Çetin [tr] - -42.alpha -======== -* native-window-placement: Fix distorted layout in app grid [Sebastian; !189] -* window-list: Fix on-screen keyboard [Florian; !199] -* Misc. bug fixes and cleanups [Neal; Just; !195, !197] - -Contributors: - Piotr Drąg, Neal Gompa, Sebastian Keller, Florian Müllner, Just Perfection - -Translators: - Goran Vidović [hr], Sveinn í Felli [is], Yuri Chornoivan [uk], - Fabio Tomat [fur], Quentin PAGÈS [oc], Hugo Carvalho [pt], - Yaron Shahrabani [he], Jordi Mas i Hernandez [ca], MohammadSaleh Kamyab [fa], - Fran Dieguez [gl], Daniel Mustieles [es], Aleksandr Melman [ru], - Aurimas Černius [lt], Asier Sarasua Garmendia [eu], Kukuh Syafaat [id], - Rafael Fontenelle [pt_BR] - -41.0 -==== -* Bump version - -41.rc.1 -======= -* Fix pre-generating stylesheets in tarball [Florian; !190] - -Contributors: - Florian Müllner - -41.rc -===== -* window-list: Adapt to overview-on-startup [Florian; !185] -* apps-menu: Use a custom 'toggle-menu' shortcut [Florian; !173] -* Misc. bug fixes and cleanups [Florian; !186] - -Contributors: - Florian Müllner - -41.beta -======= -* window-list: Extend reactive area of minimap to screen edges [Adam; !171] -* drive-menu: Improve detection of network mounts [Florian; !27, !176] -* Use distinct gettext domain for e.g.o uploads [Florian; #335] -* Misc. bug fixes and cleanups [Florian; !172, !174, !177, !167, !178, !180, - !181, !182, !183] - -Contributors: - Marco Trevisan (Treviño), Adam Goode, Florian Müllner - -Translators: - Hugo Carvalho [pt], Juliano de Souza Camargo [pt], Alexander Shopov [bg] - -40.1 -==== -* Disable welcome dialog in classic session [Florian; !169] -* windowsNavigator: Adjust to a late gnome-shell change [Florian; !170] - -Contributors: - Florian Müllner - -Translators: - Ngọc Quân Trần [vi], Anders Jonsson [sv], Carmen Bianca BAKKER [eo], - Pawan Chitrakar [ne], Quentin PAGÈS [oc] - -40.0 -==== - -Translators: - Jiri Grönroos [fi] - -40.rc -===== -* native-window-placement: Adjust to gnome-shell changes [Florian; !164] -* windows-navigator: Adjust to gnome-shell changes [Florian; !163] -* window-list, workspace-indicator: Only show previews for up to six workspaces - [Florian; !165] -* window-list, workspace-indicator: Improve workspace preview appearance - [Florian; !166] - -Contributors: - Florian Müllner - -Translators: - Fran Dieguez [gl] - -40.beta -======= -* Add tooltips to workspace thumbnails [Florian; !155] -* Drop arrows from top bar menus [Florian; !156] -* drive-menu: Mark mounts that can be unmounted as removable [Michael; !152] -* Remove horizontal-workspaces extension [Florian; !158] -* Adjust to shell overview changes [Florian; !159, !160] -* Fix crashes [Daniel; !157] -* Misc. bug fixes and cleanups [Florian; !154, !161] - -Contributors: - Michael Lawton, Florian Müllner, Daniel van Vugt - -Translators: - Аляксей [be], A S Alam [pa] - -40.alpha.1 -========== -* Don't depend on sassc when building from tarball [Florian; !150] -* Port extensions preferences to GTK4 [Florian; !148] -* Misc. bug fixes and cleanups [Florian, Jonas; !149, !151, !153] - -Contributors: - Jonas Dreßler, Florian Müllner - -40.alpha -======== -* window-list: Honor changes in skip-taskbar property [Sergio; !130] -* window-list, workspace-indicator: Adjust to 3.38 changes [Florian; !133] -* window-list, workspace-indicator: Improve previews in workspace thumbs - [Florian; #260, !142] -* auto-move: Improve behavior on multi-monitor setups [Florian; !135] -* windowNavigator: Adjust to 3.38 changes [Thun; #259] -* Misc. bug fixes and cleanups [Florian, Jonas Å, Jordan, Ray; !131, !136, - !137, !140, !141, !144, !146, !145] - -Contributors: - Sergio Costas, Florian Müllner, Jordan Petridis, Thun Pin, Ray Strode, - Jonas Ådahl - -Translators: - Fabio Tomat [fur], Jordi Mas [ca] - -3.38.1 -====== - -Contributors: - Yacine Bouklif, Florian Müllner - -Translators: - Yacine Bouklif [kab], Cheng-Chia Tseng [zh_TW], Stas Solovey [ru], - Yosef Or Boczko [he] - -3.38.0 -====== - -Translators: - Balázs Meskó [hu], Alan Mortensen [da], Juliano Camargo [pt], Tim Sabsch [de], - Milo Casagrande [it], Rūdolfs Mazurs [lv] - -3.37.92 -======= - -Translators: - Nathan Follens [nl], Zander Brown [en_GB], Aurimas Černius [lt], - Marek Černocký [cs], Changwoo Ryu [ko], Dušan Kazik [sk] - -3.37.91 -======= - -Contributors: - Florian Müllner - -Translators: - Fran Dieguez [gl], Akarshan Biswas [bn_IN], Kukuh Syafaat [id], - Piotr Drąg [pl], Rafael Fontenelle [pt_BR], Jiri Grönroos [fi], - Марко Костић [sr], Goran Vidović [hr] - -3.37.90 -======= -* Misc. bug fixes and cleanups [Florian, Piotr; !126, !128] - -Contributors: - Piotr Drąg, Florian Müllner - -Translators: - Fabio Tomat [fur], Efstathios Iosifidis [el], Anders Jonsson [sv], - Asier Sarasua Garmendia [eu], Alexandre Franke [fr] - -3.37.3 -====== -* window-list, native-window-placement: Adjust to shell changes [Florian; !124] - -Contributors: - Florian Müllner - -Translators: - Jordi Mas [ca], sicklylife [ja], Boyuan Yang [zh_CN], - Baurzhan Muftakhidinov [kk] - -3.37.2 -====== -* window-list, auto-move: Modernize preference dialogs [Florian; !121] -* Adjust to gnome-shell changes [Florian; !122] - -Contributors: - Florian Müllner - -Translators: - Cheng-Chia Tseng [zh_TW], Yuri Chornoivan [uk], Daniel Mustieles [es], - Emin Tufan Çetin [tr], Danial Behzadi [fa], Daniel Șerbănescu [ro], - Matej Urbančič [sl] - -3.37.1 -====== -* drive-menu: Emphasize eject buttons [Florian; #223] -* user-theme: Add preference dialog [Florian; !117] -* window-list: Fix inconsistent state in preference dialog [Milan; !119] -* workspace-indicator: Overhaul preference dialog [Florian; !120] -* user-theme: Support session mode styles [Florian; !118] -* Misc. bug fixes and cleanups [Florian, Xiaoguang; !113, !106, !114, !116] - -Contributors: - Milan Crha, Florian Müllner, Xiaoguang Wang - -Translators: - Daniel Korostil [uk], Yosef Or Boczko [he], Kristjan SCHMIDT [eo], - Dz Chen [zh_CN], Danial Behzadi [fa], Yuri Chornoivan [uk], - Anders Jonsson [sv], Daniel Mustieles [es] - -3.36.0 -====== - -Contributors: - Florian Müllner - -3.35.91 -======= - -Contributors: - Florian Müllner - -Translators: - Zander Brown [en_GB] - -3.35.90 -======= -* Adjust to gnome-shell changes [Florian; !100, !101, !102] -* Force single-line window titles in window list [Florian; #202] -* Misc. bug fixes and cleanup [Florian; !104, !105] - -Contributors: - Florian Müllner - -Translators: - sicklylife [ja], Umarzuki Bin Mochlis Moktar [ms] - -3.35.3 -====== - -Translators: - Fran Dieguez [gl] - -3.35.2 -====== -* Adjust to gnome-shell changes [Marco, Florian; !89, !95, !96] -* window-list, workspace-indicator: Exclude DESKTOP windows from previews - [Florian; !93] -* screenshot-window-sizer: Fix cycling through all valid sizes [Willy; !97] - -Contributors: - Marco Trevisan (Treviño), Florian Müllner, Willy Stadnick - -3.34.1 -====== -* Adjust to gnome-settings-daemon plugin removals [Xiaoguang; !94] - -Contributors: - Florian Müllner, Xiaoguang Wang - -Translators: - Nathan Follens [nl], Dušan Kazik [sk], Ask Hjorth Larsen [da], - Yi-Jyun Pan [zh_TW] - -3.34.0 -====== - -Translators: - Rafael Fontenelle [pt_BR], Efstathios Iosifidis [el], Milo Casagrande [it], - Sabri Ünal [tr] - -3.33.92 -======= - -Translators: - Марко Костић [sr], Tim Sabsch [de], Rūdolfs Mazurs [lv], Matej Urbančič [sl], - Balázs Úr [hu], Claude Paroz [fr], Fran Dieguez [gl], Changwoo Ryu [ko], - Ryuta Fujii [ja], Fabio Tomat [fur], Goran Vidović [hr] - -3.33.91 -======= -* Misc. bug fixes and cleanups [Florian; !88, !90, !91, !92] - -Contributors: - Florian Müllner - -Translators: - Asier Sarasua Garmendia [eu], Anders Jonsson [sv], Marek Černocký [cs], - Kukuh Syafaat [id], Jiri Grönroos [fi], Florentina Mușat [ro], - Aurimas Černius [lt], Daniel Mustieles [es], Piotr Drąg [pl], Jordi Mas [ca], - Danial Behzadi [fa] -3.33.90 -======= -* window-list: Support showing windows from all workspaces [Florian; #154] -* Misc. bug fixes and cleanups [Florian; !86, !87] - -Contributors: - Florian Müllner - -Translators: - Jor Teron [mjw] - -3.33.4 -====== -* Make GNOME Classic more classic: - - Disable GNOME 3 overview [Florian; !69] - - Add window picker button to window list [Florian; !73, !80] - - Style improvements and fixes [Jakub; #169, !82] - - Support horizontal workspace layout in window list [Florian; !70] - - Add draggable previews to window list workspace switcher [Florian; !74] - - Arrange workspaces horizontally [Florian; !72] -* workspace-indicator: Support horizontal workspace layout [Florian; !71] -* workspace-indicator: Add draggable previews [Florian; !77] -* Misc. bug fixes and cleanups [Florian; !75, !76, !79, !78, #168, !84] - -Contributors: - Florian Müllner, Jakub Steiner, Jor Teron - -Translators: - Jor Teron [mjw] - -3.33.3 -====== -* Misc. bug fixes [Florian, Marco; !67, !68] - -Contributors: - Florian Müllner, Marco Trevisan (Treviño) - -3.33.2 -====== -* Misc. bug fixes and cleanups [Florian; !66] - -Contributors: - Florian Müllner - -3.33.1 -====== -* Misc. bug fixes [Florian; !64] - -Contributors: - Florian Müllner - -3.32.1 -====== -* Fix windowsNavigator extension after ES6 port [Florian; #143] -* screenshot-window-sizer: Add phone screenshot sizes [Adrien; !65] -* Misc. bug fixes and cleanups [Fabian; !62] - -Contributors: - Florian Müllner, Adrien Plazas, Fabian P. Schmidt - -3.32.0 -====== - -Contributors: - Florian Müllner - -Translations: - Victor Ibragimov [tg], Kristjan SCHMIDT [eo], Mart Raudsepp [et] - -3.31.92 -======= -* Misc. bug fixes and cleanups [Florian; !57, !58, !59, !60] - -Contributors: - Florian Müllner - -3.31.91 -======= -* apps-menu: Remove outdated legacy-tray handling [Florian; !53] -* user-theme: Allow using XDG user data dir [Tomasz; !55] -* Misc. bug fixes and cleanups [Florian; !52, !54, !56] - -Contributors: - Tomasz Gąsior, Florian Müllner - -Translators: - Matej Urbančič [sl], Gun Chleoc [gd] - -3.31.90 -======= -* Misc. bug fixes and cleanups [Florian; !49, !50, !51] - -Contributors: - Florian Müllner - -Translators: - Ryuta Fujii [ja], Charles Monzat [fr], Pieter Schalk Schoeman [af] - -3.31.2 -====== -* Remove obsolete alternate-tab extension [Florian; #786496] -* Adjust to gnome-shell changes [Florian; #113] - -Contributors: - Florian Müllner - -3.30.1 -====== -* apps-menu: Fix height on HiDPI systems [Florian; #102] -* window-list: Only switch between windows on active workspace when scrolling - [Florian; #78] - -Contributors: - Florian Müllner - -3.30.0 -====== -* Bump version - -3.29.91 -======= -* Misc. bug fixes [Florian; #90] - -Contributors: - Florian Müllner - -3.29.90 -======= -* Misc. bug fixes [Florian; #786496] - -Contributors: - Florian Müllner - -3.29.3 -====== -* Adjust to global.screen removal [Jonas; #759538] - -Contributors: - Jonas Ådahl, Florian Müllner - -3.29.2 -====== -* Misc. bug fixes [Florian; #69] - -Contributors: - Florian Müllner - -3.28.1 -====== -* Misc. bug fixes [Xiaoguang, Florian; #59, #62] - -Contributors: - Florian Müllner, Xiaoguang Wang - -Translators: - Dz Chen [zh_CN] - -3.28.0 -====== - -Contributors: - Florian Müllner, Xiaoguang Wang - -Translators: - Aman Alam [pa], Bruce Cowan [en_GB] - -3.27.92 -======= - -Contributors: - Florian Müllner - -Translators: - Piotr Drąg [es], GNOME Translation Robot [gd], Daniel Șerbănescu [ro] - -3.27.91 -======= -* places-menu: Support unmounting ejectable places [Rémy; #17] -* apps-menu: Support separators and custom sort order [Florian; #27] -* Port to meson [Florian; #31, #45] -* window-list: Fix missing icons on wayland [Florian; #10] -* places-menu: Fix terminating gnome-shell with recent gjs [Florian; #44] -* auto-move: Make it work with wayland windows [Florian; #33] -* Classic theme fixes [Florian, Jonas; #26, #41, #39, #40] -* Require sassc for classic styling [Florian; !28] -* Misc. bug fixes [Piotr, Florian; #772211, #32, #30] - -Contributors: - Jeremy Bicha, Piotr Drąg, Jonas Kümmerlin, Rémy Lefevre, Iñigo Martínez, - Florian Müllner - -Translators: - Matej Urbančič [sl], Kjartan Maraas [nb] - -3.27.1 -====== -* updated translations (ca@valencia) - -3.26.1 -====== -* native-window-placement: Adjust to gnome-shell changes -* updated translations: el, fa, ru, sv - -3.26.0 -====== -* updated translations (be, bg, ca, da, eu, fi, is, it, ko, lv, ml, - nl, pt_BR, vi, zh_TW) - -3.25.91 -======= -* updated translations (ca, fr, it, pl, pt_BR, sr, sr@latin, tr) - -3.25.90 -======= -* updated translations (es, gl, hr, hu, kk, sl, sv, sv) - -3.25.4 -====== -* screenshot-window-sizer: Fix backward cycling -* updated translations (ar, be, ca, cs, de, fur, id, lt, pl, sk) - -3.25.3 -====== -* places-menu: Use mount operation if necessary -* window-list: Respect MWM hints -* updated translations (es, fur, kk) - -3.25.2 -====== -* places-menu: Make URI launching asynchronous -* updated translations (de, fur, hr, hu, id, sl) - -3.25.1 -====== -* apps-menu: Mark copied launchers as trusted -* places-menu: Make icon lookup asynchronous -* updated translations (hr) - -3.24.1 -====== -* apps-menu: Allow creating desktop launchers via DND -* updated translations (el, vi) - -3.24.0 -====== -* updated translations (lv, tr) - -3.23.92 -======= -* update classic theme -* updated translations (be, ko, ca, da, cs, ru, lt) - -3.23.91 -======= -* updated translations (de, es, eu, fi, fr, fur, gl, hu, id, it, kk, nb, pl, pt_BR, - sk, sr, sr@latin, sv, uk, zh_TW) - -3.23.90 -======= -* window-list: Improve styling -* window-list: Hide workspace indicator when there's a single (static) workspace -* new translation (be) - -3.23.2 -====== -* alternateTab: Don't take over 'switch-group' shortcut -* updated translations (zh_CN) - -3.22.1 -====== -* window-list: Update icon on app changes - -3.22.0 -====== -* updated translations (en_GB) - -3.21.92 -======= -* update style -* updated translations (pl, vi) - -3.21.91 -======= -* updated translations (pl) - -3.21.90 -======= -* updated translations (es, gu) - -3.21.4 -====== -* apps-menu: Fix entries from non-standard AppDir directories - -3.21.3 -====== -* adjust to gnome-shell changes -* updated translations (oc) - -3.21.2 -====== -* version bump, nothing to see here - -3.20.1 -====== -* update classic style -* updated translations (gd, oc) - -3.20.0 -====== -* version bump, nothing to see here - -3.19.92 -======= -* version bump, nothing to see here - -3.19.91 -======= -* updated translations (oc) - -3.19.90 -======= -* version bump, nothing to see here - -3.19.4 -====== -* screenshot-window-sizer: HiDPI support -* Fix gnome-shell component in classic session -* updated translations (lt) - -3.19.3 -====== -* native-window-placement: Don't let border overlap title -* apps-menu: Fix handling of .desktop files in subdirectories -* updated translations (is) - -3.19.2 -====== -* updated translations (gd) - -3.19.1 -====== -* Fix some theme issues - -3.18.1 -====== -* window-list: Fix accessibility of window buttons -* apps-menu: Fix unreliable highlight -* updated translations (ar) - -3.18.0 -====== -* Bump version - -3.17.92 -======= -* places: Include DESKTOP when desktop icons are enabled -* updated translations (fa) - -3.17.91 -======= -* updated translations (nl, pl, zh_TW) - -3.17.90 -======= -* window-list: Improve application ordering -* workspace-indicator: Use consistent workspace numbering - -3.17.4 -====== -* updated translations (fur) - -3.17.3 -====== -* window-list: Adjust with text-scaling-factor -* classic style updates -* updated translations (pt, ro) - -3.17.2 -====== -* updated translations (oc, pt, zh_CN) - -3.17.1 -====== -* style updates -* updated translations (oc) - -3.16.1 -====== -* window-list: Fix workspace indicators popup menu position -* apps-menu: Fix taking over panel-main-menu shortcut -* updated translations (et, ja, lv) - -3.16.0 -====== -* updated translations (ca) - -3.15.92 -======= -* classic: Update theme -* update for mutter API changes -* updated translations (bg, bs, da, fi, pa, ru, sr, sr@latin, tg) - -3.15.91 -======= -* classic: Update theme -* systemMonitor extension was removed, as the message tray where it - put its indicator no longer exists -* window-list: Adjust for gnome-shell changes -* updated translations (gl, it, kk, ko, lt, pl, sk, uk, zh_TW) - -3.15.90 -======= -* classic: Visual refresh based on new shell theme -* window-list: Adjust for gnome-shell changes -* updated translations (an, el, eo, eu, fr, he, is, sv, tr) - -3.15.4 -====== -* window-list: Improve interaction with system modal dialogs -* updated translations (cs, de, es, eu, fur, hu, id, nb, pt_BR, ru, sl, vi) - -3.15.3.1 -======== -* adjust to gnome-shell change - -3.15.3 -====== -* classic-mode: Add high-contrast theme variant, drop .desktop file -* places-menu: Fix error when XDG user directories are not set up -* window-list: Add option to show on all monitors -* updated translations (eu, hu, kk, ro, tr) - -3.15.2 -====== -* removable-drive, user-theme, window-list: Update for gnome-shell changes -* apps-menu: Fix some visual glitches -* Fix classic mode style -* updated translations (an, cs, he, vi) - -3.15.1 -====== - * updated translations (es, nb) - -3.14.1 -====== - * alternateTab: Fix dismissing popup with Escape - * some improvements to the window-list - (spacing in app buttons, no flash when closing windows with auto-grouping) - * updated translations (lv, it, pt, bg) - -3.14.0 -====== - * updated translations (bn_IN, hi, kn, sr, sr@latin, uk) - -3.13.92 -======= -* new extension: screenshot-window-sizer -* window-list: Don't add sticky windows more than once -* updated translations (da, de, fi, ko, mr, ms, ne, pa, pl, sk, sv, ta, te, tr) - -3.13.91 -======= -* window-list: restore fitts'ability of workspace button -* updated for gnome-shell changes -* updated translations (cs, kk, fr, or, fa, ja, gu, id) - -3.13.90 -======= -* updated translations (as, ca, eu, nl, zh_CN, zh_HK, zh_TW) - -3.13.4 -====== -* Updated for gnome-shell changes -* updated translations (el, gl, ru) - -3.13.3 -====== -* Tweak preference UIs some more -* Fix classic mode schema overrides -* updated translations (es, he, hu, lt, nb, pt_BR, sl, tr) - -3.13.2 -====== -* Fix sorting of grouped buttons in window list -* Tweak preference UIs -* updated translations (en_GB) - -3.13.1 -====== -* add DesktopNames key to the classic session file -* classic theme: remove rounded corners from tile previews -* window-list: don't shift message tray on other monitors -* auto-move-windows: several fixes and updates for api changes -* launch-new-instances: updates for api changes -* updated translations (ja, km) - -3.12.0 -====== -* updated translations (zh_HK, zh_TW) - -3.11.92 -======= -* nothing to see here, move on - -3.11.91 -======= -* updated translations (ko, fur) - -3.11.90 -======= -* several fixes and improvements to the window-list - (can be scrolled, works correctly with the OSD - keyboard, filters skip-taskbar windows, does not - force all notifications to bold) -* drive-menu fixed not to show shadowed mounts -* updates for gnome-shell changes (launch-new-instance, - auto-move-windows, places-menu) -* build system fixes for systems without /bin/bash -* updated translations (or, tr, uk) - -3.11.5 -====== -* updates for gnome-shell changes -* updated translations (kn) - -3.11.4 -====== -* classic mode now supports session saving -* updates for gnome-shell changes -* updated translations (ar, kn) - -3.11.3 -====== -* workspace-indicator is vertically aligned now -* updated translations (ar, eo, ta, te) - -3.11.2 -====== -* updated translations (zh_CN) - -3.11.1 -====== -* ignore shadowed mounts in drive-menu extension -* updates for gnome-shell/gjs changes -* updated translations (el, th) - -3.10.1 -====== -* updated translations (af, ca, ca@valencia, de, et, eu, fa, - hu, lt, lv, nb, nl, pa, pt, sk, sr, sr@latin, tr) - -3.10.0 -====== -* updated translations (as, cs, da, es, et, fi, fr, gl, - he, id, it, kk, lt, lv, pa, pl, pt, pt_BR, ru, sl, tg, - uk, zh_HK, zh_TW) - -3.9.92 -====== -* more updates and fixes for gnome-shell master changes - and regressions (systemMonitor, window-list, apps-menu) -* lots of updated translations (ar, as, cs, da, de, el, es, - eu, fi, gl, he, hu, it, ja, kk, ko, lv, nb, nl, pa, pl, - pt_BR, ru, sk, sr, sr@latin, ta, tg) - -3.9.91 -====== -* update the classic mode session and theme to work with the - new system menu -* the usual round of updates and fixes for gnome-shell - API changes -* updated translations (de, it, lt, nl, pl, pt_BR, sk, - zh_HK, zh_TW) - -3.9.90 -====== -* xrandr-indicator was removed, as the implementation - was incompatible with the new DisplayConfig mutter API -* various extensions were updated for the 3.9.90 gnome-shell API -* updated translations (cs, es, fur, gl, he, hu, id, ja, sl, tg, - zh_CN, zh_HK, zh_TW) - -3.9.5 -===== -* alternative-status-menu was removed entirely, as - it does not fit in the designs of the new unified - status menu -* updated translations (as, gu, it, ru) - -3.9.4 -===== -* apps-menu: fixed handling of hot corner in case - of screen reconfiguration -* alternative-status-menu now correctly honors polkit - for hibernation -* user-menu now loads themes from $XDG_DATA_HOME too -* translation updates (de, id, pt_BR, vi, zh_CN, ml) - -3.9.3 -===== -* classic mode mini extensions were replaced with a - GSettings override specified in the .json file -* styling of classic mode improved -* native-window-placement is back working on 3.9 -* misc bug fixes -* traslation updates (an, cs, el, es, gl, nb, pl, sk, tg) - -3.9.2 -===== -* apps-menu: appearance of the scrollbars was improved -* window-list is a little taller in classic mode (to account - for the workspace switcher) -* alternative-status-menu honors again the dconf configuration -* translation updates (sr) - -3.9.1 -===== -* updates to window-list, xrandr-indicator, - workspace-indicator, windowsNavigator for gnome-shell - changes -* translation updates (cs, es, lt, pl, pt_BR, sl) - -3.8.1 -===== -* many improvements to window-list: - - windows are activated by DND over them - - window buttons now have the right size, - even if the text is smaller or larger - than the ideal - - window buttons can be grouped automatically - when the panel becomes crowded - - added a workspace switcher menu -* added keyboard navigation to apps-menu -* small tweaks to classic-mode theme, in particular - for menus -* translation updates (gl, ko, sr) - -3.8.0 -===== -* translation updates (hu, ja, fi, it) - -3.7.92 -====== -* misc bug fixes to app-menu and window-list -* translation updates (de, sl, pt_BR, ru) - -3.7.91 -====== -* various updates for shell changes -* update window-list to always use application icons -* update apps-menu to not load subdirectories as - separate categories -* translation updates (lt, zh_CN) - -3.7.90 -====== -* various fixes to make places-menu behave more - like Nautilus, including showing the machine - name in place of File System -* various updates for shell changes -* alternative-status-menu no longer supports - ConsoleKit systems, you need to install logind - to have suspend or hibernate -* translation updates (es, cz, pl, sr) - -3.7.5.1 -======= -* new extension forgotten in previous NEWS entry: - windows-list -* also forgotten previously: classic mode got a new - GNOME2 style -* build fixes - -3.7.5 -===== -* places-menu is back in the classic extensions, with - a new old GNOME-2 look -* classic mode moved the date menu to right, where we - all know it rightly belongs -* apps-menu received a face-lift, with the inclusion - of a reduced form of AxeMenu -* new extension in the classic set: launch-new-instance, - which modifies the behavior of clicking in the dash - and app launcher -* alternate-tab, native-window-placement and windowsNavigator - updated for gnome-shell changes -* translation updates (es, cz, pl) - -3.7.4 -===== -* a separate configure switch has been added to enable - classic mode session definitions -* places-menu is no longer part of the classic-mode - extension set -* updated translations (ar, gl, hu, lt, pt_BR, sr) - -3.7.3 -===== -* new extensions: default-min-max, static-workspaces -* alternate-tab now uses the built-in window switcher and just - takes over the switch-application keybinding -* workspace-indicator: is no longer part of classic-mode -* we now install classic-mode data files for gdm, gnome-session - and gnome-shell, so if you enable classic-mode you get a new - session option in GDM -* updated translations (ar, es, pl, ru, sl, zh_HK, zh_TW) - -3.7.2 -===== -* fixed crashes with places-menu, windowsNavigator, alternate-tab - and native-window-placement -* alternate-tab now hides attached modal dialogs -* places-menu has restored support for Nautilus 3.4 -* the default for hibernate is now to show in alternative-status-menu -* some extensions are now tagged as "classic", and can be chosen with - --enable-extensions=classic-mode -* dock and gajim were removed at the beginning of the 3.7.1 cycle, - as they were buggy and unmaintained -* updated translations (ar, cs, de, el, es, gl, id, lt, lv, pa, pl - ru, sk, sl, sr, sr@latin) - -3.6.1 -===== -* fixed alternative-status-menu for the new lock screen -* squashed some alternate-tab warnings -* drive-menu now works with 3.6 again -* updated translations (ar, cs, el, es, gl, id, lv, pl, sl) - -3.6.0 -===== -* major rework in places menu, to make it work without - removed supporting code in the shell and to make it look like - the nautilus sidebar - (similar work would be needed for drive-menu, not done yet) -* updated translations (ca, cs, de, el, en_GB, es, fi, hu, id, lt, - pl, pt_BR, ru, sl, sr) - -3.5.91 -====== -* various crashers were fixed in alternative-tab -* auto-move-windows now can be made to work with static workspaces -* place-menu is now on the left and uses symbolic icons like Files -* StIconType usage was removed from all extensions, after it was - removed in core -* systemMonitor, xrandr-indicator, apps-menu, places-menu, - alternative-status-menu were updated for the newer shell -* updated translations (es, gl, it, pl, sl) - -3.5.90 -====== -* alternate-tab has been reworked again, the old mode switch - was removed and the all&thumbnails code extended to handle - icons and filtering to the workspace -* alternate-tab thumbnails now reflect the aspect ratio of the windows -* systemMonitor now shows a tooltip above the indicator -* native-window-placement, systemMonitor and windowsNavigator have been updated - for the newer shell -* updated translations (es, pa) - -3.5.5 -===== -* convenience module has been relicensed to BSD, - for compatibility with GPLv3 extensions -* alternate-tab has been refactored and seen various - improvements to all&thumbnails mode, including a new - overlaid application icon -* updated translations (lt, id, sr) - -3.5.4 -===== -* updated translations (de, es, ar, sl, lv, zh_CN) - -3.5.2 -===== -* removable-drive-menu is now a11y friendly -* the dock can now be placed on any monitor, not just the primary -* dock is now clipped to its monitor -* alternative-status-menu now exposes GSettings for Suspend - and Hibernate visibility - no UI yet -* more gnome-shell API changes (places-menu, removable-drive-menu, - alternative-status-menu) -* miscellaneous bug fixes (native-window-placement, gajim, - auto-move-windows) -* updated translations - -3.4.0 -===== -* build system improvements -* updated translations (ar, cs, fr) - -3.3.92 -====== -* various updates for gnome-shell API changes (dock, - native-window-placement) -* local-install is now a make rule, not a shell script -* updated translations (zh, es, sw, ga, hu, it, no, pt_BR, de, sl, - pl, la, fi, sr) - -3.3.90 -====== -* system wide installation via "make install" is possible - again -* alternate-tab can now pre-activate the selected window -* auto-move-windows, workspace-indicator and example gained - new preference dialogs -* workspace-indicator: fixed a bug wrt focus stealing prevention -* updated translations (es, pt_BR, it, sl, gl, sr) - -3.3.5 -===== -* improvements to the build system and convenience module, - making it easier for other extensions to use, and bringing - it up to date with gnome-shell changes -* all extensions were ported to the Lang.Class framework - (except xrandr-indicator, which is pending GDBus merge) -* alternate-tab and dock were slightly refactored to clean up - some old code - -3.3.4 -===== -* improved styling of windowsNavigator tooltips -* fixed windowsNavigator when used with the numeric keypad -* fixed native-window-placement with custom button layout -* updated translations (pt_BR, cz) - -3.3.3 -===== -* windowsNavigator was fixed to work with azerty keyboards -* drive-menu was changed to use media-eject icon instead of media-optical -* dock: the default value of hide-effect is now move -* dock: if autohide is disabled, now it pushes maximized windows aside -* dock was updated to match current core shell styling -* native-window-placement: position stategy setting was removed -* alternative-status-menu no longer conflicts with other extensions - in the user menu -* various other minor bug fixes -* updated translations (zh, uk, es, it, cz, sl, sk, fi) - -3.3.2 -===== -* all extensions are now self-contained, including l10n and settings -* introduce a convenience module that can be shared among all extensions -* you can know build an installable zip file with make zip-file -* apps-menu no longer shows NoDisplay apps -* alternative-status-menu, alternate-tab: fix for master shell - -3.2.1 -===== -* dock: added "move" hide effect -* systemMonitor: now it enables/disables properly -* systemMonitor: improved styling -* alternate-tab: both modes now work with gnome-shell 3.2 -* various other bug fixes -* updated translations - -3.2.0 -===== - -* various: update for gnome-shell API changes - -3.1.91 -====== - -* gajim: update for gnome-shell API changes - -3.1.90 -====== - -* All extensions have been ported to the new extension - system (including live enable/disable) -* Updated translations -* xrandr-indicator no longer requires a specific gjs version -* windowsNavigator fixed for more than 2 workspaces - -3.1.4 -===== - -* New extension: a menu for changing workspace (workspace-indicator) -* systemMonitor: lower the requirement on libgtop -* auto-move-windows: open overview when last window on - last workspace is closed -* dock: implement autohiding, with various configurable - effects -* alternate-tab: more configurable implementations available -* native-window-placement: don't rearrange the windows when - the workspace switcher is shown/hidden -* update for gnome-shell 3.1.4 API changes - -3.1.3 -===== - -* New extension: a menu for removable drives (drive-menu -* New extensions: GNOME 2 like menus for apps and places - (apps-menu, places-menu) -* New extension: additional configurability for the window - layout in the overview, including a mechanism similar to - KDE4 (native-window-placement) -* New extension: a message tray indicator for CPU and memory - usage (uses libgtop) (systemMonitor) -* user-theme: fixed resetting theme -* user-theme: support themes installed in /usr/share/themes -* alternative-status-menu: ported to gnome-shell master -* dock: ported to gnome-shell master -* dock: make position configurable (can be left or right) -* Updated translations - -3.0.2 -===== - -* Updated translations. -* Fixed bug #647386 (reverting of user-theme to default) -* Fixed bug #647599 (support globally installed themes) -* Added license and README diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/extension.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/extension.js deleted file mode 100644 index 1431878b..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/extension.js +++ /dev/null @@ -1,152 +0,0 @@ -// SPDX-FileCopyrightText: 2011 Vamsi Krishna Brahmajosyula <vamsikrishna.brahmajosyula@gmail.com> -// SPDX-FileCopyrightText: 2011 Giovanni Campagna <gcampagna@src.gnome.org> -// SPDX-FileCopyrightText: 2013 Florian Müllner <fmuellner@gnome.org> -// SPDX-FileCopyrightText: 2016 Rémy Lefevre <lefevreremy@gmail.com> -// -// SPDX-License-Identifier: GPL-2.0-or-later - -/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ -import Clutter from 'gi://Clutter'; -import GObject from 'gi://GObject'; -import St from 'gi://St'; - -import {Extension, gettext as _} from 'resource:///org/gnome/shell/extensions/extension.js'; - -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import * as PanelMenu from 'resource:///org/gnome/shell/ui/panelMenu.js'; -import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js'; - -import {PlacesManager} from './placeDisplay.js'; - -const N_ = x => x; - -const PLACE_ICON_SIZE = 16; - -class PlaceMenuItem extends PopupMenu.PopupBaseMenuItem { - static { - GObject.registerClass(this); - } - - constructor(info) { - super({ - style_class: 'place-menu-item', - }); - this._info = info; - - this._icon = new St.Icon({ - gicon: info.icon, - icon_size: PLACE_ICON_SIZE, - }); - this.add_child(this._icon); - - this._label = new St.Label({ - text: info.name, - x_expand: true, - y_align: Clutter.ActorAlign.CENTER, - }); - this.add_child(this._label); - - if (info.isRemovable()) { - this._ejectIcon = new St.Icon({ - icon_name: 'media-eject-symbolic', - style_class: 'popup-menu-icon', - }); - this._ejectButton = new St.Button({ - child: this._ejectIcon, - style_class: 'button', - }); - this._ejectButton.connect('clicked', info.eject.bind(info)); - this.add_child(this._ejectButton); - } - - info.connectObject('changed', - this._propertiesChanged.bind(this), this); - } - - activate(event) { - this._info.launch(event.get_time()); - - super.activate(event); - } - - _propertiesChanged(info) { - this._icon.gicon = info.icon; - this._label.text = info.name; - } -} - -const SECTIONS = [ - 'special', - 'devices', - 'bookmarks', - 'network', -]; - -class PlacesMenu extends PanelMenu.Button { - static { - GObject.registerClass(this); - } - - constructor() { - super(0.5, _('Places')); - - let label = new St.Label({ - text: _('Places'), - y_expand: true, - y_align: Clutter.ActorAlign.CENTER, - }); - this.add_child(label); - - this.placesManager = new PlacesManager(); - - this._sections = { }; - - for (let i = 0; i < SECTIONS.length; i++) { - let id = SECTIONS[i]; - this._sections[id] = new PopupMenu.PopupMenuSection(); - this.placesManager.connect(`${id}-updated`, () => { - this._redisplay(id); - }); - - this._create(id); - this.menu.addMenuItem(this._sections[id]); - this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); - } - } - - _onDestroy() { - this.placesManager.destroy(); - - super._onDestroy(); - } - - _redisplay(id) { - this._sections[id].removeAll(); - this._create(id); - } - - _create(id) { - let places = this.placesManager.get(id); - - for (let i = 0; i < places.length; i++) - this._sections[id].addMenuItem(new PlaceMenuItem(places[i])); - - this._sections[id].actor.visible = places.length > 0; - } -} - -export default class PlacesMenuExtension extends Extension { - enable() { - this._indicator = new PlacesMenu(); - - let pos = Main.sessionMode.panel.left.length; - if ('apps-menu' in Main.panel.statusArea) - pos++; - Main.panel.addToStatusArea('places-menu', this._indicator, pos, 'left'); - } - - disable() { - this._indicator.destroy(); - delete this._indicator; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ab/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ab/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 72dd7809..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ab/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/af/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/af/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 8df130b1..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/af/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/an/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/an/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index f1966c09..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/an/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ar/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ar/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 1504827c..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ar/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/as/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/as/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 103ee4fc..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/as/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/be/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/be/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 70e79ec4..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/be/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/bg/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/bg/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 58fff19a..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/bg/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/bn_IN/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/bn_IN/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index ad967339..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/bn_IN/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/bs/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/bs/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 6762b9a0..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/bs/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ca/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ca/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 3f91ae8d..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ca/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ca@valencia/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ca@valencia/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index ec53ac34..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ca@valencia/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/cs/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/cs/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index d4abcb5c..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/cs/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/da/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/da/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index aa7bfc36..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/da/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/de/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/de/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 6d428b3e..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/de/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/el/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/el/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 94a3088e..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/el/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/en_GB/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/en_GB/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 6c0bdf76..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/en_GB/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/eo/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/eo/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index dc17d0e4..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/eo/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/es/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/es/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 627e131b..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/es/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/et/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/et/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 5d3acdf1..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/et/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/eu/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/eu/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 7ea42924..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/eu/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/fa/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/fa/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index afc6fbdc..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/fa/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/fi/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/fi/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index e1282ec2..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/fi/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/fr/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/fr/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 75e20f2b..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/fr/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/fur/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/fur/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index b07469b5..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/fur/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/gd/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/gd/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 278ecb75..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/gd/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/gl/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/gl/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 9988bda1..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/gl/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/gu/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/gu/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 352f3ec7..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/gu/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/he/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/he/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index fdac4596..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/he/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/hi/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/hi/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 5fde217f..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/hi/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/hr/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/hr/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 6bd83123..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/hr/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/hu/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/hu/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 72e59b82..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/hu/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/id/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/id/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 0f39dc93..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/id/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/is/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/is/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 6b0cdb82..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/is/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/it/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/it/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 9a58492f..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/it/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ja/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ja/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 2a895995..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ja/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ka/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ka/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index d3ca3887..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ka/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/kab/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/kab/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 50e3d3ef..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/kab/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/kk/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/kk/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 99958843..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/kk/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/km/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/km/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index c0ce4976..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/km/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/kn/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/kn/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index a7cd0bfe..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/kn/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ko/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ko/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index abe5d13c..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ko/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/lt/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/lt/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 77ed2e98..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/lt/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/lv/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/lv/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index fc3478f7..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/lv/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/mjw/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/mjw/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 398469b0..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/mjw/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ml/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ml/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index d3e6d6b6..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ml/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/mr/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/mr/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index deb7e645..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/mr/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ms/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ms/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 8b713749..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ms/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/nb/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/nb/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 03d4fd5d..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/nb/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ne/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ne/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index ae79bcad..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ne/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/nl/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/nl/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 2cf6641e..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/nl/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/oc/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/oc/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 6f7f771d..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/oc/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/or/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/or/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index efd54bb9..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/or/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/pa/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/pa/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 819a3438..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/pa/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/pl/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/pl/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index b43077c9..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/pl/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/pt/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/pt/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index b8d11e52..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/pt/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/pt_BR/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/pt_BR/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 9dc76b23..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/pt_BR/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ro/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ro/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 7b196533..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ro/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ru/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ru/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 513ee1cc..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ru/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/sk/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/sk/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 994b6a75..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/sk/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/sl/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/sl/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 873d92ee..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/sl/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/sr/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/sr/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 651348d1..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/sr/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/sr@latin/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/sr@latin/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index d8496769..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/sr@latin/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/sv/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/sv/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index ee7b5a6e..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/sv/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ta/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ta/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 4c9af822..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/ta/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/te/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/te/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 2d245ab5..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/te/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/tg/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/tg/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 3fe68661..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/tg/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/th/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/th/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 34c2d934..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/th/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/tr/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/tr/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 92fd2ed5..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/tr/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/uk/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/uk/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 00afbaef..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/uk/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/vi/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/vi/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 76c8af38..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/vi/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/zh_CN/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/zh_CN/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index d0763b15..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/zh_CN/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/zh_HK/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/zh_HK/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 51bc4bfa..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/zh_HK/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/zh_TW/LC_MESSAGES/gnome-shell-extension-places-menu.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/zh_TW/LC_MESSAGES/gnome-shell-extension-places-menu.mo deleted file mode 100644 index 1b0f512a..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/locale/zh_TW/LC_MESSAGES/gnome-shell-extension-places-menu.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/placeDisplay.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/placeDisplay.js deleted file mode 100644 index 930f92c6..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/placeDisplay.js +++ /dev/null @@ -1,542 +0,0 @@ -// SPDX-FileCopyrightText: 2012 Giovanni Campagna <gcampagna@src.gnome.org> -// SPDX-FileCopyrightText: 2013 Debarshi Ray <debarshir@gnome.org> -// SPDX-FileCopyrightText: 2015 Florian Müllner <fmuellner@gnome.org> -// SPDX-FileCopyrightText: 2016 Rémy Lefevre <lefevreremy@gmail.com> -// SPDX-FileCopyrightText: 2017 Christian Kellner <christian@kellner.me> -// -// SPDX-License-Identifier: GPL-2.0-or-later - -// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import Shell from 'gi://Shell'; -import {EventEmitter} from 'resource:///org/gnome/shell/misc/signals.js'; - -import {gettext as _} from 'resource:///org/gnome/shell/extensions/extension.js'; - -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import * as ShellMountOperation from 'resource:///org/gnome/shell/ui/shellMountOperation.js'; - -const N_ = x => x; - -Gio._promisify(Gio.AppInfo, 'launch_default_for_uri_async'); -Gio._promisify(Gio.File.prototype, 'mount_enclosing_volume'); - -const BACKGROUND_SCHEMA = 'org.gnome.desktop.background'; - -const Hostname1Iface = '<node> \ -<interface name="org.freedesktop.hostname1"> \ -<property name="PrettyHostname" type="s" access="read" /> \ -</interface> \ -</node>'; -const Hostname1 = Gio.DBusProxy.makeProxyWrapper(Hostname1Iface); - -class PlaceInfo extends EventEmitter { - constructor(...params) { - super(); - - this._init(...params); - } - - _init(kind, file, name, icon) { - this.kind = kind; - this.file = file; - this.name = name || this._getFileName(); - this.icon = icon ? new Gio.ThemedIcon({name: icon}) : this.getIcon(); - } - - destroy() { - } - - isRemovable() { - return false; - } - - async _ensureMountAndLaunch(context, tryMount) { - try { - await Gio.AppInfo.launch_default_for_uri_async(this.file.get_uri(), context, null); - } catch (err) { - if (!err.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_MOUNTED)) { - Main.notifyError(_('Failed to launch “%s”').format(this.name), err.message); - return; - } - - let source = { - get_icon: () => this.icon, - }; - let op = new ShellMountOperation.ShellMountOperation(source); - try { - await this.file.mount_enclosing_volume(0, op.mountOp, null); - - if (tryMount) - this._ensureMountAndLaunch(context, false); - } catch (e) { - if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.FAILED_HANDLED)) - Main.notifyError(_('Failed to mount volume for “%s”').format(this.name), e.message); - } finally { - op.close(); - } - } - } - - launch(timestamp) { - let launchContext = global.create_app_launch_context(timestamp, -1); - this._ensureMountAndLaunch(launchContext, true); - } - - getIcon() { - this.file.query_info_async('standard::symbolic-icon', - Gio.FileQueryInfoFlags.NONE, - 0, - null, - (file, result) => { - try { - let info = file.query_info_finish(result); - this.icon = info.get_symbolic_icon(); - this.emit('changed'); - } catch (e) { - if (e instanceof Gio.IOErrorEnum) - return; - throw e; - } - }); - - // return a generic icon for this kind for now, until we have the - // icon from the query info above - switch (this.kind) { - case 'network': - return new Gio.ThemedIcon({name: 'folder-remote-symbolic'}); - case 'devices': - return new Gio.ThemedIcon({name: 'drive-harddisk-symbolic'}); - case 'special': - case 'bookmarks': - default: - if (!this.file.is_native()) - return new Gio.ThemedIcon({name: 'folder-remote-symbolic'}); - else - return new Gio.ThemedIcon({name: 'folder-symbolic'}); - } - } - - _getFileName() { - try { - let info = this.file.query_info('standard::display-name', 0, null); - return info.get_display_name(); - } catch (e) { - if (e instanceof Gio.IOErrorEnum) - return this.file.get_basename(); - throw e; - } - } -} - -class RootInfo extends PlaceInfo { - _init() { - super._init('devices', Gio.File.new_for_path('/'), _('Computer')); - - let busName = 'org.freedesktop.hostname1'; - let objPath = '/org/freedesktop/hostname1'; - new Hostname1(Gio.DBus.system, busName, objPath, (obj, error) => { - if (error) - return; - - this._proxy = obj; - this._proxy.connectObject('g-properties-changed', - this._propertiesChanged.bind(this), this); - this._propertiesChanged(obj); - }); - } - - getIcon() { - return new Gio.ThemedIcon({name: 'drive-harddisk-symbolic'}); - } - - _propertiesChanged(proxy) { - // GDBusProxy will emit a g-properties-changed when hostname1 goes down - // ignore it - if (proxy.g_name_owner) { - this.name = proxy.PrettyHostname || _('Computer'); - this.emit('changed'); - } - } - - destroy() { - this._proxy?.disconnectObject(this); - this._proxy = null; - super.destroy(); - } -} - - -class PlaceDeviceInfo extends PlaceInfo { - _init(kind, mount) { - this._mount = mount; - super._init(kind, mount.get_root(), mount.get_name()); - } - - getIcon() { - return this._mount.get_symbolic_icon(); - } - - isRemovable() { - return this._mount.can_eject() || this._mount.can_unmount(); - } - - eject() { - let unmountArgs = [ - Gio.MountUnmountFlags.NONE, - new ShellMountOperation.ShellMountOperation(this._mount).mountOp, - null, // Gio.Cancellable - ]; - - if (this._mount.can_eject()) { - this._mount.eject_with_operation(...unmountArgs, - this._ejectFinish.bind(this)); - } else { - this._mount.unmount_with_operation(...unmountArgs, - this._unmountFinish.bind(this)); - } - } - - _ejectFinish(mount, result) { - try { - mount.eject_with_operation_finish(result); - } catch (e) { - this._reportFailure(e); - } - } - - _unmountFinish(mount, result) { - try { - mount.unmount_with_operation_finish(result); - } catch (e) { - this._reportFailure(e); - } - } - - _reportFailure(exception) { - let msg = _('Ejecting drive “%s” failed:').format(this._mount.get_name()); - Main.notifyError(msg, exception.message); - } -} - -class PlaceVolumeInfo extends PlaceInfo { - _init(kind, volume) { - this._volume = volume; - super._init(kind, volume.get_activation_root(), volume.get_name()); - } - - launch(timestamp) { - if (this.file) { - super.launch(timestamp); - return; - } - - this._volume.mount(0, null, null, (volume, result) => { - volume.mount_finish(result); - - let mount = volume.get_mount(); - this.file = mount.get_root(); - super.launch(timestamp); - }); - } - - getIcon() { - return this._volume.get_symbolic_icon(); - } -} - -const DEFAULT_DIRECTORIES = [ - GLib.UserDirectory.DIRECTORY_DOCUMENTS, - GLib.UserDirectory.DIRECTORY_PICTURES, - GLib.UserDirectory.DIRECTORY_MUSIC, - GLib.UserDirectory.DIRECTORY_DOWNLOAD, - GLib.UserDirectory.DIRECTORY_VIDEOS, -]; - -export class PlacesManager extends EventEmitter { - constructor() { - super(); - - this._places = { - special: [], - devices: [], - bookmarks: [], - network: [], - }; - - this._settings = new Gio.Settings({schema_id: BACKGROUND_SCHEMA}); - this._settings.connectObject('changed::show-desktop-icons', - () => this._updateSpecials(), this); - this._updateSpecials(); - - /* - * Show devices, code more or less ported from nautilus-places-sidebar.c - */ - this._volumeMonitor = Gio.VolumeMonitor.get(); - this._volumeMonitor.connectObject( - 'volume-added', () => this._updateMounts(), - 'volume-removed', () => this._updateMounts(), - 'volume-changed', () => this._updateMounts(), - 'mount-added', () => this._updateMounts(), - 'mount-removed', () => this._updateMounts(), - 'mount-changed', () => this._updateMounts(), - 'drive-connected', () => this._updateMounts(), - 'drive-disconnected', () => this._updateMounts(), - 'drive-changed', () => this._updateMounts(), - this); - this._updateMounts(); - - this._bookmarksFile = this._findBookmarksFile(); - this._bookmarkTimeoutId = 0; - this._monitor = null; - - if (this._bookmarksFile) { - this._monitor = this._bookmarksFile.monitor_file(Gio.FileMonitorFlags.NONE, null); - this._monitor.connect('changed', () => { - if (this._bookmarkTimeoutId > 0) - return; - /* Defensive event compression */ - this._bookmarkTimeoutId = GLib.timeout_add( - GLib.PRIORITY_DEFAULT, 100, () => { - this._bookmarkTimeoutId = 0; - this._reloadBookmarks(); - return false; - }); - }); - - this._reloadBookmarks(); - } - } - - destroy() { - this._settings?.disconnectObject(this); - this._settings = null; - - this._volumeMonitor.disconnectObject(this); - - if (this._monitor) - this._monitor.cancel(); - if (this._bookmarkTimeoutId) - GLib.source_remove(this._bookmarkTimeoutId); - } - - _updateSpecials() { - this._places.special.forEach(p => p.destroy()); - this._places.special = []; - - let homePath = GLib.get_home_dir(); - - this._places.special.push(new PlaceInfo( - 'special', - Gio.File.new_for_path(homePath), - _('Home'))); - - let specials = []; - let dirs = DEFAULT_DIRECTORIES.slice(); - - if (this._settings.get_boolean('show-desktop-icons')) - dirs.push(GLib.UserDirectory.DIRECTORY_DESKTOP); - - for (let i = 0; i < dirs.length; i++) { - let specialPath = GLib.get_user_special_dir(dirs[i]); - if (!specialPath || specialPath === homePath) - continue; - - let file = Gio.File.new_for_path(specialPath), info; - try { - info = new PlaceInfo('special', file); - } catch (e) { - if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND)) - continue; - throw e; - } - - specials.push(info); - } - - specials.sort((a, b) => GLib.utf8_collate(a.name, b.name)); - this._places.special = this._places.special.concat(specials); - - this.emit('special-updated'); - } - - _updateMounts() { - let networkMounts = []; - let networkVolumes = []; - - this._places.devices.forEach(p => p.destroy()); - this._places.devices = []; - this._places.network.forEach(p => p.destroy()); - this._places.network = []; - - /* Add standard places */ - this._places.devices.push(new RootInfo()); - this._places.network.push(new PlaceInfo( - 'network', - Gio.File.new_for_uri('network:///'), - _('Browse Network'), - 'network-workgroup-symbolic')); - - /* first go through all connected drives */ - let drives = this._volumeMonitor.get_connected_drives(); - for (let i = 0; i < drives.length; i++) { - let volumes = drives[i].get_volumes(); - - for (let j = 0; j < volumes.length; j++) { - let identifier = volumes[j].get_identifier('class'); - if (identifier && identifier.includes('network')) { - networkVolumes.push(volumes[j]); - } else { - let mount = volumes[j].get_mount(); - if (mount) - this._addMount('devices', mount); - } - } - } - - /* add all volumes that is not associated with a drive */ - let volumes = this._volumeMonitor.get_volumes(); - for (let i = 0; i < volumes.length; i++) { - if (volumes[i].get_drive()) - continue; - - let identifier = volumes[i].get_identifier('class'); - if (identifier && identifier.includes('network')) { - networkVolumes.push(volumes[i]); - } else { - let mount = volumes[i].get_mount(); - if (mount) - this._addMount('devices', mount); - } - } - - /* add mounts that have no volume (/etc/mtab mounts, ftp, sftp,...) */ - let mounts = this._volumeMonitor.get_mounts(); - for (let i = 0; i < mounts.length; i++) { - if (mounts[i].is_shadowed()) - continue; - - if (mounts[i].get_volume()) - continue; - - let root = mounts[i].get_default_location(); - if (!root.is_native()) { - networkMounts.push(mounts[i]); - continue; - } - this._addMount('devices', mounts[i]); - } - - for (let i = 0; i < networkVolumes.length; i++) { - let mount = networkVolumes[i].get_mount(); - if (mount) { - networkMounts.push(mount); - continue; - } - this._addVolume('network', networkVolumes[i]); - } - - for (let i = 0; i < networkMounts.length; i++) - this._addMount('network', networkMounts[i]); - - - this.emit('devices-updated'); - this.emit('network-updated'); - } - - _findBookmarksFile() { - let paths = [ - GLib.build_filenamev([GLib.get_user_config_dir(), 'gtk-3.0', 'bookmarks']), - GLib.build_filenamev([GLib.get_home_dir(), '.gtk-bookmarks']), - ]; - - for (let i = 0; i < paths.length; i++) { - if (GLib.file_test(paths[i], GLib.FileTest.EXISTS)) - return Gio.File.new_for_path(paths[i]); - } - - return null; - } - - _reloadBookmarks() { - this._bookmarks = []; - - let content = Shell.get_file_contents_utf8_sync(this._bookmarksFile.get_path()); - let lines = content.split('\n'); - - let bookmarks = []; - for (let i = 0; i < lines.length; i++) { - let line = lines[i]; - let components = line.split(' '); - let [bookmark] = components; - - if (!bookmark) - continue; - - let file = Gio.File.new_for_uri(bookmark); - if (file.is_native() && !file.query_exists(null)) - continue; - - let duplicate = false; - for (let j = 0; j < this._places.special.length; j++) { - if (file.equal(this._places.special[j].file)) { - duplicate = true; - break; - } - } - if (duplicate) - continue; - for (let j = 0; j < bookmarks.length; j++) { - if (file.equal(bookmarks[j].file)) { - duplicate = true; - break; - } - } - if (duplicate) - continue; - - let label = null; - if (components.length > 1) - label = components.slice(1).join(' '); - - bookmarks.push(new PlaceInfo('bookmarks', file, label)); - } - - this._places.bookmarks = bookmarks; - - this.emit('bookmarks-updated'); - } - - _addMount(kind, mount) { - let devItem; - - try { - devItem = new PlaceDeviceInfo(kind, mount); - } catch (e) { - if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND)) - return; - throw e; - } - - this._places[kind].push(devItem); - } - - _addVolume(kind, volume) { - let volItem; - - try { - volItem = new PlaceVolumeInfo(kind, volume); - } catch (e) { - if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND)) - return; - throw e; - } - - this._places[kind].push(volItem); - } - - get(kind) { - return this._places[kind]; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/private_metadata.json b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/private_metadata.json deleted file mode 100644 index c2f7bd79..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/private_metadata.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_generated": "Generated by SweetTooth, do not edit", - "description": "Add a menu for quickly navigating places in the system.\nThis extension is part of Classic Mode and is officially supported by GNOME. Please do not report bugs using the form below, use GNOME's GitLab instance instead.", - "extension-id": "places-menu", - "gettext-domain": "gnome-shell-extension-places-menu", - "name": "Places Status Indicator", - "settings-schema": "org.gnome.shell.extensions.places-menu", - "shell-version": [ - "46" - ], - "url": "https://gitlab.gnome.org/GNOME/gnome-shell-extensions", - "uuid": "places-menu@gnome-shell-extensions.gcampax.github.com", - "version": 62 -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/stylesheet.css b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/stylesheet.css deleted file mode 100644 index 2d7dbe3a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/stylesheet.css +++ /dev/null @@ -1,14 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020 Florian Müllner <fmuellner@gnome.org> - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ - -.place-menu-item .button { - border-radius: 99px; - padding: 3px; - min-height: auto; -} - -.place-menu-item .button:ltr { margin-left: 6px; } -.place-menu-item .button:rtl { margin-right: 6px; } diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/arena.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/arena.js deleted file mode 100644 index 916e10f2..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/arena.js +++ /dev/null @@ -1,40 +0,0 @@ -export class Arena { - constructor() { - this.slots = new Array(); - this.unused = new Array(); - } - truncate(n) { - this.slots.splice(n); - this.unused.splice(n); - } - get(n) { - return this.slots[n]; - } - insert(v) { - let n; - const slot = this.unused.pop(); - if (slot !== undefined) { - n = slot; - this.slots[n] = v; - } - else { - n = this.slots.length; - this.slots.push(v); - } - return n; - } - remove(n) { - if (this.slots[n] === null) - return null; - const v = this.slots[n]; - this.slots[n] = null; - this.unused.push(n); - return v; - } - *values() { - for (const v of this.slots) { - if (v !== null) - yield v; - } - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/auto_tiler.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/auto_tiler.js deleted file mode 100644 index 1b968288..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/auto_tiler.js +++ /dev/null @@ -1,606 +0,0 @@ -import * as ecs from './ecs.js'; -import * as lib from './lib.js'; -import * as log from './log.js'; -import * as node from './node.js'; -import * as result from './result.js'; -import * as stack from './stack.js'; -import * as geom from './geom.js'; -import * as tiling from './tiling.js'; -const { Stack } = stack; -const { Ok, Err, ERR } = result; -const { NodeKind } = node; -import * as Tags from './tags.js'; -export class AutoTiler { - constructor(forest, attached) { - this.forest = forest; - this.attached = attached; - } - attach_swap(ext, a, b) { - const a_ent = this.attached.get(a), b_ent = this.attached.get(b); - let a_win = ext.windows.get(a), b_win = ext.windows.get(b); - if (!a_ent || !b_ent || !a_win || !b_win) - return; - const a_fork = this.forest.forks.get(a_ent), b_fork = this.forest.forks.get(b_ent); - if (!a_fork || !b_fork) - return; - const a_stack = a_win.stack, b_stack = b_win.stack; - if (ext.auto_tiler) { - if (a_win.stack !== null) { - const stack = ext.auto_tiler.forest.stacks.get(a_win.stack); - if (stack) { - a = stack.active; - a_win = ext.windows.get(a); - if (!a_win) - return; - stack.deactivate(a_win); - } - } - if (b_win.stack !== null) { - const stack = ext.auto_tiler.forest.stacks.get(b_win.stack); - if (stack) { - b = stack.active; - b_win = ext.windows.get(b); - if (!b_win) - return; - stack.deactivate(b_win); - } - } - } - const a_fn = a_fork.replace_window(ext, a_win, b_win); - this.forest.on_attach(a_ent, b); - const b_fn = b_fork.replace_window(ext, b_win, a_win); - this.forest.on_attach(b_ent, a); - if (a_fn) - a_fn(); - if (b_fn) - b_fn(); - a_win.stack = b_stack; - b_win.stack = a_stack; - a_win.meta.get_compositor_private()?.show(); - b_win.meta.get_compositor_private()?.show(); - this.tile(ext, a_fork, a_fork.area); - this.tile(ext, b_fork, b_fork.area); - } - update_toplevel(ext, fork, monitor, smart_gaps) { - let rect = ext.monitor_work_area(monitor); - fork.smart_gapped = smart_gaps && fork.right === null; - if (!fork.smart_gapped) { - rect.x += ext.gap_outer; - rect.y += ext.gap_outer; - rect.width -= ext.gap_outer * 2; - rect.height -= ext.gap_outer * 2; - } - if (fork.left.inner.kind === 2) { - const win = ext.windows.get(fork.left.inner.entity); - if (win) { - win.smart_gapped = fork.smart_gapped; - } - } - fork.area = fork.set_area(rect.clone()); - fork.length_left = Math.round(fork.prev_ratio * fork.length()); - this.tile(ext, fork, fork.area); - } - attach_to_monitor(ext, win, workspace_id, smart_gaps) { - let rect = ext.monitor_work_area(workspace_id[0]); - if (!smart_gaps) { - rect.x += ext.gap_outer; - rect.y += ext.gap_outer; - rect.width -= ext.gap_outer * 2; - rect.height -= ext.gap_outer * 2; - } - const [entity, fork] = this.forest.create_toplevel(win.entity, rect.clone(), workspace_id); - this.forest.on_attach(entity, win.entity); - fork.smart_gapped = smart_gaps; - win.smart_gapped = smart_gaps; - this.tile(ext, fork, rect); - } - attach_to_window(ext, attachee, attacher, move_by, stack_from_left = true) { - let attached = this.forest.attach_window(ext, attachee.entity, attacher.entity, move_by, stack_from_left); - if (attached) { - const [, fork] = attached; - const monitor = ext.monitors.get(attachee.entity); - if (monitor) { - if (fork.is_toplevel && fork.smart_gapped && fork.right) { - fork.smart_gapped = false; - let rect = ext.monitor_work_area(fork.monitor); - rect.x += ext.gap_outer; - rect.y += ext.gap_outer; - rect.width -= ext.gap_outer * 2; - rect.height -= ext.gap_outer * 2; - fork.set_area(rect); - } - this.tile(ext, fork, fork.area.clone()); - return true; - } - else { - log.error(`missing monitor association for Window(${attachee.entity})`); - } - } - return false; - } - attach_to_workspace(ext, win, id) { - if (ext.should_ignore_workspace(id[0])) { - id = [id[0], 0]; - } - const toplevel = this.forest.find_toplevel(id); - if (toplevel) { - const onto = this.forest.largest_window_on(ext, toplevel); - if (onto) { - if (this.attach_to_window(ext, onto, win, { auto: 0 })) { - return; - } - } - } - this.attach_to_monitor(ext, win, id, ext.settings.smart_gaps()); - } - auto_tile(ext, win, ignore_focus = false) { - const result = this.fetch_mode(ext, win, ignore_focus); - this.detach_window(ext, win.entity); - if (result.kind == ERR) { - log.debug(`attach to workspace: ${result.value}`); - this.attach_to_workspace(ext, win, ext.workspace_id(win)); - } - else { - log.debug(`attaching to window ${win.entity}`); - this.attach_to_window(ext, result.value, win, { auto: 0 }); - } - } - destroy(ext) { - for (const [, [fent]] of this.forest.toplevel) { - for (const node of this.forest.iter(fent)) { - if (node.inner.kind === 2) { - this.forest.on_detach(node.inner.entity); - } - else if (node.inner.kind === 3) { - for (const window of node.inner.entities) { - this.forest.on_detach(window); - } - } - } - } - for (const stack of this.forest.stacks.values()) - stack.destroy(); - for (const window of ext.windows.values()) { - window.stack = null; - } - this.forest.stacks.truncate(0); - ext.show_border_on_focused(); - } - detach_window(ext, win) { - this.attached.take_with(win, (prev_fork) => { - const reflow_fork = this.forest.detach(ext, prev_fork, win); - if (reflow_fork) { - const fork = reflow_fork[1]; - if (fork.is_toplevel && ext.settings.smart_gaps() && fork.right === null) { - let rect = ext.monitor_work_area(fork.monitor); - fork.set_area(rect); - fork.smart_gapped = true; - } - this.tile(ext, fork, fork.area); - } - ext.windows.with(win, (info) => (info.ignore_detach = false)); - }); - } - dropped_on_sibling(ext, win, swap = true) { - const fork_entity = this.attached.get(win); - if (fork_entity) { - const cursor = lib.cursor_rect(); - const fork = this.forest.forks.get(fork_entity); - if (fork) { - if (fork.left.inner.kind === 2 && fork.right && fork.right.inner.kind === 2) { - if (fork.left.is_window(win)) { - const sibling = ext.windows.get(fork.right.inner.entity); - if (sibling && sibling.rect().contains(cursor)) { - if (swap) { - fork.left.inner.entity = fork.right.inner.entity; - fork.right.inner.entity = win; - this.tile(ext, fork, fork.area); - } - return true; - } - } - else if (fork.right.is_window(win)) { - const sibling = ext.windows.get(fork.left.inner.entity); - if (sibling && sibling.rect().contains(cursor)) { - if (swap) { - fork.right.inner.entity = fork.left.inner.entity; - fork.left.inner.entity = win; - this.tile(ext, fork, fork.area); - } - return true; - } - } - } - } - } - return false; - } - find_stack(entity) { - const att = this.attached.get(entity); - if (att) { - const fork = this.forest.forks.get(att); - if (fork) { - if (fork.left.is_in_stack(entity)) { - return [fork, fork.left, true]; - } - else if (fork.right?.is_in_stack(entity)) { - return [fork, fork.right, false]; - } - } - } - return null; - } - get_parent_fork(window) { - const entity = this.attached.get(window); - if (entity === null) - return null; - const fork = this.forest.forks.get(entity); - return fork; - } - largest_on_workspace(ext, monitor, workspace) { - const workspace_id = [monitor, workspace]; - const toplevel = this.forest.find_toplevel(workspace_id); - if (toplevel) { - return this.forest.largest_window_on(ext, toplevel); - } - return null; - } - on_drop(ext, win, via_overview = false) { - const [cursor, monitor] = ext.cursor_status(); - const workspace = ext.active_workspace(); - if (win.rect().contains(cursor)) { - via_overview = false; - } - const attach_mon = () => { - const attach_to = this.largest_on_workspace(ext, monitor, workspace); - if (attach_to) { - this.attach_to_window(ext, attach_to, win, { auto: 0 }); - } - else { - this.attach_to_monitor(ext, win, [monitor, workspace], ext.settings.smart_gaps()); - } - }; - if (via_overview) { - this.detach_window(ext, win.entity); - attach_mon(); - return; - } - let attach_to = null; - for (const found of ext.windows_at_pointer(cursor, monitor, workspace)) { - if (found != win && this.attached.contains(found.entity)) { - attach_to = found; - break; - } - } - const fork = this.get_parent_fork(win.entity); - if (!fork) - return; - const windowless = this.largest_on_workspace(ext, monitor, workspace) === null; - if (attach_to === null) { - if (fork.left.inner.kind === 2 && fork.right?.inner.kind === 2) { - let attaching = fork.left.is_window(win.entity) ? fork.right.inner.entity : fork.left.inner.entity; - attach_to = ext.windows.get(attaching); - } - else if (!windowless) { - this.tile(ext, fork, fork.area); - return true; - } - } - if (windowless) { - this.detach_window(ext, win.entity); - this.attach_to_monitor(ext, win, [monitor, workspace], ext.settings.smart_gaps()); - } - else if (attach_to) { - this.place_or_stack(ext, win, attach_to, cursor); - } - else { - this.detach_window(ext, win.entity); - attach_mon(); - } - } - place_or_stack(ext, win, attach_to, cursor) { - const fork = this.get_parent_fork(attach_to.entity); - if (!fork) - return true; - const is_sibling = this.windows_are_siblings(win.entity, attach_to.entity); - const attach_area = (win.stack === null && attach_to.stack === null && is_sibling) || (win.stack === null && is_sibling) - ? fork.area - : attach_to.meta.get_frame_rect(); - let placement = cursor_placement(ext, attach_area, cursor); - const stack = ext.auto_tiler?.find_stack(attach_to.entity); - const matching_stack = win.stack !== null && win.stack === attach_to.stack; - const { Left, Up, Right, Down } = tiling.Direction; - const swap = (o, d) => { - fork.set_orientation(o); - const is_left = fork.left.is_window(win.entity); - const swap = (is_left && (d == Right || d == Down)) || (!is_left && (d == Left || d == Up)); - if (swap) { - fork.swap_branches(); - } - this.tile(ext, fork, fork.area); - }; - if (placement) { - const direction = placement.orientation === lib.Orientation.HORIZONTAL - ? placement.swap - ? Left - : Right - : placement.swap - ? Up - : Down; - if (stack) { - if (matching_stack) { - ext.tiler.move_from_stack(ext, stack, win, direction, true); - return true; - } - else if (attach_to.stack !== null) { - const onto_stack = ext.auto_tiler?.find_stack(attach_to.entity); - if (onto_stack) { - if (is_sibling && win.stack === null) { - swap(placement.orientation, direction); - return true; - } - else { - ext.tiler.move_alongside_stack(ext, onto_stack, win, direction); - } - return true; - } - } - } - else if (is_sibling && win.stack === null) { - swap(placement.orientation, direction); - return true; - } - else if (fork.is_toplevel && fork.right === null) { - this.detach_window(ext, win.entity); - this.attach_to_window(ext, attach_to, win, placement); - swap(placement.orientation, direction); - return true; - } - } - else if (matching_stack) { - this.tile(ext, fork, fork.area); - return true; - } - else { - if (attach_to.stack === null) - this.create_stack(ext, attach_to); - placement = { auto: 0 }; - } - this.detach_window(ext, win.entity); - return this.attach_to_window(ext, attach_to, win, placement); - } - reflow(ext, win) { - const fork_entity = this.attached.get(win); - if (!fork_entity) - return; - ext.register_fn(() => { - const fork = this.forest.forks.get(fork_entity); - if (fork) - this.tile(ext, fork, fork.area); - }); - } - tile(ext, fork, area) { - this.forest.tile(ext, fork, area); - } - toggle_floating(ext) { - const focused = ext.focus_window(); - if (!focused) - return; - let wm_class = focused.meta.get_wm_class(); - let wm_title = focused.meta.get_title(); - let float_except = false; - if (wm_class != null && wm_title != null) { - float_except = ext.conf.window_shall_float(wm_class, wm_title); - } - if (float_except) { - if (ext.contains_tag(focused.entity, Tags.ForceTile)) { - ext.delete_tag(focused.entity, Tags.ForceTile); - const fork_entity = this.attached.get(focused.entity); - if (fork_entity) { - this.detach_window(ext, focused.entity); - } - } - else { - ext.add_tag(focused.entity, Tags.ForceTile); - this.auto_tile(ext, focused, false); - } - } - else { - if (ext.contains_tag(focused.entity, Tags.Floating)) { - ext.delete_tag(focused.entity, Tags.Floating); - this.auto_tile(ext, focused, false); - } - else { - const fork_entity = this.attached.get(focused.entity); - if (fork_entity) { - this.detach_window(ext, focused.entity); - ext.add_tag(focused.entity, Tags.Floating); - } - } - } - ext.register_fn(() => focused.activate(true)); - } - toggle_orientation(ext, window) { - const result = this.toggle_orientation_(ext, window); - if (result.kind == ERR) { - log.warn(`toggle_orientation: ${result.value}`); - } - } - toggle_stacking(ext, window) { - const focused = window ?? ext.focus_window(); - if (!focused) - return; - if (ext.contains_tag(focused.entity, Tags.Floating)) { - ext.delete_tag(focused.entity, Tags.Floating); - this.auto_tile(ext, focused, false); - } - const fork_entity = this.attached.get(focused.entity); - if (fork_entity) { - const fork = this.forest.forks.get(fork_entity); - if (fork) { - this.unstack(ext, fork, focused, true); - } - } - } - unstack(ext, fork, win, toggled = false) { - const stack_toggle = (fork, branch) => { - const stack = branch.inner; - if (stack.entities.length === 1) { - win.stack = null; - this.forest.stacks.remove(stack.idx)?.destroy(); - fork.measure(this.forest, ext, fork.area, this.forest.on_record()); - return node.Node.window(win.entity); - } - return null; - }; - if (toggled && fork.left.is_window(win.entity)) { - win.stack = this.forest.stacks.insert(new Stack(ext, win.entity, fork.workspace, fork.monitor)); - fork.left = node.Node.stacked(win.entity, win.stack); - fork.measure(this.forest, ext, fork.area, this.forest.on_record()); - } - else if (fork.left.is_in_stack(win.entity)) { - const node = stack_toggle(fork, fork.left); - if (node) { - fork.left = node; - if (!fork.right) { - this.forest.reassign_to_parent(fork, node); - } - } - } - else if (toggled && fork.right?.is_window(win.entity)) { - win.stack = this.forest.stacks.insert(new Stack(ext, win.entity, fork.workspace, fork.monitor)); - fork.right = node.Node.stacked(win.entity, win.stack); - fork.measure(this.forest, ext, fork.area, this.forest.on_record()); - } - else if (fork.right?.is_in_stack(win.entity)) { - const node = stack_toggle(fork, fork.right); - if (node) - fork.right = node; - } - this.tile(ext, fork, fork.area); - } - stack_left(ext, fork, window) { - window.stack = this.forest.stacks.insert(new Stack(ext, window.entity, fork.workspace, fork.monitor)); - fork.left = node.Node.stacked(window.entity, window.stack); - fork.measure(this.forest, ext, fork.area, this.forest.on_record()); - } - stack_right(ext, fork, window) { - window.stack = this.forest.stacks.insert(new Stack(ext, window.entity, fork.workspace, fork.monitor)); - fork.right = node.Node.stacked(window.entity, window.stack); - fork.measure(this.forest, ext, fork.area, this.forest.on_record()); - } - create_stack(ext, window) { - const entity = this.attached.get(window.entity); - if (!entity) - return; - const fork = this.forest.forks.get(entity); - if (!fork) - return; - if (fork.left.is_window(window.entity)) { - this.stack_left(ext, fork, window); - } - else if (fork.right?.is_window(window.entity)) { - this.stack_right(ext, fork, window); - } - } - update_stack(ext, stack) { - if (stack.rect) { - const container = this.forest.stacks.get(stack.idx); - if (container) { - container.clear(); - for (const entity of stack.entities) { - const window = ext.windows.get(entity); - if (window) { - window.stack = stack.idx; - container.add(window); - } - } - container.update_positions(stack.rect); - container.auto_activate(); - } - } - else { - log.warn('stack rect was null'); - } - } - windows_are_siblings(a, b) { - const a_parent = this.attached.get(a); - const b_parent = this.attached.get(b); - if (a_parent !== null && null !== b_parent && ecs.entity_eq(a_parent, b_parent)) { - return a_parent; - } - return null; - } - fetch_mode(ext, win, ignore_focus = false) { - if (ignore_focus) { - return Err('ignoring focus'); - } - const prev = ext.previously_focused(win); - if (!prev) { - return Err('no window has been previously focused'); - } - let onto = ext.windows.get(prev); - if (!onto) { - return Err('no focus window'); - } - if (ecs.entity_eq(onto.entity, win.entity)) { - return Err('tiled window and attach window are the same window'); - } - if (!onto.is_tilable(ext)) { - return Err('focused window is not tilable'); - } - if (onto.meta.minimized) { - return Err('previous window was minimized'); - } - if (!this.attached.contains(onto.entity)) { - return Err('focused window is not attached'); - } - return onto.meta.get_monitor() == win.meta.get_monitor() && onto.workspace_id() == win.workspace_id() - ? Ok(onto) - : Err('window is not on the same monitor or workspace'); - } - toggle_orientation_(ext, focused) { - if (focused.meta.get_maximized()) { - return Err('cannot toggle maximized window'); - } - const fork_entity = this.attached.get(focused.entity); - if (!fork_entity) { - return Err(`window is not attached to the tree`); - } - const fork = this.forest.forks.get(fork_entity); - if (!fork) { - return Err("window's fork attachment does not exist"); - } - if (!fork.right) - return Ok(void 0); - fork.toggle_orientation(); - this.forest.measure(ext, fork, fork.area); - for (const child of this.forest.iter(fork_entity, NodeKind.FORK)) { - const child_fork = this.forest.forks.get(child.inner.entity); - if (child_fork) { - child_fork.rebalance_orientation(); - this.forest.measure(ext, child_fork, child_fork.area); - } - else { - log.error('toggle_orientation: Fork(${child.entity}) does not exist to have its orientation toggled'); - } - } - this.forest.arrange(ext, fork.workspace, true); - return Ok(void 0); - } -} -export function cursor_placement(ext, area, cursor) { - const { LEFT, RIGHT, TOP, BOTTOM } = geom.Side; - const { HORIZONTAL, VERTICAL } = lib.Orientation; - const [, side] = geom.nearest_side(ext, [cursor.x, cursor.y], area); - let res = side === LEFT - ? [HORIZONTAL, true] - : side === RIGHT - ? [HORIZONTAL, false] - : side === TOP - ? [VERTICAL, true] - : side === BOTTOM - ? [VERTICAL, false] - : null; - return res ? { orientation: res[0], swap: res[1] } : null; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/color_dialog/main.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/color_dialog/main.js deleted file mode 100644 index 0ed5b913..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/color_dialog/main.js +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/gjs --module -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import Gtk from 'gi://Gtk?version=3.0'; -import Gdk from 'gi://Gdk'; -const EXT_PATH_DEFAULTS = [ - GLib.get_home_dir() + '/.local/share/gnome-shell/extensions/', - '/usr/share/gnome-shell/extensions/', -]; -const DEFAULT_HINT_COLOR = 'rgba(251, 184, 108, 1)'; -function getExtensionPath(uuid) { - let ext_path = null; - for (let i = 0; i < EXT_PATH_DEFAULTS.length; i++) { - let path = EXT_PATH_DEFAULTS[i]; - let file = Gio.File.new_for_path(path + uuid); - log(file.get_path()); - if (file.query_exists(null)) { - ext_path = file; - break; - } - } - return ext_path; -} -function getSettings(schema) { - let extensionPath = getExtensionPath('pop-shell@system76.com'); - if (!extensionPath) - throw new Error('getSettings() can only be called when extension is available'); - const GioSSS = Gio.SettingsSchemaSource; - const schemaDir = extensionPath.get_child('schemas'); - let schemaSource = schemaDir.query_exists(null) - ? GioSSS.new_from_directory(schemaDir.get_path(), GioSSS.get_default(), false) - : GioSSS.get_default(); - const schemaObj = schemaSource.lookup(schema, true); - if (!schemaObj) { - throw new Error('Schema ' + schema + ' could not be found for extension '); - } - return new Gio.Settings({ settings_schema: schemaObj }); -} -function launch_color_dialog() { - let popshell_settings = getSettings('org.gnome.shell.extensions.pop-shell'); - let color_dialog = new Gtk.ColorChooserDialog({ - title: 'Choose Color', - }); - color_dialog.show_editor = true; - color_dialog.show_all(); - let rgba = new Gdk.RGBA(); - if (rgba.parse(popshell_settings.get_string('hint-color-rgba'))) { - color_dialog.set_rgba(rgba); - } - else { - rgba.parse(DEFAULT_HINT_COLOR); - color_dialog.set_rgba(rgba); - } - let response = color_dialog.run(); - if (response === Gtk.ResponseType.CANCEL) { - color_dialog.destroy(); - } - else if (response === Gtk.ResponseType.OK) { - popshell_settings.set_string('hint-color-rgba', color_dialog.get_rgba().to_string()); - Gio.Settings.sync(); - color_dialog.destroy(); - } -} -Gtk.init(null); -launch_color_dialog(); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/config.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/config.js deleted file mode 100644 index 57e6bf21..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/config.js +++ /dev/null @@ -1,239 +0,0 @@ -import GLib from 'gi://GLib'; -import Gio from 'gi://Gio'; -const CONF_DIR = GLib.get_user_config_dir() + '/pop-shell'; -export var CONF_FILE = CONF_DIR + '/config.json'; -export const DEFAULT_FLOAT_RULES = [ - { class: 'Authy Desktop' }, - { class: 'Com.github.amezin.ddterm' }, - { class: 'Com.github.donadigo.eddy' }, - { class: 'Conky' }, - { title: 'Discord Updater' }, - { class: 'Enpass', title: 'Enpass Assistant' }, - { class: 'Floating Window Exceptions' }, - { class: 'Gjs', title: 'Settings' }, - { class: 'Gnome-initial-setup' }, - { class: 'Gnome-terminal', title: 'Preferences – General' }, - { class: 'Guake' }, - { class: 'Io.elementary.sideload' }, - { title: 'JavaEmbeddedFrame' }, - { class: 'KotatogramDesktop', title: 'Media viewer' }, - { class: 'Mozilla VPN' }, - { class: 'update-manager', title: 'Software Updater' }, - { class: 'Solaar' }, - { class: 'Steam', title: '^((?!Steam).)*$' }, - { class: 'Steam', title: '^.*(Guard|Login).*' }, - { class: 'TelegramDesktop', title: 'Media viewer' }, - { class: 'Zotero', title: 'Quick Format Citation' }, - { class: 'firefox', title: '^(?!.*Mozilla Firefox).*$' }, - { class: 'gnome-screenshot' }, - { class: 'ibus-.*' }, - { class: 'jetbrains-toolbox' }, - { class: 'jetbrains-webstorm', title: 'Customize WebStorm' }, - { class: 'jetbrains-webstorm', title: 'License Activation' }, - { class: 'jetbrains-webstorm', title: 'Welcome to WebStorm' }, - { class: 'krunner' }, - { class: 'pritunl' }, - { class: 're.sonny.Junction' }, - { class: 'system76-driver' }, - { class: 'tilda' }, - { class: 'zoom' }, - { class: '^.*action=join.*$' }, - { class: 'gjs' }, -]; -export const SKIPTASKBAR_EXCEPTIONS = [ - { class: 'Conky' }, - { class: 'gjs' }, - { class: 'Guake' }, - { class: 'Com.github.amezin.ddterm' }, - { class: 'plank' }, -]; -export class Config { - constructor() { - this.float = []; - this.skiptaskbarhidden = []; - this.log_on_focus = false; - } - add_app_exception(wmclass) { - for (const r of this.float) { - if (r.class === wmclass && r.title === undefined) - return; - } - this.float.push({ class: wmclass }); - this.sync_to_disk(); - } - add_window_exception(wmclass, title) { - for (const r of this.float) { - if (r.class === wmclass && r.title === title) - return; - } - this.float.push({ class: wmclass, title }); - this.sync_to_disk(); - } - window_shall_float(wclass, title) { - for (const rule of this.float.concat(DEFAULT_FLOAT_RULES)) { - if (rule.class) { - if (!new RegExp(rule.class, 'i').test(wclass)) { - continue; - } - } - if (rule.title) { - if (!new RegExp(rule.title, 'i').test(title)) { - continue; - } - } - return rule.disabled ? false : true; - } - return false; - } - skiptaskbar_shall_hide(meta_window) { - let wmclass = meta_window.get_wm_class(); - let wmtitle = meta_window.get_title(); - if (!meta_window.is_skip_taskbar()) - return false; - for (const rule of this.skiptaskbarhidden.concat(SKIPTASKBAR_EXCEPTIONS)) { - if (rule.class) { - if (!new RegExp(rule.class, 'i').test(wmclass)) { - continue; - } - } - if (rule.title) { - if (!new RegExp(rule.title, 'i').test(wmtitle)) { - continue; - } - } - return rule.disabled ? false : true; - } - return false; - } - reload() { - const conf = Config.from_config(); - if (conf.tag === 0) { - let c = conf.value; - this.float = c.float; - this.log_on_focus = c.log_on_focus; - } - else { - log(`error loading conf: ${conf.why}`); - } - } - rule_disabled(rule) { - for (const value of this.float.values()) { - if (value.disabled && rule.class === value.class && value.title === rule.title) { - return true; - } - } - return false; - } - to_json() { - return JSON.stringify(this, set_to_json, 2); - } - toggle_system_exception(wmclass, wmtitle, disabled) { - if (disabled) { - for (const value of DEFAULT_FLOAT_RULES) { - if (value.class === wmclass && value.title === wmtitle) { - value.disabled = disabled; - this.float.push(value); - this.sync_to_disk(); - return; - } - } - } - let index = 0; - let found = false; - for (const value of this.float) { - if (value.class === wmclass && value.title === wmtitle) { - found = true; - break; - } - index += 1; - } - if (found) - swap_remove(this.float, index); - this.sync_to_disk(); - } - remove_user_exception(wmclass, wmtitle) { - let index = 0; - let found = new Array(); - for (const value of this.float.values()) { - if (value.class === wmclass && value.title === wmtitle) { - found.push(index); - } - index += 1; - } - if (found.length !== 0) { - for (const idx of found) - swap_remove(this.float, idx); - this.sync_to_disk(); - } - } - static from_json(json) { - try { - return JSON.parse(json); - } - catch (error) { - return new Config(); - } - } - static from_config() { - const stream = Config.read(); - if (stream.tag === 1) - return stream; - let value = Config.from_json(stream.value); - return { tag: 0, value }; - } - static gio_file() { - try { - const conf = Gio.File.new_for_path(CONF_FILE); - if (!conf.query_exists(null)) { - const dir = Gio.File.new_for_path(CONF_DIR); - if (!dir.query_exists(null) && !dir.make_directory(null)) { - return { tag: 1, why: 'failed to create pop-shell config directory' }; - } - const example = new Config(); - example.float.push({ class: 'pop-shell-example', title: 'pop-shell-example' }); - conf.create(Gio.FileCreateFlags.NONE, null).write_all(JSON.stringify(example, undefined, 2), null); - } - return { tag: 0, value: conf }; - } - catch (why) { - return { tag: 1, why: `Gio.File I/O error: ${why}` }; - } - } - static read() { - try { - const file = Config.gio_file(); - if (file.tag === 1) - return file; - const [, buffer] = file.value.load_contents(null); - return { tag: 0, value: imports.byteArray.toString(buffer) }; - } - catch (why) { - return { tag: 1, why: `failed to read pop-shell config: ${why}` }; - } - } - static write(data) { - try { - const file = Config.gio_file(); - if (file.tag === 1) - return file; - file.value.replace_contents(data, null, false, Gio.FileCreateFlags.NONE, null); - return { tag: 0, value: file.value }; - } - catch (why) { - return { tag: 1, why: `failed to write to config: ${why}` }; - } - } - sync_to_disk() { - Config.write(this.to_json()); - } -} -function set_to_json(_key, value) { - if (typeof value === 'object' && value instanceof Set) { - return [...value]; - } - return value; -} -function swap_remove(array, index) { - array[index] = array[array.length - 1]; - return array.pop(); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/context.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/context.js deleted file mode 100644 index cf5557c2..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/context.js +++ /dev/null @@ -1,24 +0,0 @@ -import St from 'gi://St'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js'; -export function addMenu(widget, request) { - const menu = new PopupMenu.PopupMenu(widget, 0.0, St.Side.TOP, 0); - Main.uiGroup.add_child(menu.actor); - menu.actor.hide(); - menu.actor.add_style_class_name('panel-menu'); - widget.connect('button-press-event', (_, event) => { - if (event.get_button() === 3) { - request(menu); - } - }); - return menu; -} -export function addContext(menu, name, activate) { - const menu_item = appendMenuItem(menu, name); - menu_item.connect('activate', () => activate()); -} -function appendMenuItem(menu, label) { - let item = new PopupMenu.PopupMenuItem(label); - menu.addMenuItem(item); - return item; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/dark.css b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/dark.css deleted file mode 100644 index 732aefb6..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/dark.css +++ /dev/null @@ -1,57 +0,0 @@ -.pop-shell-active-hint { - border-style: solid; - border-color: #FBB86C; - border-radius: var(--active-hint-border-radius, 5px); - box-shadow: inset 0 0 0 1px rgba(24, 23, 23, 0) -} - -.pop-shell-overlay { - background-color: rgba(53, 132, 228, 0.3); -} - -.pop-shell-border-normal { - border-width: 3px; -} - -.pop-shell-border-maximize { - border-width: 3px; -} - -.pop-shell-search-element:select{ - background: rgba(246, 246, 246, .2); - border-radius: 5px; - color: #EDEDED; -} - -.pop-shell-search-icon { - margin-right: 10px; -} - -.pop-shell-search-cat { - margin-right: 10px; -} - -.pop-shell-search-element { - padding-left: 10px; - padding-right: 2px; - padding-top: 6px; - padding-bottom: 6px; -} - -.pop-shell-tab { - border: 1px solid #333; - color: #000; - padding: 0 1em; -} - -.pop-shell-tab-active { - background: #FBB86C; -} - -.pop-shell-tab-inactive { - background: #9B8E8A; -} - -.pop-shell-tab-urgent { - background: #D00; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/dbus_service.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/dbus_service.js deleted file mode 100644 index 66056ab1..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/dbus_service.js +++ /dev/null @@ -1,44 +0,0 @@ -import Gio from 'gi://Gio'; -const IFACE = `<node> - <interface name="com.System76.PopShell"> - <method name="FocusLeft"/> - <method name="FocusRight"/> - <method name="FocusUp"/> - <method name="FocusDown"/> - <method name="Launcher"/> - <method name="WindowFocus"> - <arg type="(uu)" direction="in" name="window"/> - </method> - <method name="WindowHighlight"> - <arg type="(uu)" direction="in" name="window"/> - </method> - <method name="WindowList"> - <arg type="a((uu)sss)" direction="out" name="args"/> - </method> - <method name="WindowQuit"> - <arg type="(uu)" direction="in" name="window"/> - </method> - </interface> -</node>`; -export class Service { - constructor() { - this.FocusLeft = () => { }; - this.FocusRight = () => { }; - this.FocusUp = () => { }; - this.FocusDown = () => { }; - this.Launcher = () => { }; - this.WindowFocus = () => { }; - this.WindowList = () => []; - this.WindowQuit = () => { }; - this.dbus = Gio.DBusExportedObject.wrapJSObject(IFACE, this); - const onBusAcquired = (conn) => { - this.dbus.export(conn, '/com/System76/PopShell'); - }; - function onNameAcquired() { } - function onNameLost() { } - this.id = Gio.bus_own_name(Gio.BusType.SESSION, 'com.System76.PopShell', Gio.BusNameOwnerFlags.NONE, onBusAcquired, onNameAcquired, onNameLost); - } - destroy() { - Gio.bus_unown_name(this.id); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/dialog_add_exception.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/dialog_add_exception.js deleted file mode 100644 index 34c59074..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/dialog_add_exception.js +++ /dev/null @@ -1,59 +0,0 @@ -import * as Lib from './lib.js'; -import St from 'gi://St'; -import Clutter from 'gi://Clutter'; -import * as ModalDialog from 'resource:///org/gnome/shell/ui/modalDialog.js'; -export class AddExceptionDialog { - constructor(cancel, this_app, current_window, on_close) { - this.dialog = new ModalDialog.ModalDialog({ - styleClass: 'pop-shell-search modal-dialog', - destroyOnClose: false, - shellReactive: true, - shouldFadeIn: false, - shouldFadeOut: false, - }); - let title = St.Label.new('Add Floating Window Exception'); - title.set_x_align(Clutter.ActorAlign.CENTER); - title.set_style('font-weight: bold'); - let desc = St.Label.new('Float the selected window or all windows from the application.'); - desc.set_x_align(Clutter.ActorAlign.CENTER); - let l = this.dialog.contentLayout; - l.add_child(title); - l.add_child(desc); - this.dialog.contentLayout.width = Math.max(Lib.current_monitor().width / 4, 640); - this.dialog.addButton({ - label: 'Cancel', - action: () => { - cancel(); - on_close(); - this.close(); - }, - key: Clutter.KEY_Escape, - }); - this.dialog.addButton({ - label: "This App's Windows", - action: () => { - this_app(); - on_close(); - this.close(); - }, - }); - this.dialog.addButton({ - label: 'Current Window Only', - action: () => { - current_window(); - on_close(); - this.close(); - }, - }); - } - close() { - this.dialog.close(global.get_current_time()); - } - show() { - this.dialog.show(); - } - open() { - this.dialog.open(global.get_current_time(), false); - this.show(); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/ecs.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/ecs.js deleted file mode 100644 index 4e2eebb3..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/ecs.js +++ /dev/null @@ -1,174 +0,0 @@ -var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -}; -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var _System_executor; -export function entity_eq(a, b) { - return a[0] == b[0] && b[1] == b[1]; -} -export function entity_new(pos, gen) { - return [pos, gen]; -} -export class Storage { - constructor() { - this.store = new Array(); - } - *_iter() { - let idx = 0; - for (const slot of this.store) { - if (slot) - yield [idx, slot]; - idx += 1; - } - } - *iter() { - for (const [idx, [gen, value]] of this._iter()) { - yield [entity_new(idx, gen), value]; - } - } - *find(func) { - for (const [idx, [gen, value]] of this._iter()) { - if (func(value)) - yield entity_new(idx, gen); - } - } - *values() { - for (const [, [, value]] of this._iter()) { - yield value; - } - } - contains(entity) { - return this.get(entity) != null; - } - get(entity) { - let [id, gen] = entity; - const val = this.store[id]; - return val && val[0] == gen ? val[1] : null; - } - get_or(entity, init) { - let value = this.get(entity); - if (!value) { - value = init(); - this.insert(entity, value); - } - return value; - } - insert(entity, component) { - let [id, gen] = entity; - let length = this.store.length; - if (length >= id) { - this.store.fill(null, length, id); - } - this.store[id] = [gen, component]; - } - is_empty() { - for (const slot of this.store) - if (slot) - return false; - return true; - } - remove(entity) { - const comp = this.get(entity); - if (comp) { - this.store[entity[0]] = null; - } - return comp; - } - take_with(entity, func) { - const component = this.remove(entity); - return component ? func(component) : null; - } - with(entity, func) { - const component = this.get(entity); - return component ? func(component) : null; - } -} -export class World { - constructor() { - this.entities_ = new Array(); - this.storages = new Array(); - this.tags_ = new Array(); - this.free_slots = new Array(); - } - get capacity() { - return this.entities_.length; - } - get free() { - return this.free_slots.length; - } - get length() { - return this.capacity - this.free; - } - tags(entity) { - return this.tags_[entity[0]]; - } - *entities() { - for (const entity of this.entities_.values()) { - if (!(this.free_slots.indexOf(entity[0]) > -1)) - yield entity; - } - } - create_entity() { - let slot = this.free_slots.pop(); - if (slot) { - var entity = this.entities_[slot]; - entity[1] += 1; - } - else { - var entity = entity_new(this.capacity, 0); - this.entities_.push(entity); - this.tags_.push(new Set()); - } - return entity; - } - delete_entity(entity) { - this.tags(entity).clear(); - for (const storage of this.storages) { - storage.remove(entity); - } - this.free_slots.push(entity[0]); - } - add_tag(entity, tag) { - this.tags(entity).add(tag); - } - contains_tag(entity, tag) { - return this.tags(entity).has(tag); - } - delete_tag(entity, tag) { - this.tags(entity).delete(tag); - } - register_storage() { - let storage = new Storage(); - this.storages.push(storage); - return storage; - } - unregister_storage(storage) { - let matched = this.storages.indexOf(storage); - if (matched) { - swap_remove(this.storages, matched); - } - } -} -function swap_remove(array, index) { - array[index] = array[array.length - 1]; - return array.pop(); -} -export class System extends World { - constructor(executor) { - super(); - _System_executor.set(this, void 0); - __classPrivateFieldSet(this, _System_executor, executor, "f"); - } - register(event) { - __classPrivateFieldGet(this, _System_executor, "f").wake(this, event); - } - run(_event) { } -} -_System_executor = new WeakMap(); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/error.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/error.js deleted file mode 100644 index 8e5b6fd1..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/error.js +++ /dev/null @@ -1,26 +0,0 @@ -export class Error { - constructor(reason) { - this.cause = null; - this.reason = reason; - } - context(why) { - let error = new Error(why); - error.cause = this; - return error; - } - *chain() { - let current = this; - while (current != null) { - yield current; - current = current.cause; - } - } - format() { - let causes = this.chain(); - let buffer = causes.next().value.reason; - for (const error of causes) { - buffer += `\n caused by: ` + error.reason; - } - return buffer + `\n`; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/events.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/events.js deleted file mode 100644 index 7d82ba24..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/events.js +++ /dev/null @@ -1,26 +0,0 @@ -export var GlobalEvent; -(function (GlobalEvent) { - GlobalEvent[GlobalEvent["GtkShellChanged"] = 0] = "GtkShellChanged"; - GlobalEvent[GlobalEvent["GtkThemeChanged"] = 1] = "GtkThemeChanged"; - GlobalEvent[GlobalEvent["MonitorsChanged"] = 2] = "MonitorsChanged"; - GlobalEvent[GlobalEvent["OverviewShown"] = 3] = "OverviewShown"; - GlobalEvent[GlobalEvent["OverviewHidden"] = 4] = "OverviewHidden"; -})(GlobalEvent || (GlobalEvent = {})); -export var WindowEvent; -(function (WindowEvent) { - WindowEvent[WindowEvent["Size"] = 0] = "Size"; - WindowEvent[WindowEvent["Workspace"] = 1] = "Workspace"; - WindowEvent[WindowEvent["Minimize"] = 2] = "Minimize"; - WindowEvent[WindowEvent["Maximize"] = 3] = "Maximize"; - WindowEvent[WindowEvent["Fullscreen"] = 4] = "Fullscreen"; -})(WindowEvent || (WindowEvent = {})); -export function global(event) { - return { tag: 4, event }; -} -export function window_move(ext, window, rect) { - ext.movements.insert(window.entity, rect); - return { tag: 2, window, kind: { tag: 1 } }; -} -export function window_event(window, event) { - return { tag: 2, window, kind: { tag: 2, event } }; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/executor.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/executor.js deleted file mode 100644 index ccf4a706..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/executor.js +++ /dev/null @@ -1,90 +0,0 @@ -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -}; -var _GLibExecutor_event_loop, _GLibExecutor_events, _OnceExecutor_iterable, _OnceExecutor_signal, _ChannelExecutor_channel, _ChannelExecutor_signal; -import GLib from 'gi://GLib'; -export class GLibExecutor { - constructor() { - _GLibExecutor_event_loop.set(this, null); - _GLibExecutor_events.set(this, new Array()); - } - wake(system, event) { - __classPrivateFieldGet(this, _GLibExecutor_events, "f").unshift(event); - if (__classPrivateFieldGet(this, _GLibExecutor_event_loop, "f")) - return; - __classPrivateFieldSet(this, _GLibExecutor_event_loop, GLib.idle_add(GLib.PRIORITY_DEFAULT, () => { - let event = __classPrivateFieldGet(this, _GLibExecutor_events, "f").pop(); - if (event) - system.run(event); - if (__classPrivateFieldGet(this, _GLibExecutor_events, "f").length === 0) { - __classPrivateFieldSet(this, _GLibExecutor_event_loop, null, "f"); - return false; - } - return true; - }), "f"); - } -} -_GLibExecutor_event_loop = new WeakMap(), _GLibExecutor_events = new WeakMap(); -export class OnceExecutor { - constructor(iterable) { - _OnceExecutor_iterable.set(this, void 0); - _OnceExecutor_signal.set(this, null); - __classPrivateFieldSet(this, _OnceExecutor_iterable, iterable, "f"); - } - start(delay, apply, then) { - this.stop(); - const iterator = __classPrivateFieldGet(this, _OnceExecutor_iterable, "f")[Symbol.iterator](); - __classPrivateFieldSet(this, _OnceExecutor_signal, GLib.timeout_add(GLib.PRIORITY_DEFAULT, delay, () => { - const next = iterator.next().value; - if (typeof next === 'undefined') { - if (then) - GLib.timeout_add(GLib.PRIORITY_DEFAULT, delay, () => { - then(); - return false; - }); - return false; - } - return apply(next); - }), "f"); - } - stop() { - if (__classPrivateFieldGet(this, _OnceExecutor_signal, "f") !== null) - GLib.source_remove(__classPrivateFieldGet(this, _OnceExecutor_signal, "f")); - } -} -_OnceExecutor_iterable = new WeakMap(), _OnceExecutor_signal = new WeakMap(); -export class ChannelExecutor { - constructor() { - _ChannelExecutor_channel.set(this, new Array()); - _ChannelExecutor_signal.set(this, null); - } - clear() { - __classPrivateFieldGet(this, _ChannelExecutor_channel, "f").splice(0); - } - get length() { - return __classPrivateFieldGet(this, _ChannelExecutor_channel, "f").length; - } - send(v) { - __classPrivateFieldGet(this, _ChannelExecutor_channel, "f").push(v); - } - start(delay, apply) { - this.stop(); - __classPrivateFieldSet(this, _ChannelExecutor_signal, GLib.timeout_add(GLib.PRIORITY_DEFAULT, delay, () => { - const e = __classPrivateFieldGet(this, _ChannelExecutor_channel, "f").shift(); - return typeof e === 'undefined' ? true : apply(e); - }), "f"); - } - stop() { - if (__classPrivateFieldGet(this, _ChannelExecutor_signal, "f") !== null) - GLib.source_remove(__classPrivateFieldGet(this, _ChannelExecutor_signal, "f")); - } -} -_ChannelExecutor_channel = new WeakMap(), _ChannelExecutor_signal = new WeakMap(); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/extension.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/extension.js deleted file mode 100644 index f2fb8094..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/extension.js +++ /dev/null @@ -1,2314 +0,0 @@ -import * as Config from './config.js'; -import * as Forest from './forest.js'; -import * as Ecs from './ecs.js'; -import * as Events from './events.js'; -import * as Focus from './focus.js'; -import * as Geom from './geom.js'; -import * as GrabOp from './grab_op.js'; -import * as Keybindings from './keybindings.js'; -import * as Lib from './lib.js'; -import * as log from './log.js'; -import * as PanelSettings from './panel_settings.js'; -import * as Rect from './rectangle.js'; -import * as Settings from './settings.js'; -import * as Tiling from './tiling.js'; -import * as Window from './window.js'; -import * as launcher from './launcher.js'; -import * as auto_tiler from './auto_tiler.js'; -import * as node from './node.js'; -import * as utils from './utils.js'; -import * as Executor from './executor.js'; -import * as movement from './movement.js'; -import * as stack from './stack.js'; -import * as add_exception from './dialog_add_exception.js'; -import * as exec from './executor.js'; -import * as dbus_service from './dbus_service.js'; -import * as scheduler from './scheduler.js'; -import { Extension } from 'resource:///org/gnome/shell/extensions/extension.js'; -const display = global.display; -const wim = global.window_manager; -const wom = global.workspace_manager; -const Movement = movement.Movement; -import GLib from 'gi://GLib'; -import Gio from 'gi://Gio'; -import St from 'gi://St'; -import Shell from 'gi://Shell'; -import Meta from 'gi://Meta'; -const { GlobalEvent, WindowEvent } = Events; -const { cursor_rect, is_keyboard_op, is_resize_op, is_move_op } = Lib; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -const { layoutManager, loadTheme, overview, panel, setThemeStylesheet, screenShield, sessionMode, windowAttentionHandler, } = Main; -import { ScreenShield } from 'resource:///org/gnome/shell/ui/screenShield.js'; -import { WindowSwitcherPopup, } from 'resource:///org/gnome/shell/ui/altTab.js'; -import { Workspace } from 'resource:///org/gnome/shell/ui/workspace.js'; -import { WorkspaceThumbnail } from 'resource:///org/gnome/shell/ui/workspaceThumbnail.js'; -import { WindowPreview } from 'resource:///org/gnome/shell/ui/windowPreview.js'; -import { PACKAGE_VERSION } from 'resource:///org/gnome/shell/misc/config.js'; -import * as Tags from './tags.js'; -import { get_current_path } from './paths.js'; -const STYLESHEET_PATHS = ['light', 'dark', 'highcontrast'].map(stylesheet_path); -const STYLESHEETS = STYLESHEET_PATHS.map((path) => Gio.File.new_for_path(path)); -const GNOME_VERSION = PACKAGE_VERSION; -var Style; -(function (Style) { - Style[Style["Light"] = 0] = "Light"; - Style[Style["Dark"] = 1] = "Dark"; - Style[Style["HighContrast"] = 2] = "HighContrast"; -})(Style || (Style = {})); -export class Ext extends Ecs.System { - constructor() { - super(new Executor.GLibExecutor()); - this.keybindings = new Keybindings.Keybindings(this); - this.settings = new Settings.ExtensionSettings(); - this.overlay = new St.BoxLayout({ style_class: 'pop-shell-overlay', visible: false }); - this.window_search = new launcher.Launcher(this); - this.dbus = new dbus_service.Service(); - this.animate_windows = true; - this.button = null; - this.button_gio_icon_auto_on = null; - this.button_gio_icon_auto_off = null; - this.conf = new Config.Config(); - this.conf_watch = null; - this.column_size = 32; - this.current_style = Style.Dark; - this.displays_updating = null; - this.row_size = 32; - this.displays = [global.display.get_primary_monitor(), new Map()]; - this.dpi = St.ThemeContext.get_for_stage(global.stage).scale_factor; - this.drag_signal = null; - this.exception_selecting = false; - this.gap_inner = 0; - this.gap_inner_half = 0; - this.gap_inner_prev = 0; - this.gap_outer = 0; - this.gap_outer_prev = 0; - this.grab_op = null; - this.ignore_display_update = false; - this.injections = new Array(); - this.prev_focused = [null, null]; - this.init = true; - this.was_locked = false; - this.moved_by_mouse = false; - this.workareas_update = null; - this.signals = new Map(); - this.size_requests = new Map(); - this.workspace_active = new Map(); - this.ids = this.register_storage(); - this.monitors = this.register_storage(); - this.movements = this.register_storage(); - this.names = this.register_storage(); - this.size_changed_signal = 0; - this.size_signals = this.register_storage(); - this.snapped = this.register_storage(); - this.windows = this.register_storage(); - this.window_signals = this.register_storage(); - this.auto_tiler = null; - this.focus_selector = new Focus.FocusSelector(); - this.tiler = new Tiling.Tiler(this); - this.load_settings(); - this.reload_theme(); - this.register_fn(() => load_theme(this.current_style)); - this.conf.reload(); - if (this.settings.int) { - this.settings.int.connect('changed::gtk-theme', () => { - this.register(Events.global(GlobalEvent.GtkThemeChanged)); - }); - } - if (this.settings.shell) { - this.settings.shell.connect('changed::name', () => { - this.register(Events.global(GlobalEvent.GtkShellChanged)); - }); - } - this.dbus.FocusUp = () => this.focus_up(); - this.dbus.FocusDown = () => this.focus_down(); - this.dbus.FocusLeft = () => this.focus_left(); - this.dbus.FocusRight = () => this.focus_right(); - this.dbus.Launcher = () => this.window_search.open(this); - this.dbus.WindowFocus = (window) => { - const target_window = this.windows.get(window); - if (target_window) { - target_window.activate(); - this.on_focused(target_window); - } - this.window_search.close(); - }; - this.dbus.WindowList = () => { - const wins = new Array(); - for (const window of this.tab_list(Meta.TabList.NORMAL, null)) { - const string = window.window_app.get_id(); - wins.push([window.entity, window.title(), window.name(this), string ? string : '']); - } - return wins; - }; - this.dbus.WindowQuit = (win) => { - this.windows.get(win)?.meta.delete(global.get_current_time()); - this.window_search.close(); - }; - } - register_fn(callback, name) { - this.register({ tag: 1, callback, name }); - } - run(event) { - switch (event.tag) { - case 1: - event.callback(); - break; - case 2: - let win = event.window; - if (!win.actor_exists()) - return; - if (event.kind.tag === 1) { - const { window } = event; - let movement = this.movements.remove(window.entity); - if (!movement) - return; - let actor = window.meta.get_compositor_private(); - if (!actor) { - this.auto_tiler?.detach_window(this, window.entity); - return; - } - actor.remove_all_transitions(); - const { x, y, width, height } = movement; - window.meta.move_resize_frame(true, x, y, width, height); - window.meta.move_frame(true, x, y); - this.monitors.insert(window.entity, [win.meta.get_monitor(), win.workspace_id()]); - if (win.activate_after_move) { - win.activate_after_move = false; - win.activate(); - } - return; - } - switch (event.kind.event) { - case WindowEvent.Maximize: - this.unset_grab_op(); - this.on_maximize(win); - break; - case WindowEvent.Minimize: - this.unset_grab_op(); - this.on_minimize(win); - break; - case WindowEvent.Size: - if (this.auto_tiler && !win.is_maximized() && !win.meta.is_fullscreen()) { - this.auto_tiler.reflow(this, win.entity); - } - break; - case WindowEvent.Workspace: - this.on_workspace_changed(win); - break; - case WindowEvent.Fullscreen: - if (this.auto_tiler) { - let attachment = this.auto_tiler.attached.get(win.entity); - if (attachment) { - if (!win.meta.is_fullscreen()) { - let fork = this.auto_tiler.forest.forks.get(win.entity); - if (fork) { - this.auto_tiler.reflow(this, win.entity); - } - if (win.stack !== null) { - this.auto_tiler.forest.stacks.get(win.stack)?.set_visible(true); - } - } - else { - if (win.stack !== null) { - this.auto_tiler.forest.stacks.get(win.stack)?.set_visible(false); - } - } - } - } - break; - } - break; - case 3: - let actor = event.window.get_compositor_private(); - if (!actor) - return; - this.on_window_create(event.window, actor); - break; - case 4: - switch (event.event) { - case GlobalEvent.GtkShellChanged: - this.on_gtk_shell_changed(); - break; - case GlobalEvent.GtkThemeChanged: - this.on_gtk_theme_change(); - break; - case GlobalEvent.MonitorsChanged: - this.update_display_configuration(false); - break; - case GlobalEvent.OverviewShown: - this.on_overview_shown(); - break; - } - break; - } - } - activate_window(window) { - if (window) { - window.activate(); - } - } - active_monitor() { - return display.get_current_monitor(); - } - active_window_list() { - let workspace = wom.get_active_workspace(); - return this.tab_list(Meta.TabList.NORMAL_ALL, workspace); - } - active_workspace() { - return wom.get_active_workspace_index(); - } - actor_of(entity) { - const window = this.windows.get(entity); - return window ? window.meta.get_compositor_private() : null; - } - connect(object, property, callback) { - const signal = object.connect(property, callback); - const entry = this.signals.get(object); - if (entry) { - entry.push(signal); - } - else { - this.signals.set(object, [signal]); - } - return signal; - } - connect_meta(win, signal, callback) { - const id = win.meta.connect(signal, () => { - if (win.actor_exists()) - callback(); - }); - this.window_signals.get_or(win.entity, () => new Array()).push(id); - return id; - } - connect_size_signal(win, signal, func) { - return this.connect_meta(win, signal, () => { - if (!this.contains_tag(win.entity, Tags.Blocked)) - func(); - }); - } - connect_window(win) { - const size_event = () => { - const old = this.size_requests.get(win.meta); - if (old) { - try { - GLib.source_remove(old); - } - catch (_) { } - } - const new_s = GLib.timeout_add(GLib.PRIORITY_LOW, 500, () => { - this.register(Events.window_event(win, WindowEvent.Size)); - this.size_requests.delete(win.meta); - return false; - }); - this.size_requests.set(win.meta, new_s); - }; - this.connect_meta(win, 'workspace-changed', () => { - this.register(Events.window_event(win, WindowEvent.Workspace)); - }); - this.size_signals.insert(win.entity, [ - this.connect_size_signal(win, 'size-changed', size_event), - this.connect_size_signal(win, 'position-changed', size_event), - this.connect_size_signal(win, 'notify::minimized', () => { - this.register(Events.window_event(win, WindowEvent.Minimize)); - }), - ]); - } - exception_add(win) { - this.exception_selecting = false; - let d = new add_exception.AddExceptionDialog(() => this.exception_dialog(), () => { - let wmclass = win.meta.get_wm_class(); - if (wmclass !== null && wmclass.length === 0) { - wmclass = win.name(this); - } - if (wmclass) - this.conf.add_app_exception(wmclass); - this.exception_dialog(); - }, () => { - let wmclass = win.meta.get_wm_class(); - if (wmclass) - this.conf.add_window_exception(wmclass, win.title()); - this.exception_dialog(); - }, () => { - this.conf.reload(); - this.tiling_config_reapply(); - }); - d.open(); - } - exception_dialog() { - let path = get_current_path() + '/floating_exceptions/main.js'; - const event_handler = (event) => { - switch (event) { - case 'MODIFIED': - this.register_fn(() => { - this.conf.reload(); - this.tiling_config_reapply(); - }); - break; - case 'SELECT': - this.register_fn(() => this.exception_select()); - return false; - } - return true; - }; - const ipc = utils.async_process_ipc(['gjs', '--module', path]); - if (ipc) { - const generator = (stdout, res) => { - try { - const [bytes] = stdout.read_line_finish(res); - if (bytes) { - if (event_handler(imports.byteArray.toString(bytes).trim())) { - ipc.stdout.read_line_async(0, ipc.cancellable, generator); - } - } - } - catch (why) { - log.error(`failed to read response from floating exceptions dialog: ${why}`); - } - }; - ipc.stdout.read_line_async(0, ipc.cancellable, generator); - } - } - exception_select() { - GLib.timeout_add(GLib.PRIORITY_LOW, 500, () => { - this.exception_selecting = true; - overview.show(); - return false; - }); - } - exit_modes() { - this.tiler.exit(this); - this.window_search.reset(); - this.window_search.close(); - this.overlay.visible = false; - } - find_monitor_to_retach(width, height) { - if (!this.settings.workspaces_only_on_primary()) { - for (const [index, display] of this.displays[1]) { - if (display.area.width == width && display.area.height == height) { - return [index, display]; - } - } - } - const primary = display.get_primary_monitor(); - return [primary, this.displays[1].get(primary)]; - } - find_unused_workspace(monitor) { - if (!this.auto_tiler) - return [0, wom.get_workspace_by_index(0)]; - let id = 0; - const tiled_windows = new Array(); - for (const [window] of this.auto_tiler.attached.iter()) { - if (!this.auto_tiler.attached.contains(window)) - continue; - const win = this.windows.get(window); - if (win && !win.reassignment && win.meta.get_monitor() === monitor) - tiled_windows.push(win); - } - cancel: while (true) { - for (const window of tiled_windows) { - if (window.workspace_id() === id) { - id += 1; - continue cancel; - } - } - break; - } - let new_work; - if (id + 1 === wom.get_n_workspaces()) { - id += 1; - new_work = wom.append_new_workspace(true, global.get_current_time()); - } - else { - new_work = wom.get_workspace_by_index(id); - } - return [id, new_work]; - } - focus_left() { - this.stack_select((id, stack) => (id === 0 ? null : stack.tabs[id - 1].entity), () => this.activate_window(this.focus_selector.left(this, null))); - } - focus_right() { - this.stack_select((id, stack) => (stack.tabs.length > id + 1 ? stack.tabs[id + 1].entity : null), () => this.activate_window(this.focus_selector.right(this, null))); - } - focus_down() { - this.activate_window(this.focus_selector.down(this, null)); - } - focus_up() { - this.activate_window(this.focus_selector.up(this, null)); - } - focus_window() { - return this.get_window(display.get_focus_window()); - } - stack_select(select, focus_shift) { - const switched = this.stack_switch((stack) => { - if (!stack) - return false; - const stack_con = this.auto_tiler?.forest.stacks.get(stack.idx); - if (stack_con) { - const id = stack_con.active_id; - if (id !== -1) { - const next = select(id, stack_con); - if (next) { - stack_con.activate(next); - const window = this.windows.get(next); - if (window) { - window.activate(); - return true; - } - } - } - } - return false; - }); - if (!switched) { - focus_shift(); - } - } - stack_switch(apply) { - const window = this.focus_window(); - if (window) { - if (this.auto_tiler) { - const node = this.auto_tiler.find_stack(window.entity); - return node ? apply(node[1].inner) : false; - } - } - } - get_window(meta) { - let entity = this.window_entity(meta); - return entity ? this.windows.get(entity) : null; - } - inject(object, method, func) { - const prev = object[method]; - this.injections.push({ object, method, func: prev }); - object[method] = func; - } - injections_add() { - const screen_unlock_fn = ScreenShield.prototype['deactivate']; - this.inject(ScreenShield.prototype, 'deactivate', (args) => { - screen_unlock_fn.apply(screenShield, [args]); - this.update_display_configuration(true); - }); - } - injections_remove() { - for (const { object, method, func } of this.injections.splice(0)) { - object[method] = func; - } - } - load_settings() { - this.set_gap_inner(this.settings.gap_inner()); - this.set_gap_outer(this.settings.gap_outer()); - this.gap_inner_prev = this.gap_inner; - this.gap_outer_prev = this.gap_outer; - this.column_size = this.settings.column_size() * this.dpi; - this.row_size = this.settings.row_size() * this.dpi; - } - monitor_work_area(monitor) { - const meta = wom.get_active_workspace().get_work_area_for_monitor(monitor); - return Rect.Rectangle.from_meta(meta); - } - monitor_area(monitor) { - const rect = global.display.get_monitor_geometry(monitor); - return rect ? Rect.Rectangle.from_meta(rect) : null; - } - on_active_workspace_changed() { - this.register_fn(() => { - this.exit_modes(); - this.restack(); - const activate_window = (window) => { - this.on_focused(window); - window.activate(true); - this.prev_focused = [null, window.entity]; - }; - const focused = this.focus_window(); - if (focused && focused.same_workspace()) { - activate_window(focused); - return; - } - const workspace_id = this.active_workspace(); - const active = this.workspace_active.get(workspace_id); - if (active) { - const window = this.windows.get(active); - if (window && window.meta.get_workspace().index() == workspace_id && !window.meta.minimized) { - activate_window(window); - return; - } - } - const workspace = wom.get_workspace_by_index(workspace_id); - if (workspace) { - for (const win of workspace.list_windows()) { - const window = this.get_window(win); - if (window && !window.meta.minimized) { - activate_window(window); - return; - } - } - } - }); - } - on_destroy(win) { - if (this.tiler.window !== null && win == this.tiler.window) - this.tiler.exit(this); - const [prev_a, prev_b] = this.prev_focused; - if (prev_a && Ecs.entity_eq(win, prev_a)) { - this.prev_focused[0] = null; - } - else if (prev_b && Ecs.entity_eq(win, prev_b)) { - this.prev_focused[1] = this.prev_focused[0]; - this.prev_focused[0] = null; - } - const window = this.windows.get(win); - if (!window) - return; - const stack = window.stack; - window.destroying = true; - this.window_signals.take_with(win, (signals) => { - for (const signal of signals) { - window.meta.disconnect(signal); - } - }); - if (this.auto_tiler) { - const entity = this.auto_tiler.attached.get(win); - if (entity) { - const fork = this.auto_tiler.forest.forks.get(entity); - if (fork?.right?.is_window(win)) { - const entity = fork.right.inner.kind === 3 ? fork.right.inner.entities[0] : fork.right.inner.entity; - this.windows.with(entity, (sibling) => sibling.activate()); - } - } - } - if (this.auto_tiler) - this.auto_tiler.detach_window(this, win); - if (this.auto_tiler && stack !== null) { - const stack_object = this.auto_tiler.forest.stacks.get(stack); - const prev = this.prev_focused[1]; - if (stack_object && prev) { - const prev_window = this.windows.get(prev); - if (prev_window) { - if (prev_window.stack !== stack) { - stack_object.auto_activate(); - this.prev_focused = [null, stack_object.active]; - this.windows.get(stack_object.active)?.activate(); - } - } - } - } - this.movements.remove(win); - this.windows.remove(win); - this.delete_entity(win); - } - on_display_move(_from_id, _to_id) { - if (!this.auto_tiler) - return; - } - on_focused(win) { - this.workspace_active.set(this.active_workspace(), win.entity); - scheduler.setForeground(win.meta); - this.size_signals_unblock(win); - if (this.exception_selecting) { - this.exception_add(win); - } - if (this.prev_focused[1] !== win.entity) { - this.prev_focused[0] = this.prev_focused[1]; - this.prev_focused[1] = win.entity; - } - if (null !== this.auto_tiler && null !== win.stack) { - ext?.auto_tiler?.forest.stacks.get(win.stack)?.activate(win.entity); - } - this.unmaximize_workspace(win); - this.show_border_on_focused(); - if (this.auto_tiler && win.is_tilable(this) && this.prev_focused[0] !== null) { - let prev = this.windows.get(this.prev_focused[0]); - let is_attached = this.auto_tiler.attached.contains(this.prev_focused[0]); - if (prev && - prev !== win && - is_attached && - prev.actor_exists() && - prev.name(this) !== win.name(this) && - prev.workspace_id() === win.workspace_id()) { - if (prev.rect().contains(win.rect())) { - if (prev.is_maximized()) { - prev.meta.unmaximize(Meta.MaximizeFlags.BOTH); - } - } - else if (prev.stack) { - prev.meta.unmaximize(Meta.MaximizeFlags.BOTH); - this.auto_tiler.forest.stacks.get(prev.stack)?.restack(); - } - } - } - if (this.conf.log_on_focus) { - let msg = `focused Window(${win.entity}) {\n` + - ` class: "${win.meta.get_wm_class()}",\n` + - ` cmdline: ${win.cmdline()},\n` + - ` monitor: ${win.meta.get_monitor()},\n` + - ` name: ${win.name(this)},\n` + - ` rect: ${win.rect().fmt()},\n` + - ` workspace: ${win.workspace_id()},\n` + - ` xid: ${win.xid()},\n` + - ` stack: ${win.stack},\n`; - if (this.auto_tiler) { - msg += ` fork: (${this.auto_tiler.attached.get(win.entity)}),\n`; - } - log.debug(msg + '}'); - } - } - on_tile_attach(entity, window) { - if (this.auto_tiler) { - if (!this.auto_tiler.attached.contains(window)) { - this.windows.with(window, (w) => { - if (w.prev_rect === null) { - w.prev_rect = w.meta.get_frame_rect(); - } - }); - } - this.auto_tiler.attached.insert(window, entity); - } - } - on_tile_detach(win) { - this.windows.with(win, (window) => { - if (window.prev_rect && !window.ignore_detach) { - this.register(Events.window_move(this, window, window.prev_rect)); - window.prev_rect = null; - } - }); - } - show_border_on_focused() { - this.hide_all_borders(); - const focus = this.focus_window(); - if (focus) - focus.show_border(); - } - hide_all_borders() { - for (const win of this.windows.values()) { - win.hide_border(); - } - } - maximized_on_active_display() { - const aws = this.workspace_id(); - for (const window of this.windows.values()) { - if (!window.actor_exists()) - continue; - const wws = this.workspace_id(window); - if (aws[0] === wws[0] && aws[1] === wws[1]) { - if (window.is_maximized()) - return true; - } - } - return false; - } - on_gap_inner() { - let current = this.settings.gap_inner(); - this.set_gap_inner(current); - let prev_gap = this.gap_inner_prev / 4 / this.dpi; - if (current != prev_gap) { - this.update_inner_gap(); - Gio.Settings.sync(); - } - } - update_inner_gap() { - if (this.auto_tiler) { - for (const [entity] of this.auto_tiler.forest.toplevel.values()) { - const fork = this.auto_tiler.forest.forks.get(entity); - if (fork) { - this.auto_tiler.tile(this, fork, fork.area); - } - } - } - else { - this.update_snapped(); - } - } - unmaximize_workspace(win) { - if (this.auto_tiler) { - let mon; - let work; - if (!win.is_tilable(this)) { - return; - } - mon = win.meta.get_monitor(); - work = win.meta.get_workspace().index(); - for (const [, compare] of this.windows.iter()) { - const is_same_space = compare.meta.get_monitor() === mon && compare.meta.get_workspace().index() === work; - if (is_same_space && - !this.contains_tag(compare.entity, Tags.Floating) && - compare.is_maximized() && - win.entity[0] !== compare.entity[0]) { - compare.meta.unmaximize(Meta.MaximizeFlags.BOTH); - } - } - } - } - on_gap_outer() { - let current = this.settings.gap_outer(); - this.set_gap_outer(current); - let prev_gap = this.gap_outer_prev / 4 / this.dpi; - let diff = current - prev_gap; - if (diff != 0) { - this.set_gap_outer(current); - this.update_outer_gap(diff); - Gio.Settings.sync(); - } - } - update_outer_gap(diff) { - if (this.auto_tiler) { - for (const [entity] of this.auto_tiler.forest.toplevel.values()) { - const fork = this.auto_tiler.forest.forks.get(entity); - if (fork) { - fork.area.array[0] += diff * 4; - fork.area.array[1] += diff * 4; - fork.area.array[2] -= diff * 8; - fork.area.array[3] -= diff * 8; - this.auto_tiler.tile(this, fork, fork.area); - } - } - } - else { - this.update_snapped(); - } - } - on_grab_end(meta, op) { - let win = this.get_window(meta); - if (win !== null) { - win.grab = false; - } - if (null === win || !win.is_tilable(this)) { - this.unset_grab_op(); - return; - } - this.on_grab_end_(win, op); - this.unset_grab_op(); - } - on_grab_end_(win, op) { - this.moved_by_mouse = true; - this.size_signals_unblock(win); - if (win.meta && win.meta.minimized) { - this.on_minimize(win); - return; - } - if (win.is_maximized()) { - return; - } - const grab_op = this.grab_op; - if (!win) { - log.error('an entity was dropped, but there is no window'); - return; - } - if (this.auto_tiler && op === undefined) { - let mon = this.monitors.get(win.entity); - if (mon) { - let rect = win.meta.get_work_area_for_monitor(mon[0]); - if (rect && Rect.Rectangle.from_meta(rect).contains(cursor_rect())) { - this.auto_tiler.reflow(this, win.entity); - } - else { - this.auto_tiler.on_drop(this, win, true); - } - } - return; - } - if (!(grab_op && Ecs.entity_eq(grab_op.entity, win.entity))) { - log.error(`grabbed entity is not the same as the one that was dropped`); - return; - } - if (this.auto_tiler) { - let crect = win.rect(); - const rect = grab_op.rect; - if (is_move_op(op)) { - const cmon = win.meta.get_monitor(); - const prev_mon = this.monitors.get(win.entity); - const mon_drop = prev_mon ? prev_mon[0] !== cmon : false; - this.monitors.insert(win.entity, [win.meta.get_monitor(), win.workspace_id()]); - if (rect.x != crect.x || rect.y != crect.y) { - if (rect.contains(cursor_rect())) { - if (this.auto_tiler.attached.contains(win.entity)) { - this.auto_tiler.on_drop(this, win, mon_drop); - } - else { - this.auto_tiler.reflow(this, win.entity); - } - } - else { - this.auto_tiler.on_drop(this, win, mon_drop); - } - } - } - else { - const fork_entity = this.auto_tiler.attached.get(win.entity); - if (fork_entity) { - const forest = this.auto_tiler.forest; - const fork = forest.forks.get(fork_entity); - if (fork) { - if (win.stack) { - const tab_dimension = this.dpi * stack.TAB_HEIGHT; - crect.height += tab_dimension; - crect.y -= tab_dimension; - } - let top_level = forest.find_toplevel(this.workspace_id()); - if (top_level) { - crect.clamp(forest.forks.get(top_level).area); - } - const movement = grab_op.operation(crect); - if (this.movement_is_valid(win, movement)) { - forest.resize(this, fork_entity, fork, win.entity, movement, crect); - forest.arrange(this, fork.workspace); - } - else { - forest.tile(this, fork, fork.area); - } - } - else { - log.error(`no fork component found`); - } - } - else { - log.error(`no fork entity found`); - } - } - } - else if (this.settings.snap_to_grid()) { - this.tiler.snap(this, win); - } - } - previously_focused(active) { - for (const id of [1, 0]) { - const prev = this.prev_focused[id]; - if (prev && !Ecs.entity_eq(active.entity, prev)) { - return prev; - } - } - return null; - } - movement_is_valid(win, movement) { - if ((movement & Movement.SHRINK) !== 0) { - if ((movement & Movement.DOWN) !== 0) { - const w = this.focus_selector.up(this, win); - if (!w) - return false; - const r = w.rect(); - if (r.y + r.height > win.rect().y) - return false; - } - else if ((movement & Movement.UP) !== 0) { - const w = this.focus_selector.down(this, win); - if (!w) - return false; - const r = w.rect(); - if (r.y + r.height < win.rect().y) - return false; - } - else if ((movement & Movement.LEFT) !== 0) { - const w = this.focus_selector.right(this, win); - if (!w) - return false; - const r = w.rect(); - if (r.x + r.width < win.rect().x) - return false; - } - else if ((movement & Movement.RIGHT) !== 0) { - const w = this.focus_selector.left(this, win); - if (!w) - return false; - const r = w.rect(); - if (r.x + r.width > win.rect().x) - return false; - } - } - return true; - } - workspace_window_move(win, prev_monitor, next_monitor) { - const prev_area = win.meta.get_work_area_for_monitor(prev_monitor); - const next_area = win.meta.get_work_area_for_monitor(next_monitor); - if (prev_area && next_area) { - let rect = win.rect(); - let h_ratio = 1; - let w_ratio = 1; - h_ratio = next_area.height / prev_area.height; - rect.height = rect.height * h_ratio; - w_ratio = next_area.width / prev_area.width; - rect.width = rect.width * w_ratio; - if (next_area.x < prev_area.x) { - rect.x = ((next_area.x + rect.x - prev_area.x) / prev_area.width) * next_area.width; - } - else if (next_area.x > prev_area.x) { - rect.x = (rect.x / prev_area.width) * next_area.width + next_area.x; - } - if (next_area.y < prev_area.y) { - rect.y = ((next_area.y + rect.y - prev_area.y) / prev_area.height) * next_area.height; - } - else if (next_area.y > prev_area.y) { - rect.y = (rect.y / prev_area.height) * next_area.height + next_area.y; - } - if (this.auto_tiler) { - if (this.is_floating(win)) { - win.meta.unmaximize(Meta.MaximizeFlags.HORIZONTAL); - win.meta.unmaximize(Meta.MaximizeFlags.VERTICAL); - win.meta.unmaximize(Meta.MaximizeFlags.BOTH); - } - this.register(Events.window_move(this, win, rect)); - } - else { - win.move(this, rect, () => { }); - if (rect.width == next_area.width && rect.height == next_area.height) { - win.meta.maximize(Meta.MaximizeFlags.BOTH); - } - } - } - } - move_monitor(direction) { - const win = this.focus_window(); - if (!win) - return; - const prev_monitor = win.meta.get_monitor(); - const next_monitor = Tiling.locate_monitor(win, direction); - if (next_monitor !== null) { - if (this.auto_tiler && !this.is_floating(win)) { - win.ignore_detach = true; - this.auto_tiler.detach_window(this, win.entity); - this.auto_tiler.attach_to_workspace(this, win, [next_monitor[0], win.workspace_id()]); - } - else { - this.workspace_window_move(win, prev_monitor, next_monitor[0]); - } - } - win.activate_after_move = true; - } - move_workspace(direction) { - const win = this.focus_window(); - if (!win) - return; - const workspace_move = (direction) => { - const ws = win.meta.get_workspace(); - let neighbor = ws.get_neighbor(direction); - const last_window = () => { - const last = wom.get_n_workspaces() - 2 === ws.index() && ws.n_windows === 1; - return last; - }; - const place_on_nearest_window = (auto_tiler, ws, monitor) => { - const src = win.meta.get_frame_rect(); - auto_tiler.detach_window(this, win.entity); - const index = ws.index(); - const coord = [src.x, src.y]; - let nearest_window = null; - let nearest_distance = null; - for (const [entity, window] of this.windows.iter()) { - const other_monitor = window.meta.get_monitor(); - const other_index = window.meta.get_workspace().index(); - if (!this.contains_tag(entity, Tags.Floating) && - other_monitor == monitor && - other_index === index && - !Ecs.entity_eq(win.entity, window.entity)) { - const other_rect = window.rect(); - const other_coord = [other_rect.x, other_rect.y]; - const distance = Geom.distance(coord, other_coord); - if (nearest_distance === null || nearest_distance > distance) { - nearest_window = window; - nearest_distance = distance; - } - } - } - if (nearest_window === null) { - auto_tiler.attach_to_workspace(this, win, [monitor, index]); - } - else { - auto_tiler.attach_to_window(this, nearest_window, win, { src }, false); - } - }; - const move_to_neighbor = (neighbor) => { - const monitor = win.meta.get_monitor(); - if (this.auto_tiler && win.is_tilable(this)) { - win.ignore_detach = true; - place_on_nearest_window(this.auto_tiler, neighbor, monitor); - if (win.meta.minimized) { - this.size_signals_block(win); - win.meta.change_workspace_by_index(neighbor.index(), false); - this.size_signals_unblock(win); - } - } - else { - this.workspace_window_move(win, monitor, monitor); - } - this.workspace_active.set(neighbor.index(), win.entity); - win.activate_after_move = true; - }; - if (neighbor && neighbor.index() !== ws.index()) { - move_to_neighbor(neighbor); - } - else if (direction === Meta.MotionDirection.DOWN && !last_window()) { - if (this.settings.dynamic_workspaces()) { - neighbor = wom.append_new_workspace(false, global.get_current_time()); - } - else { - return; - } - } - else if (direction === Meta.MotionDirection.UP && ws.index() === 0) { - if (this.settings.dynamic_workspaces()) { - wom.append_new_workspace(false, global.get_current_time()); - this.on_workspace_modify(() => true, (current) => current + 1, true); - neighbor = wom.get_workspace_by_index(0); - if (!neighbor) - return; - move_to_neighbor(neighbor); - } - else { - return; - } - } - else { - return; - } - this.size_signals_block(win); - win.meta.change_workspace_by_index(neighbor.index(), true); - neighbor.activate_with_focus(win.meta, global.get_current_time()); - this.size_signals_unblock(win); - }; - switch (direction) { - case Meta.DisplayDirection.DOWN: - workspace_move(Meta.MotionDirection.DOWN); - break; - case Meta.DisplayDirection.UP: - workspace_move(Meta.MotionDirection.UP); - break; - } - if (this.auto_tiler) - this.restack(); - } - on_grab_start(meta, op) { - if (!meta) - return; - let win = this.get_window(meta); - if (win) { - win.grab = true; - if (win.is_tilable(this)) { - let entity = win.entity; - let rect = win.rect(); - this.unset_grab_op(); - this.grab_op = new GrabOp.GrabOp(entity, rect); - this.size_signals_block(win); - if (overview.visible || !win || is_keyboard_op(op) || is_resize_op(op)) - return; - const workspace = this.active_workspace(); - this.drag_signal = GLib.timeout_add(GLib.PRIORITY_LOW, 200, () => { - this.overlay.visible = false; - if (!win || !this.auto_tiler || !this.grab_op || this.grab_op.entity !== entity) { - this.drag_signal = null; - return false; - } - const [cursor, monitor] = this.cursor_status(); - let attach_to = null; - for (const found of this.windows_at_pointer(cursor, monitor, workspace)) { - if (found != win && this.auto_tiler.attached.contains(found.entity)) { - attach_to = found; - break; - } - } - const fork = this.auto_tiler.get_parent_fork(entity); - if (!fork) - return true; - let windowless = this.auto_tiler.largest_on_workspace(this, monitor, workspace) === null; - if (attach_to === null) { - if (fork.left.inner.kind === 2 && fork.right?.inner.kind === 2) { - let attaching = fork.left.is_window(entity) - ? fork.right.inner.entity - : fork.left.inner.entity; - attach_to = this.windows.get(attaching); - } - } - let area, monitor_attachment; - if (windowless) { - [area, monitor_attachment] = [this.monitor_work_area(monitor), true]; - area.x += this.gap_outer; - area.y += this.gap_outer; - area.width -= this.gap_outer * 2; - area.height -= this.gap_outer * 2; - } - else if (attach_to) { - const is_sibling = this.auto_tiler.windows_are_siblings(entity, attach_to.entity); - [area, monitor_attachment] = - (win.stack === null && attach_to.stack === null && is_sibling) || - (win.stack === null && is_sibling) - ? [fork.area, false] - : [attach_to.meta.get_frame_rect(), false]; - } - else { - return true; - } - const result = monitor_attachment ? null : auto_tiler.cursor_placement(this, area, cursor); - if (!result) { - this.overlay.x = area.x; - this.overlay.y = area.y; - this.overlay.width = area.width; - this.overlay.height = area.height; - this.overlay.visible = true; - return true; - } - const { orientation, swap } = result; - const half_width = area.width / 2; - const half_height = area.height / 2; - let new_area = orientation === Lib.Orientation.HORIZONTAL - ? swap - ? [area.x, area.y, half_width, area.height] - : [area.x + half_width, area.y, half_width, area.height] - : swap - ? [area.x, area.y, area.width, half_height] - : [area.x, area.y + half_height, area.width, half_height]; - this.overlay.x = new_area[0]; - this.overlay.y = new_area[1]; - this.overlay.width = new_area[2]; - this.overlay.height = new_area[3]; - this.overlay.visible = true; - return true; - }); - } - } - } - on_gtk_shell_changed() { - this.reload_theme(); - load_theme(this.current_style); - } - on_gtk_theme_change() { - this.reload_theme(); - load_theme(this.current_style); - } - reload_theme() { - this.current_style = this.settings.is_dark() - ? Style.Dark - : this.settings.is_high_contrast() - ? Style.HighContrast - : Style.Light; - } - on_maximize(win) { - if (win.is_maximized()) { - const actor = win.meta.get_compositor_private(); - if (actor) - global.window_group.set_child_above_sibling(actor, null); - this.on_monitor_changed(win, (_cfrom, cto, workspace) => { - if (win) { - win.ignore_detach = true; - this.monitors.insert(win.entity, [cto, workspace]); - this.auto_tiler?.detach_window(this, win.entity); - } - }); - } - else { - this.register_fn(() => { - if (this.auto_tiler) { - let fork_ent = this.auto_tiler.attached.get(win.entity); - if (fork_ent) { - let fork = this.auto_tiler.forest.forks.get(fork_ent); - if (fork) - this.auto_tiler.tile(this, fork, fork.area); - } - } - }); - } - } - on_minimize(win) { - if (this.focus_window() == win && this.settings.active_hint()) { - if (win.meta.minimized) { - win.hide_border(); - } - else { - this.show_border_on_focused(); - } - } - if (this.auto_tiler) { - if (win.meta.minimized) { - const attached = this.auto_tiler.attached.get(win.entity); - if (!attached) - return; - const fork = this.auto_tiler.forest.forks.get(attached); - if (!fork) - return; - let attachment; - if (win.stack !== null) { - attachment = win.stack; - } - else { - attachment = fork.left.is_window(win.entity); - } - win.was_attached_to = [attached, attachment]; - this.auto_tiler.detach_window(this, win.entity); - } - else if (!this.contains_tag(win.entity, Tags.Floating)) { - if (win.was_attached_to) { - const [entity, attachment] = win.was_attached_to; - delete win.was_attached_to; - const tiler = this.auto_tiler; - const fork = tiler.forest.forks.get(entity); - if (fork) { - if (typeof attachment === 'boolean') { - tiler.forest.attach_fork(this, fork, win.entity, attachment); - tiler.tile(this, fork, fork.area); - return; - } - else { - const stack = tiler.forest.stacks.get(attachment); - if (stack) { - const stack_info = tiler.find_stack(stack.active); - if (stack_info) { - const node = stack_info[1].inner; - win.stack = attachment; - node.entities.push(win.entity); - tiler.update_stack(this, node); - tiler.forest.on_attach(fork.entity, win.entity); - stack.activate(win.entity); - tiler.tile(this, fork, fork.area); - return; - } - } - } - } - } - this.auto_tiler.auto_tile(this, win, false); - } - } - } - on_monitor_changed(win, func) { - const actual_monitor = win.meta.get_monitor(); - const actual_workspace = win.workspace_id(); - const monitor = this.monitors.get(win.entity); - if (monitor) { - const [expected_monitor, expected_workspace] = monitor; - if (expected_monitor != actual_monitor || actual_workspace != expected_workspace) { - func(expected_monitor, actual_monitor, actual_workspace); - } - } - else { - func(null, actual_monitor, actual_workspace); - } - } - on_overview_shown() { - this.exit_modes(); - this.unset_grab_op(); - } - on_show_window_titles() { - const show_title = this.settings.show_title(); - if (indicator) { - indicator.toggle_titles.setToggleState(show_title); - } - for (const window of this.windows.values()) { - if (window.meta.is_client_decorated()) - continue; - if (show_title) { - window.decoration_show(this); - } - else { - window.decoration_hide(this); - } - } - } - on_smart_gap() { - if (this.auto_tiler) { - const smart_gaps = this.settings.smart_gaps(); - for (const [entity, [mon]] of this.auto_tiler.forest.toplevel.values()) { - const node = this.auto_tiler.forest.forks.get(entity); - if (node?.right === null) { - this.auto_tiler.update_toplevel(this, node, mon, smart_gaps); - } - } - } - } - on_window_create(window, actor) { - let win = this.get_window(window); - if (win) { - const entity = win.entity; - actor.connect('destroy', () => { - if (win && win.border) { - win.border.destroy(); - win.border = null; - } - this.on_destroy(entity); - return false; - }); - if (win.is_tilable(this)) { - this.connect_window(win); - } - } - } - on_workspace_added(_number) { - this.ignore_display_update = true; - } - on_workspace_changed(win) { - if (this.auto_tiler && !this.contains_tag(win.entity, Tags.Floating)) { - const id = this.workspace_id(win); - const prev_id = this.monitors.get(win.entity); - if (!prev_id || id[0] != prev_id[0] || id[1] != prev_id[1]) { - win.ignore_detach = true; - this.monitors.insert(win.entity, id); - if (win.is_tilable(this)) { - this.auto_tiler.detach_window(this, win.entity); - this.auto_tiler.attach_to_workspace(this, win, id); - } - } - if (win.meta.minimized) { - this.size_signals_block(win); - win.meta.unminimize(); - this.size_signals_unblock(win); - } - } - } - on_workspace_index_changed(prev, next) { - this.on_workspace_modify((current) => current == prev, (_) => next); - } - on_workspace_modify(condition, modify, change_workspace = false) { - function window_move(ext, entity, ws) { - if (change_workspace) { - const window = ext.windows.get(entity); - if (!window || !window.actor_exists() || window.meta.is_on_all_workspaces()) - return; - ext.size_signals_block(window); - window.meta.change_workspace_by_index(ws, false); - ext.size_signals_unblock(window); - } - } - if (this.auto_tiler) { - for (const [entity, monitor] of this.auto_tiler.forest.toplevel.values()) { - if (condition(monitor[1])) { - const value = modify(monitor[1]); - monitor[1] = value; - let fork = this.auto_tiler.forest.forks.get(entity); - if (fork) { - fork.workspace = value; - for (const child of this.auto_tiler.forest.iter(entity)) { - if (child.inner.kind === 1) { - fork = this.auto_tiler.forest.forks.get(child.inner.entity); - if (fork) - fork.workspace = value; - } - else if (child.inner.kind === 2) { - window_move(this, child.inner.entity, value); - } - else if (child.inner.kind === 3) { - let stack = this.auto_tiler.forest.stacks.get(child.inner.idx); - if (stack) { - stack.workspace = value; - for (const entity of child.inner.entities) { - window_move(this, entity, value); - } - stack.restack(); - } - } - } - } - } - } - for (const window of this.windows.values()) { - if (!window.actor_exists()) - this.auto_tiler.detach_window(this, window.entity); - } - } - else { - let to_delete = new Array(); - for (const [entity, window] of this.windows.iter()) { - if (!window.actor_exists()) { - to_delete.push(entity); - continue; - } - const ws = window.workspace_id(); - if (condition(ws)) { - window_move(this, entity, modify(ws)); - } - } - for (const e of to_delete) - this.delete_entity(e); - } - } - on_workspace_removed(number) { - this.on_workspace_modify((current) => current > number, (prev) => prev - 1); - } - restack() { - let attempts = 0; - GLib.timeout_add(GLib.PRIORITY_LOW, 50, () => { - if (this.auto_tiler) { - for (const container of this.auto_tiler.forest.stacks.values()) { - container.restack(); - } - } - let x = attempts; - attempts += 1; - return x < 10; - }); - } - set_gap_inner(gap) { - this.gap_inner_prev = this.gap_inner; - this.gap_inner = gap * 4 * this.dpi; - this.gap_inner_half = this.gap_inner / 2; - } - set_gap_outer(gap) { - this.gap_outer_prev = this.gap_outer; - this.gap_outer = gap * 4 * this.dpi; - } - set_overlay(rect) { - this.overlay.x = rect.x; - this.overlay.y = rect.y; - this.overlay.width = rect.width; - this.overlay.height = rect.height; - } - signals_attach() { - this.tiler.queue.start(100, (movement) => { - movement(); - return true; - }); - const workspace_manager = wom; - for (const [, ws] of iter_workspaces(workspace_manager)) { - let index = ws.index(); - this.connect(ws, 'notify::workspace-index', () => { - if (ws !== null) { - let new_index = ws.index(); - this.on_workspace_index_changed(index, new_index); - index = new_index; - } - }); - } - this.connect(display, 'workareas-changed', () => { - this.update_display_configuration(true); - }); - this.size_changed_signal = this.connect(wim, 'size-change', (_, actor, event, _before, _after) => { - if (this.auto_tiler) { - let win = this.get_window(actor.get_meta_window()); - if (!win) - return; - if (event === Meta.SizeChange.MAXIMIZE || event === Meta.SizeChange.UNMAXIMIZE) { - this.register(Events.window_event(win, WindowEvent.Maximize)); - } - else { - this.register(Events.window_event(win, WindowEvent.Fullscreen)); - } - } - }); - this.connect(this.settings.ext, 'changed', (_s, key) => { - switch (key) { - case 'active-hint': - if (indicator) - indicator.toggle_active.setToggleState(this.settings.active_hint()); - this.show_border_on_focused(); - case 'gap-inner': - this.on_gap_inner(); - break; - case 'gap-outer': - this.on_gap_outer(); - break; - case 'show-title': - this.on_show_window_titles(); - break; - case 'smart-gaps': - this.on_smart_gap(); - this.show_border_on_focused(); - break; - case 'show-skip-taskbar': - if (this.settings.show_skiptaskbar()) { - _show_skip_taskbar_windows(this); - } - else { - _hide_skip_taskbar_windows(); - } - } - }); - if (this.settings.mutter) { - this.connect(this.settings.mutter, 'changed::workspaces-only-on-primary', () => { - this.register(Events.global(GlobalEvent.MonitorsChanged)); - }); - } - this.connect(layoutManager, 'monitors-changed', () => { - this.register(Events.global(GlobalEvent.MonitorsChanged)); - }); - this.connect(sessionMode, 'updated', () => { - if (indicator) { - indicator.button.visible = !sessionMode.isLocked; - } - if (sessionMode.isLocked) { - this.exit_modes(); - } - }); - this.connect(overview, 'showing', () => { - this.register(Events.global(GlobalEvent.OverviewShown)); - }); - this.connect(overview, 'hiding', () => { - const window = this.focus_window(); - if (window) { - this.on_focused(window); - } - this.register(Events.global(GlobalEvent.OverviewHidden)); - }); - this.register_fn(() => { - if (screenShield?.locked) - this.update_display_configuration(false); - this.connect(display, 'notify::focus-window', () => { - if (Main.modalCount !== 0) { - const { actor } = Main.modalActorFocusStack[0]; - if (actor.style_class !== 'switcher-popup') { - return; - } - } - const refocus_tiled_window = () => { - let window = null; - const [x, y] = this.prev_focused; - if (y) { - window = this.windows.get(y); - } - if (window === null && x) { - window = this.windows.get(x); - } - if (window && window.same_monitor() && window.same_workspace() && !window.meta.minimized) { - window.activate(false); - } - else { - this.hide_all_borders(); - } - }; - this.register_fn(() => { - let meta_window = global.display.get_focus_window(); - if (meta_window) { - const shell_window = this.get_window(meta_window); - if (shell_window) { - if (shell_window.entity !== this.prev_focused[1] && !shell_window.meta.minimized) { - this.on_focused(shell_window); - } - } - else if (!meta_window.is_override_redirect()) { - if (this.auto_tiler && meta_window.window_type === Meta.WindowType.DESKTOP) { - refocus_tiled_window(); - } - else { - meta_window.activate(global.get_current_time()); - } - } - } - else if (this.auto_tiler) { - refocus_tiled_window(); - } - }); - return false; - }); - const window = this.focus_window(); - if (window) { - this.on_focused(window); - } - return false; - }); - this.connect(display, 'window_created', (_, window) => { - this.register({ tag: 3, window }); - }); - if (GNOME_VERSION?.startsWith('3.')) { - this.connect(display, 'grab-op-begin', (_, _display, win, op) => { - this.on_grab_start(win, op); - }); - this.connect(display, 'grab-op-end', (_, _display, win, op) => { - this.register_fn(() => this.on_grab_end(win, op)); - }); - } - else { - this.connect(display, 'grab-op-begin', (_display, win, op) => { - this.on_grab_start(win, op); - }); - this.connect(display, 'grab-op-end', (_display, win, op) => { - this.register_fn(() => this.on_grab_end(win, op)); - }); - } - this.connect(overview, 'window-drag-begin', (_, win) => { - this.on_grab_start(win, 1); - }); - this.connect(overview, 'window-drag-end', (_, win) => { - this.register_fn(() => this.on_grab_end(win)); - }); - this.connect(overview, 'window-drag-cancelled', () => { - this.unset_grab_op(); - }); - this.connect(wim, 'switch-workspace', () => { - this.hide_all_borders(); - }); - this.connect(workspace_manager, 'active-workspace-changed', () => { - this.on_active_workspace_changed(); - }); - this.connect(workspace_manager, 'workspace-removed', (_, number) => { - this.on_workspace_removed(number); - }); - this.connect(workspace_manager, 'workspace-added', (_, number) => { - this.on_workspace_added(number); - }); - this.connect(workspace_manager, 'showing-desktop-changed', () => { - this.hide_all_borders(); - this.prev_focused = [null, null]; - }); - St.ThemeContext.get_for_stage(global.stage).connect('notify::scale-factor', () => this.update_scale()); - if (this.settings.tile_by_default() && !this.auto_tiler) { - this.auto_tiler = new auto_tiler.AutoTiler(new Forest.Forest() - .connect_on_attach(this.on_tile_attach.bind(this)) - .connect_on_detach(this.on_tile_detach.bind(this)), this.register_storage()); - } - if (this.init) { - for (const window of this.tab_list(Meta.TabList.NORMAL, null)) { - this.register({ tag: 3, window: window.meta }); - } - this.register_fn(() => (this.init = false)); - } - } - signals_remove() { - for (const [object, signals] of this.signals) { - for (const signal of signals) { - object.disconnect(signal); - } - } - if (this.conf_watch) { - this.conf_watch[0].disconnect(this.conf_watch[1]); - this.conf_watch = null; - } - this.tiler.queue.stop(); - this.signals.clear(); - } - size_changed_block() { - utils.block_signal(wim, this.size_changed_signal); - } - size_changed_unblock() { - utils.unblock_signal(wim, this.size_changed_signal); - } - size_signals_block(win) { - this.add_tag(win.entity, Tags.Blocked); - } - size_signals_unblock(win) { - this.delete_tag(win.entity, Tags.Blocked); - } - snap_windows() { - for (const window of this.windows.values()) { - if (window.is_tilable(this)) - this.tiler.snap(this, window); - } - } - switch_to_workspace(id) { - this.workspace_by_id(id)?.activate(global.get_current_time()); - } - stop_launcher_services() { - this.window_search.stop_services(this); - } - tab_list(tablist, workspace) { - const windows = display.get_tab_list(tablist, workspace); - const matched = new Array(); - for (const window of windows) { - const win = this.get_window(window); - if (win) - matched.push(win); - } - return matched; - } - *tiled_windows() { - for (const entity of this.entities()) { - if (this.contains_tag(entity, Tags.Tiled)) { - yield entity; - } - } - } - tiling_config_reapply() { - if (this.auto_tiler) { - const at = this.auto_tiler; - for (const [entity, window] of this.windows.iter()) { - const attachment = at.attached.get(entity); - if (window.is_tilable(this)) { - if (!attachment) { - at.auto_tile(this, window, this.init); - } - } - else if (attachment) { - at.detach_window(this, entity); - } - } - } - } - toggle_tiling() { - if (this.settings.tile_by_default()) { - this.auto_tile_off(); - } - else { - this.auto_tile_on(); - } - } - auto_tile_off() { - this.settings.set_edge_tiling(true); - this.hide_all_borders(); - if (this.auto_tiler) { - this.unregister_storage(this.auto_tiler.attached); - this.auto_tiler.destroy(this); - this.auto_tiler = null; - this.settings.set_tile_by_default(false); - if (indicator) - indicator.toggle_tiled.setToggleState(false); - this.button.icon.gicon = this.button_gio_icon_auto_off; - if (this.settings.active_hint()) { - this.show_border_on_focused(); - } - } - } - auto_tile_on() { - this.settings.set_edge_tiling(false); - this.hide_all_borders(); - if (indicator) - indicator.toggle_tiled.setToggleState(true); - const original = this.active_workspace(); - let tiler = new auto_tiler.AutoTiler(new Forest.Forest() - .connect_on_attach(this.on_tile_attach.bind(this)) - .connect_on_detach(this.on_tile_detach.bind(this)), this.register_storage()); - this.auto_tiler = tiler; - this.settings.set_tile_by_default(true); - this.button.icon.gicon = this.button_gio_icon_auto_on; - for (const window of this.windows.values()) { - if (window.is_tilable(this)) { - let actor = window.meta.get_compositor_private(); - if (actor) { - if (!window.meta.minimized) { - tiler.auto_tile(this, window, true); - } - } - } - } - this.register_fn(() => this.switch_to_workspace(original)); - } - schedule_idle(func) { - if (!this.movements.is_empty()) { - GLib.timeout_add(GLib.PRIORITY_DEFAULT, 100, () => { - if (!this.movements.is_empty()) - return true; - return func(); - }); - } - else { - func(); - } - return false; - } - should_ignore_workspace(monitor) { - return this.settings.workspaces_only_on_primary() && monitor !== global.display.get_primary_monitor(); - } - unset_grab_op() { - if (this.drag_signal !== null) { - this.overlay.visible = false; - GLib.source_remove(this.drag_signal); - this.drag_signal = null; - } - if (this.grab_op !== null) { - let window = this.windows.get(this.grab_op.entity); - if (window) - this.size_signals_unblock(window); - this.grab_op = null; - } - this.moved_by_mouse = false; - } - update_display_configuration_before() { } - update_display_configuration(workareas_only) { - if (!this.auto_tiler || sessionMode.isLocked) - return; - if (this.ignore_display_update) { - this.ignore_display_update = false; - return; - } - if (layoutManager.monitors.length === 0) - return; - const primary_display = global.display.get_primary_monitor(); - const primary_display_ready = (ext) => { - const area = global.display.get_monitor_geometry(primary_display); - const work_area = ext.monitor_work_area(primary_display); - if (!area || !work_area) - return false; - return !(area.width === work_area.width && area.height === work_area.height); - }; - function displays_ready() { - const monitors = global.display.get_n_monitors(); - if (monitors === 0) - return false; - for (let i = 0; i < monitors; i += 1) { - const display = global.display.get_monitor_geometry(i); - if (!display) - return false; - if (display.width < 1 || display.height < 1) - return false; - } - return true; - } - if (!displays_ready() || !primary_display_ready(this)) { - if (this.displays_updating !== null) - return; - if (this.workareas_update !== null) - GLib.source_remove(this.workareas_update); - this.workareas_update = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 500, () => { - this.register_fn(() => { - this.update_display_configuration(workareas_only); - }); - this.workareas_update = null; - return false; - }); - return; - } - const update_tiling = () => { - if (!this.auto_tiler) - return; - for (const f of this.auto_tiler.forest.forks.values()) { - if (!f.is_toplevel) - continue; - const display = this.monitor_work_area(f.monitor); - if (display) { - const area = new Rect.Rectangle([display.x, display.y, display.width, display.height]); - f.smart_gapped = false; - f.set_area(area.clone()); - this.auto_tiler.update_toplevel(this, f, f.monitor, this.settings.smart_gaps()); - } - } - }; - let migrations = new Array(); - const apply_migrations = (assigned_monitors) => { - if (!migrations) - return; - new exec.OnceExecutor(migrations).start(500, ([fork, new_monitor, workspace, find_workspace]) => { - let new_workspace; - if (find_workspace) { - if (assigned_monitors.has(new_monitor)) { - [new_workspace] = this.find_unused_workspace(new_monitor); - } - else { - assigned_monitors.add(new_monitor); - new_workspace = 0; - } - } - else { - new_workspace = fork.workspace; - } - fork.migrate(this, forest, workspace, new_monitor, new_workspace); - fork.set_ratio(fork.length() / 2); - return true; - }, () => update_tiling()); - }; - function mark_for_reassignment(ext, fork) { - for (const win of forest.iter(fork, node.NodeKind.WINDOW)) { - if (win.inner.kind === 2) { - const entity = win.inner.entity; - const window = ext.windows.get(entity); - if (window) - window.reassignment = true; - } - } - } - const [old_primary, old_displays] = this.displays; - const changes = new Map(); - for (const [entity, w] of this.windows.iter()) { - if (!w.actor_exists()) - continue; - this.monitors.with(entity, ([mon]) => { - const assignment = mon === old_primary ? primary_display : w.meta.get_monitor(); - changes.set(mon, assignment); - }); - } - const updated = new Map(); - for (const monitor of layoutManager.monitors) { - const mon = monitor; - const area = new Rect.Rectangle([mon.x, mon.y, mon.width, mon.height]); - const ws = this.monitor_work_area(mon.index); - updated.set(mon.index, { area, ws }); - } - const forest = this.auto_tiler.forest; - if (old_displays.size === updated.size) { - update_tiling(); - this.displays = [primary_display, updated]; - return; - } - this.displays = [primary_display, updated]; - if (utils.map_eq(old_displays, updated)) { - return; - } - if (this.displays_updating !== null) - GLib.source_remove(this.displays_updating); - if (this.workareas_update !== null) { - GLib.source_remove(this.workareas_update); - this.workareas_update = null; - } - this.displays_updating = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 2000, () => { - (() => { - if (!this.auto_tiler) - return; - const toplevels = new Array(); - const assigned_monitors = new Set(); - for (const [old_mon, new_mon] of changes) { - if (old_mon === new_mon) - assigned_monitors.add(new_mon); - } - for (const f of forest.forks.values()) { - if (f.is_toplevel) { - toplevels.push(f); - let migration = null; - const displays = this.displays[1]; - for (const [old_monitor, new_monitor] of changes) { - const display = displays.get(new_monitor); - if (!display) - continue; - if (f.monitor === old_monitor) { - f.monitor = new_monitor; - f.workspace = 0; - migration = [f, new_monitor, display.ws, true]; - } - } - if (!migration) { - const display = displays.get(f.monitor); - if (display) { - migration = [f, f.monitor, display.ws, false]; - } - } - if (migration) { - mark_for_reassignment(this, migration[0].entity); - migrations.push(migration); - } - } - } - apply_migrations(assigned_monitors); - return; - })(); - this.displays_updating = null; - return false; - }); - } - update_scale() { - const new_dpi = St.ThemeContext.get_for_stage(global.stage).scale_factor; - const diff = new_dpi / this.dpi; - this.dpi = new_dpi; - this.column_size *= diff; - this.row_size *= diff; - this.gap_inner_prev *= diff; - this.gap_inner *= diff; - this.gap_inner_half *= diff; - this.gap_outer_prev *= diff; - this.gap_outer *= diff; - this.update_inner_gap(); - this.update_outer_gap(diff); - } - update_snapped() { - for (const entity of this.snapped.find((val) => val)) { - const window = this.windows.get(entity); - if (window) - this.tiler.snap(this, window); - } - } - window_entity(meta) { - if (!meta) - return null; - let id; - try { - id = meta.get_stable_sequence(); - } - catch (e) { - return null; - } - let entity = this.ids.find((comp) => comp == id).next().value; - if (!entity) { - const actor = meta.get_compositor_private(); - if (!actor) - return null; - let window_app, name; - try { - window_app = Window.window_tracker.get_window_app(meta); - name = window_app.get_name().replace(/&/g, '&'); - } - catch (e) { - return null; - } - const window_type = meta.get_window_type(); - if (window_type !== 0 && window_type !== 3 && window_type !== 4) { - return null; - } - entity = this.create_entity(); - this.ids.insert(entity, id); - this.names.insert(entity, name); - let win = new Window.ShellWindow(entity, meta, window_app, this); - this.windows.insert(entity, win); - this.monitors.insert(entity, [win.meta.get_monitor(), win.workspace_id()]); - const grab_focus = () => { - this.schedule_idle(() => { - this.windows.with(entity, (window) => { - window.meta.raise(); - window.meta.unminimize(); - window.activate(false); - }); - return false; - }); - }; - if (this.auto_tiler && !win.meta.minimized && win.is_tilable(this)) { - let id = actor.connect('first-frame', () => { - this.auto_tiler?.auto_tile(this, win, this.init); - grab_focus(); - actor.disconnect(id); - }); - } - else { - grab_focus(); - } - } - return entity; - } - *windows_at_pointer(cursor, monitor, workspace) { - for (const entity of this.monitors.find((m) => m[0] == monitor && m[1] == workspace)) { - let window = this.windows.with(entity, (window) => { - return window.is_tilable(this) && window.rect().contains(cursor) ? window : null; - }); - if (window) - yield window; - } - } - cursor_status() { - const cursor = cursor_rect(); - const rect = new Meta.Rectangle({ x: cursor.x, y: cursor.y, width: 1, height: 1 }); - const monitor = display.get_monitor_index_for_rect(rect); - return [cursor, monitor]; - } - workspace_by_id(id) { - return wom.get_workspace_by_index(id); - } - workspace_id(window = null) { - let id = window - ? [window.meta.get_monitor(), window.workspace_id()] - : [this.active_monitor(), this.active_workspace()]; - id[0] = Math.max(0, id[0]); - id[1] = Math.max(0, id[1]); - return id; - } - is_floating(window) { - let shall_float = false; - let wm_class = window.meta.get_wm_class(); - let wm_title = window.meta.get_title(); - if (wm_class && wm_title) { - shall_float = this.conf.window_shall_float(wm_class, wm_title); - } - let floating_tagged = this.contains_tag(window.entity, Tags.Floating); - let force_tiled_tagged = this.contains_tag(window.entity, Tags.ForceTile); - return (floating_tagged && !force_tiled_tagged) || (shall_float && !force_tiled_tagged); - } -} -let ext = null; -let indicator = null; -export default class PopShellExtension extends Extension { - enable() { - globalThis.popShellExtension = this; - log.info('enable'); - if (!ext) { - ext = new Ext(); - ext.register_fn(() => { - if (ext?.auto_tiler) - ext.snap_windows(); - }); - } - if (ext.settings.show_skiptaskbar()) { - _show_skip_taskbar_windows(ext); - } - else { - _hide_skip_taskbar_windows(); - } - if (ext.was_locked) { - ext.was_locked = false; - return; - } - ext.injections_add(); - ext.signals_attach(); - disable_window_attention_handler(); - layoutManager.addChrome(ext.overlay); - if (!indicator) { - indicator = new PanelSettings.Indicator(ext); - panel.addToStatusArea('pop-shell', indicator.button); - } - ext.keybindings.enable(ext.keybindings.global).enable(ext.keybindings.window_focus); - if (ext.settings.tile_by_default()) { - ext.auto_tile_on(); - } - } - disable() { - log.info('disable'); - if (ext) { - if (sessionMode.isLocked) { - ext.was_locked = true; - return; - } - delete globalThis.popShellExtension; - ext.injections_remove(); - ext.signals_remove(); - ext.exit_modes(); - ext.stop_launcher_services(); - ext.hide_all_borders(); - ext.window_search.remove_injections(); - layoutManager.removeChrome(ext.overlay); - ext.keybindings.disable(ext.keybindings.global).disable(ext.keybindings.window_focus); - if (ext.auto_tiler) { - ext.auto_tiler.destroy(ext); - ext.auto_tiler = null; - } - _hide_skip_taskbar_windows(); - } - if (indicator) { - indicator.destroy(); - indicator = null; - } - enable_window_attention_handler(); - } -} -const handler = windowAttentionHandler; -function enable_window_attention_handler() { - if (handler && !handler._windowDemandsAttentionId) { - handler._windowDemandsAttentionId = global.display.connect('window-demands-attention', (display, window) => { - handler._onWindowDemandsAttention(display, window); - }); - } -} -function disable_window_attention_handler() { - if (handler && handler._windowDemandsAttentionId) { - global.display.disconnect(handler._windowDemandsAttentionId); - handler._windowDemandsAttentionId = null; - } -} -function stylesheet_path(name) { - return get_current_path() + '/' + name + '.css'; -} -function load_theme(style) { - let pop_stylesheet = Number(style); - try { - const theme_context = St.ThemeContext.get_for_stage(global.stage); - const existing_theme = theme_context.get_theme(); - const pop_stylesheet_path = STYLESHEET_PATHS[pop_stylesheet]; - if (existing_theme) { - for (const s of STYLESHEETS) { - existing_theme.unload_stylesheet(s); - } - existing_theme.load_stylesheet(STYLESHEETS[pop_stylesheet]); - theme_context.set_theme(existing_theme); - } - else { - setThemeStylesheet(pop_stylesheet_path); - loadTheme(); - } - return pop_stylesheet_path; - } - catch (e) { - log.error('failed to load stylesheet: ' + e); - return null; - } -} -function* iter_workspaces(manager) { - let idx = 0; - let ws = manager.get_workspace_by_index(idx); - while (ws !== null) { - yield [idx, ws]; - idx += 1; - ws = manager.get_workspace_by_index(idx); - } -} -let default_isoverviewwindow_ws; -let default_isoverviewwindow_ws_thumbnail; -let default_init_appswitcher; -let default_getwindowlist_windowswitcher; -let default_getcaption_windowpreview; -let default_getcaption_workspace; -function _show_skip_taskbar_windows(ext) { - if (!default_isoverviewwindow_ws) { - default_isoverviewwindow_ws = Workspace.prototype._isOverviewWindow; - Workspace.prototype._isOverviewWindow = function (win) { - let meta_win = win; - if (GNOME_VERSION?.startsWith('3.36')) - meta_win = win.get_meta_window(); - return is_valid_minimize_to_tray(meta_win, ext) || default_isoverviewwindow_ws(win); - }; - } - if (GNOME_VERSION?.startsWith('3.36')) { - if (!default_getcaption_workspace) { - default_getcaption_workspace = Workspace.prototype._getCaption; - Workspace.prototype._getCaption = function () { - let metaWindow = this._windowClone.metaWindow; - if (metaWindow.title) - return metaWindow.title; - let tracker = Shell.WindowTracker.get_default(); - let app = tracker.get_window_app(metaWindow); - return app ? app.get_name() : ''; - }; - } - } - else { - if (!default_getcaption_windowpreview) { - default_getcaption_windowpreview = WindowPreview.prototype._getCaption; - log.debug(`override workspace._getCaption`); - WindowPreview.prototype._getCaption = function () { - if (this.metaWindow.title) - return this.metaWindow.title; - let tracker = Shell.WindowTracker.get_default(); - let app = tracker.get_window_app(this.metaWindow); - return app ? app.get_name() : ''; - }; - } - } - if (!default_isoverviewwindow_ws_thumbnail) { - default_isoverviewwindow_ws_thumbnail = WorkspaceThumbnail.prototype._isOverviewWindow; - WorkspaceThumbnail.prototype._isOverviewWindow = function (win) { - let meta_win = win.get_meta_window(); - return is_valid_minimize_to_tray(meta_win, ext) || default_isoverviewwindow_ws_thumbnail(win); - }; - } - if (!default_getwindowlist_windowswitcher) { - default_getwindowlist_windowswitcher = WindowSwitcherPopup.prototype._getWindowList; - WindowSwitcherPopup.prototype._getWindowList = function () { - let workspace = null; - if (this._settings.get_boolean('current-workspace-only')) { - let workspaceManager = global.workspace_manager; - workspace = workspaceManager.get_active_workspace(); - } - let windows = global.display.get_tab_list(Meta.TabList.NORMAL_ALL, workspace); - return windows - .map((w) => { - let meta_win = w.is_attached_dialog() ? w.get_transient_for() : w; - if (meta_win) { - if (!meta_win.skip_taskbar || is_valid_minimize_to_tray(meta_win, ext)) { - return meta_win; - } - } - return null; - }) - .filter((w, i, a) => w != null && a.indexOf(w) == i); - }; - } -} -function _hide_skip_taskbar_windows() { - if (default_isoverviewwindow_ws) { - Workspace.prototype._isOverviewWindow = default_isoverviewwindow_ws; - default_isoverviewwindow_ws = null; - } - if (GNOME_VERSION?.startsWith('3.36')) { - if (default_getcaption_workspace) { - Workspace.prototype._getCaption = default_getcaption_workspace; - default_getcaption_workspace = null; - } - } - else { - if (default_getcaption_windowpreview) { - WindowPreview.prototype._getCaption = default_getcaption_windowpreview; - default_getcaption_windowpreview = null; - } - } - if (default_isoverviewwindow_ws_thumbnail) { - WorkspaceThumbnail.prototype._isOverviewWindow = default_isoverviewwindow_ws_thumbnail; - default_isoverviewwindow_ws_thumbnail = null; - } - if (default_init_appswitcher) { - default_init_appswitcher = null; - } - if (default_getwindowlist_windowswitcher) { - WindowSwitcherPopup.prototype._getWindowList = default_getwindowlist_windowswitcher; - default_getwindowlist_windowswitcher = null; - } -} -function is_valid_minimize_to_tray(meta_win, ext) { - let cfg = ext.conf; - let valid_min_to_tray = false; - switch (meta_win.window_type) { - case Meta.WindowType.NORMAL: - case Meta.WindowType.UTILITY: - valid_min_to_tray = !meta_win.is_override_redirect(); - break; - } - let gnome_shell_wm_class = meta_win.get_wm_class() === 'Gjs' || meta_win.get_wm_class() === 'Gnome-shell'; - let show_skiptb = !cfg.skiptaskbar_shall_hide(meta_win); - valid_min_to_tray = - valid_min_to_tray && - !meta_win.is_attached_dialog() && - show_skiptb && - meta_win.skip_taskbar && - meta_win.get_wm_class() !== null && - !gnome_shell_wm_class; - return valid_min_to_tray; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/floating_exceptions/config.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/floating_exceptions/config.js deleted file mode 100644 index 57e6bf21..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/floating_exceptions/config.js +++ /dev/null @@ -1,239 +0,0 @@ -import GLib from 'gi://GLib'; -import Gio from 'gi://Gio'; -const CONF_DIR = GLib.get_user_config_dir() + '/pop-shell'; -export var CONF_FILE = CONF_DIR + '/config.json'; -export const DEFAULT_FLOAT_RULES = [ - { class: 'Authy Desktop' }, - { class: 'Com.github.amezin.ddterm' }, - { class: 'Com.github.donadigo.eddy' }, - { class: 'Conky' }, - { title: 'Discord Updater' }, - { class: 'Enpass', title: 'Enpass Assistant' }, - { class: 'Floating Window Exceptions' }, - { class: 'Gjs', title: 'Settings' }, - { class: 'Gnome-initial-setup' }, - { class: 'Gnome-terminal', title: 'Preferences – General' }, - { class: 'Guake' }, - { class: 'Io.elementary.sideload' }, - { title: 'JavaEmbeddedFrame' }, - { class: 'KotatogramDesktop', title: 'Media viewer' }, - { class: 'Mozilla VPN' }, - { class: 'update-manager', title: 'Software Updater' }, - { class: 'Solaar' }, - { class: 'Steam', title: '^((?!Steam).)*$' }, - { class: 'Steam', title: '^.*(Guard|Login).*' }, - { class: 'TelegramDesktop', title: 'Media viewer' }, - { class: 'Zotero', title: 'Quick Format Citation' }, - { class: 'firefox', title: '^(?!.*Mozilla Firefox).*$' }, - { class: 'gnome-screenshot' }, - { class: 'ibus-.*' }, - { class: 'jetbrains-toolbox' }, - { class: 'jetbrains-webstorm', title: 'Customize WebStorm' }, - { class: 'jetbrains-webstorm', title: 'License Activation' }, - { class: 'jetbrains-webstorm', title: 'Welcome to WebStorm' }, - { class: 'krunner' }, - { class: 'pritunl' }, - { class: 're.sonny.Junction' }, - { class: 'system76-driver' }, - { class: 'tilda' }, - { class: 'zoom' }, - { class: '^.*action=join.*$' }, - { class: 'gjs' }, -]; -export const SKIPTASKBAR_EXCEPTIONS = [ - { class: 'Conky' }, - { class: 'gjs' }, - { class: 'Guake' }, - { class: 'Com.github.amezin.ddterm' }, - { class: 'plank' }, -]; -export class Config { - constructor() { - this.float = []; - this.skiptaskbarhidden = []; - this.log_on_focus = false; - } - add_app_exception(wmclass) { - for (const r of this.float) { - if (r.class === wmclass && r.title === undefined) - return; - } - this.float.push({ class: wmclass }); - this.sync_to_disk(); - } - add_window_exception(wmclass, title) { - for (const r of this.float) { - if (r.class === wmclass && r.title === title) - return; - } - this.float.push({ class: wmclass, title }); - this.sync_to_disk(); - } - window_shall_float(wclass, title) { - for (const rule of this.float.concat(DEFAULT_FLOAT_RULES)) { - if (rule.class) { - if (!new RegExp(rule.class, 'i').test(wclass)) { - continue; - } - } - if (rule.title) { - if (!new RegExp(rule.title, 'i').test(title)) { - continue; - } - } - return rule.disabled ? false : true; - } - return false; - } - skiptaskbar_shall_hide(meta_window) { - let wmclass = meta_window.get_wm_class(); - let wmtitle = meta_window.get_title(); - if (!meta_window.is_skip_taskbar()) - return false; - for (const rule of this.skiptaskbarhidden.concat(SKIPTASKBAR_EXCEPTIONS)) { - if (rule.class) { - if (!new RegExp(rule.class, 'i').test(wmclass)) { - continue; - } - } - if (rule.title) { - if (!new RegExp(rule.title, 'i').test(wmtitle)) { - continue; - } - } - return rule.disabled ? false : true; - } - return false; - } - reload() { - const conf = Config.from_config(); - if (conf.tag === 0) { - let c = conf.value; - this.float = c.float; - this.log_on_focus = c.log_on_focus; - } - else { - log(`error loading conf: ${conf.why}`); - } - } - rule_disabled(rule) { - for (const value of this.float.values()) { - if (value.disabled && rule.class === value.class && value.title === rule.title) { - return true; - } - } - return false; - } - to_json() { - return JSON.stringify(this, set_to_json, 2); - } - toggle_system_exception(wmclass, wmtitle, disabled) { - if (disabled) { - for (const value of DEFAULT_FLOAT_RULES) { - if (value.class === wmclass && value.title === wmtitle) { - value.disabled = disabled; - this.float.push(value); - this.sync_to_disk(); - return; - } - } - } - let index = 0; - let found = false; - for (const value of this.float) { - if (value.class === wmclass && value.title === wmtitle) { - found = true; - break; - } - index += 1; - } - if (found) - swap_remove(this.float, index); - this.sync_to_disk(); - } - remove_user_exception(wmclass, wmtitle) { - let index = 0; - let found = new Array(); - for (const value of this.float.values()) { - if (value.class === wmclass && value.title === wmtitle) { - found.push(index); - } - index += 1; - } - if (found.length !== 0) { - for (const idx of found) - swap_remove(this.float, idx); - this.sync_to_disk(); - } - } - static from_json(json) { - try { - return JSON.parse(json); - } - catch (error) { - return new Config(); - } - } - static from_config() { - const stream = Config.read(); - if (stream.tag === 1) - return stream; - let value = Config.from_json(stream.value); - return { tag: 0, value }; - } - static gio_file() { - try { - const conf = Gio.File.new_for_path(CONF_FILE); - if (!conf.query_exists(null)) { - const dir = Gio.File.new_for_path(CONF_DIR); - if (!dir.query_exists(null) && !dir.make_directory(null)) { - return { tag: 1, why: 'failed to create pop-shell config directory' }; - } - const example = new Config(); - example.float.push({ class: 'pop-shell-example', title: 'pop-shell-example' }); - conf.create(Gio.FileCreateFlags.NONE, null).write_all(JSON.stringify(example, undefined, 2), null); - } - return { tag: 0, value: conf }; - } - catch (why) { - return { tag: 1, why: `Gio.File I/O error: ${why}` }; - } - } - static read() { - try { - const file = Config.gio_file(); - if (file.tag === 1) - return file; - const [, buffer] = file.value.load_contents(null); - return { tag: 0, value: imports.byteArray.toString(buffer) }; - } - catch (why) { - return { tag: 1, why: `failed to read pop-shell config: ${why}` }; - } - } - static write(data) { - try { - const file = Config.gio_file(); - if (file.tag === 1) - return file; - file.value.replace_contents(data, null, false, Gio.FileCreateFlags.NONE, null); - return { tag: 0, value: file.value }; - } - catch (why) { - return { tag: 1, why: `failed to write to config: ${why}` }; - } - } - sync_to_disk() { - Config.write(this.to_json()); - } -} -function set_to_json(_key, value) { - if (typeof value === 'object' && value instanceof Set) { - return [...value]; - } - return value; -} -function swap_remove(array, index) { - array[index] = array[array.length - 1]; - return array.pop(); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/floating_exceptions/empty_utils.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/floating_exceptions/empty_utils.js deleted file mode 100644 index e69de29b..00000000 diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/floating_exceptions/main.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/floating_exceptions/main.js deleted file mode 100644 index 660c3de3..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/floating_exceptions/main.js +++ /dev/null @@ -1,222 +0,0 @@ -#!/usr/bin/gjs --module -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import Gtk from 'gi://Gtk?version=3.0'; -import Pango from 'gi://Pango'; -const SCRIPT_DIR = GLib.path_get_dirname(new Error().stack.split(':')[0].slice(1)); -imports.searchPath.push(SCRIPT_DIR); -import * as config from './config.js'; -const WM_CLASS_ID = 'pop-shell-exceptions'; -var ViewNum; -(function (ViewNum) { - ViewNum[ViewNum["MainView"] = 0] = "MainView"; - ViewNum[ViewNum["Exceptions"] = 1] = "Exceptions"; -})(ViewNum || (ViewNum = {})); -function exceptions_button() { - let title = Gtk.Label.new('System Exceptions'); - title.set_xalign(0); - let description = Gtk.Label.new('Updated based on validated user reports.'); - description.set_xalign(0); - description.get_style_context().add_class('dim-label'); - let icon = Gtk.Image.new_from_icon_name('go-next-symbolic', Gtk.IconSize.BUTTON); - icon.set_hexpand(true); - icon.set_halign(Gtk.Align.END); - let layout = Gtk.Grid.new(); - layout.set_row_spacing(4); - layout.set_border_width(12); - layout.attach(title, 0, 0, 1, 1); - layout.attach(description, 0, 1, 1, 1); - layout.attach(icon, 1, 0, 1, 2); - let button = Gtk.Button.new(); - button.relief = Gtk.ReliefStyle.NONE; - button.add(layout); - return button; -} -export class MainView { - constructor() { - this.callback = () => { }; - let select = Gtk.Button.new_with_label('Select'); - select.set_halign(Gtk.Align.CENTER); - select.connect('clicked', () => this.callback({ tag: 0 })); - select.set_margin_bottom(12); - let exceptions = exceptions_button(); - exceptions.connect('clicked', () => this.callback({ tag: 1, view: ViewNum.Exceptions })); - this.list = Gtk.ListBox.new(); - this.list.set_selection_mode(Gtk.SelectionMode.NONE); - this.list.set_header_func(list_header_func); - this.list.add(exceptions); - let scroller = new Gtk.ScrolledWindow(); - scroller.hscrollbar_policy = Gtk.PolicyType.NEVER; - scroller.set_propagate_natural_width(true); - scroller.set_propagate_natural_height(true); - scroller.add(this.list); - let list_frame = Gtk.Frame.new(null); - list_frame.add(scroller); - let desc = new Gtk.Label({ - label: 'Add exceptions by selecting currently running applications and windows.', - }); - desc.set_line_wrap(true); - desc.set_halign(Gtk.Align.CENTER); - desc.set_justify(Gtk.Justification.CENTER); - desc.set_max_width_chars(55); - desc.set_margin_top(12); - this.widget = Gtk.Box.new(Gtk.Orientation.VERTICAL, 24); - this.widget.add(desc); - this.widget.add(select); - this.widget.add(list_frame); - } - add_rule(wmclass, wmtitle) { - let label = Gtk.Label.new(wmtitle === undefined ? wmclass : `${wmclass} / ${wmtitle}`); - label.set_xalign(0); - label.set_hexpand(true); - label.set_ellipsize(Pango.EllipsizeMode.END); - let button = Gtk.Button.new_from_icon_name('edit-delete', Gtk.IconSize.BUTTON); - button.set_valign(Gtk.Align.CENTER); - let widget = Gtk.Box.new(Gtk.Orientation.HORIZONTAL, 24); - widget.add(label); - widget.add(button); - widget.set_border_width(12); - widget.set_margin_start(12); - widget.show_all(); - button.connect('clicked', () => { - widget.destroy(); - this.callback({ tag: 3, wmclass, wmtitle }); - }); - this.list.add(widget); - } -} -export class ExceptionsView { - constructor() { - this.callback = () => { }; - this.exceptions = Gtk.ListBox.new(); - let desc_title = Gtk.Label.new('<b>System Exceptions</b>'); - desc_title.set_use_markup(true); - desc_title.set_xalign(0); - let desc_desc = Gtk.Label.new('Updated based on validated user reports.'); - desc_desc.set_xalign(0); - desc_desc.get_style_context().add_class('dim-label'); - desc_desc.set_margin_bottom(6); - let scroller = new Gtk.ScrolledWindow(); - scroller.hscrollbar_policy = Gtk.PolicyType.NEVER; - scroller.set_propagate_natural_width(true); - scroller.set_propagate_natural_height(true); - scroller.add(this.exceptions); - let exceptions_frame = Gtk.Frame.new(null); - exceptions_frame.add(scroller); - this.exceptions.set_selection_mode(Gtk.SelectionMode.NONE); - this.exceptions.set_header_func(list_header_func); - this.widget = Gtk.Box.new(Gtk.Orientation.VERTICAL, 6); - this.widget.add(desc_title); - this.widget.add(desc_desc); - this.widget.add(exceptions_frame); - } - add_rule(wmclass, wmtitle, enabled) { - let label = Gtk.Label.new(wmtitle === undefined ? wmclass : `${wmclass} / ${wmtitle}`); - label.set_xalign(0); - label.set_hexpand(true); - label.set_ellipsize(Pango.EllipsizeMode.END); - let button = Gtk.Switch.new(); - button.set_valign(Gtk.Align.CENTER); - button.set_state(enabled); - button.connect('notify::state', () => { - this.callback({ tag: 2, wmclass, wmtitle, enable: button.get_state() }); - }); - let widget = Gtk.Box.new(Gtk.Orientation.HORIZONTAL, 24); - widget.add(label); - widget.add(button); - widget.show_all(); - widget.set_border_width(12); - this.exceptions.add(widget); - } -} -class App { - constructor() { - var _a, _b, _c, _d; - this.main_view = new MainView(); - this.exceptions_view = new ExceptionsView(); - this.stack = Gtk.Stack.new(); - this.config = new config.Config(); - this.stack.set_border_width(16); - this.stack.add(this.main_view.widget); - this.stack.add(this.exceptions_view.widget); - let back = Gtk.Button.new_from_icon_name('go-previous-symbolic', Gtk.IconSize.BUTTON); - const TITLE = 'Floating Window Exceptions'; - let win = new Gtk.Dialog({ use_header_bar: true }); - let headerbar = win.get_header_bar(); - headerbar.set_show_close_button(true); - headerbar.set_title(TITLE); - headerbar.pack_start(back); - Gtk.Window.set_default_icon_name('application-default'); - win.set_wmclass(WM_CLASS_ID, TITLE); - win.set_default_size(550, 700); - win.get_content_area().add(this.stack); - win.show_all(); - win.connect('delete-event', () => Gtk.main_quit()); - back.hide(); - this.config.reload(); - for (const value of config.DEFAULT_FLOAT_RULES.values()) { - let wmtitle = (_a = value.title) !== null && _a !== void 0 ? _a : undefined; - let wmclass = (_b = value.class) !== null && _b !== void 0 ? _b : undefined; - let disabled = this.config.rule_disabled({ class: wmclass, title: wmtitle }); - this.exceptions_view.add_rule(wmclass, wmtitle, !disabled); - } - for (const value of Array.from(this.config.float)) { - let wmtitle = (_c = value.title) !== null && _c !== void 0 ? _c : undefined; - let wmclass = (_d = value.class) !== null && _d !== void 0 ? _d : undefined; - if (!value.disabled) - this.main_view.add_rule(wmclass, wmtitle); - } - let event_handler = (event) => { - switch (event.tag) { - case 0: - println('SELECT'); - Gtk.main_quit(); - break; - case 1: - switch (event.view) { - case ViewNum.MainView: - this.stack.set_visible_child(this.main_view.widget); - back.hide(); - break; - case ViewNum.Exceptions: - this.stack.set_visible_child(this.exceptions_view.widget); - back.show(); - break; - } - break; - case 2: - log(`toggling exception ${event.enable}`); - this.config.toggle_system_exception(event.wmclass, event.wmtitle, !event.enable); - println('MODIFIED'); - break; - case 3: - log(`removing exception`); - this.config.remove_user_exception(event.wmclass, event.wmtitle); - println('MODIFIED'); - break; - } - }; - this.main_view.callback = event_handler; - this.exceptions_view.callback = event_handler; - back.connect('clicked', () => event_handler({ tag: 1, view: ViewNum.MainView })); - } -} -function list_header_func(row, before) { - if (before) { - row.set_header(Gtk.Separator.new(Gtk.Orientation.HORIZONTAL)); - } -} -const STDOUT = new Gio.DataOutputStream({ - base_stream: new Gio.UnixOutputStream({ fd: 1 }), -}); -function println(message) { - STDOUT.put_string(message + '\n', null); -} -function main() { - GLib.set_prgname(WM_CLASS_ID); - GLib.set_application_name('Pop Shell Floating Window Exceptions'); - Gtk.init(null); - new App(); - Gtk.main(); -} -main(); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/focus.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/focus.js deleted file mode 100644 index a42f6054..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/focus.js +++ /dev/null @@ -1,55 +0,0 @@ -import * as Geom from './geom.js'; -export var FocusPosition; -(function (FocusPosition) { - FocusPosition["TopLeft"] = "Top Left"; - FocusPosition["TopRight"] = "Top Right"; - FocusPosition["BottomLeft"] = "Bottom Left"; - FocusPosition["BottomRight"] = "Bottom Right"; - FocusPosition["Center"] = "Center"; -})(FocusPosition || (FocusPosition = {})); -export class FocusSelector { - select(ext, direction, window) { - window = window ?? ext.focus_window(); - if (window) { - let window_list = ext.active_window_list(); - return select(direction, window, window_list); - } - return null; - } - down(ext, window) { - return this.select(ext, window_down, window); - } - left(ext, window) { - return this.select(ext, window_left, window); - } - right(ext, window) { - return this.select(ext, window_right, window); - } - up(ext, window) { - return this.select(ext, window_up, window); - } -} -function select(windows, focused, window_list) { - const array = windows(focused, window_list); - return array.length > 0 ? array[0] : null; -} -function window_down(focused, windows) { - return windows - .filter((win) => !win.meta.minimized && win.meta.get_frame_rect().y > focused.meta.get_frame_rect().y) - .sort((a, b) => Geom.downward_distance(a.meta, focused.meta) - Geom.downward_distance(b.meta, focused.meta)); -} -function window_left(focused, windows) { - return windows - .filter((win) => !win.meta.minimized && win.meta.get_frame_rect().x < focused.meta.get_frame_rect().x) - .sort((a, b) => Geom.leftward_distance(a.meta, focused.meta) - Geom.leftward_distance(b.meta, focused.meta)); -} -function window_right(focused, windows) { - return windows - .filter((win) => !win.meta.minimized && win.meta.get_frame_rect().x > focused.meta.get_frame_rect().x) - .sort((a, b) => Geom.rightward_distance(a.meta, focused.meta) - Geom.rightward_distance(b.meta, focused.meta)); -} -function window_up(focused, windows) { - return windows - .filter((win) => !win.meta.minimized && win.meta.get_frame_rect().y < focused.meta.get_frame_rect().y) - .sort((a, b) => Geom.upward_distance(a.meta, focused.meta) - Geom.upward_distance(b.meta, focused.meta)); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/forest.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/forest.js deleted file mode 100644 index ad48293c..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/forest.js +++ /dev/null @@ -1,700 +0,0 @@ -import * as arena from './arena.js'; -import * as Ecs from './ecs.js'; -import * as Lib from './lib.js'; -import * as log from './log.js'; -import * as movement from './movement.js'; -import * as Rect from './rectangle.js'; -import * as Node from './node.js'; -import * as Fork from './fork.js'; -import * as geom from './geom.js'; -const { Arena } = arena; -import Meta from 'gi://Meta'; -const { Movement } = movement; -const { DOWN, UP, LEFT, RIGHT } = Movement; -export class Forest extends Ecs.World { - constructor() { - super(); - this.toplevel = new Map(); - this.requested = new Map(); - this.stack_updates = new Array(); - this.forks = this.register_storage(); - this.parents = this.register_storage(); - this.string_reps = this.register_storage(); - this.stacks = new Arena(); - this.on_attach = () => { }; - this.on_detach = () => { }; - } - measure(ext, fork, area) { - fork.measure(this, ext, area, this.on_record()); - } - tile(ext, fork, area, ignore_reset = true) { - this.measure(ext, fork, area); - this.arrange(ext, fork.workspace, ignore_reset); - } - arrange(ext, _workspace, _ignore_reset = false) { - for (const [entity, r] of this.requested) { - const window = ext.windows.get(entity); - if (!window) - continue; - let on_complete = () => { - if (!window.actor_exists()) - return; - }; - if (ext.tiler.window) { - if (Ecs.entity_eq(ext.tiler.window, entity)) { - on_complete = () => { - ext.set_overlay(window.rect()); - if (!window.actor_exists()) - return; - }; - } - } - move_window(ext, window, r.rect, on_complete); - } - this.requested.clear(); - for (const [stack] of this.stack_updates.splice(0)) { - ext.auto_tiler?.update_stack(ext, stack); - } - } - attach_fork(ext, fork, window, is_left) { - const node = Node.Node.window(window); - if (is_left) { - if (fork.right) { - const new_fork = this.create_fork(fork.left, fork.right, fork.area_of_right(ext), fork.workspace, fork.monitor)[0]; - fork.right = Node.Node.fork(new_fork); - this.parents.insert(new_fork, fork.entity); - this.on_attach(new_fork, window); - } - else { - this.on_attach(fork.entity, window); - fork.right = fork.left; - } - fork.left = node; - } - else { - if (fork.right) { - const new_fork = this.create_fork(fork.left, fork.right, fork.area_of_left(ext), fork.workspace, fork.monitor)[0]; - fork.left = Node.Node.fork(new_fork); - this.parents.insert(new_fork, fork.entity); - this.on_attach(new_fork, window); - } - else { - this.on_attach(fork.entity, window); - } - fork.right = node; - } - this.on_attach(fork.entity, window); - } - attach_stack(ext, stack, fork, new_entity, stack_from_left) { - const container = this.stacks.get(stack.idx); - if (container) { - const window = ext.windows.get(new_entity); - if (window) { - window.stack = stack.idx; - if (stack_from_left) { - stack.entities.push(new_entity); - } - else { - stack.entities.unshift(new_entity); - } - this.on_attach(fork.entity, new_entity); - ext.auto_tiler?.update_stack(ext, stack); - if (window.meta.has_focus()) { - container.activate(new_entity); - } - return [fork.entity, fork]; - } - else { - log.warn('attempted to attach window to stack that does not exist'); - } - } - else { - log.warn('attempted to attach to stack that does not exist'); - } - return null; - } - attach_window(ext, onto_entity, new_entity, place_by, stack_from_left) { - function place_by_keyboard(fork, src, left, right) { - const from = [src.x + src.width / 2, src.y + src.height / 2]; - const lside = geom.shortest_side(from, left); - const rside = geom.shortest_side(from, right); - if (lside < rside) - fork.swap_branches(); - } - function place(place_by, fork, left, right) { - if ('swap' in place_by) { - const { orientation, swap } = place_by; - fork.set_orientation(orientation); - if (swap) - fork.swap_branches(); - } - else if ('src' in place_by) { - place_by_keyboard(fork, place_by.src, left, right); - } - } - function area_of_halves(fork) { - const { x, y, width, height } = fork.area; - const [left, right] = fork.is_horizontal() - ? [ - [x, y, width / 2, height], - [x + width / 2, y, width / 2, height], - ] - : [ - [x, y, width, height / 2], - [x, y + height / 2, width, height / 2], - ]; - return [new Rect.Rectangle(left), new Rect.Rectangle(right)]; - } - const fork_and_place_on_left = (entity, fork) => { - const area = fork.area_of_left(ext); - const [fork_entity, new_fork] = this.create_fork(fork.left, right_node, area, fork.workspace, fork.monitor); - fork.left = Node.Node.fork(fork_entity); - this.parents.insert(fork_entity, entity); - const [left, right] = area_of_halves(new_fork); - place(place_by, new_fork, left, right); - return this._attach(onto_entity, new_entity, this.on_attach, entity, fork, [fork_entity, new_fork]); - }; - const fork_and_place_on_right = (entity, fork, right_branch) => { - const area = fork.area_of_right(ext); - const [fork_entity, new_fork] = this.create_fork(right_branch, right_node, area, fork.workspace, fork.monitor); - fork.right = Node.Node.fork(fork_entity); - this.parents.insert(fork_entity, entity); - const [left, right] = area_of_halves(new_fork); - place(place_by, new_fork, left, right); - return this._attach(onto_entity, new_entity, this.on_attach, entity, fork, [fork_entity, new_fork]); - }; - const right_node = Node.Node.window(new_entity); - for (const [entity, fork] of this.forks.iter()) { - if (fork.left.is_window(onto_entity)) { - if (fork.right) { - return fork_and_place_on_left(entity, fork); - } - else { - fork.right = right_node; - fork.set_ratio(fork.length() / 2); - if ('src' in place_by) { - const [left, right] = area_of_halves(fork); - place_by_keyboard(fork, place_by.src, left, right); - } - return this._attach(onto_entity, new_entity, this.on_attach, entity, fork, null); - } - } - else if (fork.left.is_in_stack(onto_entity)) { - const stack = fork.left.inner; - return this.attach_stack(ext, stack, fork, new_entity, stack_from_left); - } - else if (fork.right) { - if (fork.right.is_window(onto_entity)) { - return fork_and_place_on_right(entity, fork, fork.right); - } - else if (fork.right.is_in_stack(onto_entity)) { - const stack = fork.right.inner; - return this.attach_stack(ext, stack, fork, new_entity, stack_from_left); - } - } - } - return null; - } - connect_on_attach(callback) { - this.on_attach = callback; - return this; - } - connect_on_detach(callback) { - this.on_detach = callback; - return this; - } - create_entity() { - const entity = super.create_entity(); - this.string_reps.insert(entity, `${entity}`); - return entity; - } - create_fork(left, right, area, workspace, monitor) { - const entity = this.create_entity(); - let orient = area.width > area.height ? Lib.Orientation.HORIZONTAL : Lib.Orientation.VERTICAL; - let fork = new Fork.Fork(entity, left, right, area, workspace, monitor, orient); - this.forks.insert(entity, fork); - return [entity, fork]; - } - create_toplevel(window, area, id) { - const [entity, fork] = this.create_fork(Node.Node.window(window), null, area, id[1], id[0]); - this.string_reps.with(entity, (sid) => { - fork.set_toplevel(this, entity, sid, id); - }); - return [entity, fork]; - } - delete_entity(entity) { - const fork = this.forks.remove(entity); - if (fork && fork.is_toplevel) { - const id = this.string_reps.get(entity); - if (id) - this.toplevel.delete(id); - } - super.delete_entity(entity); - } - detach(ext, fork_entity, window) { - const fork = this.forks.get(fork_entity); - if (!fork) - return null; - let reflow_fork = null, stack_detach = false; - const parent = this.parents.get(fork_entity); - if (fork.left.is_window(window)) { - if (parent && fork.right) { - const pfork = this.reassign_child_to_parent(fork_entity, parent, fork.right); - if (!pfork) - return null; - reflow_fork = [parent, pfork]; - } - else if (fork.right) { - reflow_fork = [fork_entity, fork]; - switch (fork.right.inner.kind) { - case 1: - this.reassign_children_to_parent(fork_entity, fork.right.inner.entity, fork); - break; - default: - const detached = fork.right; - fork.left = detached; - fork.right = null; - } - } - else { - this.delete_entity(fork_entity); - } - } - else if (fork.left.is_in_stack(window)) { - reflow_fork = [fork_entity, fork]; - stack_detach = true; - this.remove_from_stack(ext, fork.left.inner, window, () => { - if (fork.right) { - fork.left = fork.right; - fork.right = null; - if (parent) { - const pfork = this.reassign_child_to_parent(fork_entity, parent, fork.left); - if (!pfork) - return null; - reflow_fork = [parent, pfork]; - } - } - else { - this.delete_entity(fork.entity); - } - }); - } - else if (fork.right) { - if (fork.right.is_window(window)) { - if (parent) { - const pfork = this.reassign_child_to_parent(fork_entity, parent, fork.left); - if (!pfork) - return null; - reflow_fork = [parent, pfork]; - } - else { - reflow_fork = [fork_entity, fork]; - switch (fork.left.inner.kind) { - case 1: - this.reassign_children_to_parent(fork_entity, fork.left.inner.entity, fork); - break; - default: - fork.right = null; - break; - } - } - } - else if (fork.right.is_in_stack(window)) { - reflow_fork = [fork_entity, fork]; - stack_detach = true; - this.remove_from_stack(ext, fork.right.inner, window, () => { - fork.right = null; - this.reassign_to_parent(fork, fork.left); - }); - } - } - if (stack_detach) { - ext.windows.with(window, (w) => (w.stack = null)); - } - this.on_detach(window); - if (reflow_fork && !stack_detach) { - reflow_fork[1].rebalance_orientation(); - } - return reflow_fork; - } - fmt(ext) { - let fmt = ''; - for (const [entity] of this.toplevel.values()) { - const fork = this.forks.get(entity); - fmt += ' '; - if (fork) { - fmt += this.display_fork(ext, entity, fork, 1) + '\n'; - } - else { - fmt += `Fork(${entity}) Invalid\n`; - } - } - return fmt; - } - find_toplevel([src_mon, src_work]) { - for (const [entity, fork] of this.forks.iter()) { - if (!fork.is_toplevel) - continue; - const { monitor, workspace } = fork; - if (monitor == src_mon && workspace == src_work) { - return entity; - } - } - return null; - } - grow_sibling(ext, fork_e, fork_c, is_left, movement, crect) { - const resize_fork = () => this.resize_fork_(ext, fork_e, crect, movement, false); - if (fork_c.is_horizontal()) { - if ((movement & (DOWN | UP)) != 0) { - resize_fork(); - } - else if (is_left) { - if ((movement & RIGHT) != 0) { - this.readjust_fork_ratio_by_left(ext, crect.width, fork_c); - } - else { - resize_fork(); - } - } - else if ((movement & RIGHT) != 0) { - resize_fork(); - } - else { - this.readjust_fork_ratio_by_right(ext, crect.width, fork_c, fork_c.area.width); - } - } - else { - if ((movement & (LEFT | RIGHT)) != 0) { - resize_fork(); - } - else if (is_left) { - if ((movement & DOWN) != 0) { - this.readjust_fork_ratio_by_left(ext, crect.height, fork_c); - } - else { - resize_fork(); - } - } - else if ((movement & DOWN) != 0) { - resize_fork(); - } - else { - this.readjust_fork_ratio_by_right(ext, crect.height, fork_c, fork_c.area.height); - } - } - } - *iter(entity, kind = null) { - let fork = this.forks.get(entity); - let forks = new Array(2); - while (fork) { - if (fork.left.inner.kind === 1) { - forks.push(this.forks.get(fork.left.inner.entity)); - } - if (kind === null || fork.left.inner.kind === kind) { - yield fork.left; - } - if (fork.right) { - if (fork.right.inner.kind === 1) { - forks.push(this.forks.get(fork.right.inner.entity)); - } - if (kind === null || fork.right.inner.kind == kind) { - yield fork.right; - } - } - fork = forks.pop(); - } - } - largest_window_on(ext, entity) { - let largest_window = null; - let largest_size = 0; - let window_compare = (entity) => { - const window = ext.windows.get(entity); - if (window && window.is_tilable(ext)) { - const rect = window.rect(); - const size = rect.width * rect.height; - if (size > largest_size) { - largest_size = size; - largest_window = window; - } - } - }; - for (const node of this.iter(entity)) { - switch (node.inner.kind) { - case 2: - window_compare(node.inner.entity); - break; - case 3: - window_compare(node.inner.entities[0]); - } - } - return largest_window; - } - resize(ext, fork_e, fork_c, win_e, movement, crect) { - const is_left = fork_c.left.is_window(win_e) || fork_c.left.is_in_stack(win_e); - ((movement & Movement.SHRINK) != 0 ? this.shrink_sibling : this.grow_sibling).call(this, ext, fork_e, fork_c, is_left, movement, crect); - } - on_record() { - return (e, p, a) => this.record(e, p, a); - } - record(entity, parent, rect) { - this.requested.set(entity, { - parent: parent, - rect: rect, - }); - } - reassign_child_to_parent(child_entity, parent_entity, branch) { - const parent = this.forks.get(parent_entity); - if (parent) { - if (parent.left.is_fork(child_entity)) { - parent.left = branch; - } - else { - parent.right = branch; - } - this.reassign_sibling(branch, parent_entity); - this.delete_entity(child_entity); - } - return parent; - } - reassign_to_parent(child, reassign) { - const p = this.parents.get(child.entity); - if (p) { - const p_fork = this.forks.get(p); - if (p_fork) { - if (p_fork.left.is_fork(child.entity)) { - p_fork.left = reassign; - } - else { - p_fork.right = reassign; - } - const inner = reassign.inner; - switch (inner.kind) { - case 1: - this.parents.insert(inner.entity, p); - break; - case 2: - this.on_attach(p, inner.entity); - break; - case 3: - for (const entity of inner.entities) - this.on_attach(p, entity); - } - } - this.delete_entity(child.entity); - } - } - reassign_sibling(sibling, parent) { - switch (sibling.inner.kind) { - case 1: - this.parents.insert(sibling.inner.entity, parent); - break; - case 2: - this.on_attach(parent, sibling.inner.entity); - break; - case 3: - for (const entity of sibling.inner.entities) { - this.on_attach(parent, entity); - } - } - } - reassign_children_to_parent(parent_entity, child_entity, p_fork) { - const c_fork = this.forks.get(child_entity); - if (c_fork) { - p_fork.left = c_fork.left; - p_fork.right = c_fork.right; - this.reassign_sibling(p_fork.left, parent_entity); - if (p_fork.right) - this.reassign_sibling(p_fork.right, parent_entity); - this.delete_entity(child_entity); - } - else { - log.error(`Fork(${child_entity}) does not exist`); - } - } - readjust_fork_ratio_by_left(ext, left_length, fork) { - fork.set_ratio(left_length).measure(this, ext, fork.area, this.on_record()); - } - readjust_fork_ratio_by_right(ext, right_length, fork, fork_length) { - this.readjust_fork_ratio_by_left(ext, fork_length - right_length, fork); - } - remove_from_stack(ext, stack, window, on_last) { - if (stack.entities.length === 1) { - this.stacks.remove(stack.idx)?.destroy(); - on_last(); - } - else { - const s = this.stacks.get(stack.idx); - if (s) { - Node.stack_remove(this, stack, window); - } - } - const win = ext.windows.get(window); - if (win) { - win.stack = null; - } - } - resize_fork_(ext, child_e, crect, mov, shrunk) { - let parent = this.parents.get(child_e), child = this.forks.get(child_e); - if (!parent) { - child.measure(this, ext, child.area, this.on_record()); - return; - } - const src_node = this.forks.get(child_e); - if (!src_node) - return; - let is_left = child.left.is_fork(child_e), length; - while (parent !== null) { - child = this.forks.get(parent); - is_left = child.left.is_fork(child_e); - if (child.area.contains(crect)) { - if ((mov & UP) !== 0) { - if (shrunk) { - if (child.area.y + child.area.height > src_node.area.y + src_node.area.height) { - break; - } - } - else if (!child.is_horizontal() || !is_left) { - break; - } - } - else if ((mov & DOWN) !== 0) { - if (shrunk) { - if (child.area.y < src_node.area.y) { - break; - } - } - else if (child.is_horizontal() || is_left) { - break; - } - } - else if ((mov & LEFT) !== 0) { - if (shrunk) { - if (child.area.x + child.area.width > src_node.area.x + src_node.area.width) { - break; - } - } - else if (!child.is_horizontal() || !is_left) { - break; - } - } - else if ((mov & RIGHT) !== 0) { - if (shrunk) { - if (child.area.x < src_node.area.x) { - break; - } - } - else if (!child.is_horizontal() || is_left) { - break; - } - } - } - child_e = parent; - parent = this.parents.get(child_e); - } - if (child.is_horizontal()) { - length = is_left ? crect.x + crect.width - child.area.x : crect.x - child.area.x; - } - else { - length = is_left ? crect.y + crect.height - child.area.y : child.area.height - crect.height; - } - child.set_ratio(length); - child.measure(this, ext, child.area, this.on_record()); - } - shrink_sibling(ext, fork_e, fork_c, is_left, movement, crect) { - const resize_fork = () => this.resize_fork_(ext, fork_e, crect, movement, true); - if (fork_c.area) { - if (fork_c.is_horizontal()) { - if ((movement & (DOWN | UP)) != 0) { - resize_fork(); - } - else if (is_left) { - if ((movement & LEFT) != 0) { - this.readjust_fork_ratio_by_left(ext, crect.width, fork_c); - } - else { - resize_fork(); - } - } - else if ((movement & LEFT) != 0) { - resize_fork(); - } - else { - this.readjust_fork_ratio_by_right(ext, crect.width, fork_c, fork_c.area.array[2]); - } - } - else { - if ((movement & (LEFT | RIGHT)) != 0) { - resize_fork(); - } - else if (is_left) { - if ((movement & UP) != 0) { - this.readjust_fork_ratio_by_left(ext, crect.height, fork_c); - } - else { - resize_fork(); - } - } - else if ((movement & UP) != 0) { - resize_fork(); - } - else { - this.readjust_fork_ratio_by_right(ext, crect.height, fork_c, fork_c.area.array[3]); - } - } - } - } - _attach(onto_entity, new_entity, assoc, entity, fork, result) { - if (result) { - assoc(result[0], onto_entity); - assoc(result[0], new_entity); - } - else { - assoc(entity, new_entity); - } - return [entity, fork]; - } - display_branch(ext, branch, scope) { - switch (branch.inner.kind) { - case 1: - const fork = this.forks.get(branch.inner.entity); - return fork ? this.display_fork(ext, branch.inner.entity, fork, scope + 1) : 'Missing Fork'; - case 2: - const window = ext.windows.get(branch.inner.entity); - return `Window(${branch.inner.entity}) (${window ? window.rect().fmt() : 'unknown area'}; parent: ${ext.auto_tiler?.attached.get(branch.inner.entity)})`; - case 3: - let fmt = 'Stack('; - for (const entity of branch.inner.entities) { - const window = ext.windows.get(entity); - fmt += `Window(${entity}) (${window ? window.rect().fmt() : 'unknown area'}), `; - } - return fmt + ')'; - } - } - display_fork(ext, entity, fork, scope) { - let fmt = `Fork(${entity}) [${fork.area ? fork.area.array : 'unknown'}]: {\n`; - fmt += ' '.repeat((1 + scope) * 2) + `workspace: (${fork.workspace}),\n`; - fmt += ' '.repeat((1 + scope) * 2) + 'left: ' + this.display_branch(ext, fork.left, scope) + ',\n'; - fmt += ' '.repeat((1 + scope) * 2) + 'parent: ' + this.parents.get(fork.entity) + ',\n'; - if (fork.right) { - fmt += ' '.repeat((1 + scope) * 2) + 'right: ' + this.display_branch(ext, fork.right, scope) + ',\n'; - } - fmt += ' '.repeat(scope * 2) + '}'; - return fmt; - } -} -function move_window(ext, window, rect, on_complete) { - if (!(window.meta instanceof Meta.Window)) { - log.error(`attempting to a window entity in a tree which lacks a Meta.Window`); - return; - } - const actor = window.meta.get_compositor_private(); - if (!actor) { - log.warn(`Window(${window.entity}) does not have an actor, and therefore cannot be moved`); - return; - } - ext.size_signals_block(window); - window.move(ext, rect, () => { - on_complete(); - ext.size_signals_unblock(window); - }); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/fork.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/fork.js deleted file mode 100644 index 119f9d9e..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/fork.js +++ /dev/null @@ -1,286 +0,0 @@ -import * as Ecs from './ecs.js'; -import * as Lib from './lib.js'; -import * as node from './node.js'; -import * as Rect from './rectangle.js'; -const XPOS = 0; -const YPOS = 1; -const WIDTH = 2; -const HEIGHT = 3; -export class Fork { - constructor(entity, left, right, area, workspace, monitor, orient) { - this.prev_ratio = 0.5; - this.minimum_ratio = 0.1; - this.orientation = Lib.Orientation.HORIZONTAL; - this.orientation_changed = false; - this.is_toplevel = false; - this.smart_gapped = false; - this.n_toggled = 0; - this.on_primary_display = global.display.get_primary_monitor() === monitor; - this.area = area; - this.left = left; - this.right = right; - this.workspace = workspace; - this.length_left = orient === Lib.Orientation.HORIZONTAL ? this.area.width / 2 : this.area.height / 2; - this.prev_length_left = this.length_left; - this.entity = entity; - this.orientation = orient; - this.monitor = monitor; - } - area_of_left(ext) { - return new Rect.Rectangle(this.is_horizontal() - ? [this.area.x, this.area.y, this.length_left - ext.gap_inner_half, this.area.height] - : [this.area.x, this.area.y, this.area.width, this.length_left - ext.gap_inner_half]); - } - area_of_right(ext) { - let area; - if (this.is_horizontal()) { - const width = this.area.width - this.length_left + ext.gap_inner; - area = [width, this.area.y, this.area.width - width, this.area.height]; - } - else { - const height = this.area.height - this.length_left + ext.gap_inner; - area = [this.area.x, height, this.area.width, this.area.height - height]; - } - return new Rect.Rectangle(area); - } - depth() { - return this.is_horizontal() ? this.area.height : this.area.width; - } - find_branch(entity) { - const locate = (branch) => { - switch (branch.inner.kind) { - case 2: - if (Ecs.entity_eq(branch.inner.entity, entity)) { - return branch; - } - break; - case 3: - for (const e of branch.inner.entities) { - if (Ecs.entity_eq(e, entity)) { - return branch; - } - } - } - return null; - }; - const node = locate(this.left); - if (node) - return node; - return this.right ? locate(this.right) : null; - } - is_horizontal() { - return Lib.Orientation.HORIZONTAL == this.orientation; - } - length() { - return this.is_horizontal() ? this.area.width : this.area.height; - } - replace_window(ext, a, b) { - let closure = null; - let check_right = () => { - if (this.right) { - const inner = this.right.inner; - if (inner.kind === 2) { - closure = () => { - inner.entity = b.entity; - }; - } - else if (inner.kind === 3) { - const idx = node.stack_find(inner, a.entity); - if (idx === null) { - closure = null; - return; - } - closure = () => { - node.stack_replace(ext, inner, b); - inner.entities[idx] = b.entity; - }; - } - } - }; - switch (this.left.inner.kind) { - case 1: - check_right(); - break; - case 2: - const inner = this.left.inner; - if (Ecs.entity_eq(inner.entity, a.entity)) { - closure = () => { - inner.entity = b.entity; - }; - } - else { - check_right(); - } - break; - case 3: - const inner_s = this.left.inner; - let idx = node.stack_find(inner_s, a.entity); - if (idx !== null) { - const id = idx; - closure = () => { - node.stack_replace(ext, inner_s, b); - inner_s.entities[id] = b.entity; - }; - } - else { - check_right(); - } - } - return closure; - } - set_area(area) { - this.area = area; - return this.area; - } - set_ratio(left_length) { - const fork_len = this.is_horizontal() ? this.area.width : this.area.height; - const clamped = Math.round(Math.max(256, Math.min(fork_len - 256, left_length))); - this.prev_length_left = clamped; - this.length_left = clamped; - return this; - } - set_toplevel(tiler, entity, string, id) { - this.is_toplevel = true; - tiler.toplevel.set(string, [entity, id]); - return this; - } - measure(tiler, ext, area, record) { - let ratio = null; - let manually_moved = ext.grab_op !== null || ext.tiler.resizing_window; - if (!this.is_toplevel) { - if (this.orientation_changed) { - this.orientation_changed = false; - ratio = this.length_left / this.depth(); - } - else { - ratio = this.length_left / this.length(); - } - this.area = this.set_area(area.clone()); - } - else if (this.orientation_changed) { - this.orientation_changed = false; - ratio = this.length_left / this.depth(); - } - if (ratio) { - this.length_left = Math.round(ratio * this.length()); - if (manually_moved) - this.prev_ratio = ratio; - } - else if (manually_moved) { - this.prev_ratio = this.length_left / this.length(); - } - if (this.right) { - const [l, p, startpos] = this.is_horizontal() ? [WIDTH, XPOS, this.area.x] : [HEIGHT, YPOS, this.area.y]; - let region = this.area.clone(); - const half = this.area.array[l] / 2; - let length; - if (this.length_left > half - 32 && this.length_left < half + 32) { - length = half; - } - else { - const diff = (startpos + this.length_left) % 32; - length = this.length_left - diff + (diff > 16 ? 32 : 0); - if (length == 0) - length = 32; - } - region.array[l] = length - ext.gap_inner_half; - this.left.measure(tiler, ext, this.entity, region, record); - region.array[p] = region.array[p] + length + ext.gap_inner_half; - region.array[l] = this.area.array[l] - length - ext.gap_inner_half; - this.right.measure(tiler, ext, this.entity, region, record); - } - else { - this.left.measure(tiler, ext, this.entity, this.area, record); - } - } - migrate(ext, forest, area, monitor, workspace) { - if (ext.auto_tiler && this.is_toplevel) { - const primary = global.display.get_primary_monitor() === monitor; - this.monitor = monitor; - this.workspace = workspace; - this.on_primary_display = primary; - let blocked = new Array(); - forest.toplevel.set(forest.string_reps.get(this.entity), [this.entity, [monitor, workspace]]); - for (const child of forest.iter(this.entity)) { - switch (child.inner.kind) { - case 1: - const cfork = forest.forks.get(child.inner.entity); - if (!cfork) - continue; - cfork.workspace = workspace; - cfork.monitor = monitor; - cfork.on_primary_display = primary; - break; - case 2: - let window = ext.windows.get(child.inner.entity); - if (window) { - ext.size_signals_block(window); - window.reassignment = false; - window.known_workspace = workspace; - window.meta.change_workspace_by_index(workspace, true); - ext.monitors.insert(window.entity, [monitor, workspace]); - blocked.push(window); - } - break; - case 3: - for (const entity of child.inner.entities) { - let stack = ext.auto_tiler.forest.stacks.get(child.inner.idx); - if (stack) { - stack.workspace = workspace; - } - let window = ext.windows.get(entity); - if (window) { - ext.size_signals_block(window); - window.known_workspace = workspace; - window.meta.change_workspace_by_index(workspace, true); - ext.monitors.insert(window.entity, [monitor, workspace]); - blocked.push(window); - } - } - } - } - area.x += ext.gap_outer; - area.y += ext.gap_outer; - area.width -= ext.gap_outer * 2; - area.height -= ext.gap_outer * 2; - this.set_area(area.clone()); - this.measure(forest, ext, area, forest.on_record()); - forest.arrange(ext, workspace, true); - for (const window of blocked) { - ext.size_signals_unblock(window); - } - } - } - rebalance_orientation() { - this.set_orientation(this.area.height > this.area.width ? Lib.Orientation.VERTICAL : Lib.Orientation.HORIZONTAL); - } - set_orientation(o) { - if (o !== this.orientation) { - this.orientation = o; - this.orientation_changed = true; - } - } - swap_branches() { - if (this.right) { - const temp = this.left; - this.left = this.right; - this.right = temp; - } - } - toggle_orientation() { - this.orientation = - Lib.Orientation.HORIZONTAL === this.orientation ? Lib.Orientation.VERTICAL : Lib.Orientation.HORIZONTAL; - this.orientation_changed = true; - if (this.n_toggled === 1) { - if (this.right) { - const tmp = this.right; - this.right = this.left; - this.left = tmp; - } - this.n_toggled = 0; - } - else { - this.n_toggled += 1; - } - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/geom.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/geom.js deleted file mode 100644 index 77a8e2ce..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/geom.js +++ /dev/null @@ -1,74 +0,0 @@ -export var Side; -(function (Side) { - Side[Side["LEFT"] = 0] = "LEFT"; - Side[Side["TOP"] = 1] = "TOP"; - Side[Side["RIGHT"] = 2] = "RIGHT"; - Side[Side["BOTTOM"] = 3] = "BOTTOM"; - Side[Side["CENTER"] = 4] = "CENTER"; -})(Side || (Side = {})); -export function xend(rect) { - return rect.x + rect.width; -} -export function xcenter(rect) { - return rect.x + rect.width / 2; -} -export function yend(rect) { - return rect.y + rect.height; -} -export function ycenter(rect) { - return rect.y + rect.height / 2; -} -export function center(rect) { - return [xcenter(rect), ycenter(rect)]; -} -export function north(rect) { - return [xcenter(rect), rect.y]; -} -export function east(rect) { - return [xend(rect), ycenter(rect)]; -} -export function south(rect) { - return [xcenter(rect), yend(rect)]; -} -export function west(rect) { - return [rect.x, ycenter(rect)]; -} -export function distance([ax, ay], [bx, by]) { - return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2)); -} -export function directional_distance(a, b, fn_a, fn_b) { - return distance(fn_a(a), fn_b(b)); -} -export function window_distance(win_a, win_b) { - return directional_distance(win_a.get_frame_rect(), win_b.get_frame_rect(), center, center); -} -export function upward_distance(win_a, win_b) { - return directional_distance(win_a.get_frame_rect(), win_b.get_frame_rect(), south, north); -} -export function rightward_distance(win_a, win_b) { - return directional_distance(win_a.get_frame_rect(), win_b.get_frame_rect(), west, east); -} -export function downward_distance(win_a, win_b) { - return directional_distance(win_a.get_frame_rect(), win_b.get_frame_rect(), north, south); -} -export function leftward_distance(win_a, win_b) { - return directional_distance(win_a.get_frame_rect(), win_b.get_frame_rect(), east, west); -} -export function nearest_side(ext, origin, rect) { - const left = west(rect), top = north(rect), right = east(rect), bottom = south(rect), ctr = center(rect); - const left_distance = distance(origin, left), top_distance = distance(origin, top), right_distance = distance(origin, right), bottom_distance = distance(origin, bottom), center_distance = distance(origin, ctr); - let nearest = left_distance < right_distance ? [left_distance, Side.LEFT] : [right_distance, Side.RIGHT]; - if (top_distance < nearest[0]) - nearest = [top_distance, Side.TOP]; - if (bottom_distance < nearest[0]) - nearest = [bottom_distance, Side.BOTTOM]; - if (ext.settings.stacking_with_mouse() && center_distance < nearest[0]) - nearest = [center_distance, Side.CENTER]; - return nearest; -} -export function shortest_side(origin, rect) { - let shortest = distance(origin, west(rect)); - shortest = Math.min(shortest, distance(origin, north(rect))); - shortest = Math.min(shortest, distance(origin, east(rect))); - return Math.min(shortest, distance(origin, south(rect))); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/grab_op.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/grab_op.js deleted file mode 100644 index 328d425e..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/grab_op.js +++ /dev/null @@ -1,10 +0,0 @@ -import * as Movement from './movement.js'; -export class GrabOp { - constructor(entity, rect) { - this.entity = entity; - this.rect = rect; - } - operation(change) { - return Movement.calculate(this.rect, change); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/highcontrast.css b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/highcontrast.css deleted file mode 100644 index 2cc85c2c..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/highcontrast.css +++ /dev/null @@ -1,61 +0,0 @@ -.pop-shell-active-hint { - border-style: solid; - border-color: #FBB86C; - border-radius: var(--active-hint-border-radius, 5px); - box-shadow: inset 0 0 0 1px rgba(24, 23, 23, 0) -} - -.pop-shell-overlay { - background-color: rgba(53, 132, 228, 0.3); -} - -.pop-shell-border-normal { - border-width: 3px; -} - -.pop-shell-border-maximize { - border-width: 3px; -} - -.pop-shell-search-element:select{ - background: #fff; - border-radius: 5px; - color: #000; -} - -.pop-shell-search-icon { - margin-right: 10px; -} - -.pop-shell-search-cat { - margin-right: 10px; -} - -.pop-shell-search-element { - padding-left: 10px; - padding-right: 2px; - padding-top: 6px; - padding-bottom: 6px; -} - -.pop-shell-tab { - border: 1px solid #333; - color: #000; - padding: 0 1em; -} - -.pop-shell-tab-active { - background: #FBB86C; -} - -.pop-shell-tab-inactive { - background: #9B8E8A; -} - -.pop-shell-tab-urgent { - background: #D00; -} - -.pop-shell-entry:indeterminate { - font-style: italic -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/icons/pop-shell-auto-off-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/icons/pop-shell-auto-off-symbolic.svg deleted file mode 100644 index ff4616b0..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/icons/pop-shell-auto-off-symbolic.svg +++ /dev/null @@ -1,163 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg - xmlns:osb="http://www.openswatchbook.org/uri/2009/osb" - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07, custom)" - sodipodi:docname="pop-shell-auto-off-symbolic.svg" - width="16.031464" - version="1.1" - style="enable-background:new" - id="svg7384" - height="16"> - <sodipodi:namedview - inkscape:current-layer="svg7384" - inkscape:window-maximized="0" - inkscape:window-y="23" - inkscape:window-x="26" - inkscape:cy="7.8736667" - inkscape:cx="5.4863836" - inkscape:zoom="47.743848" - showgrid="true" - id="namedview26" - inkscape:window-height="1032" - inkscape:window-width="1904" - inkscape:pageshadow="2" - inkscape:pageopacity="0" - guidetolerance="10" - gridtolerance="10" - objecttolerance="10" - borderopacity="1" - bordercolor="#666666" - pagecolor="#ffffff" - inkscape:snap-intersection-paths="true" - inkscape:snap-smooth-nodes="true" - inkscape:document-rotation="0"> - <inkscape:grid - type="xygrid" - id="grid834" /> - </sodipodi:namedview> - <metadata - id="metadata90"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title>Pop Symbolic Icon Theme</dc:title> - <cc:license - rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" /> - </cc:Work> - <cc:License - rdf:about="http://creativecommons.org/licenses/by-sa/4.0/"> - <cc:permits - rdf:resource="http://creativecommons.org/ns#Reproduction" /> - <cc:permits - rdf:resource="http://creativecommons.org/ns#Distribution" /> - <cc:requires - rdf:resource="http://creativecommons.org/ns#Notice" /> - <cc:requires - rdf:resource="http://creativecommons.org/ns#Attribution" /> - <cc:permits - rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /> - <cc:requires - rdf:resource="http://creativecommons.org/ns#ShareAlike" /> - </cc:License> - </rdf:RDF> - </metadata> - <title - id="title8473">Pop Symbolic Icon Theme - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/icons/pop-shell-auto-on-symbolic.svg b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/icons/pop-shell-auto-on-symbolic.svg deleted file mode 100644 index d57bd0d5..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/icons/pop-shell-auto-on-symbolic.svg +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - image/svg+xml - - Pop Symbolic Icon Theme - - - - - - - - - - - - - Pop Symbolic Icon Theme - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/keybindings.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/keybindings.js deleted file mode 100644 index c6011425..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/keybindings.js +++ /dev/null @@ -1,50 +0,0 @@ -import { wm } from 'resource:///org/gnome/shell/ui/main.js'; -import Shell from 'gi://Shell'; -import Meta from 'gi://Meta'; -export class Keybindings { - constructor(ext) { - this.ext = ext; - this.global = { - 'activate-launcher': () => ext.window_search.open(ext), - 'tile-enter': () => ext.tiler.enter(ext), - }; - this.window_focus = { - 'focus-left': () => ext.focus_left(), - 'focus-down': () => ext.focus_down(), - 'focus-up': () => ext.focus_up(), - 'focus-right': () => ext.focus_right(), - 'tile-orientation': () => { - const win = ext.focus_window(); - if (win && ext.auto_tiler) { - ext.auto_tiler.toggle_orientation(ext, win); - ext.register_fn(() => win.activate(true)); - } - }, - 'toggle-floating': () => ext.auto_tiler?.toggle_floating(ext), - 'toggle-tiling': () => ext.toggle_tiling(), - 'toggle-stacking-global': () => ext.auto_tiler?.toggle_stacking(ext), - 'tile-move-left-global': () => ext.tiler.move_left(ext, ext.focus_window()?.entity), - 'tile-move-down-global': () => ext.tiler.move_down(ext, ext.focus_window()?.entity), - 'tile-move-up-global': () => ext.tiler.move_up(ext, ext.focus_window()?.entity), - 'tile-move-right-global': () => ext.tiler.move_right(ext, ext.focus_window()?.entity), - 'pop-monitor-left': () => ext.move_monitor(Meta.DisplayDirection.LEFT), - 'pop-monitor-right': () => ext.move_monitor(Meta.DisplayDirection.RIGHT), - 'pop-monitor-up': () => ext.move_monitor(Meta.DisplayDirection.UP), - 'pop-monitor-down': () => ext.move_monitor(Meta.DisplayDirection.DOWN), - 'pop-workspace-up': () => ext.move_workspace(Meta.DisplayDirection.UP), - 'pop-workspace-down': () => ext.move_workspace(Meta.DisplayDirection.DOWN), - }; - } - enable(keybindings) { - for (const name in keybindings) { - wm.addKeybinding(name, this.ext.settings.ext, Meta.KeyBindingFlags.NONE, Shell.ActionMode.NORMAL, keybindings[name]); - } - return this; - } - disable(keybindings) { - for (const name in keybindings) { - wm.removeKeybinding(name); - } - return this; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/launcher.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/launcher.js deleted file mode 100644 index c89fafb0..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/launcher.js +++ /dev/null @@ -1,289 +0,0 @@ -import * as search from './search.js'; -import * as utils from './utils.js'; -import * as arena from './arena.js'; -import * as log from './log.js'; -import * as service from './launcher_service.js'; -import * as context from './context.js'; -import Clutter from 'gi://Clutter'; -import GLib from 'gi://GLib'; -import Meta from 'gi://Meta'; -import Gio from 'gi://Gio'; -import Shell from 'gi://Shell'; -import St from 'gi://St'; -const app_sys = Shell.AppSystem.get_default(); -const Clipboard = St.Clipboard.get_default(); -const CLIPBOARD_TYPE = St.ClipboardType.CLIPBOARD; -export class Launcher extends search.Search { - constructor(ext) { - super(); - this.options = new Map(); - this.options_array = new Array(); - this.windows = new arena.Arena(); - this.service = null; - this.append_id = null; - this.active_menu = null; - this.opened = false; - this.ext = ext; - this.dialog.dialogLayout._dialog.y_align = Clutter.ActorAlign.START; - this.dialog.dialogLayout._dialog.x_align = Clutter.ActorAlign.START; - this.dialog.dialogLayout.y = 48; - this.cancel = () => { - ext.overlay.visible = false; - this.stop_services(ext); - this.opened = false; - }; - this.search = (pat) => { - if (this.service !== null) { - this.service.query(pat); - } - }; - this.select = (id) => { - ext.overlay.visible = false; - if (id >= this.options.size) - return; - const option = this.options_array[id]; - if (option && option.result.window) { - const win = this.ext.windows.get(option.result.window); - if (!win) - return; - if (win.workspace_id() == ext.active_workspace()) { - const { x, y, width, height } = win.rect(); - ext.overlay.x = x; - ext.overlay.y = y; - ext.overlay.width = width; - ext.overlay.height = height; - ext.overlay.visible = true; - } - } - }; - this.activate_id = (id) => { - ext.overlay.visible = false; - const selected = this.options_array[id]; - if (selected) { - this.service?.activate(selected.result.id); - } - }; - this.complete = () => { - const option = this.options_array[this.active_id]; - if (option) { - this.service?.complete(option.result.id); - } - }; - this.quit = (id) => { - const option = this.options_array[id]; - if (option) { - this.service?.quit(option.result.id); - } - }; - this.copy = (id) => { - const option = this.options_array[id]; - if (!option) - return; - if (option.result.description) { - Clipboard.set_text(CLIPBOARD_TYPE, option.result.description); - } - else if (option.result.name) { - Clipboard.set_text(CLIPBOARD_TYPE, option.result.name); - } - }; - } - on_response(response) { - if ('Close' === response) { - this.close(); - } - else if ('Update' in response) { - this.clear(); - if (this.append_id !== null) { - GLib.source_remove(this.append_id); - this.append_id = null; - } - if (response.Update.length === 0) { - this.cleanup(); - return; - } - this.append_id = GLib.idle_add(GLib.PRIORITY_DEFAULT, () => { - const item = response.Update.shift(); - if (item) { - try { - const button = new search.SearchOption(item.name, item.description, item.category_icon ? item.category_icon : null, item.icon ? item.icon : null, this.icon_size(), null, null); - const menu = context.addMenu(button.widget, (menu) => { - if (this.active_menu) { - this.active_menu.actor.hide(); - } - this.active_menu = menu; - this.service?.context(item.id); - }); - this.append_search_option(button); - const result = { result: item, menu }; - this.options.set(item.id, result); - this.options_array.push(result); - } - catch (error) { - log.error(`failed to create SearchOption: ${error}`); - } - } - if (response.Update.length === 0) { - this.append_id = null; - return false; - } - return true; - }); - } - else if ('Fill' in response) { - this.set_text(response.Fill); - } - else if ('DesktopEntry' in response) { - this.launch_desktop_entry(response.DesktopEntry); - this.close(); - } - else if ('Context' in response) { - const { id, options } = response.Context; - const option = this.options.get(id); - if (option) { - option.menu.removeAll(); - for (const opt of options) { - context.addContext(option.menu, opt.name, () => { - this.service?.activate_context(id, opt.id); - }); - option.menu.toggle(); - } - } - else { - log.error(`did not find id: ${id}`); - } - } - else { - log.error(`unknown response: ${JSON.stringify(response)}`); - } - } - clear() { - this.options.clear(); - this.options_array.splice(0); - super.clear(); - } - launch_desktop_app(app, path) { - try { - app.launch([], null); - } - catch (why) { - log.error(`${path}: could not launch by app info: ${why}`); - } - } - launch_desktop_entry(entry) { - const basename = (name) => { - return name.substr(name.indexOf('/applications/') + 14).replace('/', '-'); - }; - const desktop_entry_id = basename(entry.path); - const gpuPref = entry.gpu_preference === 'Default' ? Shell.AppLaunchGpu.DEFAULT : Shell.AppLaunchGpu.DISCRETE; - log.debug(`launching desktop entry: ${desktop_entry_id}`); - let app = app_sys.lookup_desktop_wmclass(desktop_entry_id); - if (!app) { - app = app_sys.lookup_app(desktop_entry_id); - } - if (!app) { - log.error(`GNOME Shell cannot find desktop entry for ${desktop_entry_id}`); - log.error(`pop-launcher will use Gio.DesktopAppInfo instead`); - const dapp = Gio.DesktopAppInfo.new_from_filename(entry.path); - if (!dapp) { - log.error(`could not find desktop entry for ${entry.path}`); - return; - } - this.launch_desktop_app(dapp, entry.path); - return; - } - const info = app.get_app_info(); - if (!info) { - log.error(`cannot find app info for ${desktop_entry_id}`); - return; - } - try { - app.launch(0, -1, gpuPref); - } - catch (why) { - log.error(`failed to launch application: ${why}`); - return; - } - if (info.get_executable() === 'gnome-control-center') { - app = app_sys.lookup_app('gnome-control-center.desktop'); - if (!app) - return; - app.activate(); - const window = app.get_windows()[0]; - if (window) { - window.get_workspace().activate_with_focus(window, global.get_current_time()); - return; - } - } - } - list_workspace(ext) { - for (const window of ext.tab_list(Meta.TabList.NORMAL, null)) { - this.windows.insert(window); - } - } - load_desktop_files() { - log.warn('pop-shell: deprecated function called (launcher::load_desktop_files)'); - } - locate_by_app_info(info) { - const workspace = this.ext.active_workspace(); - const exec_info = info.get_string('Exec'); - const exec = exec_info?.split(' ').shift()?.split('/').pop(); - if (exec) { - for (const window of this.ext.tab_list(Meta.TabList.NORMAL, null)) { - if (window.meta.get_workspace().index() !== workspace) - continue; - const pid = window.meta.get_pid(); - if (pid !== -1) { - try { - let f = Gio.File.new_for_path(`/proc/${pid}/cmdline`); - const [, bytes] = f.load_contents(null); - const output = imports.byteArray.toString(bytes); - const cmd = output.split(' ').shift()?.split('/').pop(); - if (cmd === exec) - return window; - } - catch (_) { } - } - } - } - return null; - } - open(ext) { - ext.tiler.exit(ext); - if (this.opened) - return; - if (!ext.settings.fullscreen_launcher() && ext.focus_window()?.meta.is_fullscreen()) - return; - this.opened = true; - const active_monitor = ext.active_monitor(); - const mon_work_area = ext.monitor_work_area(active_monitor); - const mon_area = ext.monitor_area(active_monitor); - const mon_width = mon_area ? mon_area.width : mon_work_area.width; - super._open(global.get_current_time(), false); - if (!this.dialog.visible) { - this.clear(); - this.cancel(); - this.close(); - return; - } - super.cleanup(); - this.start_services(); - this.search(''); - this.dialog.dialogLayout.x = mon_width / 2 - this.dialog.dialogLayout.width / 2; - let height = mon_work_area.height >= 900 ? mon_work_area.height / 2 : mon_work_area.height / 3.5; - this.dialog.dialogLayout.y = height - this.dialog.dialogLayout.height / 2; - } - start_services() { - if (this.service === null) { - log.debug('starting pop-launcher service'); - const ipc = utils.async_process_ipc(['pop-launcher']); - this.service = ipc ? new service.LauncherService(ipc, (resp) => this.on_response(resp)) : null; - } - } - stop_services(_ext) { - if (this.service !== null) { - log.info(`stopping pop-launcher services`); - this.service.exit(); - this.service = null; - } - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/launcher_service.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/launcher_service.js deleted file mode 100644 index 87d130a5..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/launcher_service.js +++ /dev/null @@ -1,76 +0,0 @@ -import * as log from './log.js'; -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -const { byteArray } = imports; -export class LauncherService { - constructor(service, callback) { - this.service = service; - const generator = (stdout, res) => { - try { - const [bytes] = stdout.read_line_finish(res); - if (bytes) { - const string = byteArray.toString(bytes); - callback(JSON.parse(string)); - this.service.stdout.read_line_async(0, this.service.cancellable, generator); - } - } - catch (why) { - if (why.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) { - return; - } - log.error(`failed to read response from launcher service: ${why}`); - } - }; - this.service.stdout.read_line_async(0, this.service.cancellable, generator); - } - activate(id) { - this.send({ Activate: id }); - } - activate_context(id, context) { - this.send({ ActivateContext: { id, context } }); - } - complete(id) { - this.send({ Complete: id }); - } - context(id) { - this.send({ Context: id }); - } - exit() { - this.send('Exit'); - this.service.cancellable.cancel(); - const service = this.service; - GLib.timeout_add(GLib.PRIORITY_DEFAULT, 100, () => { - if (service.stdout.has_pending() || service.stdin.has_pending()) - return true; - const close_stream = (stream) => { - try { - stream.close(null); - } - catch (why) { - log.error(`failed to close pop-launcher stream: ${why}`); - } - }; - close_stream(service.stdin); - close_stream(service.stdin); - return false; - }); - } - query(search) { - this.send({ Search: search }); - } - quit(id) { - this.send({ Quit: id }); - } - select(id) { - this.send({ Select: id }); - } - send(object) { - const message = JSON.stringify(object); - try { - this.service.stdin.write_all(message + '\n', null); - } - catch (why) { - log.error(`failed to send request to pop-launcher: ${why}`); - } - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/lib.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/lib.js deleted file mode 100644 index b867822e..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/lib.js +++ /dev/null @@ -1,91 +0,0 @@ -import * as log from './log.js'; -import * as rectangle from './rectangle.js'; -import Meta from 'gi://Meta'; -import St from 'gi://St'; -export var Orientation; -(function (Orientation) { - Orientation[Orientation["HORIZONTAL"] = 0] = "HORIZONTAL"; - Orientation[Orientation["VERTICAL"] = 1] = "VERTICAL"; -})(Orientation || (Orientation = {})); -export function nth_rev(array, nth) { - return array[array.length - nth - 1]; -} -export function ok(input, func) { - return input ? func(input) : null; -} -export function ok_or_else(input, ok_func, or_func) { - return input ? ok_func(input) : or_func(); -} -export function or_else(input, func) { - return input ? input : func(); -} -export function bench(name, callback) { - const start = new Date().getMilliseconds(); - const value = callback(); - const end = new Date().getMilliseconds(); - log.info(`bench ${name}: ${end - start} ms elapsed`); - return value; -} -export function current_monitor() { - return rectangle.Rectangle.from_meta(global.display.get_monitor_geometry(global.display.get_current_monitor())); -} -export function cursor_rect() { - let [x, y] = global.get_pointer(); - return new rectangle.Rectangle([x, y, 1, 1]); -} -export function dbg(value) { - log.debug(String(value)); - return value; -} -export function* get_children(actor) { - let nth = 0; - let children = actor.get_n_children(); - while (nth < children) { - const child = actor.get_child_at_index(nth); - if (child) - yield child; - nth += 1; - } -} -export function join(iterator, next_func, between_func) { - ok(iterator.next().value, (first) => { - next_func(first); - for (const item of iterator) { - between_func(); - next_func(item); - } - }); -} -export function is_keyboard_op(op) { - const window_flag_keyboard = Meta.GrabOp.KEYBOARD_MOVING & ~Meta.GrabOp.WINDOW_BASE; - return (op & window_flag_keyboard) != 0; -} -export function is_resize_op(op) { - const window_dir_mask = (Meta.GrabOp.RESIZING_N | Meta.GrabOp.RESIZING_E | Meta.GrabOp.RESIZING_S | Meta.GrabOp.RESIZING_W) & - ~Meta.GrabOp.WINDOW_BASE; - return ((op & window_dir_mask) != 0 || - (op & Meta.GrabOp.KEYBOARD_RESIZING_UNKNOWN) == Meta.GrabOp.KEYBOARD_RESIZING_UNKNOWN); -} -export function is_move_op(op) { - return !is_resize_op(op); -} -export function orientation_as_str(value) { - return value == 0 ? 'Orientation::Horizontal' : 'Orientation::Vertical'; -} -export function recursive_remove_children(actor) { - for (const child of get_children(actor)) { - recursive_remove_children(child); - } - actor.remove_all_children(); -} -export function round_increment(value, increment) { - return Math.round(value / increment) * increment; -} -export function round_to(n, digits) { - let m = Math.pow(10, digits); - n = parseFloat((n * m).toFixed(11)); - return Math.round(n) / m; -} -export function separator() { - return new St.BoxLayout({ styleClass: 'pop-shell-separator', x_expand: true }); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/light.css b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/light.css deleted file mode 100644 index 7e95c484..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/light.css +++ /dev/null @@ -1,57 +0,0 @@ -.pop-shell-active-hint { - border-style: solid; - border-color: #FFAD00; - border-radius: var(--active-hint-border-radius, 5px); - box-shadow: inset 0 0 0 1px rgba(200, 200, 200, 0); -} - -.pop-shell-overlay { - background-color: rgba(53, 132, 228, 0.3); -} - -.pop-shell-border-normal { - border-width: 3px; -} - -.pop-shell-border-maximize { - border-width: 3px; -} - -.pop-shell-search-element:select{ - background: rgba(0, 0, 0, .1); - border-radius: 5px; - color: #393634; -} - -.pop-shell-search-icon { - margin-right: 10px; -} - -.pop-shell-search-cat { - margin-right: 10px; -} - -.pop-shell-search-element { - padding-left: 10px; - padding-right: 2px; - padding-top: 6px; - padding-bottom: 6px; -} - -.pop-shell-tab { - border: 1px solid #333; - color: #000; - padding: 0 1em; -} - -.pop-shell-tab-active { - background: #FFAD00; -} - -.pop-shell-tab-inactive { - background: #9B8E8A; -} - -.pop-shell-tab-urgent { - background: #D00; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/literal_once_cell.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/literal_once_cell.js deleted file mode 100644 index ba86b08c..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/literal_once_cell.js +++ /dev/null @@ -1,9 +0,0 @@ -export class OnceCell { - constructor() { } - get_or_init(callback) { - if (this.value === undefined) { - this.value = callback(); - } - return this.value; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/log.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/log.js deleted file mode 100644 index 26bdeec6..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/log.js +++ /dev/null @@ -1,32 +0,0 @@ -export var LOG_LEVELS; -(function (LOG_LEVELS) { - LOG_LEVELS[LOG_LEVELS["OFF"] = 0] = "OFF"; - LOG_LEVELS[LOG_LEVELS["ERROR"] = 1] = "ERROR"; - LOG_LEVELS[LOG_LEVELS["WARN"] = 2] = "WARN"; - LOG_LEVELS[LOG_LEVELS["INFO"] = 3] = "INFO"; - LOG_LEVELS[LOG_LEVELS["DEBUG"] = 4] = "DEBUG"; -})(LOG_LEVELS || (LOG_LEVELS = {})); -export function log_level() { - let settings = globalThis.popShellExtension.getSettings(); - let log_level = settings.get_uint('log-level'); - return log_level; -} -export function log(text) { - globalThis.log('pop-shell: ' + text); -} -export function error(text) { - if (log_level() > LOG_LEVELS.OFF) - log('[ERROR] ' + text); -} -export function warn(text) { - if (log_level() > LOG_LEVELS.ERROR) - log('[WARN] ' + text); -} -export function info(text) { - if (log_level() > LOG_LEVELS.WARN) - log('[INFO] ' + text); -} -export function debug(text) { - if (log_level() > LOG_LEVELS.INFO) - log('[DEBUG] ' + text); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/metadata.json b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/metadata.json deleted file mode 100644 index c59146ec..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/metadata.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "Pop Shell", - "description": "Pop Shell", - "version": 2, - "uuid": "pop-shell@system76.com", - "settings-schema": "org.gnome.shell.extensions.pop-shell", - "shell-version": [ - "45", - "46" - ] -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/movement.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/movement.js deleted file mode 100644 index 86f74bf6..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/movement.js +++ /dev/null @@ -1,53 +0,0 @@ -export var Movement; -(function (Movement) { - Movement[Movement["NONE"] = 0] = "NONE"; - Movement[Movement["MOVED"] = 1] = "MOVED"; - Movement[Movement["GROW"] = 2] = "GROW"; - Movement[Movement["SHRINK"] = 4] = "SHRINK"; - Movement[Movement["LEFT"] = 8] = "LEFT"; - Movement[Movement["UP"] = 16] = "UP"; - Movement[Movement["RIGHT"] = 32] = "RIGHT"; - Movement[Movement["DOWN"] = 64] = "DOWN"; -})(Movement || (Movement = {})); -export function calculate(from, change) { - const xpos = from.x == change.x; - const ypos = from.y == change.y; - if (xpos && ypos) { - if (from.width == change.width) { - if (from.height == change.width) { - return Movement.NONE; - } - else if (from.height < change.height) { - return Movement.GROW | Movement.DOWN; - } - else { - return Movement.SHRINK | Movement.UP; - } - } - else if (from.width < change.width) { - return Movement.GROW | Movement.RIGHT; - } - else { - return Movement.SHRINK | Movement.LEFT; - } - } - else if (xpos) { - if (from.height < change.height) { - return Movement.GROW | Movement.UP; - } - else { - return Movement.SHRINK | Movement.DOWN; - } - } - else if (ypos) { - if (from.width < change.width) { - return Movement.GROW | Movement.LEFT; - } - else { - return Movement.SHRINK | Movement.RIGHT; - } - } - else { - return Movement.MOVED; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/node.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/node.js deleted file mode 100644 index 4e04b80f..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/node.js +++ /dev/null @@ -1,165 +0,0 @@ -import * as Ecs from './ecs.js'; -export var NodeKind; -(function (NodeKind) { - NodeKind[NodeKind["FORK"] = 1] = "FORK"; - NodeKind[NodeKind["WINDOW"] = 2] = "WINDOW"; - NodeKind[NodeKind["STACK"] = 3] = "STACK"; -})(NodeKind || (NodeKind = {})); -function node_variant_as_string(value) { - return value == NodeKind.FORK ? 'NodeVariant::Fork' : 'NodeVariant::Window'; -} -function stack_detach(node, stack, idx) { - node.entities.splice(idx, 1); - stack.remove_by_pos(idx); -} -export function stack_find(node, entity) { - let idx = 0; - while (idx < node.entities.length) { - if (Ecs.entity_eq(entity, node.entities[idx])) { - return idx; - } - idx += 1; - } - return null; -} -export function stack_move_left(ext, forest, node, entity) { - const stack = forest.stacks.get(node.idx); - if (!stack) - return false; - let idx = 0; - for (const cmp of node.entities) { - if (Ecs.entity_eq(cmp, entity)) { - if (idx === 0) { - stack_detach(node, stack, 0); - return false; - } - else { - stack_swap(node, idx - 1, idx); - stack.active_id -= 1; - ext.auto_tiler?.update_stack(ext, node); - return true; - } - } - idx += 1; - } - return false; -} -export function stack_move_right(ext, forest, node, entity) { - const stack = forest.stacks.get(node.idx); - if (!stack) - return false; - let moved = false; - let idx = 0; - const max = node.entities.length - 1; - for (const cmp of node.entities) { - if (Ecs.entity_eq(cmp, entity)) { - if (idx === max) { - stack_detach(node, stack, idx); - moved = false; - } - else { - stack_swap(node, idx + 1, idx); - stack.active_id += 1; - ext.auto_tiler?.update_stack(ext, node); - moved = true; - } - break; - } - idx += 1; - } - return moved; -} -export function stack_replace(ext, node, window) { - if (!ext.auto_tiler) - return; - const stack = ext.auto_tiler.forest.stacks.get(node.idx); - if (!stack) - return; - stack.replace(window); -} -export function stack_remove(forest, node, entity) { - const stack = forest.stacks.get(node.idx); - if (!stack) - return null; - const idx = stack.remove_tab(entity); - if (idx !== null) - node.entities.splice(idx, 1); - return idx; -} -function stack_swap(node, from, to) { - const tmp = node.entities[from]; - node.entities[from] = node.entities[to]; - node.entities[to] = tmp; -} -export class Node { - constructor(inner) { - this.inner = inner; - } - static fork(entity) { - return new Node({ kind: NodeKind.FORK, entity }); - } - static window(entity) { - return new Node({ kind: NodeKind.WINDOW, entity }); - } - static stacked(window, idx) { - const node = new Node({ - kind: NodeKind.STACK, - entities: [window], - idx, - rect: null, - }); - return node; - } - display(fmt) { - fmt += `{\n kind: ${node_variant_as_string(this.inner.kind)},\n `; - switch (this.inner.kind) { - case 1: - case 2: - fmt += `entity: (${this.inner.entity})\n }`; - return fmt; - case 3: - fmt += `entities: ${this.inner.entities}\n }`; - return fmt; - } - } - is_in_stack(entity) { - if (this.inner.kind === 3) { - for (const compare of this.inner.entities) { - if (Ecs.entity_eq(entity, compare)) - return true; - } - } - return false; - } - is_fork(entity) { - return this.inner.kind === 1 && Ecs.entity_eq(this.inner.entity, entity); - } - is_window(entity) { - return this.inner.kind === 2 && Ecs.entity_eq(this.inner.entity, entity); - } - measure(tiler, ext, parent, area, record) { - switch (this.inner.kind) { - case 1: - const fork = tiler.forks.get(this.inner.entity); - if (fork) { - record; - fork.measure(tiler, ext, area, record); - } - break; - case 2: - record(this.inner.entity, parent, area.clone()); - break; - case 3: - const size = ext.dpi * 4; - this.inner.rect = area.clone(); - this.inner.rect.y += size * 6; - this.inner.rect.height -= size * 6; - for (const entity of this.inner.entities) { - record(entity, parent, this.inner.rect); - } - if (ext.auto_tiler) { - ext.auto_tiler.forest.stack_updates.push([this.inner, parent]); - } - } - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/panel_settings.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/panel_settings.js deleted file mode 100644 index 632b1f54..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/panel_settings.js +++ /dev/null @@ -1,258 +0,0 @@ -import * as Utils from './utils.js'; -import Clutter from 'gi://Clutter'; -import Gio from 'gi://Gio'; -import St from 'gi://St'; -import { PopupBaseMenuItem, PopupMenuItem, PopupSwitchMenuItem, PopupSeparatorMenuItem, } from 'resource:///org/gnome/shell/ui/popupMenu.js'; -import { Button } from 'resource:///org/gnome/shell/ui/panelMenu.js'; -import GLib from 'gi://GLib'; -import { spawn } from 'resource:///org/gnome/shell/misc/util.js'; -import { get_current_path } from './paths.js'; -export class Indicator { - constructor(ext) { - this.button = new Button(0.0, _('Pop Shell Settings')); - const path = get_current_path(); - ext.button = this.button; - ext.button_gio_icon_auto_on = Gio.icon_new_for_string(`${path}/icons/pop-shell-auto-on-symbolic.svg`); - ext.button_gio_icon_auto_off = Gio.icon_new_for_string(`${path}/icons/pop-shell-auto-off-symbolic.svg`); - let button_icon_auto_on = new St.Icon({ - gicon: ext.button_gio_icon_auto_on, - style_class: 'system-status-icon', - }); - let button_icon_auto_off = new St.Icon({ - gicon: ext.button_gio_icon_auto_off, - style_class: 'system-status-icon', - }); - if (ext.settings.tile_by_default()) { - this.button.icon = button_icon_auto_on; - } - else { - this.button.icon = button_icon_auto_off; - } - this.button.add_child(this.button.icon); - let bm = this.button.menu; - this.toggle_tiled = tiled(ext); - this.toggle_active = toggle(_('Show Active Hint'), ext.settings.active_hint(), (toggle) => { - ext.settings.set_active_hint(toggle.state); - }); - this.entry_gaps = number_entry(_('Gaps'), ext.settings.gap_inner(), (value) => { - ext.settings.set_gap_inner(value); - ext.settings.set_gap_outer(value); - }); - this.border_radius = number_entry(_('Active Border Radius'), { - value: ext.settings.active_hint_border_radius(), - min: 0, - max: 30, - }, (value) => { - ext.settings.set_active_hint_border_radius(value); - }); - bm.addMenuItem(this.toggle_tiled); - bm.addMenuItem(floating_window_exceptions(ext, bm)); - bm.addMenuItem(menu_separator('')); - bm.addMenuItem(shortcuts(bm)); - bm.addMenuItem(settings_button(bm)); - bm.addMenuItem(menu_separator('')); - if (!Utils.is_wayland()) { - this.toggle_titles = show_title(ext); - bm.addMenuItem(this.toggle_titles); - } - bm.addMenuItem(this.toggle_active); - bm.addMenuItem(this.border_radius); - bm.addMenuItem(color_selector(ext, bm)); - bm.addMenuItem(this.entry_gaps); - } - destroy() { - this.button.destroy(); - } -} -function menu_separator(text) { - return new PopupSeparatorMenuItem(text); -} -function settings_button(menu) { - let item = new PopupMenuItem(_('View All')); - item.connect('activate', () => { - let path = GLib.find_program_in_path('pop-shell-shortcuts'); - if (path) { - spawn([path]); - } - else { - spawn(['xdg-open', 'https://support.system76.com/articles/pop-keyboard-shortcuts/']); - } - menu.close(); - }); - item.label.get_clutter_text().set_margin_left(12); - return item; -} -function floating_window_exceptions(ext, menu) { - let label = new St.Label({ text: 'Floating Window Exceptions' }); - label.set_x_expand(true); - let icon = new St.Icon({ icon_name: 'go-next-symbolic', icon_size: 16 }); - let widget = new St.BoxLayout({ vertical: false }); - widget.add_child(label); - widget.add_child(icon); - widget.set_x_expand(true); - let base = new PopupBaseMenuItem(); - base.add_child(widget); - base.connect('activate', () => { - ext.exception_dialog(); - GLib.timeout_add(GLib.PRIORITY_LOW, 300, () => { - menu.close(); - return false; - }); - }); - return base; -} -function shortcuts(menu) { - let layout_manager = new Clutter.GridLayout({ orientation: Clutter.Orientation.HORIZONTAL }); - let widget = new St.Widget({ layout_manager, x_expand: true }); - let item = new PopupBaseMenuItem(); - item.add_child(widget); - item.connect('activate', () => { - let path = GLib.find_program_in_path('pop-shell-shortcuts'); - if (path) { - spawn([path]); - } - else { - spawn(['xdg-open', 'https://support.system76.com/articles/pop-keyboard-shortcuts/']); - } - menu.close(); - }); - function create_label(text) { - return new St.Label({ text }); - } - function create_shortcut_label(text) { - let label = create_label(text); - label.set_x_align(Clutter.ActorAlign.END); - return label; - } - layout_manager.set_row_spacing(12); - layout_manager.set_column_spacing(30); - layout_manager.attach(create_label(_('Shortcuts')), 0, 0, 2, 1); - let launcher_shortcut = _('Super + /'); - [ - [_('Launcher'), launcher_shortcut], - [_('Navigate Windows'), _('Super + Arrow Keys')], - [_('Toggle Tiling'), _('Super + Y')], - ].forEach((section, idx) => { - let key = create_label(section[0]); - key.get_clutter_text().set_margin_left(12); - let val = create_shortcut_label(section[1]); - layout_manager.attach(key, 0, idx + 1, 1, 1); - layout_manager.attach(val, 1, idx + 1, 1, 1); - }); - return item; -} -function clamp(input, min = 0, max = 128) { - return Math.min(Math.max(min, input), max); -} -function number_entry(label, valueOrOptions, callback) { - let value = valueOrOptions, min, max; - if (typeof valueOrOptions !== 'number') - ({ value, min, max } = valueOrOptions); - const entry = new St.Entry({ - text: String(value), - input_purpose: Clutter.InputContentPurpose.NUMBER, - x_align: Clutter.ActorAlign.CENTER, - x_expand: false, - }); - entry.set_style('width: 5em'); - entry.connect('button-release-event', () => { - return true; - }); - const text = entry.clutter_text; - text.set_max_length(2); - entry.connect('key-release-event', (_, event) => { - const symbol = event.get_key_symbol(); - const number = symbol == 65293 - ? parse_number(text.text) - : symbol == 65361 - ? clamp(parse_number(text.text) - 1, min, max) - : symbol == 65363 - ? clamp(parse_number(text.text) + 1, min, max) - : null; - if (number !== null) { - text.set_text(String(number)); - } - }); - const create_icon = (icon_name) => { - return new St.Icon({ icon_name, icon_size: 16 }); - }; - entry.set_primary_icon(create_icon('value-decrease')); - entry.connect('primary-icon-clicked', () => { - text.set_text(String(clamp(parseInt(text.get_text()) - 1, min, max))); - }); - entry.set_secondary_icon(create_icon('value-increase')); - entry.connect('secondary-icon-clicked', () => { - text.set_text(String(clamp(parseInt(text.get_text()) + 1, min, max))); - }); - text.connect('text-changed', () => { - const input = text.get_text(); - let parsed = parseInt(input); - if (isNaN(parsed)) { - text.set_text(input.substr(0, input.length - 1)); - parsed = 0; - } - callback(parsed); - }); - const item = new PopupMenuItem(label); - item.label.get_clutter_text().set_x_expand(true); - item.label.set_y_align(Clutter.ActorAlign.CENTER); - item.add_child(entry); - return item; -} -function parse_number(text) { - let number = parseInt(text, 10); - if (isNaN(number)) { - number = 0; - } - return number; -} -function show_title(ext) { - const t = toggle(_('Show Window Titles'), ext.settings.show_title(), (toggle) => { - ext.settings.set_show_title(toggle.state); - }); - return t; -} -function toggle(desc, active, connect) { - let toggle = new PopupSwitchMenuItem(desc, active); - toggle.label.set_y_align(Clutter.ActorAlign.CENTER); - toggle.connect('toggled', () => { - connect(toggle); - return true; - }); - return toggle; -} -function tiled(ext) { - let t = toggle(_('Tile Windows'), null != ext.auto_tiler, () => ext.toggle_tiling()); - return t; -} -function color_selector(ext, menu) { - let color_selector_item = new PopupMenuItem('Active Hint Color'); - let color_button = new St.Button(); - let settings = ext.settings; - let selected_color = settings.hint_color_rgba(); - color_button.label = ' '; - color_button.set_style(`background-color: ${selected_color}; border: 2px solid lightgray; border-radius: 2px`); - settings.ext.connect('changed', (_, key) => { - if (key === 'hint-color-rgba') { - let color_value = settings.hint_color_rgba(); - color_button.set_style(`background-color: ${color_value}; border: 2px solid lightgray; border-radius: 2px`); - } - }); - color_button.set_x_align(Clutter.ActorAlign.END); - color_button.set_x_expand(false); - color_selector_item.label.get_clutter_text().set_x_expand(true); - color_selector_item.label.set_y_align(Clutter.ActorAlign.CENTER); - color_selector_item.add_child(color_button); - color_button.connect('button-press-event', () => { - let path = get_current_path() + '/color_dialog/main.js'; - let resp = GLib.spawn_command_line_async(`gjs --module ${path}`); - if (!resp) { - return null; - } - GLib.timeout_add(GLib.PRIORITY_LOW, 300, () => { - menu.close(); - return false; - }); - }); - return color_selector_item; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/paths.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/paths.js deleted file mode 100644 index 4bd5c930..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/paths.js +++ /dev/null @@ -1,3 +0,0 @@ -export function get_current_path() { - return import.meta.url.split('://')[1].split('/').slice(0, -1).join('/'); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/prefs.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/prefs.js deleted file mode 100644 index 7be14588..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/prefs.js +++ /dev/null @@ -1,197 +0,0 @@ -import Gtk from 'gi://Gtk'; -import Gio from 'gi://Gio'; -const Settings = Gio.Settings; -import { ExtensionPreferences } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; -import * as settings from './settings.js'; -import * as log from './log.js'; -import * as focus from './focus.js'; -export default class PopShellPreferences extends ExtensionPreferences { - getPreferencesWidget() { - globalThis.popShellExtension = this; - let dialog = settings_dialog_new(); - if (dialog.show_all) { - dialog.show_all(); - } - else { - dialog.show(); - } - log.debug(JSON.stringify(dialog)); - return dialog; - } -} -function settings_dialog_new() { - let [app, grid] = settings_dialog_view(); - let ext = new settings.ExtensionSettings(); - app.window_titles.set_active(ext.show_title()); - app.window_titles.connect('state-set', (_widget, state) => { - ext.set_show_title(state); - Settings.sync(); - }); - app.snap_to_grid.set_active(ext.snap_to_grid()); - app.snap_to_grid.connect('state-set', (_widget, state) => { - ext.set_snap_to_grid(state); - Settings.sync(); - }); - app.smart_gaps.set_active(ext.smart_gaps()); - app.smart_gaps.connect('state-set', (_widget, state) => { - ext.set_smart_gaps(state); - Settings.sync(); - }); - app.outer_gap.set_text(String(ext.gap_outer())); - app.outer_gap.connect('activate', (widget) => { - let parsed = parseInt(widget.get_text().trim()); - if (!isNaN(parsed)) { - ext.set_gap_outer(parsed); - Settings.sync(); - } - }); - app.inner_gap.set_text(String(ext.gap_inner())); - app.inner_gap.connect('activate', (widget) => { - let parsed = parseInt(widget.get_text().trim()); - if (!isNaN(parsed)) { - ext.set_gap_inner(parsed); - Settings.sync(); - } - }); - app.log_level.set_active(ext.log_level()); - app.log_level.connect('changed', () => { - let active_id = app.log_level.get_active_id(); - ext.set_log_level(active_id); - }); - app.show_skip_taskbar.set_active(ext.show_skiptaskbar()); - app.show_skip_taskbar.connect('state-set', (_widget, state) => { - ext.set_show_skiptaskbar(state); - Settings.sync(); - }); - app.mouse_cursor_follows_active_window.set_active(ext.mouse_cursor_follows_active_window()); - app.mouse_cursor_follows_active_window.connect('state-set', (_widget, state) => { - ext.set_mouse_cursor_follows_active_window(state); - Settings.sync(); - }); - app.mouse_cursor_focus_position.set_active(ext.mouse_cursor_focus_location()); - app.mouse_cursor_focus_position.connect('changed', () => { - let active_id = app.mouse_cursor_focus_position.get_active_id(); - ext.set_mouse_cursor_focus_location(active_id); - }); - app.fullscreen_launcher.set_active(ext.fullscreen_launcher()); - app.fullscreen_launcher.connect('state-set', (_widget, state) => { - ext.set_fullscreen_launcher(state); - Settings.sync(); - }); - app.stacking_with_mouse.set_active(ext.stacking_with_mouse()); - app.stacking_with_mouse.connect('state-set', (_widget, state) => { - ext.set_stacking_with_mouse(state); - Settings.sync(); - }); - return grid; -} -function settings_dialog_view() { - const grid = new Gtk.Grid({ - column_spacing: 12, - row_spacing: 12, - margin_start: 10, - margin_end: 10, - margin_bottom: 10, - margin_top: 10, - }); - const win_label = new Gtk.Label({ - label: 'Show Window Titles', - xalign: 0.0, - hexpand: true, - }); - const snap_label = new Gtk.Label({ - label: 'Snap to Grid (Floating Mode)', - xalign: 0.0, - }); - const smart_label = new Gtk.Label({ - label: 'Smart Gaps', - xalign: 0.0, - }); - const show_skip_taskbar_label = new Gtk.Label({ - label: 'Show Minimize to Tray Windows', - xalign: 0.0, - }); - const mouse_cursor_follows_active_window_label = new Gtk.Label({ - label: 'Mouse Cursor Follows Active Window', - xalign: 0.0, - }); - const fullscreen_launcher_label = new Gtk.Label({ - label: 'Allow launcher over fullscreen window', - xalign: 0.0, - }); - const stacking_with_mouse = new Gtk.Label({ - label: 'Allow stacking with mouse', - xalign: 0.0, - }); - const [inner_gap, outer_gap] = gaps_section(grid, 9); - const settings = { - inner_gap, - outer_gap, - fullscreen_launcher: new Gtk.Switch({ halign: Gtk.Align.END }), - stacking_with_mouse: new Gtk.Switch({ halign: Gtk.Align.END }), - smart_gaps: new Gtk.Switch({ halign: Gtk.Align.END }), - snap_to_grid: new Gtk.Switch({ halign: Gtk.Align.END }), - window_titles: new Gtk.Switch({ halign: Gtk.Align.END }), - show_skip_taskbar: new Gtk.Switch({ halign: Gtk.Align.END }), - mouse_cursor_follows_active_window: new Gtk.Switch({ halign: Gtk.Align.END }), - mouse_cursor_focus_position: build_combo(grid, 7, focus.FocusPosition, 'Mouse Cursor Focus Position'), - log_level: build_combo(grid, 8, log.LOG_LEVELS, 'Log Level'), - }; - grid.attach(win_label, 0, 0, 1, 1); - grid.attach(settings.window_titles, 1, 0, 1, 1); - grid.attach(snap_label, 0, 1, 1, 1); - grid.attach(settings.snap_to_grid, 1, 1, 1, 1); - grid.attach(smart_label, 0, 2, 1, 1); - grid.attach(settings.smart_gaps, 1, 2, 1, 1); - grid.attach(fullscreen_launcher_label, 0, 3, 1, 1); - grid.attach(settings.fullscreen_launcher, 1, 3, 1, 1); - grid.attach(stacking_with_mouse, 0, 4, 1, 1); - grid.attach(settings.stacking_with_mouse, 1, 4, 1, 1); - grid.attach(show_skip_taskbar_label, 0, 5, 1, 1); - grid.attach(settings.show_skip_taskbar, 1, 5, 1, 1); - grid.attach(mouse_cursor_follows_active_window_label, 0, 6, 1, 1); - grid.attach(settings.mouse_cursor_follows_active_window, 1, 6, 1, 1); - return [settings, grid]; -} -function gaps_section(grid, top) { - let outer_label = new Gtk.Label({ - label: 'Outer', - xalign: 0.0, - margin_start: 24, - }); - let outer_entry = number_entry(); - let inner_label = new Gtk.Label({ - label: 'Inner', - xalign: 0.0, - margin_start: 24, - }); - let inner_entry = number_entry(); - let section_label = new Gtk.Label({ - label: 'Gaps', - xalign: 0.0, - }); - grid.attach(section_label, 0, top, 1, 1); - grid.attach(outer_label, 0, top + 1, 1, 1); - grid.attach(outer_entry, 1, top + 1, 1, 1); - grid.attach(inner_label, 0, top + 2, 1, 1); - grid.attach(inner_entry, 1, top + 2, 1, 1); - return [inner_entry, outer_entry]; -} -function number_entry() { - return new Gtk.Entry({ input_purpose: Gtk.InputPurpose.NUMBER }); -} -function build_combo(grid, top_index, iter_enum, label) { - let label_ = new Gtk.Label({ - label: label, - halign: Gtk.Align.START, - }); - grid.attach(label_, 0, top_index, 1, 1); - let combo = new Gtk.ComboBoxText(); - for (const [index, key] of Object.keys(iter_enum).entries()) { - if (typeof iter_enum[key] == 'string') { - combo.append(`${index}`, iter_enum[key]); - } - } - grid.attach(combo, 1, top_index, 1, 1); - return combo; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/rectangle.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/rectangle.js deleted file mode 100644 index a775968b..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/rectangle.js +++ /dev/null @@ -1,81 +0,0 @@ -export class Rectangle { - constructor(array) { - this.array = array; - } - static from_meta(meta) { - return new Rectangle([meta.x, meta.y, meta.width, meta.height]); - } - get x() { - return this.array[0]; - } - set x(x) { - this.array[0] = x; - } - get y() { - return this.array[1]; - } - set y(y) { - this.array[1] = y; - } - get width() { - return this.array[2]; - } - set width(width) { - this.array[2] = width; - } - get height() { - return this.array[3]; - } - set height(height) { - this.array[3] = height; - } - apply(other) { - this.x += other.x; - this.y += other.y; - this.width += other.width; - this.height += other.height; - return this; - } - clamp(other) { - this.x = Math.max(other.x, this.x); - this.y = Math.max(other.y, this.y); - let tend = this.x + this.width, oend = other.x + other.width; - if (tend > oend) { - this.width = oend - this.x; - } - tend = this.y + this.height; - oend = other.y + other.height; - if (tend > oend) { - this.height = oend - this.y; - } - } - clone() { - return new Rectangle([this.array[0], this.array[1], this.array[2], this.array[3]]); - } - contains(other) { - return (this.x <= other.x && - this.y <= other.y && - this.x + this.width >= other.x + other.width && - this.y + this.height >= other.y + other.height); - } - diff(other) { - return new Rectangle([ - other.x - this.x, - other.y - this.y, - other.width - this.width, - other.height - this.height, - ]); - } - eq(other) { - return this.x == other.x && this.y == other.y && this.width == other.width && this.height == other.height; - } - fmt() { - return `Rect(${[this.x, this.y, this.width, this.height]})`; - } - intersects(other) { - return (this.x < other.x + other.width && - this.x + this.width > other.x && - this.y < other.y + other.height && - this.y + this.height > other.y); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/result.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/result.js deleted file mode 100644 index 8e74c512..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/result.js +++ /dev/null @@ -1,8 +0,0 @@ -export const OK = 1; -export const ERR = 2; -export function Ok(value) { - return { kind: 1, value: value }; -} -export function Err(value) { - return { kind: 2, value: value }; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/scheduler.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/scheduler.js deleted file mode 100644 index 9295d7ca..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/scheduler.js +++ /dev/null @@ -1,36 +0,0 @@ -import * as log from './log.js'; -import Gio from 'gi://Gio'; -const SchedulerInterface = '\ - \ - \ - \ - \ - \ -'; -const SchedulerProxy = Gio.DBusProxy.makeProxyWrapper(SchedulerInterface); -const SchedProxy = new SchedulerProxy(Gio.DBus.system, 'com.system76.Scheduler', '/com/system76/Scheduler'); -let foreground = 0; -let failed = false; -export function setForeground(win) { - if (failed) - return; - const pid = win.get_pid(); - if (pid) { - if (foreground === pid) - return; - foreground = pid; - try { - SchedProxy.SetForegroundProcessRemote(pid, (_result, error, _fds) => { - if (error !== null) - errorHandler(error); - }); - } - catch (error) { - errorHandler(error); - } - } -} -function errorHandler(error) { - log.warn(`system76-scheduler may not be installed and running: ${error}`); - failed = true; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/schemas/gschemas.compiled b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/schemas/gschemas.compiled deleted file mode 100644 index 5a8e813f..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/schemas/gschemas.compiled and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/schemas/org.gnome.shell.extensions.pop-shell.gschema.xml b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/schemas/org.gnome.shell.extensions.pop-shell.gschema.xml deleted file mode 100644 index fc766da7..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/schemas/org.gnome.shell.extensions.pop-shell.gschema.xml +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - false - Show a hint around the active window - - - - 5 - - Border radius for active window hint, in pixels - - - - false - Allow showing launcher above fullscreen windows - - - - 2 - Gap between tiled windows - - - - 2 - Gap surrounding tiled windows - - - - true - Show title bars on windows with server-side decorations - - - - true - Handle minimized to tray windows - - - - true - Move cursor to active window when navigating with keyboard shortcuts or touchpad gestures - - - - 0 - The location the mouse cursor focuses when selecting a window - - - - - 64 - Size of a column in the display grid - - - - 64 - Size of a row in the display grid - - - - false - Hide the outer gap when a tree contains only one window - - - - false - Snaps windows to the tiling grid on drop - - - - false - Tile launched windows by default - - - - true - Allow for stacking windows as a result of dragging a window with mouse - - - - - Left','KP_Left','h']]]> - Focus left window - - - - Down','KP_Down','j']]]> - Focus down window - - - - Up','KP_Up','k']]]> - Focus up window - - - - Right','KP_Right','l']]]> - Focus right window - - - - - slash']]]> - Search key combo - - - - - - Toggle stacking mode inside management mode - - - - s']]]> - Toggle stacking mode outside management mode - - - - - Toggle tiling orientation - - - - Return','KP_Enter']]]> - Enter tiling mode - - - - - Accept tiling changes - - - - - Reject tiling changes - - - - g']]]> - Toggles a window between floating and tiling - - - - - y']]]> - Toggles auto-tiling on and off - - - - - - Move window left - - - - - Move window down - - - - - Move window up - - - - - Move window right - - - - - Move window left - - - - - Move window down - - - - - Move window up - - - - - Move window right - - - - o']]]> - Toggle tiling orientation - - - - - Left','KP_Left','h']]]> - Resize window left - - - - Down','KP_Down','j']]]> - Resize window down - - - - Up','KP_Up','k']]]> - Resize window up - - - - Right','KP_Right','l']]]> - Resize window right - - - - - Left','KP_Left','h']]]> - Swap window left - - - - Down','KP_Down','j']]]> - Swap window down - - - - Up','KP_Up','k']]]> - Swap window up - - - - Right','KP_Right','l']]]> - Swap window right - - - - - - Down','KP_Down','j']]]> - Move window to the lower workspace - - - - Up','KP_Up','k']]]> - Move window to the upper workspace - - - - Down','KP_Down','j']]]> - Move window to the lower monitor - - - - Up','KP_Up','k']]]> - Move window to the upper monitor - - - - Left','KP_Left','h']]]> - Move window to the leftward monitor - - - - Right','KP_Right','l']]]> - Move window to the rightward monitor - - - - 'rgba(251, 184, 108, 1)' - The current active-hint-color in RGBA - - - 0 - - Derive some log4j level/order - 0 - OFF - 1 - ERROR - 2 - WARN - 3 - INFO - 4 - DEBUG - - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/search.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/search.js deleted file mode 100644 index a49a8264..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/search.js +++ /dev/null @@ -1,400 +0,0 @@ -import * as Lib from './lib.js'; -import * as rect from './rectangle.js'; -import GLib from 'gi://GLib'; -import Clutter from 'gi://Clutter'; -import Gio from 'gi://Gio'; -import Pango from 'gi://Pango'; -import Shell from 'gi://Shell'; -import St from 'gi://St'; -import Gdk from 'gi://Gdk'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import { ModalDialog } from 'resource:///org/gnome/shell/ui/modalDialog.js'; -import * as Util from 'resource:///org/gnome/shell/misc/util.js'; -const { overview, wm } = Main; -import { Overview } from 'resource:///org/gnome/shell/ui/overview.js'; -let overview_toggle = null; -export class Search { - constructor() { - this.dialog = new ModalDialog({ - styleClass: 'pop-shell-search modal-dialog', - destroyOnClose: false, - shellReactive: true, - shouldFadeIn: false, - shouldFadeOut: false, - }); - this.children_to_abandon = null; - this.last_trigger = 0; - this.grab_handle = null; - this.activate_id = () => { }; - this.cancel = () => { }; - this.complete = () => { }; - this.search = () => { }; - this.select = () => { }; - this.quit = () => { }; - this.copy = () => { }; - this.active_id = 0; - this.widgets = []; - this.entry = new St.Entry({ - style_class: 'pop-shell-entry', - can_focus: true, - x_expand: true, - }); - this.entry.set_hint_text(" Type to search apps, or type '?' for more options."); - this.text = this.entry.get_clutter_text(); - this.text.set_use_markup(true); - this.dialog.setInitialKeyFocus(this.text); - let text_changed = null; - this.text.connect('activate', () => this.activate_id(this.active_id)); - this.text.connect('text-changed', (entry) => { - if (text_changed !== null) - GLib.source_remove(text_changed); - const text = entry.get_text().trim(); - const update = () => { - this.clear(); - this.search(text); - }; - if (text.length === 0) { - update(); - return; - } - text_changed = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 0, () => { - text_changed = null; - update(); - return false; - }); - }); - this.text.connect('key-press-event', (_, event) => { - const key = Gdk.keyval_name(Gdk.keyval_to_upper(event.get_key_symbol())); - const ctrlKey = Boolean(event.get_state() & Clutter.ModifierType.CONTROL_MASK); - const is_down = () => { - return key === 'Down' || (ctrlKey && key === 'J') || (ctrlKey && key === 'N'); - }; - const is_up = () => { - return key === 'Up' || key === 'ISO_Left_Tab' || (ctrlKey && key === 'K') || (ctrlKey && key === 'P'); - }; - const up_arrow = () => { - if (0 < this.active_id) { - this.select_id(this.active_id - 1); - } - else if (this.active_id == 0) { - this.select_id(this.widgets.length - 1); - } - }; - const down_arrow = () => { - if (this.active_id + 1 < this.widgets.length) { - this.select_id(this.active_id + 1); - } - else if (this.active_id + 1 == this.widgets.length) { - this.select_id(0); - } - }; - if (event.get_flags() != Clutter.EventFlags.NONE) { - const now = global.get_current_time(); - if (now - this.last_trigger < 100) { - return; - } - this.last_trigger = now; - if (is_up()) { - up_arrow(); - this.select(this.active_id); - } - else if (is_down()) { - down_arrow(); - this.select(this.active_id); - } - return; - } - this.last_trigger = global.get_current_time(); - if (key === 'Escape') { - this.reset(); - this.close(); - this.cancel(); - return; - } - else if (key === 'Tab') { - this.complete(); - return; - } - if (is_up()) { - up_arrow(); - } - else if (is_down()) { - down_arrow(); - } - else if (ctrlKey && key === '1') { - this.activate_id(0); - return; - } - else if (ctrlKey && key === '2') { - this.activate_id(1); - return; - } - else if (ctrlKey && key === '3') { - this.activate_id(2); - return; - } - else if (ctrlKey && key === '4') { - this.activate_id(3); - return; - } - else if (ctrlKey && key === '5') { - this.activate_id(4); - return; - } - else if (ctrlKey && key === '6') { - this.activate_id(5); - return; - } - else if (ctrlKey && key === '7') { - this.activate_id(6); - return; - } - else if (ctrlKey && key === '8') { - this.activate_id(7); - return; - } - else if (ctrlKey && key === '9') { - this.activate_id(8); - return; - } - else if (ctrlKey && key === 'Q') { - this.quit(this.active_id); - return; - } - else if (key === 'Copy' || (ctrlKey && (key === 'C' || key === 'Insert'))) { - if (this.text.get_selection()) { - return; - } - else { - this.copy(this.active_id); - this.close(); - this.cancel(); - } - } - this.select(this.active_id); - }); - this.list = new St.BoxLayout({ - styleClass: 'pop-shell-search-list', - vertical: true, - }); - const scroller = new St.ScrollView(); - scroller.add_child(this.list); - this.dialog.contentLayout.add_child(this.entry); - this.dialog.contentLayout.add_child(scroller); - this.scroller = scroller; - this.dialog.contentLayout.width = Math.max(Lib.current_monitor().width / 4, 640); - this.dialog.connect('event', (_actor, event) => { - const { width, height } = this.dialog.dialogLayout._dialog; - const { x, y } = this.dialog.dialogLayout; - const area = new rect.Rectangle([x, y, width, height]); - const close = this.dialog.visible && - event.type() == Clutter.EventType.BUTTON_PRESS && - !area.contains(Lib.cursor_rect()); - if (close) { - this.reset(); - this.close(); - this.cancel(); - } - return Clutter.EVENT_PROPAGATE; - }); - this.dialog.connect('closed', () => this.cancel()); - } - cleanup() { - if (this.children_to_abandon) { - for (const child of this.children_to_abandon) { - child.destroy(); - } - this.children_to_abandon = null; - } - } - clear() { - this.children_to_abandon = this.list.get_children(); - this.widgets = []; - this.active_id = 0; - } - close() { - try { - if (this.grab_handle !== null) { - Main.popModal(this.grab_handle); - this.grab_handle = null; - } - } - catch (error) { - } - this.reset(); - this.remove_injections(); - this.dialog.close(global.get_current_time()); - wm.allowKeybinding('overlay-key', Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW); - } - _open(timestamp, on_primary) { - this.grab_handle = Main.pushModal(this.dialog.dialogLayout); - this.dialog.open(timestamp, on_primary); - wm.allowKeybinding('overlay-key', Shell.ActionMode.ALL); - overview_toggle = Overview.prototype['toggle']; - Overview.prototype['toggle'] = () => { - if (this.dialog.is_visible()) { - this.reset(); - this.close(); - this.cancel(); - } - else { - this.remove_injections(); - overview.toggle(); - } - }; - } - get_text() { - return this.text.get_text(); - } - icon_size() { - return 34; - } - get list_max() { - return 7; - } - reset() { - this.clear(); - this.text.set_text(null); - } - show() { - this.dialog.show_all(); - this.clear(); - this.entry.grab_key_focus(); - } - highlight_selected() { - const widget = this.widgets[this.active_id]; - if (widget) { - widget.add_style_pseudo_class('select'); - try { - Util.ensureActorVisibleInScrollView(this.scroller, widget); - } - catch (_error) { } - } - } - select_id(id) { - this.unselect(); - this.active_id = id; - this.highlight_selected(); - } - unselect() { - this.widgets[this.active_id]?.remove_style_pseudo_class('select'); - } - append_search_option(option) { - const id = this.widgets.length; - if (id !== 0) { - this.list.add_child(Lib.separator()); - } - const { widget, shortcut } = option; - if (id < 9) { - shortcut.set_text(`Ctrl + ${id + 1}`); - shortcut.show(); - } - else { - shortcut.hide(); - } - let initial_cursor = Lib.cursor_rect(); - widget.connect('clicked', () => this.activate_id(id)); - widget.connect('notify::hover', () => { - const { x, y } = Lib.cursor_rect(); - if (x === initial_cursor.x && y === initial_cursor.y) - return; - this.select_id(id); - this.select(id); - }); - this.widgets.push(widget); - this.list.add_child(widget); - this.cleanup(); - this.list.show(); - const vscroll = this.scroller.get_vscroll_bar(); - if (this.scroller.vscrollbar_visible) { - vscroll.show(); - } - else { - vscroll.hide(); - } - if (id === 0) { - GLib.idle_add(GLib.PRIORITY_DEFAULT, () => { - this.highlight_selected(); - this.select(0); - return false; - }); - } - } - set_text(text) { - this.text.set_text(text); - } - remove_injections() { - if (overview_toggle !== null) { - Overview.prototype['toggle'] = overview_toggle; - overview_toggle = null; - } - } -} -export class SearchOption { - constructor(title, description, category_icon, icon, icon_size, exec, keywords) { - this.shortcut = new St.Label({ - text: '', - y_align: Clutter.ActorAlign.CENTER, - style: 'padding-left: 6px;padding-right: 6px', - }); - this.title = title; - this.description = description; - this.exec = exec; - this.keywords = keywords; - const layout = new St.BoxLayout({ x_expand: true }); - attach_icon(layout, category_icon, icon_size / 2); - const label = new St.Label({ text: title }); - label.clutter_text.set_ellipsize(Pango.EllipsizeMode.END); - attach_icon(layout, icon, icon_size); - const info_box = new St.BoxLayout({ - y_align: Clutter.ActorAlign.CENTER, - vertical: true, - x_expand: true, - }); - info_box.add_child(label); - if (description) { - info_box.add_child(new St.Label({ text: description, style: 'font-size: small' })); - } - layout.add_child(info_box); - layout.add_child(this.shortcut); - this.widget = new St.Button({ style_class: 'pop-shell-search-element' }); - this.widget.add_child(layout); - } -} -function attach_icon(layout, icon, icon_size) { - if (icon) { - const generated = generate_icon(icon, icon_size); - if (generated) { - generated.set_y_align(Clutter.ActorAlign.CENTER); - layout.add_child(generated); - } - } -} -function generate_icon(icon, icon_size) { - let app_icon = null; - if ('Name' in icon) { - const file = Gio.File.new_for_path(icon.Name); - if (file.query_exists(null)) { - app_icon = new St.Icon({ - gicon: Gio.icon_new_for_string(icon.Name), - icon_size, - }); - } - else { - app_icon = new St.Icon({ - icon_name: icon.Name, - icon_size, - }); - } - } - else if ('Mime' in icon) { - app_icon = new St.Icon({ - gicon: Gio.content_type_get_icon(icon.Mime), - icon_size, - }); - } - if (app_icon) { - app_icon.style_class = 'pop-shell-search-icon'; - } - return app_icon; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/settings.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/settings.js deleted file mode 100644 index 353dcf87..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/settings.js +++ /dev/null @@ -1,185 +0,0 @@ -import Gio from 'gi://Gio'; -import Gdk from 'gi://Gdk'; -import { get_current_path } from './paths.js'; -const DARK = ['dark', 'adapta', 'plata', 'dracula']; -function settings_new_id(schema_id) { - try { - return new Gio.Settings({ schema_id }); - } - catch (why) { - if (schema_id !== 'org.gnome.shell.extensions.user-theme') { - } - return null; - } -} -function settings_new_schema(schema) { - const GioSSS = Gio.SettingsSchemaSource; - const schemaDir = Gio.File.new_for_path(get_current_path()).get_child('schemas'); - let schemaSource = schemaDir.query_exists(null) - ? GioSSS.new_from_directory(schemaDir.get_path(), GioSSS.get_default(), false) - : GioSSS.get_default(); - const schemaObj = schemaSource.lookup(schema, true); - if (!schemaObj) { - throw new Error('Schema ' + schema + ' could not be found for extension pop-shell' + '. Please check your installation.'); - } - return new Gio.Settings({ settings_schema: schemaObj }); -} -const ACTIVE_HINT = 'active-hint'; -const ACTIVE_HINT_BORDER_RADIUS = 'active-hint-border-radius'; -const STACKING_WITH_MOUSE = 'stacking-with-mouse'; -const COLUMN_SIZE = 'column-size'; -const EDGE_TILING = 'edge-tiling'; -const FULLSCREEN_LAUNCHER = 'fullscreen-launcher'; -const GAP_INNER = 'gap-inner'; -const GAP_OUTER = 'gap-outer'; -const ROW_SIZE = 'row-size'; -const SHOW_TITLE = 'show-title'; -const SMART_GAPS = 'smart-gaps'; -const SNAP_TO_GRID = 'snap-to-grid'; -const TILE_BY_DEFAULT = 'tile-by-default'; -const HINT_COLOR_RGBA = 'hint-color-rgba'; -const DEFAULT_RGBA_COLOR = 'rgba(251, 184, 108, 1)'; -const LOG_LEVEL = 'log-level'; -const SHOW_SKIPTASKBAR = 'show-skip-taskbar'; -const MOUSE_CURSOR_FOLLOWS_ACTIVE_WINDOW = 'mouse-cursor-follows-active-window'; -const MOUSE_CURSOR_FOCUS_LOCATION = 'mouse-cursor-focus-location'; -export class ExtensionSettings { - constructor() { - this.ext = settings_new_schema('org.gnome.shell.extensions.pop-shell'); - this.int = settings_new_id('org.gnome.desktop.interface'); - this.mutter = settings_new_id('org.gnome.mutter'); - this.shell = settings_new_id('org.gnome.shell.extensions.user-theme'); - } - active_hint() { - return this.ext.get_boolean(ACTIVE_HINT); - } - active_hint_border_radius() { - return this.ext.get_uint(ACTIVE_HINT_BORDER_RADIUS); - } - stacking_with_mouse() { - return this.ext.get_boolean(STACKING_WITH_MOUSE); - } - column_size() { - return this.ext.get_uint(COLUMN_SIZE); - } - dynamic_workspaces() { - return this.mutter ? this.mutter.get_boolean('dynamic-workspaces') : false; - } - fullscreen_launcher() { - return this.ext.get_boolean(FULLSCREEN_LAUNCHER); - } - gap_inner() { - return this.ext.get_uint(GAP_INNER); - } - gap_outer() { - return this.ext.get_uint(GAP_OUTER); - } - hint_color_rgba() { - let rgba = this.ext.get_string(HINT_COLOR_RGBA); - let valid_color = new Gdk.RGBA().parse(rgba); - if (!valid_color) { - return DEFAULT_RGBA_COLOR; - } - return rgba; - } - theme() { - return this.shell ? this.shell.get_string('name') : this.int ? this.int.get_string('gtk-theme') : 'Adwaita'; - } - is_dark() { - const theme = this.theme().toLowerCase(); - return DARK.some((dark) => theme.includes(dark)); - } - is_high_contrast() { - return this.theme().toLowerCase() === 'highcontrast'; - } - row_size() { - return this.ext.get_uint(ROW_SIZE); - } - show_title() { - return this.ext.get_boolean(SHOW_TITLE); - } - smart_gaps() { - return this.ext.get_boolean(SMART_GAPS); - } - snap_to_grid() { - return this.ext.get_boolean(SNAP_TO_GRID); - } - tile_by_default() { - return this.ext.get_boolean(TILE_BY_DEFAULT); - } - workspaces_only_on_primary() { - return this.mutter ? this.mutter.get_boolean('workspaces-only-on-primary') : false; - } - log_level() { - return this.ext.get_uint(LOG_LEVEL); - } - show_skiptaskbar() { - return this.ext.get_boolean(SHOW_SKIPTASKBAR); - } - mouse_cursor_follows_active_window() { - return this.ext.get_boolean(MOUSE_CURSOR_FOLLOWS_ACTIVE_WINDOW); - } - mouse_cursor_focus_location() { - return this.ext.get_uint(MOUSE_CURSOR_FOCUS_LOCATION); - } - set_active_hint(set) { - this.ext.set_boolean(ACTIVE_HINT, set); - } - set_active_hint_border_radius(set) { - this.ext.set_uint(ACTIVE_HINT_BORDER_RADIUS, set); - } - set_stacking_with_mouse(set) { - this.ext.set_boolean(STACKING_WITH_MOUSE, set); - } - set_column_size(size) { - this.ext.set_uint(COLUMN_SIZE, size); - } - set_edge_tiling(enable) { - this.mutter?.set_boolean(EDGE_TILING, enable); - } - set_fullscreen_launcher(enable) { - this.ext.set_boolean(FULLSCREEN_LAUNCHER, enable); - } - set_gap_inner(gap) { - this.ext.set_uint(GAP_INNER, gap); - } - set_gap_outer(gap) { - this.ext.set_uint(GAP_OUTER, gap); - } - set_hint_color_rgba(rgba) { - let valid_color = new Gdk.RGBA().parse(rgba); - if (valid_color) { - this.ext.set_string(HINT_COLOR_RGBA, rgba); - } - else { - this.ext.set_string(HINT_COLOR_RGBA, DEFAULT_RGBA_COLOR); - } - } - set_row_size(size) { - this.ext.set_uint(ROW_SIZE, size); - } - set_show_title(set) { - this.ext.set_boolean(SHOW_TITLE, set); - } - set_smart_gaps(set) { - this.ext.set_boolean(SMART_GAPS, set); - } - set_snap_to_grid(set) { - this.ext.set_boolean(SNAP_TO_GRID, set); - } - set_tile_by_default(set) { - this.ext.set_boolean(TILE_BY_DEFAULT, set); - } - set_log_level(set) { - this.ext.set_uint(LOG_LEVEL, set); - } - set_show_skiptaskbar(set) { - this.ext.set_boolean(SHOW_SKIPTASKBAR, set); - } - set_mouse_cursor_follows_active_window(set) { - this.ext.set_boolean(MOUSE_CURSOR_FOLLOWS_ACTIVE_WINDOW, set); - } - set_mouse_cursor_focus_location(set) { - this.ext.set_uint(MOUSE_CURSOR_FOCUS_LOCATION, set); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/shell.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/shell.js deleted file mode 100644 index 64118f0b..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/shell.js +++ /dev/null @@ -1,4 +0,0 @@ -export function monitor_neighbor_index(which, direction) { - const neighbor = global.display.get_monitor_neighbor_index(which, direction); - return neighbor < 0 ? null : neighbor; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/shortcut_overlay.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/shortcut_overlay.js deleted file mode 100644 index 7785c6eb..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/shortcut_overlay.js +++ /dev/null @@ -1,93 +0,0 @@ -import GObject from 'gi://GObject'; -import St from 'gi://St'; -import * as Lib from './lib.js'; -const { separator } = Lib; -export class Shortcut { - constructor(description) { - this.description = description; - this.bindings = new Array(); - } - add(binding) { - this.bindings.push(binding); - return this; - } -} -export class Section { - constructor(header, shortcuts) { - this.header = header; - this.shortcuts = shortcuts; - } -} -export class Column { - constructor(sections) { - this.sections = sections; - } -} -export var ShortcutOverlay = GObject.registerClass(class ShortcutOverlay extends St.BoxLayout { - constructor() { - super(); - this.title = ''; - this.columns = new Array(); - } - _init(title, columns) { - super.init({ - styleClass: 'pop-shell-shortcuts', - destroyOnClose: false, - shellReactive: true, - shouldFadeIn: true, - shouldFadeOut: true, - }); - let columns_layout = new St.BoxLayout({ - styleClass: 'pop-shell-shortcuts-columns', - horizontal: true, - }); - for (const column of columns) { - let column_layout = new St.BoxLayout({ - styleClass: 'pop-shell-shortcuts-column', - }); - for (const section of column.sections) { - column_layout.add(this.gen_section(section)); - } - columns_layout.add(column_layout); - } - this.add(new St.Label({ - styleClass: 'pop-shell-shortcuts-title', - text: title, - })); - this.add(columns_layout); - } - gen_combination(combination) { - let layout = new St.BoxLayout({ - styleClass: 'pop-shell-binding', - horizontal: true, - }); - for (const key of combination) { - layout.add(St.Label({ text: key })); - } - return layout; - } - gen_section(section) { - let layout = new St.BoxLayout({ - styleclass: 'pop-shell-section', - }); - layout.add(new St.Label({ - styleClass: 'pop-shell-section-header', - text: section.header, - })); - for (const subsection of section.shortcuts) { - layout.add(separator()); - layout.add(this.gen_shortcut(subsection)); - } - return layout; - } - gen_shortcut(shortcut) { - let layout = new St.BoxLayout({ - styleClass: 'pop-shell-shortcut', - horizontal: true, - }); - layout.add(new St.Label({ - text: shortcut.description, - })); - return layout; - } -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/stack.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/stack.js deleted file mode 100644 index 2fbebd5d..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/stack.js +++ /dev/null @@ -1,549 +0,0 @@ -import * as Ecs from './ecs.js'; -import * as a from './arena.js'; -import * as utils from './utils.js'; -const Arena = a.Arena; -import Clutter from 'gi://Clutter'; -import GObject from 'gi://GObject'; -import St from 'gi://St'; -const ACTIVE_TAB = 'pop-shell-tab pop-shell-tab-active'; -const INACTIVE_TAB = 'pop-shell-tab pop-shell-tab-inactive'; -const URGENT_TAB = 'pop-shell-tab pop-shell-tab-urgent'; -const INACTIVE_TAB_STYLE = '#9B8E8A'; -export var TAB_HEIGHT = 24; -function stack_widgets_new() { - let tabs = new St.BoxLayout({ - style_class: 'pop-shell-stack', - x_expand: true, - }); - tabs.get_layout_manager()?.set_homogeneous(true); - return { tabs }; -} -const ContainerButton = GObject.registerClass({ - Signals: { activate: {} }, -}, class ImageButton extends St.Button { - _init(icon) { - super._init({ - child: icon, - x_expand: true, - y_expand: true, - }); - } -}); -const TabButton = GObject.registerClass({ - Signals: { activate: {} }, -}, class TabButton extends St.Button { - _init(window) { - const icon = window.icon(window.ext, 24); - icon.set_x_align(Clutter.ActorAlign.START); - const label = new St.Label({ - y_expand: true, - x_align: Clutter.ActorAlign.START, - y_align: Clutter.ActorAlign.CENTER, - style: 'padding-left: 8px', - }); - label.text = window.title(); - const container = new St.BoxLayout({ - y_expand: true, - y_align: Clutter.ActorAlign.CENTER, - }); - const close_button = new ContainerButton(new St.Icon({ - icon_name: 'window-close-symbolic', - icon_size: 24, - y_align: Clutter.ActorAlign.CENTER, - })); - close_button.connect('clicked', () => { - window.meta.delete(global.get_current_time()); - }); - close_button.set_x_align(Clutter.ActorAlign.END); - close_button.set_y_align(Clutter.ActorAlign.CENTER); - container.add_child(icon); - container.add_child(label); - container.add_child(close_button); - super._init({ - child: container, - x_expand: true, - y_expand: true, - y_align: Clutter.ActorAlign.CENTER, - }); - this._title = label; - } - set_title(text) { - if (this._title) { - this._title.text = text; - } - } -}); -export class Stack { - constructor(ext, active, workspace, monitor) { - this.widgets = null; - this.active_id = 0; - this.prev_active = null; - this.prev_active_id = 0; - this.tabs = new Array(); - this.buttons = new Arena(); - this.tabs_height = TAB_HEIGHT; - this.stack_rect = { width: 0, height: 0, x: 0, y: 0 }; - this.active_signals = null; - this.rect = { width: 0, height: 0, x: 0, y: 0 }; - this.restacker = global.display.connect('restacked', () => this.restack()); - this.ext = ext; - this.active = active; - this.monitor = monitor; - this.workspace = workspace; - this.tabs_height = TAB_HEIGHT * this.ext.dpi; - this.widgets = stack_widgets_new(); - global.window_group.add_child(this.widgets.tabs); - this.reposition(); - this.tabs_destroy = this.widgets.tabs.connect('destroy', () => this.recreate_widgets()); - } - add(window) { - if (!this.widgets) - return; - const entity = window.entity; - const active = Ecs.entity_eq(entity, this.active); - const button = new TabButton(window); - const id = this.buttons.insert(button); - let tab = { active, entity, signals: [], button: id, button_signal: null }; - let comp = this.tabs.length; - this.bind_hint_events(tab); - this.tabs.push(tab); - this.watch_signals(comp, id, window); - this.widgets.tabs.add_child(button); - } - auto_activate() { - if (this.tabs.length === 0) - return null; - if (this.tabs.length <= this.active_id) { - this.active_id = this.tabs.length - 1; - } - const c = this.tabs[this.active_id]; - this.activate(c.entity); - return c.entity; - } - activate_prev() { - if (this.prev_active) { - this.activate(this.prev_active); - } - } - activate(entity) { - const permitted = this.permitted_to_show(); - if (this.widgets) - this.widgets.tabs.visible = permitted; - this.reset_visibility(permitted); - const win = this.ext.windows.get(entity); - if (!win) - return; - if (!Ecs.entity_eq(entity, this.active)) { - this.prev_active = this.active; - this.prev_active_id = this.active_id; - } - this.active_connect(win.meta, entity); - let id = 0; - for (const [idx, component] of this.tabs.entries()) { - let name; - this.window_exec(id, component.entity, (window) => { - const actor = window.meta.get_compositor_private(); - if (Ecs.entity_eq(entity, component.entity)) { - this.active_id = id; - component.active = true; - name = ACTIVE_TAB; - if (actor) - actor.show(); - } - else { - component.active = false; - name = INACTIVE_TAB; - if (actor) - actor.hide(); - } - let button = this.buttons.get(component.button); - if (button) { - button.set_style_class_name(name); - let tab_color = ''; - if (component.active) { - let settings = this.ext.settings; - let color_value = settings.hint_color_rgba(); - tab_color = `${color_value}; color: ${utils.is_dark(color_value) ? 'white' : 'black'}`; - } - else { - tab_color = `${INACTIVE_TAB_STYLE}`; - } - const tab_border_radius = this.get_tab_border_radius(idx); - button.set_style(`background: ${tab_color}; border-radius: ${tab_border_radius};`); - } - }); - id += 1; - } - this.reset_visibility(permitted); - } - get_tab_border_radius(idx) { - let result = `0px 0px 0px 0px`; - let radius = Math.max(0, this.ext.settings.active_hint_border_radius() - 4); - radius = Math.min(radius, Math.trunc(this.tabs_height / 2)); - if (this.tabs.length === 1) - result = `${radius}px`; - else if (idx === 0) - result = `${radius}px 0px 0px ${radius}px`; - else if (idx === this.tabs.length - 1) - result = `0px ${radius}px ${radius}px 0px`; - return result; - } - active_connect(window, active) { - this.active_disconnect(); - this.active = active; - this.active_reconnect(window); - } - active_reconnect(window) { - const on_window_changed = () => this.on_grab(() => { - const window = this.ext.windows.get(this.active); - if (window) { - this.update_positions(window.meta.get_frame_rect()); - this.window_changed(); - } - else { - this.active_disconnect(); - } - }); - this.active_signals = [ - window.connect('size-changed', on_window_changed), - window.connect('position-changed', on_window_changed), - ]; - } - active_disconnect() { - const active_meta = this.active_meta(); - if (this.active_signals && active_meta) { - for (const s of this.active_signals) - active_meta.disconnect(s); - } - this.active_signals = null; - } - active_meta() { - return this.ext.windows.get(this.active)?.meta; - } - bind_hint_events(tab) { - let settings = this.ext.settings; - let button = this.buttons.get(tab.button); - if (button) { - let change_id = settings.ext.connect('changed', (_, key) => { - if (key === 'hint-color-rgba') { - this.change_tab_color(tab); - } - return false; - }); - button.connect('destroy', () => { - settings.ext.disconnect(change_id); - }); - } - this.change_tab_color(tab); - } - change_tab_color(tab) { - let settings = this.ext.settings; - let button = this.buttons.get(tab.button); - if (button) { - let tab_color = ''; - if (Ecs.entity_eq(tab.entity, this.active)) { - let color_value = settings.hint_color_rgba(); - tab_color = `background: ${color_value}; color: ${utils.is_dark(color_value) ? 'white' : 'black'}`; - } - else { - tab_color = `background: ${INACTIVE_TAB_STYLE}`; - } - button.set_style(tab_color); - } - } - clear() { - this.active_disconnect(); - for (const c of this.tabs.splice(0)) - this.tab_disconnect(c); - this.widgets?.tabs.destroy_all_children(); - this.buttons.truncate(0); - } - tab_disconnect(c) { - const window = this.ext.windows.get(c.entity); - if (window) { - for (const s of c.signals) - window.meta.disconnect(s); - if (this.workspace === this.ext.active_workspace()) - window.meta.get_compositor_private()?.show(); - } - c.signals = []; - if (c.button_signal) { - const b = this.buttons.get(c.button); - if (b) { - b.disconnect(c.button_signal); - c.button_signal = null; - } - } - } - deactivate(w) { - for (const c of this.tabs) - if (Ecs.entity_eq(c.entity, w.entity)) { - this.tab_disconnect(c); - } - if (this.active_signals && Ecs.entity_eq(this.active, w.entity)) { - this.active_disconnect(); - } - } - destroy() { - global.display.disconnect(this.restacker); - this.active_disconnect(); - for (const c of this.tabs) { - this.tab_disconnect(c); - if (this.workspace === this.ext.active_workspace()) { - const win = this.ext.windows.get(c.entity); - if (win) { - win.meta.get_compositor_private()?.show(); - win.stack = null; - } - } - } - for (const b of this.buttons.values()) { - try { - b.destroy(); - } - catch (e) { } - } - if (this.widgets) { - const tabs = this.widgets.tabs; - this.widgets = null; - tabs.destroy(); - } - } - on_grab(or) { - if (this.ext.grab_op !== null) { - if (Ecs.entity_eq(this.ext.grab_op.entity, this.active)) { - if (this.widgets) { - const parent = this.widgets.tabs.get_parent(); - const actor = this.active_meta()?.get_compositor_private(); - if (actor && parent) { - parent.set_child_below_sibling(this.widgets.tabs, actor); - } - } - return; - } - } - or(); - } - recreate_widgets() { - if (this.widgets !== null) { - this.widgets.tabs.disconnect(this.tabs_destroy); - this.widgets = stack_widgets_new(); - global.window_group.add_child(this.widgets.tabs); - this.tabs_destroy = this.widgets.tabs.connect('destroy', () => this.recreate_widgets()); - this.active_disconnect(); - for (const c of this.tabs.splice(0)) { - this.tab_disconnect(c); - const window = this.ext.windows.get(c.entity); - if (window) - this.add(window); - } - this.update_positions(this.rect); - this.restack(); - const window = this.ext.windows.get(this.active); - if (!window) - return; - this.active_reconnect(window.meta); - } - } - remove_by_pos(idx) { - const c = this.tabs[idx]; - if (c) - this.remove_tab_component(c, idx); - } - remove_tab_component(c, idx) { - if (!this.widgets) - return; - this.tab_disconnect(c); - const b = this.buttons.get(c.button); - if (b) { - this.widgets.tabs.remove_child(b); - b.destroy(); - this.buttons.remove(c.button); - } - this.tabs.splice(idx, 1); - } - remove_tab(entity) { - if (!this.widgets) - return null; - if (this.prev_active && Ecs.entity_eq(entity, this.prev_active)) { - this.prev_active = null; - this.prev_active_id = 0; - } - let idx = 0; - for (const c of this.tabs) { - if (Ecs.entity_eq(c.entity, entity)) { - this.remove_tab_component(c, idx); - if (this.active_id > idx) { - this.active_id -= 1; - } - return idx; - } - idx += 1; - } - return null; - } - replace(window) { - if (!this.widgets) - return; - const c = this.tabs[this.active_id], actor = window.meta.get_compositor_private(); - if (c && actor) { - this.tab_disconnect(c); - if (Ecs.entity_eq(window.entity, this.active)) { - this.active_connect(window.meta, window.entity); - actor.show(); - } - else { - actor.hide(); - } - this.watch_signals(this.active_id, c.button, window); - this.buttons.get(c.button)?.set_title(window.title()); - this.activate(window.entity); - } - } - reposition() { - if (!this.widgets) - return; - const window = this.ext.windows.get(this.active); - if (!window) - return; - const actor = window.meta.get_compositor_private(); - if (!actor) { - this.active_disconnect(); - return; - } - actor.show(); - const parent = actor.get_parent(); - if (!parent) { - return; - } - const stack_parent = this.widgets.tabs.get_parent(); - if (stack_parent) { - stack_parent.remove_child(this.widgets.tabs); - } - parent.add_child(this.widgets.tabs); - if (!window.meta.is_fullscreen() && !window.is_maximized() && !this.ext.maximized_on_active_display()) { - parent.set_child_above_sibling(this.widgets.tabs, actor); - } - else { - parent.set_child_below_sibling(this.widgets.tabs, actor); - } - } - permitted_to_show(workspace) { - const active_workspace = workspace ?? global.workspace_manager.get_active_workspace_index(); - const primary = global.display.get_primary_monitor(); - const only_primary = this.ext.settings.workspaces_only_on_primary(); - return active_workspace === this.workspace || (only_primary && this.monitor != primary); - } - reset_visibility(permitted) { - let idx = 0; - for (const c of this.tabs) { - this.actor_exec(idx, c.entity, (actor) => { - if (permitted && this.active_id === idx) { - actor.show(); - return; - } - actor.hide(); - }); - idx += 1; - } - } - restack() { - this.on_grab(() => { - if (!this.widgets) - return; - const permitted = this.permitted_to_show(); - this.widgets.tabs.visible = permitted; - if (permitted) - this.reposition(); - this.reset_visibility(permitted); - }); - } - set_visible(visible) { - if (!this.widgets) - return; - this.widgets.tabs.visible = visible; - if (visible) { - this.widgets.tabs.show(); - } - else { - this.widgets.tabs.hide(); - } - } - update_positions(rect) { - if (!this.widgets) - return; - this.rect = rect; - this.tabs_height = TAB_HEIGHT * this.ext.dpi; - this.stack_rect = { - x: rect.x, - y: rect.y - this.tabs_height, - width: rect.width, - height: this.tabs_height + rect.height, - }; - this.widgets.tabs.x = rect.x; - this.widgets.tabs.y = this.stack_rect.y; - this.widgets.tabs.height = this.tabs_height; - this.widgets.tabs.width = rect.width; - } - watch_signals(comp, button, window) { - const entity = window.entity; - const widget = this.buttons.get(button); - if (!widget) - return; - const c = this.tabs[comp]; - if (c.button_signal) - widget.disconnect(c.button_signal); - c.button_signal = widget.connect('clicked', () => { - this.activate(entity); - this.window_exec(comp, entity, (window) => { - const actor = window.meta.get_compositor_private(); - if (actor) { - actor.show(); - window.activate(false); - this.reposition(); - for (const comp of this.tabs) { - this.buttons.get(comp.button)?.set_style_class_name(INACTIVE_TAB); - } - widget.set_style_class_name(ACTIVE_TAB); - } - }); - }); - if (this.tabs[comp].signals) { - for (const c of this.tabs[comp].signals) - window.meta.disconnect(c); - } - this.tabs[comp].signals = [ - window.meta.connect('notify::title', () => { - this.window_exec(comp, entity, (window) => { - this.buttons.get(button)?.set_title(window.title()); - }); - }), - window.meta.connect('notify::urgent', () => { - this.window_exec(comp, entity, (window) => { - if (!window.meta.has_focus()) { - this.buttons.get(button)?.set_style_class_name(URGENT_TAB); - } - }); - }), - ]; - } - window_changed() { - this.ext.show_border_on_focused(); - } - actor_exec(comp, entity, func) { - this.window_exec(comp, entity, (window) => { - func(window.meta.get_compositor_private()); - }); - } - window_exec(comp, entity, func) { - const window = this.ext.windows.get(entity); - if (window && window.actor_exists()) { - func(window); - } - else { - const tab = this.tabs[comp]; - if (tab) - this.tab_disconnect(tab); - } - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/tags.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/tags.js deleted file mode 100644 index cf97c1c1..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/tags.js +++ /dev/null @@ -1,4 +0,0 @@ -export var Tiled = 0; -export var Floating = 1; -export var Blocked = 2; -export var ForceTile = 3; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/tiling.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/tiling.js deleted file mode 100644 index d86f75a3..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/tiling.js +++ /dev/null @@ -1,710 +0,0 @@ -import * as GrabOp from './grab_op.js'; -import * as Lib from './lib.js'; -import * as Log from './log.js'; -import * as Node from './node.js'; -import * as Rect from './rectangle.js'; -import * as Tags from './tags.js'; -import * as window from './window.js'; -import * as geom from './geom.js'; -import * as exec from './executor.js'; -import Meta from 'gi://Meta'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -const { ShellWindow } = window; -export var Direction; -(function (Direction) { - Direction[Direction["Left"] = 0] = "Left"; - Direction[Direction["Up"] = 1] = "Up"; - Direction[Direction["Right"] = 2] = "Right"; - Direction[Direction["Down"] = 3] = "Down"; -})(Direction || (Direction = {})); -export class Tiler { - constructor(ext) { - this.window = null; - this.moving = false; - this.resizing_window = false; - this.swap_window = null; - this.queue = new exec.ChannelExecutor(); - this.keybindings = { - 'management-orientation': () => this.toggle_orientation(ext), - 'tile-move-left': () => this.move_left(ext), - 'tile-move-down': () => this.move_down(ext), - 'tile-move-up': () => this.move_up(ext), - 'tile-move-right': () => this.move_right(ext), - 'tile-resize-left': () => this.resize(ext, Direction.Left), - 'tile-resize-down': () => this.resize(ext, Direction.Down), - 'tile-resize-up': () => this.resize(ext, Direction.Up), - 'tile-resize-right': () => this.resize(ext, Direction.Right), - 'tile-swap-left': () => this.swap_left(ext), - 'tile-swap-down': () => this.swap_down(ext), - 'tile-swap-up': () => this.swap_up(ext), - 'tile-swap-right': () => this.swap_right(ext), - 'tile-accept': () => this.accept(ext), - 'tile-reject': () => this.exit(ext), - 'toggle-stacking': () => this.toggle_stacking(ext), - }; - } - toggle_orientation(ext) { - const window = ext.focus_window(); - if (window && ext.auto_tiler) { - ext.auto_tiler.toggle_orientation(ext, window); - ext.register_fn(() => window.activate(true)); - } - } - toggle_stacking(ext) { - ext.auto_tiler?.toggle_stacking(ext); - const win = ext.focus_window(); - if (win) - this.overlay_watch(ext, win); - } - rect(ext, monitor) { - if (!ext.overlay.visible) - return null; - const columns = Math.floor(monitor.width / ext.column_size); - const rows = Math.floor(monitor.height / ext.row_size); - return monitor_rect(monitor, columns, rows); - } - change(overlay, rect, dx, dy, dw, dh) { - let changed = new Rect.Rectangle([ - overlay.x + dx * rect.width, - overlay.y + dy * rect.height, - overlay.width + dw * rect.width, - overlay.height + dh * rect.height, - ]); - changed.x = Lib.round_increment(changed.x - rect.x, rect.width) + rect.x; - changed.y = Lib.round_increment(changed.y - rect.y, rect.height) + rect.y; - changed.width = Lib.round_increment(changed.width, rect.width); - changed.height = Lib.round_increment(changed.height, rect.height); - if (changed.width < rect.width) { - changed.width = rect.width; - } - if (changed.height < rect.height) { - changed.height = rect.height; - } - let monitors = tile_monitors(changed); - if (monitors.length == 0) - return this; - let min_x = null; - let min_y = null; - let max_x = null; - let max_y = null; - for (const monitor of monitors) { - if (min_x === null || monitor.x < min_x) { - min_x = monitor.x; - } - if (min_y === null || monitor.y < min_y) { - min_y = monitor.y; - } - if (max_x === null || monitor.x + monitor.width > max_x) { - max_x = monitor.x + monitor.width; - } - if (max_y === null || monitor.y + monitor.height < max_y) { - max_y = monitor.y + monitor.height; - } - } - if (min_x === null || - min_y === null || - max_x === null || - max_y === null || - changed.x < min_x || - changed.x + changed.width > max_x || - changed.y < min_y || - changed.y + changed.height > max_y) - return this; - overlay.x = changed.x; - overlay.y = changed.y; - overlay.width = changed.width; - overlay.height = changed.height; - return this; - } - unstack_from_fork(ext, stack, focused, fork, left, right, is_left) { - if (!ext.auto_tiler) - return null; - const forest = ext.auto_tiler.forest; - const new_fork = forest.create_fork(left, right, fork.area, fork.workspace, fork.monitor); - if (is_left) { - fork.left = Node.Node.fork(new_fork[0]); - } - else { - fork.right = Node.Node.fork(new_fork[0]); - } - ext.auto_tiler.forest.parents.insert(new_fork[0], fork.entity); - forest.on_attach(new_fork[0], focused.entity); - for (const e of stack.entities) { - forest.on_attach(new_fork[0], e); - } - return new_fork[1]; - } - move(ext, window, x, y, w, h, direction, focus) { - if (!window) - return; - const win = ext.windows.get(window); - if (!win) - return; - const place_pointer = () => { - ext.register_fn(() => win.activate(true)); - }; - if (ext.auto_tiler && win.is_tilable(ext)) { - if (this.queue.length === 2) - return; - this.queue.send(() => { - const focused = ext.focus_window(); - if (focused) { - const move_to = focus(); - this.moving = true; - if (ext.auto_tiler) { - const s = ext.auto_tiler.find_stack(focused.entity); - if (s) { - this.move_from_stack(ext, s, focused, direction); - this.moving = false; - place_pointer(); - return; - } - } - if (move_to !== null) - this.move_auto(ext, focused, move_to, direction === Direction.Left); - this.moving = false; - place_pointer(); - } - }); - } - else { - this.swap_window = null; - this.rect_by_active_area(ext, (_monitor, rect) => { - this.change(ext.overlay, rect, x, y, w, h).change(ext.overlay, rect, 0, 0, 0, 0); - }); - } - } - move_alongside_stack(ext, [fork, branch, is_left], focused, direction) { - let new_fork = null; - if (fork.is_toplevel && fork.smart_gapped) { - fork.smart_gapped = false; - let rect = ext.monitor_work_area(fork.monitor); - rect.x += ext.gap_outer; - rect.y += ext.gap_outer; - rect.width -= ext.gap_outer * 2; - rect.height -= ext.gap_outer * 2; - fork.set_area(rect); - } - let orientation, reverse; - const { HORIZONTAL, VERTICAL } = Lib.Orientation; - switch (direction) { - case Direction.Left: - orientation = HORIZONTAL; - reverse = false; - break; - case Direction.Right: - orientation = HORIZONTAL; - reverse = true; - break; - case Direction.Up: - orientation = VERTICAL; - reverse = false; - break; - default: - orientation = VERTICAL; - reverse = true; - } - if (!ext.auto_tiler) - return; - const inner = branch.inner; - Node.stack_remove(ext.auto_tiler.forest, inner, focused.entity); - ext.auto_tiler.detach_window(ext, focused.entity); - focused.stack = null; - if (fork.right) { - let left, right; - if (reverse) { - left = branch; - right = Node.Node.window(focused.entity); - } - else { - left = Node.Node.window(focused.entity); - right = branch; - } - const inner = branch.inner; - new_fork = this.unstack_from_fork(ext, inner, focused, fork, left, right, is_left); - } - else if (reverse) { - fork.right = Node.Node.window(focused.entity); - } - else { - fork.right = fork.left; - fork.left = Node.Node.window(focused.entity); - } - let modifier = new_fork ?? fork; - modifier.set_orientation(orientation); - ext.auto_tiler.forest.on_attach(modifier.entity, focused.entity); - ext.auto_tiler.tile(ext, fork, fork.area); - this.overlay_watch(ext, focused); - } - move_from_stack(ext, [fork, branch, is_left], focused, direction, force_detach = false) { - if (!ext.auto_tiler) - return; - const inner = branch.inner; - if (inner.entities.length === 1) { - ext.auto_tiler.toggle_stacking(ext); - this.overlay_watch(ext, focused); - return; - } - let new_fork = null; - if (fork.is_toplevel && fork.smart_gapped) { - fork.smart_gapped = false; - let rect = ext.monitor_work_area(fork.monitor); - rect.x += ext.gap_outer; - rect.y += ext.gap_outer; - rect.width -= ext.gap_outer * 2; - rect.height -= ext.gap_outer * 2; - fork.set_area(rect); - } - const forest = ext.auto_tiler.forest; - const fentity = focused.entity; - const detach = (orient, reverse) => { - if (!ext.auto_tiler) - return; - focused.stack = null; - if (fork.right) { - let left, right; - if (reverse) { - left = branch; - right = Node.Node.window(fentity); - } - else { - left = Node.Node.window(fentity); - right = branch; - } - new_fork = this.unstack_from_fork(ext, inner, focused, fork, left, right, is_left); - } - else if (reverse) { - fork.right = Node.Node.window(fentity); - } - else { - fork.right = fork.left; - fork.left = Node.Node.window(fentity); - } - let modifier = new_fork ?? fork; - modifier.set_orientation(orient); - forest.on_attach(modifier.entity, fentity); - ext.auto_tiler.tile(ext, fork, fork.area); - this.overlay_watch(ext, focused); - }; - switch (direction) { - case Direction.Left: - if (force_detach) { - Node.stack_remove(forest, inner, fentity); - detach(Lib.Orientation.HORIZONTAL, false); - } - else if (!Node.stack_move_left(ext, forest, inner, fentity)) { - detach(Lib.Orientation.HORIZONTAL, false); - } - ext.auto_tiler.update_stack(ext, inner); - break; - case Direction.Right: - if (force_detach) { - Node.stack_remove(forest, inner, fentity); - detach(Lib.Orientation.HORIZONTAL, true); - } - else if (!Node.stack_move_right(ext, forest, inner, fentity)) { - detach(Lib.Orientation.HORIZONTAL, true); - } - ext.auto_tiler.update_stack(ext, inner); - break; - case Direction.Up: - Node.stack_remove(forest, inner, fentity); - detach(Lib.Orientation.VERTICAL, false); - break; - case Direction.Down: - Node.stack_remove(forest, inner, fentity); - detach(Lib.Orientation.VERTICAL, true); - break; - } - } - move_auto_(ext, mov1, mov2, callback) { - if (ext.auto_tiler && this.window) { - const entity = ext.auto_tiler.attached.get(this.window); - if (entity) { - const fork = ext.auto_tiler.forest.forks.get(entity); - const window = ext.windows.get(this.window); - if (!fork || !window) - return; - const workspace_id = ext.workspace_id(window); - const toplevel = ext.auto_tiler.forest.find_toplevel(workspace_id); - if (!toplevel) - return; - const topfork = ext.auto_tiler.forest.forks.get(toplevel); - if (!topfork) - return; - const toparea = topfork.area; - const before = window.rect(); - const grab_op = new GrabOp.GrabOp(this.window, before); - let crect = grab_op.rect.clone(); - let resize = (mov, func) => { - if (func(toparea, crect, mov) || crect.eq(grab_op.rect)) - return; - ext.auto_tiler.forest.resize(ext, entity, fork, this.window, grab_op.operation(crect), crect); - grab_op.rect = crect.clone(); - }; - resize(mov1, callback); - resize(mov2, callback); - ext.auto_tiler.forest.arrange(ext, fork.workspace); - ext.register_fn(() => ext.set_overlay(window.rect())); - } - } - } - overlay_watch(ext, window) { - ext.register_fn(() => { - if (window) { - ext.set_overlay(window.rect()); - window.activate(false); - } - }); - } - rect_by_active_area(ext, callback) { - if (this.window) { - const monitor_id = ext.monitors.get(this.window); - if (monitor_id) { - const monitor = ext.monitor_work_area(monitor_id[0]); - let rect = this.rect(ext, monitor); - if (rect) { - callback(monitor, rect); - } - } - } - } - resize_auto(ext, direction) { - let mov1, mov2; - const hrow = 64; - const hcolumn = 64; - switch (direction) { - case Direction.Left: - mov1 = [hrow, 0, -hrow, 0]; - mov2 = [0, 0, -hrow, 0]; - break; - case Direction.Right: - mov1 = [0, 0, hrow, 0]; - mov2 = [-hrow, 0, hrow, 0]; - break; - case Direction.Up: - mov1 = [0, hcolumn, 0, -hcolumn]; - mov2 = [0, 0, 0, -hcolumn]; - break; - default: - mov1 = [0, 0, 0, hcolumn]; - mov2 = [0, -hcolumn, 0, hcolumn]; - } - this.move_auto_(ext, new Rect.Rectangle(mov1), new Rect.Rectangle(mov2), (work_area, crect, mov) => { - crect.apply(mov); - let before = crect.clone(); - crect.clamp(work_area); - const diff = before.diff(crect); - crect.apply(new Rect.Rectangle([0, 0, -diff.x, -diff.y])); - return false; - }); - } - move_auto(ext, focused, move_to, stack_from_left = true) { - let watching = null; - const at = ext.auto_tiler; - if (at) { - if (move_to instanceof ShellWindow) { - const stack_info = at.find_stack(move_to.entity); - if (stack_info) { - const [stack_fork, branch] = stack_info; - const stack = branch.inner; - const placement = { auto: 0 }; - focused.ignore_detach = true; - at.detach_window(ext, focused.entity); - at.forest.on_attach(stack_fork.entity, focused.entity); - at.update_stack(ext, stack); - at.tile(ext, stack_fork, stack_fork.area); - focused.ignore_detach = true; - at.detach_window(ext, focused.entity); - at.attach_to_window(ext, move_to, focused, placement, stack_from_left); - watching = focused; - } - else { - const parent = at.windows_are_siblings(focused.entity, move_to.entity); - if (parent) { - const fork = at.forest.forks.get(parent); - if (fork) { - if (!fork.right) { - Log.error('move_auto: detected as sibling, but fork lacks right branch'); - return; - } - if (fork.left.inner.kind === 3) { - Node.stack_remove(at.forest, fork.left.inner, focused.entity); - focused.stack = null; - } - else { - const temp = fork.right; - fork.right = fork.left; - fork.left = temp; - at.tile(ext, fork, fork.area); - watching = focused; - } - } - } - if (!watching) { - let movement = { src: focused.meta.get_frame_rect() }; - focused.ignore_detach = true; - at.detach_window(ext, focused.entity); - at.attach_to_window(ext, move_to, focused, movement, false); - watching = focused; - } - } - } - else { - focused.ignore_detach = true; - at.detach_window(ext, focused.entity); - at.attach_to_workspace(ext, focused, [move_to, ext.active_workspace()]); - watching = focused; - } - } - if (watching) { - this.overlay_watch(ext, watching); - } - else { - ext.set_overlay(focused.rect()); - } - } - move_left(ext, window) { - this.move(ext, window ?? this.window, -1, 0, 0, 0, Direction.Left, move_window_or_monitor(ext, ext.focus_selector.left, Meta.DisplayDirection.LEFT)); - } - move_down(ext, window) { - this.move(ext, window ?? this.window, 0, 1, 0, 0, Direction.Down, move_window_or_monitor(ext, ext.focus_selector.down, Meta.DisplayDirection.DOWN)); - } - move_up(ext, window) { - this.move(ext, window ?? this.window, 0, -1, 0, 0, Direction.Up, move_window_or_monitor(ext, ext.focus_selector.up, Meta.DisplayDirection.UP)); - } - move_right(ext, window) { - this.move(ext, window ?? this.window, 1, 0, 0, 0, Direction.Right, move_window_or_monitor(ext, ext.focus_selector.right, Meta.DisplayDirection.RIGHT)); - } - resize(ext, direction) { - if (!this.window) - return; - this.resizing_window = true; - if (ext.auto_tiler && !ext.contains_tag(this.window, Tags.Floating)) { - this.resize_auto(ext, direction); - } - else { - let array; - switch (direction) { - case Direction.Down: - array = [0, 0, 0, 1]; - break; - case Direction.Left: - array = [0, 0, -1, 0]; - break; - case Direction.Up: - array = [0, 0, 0, -1]; - break; - default: - array = [0, 0, 1, 0]; - } - const [x, y, w, h] = array; - this.swap_window = null; - this.rect_by_active_area(ext, (_monitor, rect) => { - this.change(ext.overlay, rect, x, y, w, h).change(ext.overlay, rect, 0, 0, 0, 0); - }); - } - this.resizing_window = false; - } - swap(ext, selector) { - if (selector) { - ext.set_overlay(selector.rect()); - this.swap_window = selector.entity; - } - } - swap_left(ext) { - if (this.swap_window) { - ext.windows.with(this.swap_window, (window) => { - this.swap(ext, ext.focus_selector.left(ext, window)); - }); - } - else { - this.swap(ext, ext.focus_selector.left(ext, null)); - } - } - swap_down(ext) { - if (this.swap_window) { - ext.windows.with(this.swap_window, (window) => { - this.swap(ext, ext.focus_selector.down(ext, window)); - }); - } - else { - this.swap(ext, ext.focus_selector.down(ext, null)); - } - } - swap_up(ext) { - if (this.swap_window) { - ext.windows.with(this.swap_window, (window) => { - this.swap(ext, ext.focus_selector.up(ext, window)); - }); - } - else { - this.swap(ext, ext.focus_selector.up(ext, null)); - } - } - swap_right(ext) { - if (this.swap_window) { - ext.windows.with(this.swap_window, (window) => { - this.swap(ext, ext.focus_selector.right(ext, window)); - }); - } - else { - this.swap(ext, ext.focus_selector.right(ext, null)); - } - } - enter(ext) { - if (!this.window) { - const win = ext.focus_window(); - if (!win) - return; - this.window = win.entity; - if (win.is_maximized()) { - win.meta.unmaximize(Meta.MaximizeFlags.BOTH); - } - ext.set_overlay(win.rect()); - ext.overlay.visible = true; - if (!ext.auto_tiler || ext.contains_tag(win.entity, Tags.Floating)) { - this.rect_by_active_area(ext, (_monitor, rect) => { - this.change(ext.overlay, rect, 0, 0, 0, 0); - }); - } - ext.keybindings.disable(ext.keybindings.window_focus).enable(this.keybindings); - } - } - accept(ext) { - if (this.window) { - const meta = ext.windows.get(this.window); - if (meta) { - let tree_swapped = false; - if (this.swap_window) { - const meta_swap = ext.windows.get(this.swap_window); - if (meta_swap) { - if (ext.auto_tiler) { - tree_swapped = true; - ext.auto_tiler.attach_swap(ext, this.swap_window, this.window); - } - else { - ext.size_signals_block(meta_swap); - meta_swap.move(ext, meta.rect(), () => { - ext.size_signals_unblock(meta_swap); - }); - } - ext.register_fn(() => meta.activate(true)); - } - } - if (!tree_swapped) { - ext.size_signals_block(meta); - const meta_entity = this.window; - meta.move(ext, ext.overlay, () => { - ext.size_signals_unblock(meta); - ext.add_tag(meta_entity, Tags.Tiled); - }); - } - } - } - this.swap_window = null; - this.exit(ext); - } - exit(ext) { - this.queue.clear(); - if (this.window) { - this.window = null; - ext.overlay.visible = false; - ext.keybindings.disable(this.keybindings).enable(ext.keybindings.window_focus); - } - } - snap(ext, win) { - let mon_geom = ext.monitor_work_area(win.meta.get_monitor()); - if (mon_geom) { - let rect = win.rect(); - const columns = Math.floor(mon_geom.width / ext.column_size); - const rows = Math.floor(mon_geom.height / ext.row_size); - this.change(rect, monitor_rect(mon_geom, columns, rows), 0, 0, 0, 0); - win.move(ext, rect); - ext.snapped.insert(win.entity, true); - } - } -} -export function locate_monitor(win, direction) { - if (!win.actor_exists()) - return null; - const from = win.meta.get_monitor(); - const ref = win.meta.get_work_area_for_monitor(from); - const n_monitors = global.display.get_n_monitors(); - const { UP, DOWN, LEFT } = Meta.DisplayDirection; - let origin; - let exclude; - if (direction === UP) { - origin = [ref.x + ref.width / 2, ref.y]; - exclude = (rect) => { - return rect.y > ref.y; - }; - } - else if (direction === DOWN) { - origin = [ref.x + ref.width / 2, ref.y + ref.height]; - exclude = (rect) => rect.y < ref.y; - } - else if (direction === LEFT) { - origin = [ref.x, ref.y + ref.height / 2]; - exclude = (rect) => rect.x > ref.x; - } - else { - origin = [ref.x + ref.width, ref.y + ref.height / 2]; - exclude = (rect) => rect.x < ref.x; - } - let next = null; - for (let mon = 0; mon < n_monitors; mon += 1) { - if (mon === from) - continue; - const work_area = win.meta.get_work_area_for_monitor(mon); - if (!work_area || exclude(work_area)) - continue; - const weight = geom.shortest_side(origin, work_area); - if (next === null || next[1] > weight) { - next = [mon, weight, work_area]; - } - } - return next ? [next[0], next[2]] : null; -} -function monitor_rect(monitor, columns, rows) { - let tile_width = monitor.width / columns; - let tile_height = monitor.height / rows; - if (monitor.width * 9 >= monitor.height * 21) { - tile_width /= 2; - } - if (monitor.height * 9 >= monitor.width * 21) { - tile_height /= 2; - } - return new Rect.Rectangle([monitor.x, monitor.y, tile_width, tile_height]); -} -function move_window_or_monitor(ext, method, direction) { - return () => { - let next_window = method.call(ext.focus_selector, ext, null); - next_window = next_window?.actor_exists() ? next_window : null; - const focus = ext.focus_window(); - if (focus) { - const next_monitor = locate_monitor(focus, direction); - if (!next_window) - return next_monitor ? next_monitor[0] : null; - if (!next_monitor || focus.meta.get_monitor() == next_window.meta.get_monitor()) - return next_window; - return Rect.Rectangle.from_meta(next_monitor[1]).contains(next_window.rect()) - ? next_window - : next_monitor[0]; - } - return next_window; - }; -} -function tile_monitors(rect) { - let total_size = (a, b) => a.width * a.height - b.width * b.height; - let workspace = global.workspace_manager.get_active_workspace(); - return Main.layoutManager.monitors - .map((_monitor, i) => workspace.get_work_area_for_monitor(i)) - .filter((monitor) => { - return (rect.x + rect.width > monitor.x && - rect.y + rect.height > monitor.y && - rect.x < monitor.x + monitor.width && - rect.y < monitor.y + monitor.height); - }) - .sort(total_size); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/utils.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/utils.js deleted file mode 100644 index 1b40212a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/utils.js +++ /dev/null @@ -1,144 +0,0 @@ -import * as result from './result.js'; -import * as error from './error.js'; -import * as log from './log.js'; -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Meta from 'gi://Meta'; -const { Ok, Err } = result; -const { Error } = error; -export function is_wayland() { - return Meta.is_wayland_compositor(); -} -export function block_signal(object, signal) { - GObject.signal_handler_block(object, signal); -} -export function unblock_signal(object, signal) { - GObject.signal_handler_unblock(object, signal); -} -export function read_to_string(path) { - const file = Gio.File.new_for_path(path); - try { - const [ok, contents] = file.load_contents(null); - if (ok) { - return Ok(imports.byteArray.toString(contents)); - } - else { - return Err(new Error(`failed to load contents of ${path}`)); - } - } - catch (e) { - return Err(new Error(String(e)).context(`failed to load contents of ${path}`)); - } -} -export function source_remove(id) { - return GLib.source_remove(id); -} -export function exists(path) { - return Gio.File.new_for_path(path).query_exists(null); -} -export function is_dark(color) { - let color_val = ''; - let r = 255; - let g = 255; - let b = 255; - if (color.indexOf('rgb') >= 0) { - color = color.replace('rgba', 'rgb').replace('rgb(', '').replace(')', ''); - let colors = color.split(','); - r = parseInt(colors[0].trim()); - g = parseInt(colors[1].trim()); - b = parseInt(colors[2].trim()); - } - else if (color.charAt(0) === '#') { - color_val = color.substring(1, 7); - r = parseInt(color_val.substring(0, 2), 16); - g = parseInt(color_val.substring(2, 4), 16); - b = parseInt(color_val.substring(4, 6), 16); - } - let uicolors = [r / 255, g / 255, b / 255]; - let c = uicolors.map((col) => { - if (col <= 0.03928) { - return col / 12.92; - } - return Math.pow((col + 0.055) / 1.055, 2.4); - }); - let L = 0.2126 * c[0] + 0.7152 * c[1] + 0.0722 * c[2]; - return L <= 0.179; -} -export function async_process(argv, input = null, cancellable = null) { - let flags = Gio.SubprocessFlags.STDOUT_PIPE; - if (input !== null) - flags |= Gio.SubprocessFlags.STDIN_PIPE; - let proc = new Gio.Subprocess({ argv, flags }); - proc.init(cancellable); - proc.wait_async(null, (source, res) => { - source.wait_finish(res); - if (cancellable !== null) { - cancellable.cancel(); - } - }); - return new Promise((resolve, reject) => { - proc.communicate_utf8_async(input, cancellable, (proc, res) => { - try { - let bytes = proc.communicate_utf8_finish(res)[1]; - resolve(bytes.toString()); - } - catch (e) { - reject(e); - } - }); - }); -} -export function async_process_ipc(argv) { - const { SubprocessLauncher, SubprocessFlags } = Gio; - const launcher = new SubprocessLauncher({ - flags: SubprocessFlags.STDIN_PIPE | SubprocessFlags.STDOUT_PIPE, - }); - let child; - let cancellable = new Gio.Cancellable(); - try { - child = launcher.spawnv(argv); - } - catch (why) { - log.error(`failed to spawn ${argv}: ${why}`); - return null; - } - let stdin = new Gio.DataOutputStream({ - base_stream: child.get_stdin_pipe(), - close_base_stream: true, - }); - let stdout = new Gio.DataInputStream({ - base_stream: child.get_stdout_pipe(), - close_base_stream: true, - }); - child.wait_async(null, (source, res) => { - source.wait_finish(res); - cancellable.cancel(); - }); - return { child, stdin, stdout, cancellable }; -} -export function map_eq(map1, map2) { - if (map1.size !== map2.size) { - return false; - } - let cmp; - for (let [key, val] of map1) { - cmp = map2.get(key); - if (cmp !== val || (cmp === undefined && !map2.has(key))) { - return false; - } - } - return true; -} -export function os_release() { - const [ok, bytes] = GLib.file_get_contents('/etc/os-release'); - if (!ok) - return null; - const contents = imports.byteArray.toString(bytes); - for (const line of contents.split('\n')) { - if (line.startsWith('VERSION_ID')) { - return line.split('"')[1]; - } - } - return null; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/window.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/window.js deleted file mode 100644 index 1dd5d732..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/window.js +++ /dev/null @@ -1,583 +0,0 @@ -import * as lib from './lib.js'; -import * as log from './log.js'; -import * as once_cell from './once_cell.js'; -import * as Rect from './rectangle.js'; -import * as Tags from './tags.js'; -import * as utils from './utils.js'; -import * as xprop from './xprop.js'; -import * as scheduler from './scheduler.js'; -import * as focus from './focus.js'; -import Gdk from 'gi://Gdk'; -import Meta from 'gi://Meta'; -import Shell from 'gi://Shell'; -import St from 'gi://St'; -import GLib from 'gi://GLib'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -const { OnceCell } = once_cell; -export var window_tracker = Shell.WindowTracker.get_default(); -let SCHEDULED_RESTACK = null; -let ACTIVE_HINT_SHOW_ID = null; -const WM_TITLE_BLACKLIST = [ - 'Firefox', - 'Nightly', - 'Tor Browser', -]; -var RESTACK_STATE; -(function (RESTACK_STATE) { - RESTACK_STATE[RESTACK_STATE["RAISED"] = 0] = "RAISED"; - RESTACK_STATE[RESTACK_STATE["WORKSPACE_CHANGED"] = 1] = "WORKSPACE_CHANGED"; - RESTACK_STATE[RESTACK_STATE["NORMAL"] = 2] = "NORMAL"; -})(RESTACK_STATE || (RESTACK_STATE = {})); -var RESTACK_SPEED; -(function (RESTACK_SPEED) { - RESTACK_SPEED[RESTACK_SPEED["RAISED"] = 430] = "RAISED"; - RESTACK_SPEED[RESTACK_SPEED["WORKSPACE_CHANGED"] = 300] = "WORKSPACE_CHANGED"; - RESTACK_SPEED[RESTACK_SPEED["NORMAL"] = 200] = "NORMAL"; -})(RESTACK_SPEED || (RESTACK_SPEED = {})); -export class ShellWindow { - constructor(entity, window, window_app, ext) { - this.stack = null; - this.grab = false; - this.activate_after_move = false; - this.ignore_detach = false; - this.destroying = false; - this.reassignment = false; - this.smart_gapped = false; - this.border = new St.Bin({ - style_class: 'pop-shell-active-hint pop-shell-border-normal', - }); - this.prev_rect = null; - this.was_hidden = false; - this.extra = { - normal_hints: new OnceCell(), - wm_role_: new OnceCell(), - xid_: new OnceCell(), - }; - this.border_size = 0; - this.window_app = window_app; - this.entity = entity; - this.meta = window; - this.ext = ext; - this.known_workspace = this.workspace_id(); - if (this.meta.is_fullscreen()) { - ext.add_tag(entity, Tags.Floating); - } - if (this.may_decorate()) { - if (!window.is_client_decorated()) { - if (ext.settings.show_title()) { - this.decoration_show(ext); - } - else { - this.decoration_hide(ext); - } - } - } - this.bind_window_events(); - this.bind_hint_events(); - if (this.border) - global.window_group.add_child(this.border); - this.hide_border(); - this.restack(); - this.update_border_layout(); - if (this.meta.get_compositor_private()?.get_stage()) - this.on_style_changed(); - } - activate(move_mouse = true) { - activate(this.ext, move_mouse, this.meta); - } - actor_exists() { - return !this.destroying && this.meta.get_compositor_private() !== null; - } - bind_window_events() { - this.ext.window_signals - .get_or(this.entity, () => new Array()) - .push(this.meta.connect('size-changed', () => { - this.window_changed(); - }), this.meta.connect('position-changed', () => { - this.window_changed(); - }), this.meta.connect('workspace-changed', () => { - this.workspace_changed(); - }), this.meta.connect('notify::wm-class', () => { - this.wm_class_changed(); - }), this.meta.connect('raised', () => { - this.window_raised(); - })); - } - bind_hint_events() { - if (!this.border) - return; - let settings = this.ext.settings; - let change_id = settings.ext.connect('changed', (_, key) => { - if (this.border) { - if (key === 'hint-color-rgba') { - this.update_hint_colors(); - } - } - return false; - }); - this.border.connect('destroy', () => { - settings.ext.disconnect(change_id); - }); - this.border.connect('style-changed', () => { - this.on_style_changed(); - }); - this.update_hint_colors(); - } - update_hint_colors() { - let settings = this.ext.settings; - const color_value = settings.hint_color_rgba(); - if (this.ext.overlay) { - const gdk = new Gdk.RGBA(); - const overlay_alpha = 0.3; - const orig_overlay = 'rgba(53, 132, 228, 0.3)'; - gdk.parse(color_value); - if (utils.is_dark(gdk.to_string())) { - gdk.parse(orig_overlay); - } - gdk.alpha = overlay_alpha; - this.ext.overlay.set_style(`background: ${gdk.to_string()}`); - } - this.update_border_style(); - } - cmdline() { - let pid = this.meta.get_pid(), out = null; - if (-1 === pid) - return out; - const path = '/proc/' + pid + '/cmdline'; - if (!utils.exists(path)) - return out; - const result = utils.read_to_string(path); - if (result.kind == 1) { - out = result.value.trim(); - } - else { - log.error(`failed to fetch cmdline: ${result.value.format()}`); - } - return out; - } - decoration(_ext, callback) { - if (this.may_decorate()) { - const xid = this.xid(); - if (xid) - callback(xid); - } - } - decoration_hide(ext) { - if (this.ignore_decoration()) - return; - this.was_hidden = true; - this.decoration(ext, (xid) => xprop.set_hint(xid, xprop.MOTIF_HINTS, xprop.HIDE_FLAGS)); - } - decoration_show(ext) { - if (!this.was_hidden) - return; - this.decoration(ext, (xid) => xprop.set_hint(xid, xprop.MOTIF_HINTS, xprop.SHOW_FLAGS)); - } - icon(_ext, size) { - let icon = this.window_app.create_icon_texture(size); - if (!icon) { - icon = new St.Icon({ - icon_name: 'applications-other', - icon_type: St.IconType.FULLCOLOR, - icon_size: size, - }); - } - return icon; - } - ignore_decoration() { - const name = this.meta.get_wm_class(); - if (name === null) - return true; - return WM_TITLE_BLACKLIST.findIndex((n) => name.startsWith(n)) !== -1; - } - is_maximized() { - return this.meta.get_maximized() !== 0; - } - is_max_screen() { - return this.is_maximized() || this.ext.settings.gap_inner() === 0 || this.smart_gapped; - } - is_single_max_screen() { - const display = this.meta.get_display(); - if (display) { - let monitor_count = display.get_n_monitors(); - return (this.is_maximized() || this.smart_gapped) && monitor_count == 1; - } - return false; - } - is_snap_edge() { - return this.meta.get_maximized() == Meta.MaximizeFlags.VERTICAL; - } - is_tilable(ext) { - let tile_checks = () => { - let wm_class = this.meta.get_wm_class(); - if (wm_class !== null && wm_class.trim().length === 0) { - wm_class = this.name(ext); - } - const role = this.meta.get_role(); - if (role === 'quake') - return false; - if (this.meta.get_title() === 'Steam') { - const rect = this.rect(); - const is_dialog = rect.width < 400 && rect.height < 200; - const is_first_login = rect.width === 432 && rect.height === 438; - if (is_dialog || is_first_login) - return false; - } - if (wm_class !== null && ext.conf.window_shall_float(wm_class, this.title())) { - return ext.contains_tag(this.entity, Tags.ForceTile); - } - return (this.meta.window_type == Meta.WindowType.NORMAL && - !this.is_transient() && - wm_class !== null); - }; - return !ext.contains_tag(this.entity, Tags.Floating) && tile_checks(); - } - is_transient() { - return this.meta.get_transient_for() !== null; - } - may_decorate() { - const xid = this.xid(); - return xid ? xprop.may_decorate(xid) : false; - } - move(ext, rect, on_complete) { - if (!this.same_workspace() && this.is_maximized()) { - return; - } - this.hide_border(); - const clone = Rect.Rectangle.from_meta(rect); - const meta = this.meta; - const actor = meta.get_compositor_private(); - if (actor) { - meta.unmaximize(Meta.MaximizeFlags.HORIZONTAL); - meta.unmaximize(Meta.MaximizeFlags.VERTICAL); - meta.unmaximize(Meta.MaximizeFlags.HORIZONTAL | Meta.MaximizeFlags.VERTICAL); - actor.remove_all_transitions(); - ext.movements.insert(this.entity, clone); - ext.register({ tag: 2, window: this, kind: { tag: 1 } }); - if (on_complete) - ext.register_fn(on_complete); - if (meta.appears_focused) { - this.update_border_layout(); - ext.show_border_on_focused(); - } - } - } - name(ext) { - return ext.names.get_or(this.entity, () => 'unknown'); - } - on_style_changed() { - if (!this.border) - return; - this.border_size = this.border.get_theme_node().get_border_width(St.Side.TOP); - } - rect() { - return Rect.Rectangle.from_meta(this.meta.get_frame_rect()); - } - size_hint() { - return this.extra.normal_hints.get_or_init(() => { - const xid = this.xid(); - return xid ? xprop.get_size_hints(xid) : null; - }); - } - swap(ext, other) { - let ar = this.rect().clone(); - let br = other.rect().clone(); - other.move(ext, ar); - this.move(ext, br, () => place_pointer_on(this.ext, this.meta)); - } - title() { - const title = this.meta.get_title(); - return title ? title : this.name(this.ext); - } - wm_role() { - return this.extra.wm_role_.get_or_init(() => { - const xid = this.xid(); - return xid ? xprop.get_window_role(xid) : null; - }); - } - workspace_id() { - const workspace = this.meta.get_workspace(); - if (workspace) { - return workspace.index(); - } - else { - this.meta.change_workspace_by_index(0, false); - return 0; - } - } - xid() { - return this.extra.xid_.get_or_init(() => { - if (utils.is_wayland()) - return null; - return xprop.get_xid(this.meta); - }); - } - show_border() { - if (!this.border) - return; - this.restack(); - this.update_border_style(); - if (this.ext.settings.active_hint()) { - let border = this.border; - const permitted = () => { - return (this.actor_exists() && - this.ext.focus_window() == this && - !this.meta.is_fullscreen() && - (!this.is_single_max_screen() || this.is_snap_edge()) && - !this.meta.minimized); - }; - if (permitted()) { - if (this.meta.appears_focused) { - border.show(); - let applications = 0; - if (ACTIVE_HINT_SHOW_ID !== null) - GLib.source_remove(ACTIVE_HINT_SHOW_ID); - ACTIVE_HINT_SHOW_ID = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 600, () => { - if ((applications > 4 && !this.same_workspace()) || !permitted()) { - ACTIVE_HINT_SHOW_ID = null; - return GLib.SOURCE_REMOVE; - } - applications += 1; - border.show(); - return GLib.SOURCE_CONTINUE; - }); - } - } - } - } - same_workspace() { - const workspace = this.meta.get_workspace(); - if (workspace) { - let workspace_id = workspace.index(); - return workspace_id === global.workspace_manager.get_active_workspace_index(); - } - return false; - } - same_monitor() { - return this.meta.get_monitor() === global.display.get_current_monitor(); - } - restack(updateState = RESTACK_STATE.NORMAL) { - this.update_border_layout(); - if (this.meta.is_fullscreen() || (this.is_single_max_screen() && !this.is_snap_edge()) || this.meta.minimized) { - this.hide_border(); - } - let restackSpeed = RESTACK_SPEED.NORMAL; - switch (updateState) { - case RESTACK_STATE.NORMAL: - restackSpeed = RESTACK_SPEED.NORMAL; - break; - case RESTACK_STATE.RAISED: - restackSpeed = RESTACK_SPEED.RAISED; - break; - case RESTACK_STATE.WORKSPACE_CHANGED: - restackSpeed = RESTACK_SPEED.WORKSPACE_CHANGED; - break; - } - let restacks = 0; - const action = () => { - const count = restacks; - restacks += 1; - if (!this.actor_exists && count === 0) - return true; - if (count === 3) { - if (SCHEDULED_RESTACK !== null) - GLib.source_remove(SCHEDULED_RESTACK); - SCHEDULED_RESTACK = null; - } - const border = this.border; - const actor = this.meta.get_compositor_private(); - const win_group = global.window_group; - if (actor && border && win_group) { - this.update_border_layout(); - win_group.set_child_above_sibling(border, null); - if (this.always_top_windows.length > 0) { - for (const above_actor of this.always_top_windows) { - if (actor != above_actor) { - if (border.get_parent() === above_actor.get_parent()) { - win_group.set_child_below_sibling(border, above_actor); - } - } - } - if (border.get_parent() === actor.get_parent()) { - win_group.set_child_above_sibling(border, actor); - } - } - for (const window of this.ext.windows.values()) { - const parent = window.meta.get_transient_for(); - const window_actor = window.meta.get_compositor_private(); - if (!parent || !window_actor) - continue; - const parent_actor = parent.get_compositor_private(); - if (!parent_actor && parent_actor !== actor) - continue; - win_group.set_child_below_sibling(border, window_actor); - } - } - return true; - }; - if (SCHEDULED_RESTACK !== null) - GLib.source_remove(SCHEDULED_RESTACK); - SCHEDULED_RESTACK = GLib.timeout_add(GLib.PRIORITY_LOW, restackSpeed, action); - } - get always_top_windows() { - let above_windows = new Array(); - for (const actor of global.get_window_actors()) { - if (actor && actor.get_meta_window() && actor.get_meta_window().is_above()) - above_windows.push(actor); - } - return above_windows; - } - hide_border() { - let b = this.border; - if (b) - b.hide(); - } - update_border_layout() { - let { x, y, width, height } = this.meta.get_frame_rect(); - const border = this.border; - let borderSize = this.border_size; - if (border) { - if (!(this.is_max_screen() || this.is_snap_edge())) { - border.remove_style_class_name('pop-shell-border-maximize'); - } - else { - borderSize = 0; - border.add_style_class_name('pop-shell-border-maximize'); - } - const stack_number = this.stack; - let dimensions = null; - if (stack_number !== null) { - const stack = this.ext.auto_tiler?.forest.stacks.get(stack_number); - if (stack) { - let stack_tab_height = stack.tabs_height; - if (borderSize === 0 || this.grab) { - stack_tab_height = 0; - } - dimensions = [ - x - borderSize, - y - stack_tab_height - borderSize, - width + 2 * borderSize, - height + stack_tab_height + 2 * borderSize, - ]; - } - } - else { - dimensions = [x - borderSize, y - borderSize, width + 2 * borderSize, height + 2 * borderSize]; - } - if (dimensions) { - [x, y, width, height] = dimensions; - const workspace = this.meta.get_workspace(); - if (workspace === null) - return; - const screen = workspace.get_work_area_for_monitor(this.meta.get_monitor()); - if (screen) { - width = Math.min(width, screen.x + screen.width); - height = Math.min(height, screen.y + screen.height); - } - border.set_position(x, y); - border.set_size(width, height); - } - } - } - update_border_style() { - const { settings } = this.ext; - const color_value = settings.hint_color_rgba(); - const radius_value = settings.active_hint_border_radius(); - if (this.border) { - this.border.set_style(`border-color: ${color_value}; border-radius: ${radius_value}px;`); - } - } - wm_class_changed() { - if (this.is_tilable(this.ext)) { - this.ext.connect_window(this); - if (!this.meta.minimized) { - this.ext.auto_tiler?.auto_tile(this.ext, this, this.ext.init); - } - } - } - window_changed() { - this.update_border_layout(); - this.ext.show_border_on_focused(); - } - window_raised() { - this.restack(RESTACK_STATE.RAISED); - this.ext.show_border_on_focused(); - } - workspace_changed() { - this.restack(RESTACK_STATE.WORKSPACE_CHANGED); - } -} -export function activate(ext, move_mouse, win) { - try { - if (!win.get_compositor_private()) - return; - if (ext.get_window(win)?.destroying) - return; - if (win.is_override_redirect()) - return; - const workspace = win.get_workspace(); - if (!workspace) - return; - scheduler.setForeground(win); - win.unminimize(); - workspace.activate_with_focus(win, global.get_current_time()); - win.raise(); - const pointer_placement_permitted = move_mouse && - Main.modalCount === 0 && - ext.settings.mouse_cursor_follows_active_window() && - !pointer_already_on_window(win) && - pointer_in_work_area(); - if (pointer_placement_permitted) { - place_pointer_on(ext, win); - } - } - catch (error) { - log.error(`failed to activate window: ${error}`); - } -} -function pointer_in_work_area() { - const cursor = lib.cursor_rect(); - const indice = global.display.get_current_monitor(); - const mon = global.display.get_workspace_manager().get_active_workspace().get_work_area_for_monitor(indice); - return mon ? cursor.intersects(mon) : false; -} -function place_pointer_on(ext, win) { - const rect = win.get_frame_rect(); - let x = rect.x; - let y = rect.y; - let key = Object.keys(focus.FocusPosition)[ext.settings.mouse_cursor_focus_location()]; - let pointer_position_ = focus.FocusPosition[key]; - switch (pointer_position_) { - case focus.FocusPosition.TopLeft: - x += 8; - y += 8; - break; - case focus.FocusPosition.BottomLeft: - x += 8; - y += rect.height - 16; - break; - case focus.FocusPosition.TopRight: - x += rect.width - 16; - y += 8; - break; - case focus.FocusPosition.BottomRight: - x += rect.width - 16; - y += rect.height - 16; - break; - case focus.FocusPosition.Center: - x += rect.width / 2 + 8; - y += rect.height / 2 + 8; - break; - default: - x += 8; - y += 8; - } - const display = Gdk.DisplayManager.get().get_default_display(); - if (display) { - display.get_default_seat().get_pointer().warp(display.get_default_screen(), x, y); - } -} -function pointer_already_on_window(meta) { - const cursor = lib.cursor_rect(); - return cursor.intersects(meta.get_frame_rect()); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/xprop.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/xprop.js deleted file mode 100644 index 3ea849ae..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/pop-shell@system76.com/xprop.js +++ /dev/null @@ -1,95 +0,0 @@ -import * as lib from './lib.js'; -import GLib from 'gi://GLib'; -import { spawn } from 'resource:///org/gnome/shell/misc/util.js'; -export var MOTIF_HINTS = '_MOTIF_WM_HINTS'; -export var HIDE_FLAGS = ['0x2', '0x0', '0x0', '0x0', '0x0']; -export var SHOW_FLAGS = ['0x2', '0x0', '0x1', '0x0', '0x0']; -export function get_window_role(xid) { - let out = xprop_cmd(xid, 'WM_WINDOW_ROLE'); - if (!out) - return null; - return parse_string(out); -} -export function get_hint(xid, hint) { - let out = xprop_cmd(xid, hint); - if (!out) - return null; - const array = parse_cardinal(out); - return array ? array.map((value) => (value.startsWith('0x') ? value : '0x' + value)) : null; -} -function size_params(line) { - let fields = line.split(' '); - let x = lib.dbg(lib.nth_rev(fields, 2)); - let y = lib.dbg(lib.nth_rev(fields, 0)); - if (!x || !y) - return null; - let xn = parseInt(x, 10); - let yn = parseInt(y, 10); - return isNaN(xn) || isNaN(yn) ? null : [xn, yn]; -} -export function get_size_hints(xid) { - let out = xprop_cmd(xid, 'WM_NORMAL_HINTS'); - if (out) { - let lines = out.split('\n')[Symbol.iterator](); - lines.next(); - let minimum = lines.next().value; - let increment = lines.next().value; - let base = lines.next().value; - if (!minimum || !increment || !base) - return null; - let min_values = size_params(minimum); - let inc_values = size_params(increment); - let base_values = size_params(base); - if (!min_values || !inc_values || !base_values) - return null; - return { - minimum: min_values, - increment: inc_values, - base: base_values, - }; - } - return null; -} -export function get_xid(meta) { - const desc = meta.get_description(); - const match = desc && desc.match(/0x[0-9a-f]+/); - return match && match[0]; -} -export function may_decorate(xid) { - const hints = motif_hints(xid); - return hints ? hints[2] == '0x0' || hints[2] == '0x1' : true; -} -export function motif_hints(xid) { - return get_hint(xid, MOTIF_HINTS); -} -export function set_hint(xid, hint, value) { - spawn(['xprop', '-id', xid, '-f', hint, '32c', '-set', hint, value.join(', ')]); -} -function consume_key(string) { - const pos = string.indexOf('='); - return -1 == pos ? null : pos; -} -function parse_cardinal(string) { - const pos = consume_key(string); - return pos - ? string - .slice(pos + 1) - .trim() - .split(', ') - : null; -} -function parse_string(string) { - const pos = consume_key(string); - return pos - ? string - .slice(pos + 1) - .trim() - .slice(1, -1) - : null; -} -function xprop_cmd(xid, args) { - let xprops = GLib.spawn_command_line_sync(`xprop -id ${xid} ${args}`); - if (!xprops[0]) - return null; - return imports.byteArray.toString(xprops[1]); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/effect/clip_shadow_effect.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/effect/clip_shadow_effect.js deleted file mode 100644 index b472affb..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/effect/clip_shadow_effect.js +++ /dev/null @@ -1,17 +0,0 @@ -import GObject from 'gi://GObject'; -import Shell from 'gi://Shell'; -// local modules -import { readShader } from '../utils/file.js'; -// ------------------------------------------------------------------- [imports] -const [declarations, code] = readShader(import.meta.url, 'shader/clip_shadow.frag'); -export const ClipShadowEffect = GObject.registerClass({}, class extends Shell.GLSLEffect { - vfunc_build_pipeline() { - const hook = Shell.SnippetHook.FRAGMENT; - this.add_glsl_snippet(hook, declarations, code, false); - } - vfunc_paint_target(node, ctx) { - // Reset to default blend string. - this.get_pipeline()?.set_blend('RGBA = ADD(SRC_COLOR, DST_COLOR*(1-SRC_COLOR[A]))'); - super.vfunc_paint_target(node, ctx); - } -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/effect/linear_filter_effect.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/effect/linear_filter_effect.js deleted file mode 100644 index a9aceb5c..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/effect/linear_filter_effect.js +++ /dev/null @@ -1,12 +0,0 @@ -import Cogl from 'gi://Cogl'; -import GObject from 'gi://GObject'; -import Shell from 'gi://Shell'; -export const LinearFilterEffect = GObject.registerClass({}, class extends Shell.GLSLEffect { - vfunc_build_pipeline() { - this.add_glsl_snippet(Shell.SnippetHook.FRAGMENT, '', '', false); - } - vfunc_paint_target(node, ctx) { - this.get_pipeline()?.set_layer_filters(0, Cogl.PipelineFilter.LINEAR_MIPMAP_LINEAR, Cogl.PipelineFilter.LINEAR); - super.vfunc_paint_target(node, ctx); - } -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/effect/rounded_corners_effect.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/effect/rounded_corners_effect.js deleted file mode 100644 index 3739a6c8..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/effect/rounded_corners_effect.js +++ /dev/null @@ -1,118 +0,0 @@ -// imports.gi -import GObject from 'gi://GObject'; -import Meta from 'gi://Meta'; -import Shell from 'gi://Shell'; -// local modules -import { readShader } from '../utils/file.js'; -// --------------------------------------------------------------- [end imports] -// Load fragment shader of rounded corners effect. -const [declarations, code] = readShader(import.meta.url, 'shader/rounded_corners.frag'); -/** Location of uniform variants of rounded corners effect */ -class Uniforms { - bounds = 0; - clip_radius = 0; - exponent = 0; - inner_bounds = 0; - inner_clip_radius = 0; - pixel_step = 0; - border_width = 0; - border_color = 0; -} -export const RoundedCornersEffect = GObject.registerClass({}, class Effect extends Shell.GLSLEffect { - /** - * Location of uniforms variants in shader, Cache those location - * when shader has been setup in `vfunc_build_pipeline()`, sot that - * avoid to yse `this.get_uniform_location()` to query too much times. - */ - static uniforms = new Uniforms(); - constructor() { - Effect.uniforms = { - bounds: 0, - clip_radius: 0, - exponent: 0, - inner_bounds: 0, - inner_clip_radius: 0, - pixel_step: 0, - border_width: 0, - border_color: 0, - }; - super(); - for (const k in Effect.uniforms) { - Effect.uniforms[k] = - this.get_uniform_location(k); - } - } - vfunc_build_pipeline() { - const type = Shell.SnippetHook.FRAGMENT; - this.add_glsl_snippet(type, declarations, code, false); - } - vfunc_paint_target(node, ctx) { - // Reset to default blend string. - this.get_pipeline()?.set_blend('RGBA = ADD(SRC_COLOR, DST_COLOR*(1-SRC_COLOR[A]))'); - super.vfunc_paint_target(node, ctx); - } - /** - * Used to update uniform variants of shader - * @param corners_cfg - Rounded corners settings of window - * @param bounds_cfg - Outer bounds of rounded corners - */ - update_uniforms(scale_factor, corners_cfg, outer_bounds, border = { width: 0, color: [0, 0, 0, 0] }, pixel_step_raw) { - const border_width = border.width * scale_factor; - const border_color = border.color; - const outer_radius = corners_cfg.borderRadius * scale_factor; - const { padding, smoothing } = corners_cfg; - const bounds = [ - outer_bounds.x1 + padding.left * scale_factor, - outer_bounds.y1 + padding.top * scale_factor, - outer_bounds.x2 - padding.right * scale_factor, - outer_bounds.y2 - padding.bottom * scale_factor, - ]; - const inner_bounds = [ - bounds[0] + border_width, - bounds[1] + border_width, - bounds[2] - border_width, - bounds[3] - border_width, - ]; - let inner_radius = outer_radius - border_width; - if (inner_radius < 0.001) { - inner_radius = 0.0; - } - let pixel_step = pixel_step_raw; - if (!pixel_step) { - const actor = this.actor; - pixel_step = [1 / actor.get_width(), 1 / actor.get_height()]; - // For wayland clients in Gnome 43.1, we can't get correct buffer size - // from Meta.WindowActor to calculate pixel step, but its first child - // offers correct one. - if (actor instanceof Meta.WindowActor && - actor.firstChild?.firstChild) { - const { width, height } = actor.firstChild.firstChild; - pixel_step = [ - 1 / (width * scale_factor), - 1 / (height * scale_factor), - ]; - } - } - // Setup with squircle shape - let exponent = smoothing * 10.0 + 2.0; - let radius = outer_radius * 0.5 * exponent; - const max_radius = Math.min(bounds[3] - bounds[0], bounds[4] - bounds[1]); - if (radius > max_radius) { - exponent *= max_radius / radius; - radius = max_radius; - } - inner_radius *= radius / outer_radius; - const location = Effect.uniforms; - this.set_uniform_float(location.bounds, 4, bounds); - this.set_uniform_float(location.inner_bounds, 4, inner_bounds); - this.set_uniform_float(location.pixel_step, 2, pixel_step); - this.set_uniform_float(location.border_width, 1, [border_width]); - this.set_uniform_float(location.exponent, 1, [exponent]); - this.set_uniform_float(location.clip_radius, 1, [radius]); - this.set_uniform_float(location.border_color, 4, border_color); - this.set_uniform_float(location.inner_clip_radius, 1, [ - inner_radius, - ]); - this.queue_repaint(); - } -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/effect/shader/clip_shadow.frag b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/effect/shader/clip_shadow.frag deleted file mode 100644 index 23e76d62..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/effect/shader/clip_shadow.frag +++ /dev/null @@ -1,6 +0,0 @@ -// clip shadow in a simple way -void main() { - vec4 color = cogl_color_out; - float gray = (color.r + color.g + color.b) / 3.0; - cogl_color_out *= (1.0 - smoothstep(0.4, 1.0, gray)) * color.a; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/effect/shader/rounded_corners.frag b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/effect/shader/rounded_corners.frag deleted file mode 100644 index dbab9480..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/effect/shader/rounded_corners.frag +++ /dev/null @@ -1,103 +0,0 @@ -// This shader is copied from Mutter project: -// https://gitlab.gnome.org/GNOME/mutter/-/blob/main/src/compositor/meta-background-content.c -// -// With a litte change to make it works well with windows - -// The uniforms variables for controls -uniform vec4 bounds; // x, y: top left; z, w: bottom right -uniform float clip_radius; -uniform vec4 inner_bounds; -uniform float inner_clip_radius; -uniform vec2 pixel_step; -uniform float border_width; -uniform vec4 border_color; -uniform float exponent; - - -float circle_bounds(vec2 p, vec2 center, float clip_radius) { - vec2 delta = p - vec2(center.x, center.y); - float dist_squared = dot(delta, delta); - - // Fully outside the circle - float outer_radius = clip_radius + 0.5; - if(dist_squared >= (outer_radius * outer_radius)) - return 0.0; - - // Fully inside the circle - float inner_radius = clip_radius - 0.5; - if(dist_squared <= (inner_radius * inner_radius)) - return 1.0; - - // Only pixels on the edge of the curve need expensive antialiasing - return outer_radius - sqrt(dist_squared); -} - -float squircle_bounds(vec2 p, vec2 center, float clip_radius, float exponent) { - vec2 delta = abs(p - center); - - float pow_dx = pow(delta.x, exponent); - float pow_dy = pow(delta.y, exponent); - - float dist = pow(pow_dx + pow_dy, 1.0 / exponent); - - return clamp(clip_radius - dist + 0.5, 0.0, 1.0); -} - -float rounded_rect_coverage(vec2 p, vec4 bounds, float clip_radius, float exponent) { - // Outside the bounds - if(p.x < bounds.x || p.x > bounds.z || p.y < bounds.y || p.y > bounds.w) { - return 0.0; - } - - vec2 center; - - float center_left = bounds.x + clip_radius; - float center_right = bounds.z - clip_radius; - - if(p.x < center_left) - center.x = center_left; - else if(p.x > center_right) - center.x = center_right; - else - return 1.0; // The vast majority of pixels exit early here - - float center_top = bounds.y + clip_radius; - float center_bottom = bounds.w - clip_radius; - - if(p.y < center_top) - center.y = center_top; - else if(p.y > center_bottom) - center.y = center_bottom; - else - return 1.0; - - if(exponent <= 2.0) { - return circle_bounds(p, center, clip_radius); - } else { - return squircle_bounds(p, center, clip_radius, exponent); - } -} - -void main() { - vec2 texture_coord = cogl_tex_coord0_in.xy / pixel_step; - - float outer_alpha = rounded_rect_coverage(texture_coord, bounds, clip_radius, exponent); - - if(border_width > 0.9 || border_width < -0.9) { - float inner_alpha = rounded_rect_coverage(texture_coord, inner_bounds, inner_clip_radius, exponent); - float border_alpha = clamp(abs(outer_alpha - inner_alpha), 0.0, 1.0); - if (border_width > 0.0) { - // Clip corners of window first - cogl_color_out *= outer_alpha; - // Then mix Rounded window and border - cogl_color_out = mix(cogl_color_out, vec4(border_color.rgb, 1.0), border_alpha * border_color.a); - } else { - // Fill an rounded rectangle with border color first - vec4 border_rect = vec4(border_color.rgb, 1.0) * inner_alpha * border_color.a; - // Then mix rounded window and border, rounded window is smaller than border_rect - cogl_color_out = mix(border_rect, cogl_color_out, outer_alpha); - } - } else { - cogl_color_out *= outer_alpha; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/extension.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/extension.js deleted file mode 100644 index 8b7801f3..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/extension.js +++ /dev/null @@ -1,289 +0,0 @@ -// imports.gi -import Clutter from 'gi://Clutter'; -import GObject from 'gi://GObject'; -import Graphene from 'gi://Graphene'; -// gnome-shell modules -import { Extension } from 'resource:///org/gnome/shell/extensions/extension.js'; -import { layoutManager, overview } from 'resource:///org/gnome/shell/ui/main.js'; -import { WindowPreview } from 'resource:///org/gnome/shell/ui/windowPreview.js'; -import { WorkspaceAnimationController } from 'resource:///org/gnome/shell/ui/workspaceAnimation.js'; -// local modules -import { LinearFilterEffect } from './effect/linear_filter_effect.js'; -import { disableEffect, enableEffect } from './manager/event_manager.js'; -import { getRoundedCornersEffect, shouldEnableEffect, windowScaleFactor, } from './manager/utils.js'; -import { disableBackgroundMenuItem, enableBackgroundMenuItem, } from './utils/background_menu.js'; -import { OVERVIEW_SHADOW_ACTOR, SHADOW_PADDING } from './utils/constants.js'; -import { logDebug } from './utils/log.js'; -import { getPref, initPrefs, prefs, uninitPrefs } from './utils/settings.js'; -import { WindowPicker } from './window_picker/service.js'; -// --------------------------------------------------------------- [end imports] -export default class RoundedWindowCornersReborn extends Extension { - // The methods of gnome-shell to monkey patch - _orig_add_window; - _orig_prep_workspace_swt; - _orig_finish_workspace_swt; - _windowPicker = null; - _layoutManagerStartupConnection = null; - enable() { - initPrefs(this.getSettings()); - // Restore original methods, those methods will be restore when - // extensions is disabled - this._orig_add_window = WindowPreview.prototype._addWindow; - this._orig_prep_workspace_swt = - WorkspaceAnimationController.prototype._prepareWorkspaceSwitch; - this._orig_finish_workspace_swt = - WorkspaceAnimationController.prototype._finishWorkspaceSwitch; - this._windowPicker = new WindowPicker(); - this._windowPicker.export(); - // Enable rounded corners effects when gnome-shell is ready - // - // https://github.com/aunetx/blur-my-shell/blob/ - // 21d4bbde15acf7c3bf348f7375a12f7b14c3ab6f/src/extension.js#L87 - if (layoutManager._startingUp) { - this._layoutManagerStartupConnection = layoutManager.connect('startup-complete', () => { - enableEffect(); - if (getPref('enable-preferences-entry')) { - enableBackgroundMenuItem(); - } - layoutManager.disconnect( - // Since this happens inside of the connection, there - // is no way for this to be null. - // biome-ignore lint/style/noNonNullAssertion: - this._layoutManagerStartupConnection); - }); - } - else { - enableEffect(); - if (getPref('enable-preferences-entry')) { - enableBackgroundMenuItem(); - } - } - const self = this; - // WindowPreview is a widgets that show content of window in overview. - // this widget also contain a St.Label (show title of window), icon and - // close button for window. - // - // When there is new window added into overview, this function will be - // called. We need add our shadow actor and blur actor of rounded - // corners window into overview. - // - WindowPreview.prototype._addWindow = function (window) { - // call original method from gnome-shell - self._orig_add_window.apply(this, [window]); - // Make sure patched method only be called in _init() of - // WindowPreview - // https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js - // /ui/windowPreview.js#L42 - // Create a new error object and use it to get the call stack of - // the function. - // - // Since the error is not actually being raised, it doesn't need - // an error message. - // biome-ignore lint/suspicious/useErrorMessage: - const stack = new Error().stack?.trim(); - if (stack === undefined || - stack.indexOf('_updateAttachedDialogs') !== -1 || - stack.indexOf('addDialog') !== -1) { - return; - } - // If the window don't have rounded corners and shadows, - // just return - let has_rounded_corners = false; - const window_actor = window.get_compositor_private(); - const shadow = window_actor.rwcCustomData?.shadow; - if (shadow) { - has_rounded_corners = shouldEnableEffect(window); - } - if (!(has_rounded_corners && shadow)) { - return; - } - logDebug(`Add shadow for ${window.title} in overview`); - // WindowPreview.windowContainer used to show content of window - const windowContainer = this.windowContainer; - let firstChild = windowContainer.firstChild; - // Set linear filter to let it looks better - firstChild?.add_effect(new LinearFilterEffect()); - // Add a clone of shadow to overview - const shadow_clone = new OverviewShadowActor(shadow, this); - for (const prop of ['scale-x', 'scale-y']) { - windowContainer.bind_property(prop, shadow_clone, prop, 1); - } - this.insert_child_below(shadow_clone, windowContainer); - // Disconnect all signals when Window preview in overview is destroy - const connection = this.connect('destroy', () => { - shadow_clone.destroy(); - firstChild?.clear_effects(); - firstChild = null; - this.disconnect(connection); - }); - }; - // Just Like the monkey patch when enter overview, need to add cloned shadow - // actor when switching workspaces on Desktop - WorkspaceAnimationController.prototype._prepareWorkspaceSwitch = - function (workspaceIndices) { - self._orig_prep_workspace_swt.apply(this, [workspaceIndices]); - for (const monitor of this._switchData.monitors) { - for (const workspace of monitor._workspaceGroups) { - // Let shadow actor always behind the window clone actor when we - // switch workspace by Ctrl+Alt+Left/Right - // - // Fix #55 - const restacked_id = global.display.connect('restacked', () => { - for (const { clone, } of workspace._windowRecords) { - const shadow = clone - ._shadow_clone; - if (shadow) { - workspace.set_child_below_sibling(shadow, clone); - } - } - }); - const destroy_id = workspace.connect('destroy', () => { - global.display.disconnect(restacked_id); - workspace.disconnect(destroy_id); - }); - for (const { windowActor: actor, clone, } of workspace._windowRecords) { - const win = actor.metaWindow; - const frame_rect = win.get_frame_rect(); - const shadow = actor - .rwcCustomData?.shadow; - const enabled = getRoundedCornersEffect(actor)?.enabled; - if (shadow && enabled) { - // Only create shadow actor when window should have rounded - // corners when switching workspace - // Copy shadow actor to workspace group, so that to see - // shadow when switching workspace - const shadow_clone = new Clutter.Clone({ - source: shadow, - }); - const paddings = SHADOW_PADDING * windowScaleFactor(win); - shadow_clone.width = - frame_rect.width + paddings * 2; - shadow_clone.height = - frame_rect.height + paddings * 2; - shadow_clone.x = - clone.x + frame_rect.x - actor.x - paddings; - shadow_clone.y = - clone.y + frame_rect.y - actor.y - paddings; - // Should works well work Desktop Cube extensions - const notify_id = clone.connect('notify::translation-z', () => { - shadow_clone.translationZ = - clone.translationZ - 0.05; - }); - const destroy_id = clone.connect('destroy', () => { - clone.disconnect(notify_id); - clone.disconnect(destroy_id); - }); - // Add reference shadow clone for clone actor, so that we - // can restack position of shadow when we need - clone._shadow_clone = - shadow_clone; - clone.bind_property('visible', shadow_clone, 'visible', 0); - workspace.insert_child_below(shadow_clone, clone); - } - } - } - } - }; - WorkspaceAnimationController.prototype._finishWorkspaceSwitch = - function (switchData) { - for (const monitor of this._switchData.monitors) { - for (const workspace of monitor._workspaceGroups) { - for (const { clone } of workspace._windowRecords) { - clone._shadow_clone?.destroy(); - delete clone._shadow_clone; - } - } - } - self._orig_finish_workspace_swt.apply(this, [switchData]); - }; - // Gnome-shell will not disable extensions when _logout/shutdown/restart - // system, it means that the signal handlers will not be cleaned when - // gnome-shell is closing. - // - // Now clear all resources manually before gnome-shell closes - const connection = global.display.connect('closing', () => { - logDebug('Clear all resources because gnome-shell is shutdown'); - this.disable(); - global.display.disconnect(connection); - }); - // Watch changes of GSettings - prefs.connect('changed', (_, k) => { - if (k === 'enable-preferences-entry') { - getPref('enable-preferences-entry') - ? enableBackgroundMenuItem() - : disableBackgroundMenuItem(); - } - }); - logDebug('Enabled'); - } - disable() { - // Restore patched methods - WindowPreview.prototype._addWindow = this._orig_add_window; - WorkspaceAnimationController.prototype._prepareWorkspaceSwitch = - this._orig_prep_workspace_swt; - WorkspaceAnimationController.prototype._finishWorkspaceSwitch = - this._orig_finish_workspace_swt; - // Remove the item to open preferences page in background menu - disableBackgroundMenuItem(); - this._windowPicker?.unexport(); - disableEffect(); - // Set all props to null - this._windowPicker = null; - if (this._layoutManagerStartupConnection !== null) { - layoutManager.disconnect(this._layoutManagerStartupConnection); - this._layoutManagerStartupConnection = null; - } - logDebug('Disabled'); - uninitPrefs(); - } -} -/** - * Copy shadow of rounded corners window and show it in overview. - * This actor will be created when window preview has created for overview - */ -const OverviewShadowActor = GObject.registerClass({}, class extends Clutter.Clone { - _window_preview; - /** - * Create shadow actor for WindowPreview in overview - * @param source the shadow actor create for rounded corners shadow - * @param window_preview the window preview has shown in overview - */ - constructor(source, window_preview) { - super({ - source, // the source shadow actor shown in desktop - name: OVERVIEW_SHADOW_ACTOR, - pivotPoint: new Graphene.Point({ x: 0.5, y: 0.5 }), - }); - this._window_preview = window_preview; - } - /** - * Recompute the position and size of shadow in overview - * This virtual function will be called when we: - * - entering/closing overview - * - dragging window - * - position and size of window preview in overview changed - * @param box The bound box of shadow actor - */ - vfunc_allocate(box) { - const leaving_overview = overview._overview.controls._workspacesDisplay._leavingOverview; - // The window container that shown in overview - const windowContainerBox = leaving_overview - ? this._window_preview.windowContainer.get_allocation_box() - : this._window_preview.get_allocation_box(); - // Meta.Window contain the all information about a window - const meta_win = this._window_preview._windowActor.get_meta_window(); - if (!meta_win) { - return; - } - // As we known, preview shown in overview has been scaled - // in overview - const container_scaled = windowContainerBox.get_width() / - meta_win.get_frame_rect().width; - const paddings = SHADOW_PADDING * container_scaled * windowScaleFactor(meta_win); - // Setup bounds box of shadow actor - box.set_origin(-paddings, -paddings); - box.set_size(windowContainerBox.get_width() + 2 * paddings, windowContainerBox.get_height() + 2 * paddings); - // Make bounds box effect actor - super.vfunc_allocate(box); - } -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/ar/LC_MESSAGES/rounded-window-corners@fxgn.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/ar/LC_MESSAGES/rounded-window-corners@fxgn.mo deleted file mode 100644 index 4f8ba18b..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/ar/LC_MESSAGES/rounded-window-corners@fxgn.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/cs/LC_MESSAGES/rounded-window-corners@fxgn.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/cs/LC_MESSAGES/rounded-window-corners@fxgn.mo deleted file mode 100644 index 4f3ab4cb..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/cs/LC_MESSAGES/rounded-window-corners@fxgn.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/de/LC_MESSAGES/rounded-window-corners@fxgn.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/de/LC_MESSAGES/rounded-window-corners@fxgn.mo deleted file mode 100644 index 3b174cea..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/de/LC_MESSAGES/rounded-window-corners@fxgn.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/eo/LC_MESSAGES/rounded-window-corners@fxgn.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/eo/LC_MESSAGES/rounded-window-corners@fxgn.mo deleted file mode 100644 index c271a7a7..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/eo/LC_MESSAGES/rounded-window-corners@fxgn.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/es/LC_MESSAGES/rounded-window-corners@fxgn.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/es/LC_MESSAGES/rounded-window-corners@fxgn.mo deleted file mode 100644 index 283ebd7a..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/es/LC_MESSAGES/rounded-window-corners@fxgn.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/et/LC_MESSAGES/rounded-window-corners@fxgn.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/et/LC_MESSAGES/rounded-window-corners@fxgn.mo deleted file mode 100644 index fcc8b427..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/et/LC_MESSAGES/rounded-window-corners@fxgn.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/fi/LC_MESSAGES/rounded-window-corners@fxgn.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/fi/LC_MESSAGES/rounded-window-corners@fxgn.mo deleted file mode 100644 index 23fa6cde..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/fi/LC_MESSAGES/rounded-window-corners@fxgn.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/fr/LC_MESSAGES/rounded-window-corners@fxgn.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/fr/LC_MESSAGES/rounded-window-corners@fxgn.mo deleted file mode 100644 index 3e5fc174..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/fr/LC_MESSAGES/rounded-window-corners@fxgn.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/hu/LC_MESSAGES/rounded-window-corners@fxgn.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/hu/LC_MESSAGES/rounded-window-corners@fxgn.mo deleted file mode 100644 index 7b986fb0..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/hu/LC_MESSAGES/rounded-window-corners@fxgn.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/id/LC_MESSAGES/rounded-window-corners@fxgn.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/id/LC_MESSAGES/rounded-window-corners@fxgn.mo deleted file mode 100644 index 19a9c476..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/id/LC_MESSAGES/rounded-window-corners@fxgn.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/it/LC_MESSAGES/rounded-window-corners@fxgn.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/it/LC_MESSAGES/rounded-window-corners@fxgn.mo deleted file mode 100644 index 33befbd3..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/it/LC_MESSAGES/rounded-window-corners@fxgn.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/ja/LC_MESSAGES/rounded-window-corners@fxgn.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/ja/LC_MESSAGES/rounded-window-corners@fxgn.mo deleted file mode 100644 index 3b7e16af..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/ja/LC_MESSAGES/rounded-window-corners@fxgn.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/nb_NO/LC_MESSAGES/rounded-window-corners@fxgn.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/nb_NO/LC_MESSAGES/rounded-window-corners@fxgn.mo deleted file mode 100644 index 21eb1f1c..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/nb_NO/LC_MESSAGES/rounded-window-corners@fxgn.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/nl/LC_MESSAGES/rounded-window-corners@fxgn.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/nl/LC_MESSAGES/rounded-window-corners@fxgn.mo deleted file mode 100644 index a461ce22..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/nl/LC_MESSAGES/rounded-window-corners@fxgn.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/pl/LC_MESSAGES/rounded-window-corners@fxgn.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/pl/LC_MESSAGES/rounded-window-corners@fxgn.mo deleted file mode 100644 index 43c77ba1..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/pl/LC_MESSAGES/rounded-window-corners@fxgn.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/pt/LC_MESSAGES/rounded-window-corners@fxgn.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/pt/LC_MESSAGES/rounded-window-corners@fxgn.mo deleted file mode 100644 index b99a60ec..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/pt/LC_MESSAGES/rounded-window-corners@fxgn.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/pt_BR/LC_MESSAGES/rounded-window-corners@fxgn.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/pt_BR/LC_MESSAGES/rounded-window-corners@fxgn.mo deleted file mode 100644 index 3a6d5112..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/pt_BR/LC_MESSAGES/rounded-window-corners@fxgn.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/ru/LC_MESSAGES/rounded-window-corners@fxgn.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/ru/LC_MESSAGES/rounded-window-corners@fxgn.mo deleted file mode 100644 index 6fa5011d..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/ru/LC_MESSAGES/rounded-window-corners@fxgn.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/tr/LC_MESSAGES/rounded-window-corners@fxgn.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/tr/LC_MESSAGES/rounded-window-corners@fxgn.mo deleted file mode 100644 index e44bd56f..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/tr/LC_MESSAGES/rounded-window-corners@fxgn.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/uk/LC_MESSAGES/rounded-window-corners@fxgn.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/uk/LC_MESSAGES/rounded-window-corners@fxgn.mo deleted file mode 100644 index c34a65f5..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/uk/LC_MESSAGES/rounded-window-corners@fxgn.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/zh_CN/LC_MESSAGES/rounded-window-corners@fxgn.mo b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/zh_CN/LC_MESSAGES/rounded-window-corners@fxgn.mo deleted file mode 100644 index c61a1483..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/locale/zh_CN/LC_MESSAGES/rounded-window-corners@fxgn.mo and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/manager/README.md b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/manager/README.md deleted file mode 100644 index 2e327974..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/manager/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# `manager` - -The rounded corners effect has to perform some actions when differen events -happen. For example, when a new window is opened, the effect has to detect -it and add rounded corners to it. - -This directory contains the code that handles these events. - -## `event_manager.ts` - -Manages connections between gnome shell events and the rounded corners -effect. It attaches the necessary signals to matching handlers on each effect. - -## `event_handlers.ts` - -Contains the implementation of handlers for all of the events. - -## `utils.ts` - -Provides various utility functions used withing signal handling code. diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/manager/event_handlers.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/manager/event_handlers.js deleted file mode 100644 index 9717d0b7..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/manager/event_handlers.js +++ /dev/null @@ -1,241 +0,0 @@ -/** - * @file Contains the implementation of handlers for various events that need - * to be processed by the extension. Those handlers are bound to event signals - * in effect_manager.ts. - */ -import Clutter from 'gi://Clutter'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import St from 'gi://St'; -import { ClipShadowEffect } from '../effect/clip_shadow_effect.js'; -import { RoundedCornersEffect } from '../effect/rounded_corners_effect.js'; -import { CLIP_SHADOW_EFFECT, ROUNDED_CORNERS_EFFECT, } from '../utils/constants.js'; -import { logDebug } from '../utils/log.js'; -import { getPref } from '../utils/settings.js'; -import { computeBounds, computeShadowActorOffset, computeWindowContentsOffset, getRoundedCornersCfg, getRoundedCornersEffect, shouldEnableEffect, unwrapActor, updateShadowActorStyle, windowScaleFactor, } from './utils.js'; -export function onAddEffect(actor) { - logDebug(`opened: ${actor?.metaWindow.title}: ${actor}`); - const win = actor.metaWindow; - if (!shouldEnableEffect(win)) { - logDebug(`Skipping ${win.title}`); - return; - } - unwrapActor(actor)?.add_effect_with_name(ROUNDED_CORNERS_EFFECT, new RoundedCornersEffect()); - const shadow = createShadow(actor); - // Bind properties of the window to the shadow actor. - const SYNC_CREATE = GObject.BindingFlags.SYNC_CREATE; - for (const prop of [ - 'pivot-point', - 'translation-x', - 'translation-y', - 'scale-x', - 'scale-y', - 'visible', - ]) { - actor.bind_property(prop, shadow, prop, SYNC_CREATE); - } - // Store shadow, app type, visible binding, so that we can access them later - actor.rwcCustomData = { - shadow, - unminimizedTimeoutId: 0, - }; - // Run those handlers once to make sure the effect is applied correctly. - refreshRoundedCorners(actor); - refreshShadow(actor); -} -export function onRemoveEffect(actor) { - const name = ROUNDED_CORNERS_EFFECT; - unwrapActor(actor)?.remove_effect_by_name(name); - // Remove shadow actor - const shadow = actor.rwcCustomData?.shadow; - if (shadow) { - global.windowGroup.remove_child(shadow); - shadow.clear_effects(); - shadow.destroy(); - } - // Remove all timeout handler - const timeoutId = actor.rwcCustomData?.unminimizedTimeoutId; - if (timeoutId) { - GLib.source_remove(timeoutId); - } - delete actor.rwcCustomData; -} -export function onMinimize(actor) { - // Compatibility with "Compiz alike magic lamp effect". - // When minimizing a window, disable the shadow to make the magic lamp effect - // work. - const magicLampEffect = actor.get_effect('minimize-magic-lamp-effect'); - const shadow = actor.rwcCustomData?.shadow; - const roundedCornersEffect = getRoundedCornersEffect(actor); - if (magicLampEffect && shadow && roundedCornersEffect) { - logDebug('Minimizing with magic lamp effect'); - shadow.visible = false; - roundedCornersEffect.enabled = false; - } -} -export function onUnminimize(actor) { - // Compatibility with "Compiz alike magic lamp effect". - // When unminimizing a window, wait until the effect is completed before - // showing the shadow. - const magicLampEffect = actor.get_effect('unminimize-magic-lamp-effect'); - const shadow = actor.rwcCustomData?.shadow; - const roundedCornersEffect = getRoundedCornersEffect(actor); - if (magicLampEffect && shadow && roundedCornersEffect) { - shadow.visible = false; - const timer = magicLampEffect.timerId; - const id = timer.connect('new-frame', source => { - // Wait until the effect is 98% completed - if (source.get_progress() > 0.98) { - logDebug('Unminimizing with magic lamp effect'); - shadow.visible = true; - roundedCornersEffect.enabled = true; - source.disconnect(id); - } - }); - return; - } -} -export function onRestacked() { - for (const actor of global.get_window_actors()) { - const shadow = actor.rwcCustomData?.shadow; - if (!(actor.visible && shadow)) { - continue; - } - global.windowGroup.set_child_below_sibling(shadow, actor); - } -} -export const onSizeChanged = refreshRoundedCorners; -export const onFocusChanged = refreshShadow; -export function onSettingsChanged(key) { - switch (key) { - case 'skip-libadwaita-app': - case 'skip-libhandy-app': - case 'blacklist': - refreshEffectState(); - break; - case 'focused-shadow': - case 'unfocused-shadow': - refreshAllShadows(); - break; - case 'global-rounded-corner-settings': - case 'custom-rounded-corner-settings': - case 'border-color': - case 'border-width': - case 'tweak-kitty-terminal': - refreshAllRoundedCorners(); - break; - default: - } -} -/** - * Create the shadow actor for a window. - * - * @param actor - The window actor to create the shadow actor for. - */ -function createShadow(actor) { - const shadow = new St.Bin({ - name: 'Shadow Actor', - child: new St.Bin({ - xExpand: true, - yExpand: true, - }), - }); - shadow.firstChild.add_style_class_name('shadow'); - refreshShadow(actor); - // We have to clip the shadow because of this issue: - // https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4474 - shadow.add_effect_with_name(CLIP_SHADOW_EFFECT, new ClipShadowEffect()); - // Draw the shadow actor below the window actor. - global.windowGroup.insert_child_below(shadow, actor); - // Bind position and size between window and shadow - for (let i = 0; i < 4; i++) { - const constraint = new Clutter.BindConstraint({ - source: actor, - coordinate: i, - offset: 0, - }); - shadow.add_constraint(constraint); - } - return shadow; -} -/** Traverse all windows, and check if they should have rounded corners. */ -function refreshEffectState() { - for (const actor of global.get_window_actors()) { - const shouldHaveEffect = shouldEnableEffect(actor.metaWindow); - const hasEffect = getRoundedCornersEffect(actor) != null; - if (shouldHaveEffect && !hasEffect) { - onAddEffect(actor); - refreshRoundedCorners(actor); - return; - } - if (!shouldHaveEffect && hasEffect) { - onRemoveEffect(actor); - return; - } - } -} -/** - * Refresh the shadow actor for a window. - * - * @param actor - The window actor to refresh the shadow for. - */ -function refreshShadow(actor) { - const win = actor.metaWindow; - const shadow = actor.rwcCustomData?.shadow; - if (!shadow) { - return; - } - const shadowSettings = win.appears_focused - ? getPref('focused-shadow') - : getPref('unfocused-shadow'); - const { borderRadius, padding } = getRoundedCornersCfg(win); - updateShadowActorStyle(win, shadow, borderRadius, shadowSettings, padding); -} -/** Refresh the style of all shadow actors */ -function refreshAllShadows() { - for (const actor of global.get_window_actors()) { - refreshShadow(actor); - } -} -/** - * Refresh rounded corners settings for a window. - * - * @param actor - The window actor to refresh the rounded corners settings for. - */ -function refreshRoundedCorners(actor) { - const win = actor.metaWindow; - const windowInfo = actor.rwcCustomData; - const effect = getRoundedCornersEffect(actor); - if (!(effect && windowInfo)) { - return; - } - // Skip rounded corners when window is fullscreen & maximize - const cfg = getRoundedCornersCfg(win); - const shouldHaveEffect = shouldEnableEffect(win); - if (effect.enabled !== shouldHaveEffect) { - effect.enabled = shouldHaveEffect; - refreshShadow(actor); - } - const windowContentOffset = computeWindowContentsOffset(win); - // When window size is changed, update uniforms for corner rounding shader. - effect.update_uniforms(windowScaleFactor(win), cfg, computeBounds(actor, windowContentOffset), { - width: getPref('border-width'), - color: getPref('border-color'), - }); - // Update BindConstraint for the shadow - const shadow = windowInfo.shadow; - const offsets = computeShadowActorOffset(actor, windowContentOffset); - const constraints = shadow.get_constraints(); - constraints.forEach((constraint, i) => { - if (constraint instanceof Clutter.BindConstraint) { - constraint.offset = offsets[i]; - } - }); -} -/** Refresh rounded corners settings for all windows. */ -function refreshAllRoundedCorners() { - for (const actor of global.get_window_actors()) { - refreshRoundedCorners(actor); - } - refreshAllShadows(); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/manager/event_manager.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/manager/event_manager.js deleted file mode 100644 index e1616f70..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/manager/event_manager.js +++ /dev/null @@ -1,139 +0,0 @@ -/** - * @file Manages connections between gnome shell events and the rounded corners - * effect. See {@link enableEffect} for more information. - */ -import { logDebug } from '../utils/log.js'; -import { prefs } from '../utils/settings.js'; -import * as handlers from './event_handlers.js'; -/** - * The rounded corners effect has to perform some actions when differen events - * happen. For example, when a new window is opened, the effect has to detect - * it and add rounded corners to it. - * - * The `enableEffect` method handles this by attaching the necessary signals - * to matching handlers on each effect. - */ -export function enableEffect() { - // Update the effect when settings are changed. - connect(prefs, 'changed', (_, key) => handlers.onSettingsChanged(key)); - const wm = global.windowManager; - // Add the effect to all windows when the extension is enabled. - const windowActors = global.get_window_actors(); - logDebug(`Initial window count: ${windowActors.length}`); - for (const actor of windowActors) { - applyEffectTo(actor); - } - // Add the effect to new windows when they are opened. - connect(global.display, 'window-created', (_, win) => { - const actor = win.get_compositor_private(); - // If wm_class_instance of Meta.Window is null, wait for it to be - // set before applying the effect. - if (win?.get_wm_class_instance() == null) { - const notifyId = win.connect('notify::wm-class', () => { - applyEffectTo(actor); - win.disconnect(notifyId); - }); - } - else { - applyEffectTo(actor); - } - }); - // Window minimized. - connect(wm, 'minimize', (_, actor) => handlers.onMinimize(actor)); - // Window unminimized. - connect(wm, 'unminimize', (_, actor) => handlers.onUnminimize(actor)); - // When closing the window, remove the effect from it. - connect(wm, 'destroy', (_, actor) => removeEffectFrom(actor)); - // When windows are restacked, the order of shadow actors as well. - connect(global.display, 'restacked', handlers.onRestacked); -} -/** Disable the effect for all windows. */ -export function disableEffect() { - for (const actor of global.get_window_actors()) { - removeEffectFrom(actor); - } - disconnectAll(); -} -const connections = []; -/** - * Connect a callback to an object signal and add it to the list of all - * connections. This allows to easily disconnect all signals when removing - * the effect. - * - * @param object - The object to connect the callback to. - * @param signal - The name of the signal. - * @param callback - The function to connect to the signal. - */ -function connect(object, signal, -// Signal callbacks can have any return args and return types. -// biome-ignore lint/suspicious/noExplicitAny: -callback) { - connections.push({ - object: object, - id: object.connect(signal, callback), - }); -} -/** - * Disconnect all connected signals from all actors or a specific object. - * - * @param object - If object is provided, only disconnect signals from it. - */ -function disconnectAll(object) { - for (const connection of connections) { - if (object === undefined || connection.object === object) { - connection.object.disconnect(connection.id); - } - } -} -/** - * Apply the effect to a window. - * - * While {@link enableEffect} handles global events such as window creation, - * this function handles events that happen to a specific window, like changing - * its size or workspace. - * - * @param actor - The window actor to apply the effect to. - */ -function applyEffectTo(actor) { - // In wayland sessions, the surface actor of XWayland clients is sometimes - // not ready when the window is created. In this case, we wait until it is - // ready before applying the effect. - if (!actor.firstChild) { - const id = actor.connect('notify::first-child', () => { - applyEffectTo(actor); - actor.disconnect(id); - }); - return; - } - const texture = actor.get_texture(); - if (!texture) { - return; - } - // Window resized. - // - // The signal has to be connected both to the actor and the texture. Why is - // that? I have no idea. But without that, weird bugs can happen. For - // example, when using Dash to Dock, all opened windows will be invisible - // *unless they are pinned in the dock*. So yeah, GNOME is magic. - connect(actor, 'notify::size', () => handlers.onSizeChanged(actor)); - connect(texture, 'size-changed', () => { - handlers.onSizeChanged(actor); - }); - // Window focus changed. - connect(actor.metaWindow, 'notify::appears-focused', () => handlers.onFocusChanged(actor)); - // Workspace or monitor of the window changed. - connect(actor.metaWindow, 'workspace-changed', () => { - handlers.onFocusChanged(actor); - }); - handlers.onAddEffect(actor); -} -/** - * Remove the effect from a window. - * - * @param actor - The window actor to remove the effect from. - */ -function removeEffectFrom(actor) { - disconnectAll(actor); - disconnectAll(actor.metaWindow); - handlers.onRemoveEffect(actor); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/manager/utils.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/manager/utils.js deleted file mode 100644 index 6b80bc5e..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/manager/utils.js +++ /dev/null @@ -1,233 +0,0 @@ -/** @file Provides various utility functions used withing signal handling code. */ -import Gio from 'gi://Gio'; -import Meta from 'gi://Meta'; -import St from 'gi://St'; -import { boxShadowCss } from '../utils/box_shadow.js'; -import { APP_SHADOWS, ROUNDED_CORNERS_EFFECT, SHADOW_PADDING, } from '../utils/constants.js'; -import { readFile } from '../utils/file.js'; -import { logDebug } from '../utils/log.js'; -import { getPref } from '../utils/settings.js'; -/** - * Get the actor that rounded corners should be applied to. - * In Wayland, the effect is applied to WindowActor, but in X11, it is applied - * to WindowActor.first_child. - * - * @param actor - The window actor to unwrap. - * @returns The correct actor that the effect should be applied to. - */ -export function unwrapActor(actor) { - const type = actor.metaWindow.get_client_type(); - return type === Meta.WindowClientType.X11 ? actor.get_first_child() : actor; -} -/** - * Get the correct rounded corner setting for a window (custom settings if a - * window has custom overrides, global settings otherwise). - * - * @param win - The window to get the settings for. - * @returns The matching settings object. - */ -export function getRoundedCornersCfg(win) { - const globalCfg = getPref('global-rounded-corner-settings'); - const customCfgList = getPref('custom-rounded-corner-settings'); - const wmClass = win.get_wm_class_instance(); - if (wmClass == null || - !customCfgList[wmClass] || - !customCfgList[wmClass].enabled) { - return globalCfg; - } - return customCfgList[wmClass]; -} -/** - * Get the Clutter.Effect object for the rounded corner effect of a specific - * window. - * - * @param actor - The window actor to get the effect for. - * @returns The corresponding Clutter.Effect object. - */ -export function getRoundedCornersEffect(actor) { - const win = actor.metaWindow; - const name = ROUNDED_CORNERS_EFFECT; - return win.get_client_type() === Meta.WindowClientType.X11 - ? actor.firstChild.get_effect(name) - : actor.get_effect(name); -} -/** - * Get the scaling factor of a window. - * - * @param win - The window to get the scaling factor for. - * @returns The scaling factor of the window. - */ -export function windowScaleFactor(win) { - // When fractional scaling is enabled, always return 1 - const features = Gio.Settings.new('org.gnome.mutter').get_strv('experimental-features'); - if (Meta.is_wayland_compositor() && - features.includes('scale-monitor-framebuffer')) { - return 1; - } - const monitorIndex = win.get_monitor(); - return global.display.get_monitor_scale(monitorIndex); -} -/** Compute outer bounds for rounded corners of a window - * - * @param actor - The window actor to compute the bounds for. - * @param [x, y, width, height] - The content offsets of the window actor. - */ -export function computeBounds(actor, [x, y, width, height]) { - const bounds = { - x1: x + 1, - y1: y + 1, - x2: x + actor.width + width, - y2: y + actor.height + height, - }; - // Kitty draws its window decoration by itself, so we need to manually - // clip its shadow and recompute the outer bounds for it. - if (getPref('tweak-kitty-terminal')) { - if (actor.metaWindow.get_client_type() === - Meta.WindowClientType.WAYLAND && - actor.metaWindow.get_wm_class_instance() === 'kitty') { - const [x1, y1, x2, y2] = APP_SHADOWS.kitty; - const scale = windowScaleFactor(actor.metaWindow); - bounds.x1 += x1 * scale; - bounds.y1 += y1 * scale; - bounds.x2 -= x2 * scale; - bounds.y2 -= y2 * scale; - } - } - return bounds; -} -/** - * Compute the offset of actual window contents from the entire window buffer. - * - * @param window - The window to compute the offset for. - * @returns The content offsets of the window (x, y, width, height). - */ -export function computeWindowContentsOffset(window) { - const bufferRect = window.get_buffer_rect(); - const frameRect = window.get_frame_rect(); - return [ - frameRect.x - bufferRect.x, - frameRect.y - bufferRect.y, - frameRect.width - bufferRect.width, - frameRect.height - bufferRect.height, - ]; -} -/** - * Compute the offset of the shadow actor for a window. - * - * @param actor - The window actor to compute the offset for. - * @param [offsetX, offsetY, offsetWidth, offsetHeight] - The content offsets of the window actor. - */ -export function computeShadowActorOffset(actor, [offsetX, offsetY, offsetWidth, offsetHeight]) { - const win = actor.metaWindow; - const shadowPadding = SHADOW_PADDING * windowScaleFactor(win); - return [ - offsetX - shadowPadding, - offsetY - shadowPadding, - 2 * shadowPadding + offsetWidth, - 2 * shadowPadding + offsetHeight, - ]; -} -/** Update the CSS style of a shadow actor - * - * @param win - The window to update the style for. - * @param actor - The shadow actor to update the style for. - * @param borderRadius - The border radius of the shadow actor. - * @param shadow - The shadow settings for the window. - * @param padding - The padding of the shadow actor. - */ -export function updateShadowActorStyle(win, actor, borderRadius = getPref('global-rounded-corner-settings').borderRadius, shadow = getPref('focused-shadow'), padding = getPref('global-rounded-corner-settings').padding) { - const { left, right, top, bottom } = padding; - // Increase border_radius when smoothing is on - let adjustedBorderRadius = borderRadius; - if (getPref('global-rounded-corner-settings') !== null) { - adjustedBorderRadius *= - 1.0 + getPref('global-rounded-corner-settings').smoothing; - } - // If there are two monitors with different scale factors, the scale of - // the window may be different from the scale that has to be applied in - // the css, so we have to adjust the scale factor accordingly. - const originalScale = St.ThemeContext.get_for_stage(global.stage).scaleFactor; - const scale = windowScaleFactor(win) / originalScale; - actor.style = `padding: ${SHADOW_PADDING * scale}px;`; - const child = actor.firstChild; - child.style = - win.maximizedHorizontally || win.maximizedVertically || win.fullscreen - ? 'opacity: 0;' - : `background: white; - border-radius: ${adjustedBorderRadius * scale}px; - ${boxShadowCss(shadow, scale)}; - margin: ${top * scale}px - ${right * scale}px - ${bottom * scale}px - ${left * scale}px;`; - child.queue_redraw(); -} -/** - * Check whether a window should have rounded corners. - * - * @param win - The window to check. - * @returns Whether the window should have rounded corners. - */ -export function shouldEnableEffect(win) { - // Skip rounded corners for the DING (Desktop Icons NG) extension. - // - // https://extensions.gnome.org/extension/2087/desktop-icons-ng-ding/ - if (win.gtkApplicationId === 'com.rastersoft.ding') { - return false; - } - // Skip blacklisted applications. - const wmClass = win.get_wm_class_instance(); - if (wmClass == null) { - logDebug(`Warning: wm_class_instance of ${win}: ${win.title} is null`); - return false; - } - if (getPref('blacklist').includes(wmClass)) { - return false; - } - // Only apply the effect to normal windows (skip menus, tooltips, etc.) - if (win.windowType !== Meta.WindowType.NORMAL && - win.windowType !== Meta.WindowType.DIALOG && - win.windowType !== Meta.WindowType.MODAL_DIALOG) { - return false; - } - // Skip libhandy/libadwaita applications according to settings. - const appType = win._appType ?? getAppType(win); - win._appType = appType; // Cache the result. - logDebug(`Check Type of window:${win.title} => ${appType}`); - if (getPref('skip-libadwaita-app') && appType === 'LibAdwaita') { - return false; - } - if (getPref('skip-libhandy-app') && appType === 'LibHandy') { - return false; - } - // Skip maximized/fullscreen windows according to settings. - const maximized = win.maximizedHorizontally || win.maximizedVertically; - const fullscreen = win.fullscreen; - const cfg = getRoundedCornersCfg(win); - return (!(maximized || fullscreen) || - (maximized && cfg.keepRoundedCorners.maximized) || - (fullscreen && cfg.keepRoundedCorners.fullscreen)); -} -/** - * Get the type of the application (LibHandy/LibAdwaita/Other). - * - * @param win - The window to get the type of. - * @returns the type of the application. - */ -function getAppType(win) { - try { - // May throw a permission error. - const contents = readFile(`/proc/${win.get_pid()}/maps`); - if (contents.includes('libhandy-1.so')) { - return 'LibHandy'; - } - if (contents.includes('libadwaita-1.so')) { - return 'LibAdwaita'; - } - return 'Other'; - } - catch (e) { - logError(e); - return 'Other'; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/index.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/index.js deleted file mode 100644 index 4bca68f9..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import { BlackList } from '../preferences/pages/blacklist.js'; -import { Custom } from '../preferences/pages/custom.js'; -import { General } from '../preferences/pages/general.js'; -export const pages = () => [ - new General(), - new BlackList(), - new Custom(), -]; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/pages/blacklist.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/pages/blacklist.js deleted file mode 100644 index 4e71d892..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/pages/blacklist.js +++ /dev/null @@ -1,51 +0,0 @@ -import Adw from 'gi://Adw'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import { getPref, setPref } from '../../utils/settings.js'; -import { BlacklistRow } from '../widgets/blacklist_row.js'; -import { gettext as _ } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; -export const BlackList = GObject.registerClass({ - Template: GLib.uri_resolve_relative(import.meta.url, 'blacklist.ui', GLib.UriFlags.NONE), - GTypeName: 'PrefsBlacklist', - InternalChildren: ['blacklist_group'], -}, class extends Adw.PreferencesPage { - constructor() { - super(); - this.blacklist = getPref('blacklist'); - for (const title of this.blacklist) { - this.add_window(undefined, title); - } - } - add_window(_, title) { - const callbacks = { - on_delete: row => this.delete_row(row), - on_title_changed: (_, old_title, new_title) => this.change_title(old_title, new_title), - }; - const row = new BlacklistRow(callbacks); - row.set_subtitle(title ?? ''); - this._blacklist_group.add(row); - } - delete_row(row) { - this.blacklist.splice(this.blacklist.indexOf(row.title), 1); - setPref('blacklist', this.blacklist); - this._blacklist_group.remove(row); - } - change_title(old_title, new_title) { - if (this.blacklist.includes(new_title)) { - const win = this.root; - win.add_toast(new Adw.Toast({ - title: _(`Can't add ${new_title} to the list, because it already there`), - })); - return false; - } - if (old_title === '') { - this.blacklist.push(new_title); - } - else { - const old_id = this.blacklist.indexOf(old_title); - this.blacklist.splice(old_id, 1, new_title); - } - setPref('blacklist', this.blacklist); - return true; - } -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/pages/blacklist.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/pages/blacklist.ui deleted file mode 100644 index d3003ade..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/pages/blacklist.ui +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/pages/custom.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/pages/custom.js deleted file mode 100644 index 10e06647..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/pages/custom.js +++ /dev/null @@ -1,114 +0,0 @@ -import Adw from 'gi://Adw'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import { gettext as _ } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; -import { getPref, setPref } from '../../utils/settings.js'; -import { CustomEffectRow, CustomEffectRowClass, } from '../widgets/customeffect_row.js'; -export const Custom = GObject.registerClass({ - Template: GLib.uri_resolve_relative(import.meta.url, 'custom.ui', GLib.UriFlags.NONE), - GTypeName: 'PrefsCustom', - InternalChildren: ['custom_group'], -}, class extends Adw.PreferencesPage { - constructor() { - super(); - this._settings_cfg = getPref('custom-rounded-corner-settings'); - for (const title in this._settings_cfg) { - this.add_window(undefined, title); - } - } - add_window(_, title) { - const callbacks = { - on_delete: row => this.delete_row(row), - on_title_changed: (row, old_title, new_title) => this.change_title(row, old_title, new_title), - }; - const row = new CustomEffectRow(callbacks); - if (title) { - this.setup_row(row, title); - } - row.set_subtitle(title ?? ''); - this._custom_group.add(row); - } - delete_row(row) { - delete this._settings_cfg[row.subtitle]; - setPref('custom-rounded-corner-settings', this._settings_cfg); - this._custom_group.remove(row); - } - change_title(row, old_title, new_title) { - if (this._settings_cfg[new_title] !== undefined) { - const win = this.root; - win.add_toast(new Adw.Toast({ - title: _(`Can't add ${new_title} to the list, because it already there`), - })); - return false; - } - if (old_title === '') { - this._settings_cfg[new_title] = getPref('global-rounded-corner-settings'); - } - else { - const cfg = this._settings_cfg[old_title]; - delete this._settings_cfg[old_title]; - this._settings_cfg[new_title] = cfg; - } - this.setup_row(row, new_title); - setPref('custom-rounded-corner-settings', this._settings_cfg); - return true; - } - setup_row(row, title) { - if (!(row instanceof CustomEffectRowClass)) { - return; - } - const r = row; - r.connect('notify::subtitle', (row) => { - row.check_state(); - }); - r.enabled_row.set_active(this._settings_cfg[title].enabled); - r.enabled_row.connect('notify::active', (row) => { - r.check_state(); - this._settings_cfg[title].enabled = row.get_active(); - setPref('custom-rounded-corner-settings', this._settings_cfg); - }); - r.corner_radius.set_value(this._settings_cfg[title].borderRadius); - r.corner_radius.connect('value-changed', (adj) => { - this._settings_cfg[title].borderRadius = adj.get_value(); - setPref('custom-rounded-corner-settings', this._settings_cfg); - }); - r.corner_smoothing.set_value(this._settings_cfg[title].smoothing); - r.corner_smoothing.connect('value-changed', (adj) => { - this._settings_cfg[title].smoothing = adj.get_value(); - setPref('custom-rounded-corner-settings', this._settings_cfg); - }); - r.keep_for_maximized.set_active(this._settings_cfg[title].keepRoundedCorners.maximized); - r.keep_for_maximized.connect('notify::active', (row) => { - this._settings_cfg[title].keepRoundedCorners.maximized = - row.get_active(); - setPref('custom-rounded-corner-settings', this._settings_cfg); - }); - r.keep_for_fullscreen.set_active(this._settings_cfg[title].keepRoundedCorners.fullscreen); - r.keep_for_fullscreen.connect('notify::active', (row) => { - this._settings_cfg[title].keepRoundedCorners.fullscreen = - row.get_active(); - setPref('custom-rounded-corner-settings', this._settings_cfg); - }); - r.paddings.paddingTop = this._settings_cfg[title].padding.top; - r.paddings.connect('notify::padding-top', (row) => { - this._settings_cfg[title].padding.top = row.paddingTop; - setPref('custom-rounded-corner-settings', this._settings_cfg); - }); - r.paddings.paddingBottom = this._settings_cfg[title].padding.bottom; - r.paddings.connect('notify::padding-bottom', (row) => { - this._settings_cfg[title].padding.bottom = - row.paddingBottom; - setPref('custom-rounded-corner-settings', this._settings_cfg); - }); - r.paddings.paddingStart = this._settings_cfg[title].padding.left; - r.paddings.connect('notify::padding-start', (row) => { - this._settings_cfg[title].padding.left = row.paddingStart; - setPref('custom-rounded-corner-settings', this._settings_cfg); - }); - r.paddings.paddingEnd = this._settings_cfg[title].padding.right; - r.paddings.connect('notify::padding-end', (row) => { - this._settings_cfg[title].padding.right = row.paddingEnd; - setPref('custom-rounded-corner-settings', this._settings_cfg); - }); - } -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/pages/custom.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/pages/custom.ui deleted file mode 100644 index cb403ac7..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/pages/custom.ui +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/pages/general.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/pages/general.js deleted file mode 100644 index 88aabc50..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/pages/general.js +++ /dev/null @@ -1,103 +0,0 @@ -import Adw from 'gi://Adw'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Gdk from 'gi://Gdk'; -import Gio from 'gi://Gio'; -import { bindPref, getPref, setPref } from '../../utils/settings.js'; -import { EditShadowPage } from '../widgets/edit_shadow_page.js'; -import { ResetPage } from '../widgets/reset_page.js'; -import '../widgets/paddings_row.js'; -export const General = GObject.registerClass({ - Template: GLib.uri_resolve_relative(import.meta.url, 'general.ui', GLib.UriFlags.NONE), - GTypeName: 'PrefsGeneral', - InternalChildren: [ - 'skip_libadwaita', - 'skip_libhandy', - 'border_width', - 'border_color', - 'corner_radius', - 'corner_smoothing', - 'keep_for_maximized', - 'keep_for_fullscreen', - 'paddings', - 'tweak_kitty', - 'right_click_menu', - 'enable_log', - ], -}, class extends Adw.PreferencesPage { - constructor() { - super(); - this._cfg = getPref('global-rounded-corner-settings'); - bindPref('skip-libadwaita-app', this._skip_libadwaita, 'active', Gio.SettingsBindFlags.DEFAULT); - bindPref('skip-libhandy-app', this._skip_libhandy, 'active', Gio.SettingsBindFlags.DEFAULT); - bindPref('border-width', this._border_width, 'value', Gio.SettingsBindFlags.DEFAULT); - const color = new Gdk.RGBA(); - [color.red, color.green, color.blue, color.alpha] = - getPref('border-color'); - this._border_color.set_rgba(color); - this._border_color.connect('notify::rgba', (btn) => { - const color = btn.get_rgba(); - setPref('border-color', [ - color.red, - color.green, - color.blue, - color.alpha, - ]); - }); - this._corner_radius.set_value(this._cfg.borderRadius); - this._corner_radius.connect('value-changed', (adj) => { - this._cfg.borderRadius = adj.get_value(); - this._update_global_config(); - }); - this._corner_smoothing.set_value(this._cfg.smoothing); - this._corner_smoothing.connect('value-changed', (adj) => { - this._cfg.smoothing = adj.get_value(); - this._update_global_config(); - }); - this._keep_for_maximized.set_active(this._cfg.keepRoundedCorners.maximized); - this._keep_for_maximized.connect('notify::active', (swtch) => { - this._cfg.keepRoundedCorners.maximized = swtch.get_active(); - this._update_global_config(); - }); - this._keep_for_fullscreen.set_active(this._cfg.keepRoundedCorners.fullscreen); - this._keep_for_fullscreen.connect('notify::active', (swtch) => { - this._cfg.keepRoundedCorners.fullscreen = - swtch.get_active(); - this._update_global_config(); - }); - this._paddings.paddingTop = this._cfg.padding.top; - this._paddings.connect('notify::padding-top', (row) => { - this._cfg.padding.top = row.paddingTop; - this._update_global_config(); - }); - this._paddings.paddingBottom = this._cfg.padding.bottom; - this._paddings.connect('notify::padding-bottom', (row) => { - this._cfg.padding.bottom = row.paddingBottom; - this._update_global_config(); - }); - this._paddings.paddingStart = this._cfg.padding.left; - this._paddings.connect('notify::padding-start', (row) => { - this._cfg.padding.left = row.paddingStart; - this._update_global_config(); - }); - this._paddings.paddingEnd = this._cfg.padding.right; - this._paddings.connect('notify::padding-end', (row) => { - this._cfg.padding.right = row.paddingEnd; - this._update_global_config(); - }); - bindPref('tweak-kitty-terminal', this._tweak_kitty, 'active', Gio.SettingsBindFlags.DEFAULT); - bindPref('enable-preferences-entry', this._right_click_menu, 'active', Gio.SettingsBindFlags.DEFAULT); - bindPref('debug-mode', this._enable_log, 'active', Gio.SettingsBindFlags.DEFAULT); - } - show_reset_page(_) { - const root = this.root; - root.push_subpage(new ResetPage()); - } - show_shadow_page(_) { - const root = this.root; - root.push_subpage(new EditShadowPage()); - } - _update_global_config() { - setPref('global-rounded-corner-settings', this._cfg); - } -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/pages/general.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/pages/general.ui deleted file mode 100644 index 284b318e..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/pages/general.ui +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/app_row.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/app_row.js deleted file mode 100644 index 5eb79390..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/app_row.js +++ /dev/null @@ -1,75 +0,0 @@ -import Adw from 'gi://Adw'; -import GObject from 'gi://GObject'; -import Gtk from 'gi://Gtk'; -import { gettext as _ } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; -import { onPicked, pick } from '../../window_picker/client.js'; -export class AppRowClass extends Adw.ExpanderRow { - callbacks; - remove_btn = new Gtk.Button({ - icon_name: 'window-close-symbolic', - css_classes: ['flat', 'circular'], - valign: Gtk.Align.CENTER, - }); - apply_btn = new Gtk.Button({ - icon_name: 'object-select-symbolic', - css_classes: ['flat', 'circular'], - valign: Gtk.Align.CENTER, - }); - pick_btn = new Gtk.Button({ - icon_name: 'find-location-symbolic', - css_classes: ['flat', 'circular'], - valign: Gtk.Align.CENTER, - }); - wm_class_entry = new Adw.EntryRow({ - title: _('Window class'), - }); - constructor(cb) { - super(); - this.callbacks = cb; - this.wm_class_entry.add_prefix(this.apply_btn); - this.wm_class_entry.add_prefix(this.pick_btn); - this.add_row(this.wm_class_entry); - this.add_suffix(this.remove_btn); - this.bind_property('subtitle', this.wm_class_entry, 'text', GObject.BindingFlags.DEFAULT); - this.add_css_class('property'); - this.set_title(_('Expand this row, to pick a window')); - this.remove_btn.connect('clicked', () => { - this.on_delete(); - }); - this.pick_btn.connect('clicked', () => { - this.on_pick(this.wm_class_entry); - }); - this.apply_btn.connect('clicked', () => { - this.on_title_change(this.wm_class_entry); - }); - } - on_title_change(entry) { - if (!this.callbacks?.on_title_changed || - this.subtitle === entry.text || - entry.text === '') { - return; - } - if (this.callbacks.on_title_changed(this, this.subtitle || '', entry.text || '')) { - this.set_subtitle(entry.text || ''); - } - } - on_pick(entry) { - onPicked(wm_instance_class => { - if (wm_instance_class === 'window-not-found') { - const win = this.root; - win.add_toast(new Adw.Toast({ - title: _("Can't pick window from this position"), - })); - return; - } - entry.text = wm_instance_class; - }); - pick(); - } - on_delete() { - this.callbacks?.on_delete(this); - } -} -export const AppRow = GObject.registerClass({ - GTypeName: 'AppRow', -}, AppRowClass); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/blacklist_row.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/blacklist_row.js deleted file mode 100644 index e54a4672..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/blacklist_row.js +++ /dev/null @@ -1,7 +0,0 @@ -import GObject from 'gi://GObject'; -import './app_row.js'; -import { AppRowClass } from './app_row.js'; -export const BlacklistRow = GObject.registerClass({ - GTypeName: 'BlacklistRow', -}, class extends AppRowClass { -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/customeffect_row.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/customeffect_row.js deleted file mode 100644 index 80f553db..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/customeffect_row.js +++ /dev/null @@ -1,89 +0,0 @@ -import Adw from 'gi://Adw'; -import GObject from 'gi://GObject'; -import Gtk from 'gi://Gtk'; -import { AppRowClass } from './app_row.js'; -import { PaddingsRow } from './paddings_row.js'; -import './app_row.js'; -import { gettext as _ } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; -export class CustomEffectRowClass extends AppRowClass { - enabled_row = new Adw.SwitchRow({ - title: _('Enabled'), - }); - corner_radius_row = new Adw.ActionRow({ - title: _('Corner radius'), - }); - corner_radius = new Gtk.Adjustment({ - lower: 0, - upper: 40, - step_increment: 1, - page_increment: 1, - }); - corner_smoothing_row = new Adw.ActionRow({ - title: _('Corner smoothing'), - }); - corner_smoothing = new Gtk.Adjustment({ - lower: 0, - upper: 1, - step_increment: 0.1, - page_increment: 0.1, - }); - keep_for_maximized = new Adw.SwitchRow({ - title: _('Keep rounded corners when maximized'), - subtitle: _('Always clip rounded corners even if window is maximized or tiled'), - }); - keep_for_fullscreen = new Adw.SwitchRow({ - title: _('Keep rounded corners when in fullscreen'), - subtitle: _('Always clip rounded corners even for fullscreen window'), - }); - paddings = new PaddingsRow(); - constructor(cb) { - super(cb); - this.corner_radius_row.add_suffix(new Gtk.Scale({ - valign: Gtk.Align.CENTER, - hexpand: true, - draw_value: true, - value_pos: Gtk.PositionType.LEFT, - round_digits: 0, - digits: 0, - orientation: Gtk.Orientation.HORIZONTAL, - adjustment: this.corner_radius, - })); - this.corner_smoothing_row.add_suffix(new Gtk.Scale({ - valign: Gtk.Align.CENTER, - hexpand: true, - draw_value: true, - value_pos: Gtk.PositionType.LEFT, - round_digits: 1, - orientation: Gtk.Orientation.HORIZONTAL, - adjustment: this.corner_smoothing, - })); - this.add_row(this.enabled_row); - this.add_row(this.corner_radius_row); - this.add_row(this.corner_smoothing_row); - this.add_row(this.keep_for_maximized); - this.add_row(this.keep_for_fullscreen); - this.add_row(this.paddings); - this.check_state(); - } - check_state() { - if (!this.enabled_row.get_active()) { - this.toggle_sensetive(false); - return; - } - if (this.subtitle === '') { - this.toggle_sensetive(false); - return; - } - this.toggle_sensetive(true); - } - toggle_sensetive(state) { - this.corner_radius_row.set_sensitive(state); - this.corner_smoothing_row.set_sensitive(state); - this.keep_for_maximized.set_sensitive(state); - this.keep_for_fullscreen.set_sensitive(state); - this.paddings.set_sensitive(state); - } -} -export const CustomEffectRow = GObject.registerClass({ - GTypeName: 'CustomEffectRow', -}, CustomEffectRowClass); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/edit-shadow-page.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/edit-shadow-page.ui deleted file mode 100644 index e433d856..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/edit-shadow-page.ui +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/edit_shadow_page.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/edit_shadow_page.js deleted file mode 100644 index ab50b720..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/edit_shadow_page.js +++ /dev/null @@ -1,118 +0,0 @@ -import Adw from 'gi://Adw'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Gio from 'gi://Gio'; -import Gtk from 'gi://Gtk'; -import { boxShadowCss } from '../../utils/box_shadow.js'; -import { getPref, setPref } from '../../utils/settings.js'; -export const EditShadowPage = GObject.registerClass({ - Template: GLib.uri_resolve_relative(import.meta.url, 'edit-shadow-page.ui', GLib.UriFlags.NONE), - GTypeName: 'EditShadowPage', - InternalChildren: [ - 'focused_shadow_preview', - 'unfocused_shadow_preview', - 'preview_row', - 'focused_horizontal_offset', - 'focused_vertical_offset', - 'focused_blur_radius', - 'focused_spread_radius', - 'focused_opacity', - 'unfocused_horizontal_offset', - 'unfocused_vertical_offset', - 'unfocused_blur_radius', - 'unfocused_spread_radius', - 'unfocused_opacity', - ], -}, class extends Adw.NavigationPage { - constructor() { - super(); - this.is_initialized = false; - this.unfocus_provider = new Gtk.CssProvider(); - this.focus_provider = new Gtk.CssProvider(); - this.backgroud_provider = new Gtk.CssProvider(); - this.focused_shadow = getPref('focused-shadow'); - this.unfocused_shadow = getPref('unfocused-shadow'); - const style_manager = new Adw.StyleManager(); - style_manager.connect('notify::dark', manager => { - this.update_background(manager); - }); - // Init style of preview widgets - this._focused_shadow_preview - .get_style_context() - .add_provider(this.focus_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); - this._unfocused_shadow_preview - .get_style_context() - .add_provider(this.unfocus_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); - this._preview_row - .get_style_context() - .add_provider(this.backgroud_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); - // Init value controls from settings - this.update_background(style_manager); - this.update_widget(); - this.update_style(); - this.is_initialized = true; - } - update_widget() { - this._focused_horizontal_offset.set_value(this.focused_shadow.horizontalOffset); - this._focused_vertical_offset.set_value(this.focused_shadow.verticalOffset); - this._focused_blur_radius.set_value(this.focused_shadow.blurOffset); - this._focused_spread_radius.set_value(this.focused_shadow.spreadRadius); - this._focused_opacity.set_value(this.focused_shadow.opacity); - this._unfocused_horizontal_offset.set_value(this.unfocused_shadow.horizontalOffset); - this._unfocused_vertical_offset.set_value(this.unfocused_shadow.verticalOffset); - this._unfocused_blur_radius.set_value(this.unfocused_shadow.blurOffset); - this._unfocused_spread_radius.set_value(this.unfocused_shadow.spreadRadius); - this._unfocused_opacity.set_value(this.unfocused_shadow.opacity); - } - update_cfg() { - const focused_shadow = { - verticalOffset: this._focused_vertical_offset.get_value(), - horizontalOffset: this._focused_horizontal_offset.get_value(), - blurOffset: this._focused_blur_radius.get_value(), - spreadRadius: this._focused_spread_radius.get_value(), - opacity: this._focused_opacity.get_value(), - }; - this.focused_shadow = focused_shadow; - const unfocused_shadow = { - verticalOffset: this._unfocused_vertical_offset.get_value(), - horizontalOffset: this._unfocused_horizontal_offset.get_value(), - blurOffset: this._unfocused_blur_radius.get_value(), - spreadRadius: this._unfocused_spread_radius.get_value(), - opacity: this._unfocused_opacity.get_value(), - }; - this.unfocused_shadow = unfocused_shadow; - // Store into settings - setPref('unfocused-shadow', this.unfocused_shadow); - setPref('focused-shadow', this.focused_shadow); - } - update_style() { - const gen_style = (normal, hover) => `.preview { - transition: box-shadow 200ms; - ${boxShadowCss(normal)}; - border-radius: 12px; - } - .preview:hover { - ${boxShadowCss(hover)}; - }`; - this.unfocus_provider.load_from_string(gen_style(this.unfocused_shadow, this.focused_shadow)); - this.focus_provider.load_from_string(gen_style(this.focused_shadow, this.unfocused_shadow)); - } - update_background(manager) { - const backgrounds = Gio.Settings.new('org.gnome.desktop.background'); - const path = manager.get_dark() - ? backgrounds.get_string('picture-uri-dark') - : backgrounds.get_string('picture-uri'); - this.backgroud_provider.load_from_string(`.desktop-background { - background: url("${path}"); - background-size: cover; - }`); - } - // signal handles - on_value_changed() { - if (!this.is_initialized) { - return; - } - this.update_cfg(); - this.update_style(); - } -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/paddings-row.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/paddings-row.ui deleted file mode 100644 index d512932b..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/paddings-row.ui +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/paddings_row.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/paddings_row.js deleted file mode 100644 index f3323701..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/paddings_row.js +++ /dev/null @@ -1,15 +0,0 @@ -import Adw from 'gi://Adw'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -export class PaddingsRowClass extends Adw.PreferencesRow { -} -export const PaddingsRow = GObject.registerClass({ - Template: GLib.uri_resolve_relative(import.meta.url, 'paddings-row.ui', GLib.UriFlags.NONE), - GTypeName: 'PaddingsRow', - Properties: { - PaddingTop: GObject.ParamSpec.int('padding-top', 'Padding top', 'Padding from the top', GObject.ParamFlags.READWRITE, 0, 100, 0), - PaddingBottom: GObject.ParamSpec.int('padding-bottom', 'Padding bottom', 'Padding from the bottom', GObject.ParamFlags.READWRITE, 0, 100, 0), - PaddingStart: GObject.ParamSpec.int('padding-start', 'Padding start', 'Padding from the start', GObject.ParamFlags.READWRITE, 0, 100, 0), - PaddingEnd: GObject.ParamSpec.int('padding-end', 'Padding end', 'Padding from the end', GObject.ParamFlags.READWRITE, 0, 100, 0), - }, -}, PaddingsRowClass); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/reset-page.ui b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/reset-page.ui deleted file mode 100644 index 289fd925..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/reset-page.ui +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - Reset these settings? - reset - cancel - - - _Cancel - _Reset - - - \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/reset_page.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/reset_page.js deleted file mode 100644 index 0f315ec7..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/preferences/widgets/reset_page.js +++ /dev/null @@ -1,108 +0,0 @@ -import Adw from 'gi://Adw'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import { gettext as _ } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; -import { logDebug } from '../../utils/log.js'; -import { getPref, prefs, setPref } from '../../utils/settings.js'; -class Cfg { - description; - reset = false; - constructor(description) { - this.description = description; - } -} -export const ResetPage = GObject.registerClass({ - Template: GLib.uri_resolve_relative(import.meta.url, 'reset-page.ui', GLib.UriFlags.NONE), - GTypeName: 'ResetPage', - InternalChildren: ['reset_grp', 'reset_btn', 'dialog'], -}, class extends Adw.NavigationPage { - constructor() { - super(); - this._rows = []; - this._init_cfg(); - this._build_ui(); - } - _init_cfg() { - this._reset_keys = { - 'skip-libadwaita-app': new Cfg(_('Skip LibAdwaita Applications')), - 'skip-libhandy-app': new Cfg(_('Skip LibHandy Applications')), - 'focused-shadow': new Cfg(_('Focus Window Shadow Style')), - 'unfocused-shadow': new Cfg(_('Unfocus Window Shadow Style')), - 'border-width': new Cfg(_('Border Width')), - 'border-color': new Cfg(_('Border Color')), - 'debug-mode': new Cfg(_('Enable Log')), - }; - this._reset_corners_cfg = { - borderRadius: new Cfg(_('Border Radius')), - padding: new Cfg(_('Padding')), - keepRoundedCorners: new Cfg(_('Keep Rounded Corners when Maximized or Fullscreen')), - smoothing: new Cfg(_('Corner Smoothing')), - }; - } - _build_ui() { - const build = (cfg) => { - for (const key in cfg) { - const row = new Adw.SwitchRow({ - active: false, - name: key, - }); - row.set_title(cfg[key].description); - row.connect('notify::active', source => this.on_toggled(source)); - this._reset_grp.add(row); - this._rows.push(row); - } - }; - build(this._reset_corners_cfg); - build(this._reset_keys); - } - on_toggled(source) { - const k = source.name; - let v = this._reset_corners_cfg[k]; - if (v !== undefined) { - v.reset = source.active; - return; - } - v = this._reset_keys[k]; - if (v !== undefined) { - v.reset = source.active; - return; - } - } - select_all() { - for (const row of this._rows) { - row.set_active(true); - } - } - ask_for_reset() { - // typescript thinks, that there should be 0-2 arguments, but actually - // it will throw an error, if any of three argument is missing - // @ts-ignore - this._dialog.choose(this, null, null); - } - reset(_, response) { - if (response === 'cancel') { - return; - } - for (const k in this._reset_keys) { - if (this._reset_keys[k]?.reset === true) { - prefs.reset(k); - logDebug(`Reset ${k}`); - } - } - const key = 'global-rounded-corner-settings'; - const default_cfg = prefs - .get_default_value(key) - ?.recursiveUnpack(); - const current_cfg = getPref('global-rounded-corner-settings'); - for (const k in this._reset_corners_cfg) { - const _k = k; - if (this._reset_corners_cfg[_k]?.reset === true) { - current_cfg[_k] = default_cfg[_k]; - logDebug(`Reset ${k}`); - } - } - setPref('global-rounded-corner-settings', current_cfg); - const root = this.root; - root.pop_subpage(); - } -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/prefs.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/prefs.js deleted file mode 100644 index 9b9eefca..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/prefs.js +++ /dev/null @@ -1,33 +0,0 @@ -import GLib from 'gi://GLib'; -import Gdk from 'gi://Gdk'; -import Gtk from 'gi://Gtk'; -import { ExtensionPreferences } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; -import { pages } from './preferences/index.js'; -import { logDebug } from './utils/log.js'; -import { initPrefs, uninitPrefs } from './utils/settings.js'; -export default class RoundedWindowCornersRebornPrefs extends ExtensionPreferences { - _load_css() { - const display = Gdk.Display.get_default(); - if (display) { - const css = new Gtk.CssProvider(); - const path = GLib.build_filenamev([ - import.meta.url, - 'stylesheet-prefs.css', - ]); - css.load_from_path(path); - Gtk.StyleContext.add_provider_for_display(display, css, 0); - } - } - fillPreferencesWindow(win) { - initPrefs(this.getSettings()); - for (const page of pages()) { - win.add(page); - } - // Disconnect all signal when close prefs - win.connect('close-request', () => { - logDebug('Disconnect Signals'); - uninitPrefs(); - }); - this._load_css(); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/private_metadata.json b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/private_metadata.json deleted file mode 100644 index ccd02725..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/private_metadata.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_generated": "Generated by SweetTooth, do not edit", - "description": "Add rounded corners to all windows. Fork of the now unmaintained Rounded Window Corners extension.", - "gettext-domain": "rounded-window-corners@fxgn", - "name": "Rounded Window Corners Reborn", - "settings-schema": "org.gnome.shell.extensions.rounded-window-corners-reborn", - "shell-version": [ - "46", - "47" - ], - "url": "https://github.com/flexagoon/rounded-window-corners", - "uuid": "rounded-window-corners@fxgn", - "version": 7 -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/schemas/gschemas.compiled b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/schemas/gschemas.compiled deleted file mode 100644 index 3295d86a..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/schemas/gschemas.compiled and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/schemas/org.gnome.shell.extensions.rounded-window-corners-reborn.gschema.xml b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/schemas/org.gnome.shell.extensions.rounded-window-corners-reborn.gschema.xml deleted file mode 100644 index 0d583a91..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/schemas/org.gnome.shell.extensions.rounded-window-corners-reborn.gschema.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - 0 - - - - [] - window here will not be rounded - - The contents of the list represent the instance part of the window's - `WM_CLASS`, as same as the output of `xprop WM_CLASS|cut -d \" -f 2` - - - - - Skip Libadwaita applications - true - - - - Skip LibHandy applications - false - - - - Border width for rounded corners window - - 0 - - - - Border color for rounded corners window - (0.5, 0.5, 0.5, 1.0) - - - - Global rounded corners settings for all windows - - - { - 'padding': <{ - 'left': <uint32 1>, - 'right': <uint32 1>, - 'top': <uint32 1>, - 'bottom': <uint32 1> - }>, - 'keepRoundedCorners': <{ - 'maximized': <false>, - 'fullscreen': <false> - }>, - 'borderRadius': <uint32 12>, - 'smoothing': <0>, - 'enabled': <true> - } - - - - - A directory to setup custom paddings for special windows - {} - - - - - Shadow for focused window - - { - 'horizontalOffset': 0, - 'verticalOffset': 4, - 'blurOffset': 28, - 'spreadRadius': 4, - 'opacity': 60 - } - - - - - Shadow for unfocused window - - { - 'horizontalOffset': 0, - 'verticalOffset': 2, - 'blurOffset': 12, - 'spreadRadius': -1, - 'opacity': 65 - } - - - - - If enabled, extension will show debug info into journalctl - false - - - - false - - - - false - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/stylesheet-prefs.css b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/stylesheet-prefs.css deleted file mode 100644 index 6088dc25..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/stylesheet-prefs.css +++ /dev/null @@ -1,35 +0,0 @@ -.page { - padding: 10px 30px; -} -.code { - padding: 10px 16px; -} -.edit-win { - background: #eeeeee; - color: black; - padding: 20px 80px; -} -.flat { - background: none; - border: none; -} - -.expander_img { - transition: all 100ms; -} - -.rotated { - transform: rotate(90deg); -} - -.dialog-vbox { - padding: 48px; -} - -.dialog-vbox .heading { - padding-bottom: 24px; -} - -.dialog-vbox checkbutton { - padding-right: 12px; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/stylesheet.css b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/stylesheet.css deleted file mode 100644 index 44fceb78..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/stylesheet.css +++ /dev/null @@ -1,6 +0,0 @@ -.shadow { - box-shadow: 0px 0px 0px 0px rgba(83, 83, 83, 0.0); - transition-duration: 300ms; - transition-property: box-shadow; - transition-timing-function: linear; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/README.md b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/README.md deleted file mode 100644 index 2f41d4b3..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# `utils` - -This directory contains functions which are used in different places throughout -the codebase, so they can't be put anywhere else. - -## `background_menu.ts` - -Handles adding and removing the RWC settings item in the desktop context menu. - -## `box_shadow.ts` - -Contains a function for converting box shadow JS objects into CSS styles for -those shadows. - -## `constants.ts` - -Defines the constants used in the codebase. - -## `file.ts` - -Contains utility functions for reading file contents. - -## `log.ts` - -Provides wrapper functions for printing out debug messages. - -## `settings.ts` - -Provides wrappers around the GSettings object that add type safety and -automatically convert values between JS types and GLib Variant types that are -used for storing GSettings. - -## `types.ts` - -Provides types used throughout the codebase, mostly for storing settings. diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/background_menu.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/background_menu.js deleted file mode 100644 index 6d7442cb..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/background_menu.js +++ /dev/null @@ -1,55 +0,0 @@ -/** - * @file Handles adding and removing the RWC settings item in the desktop - * context menu. - * - * XXX: It seems like this relies on GNOME Shell methods which aren't supposed - * to be public. Perhaps this would be removed in the future. - */ -import { Extension, gettext as _, } from 'resource:///org/gnome/shell/extensions/extension.js'; -/** Enable the "rounded corner settings" item in desktop context menu. */ -export function enableBackgroundMenuItem() { - for (const background of global.windowGroup.firstChild.get_children()) { - const menu = background._backgroundMenu; - addItemToMenu(menu); - } -} -/** Disable the "rounded corner settings" item in desktop context menu. */ -export function disableBackgroundMenuItem() { - for (const background of global.windowGroup.firstChild.get_children()) { - const menu = background._backgroundMenu; - removeItemFromMenu(menu); - } -} -/** - * Add the menu item to the background menu. - * - * @param menu - BackgroundMenu to add the item to. - */ -function addItemToMenu(menu) { - const rwcMenuItemName = _('Rounded Corners Settings...'); - // Check if the item already exists - for (const item of menu._getMenuItems()) { - if (item.label?.text === rwcMenuItemName) { - return; - } - } - menu.addAction(rwcMenuItemName, () => { - const extension = Extension.lookupByURL(import.meta.url); - extension.openPreferences(); - }); -} -/** - * Remove the menu item from the background menu. - * - * @param menu - BackgroundMenu to remove the item from. - */ -function removeItemFromMenu(menu) { - const items = menu._getMenuItems(); - const rwcMenuItemName = _('Rounded Corners Settings...'); - for (const item of items) { - if (item.label?.text === rwcMenuItemName) { - item.destroy(); - break; - } - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/box_shadow.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/box_shadow.js deleted file mode 100644 index 270d0970..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/box_shadow.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * @file Contains a single function - {@link boxShadowCss}, which converts - * {@link BoxShadow} objects into CSS code for the shadow. - */ -/** - * Generate a CSS style for a box shadow from the provided {@link BoxShadow} - * object. - * - * @param shadow - The settings for the box shadow. - * @param scale - The scale of the window, 1 by default. - * @returns The box-shadow CSS string. - */ -export function boxShadowCss(shadow, scale = 1) { - return `box-shadow: ${shadow.horizontalOffset * scale}px - ${shadow.verticalOffset * scale}px - ${shadow.blurOffset * scale}px - ${shadow.spreadRadius * scale}px - rgba(0,0,0, ${shadow.opacity / 100})`; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/constants.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/constants.js deleted file mode 100644 index 97252bfb..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/constants.js +++ /dev/null @@ -1,16 +0,0 @@ -/** @file Defines the constants used in this extension. */ -/** Name of the rounded corners effect */ -export const ROUNDED_CORNERS_EFFECT = 'Rounded Corners Effect'; -/** Name of the shadow clipping effect */ -export const CLIP_SHADOW_EFFECT = 'Clip Shadow Effect'; -/** Padding of shadow actors */ -export const SHADOW_PADDING = 80; -/** - * Hardcoded shadow size for certain applications that have to be - * manually clipped - */ -export const APP_SHADOWS = { - kitty: [11, 35, 11, 11], -}; -/** Name of shadow actor to be added in overview */ -export const OVERVIEW_SHADOW_ACTOR = 'Shadow Actor (Overview)'; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/file.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/file.js deleted file mode 100644 index 19eec6de..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/file.js +++ /dev/null @@ -1,48 +0,0 @@ -/** @file Contains utility functions for reading file contents. */ -import GLib from 'gi://GLib'; -import Gio from 'gi://Gio'; -/** - * Read file contents as a string. - * - * @param path - The path to the file to be read. - * @returns Contents of the file as a UTF-8 string. - */ -export function readFile(path) { - const file = Gio.File.new_for_path(path); - const contents = file.load_contents(null)[1]; - const decoder = new TextDecoder('utf-8'); - return decoder.decode(contents); -} -/** - * Read a file relative to the current module. - * - * @param module - `import.meta.url` of the current module. - * @param path - File path relative to the current module. - * @returns Contents of the file as a UTF-8 string. - */ -export function readRelativeFile(module, path) { - const basedir = GLib.path_get_dirname(module); - const fileUri = GLib.build_filenamev([basedir, path]); - const filePath = GLib.filename_from_uri(fileUri)[0]; - return readFile(filePath ?? ''); -} -/** - * Read a shader file and split it into declarations and main code, since - * GNOME's `add_glsl_snippet` function takes those parts as two separate - * arguments. - * - * @param module - `import.meta.url` of the current module. - * @param path - File path relative to the current module. - * @returns A list containing the declarations as the first element and - * contents of the main function as the second. - */ -export function readShader(module, path) { - const shader = readRelativeFile(module, path); - // This function isn't called very often, so creating the regex at the top - // level doesn't really make sense. - // biome-ignore lint/performance/useTopLevelRegex: - let [declarations, code] = shader.split(/^.*?main\(\s?\)\s?/m); - declarations = declarations.trim(); - code = code.trim().replace(/^[{}]/gm, '').trim(); - return [declarations, code]; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/log.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/log.js deleted file mode 100644 index 4b5d77b2..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/log.js +++ /dev/null @@ -1,17 +0,0 @@ -/** @file Provides wrapper functions for printing out debug messages. */ -import { getPref } from './settings.js'; -/** - * Log a message with a [Rounded Window Corners] prefix, but only - * when debug mode is enabled. - */ -export function logDebug(...args) { - if (getPref('debug-mode')) { - console.log(`[Rounded Window Corners] ${args}`); - } -} -/** - * Log an error with a [Rounded Window Corners] prefix. - */ -export function logError(...args) { - console.error(`[Rounded Window Corners] ${args}`); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/settings.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/settings.js deleted file mode 100644 index 106398af..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/settings.js +++ /dev/null @@ -1,140 +0,0 @@ -/** - * @file Provides wrappers around the GSettings object that add type safety and - * automatically convert values between JS types and GLib Variant types that - * are used for storing GSettings. - */ -import GLib from 'gi://GLib'; -import { logDebug } from './log.js'; -/** Mapping of schema keys to their GLib Variant type string */ -const Schema = { - 'settings-version': 'u', - blacklist: 'as', - 'skip-libadwaita-app': 'b', - 'skip-libhandy-app': 'b', - 'border-width': 'i', - 'border-color': '(dddd)', - 'global-rounded-corner-settings': 'a{sv}', - 'custom-rounded-corner-settings': 'a{sv}', - 'focused-shadow': 'a{si}', - 'unfocused-shadow': 'a{si}', - 'debug-mode': 'b', - 'tweak-kitty-terminal': 'b', - 'enable-preferences-entry': 'b', -}; -/** The raw GSettings object for direct manipulation. */ -export let prefs; -/** - * Initialize the {@link prefs} object with existing GSettings. - * - * @param gSettings - GSettings to initialize the prefs with. - */ -export function initPrefs(gSettings) { - resetOutdated(gSettings); - prefs = gSettings; -} -/** Delete the {@link prefs} object for garbage collection. */ -export function uninitPrefs() { - prefs = null; -} -/** - * Get a preference from GSettings and convert it from a GLib Variant to a - * JavaScript type. - * - * @param key - The key of the preference to get. - * @returns The value of the preference. - */ -export function getPref(key) { - return prefs.get_value(key).recursiveUnpack(); -} -/** - * Pack a value into a GLib Variant type and store it in GSettings. - * - * @param key - The key of the preference to set. - * @param value - The value to set the preference to. - */ -export function setPref(key, value) { - logDebug(`Settings pref: ${key}, ${value}`); - let variant; - if (key === 'global-rounded-corner-settings') { - variant = packRoundedCornerSettings(value); - } - else if (key === 'custom-rounded-corner-settings') { - variant = packCustomRoundedCornerSettings(value); - } - else { - variant = new GLib.Variant(Schema[key], value); - } - prefs.set_value(key, variant); -} -/** A simple type-checked wrapper around {@link prefs.bind} */ -export function bindPref(key, object, property, flags) { - prefs.bind(key, object, property, flags); -} -/** - * Reset setting keys that changed their type between releases - * to avoid conflicts. - * - * @param prefs the GSettings object to clean. - */ -function resetOutdated(prefs) { - const lastVersion = 6; - const currentVersion = prefs - .get_user_value('settings-version') - ?.recursiveUnpack(); - if (!currentVersion || currentVersion < lastVersion) { - if (prefs.list_keys().includes('black-list')) { - prefs.reset('black-list'); - } - prefs.reset('global-rounded-corner-settings'); - prefs.reset('custom-rounded-corner-settings'); - prefs.reset('focused-shadow'); - prefs.reset('unfocused-shadow'); - prefs.set_uint('settings-version', lastVersion); - } -} -/** - * Pack rounded corner settings into a GLib Variant object. - * - * Since rounded corner settings are stored as a dictionary where the values - * are of different types, it can't be automatically packed into a variant. - * Instead, we need to pack each of the values into the correct variant - * type, and only then pack the entire dictionary into a variant with type - * "a{sv}" (dictionary with string keys and arbitrary variant values). - * - * @param settings - The rounded corner settings to pack. - * @returns The packed GLib Variant object. - */ -function packRoundedCornerSettings(settings) { - const padding = new GLib.Variant('a{su}', settings.padding); - const keepRoundedCorners = new GLib.Variant('a{sb}', settings.keepRoundedCorners); - const borderRadius = GLib.Variant.new_uint32(settings.borderRadius); - const smoothing = GLib.Variant.new_double(settings.smoothing); - const enabled = GLib.Variant.new_boolean(settings.enabled); - const variantObject = { - padding: padding, - keepRoundedCorners: keepRoundedCorners, - borderRadius: borderRadius, - smoothing: smoothing, - enabled: enabled, - }; - return new GLib.Variant('a{sv}', variantObject); -} -/** - * Pack custom rounded corner overrides into a GLib Variant object. - * - * Custom rounded corner settings are stored as a dictionary from window - * wm_class to {@link RoundedCornerSettings} objects. See the documentation for - * {@link packRoundedCornerSettings} for more information on why manual packing - * is needed here. - * - * @param settings - The custom rounded corner setting overrides to pack. - * @returns The packed GLib Variant object. - */ -function packCustomRoundedCornerSettings(settings) { - const packedSettings = {}; - for (const [wmClass, windowSettings] of Object.entries(settings)) { - packedSettings[wmClass] = packRoundedCornerSettings(windowSettings); - } - const variant = new GLib.Variant('a{sv}', packedSettings); - return variant; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/types.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/types.js deleted file mode 100644 index 1deb9655..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/utils/types.js +++ /dev/null @@ -1,2 +0,0 @@ -/** @file Provides types used throughout the codebase, mostly for storing settings. */ -export {}; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/window_picker/README.md b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/window_picker/README.md deleted file mode 100644 index 769f2c2a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/window_picker/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# `window_picker` - -The extensions preferences window runs in a separate isolated process which has -no access to GNOME Shell methods. However, the window picking functionality is -based on GNOME Shell's Looking Glass. - -To allow the preferences window to communicate with the main process, the code -in this directory creates a DBus service, which has a method to open the window -picker and a signal to transmit the class of the selected window. - -## `iface.xml` - -Defines the DBus interface for the window picker. - -## `service.ts` - -Contains the implementation of the DBus interface. - -## `client.ts` - -Provides wrapper JavaScript functions around the DBus method calls. diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/window_picker/client.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/window_picker/client.js deleted file mode 100644 index 93cbc951..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/window_picker/client.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @file This file provides wrapper functions around the DBus window picker - * interface. - */ -import Gio from 'gi://Gio'; -const connection = Gio.DBus.session; -const busName = 'org.gnome.Shell'; -const interfaceName = 'org.gnome.Shell.Extensions.RoundedWindowCorners'; -const objectPath = '/org/gnome/shell/extensions/RoundedWindowCorners'; -/** Open the window picker and select a window. */ -export function pick() { - connection.call(busName, objectPath, interfaceName, 'pick', null, null, Gio.DBusCallFlags.NO_AUTO_START, -1, null, null); -} -/** - * Connect a callback to the `picked` signal, which is emitted when a window - * is picked. - * - * @param callback - The function to execute when the window is picked. - */ -export function onPicked(callback) { - const id = connection.signal_subscribe(busName, interfaceName, 'picked', objectPath, null, Gio.DBusSignalFlags.NONE, (_conn, _sender, _objectPath, _iface, _signal, params) => { - const val = params.get_child_value(0); - callback(val.get_string()[0]); - connection.signal_unsubscribe(id); - }); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/window_picker/iface.xml b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/window_picker/iface.xml deleted file mode 100644 index 6cb7756a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/window_picker/iface.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/window_picker/service.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/window_picker/service.js deleted file mode 100644 index 05441102..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/rounded-window-corners@fxgn/window_picker/service.js +++ /dev/null @@ -1,70 +0,0 @@ -/** - * @file This file contains the implementation of the DBus interface for the - * window picker. See the {@link WindowPicker} class for more information. - */ -import GLib from 'gi://GLib'; -import Gio from 'gi://Gio'; -import Meta from 'gi://Meta'; -import { Inspector } from 'resource:///org/gnome/shell/ui/lookingGlass.js'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import { readRelativeFile } from '../utils/file.js'; -import { logDebug } from '../utils/log.js'; -/** - * This class provides the implementation of the DBus interface for the window - * picker. It implements a single method - `pick` - which opens the window picker - * and allows the user to select a window. - */ -export class WindowPicker { - #iface = readRelativeFile(import.meta.url, 'iface.xml'); - #dbus = Gio.DBusExportedObject.wrapJSObject(this.#iface, this); - /** Emit the wm_class of the picked window to the `picked` signal. */ - #sendPickedWindow(wmClass) { - this.#dbus.emit_signal('picked', new GLib.Variant('(s)', [wmClass])); - } - /** - * Open the window picker and select a window. - * - * This uses the window picker from GNOME's Looking Glass. This is the - * easiest way to pick a window, and this is also what's used by other - * extensions such as Blur my Shell. - */ - pick() { - const lookingGlass = Main.createLookingGlass(); - const inspector = new Inspector(lookingGlass); - inspector.connect('target', (me, target, x, y) => { - logDebug(`${me}: pick ${target} in ${x}, ${y}`); - // Remove the red border effect when the window is picked. - const effectName = 'lookingGlass_RedBorderEffect'; - for (const effect of target.get_effects()) { - if (effect.toString().includes(effectName)) { - target.remove_effect(effect); - } - } - let actor = target; - // If the picked actor is not a Meta.WindowActor, which happens - // often since it's usually a Meta.SurfaceActor, try to find its - // parent which is a Meta.WindowActor. - for (let i = 0; i < 2; i++) { - if (actor == null || actor instanceof Meta.WindowActor) { - break; - } - actor = actor.get_parent(); - } - if (!(actor instanceof Meta.WindowActor)) { - this.#sendPickedWindow('window-not-found'); - return; - } - this.#sendPickedWindow(actor.metaWindow.get_wm_class_instance() ?? 'window-not-found'); - }); - inspector.connect('closed', () => { - lookingGlass.close(); - }); - } - export() { - this.#dbus.export(Gio.DBus.session, '/org/gnome/shell/extensions/RoundedWindowCorners'); - logDebug('DBus Service exported'); - } - unexport() { - this.#dbus.unexport(); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/README.md b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/README.md deleted file mode 100644 index 120beea6..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# Space Bar - -GNOME Shell extension that replaces the top-panel workspace indicator with an i3-like workspaces bar. - -On GNOME Extensions: https://extensions.gnome.org/extension/5090/space-bar/ - -Originally a fork of the extension [Workspaces -Bar](https://extensions.gnome.org/extension/3851/workspaces-bar/) by -[fthx](https://extensions.gnome.org/accounts/profile/fthx), this extension grew into a more -comprehensive set of features to support a workspace-based workflow. - -## Features - -- First class support for static and dynamic workspaces as well as multi-monitor setups -- Add, remove, and rename workspaces -- Rearrange workspaces via drag and drop -- Automatically assign workspace names based on started applications -- Keyboard shortcuts extend and refine system shortcuts -- Scroll through workspaces by mouse wheel over the panel -- Customize the appearance - -## Build - -The source code of this extension is written in TypeScript. The following command will build the -extension and package it to a zip file. - -```sh -./scripts/build.sh -``` - -## Install - -The following command will build the extension and install it locally. - -```sh -./scripts/build.sh -i -``` - -## Generate types - -For development with TypeScript, you can get type support in IDEs like VSCode by building and -installing type information for used libraries. Generating types is optional and not required for -building the extension. (For that, we use a different configuration that stubs type information with -dummy types.) - -To generate types, run - -```sh -npm install -npm run build:types -``` - -Choose "All" and "Yes" for everything. - -## Debug - -Run a GNOME shell instance in a window: - -```sh -dbus-run-session -- gnome-shell --nested --wayland -``` - -View logs: - -```sh -journalctl -f -o cat /usr/bin/gnome-shell -``` - -View logs of settings: - -```sh -journalctl -f -o cat /usr/bin/gjs -``` - -Configuration: - -```sh -GSETTINGS_SCHEMA_DIR=::$HOME/.local/share/gnome-shell/extensions/space-bar@luchrioh/schemas dconf-editor /org/gnome/shell/extensions/space-bar/ &>/dev/null -``` diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/extension.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/extension.js deleted file mode 100644 index ff76cd69..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/extension.js +++ /dev/null @@ -1,39 +0,0 @@ -import { KeyBindings } from './services/KeyBindings.js'; -import { ScrollHandler } from './services/ScrollHandler.js'; -import { Settings } from './services/Settings.js'; -import { Styles } from './services/Styles.js'; -import { TopBarAdjustments } from './services/TopBarAdjustments.js'; -import { Workspaces } from './services/Workspaces.js'; -import { WorkspacesBar } from './ui/WorkspacesBar.js'; -import { destroyAllHooks } from './utils/hook.js'; -import { Extension } from 'resource:///org/gnome/shell/extensions/extension.js'; -export default class SpaceBarExtension extends Extension { - constructor() { - super(...arguments); - this.workspacesBar = null; - this.scrollHandler = null; - } - enable() { - Settings.init(this); - TopBarAdjustments.init(); - Workspaces.init(); - KeyBindings.init(); - Styles.init(); - this.workspacesBar = new WorkspacesBar(this); - this.workspacesBar.init(); - this.scrollHandler = new ScrollHandler(); - this.scrollHandler.init(this.workspacesBar.observeWidget()); - } - disable() { - destroyAllHooks(); - Settings.destroy(); - TopBarAdjustments.destroy(); - Workspaces.destroy(); - KeyBindings.destroy(); - Styles.destroy(); - this.scrollHandler?.destroy(); - this.scrollHandler = null; - this.workspacesBar?.destroy(); - this.workspacesBar = null; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/preferences/AppearancePage.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/preferences/AppearancePage.js deleted file mode 100644 index 41c83a13..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/preferences/AppearancePage.js +++ /dev/null @@ -1,342 +0,0 @@ -import Adw from 'gi://Adw'; -import { addColorButton, addCombo, addSpinButton } from './common.js'; -import { addCustomCssDialogButton } from './custom-styles.js'; -export const fontWeightOptions = { - '100': 'Thin', - '200': 'Extra Light', - '300': 'Light', - '400': 'Normal', - '500': 'Medium', - '600': 'Semi Bold', - '700': 'Bold', - '800': 'Extra Bold', - '900': 'Black', -}; -export class AppearancePage { - constructor(_extensionPreferences) { - this._extensionPreferences = _extensionPreferences; - this.page = new Adw.PreferencesPage(); - this._settings = _extensionPreferences.getSettings(`org.gnome.shell.extensions.space-bar.appearance`); - } - init() { - this.page.set_title('_Appearance'); - this.page.useUnderline = true; - this.page.set_icon_name('applications-graphics-symbolic'); - this._connectEnabledConditions(); - this._initGeneralGroup(); - this._initActiveWorkspaceGroup(); - this._initInactiveWorkspaceGroup(); - this._initEmptyWorkspaceGroup(); - this._initCustomStylesGroup(); - } - _connectEnabledConditions() { - const behaviorSettings = this._extensionPreferences.getSettings(`org.gnome.shell.extensions.space-bar.behavior`); - const disabledNoticeGroup = new Adw.PreferencesGroup({ - description: 'Appearance preferences currently support the indicator style "Workspaces bar" only.', - }); - this.page.add(disabledNoticeGroup); - const updateEnabled = () => { - const indicatorStyle = behaviorSettings.get_string(`indicator-style`); - if (indicatorStyle === 'workspaces-bar') { - this.page.set_sensitive(true); - disabledNoticeGroup.set_visible(false); - } - else { - this.page.set_sensitive(false); - disabledNoticeGroup.set_visible(true); - } - }; - updateEnabled(); - const changed = behaviorSettings.connect(`changed::indicator-style`, updateEnabled); - this.page.connect('unmap', () => behaviorSettings.disconnect(changed)); - } - _initGeneralGroup() { - const group = new Adw.PreferencesGroup(); - group.set_title('General'); - addSpinButton({ - settings: this._settings, - group, - key: 'workspaces-bar-padding', - title: 'Workspaces-bar padding', - lower: 0, - upper: 255, - }).addResetButton({ window: this.window }); - addSpinButton({ - settings: this._settings, - group, - key: 'workspace-margin', - title: 'Workspace margin', - lower: 0, - upper: 255, - }).addResetButton({ window: this.window }); - this.page.add(group); - } - _initActiveWorkspaceGroup() { - const group = new Adw.PreferencesGroup(); - group.set_title('Active Workspace'); - addColorButton({ - window: this.window, - settings: this._settings, - group, - key: 'active-workspace-background-color', - title: 'Background color', - }).addResetButton({ window: this.window }); - addColorButton({ - window: this.window, - settings: this._settings, - group, - key: 'active-workspace-text-color', - title: 'Text color', - }).addResetButton({ window: this.window }); - addColorButton({ - window: this.window, - settings: this._settings, - group, - key: 'active-workspace-border-color', - title: 'Border color', - }).addResetButton({ window: this.window }); - addSpinButton({ - settings: this._settings, - group, - key: 'active-workspace-font-size', - title: 'Font size', - lower: 0, - upper: 255, - }).addToggleButton({ window: this.window }); - addCombo({ - window: this.window, - settings: this._settings, - group, - key: 'active-workspace-font-weight', - title: 'Font weight', - options: fontWeightOptions, - }).addResetButton({ window: this.window }); - addSpinButton({ - settings: this._settings, - group, - key: 'active-workspace-border-radius', - title: 'Border radius', - lower: 0, - upper: 255, - }).addResetButton({ window: this.window }); - addSpinButton({ - settings: this._settings, - group, - key: 'active-workspace-border-width', - title: 'Border width', - lower: 0, - upper: 255, - }).addResetButton({ window: this.window }); - addSpinButton({ - settings: this._settings, - group, - key: 'active-workspace-padding-h', - title: 'Horizontal padding', - lower: 0, - upper: 255, - }).addResetButton({ window: this.window }); - addSpinButton({ - settings: this._settings, - group, - key: 'active-workspace-padding-v', - title: 'Vertical padding', - lower: 0, - upper: 255, - }).addResetButton({ window: this.window }); - this.page.add(group); - } - _initInactiveWorkspaceGroup() { - const group = new Adw.PreferencesGroup(); - group.set_title('Inactive Workspace'); - addColorButton({ - window: this.window, - settings: this._settings, - group, - key: 'inactive-workspace-background-color', - title: 'Background color', - }).addResetButton({ window: this.window }); - addColorButton({ - window: this.window, - settings: this._settings, - group, - key: 'inactive-workspace-text-color', - title: 'Text color', - }).addResetButton({ window: this.window }); - addColorButton({ - window: this.window, - settings: this._settings, - group, - key: 'inactive-workspace-border-color', - title: 'Border color', - }).addResetButton({ window: this.window }); - addSpinButton({ - settings: this._settings, - group, - key: 'inactive-workspace-font-size', - title: 'Font size', - lower: 0, - upper: 255, - }).linkValue({ - window: this.window, - linkedKey: 'active-workspace-font-size', - }); - addCombo({ - window: this.window, - settings: this._settings, - group, - key: 'inactive-workspace-font-weight', - title: 'Font weight', - options: fontWeightOptions, - }).linkValue({ - window: this.window, - linkedKey: 'active-workspace-font-weight', - }); - addSpinButton({ - settings: this._settings, - group, - key: 'inactive-workspace-border-radius', - title: 'Border radius', - lower: 0, - upper: 255, - }).linkValue({ - window: this.window, - linkedKey: 'active-workspace-border-radius', - }); - addSpinButton({ - settings: this._settings, - group, - key: 'inactive-workspace-border-width', - title: 'Border width', - lower: 0, - upper: 255, - }).linkValue({ - window: this.window, - linkedKey: 'active-workspace-border-width', - }); - addSpinButton({ - settings: this._settings, - group, - key: 'inactive-workspace-padding-h', - title: 'Horizontal padding', - lower: 0, - upper: 255, - }).linkValue({ - window: this.window, - linkedKey: 'active-workspace-padding-h', - }); - addSpinButton({ - settings: this._settings, - group, - key: 'inactive-workspace-padding-v', - title: 'Vertical padding', - lower: 0, - upper: 255, - }).linkValue({ - window: this.window, - linkedKey: 'active-workspace-padding-v', - }); - this.page.add(group); - } - _initEmptyWorkspaceGroup() { - const group = new Adw.PreferencesGroup(); - group.set_title('Empty Workspace'); - addColorButton({ - window: this.window, - settings: this._settings, - group, - key: 'empty-workspace-background-color', - title: 'Background color', - }).addResetButton({ window: this.window }); - addColorButton({ - window: this.window, - settings: this._settings, - group, - key: 'empty-workspace-text-color', - title: 'Text color', - }).addResetButton({ window: this.window }); - addColorButton({ - window: this.window, - settings: this._settings, - group, - key: 'empty-workspace-border-color', - title: 'Border color', - }).addResetButton({ window: this.window }); - addSpinButton({ - settings: this._settings, - group, - key: 'empty-workspace-font-size', - title: 'Font size', - lower: 0, - upper: 255, - }).linkValue({ - window: this.window, - linkedKey: 'inactive-workspace-font-size', - }); - addCombo({ - window: this.window, - settings: this._settings, - group, - key: 'empty-workspace-font-weight', - title: 'Font weight', - options: fontWeightOptions, - }).linkValue({ - window: this.window, - linkedKey: 'inactive-workspace-font-weight', - }); - addSpinButton({ - settings: this._settings, - group, - key: 'empty-workspace-border-radius', - title: 'Border radius', - lower: 0, - upper: 255, - }).linkValue({ - window: this.window, - linkedKey: 'inactive-workspace-border-radius', - }); - addSpinButton({ - settings: this._settings, - group, - key: 'empty-workspace-border-width', - title: 'Border width', - lower: 0, - upper: 255, - }).linkValue({ - window: this.window, - linkedKey: 'inactive-workspace-border-width', - }); - addSpinButton({ - settings: this._settings, - group, - key: 'empty-workspace-padding-h', - title: 'Horizontal padding', - lower: 0, - upper: 255, - }).linkValue({ - window: this.window, - linkedKey: 'inactive-workspace-padding-h', - }); - addSpinButton({ - settings: this._settings, - group, - key: 'empty-workspace-padding-v', - title: 'Vertical padding', - lower: 0, - upper: 255, - }).linkValue({ - window: this.window, - linkedKey: 'inactive-workspace-padding-v', - }); - this.page.add(group); - } - _initCustomStylesGroup() { - const group = new Adw.PreferencesGroup(); - group.set_title('Custom Styles'); - addCustomCssDialogButton({ - window: this.window, - group, - settings: this._settings, - }); - this.page.add(group); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/preferences/BehaviorPage.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/preferences/BehaviorPage.js deleted file mode 100644 index 85ce9976..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/preferences/BehaviorPage.js +++ /dev/null @@ -1,248 +0,0 @@ -import Adw from 'gi://Adw'; -import { addCombo, addLinkButton, addSpinButton, addTextEntry, addToggle } from './common.js'; -export const indicatorStyleOptions = { - 'current-workspace': 'Current workspace', - 'workspaces-bar': 'Workspaces bar', -}; -export const scrollWheelOptions = { - panel: 'Over top panel', - 'workspaces-bar': 'Over indicator', - disabled: 'Disabled', -}; -export const scrollWheelDirectionOptions = { - normal: 'Normal', - inverted: 'Inverted', - disabled: 'Disabled', -}; -export const positionOptions = { - left: 'Left', - center: 'Center', - right: 'Right', -}; -export class BehaviorPage { - constructor(extensionPreferences) { - this.page = new Adw.PreferencesPage(); - this._settings = extensionPreferences.getSettings(`org.gnome.shell.extensions.space-bar.behavior`); - } - init() { - this.page.set_title('_Behavior'); - this.page.useUnderline = true; - this.page.set_icon_name('preferences-system-symbolic'); - this._initGeneralGroup(); - this._initSmartWorkspaceNamesGroup(); - } - _initGeneralGroup() { - const group = new Adw.PreferencesGroup(); - group.set_title('General'); - addCombo({ - window: this.window, - settings: this._settings, - group, - key: 'indicator-style', - title: 'Indicator style', - options: indicatorStyleOptions, - }).addSubDialog({ - window: this.window, - title: 'Indicator style', - populatePage: (page) => { - const group = new Adw.PreferencesGroup(); - group.set_title('Custom label text'); - group.set_description('Custom labels to use for workspace names in the top panel. The following placeholders will be replaced with their respective value:\n\n' + - '{{name}}: The current workspace name\n' + - '{{number}}: The current workspace number\n' + - '{{total}}: The number of total workspaces\n' + - '{{Total}}: The number of total workspaces, also counting the spare dynamic workspace'); - page.add(group); - addToggle({ - settings: this._settings, - group, - key: 'enable-custom-label', - title: 'Use custom label text', - }); - addToggle({ - settings: this._settings, - group, - key: 'enable-custom-label-in-menu', - title: 'Also use custom label text in menu', - }).enableIf({ - key: 'enable-custom-label', - predicate: (value) => value.get_boolean(), - page, - }); - addTextEntry({ - settings: this._settings, - group, - key: 'custom-label-named', - title: 'Custom label for named workspaces', - window: this.window, - }).enableIf({ - key: 'enable-custom-label', - predicate: (value) => value.get_boolean(), - page, - }); - addTextEntry({ - settings: this._settings, - group, - key: 'custom-label-unnamed', - title: 'Custom label for unnamed workspaces', - window: this.window, - }).enableIf({ - key: 'enable-custom-label', - predicate: (value) => value.get_boolean(), - page, - }); - }, - }); - addCombo({ - window: this.window, - settings: this._settings, - group, - key: 'position', - title: 'Position in top panel', - options: positionOptions, - }).addSubDialog({ - window: this.window, - title: 'Position in Top Panel', - populatePage: (page) => { - const positionSubDialogGroup = new Adw.PreferencesGroup(); - page.add(positionSubDialogGroup); - addToggle({ - settings: this._settings, - group: positionSubDialogGroup, - key: 'system-workspace-indicator', - title: 'Keep system workspace indicator', - }); - addSpinButton({ - settings: this._settings, - group: positionSubDialogGroup, - key: 'position-index', - title: 'Position index', - subtitle: 'Order relative to other elements', - lower: 0, - upper: 100, - }); - }, - }); - addCombo({ - window: this.window, - settings: this._settings, - group, - key: 'scroll-wheel', - title: 'Switch workspaces with scroll wheel', - options: scrollWheelOptions, - }).addSubDialog({ - window: this.window, - title: 'Switch Workspaces With Scroll Wheel', - enableIf: { - key: 'scroll-wheel', - predicate: (value) => value.get_string()[0] !== 'disabled', - page: this.page, - }, - populatePage: (page) => { - const group = new Adw.PreferencesGroup(); - page.add(group); - addToggle({ - settings: this._settings, - group, - key: 'scroll-wheel-debounce', - title: 'Debounce scroll events', - }); - addSpinButton({ - settings: this._settings, - group, - key: 'scroll-wheel-debounce-time', - title: 'Debounce time (ms)', - lower: 0, - upper: 2000, - step: 50, - }).enableIf({ - key: 'scroll-wheel-debounce', - predicate: (value) => value.get_boolean(), - page, - }); - addCombo({ - window: this.window, - settings: this._settings, - group, - key: 'scroll-wheel-vertical', - title: 'Vertical scrolling', - options: scrollWheelDirectionOptions, - }); - addCombo({ - window: this.window, - settings: this._settings, - group, - key: 'scroll-wheel-horizontal', - title: 'Horizontal scrolling', - options: scrollWheelDirectionOptions, - }); - addToggle({ - settings: this._settings, - group, - key: 'scroll-wheel-wrap-around', - title: 'Wrap around', - }); - }, - }); - addToggle({ - settings: this._settings, - group, - key: 'always-show-numbers', - title: 'Always show workspace numbers', - }); - addToggle({ - settings: this._settings, - group, - key: 'show-empty-workspaces', - title: 'Show empty workspaces', - subtitle: 'Also affects switching with scroll wheel', - }); - addToggle({ - settings: this._settings, - group, - key: 'toggle-overview', - title: 'Toggle overview', - subtitle: 'When clicking on the active or an empty workspace', - }); - this.page.add(group); - } - _initSmartWorkspaceNamesGroup() { - const group = new Adw.PreferencesGroup(); - group.set_title('Smart Workspace Names'); - group.set_description('Remembers open applications when renaming a workspace and automatically assigns workspace names based on the first application started on a new workspace.'); - addToggle({ - settings: this._settings, - group, - key: 'smart-workspace-names', - title: 'Enable smart workspace names', - }).addSubDialog({ - window: this.window, - title: 'Smart Workspace Names', - enableIf: { - key: 'smart-workspace-names', - predicate: (value) => value.get_boolean(), - page: this.page, - }, - iconName: 'applications-science-symbolic', - populatePage: (page) => { - const group = new Adw.PreferencesGroup(); - page.add(group); - group.set_title('Re-evaluate names'); - group.set_description('Removes workspace names when windows by which the name was assigned move away or close.\n\n' + - 'Please leave feedback how you like the feature using the button below.'); - addToggle({ - settings: this._settings, - group, - key: 'reevaluate-smart-workspace-names', - title: 'Re-evaluate smart workspace names', - }); - addLinkButton({ - title: 'Leave feedback', - uri: 'https://github.com/christopher-l/space-bar/issues/37', - group, - }); - }, - }); - this.page.add(group); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/preferences/DropDownChoice.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/preferences/DropDownChoice.js deleted file mode 100644 index 0fe3fd05..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/preferences/DropDownChoice.js +++ /dev/null @@ -1,12 +0,0 @@ -// Adapted from -// https://gitlab.com/rmnvgr/nightthemeswitcher-gnome-shell-extension/-/blob/main/src/preferences/DropDownChoice.js -// FIXME: There is probably some standard object we could use for this. -import GObject from 'gi://GObject'; -export const DropDownChoice = GObject.registerClass({ - GTypeName: 'SpaceBarDropDownChoice', - Properties: { - id: GObject.ParamSpec.string('id', 'ID', 'Identifier', GObject.ParamFlags.READWRITE, null), - title: GObject.ParamSpec.string('title', 'Title', 'Displayed title', GObject.ParamFlags.READWRITE, null), - }, -}, class DropDownChoice extends GObject.Object { -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/preferences/ShortcutsPage.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/preferences/ShortcutsPage.js deleted file mode 100644 index 0c9158aa..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/preferences/ShortcutsPage.js +++ /dev/null @@ -1,70 +0,0 @@ -import Adw from 'gi://Adw'; -import { addKeyboardShortcut, addToggle } from './common.js'; -export class ShortcutsPage { - constructor(extensionPreferences) { - this.page = new Adw.PreferencesPage(); - this._settings = extensionPreferences.getSettings(`org.gnome.shell.extensions.space-bar.shortcuts`); - } - init() { - this.page.set_title('_Shortcuts'); - this.page.useUnderline = true; - this.page.set_icon_name('preferences-desktop-keyboard-shortcuts-symbolic'); - this._initGroup(); - } - _initGroup() { - const group = new Adw.PreferencesGroup(); - group.set_description('Shortcuts might not work if they are already bound elsewhere.'); - this.page.add(group); - addToggle({ - settings: this._settings, - group, - key: 'enable-activate-workspace-shortcuts', - title: 'Switch to workspace', - shortcutLabel: '1...0', - }); - addToggle({ - settings: this._settings, - group, - key: 'enable-move-to-workspace-shortcuts', - title: 'Move to workspace', - shortcutLabel: '1...0', - subtitle: 'With the current window', - }); - addKeyboardShortcut({ - settings: this._settings, - window: this.window, - group, - key: 'move-workspace-left', - title: 'Move current workspace left', - }); - addKeyboardShortcut({ - settings: this._settings, - window: this.window, - group, - key: 'move-workspace-right', - title: 'Move current workspace right', - }); - addKeyboardShortcut({ - settings: this._settings, - window: this.window, - group, - key: 'activate-previous-key', - title: 'Switch to previous workspace', - }); - addKeyboardShortcut({ - settings: this._settings, - window: this.window, - group, - key: 'activate-empty-key', - title: 'Switch to empty workspace', - subtitle: 'Adds new workspace if needed', - }); - addKeyboardShortcut({ - settings: this._settings, - window: this.window, - group, - key: 'open-menu', - title: 'Open menu', - }); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/preferences/common.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/preferences/common.js deleted file mode 100644 index 0036adbc..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/preferences/common.js +++ /dev/null @@ -1,405 +0,0 @@ -import Adw from 'gi://Adw'; -import Gdk from 'gi://Gdk'; -import Gio from 'gi://Gio'; -import Gtk from 'gi://Gtk'; -import { DropDownChoice } from './DropDownChoice.js'; -class PreferencesRow { - constructor(_settings, _row, _key, _setEnabledInner) { - this._settings = _settings; - this._row = _row; - this._key = _key; - this._setEnabledInner = _setEnabledInner; - } - enableIf({ key, predicate, page }) { - const updateEnabled = () => { - const value = this._settings.get_value(key); - this._row.set_sensitive(predicate(value)); - }; - updateEnabled(); - const changed = this._settings.connect(`changed::${key}`, updateEnabled); - page.connect('unmap', () => this._settings.disconnect(changed)); - } - addResetButton({ window }) { - const button = new Gtk.Button({ - iconName: 'edit-clear-symbolic', - valign: Gtk.Align.CENTER, - hasFrame: false, - marginStart: 10, - }); - button.connect('clicked', () => this._settings.reset(this._key)); - const updateButton = () => { - const buttonEnabled = this._settings.get_user_value(this._key) !== null; - button.set_sensitive(buttonEnabled); - }; - updateButton(); - const changed = this._settings.connect(`changed::${this._key}`, updateButton); - window.connect('unmap', () => this._settings.disconnect(changed)); - this._row.add_suffix(button); - } - /** - * Adds a toggle button to the row that enables / disables the setting. - * - * When disabled, the setting is reset to its default value. - * - * When enabled, the setting is set to the value of -user. The value -user is updated - * to the current value as long as the setting is enabled. - */ - addToggleButton({ window }) { - const activeKey = this._key + '-active'; - const userKey = this._key + '-user'; - const toggleEdit = (active) => { - this._settings.set_boolean(activeKey, active); - updateRow(); - updateValue(); - }; - const updateRow = () => { - const active = this._settings.get_boolean(activeKey); - this._setEnabled(active); - }; - const updateValue = () => { - const active = this._settings.get_boolean(activeKey); - if (active) { - const userValue = this._settings.get_value(userKey); - this._settings.set_value(this._key, userValue); - } - else { - this._settings.reset(this._key); - } - }; - const updateUserValue = () => { - const active = this._settings.get_boolean(activeKey); - if (active) { - const value = this._settings.get_value(this._key); - this._settings.set_value(userKey, value); - } - }; - const changed = this._settings.connect(`changed::${this._key}`, updateUserValue); - window.connect('unmap', () => this._settings.disconnect(changed)); - updateRow(); - const button = new Gtk.ToggleButton({ - iconName: 'document-edit-symbolic', - valign: Gtk.Align.CENTER, - hasFrame: false, - marginStart: 10, - }); - button.connect('toggled', (toggle) => toggleEdit(toggle.active)); - this._row.add_suffix(button); - } - linkValue({ linkedKey, activeKey = this._key + '-active', window, }) { - const toggleEdit = (active) => { - this._settings.set_boolean(activeKey, active); - updateRow(); - updateLinkedValue(); - }; - const updateRow = () => { - const active = this._settings.get_boolean(activeKey); - this._setEnabled(active); - }; - const updateLinkedValue = () => { - const active = this._settings.get_boolean(activeKey); - if (!active) { - const linkedValue = this._settings.get_user_value(linkedKey); - if (linkedValue) { - this._settings.set_value(this._key, linkedValue); - } - else { - this._settings.reset(this._key); - } - } - }; - const changed = this._settings.connect(`changed::${linkedKey}`, updateLinkedValue); - window.connect('unmap', () => this._settings.disconnect(changed)); - updateRow(); - const button = new Gtk.ToggleButton({ - iconName: 'document-edit-symbolic', - valign: Gtk.Align.CENTER, - hasFrame: false, - marginStart: 10, - }); - button.connect('toggled', (toggle) => toggleEdit(toggle.active)); - this._row.add_suffix(button); - } - addSubDialog({ window, title, populatePage, enableIf, iconName = 'applications-system-symbolic', }) { - function showDialog() { - const dialog = new Gtk.Dialog({ - title, - modal: true, - useHeaderBar: 1, - transientFor: window, - widthRequest: 350, - defaultWidth: 500, - }); - const page = new Adw.PreferencesPage(); - populatePage(page); - dialog.set_child(page); - dialog.show(); - } - const button = new Gtk.Button({ - iconName, - valign: Gtk.Align.CENTER, - hasFrame: false, - }); - button.connect('clicked', () => showDialog()); - this._row.add_suffix(new Gtk.Separator({ - marginStart: 12, - marginEnd: 4, - marginTop: 12, - marginBottom: 12, - })); - this._row.add_suffix(button); - if (enableIf) { - const updateEnabled = () => { - const value = this._settings.get_value(enableIf.key); - button.set_sensitive(enableIf.predicate(value)); - }; - updateEnabled(); - const changed = this._settings.connect(`changed::${enableIf.key}`, updateEnabled); - enableIf.page.connect('unmap', () => this._settings.disconnect(changed)); - } - } - _setEnabled(value) { - this._setEnabledInner?.(value); - } -} -export function addToggle({ group, key, title, subtitle = null, settings, shortcutLabel, }) { - const row = new Adw.ActionRow({ title, subtitle }); - group.add(row); - if (shortcutLabel) { - const gtkShortcutLabel = new Gtk.ShortcutLabel({ - accelerator: shortcutLabel, - valign: Gtk.Align.CENTER, - }); - row.add_prefix(gtkShortcutLabel); - } - const toggle = new Gtk.Switch({ - active: settings.get_boolean(key), - valign: Gtk.Align.CENTER, - }); - settings.bind(key, toggle, 'active', Gio.SettingsBindFlags.DEFAULT); - row.add_suffix(toggle); - row.activatableWidget = toggle; - return new PreferencesRow(settings, row, key, (enabled) => toggle.set_sensitive(enabled)); -} -export function addLinkButton({ group, title, subtitle = null, uri, }) { - const row = new Adw.ActionRow({ title, subtitle }); - group.add(row); - const icon = new Gtk.Image({ iconName: 'adw-external-link-symbolic' }); - row.set_activatable(true); - row.connect('activated', () => Gtk.show_uri(null, uri, Gdk.CURRENT_TIME)); - row.add_suffix(icon); -} -export function addTextEntry({ group, key, title, subtitle = null, settings, window, shortcutLabel, }) { - const row = new Adw.ActionRow({ title, subtitle }); - group.add(row); - if (shortcutLabel) { - const gtkShortcutLabel = new Gtk.ShortcutLabel({ - accelerator: shortcutLabel, - valign: Gtk.Align.CENTER, - }); - row.add_prefix(gtkShortcutLabel); - } - const entry = new Gtk.Entry({ - text: settings.get_string(key), - valign: Gtk.Align.CENTER, - }); - const focusController = new Gtk.EventControllerFocus(); - focusController.connect('leave', () => { - settings.set_string(key, entry.get_buffer().text); - }); - entry.add_controller(focusController); - const changed = settings.connect(`changed::${key}`, () => { - entry.set_text(settings.get_string(key)); - }); - window.connect('unmap', () => settings.disconnect(changed)); - row.add_suffix(entry); - row.activatableWidget = entry; - return new PreferencesRow(settings, row, key, (enabled) => entry.set_sensitive(enabled)); -} -export function addCombo({ group, key, title, subtitle = null, options, settings, window, }) { - const model = Gio.ListStore.new(DropDownChoice); - for (const id in options) { - model.append(new DropDownChoice({ id, title: options[id] })); - } - const row = new Adw.ComboRow({ - title, - subtitle, - model, - expression: Gtk.PropertyExpression.new(DropDownChoice, null, 'title'), - }); - group.add(row); - row.connect('notify::selected-item', () => { - // This may trigger without user interaction, so we only update the value when it differs - // from the the default value or a user value has been set before. - const value = row.selectedItem.id; - if (settings.get_user_value(key) !== null || settings.get_string(key) !== value) { - settings.set_string(key, value); - } - }); - function updateComboRowState() { - row.selected = - findItemPositionInModel(model, (item) => item.id === settings.get_string(key)) ?? Gtk.INVALID_LIST_POSITION; - } - const changed = settings.connect(`changed::${key}`, () => updateComboRowState()); - window.connect('unmap', () => settings.disconnect(changed)); - updateComboRowState(); - const suffixes = row.get_first_child()?.get_last_child(); - const comboBoxElements = [suffixes?.get_first_child(), suffixes?.get_last_child()]; - return new PreferencesRow(settings, row, key, (enabled) => { - row.set_activatable(enabled); - const opacity = enabled ? 1 : 0.5; - comboBoxElements.forEach((el) => el?.set_opacity(opacity)); - }); -} -export function addSpinButton({ group, key, title, subtitle = null, settings, lower, upper, step = 1, }) { - const row = new Adw.ActionRow({ title, subtitle }); - group.add(row); - const spinner = new Gtk.SpinButton({ - adjustment: new Gtk.Adjustment({ - stepIncrement: step ?? 1, - lower, - upper, - }), - value: settings.get_int(key), - valign: Gtk.Align.CENTER, - halign: Gtk.Align.CENTER, - }); - settings.bind(key, spinner, 'value', Gio.SettingsBindFlags.DEFAULT); - row.add_suffix(spinner); - row.activatableWidget = spinner; - return new PreferencesRow(settings, row, key, (enabled) => { - spinner.set_sensitive(enabled); - }); -} -export function addColorButton({ group, key, title, subtitle = null, settings, window, }) { - const row = new Adw.ActionRow({ title, subtitle }); - group.add(row); - const colorButton = new Gtk.ColorButton({ - valign: Gtk.Align.CENTER, - useAlpha: true, - }); - const updateColorButton = () => { - const color = new Gdk.RGBA(); - color.parse(settings.get_string(key)); - colorButton.set_rgba(color); - }; - updateColorButton(); - colorButton.connect('color-set', () => { - const color = colorButton.rgba.to_string(); - settings.set_string(key, color); - }); - const changed = settings.connect(`changed::${key}`, updateColorButton); - window.connect('unmap', () => settings.disconnect(changed)); - row.add_suffix(colorButton); - row.activatableWidget = colorButton; - return new PreferencesRow(settings, row, key, (enabled) => colorButton.set_sensitive(enabled)); -} -export function addKeyboardShortcut({ window, group, key, title, subtitle = null, settings, }) { - const row = new Adw.ActionRow({ - title, - subtitle, - activatable: true, - }); - group.add(row); - const shortcutLabel = new Gtk.ShortcutLabel({ - accelerator: settings.get_strv(key)[0] ?? null, - valign: Gtk.Align.CENTER, - }); - row.add_suffix(shortcutLabel); - const disabledLabel = new Gtk.Label({ - label: 'Disabled', - cssClasses: ['dim-label'], - }); - row.add_suffix(disabledLabel); - if (settings.get_strv(key).length > 0) { - disabledLabel.hide(); - } - else { - shortcutLabel.hide(); - } - function showDialog() { - const dialog = new Gtk.Dialog({ - title: 'Set Shortcut', - modal: true, - useHeaderBar: 1, - transientFor: window, - widthRequest: 400, - heightRequest: 200, - }); - const dialogBox = new Gtk.Box({ - marginBottom: 12, - marginEnd: 12, - marginStart: 12, - marginTop: 12, - orientation: Gtk.Orientation.VERTICAL, - valign: Gtk.Align.CENTER, - }); - const dialogLabel = new Gtk.Label({ - label: 'Enter new shortcut to change ' + title + '.', - useMarkup: true, - marginBottom: 12, - }); - dialogBox.append(dialogLabel); - const dialogDimLabel = new Gtk.Label({ - label: 'Press Esc to cancel or Backspace to disable the keyboard shortcut.', - cssClasses: ['dim-label'], - }); - dialogBox.append(dialogDimLabel); - const keyController = new Gtk.EventControllerKey({ - propagationPhase: Gtk.PropagationPhase.CAPTURE, - }); - dialog.add_controller(keyController); - keyController.connect('key-pressed', (keyController, keyval, keycode, modifier) => { - modifier = fixModifiers(modifier); - const accelerator = getAccelerator(keyval, modifier); - if (accelerator) { - if (keyval === Gdk.KEY_Escape && !modifier) { - // Just close the dialog - } - else if (keyval === Gdk.KEY_BackSpace && !modifier) { - shortcutLabel.hide(); - disabledLabel.show(); - settings.set_strv(key, []); - } - else { - shortcutLabel.accelerator = accelerator; - shortcutLabel.show(); - disabledLabel.hide(); - settings.set_strv(key, [accelerator]); - } - dialog.close(); - } - }); - dialog.set_child(dialogBox); - dialog.show(); - } - row.connect('activated', () => showDialog()); -} -function getAccelerator(keyval, modifiers) { - const isValid = Gtk.accelerator_valid(keyval, modifiers); - if (isValid) { - const acceleratorName = Gtk.accelerator_name(keyval, modifiers); - return acceleratorName; - } - else { - return null; - } -} -// From https://gitlab.com/rmnvgr/nightthemeswitcher-gnome-shell-extension/-/blob/main/src/utils.js -function findItemPositionInModel(model, predicate) { - for (let i = 0; i < model.get_n_items(); i++) { - if (predicate(model.get_item(i))) { - return i; - } - } - return undefined; -} -/** - * Removes invalid modifier bits. - */ -function fixModifiers(modifiers) { - return (modifiers & - // Set by Xorg when holding the Super key in addition to the valid Meta modifier. - ~64 & - // Set when num lock is enabled. - ~16); -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/preferences/custom-styles.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/preferences/custom-styles.js deleted file mode 100644 index 4c9fea85..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/preferences/custom-styles.js +++ /dev/null @@ -1,211 +0,0 @@ -import Adw from 'gi://Adw'; -import Gio from 'gi://Gio'; -import Gtk from 'gi://Gtk'; -export function addCustomCssDialogButton({ window, group, settings, }) { - const row = new Adw.ActionRow({ - title: 'Custom styles', - activatable: true, - valign: Gtk.Align.CENTER, - }); - group.add(row); - const enabledLabel = buildEnabledLabel({ settings, window }); - row.add_suffix(enabledLabel); - const icon = new Gtk.Image({ iconName: 'go-next-symbolic' }); - row.add_suffix(icon); - row.connect('activated', () => showDialog({ window, settings })); -} -function buildEnabledLabel({ settings, window, }) { - const enabledLabel = new Gtk.Label(); - function updateEnabledLabel() { - if (settings.get_boolean('custom-styles-enabled')) { - enabledLabel.set_label('On'); - } - else { - enabledLabel.set_label('Off'); - } - } - updateEnabledLabel(); - const changed = settings.connect('changed::custom-styles-enabled', updateEnabledLabel); - window.connect('unmap', () => settings.disconnect(changed)); - return enabledLabel; -} -function showDialog({ window, settings, }) { - const dialog = new Adw.Dialog({ - title: 'Custom Styles', - contentWidth: 600, - contentHeight: 2000, - }); - const toastOverlay = new Adw.ToastOverlay(); - const toolbarView = new Adw.ToolbarView(); - toastOverlay.set_child(toolbarView); - let savedCustomStyles = settings.get_string('custom-styles') ?? ''; - let textViewCustomStyles = savedCustomStyles; - function updateApplyButton() { - const hasChanged = textViewCustomStyles !== savedCustomStyles; - applyButton.set_sensitive(hasChanged); - } - function customStylesChanged(text) { - textViewCustomStyles = text; - updateApplyButton(); - } - const { headerBar, applyButton } = buildHeaderBar({ - settings, - showAppStyles: () => { - toolbarView.set_content(applicationStylesBox({ settings })); - }, - showCustomStyles: () => { - toolbarView.set_content(customStylesBox({ settings, customStylesChanged })); - }, - }); - updateApplyButton(); - applyButton.connect('clicked', () => { - const isEnabled = settings.get_boolean('custom-styles-enabled'); - settings.set_string('custom-styles', textViewCustomStyles); - // In case of invalid styles, custom-styles-enabled will be set to false - // automatically when setting custom-styles. Only enable if it was - // previously disabled. - if (!isEnabled) { - settings.set_boolean('custom-styles-enabled', true); - } - savedCustomStyles = textViewCustomStyles; - updateApplyButton(); - }); - toolbarView.add_top_bar(headerBar); - toolbarView.set_content(customStylesBox({ settings, customStylesChanged })); - const unregisterFailedToast = registerFailedToast({ toastOverlay, settings }); - dialog.connect('closed', unregisterFailedToast); - dialog.set_child(toastOverlay); - dialog.present(window); -} -function registerFailedToast({ toastOverlay, settings, }) { - let toast; - function showFailedToast() { - toast?.dismiss(); - if (settings.get_boolean('custom-styles-failed')) { - toast = new Adw.Toast({ - title: 'Failed to load styles. Custom styles have been disabled.', - timeout: 3, - }); - toastOverlay.add_toast(toast); - } - } - const showFailedToastConnection = settings.connect(`changed::custom-styles-failed`, showFailedToast); - return () => settings.disconnect(showFailedToastConnection); -} -function buildHeaderBar({ settings, showAppStyles, showCustomStyles, }) { - const titleBox = new Gtk.Box({ - spacing: 6, - }); - const appStylesButton = new Gtk.ToggleButton({ - label: 'Application Styles', - cssClasses: ['flat'], - }); - appStylesButton.connect('notify::active', (button) => button.active && showAppStyles()); - const customStylesButton = new Gtk.ToggleButton({ - label: 'Custom Styles', - cssClasses: ['flat'], - group: appStylesButton, - active: true, - }); - customStylesButton.connect('notify::active', (button) => button.active && showCustomStyles()); - titleBox.append(appStylesButton); - titleBox.append(customStylesButton); - const headerBar = new Adw.HeaderBar({ - titleWidget: titleBox, - }); - const enabledToggle = new Gtk.Switch({ - active: settings.get_boolean('custom-styles-enabled'), - marginStart: 12, - }); - settings.bind('custom-styles-enabled', enabledToggle, 'active', Gio.SettingsBindFlags.DEFAULT); - headerBar.pack_start(enabledToggle); - const applyButton = new Gtk.Button({ - label: 'Apply', - cssClasses: ['suggested-action'], - marginEnd: 4, - }); - headerBar.pack_end(applyButton); - return { headerBar, applyButton }; -} -function applicationStylesBox({ settings }) { - const box = new Gtk.Box({ - orientation: Gtk.Orientation.VERTICAL, - halign: Gtk.Align.FILL, - marginStart: 24, - marginEnd: 24, - marginTop: 12, - marginBottom: 24, - }); - const descriptionLabel = new Gtk.Label({ - label: "The application styles that are generated based on the extension's appearance preferences. " + - 'You cannot change these styles here, but you can override them with custom styles.', - cssClasses: ['description_label'], - wrap: true, - marginBottom: 12, - xalign: 0, - naturalWrapMode: Gtk.NaturalWrapMode.NONE, - }); - box.append(descriptionLabel); - const frame = new Gtk.Frame({ - vexpand: true, - }); - box.append(frame); - const scrolled = new Gtk.ScrolledWindow({}); - frame.set_child(scrolled); - const textView = new Gtk.TextView({ - editable: false, - monospace: true, - wrapMode: Gtk.WrapMode.WORD_CHAR, - leftMargin: 12, - rightMargin: 12, - topMargin: 12, - bottomMargin: 12, - }); - scrolled.set_child(textView); - const text = settings.get_string('application-styles') ?? ''; - textView.buffer.set_text(text, -1); - return box; -} -function customStylesBox({ settings, customStylesChanged, }) { - const box = new Gtk.Box({ - orientation: Gtk.Orientation.VERTICAL, - halign: Gtk.Align.FILL, - marginStart: 24, - marginEnd: 24, - marginTop: 12, - marginBottom: 24, - }); - const descriptionLabel = new Gtk.Label({ - label: 'Add any custom styles to override application styles.', - cssClasses: ['description_label'], - wrap: true, - marginBottom: 12, - xalign: 0, - naturalWrapMode: Gtk.NaturalWrapMode.NONE, - }); - box.append(descriptionLabel); - const frame = new Gtk.Frame({ - vexpand: true, - }); - box.append(frame); - const scrolled = new Gtk.ScrolledWindow({}); - frame.set_child(scrolled); - const textView = new Gtk.TextView({ - editable: true, - monospace: true, - cursorVisible: true, - wrapMode: Gtk.WrapMode.WORD_CHAR, - leftMargin: 12, - rightMargin: 12, - topMargin: 12, - bottomMargin: 12, - }); - scrolled.set_child(textView); - const initialText = settings.get_string('custom-styles') ?? ''; - textView.buffer.set_text(initialText, -1); - textView.buffer.connect('changed', () => { - const text = textView.buffer.get_text(textView.buffer.get_start_iter(), textView.buffer.get_end_iter(), false) ?? ''; - customStylesChanged(text); - }); - return box; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/prefs.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/prefs.js deleted file mode 100644 index 941fd892..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/prefs.js +++ /dev/null @@ -1,13 +0,0 @@ -import { ExtensionPreferences } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; -import { AppearancePage } from './preferences/AppearancePage.js'; -import { BehaviorPage } from './preferences/BehaviorPage.js'; -import { ShortcutsPage } from './preferences/ShortcutsPage.js'; -export default class SpaceBarExtensionPreferences extends ExtensionPreferences { - fillPreferencesWindow(window) { - [new BehaviorPage(this), new AppearancePage(this), new ShortcutsPage(this)].forEach((pageObject) => { - pageObject.window = window; - pageObject.init(); - window.add(pageObject.page); - }); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/private_metadata.json b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/private_metadata.json deleted file mode 100644 index d605a8c9..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/private_metadata.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "_generated": "Generated by SweetTooth, do not edit", - "description": "Replaces the top-panel workspace indicator with an i3-like workspaces bar.\n\nOriginally a fork of the extension Workspaces Bar by fthx, this extension grew into a more comprehensive set of features to support a workspace-based workflow.\n\nFeatures:\n- First class support for static and dynamic workspaces as well as multi-monitor setups\n- Add, remove, and rename workspaces\n- Rearrange workspaces via drag and drop\n- Automatically assign workspace names based on started applications\n- Keyboard shortcuts extend and refine system shortcuts\n- Scroll through workspaces by mouse wheel over the panel\n- Customize the appearance", - "name": "Space Bar", - "settings-schema": "org.gnome.shell.extensions.space-bar", - "shell-version": [ - "46", - "47" - ], - "url": "https://github.com/christopher-l/space-bar", - "uuid": "space-bar@luchrioh", - "version": 31 -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/schemas/gschemas.compiled b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/schemas/gschemas.compiled deleted file mode 100644 index 8a3b5316..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/schemas/gschemas.compiled and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/schemas/org.gnome.shell.extensions.space-bar.gschema.xml b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/schemas/org.gnome.shell.extensions.space-bar.gschema.xml deleted file mode 100644 index b5ec47cd..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/schemas/org.gnome.shell.extensions.space-bar.gschema.xml +++ /dev/null @@ -1,359 +0,0 @@ - - - - - 0 - - - - - - - - - - - - - - "workspaces-bar" - Indicator style - - - false - - - false - - - '{{name}}' - - - 'Workspace {{number}}' - - - - - - - - "left" - Position in top panel - - - false - - - - 1 - Position index - Order relative to other elements - - - false - - - true - - - true - - - - - - - - "panel" - Switch workspaces with scroll wheel - - - true - - - 200 - - - - - - - - "normal" - - - - - - - - "disabled" - - - false - - - false - - - true - - - - - - - 12 - - - 4 - - - - 'rgba(255,255,255,0.3)' - - - 'rgba(255,255,255,1)' - - - 'rgba(0,0,0,0)' - - - -1 - - - 11 - - - false - - - - - - - - - - - - - - "700" - Font weight used for the active workspace - - - 4 - - - 0 - - - 8 - - - 3 - - - - 'rgba(0,0,0,0)' - - - 'rgba(255,255,255,1)' - - - 'rgba(0,0,0,0)' - - - false - - - -1 - - - false - - - - - - - - - - - - - - "700" - Font weight used for inactive workspaces - - - false - - - 4 - - - 0 - - - false - - - false - - - 8 - - - false - - - 3 - - - false - - - - 'rgba(0,0,0,0)' - - - 'rgba(255,255,255,0.5)' - - - 'rgba(0,0,0,0)' - - - -1 - - - false - - - - - - - - - - - - - - "700" - Font weight used for empty workspaces - - - false - - - 4 - - - 0 - - - false - - - false - - - 8 - - - false - - - 3 - - - false - - - '' - - - false - - - false - - - '' - - - - - - true - - - false - - - - Left']]]> - - - Right']]]> - - - grave']]]> - - Keybinding to activate the previous workspace. - - - n']]]> - Switch to empty workspace. - - - W']]]> - Keybinding to open the workspaces bar menu. - - - - 1']]]> - Keybinding to activate workspace 1. - - - 2']]]> - Keybinding to activate workspace 2. - - - 3']]]> - Keybinding to activate workspace 3. - - - 4']]]> - Keybinding to activate workspace 4. - - - 5']]]> - Keybinding to activate workspace 5. - - - 6']]]> - Keybinding to activate workspace 6. - - - 7']]]> - Keybinding to activate workspace 7. - - - 8']]]> - Keybinding to activate workspace 8. - - - 9']]]> - Keybinding to activate workspace 9. - - - 0']]]> - Keybinding to activate workspace 10. - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/services/KeyBindings.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/services/KeyBindings.js deleted file mode 100644 index 248b4524..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/services/KeyBindings.js +++ /dev/null @@ -1,84 +0,0 @@ -import Gio from 'gi://Gio'; -import Meta from 'gi://Meta'; -import Shell from 'gi://Shell'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import { Settings } from './Settings.js'; -import { Workspaces } from './Workspaces.js'; -export class KeyBindings { - constructor() { - this._settings = Settings.getInstance(); - this._ws = Workspaces.getInstance(); - this._desktopKeybindings = new Gio.Settings({ - schema: 'org.gnome.desktop.wm.keybindings', - }); - this._addedKeyBindings = []; - } - static init() { - KeyBindings._instance = new KeyBindings(); - KeyBindings._instance.init(); - } - static destroy() { - KeyBindings._instance?.destroy(); - KeyBindings._instance = null; - } - static getInstance() { - return KeyBindings._instance; - } - init() { - this._registerActivateByNumber(); - this._registerMoveToByNumber(); - this._addExtensionKeyBindings(); - KeyBindings._instance = this; - } - destroy() { - for (const name of this._addedKeyBindings) { - Main.wm.removeKeybinding(name); - } - this._addedKeyBindings = []; - } - addKeyBinding(name, handler) { - Shell.ActionMode; - Main.wm.addKeybinding(name, this._settings.shortcutsSettings, Meta.KeyBindingFlags.NONE, Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW, handler); - this._addedKeyBindings.push(name); - } - removeKeybinding(name) { - if (this._addedKeyBindings.includes(name)) { - Main.wm.removeKeybinding(name); - this._addedKeyBindings.splice(this._addedKeyBindings.indexOf(name), 1); - } - } - _addExtensionKeyBindings() { - this.addKeyBinding('move-workspace-left', () => this._ws.moveCurrentWorkspace(-1)); - this.addKeyBinding('move-workspace-right', () => this._ws.moveCurrentWorkspace(1)); - this.addKeyBinding('activate-previous-key', () => this._ws.activatePrevious()); - this.addKeyBinding('activate-empty-key', () => this._ws.activateEmptyOrAdd()); - } - _registerActivateByNumber() { - this._settings.enableActivateWorkspaceShortcuts.subscribe((value) => { - for (let i = 0; i < 10; i++) { - const name = `activate-${i + 1}-key`; - if (value) { - this.addKeyBinding(name, () => { - this._ws.activate(i, { focusWindowIfCurrentWorkspace: true }); - }); - } - else { - this.removeKeybinding(name); - } - } - }, { emitCurrentValue: true }); - } - _registerMoveToByNumber() { - this._settings.enableMoveToWorkspaceShortcuts.subscribe((value) => { - for (let i = 0; i < 10; i++) { - const name = `move-to-workspace-${i + 1}`; - if (value) { - this._desktopKeybindings.set_strv(name, [`${(i + 1) % 10}`]); - } - else { - this._desktopKeybindings.reset(name); - } - } - }); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/services/ScrollHandler.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/services/ScrollHandler.js deleted file mode 100644 index db37449e..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/services/ScrollHandler.js +++ /dev/null @@ -1,102 +0,0 @@ -import Clutter from 'gi://Clutter'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import { Settings } from './Settings.js'; -import { Workspaces } from './Workspaces.js'; -export class ScrollHandler { - constructor() { - this._ws = Workspaces.getInstance(); - this._settings = Settings.getInstance(); - this._lastScrollTime = 0; - this._panelButton = null; - } - init(panelButtonSubject) { - panelButtonSubject.subscribe((panelButton) => (this._panelButton = panelButton)); - const panelButtonCallback = (panelButton) => this._registerScroll(panelButton); - this._settings.scrollWheel.subscribe((value) => { - panelButtonSubject.unsubscribe(panelButtonCallback); - this._disconnectBinding?.(); - switch (value) { - case 'panel': - this._registerScroll(Main.panel); - break; - case 'workspaces-bar': - panelButtonSubject.subscribe(panelButtonCallback); - break; - case 'disabled': - this._disconnectBinding = undefined; - break; - } - }, { emitCurrentValue: true }); - } - destroy() { - this._disconnectBinding?.(); - this._disconnectBinding = undefined; - } - _registerScroll(widget) { - const scrollBinding = widget.connect('scroll-event', (actor, event) => this._handle_scroll(actor, event)); - this._disconnectBinding = () => widget.disconnect(scrollBinding); - } - /** - * Checks whether the debounce time since the last scroll event is exceeded, so a scroll event - * can be accepted. - * - * Calling this function resets the debounce timer if the return value is `true`. - * - * @returns `true` if the scroll event should be accepted - */ - _debounceTimeExceeded() { - if (!this._settings.scrollWheelDebounce.value) { - return true; - } - const debounceTime = this._settings.scrollWheelDebounceTime.value; - const now = Date.now(); - if (now >= this._lastScrollTime + debounceTime) { - this._lastScrollTime = now; - return true; - } - else { - return false; - } - } - _handle_scroll(actor, event) { - // Adapted from https://github.com/timbertson/gnome-shell-scroll-workspaces - let direction; - let directionSetting = null; - switch (event.get_scroll_direction()) { - case Clutter.ScrollDirection.UP: - direction = -1; - directionSetting = this._settings.scrollWheelVertical.value; - break; - case Clutter.ScrollDirection.DOWN: - direction = 1; - directionSetting = this._settings.scrollWheelVertical.value; - break; - case Clutter.ScrollDirection.LEFT: - direction = -1; - directionSetting = this._settings.scrollWheelHorizontal.value; - break; - case Clutter.ScrollDirection.RIGHT: - direction = 1; - directionSetting = this._settings.scrollWheelHorizontal.value; - break; - } - let newIndex; - if (directionSetting && directionSetting !== 'disabled') { - const invertFactor = directionSetting === 'inverted' ? -1 : 1; - newIndex = this._ws.findVisibleWorkspace((direction * invertFactor), { - wraparound: this._settings.scrollWheelWrapAround.value, - }); - } - else { - return Clutter.EVENT_PROPAGATE; - } - if (newIndex !== null && this._debounceTimeExceeded()) { - const workspace = global.workspace_manager.get_workspace_by_index(newIndex); - if (workspace) { - workspace.activate(global.get_current_time()); - this._ws.focusMostRecentWindowOnWorkspace(workspace); - } - } - return Clutter.EVENT_STOP; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/services/Settings.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/services/Settings.js deleted file mode 100644 index 4fb91abb..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/services/Settings.js +++ /dev/null @@ -1,199 +0,0 @@ -import Gio from 'gi://Gio'; -export class Settings { - static init(extension) { - Settings._instance = new Settings(extension); - Settings._instance.init(); - } - static destroy() { - Settings._instance?.destroy(); - Settings._instance = null; - } - static getInstance() { - return Settings._instance; - } - constructor(_extension) { - this._extension = _extension; - this.state = this._extension.getSettings(`${this._extension.metadata['settings-schema']}.state`); - this.behaviorSettings = this._extension.getSettings(`${this._extension.metadata['settings-schema']}.behavior`); - this.appearanceSettings = this._extension.getSettings(`${this._extension.metadata['settings-schema']}.appearance`); - this.shortcutsSettings = this._extension.getSettings(`${this._extension.metadata['settings-schema']}.shortcuts`); - this.mutterSettings = new Gio.Settings({ schema: 'org.gnome.mutter' }); - this.wmPreferencesSettings = new Gio.Settings({ - schema: 'org.gnome.desktop.wm.preferences', - }); - this._version = SettingsSubject.createIntSubject(this.state, 'version'); - this.workspaceNamesMap = SettingsSubject.createJsonObjectSubject(this.state, 'workspace-names-map'); - this.dynamicWorkspaces = SettingsSubject.createBooleanSubject(this.mutterSettings, 'dynamic-workspaces'); - this.indicatorStyle = SettingsSubject.createStringSubject(this.behaviorSettings, 'indicator-style'); - this.enableCustomLabel = SettingsSubject.createBooleanSubject(this.behaviorSettings, 'enable-custom-label'); - this.enableCustomLabelInMenus = SettingsSubject.createBooleanSubject(this.behaviorSettings, 'enable-custom-label-in-menu'); - this.customLabelNamed = SettingsSubject.createStringSubject(this.behaviorSettings, 'custom-label-named'); - this.customLabelUnnamed = SettingsSubject.createStringSubject(this.behaviorSettings, 'custom-label-unnamed'); - this.position = SettingsSubject.createStringSubject(this.behaviorSettings, 'position'); - this.systemWorkspaceIndicator = SettingsSubject.createBooleanSubject(this.behaviorSettings, 'system-workspace-indicator'); - this.positionIndex = SettingsSubject.createIntSubject(this.behaviorSettings, 'position-index'); - this.scrollWheel = SettingsSubject.createStringSubject(this.behaviorSettings, 'scroll-wheel'); - this.scrollWheelDebounce = SettingsSubject.createBooleanSubject(this.behaviorSettings, 'scroll-wheel-debounce'); - this.scrollWheelDebounceTime = SettingsSubject.createIntSubject(this.behaviorSettings, 'scroll-wheel-debounce-time'); - this.scrollWheelVertical = SettingsSubject.createStringSubject(this.behaviorSettings, 'scroll-wheel-vertical'); - this.scrollWheelHorizontal = SettingsSubject.createStringSubject(this.behaviorSettings, 'scroll-wheel-horizontal'); - this.scrollWheelWrapAround = SettingsSubject.createBooleanSubject(this.behaviorSettings, 'scroll-wheel-wrap-around'); - this.alwaysShowNumbers = SettingsSubject.createBooleanSubject(this.behaviorSettings, 'always-show-numbers'); - this.showEmptyWorkspaces = SettingsSubject.createBooleanSubject(this.behaviorSettings, 'show-empty-workspaces'); - this.toggleOverview = SettingsSubject.createBooleanSubject(this.behaviorSettings, 'toggle-overview'); - this.smartWorkspaceNames = SettingsSubject.createBooleanSubject(this.behaviorSettings, 'smart-workspace-names'); - this.reevaluateSmartWorkspaceNames = SettingsSubject.createBooleanSubject(this.behaviorSettings, 'reevaluate-smart-workspace-names'); - this.enableActivateWorkspaceShortcuts = SettingsSubject.createBooleanSubject(this.shortcutsSettings, 'enable-activate-workspace-shortcuts'); - this.enableMoveToWorkspaceShortcuts = SettingsSubject.createBooleanSubject(this.shortcutsSettings, 'enable-move-to-workspace-shortcuts'); - this.workspaceNames = SettingsSubject.createStringArraySubject(this.wmPreferencesSettings, 'workspace-names'); - this.workspacesBarPadding = SettingsSubject.createIntSubject(this.appearanceSettings, 'workspaces-bar-padding'); - this.workspaceMargin = SettingsSubject.createIntSubject(this.appearanceSettings, 'workspace-margin'); - this.activeWorkspaceBackgroundColor = SettingsSubject.createStringSubject(this.appearanceSettings, 'active-workspace-background-color'); - this.activeWorkspaceTextColor = SettingsSubject.createStringSubject(this.appearanceSettings, 'active-workspace-text-color'); - this.activeWorkspaceBorderColor = SettingsSubject.createStringSubject(this.appearanceSettings, 'active-workspace-border-color'); - this.activeWorkspaceFontSize = SettingsSubject.createIntSubject(this.appearanceSettings, 'active-workspace-font-size'); - this.activeWorkspaceFontWeight = SettingsSubject.createStringSubject(this.appearanceSettings, 'active-workspace-font-weight'); - this.activeWorkspaceBorderRadius = SettingsSubject.createIntSubject(this.appearanceSettings, 'active-workspace-border-radius'); - this.activeWorkspaceBorderWidth = SettingsSubject.createIntSubject(this.appearanceSettings, 'active-workspace-border-width'); - this.activeWorkspacePaddingH = SettingsSubject.createIntSubject(this.appearanceSettings, 'active-workspace-padding-h'); - this.activeWorkspacePaddingV = SettingsSubject.createIntSubject(this.appearanceSettings, 'active-workspace-padding-v'); - this.inactiveWorkspaceBackgroundColor = SettingsSubject.createStringSubject(this.appearanceSettings, 'inactive-workspace-background-color'); - this.inactiveWorkspaceTextColor = SettingsSubject.createStringSubject(this.appearanceSettings, 'inactive-workspace-text-color'); - this.inactiveWorkspaceBorderColor = SettingsSubject.createStringSubject(this.appearanceSettings, 'inactive-workspace-border-color'); - this.inactiveWorkspaceFontSize = SettingsSubject.createIntSubject(this.appearanceSettings, 'inactive-workspace-font-size'); - this.inactiveWorkspaceFontWeight = SettingsSubject.createStringSubject(this.appearanceSettings, 'inactive-workspace-font-weight'); - this.inactiveWorkspaceBorderRadius = SettingsSubject.createIntSubject(this.appearanceSettings, 'inactive-workspace-border-radius'); - this.inactiveWorkspaceBorderWidth = SettingsSubject.createIntSubject(this.appearanceSettings, 'inactive-workspace-border-width'); - this.inactiveWorkspacePaddingH = SettingsSubject.createIntSubject(this.appearanceSettings, 'inactive-workspace-padding-h'); - this.inactiveWorkspacePaddingV = SettingsSubject.createIntSubject(this.appearanceSettings, 'inactive-workspace-padding-v'); - this.emptyWorkspaceBackgroundColor = SettingsSubject.createStringSubject(this.appearanceSettings, 'empty-workspace-background-color'); - this.emptyWorkspaceTextColor = SettingsSubject.createStringSubject(this.appearanceSettings, 'empty-workspace-text-color'); - this.emptyWorkspaceBorderColor = SettingsSubject.createStringSubject(this.appearanceSettings, 'empty-workspace-border-color'); - this.emptyWorkspaceFontSize = SettingsSubject.createIntSubject(this.appearanceSettings, 'empty-workspace-font-size'); - this.emptyWorkspaceFontWeight = SettingsSubject.createStringSubject(this.appearanceSettings, 'empty-workspace-font-weight'); - this.emptyWorkspaceBorderRadius = SettingsSubject.createIntSubject(this.appearanceSettings, 'empty-workspace-border-radius'); - this.emptyWorkspaceBorderWidth = SettingsSubject.createIntSubject(this.appearanceSettings, 'empty-workspace-border-width'); - this.emptyWorkspacePaddingH = SettingsSubject.createIntSubject(this.appearanceSettings, 'empty-workspace-padding-h'); - this.emptyWorkspacePaddingV = SettingsSubject.createIntSubject(this.appearanceSettings, 'empty-workspace-padding-v'); - this.applicationStyles = SettingsSubject.createStringSubject(this.appearanceSettings, 'application-styles'); - this.customStylesEnabled = SettingsSubject.createBooleanSubject(this.appearanceSettings, 'custom-styles-enabled'); - this.customStylesFailed = SettingsSubject.createBooleanSubject(this.appearanceSettings, 'custom-styles-failed'); - this.customStyles = SettingsSubject.createStringSubject(this.appearanceSettings, 'custom-styles'); - } - init() { - SettingsSubject.initAll(); - this.runMigrations(); - } - destroy() { - SettingsSubject.destroyAll(); - } - /** - * Migrates preferences from previous space-bar versions. - */ - runMigrations() { - if (this._version.value < 26) { - if (this.indicatorStyle.value === 'current-workspace-name') { - this.indicatorStyle.value = 'current-workspace'; - } - } - this._version.value = this._extension.metadata['version']; - } -} -class SettingsSubject { - static createBooleanSubject(settings, name) { - return new SettingsSubject(settings, name, 'boolean'); - } - static createIntSubject(settings, name) { - return new SettingsSubject(settings, name, 'int'); - } - static createStringSubject(settings, name) { - return new SettingsSubject(settings, name, 'string'); - } - static createStringArraySubject(settings, name) { - return new SettingsSubject(settings, name, 'string-array'); - } - static createJsonObjectSubject(settings, name) { - return new SettingsSubject(settings, name, 'json-object'); - } - static initAll() { - for (const subject of SettingsSubject._subjects) { - subject._init(); - } - } - static destroyAll() { - for (const subject of SettingsSubject._subjects) { - subject._destroy(); - } - SettingsSubject._subjects = []; - } - get value() { - return this._value; - } - set value(value) { - this._setValue(value); - } - constructor(_settings, _name, _type) { - this._settings = _settings; - this._name = _name; - this._type = _type; - this._subscribers = []; - SettingsSubject._subjects.push(this); - } - subscribe(subscriber, { emitCurrentValue = false } = {}) { - this._subscribers.push(subscriber); - if (emitCurrentValue) { - subscriber(this._value); - } - } - _init() { - this._getValue = () => { - switch (this._type) { - case 'boolean': - return this._settings.get_boolean(this._name); - case 'int': - return this._settings.get_int(this._name); - case 'string': - return this._settings.get_string(this._name); - case 'string-array': - return this._settings.get_strv(this._name); - case 'json-object': - return JSON.parse(this._settings.get_string(this._name)); - default: - throw new Error('unknown type ' + this._type); - } - }; - this._setValue = (value) => { - switch (this._type) { - case 'boolean': - return this._settings.set_boolean(this._name, value); - case 'int': - return this._settings.set_int(this._name, value); - case 'string': - return this._settings.set_string(this._name, value); - case 'string-array': - return this._settings.set_strv(this._name, value); - case 'json-object': - return this._settings.set_string(this._name, JSON.stringify(value)); - default: - throw new Error('unknown type ' + this._type); - } - }; - this._value = this._getValue(); - const changed = this._settings.connect(`changed::${this._name}`, () => this._updateValue(this._getValue())); - this._disconnect = () => this._settings.disconnect(changed); - } - _destroy() { - this._disconnect(); - this._subscribers = []; - } - _updateValue(value) { - this._value = value; - this._notifySubscriber(); - } - _notifySubscriber() { - for (const subscriber of this._subscribers) { - subscriber(this._value); - } - } -} -SettingsSubject._subjects = []; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/services/Styles.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/services/Styles.js deleted file mode 100644 index f23b03d0..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/services/Styles.js +++ /dev/null @@ -1,227 +0,0 @@ -import Gio from 'gi://Gio'; -import { DebouncingNotifier } from '../utils/DebouncingNotifier.js'; -import { Settings } from './Settings.js'; -import St from 'gi://St'; -/** - * Tracks and provides the styles for the workspaces bar. - */ -export class Styles { - constructor() { - this._settings = Settings.getInstance(); - /** Notifier for changed styles of the workspaces bar. */ - this._workspacesBarUpdateNotifier = new DebouncingNotifier(); - /** Notifier for changed styles of workspaces labels. */ - this._workspaceUpdateNotifier = new DebouncingNotifier(); - } - static init() { - Styles._instance = new Styles(); - Styles._instance.init(); - } - static destroy() { - Styles._instance.destroy(); - Styles._instance = null; - } - static getInstance() { - return Styles._instance; - } - init() { - this._registerSettingChanges(); - this._updateStyleSheet(); - } - destroy() { - this._workspaceUpdateNotifier.destroy(); - this._unloadStyleSheet(); - } - _updateStyleSheet() { - this._unloadStyleSheet(); - const themeContext = St.ThemeContext.get_for_stage(global.stage); - let styles = this._generateStyleSheetContent(); - this._settings.applicationStyles.value = styles; - if (this._settings.customStylesEnabled.value) { - this._settings.customStylesFailed.value = false; - styles = styles + '\n' + this._settings.customStyles.value; - } - const [file, stream] = Gio.File.new_tmp(null); - const outputStream = Gio.DataOutputStream.new(stream.outputStream); - outputStream.put_string(styles, null); - try { - themeContext.get_theme().load_stylesheet(file); - } - catch (e) { - console.error('Failed to load stylesheet'); - if (this._settings.customStylesEnabled.value) { - this._settings.customStylesEnabled.value = false; - this._settings.customStylesFailed.value = true; - } - } - outputStream.close(null); - stream.close(null); - this._dynamicStyleSheet = file; - } - _unloadStyleSheet() { - if (this._dynamicStyleSheet) { - const themeContext = St.ThemeContext.get_for_stage(global.stage); - themeContext.get_theme().unload_stylesheet(this._dynamicStyleSheet); - this._dynamicStyleSheet.delete(null); - this._dynamicStyleSheet = undefined; - } - } - _generateStyleSheetContent() { - let content = `.space-bar {\n${this._getWorkspacesBarStyle()}}\n\n`; - content += `.space-bar-workspace-label.active {\n${this._getActiveWorkspaceStyle()}}\n\n`; - content += `.space-bar-workspace-label.inactive {\n${this._getInactiveWorkspaceStyle()}}\n\n`; - content += `.space-bar-workspace-label.inactive.empty {\n${this._getEmptyWorkspaceStyle()}}`; - return content; - } - /** Calls `callback` when the style of the workspaces bar changed. */ - onWorkspacesBarChanged(callback) { - this._workspacesBarUpdateNotifier.subscribe(callback); - } - /** Calls `callback` when the style of a workspaces label changed. */ - onWorkspaceLabelsChanged(callback) { - this._workspaceUpdateNotifier.subscribe(callback); - } - /** Subscribes to settings and updates changed styles. */ - _registerSettingChanges() { - [this._settings.workspacesBarPadding].forEach((setting) => setting.subscribe(() => { - this._updateStyleSheet(); - this._workspacesBarUpdateNotifier.notify(); - })); - [ - this._settings.workspaceMargin, - this._settings.activeWorkspaceBackgroundColor, - this._settings.activeWorkspaceTextColor, - this._settings.activeWorkspaceBorderColor, - this._settings.activeWorkspaceFontSize, - this._settings.activeWorkspaceFontWeight, - this._settings.activeWorkspaceBorderRadius, - this._settings.activeWorkspaceBorderWidth, - this._settings.activeWorkspacePaddingH, - this._settings.activeWorkspacePaddingV, - ].forEach((setting) => setting.subscribe(() => { - this._updateStyleSheet(); - this._workspaceUpdateNotifier.notify(); - })); - [ - this._settings.workspaceMargin, - this._settings.inactiveWorkspaceBackgroundColor, - this._settings.inactiveWorkspaceTextColor, - this._settings.inactiveWorkspaceBorderColor, - this._settings.inactiveWorkspaceFontSize, - this._settings.inactiveWorkspaceFontWeight, - this._settings.inactiveWorkspaceBorderRadius, - this._settings.inactiveWorkspaceBorderWidth, - this._settings.inactiveWorkspacePaddingH, - this._settings.inactiveWorkspacePaddingV, - ].forEach((setting) => setting.subscribe(() => { - this._updateStyleSheet(); - this._workspaceUpdateNotifier.notify(); - })); - [ - this._settings.workspaceMargin, - this._settings.emptyWorkspaceBackgroundColor, - this._settings.emptyWorkspaceTextColor, - this._settings.emptyWorkspaceBorderColor, - this._settings.emptyWorkspaceFontSize, - this._settings.emptyWorkspaceFontWeight, - this._settings.emptyWorkspaceBorderRadius, - this._settings.emptyWorkspaceBorderWidth, - this._settings.emptyWorkspacePaddingH, - this._settings.emptyWorkspacePaddingV, - ].forEach((setting) => setting.subscribe(() => { - this._updateStyleSheet(); - this._workspaceUpdateNotifier.notify(); - })); - this._settings.customStylesEnabled.subscribe(() => { - this._updateStyleSheet(); - this._workspacesBarUpdateNotifier.notify(); - }); - this._settings.customStyles.subscribe(() => { - if (this._settings.customStylesEnabled.value) { - this._updateStyleSheet(); - this._workspacesBarUpdateNotifier.notify(); - } - }); - } - /** Updated style the workspaces-bar panel button. */ - _getWorkspacesBarStyle() { - const padding = this._settings.workspacesBarPadding.value; - let workspacesBarStyle = ` -natural-hpadding: ${padding}px;\n`; - return workspacesBarStyle; - } - /** Updated style for active workspaces labels. */ - _getActiveWorkspaceStyle() { - const margin = this._settings.workspaceMargin.value; - const backgroundColor = this._settings.activeWorkspaceBackgroundColor.value; - const textColor = this._settings.activeWorkspaceTextColor.value; - const borderColor = this._settings.activeWorkspaceBorderColor.value; - const fontSize = this._settings.activeWorkspaceFontSize.value; - const fontWeight = this._settings.activeWorkspaceFontWeight.value; - const borderRadius = this._settings.activeWorkspaceBorderRadius.value; - const borderWidth = this._settings.activeWorkspaceBorderWidth.value; - const paddingH = this._settings.activeWorkspacePaddingH.value; - const paddingV = this._settings.activeWorkspacePaddingV.value; - let activeWorkspaceStyle = ` margin: 0 ${margin}px;\n` + - ` background-color: ${backgroundColor};\n` + - ` color: ${textColor};\n` + - ` border-color: ${borderColor};\n` + - ` font-weight: ${fontWeight};\n` + - ` border-radius: ${borderRadius}px;\n` + - ` border-width: ${borderWidth}px;\n` + - ` padding: ${paddingV}px ${paddingH}px;\n`; - if (fontSize >= 0) { - activeWorkspaceStyle += ` font-size: ${fontSize}pt;\n`; - } - return activeWorkspaceStyle; - } - /** Updated style for inactive workspaces labels. */ - _getInactiveWorkspaceStyle() { - const margin = this._settings.workspaceMargin.value; - const backgroundColor = this._settings.inactiveWorkspaceBackgroundColor.value; - const textColor = this._settings.inactiveWorkspaceTextColor.value; - const borderColor = this._settings.inactiveWorkspaceBorderColor.value; - const fontSize = this._settings.inactiveWorkspaceFontSize.value; - const fontWeight = this._settings.inactiveWorkspaceFontWeight.value; - const borderRadius = this._settings.inactiveWorkspaceBorderRadius.value; - const borderWidth = this._settings.inactiveWorkspaceBorderWidth.value; - const paddingH = this._settings.inactiveWorkspacePaddingH.value; - const paddingV = this._settings.inactiveWorkspacePaddingV.value; - let inactiveWorkspaceStyle = ` margin: 0 ${margin}px;\n` + - ` background-color: ${backgroundColor};\n` + - ` color: ${textColor};\n` + - ` border-color: ${borderColor};\n` + - ` font-weight: ${fontWeight};\n` + - ` border-radius: ${borderRadius}px;\n` + - ` border-width: ${borderWidth}px;\n` + - ` padding: ${paddingV}px ${paddingH}px;\n`; - if (fontSize >= 0) { - inactiveWorkspaceStyle += ` font-size: ${fontSize}pt;\n`; - } - return inactiveWorkspaceStyle; - } - /** Updated style for empty and inactive workspaces labels. */ - _getEmptyWorkspaceStyle() { - const margin = this._settings.workspaceMargin.value; - const backgroundColor = this._settings.emptyWorkspaceBackgroundColor.value; - const textColor = this._settings.emptyWorkspaceTextColor.value; - const borderColor = this._settings.emptyWorkspaceBorderColor.value; - const fontSize = this._settings.emptyWorkspaceFontSize.value; - const fontWeight = this._settings.emptyWorkspaceFontWeight.value; - const borderRadius = this._settings.emptyWorkspaceBorderRadius.value; - const borderWidth = this._settings.emptyWorkspaceBorderWidth.value; - const paddingH = this._settings.emptyWorkspacePaddingH.value; - const paddingV = this._settings.emptyWorkspacePaddingV.value; - let emptyWorkspaceStyle = ` margin: 0 ${margin}px;\n` + - ` background-color: ${backgroundColor};\n` + - ` color: ${textColor};\n` + - ` border-color: ${borderColor};\n` + - ` font-weight: ${fontWeight};\n` + - ` border-radius: ${borderRadius}px;\n` + - ` border-width: ${borderWidth}px;\n` + - ` padding: ${paddingV}px ${paddingH}px;\n`; - if (fontSize >= 0) { - emptyWorkspaceStyle += ` font-size: ${fontSize}pt;\n`; - } - return emptyWorkspaceStyle; - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/services/TopBarAdjustments.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/services/TopBarAdjustments.js deleted file mode 100644 index 162dd97c..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/services/TopBarAdjustments.js +++ /dev/null @@ -1,43 +0,0 @@ -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import { Settings } from './Settings.js'; -export class TopBarAdjustments { - constructor() { - this._settings = Settings.getInstance(); - this._didHideActivitiesButton = false; - } - static init() { - TopBarAdjustments._instance = new TopBarAdjustments(); - TopBarAdjustments._instance.init(); - } - static destroy() { - TopBarAdjustments._instance.destroy(); - TopBarAdjustments._instance = null; - } - init() { - this._settings.systemWorkspaceIndicator.subscribe((systemWorkspaceIndicator) => { - if (systemWorkspaceIndicator) { - this._restoreSystemWorkspaceIndicator(); - } - else { - this._hideSystemWorkspaceIndicator(); - } - }, { emitCurrentValue: true }); - } - destroy() { - this._restoreSystemWorkspaceIndicator(); - } - _hideSystemWorkspaceIndicator() { - const activitiesButton = Main.panel.statusArea['activities']; - if (activitiesButton && !Main.sessionMode.isLocked && activitiesButton.is_visible()) { - activitiesButton.hide(); - this._didHideActivitiesButton = true; - } - } - _restoreSystemWorkspaceIndicator() { - const activitiesButton = Main.panel.statusArea['activities']; - if (activitiesButton && this._didHideActivitiesButton) { - activitiesButton.show(); - this._didHideActivitiesButton = false; - } - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/services/WorkspaceNames.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/services/WorkspaceNames.js deleted file mode 100644 index e06e65ce..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/services/WorkspaceNames.js +++ /dev/null @@ -1,135 +0,0 @@ -import { Settings } from './Settings.js'; -export class WorkspaceNames { - static init(workspaces) { - this._instance = new WorkspaceNames(workspaces); - return this._instance; - } - static getInstance() { - return this._instance; - } - constructor(_ws) { - this._ws = _ws; - this._settings = Settings.getInstance(); - } - insert(index) { - const workspaceNames = this._getNames(); - if (index < workspaceNames.length) { - workspaceNames.splice(index, 0, ''); - } - else { - setArrayValue(workspaceNames, index, ''); - } - this._setNames(workspaceNames); - } - /** - * Reorders workspace names according to the given map. - * - * Has the possibility to insert and to remove workspaces. - * - * @param reorderMap array where keys are new indexes and values are old indexes of workspaces - */ - reorder(reorderMap) { - const oldWorkspaceNames = this._getNames(); - const newWorkspaceNames = []; - for (const [newIndex, oldIndex] of reorderMap.entries()) { - if (oldIndex >= 0) { - newWorkspaceNames[newIndex] = oldWorkspaceNames[oldIndex] ?? ''; - } - else { - newWorkspaceNames[newIndex] = ''; - } - } - this._setNames(newWorkspaceNames); - } - remove(index) { - const workspaceNames = this._getNames(); - workspaceNames.splice(index, 1); - this._setNames(workspaceNames); - } - rename(index, newName) { - let workspaceNames = this._getNames(); - setArrayValue(workspaceNames, index, newName); - this._setNames(workspaceNames); - if (this._settings.smartWorkspaceNames.value && newName) { - this._saveSmartWorkspaceName(index, newName); - } - } - restoreSmartWorkspaceName(index) { - const windowNames = this._getWindowNames(index); - const workspacesNamesMap = this._settings.workspaceNamesMap.value; - // Loop through windows on the workspace. - for (const windowName of windowNames) { - // Find the first associated name that is not already in use. - if (workspacesNamesMap[windowName]?.length > 0) { - const newName = workspacesNamesMap[windowName].find((name) => !this._getEnabledWorkspaceNames().includes(name)); - if (newName) { - let workspaceNames = this._getNames(); - while (workspaceNames.length < index) { - workspaceNames.push(''); - } - workspaceNames[index] = newName; - this._setNames(workspaceNames); - return; - } - } - } - } - workspaceNameIsSupportedByWindows(workspace) { - const windowNames = this._getWindowNames(workspace.index); - const workspacesNamesMap = this._settings.workspaceNamesMap.value; - for (const windowName of windowNames) { - if (workspacesNamesMap[windowName]?.some((name) => name === workspace.name)) { - return true; - } - } - return false; - } - /** - * Associates windows on a workspace with a new workspace name. - */ - _saveSmartWorkspaceName(index, newName) { - const windowNames = this._getWindowNames(index); - const workspacesNamesMap = this._settings.workspaceNamesMap.value; - for (const windowName of windowNames) { - workspacesNamesMap[windowName] = [ - ...(workspacesNamesMap[windowName] ?? []).filter((name) => - // We add `newName` at the end - name !== newName && - // Keep associations with other currently enabled workspaces and drop others - this._getEnabledWorkspaceNames().includes(name)), - newName, - ]; - } - this._settings.workspaceNamesMap.value = workspacesNamesMap; - } - _getWindowNames(workspaceIndex) { - const workspace = global.workspace_manager.get_workspace_by_index(workspaceIndex); - let windows = workspace.list_windows(); - windows = windows.filter((window) => !window.is_on_all_workspaces()); - return windows - .map((window) => window.get_wm_class()) - .filter((wmClass) => wmClass !== null); - } - _getNames() { - return [...this._settings.workspaceNames.value]; - } - _setNames(names) { - while (names[names.length - 1] === '') { - names.pop(); - } - this._settings.workspaceNames.value = names; - } - _getEnabledWorkspaceNames() { - return this._getNames().filter((_, index) => index < this._ws.numberOfEnabledWorkspaces); - } -} -/** - * Sets the array's value at the given index, padding any missing elements so all elements have - * valid values. - */ -function setArrayValue(array, index, value) { - while (array.length < index) { - array.push(''); - } - array[index] = value; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/services/Workspaces.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/services/Workspaces.js deleted file mode 100644 index 46dcf2b8..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/services/Workspaces.js +++ /dev/null @@ -1,470 +0,0 @@ -import Meta from 'gi://Meta'; -import Shell from 'gi://Shell'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import { WindowManager } from 'resource:///org/gnome/shell/ui/windowManager.js'; -import { DebouncingNotifier } from '../utils/DebouncingNotifier.js'; -import { hook } from '../utils/hook.js'; -import { Settings } from './Settings.js'; -import { WorkspaceNames } from './WorkspaceNames.js'; -// Adapted from https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/45.0/js/ui/altTab.js?ref_type=tags#L53 -function getWindows(workspace) { - const windows = global.display.get_tab_list(Meta.TabList.NORMAL_ALL, workspace); - return windows - .map((w) => (w.is_attached_dialog() ? w.get_transient_for() : w)) - .filter((w, i, a) => !w.skipTaskbar && a.indexOf(w) === i); -} -export class Workspaces { - constructor() { - this.numberOfEnabledWorkspaces = 0; - this.lastVisibleWorkspace = 0; - this.currentIndex = 0; - this.workspaces = []; - this._previousWorkspace = 0; - this._metaWorkspaces = []; - this._settings = Settings.getInstance(); - this._updateNotifier = new DebouncingNotifier(); - this._smartNamesNotifier = new DebouncingNotifier(); - /** - * Listeners for windows being added to a workspace. - * - * The listeners are connected to a workspace and there is one listener per workspace that needs - * tracking. - */ - this._windowChangedListeners = []; - } - static init() { - Workspaces._instance = new Workspaces(); - Workspaces._instance.init(); - } - static destroy() { - Workspaces._instance.destroy(); - Workspaces._instance = null; - } - static getInstance() { - return Workspaces._instance; - } - init() { - this._wsNames = WorkspaceNames.init(this); - this._ws_reordered = global.workspace_manager.connect('workspaces-reordered', () => { - this._update('workspaces-changed', 'workspace_manager workspaces-reordered'); - }); - this._ws_changed = global.workspace_manager.connect('notify::n-workspaces', () => { - this._update('workspaces-changed', 'workspace_manager n-workspaces'); - }); - this._ws_active_changed = global.workspace_manager.connect('active-workspace-changed', () => { - this._previousWorkspace = this.currentIndex; - this._update('active-workspace-changed', 'workspace_manager active-workspace-changed'); - // We need to update names in case we moved away from the last dynamic workspace. - this._smartNamesNotifier.notify(); - }); - // Additionally to tracking new windows on workspaces, we need to track windows that change - // their names after being opened. - this._windows_changed = Shell.WindowTracker.get_default().connect('tracked-windows-changed', () => { - this._update('windows-changed', 'WindowTracker tracked-windows-changed'); - this._smartNamesNotifier.notify(); - }); - this._settings.dynamicWorkspaces.subscribe(() => this._update('workspaces-changed', 'settings dynamicWorkspaces')); - this._settings.workspaceNames.subscribe(() => this._update('workspace-names-changed', 'settings workspaceNames')); - this._settings.showEmptyWorkspaces.subscribe(() => this._update('workspaces-changed', 'settings showEmptyWorkspaces')); - hook(WindowManager, 'insertWorkspace', 'before', (_, pos) => { - // GNOME shell calls `insertWorkspace` even when workspaces are - // static. It just returns in this case. - if (this._settings.dynamicWorkspaces.value) { - this._wsNames?.insert(pos); - } - }); - this._update('init', 'init'); - this._settings.smartWorkspaceNames.subscribe((value) => value && this._clearEmptyWorkspaceNames(), { emitCurrentValue: true }); - this._settings.smartWorkspaceNames.subscribe(() => this._updateWindowAddedListeners()); - this._settings.reevaluateSmartWorkspaceNames.subscribe(() => this._updateWindowAddedListeners()); - // Update smart workspaces after a small delay because workspaces can briefly get into - // inconsistent states while empty dynamic workspaces are being removed. - this._smartNamesNotifier.subscribe(() => this._updateSmartWorkspaceNames()); - } - destroy() { - this._wsNames = null; - if (this._ws_changed) { - global.workspace_manager.disconnect(this._ws_changed); - } - if (this._ws_reordered) { - global.workspace_manager.disconnect(this._ws_reordered); - } - if (this._ws_active_changed) { - global.workspace_manager.disconnect(this._ws_active_changed); - } - if (this._windows_changed) { - Shell.WindowTracker.get_default().disconnect(this._windows_changed); - } - this._updateNotifier.destroy(); - this._smartNamesNotifier.destroy(); - this._windowChangedListeners.forEach((entry) => entry.workspace.disconnect(entry.listener)); - } - onUpdate(callback, until) { - this._updateNotifier.subscribe(callback, until); - } - activate(index, { focusWindowIfCurrentWorkspace = false } = {}) { - const isCurrentWorkspace = global.workspace_manager.get_active_workspace_index() === index; - const workspace = global.workspace_manager.get_workspace_by_index(index); - if (isCurrentWorkspace) { - if (focusWindowIfCurrentWorkspace && - this.workspaces[index].hasWindows && - global.display.get_focus_window().is_on_all_workspaces()) { - this.focusMostRecentWindowOnWorkspace(workspace); - } - else { - if (this._settings.toggleOverview.value) { - Main.overview.toggle(); - } - } - } - else { - if (workspace) { - workspace.activate(global.get_current_time()); - this.focusMostRecentWindowOnWorkspace(workspace); - if (!Main.overview.visible && - !this.workspaces[index].hasWindows && - this._settings.toggleOverview.value) { - Main.overview.show(); - } - } - } - } - activatePrevious() { - this.activate(this._previousWorkspace); - } - addWorkspace() { - if (this._settings.dynamicWorkspaces.value) { - this.activate(this.numberOfEnabledWorkspaces - 1); - } - else { - this._addStaticWorkspace(); - } - } - activateEmptyOrAdd() { - const index = this.workspaces.findIndex((workspace) => workspace.isEnabled && !workspace.hasWindows); - if (index >= 0) { - this.activate(index); - } - else { - this._addStaticWorkspace(); - } - } - _addStaticWorkspace() { - global.workspace_manager.append_new_workspace(true, global.get_current_time()); - // We want to show the overview here when the corresponding setting is - // enabled, however, this doesn't play well together with activating the - // newly created workspace. - // - // if (!Main.overview.visible && this._settings.toggleOverview.value) { - // Main.overview.show(); - // } - } - removeWorkspace(index) { - const workspace = global.workspace_manager.get_workspace_by_index(index); - if (workspace) { - global.workspace_manager.remove_workspace(workspace, global.get_current_time()); - } - } - reorderWorkspace(oldIndex, newIndex) { - const workspace = global.workspace_manager.get_workspace_by_index(oldIndex); - if (workspace) { - global.workspace_manager.reorder_workspace(workspace, newIndex); - } - } - moveCurrentWorkspace(direction) { - const newIndex = this.currentIndex + direction; - if (newIndex >= 0 && newIndex < this.numberOfEnabledWorkspaces) { - this.reorderWorkspace(this.currentIndex, newIndex); - } - } - getDisplayName(workspace) { - if (this.isExtraDynamicWorkspace(workspace)) { - return '+'; - } - if (this._settings.enableCustomLabel.value) { - return this.getCustomDisplayName(workspace); - } - else { - return this.getDefaultDisplayName(workspace); - } - } - getDefaultDisplayName(workspace) { - if (workspace.name && !this._settings.alwaysShowNumbers.value) { - return workspace.name; - } - let numberString = `${workspace.index + 1}`; - if (workspace.name) { - return `${numberString}: ${workspace.name}`; - } - else { - return numberString; - } - } - getCustomDisplayName(workspace) { - let template; - if (workspace.name) { - template = this._settings.customLabelNamed.value; - } - else { - template = this._settings.customLabelUnnamed.value; - } - let total = this.numberOfEnabledWorkspaces; - if (this._settings.dynamicWorkspaces.value && - this.currentIndex !== this.numberOfEnabledWorkspaces - 1) { - total = this.numberOfEnabledWorkspaces - 1; - } - let displayName = template - .replaceAll('{{name}}', workspace.name ?? '') - .replaceAll('{{number}}', `${workspace.index + 1}`) - .replaceAll('{{total}}', `${total}`) - .replaceAll('{{Total}}', `${this.numberOfEnabledWorkspaces}`); - if (this._settings.alwaysShowNumbers.value && !template.includes('{{number}}')) { - return `${workspace.index + 1}: ${displayName}`; - } - else { - return displayName; - } - } - focusMostRecentWindowOnWorkspace(workspace) { - const mostRecentWindowOnWorkspace = getWindows(workspace).find((window) => !window.is_on_all_workspaces()); - if (mostRecentWindowOnWorkspace) { - workspace.activate_with_focus(mostRecentWindowOnWorkspace, global.get_current_time()); - } - } - /** - * Looks for a workspace that is visible in the workspaces bar relative to the current - * workspace. - * - * @param step indicates the direction in which to look - * @returns the index of the found workspace or `null` if there is no visible workspace in the - * given direction - */ - findVisibleWorkspace(step, { wraparound = false } = {}) { - let index = this.currentIndex; - const startingIndex = index; - while (true) { - index += step; - if (index < 0 || index >= this.numberOfEnabledWorkspaces) { - if (wraparound) { - // Prevent infinite loop when there is no other workspace to go to. - if (index === startingIndex) { - return null; - } - index = - (index + this.numberOfEnabledWorkspaces) % this.numberOfEnabledWorkspaces; - } - else { - break; - } - } - if (this.workspaces[index].isVisible) { - return index; - } - } - return null; - } - /** - * When using dynamic workspaces, whether `workspace` is the extra last workspace, that is - * currently neither used nor focused. - */ - isExtraDynamicWorkspace(workspace) { - return (this._settings.dynamicWorkspaces.value && - workspace.index > 0 && - workspace.index === this.numberOfEnabledWorkspaces - 1 && - !workspace.hasWindows && - this.currentIndex !== workspace.index); - } - /** - * Updates workspaces info managed by this class. - * - * @param reason The external cause that makes an update necessary - * @param source The unit that notified us of the change (used for debugging) - */ - _update(reason, source) { - // log('_update', reason, source); - this.numberOfEnabledWorkspaces = global.workspace_manager.get_n_workspaces(); - this.currentIndex = global.workspace_manager.get_active_workspace_index(); - if (this._settings.dynamicWorkspaces.value && - !this._settings.showEmptyWorkspaces.value && - this.currentIndex !== this.numberOfEnabledWorkspaces - 1) { - this.lastVisibleWorkspace = this.numberOfEnabledWorkspaces - 2; - } - else { - this.lastVisibleWorkspace = this.numberOfEnabledWorkspaces - 1; - } - const numberOfTrackedWorkspaces = Math.max(this.numberOfEnabledWorkspaces, this._settings.workspaceNames.value.length); - this.workspaces = [...Array(numberOfTrackedWorkspaces)].map((_, index) => this._getWorkspaceState(index)); - this._updateNotifier.notify(); - if (reason === 'workspaces-changed' || reason === 'init') { - this._handleWorkspacesReordered(); - } - if (reason === 'workspaces-changed' || - reason === 'workspace-names-changed' || - reason === 'init') { - this._updateWindowAddedListeners(); - } - } - /** - * Matches known workspaces with current workspaces to identify reordered workspaces and adapt - * names accordingly. - * - * Also updates known workspaces. - */ - _handleWorkspacesReordered() { - const newMetaWorkspaces = this._getMetaWorkspaces(); - const reorderMap = []; - let hasReordered = false; - for (const [index, metaWorkspace] of newMetaWorkspaces.entries()) { - const oldIndex = this._metaWorkspaces.indexOf(metaWorkspace); - reorderMap[index] = oldIndex; - if (oldIndex !== -1 && oldIndex !== index) { - hasReordered = true; - } - } - if (hasReordered) { - this._wsNames?.reorder(reorderMap); - } - this._metaWorkspaces = newMetaWorkspaces; - } - _getMetaWorkspaces() { - return Array.from({ length: this.numberOfEnabledWorkspaces }).map((_, i) => global.workspace_manager.get_workspace_by_index(i)); - } - /** - * Updates the listeners for added and removed windows on workspaces. - * - * Connects listeners to workspaces that newly need to be tracked and removes the ones from - * workspaces that don't need tracking anymore. - * - * Records and updates all connected listeners in `_windowAddedListeners`. - */ - _updateWindowAddedListeners() { - // Listeners are only added when smart workspace names are enabled and the workspace does - // not yet have a name. They are removed as soon as the setting is turned off or the - // workspace is assigned a name. - // - // We need to track `window-added` signals in addition to `tracked-windows-changed` signals - // so we catch windows that have been moved from another monitor to the primary monitor. - // Add missing listeners. - if (this._settings.smartWorkspaceNames.value) { - for (const workspace of this.workspaces) { - if (!this._windowChangedListeners.some((entry) => entry.workspace.index() === workspace.index)) { - const metaWorkspace = global.workspace_manager.get_workspace_by_index(workspace.index); - if (metaWorkspace) { - const listenerAdded = metaWorkspace.connect('window-added', () => { - this._update('windows-changed', 'Workspace window-added'); - this._updateSmartWorkspaceNames(); - }); - this._windowChangedListeners.push({ - workspace: metaWorkspace, - listener: listenerAdded, - }); - if (this._settings.reevaluateSmartWorkspaceNames.value) { - const listenerRemoved = metaWorkspace.connect('window-removed', () => { - this._update('windows-changed', 'Workspace window-removed'); - this._updateSmartWorkspaceNames(); - }); - this._windowChangedListeners.push({ - workspace: metaWorkspace, - listener: listenerRemoved, - }); - } - } - } - } - } - // Remove unneeded listeners. - let removedListener = false; - this._windowChangedListeners.forEach((entry, arrayIndex) => { - const workspace = this.workspaces[entry.workspace.index()]; - if (!this._settings.smartWorkspaceNames.value || - !workspace || - (workspace.name && !this._settings.reevaluateSmartWorkspaceNames.value) || - !workspace.isEnabled) { - entry.workspace.disconnect(entry.listener); - delete this._windowChangedListeners[arrayIndex]; - removedListener = true; - } - }); - if (removedListener) { - this._windowChangedListeners = this._windowChangedListeners.filter((entry) => entry != null); - } - } - _updateSmartWorkspaceNames() { - if (this._settings.smartWorkspaceNames.value) { - for (const workspace of this.workspaces) { - if (this._settings.reevaluateSmartWorkspaceNames.value && - workspace.name && - !this._wsNames.workspaceNameIsSupportedByWindows(workspace)) { - this._wsNames.rename(workspace.index, ''); - workspace.name = ''; - } - if (workspace.hasWindows && !workspace.name) { - this._wsNames.restoreSmartWorkspaceName(workspace.index); - } - if (this.isExtraDynamicWorkspace(workspace)) { - this._wsNames.remove(workspace.index); - } - } - } - } - _clearEmptyWorkspaceNames() { - for (const workspace of this.workspaces) { - if ((!workspace.isEnabled || this.isExtraDynamicWorkspace(workspace)) && - typeof workspace.name === 'string') { - // Completely remove disabled workspaces from the names array. - this._wsNames.remove(workspace.index); - } - else if (!workspace.hasWindows && workspace.name) { - // Keep empty workspaces in the names array to not mix up names of workspaces after. - this._wsNames.rename(workspace.index, ''); - } - } - } - _getWorkspaceState(index) { - if (index < this.numberOfEnabledWorkspaces) { - const workspace = global.workspace_manager.get_workspace_by_index(index); - const hasWindows = getNumberOfWindows(workspace) > 0; - return { - isEnabled: true, - isVisible: hasWindows || this._getIsEmptyButVisible(index), - hasWindows, - index, - name: this._settings.workspaceNames.value[index], - }; - } - else { - return { - isEnabled: false, - isVisible: false, - hasWindows: false, - index, - name: this._settings.workspaceNames.value[index], - }; - } - } - /** - * @param index index of an enabled workspace that has no windows - */ - _getIsEmptyButVisible(index) { - if (index === this.currentIndex) { - return true; - } - else if ( - // The last workspace for dynamic workspaces is a special case. - this._settings.dynamicWorkspaces.value && - !this._settings.showEmptyWorkspaces.value) { - return false; - } - else { - return this._settings.showEmptyWorkspaces.value; - } - } -} -/** - * Returns the number of windows on the given workspace, excluding windows on all workspaces, e.g., - * windows on a secondary screen when workspaces do not span all screens. - */ -function getNumberOfWindows(workspace) { - const windows = workspace.list_windows(); - return windows.filter((window) => !window.is_on_all_workspaces()).length; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/stylesheet.css b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/stylesheet.css deleted file mode 100644 index a970d036..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/stylesheet.css +++ /dev/null @@ -1,20 +0,0 @@ -/* Copy the appearance of the "Activities" button for indicator style "Current workspace name". */ -.space-bar.workspace-label { - -natural-hpadding: 18px; -} - -.workspace-box.dragging .space-bar-workspace-label.inactive { - background-color: rgb(0, 0, 0); - transition: margin-left 0.5s, margin-right 0.5s; -} - -.space-bar-menu .space-bar-menu-heading { - margin-left: 8px; - margin-right: 8px; - font-weight: 700; - font-size: 9pt; -} - -.space-bar-menu .popup-menu-ornament { - width: 0 !important; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/types/dummy/gi/Gdk.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/types/dummy/gi/Gdk.js deleted file mode 100644 index 6294aac9..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/types/dummy/gi/Gdk.js +++ /dev/null @@ -1 +0,0 @@ -export default Gdk; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/types/dummy/gi/Shell.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/types/dummy/gi/Shell.js deleted file mode 100644 index db98a222..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/types/dummy/gi/Shell.js +++ /dev/null @@ -1 +0,0 @@ -export default Shell; diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/ui/WorkspacesBar.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/ui/WorkspacesBar.js deleted file mode 100644 index e3925471..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/ui/WorkspacesBar.js +++ /dev/null @@ -1,433 +0,0 @@ -import Clutter from 'gi://Clutter'; -import GObject from 'gi://GObject'; -import St from 'gi://St'; -import * as DND from 'resource:///org/gnome/shell/ui/dnd.js'; -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; -import * as PanelMenu from 'resource:///org/gnome/shell/ui/panelMenu.js'; -import { WindowPreview } from 'resource:///org/gnome/shell/ui/windowPreview.js'; -import { Settings } from '../services/Settings.js'; -import { Styles } from '../services/Styles.js'; -import { Workspaces } from '../services/Workspaces.js'; -import { Subject } from '../utils/Subject.js'; -import { Timeout } from '../utils/Timeout.js'; -import { WorkspacesBarMenu } from './WorkspacesBarMenu.js'; -/** - * Maximum number of milliseconds between button press and button release to be recognized as click. - */ -const MAX_CLICK_TIME_DELTA = 300; -/** - * Time in milliseconds until a touch event is recognized as long press. - */ -const LONG_PRESS_DURATION = 500; -export class WorkspacesBar { - constructor(_extension) { - this._extension = _extension; - this._name = `${this._extension.metadata.name}`; - this._settings = Settings.getInstance(); - this._styles = Styles.getInstance(); - this._ws = Workspaces.getInstance(); - this._buttonSubject = new Subject(null); - this._dragHandler = new WorkspacesBarDragHandler(() => this._updateWorkspaces()); - this._touchTimeout = new Timeout(); - } - init() { - this._initButton(); - this._initMenu(); - this._ws.onUpdate(() => this._updateWorkspaces()); - this._styles.onWorkspacesBarChanged(() => this._refreshTopBarConfiguration()); - this._styles.onWorkspaceLabelsChanged(() => this._updateWorkspaces()); - this._settings.alwaysShowNumbers.subscribe(() => this._updateWorkspaces()); - this._settings.enableCustomLabel.subscribe(() => this._updateWorkspaces()); - this._settings.customLabelNamed.subscribe(() => this._updateWorkspaces()); - this._settings.customLabelUnnamed.subscribe(() => this._updateWorkspaces()); - this._settings.indicatorStyle.subscribe(() => this._refreshTopBarConfiguration()); - this._settings.position.subscribe(() => this._refreshTopBarConfiguration()); - this._settings.positionIndex.subscribe(() => this._refreshTopBarConfiguration()); - } - destroy() { - this._button.destroy(); - this._menu.destroy(); - this._dragHandler.destroy(); - this._buttonSubject.complete(); - this._touchTimeout.destroy(); - } - observeWidget() { - return this._buttonSubject; - } - _refreshTopBarConfiguration() { - this._button.destroy(); - this._menu.destroy(); - this._initButton(); - this._initMenu(); - } - _initButton() { - this._button = new WorkspacesButton(0.5, this._name); - this._buttonSubject.next(this._button); - this._button.styleClass = 'panel-button space-bar'; - switch (this._settings.indicatorStyle.value) { - case 'current-workspace': - this._initWorkspaceLabel(); - break; - case 'workspaces-bar': - this._initWorkspacesBar(); - break; - } - Main.panel.addToStatusArea(this._name, this._button, this._settings.positionIndex.value, this._settings.position.value); - this._updateWorkspaces(); - } - _initMenu() { - this._menu = new WorkspacesBarMenu(this._extension, this._button.menu); - this._menu.init(); - } - _initWorkspaceLabel() { - this._button.styleClass += ' workspace-label'; - this._wsLabel = new St.Label({ - yAlign: Clutter.ActorAlign.CENTER, - }); - this._button.add_child(this._wsLabel); - this._button.connect('button-press-event', (actor, event) => { - switch (event.get_button()) { - case 1: - if (this._settings.toggleOverview.value) { - Main.overview.toggle(); - } - else { - this._button.menu.toggle(); - } - return Clutter.EVENT_STOP; - case 3: - this._button.menu.toggle(); - return Clutter.EVENT_STOP; - } - return Clutter.EVENT_PROPAGATE; - }); - } - _initWorkspacesBar() { - this._button._delegate = this._dragHandler; - this._button.trackHover = false; - this._wsBar = new St.BoxLayout({}); - this._button.add_child(this._wsBar); - } - _updateWorkspaces() { - switch (this._settings.indicatorStyle.value) { - case 'current-workspace': - this._updateWorkspaceLabel(); - break; - case 'workspaces-bar': - this._updateWorkspacesBar(); - break; - } - } - _updateWorkspaceLabel() { - const workspace = this._ws.workspaces[this._ws.currentIndex]; - this._wsLabel.set_text(this._ws.getDisplayName(workspace)); - } - _updateWorkspacesBar() { - // destroy old workspaces bar buttons - this._wsBar.destroy_all_children(); - this._dragHandler.wsBoxes = []; - // display all current workspaces buttons - for (let ws_index = 0; ws_index < this._ws.numberOfEnabledWorkspaces; ++ws_index) { - const workspace = this._ws.workspaces[ws_index]; - if (workspace.isVisible) { - const wsBox = this._createWsBox(workspace); - this._wsBar.add_child(wsBox); - this._dragHandler.wsBoxes.push({ workspace, wsBox }); - } - } - } - _createWsBox(workspace) { - const wsBox = new St.Bin({ - visible: true, - reactive: true, - canFocus: true, - trackHover: true, - styleClass: `workspace-box workspace-box-${workspace.index + 1}`, - }); - wsBox._delegate = new WorkspaceBoxDragHandler(workspace); - const label = this._createLabel(workspace); - wsBox.set_child(label); - let lastButton1PressEvent; - wsBox.connect('button-press-event', (actor, event) => { - switch (event.get_button()) { - case 1: - lastButton1PressEvent = event; - break; - case 3: - this._button.menu.toggle(); - break; - } - return Clutter.EVENT_PROPAGATE; - }); - // Activate workspaces on button release to not interfere with drag and drop, but make sure - // we saw a corresponding button-press event to avoid activating workspaces when the click - // already triggered another action like closing a menu. - wsBox.connect('button-release-event', (actor, event) => { - switch (event.get_button()) { - case 1: - if (lastButton1PressEvent) { - const timeDelta = event.get_time() - lastButton1PressEvent.get_time(); - if (timeDelta <= MAX_CLICK_TIME_DELTA) { - this._ws.activate(workspace.index); - } - lastButton1PressEvent = null; - } - break; - } - return Clutter.EVENT_PROPAGATE; - }); - let lastTouchBeginEvent; - wsBox.connect('touch-event', (actor, event) => { - switch (event.type()) { - case Clutter.EventType.TOUCH_BEGIN: - lastTouchBeginEvent = event; - this._touchTimeout - .once(LONG_PRESS_DURATION) - .then(() => this._button.menu.toggle()); - break; - case Clutter.EventType.TOUCH_END: - if (lastTouchBeginEvent) { - const timeDelta = event.get_time() - lastTouchBeginEvent.get_time(); - if (timeDelta <= MAX_CLICK_TIME_DELTA) { - this._ws.activate(workspace.index); - } - lastTouchBeginEvent = null; - } - this._touchTimeout.clearTimeout(); - break; - case Clutter.EventType.TOUCH_CANCEL: - this._touchTimeout.clearTimeout(); - break; - } - return Clutter.EVENT_PROPAGATE; - }); - this._dragHandler.setupDnd(wsBox, workspace, { - onDragStart: () => this._touchTimeout.clearTimeout(), - }); - return wsBox; - } - _createLabel(workspace) { - const label = new St.Label({ - yAlign: Clutter.ActorAlign.CENTER, - styleClass: 'space-bar-workspace-label', - }); - if (workspace.index == this._ws.currentIndex) { - label.styleClass += ' active'; - } - else { - label.styleClass += ' inactive'; - } - if (workspace.hasWindows) { - label.styleClass += ' nonempty'; - } - else { - label.styleClass += ' empty'; - } - const text = this._ws.getDisplayName(workspace); - label.set_text(text); - if (text.trim() === '') { - label.styleClass += ' no-text'; - } - return label; - } -} -var WorkspacesButton = GObject.registerClass(class WorkspacesButton extends PanelMenu.Button { - vfunc_event() { - return Clutter.EVENT_PROPAGATE; - } -}); -class WorkspacesBarDragHandler { - constructor(_updateWorkspaces) { - this._updateWorkspaces = _updateWorkspaces; - this.wsBoxes = []; - this._ws = Workspaces.getInstance(); - this._barWidthAtDragStart = null; - this._hasLeftInitialPosition = false; - this._workspacesBarOffset = null; - } - destroy() { - this._setDragMonitor(false); - } - setupDnd(wsBox, workspace, hooks) { - const draggable = DND.makeDraggable(wsBox, {}); - draggable.connect('drag-begin', () => { - this._onDragStart(wsBox, workspace); - hooks.onDragStart(); - }); - draggable.connect('drag-cancelled', () => { - this._updateDragPlaceholder(this._initialDropPosition); - this._onDragFinished(wsBox); - }); - draggable.connect('drag-end', () => { - this._updateWorkspaces(); - }); - } - acceptDrop(source, actor, x, y) { - if (source instanceof WorkspaceBoxDragHandler) { - const dropPosition = this._getDropPosition(); - if (dropPosition) { - if (this._draggedWorkspace.index !== dropPosition?.index) { - this._ws.reorderWorkspace(this._draggedWorkspace.index, dropPosition?.index); - } - } - this._updateWorkspaces(); - this._onDragFinished(actor); - return true; - } - else { - return false; - } - } - handleDragOver(source) { - if (source instanceof WorkspaceBoxDragHandler) { - const dropPosition = this._getDropPosition(); - this._updateDragPlaceholder(dropPosition); - } - return DND.DragMotionResult.CONTINUE; - } - _onDragStart(wsBox, workspace) { - wsBox.add_style_class_name('dragging'); - this._draggedWorkspace = workspace; - this._setDragMonitor(true); - this._barWidthAtDragStart = this._getBarWidth(); - this._setUpBoxPositions(wsBox, workspace); - } - _onDragFinished(wsBox) { - wsBox.remove_style_class_name('dragging'); - this._draggedWorkspace = null; - this._wsBoxPositions = null; - this._initialDropPosition = null; - this._hasLeftInitialPosition = false; - this._barWidthAtDragStart = null; - this._setDragMonitor(false); - } - _setDragMonitor(add) { - if (add) { - this._dragMonitor = { - dragMotion: this._onDragMotion.bind(this), - }; - DND.addDragMonitor(this._dragMonitor); - } - else if (this._dragMonitor) { - DND.removeDragMonitor(this._dragMonitor); - } - } - _onDragMotion(dragEvent) { - this._updateDragPlaceholder(this._initialDropPosition); - return DND.DragMotionResult.CONTINUE; - } - _setUpBoxPositions(wsBox, workspace) { - const boxIndex = this.wsBoxes.findIndex((box) => box.workspace === workspace); - this._wsBoxPositions = this._getWsBoxPositions(boxIndex, wsBox.get_width()); - this._initialDropPosition = this._getDropPosition(); - this._updateDragPlaceholder(this._initialDropPosition); - } - _getDropPosition() { - const draggedWsBox = this.wsBoxes.find(({ workspace }) => workspace === this._draggedWorkspace)?.wsBox; - for (const { index, center, wsBox } of this._wsBoxPositions) { - if (draggedWsBox.get_x() < center + this._getWorkspacesBarOffset()) { - return { index, wsBox, position: 'before', width: draggedWsBox.get_width() }; - } - } - if (this._wsBoxPositions.length > 0) { - const lastWsBox = this._wsBoxPositions[this._wsBoxPositions.length - 1].wsBox; - return { - index: this._ws.lastVisibleWorkspace, - wsBox: lastWsBox, - position: 'after', - width: draggedWsBox.get_width(), - }; - } - } - _getWsBoxPositions(draggedBoxIndex, draggedBoxWidth) { - const positions = this.wsBoxes - .filter(({ workspace }) => workspace !== this._draggedWorkspace) - .map(({ workspace, wsBox }) => ({ - index: getDropIndex(this._draggedWorkspace, workspace), - center: getHorizontalCenter(wsBox), - wsBox, - })); - positions.forEach((position, index) => { - if (index >= draggedBoxIndex) { - position.center -= draggedBoxWidth; - } - }); - return positions; - } - _updateDragPlaceholder(dropPosition) { - if (dropPosition?.index === this._initialDropPosition?.index && - dropPosition?.position === this._initialDropPosition?.position) { - if (!this._getHasLeftInitialPosition()) { - return; - } - } - else { - this._hasLeftInitialPosition = true; - } - for (const { wsBox } of this.wsBoxes) { - if (wsBox === dropPosition?.wsBox) { - if (dropPosition.position === 'before') { - wsBox?.set_style('margin-left: ' + dropPosition.width + 'px'); - } - else { - wsBox?.set_style('margin-right: ' + dropPosition.width + 'px'); - } - } - else { - wsBox.set_style(null); - } - } - } - _getBarWidth() { - return this.wsBoxes[0].wsBox.get_parent().get_width(); - } - _getHasLeftInitialPosition() { - if (this._hasLeftInitialPosition) { - return true; - } - if (this._barWidthAtDragStart !== this._getBarWidth()) { - this._hasLeftInitialPosition = true; - } - return this._hasLeftInitialPosition; - } - _getWorkspacesBarOffset() { - if (this._workspacesBarOffset === null) { - this._workspacesBarOffset = 0; - let widget = this.wsBoxes[0].wsBox.get_parent(); - while (widget) { - this._workspacesBarOffset += widget.get_x(); - widget = widget.get_parent(); - } - } - return this._workspacesBarOffset; - } -} -class WorkspaceBoxDragHandler { - constructor(_workspace) { - this._workspace = _workspace; - } - acceptDrop(source) { - if (source instanceof WindowPreview) { - source.metaWindow.change_workspace_by_index(this._workspace.index, false); - } - } - handleDragOver(source) { - if (source instanceof WindowPreview) { - return DND.DragMotionResult.MOVE_DROP; - } - else { - return DND.DragMotionResult.CONTINUE; - } - } -} -function getDropIndex(draggedWorkspace, workspace) { - if (draggedWorkspace.index < workspace.index) { - return workspace.index - 1; - } - else { - return workspace.index; - } -} -function getHorizontalCenter(widget) { - return widget.get_x() + widget.get_width() / 2; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/ui/WorkspacesBarMenu.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/ui/WorkspacesBarMenu.js deleted file mode 100644 index 59bb36ee..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/ui/WorkspacesBarMenu.js +++ /dev/null @@ -1,162 +0,0 @@ -import Clutter from 'gi://Clutter'; -import GObject from 'gi://GObject'; -import St from 'gi://St'; -import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js'; -import { KeyBindings } from '../services/KeyBindings.js'; -import { Settings } from '../services/Settings.js'; -import { WorkspaceNames } from '../services/WorkspaceNames.js'; -import { Workspaces } from '../services/Workspaces.js'; -export class WorkspacesBarMenu { - constructor(_extension, _menu) { - this._extension = _extension; - this._menu = _menu; - this._keyBindings = KeyBindings.getInstance(); - this._settings = Settings.getInstance(); - this._ws = Workspaces.getInstance(); - this._wsNames = WorkspaceNames.getInstance(); - this._hiddenWorkspacesSection = new PopupMenu.PopupMenuSection(); - this._manageWorkspaceSection = new PopupMenu.PopupMenuSection(); - } - init() { - this._menu.box.add_style_class_name('space-bar-menu'); - this._addSectionHeading('Rename current workspace'); - this._initEntry(); - this._menu.addMenuItem(this._hiddenWorkspacesSection); - this._initManageWorkspaceSection(); - this._initExtensionSettingsButton(); - this._menu.connect('open-state-changed', () => { - if (this._menu.isOpen) { - this._refreshMenu(); - } - }); - this._keyBindings.addKeyBinding('open-menu', () => this._menu.open()); - } - destroy() { - this._keyBindings.removeKeybinding('open-menu'); - } - _refreshMenu() { - this._refreshHiddenWorkspaces(); - this._refreshManageWorkspaceSection(); - } - _addSectionHeading(text, section) { - const separator = new PopupMenu.PopupSeparatorMenuItem(text); - separator.label.add_style_class_name('space-bar-menu-heading'); - (section ?? this._menu).addMenuItem(separator); - } - _initEntry() { - const entryItem = new PopupMenuItemEntry(); - entryItem.entry.connect('key-focus-in', () => { - const text = entryItem.entry.get_text(); - if (text.length > 0) { - entryItem.entry.get_clutter_text().set_selection(0, text.length); - } - }); - entryItem.entry.get_clutter_text().connect('activate', () => this._menu.close()); - entryItem.connect('notify::active', () => { - if (entryItem.active) { - entryItem.entry.grab_key_focus(); - } - }); - let oldName = ''; - this._menu.connect('open-state-changed', () => { - if (this._menu.isOpen) { - oldName = this._ws.workspaces[this._ws.currentIndex].name || ''; - // Reset the selection before setting the text since the entry field won't let us do - // that when it is empty. - entryItem.entry.get_clutter_text().set_selection(0, 0); - entryItem.entry.set_text(oldName); - entryItem.active = true; - } - else { - const newName = entryItem.entry.get_text(); - if (newName !== oldName) { - this._wsNames.rename(this._ws.currentIndex, newName); - } - } - }); - this._menu.addMenuItem(entryItem); - } - _initManageWorkspaceSection() { - const separator = new PopupMenu.PopupSeparatorMenuItem(); - this._menu.addMenuItem(separator); - this._menu.addMenuItem(this._manageWorkspaceSection); - } - _initExtensionSettingsButton() { - const separator = new PopupMenu.PopupSeparatorMenuItem(); - this._menu.addMenuItem(separator); - const button = new PopupMenu.PopupMenuItem(`${this._extension.metadata.name} settings`); - button.connect('activate', () => { - this._menu.close(); - this._extension.openPreferences(); - }); - this._menu.addMenuItem(button); - } - _refreshHiddenWorkspaces() { - this._hiddenWorkspacesSection.box.destroy_all_children(); - let hiddenWorkspaces; - switch (this._settings.indicatorStyle.value) { - case 'current-workspace': - hiddenWorkspaces = this._ws.workspaces.filter((workspace) => workspace.isEnabled && - workspace.index !== this._ws.currentIndex && - !this._ws.isExtraDynamicWorkspace(workspace)); - break; - case 'workspaces-bar': - if (this._settings.showEmptyWorkspaces.value || - this._settings.dynamicWorkspaces.value) { - return; - } - hiddenWorkspaces = this._ws.workspaces.filter((workspace) => workspace.isEnabled && - !workspace.hasWindows && - workspace.index !== this._ws.currentIndex); - break; - } - if (hiddenWorkspaces.length > 0) { - this._addSectionHeading('Other workspaces', this._hiddenWorkspacesSection); - hiddenWorkspaces.forEach((workspace) => { - let label; - if (this._settings.enableCustomLabelInMenus.value) { - label = this._ws.getDisplayName(workspace); - } - else { - label = this._ws.getDefaultDisplayName(workspace); - } - const button = new PopupMenu.PopupMenuItem(label); - button.connect('activate', () => { - this._menu.close(); - this._ws.activate(workspace.index); - }); - this._hiddenWorkspacesSection.addMenuItem(button); - }); - } - } - _refreshManageWorkspaceSection() { - this._manageWorkspaceSection.box.destroy_all_children(); - if (!this._settings.dynamicWorkspaces.value || - !this._settings.showEmptyWorkspaces.value || - this._settings.indicatorStyle.value === 'current-workspace') { - const newWorkspaceButton = new PopupMenu.PopupMenuItem('Add new workspace'); - newWorkspaceButton.connect('activate', () => { - this._menu.close(); - this._ws.addWorkspace(); - }); - this._manageWorkspaceSection.addMenuItem(newWorkspaceButton); - } - const closeWorkspaceButton = new PopupMenu.PopupMenuItem('Remove current workspace'); - closeWorkspaceButton.connect('activate', () => { - this._ws.removeWorkspace(this._ws.currentIndex); - }); - this._manageWorkspaceSection.addMenuItem(closeWorkspaceButton); - } -} -const PopupMenuItemEntry = GObject.registerClass(class PopupMenuItem extends PopupMenu.PopupBaseMenuItem { - _init(params) { - super._init(params); - this.entry = new St.Entry({ - xExpand: true, - }); - this.entry.connect('button-press-event', () => { - return Clutter.EVENT_STOP; - }); - this.add_child(this.entry); - } -}); diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/utils/DebouncingNotifier.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/utils/DebouncingNotifier.js deleted file mode 100644 index 7986da0c..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/utils/DebouncingNotifier.js +++ /dev/null @@ -1,37 +0,0 @@ -import GLib from 'gi://GLib'; -/** - * A subscribe/notify mechanism that debounces multiple subsequent notify calls. - */ -export class DebouncingNotifier { - constructor(_delayMs = 0) { - this._delayMs = _delayMs; - this._subscribers = []; - this._timeout = null; - } - notify() { - if (this._timeout) { - return; - } - this._timeout = GLib.timeout_add(GLib.PRIORITY_DEFAULT, this._delayMs, () => { - this._notify(); - this._timeout = null; - return GLib.SOURCE_REMOVE; - }); - } - subscribe(callback, until) { - this._subscribers.push(callback); - until?.subscribe(() => (this._subscribers = this._subscribers.filter((s) => s !== callback))); - } - destroy() { - if (this._timeout) { - GLib.Source.remove(this._timeout); - this._timeout = null; - } - this._subscribers = []; - } - _notify() { - for (const subscriber of this._subscribers) { - subscriber(); - } - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/utils/Subject.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/utils/Subject.js deleted file mode 100644 index 3247ae00..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/utils/Subject.js +++ /dev/null @@ -1,25 +0,0 @@ -export class Subject { - get value() { - return this._value; - } - constructor(value) { - this._observers = []; - this._value = value; - } - next(value) { - this._value = value; - for (const observer of this._observers) { - observer(value); - } - } - complete() { - this._observers = []; - } - subscribe(callback) { - this._observers.push(callback); - callback(this._value); - } - unsubscribe(callback) { - this._observers = this._observers.filter((cb) => cb !== callback); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/utils/Timeout.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/utils/Timeout.js deleted file mode 100644 index ecfeb461..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/utils/Timeout.js +++ /dev/null @@ -1,35 +0,0 @@ -import GLib from 'gi://GLib'; -export class Timeout { - constructor() { - this._timeoutId = null; - } - destroy() { - this.clearTimeout(); - } - tick() { - return new Promise((resolve) => { - this.clearTimeout(); - this._timeoutId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 0, () => { - this._timeoutId = null; - resolve(); - return GLib.SOURCE_REMOVE; - }); - }); - } - once(milliseconds) { - return new Promise((resolve) => { - this.clearTimeout(); - this._timeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, milliseconds, () => { - this._timeoutId = null; - resolve(); - return GLib.SOURCE_REMOVE; - }); - }); - } - clearTimeout() { - if (this._timeoutId) { - GLib.Source.remove(this._timeoutId); - this._timeoutId = null; - } - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/utils/Widget.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/utils/Widget.js deleted file mode 100644 index f289d898..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/utils/Widget.js +++ /dev/null @@ -1,9 +0,0 @@ -import { Subject } from './Subject.js'; -export function onDestroyed(widget) { - const subject = new Subject(void 0); - widget.connect('destroy', () => { - subject.next(); - subject.complete(); - }); - return subject; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/utils/hook.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/utils/hook.js deleted file mode 100644 index 75662ceb..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/space-bar@luchrioh/utils/hook.js +++ /dev/null @@ -1,28 +0,0 @@ -let _destroyFunctions = []; -/** - * Calls `callback` when the given upstream function gets called. - */ -export function hook(classObject, functionName, pos, callback) { - const _originalFunction = classObject.prototype[functionName]; - if (pos === 'before') { - classObject.prototype[functionName] = function (...args) { - callback(this, ...args); - _originalFunction.apply(this, args); - }; - } - else { - classObject.prototype[functionName] = function (...args) { - _originalFunction.apply(this, args); - callback(this, ...args); - }; - } - _destroyFunctions.push(() => { - classObject.prototype[functionName] = _originalFunction; - }); -} -export function destroyAllHooks() { - for (const f of _destroyFunctions) { - f(); - } - _destroyFunctions = []; -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/COPYING b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/COPYING deleted file mode 100644 index e55e5b8a..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/COPYING +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/NEWS b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/NEWS deleted file mode 100644 index 716a8894..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/NEWS +++ /dev/null @@ -1,1462 +0,0 @@ -46.2 -==== -* apps-menu: Fix a11y of category labels [Florian; !319] -* window-list: Fix long-press support [Florian; !320] -* Misc. bug fixes and cleanups [Florian; !324] - -Contributors: - Florian Müllner - -Translators: - Hugo Carvalho [pt], Jose Riha [sk], Jordi Mas i Hernandez [ca], - Scrambled 777 [hi] - -46.1 -==== -* screenshot-window-sizer: Add flathub-recommended size [Florian; !317] - -Contributors: - Florian Müllner - -Translators: - Rachida SACI [kab], Matheus Polkorny [pt_BR], Fabio Tomat [fur] - -46.0 -==== -* system-monitor: Fix net speed [Florian; !313] -* Misc. bug fixes and cleanups [Aral; !311] - -Contributors: - Aral Balkan, Florian Müllner - -Translators: - Anders Jonsson [sv], Piotr Drąg [pl], Balázs Úr [hu], Milo Casagrande [it], - Quentin PAGÈS [oc], Athmane MOKRAOUI [kab], Changwoo Ryu [ko], - Ask Hjorth Larsen [da] - -46.rc -===== -* Fix window previews in workspace indicator [Florian; !304] -* Fix menu ornament in workspace indicator [Florian; !305] -* Misc. bug fixes and cleanups [Florian; !306, !309] - -Contributors: - Florian Müllner - -Translators: - Danial Behzadi [fa], Ekaterine Papava [ka], Sabri Ünal [tr], Artur S0 [ru], - Yuri Chornoivan [uk], Vasil Pupkin [be], Asier Sarasua Garmendia [eu], - Yaron Shahrabani [he], Brage Fuglseth [nb], Nathan Follens [nl], - Aurimas Černius [lt], Matej Urbančič [sl], Boyuan Yang [zh_CN], - Kukuh Syafaat [id], Fran Dieguez [gl], Andi Chandler [en_GB], - Baurzhan Muftakhidinov [kk], Rūdolfs Mazurs [lv], Guillaume Bernard [fr], - Daniel Mustieles [es], Jiri Grönroos [fi] - -46.beta -======= -* apps-menu: Rename Applications to Apps [Allan; !299] -* Misc. bug fixes and cleanups [Florian; !296, !297, !300, !301, !302] - -Contributors: - Allan Day, Florian Müllner - -Translators: - Gabriel Brand [de], Daniel Rusek [cs], Fran Dieguez [gl], - Aefgh Threenine [th], Vasil Pupkin [be], Artur S0 [ru], Yosef Or Boczko [he], - Sabri Ünal [tr] - -46.alpha -======== -* workspace-indicator: Fix initial preview visibility [Florian; !280, !292] -* screenshot-window-sizer: Fix cycling between sizes backwards [Florian; !284] -* Add back overview in Classic session [Florian; !287] -* Allow running Classic session headless [Jonas; !289] -* window-list: Fix buttons not being clickable at the screen edge - [Florian; !291] -* Add system-monitor extension [Florian; !277] -* Fixed crash [Florian; !290] -* Misc. bug fixes and cleanups [Florian; !276, !275, !278, !281, !286, !288] - -Contributors: - Jonas Ådahl, Florian Müllner - -Translators: - Kristjan SCHMIDT [eo], Brage Fuglseth [nb] - -45.0 -==== - -Contributors: - Andre Klapper - -Translators: - Bruce Cowan [en_GB] - -45.rc -===== -* Misc. bug fixes and cleanups [Florian; !267, !224, !272] - -Contributors: - Florian Müllner - -Translators: - Sabri Ünal [tr], Florentina Musat [ro], A S Alam [pa] - -45.beta -======= -* Port extensions to ESM [Florian; !259, !266, !268, !269] -* Misc. bug fixes and cleanups [Florian; !260, !261, !262, !263, !264] - -Contributors: - Florian Müllner - -Translators: - Efstathios Iosifidis [el] - -45.alpha -======== -* window-list: Modernize default styling [Alexander; !253] -* Replace classic styling with built-in light style [Florian; !254] -* window-list: Add tooltip for long window titles [Arik; !251] -* light-style: New extension [Florian; !256] -* Misc. bug fixes and cleanups [Florian; !255, !257] - -Contributors: - Florian Müllner, Arik W, Alexander Weichart - -44.0 -==== -* Bump version - -44.rc -===== -* Bump version - -44.beta -======= -* Tweak menu alignment [robxnano; !246] - -Contributors: - Florian Müllner, robxnano - -Translators: - Vasil Pupkin [be] - -43.1 -==== -* Fixed crash [Florian; !243] -* Misc. bug fixes and cleanups [mowemcfc; !244] - -Contributors: - Florian Müllner, mowemcfc - -Translators: - Sabri Ünal [tr] - -43.0 -==== - -Contributors: - Florian Müllner - -Translators: - Pawan Chitrakar [ne], Zurab Kargareteli [ka], Aleksandr Melman [ru] - -43.rc -===== -* Misc. bug fixes and cleanups [Florian; !240] - -Contributors: - Florian Müllner - -43.beta -======= -* Misc. bug fixes and cleanups [Florian; !237, !238] - -Contributors: - Florian Müllner - -Translators: - Nart Tlisha [ab] - -43.alpha -======== - -Contributors: - Florian Müllner - -Translators: - Marco Ciampa [it] - -42.3 -==== -* screenshot-window-sizer: Fix reported sizes on wayland [Florian; !232] -* window-list: Improve touch support [Florian; !233] - -Contributors: - Florian Müllner - -42.2 -==== -* native-window-placement: Adjust to gnome-shell 42 changes [Florian; !229] -* window-list: Fix visibility on non-primary monitors [Jason; !230] - -Contributors: - Jason Lynch, Florian Müllner - -Translators: - Cheng-Chia Tseng [zh_TW] - -42.1 -==== -* Misc. bug fixes and cleanups [Florian; !223, !222, !225] - -Contributors: - Florian Müllner - -Translators: - Milo Casagrande [it], Rūdolfs Mazurs [lv], Nathan Follens [nl], - Ngọc Quân Trần [vi], Zurab Kargareteli [ka] - -42.0 -==== - -Translators: - Philipp Kiemle [de], Balázs Úr [hu], Марко Костић [sr], sicklylife [ja], - Baurzhan Muftakhidinov [kk] - -42.rc -===== -* Misc. bug fixes and cleanups [Florian; !215, !218] - -Contributors: - Florian Müllner - -Translators: - Marek Černocký [cs], Dušan Kazik [sk], Piotr Drąg [pl], Jiri Grönroos [fi], - Luna Jernberg [sv], Alan Mortensen [da], Charles Monzat [fr], - Changwoo Ryu [ko] - -42.beta -======= -* workspace-indicator: Fix cancelling editing with Esc [Florian; !208] -* window-list: Update window tracking to avoid missing icons [Florian; !207] -* Use libadwaita for preferences [Florian; !209, !213] -* Adapt to Clutter grab API changes [Florian; !212] -* Misc. bug fixes and cleanups [Jan, Florian; !210, !214] - -Contributors: - Jan Beich, Florian Müllner, Naala Nanba - -Translators: - Boyuan Yang [zh_CN], Matej Urbančič [sl], Naala Nanba [ab], - Alexander Shopov [bg], Emin Tufan Çetin [tr] - -42.alpha -======== -* native-window-placement: Fix distorted layout in app grid [Sebastian; !189] -* window-list: Fix on-screen keyboard [Florian; !199] -* Misc. bug fixes and cleanups [Neal; Just; !195, !197] - -Contributors: - Piotr Drąg, Neal Gompa, Sebastian Keller, Florian Müllner, Just Perfection - -Translators: - Goran Vidović [hr], Sveinn í Felli [is], Yuri Chornoivan [uk], - Fabio Tomat [fur], Quentin PAGÈS [oc], Hugo Carvalho [pt], - Yaron Shahrabani [he], Jordi Mas i Hernandez [ca], MohammadSaleh Kamyab [fa], - Fran Dieguez [gl], Daniel Mustieles [es], Aleksandr Melman [ru], - Aurimas Černius [lt], Asier Sarasua Garmendia [eu], Kukuh Syafaat [id], - Rafael Fontenelle [pt_BR] - -41.0 -==== -* Bump version - -41.rc.1 -======= -* Fix pre-generating stylesheets in tarball [Florian; !190] - -Contributors: - Florian Müllner - -41.rc -===== -* window-list: Adapt to overview-on-startup [Florian; !185] -* apps-menu: Use a custom 'toggle-menu' shortcut [Florian; !173] -* Misc. bug fixes and cleanups [Florian; !186] - -Contributors: - Florian Müllner - -41.beta -======= -* window-list: Extend reactive area of minimap to screen edges [Adam; !171] -* drive-menu: Improve detection of network mounts [Florian; !27, !176] -* Use distinct gettext domain for e.g.o uploads [Florian; #335] -* Misc. bug fixes and cleanups [Florian; !172, !174, !177, !167, !178, !180, - !181, !182, !183] - -Contributors: - Marco Trevisan (Treviño), Adam Goode, Florian Müllner - -Translators: - Hugo Carvalho [pt], Juliano de Souza Camargo [pt], Alexander Shopov [bg] - -40.1 -==== -* Disable welcome dialog in classic session [Florian; !169] -* windowsNavigator: Adjust to a late gnome-shell change [Florian; !170] - -Contributors: - Florian Müllner - -Translators: - Ngọc Quân Trần [vi], Anders Jonsson [sv], Carmen Bianca BAKKER [eo], - Pawan Chitrakar [ne], Quentin PAGÈS [oc] - -40.0 -==== - -Translators: - Jiri Grönroos [fi] - -40.rc -===== -* native-window-placement: Adjust to gnome-shell changes [Florian; !164] -* windows-navigator: Adjust to gnome-shell changes [Florian; !163] -* window-list, workspace-indicator: Only show previews for up to six workspaces - [Florian; !165] -* window-list, workspace-indicator: Improve workspace preview appearance - [Florian; !166] - -Contributors: - Florian Müllner - -Translators: - Fran Dieguez [gl] - -40.beta -======= -* Add tooltips to workspace thumbnails [Florian; !155] -* Drop arrows from top bar menus [Florian; !156] -* drive-menu: Mark mounts that can be unmounted as removable [Michael; !152] -* Remove horizontal-workspaces extension [Florian; !158] -* Adjust to shell overview changes [Florian; !159, !160] -* Fix crashes [Daniel; !157] -* Misc. bug fixes and cleanups [Florian; !154, !161] - -Contributors: - Michael Lawton, Florian Müllner, Daniel van Vugt - -Translators: - Аляксей [be], A S Alam [pa] - -40.alpha.1 -========== -* Don't depend on sassc when building from tarball [Florian; !150] -* Port extensions preferences to GTK4 [Florian; !148] -* Misc. bug fixes and cleanups [Florian, Jonas; !149, !151, !153] - -Contributors: - Jonas Dreßler, Florian Müllner - -40.alpha -======== -* window-list: Honor changes in skip-taskbar property [Sergio; !130] -* window-list, workspace-indicator: Adjust to 3.38 changes [Florian; !133] -* window-list, workspace-indicator: Improve previews in workspace thumbs - [Florian; #260, !142] -* auto-move: Improve behavior on multi-monitor setups [Florian; !135] -* windowNavigator: Adjust to 3.38 changes [Thun; #259] -* Misc. bug fixes and cleanups [Florian, Jonas Å, Jordan, Ray; !131, !136, - !137, !140, !141, !144, !146, !145] - -Contributors: - Sergio Costas, Florian Müllner, Jordan Petridis, Thun Pin, Ray Strode, - Jonas Ådahl - -Translators: - Fabio Tomat [fur], Jordi Mas [ca] - -3.38.1 -====== - -Contributors: - Yacine Bouklif, Florian Müllner - -Translators: - Yacine Bouklif [kab], Cheng-Chia Tseng [zh_TW], Stas Solovey [ru], - Yosef Or Boczko [he] - -3.38.0 -====== - -Translators: - Balázs Meskó [hu], Alan Mortensen [da], Juliano Camargo [pt], Tim Sabsch [de], - Milo Casagrande [it], Rūdolfs Mazurs [lv] - -3.37.92 -======= - -Translators: - Nathan Follens [nl], Zander Brown [en_GB], Aurimas Černius [lt], - Marek Černocký [cs], Changwoo Ryu [ko], Dušan Kazik [sk] - -3.37.91 -======= - -Contributors: - Florian Müllner - -Translators: - Fran Dieguez [gl], Akarshan Biswas [bn_IN], Kukuh Syafaat [id], - Piotr Drąg [pl], Rafael Fontenelle [pt_BR], Jiri Grönroos [fi], - Марко Костић [sr], Goran Vidović [hr] - -3.37.90 -======= -* Misc. bug fixes and cleanups [Florian, Piotr; !126, !128] - -Contributors: - Piotr Drąg, Florian Müllner - -Translators: - Fabio Tomat [fur], Efstathios Iosifidis [el], Anders Jonsson [sv], - Asier Sarasua Garmendia [eu], Alexandre Franke [fr] - -3.37.3 -====== -* window-list, native-window-placement: Adjust to shell changes [Florian; !124] - -Contributors: - Florian Müllner - -Translators: - Jordi Mas [ca], sicklylife [ja], Boyuan Yang [zh_CN], - Baurzhan Muftakhidinov [kk] - -3.37.2 -====== -* window-list, auto-move: Modernize preference dialogs [Florian; !121] -* Adjust to gnome-shell changes [Florian; !122] - -Contributors: - Florian Müllner - -Translators: - Cheng-Chia Tseng [zh_TW], Yuri Chornoivan [uk], Daniel Mustieles [es], - Emin Tufan Çetin [tr], Danial Behzadi [fa], Daniel Șerbănescu [ro], - Matej Urbančič [sl] - -3.37.1 -====== -* drive-menu: Emphasize eject buttons [Florian; #223] -* user-theme: Add preference dialog [Florian; !117] -* window-list: Fix inconsistent state in preference dialog [Milan; !119] -* workspace-indicator: Overhaul preference dialog [Florian; !120] -* user-theme: Support session mode styles [Florian; !118] -* Misc. bug fixes and cleanups [Florian, Xiaoguang; !113, !106, !114, !116] - -Contributors: - Milan Crha, Florian Müllner, Xiaoguang Wang - -Translators: - Daniel Korostil [uk], Yosef Or Boczko [he], Kristjan SCHMIDT [eo], - Dz Chen [zh_CN], Danial Behzadi [fa], Yuri Chornoivan [uk], - Anders Jonsson [sv], Daniel Mustieles [es] - -3.36.0 -====== - -Contributors: - Florian Müllner - -3.35.91 -======= - -Contributors: - Florian Müllner - -Translators: - Zander Brown [en_GB] - -3.35.90 -======= -* Adjust to gnome-shell changes [Florian; !100, !101, !102] -* Force single-line window titles in window list [Florian; #202] -* Misc. bug fixes and cleanup [Florian; !104, !105] - -Contributors: - Florian Müllner - -Translators: - sicklylife [ja], Umarzuki Bin Mochlis Moktar [ms] - -3.35.3 -====== - -Translators: - Fran Dieguez [gl] - -3.35.2 -====== -* Adjust to gnome-shell changes [Marco, Florian; !89, !95, !96] -* window-list, workspace-indicator: Exclude DESKTOP windows from previews - [Florian; !93] -* screenshot-window-sizer: Fix cycling through all valid sizes [Willy; !97] - -Contributors: - Marco Trevisan (Treviño), Florian Müllner, Willy Stadnick - -3.34.1 -====== -* Adjust to gnome-settings-daemon plugin removals [Xiaoguang; !94] - -Contributors: - Florian Müllner, Xiaoguang Wang - -Translators: - Nathan Follens [nl], Dušan Kazik [sk], Ask Hjorth Larsen [da], - Yi-Jyun Pan [zh_TW] - -3.34.0 -====== - -Translators: - Rafael Fontenelle [pt_BR], Efstathios Iosifidis [el], Milo Casagrande [it], - Sabri Ünal [tr] - -3.33.92 -======= - -Translators: - Марко Костић [sr], Tim Sabsch [de], Rūdolfs Mazurs [lv], Matej Urbančič [sl], - Balázs Úr [hu], Claude Paroz [fr], Fran Dieguez [gl], Changwoo Ryu [ko], - Ryuta Fujii [ja], Fabio Tomat [fur], Goran Vidović [hr] - -3.33.91 -======= -* Misc. bug fixes and cleanups [Florian; !88, !90, !91, !92] - -Contributors: - Florian Müllner - -Translators: - Asier Sarasua Garmendia [eu], Anders Jonsson [sv], Marek Černocký [cs], - Kukuh Syafaat [id], Jiri Grönroos [fi], Florentina Mușat [ro], - Aurimas Černius [lt], Daniel Mustieles [es], Piotr Drąg [pl], Jordi Mas [ca], - Danial Behzadi [fa] -3.33.90 -======= -* window-list: Support showing windows from all workspaces [Florian; #154] -* Misc. bug fixes and cleanups [Florian; !86, !87] - -Contributors: - Florian Müllner - -Translators: - Jor Teron [mjw] - -3.33.4 -====== -* Make GNOME Classic more classic: - - Disable GNOME 3 overview [Florian; !69] - - Add window picker button to window list [Florian; !73, !80] - - Style improvements and fixes [Jakub; #169, !82] - - Support horizontal workspace layout in window list [Florian; !70] - - Add draggable previews to window list workspace switcher [Florian; !74] - - Arrange workspaces horizontally [Florian; !72] -* workspace-indicator: Support horizontal workspace layout [Florian; !71] -* workspace-indicator: Add draggable previews [Florian; !77] -* Misc. bug fixes and cleanups [Florian; !75, !76, !79, !78, #168, !84] - -Contributors: - Florian Müllner, Jakub Steiner, Jor Teron - -Translators: - Jor Teron [mjw] - -3.33.3 -====== -* Misc. bug fixes [Florian, Marco; !67, !68] - -Contributors: - Florian Müllner, Marco Trevisan (Treviño) - -3.33.2 -====== -* Misc. bug fixes and cleanups [Florian; !66] - -Contributors: - Florian Müllner - -3.33.1 -====== -* Misc. bug fixes [Florian; !64] - -Contributors: - Florian Müllner - -3.32.1 -====== -* Fix windowsNavigator extension after ES6 port [Florian; #143] -* screenshot-window-sizer: Add phone screenshot sizes [Adrien; !65] -* Misc. bug fixes and cleanups [Fabian; !62] - -Contributors: - Florian Müllner, Adrien Plazas, Fabian P. Schmidt - -3.32.0 -====== - -Contributors: - Florian Müllner - -Translations: - Victor Ibragimov [tg], Kristjan SCHMIDT [eo], Mart Raudsepp [et] - -3.31.92 -======= -* Misc. bug fixes and cleanups [Florian; !57, !58, !59, !60] - -Contributors: - Florian Müllner - -3.31.91 -======= -* apps-menu: Remove outdated legacy-tray handling [Florian; !53] -* user-theme: Allow using XDG user data dir [Tomasz; !55] -* Misc. bug fixes and cleanups [Florian; !52, !54, !56] - -Contributors: - Tomasz Gąsior, Florian Müllner - -Translators: - Matej Urbančič [sl], Gun Chleoc [gd] - -3.31.90 -======= -* Misc. bug fixes and cleanups [Florian; !49, !50, !51] - -Contributors: - Florian Müllner - -Translators: - Ryuta Fujii [ja], Charles Monzat [fr], Pieter Schalk Schoeman [af] - -3.31.2 -====== -* Remove obsolete alternate-tab extension [Florian; #786496] -* Adjust to gnome-shell changes [Florian; #113] - -Contributors: - Florian Müllner - -3.30.1 -====== -* apps-menu: Fix height on HiDPI systems [Florian; #102] -* window-list: Only switch between windows on active workspace when scrolling - [Florian; #78] - -Contributors: - Florian Müllner - -3.30.0 -====== -* Bump version - -3.29.91 -======= -* Misc. bug fixes [Florian; #90] - -Contributors: - Florian Müllner - -3.29.90 -======= -* Misc. bug fixes [Florian; #786496] - -Contributors: - Florian Müllner - -3.29.3 -====== -* Adjust to global.screen removal [Jonas; #759538] - -Contributors: - Jonas Ådahl, Florian Müllner - -3.29.2 -====== -* Misc. bug fixes [Florian; #69] - -Contributors: - Florian Müllner - -3.28.1 -====== -* Misc. bug fixes [Xiaoguang, Florian; #59, #62] - -Contributors: - Florian Müllner, Xiaoguang Wang - -Translators: - Dz Chen [zh_CN] - -3.28.0 -====== - -Contributors: - Florian Müllner, Xiaoguang Wang - -Translators: - Aman Alam [pa], Bruce Cowan [en_GB] - -3.27.92 -======= - -Contributors: - Florian Müllner - -Translators: - Piotr Drąg [es], GNOME Translation Robot [gd], Daniel Șerbănescu [ro] - -3.27.91 -======= -* places-menu: Support unmounting ejectable places [Rémy; #17] -* apps-menu: Support separators and custom sort order [Florian; #27] -* Port to meson [Florian; #31, #45] -* window-list: Fix missing icons on wayland [Florian; #10] -* places-menu: Fix terminating gnome-shell with recent gjs [Florian; #44] -* auto-move: Make it work with wayland windows [Florian; #33] -* Classic theme fixes [Florian, Jonas; #26, #41, #39, #40] -* Require sassc for classic styling [Florian; !28] -* Misc. bug fixes [Piotr, Florian; #772211, #32, #30] - -Contributors: - Jeremy Bicha, Piotr Drąg, Jonas Kümmerlin, Rémy Lefevre, Iñigo Martínez, - Florian Müllner - -Translators: - Matej Urbančič [sl], Kjartan Maraas [nb] - -3.27.1 -====== -* updated translations (ca@valencia) - -3.26.1 -====== -* native-window-placement: Adjust to gnome-shell changes -* updated translations: el, fa, ru, sv - -3.26.0 -====== -* updated translations (be, bg, ca, da, eu, fi, is, it, ko, lv, ml, - nl, pt_BR, vi, zh_TW) - -3.25.91 -======= -* updated translations (ca, fr, it, pl, pt_BR, sr, sr@latin, tr) - -3.25.90 -======= -* updated translations (es, gl, hr, hu, kk, sl, sv, sv) - -3.25.4 -====== -* screenshot-window-sizer: Fix backward cycling -* updated translations (ar, be, ca, cs, de, fur, id, lt, pl, sk) - -3.25.3 -====== -* places-menu: Use mount operation if necessary -* window-list: Respect MWM hints -* updated translations (es, fur, kk) - -3.25.2 -====== -* places-menu: Make URI launching asynchronous -* updated translations (de, fur, hr, hu, id, sl) - -3.25.1 -====== -* apps-menu: Mark copied launchers as trusted -* places-menu: Make icon lookup asynchronous -* updated translations (hr) - -3.24.1 -====== -* apps-menu: Allow creating desktop launchers via DND -* updated translations (el, vi) - -3.24.0 -====== -* updated translations (lv, tr) - -3.23.92 -======= -* update classic theme -* updated translations (be, ko, ca, da, cs, ru, lt) - -3.23.91 -======= -* updated translations (de, es, eu, fi, fr, fur, gl, hu, id, it, kk, nb, pl, pt_BR, - sk, sr, sr@latin, sv, uk, zh_TW) - -3.23.90 -======= -* window-list: Improve styling -* window-list: Hide workspace indicator when there's a single (static) workspace -* new translation (be) - -3.23.2 -====== -* alternateTab: Don't take over 'switch-group' shortcut -* updated translations (zh_CN) - -3.22.1 -====== -* window-list: Update icon on app changes - -3.22.0 -====== -* updated translations (en_GB) - -3.21.92 -======= -* update style -* updated translations (pl, vi) - -3.21.91 -======= -* updated translations (pl) - -3.21.90 -======= -* updated translations (es, gu) - -3.21.4 -====== -* apps-menu: Fix entries from non-standard AppDir directories - -3.21.3 -====== -* adjust to gnome-shell changes -* updated translations (oc) - -3.21.2 -====== -* version bump, nothing to see here - -3.20.1 -====== -* update classic style -* updated translations (gd, oc) - -3.20.0 -====== -* version bump, nothing to see here - -3.19.92 -======= -* version bump, nothing to see here - -3.19.91 -======= -* updated translations (oc) - -3.19.90 -======= -* version bump, nothing to see here - -3.19.4 -====== -* screenshot-window-sizer: HiDPI support -* Fix gnome-shell component in classic session -* updated translations (lt) - -3.19.3 -====== -* native-window-placement: Don't let border overlap title -* apps-menu: Fix handling of .desktop files in subdirectories -* updated translations (is) - -3.19.2 -====== -* updated translations (gd) - -3.19.1 -====== -* Fix some theme issues - -3.18.1 -====== -* window-list: Fix accessibility of window buttons -* apps-menu: Fix unreliable highlight -* updated translations (ar) - -3.18.0 -====== -* Bump version - -3.17.92 -======= -* places: Include DESKTOP when desktop icons are enabled -* updated translations (fa) - -3.17.91 -======= -* updated translations (nl, pl, zh_TW) - -3.17.90 -======= -* window-list: Improve application ordering -* workspace-indicator: Use consistent workspace numbering - -3.17.4 -====== -* updated translations (fur) - -3.17.3 -====== -* window-list: Adjust with text-scaling-factor -* classic style updates -* updated translations (pt, ro) - -3.17.2 -====== -* updated translations (oc, pt, zh_CN) - -3.17.1 -====== -* style updates -* updated translations (oc) - -3.16.1 -====== -* window-list: Fix workspace indicators popup menu position -* apps-menu: Fix taking over panel-main-menu shortcut -* updated translations (et, ja, lv) - -3.16.0 -====== -* updated translations (ca) - -3.15.92 -======= -* classic: Update theme -* update for mutter API changes -* updated translations (bg, bs, da, fi, pa, ru, sr, sr@latin, tg) - -3.15.91 -======= -* classic: Update theme -* systemMonitor extension was removed, as the message tray where it - put its indicator no longer exists -* window-list: Adjust for gnome-shell changes -* updated translations (gl, it, kk, ko, lt, pl, sk, uk, zh_TW) - -3.15.90 -======= -* classic: Visual refresh based on new shell theme -* window-list: Adjust for gnome-shell changes -* updated translations (an, el, eo, eu, fr, he, is, sv, tr) - -3.15.4 -====== -* window-list: Improve interaction with system modal dialogs -* updated translations (cs, de, es, eu, fur, hu, id, nb, pt_BR, ru, sl, vi) - -3.15.3.1 -======== -* adjust to gnome-shell change - -3.15.3 -====== -* classic-mode: Add high-contrast theme variant, drop .desktop file -* places-menu: Fix error when XDG user directories are not set up -* window-list: Add option to show on all monitors -* updated translations (eu, hu, kk, ro, tr) - -3.15.2 -====== -* removable-drive, user-theme, window-list: Update for gnome-shell changes -* apps-menu: Fix some visual glitches -* Fix classic mode style -* updated translations (an, cs, he, vi) - -3.15.1 -====== - * updated translations (es, nb) - -3.14.1 -====== - * alternateTab: Fix dismissing popup with Escape - * some improvements to the window-list - (spacing in app buttons, no flash when closing windows with auto-grouping) - * updated translations (lv, it, pt, bg) - -3.14.0 -====== - * updated translations (bn_IN, hi, kn, sr, sr@latin, uk) - -3.13.92 -======= -* new extension: screenshot-window-sizer -* window-list: Don't add sticky windows more than once -* updated translations (da, de, fi, ko, mr, ms, ne, pa, pl, sk, sv, ta, te, tr) - -3.13.91 -======= -* window-list: restore fitts'ability of workspace button -* updated for gnome-shell changes -* updated translations (cs, kk, fr, or, fa, ja, gu, id) - -3.13.90 -======= -* updated translations (as, ca, eu, nl, zh_CN, zh_HK, zh_TW) - -3.13.4 -====== -* Updated for gnome-shell changes -* updated translations (el, gl, ru) - -3.13.3 -====== -* Tweak preference UIs some more -* Fix classic mode schema overrides -* updated translations (es, he, hu, lt, nb, pt_BR, sl, tr) - -3.13.2 -====== -* Fix sorting of grouped buttons in window list -* Tweak preference UIs -* updated translations (en_GB) - -3.13.1 -====== -* add DesktopNames key to the classic session file -* classic theme: remove rounded corners from tile previews -* window-list: don't shift message tray on other monitors -* auto-move-windows: several fixes and updates for api changes -* launch-new-instances: updates for api changes -* updated translations (ja, km) - -3.12.0 -====== -* updated translations (zh_HK, zh_TW) - -3.11.92 -======= -* nothing to see here, move on - -3.11.91 -======= -* updated translations (ko, fur) - -3.11.90 -======= -* several fixes and improvements to the window-list - (can be scrolled, works correctly with the OSD - keyboard, filters skip-taskbar windows, does not - force all notifications to bold) -* drive-menu fixed not to show shadowed mounts -* updates for gnome-shell changes (launch-new-instance, - auto-move-windows, places-menu) -* build system fixes for systems without /bin/bash -* updated translations (or, tr, uk) - -3.11.5 -====== -* updates for gnome-shell changes -* updated translations (kn) - -3.11.4 -====== -* classic mode now supports session saving -* updates for gnome-shell changes -* updated translations (ar, kn) - -3.11.3 -====== -* workspace-indicator is vertically aligned now -* updated translations (ar, eo, ta, te) - -3.11.2 -====== -* updated translations (zh_CN) - -3.11.1 -====== -* ignore shadowed mounts in drive-menu extension -* updates for gnome-shell/gjs changes -* updated translations (el, th) - -3.10.1 -====== -* updated translations (af, ca, ca@valencia, de, et, eu, fa, - hu, lt, lv, nb, nl, pa, pt, sk, sr, sr@latin, tr) - -3.10.0 -====== -* updated translations (as, cs, da, es, et, fi, fr, gl, - he, id, it, kk, lt, lv, pa, pl, pt, pt_BR, ru, sl, tg, - uk, zh_HK, zh_TW) - -3.9.92 -====== -* more updates and fixes for gnome-shell master changes - and regressions (systemMonitor, window-list, apps-menu) -* lots of updated translations (ar, as, cs, da, de, el, es, - eu, fi, gl, he, hu, it, ja, kk, ko, lv, nb, nl, pa, pl, - pt_BR, ru, sk, sr, sr@latin, ta, tg) - -3.9.91 -====== -* update the classic mode session and theme to work with the - new system menu -* the usual round of updates and fixes for gnome-shell - API changes -* updated translations (de, it, lt, nl, pl, pt_BR, sk, - zh_HK, zh_TW) - -3.9.90 -====== -* xrandr-indicator was removed, as the implementation - was incompatible with the new DisplayConfig mutter API -* various extensions were updated for the 3.9.90 gnome-shell API -* updated translations (cs, es, fur, gl, he, hu, id, ja, sl, tg, - zh_CN, zh_HK, zh_TW) - -3.9.5 -===== -* alternative-status-menu was removed entirely, as - it does not fit in the designs of the new unified - status menu -* updated translations (as, gu, it, ru) - -3.9.4 -===== -* apps-menu: fixed handling of hot corner in case - of screen reconfiguration -* alternative-status-menu now correctly honors polkit - for hibernation -* user-menu now loads themes from $XDG_DATA_HOME too -* translation updates (de, id, pt_BR, vi, zh_CN, ml) - -3.9.3 -===== -* classic mode mini extensions were replaced with a - GSettings override specified in the .json file -* styling of classic mode improved -* native-window-placement is back working on 3.9 -* misc bug fixes -* traslation updates (an, cs, el, es, gl, nb, pl, sk, tg) - -3.9.2 -===== -* apps-menu: appearance of the scrollbars was improved -* window-list is a little taller in classic mode (to account - for the workspace switcher) -* alternative-status-menu honors again the dconf configuration -* translation updates (sr) - -3.9.1 -===== -* updates to window-list, xrandr-indicator, - workspace-indicator, windowsNavigator for gnome-shell - changes -* translation updates (cs, es, lt, pl, pt_BR, sl) - -3.8.1 -===== -* many improvements to window-list: - - windows are activated by DND over them - - window buttons now have the right size, - even if the text is smaller or larger - than the ideal - - window buttons can be grouped automatically - when the panel becomes crowded - - added a workspace switcher menu -* added keyboard navigation to apps-menu -* small tweaks to classic-mode theme, in particular - for menus -* translation updates (gl, ko, sr) - -3.8.0 -===== -* translation updates (hu, ja, fi, it) - -3.7.92 -====== -* misc bug fixes to app-menu and window-list -* translation updates (de, sl, pt_BR, ru) - -3.7.91 -====== -* various updates for shell changes -* update window-list to always use application icons -* update apps-menu to not load subdirectories as - separate categories -* translation updates (lt, zh_CN) - -3.7.90 -====== -* various fixes to make places-menu behave more - like Nautilus, including showing the machine - name in place of File System -* various updates for shell changes -* alternative-status-menu no longer supports - ConsoleKit systems, you need to install logind - to have suspend or hibernate -* translation updates (es, cz, pl, sr) - -3.7.5.1 -======= -* new extension forgotten in previous NEWS entry: - windows-list -* also forgotten previously: classic mode got a new - GNOME2 style -* build fixes - -3.7.5 -===== -* places-menu is back in the classic extensions, with - a new old GNOME-2 look -* classic mode moved the date menu to right, where we - all know it rightly belongs -* apps-menu received a face-lift, with the inclusion - of a reduced form of AxeMenu -* new extension in the classic set: launch-new-instance, - which modifies the behavior of clicking in the dash - and app launcher -* alternate-tab, native-window-placement and windowsNavigator - updated for gnome-shell changes -* translation updates (es, cz, pl) - -3.7.4 -===== -* a separate configure switch has been added to enable - classic mode session definitions -* places-menu is no longer part of the classic-mode - extension set -* updated translations (ar, gl, hu, lt, pt_BR, sr) - -3.7.3 -===== -* new extensions: default-min-max, static-workspaces -* alternate-tab now uses the built-in window switcher and just - takes over the switch-application keybinding -* workspace-indicator: is no longer part of classic-mode -* we now install classic-mode data files for gdm, gnome-session - and gnome-shell, so if you enable classic-mode you get a new - session option in GDM -* updated translations (ar, es, pl, ru, sl, zh_HK, zh_TW) - -3.7.2 -===== -* fixed crashes with places-menu, windowsNavigator, alternate-tab - and native-window-placement -* alternate-tab now hides attached modal dialogs -* places-menu has restored support for Nautilus 3.4 -* the default for hibernate is now to show in alternative-status-menu -* some extensions are now tagged as "classic", and can be chosen with - --enable-extensions=classic-mode -* dock and gajim were removed at the beginning of the 3.7.1 cycle, - as they were buggy and unmaintained -* updated translations (ar, cs, de, el, es, gl, id, lt, lv, pa, pl - ru, sk, sl, sr, sr@latin) - -3.6.1 -===== -* fixed alternative-status-menu for the new lock screen -* squashed some alternate-tab warnings -* drive-menu now works with 3.6 again -* updated translations (ar, cs, el, es, gl, id, lv, pl, sl) - -3.6.0 -===== -* major rework in places menu, to make it work without - removed supporting code in the shell and to make it look like - the nautilus sidebar - (similar work would be needed for drive-menu, not done yet) -* updated translations (ca, cs, de, el, en_GB, es, fi, hu, id, lt, - pl, pt_BR, ru, sl, sr) - -3.5.91 -====== -* various crashers were fixed in alternative-tab -* auto-move-windows now can be made to work with static workspaces -* place-menu is now on the left and uses symbolic icons like Files -* StIconType usage was removed from all extensions, after it was - removed in core -* systemMonitor, xrandr-indicator, apps-menu, places-menu, - alternative-status-menu were updated for the newer shell -* updated translations (es, gl, it, pl, sl) - -3.5.90 -====== -* alternate-tab has been reworked again, the old mode switch - was removed and the all&thumbnails code extended to handle - icons and filtering to the workspace -* alternate-tab thumbnails now reflect the aspect ratio of the windows -* systemMonitor now shows a tooltip above the indicator -* native-window-placement, systemMonitor and windowsNavigator have been updated - for the newer shell -* updated translations (es, pa) - -3.5.5 -===== -* convenience module has been relicensed to BSD, - for compatibility with GPLv3 extensions -* alternate-tab has been refactored and seen various - improvements to all&thumbnails mode, including a new - overlaid application icon -* updated translations (lt, id, sr) - -3.5.4 -===== -* updated translations (de, es, ar, sl, lv, zh_CN) - -3.5.2 -===== -* removable-drive-menu is now a11y friendly -* the dock can now be placed on any monitor, not just the primary -* dock is now clipped to its monitor -* alternative-status-menu now exposes GSettings for Suspend - and Hibernate visibility - no UI yet -* more gnome-shell API changes (places-menu, removable-drive-menu, - alternative-status-menu) -* miscellaneous bug fixes (native-window-placement, gajim, - auto-move-windows) -* updated translations - -3.4.0 -===== -* build system improvements -* updated translations (ar, cs, fr) - -3.3.92 -====== -* various updates for gnome-shell API changes (dock, - native-window-placement) -* local-install is now a make rule, not a shell script -* updated translations (zh, es, sw, ga, hu, it, no, pt_BR, de, sl, - pl, la, fi, sr) - -3.3.90 -====== -* system wide installation via "make install" is possible - again -* alternate-tab can now pre-activate the selected window -* auto-move-windows, workspace-indicator and example gained - new preference dialogs -* workspace-indicator: fixed a bug wrt focus stealing prevention -* updated translations (es, pt_BR, it, sl, gl, sr) - -3.3.5 -===== -* improvements to the build system and convenience module, - making it easier for other extensions to use, and bringing - it up to date with gnome-shell changes -* all extensions were ported to the Lang.Class framework - (except xrandr-indicator, which is pending GDBus merge) -* alternate-tab and dock were slightly refactored to clean up - some old code - -3.3.4 -===== -* improved styling of windowsNavigator tooltips -* fixed windowsNavigator when used with the numeric keypad -* fixed native-window-placement with custom button layout -* updated translations (pt_BR, cz) - -3.3.3 -===== -* windowsNavigator was fixed to work with azerty keyboards -* drive-menu was changed to use media-eject icon instead of media-optical -* dock: the default value of hide-effect is now move -* dock: if autohide is disabled, now it pushes maximized windows aside -* dock was updated to match current core shell styling -* native-window-placement: position stategy setting was removed -* alternative-status-menu no longer conflicts with other extensions - in the user menu -* various other minor bug fixes -* updated translations (zh, uk, es, it, cz, sl, sk, fi) - -3.3.2 -===== -* all extensions are now self-contained, including l10n and settings -* introduce a convenience module that can be shared among all extensions -* you can know build an installable zip file with make zip-file -* apps-menu no longer shows NoDisplay apps -* alternative-status-menu, alternate-tab: fix for master shell - -3.2.1 -===== -* dock: added "move" hide effect -* systemMonitor: now it enables/disables properly -* systemMonitor: improved styling -* alternate-tab: both modes now work with gnome-shell 3.2 -* various other bug fixes -* updated translations - -3.2.0 -===== - -* various: update for gnome-shell API changes - -3.1.91 -====== - -* gajim: update for gnome-shell API changes - -3.1.90 -====== - -* All extensions have been ported to the new extension - system (including live enable/disable) -* Updated translations -* xrandr-indicator no longer requires a specific gjs version -* windowsNavigator fixed for more than 2 workspaces - -3.1.4 -===== - -* New extension: a menu for changing workspace (workspace-indicator) -* systemMonitor: lower the requirement on libgtop -* auto-move-windows: open overview when last window on - last workspace is closed -* dock: implement autohiding, with various configurable - effects -* alternate-tab: more configurable implementations available -* native-window-placement: don't rearrange the windows when - the workspace switcher is shown/hidden -* update for gnome-shell 3.1.4 API changes - -3.1.3 -===== - -* New extension: a menu for removable drives (drive-menu -* New extensions: GNOME 2 like menus for apps and places - (apps-menu, places-menu) -* New extension: additional configurability for the window - layout in the overview, including a mechanism similar to - KDE4 (native-window-placement) -* New extension: a message tray indicator for CPU and memory - usage (uses libgtop) (systemMonitor) -* user-theme: fixed resetting theme -* user-theme: support themes installed in /usr/share/themes -* alternative-status-menu: ported to gnome-shell master -* dock: ported to gnome-shell master -* dock: make position configurable (can be left or right) -* Updated translations - -3.0.2 -===== - -* Updated translations. -* Fixed bug #647386 (reverting of user-theme to default) -* Fixed bug #647599 (support globally installed themes) -* Added license and README diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/extension.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/extension.js deleted file mode 100644 index fd7a7b43..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/extension.js +++ /dev/null @@ -1,61 +0,0 @@ -// SPDX-FileCopyrightText: 2011 John Stowers -// SPDX-FileCopyrightText: 2011 Giovanni Campagna -// SPDX-FileCopyrightText: 2011 Elad Alfassa -// SPDX-FileCopyrightText: 2014 Florian Müllner -// -// SPDX-License-Identifier: GPL-2.0-or-later - -// -*- mode: js2; indent-tabs-mode: nil; js2-basic-offset: 4 -*- -// Load shell theme from ~/.local/share/themes/name/gnome-shell - -import Gio from 'gi://Gio'; - -import {Extension} from 'resource:///org/gnome/shell/extensions/extension.js'; - -import * as Main from 'resource:///org/gnome/shell/ui/main.js'; - -import {getThemeDirs, getModeThemeDirs} from './util.js'; - -const SETTINGS_KEY = 'name'; - -export default class ThemeManager extends Extension { - enable() { - this._settings = this.getSettings(); - this._settings.connectObject(`changed::${SETTINGS_KEY}`, - this._changeTheme.bind(this), this); - this._changeTheme(); - } - - disable() { - this._settings?.disconnectObject(); - this._settings = null; - - Main.setThemeStylesheet(null); - Main.loadTheme(); - } - - _changeTheme() { - let stylesheet = null; - let themeName = this._settings.get_string(SETTINGS_KEY); - - if (themeName) { - const stylesheetPaths = getThemeDirs() - .map(dir => `${dir}/${themeName}/gnome-shell/gnome-shell.css`); - - stylesheetPaths.push(...getModeThemeDirs() - .map(dir => `${dir}/${themeName}.css`)); - - stylesheet = stylesheetPaths.find(path => { - let file = Gio.file_new_for_path(path); - return file.query_exists(null); - }); - } - - if (stylesheet) - log(`loading user theme: ${stylesheet}`); - else - log('loading default theme (Adwaita)'); - Main.setThemeStylesheet(stylesheet); - Main.loadTheme(); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/prefs.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/prefs.js deleted file mode 100644 index 9b4cf951..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/prefs.js +++ /dev/null @@ -1,138 +0,0 @@ -// SPDX-FileCopyrightText: 2020 Florian Müllner -// -// SPDX-License-Identifier: GPL-2.0-or-later - -// -*- mode: js2; indent-tabs-mode: nil; js2-basic-offset: 4 -*- - -// we use async/await here to not block the mainloop, not to parallelize -/* eslint-disable no-await-in-loop */ - -import Adw from 'gi://Adw'; -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; -import GObject from 'gi://GObject'; -import Gtk from 'gi://Gtk'; - -import {ExtensionPreferences} from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; - -import {getThemeDirs, getModeThemeDirs} from './util.js'; - -Gio._promisify(Gio.File.prototype, 'enumerate_children_async'); -Gio._promisify(Gio.File.prototype, 'query_info_async'); -Gio._promisify(Gio.FileEnumerator.prototype, 'next_files_async'); - -class UserThemePrefsWidget extends Adw.PreferencesGroup { - static { - GObject.registerClass(this); - } - - constructor(settings) { - super({title: 'Themes'}); - - this._actionGroup = new Gio.SimpleActionGroup(); - this.insert_action_group('theme', this._actionGroup); - - this._settings = settings; - this._actionGroup.add_action( - this._settings.create_action('name')); - - this.connect('destroy', () => (this._settings = null)); - - this._rows = new Map(); - this._addTheme(''); // default - - this._collectThemes(); - } - - async _collectThemes() { - for (const dirName of getThemeDirs()) { - const dir = Gio.File.new_for_path(dirName); - for (const name of await this._enumerateDir(dir)) { - if (this._rows.has(name)) - continue; - - const file = dir.resolve_relative_path( - `${name}/gnome-shell/gnome-shell.css`); - try { - await file.query_info_async( - Gio.FILE_ATTRIBUTE_STANDARD_NAME, - Gio.FileQueryInfoFlags.NONE, - GLib.PRIORITY_DEFAULT, null); - this._addTheme(name); - } catch (e) { - if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND)) - logError(e); - } - } - } - - for (const dirName of getModeThemeDirs()) { - const dir = Gio.File.new_for_path(dirName); - for (const filename of await this._enumerateDir(dir)) { - if (!filename.endsWith('.css')) - continue; - - const name = filename.slice(0, -4); - if (!this._rows.has(name)) - this._addTheme(name); - } - } - } - - _addTheme(name) { - const row = new ThemeRow(name); - this._rows.set(name, row); - - this.add(row); - } - - async _enumerateDir(dir) { - const fileInfos = []; - let fileEnum; - - try { - fileEnum = await dir.enumerate_children_async( - Gio.FILE_ATTRIBUTE_STANDARD_NAME, - Gio.FileQueryInfoFlags.NONE, - GLib.PRIORITY_DEFAULT, null); - } catch (e) { - if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND)) - logError(e); - return []; - } - - let infos; - do { - infos = await fileEnum.next_files_async(100, - GLib.PRIORITY_DEFAULT, null); - fileInfos.push(...infos); - } while (infos.length > 0); - - return fileInfos.map(info => info.get_name()); - } -} - -class ThemeRow extends Adw.ActionRow { - static { - GObject.registerClass(this); - } - - constructor(name) { - const check = new Gtk.CheckButton({ - action_name: 'theme.name', - action_target: new GLib.Variant('s', name), - }); - - super({ - title: name || 'Default', - activatable_widget: check, - }); - this.add_prefix(check); - } -} - -export default class UserThemePrefs extends ExtensionPreferences { - getPreferencesWidget() { - return new UserThemePrefsWidget(this.getSettings()); - } -} diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/private_metadata.json b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/private_metadata.json deleted file mode 100644 index aa76b0d6..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/private_metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "_generated": "Generated by SweetTooth, do not edit", - "description": "Load shell themes from user directory.", - "extension-id": "user-theme", - "gettext-domain": "gnome-shell-extension-user-theme", - "name": "User Themes", - "original-authors": [ - "john.stowers@gmail.com" - ], - "settings-schema": "org.gnome.shell.extensions.user-theme", - "shell-version": [ - "46" - ], - "url": "https://gitlab.gnome.org/GNOME/gnome-shell-extensions", - "uuid": "user-theme@gnome-shell-extensions.gcampax.github.com", - "version": 58 -} \ No newline at end of file diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/schemas/gschemas.compiled b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/schemas/gschemas.compiled deleted file mode 100644 index 4e8a5ca9..00000000 Binary files a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/schemas/gschemas.compiled and /dev/null differ diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/schemas/org.gnome.shell.extensions.user-theme.gschema.xml b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/schemas/org.gnome.shell.extensions.user-theme.gschema.xml deleted file mode 100644 index cf2dc201..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/schemas/org.gnome.shell.extensions.user-theme.gschema.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - "" - Theme name - The name of the theme, to be loaded from ~/.themes/name/gnome-shell - - - diff --git a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/util.js b/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/util.js deleted file mode 100644 index e02b464e..00000000 --- a/chezmoi/private_dot_local/private_share/private_gnome-shell/extensions/user-theme@gnome-shell-extensions.gcampax.github.com/util.js +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-FileCopyrightText: 2020 Florian Müllner -// -// SPDX-License-Identifier: GPL-2.0-or-later - -import GLib from 'gi://GLib'; - -const fn = (...args) => GLib.build_filenamev(args); - -/** - * @returns {string[]} - an ordered list of theme directories - */ -export function getThemeDirs() { - return [ - fn(GLib.get_home_dir(), '.themes'), - fn(GLib.get_user_data_dir(), 'themes'), - ...GLib.get_system_data_dirs().map(dir => fn(dir, 'themes')), - ]; -} - -/** - * @returns {string[]} - an ordered list of mode theme directories - */ -export function getModeThemeDirs() { - return GLib.get_system_data_dirs() - .map(dir => fn(dir, 'gnome-shell', 'theme')); -} diff --git a/update_extensions.sh b/update_extensions.sh index 71b9bddd..21370a94 100644 --- a/update_extensions.sh +++ b/update_extensions.sh @@ -1,10 +1,20 @@ #!/usr/bin/env bash -echo "Removing Gnome Shell Extensions directory from Chezmoi." -chezmoi forget ~/.local/share/gnome-shell/extensions +echo "" +echo "===============================================================" +echo "" +echo "Gathering extension list and updating..." +echo "" +echo "===============================================================" +echo "" -echo "Adding the Extensions directory back in." -chezmoi add ~/.local/share/gnome-shell/extensions +if ! type gnome-extensions-cli; then + echo "Extensions cli not available, exiting" + exit 1 +fi + +# Removing Pop Shell as that is installed via Ansible and not available on Gnome Extensions website. +gnome-extensions-cli ls --only-uuid | grep -v 'pop-shell@system76.com' | tee chezmoi/installed-extensions.txt echo "Updating dconf.ini." dconf dump / > chezmoi/dconf.ini