Major update:

- Switch to Sytemd
- Add development tools: adroid tool, usbgadget support
- Rework on recovery Image
This commit is contained in:
Dany LE
2025-11-26 17:55:25 +01:00
parent ceada7115a
commit ab8921d052
61 changed files with 395 additions and 1563 deletions

View File

@@ -13,20 +13,24 @@ LAYERDEPENDS_meta-diya = " core "
LAYERSERIES_COMPAT_meta-diya = "walnascar"
PACKAGE_CLASSES = "package_ipk"
INHERIT += " rm_work "
DISTRO_FEATURES:append := " opengl pam systemd usrmerge ppp usbgadget wifi vulkan "
DISTRO_FEATURES:remove = " x11 ptest sysvinit "
DISTRO_FEATURES_BACKFILL_CONSIDERED += " sysvinit "
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
TOOLCHAIN_TARGET_TASK:append := " libgles3-mesa-dev "
PREFERRED_PROVIDER_android-tools-conf = "android-tools-config-pinephone"
INITRAMFS_IMAGE="core-image-recovery"
INITRAMFS_IMAGE_BUNDLE="0"
INITRAMFS_MAXSIZE="200000"
INHERIT += "rm_work"
INITRAMFS_MAXSIZE="500000"
EXTRA_IMAGE_FEATURES ?= " ssh-server-dropbear read-only-rootfs "
DISTRO_FEATURES:append := " opengl pam "
DISTRO_FEATURES:remove = " x11 vulkan ptest "
TOOLCHAIN_TARGET_TASK:append := " libgles3-mesa-dev "
# DISTRO_FEATURES:append := " vc4-gfx opengl directfb "
WKS_FILE="image.wks.in"
ROOT_HOME = "/run/root"
ROOT_HOME = "/root"
PREFERRED_PROVIDER_virtual/kernel:qemux86-64 = "linux-yocto"
EXTRA_IMAGE_FEATURES:qemux86-64 = " ssh-server-dropbear "

View File

@@ -0,0 +1,47 @@
DESCRIPTION = "Auto configuration deployment from media"
DEPENDS = ""
RDEPENDS:${PN} = "bash"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI += "file://80_diya \
file://boot-to-recovery \
file://diya.pam \
file://xdg-terminal-exec \
"
inherit useradd
S = "${UNPACKDIR}"
USERADD_PACKAGES = "${PN}"
GROUPADD_PACKAGES = "${PN}"
USERADD_PARAM:${PN} = "--create-home -u 1000 -d /home/diya -r -s /bin/sh diya"
do_install() {
install -d ${D}/usr/sbin/
install -d ${D}/etc/default/volatiles
install -m 0644 ${UNPACKDIR}/80_diya ${D}${sysconfdir}/default/volatiles
install -m 0755 ${UNPACKDIR}/boot-to-recovery ${D}/usr/sbin/boot-to-recovery
install -d ${D}/etc/pam.d
install -m 0644 ${UNPACKDIR}/diya.pam ${D}${sysconfdir}/pam.d/diya
install -d ${D}${bindir}
install -m 0755 ${UNPACKDIR}/xdg-terminal-exec ${D}${bindir}
install -d ${D}/var/etc
}
FILES:${PN}:append = " ${bindir} \
${bindir}/boot-to-recovery \
/usr/sbin \
/etc \
/var \
${bindir}/xdg-terminal-exec \
/etc/pam.d \
/etc/default \
/etc/pam.d/diya \
/etc/default/volatiles \
/etc/default/volatiles/80_diya \
/var/etc \
"

View File

@@ -0,0 +1 @@
d xdg xdg 0755 /run/xdg none

View File

@@ -0,0 +1,15 @@
#! /bin/sh
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "$0 shall be run as root"
exit 1
fi
. /etc/profile
PATH=/sbin:/bin:/usr/sbin:/usr/bin
if [ ! -e /boot/enable-recovery-mode ]; then
touch /boot/enable-recovery-mode
fi
echo "Rebooting to recovery mode"
reboot

View File

