Skip to content

Commit

Permalink
add sfwbar menu generator
Browse files Browse the repository at this point in the history
Co-authored-by: 01micko <[email protected]>
  • Loading branch information
dimkr and 01micko committed Dec 2, 2023
1 parent 83373a2 commit 87ec9f3
Show file tree
Hide file tree
Showing 15 changed files with 396 additions and 98 deletions.
76 changes: 0 additions & 76 deletions woof-code/rootfs-petbuilds/labwc/altf1d.c

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions woof-code/rootfs-petbuilds/labwc/petbuild
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,5 @@ build() {
ninja -C build install
cd ..

$CC $CFLAGS altf1d.c $LDFLAGS -o /usr/bin/altf1d

rm -rf /opt/wlroots
}

This file was deleted.

10 changes: 10 additions & 0 deletions woof-code/rootfs-petbuilds/sfwbar/root/.config/sfwbar/menu.widget
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
include("menu.source")

layout {
button {
value = "/usr/share/doc/puppylogo48.png"
action[1] = Menu "main_menu"
tooltip = "Launch menu"
css = "* { min-height: 24px; min-width: 24px; }"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ MapAppId ".*Opera$", "opera"

layout "panel" {
style = frame
include("buttonmenu.widget")
include("menu.widget")
include("barlauncher.widget")

taskbar {
Expand Down
4 changes: 2 additions & 2 deletions woof-code/rootfs-petbuilds/sfwbar/usr/sbin/sfwbar-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ update_size() {
cpu*|load*|memory*|swap*|disk*)
sed -i "s/min-height: \([0-9][0-9]\)px\;/min-height: $((${PX} - 2))px\;/" $HOME/.config/sfwbar/$widget ;;
'launcher.widget');;
'buttonmenu.widget')
'menu.widget')
sed -i -e "s/min-height: \([0-9][0-9]\)px/min-height: ${MB}px/"\
-e "s/min-width: \([0-9][0-9]\)px/min-width: $((${MB} * 4 / 3))px/"\
$HOME/.config/sfwbar/buttonmenu.widget
$HOME/.config/sfwbar/menu.widget
;;
*)sed -i "s/\([0-9][0-9]\)px/${PX}px/g" $HOME/.config/sfwbar/$widget ;;
esac
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
menu("main_menu") {
PUPPYMENU sfwbar-xdgmenu /etc/xdg/menus/puppy-desktop.menu
PUPPYMENU sfwbar-xdgmenu /etc/xdg/menus/puppy-system.menu
PUPPYMENU sfwbar-xdgmenu /etc/xdg/menus/puppy-setup.menu
separator
PUPPYMENU sfwbar-xdgmenu /etc/xdg/menus/puppy-utility.menu
PUPPYMENU sfwbar-xdgmenu /etc/xdg/menus/puppy-filesystem.menu
PUPPYMENU sfwbar-xdgmenu /etc/xdg/menus/puppy-graphic.menu
PUPPYMENU sfwbar-xdgmenu /etc/xdg/menus/puppy-document.menu
PUPPYMENU sfwbar-xdgmenu /etc/xdg/menus/puppy-calculate.menu
PUPPYMENU sfwbar-xdgmenu /etc/xdg/menus/puppy-personal.menu
PUPPYMENU sfwbar-xdgmenu /etc/xdg/menus/puppy-network.menu
PUPPYMENU sfwbar-xdgmenu /etc/xdg/menus/puppy-internet.menu
PUPPYMENU sfwbar-xdgmenu /etc/xdg/menus/puppy-multimedia.menu
PUPPYMENU sfwbar-xdgmenu /etc/xdg/menus/puppy-fun.menu
separator
item(" Help%/usr/local/lib/X11/pixmaps/help48.png", Exec "puppyhelp")
item(" Leave%/usr/local/lib/X11/pixmaps/shutdown48.png", Exec "logout_gui")
}
1 change: 1 addition & 0 deletions woof-code/rootfs-petbuilds/xdg-puppy-sfwbar/pet.specs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
xdg-puppy-sfwbar-0.7.6-9|xdg-puppy-sfwbar|0.7.6-9||BuildingBlock|28||xdg-puppy-sfwbar-0.7.6-9.pet||A menu builder for sfwbar|puppy|||
21 changes: 21 additions & 0 deletions woof-code/rootfs-petbuilds/xdg-puppy-sfwbar/petbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
download() {
[ -f gnome-menus-2.14.3.tar.bz2 ] || wget -t 3 -T 60 http://distro.ibiblio.org/puppylinux/sources/g/gnome-menus-2.14.3.tar.bz2
}

build() {
tar -xjf gnome-menus-2.14.3.tar.bz2
cd gnome-menus-2.14.3
sed s~fam.h~doesnotexist.h~ -i configure
patch -p1 < ../terminal.patch
./configure --prefix=/usr --sysconfdir=/etc --disable-python
make install
cd ..

# force static linking, we're using an old version and don't want it to conflict with a later version
rm -f /usr/lib/libgnome-menu.so*

$CC $CFLAGS -DGMENU_I_KNOW_THIS_IS_UNSTABLE `PKG_CONFIG_PATH="/usr/lib/pkgconfig:$PKG_CONFIG_PATH" pkg-config --cflags glib-2.0 libgnome-menu` sfwbar-xdgmenu.c $LDFLAGS `PKG_CONFIG_PATH="/usr/lib/pkgconfig:$PKG_CONFIG_PATH" pkg-config --libs glib-2.0 libgnome-menu` -o /usr/bin/sfwbar-xdgmenu

# we don't need these
rm -rf /usr/bin/gnome-menu-spec-test /usr/lib /usr/include /usr/share/locale
}
Loading

0 comments on commit 87ec9f3

Please sign in to comment.