Skip to content

Commit

Permalink
removed openbox-menu, added obmenu-generator and more..
Browse files Browse the repository at this point in the history
  • Loading branch information
ncmprhnsbl committed Dec 11, 2017
1 parent 0c5f385 commit 42addfa
Show file tree
Hide file tree
Showing 19 changed files with 311 additions and 40 deletions.
13 changes: 7 additions & 6 deletions PKG64/pkglist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ gcolor2
gksu
gtk-engines
gtk-murrine-engine
gtksourceview
isomaster
libgksu
libgtop
Expand Down Expand Up @@ -39,14 +38,14 @@ libsigc++
libvisual
libwmf
libzip
libunique
lxsession
media-player-info
neon
network-manager-applet
openjpeg
openldap-client
pangomm
pavucontrol
polkit-gnome
poppler
poppler-data
v4l-utils
Expand Down Expand Up @@ -79,11 +78,13 @@ libconfig
libfm-extra
lua
lxappearance
lxmenu-data
lxtask
menu-cache
obconf
openbox-menu
obmenu-generator
perl-data-dump
perl-file-desktopentry
perl-gtk2
per-linux-desktop-files
sakura
tint2
tolua++
Expand Down
1 change: 1 addition & 0 deletions TREE/etc/xdg/openbox/autostart
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
#
#xfce-mcs-manager &
#xterm -r
/opt/porteus-scripts/xorg/gui-autostart
8 changes: 8 additions & 0 deletions TREE/home/guest/.cache/tint2/icon.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
hicolor browser 21=/usr/share/icons/Paper/24x24/apps/browser.png
hicolor spacefm 48=/usr/share/icons/hicolor/48x48/apps/spacefm.png
hicolor browser 48=/usr/share/icons/Paper/48x48/apps/browser.png
hicolor terminal-tango 21=/usr/share/pixmaps/terminal-tango.svg
hicolor beaver 21=/usr/share/icons/hicolor/22x22/apps/beaver.png
hicolor spacefm 21=/usr/share/icons/hicolor/48x48/apps/spacefm.png
hicolor terminal-tango 48=/usr/share/pixmaps/terminal-tango.svg
hicolor beaver 48=/usr/share/icons/hicolor/48x48/apps/beaver.png
77 changes: 77 additions & 0 deletions TREE/home/guest/.config/obmenu-generator/config.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#!/usr/bin/perl

# obmenu-generator - configuration file
# This file will be updated automatically.
# Any additional comment and/or indentation will be lost.

=for comment
|| FILTERING
| skip_filename_re : Skip a .desktop file if its name matches the regex.
Name is from the last slash to the end. (filename.desktop)
Example: qr/^(?:gimp|xterm)\b/, # skips 'gimp' and 'xterm'
| skip_entry : Skip a desktop file if the value from a given key matches the regex.
Example: [
{key => 'Name', re => qr/(?:about|terminal)/i},
{key => 'Exec', re => qr/^xterm/},
],
| substitutions : Substitute, by using a regex, in the values of the desktop files.
Example: [
{key => 'Exec', re => qr/xterm/, value => 'sakura'},
{key => 'Exec', re => qr/\\\\/, value => '\\', global => 1}, # for wine apps
],
|| ICON SETTINGS
| gtk_rc_filename : Absolute path to the GTK configuration file.
| missing_icon : Use this icon for missing icons (default: gtk-missing-image)
| icon_size : Preferred size for icons. (default: 32)
| force_svg_icons : Use only SVG icons. (default: 0)
| force_icon_size : Use only icons at the preferred icon size, if possible. (default: 0)
|| KEYS
| name_keys : Valid keys for application name.
Example: ['Name[fr]', 'GenericName[fr]', 'Name'], # french menu
|| PATHS
| desktop_files_paths : Absolute paths which contain .desktop files.
Example: [
'/usr/share/applications',
"$ENV{HOME}/.local/share/applications",
glob("$ENV{HOME}/.local/share/applications/wine/Programs/*"),
],
|| NOTES
| Regular expressions:
* use qr/.../ instead of '...'
* use qr/.../i for case insensitive mode
=cut