@@ -7,17 +7,17 @@ SRC_URI += "git://git.iohub.dev/dany/diya-session-manager.git;protocol=https;bra
file://daemon.conf \
file://dbus-diya.conf \
file://diya-session-launch \
file://diya-sessiond"
file://diya-session-manager.service"
SRCREV = "${AUTOREV}"
PV = "0.1.1+git${SRCPV}"
S = "${UNPACKDIR}/git"
inherit meson pkgconfig
#inherit systemd
# inherit update-rc.d
# INITSCRIPT_NAME = "diya-sessiond"
# INITSCRIPT_PARAMS = "start 30 5 . stop 10 0 1 6 ."
#SYSTEMD_PACKAGES = "${PN}"
#SYSTEMD_SERVICE:${PN} = "udiya-session-manager.service"
do_install:append() {
@@ -25,16 +25,17 @@ do_install:append() {
install -d ${D}/usr/bin
install -d ${D}/etc/dbus-1
install -d ${D}/etc/dbus-1/system.d
install -d ${D}/etc/init.d
install -m 0755 ${WORKDIR}/build/diya-session-manager ${D}/usr/bin/
install -m 0755 ${UNPACKDIR}/diya-sessiond ${D}/etc/init.d/
install -m 0755 ${UNPACKDIR}/diya-session-launch ${D}/usr/bin/
install -m 0644 ${UNPACKDIR}/daemon.conf ${D}/etc/diya/
install -m 0644 ${UNPACKDIR}/dbus-diya.conf ${D}/etc/dbus-1/system.d/
install -D -p -m0644 ${UNPACKDIR}/diya-session-manager.service \
${D}${systemd_unitdir}/system/diya-session-manager.service
}
FILES:${PN} = "/etc/diya \
/etc/dbus-1/system.d/dbus-diya.conf \
/usr/bin/diya-session-manager \
/usr/bin/diya-session-launch \
/etc/init.d/diya-sessiond"
/etc/init.d/diya-sessiond \
${systemd_unitdir}/system/diya-session-manager.service"

View File

@@ -0,0 +1,10 @@
[Unit]
Description=Diya Session Manager
Requires=NetworkManager.service
After=NetworkManager.service
[Service]
ExecStart=/usr/bin/diya-session-manager
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,11 @@
[Match]
Name=usb0
[Network]
Address=192.168.50.1/24
DHCPServer=yes
[DHCPServer]
DNS=1.1.1.1
PoolOffset=128
PoolSize=32

View File

@@ -7,29 +7,25 @@ if [ -z "$DISK" ]; then
DISK="mmcblk0"
fi
DEFAULT_ROOTFS_NAME="rootfs-$MACHINE.tar.bz2"
DEFAULT_KERNEL_NAME="Image-$MACHINE.bin"
DEFAULT_INITRAMFS_NAME="recovery-$MACHINE.cpio.gz"
UPDATE_SRC_PATH="/home/diya/.update"
ROOTFS_DEV="/dev/${DISK}p2"
SUPPORTED_COMMAND="rootfs kernel initramfs all"
SUPPORTED_COMMAND="rootfs kernel initramfs"
TMP_MOUNT="/tmp/rootfs"
rootfs()
{
filename=$1
if [ -z "$filename" ]; then
filename="$DEFAULT_ROOTFS_NAME"
path=$1
if [ -z "$path" ]; then
echo "Please specify rootfs path"
return 1
fi
path="$UPDATE_SRC_PATH/$filename"
backup_file="$UPDATE_SRC_PATH/rootfs-backup.img"
backup_file="/tmp/rootfs-backup.img"
echo "Checking rootfs at: $path"
if [ ! -e "$path" ]; then
echo "Error: rootfs file not found"
echo "Error: rootfs image not found $path"
return 1
fi
# backup the rootfs file
echo "Backing up the current rootfs"
echo "Backing up the current rootfs to $backup_file"
if ! dd if=$ROOTFS_DEV of=$backup_file; then
echo "Error: unable to backup current rootfs"
return 1
@@ -72,18 +68,18 @@ EOF
kernel()
{
filename=$1
if [ -z "$filename" ]; then
filename="$DEFAULT_KERNEL_NAME"
path=$1
if [ -z "$path" ]; then
echo "Please specify kernel path"
fi
path="$UPDATE_SRC_PATH/$filename"
echo "Checking kernel at: $path"
if [ ! -e "$path" ]; then
echo "Error: kernel file not found"
return 1
fi
echo "Update kernel"
cp -v "$path" /boot/kernel8.img
mv /boot/Image.gz /boot/Image.gz.old
cp -v "$path" /boot/Image.gz
cd /boot
sync
echo "Done"
@@ -92,18 +88,18 @@ kernel()
initramfs()
{
filename=$1
if [ -z "$filename" ]; then
filename="$DEFAULT_INITRAMFS_NAME"
path=$1
if [ -z "$path" ]; then
echo "Please specify path to initramfs"
fi
path="$UPDATE_SRC_PATH/$filename"
echo "Checking initramfs at: $path"
if [ ! -e "$path" ]; then
echo "Error: initramfs file not found"
return 1
fi
echo "Update recovery intramfs"
cp -v "$path" /boot/$DEFAULT_INITRAMFS_NAME
mv /boot/recovery-${MACHINE}.cpio.lz4.u-boot /boot/recovery-${MACHINE}.cpio.lz4.u-boot.old
cp -v "$path" /boot/recovery-${MACHINE}.cpio.lz4.u-boot
cd /boot
sync
echo "Done"
@@ -135,9 +131,6 @@ case "$cmd" in
initramfs)
initramfs $file
;;
all)
rootfs && kernel && initramfs
;;
*)
cat << EOF
Usage: $name <command> [file]

View File

@@ -0,0 +1,15 @@
#! /bin/sh
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "$0 shall be run as root"
exit 1
fi
. /etc/profile
PATH=/sbin:/bin:/usr/sbin:/usr/bin
if [ ! -e /boot/enable-recovery-mode ]; then
touch /boot/enable-recovery-mode
fi
echo "Rebooting to recovery mode"
reboot

View File

@@ -0,0 +1,32 @@
SUMMARY = "Modular initramfs system"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
RDEPENDS:${PN} += "${VIRTUAL-RUNTIME_base-utils} systemd"
RRECOMMENDS:${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog}"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
PR = "r4"
inherit allarch
SRC_URI = "file://diya-update \
file://10-usbnet.network \
file://reboot-recovery \
"
S = "${UNPACKDIR}"
do_install() {
install -d ${D}/usr/sbin
install -d ${D}/etc/systemd/network/
install -m 0644 ${UNPACKDIR}/10-usbnet.network ${D}/etc/systemd/network/
install -m 0755 ${UNPACKDIR}/diya-update ${D}/usr/sbin/
install -m 0755 ${UNPACKDIR}/reboot-recovery ${D}/usr/sbin/
# create symlink
ln -sf /usr/sbin/diya-update ${D}/usr/sbin/diya-update-rootfs
ln -sf /usr/sbin/diya-update ${D}/usr/sbin/diya-update-kernel
ln -sf /usr/sbin/diya-update ${D}/usr/sbin/diya-update-initramfs
}

View File

@@ -0,0 +1 @@
PACKAGECONFIG:append = " modemmanager ppp wifi nmtui wwan nss ifupdown "

View File

@@ -1,7 +0,0 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI += "file://default"
do_install:append () {
rm -rf ${D}/etc/dropbear
install -m 0644 ${UNPACKDIR}/default ${D}${sysconfdir}/default/dropbear
}

View File

@@ -1,2 +0,0 @@
DROPBEAR_EXTRA_ARGS="-w"
DROPBEAR_RSAKEY_DIR=/etc/dropbear

View File

@@ -1,5 +1,12 @@
inherit extrausers
EXTRA_IMAGE_FEATURES ?= " ssh-server-dropbear read-only-rootfs overlayfs-etc "
OVERLAYFS_ETC_MOUNT_POINT = "/var/etc"
OVERLAYFS_ETC_MOUNT_OPTIONS = "defaults"
OVERLAYFS_ETC_FSTYPE = "ext4"
IMAGE_FEATURES:remove = " package-management "
EXTRA_USERS_PARAMS = "usermod -d /home/diya -p 2Pe/4xyFxsokE diya; \
usermod -a -G video diya; \
usermod -a -G tty diya; \
@@ -8,10 +15,11 @@ EXTRA_USERS_PARAMS = "usermod -d /home/diya -p 2Pe/4xyFxsokE diya; \
usermod -a -G audio diya; \
usermod -a -G sudo diya; \
"
IMAGE_BOOT_FILES:append = " fs_resize diya-config.txt recovery-${MACHINE}.cpio.gz Image "
IMAGE_INSTALL:append = "kernel-modules \
e2fsprogs \
e2fsprogs-resize2fs \
parted \
libcurl \
libdrm \
libgbm \
@@ -22,6 +30,7 @@ IMAGE_INSTALL:append = "kernel-modules \
libinput \
libpam \
diya-overlay \
usbnet-tools \
seatd \
libxkbcommon \
xkeyboard-config \
@@ -31,14 +40,17 @@ IMAGE_INSTALL:append = "kernel-modules \
sudo \
htop \
i2c-tools \
net-tools \
bash \
nano \
iwd \
networkmanager networkmanager-nmcli networkmanager-bluetooth dhcpcd \
networkmanager networkmanager-nmcli networkmanager-bluetooth networkmanager-nmtui dnsmasq \
evtest \
rsync \
coreutils \
glmark2 \
android-tools \
android-tools-adbd \
"
# TOOLCHAIN_HOST_TASK:append = " libxkbcommon "

View File

@@ -1,5 +1,6 @@
DISTRO_FEATURES:append = " wayland "
IMAGE_ROOTFS_EXTRA_SPACE = "0"
IMAGE_OVERHEAD_FACTOR = "1.0"
require base-image.inc
EXTRA_USERS_PARAMS:append = "useradd xdg; \
@@ -24,7 +25,6 @@ IMAGE_INSTALL:append = "pango \
gtk4 \
gtk4-layer-shell \
libadwaita \
gobject-introspection \
wayland wayland-protocols wlroots-0.19 \
foot \
mc \
@@ -34,8 +34,9 @@ IMAGE_INSTALL:append = "pango \
lua \
"
PACKAGE_EXCLUDE = " gtk+ gtk+3 adwaita-icon-theme "
IMAGE_INSTALL:remove = " gtk+ gtk+3 adwaita-icon-theme "
IMAGE_INSTALL:remove = " gtk+ gtk+3 adwaita-icon-theme python python3 "
# wlr-randr l3afpad wlopm cairo-egl webkitgtk
# add tools to toolchains
TOOLCHAIN_HOST_TASK:append = " nativesdk-glib-2.0 nativesdk-glib-2.0-codegen nativesdk-glib-2.0-utils "
TOOLCHAIN_HOST_TASK:append = " nativesdk-glib-2.0 nativesdk-glib-2.0-codegen nativesdk-glib-2.0-utils "
TOOLCHAIN_TARGET_TASK:append = " gobject-introspection "

View File

@@ -1,24 +1,31 @@
DESCRIPTION = "Recovery initramfs image."
IMAGE_ROOTFS_EXTRA_SPACE = "0"
IMAGE_OVERHEAD_FACTOR = "1.0"
inherit core-image extrausers
PACKAGE_INSTALL = "recovery-boot \
dosfstools \
e2fsprogs \
e2fsprogs-resize2fs \
parted \
util-linux-fsck \
kernel-modules \
busybox \
sysvinit \
sysvinit-inittab \
systemd \
${VIRTUAL-RUNTIME_base-utils} \
udev \
initscripts \
packagegroup-core-ssh-dropbear \
base-passwd \
${ROOTFS_BOOTSTRAP_INSTALL}"
systemd-networkd \
android-tools \
android-tools-adbd"
# Do not pollute the initrd image with rootfs features
INITRAMFS_SCRIPTS = ""
IMAGE_FEATURES = ""
IMAGE_LINGUAS = ""
PACKAGE_EXCLUDE = "kernel-image-*"
export IMAGE_BASENAME = "${MLPREFIX}recovery"
IMAGE_NAME_SUFFIX ?= ""
IMAGE_LINGUAS = ""
@@ -26,7 +33,6 @@ IMAGE_LINGUAS = ""
LICENSE = "MIT"
IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
inherit core-image extrausers
IMAGE_ROOTFS_SIZE = "8192"
IMAGE_ROOTFS_EXTRA_SPACE = "0"
@@ -44,4 +50,8 @@ image_patch () {
cat << EOF > ${IMAGE_ROOTFS}/etc/hostname
diya-recovery
EOF
cat << EOF >> ${IMAGE_ROOTFS}/etc/profile
export MACHINE=${MACHINE}
EOF
echo 'DROPBEAR_EXTRA_ARGS=""' > ${IMAGE_ROOTFS}/etc/default/dropbear
}

View File

@@ -1,24 +0,0 @@
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
auto lo
iface lo inet loopback
# Wireless interfaces
#auto wlan0
#iface wlan0 inet dhcp
# wireless_mode managed
# wireless_essid any
# wpa-driver wext
#wpa-conf /etc/network/wpa_supplicant.conf
# Ethernet/RNDIS gadget (g_ether)
# ... or on host side, usbnet and random hwaddr
iface usb0 inet static
address 192.168.7.2
netmask 255.255.255.0
network 192.168.7.0
gateway 192.168.7.1
# Bluetooth networking
# iface bnep0 inet dhcp

View File

@@ -1,7 +0,0 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI += " file://itf_diya "
do_install:append () {
rm ${D}/etc/network/interfaces
install -m 0644 ${UNPACKDIR}/itf_diya ${D}/etc/network/interfaces
}

View File

@@ -0,0 +1,35 @@
DESCRIPTION = "Different utilities from Android - corressponding configuration files for using ConfigFS"
SECTION = "console/utils"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = " \
file://android-gadget-setup \
file://android-gadget-start \
file://android-gadget-cleanup \
file://10-adbd-configfs.conf \
"
PACKAGE_ARCH = "${MACHINE_ARCH}"
do_install() {
install -d ${D}${bindir}
install -m 0755 ${UNPACKDIR}/android-gadget-setup ${D}${bindir}
install -m 0755 ${UNPACKDIR}/android-gadget-start ${D}${bindir}
install -m 0755 ${UNPACKDIR}/android-gadget-cleanup ${D}${bindir}
if [ -r ${UNPACKDIR}/android-gadget-setup.machine ] ; then
install -d ${D}${sysconfdir}
install -m 0644 ${UNPACKDIR}/android-gadget-setup.machine ${D}${sysconfdir}
fi
install -d ${D}${systemd_unitdir}/system/android-tools-adbd.service.d
install -m 0644 ${UNPACKDIR}/10-adbd-configfs.conf ${D}${systemd_unitdir}/system/android-tools-adbd.service.d
}
FILES:${PN} += " \
${systemd_unitdir}/system/ \
"
PROVIDES += "android-tools-conf"
RPROVIDES:${PN} = "android-tools-conf"

View File

@@ -0,0 +1,4 @@
[Service]
ExecStartPre=/usr/bin/android-gadget-setup
ExecStartPost=/usr/bin/android-gadget-start
ExecStopPost=/usr/bin/android-gadget-cleanup

View File

@@ -0,0 +1,26 @@
#!/bin/sh
[ -d /sys/kernel/config/usb_gadget ] || exit 0
cd /sys/kernel/config/usb_gadget
cd g1
echo -n "" > UDC || true
killall adbd || true
umount /dev/usb-ffs/adb
rm configs/c.1/ffs.adb
rm configs/c.1/rndis.rndis.1
rmdir configs/c.1/strings/0x409
rmdir configs/c.1
rmdir functions/ffs.adb
rmdir functions/rndis.rndis.1
rmdir strings/0x409
cd ..
rmdir g1

View File

@@ -0,0 +1,42 @@
#!/bin/sh
set -e
manufacturer=RPB
model="Android device"
serial=0123456789ABCDEF
if [ -r /etc/android-gadget-setup.machine ] ; then
. /etc/android-gadget-setup.machine
fi
[ -d /sys/kernel/config/usb_gadget ] || modprobe libcomposite
cd /sys/kernel/config/usb_gadget
[ -d g1 ] && /usr/bin/android-gadget-cleanup || true
mkdir g1
cd g1
mkdir configs/c.1
mkdir functions/ffs.adb
mkdir functions/rndis.rndis.1
mkdir strings/0x409
mkdir configs/c.1/strings/0x409
echo -n 0x18d1 > idVendor
echo -n 0xd001 > idProduct
echo "$serial" > strings/0x409/serialnumber
echo "$manufacturer" > strings/0x409/manufacturer
echo "$model" > strings/0x409/product
echo "Conf 1" > configs/c.1/strings/0x409/configuration
echo EF > functions/rndis.rndis.1/class
echo 04 > functions/rndis.rndis.1/subclass
echo 01 > functions/rndis.rndis.1/protocol
ln -s functions/ffs.adb configs/c.1
ln -s functions/rndis.rndis.1 configs/c.1
mkdir -p /dev/usb-ffs/adb
mount -t functionfs adb /dev/usb-ffs/adb

View File

@@ -0,0 +1,9 @@
#!/bin/sh
set -e
sleep 10
ls /sys/class/udc/ | head -n 1 | xargs echo -n > /sys/kernel/config/usb_gadget/g1/UDC
echo "Setting UDC $(ls /sys/class/udc/ | head -n 1) for USB ADB Gadget usage"

View File

@@ -0,0 +1,8 @@
USB_DEBUGGING_ENABLED = "1"
do_install:append() {
install -d ${D}/${sysconfdir}
touch ${D}/${sysconfdir}/usb-debugging-enabled
}
FILES:${PN}-adbd += " ${sysconfdir}/usb-debugging-enabled "

View File

@@ -0,0 +1,2 @@
listen-address=192.168.100.1
dhcp-range=192.168.100.10,192.168.100.254,12h

View File

@@ -0,0 +1,22 @@
#!/bin/sh
if [ ! -e /etc/NetworkManager/system-connections/USB.nmconnection ]; then
# Create network connection
nmcli connection add con-name USB \
ifname usb0 \
type ethernet \
ip4 192.168.100.1/16
# Set priorities so it doesn't take precedence over WiFi/mobile connections
nmcli connection modify USB ipv4.route-metric 1500
nmcli connection modify USB ipv4.dns-priority 150
# Auto connection so it can be used for tethering
nmcli connection modify USB ipv4.method shared
nmcli connection modify USB connection.autoconnect yes
# nmcli con add con-name "modem" type "gsm" ifname "wwan0qmi0"
fi
# set up ip forward
sysctl -w net.ipv4.ip_forward=1
nmcli con up USB

View File

@@ -0,0 +1,11 @@
[Unit]
Description=Setup USB networking
Requires=NetworkManager.service
After=NetworkManager.service android-tools-adbd.service
[Service]
Type=oneshot
ExecStart=/usr/sbin/pinephone-setup-usb-network
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,31 @@
DESCRIPTION = "Usb network debug"
DEPENDS = ""
RDEPENDS:${PN} = "bash"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI += " \
file://dnsmasq-usb0.conf \
file://pinephone-setup-usb-network \
file://pinephone-setup-usb-network.service \
"
inherit systemd
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE:${PN} = "pinephone-setup-usb-network.service"
S = "${UNPACKDIR}"
do_install() {
install -d ${D}/usr/sbin/
install -m 0755 ${UNPACKDIR}/pinephone-setup-usb-network ${D}/usr/sbin/pinephone-setup-usb-network
install -d ${D}/etc/dnsmasq.d
install -m 0644 ${UNPACKDIR}/dnsmasq-usb0.conf ${D}/etc/dnsmasq.d/dnsmasq-usb0.conf
install -D -p -m0644 ${UNPACKDIR}/pinephone-setup-usb-network.service \
${D}${systemd_unitdir}/system/pinephone-setup-usb-network.service
}
FILES:${PN}:append = " /usr/sbin "

View File

@@ -1,50 +0,0 @@
DESCRIPTION = "Auto configuration deployment from media"
DEPENDS = ""
RDEPENDS:${PN} = "bash"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI += "file://confd \
file://expandfs.sh \
file://80_diya \
file://fs_resize \
file://boot-to-recovery \
file://diya.pam \
file://xdg-terminal-exec"
S = "${UNPACKDIR}"
inherit update-rc.d useradd
USERADD_PACKAGES = "${PN}"
GROUPADD_PACKAGES = "${PN}"
USERADD_PARAM:${PN} = "-u 1000 -d /home/diya -r -s /bin/sh diya"
INITSCRIPT_NAME = "confd"
INITSCRIPT_PARAMS = "start 30 S ."
do_install() {
install -d ${D}/${sysconfdir}/init.d/
install -d ${DEPLOY_DIR_IMAGE}
install -m 0755 ${UNPACKDIR}/confd ${D}/${sysconfdir}/init.d/confd
install -d ${D}/sbin/
install -d ${D}/etc/default/volatiles
install -m 0644 ${UNPACKDIR}/80_diya ${D}${sysconfdir}/default/volatiles
install -m 0755 ${UNPACKDIR}/expandfs.sh ${D}/sbin/expandfs.sh
install -m 0755 ${UNPACKDIR}/boot-to-recovery ${D}/sbin/boot-to-recovery
install -m 0755 ${UNPACKDIR}/fs_resize ${DEPLOY_DIR_IMAGE}/
install -d ${D}/etc/pam.d
install -m 0644 ${UNPACKDIR}/diya.pam ${D}${sysconfdir}/pam.d/diya
install -d ${D}/usr/bin
install -m 0755 ${UNPACKDIR}/xdg-terminal-exec ${D}/usr/bin
cat << EOF > ${DEPLOY_DIR_IMAGE}/diya-config.txt
recovery=false
recovery_image=recovery-${MACHINE}.cpio.gz
console=both
bootlogo=false
EOF
install -d ${D}/var/etc
install -d ${D}/var/etc/upper
install -d ${D}/var/etc/work
}

View File

@@ -1,2 +0,0 @@
d root root 0755 /run/root none
d xdg xdg 0755 /run/xdg none

View File

@@ -1,22 +0,0 @@
#! /bin/sh
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "$0 shall be run as root"
exit 1
fi
. /etc/profile
PATH=/sbin:/bin:/usr/sbin:/usr/bin
if [ ! -e /boot/diya-config.txt ]; then
# prepare env for recovery boot
cat << EOF > /boot/diya-config.txt
recovery=true
recovery_image=recovery-${MACHINE}.cpio.gz
EOF
else
sed -i 's/^.*recovery.*/recovery=true/g' /boot/diya-config.txt || \
echo "recovery=true" >> /boot/diya-config.txt
fi
echo "Rebooting to recovery mode"
reboot

View File

@@ -1,53 +0,0 @@
#!/bin/sh
DESC="Auto deployment configuration from media"
. /etc/profile
PATH=/sbin:/bin:/usr/sbin:/usr/bin
if [ -z "$DISK" ]; then
DISK="mmcblk0"
fi
case "$1" in
start)
echo -n "Start $DESC: "
# mount the overlay which is not auto mount by fstab
# this make /etc editable
mount -t overlay -o lowerdir=/etc,upperdir=/var/etc/upper,workdir=/var/etc/work overlay /etc
# for some reason the LCD backlight is turned off
# need to turn it on manually
if [ -f "/boot/fs_resize" ]; then
/sbin/expandfs.sh
touch /boot/home_partition_should_be_formated
rm /boot/fs_resize
reboot
fi
if [ -f "/boot/home_partition_should_be_formated" ]; then
echo "Trying to format the home partition"
umount /dev/${DISK}p4
yes | mkfs.ext4 /dev/${DISK}p4
mount /dev/${DISK}p4 /home
rm /boot/home_partition_should_be_formated
fi
if [ ! -d "/home/diya" ]; then
mkdir -p /home/diya
chown -R diya:diya /home/diya
fi
if [ ! -d "/home/xdg" ]; then
mkdir -p /home/xdg
chown -R diya:diya /home/xdg
fi
if ls /boot/*.nmconnection > /dev/null 2>&1 ;then
mv /boot/*.nmconnection /etc/NetworkManager/system-connections/
chmod 600 /etc/NetworkManager/system-connections/*.nmconnection
fi
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start}" >&2
exit 1
;;
esac
exit 0

View File

@@ -1,34 +0,0 @@
#! /bin/sh
. /etc/profile
PATH=/sbin:/bin:/usr/sbin:/usr/bin
if [ -z "$DISK" ]; then
DISK="mmcblk0"
fi
if [ "$(/usr/bin/id -u)" -ne 0 ]; then
echo "$0 shall be run as root"
exit 1
fi
start_sector=$(cat /sys/block/$DISK/${DISK}p4/start)
echo "Start sector is: $start_sector"
if [ -z "$start_sector" ]; then
echo "Cannot find the start sector"
exit 1
fi
echo "Expanding the partition"
sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk /dev/$DISK
d # delete partition
4 # number 4
n # new partition
p # primary partition
4 # partition number 4
$start_sector
# default - end of disk
p # print the in-memory partition table
w # write the partition table
q # and we're done
EOF

View File

@@ -1 +0,0 @@
resize the partition

View File

@@ -1,78 +0,0 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: diya
# Short-Description: simple session manager
# Description: session manager that allows user login and
# start user session
### END INIT INFO
#
# -*- coding: utf-8 -*-
# set -e
# shellcheck disable=SC1091
. /etc/init.d/functions
DAEMON=/usr/bin/diya-session-manager
NAME=diya-sessiond
PIDFILE=/var/run/diya/sessiond.pid
DESC="Diya session manager"
DAEMONUSER="root"
PARAMS="-c /etc/diya/daemon.conf"
test -x $DAEMON || exit 0
start_it_up()
{
mkdir -p "$(dirname $PIDFILE)"
if [ -e $PIDFILE ]; then
PIDDIR=/proc/$(cat $PIDFILE)
if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then
echo "$DESC already started; not starting."
else
echo "Removing stale PID file $PIDFILE."
rm -f $PIDFILE
fi
fi
echo -n "Starting $DESC: "
start-stop-daemon -o --start --quiet --pidfile $PIDFILE \
--user $DAEMONUSER --exec $DAEMON -- $PARAMS
echo "$NAME."
}
shut_it_down()
{
echo -n "Stopping $DESC: "
start-stop-daemon -o --stop --quiet --pidfile $PIDFILE \
--user $DAEMONUSER
# We no longer include these arguments so that start-stop-daemon
# can do its job even given that we may have been upgraded.
# We rely on the pidfile being sanely managed
# --exec $DAEMON -- --system $PARAMS
echo "$NAME."
rm -f $PIDFILE
}
case "$1" in
start)
start_it_up
;;
stop)
shut_it_down
;;
status)
status $DAEMON
exit $?
;;
restart)
shut_it_down
sleep 1
start_it_up
;;
*)
echo "Usage: /etc/init.d/$NAME {start|stop|status|restart}" >&2
exit 1
;;
esac
exit 0

View File

@@ -1,21 +0,0 @@
#!/bin/sh
DESC="Custom configuration"
. /etc/profile
PATH=/sbin:/bin:/usr/sbin:/usr/bin
case "$1" in
start)
echo -n "Start $DESC: "
sed -i 's/^.*recovery.*/recovery=false/g' /boot/diya-config.txt || \
echo "recovery=false" >> /boot/diya-config.txt
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start}" >&2
exit 1
;;
esac
exit 0

