Initial commit
This commit is contained in:
parent
05bb55c837
commit
a4637ec44b
30
conf/layer.conf
Normal file
30
conf/layer.conf
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
# We have a conf and classes directory, add to BBPATH
|
||||||
|
BBPATH .= ":${LAYERDIR}"
|
||||||
|
|
||||||
|
# We have recipes-* directories, add to BBFILES
|
||||||
|
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
|
||||||
|
${LAYERDIR}/recipes-*/*/*.bbappend"
|
||||||
|
|
||||||
|
BBFILE_COLLECTIONS += "meta-diya"
|
||||||
|
BBFILE_PATTERN_meta-diya = "^${LAYERDIR}/"
|
||||||
|
BBFILE_PRIORITY_meta-diya = "11"
|
||||||
|
|
||||||
|
LAYERDEPENDS_meta-diya = " core "
|
||||||
|
LAYERSERIES_COMPAT_meta-diya = "scarthgap"
|
||||||
|
|
||||||
|
PACKAGE_CLASSES = "package_ipk"
|
||||||
|
|
||||||
|
INITRAMFS_IMAGE="core-image-recovery"
|
||||||
|
INITRAMFS_IMAGE_BUNDLE="0"
|
||||||
|
INITRAMFS_MAXSIZE="200000"
|
||||||
|
INHERIT += "rm_work"
|
||||||
|
|
||||||
|
EXTRA_IMAGE_FEATURES ?= " ssh-server-dropbear read-only-rootfs "
|
||||||
|
# ssh-server-dropbear
|
||||||
|
DISTRO_FEATURES:append := " opengl "
|
||||||
|
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 = "/root"
|
22
recipes-core/base-files/base-files_%.bbappend
Normal file
22
recipes-core/base-files/base-files_%.bbappend
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
hostname = "diya"
|
||||||
|
|
||||||
|
do_install:append () {
|
||||||
|
cat << 'EOF' >> "${D}${sysconfdir}/profile"
|
||||||
|
export GDK_BACKEND=wayland
|
||||||
|
export XDG_RUNTIME_DIR=/home/$USER/.xdg
|
||||||
|
export XDG_CONFIG_HOME=/home/$USER/.config
|
||||||
|
export PATH=$PATH:/home/$USER/bin:/home/$USER/.local/bin
|
||||||
|
export LD_LIBRARY_PATH=/home/$USER/lib:/home/$USER/.local/lib
|
||||||
|
if [ ! -e "$XDG_RUNTIME_DIR" ]; then
|
||||||
|
mkdir -p "$XDG_RUNTIME_DIR"
|
||||||
|
fi
|
||||||
|
export TERM=xterm-256color
|
||||||
|
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
|
||||||
|
eval $(dbus-launch --auto-syntax)
|
||||||
|
fi
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat << EOF >> "${D}${sysconfdir}/profile"
|
||||||
|
export MACHINE=${MACHINE}
|
||||||
|
EOF
|
||||||
|
}
|
7
recipes-core/dropbear/dropbear_%.bbappend
Normal file
7
recipes-core/dropbear/dropbear_%.bbappend
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
||||||
|
SRC_URI += "file://default"
|
||||||
|
|
||||||
|
do_install:append () {
|
||||||
|
rm -rf ${D}/etc/dropbear
|
||||||
|
install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/dropbear
|
||||||
|
}
|
2
recipes-core/dropbear/files/default
Normal file
2
recipes-core/dropbear/files/default
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
DROPBEAR_EXTRA_ARGS="-w"
|
||||||
|
DROPBEAR_RSAKEY_DIR=/etc/dropbear
|
40
recipes-core/images/README.md
Normal file
40
recipes-core/images/README.md
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
#webrtc-audio-processing \
|
||||||
|
pulseaudio \
|
||||||
|
pulseaudio-server \
|
||||||
|
alsa-utils \
|
||||||
|
pulseaudio-module-alsa-card \
|
||||||
|
pulseaudio-module-alsa-source \
|
||||||
|
pulseaudio-module-alsa-sink \
|
||||||
|
pulseaudio-module-cli \
|
||||||
|
pulseaudio-module-echo-cancel \
|
||||||
|
pulseaudio-misc \
|
||||||
|
i2c-tools \
|
||||||
|
mpg123
|
||||||
|
libsdl2-mixer \
|
||||||
|
#tslib
|
||||||
|
#tslib-tests
|
||||||
|
#tslib-calibrate
|
||||||
|
#tslib-uinput
|
||||||
|
|
||||||
|
libsdl2 \
|
||||||
|
libsdl2-ttf \
|
||||||
|
libsdl2-image \
|
||||||
|
libsdl2-mixer \
|
||||||
|
libsdl2-net \
|
||||||
|
# v4l-utils
|
||||||
|
evtest
|
||||||
|
|
||||||
|
# openvt -v -c 5 -- /usr/bin/weston --tty=/dev/tty5
|
||||||
|
|
||||||
|
mesa \
|
||||||
|
mesa-demos \
|
||||||
|
libgbm \
|
||||||
|
|
||||||
|
|
||||||
|
dtdebug=1
|
||||||
|
dtoverlay=vc4-kms-v3d
|
||||||
|
dtoverlay=vc4-kms-dpi-generic,hactive=480,hfp=26,hsync=16,hbp=10
|
||||||
|
dtparam=vactive=640,vfp=25,vsync=10,vbp=16
|
||||||
|
dtparam=clock-frequency=32000000,rgb666-padhi
|
||||||
|
|
||||||
|
Diyas symbolise goodness and purity, and lighting them denotes dispelling darkness and going into light.
|
49
recipes-core/images/base-image.inc
Normal file
49
recipes-core/images/base-image.inc
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
inherit extrausers
|
||||||
|
|
||||||
|
EXTRA_USERS_PARAMS = "usermod -p 2Pe/4xyFxsokE diya; \
|
||||||
|
usermod -a -G video diya; \
|
||||||
|
usermod -a -G tty diya; \
|
||||||
|
usermod -a -G input diya; \
|
||||||
|
usermod -a -G dialout diya; \
|
||||||
|
usermod -a -G audio diya; \
|
||||||
|
usermod -a -G sudo diya; \
|
||||||
|
"
|
||||||
|
IMAGE_BOOT_FILES:append = "fs_resize config.txt recovery-${MACHINE}.cpio.gz Image "
|
||||||
|
|
||||||
|
IMAGE_INSTALL:append = "kernel-modules \
|
||||||
|
e2fsprogs \
|
||||||
|
libcurl \
|
||||||
|
libdrm \
|
||||||
|
libgbm \
|
||||||
|
libgles2 \
|
||||||
|
libegl-mesa \
|
||||||
|
libglapi \
|
||||||
|
libudev \
|
||||||
|
libinput \
|
||||||
|
diya-overlay \
|
||||||
|
seatd \
|
||||||
|
libxkbcommon \
|
||||||
|
xkeyboard-config \
|
||||||
|
udev \
|
||||||
|
glew \
|
||||||
|
mesa \
|
||||||
|
sudo \
|
||||||
|
htop \
|
||||||
|
i2c-tools \
|
||||||
|
bash \
|
||||||
|
nano \
|
||||||
|
wpa-supplicant \
|
||||||
|
evtest \
|
||||||
|
rsync \
|
||||||
|
coreutils \
|
||||||
|
glmark2 \
|
||||||
|
"
|
||||||
|
|
||||||
|
# TOOLCHAIN_HOST_TASK:append = " libxkbcommon "
|
||||||
|
|
||||||
|
IMAGE_PREPROCESS_COMMAND += "image_patch;"
|
||||||
|
|
||||||
|
image_patch () {
|
||||||
|
# delete unused kernel image
|
||||||
|
rm -rf ${IMAGE_ROOTFS}/boot/*
|
||||||
|
}
|
27
recipes-core/images/core-image-base.bbappend
Normal file
27
recipes-core/images/core-image-base.bbappend
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
DISTRO_FEATURES:append = " wayland "
|
||||||
|
|
||||||
|
require base-image.inc
|
||||||
|
|
||||||
|
EXTRA_USERS_PARAMS:append = "usermod -a -G avahi diya"
|
||||||
|
IMAGE_INSTALL:append = "pango \
|
||||||
|
seatd \
|
||||||
|
pixman \
|
||||||
|
cairo \
|
||||||
|
glib-2.0 \
|
||||||
|
freetype \
|
||||||
|
fontconfig \
|
||||||
|
librsvg librsvg-gtk \
|
||||||
|
gdk-pixbuf \
|
||||||
|
gtk4 \
|
||||||
|
gtk4-layer-shell \
|
||||||
|
gobject-introspection \
|
||||||
|
wayland wayland-protocols \
|
||||||
|
foot swaybg swayidle swaylock tofi wtype \
|
||||||
|
mc \
|
||||||
|
gdbserver gdb \
|
||||||
|
labwc \
|
||||||
|
wlr-randr \
|
||||||
|
"
|
||||||
|
PACKAGE_EXCLUDE = " gtk+ gtk+3 adwaita-icon-theme "
|
||||||
|
IMAGE_INSTALL:remove = " gtk+ gtk+3 adwaita-icon-theme "
|
||||||
|
# wlr-randr l3afpad wlopm cairo-egl
|
2
recipes-core/images/core-image-minimal.bbappend
Normal file
2
recipes-core/images/core-image-minimal.bbappend
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
DISTRO_FEATURES:remove = " wayland gobject-introspection-data "
|
||||||
|
require base-image.inc
|
53
recipes-core/images/core-image-recovery.bb
Normal file
53
recipes-core/images/core-image-recovery.bb
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
|
||||||
|
DESCRIPTION = "Recovery initramfs image."
|
||||||
|
|
||||||
|
|
||||||
|
PACKAGE_INSTALL = "recovery-boot \
|
||||||
|
dosfstools \
|
||||||
|
e2fsprogs \
|
||||||
|
util-linux-fsck \
|
||||||
|
kernel-modules \
|
||||||
|
busybox \
|
||||||
|
sysvinit \
|
||||||
|
sysvinit-inittab \
|
||||||
|
${VIRTUAL-RUNTIME_base-utils} \
|
||||||
|
udev \
|
||||||
|
initscripts \
|
||||||
|
base-passwd \
|
||||||
|
${ROOTFS_BOOTSTRAP_INSTALL}"
|
||||||
|
|
||||||
|
# Do not pollute the initrd image with rootfs features
|
||||||
|
IMAGE_FEATURES = ""
|
||||||
|
|
||||||
|
export IMAGE_BASENAME = "${MLPREFIX}recovery"
|
||||||
|
IMAGE_NAME_SUFFIX ?= ""
|
||||||
|
IMAGE_LINGUAS = ""
|
||||||
|
|
||||||
|
LICENSE = "MIT"
|
||||||
|
|
||||||
|
IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
|
||||||
|
inherit core-image extrausers
|
||||||
|
|
||||||
|
IMAGE_ROOTFS_SIZE = "8192"
|
||||||
|
IMAGE_ROOTFS_EXTRA_SPACE = "0"
|
||||||
|
|
||||||
|
EXTRA_USERS_PARAMS = "usermod -p 2Pe/4xyFxsokE root "
|
||||||
|
|
||||||
|
# Use the same restriction as initramfs-module-install
|
||||||
|
COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
|
||||||
|
|
||||||
|
IMAGE_PREPROCESS_COMMAND += "image_patch;"
|
||||||
|
|
||||||
|
image_patch () {
|
||||||
|
# delete unused image
|
||||||
|
rm -rf ${IMAGE_ROOTFS}/boot/*
|
||||||
|
# create /etc/fstab
|
||||||
|
cat << EOF > ${IMAGE_ROOTFS}/etc/fstab
|
||||||
|
/dev/mmcblk1p1 /boot auto defaults 0 0
|
||||||
|
/dev/mmcblk1p4 /home auto defaults 0 0
|
||||||
|
|
||||||
|
EOF
|
||||||
|
cat << EOF > ${IMAGE_ROOTFS}/etc/hostname
|
||||||
|
diya-recovery
|
||||||
|
EOF
|
||||||
|
}
|
24
recipes-core/init-ifupdown/files/itf_diya
Normal file
24
recipes-core/init-ifupdown/files/itf_diya
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# /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
|
7
recipes-core/init-ifupdown/init-ifupdown_%.bbappend
Normal file
7
recipes-core/init-ifupdown/init-ifupdown_%.bbappend
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
||||||
|
SRC_URI += " file://itf_diya "
|
||||||
|
|
||||||
|
do_install:append () {
|
||||||
|
rm ${D}/etc/network/interfaces
|
||||||
|
install -m 0644 ${WORKDIR}/itf_diya ${D}/etc/network/interfaces
|
||||||
|
}
|
44
recipes-diya/diya-overlay/diya-overlay.bb
Normal file
44
recipes-diya/diya-overlay/diya-overlay.bb
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
DESCRIPTION = "Auto configuration deployment from media"
|
||||||
|
DEPENDS = ""
|
||||||
|
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"
|
||||||
|
|
||||||
|
|
||||||
|
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 ${WORKDIR}/confd ${D}/${sysconfdir}/init.d/confd
|
||||||
|
install -d ${D}/sbin/
|
||||||
|
install -d ${D}/etc/default/volatiles
|
||||||
|
# install -m 0644 ${WORKDIR}/80_diya ${D}${sysconfdir}/default/volatiles
|
||||||
|
install -m 0755 ${WORKDIR}/expandfs.sh ${D}/sbin/expandfs.sh
|
||||||
|
install -m 0755 ${WORKDIR}/boot-to-recovery ${D}/sbin/boot-to-recovery
|
||||||
|
install -m 0755 ${WORKDIR}/fs_resize ${DEPLOY_DIR_IMAGE}/
|
||||||
|
|
||||||
|
cat << EOF > ${DEPLOY_DIR_IMAGE}/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
|
||||||
|
}
|
3
recipes-diya/diya-overlay/files/80_diya
Normal file
3
recipes-diya/diya-overlay/files/80_diya
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# d root root 0755 /var/etc/upper none
|
||||||
|
# d root root 0755 /var/etc/work none
|
||||||
|
# l root root 0644 /etc/dropbear /var/etc/dropbear
|
21
recipes-diya/diya-overlay/files/boot-to-recovery
Executable file
21
recipes-diya/diya-overlay/files/boot-to-recovery
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||||
|
echo "$0 shall be run as root"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
. /etc/profile
|
||||||
|
|
||||||
|
if [ ! -e /boot/config.txt ]; then
|
||||||
|
# prepare env for recovery boot
|
||||||
|
cat << EOF > /boot/config.txt
|
||||||
|
recovery=true
|
||||||
|
recovery_image=recovery-${MACHINE}.cpio.gz
|
||||||
|
EOF
|
||||||
|
else
|
||||||
|
sed -i 's/^.*recovery.*/recovery=true/g' /boot/config.txt || \
|
||||||
|
echo "recovery=true" >> /boot/config.txt
|
||||||
|
fi
|
||||||
|
echo "Rebooting to recovery mode"
|
||||||
|
reboot
|
48
recipes-diya/diya-overlay/files/confd
Normal file
48
recipes-diya/diya-overlay/files/confd
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
DESC="Auto deployment configuration from media"
|
||||||
|
|
||||||
|
if [ -z "$DISK" ]; then
|
||||||
|
DISK="mmcblk1"
|
||||||
|
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
|
||||||
|
mkdir -p /home/diya
|
||||||
|
chown -R diya:diya /home/diya
|
||||||
|
rm /boot/home_partition_should_be_formated
|
||||||
|
fi
|
||||||
|
if [ -e "/boot/wpa_supplicant.conf" ];then
|
||||||
|
mv /boot/wpa_supplicant.conf /etc/network/
|
||||||
|
reboot
|
||||||
|
fi
|
||||||
|
# display information
|
||||||
|
# disable wifi power save
|
||||||
|
# /usr/sbin/iw wlan0 set power_save off
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
N=/etc/init.d/$NAME
|
||||||
|
echo "Usage: $N {start}" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
32
recipes-diya/diya-overlay/files/expandfs.sh
Normal file
32
recipes-diya/diya-overlay/files/expandfs.sh
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
if [ -z "$DISK" ]; then
|
||||||
|
DISK="mmcblk1"
|
||||||
|
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
|
1
recipes-diya/diya-overlay/files/fs_resize
Normal file
1
recipes-diya/diya-overlay/files/fs_resize
Normal file
@ -0,0 +1 @@
|
|||||||
|
resize the partition
|
21
recipes-diya/initramfs/files/confd
Normal file
21
recipes-diya/initramfs/files/confd
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
DESC="Custom configuration"
|
||||||
|
. /etc/profile
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
echo -n "Start $DESC: "
|
||||||
|
sed -i 's/^.*recovery.*/recovery=false/g' /boot/config.txt || \
|
||||||
|
echo "recovery=false" >> /boot/config.txt
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
N=/etc/init.d/$NAME
|
||||||
|
echo "Usage: $N {start}" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
147
recipes-diya/initramfs/files/diya-update
Executable file
147
recipes-diya/initramfs/files/diya-update
Executable file
@ -0,0 +1,147 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
. /etc/profile
|
||||||
|
|
||||||
|
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/mmcblk1p2"
|
||||||
|
SUPPORTED_COMMAND="rootfs kernel initramfs all"
|
||||||
|
TMP_MOUNT="/tmp/rootfs"
|
||||||
|
|
||||||
|
|
||||||
|
rootfs()
|
||||||
|
{
|
||||||
|
filename=$1
|
||||||
|
if [ -z "$filename" ]; then
|
||||||
|
filename="$DEFAULT_ROOTFS_NAME"
|
||||||
|
fi
|
||||||
|
path="$UPDATE_SRC_PATH/$filename"
|
||||||
|
backup_file="$UPDATE_SRC_PATH/rootfs-backup.img"
|
||||||
|
echo "Checking rootfs at: $path"
|
||||||
|
if [ ! -e "$path" ]; then
|
||||||
|
echo "Error: rootfs file not found"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
# backup the rootfs file
|
||||||
|
echo "Backing up the current rootfs"
|
||||||
|
if ! dd if=$ROOTFS_DEV of=$backup_file; then
|
||||||
|
echo "Error: unable to backup current rootfs"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Format rootfs partition"
|
||||||
|
if ! mkfs.ext4 -F $ROOTFS_DEV; then
|
||||||
|
echo "Error: Unable to format rootfs partition. Restore and quit"
|
||||||
|
dd if=$backup_file of=$ROOTFS_DEV
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
mkdir -p $TMP_MOUNT
|
||||||
|
echo "Mount rootfs partition to $TMP_MOUNT"
|
||||||
|
if ! mount $ROOTFS_DEV $TMP_MOUNT; then
|
||||||
|
echo "Error: Unable to mount rootfs partition. Restore and quit"
|
||||||
|
dd if=$backup_file of=$ROOTFS_DEV
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
echo "Installing new rootfs"
|
||||||
|
if ! tar -xpvf "$path" -C $TMP_MOUNT; then
|
||||||
|
echo "Error: unable to install new rootfs. Restore and quit"
|
||||||
|
umount $TMP_MOUNT
|
||||||
|
dd if=$backup_file of=$ROOTFS_DEV
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
echo "Patch /etc/fstab"
|
||||||
|
cat << EOF >> $TMP_MOUNT/etc/fstab
|
||||||
|
|
||||||
|
/dev/mmcblk1p1 /boot vfat defaults 0 0
|
||||||
|
/dev/mmcblk1p3 /var/etc ext4 defaults 0 0
|
||||||
|
/dev/mmcblk1p4 /home ext4 defaults 0 0
|
||||||
|
|
||||||
|
EOF
|
||||||
|
sync
|
||||||
|
echo "Unmount the rootfs partition"
|
||||||
|
umount $TMP_MOUNT
|
||||||
|
echo "Done"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
kernel()
|
||||||
|
{
|
||||||
|
filename=$1
|
||||||
|
if [ -z "$filename" ]; then
|
||||||
|
filename="$DEFAULT_KERNEL_NAME"
|
||||||
|
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
|
||||||
|
cd /boot
|
||||||
|
sync
|
||||||
|
echo "Done"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
initramfs()
|
||||||
|
{
|
||||||
|
filename=$1
|
||||||
|
if [ -z "$filename" ]; then
|
||||||
|
filename="$DEFAULT_INITRAMFS_NAME"
|
||||||
|
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
|
||||||
|
cd /boot
|
||||||
|
sync
|
||||||
|
echo "Done"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
command_valid() {
|
||||||
|
VALUE=$1
|
||||||
|
echo $SUPPORTED_COMMAND | tr " " '\n' | grep -F -q -x "$VALUE"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
name=$(basename $0)
|
||||||
|
cmd=${name#diya-update-}
|
||||||
|
file="$1"
|
||||||
|
|
||||||
|
if ! command_valid "$cmd"; then
|
||||||
|
cmd="$1"
|
||||||
|
file="$2"
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$cmd" in
|
||||||
|
rootfs)
|
||||||
|
rootfs $file
|
||||||
|
;;
|
||||||
|
kernel)
|
||||||
|
kernel $file
|
||||||
|
;;
|
||||||
|
initramfs)
|
||||||
|
initramfs $file
|
||||||
|
;;
|
||||||
|
all)
|
||||||
|
rootfs && kernel && initramfs
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
cat << EOF
|
||||||
|
Usage: $name <command> [file]
|
||||||
|
commands:
|
||||||
|
- rootfs: update rootfs
|
||||||
|
- kernel: update kernel image
|
||||||
|
- initramfs: update recovery initramfs
|
||||||
|
EOF
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
107
recipes-diya/initramfs/files/init
Executable file
107
recipes-diya/initramfs/files/init
Executable file
@ -0,0 +1,107 @@
|
|||||||
|
#!/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."
|
47
recipes-diya/initramfs/recovery-boot_0.1.bb
Normal file
47
recipes-diya/initramfs/recovery-boot_0.1.bb
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
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 = "${WORKDIR}"
|
||||||
|
|
||||||
|
INITSCRIPT_NAME = "confd"
|
||||||
|
INITSCRIPT_PARAMS = "start 30 S ."
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
install -d ${D}/etc/init.d
|
||||||
|
install -d ${D}/sbin
|
||||||
|
# base
|
||||||
|
install -m 0755 ${WORKDIR}/init ${D}/init
|
||||||
|
install -m 0755 ${WORKDIR}/confd ${D}/etc/init.d/confd
|
||||||
|
cat << EOF >> ${D}/etc/profile
|
||||||
|
export MACHINE=${MACHINE}
|
||||||
|
EOF
|
||||||
|
install -m 0755 ${WORKDIR}/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"
|
9
recipes-extended/sudo/sudo_%.bbappend
Normal file
9
recipes-extended/sudo/sudo_%.bbappend
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
do_install:append() {
|
||||||
|
# grant all permission to sudo group
|
||||||
|
sed -i 's/^#\s*\(%sudo\s*ALL=(ALL:ALL)\s*ALL\)/\1/' ${D}/${sysconfdir}/sudoers
|
||||||
|
# allow sudo group to power off/reboot system without password
|
||||||
|
cat << EOF >> ${D}/${sysconfdir}/sudoers
|
||||||
|
## sudo user group is allowed to execute halt and reboot
|
||||||
|
%sudo ALL=NOPASSWD: /sbin/halt, /sbin/reboot, /sbin/poweroff, /usr/bin/swaylock
|
||||||
|
EOF
|
||||||
|
}
|
1
recipes-gnome/gtk+/gtk4_%.bbappend
Normal file
1
recipes-gnome/gtk+/gtk4_%.bbappend
Normal file
@ -0,0 +1 @@
|
|||||||
|
GTKBASE_RRECOMMENDS:remove = "adwaita-icon-theme-symbolic"
|
4
recipes-graphics/libsdl2/libsdl2_%.bbappend
Normal file
4
recipes-graphics/libsdl2/libsdl2_%.bbappend
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
DEPENS += " mesa libdrm alsa virtual/libgbm virtual/libgles2 virtual/libgl udev libudev "
|
||||||
|
|
||||||
|
PACKAGECONFIG = " kmsdrm opengl gles2 alsa libusb "
|
||||||
|
# PACKAGECONFIG:remove = "x11 wayland"
|
7
recipes-graphics/wayland/weston-init.bbappend
Normal file
7
recipes-graphics/wayland/weston-init.bbappend
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
# change default weston user to diya
|
||||||
|
do_install:append() {
|
||||||
|
if [ -e ${D}/${sysconfdir}/init.d/weston ]; then
|
||||||
|
sed -i 's#WESTON_USER=weston#WESTON_USER=diya WESTON_GROUP=weston#' ${D}/${sysconfdir}/init.d/weston
|
||||||
|
fi
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
PV = "1.1.0"
|
||||||
|
SRCREV = "v1.1.0"
|
||||||
|
|
||||||
|
INSANE_SKIP:${PN}-dev += "dev-elf"
|
BIN
recipes-support/l3afpad/files/l3afpad-0.8.18.1.11.tar.gz
Normal file
BIN
recipes-support/l3afpad/files/l3afpad-0.8.18.1.11.tar.gz
Normal file
Binary file not shown.
30
recipes-support/l3afpad/l3afpad_0.8.18.bb
Normal file
30
recipes-support/l3afpad/l3afpad_0.8.18.bb
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
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="${WORKDIR}"
|
||||||
|
|
||||||
|
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/*"
|
334
recipes-support/sfwbar/files/sfwbar.config
Normal file
334
recipes-support/sfwbar/files/sfwbar.config
Normal file
@ -0,0 +1,334 @@
|
|||||||
|
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;
|
||||||
|
}
|
27
recipes-support/sfwbar/sfwbar_git.bb
Normal file
27
recipes-support/sfwbar/sfwbar_git.bb
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
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="${WORKDIR}/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 ${WORKDIR}/sfwbar.config ${D}/${sysconfdir}/xdg/sfwbar/
|
||||||
|
}
|
||||||
|
|
||||||
|
FILES:${PN} += "/usr/share/icons/*"
|
1
recipes-support/swayidle/swayidle_%.bbappend
Normal file
1
recipes-support/swayidle/swayidle_%.bbappend
Normal file
@ -0,0 +1 @@
|
|||||||
|
PACKAGECONFIG:remove = " systemd sysvinit man-pages "
|
1
recipes-support/swaylock/swaylock_%.bbappend
Normal file
1
recipes-support/swaylock/swaylock_%.bbappend
Normal file
@ -0,0 +1 @@
|
|||||||
|
PACKAGECONFIG:remove = " man-pages pam "
|
320
recipes-support/tofi/files/config
Normal file
320
recipes-support/tofi/files/config
Normal file
@ -0,0 +1,320 @@
|
|||||||
|
# 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
|
9
recipes-support/tofi/files/drun
Executable file
9
recipes-support/tofi/files/drun
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
config="/etc/xdg/tofi/config"
|
||||||
|
|
||||||
|
if [ -e "$HOME/.config/tofi/config" ]; then
|
||||||
|
config="$HOME/.config/tofi/config"
|
||||||
|
fi
|
||||||
|
|
||||||
|
tofi-drun -c "$config"
|
27
recipes-support/tofi/tofi_git.bb
Normal file
27
recipes-support/tofi/tofi_git.bb
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
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="${WORKDIR}/git"
|
||||||
|
|
||||||
|
inherit meson pkgconfig
|
||||||
|
|
||||||
|
EXTRA_OEMESON += "--buildtype release"
|
||||||
|
|
||||||
|
do_install:append () {
|
||||||
|
# replace the default config
|
||||||
|
install -m 0755 ${WORKDIR}/drun ${D}/usr/bin/
|
||||||
|
install -m 0755 ${WORKDIR}/config ${D}/${sysconfdir}/xdg/tofi/
|
||||||
|
}
|
||||||
|
|
||||||
|
FILES:${PN} += "/usr/share/*"
|
23
recipes-support/wlopm/wlopm_git.bb
Normal file
23
recipes-support/wlopm/wlopm_git.bb
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
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="${WORKDIR}/git"
|
||||||
|
|
||||||
|
do_compile () {
|
||||||
|
oe_runmake
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
oe_runmake install DESTDIR='${D}'
|
||||||
|
}
|
||||||
|
|
||||||
|
FILES:${PN} += "/usr/local/*"
|
17
recipes-support/wtype/wtype_git.bb
Normal file
17
recipes-support/wtype/wtype_git.bb
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
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="${WORKDIR}/git"
|
||||||
|
|
||||||
|
inherit meson pkgconfig
|
||||||
|
|
||||||
|
EXTRA_OEMESON += "--buildtype release"
|
38
recipes-wlroots/labwc/files/autostart
Normal file
38
recipes-wlroots/labwc/files/autostart
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# 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"
|
28
recipes-wlroots/labwc/files/environment
Normal file
28
recipes-wlroots/labwc/files/environment
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# 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
|
53
recipes-wlroots/labwc/files/init
Executable file
53
recipes-wlroots/labwc/files/init
Executable file
@ -0,0 +1,53 @@
|
|||||||
|
#!/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
|
49
recipes-wlroots/labwc/files/menu.xml
Normal file
49
recipes-wlroots/labwc/files/menu.xml
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
<?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>
|
71
recipes-wlroots/labwc/files/rc.xml
Normal file
71
recipes-wlroots/labwc/files/rc.xml
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
<?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>
|
BIN
recipes-wlroots/labwc/files/wpp.jpg
Normal file
BIN
recipes-wlroots/labwc/files/wpp.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 161 KiB |
28
recipes-wlroots/labwc/labwc_%.bbappend
Normal file
28
recipes-wlroots/labwc/labwc_%.bbappend
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
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 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/labwc
|
||||||
|
|
||||||
|
install -m 0755 ${WORKDIR}/wpp.jpg ${D}/${sysconfdir}/xdg/labwc/
|
||||||
|
install -m 0755 ${WORKDIR}/autostart ${D}/${sysconfdir}/xdg/labwc/
|
||||||
|
install -m 0755 ${WORKDIR}/environment ${D}/${sysconfdir}/xdg/labwc/
|
||||||
|
install -m 0755 ${WORKDIR}/menu.xml ${D}/${sysconfdir}/xdg/labwc/
|
||||||
|
install -m 0755 ${WORKDIR}/rc.xml ${D}/${sysconfdir}/xdg/labwc/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
inherit update-rc.d
|
||||||
|
INITSCRIPT_NAME = "labwc"
|
||||||
|
INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
|
2
recipes-wlroots/wlroots/wlroots-%.bbappend
Normal file
2
recipes-wlroots/wlroots/wlroots-%.bbappend
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
PACKAGECONFIG += " opengl gbm libinput "
|
||||||
|
PACKAGECONFIG:remove = " sysvinit systemd x11 xwayland "
|
12
wic/image.wks.in
Normal file
12
wic/image.wks.in
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# short-description: Create Raspberry Pi SD card image
|
||||||
|
# long-description: Creates a partitioned SD card image for use with
|
||||||
|
|
||||||
|
part u-boot --source rawcopy --sourceparams="file=${SPL_BINARY}" --ondisk mmcblk1 --no-table --align 8
|
||||||
|
part /boot --source bootimg-partition --ondisk mmcblk1 --fstype=vfat --label boot --active --align 4096 --size 32
|
||||||
|
# read only roofs
|
||||||
|
part / --source rootfs --ondisk mmcblk1 --fstype=ext4 --label root --align 4096 --size 150 --exclude-path home/ --exclude-path var/etc/ --exclude-path boot/
|
||||||
|
# modifiable configurations stored in /var/etc
|
||||||
|
part /var/etc --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var/etc --ondisk mmcblk1 --fstype=ext4 --label diya --align 1024 --size 32
|
||||||
|
# home partition
|
||||||
|
part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --ondisk mmcblk1 --fstype=ext4 --label home --align 1024 --size 16
|
||||||
|
# part /home --ondisk mmcblk1 --fstype=vfat --label music --active --align 1024 --size 16
|
Loading…
x
Reference in New Issue
Block a user