diff --git a/recipes-core/images/core-image-minimal.bbappend b/recipes-core/images/core-image-minimal.bbappend index e314039..d7e584c 100644 --- a/recipes-core/images/core-image-minimal.bbappend +++ b/recipes-core/images/core-image-minimal.bbappend @@ -50,7 +50,7 @@ IMAGE_INSTALL:append = "libcurl \ rsync \ coreutils \ wayland wayland-protocols \ - labwc foot swaybg swayidle swaylock wlr-randr yambar wlopm\ + labwc foot swaybg swayidle swaylock wlr-randr wlopm sfwbar \ gdbserver \ " diff --git a/recipes-support/sfwbar/files/sfwbar.config b/recipes-support/sfwbar/files/sfwbar.config new file mode 100644 index 0000000..ab5327a --- /dev/null +++ b/recipes-support/sfwbar/files/sfwbar.config @@ -0,0 +1,217 @@ +Set Term = "foot" + +# Task Switcher +switcher { + interval = 700 + icons = true + labels = false + cols = 5 +} + +function("SfwbarInit") { + SetBarId "bar-0" + SetLayer "top" +} + +function("ToggleMinimize") { + [!Minimized] Minimize + [Minimized] UnMinimize +} + +function("ToggleMaximize") { + [!Maximized] Maximize + [Maximized] UnMaximize +} + +menu("winops") { + item("focus", Focus ); + item("close", Close ); + item("(un)minimize", Function "ToggleMinimize" ); + item("(un)maximize", Function "ToggleMaximize" ); +} + +# Panel layout + +layout { + button { + style = "launcher" + value = $Term + action = Exec $Term + } + + taskbar { + rows = 1 + css = "* { -GtkWidget-hexpand: false; }" # stretch horizontally + icons = true + labels = true + action[3] = Menu "winops" + action[2] = Close + } + + tray { + rows = 1 + } +} + +#CSS +button#launcher, button#module{ + padding: 0px 5px 0px 5px; + background: none; + border-style:none; + box-shadow: none; +} + +window { + -GtkWidget-direction: bottom; + 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#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: 4px; + border-image: none; + -GtkWidget-hexpand: false; + -GtkWidget-vexpand: true; + background-color: rgba(119,119,119,0.2); + border-color: rgba(119,119,119,0.3); + box-shadow: none; +} + +button#taskbar_active { + background-color: rgba(255,255,255,0.2); + border-color: rgba(255,255,255,0.4); +} + +button#taskbar_normal:hover , button#taskbar_active:hover { + background-color: rgba(176,176,176,0.22); + 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; +} + +label { + font: 0.27cm Sans; + color: #ffffff; + text-shadow: none; +} + +* { + -GtkWidget-vexpand: true; +} diff --git a/recipes-support/sfwbar/sfwbar_git.bb b/recipes-support/sfwbar/sfwbar_git.bb new file mode 100644 index 0000000..7cd7acf --- /dev/null +++ b/recipes-support/sfwbar/sfwbar_git.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "sfwbar pannel for wayland" + +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://github.com/LBCrion/sfwbar.git;protocol=https;branch=master" +SRC_URI += " file://sfwbar.config " + +S="${WORKDIR}/git" + +inherit meson pkgconfig features_check + +EXTRA_OEMESON += "--buildtype release" + +do_install:append () { + install -d ${D}/${sysconfdir}/sfwbar/ + install -m 0755 ${WORKDIR}/sfwbar.config ${D}/${sysconfdir}/sfwbar/ +} \ No newline at end of file diff --git a/recipes-wlroots/labwc/files/autostart b/recipes-wlroots/labwc/files/autostart new file mode 100644 index 0000000..c978848 --- /dev/null +++ b/recipes-wlroots/labwc/files/autostart @@ -0,0 +1,38 @@ +# Example autostart file + +# Set background color +swaybg -i /etc/labwc/wpp.png >/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 --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/sfwbar/sfwbar.config" +if [ -e "$HOME/.config/sfwbar/sfwbar.config" ]; then + SFWBAR_CNF="$HOME/.config/sfwbar/sfwbar.config" +fi +sfwbar -f "$SFWBAR_CNF" diff --git a/recipes-wlroots/labwc/files/environment b/recipes-wlroots/labwc/files/environment new file mode 100644 index 0000000..d0fb461 --- /dev/null +++ b/recipes-wlroots/labwc/files/environment @@ -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 diff --git a/recipes-wlroots/labwc/files/init b/recipes-wlroots/labwc/files/init new file mode 100755 index 0000000..ce28884 --- /dev/null +++ b/recipes-wlroots/labwc/files/init @@ -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/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 Weston" + killproc labwc + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + *) + echo "usage: $0 { start | stop | restart }" + ;; +esac + +exit 0 diff --git a/recipes-wlroots/labwc/files/menu.xml b/recipes-wlroots/labwc/files/menu.xml new file mode 100644 index 0000000..6a5e194 --- /dev/null +++ b/recipes-wlroots/labwc/files/menu.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/recipes-wlroots/labwc/files/rc.xml b/recipes-wlroots/labwc/files/rc.xml new file mode 100644 index 0000000..3bf2d11 --- /dev/null +++ b/recipes-wlroots/labwc/files/rc.xml @@ -0,0 +1,45 @@ + + + + + + + + 10 + + + + + 8 + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/recipes-wlroots/labwc/files/wpp.jpg b/recipes-wlroots/labwc/files/wpp.jpg new file mode 100644 index 0000000..7871b7d Binary files /dev/null and b/recipes-wlroots/labwc/files/wpp.jpg differ diff --git a/recipes-wlroots/labwc/labwc_%.bbappend b/recipes-wlroots/labwc/labwc_%.bbappend index 664fcf2..8b90d96 100644 --- a/recipes-wlroots/labwc/labwc_%.bbappend +++ b/recipes-wlroots/labwc/labwc_%.bbappend @@ -1 +1,23 @@ -PACKAGECONFIG:remove = " man-pages xwayland " \ No newline at end of file +PACKAGECONFIG:remove = " man-pages xwayland " +SRC_URI += " file://init \ + file://autostart \ + file://environment \ + file://menu.xml \ + file://rc.xml \ + file://wpp.jpg \ + " +do_install:append () { + install -d ${D}/${sysconfdir}/init.d + install -d ${D}/${sysconfdir}/labwc + install -m 0755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/labwc + + install -m 0755 ${WORKDIR}/autostart ${D}/${sysconfdir}/labwc/ + install -m 0755 ${WORKDIR}/environment ${D}/${sysconfdir}/labwc/ + install -m 0755 ${WORKDIR}/menu.xml ${D}/${sysconfdir}/labwc/ + install -m 0755 ${WORKDIR}/rc.xml ${D}/${sysconfdir}/labwc/ + install -m 0755 ${WORKDIR}/wpp.xml ${D}/${sysconfdir}/labwc/ +} + +inherit update-rc.d +INITSCRIPT_NAME = "labwc" +INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." \ No newline at end of file