View File

@@ -1,107 +0,0 @@
#!/bin/sh
# Copyright (C) 2011 O.S. Systems Software LTDA.
# Licensed on MIT
#
# Provides the API to be used by the initramfs modules
#
# Modules need to provide the following functions:
#
# <module>_enabled : check if the module ought to run (return 1 to skip)
# <module>_run : do what is need
#
# Boot parameters are available on environment in the as:
#
# 'foo=value' as 'bootparam_foo=value'
# 'foo' as 'bootparam_foo=true'
# 'foo.bar[=value] as 'foo_bar=[value|true]'
# Load kernel module
load_kernel_module() {
if modprobe $1 >/dev/null 2>&1; then
info "Loaded module $1"
else
debug "Failed to load module $1"
fi
}
# Prints information
msg() {
echo "$@" >/dev/console
}
# Prints information if verbose bootparam is used
info() {
[ -n "$bootparam_verbose" ] && echo "$@" >/dev/console
}
# Prints information if debug bootparam is used
debug() {
[ -n "$bootparam_debug" ] && echo "DEBUG: $@" >/dev/console
}
# Prints a message and start a endless loop
fatal() {
echo $1 >/dev/console
echo >/dev/console
if [ -n "$bootparam_init_fatal_sh" ]; then
sh
else
while [ "true" ]; do
sleep 3600
done
fi
}
# Variables shared amoung modules
EFI_DIR=/sys/firmware/efi # place to store device firmware information
# initialize /proc, /sys, /run/lock and /var/lock
mkdir -p /proc /sys /run/lock /var/lock /var/run /home
mount -t proc proc /proc
mount -t sysfs sysfs /sys
if [ -d $EFI_DIR ];then
mount -t efivarfs none /sys/firmware/efi/efivars
fi
# populate bootparam environment
for p in `cat /proc/cmdline`; do
if [ -n "$quoted" ]; then
value="$value $p"
if [ "`echo $p | sed -e 's/\"$//'`" != "$p" ]; then
eval "bootparam_${quoted}=${value}"
unset quoted
fi
continue
fi
opt=`echo $p | cut -d'=' -f1`
opt=`echo $opt | sed -e 'y/.-/__/'`
if [ "`echo $p | cut -d'=' -f1`" = "$p" ]; then
eval "bootparam_${opt}=true"
else
value="`echo $p | cut -d'=' -f2-`"
if [ "`echo $value | sed -e 's/^\"//'`" != "$value" ]; then
quoted=${opt}
continue
fi
eval "bootparam_${opt}=\"${value}\""
fi
done
# use /dev with devtmpfs
if grep -q devtmpfs /proc/filesystems; then
mkdir -p /dev
mount -t devtmpfs devtmpfs /dev
else
if [ ! -d /dev ]; then
fatal "ERROR: /dev doesn't exist and kernel doesn't has devtmpfs enabled."
fi
fi
# run init
exec /sbin/init
# Catch all
fatal "ERROR: Initramfs failed to initialize the system."