our $CONFIG = {
"editor" => "beaver",
"force_icon_size" => 0,
"force_svg_icons" => 0,
"gtk_rc_filename" => "$ENV{HOME}/.gtkrc-2.0",
"icon_size" => 32,
"Linux::DesktopFiles" => {
desktop_files_paths => [
"/usr/share/applications",
"/usr/local/share/applications",
"/usr/share/applications/kde4",
"$ENV{HOME}/.local/share/applications",
],
keep_unknown_categories => 1,
skip_entry => undef,
skip_filename_re => undef,
substitutions => undef,
terminalization_format => "%s -e '%s'",
terminalize => 1,
unknown_category_key => "other",
},
"missing_icon" => "gtk-missing-image",
"name_keys" => ["Name"],
"terminal" => "sakura",
"VERSION" => "0.80",
}
109 changes: 109 additions & 0 deletions TREE/home/guest/.config/obmenu-generator/schema.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
#!/usr/bin/perl

# obmenu-generator - schema file

=for comment
item: add an item inside the menu {item => ["command", "label", "icon"]},
cat: add a category inside the menu {cat => ["name", "label", "icon"]},
sep: horizontal line separator {sep => undef}, {sep => "label"},
pipe: a pipe menu entry {pipe => ["command", "label", "icon"]},
file: include the content of an XML file {file => "/path/to/file.xml"},
raw: any XML data supported by Openbox {raw => q(...)},
beg: begin of a category {beg => ["name", "icon"]},
end: end of a category {end => undef},
obgenmenu: generic menu settings {obgenmenu => ["label", "icon"]},
exit: default "Exit" action {exit => ["label", "icon"]},
=cut

# NOTE:
# * Keys and values are case sensitive. Keep all keys lowercase.
# * ICON can be a either a direct path to an icon or a valid icon name
# * Category names are case insensitive. (X-XFCE and x_xfce are equivalent)

require "$ENV{HOME}/.config/obmenu-generator/config.pl";

## Text editor
my $editor = $CONFIG->{editor};

