From 3aa3758821d6b76b252567ca787c9927d684e634 Mon Sep 17 00:00:00 2001 From: Anton Bambura Date: Tue, 1 Aug 2023 00:21:43 +0300 Subject: [PATCH] main/postmarketos-cros-common: new aport (MR 4295) --- ...arketos-cros-common-gnome.gschema.override | 3 + main/postmarketos-cros-common/APKBUILD | 56 +++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 main/postmarketos-cros-common/00_postmarketos-cros-common-gnome.gschema.override create mode 100644 main/postmarketos-cros-common/APKBUILD diff --git a/main/postmarketos-cros-common/00_postmarketos-cros-common-gnome.gschema.override b/main/postmarketos-cros-common/00_postmarketos-cros-common-gnome.gschema.override new file mode 100644 index 000000000..5826e01f0 --- /dev/null +++ b/main/postmarketos-cros-common/00_postmarketos-cros-common-gnome.gschema.override @@ -0,0 +1,3 @@ +[org.gnome.desktop.wm.keybindings] +switch-input-source=['space'] +switch-input-source-backward=['space'] diff --git a/main/postmarketos-cros-common/APKBUILD b/main/postmarketos-cros-common/APKBUILD new file mode 100644 index 000000000..918bdf552 --- /dev/null +++ b/main/postmarketos-cros-common/APKBUILD @@ -0,0 +1,56 @@ +# Maintainer: Jenneron +pkgname=postmarketos-cros-common +pkgdesc="Common package for Chrome OS devices" +pkgver=1 +pkgrel=0 +url="https://postmarketos.org" +license="BSD-3-Clause" +arch="aarch64 armv7 x86_64 x86" # there are no cros devices of other arches +options="!check !archcheck !tracedeps" +subpackages=" + $pkgname-gnome + $pkgname-sway +" +source=" + 00_postmarketos-cros-common-gnome.gschema.override +" + +package() { + mkdir -p "$pkgdir" +} + +# These devices have custom keyboard layout. They don't have "Meta" +# (Win/Command/Super) key in the place. They also don't have a "Caps +# Lock" key, but there is a "Search" key in the place of "Caps Lock". +# This key is binded as "Meta" in Linux, and it is not that obvious +# for new users (personal experience). Default Gnome hotkeys for +# changing keyboard layout are "Super + Space" and "Shift + Super + +# Space". Therefore on these devices it is "Search + Space" and +# "Shift + Search + Space". When comparing it to a regular keyboard +# it looks like "Caps + Space" and "Shift + Caps + Space" which is +# not obvious at all. +# +# Configure it as "Ctrl + Space" and "Shift + Ctrl + Space" which +# is closer to regular keyboards and matches Chrome OS hotkey. + +gnome() { + install_if="$pkgname=$pkgver-r$pkgrel postmarketos-base-ui-gnome" + install -Dm644 "00_$subpkgname.gschema.override" \ + -t "$subpkgdir"/usr/share/glib-2.0/schemas +} + +# The Meta key on these devices is in the place where generally +# "Caps Lock" key is located. This makes it more difficult to press +# hotkeys like "Meta + Shift + Q". There is also the problem of +# unobvious location of "Meta" key. +# +# Thus change the $mod key to Alt by default. + +sway() { + install_if="$pkgname=$pkgver-r$pkgrel postmarketos-ui-sway" + depends="postmarketos-ui-sway-logo-key-alt" + mkdir "$subpkgdir" +} +sha512sums=" +7475db666ba78d524474070c1b880893b4cb1c98353226faeda4aff1d510e13131be75465732b00a5d027570933e7843fb3e13d26641db2f98d29e77700def6d 00_postmarketos-cros-common-gnome.gschema.override +"