View File

@@ -1,47 +0,0 @@
SUMMARY = "Modular initramfs system"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
RDEPENDS:${PN} += "${VIRTUAL-RUNTIME_base-utils} sysvinit"
RRECOMMENDS:${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog}"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
PR = "r4"
inherit allarch update-rc.d
SRC_URI = "file://init \
file://confd \
file://diya-update \
"
S = "${UNPACKDIR}"
INITSCRIPT_NAME = "confd"
INITSCRIPT_PARAMS = "start 30 S ."
do_install() {
install -d ${D}/etc/init.d
install -d ${D}/sbin
# base
install -m 0755 ${UNPACKDIR}/init ${D}/init
install -m 0755 ${UNPACKDIR}/confd ${D}/etc/init.d/confd
cat << EOF >> ${D}/etc/profile
export MACHINE=${MACHINE}
EOF
install -m 0755 ${UNPACKDIR}/diya-update ${D}/sbin/
# create symlink
ln -sf /sbin/diya-update ${D}/sbin/diya-update-rootfs
ln -sf /sbin/diya-update ${D}/sbin/diya-update-kernel
ln -sf /sbin/diya-update ${D}/sbin/diya-update-initramfs
ln -sf /sbin/diya-update ${D}/sbin/diya-update-all
# Create device nodes expected by some kernels in initramfs
# before even executing /init.
install -d ${D}/dev
mknod -m 622 ${D}/dev/console c 5 1
}
FILES:${PN} = "/etc /init /dev /sbin"