our $SCHEMA = [

# COMMAND LABEL ICON
# {item => ['xdg-open .', 'File Manager', 'system-file-manager']},
# {item => ['xterm', 'Terminal', 'utilities-terminal']},
# {item => ['xdg-open http://', 'Web Browser', 'web-browser']},
# {item => ['gmrun', 'Run command', 'system-run']},

# {sep => 'Categories'},

# NAME LABEL ICON
{cat => ['utility', 'Accessories', 'applications-utilities']},
{cat => ['development', 'Development', 'applications-development']},
{cat => ['education', 'Education', 'applications-science']},
{cat => ['game', 'Games', 'applications-games']},
{cat => ['graphics', 'Graphics', 'applications-graphics']},
{cat => ['audiovideo', 'Multimedia', 'applications-multimedia']},
{cat => ['network', 'Network', 'applications-internet']},
{cat => ['office', 'Office', 'applications-office']},
{cat => ['other', 'Other', 'applications-other']},
{cat => ['settings', 'Settings', 'applications-accessories']},
{cat => ['system', 'System', 'applications-system']},

# LABEL ICON
#{beg => ['My category', 'cat-icon']},
# ... some items ...
#{end => undef},

# COMMAND LABEL ICON
#{pipe => ['obbrowser', 'Disk', 'drive-harddisk']},

## Generic advanced settings
#{sep => undef},
#{obgenmenu => ['Openbox Settings', 'applications-engineering']},
#{sep => undef},

## Custom advanced settings
# {sep => undef},
# {beg => ['Advanced Settings', 'applications-engineering']},

# Configuration files
# {item => ["$editor ~/.conkyrc", 'Conky RC', 'text-x-generic']},
# {item => ["$editor ~/.config/tint2/tint2rc", 'Tint2 Panel', 'text-x-generic']},

# obmenu-generator category
# {beg => ['Obmenu-Generator', 'accessories-text-editor']},
# {item => ["$editor ~/.config/obmenu-generator/schema.pl", 'Menu Schema', 'text-x-generic']},
# {item => ["$editor ~/.config/obmenu-generator/config.pl", 'Menu Config', 'text-x-generic']},

# {sep => undef},
# {item => ['obmenu-generator -s -c', 'Generate a static menu', 'accessories-text-editor']},
# {item => ['obmenu-generator -s -i -c', 'Generate a static menu with icons', 'accessories-text-editor']},
# {sep => undef},
# {item => ['obmenu-generator -p', 'Generate a dynamic menu', 'accessories-text-editor']},
# {item => ['obmenu-generator -p -i', 'Generate a dynamic menu with icons', 'accessories-text-editor']},
# {sep => undef},

# {item => ['obmenu-generator -d', 'Refresh icon set', 'view-refresh']},
# {end => undef},

# Openbox category
# {beg => ['Openbox', 'openbox']},
# {item => ["$editor ~/.config/openbox/autostart", 'Openbox Autostart', 'text-x-generic']},
# {item => ["$editor ~/.config/openbox/rc.xml", 'Openbox RC', 'text-x-generic']},
# {item => ["$editor ~/.config/openbox/menu.xml", 'Openbox Menu', 'text-x-generic']},
# {item => ['openbox --reconfigure', 'Reconfigure Openbox', 'openbox']},
# {end => undef},
# {end => undef},

# {sep => undef},

## The xscreensaver lock command
# {item => ['xscreensaver-command -lock', 'Lock', 'system-lock-screen']},

## This option uses the default Openbox's "Exit" action
# {exit => ['Exit', 'application-exit']},

## This uses the 'oblogout' menu
# {item => ['oblogout', 'Exit', 'application-exit']},
]
18 changes: 10 additions & 8 deletions TREE/home/guest/.config/openbox/autostart
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
##startup file for openbox --- only uncommented lines are executed##
##start networkmanager tray applet##
## Startup file for openbox --- only uncommented lines are executed##
## Start lxpolkit ##
lxpolkit &
## Start networkmanager tray applet##
(sleep 3 && /usr/bin/nm-applet) &
##set wallpaper with nitrogen##
## set wallpaper with nitrogen##
nitrogen --restore &
##start panel##
## Start panel##
tint2 &
##start conky system info/monitor##
## Start conky system info/monitor##
conky -q &
##add volumeicon to tray##
## Add volumeicon to tray##
volumeicon &
##start compton compositor##
## Start compton compositor##
#compton --config ~/.config/compton/compton.conf &
##set your desired keyboard layout##
## Set your desired keyboard layout##
#setxkbmap -layout <your layout> &
4 changes: 2 additions & 2 deletions TREE/home/guest/.config/openbox/menu.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!-- This menu is only used to source menu ids - current root menu set in rc.xml is- /opt/porteus-scripts/extra/pipemenus/menu4 -->
<?xml version="1.0" encoding="UTF-8"?>
<!-- This menu is only used to source menu ids - current root menu set in rc.xml is- /opt/porteus-scripts/extra/pipemenus/menu4 -->
<openbox_menu>
<menu id="pipe-places" label="Home.." execute="/opt/porteus-scripts/extra/pipemenus/obpipemenu-places" />
<menu id="obrecent.sh" label="Recent Files.." execute="/opt/porteus-scripts/extra/pipemenus/obrecent.sh" />
<menu id="date-menu" label="Calendar" execute="/opt/porteus-scripts/extra/pipemenus/date-menu.sh" />
<menu id="pipe-wall" label="Wallpapers" execute="/opt/porteus-scripts/extra/pipemenus/obpipemenu-wallpaper" />
<menu id="desktop-app-menu" label="Applications" execute="openbox-menu -i lxde-applications.menu" />
<menu id="desktop-app-menu" label="Applications" execute="obmenu-generator" />
<menu id="menu3" label="Apps" execute="/opt/porteus-scripts/extra/menu3" />
<menu id="menu4" label="Apps" execute="/opt/porteus-scripts/extra/pipemenus/menu4" />
<menu id="candypipe" label="Eye Candy" execute="/opt/porteus-scripts/extra/pipemenus/candypipe" />
Expand Down
21 changes: 19 additions & 2 deletions TREE/launch_before_go_openbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ rm -rf var/scrollkeeper/*
rm -f usr/share/applications/gksu.desktop
rm -f usr/share/applications/uxterm.desktop
rm -f usr/share/applications/xhtml2ps.desktop
rm etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop
#rm etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop

## Create symlinks
#ln -sf /etc/X11/xinit/xinitrc.openbox etc/X11/xinit/xinitrc
[ ! -d opt/porteus-scripts/xorg ] && mkdir -p opt/porteus-scripts/xorg
ln -sf /usr/bin/gksu opt/porteus-scripts/xorg/psu
ln -sf /opt/porteus-scripts/extra/pmodules.sh usr/bin/pmodules
ln -sf /usr/bin/spacefm opt/porteus-scripts/xorg/fmanager
ln -sf /usr/bin/beaver opt/porteus-scripts/xorg/editor
ln -sf /usr/bin/sakura opt/porteus-scripts/xorg/terminal
Expand Down Expand Up @@ -96,7 +97,7 @@ for x in `find openbox-patches -type f`; do patch -p1 < $x; done
rm -rf openbox-patches

## Fix some menu items
sed -i 's/Exec=.*/Exec=gksu gparted/g' usr/share/applications/gparted.desktop
#sed -i 's/Exec=.*/Exec=gksu gparted/g' usr/share/applications/gparted.desktop
#sed -i 's/Utility;/Graphics;/g' usr/share/applications/gcolor2.desktop

