summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wagie2021-08-25 12:35:59 -0600
committerMark Wagie2021-08-25 12:35:59 -0600
commit36f0e02d848a8d35b864af5a9e40eb34d9975794 (patch)
treea0ab0b7298f570cfabda14b85ae191bedda8517f
parent23174325caa0cd7f4591e5b9810b0278bbdf12e7 (diff)
downloadaur-36f0e02d848a8d35b864af5a9e40eb34d9975794.tar.gz
add mouse patches
-rw-r--r--.SRCINFO5
-rw-r--r--.gitignore2
-rw-r--r--0006-keyboard-Add-launch-terminal-shortcut.patch21
-rw-r--r--PKGBUILD12
-rw-r--r--pop-mouse-accel.patch127
5 files changed, 139 insertions, 28 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c4de4e091c50..526975cb21eb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = gnome-control-center-system76
pkgdesc = GNOME's main interface to configure various aspects of the desktop (with System76 patches)
pkgver = 40.0
- pkgrel = 1.1
+ pkgrel = 1.2
url = https://gitlab.gnome.org/GNOME/gnome-control-center
arch = x86_64
license = GPL2
@@ -52,6 +52,8 @@ pkgbase = gnome-control-center-system76
source = git+https://gitlab.gnome.org/GNOME/gnome-control-center.git#commit=49d71c07b5b3ce59e035b785310cba4fcf903868
source = git+https://gitlab.gnome.org/GNOME/libgnome-volume-control.git
source = git+https://gitlab.gnome.org/GNOME/libhandy.git
+ source = 0001-mouse-Add-Disable-While-Typing-toggle-for-touchpad.patch
+ source = pop-mouse-accel.patch
source = system76-firmware.patch
sha256sums = SKIP
sha256sums = SKIP
@@ -59,4 +61,3 @@ pkgbase = gnome-control-center-system76
sha256sums = 33fc2be90935fa9b913cccde12677d7234763821d47d71edf3586034d7eece2d
pkgname = gnome-control-center-system76
-
diff --git a/.gitignore b/.gitignore
index b5a9300fa717..980151c31161 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,6 +6,6 @@
!PKGBUILD
!.SRCINFO
!0001-mouse-Add-Disable-While-Typing-toggle-for-touchpad.patch
-!0006-keyboard-Add-launch-terminal-shortcut.patch
!pop-hidpi.patch
+!pop-mouse-accel.patch
!system76-firmware.patch
diff --git a/0006-keyboard-Add-launch-terminal-shortcut.patch b/0006-keyboard-Add-launch-terminal-shortcut.patch
deleted file mode 100644
index 11cb078bed25..000000000000
--- a/0006-keyboard-Add-launch-terminal-shortcut.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-From: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
-Date: Tue, 31 Jul 2018 04:44:12 +0100
-Subject: [PATCH 06/26] keyboard: Add launch terminal shortcut
-
----
- panels/keyboard/01-launchers.xml.in | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/panels/keyboard/01-launchers.xml.in b/panels/keyboard/01-launchers.xml.in
-index 67c8325..dd0292d 100644
---- a/panels/keyboard/01-launchers.xml.in
-+++ b/panels/keyboard/01-launchers.xml.in
-@@ -9,6 +9,8 @@
-
- <KeyListEntry name="email" description="Launch email client"/>
-
-+ <KeyListEntry name="terminal" description="Launch terminal"/>
-+
- <KeyListEntry name="www" description="Launch web browser"/>
-
- <KeyListEntry name="home" description="Home folder"/>
diff --git a/PKGBUILD b/PKGBUILD
index c49d55b3e24d..8a11bbb965bf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=gnome-control-center-system76
_pkgname=${pkgname%-system76}
pkgver=40.0
-pkgrel=1.1
+pkgrel=1.2
pkgdesc="GNOME's main interface to configure various aspects of the desktop (with System76 patches)"
url="https://gitlab.gnome.org/GNOME/gnome-control-center"
license=(GPL2)
@@ -21,14 +21,17 @@ optdepends=('system-config-printer: Printer settings'
'gnome-remote-desktop: screen sharing'
'rygel: media sharing'
'openssh: remote login'
- 'power-profiles-daemon: power profiles support')
+ 'power-profiles-daemon: power profiles support'
+# 'hidpi-daemon'
+ )
provides=("$_pkgname" 'firmware-manager-virtual')
conflicts=("$_pkgname")
_commit=49d71c07b5b3ce59e035b785310cba4fcf903868 # tags/40.0^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-control-center.git#commit=$_commit"
'git+https://gitlab.gnome.org/GNOME/libgnome-volume-control.git'
'git+https://gitlab.gnome.org/GNOME/libhandy.git'
-# '0001-mouse-Add-Disable-While-Typing-toggle-for-touchpad.patch'
+ '0001-mouse-Add-Disable-While-Typing-toggle-for-touchpad.patch'
+ 'pop-mouse-accel.patch'
# 'pop-hidpi.patch'
'system76-firmware.patch')
sha256sums=('SKIP'
@@ -48,7 +51,8 @@ prepare() {
git config --local submodule.subprojects/libhandy.url "$srcdir/libhandy"
git submodule update
-# patch -Np1 -i ../0001-mouse-Add-Disable-While-Typing-toggle-for-touchpad.patch
+ patch -Np1 -i ../'0001-mouse-Add-Disable-While-Typing-toggle-for-touchpad.patch'
+ patch -Np1 -i ../pop-mouse-accel.patch
# patch -Np1 -i ../pop-hidpi.patch
patch -Np1 -i ../system76-firmware.patch
}
diff --git a/pop-mouse-accel.patch b/pop-mouse-accel.patch
new file mode 100644
index 000000000000..e617134edd47
--- /dev/null
+++ b/pop-mouse-accel.patch
@@ -0,0 +1,127 @@
+Index: gnome-control-center/panels/mouse/cc-mouse-panel.c
+===================================================================
+--- gnome-control-center.orig/panels/mouse/cc-mouse-panel.c
++++ gnome-control-center/panels/mouse/cc-mouse-panel.c
+@@ -76,10 +76,33 @@ struct _CcMousePanel
+ gboolean left_handed;
+ GtkGesture *left_gesture;
+ GtkGesture *right_gesture;
++
++ // Mouse acceleration patch
++ GtkSwitch *mouse_acceleration_enable_switch;
+ };
+
+ CC_PANEL_REGISTER (CcMousePanel, cc_mouse_panel)
+
++static gboolean mouse_acceleration_enabled_get_mapping (
++ GValue *value,
++ GVariant *variant,
++ gpointer user_data
++) {
++ gboolean enabled = g_strcmp0 (g_variant_get_string (variant, NULL), "flat") != 0;
++ g_value_set_boolean (value, enabled);
++
++ return TRUE;
++}
++
++static GVariant *mouse_acceleration_enabled_set_mapping (
++ const GValue *value,
++ const GVariantType *type,
++ gpointer user_data
++) {
++ gboolean enabled = g_value_get_boolean (value);
++ return g_variant_new_string (enabled ? "adaptive" : "flat");
++}
++
+ static void
+ setup_touchpad_options (CcMousePanel *self)
+ {
+@@ -242,6 +265,15 @@ setup_dialog (CcMousePanel *self)
+ gtk_range_get_adjustment (GTK_RANGE (self->mouse_speed_scale)), "value",
+ G_SETTINGS_BIND_DEFAULT);
+
++ g_settings_bind_with_mapping (
++ self->mouse_settings, "accel-profile",
++ self->mouse_acceleration_enable_switch, "active",
++ G_SETTINGS_BIND_DEFAULT,
++ mouse_acceleration_enabled_get_mapping,
++ mouse_acceleration_enabled_set_mapping,
++ NULL, NULL
++ );
++
+ gtk_list_box_set_header_func (self->mouse_listbox, cc_list_box_update_header_func, NULL, NULL);
+
+ /* Touchpad section */
+@@ -439,6 +471,7 @@ cc_mouse_panel_class_init (CcMousePanelC
+ gtk_widget_class_bind_template_child (widget_class, CcMousePanel, general_listbox);
+ gtk_widget_class_bind_template_child (widget_class, CcMousePanel, mouse_frame);
+ gtk_widget_class_bind_template_child (widget_class, CcMousePanel, mouse_listbox);
++ gtk_widget_class_bind_template_child (widget_class, CcMousePanel, mouse_acceleration_enable_switch);
+ gtk_widget_class_bind_template_child (widget_class, CcMousePanel, mouse_natural_scrolling_switch);
+ gtk_widget_class_bind_template_child (widget_class, CcMousePanel, mouse_speed_scale);
+ gtk_widget_class_bind_template_child (widget_class, CcMousePanel, mouse_test);
+Index: gnome-control-center/panels/mouse/cc-mouse-panel.ui
+===================================================================
+--- gnome-control-center.orig/panels/mouse/cc-mouse-panel.ui
++++ gnome-control-center/panels/mouse/cc-mouse-panel.ui
+@@ -242,6 +242,60 @@
+ </child>
+ </object>
+ </child>
++ <!-- Pop Accel -->
++ <child>
++ <object class="GtkListBoxRow" id="mouse_acceleration_enable_row">
++ <property name="visible">True</property>
++ <property name="can_focus">True</property>
++ <property name="activatable">false</property>
++ <child>
++ <object class="GtkGrid" id="mouse_acceleration_enable_grid">
++ <property name="visible">True</property>
++ <property name="can_focus">False</property>
++ <property name="row_spacing">0</property>
++ <property name="column_spacing">32</property>
++ <property name="margin_start">20</property>
++ <property name="margin_end">20</property>
++ <property name="margin_top">12</property>
++ <property name="margin_bottom">12</property>
++ <property name="valign">center</property>
++ <child>
++ <object class="GtkLabel" id="mouse_acceleration_enable_label">
++ <property name="visible">True</property>
++ <property name="can_focus">False</property>
++ <property name="hexpand">True</property>
++ <property name="xalign">0</property>
++ <property name="valign">end</property>
++ <property name="label" translatable="yes">Mouse Acceleration</property>
++ <property name="use_underline">True</property>
++ <property name="mnemonic_widget">mouse_acceleration_enable_switch</property>
++ </object>
++ <packing>
++ <property name="left_attach">0</property>
++ <property name="top_attach">0</property>
++ <property name="width">1</property>
++ <property name="height">1</property>
++ </packing>
++ </child>
++ <child>
++ <object class="GtkSwitch" id="mouse_acceleration_enable_switch">
++ <property name="visible">True</property>
++ <property name="can_focus">True</property>
++ <property name="halign">end</property>
++ <property name="valign">center</property>
++ </object>
++ <packing>
++ <property name="left_attach">1</property>
++ <property name="top_attach">0</property>
++ <property name="width">1</property>
++ <property name="height">2</property>
++ </packing>
++ </child>
++ </object>
++ </child>
++ </object>
++ </child>
++ <!-- Pop Accel -->
+ <child>
+ <object class="GtkListBoxRow" id="mouse_natural_scrolling_row">
+ <property name="visible">True</property>