View File

@@ -1,30 +0,0 @@
DESCRIPTION = "leafpad for GTK3"
LICENSE = "GPL-3.0-only"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-3.0-only;md5=c79ff39f19dfec6d293b95dea7b07891"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
S = "${UNPACKDIR}"
DEPENDS = "gtk+3 pango cairo harfbuzz gdk-pixbuf intltool-native"
inherit pkgconfig
SRC_URI = "file://l3afpad-0.8.18.1.11.tar.gz"
SRC_URI[sha256sum] = "005457fa35a7e37024e403852a21a5c7362a0314a8de9b7fff73b1e7802d8959"
do_configure () {
./configure --host=x86_64-unknown-linux --target=aarch64-poky-linux
}
do_compile () {
make
}
do_install () {
DESTDIR=${D} make install
}
FILES:${PN} += "/usr/local/*"

View File

@@ -1,334 +0,0 @@
Set Term = "foot"
# Task Switcher
switcher {
interval = 700
icons = true
labels = false
cols = 5
}
function("SfwbarInit") {
SetBarId "bar-0"
SetLayer "bottom"
}
function("ToggleMinimize") {
[!Minimized] Minimize
[Minimized] UnMinimize
}
function("ToggleMaximize") {
[!Maximized] Maximize
[Maximized] UnMaximize
}
function("ShowDesktopSaveFocus") {
[Focused] UserState "2:on"
[!Focused] UserState "2:off"
}
function("ShowdesktopMinimize") {
[!Minimized] UserState "on"
[Minimized] UserState "off"
[!Minimized] Minimize
}
function("ShowDesktopRestore") {
[UserState] UnMinimize
}
function("ShowDesktopRestoreFocus") {
[UserState2] Focus
}
function("ShowDesktopCheckWindow") {
[!Minimized] UserState "target","2:on"
}
function("ShowDesktopReminimize")
{
[!Minimized] UserState "on"
[!Minimized] Minimize
}
function("ShowDesktopUnminimized") {
[UserState2 | Children] Function "ShowDesktopSaveFocus"
[UserState2 | Children] Function "ShowDesktopReminimize"
[!UserState2 | Children] Function "ShowDesktopRestore"
[!UserState2 | Children] Function "ShowDesktopRestoreFocus"
[!UserState2] UserState "off"
[UserState2] UserState "on"
}
function("ShowDesktop") {
[!UserState | Children] Function "ShowDesktopSaveFocus"
[!UserState | Children] Function "ShowDesktopMinimize"
[UserState] UserState "2:off"
[UserState| Children ] Function "ShowDesktopCheckWindow"
[UserState] Function "target","ShowDesktopUnminimized"
[!UserState] UserState "on"
}
menu("winops") {
item("Focus", Focus );
item("Close", Close );
item("Toggle minimize", Function "ToggleMinimize" );
item("Toggle maximize", Function "ToggleMaximize" );
}
# Panel layout
layout {
button {
style = "launcher"
value = "/usr/share/icons/Adwaita/scalable/actions/view-app-grid-symbolic.svg"
action = Exec "wtype -M alt ' ' -m alt"
}
button {
style = "launcher"
value = "/usr/share/icons/Adwaita/scalable/actions/system-run-symbolic.svg"
tooltip = "Quick run"
action = Exec "bash -c \"`drun`\""
}
button {
value = "/usr/share/icons/Adwaita/scalable/devices/tv-symbolic.svg"
style = "launcher"
tooltip = "Show Desktop"
action = Function "target", "ShowDesktop"
}
button {
style = "launcher"
value = $Term
tooltip = "Terminal"
action = Exec $Term
}
taskbar "target" {
rows = 1
css = "* { -GtkWidget-hexpand:false; }" # stretch horizontally
icons = true
group = false
sort = false
labels = true
action[3] = Menu "winops"
action[2] = Close
}
label {
css = "* { -GtkWidget-hexpand: true; }"
}
tray {
rows = 1
}
include("network-module.widget")
include("cpu.widget")
include("memory.widget")
}
#CSS
button#launcher, button#module{
padding: 0px 2px 0px 2px;
/*background: none;
background-color: #5F548E;*/
border-style:none;
box-shadow: none;
border-radius: 0;
}
window {
-GtkWidget-direction: top;
/*background-color: rgba(0,0,0,0.6);*/
border-color: rgba(0,0,0,0.3);
}
#hidden {
-GtkWidget-visible: false;
}
button#taskbar_normal grid {
-GtkWidget-hexpand: false;
padding-right: 0px;
margin-right: 0px;
}
button#launcher image, button#taskbar_normal image, button#taskbar_active image, button#taskbar_normal:hover image {
-GtkWidget-vexpand: true;
box-shadow: none;
border: none;
border-image: none;
background-image: none;
background: none;
min-width: 24px;
min-height: 24px;
-gtk-icon-shadow: none;
}
button#taskbar_normal label, button#taskbar_active label, button#taskbar_normal:hover label {
-GtkWidget-vexpand: true;
-GtkWidget-hexpand: false;
padding-left: 0.75mm;
padding-top: 0px;
padding-bottom: 0px;
font: 0.3cm Sans;
}
button#taskbar_normal , button#taskbar_active , button#taskbar_normal:hover {
padding-left: 0.75mm;
padding-top: 0.5mm;
padding-bottom: 0.5mm;
background-image: none;
border-radius: 0;
border-image: none;
-GtkWidget-hexpand: false;
-GtkWidget-vexpand: true;
background-color: rgba(119,119,119,0.2);
border: none;
/*border-color: rgba(119,119,119,0.3);*/
box-shadow: none;
}
button#taskbar_normal label {
color: black;
}
button#taskbar_active {
/* background-color: rgba(255,255,255,0.2);
border-color: rgba(255,255,255,0.4); */
border-bottom:3px solid #5F548E;
}
button#taskbar_active label, button#taskbar_normal:hover label {
color: #5F548E;
}
/* button#taskbar_active:hover*/
button#taskbar_normal:hover {
background-color: #d2d2d2;
border-color: rgba(234,234,234,0.44);
}
grid#switcher_active image,
grid#switcher_active {
min-width: 1.25cm;
min-height: 1.25cm;
border-image: none;
padding: 1.25mm;
background-color: #777777;
border: 0px;
box-shadow: none;
border-radius: 1.25mm;
-GtkWidget-hexpand: true;
}
grid#switcher_normal image,
grid#switcher_normal {
min-width: 1.25cm;
min-height: 1.25cm;
border-image: none;
padding: 1.25mm;
-GtkWidget-direction: right;
-GtkWidget-hexpand: true;
}
window#switcher {
border-style: solid;
border-width: 0.25mm;
border-color: #000000;
border-radius: 1.25mm;
padding: 1.25mm;
-GtkWidget-hexpand: true;
}
grid#switcher {
border-radius: 1.25mm;
padding: 1.25mm;
background-color: rgba(0,0,0,0.8);
border-color: rgba(119,119,119,0.8);
box-shadow: none;
-GtkWidget-hexpand: true;
}
button#tray_active,
button#tray_passive,
button#tray_attention {
background-image: none;
border: 0px;
padding: 0px 1px;
margin: 0px;
border-image: none;
border-radius: 0px;
outline-style: none;
box-shadow: none;
-GtkWidget-hexpand: true;
-GtkWidget-vexpand: true;
}
button#tray_active image,
button#tray_passive image,
button#tray_attention image {
min-width: 26px;
}
grid#layout {
padding: 0.25mm;
-GtkWidget-direction: right;
min-height: 30px;
}
menu {
background-color: rgba(0,0,0,0.8);
border-color: rgba(119,119,119,0.3);
box-shadow: none;
}
menuitem {
color: #ffffff;
}
menu image {
min-width: 24px;
min-height: 24px;
padding-right: 5px;
}
chart#cpu_chart {
background: rgba(127,127,127,0.3);
min-width: 9px;
-GtkWidget-vexpand: true;
margin: 2px;
border: 1px solid @theme_fg_color;
color: red;
}
progressbar#memory {
-GtkWidget-direction: top;
-GtkWidget-vexpand: true;
min-width: 9px;
border: 1px solid @theme_fg_color;
margin: 2px;
}
progressbar#memory trough {
min-height: 2px;
min-width: 9px;
border: none;
border-radius: 0px;
background: rgba(127,127,127,0.3);
}
progressbar#memory progress {
-GtkWidget-hexpand: true;
min-width: 9px;
border-radius: 0px;
border: none;
margin: 0px;
background-color: alpha(green,0.9);
}
label {
font: 0.27cm Sans;
color: #ffffff;
text-shadow: none;
}
* {
-GtkWidget-vexpand: true;
}