## suid slock
Expand Down Expand Up @@ -127,9 +128,25 @@ rm -rf usr/share/xsessions/openbox-gnome.desktop
#rm usr/share/applications/gcr-viewer.desktop
#rm usr/share/applications/gcr-prompter.desktop
rm usr/share/applications/compton.desktop
rm usr/share/applications/qv4l2.desktop
#rm usr/share/applications/tint2conf.desktop
rm -rf usr/src/*

## Remove lxsession stuff except lxpolkit
rm -rf usr/bin/lxclipboard
rm -rf usr/bin/lxlock
rm -rf usr/bin/lxsession
rm -rf usr/bin/lxsession-db
rm -rf usr/bin/lxsession-default
rm -rf usr/bin/lxsession-default-apps
rm -rf usr/bin/lxsession-default-terminal
rm -rf usr/bin/lxsession-edit
rm -rf usr/bin/lxsession-logout
rm -rf usr/bin/lxsession-xdg-autostart
rm -rf usr/bin/lxsettings-daemon
rm -rf usr/share/applications/lxsession-default-apps.desktop
rm -rf usr/share/applications/lxsession-edit.desktop

# Strip icons
#rm openbox-icon-remove.txt

Expand Down
1 change: 0 additions & 1 deletion TREE/opt/porteus-scripts/extra/menu3
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash
cat <<EOFMENU
<?xml version="1.0" encoding="UTF-8"?>
<openbox_pipe_menu>
<separator label="Porteus 4.0" />
<separator label="`date +%A\ \ %I\:%M\ %p`" />
Expand Down
1 change: 0 additions & 1 deletion TREE/opt/porteus-scripts/extra/pipemenus/candypipe
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
#candypipe
cat <<EOFMENU
<?xml version="1.0" encoding="UTF-8"?>
<openbox_pipe_menu>
<separator/>
<menu id="conky" label="Conky">
Expand Down
1 change: 0 additions & 1 deletion TREE/opt/porteus-scripts/extra/pipemenus/menu4
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash
cat <<EOFMENU
<?xml version="1.0" encoding="UTF-8"?>
<openbox_pipe_menu>
<separator label="Porteus 3ox" />
<separator label="`date +%A\ \ %I\:%M\ %p`" />
Expand Down
1 change: 0 additions & 1 deletion TREE/opt/porteus-scripts/extra/pipemenus/openbox
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash
cat <<EOFMENU
<?xml version="1.0" encoding="UTF-8"?>
<openbox_pipe_menu>
<item label="Screenshot"> <action name="Execute">
<execute>/opt/porteus-scripts/extra/gtk-scrot</execute>
Expand Down
Loading

0 comments on commit 42addfa

Please sign in to comment.