add first working meta-layer
This commit is contained in:
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 |
27
recipes-wlroots/labwc/labwc_%.bbappend_bak
Normal file
27
recipes-wlroots/labwc/labwc_%.bbappend_bak
Normal file
@ -0,0 +1,27 @@
|
||||
PACKAGECONFIG:remove = " man-pages xwayland "
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
||||
|
||||
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 ."
|
Reference in New Issue
Block a user