View File

@@ -1,27 +0,0 @@
DESCRIPTION = "sfwbar pannel for wayland"
LICENSE = "GPL-3.0-only"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-3.0-only;md5=c79ff39f19dfec6d293b95dea7b07891"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
DEPENDS = "gtk+3 gtk-layer-shell json-c wayland-native"
SRCREV = "${AUTOREV}"
SRC_URI = "git://github.com/LBCrion/sfwbar.git;protocol=https;branch=main"
SRC_URI += " file://sfwbar.config "
S="${UNPACKDIR}/git"
inherit meson pkgconfig
EXTRA_OEMESON += "--buildtype release"
do_install:append () {
install -d ${D}/${sysconfdir}/xdg/
install -d ${D}/${sysconfdir}/xdg/sfwbar/
install -m 0755 ${UNPACKDIR}/sfwbar.config ${D}/${sysconfdir}/xdg/sfwbar/
}
FILES:${PN} += "/usr/share/icons/*"

View File

@@ -1 +0,0 @@
PACKAGECONFIG:remove = " systemd sysvinit man-pages "

View File

@@ -1 +0,0 @@
PACKAGECONFIG:remove = " man-pages pam "

View File

@@ -1,320 +0,0 @@
# Default config for tofi
#
# Copy this file to ~/.config/tofi/config and get customising!
#
# A complete reference of available options can be found in `man 5 tofi`.
#
### Fonts
#
# Font to use, either a path to a font file or a name.
#
# If a path is given, tofi will startup much quicker, but any
# characters not in the chosen font will fail to render.
#
# Otherwise, fonts are interpreted in Pango format.
font = "Sans"
# Point size of text.
font-size = 24
# Comma separated list of OpenType font feature settings to apply,
# if supported by the chosen font. The format is similar to the CSS
# "font-feature-settings" property.
#
# Examples:
#
# font-features = "smcp, c2sc" (all small caps)
# font-features = "liga 0" (disable ligatures)
font-features = ""
# Comma separated list of OpenType font variation settings to apply
# to variable fonts. The format is similar to the CSS
# "font-variation-settings" property.
#
# Examples:
#
# font-variations = "wght 900" (Extra bold)
# font-variations = "wdth 25, slnt -10" (Narrow and slanted)
font-variations = ""
# Perform font hinting. Only applies when a path to a font has been
# specified via `font`. Disabling font hinting speeds up text
# rendering appreciably, but will likely look poor at small font pixel
# sizes.
hint-font = true
#
### Text theming
#
# Default text color
#
# All text defaults to this color if not otherwise specified.
text-color = #FFFFFF
# All pieces of text have the same theming attributes available:
#
# *-color
# Foreground color
#
# *-background
# Background color
#
# *-background-padding
# Background padding in pixels (comma-delimited, CSS-style list).
# See "DIRECTIONAL VALUES" under `man 5 tofi` for more info.
#
# *-background-corner-radius
# Radius of background box corners in pixels
# Prompt text theme
# prompt-color = #FFFFFF
prompt-background = #00000000
prompt-background-padding = 0
prompt-background-corner-radius = 0
# Placeholder text theme
placeholder-color = #FFFFFFA8
placeholder-background = #00000000
placeholder-background-padding = 0
placeholder-background-corner-radius = 0
# Input text theme
# input-color = #FFFFFF
input-background = #00000000
input-background-padding = 0
input-background-corner-radius = 0
# Default result text theme
# default-result-color = #FFFFFF
default-result-background = #00000000
default-result-background-padding = 0
default-result-background-corner-radius = 0
# Alternate (even-numbered) result text theme
#
# If unspecified, these all default to the corresponding
# default-result-* attribute.
#
# alternate-result-color = #FFFFFF
# alternate-result-background = #00000000
# alternate-result-background-padding = 0
# alternate-result-background-corner-radius = 0
# Selection text
selection-color = #F92672
selection-background = #00000000
selection-background-padding = 0
selection-background-corner-radius = 0
# Matching portion of selection text
selection-match-color = #00000000
#
### Text cursor theme
#
# Style of the optional text cursor.
#
# Supported values: bar, block, underscore
text-cursor-style = bar
# Color of the text cursor
#
# If unspecified, defaults to the same as input-color
# text-cursor-color = #FFFFFF
# Color of text behind the text cursor when text-cursor-style = block
#
# If unspecified, defaults to the same as background-color
# text-cursor-background = #000000
# Corner radius of the text cursor
text-cursor-corner-radius = 0
# Thickness of the bar and underscore text cursors.
#
# If unspecified, defaults to a font-dependent value when
# text-cursor-style = underscore, or to 2 otherwise.
# text-cursor-thickness = 2
#
### Text layout
#
# Prompt to display.
prompt-text = "run: "
# Extra horizontal padding between prompt and input.
prompt-padding = 0
# Placeholder input text.
placeholder-text = ""
# Maximum number of results to display.
# If 0, tofi will draw as many results as it can fit in the window.
num-results = 0
# Spacing between results in pixels. Can be negative.
result-spacing = 0
# List results horizontally.
horizontal = false
# Minimum width of input in horizontal mode.
min-input-width = 0
#
### Window theming
#
# Width and height of the window. Can be pixels or a percentage.
width = 640
height = 480
# Window background color
background-color = #1B1D1E
# Width of the border outlines in pixels.
outline-width = 4
# Border outline color
outline-color = #080800
# Width of the border in pixels.
border-width = 12
# Border color
border-color = #F92672
# Radius of window corners in pixels.
corner-radius = 0
# Padding between borders and text. Can be pixels or a percentage.
padding-top = 8
padding-bottom = 8
padding-left = 8
padding-right = 8
# Whether to clip text drawing to be within the specified padding. This
# is mostly important for allowing text to be inset from the border,
# while still allowing text backgrounds to reach right to the edge.
clip-to-padding = true
# Whether to scale the window by the output's scale factor.
scale = true
#
### Window positioning
#
# The name of the output to appear on. An empty string will use the
# default output chosen by the compositor.
output = ""
# Location on screen to anchor the window to.
#
# Supported values: top-left, top, top-right, right, bottom-right,
# bottom, bottom-left, left, center.
anchor = center
# Set the size of the exclusive zone.
#
# A value of -1 means ignore exclusive zones completely.
# A value of 0 will move tofi out of the way of other windows' zones.
# A value greater than 0 will set that much space as an exclusive zone.
#
# Values greater than 0 are only meaningful when tofi is anchored to a
# single edge.
exclusive-zone = -1
# Window offset from edge of screen. Only has an effect when anchored
# to the relevant edge. Can be pixels or a percentage.
margin-top = 0
margin-bottom = 0
margin-left = 0
margin-right = 0
#
### Behaviour
#
# Hide the mouse cursor.
hide-cursor = true
# Show a text cursor in the input field.
text-cursor = true
# Sort results by number of usages in run and drun modes.
history = true
# Specify an alternate file to read and store history information
# from / to. This shouldn't normally be needed, and is intended to
# facilitate the creation of custom modes.
# history-file = /path/to/histfile
# Select the matching algorithm used. If normal, substring matching is
# used, weighted to favour matches closer to the beginning of the
# string. If prefix, only substrings at the beginning of the string are
# matched. If fuzzy, searching is performed via a simple fuzzy matching
# algorithm.
#
# Supported values: normal, prefix, fuzzy
matching-algorithm = normal
# If true, require a match to allow a selection to be made. If false,
# making a selection with no matches will print input to stdout.
# In drun mode, this is always true.
require-match = true
# If true, automatically accept a result if it is the only one
# remaining. If there's only one result on startup, window creation is
# skipped altogether.
auto-accept-single = false
# If true, typed input will be hidden, and what is displayed (if
# anything) is determined by the hidden-character option.
hide-input = false
# Replace displayed input characters with a character. If the empty
# string is given, input will be completely hidden.
# This option only has an effect when hide-input is set to true.
hidden-character = "*"
# If true, use physical keys for shortcuts, regardless of the current
# keyboard layout. If false, use the current layout's keys.
physical-keybindings = true
# Instead of printing the selected entry, print the 1-based index of
# the selection. This option has no effect in run or drun mode. If
# require-match is set to false, non-matching input will still result
# in the input being printed.
print-index = false
# If true, directly launch applications on selection when in drun mode.
# Otherwise, just print the command line to stdout.
drun-launch = false
# The terminal to run terminal programs in when in drun mode.
# This option has no effect if drun-launch is set to true.
# Defaults to the value of the TERMINAL environment variable.
terminal = foot
# Delay keyboard initialisation until after the first draw to screen.
# This option is experimental, and will cause tofi to miss keypresses
# for a short time after launch. The only reason to use this option is
# performance on slow systems.
late-keyboard-init = false
# If true, allow multiple simultaneous processes.
# If false, create a lock file on startup to prevent multiple instances
# from running simultaneously.
multi-instance = false
# Assume input is plain ASCII, and disable some Unicode handling
# functions. This is faster, but means e.g. a search for "e" will not
# match "é".
ascii-input = false
#
### Inclusion
#
# Configs can be split between multiple files, and then included
# within each other.
# include = /path/to/config

