add: terra-gnome-shell-extension-pop-shell

This commit is contained in:
madomado
2023-11-08 23:56:57 +08:00
parent 9554470dbe
commit 4e61aa9167
9 changed files with 186 additions and 0 deletions
@@ -0,0 +1,34 @@
From 3f8b19139bf3f13b4285fd9d949cb5460a0909df Mon Sep 17 00:00:00 2001
From: Carl George <carl@george.computer>
Date: Fri, 25 Jun 2021 22:26:50 -0500
Subject: [PATCH] Remove schema handling from transpile.sh
---
scripts/transpile.sh | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/scripts/transpile.sh b/scripts/transpile.sh
index e619a8c..8977c29 100755
--- a/scripts/transpile.sh
+++ b/scripts/transpile.sh
@@ -15,8 +15,6 @@ transpile() {
rm -rf _build
-glib-compile-schemas schemas &
-
# Transpile to JavaScript
for proj in ${PROJECTS}; do
@@ -30,7 +28,7 @@ wait
# Convert JS to GJS-compatible scripts
-cp -r metadata.json icons schemas *.css _build &
+cp -r metadata.json icons *.css _build &
for src in $(find target -name '*.js'); do
dest=$(echo "$src" | sed s#target#_build#g)
--
2.31.1
@@ -0,0 +1,18 @@
[org.gnome.desktop.wm.keybindings]
close = ['<Alt>F4', '<Super>q']
maximize = []
minimize = []
move-to-monitor-down = []
move-to-monitor-left = []
move-to-monitor-right = []
move-to-monitor-up = []
move-to-workspace-down = []
move-to-workspace-left = []
move-to-workspace-right = []
move-to-workspace-up = []
switch-to-workspace-down = ['<Primary><Super>Down', '<Primary><Super>KP_Down', '<Primary><Super>j']
switch-to-workspace-left = []
switch-to-workspace-right = []
switch-to-workspace-up = ['<Primary><Super>Up', '<Primary><Super>KP_Up', '<Primary><Super>k']
toggle-maximized = ['<Super>m']
unmaximize = []
@@ -0,0 +1,7 @@
[org.gnome.mutter:GNOME]
attach-modal-dialogs = false
workspaces-only-on-primary = false
[org.gnome.mutter.keybindings]
toggle-tiled-left = ['<Primary><Super>Left', '<Primary><Super>KP_Left', '<Primary><Super>h']
toggle-tiled-right = ['<Primary><Super>Right', '<Primary><Super>KP_Right', '<Primary><Super>l']
@@ -0,0 +1,2 @@
[org.gnome.mutter.wayland.keybindings]
restore-shortcuts = []
@@ -0,0 +1,6 @@
[org.gnome.settings-daemon.plugins.media-keys]
email = ['<Super>e']
home = ['<Super>f']
screensaver = ['<Super>Escape']
www = ['<Super>b']
rotate-video-lock-static = ['XF86RotationLockToggle']
@@ -0,0 +1,18 @@
[org.gnome.shell.keybindings]
open-application-menu = []
shift-overview-down = []
shift-overview-up = []
switch-to-application-1 = []
switch-to-application-2 = []
switch-to-application-3 = []
switch-to-application-4 = []
switch-to-application-5 = []
switch-to-application-6 = []
switch-to-application-7 = []
switch-to-application-8 = []
switch-to-application-9 = []
toggle-message-tray = ['<Super>v']
[org.gnome.shell.overrides]
attach-modal-dialogs = false
workspaces-only-on-primary = false
@@ -0,0 +1,8 @@
project pkg {
rpm {
spec = "terra-gnome-shell-extension-pop-shell.spec"
}
labels {
nightly = "1"
}
}
@@ -0,0 +1,89 @@
// from Fedora upstream
%global extension pop-shell
%global uuid %{extension}@system76.com
%global commit 1c5899cdd830d0b4debbf349a0fa22caaf1f864b
%global shortcommit %{lua:print(macros.commit:sub(1,7))}
%global ver 1.2.0
Name: terra-gnome-shell-extension-%{extension}
Version: %{ver}^%{shortcommit}
Release: 1%?dist
Summary: GNOME Shell extension for advanced tiling window management
License: GPL-3.0-only
URL: https://github.com/pop-os/shell
BuildArch: noarch
Source0: %{url}/archive/%{commit}/%{extension}-%{shortcommit}.tar.gz
Source1: 50_org.gnome.desktop.wm.keybindings.%{extension}.gschema.override
Source2: 50_org.gnome.mutter.%{extension}.gschema.override
Source3: 50_org.gnome.mutter.wayland.%{extension}.gschema.override
Source4: 50_org.gnome.settings-daemon.plugins.media-keys.%{extension}.gschema.override
Source5: 50_org.gnome.shell.%{extension}.gschema.override
# downstream-only
Patch0: 0001-Remove-schema-handling-from-transpile.sh.patch
BuildRequires: typescript >= 3.8
BuildRequires: make
Requires: (gnome-shell >= 45~ with gnome-shell < 46~)
Recommends: gnome-extensions-app
Recommends: %{name}-shortcut-overrides = %{version}-%{release}
Provides: %{extension} = %{version}-%{release}
%description
Pop Shell is a keyboard-driven layer for GNOME Shell which allows for quick and
sensible navigation and management of windows. The core feature of Pop Shell
is the addition of advanced tiling window management - a feature that has been
highly sought within our community. For many - ourselves included - i3wm has
become the leading competitor to the GNOME desktop.
%package shortcut-overrides
Summary: Shortcut overrides for %{name}
%description shortcut-overrides
Shortcut overrides for %{name}.
%prep
%autosetup -p 1 -n shell-%{commit}
%build
%make_build compile
%install
# install main extension files
%make_install
# install the schema file
install -D -p -m 0644 \
schemas/org.gnome.shell.extensions.%{extension}.gschema.xml \
%{buildroot}%{_datadir}/glib-2.0/schemas/org.gnome.shell.extensions.%{extension}.gschema.xml
# install the gnome-control-center keybindings
install -d -m 0755 %{buildroot}%{_datadir}/gnome-control-center/keybindings
install -p -m 0644 keybindings/*.xml %{buildroot}%{_datadir}/gnome-control-center/keybindings/
# install the schema override files
install -d -m 0755 %{buildroot}%{_datadir}/glib-2.0/schemas
install -p -m 0644 %{S:1} %{S:2} %{S:3} %{S:4} %{S:5} %{buildroot}%{_datadir}/glib-2.0/schemas/
%files
%license LICENSE
%doc README.md
%{_datadir}/gnome-shell/extensions/%{uuid}
%{_datadir}/glib-2.0/schemas/org.gnome.shell.extensions.%{extension}.gschema.xml
%{_datadir}/gnome-control-center/keybindings/*.xml
%files shortcut-overrides
%{_datadir}/glib-2.0/schemas/*.%{extension}.gschema.override
%changelog
%autochangelog
@@ -0,0 +1,4 @@
if filters.contains("nightly") {
rpm.global("commit", get("https://api.github.com/repos/pop-os/shell/commits/HEAD").json().sha);
rpm.global("ver", gh("pop-os/shell"));
}