main/postmarketos-cros-common: new aport (MR 4295)

This commit is contained in:
Anton Bambura 2023-08-01 00:21:43 +03:00
parent e9f7e3b423
commit 3aa3758821
No known key found for this signature in database
GPG key ID: 1441EAFE8D7F4C2D
2 changed files with 59 additions and 0 deletions

View file

@ -0,0 +1,3 @@
[org.gnome.desktop.wm.keybindings]
switch-input-source=['<Control>space']
switch-input-source-backward=['<Shift><Control>space']

View file

@ -0,0 +1,56 @@
# Maintainer: Jenneron <jenneron@protonmail.com>
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
"