View File

@@ -1,9 +0,0 @@
#! /bin/sh
config="/etc/xdg/tofi/config"
if [ -e "$HOME/.config/tofi/config" ]; then
config="$HOME/.config/tofi/config"
fi
tofi-drun -c "$config"

View File

@@ -1,27 +0,0 @@
DESCRIPTION = "tofi menu for wayland"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
DEPENDS = "wayland freetype wayland-native wayland-protocols-native wayland-protocols harfbuzz pango libxkbcommon"
SRCREV = "${AUTOREV}"
SRC_URI = "git://github.com/philj56/tofi.git;protocol=https;branch=master"
SRC_URI += " file://config file://drun "
S="${UNPACKDIR}/git"
inherit meson pkgconfig
EXTRA_OEMESON += "--buildtype release"
do_install:append () {
# replace the default config
install -m 0755 ${UNPACKDIR}/drun ${D}/usr/bin/
install -m 0755 ${UNPACKDIR}/config ${D}/${sysconfdir}/xdg/tofi/
}
FILES:${PN} += "/usr/share/*"

View File

@@ -1,23 +0,0 @@
DESCRIPTION = "wlopm"
LICENSE = "GPL-3.0-only"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-3.0-only;md5=c79ff39f19dfec6d293b95dea7b07891"
DEPENDS = "wayland wayland-native wayland-protocols"
SRCREV = "${AUTOREV}"
SRC_URI = "git://git.iohub.dev/dany/wlopm.git;protocol=https;branch=master"
S="${UNPACKDIR}/git"
do_compile () {
oe_runmake
}
do_install() {
oe_runmake install DESTDIR='${D}'
}
FILES:${PN} += "/usr/local/*"

View File

@@ -1,17 +0,0 @@
DESCRIPTION = "virtual key event for wayland"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
DEPENDS = "wayland wayland-native wayland-protocols-native wayland-protocols libxkbcommon"
SRCREV = "${AUTOREV}"
SRC_URI = "git://github.com/atx/wtype.git;protocol=https;branch=master"
S="${UNPACKDIR}/git"
inherit meson pkgconfig
EXTRA_OEMESON += "--buildtype release"

View File

@@ -1,38 +0,0 @@
# Example autostart file
# Set background color
swaybg -i /etc/xdg/labwc/wpp.jpg >/dev/null 2>&1 &
# wlr-randr --output DPI-1 --transform 90
# Configure output directives such as mode, position, scale and transform.
# Use wlr-randr to get your output names
# Example ~/.config/kanshi/config below:
# profile {
# output HDMI-A-1 position 1366,0
# output eDP-1 position 0,0
# }
# kanshi >/dev/null 2>&1 &
# Launch a panel such as yambar or waybar.
# waybar >/dev/null 2>&1 &
# Enable notifications. Typically GNOME/KDE application notifications go
# through the org.freedesktop.Notifications D-Bus API and require a client such
# as mako to function correctly. Thunderbird is an example of this.
# mako >/dev/null 2>&1 &
# Lock screen after 1 minute; turn off display after another 5 minutes.
#
# Note that in the context of idle system power management, it is *NOT* a good
# idea to turn off displays by 'disabling outputs' for example by
# `wlr-randr --output <whatever> --off` because this re-arranges views
# (since a837fef). Instead use a wlr-output-power-management client such as
# https://git.sr.ht/~leon_plickat/wlopm
#swayidle -w timeout 60 'wlopm --off DPI-1' resume 'wlopm --on DPI-1' &
#SFWBAR_CNF="/etc/xdg/sfwbar/sfwbar.config"
#if [ -e "$HOME/.config/sfwbar/sfwbar.config" ]; then
# SFWBAR_CNF="$HOME/.config/sfwbar/sfwbar.config"
#fi
#sfwbar -f "$SFWBAR_CNF"

View File

@@ -1,28 +0,0 @@
# Example environment file
# This allows xdg-desktop-portal-wlr to function (e.g. for screen-recording)
XDG_CURRENT_DESKTOP=wlroots
# Set keyboard layout to Swedish
# XKB_DEFAULT_LAYOUT=se
# Set two keyboard layouts and toggle between them using alt+shift
# XKB_DEFAULT_LAYOUT=se,de
XKB_DEFAULT_OPTIONS=grp:alt_shift_toggle
# Force firefox to use wayland backend
# MOZ_ENABLE_WAYLAND=1
# Set cursor theme.
# Find icons themes with the command below or similar:
# find /usr/share/icons/ -type d -name "cursors"
XCURSOR_THEME=breeze_cursors
# Disable hardware cursors. Most users wouldn't want to do this, but if you
# are experiencing issues with disappearing cursors, this might fix it.
# WLR_NO_HARDWARE_CURSORS=1
# For Java applications such as JetBrains/Intellij Idea, set this variable
# to avoid menus with incorrect offset and blank windows
# See https://github.com/swaywm/sway/issues/595
# _JAVA_AWT_WM_NONREPARENTING=1

View File

@@ -1,53 +0,0 @@
#!/bin/sh
#
### BEGIN INIT INFO
# Provides: labwc
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
LABWC_USER=diya
LABWC_CONFDIR="/etc/xdg/labwc"
if test -e "/home/$LABWC_USER/.config/labwc" ; then
LABWC_CONFDIR="/home/$LABWC_USER/.config/labwc"
fi
killproc() {
pid=`/bin/pidof $1`
[ "$pid" != "" ] && kill $pid
}
read CMDLINE < /proc/cmdline
for x in $CMDLINE; do
case $x in
labwc=false)
echo "labwc disabled"
exit 0;
;;
esac
done
case "$1" in
start)
. /etc/profile
su - $LABWC_USER -c "labwc -C $LABWC_CONFDIR" &
;;
stop)
echo "Stopping labwc"
killproc labwc
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 { start | stop | restart }"
;;
esac
exit 0

View File

@@ -1,49 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<openbox_menu>
<menu id="client-menu">
<item label="Minimize">
<action name="Iconify" />
</item>
<item label="Maximize">
<action name="ToggleMaximize" />
</item>
<item label="Fullscreen">
<action name="ToggleFullscreen" />
</item>
<item label="Always on top">
<action name="ToggleAlwaysOnTop" />
</item>
<item label="Close">
<action name="Close"/>
</item>
</menu>
<menu id="root-menu">
<item label="Terminal">
<action name="Execute" command="foot -t xterm-256color" />
</item>
<item label="Reconfigure">
<action name="Reconfigure" />
</item>
<item label="Exit">
<action name="Exit" />
</item>
<item label="Reboot">
<action name="Execute" command="sudo /sbin/reboot" />
</item>
<item label="Power off">
<action name="Execute" command="sudo /sbin/halt" />
</item>
</menu>
<menu id="some-custom-menu">
<item label="Reconfigure">
<action name="Reconfigure" />
</item>
<item label="Exit">
<action name="Exit" />
</item>
</menu>
</openbox_menu>

View File

@@ -1,71 +0,0 @@
<?xml version="1.0"?>
<!--
This is a very simple config file with many options missing. For a complete
set of options with comments, see docs/rc.xml.all
-->
<labwc_config>
<core>
<gap>10</gap>
</core>
<theme>
<name>Adwaita</name>
<cornerRadius>0</cornerRadius>
<font name="sans" size="12" />
</theme>
<keyboard>
<default />
<keybind key="W-F">
<action name="ToggleFullscreen" />
</keybind>
<keybind key="W-L">
<action name="NextWindow" />
</keybind>
<keybind key="W-M">
<action name="ShowMenu">
<menu>root-menu</menu>
</action>
</keybind>
<keybind key="A-Space">
<action name="ShowMenu">
<menu>root-menu</menu>
</action>
</keybind>
<!-- Use a different terminal emulator -->
<keybind key="W-Return">
<action name="Execute" command="foot" />
</keybind>
<keybind key="W-Space">
<action name="Execute">
<command>bash -c "bash -c \"`drun`\""</command>
</action>
</keybind>
<!--
Remove a previously defined keybind
A shorter alternative is <keybind key="W-F4" />
-->
<keybind key="W-F4">
<action name="None" />
</keybind>
</keyboard>
<mouse>
<default />
<!-- Show a custom menu on desktop right click -->
<context name="Root">
<mousebind button="Right" action="Press">
<action name="ShowMenu" menu="some-custom-menu" />
</mousebind>
</context>
</mouse>
<windowRules>
<windowRule identifier="*">
<action name="Maximize"/>
</windowRule>
</windowRules>
</labwc_config>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 KiB

View File

@@ -1,28 +0,0 @@
PACKAGECONFIG:remove = " man-pages xwayland "
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
RRECOMMENDS:${PN} = ""
SRC_URI += " file://autostart \
file://init \
file://environment \
file://menu.xml \
file://rc.xml \
file://wpp.jpg \
"
do_install:append () {
install -d ${D}/${sysconfdir}/xdg
install -d ${D}/${sysconfdir}/init.d
install -d ${D}/${sysconfdir}/xdg/labwc
install -m 0755 ${UNPACKDIR}/init ${D}/${sysconfdir}/init.d/labwc
install -m 0755 ${UNPACKDIR}/wpp.jpg ${D}/${sysconfdir}/xdg/labwc/
install -m 0755 ${UNPACKDIR}/autostart ${D}/${sysconfdir}/xdg/labwc/
install -m 0755 ${UNPACKDIR}/environment ${D}/${sysconfdir}/xdg/labwc/
install -m 0755 ${UNPACKDIR}/menu.xml ${D}/${sysconfdir}/xdg/labwc/
install -m 0755 ${UNPACKDIR}/rc.xml ${D}/${sysconfdir}/xdg/labwc/
}
inherit update-rc.d
INITSCRIPT_NAME = "labwc"
INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."