This commit is contained in:
2018-04-26 07:24:34 +03:00
parent e06d0a7835
commit 540fe1b731
14 changed files with 1247 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
<PISI>
<Name>x11.wm</Name>
</PISI>
+42
View File
@@ -0,0 +1,42 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/copyleft/gpl.txt.
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get
from pisi.actionsapi import shelltools
def setup():
shelltools.export("AUTOPOINT", "true")
autotools.autoreconf("-fiv")
autotools.configure("--disable-static \
--prefix=/usr \
--with-x \
--enable-nls \
--sysconfdir=/etc \
--libexecdir=/usr/libexec/openbox \
--enable-startup-notification \
--docdir=/%s/%s" % (get.docDIR(), get.srcNAME()))
pisitools.dosed("libtool", "^(hardcode_libdir_flag_spec=).*", '\\1""')
pisitools.dosed("libtool", "^(runpath_var=)LD_RUN_PATH", "\\1DIE_RPATH_DIE")
pisitools.dosed("libtool"," -shared ", " -Wl,--as-needed -shared ")
def build():
autotools.make()
def install():
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
# GNOME Panel is no longer available in the official repositories
pisitools.remove("/usr/bin/gdm-control")
pisitools.remove("/usr/bin/gnome-panel-control")
pisitools.remove("/usr/bin/openbox-gnome-session")
pisitools.remove("/usr/share/man/man1/openbox-gnome-session.1")
pisitools.remove("/usr/share/xsessions/openbox-gnome.desktop")
pisitools.removeDir("/usr/share/gnome-session")
pisitools.dodoc("AUTHORS", "CHANGELOG", "COPYING", "README")
+23
View File
@@ -0,0 +1,23 @@
by Nico Golde <nion@debian.org>
the freedesktop standard requires some additional attributes in the desktop files
which are added here to fix #533126, #531580
Index: openbox-3.4.11.1/data/gnome-wm-properties/openbox.desktop
===================================================================
--- openbox-3.4.11.1.orig/data/gnome-wm-properties/openbox.desktop 2010-04-23 16:47:53.000000000 +0200
+++ openbox-3.4.11.1/data/gnome-wm-properties/openbox.desktop 2010-04-23 16:48:08.000000000 +0200
@@ -2,10 +2,15 @@
Type=Application
Name=Openbox
Exec=openbox
+Type=Application
+Categories=System;
# name we put on the WM spec check window
X-GNOME-WMName=Openbox
+X-GNOME-Provides=windowmanager
+NoDisplay=true
+
# our config tool
ConfigExec=obconf
+25
View File
@@ -0,0 +1,25 @@
#
# These things are run when an Openbox X Session is started.
# You may place a similar script in $HOME/.config/openbox/autostart
# to run user-specific things.
#
# If you want to use GNOME config tools...
#
#if test -x /usr/libexec/gnome-settings-daemon >/dev/null; then
# /usr/libexec/gnome-settings-daemon &
#elif which gnome-settings-daemon >/dev/null; then
# gnome-settings-daemon &
#fi
# If you want to use XFCE config tools...
#
#xfce-mcs-manager &
Esetroot -center /usr/share/openbox/RepublicDayofTurkey.png
/usr/libexec/polkit-gnome-authentication-agent-1 &
(sleep 3 && /usr/bin/nm-applet --sm-disable) &
tint2 &
conky &
pulseaudio &
(sleep 3 && /usr/bin/volumeicon) &
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 580 KiB

+347
View File
@@ -0,0 +1,347 @@
<?xml version="1.0" encoding="UTF-8"?>
<openbox_menu xmlns="http://openbox.org/3.4/menu">
<menu id="apps-editors-menu" label="Editors">
<item label="Leafpad">
<action name="Execute">
<command>leafpad</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Kate">
<action name="Execute">
<command>kate</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Kwrite">
<action name="Execute">
<command>kwrite</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
</menu>
<menu id="apps-term-menu" label="Terminal">
<item label="Lxde Terminal">
<action name="Execute">
<command>lxterminal</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Konsole">
<action name="Execute">
<command>konsole</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
</menu>
<menu id="apps-net-menu" label="İnternet">
<item label="Firefox">
<action name="Execute">
<command>firefox</command>
<startupnotify>
<enabled>yes</enabled>
<wmclass>Firefox</wmclass>
</startupnotify>
</action>
</item>
<item label="Chromium Browser">
<action name="Execute">
<command>chromium-browser</command>
<startupnotify>
<enabled>yes</enabled>
<wmclass>Firefox</wmclass>
</startupnotify>
</action>
</item>
<item label="Konqueror">
<action name="Execute">
<command>konqueror</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Opera">
<action name="Execute">
<command>opera</command>
<startupnotify>
<enabled>yes</enabled>
<wmclass>Opera</wmclass>
</startupnotify>
</action>
</item>
<item label="Kopete">
<action name="Execute">
<command>kopete</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Pidgin Instant Messenger">
<action name="Execute">
<command>pidgin</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Skype">
<action name="Execute">
<command>skype</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Konversation">
<action name="Execute">
<command>konversation</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="XChat">
<action name="Execute">
<command>xchat</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
</menu>
<menu id="apps-office-menu" label="Office">
<item label="LibreOffice Base">
<action name="Execute">
<command>libreoffice --base</command>
</action>
</item>
<item label="LibreOffice Calc">
<action name="Execute">
<command>libreoffice --calc</command>
</action>
</item>
<item label="LibreOffice Impress">
<action name="Execute">
<command>libreoffice --impress</command>
</action>
</item>
<item label="LibreOffice writer">
<action name="Execute">
<command>libreoffice --writer</command>
</action>
</item>
</menu>
<menu id="apps-multimedia-menu" label="Multimedia">
<item label="Clementine">
<action name="Execute">
<command>clementine</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="K3b">
<action name="Execute">
<command>k3b</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Vlc Player">
<action name="Execute">
<command>vlc</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Gnome MPlayer">
<action name="Execute">
<command>gnome-mplayer</command>
<startupnotify>
<enabled>yes</enabled>
<wmclass>MPlayer</wmclass>
</startupnotify>
</action>
</item>
<item label="SMPlayer">
<action name="Execute">
<command>smplayer</command>
<startupnotify>
<enabled>yes</enabled>
<wmclass>MPlayer</wmclass>
</startupnotify>
</action>
</item>
<item label="Record My Desktop">
<action name="Execute">
<command>qt-recordMyDesktop</command>
<startupnotify>
<enabled>yes</enabled>
<wmclass>MPlayer</wmclass>
</startupnotify>
</action>
</item>
<item label="Kamerka">
<action name="Execute">
<command>kamerka</command>
<startupnotify>
<enabled>yes</enabled>
<wmclass>MPlayer</wmclass>
</startupnotify>
</action>
</item>
</menu>
<menu id="apps-fileman-menu" label="File Managers">
<item label="KDE File Manager">
<action name="Execute">
<command>kfmclient openURL ~</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="PCManFM File Manager">
<action name="Execute">
<command>pcmanfm</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Thunar">
<action name="Execute">
<command>Thunar</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
</menu>
<menu id="apps-graphics-menu" label="Graphics">
<item label="Gimp">
<action name="Execute">
<command>gimp</command>
</action>
</item>
<item label="Gwenview">
<action name="Execute">
<command>gwenview</command>
</action>
</item>
<item label="Inkscape">
<action name="Execute">
<command>inkscape</command>
</action>
</item>
<item label="Ksnapshot">
<action name="Execute">
<command>ksnapshot -caption "%c"</command>
</action>
</item>
</menu>
<menu id="system-menu" label="System">
<item label="Package Manager">
<action name="Execute">
<command>package-manager</command>
<startupnotify><enabled>yes</enabled></startupnotify>
</action>
</item>
<item label="Screen Resolution">
<action name="Execute">
<command>lxrandr</command>
<startupnotify><enabled>yes</enabled></startupnotify>
</action>
</item>
<item label="Desktop Wallpaper">
<action name="Execute">
<command>gsetroot</command>
<startupnotify><enabled>yes</enabled></startupnotify>
</action>
</item>
<item label="Openbox Configuration Manager">
<action name="Execute">
<command>obconf</command>
<startupnotify><enabled>yes</enabled></startupnotify>
</action>
</item>
<item label="KDE Control Center">
<action name="Execute">
<command>systemsettings</command>
<startupnotify><enabled>yes</enabled></startupnotify>
</action>
</item>
<item label="Sound Volume Manager">
<action name="Execute">
<command>pavucontrol</command>
<startupnotify><enabled>yes</enabled></startupnotify>
</action>
</item>
<item label="Manage Cups Printers">
<action name="Execute">
<command>xdg-open http://localhost:631/</command>
<startupnotify>
<enabled>no</enabled>
<icon>cups</icon>
</startupnotify>
</action>
</item>
<separator />
<item label="Reconfigure Openbox">
<action name="Reconfigure" />
</item>
</menu>
<menu id="root-menu" label="Openbox 3">
<separator label="Shortcuts" />
<item label="Firefox">
<action name="Execute"><command>firefox</command></action>
</item>
<item label="File Manager">
<action name="Execute"><command>pcmanfm</command></action>
</item>
<item label="LX-Panel">
<action name="Execute"><command>lxpanel</command></action>
</item>
<separator label="Applications" />
<menu id="apps-accessories-menu"/>
<menu id="apps-editors-menu"/>
<menu id="apps-graphics-menu"/>
<menu id="apps-net-menu"/>
<menu id="apps-office-menu"/>
<menu id="apps-multimedia-menu"/>
<menu id="apps-term-menu"/>
<menu id="apps-fileman-menu"/>
<separator label="System" />
<menu id="system-menu"/>
<separator />
<item label="Log Out">
<action name="Exit">
<prompt>yes</prompt>
</action>
</item>
</menu>
</openbox_menu>
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://openbox.org/">
<menu id="root-menu" label="obmenu-generator" execute="/usr/bin/obmenu-generator"/>
</openbox_menu>
+540
View File
@@ -0,0 +1,540 @@
#!/usr/bin/perl
# Copyright (C) 2011-2014 Daniel "Trizen" Șuteu <echo dHJpemVueEBnbWFpbC5jb20K | base64 -d>.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Openbox Menu Generator
# A fast pipe/static menu generator for the Openbox Window Manager.
# Program: obmenu-generator
# License: GPLv3
# Created on: 25 March 2011
# Latest edit on: 26 March 2014
# Websites: http://trizen.googlecode.com
# http://trizenx.blogspot.com
#use 5.014;
#use strict;
#use warnings;
require Linux::DesktopFiles;
$Linux::DesktopFiles::VERSION >= 0.08
|| die "Update Linux::DesktopFiles to a newer version! (requires >=0.08)\n";
my $pkgname = 'obmenu-generator';
my $version = 0.59;
our ($CONFIG, $SCHEMA);
my $output_h = *STDOUT;
my ($pipe, $static, $icons, $reconfigure, $stdout_config, $update_config);
my $home_dir =
$ENV{HOME}
|| $ENV{LOGDIR}
|| (getpwuid($<))[7]
|| `echo -n ~`;
my $xdg_config_home = "$home_dir/.config";
my $menu_id = "root-menu";
my $config_dir = "$xdg_config_home/$pkgname";
my $schema_file = "$config_dir/schema.pl";
my $config_file = "$config_dir/config.pl";
my $openbox_conf = "$xdg_config_home/openbox";
my $menufile = "$openbox_conf/menu.xml";
my $icons_db = "$config_dir/icons.db";
sub usage {
print <<"HELP";
usage: $0 [options]
Options:
-p : (re)generate a pipe menu
-s : (re)generate a static menu
-o : static menu file (default: ~/.config/openbox/menu.xml)
-m : menu id (default: 'root-menu')
-r : regenerate the config files
-i : use icons in menus
-d : regenerate icons.db (with -i)
-u : update the config file
-R : reconfigure openbox
Help:
-h : print this message
-v : print the version number
Examples:
** Static menu without icons:
$0 -s
** Pipe menu with icons:
$0 -p -i
** Reconfigure openbox:
$0 -R
** Config file: $config_file
** Schema file: $schema_file
HELP
exit 0;
}
my $config_help = <<"HELP";
|| 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 destkop 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
| icon_dirs_first : When looking for icons, look in this directories first,
before looking in the directories of the current icon theme.
Example: [
"\$ENV{HOME}/My icons",
],
| icon_dirs_second : Look in this directories after looked in the directories of the
current icon theme. (Before /usr/share/pixmaps)
Example: [
"/usr/share/icons/gnome",
],
| icon_dirs_last : Look in this directories at the very last, after looked in
/usr/share/pixmaps, /usr/share/icons/hicolor and some other
directories.
Example: [
"/usr/share/icons/Tango",
],
| strict_icon_dirs : A true value will make the module to look only inside the directories
specified by you in either one of the above three options.
| gtk_rc_filename : Absolute path to the GTK configuration file.
| missing_image : Use this icon for missing icons (default: gtk-missing-image)
|| KEYS
| name_keys : Valid keys for the item names.
Example: ['Name[fr]', 'GenericName[fr]', 'Name'], # french menu
|| PATHS
| desktop_files_paths : Absolute paths which contains .desktop files.
Example: [
'/usr/share/applications',
"\$ENV{HOME}/.local/share/applications",
glob("\$ENV{HOME}/.local/share/applications/wine/Programs/*"),
],
|| NOTES
| Regular expressions:
* use qr/RE/ instead of 'RE'
* use qr/RE/i for case insenstive mode
HELP
if (@ARGV) {
while (defined(my $arg = shift @ARGV)) {
if ($arg eq '-i') {
$icons = 1;
}
elsif ($arg eq '-S') {
$stdout_config = 1;
}
elsif ($arg eq '-p') {
$pipe = 1;
}
elsif ($arg eq '-r') {
$reconfigure = 1;
}
elsif ($arg eq '-s') {
$static = 1;
}
elsif ($arg eq '-d') {
unlink $icons_db;
}
elsif ($arg eq '-u') {
$update_config = 1;
}
elsif ($arg eq '-v') {
print "$pkgname $version\n";
exit 0;
}
elsif ($arg eq '-R') {
exec 'openbox', '--reconfigure';
}
elsif ($arg eq '-o') {
$menufile = shift(@ARGV) // die "$0: option '-o' requires an argument!\n";
}
elsif ($arg eq '-m') {
$menu_id = shift(@ARGV) // die "$0: option '-m' requires an argument!\n";
}
elsif ($arg eq '-h') {
usage();
}
else {
die "$0: option `$arg' is invalid!\n";
}
}
}
if (not -d $config_dir) {
require File::Path;
File::Path::make_path($config_dir)
or die "Can't create directory '${config_dir}': $!";
}
my $config_documentation = <<"EOD";
#!/usr/bin/perl
# $pkgname - configuration file
# This file will be updated automatically every time when is needed.
# Any additional comment and/or indentation will be lost.
=for comment
$config_help
=cut
EOD
my %CONFIG = (
'Linux::DesktopFiles' => {
keep_unknown_categories => 1,
unknown_category_key => 'other',
gtk_rc_filename => "$home_dir/.gtkrc-2.0",
skip_entry => undef,
substitutions => undef,
skip_filename_re => undef,
terminalize => 1,
terminalization_format => q{%s -e '%s'},
desktop_files_paths => ['/usr/share/applications'],
icon_dirs_first => undef,
icon_dirs_second => undef,
icon_dirs_last => undef,
strict_icon_dirs => undef,
skip_svg_icons => 1,
},
name_keys => ['Name'],
terminal => 'xterm',
editor => 'geany',
missing_icon => 'gtk-missing-image',
VERSION => $version,
);
sub dump_configuration {
require Data::Dump;
open my $config_fh, '>', $config_file
or die "Can't open file '${config_file}' for write: $!";
my $dumped_config = q{our $CONFIG = } . Data::Dump::dump(\%CONFIG);
print $config_fh $config_documentation, $dumped_config;
close $config_fh;
}
if (not -e $config_file or $reconfigure) {
dump_configuration();
}
if (not -e $schema_file) {
if (-e (my $etc_schema_file = "/etc/xdg/$pkgname/schema.pl")) {
require File::Copy;
File::Copy::copy($etc_schema_file, $schema_file)
or die "$0: can't copy file `$etc_schema_file' to `$schema_file': $!\n";
}
else {
die "$0: schema file `$schema_file' does not exists!\n";
}
}
require $schema_file; # Load the configuration files
# Remove user's defined values
my @valid_keys = grep exists $CONFIG{$_}, keys $CONFIG;
@CONFIG{@valid_keys} = @{$CONFIG}{@valid_keys};
# Keep user's defined values
#@CONFIG{keys %{$CONFIG}} = values %{$CONFIG};
if ($CONFIG{VERSION} != $version) {
$update_config = 1;
$CONFIG{VERSION} = $version;
}
if ($icons && !$pipe) {
# Performance improvement
# XXX: don't do this in production code!
@INC{
qw(
strict.pm
warnings.pm
Tie/Hash.pm
Carp.pm
Exporter.pm
warnings/register.pm
)
} = ();
*{'warnings::warnif'} = sub { };
}
my $desk_obj = Linux::DesktopFiles->new(
%{$CONFIG{'Linux::DesktopFiles'}},
home_dir => $home_dir,
categories => [map $_->{cat}[0], grep exists $_->{cat}, @$SCHEMA],
keys_to_keep => [@{$CONFIG{name_keys}}, 'Exec', $icons ? 'Icon' : ()],
$icons
? (
abs_icon_paths => 1,
icon_db_filename => $icons_db,
)
: (),
terminal => $CONFIG{terminal},
keep_empty_categories => 0,
case_insensitive_cats => 1,
);
if ($pipe or $static) {
my $menu_backup = $menufile . '.bak';
if (not -e $menu_backup and -e $menufile) {
require File::Copy;
File::Copy::copy($menufile, $menu_backup);
}
if ($static) {
open $output_h, '>', $menufile
or die "Can't open file '${menufile}' for write: $!";
}
elsif ($pipe) {
if (not -d $openbox_conf) {
require File::Path;
File::Path::make_path($openbox_conf)
or die "Can't create directory '${openbox_conf}': $!";
}
require Cwd;
my $exec_name = Cwd::abs_path($0) . ($icons ? q{ -i} : q{});
if (not -x $exec_name) {
$exec_name = "$^X $exec_name";
}
open my $fh, '>', $menufile
or die "Can't open file '${menufile}' for write: $!";
print $fh <<"PIPE_MENU_HEADER";
<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://openbox.org/">
<menu id="$menu_id" label="$pkgname" execute="$exec_name" />
</openbox_menu>
PIPE_MENU_HEADER
close $fh;
print <<'EOT';
** The pipe menu has been successfully generated!
EOT
exec 'openbox', '--reconfigure';
}
}
my $generated_menu = $static
? <<"STATIC_MENU_HEADER"
<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://openbox.org/">
<menu id="$menu_id" label="Applications">
STATIC_MENU_HEADER
: "<openbox_pipe_menu>\n";
{
my %cache;
sub check_icon {
$_[0] // return '';
$cache{$_[0]} //= ((chr ord($_[0]) eq '/') ? $_[0] : $desk_obj->get_icon_path($_[0])
|| $desk_obj->get_icon_path($CONFIG{missing_icon}));
}
}
sub prepare_item {
$icons
? <<"ITEM_WITH_ICON"
<item label="$_[1]" icon="${\check_icon($_[2])}"><action name="Execute"><execute>$_[0]</execute></action></item>
ITEM_WITH_ICON
: <<"ITEM";
<item label="$_[1]"><action name="Execute"><execute>$_[0]</execute></action></item>
ITEM
}
sub begin_category {
$icons
? <<"MENU_WITH_ICON"
<menu id="$_[0]" icon="${\check_icon($_[1])}" label="$_[0]">
MENU_WITH_ICON
: <<"MENU"
<menu id="$_[0]" label="$_[0]">
MENU
}
my $categories = $desk_obj->parse_desktop_files();
foreach my $schema (@$SCHEMA) {
if (exists $schema->{cat}) {
exists($categories->{my $category = lc($schema->{cat}[0]) =~ tr/_a-z0-9/_/cr}) || next;
$generated_menu .= begin_category($schema->{cat}[1], ($icons ? $schema->{cat}[2] : ())) . join(
q{},
(
map $_->[1],
sort { $a->[0] cmp $b->[0] }
map [lc($_) => $_],
map {
my $name;
my $exec = $_->{Exec};
foreach my $key (@{$CONFIG{name_keys}}) {
if (defined $_->{$key}) {
$name = $_->{$key};
last;
}
}
foreach my $item ($name, $exec) {
if ($item =~ tr/"&//) {
$item =~ s/&/&amp;/g;
$item =~ s/"/&quot;/g;
}
}
$icons
? <<"ITEM_WITH_ICON"
<item label="$name" icon="${\check_icon($_->{Icon})}"><action name="Execute"><execute>$exec</execute></action></item>
ITEM_WITH_ICON
: <<"ITEM";
<item label="$name"><action name="Execute"><execute>$exec</execute></action></item>
ITEM
} @{$categories->{$category}}
)
)
. qq[ </menu>\n];
}
elsif (exists $schema->{item}) {
$generated_menu .= prepare_item(@{$schema->{item}});
}
elsif (exists $schema->{sep}) {
$generated_menu .=
defined $schema->{sep}
? qq[ <separator label="$schema->{sep}"/>\n]
: qq[ <separator/>\n];
}
elsif (exists $schema->{begin_cat}) {
$generated_menu .= begin_category(@{$schema->{begin_cat}});
}
elsif (exists $schema->{end_cat}) {
$generated_menu .= qq[ </menu>\n];
}
elsif (exists $schema->{exit}) {
my ($label, $icon) = @{$schema->{exit}};
$generated_menu .= $icons
? <<"EXIT_WITH_ICON"
<item label="$label" icon="${\check_icon($icon)}"><action name="Exit"/></item>
EXIT_WITH_ICON
: <<"EXIT";
<item label="$label"><action name="Exit"/></item>
EXIT
}
elsif (exists $schema->{raw}) {
$generated_menu .= qq[ $schema->{raw}\n];
}
elsif (exists $schema->{pipe}) {
my ($command, $label, $icon) = @{$schema->{pipe}};
$generated_menu .= $icons
? <<"PIPE_WITH_ICON"
<menu id="$label" label="$label" execute="$command" icon="${\check_icon($icon)}"/>
PIPE_WITH_ICON
: <<"PIPE";
<menu id="$label" label="$label" execute="$command"/>
PIPE
}
elsif (exists $schema->{obgenmenu}) {
my ($name, $icon) = ref($schema->{obgenmenu}) eq 'ARRAY' ? @{$schema->{obgenmenu}} : $schema->{obgenmenu};
$generated_menu .= ($icons ? <<"CONFIG_MENU_WITH_ICON" : <<"CONFIG_MENU") . <<'RECONFIGURE';
<menu id="$name" label="$name" icon="${\check_icon($icon)}">
CONFIG_MENU_WITH_ICON
<menu id="$name" label="$name">
CONFIG_MENU
<item label="Reconfigure Openbox"><action name="Reconfigure" /></item>
RECONFIGURE
-e '/usr/bin/obconf' && ($generated_menu .= <<'EOL');
<item label="Openbox Configuration Manager"><action name="Execute"><execute>obconf</execute></action></item>
EOL
$generated_menu .= <<"CONFIG_MENU";
<item label="Configure autostarted apps"><action name="Execute"><execute>$CONFIG{editor} $openbox_conf/autostart</execute></action></item>
<item label="Edit rc.xml"><action name="Execute"><execute>$CONFIG{editor} $openbox_conf/rc.xml</execute></action></item>
<separator />
<item label="Generate a pipe menu"><action name="Execute"><execute>$0 -p</execute></action></item>
<item label="Generate a static menu"><action name="Execute"><execute>$0 -s</execute></action></item>
<item label="Generate a pipe menu with icons"><action name="Execute"><execute>$0 -p -i</execute></action></item>
<item label="Generate a static menu with icons"><action name="Execute"><execute>$0 -s -i</execute></action></item>
<separator />
<item label="Edit menu.xml"><action name="Execute"><execute>$CONFIG{editor} $menufile</execute></action></item>
<item label="Edit the schema file"><action name="Execute"><execute>$CONFIG{editor} $schema_file</execute></action></item>
<item label="Edit the configuration file"><action name="Execute"><execute>$CONFIG{editor} $config_file</execute></action></item>
<separator />
<item label="Regenerate configuration file"><action name="Execute"><execute>$0 -r</execute></action></item>
</menu>
CONFIG_MENU
}
else {
warn "$0: Invalid key '", (keys %{$schema})[0], "' in schema file!\n";
}
}
print $output_h $generated_menu, $static
? qq[ </menu>\n</openbox_menu>\n]
: qq[</openbox_pipe_menu>\n];
dump_configuration() if $update_config;
+11
View File
@@ -0,0 +1,11 @@
--- openbox-3.5.0/openbox/client.c 2011-08-01 22:14:58.000000000 +0200
+++ openbox-3.5.0/openbox/client.c 2011-10-22 14:59:56.000000000 +0200
@@ -883,7 +883,7 @@
!g_pattern_match(app->role,
strlen(self->role), self->role, NULL))
match = FALSE;
- else if (app->title &&
+ else if (app->title && self->title &&
!g_pattern_match(app->title,
strlen(self->title), self->title, NULL))
match = FALSE;
+11
View File
@@ -0,0 +1,11 @@
--- openbox-3.5.0/data/autostart/autostart.in~ 2011-08-02 15:50:01.963531310 +0000
+++ openbox-3.5.0/data/autostart/autostart.in 2011-08-02 15:51:57.277879458 +0000
@@ -8,7 +8,7 @@
#
#if test -x @libexecdir@/gnome-settings-daemon >/dev/null; then
# @libexecdir@/gnome-settings-daemon &
-#elif which gnome-settings-daemon >/dev/null; then
+#elif which gnome-settings-daemon >/dev/null 2>&1; then
# gnome-settings-daemon &
#fi
+11
View File
@@ -0,0 +1,11 @@
--- data/rc.xml.theme 2011-08-01 17:03:47.000000000 +0200
+++ data/rc.xml 2011-08-01 17:05:09.000000000 +0200
@@ -48,7 +48,7 @@
</placement>
<theme>
- <name>Clearlooks</name>
+ <name>Onyx</name>
<titleLayout>NLIMC</titleLayout>
<!--
available characters are NDSLIMC, each can occur at most once.
+103
View File
@@ -0,0 +1,103 @@
#!/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"]},
raw: any valid Openbox XML string {raw => q(xml string)},
begin_cat: begin of a category {begin_cat => ["name", "icon"]},
end_cat: end of a category {end_cat => 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 => ['lxterminal', 'Terminal', 'lxterminal']},
{item => ['firefox', 'Web Browser', 'firefox']},
{sep => 'Applications'},
# 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']},
#{cat => ['qt', 'QT Applications', 'qtlogo']},
#{cat => ['gtk', 'GTK Applications', 'gnome-applications']},
#{cat => ['x_xfce', 'XFCE Applications', 'applications-other']},
#{cat => ['gnome', 'GNOME Applications', 'gnome-applications']},
#{cat => ['consoleonly', 'CLI Applications', 'applications-utilities']},
# LABEL ICON
#{begin_cat => ['My category', 'cat-icon']},
# ... some items ...
#{end_cat => 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},
{begin_cat => ['Advanced Settings', 'gnome-settings']},
# Configuration files
{item => ["$editor ~/.conkyrc", 'Conky RC', $editor]},
{item => ["$editor ~/.config/tint2/tint2rc", 'Tint2 Panel', $editor]},
# obmenu-generator category
{begin_cat => ['Obmenu-Generator', 'menu-editor']},
{item => ["$editor ~/.config/obmenu-generator/schema.pl", 'Menu Schema', $editor]},
{item => ["$editor ~/.config/obmenu-generator/config.pl", 'Menu Config', $editor]},
{sep => undef},
{item => ['obmenu-generator -p', 'Generate a pipe menu', 'menu-editor']},
{item => ['obmenu-generator -s', 'Generate a static menu', 'menu-editor']},
{item => ['obmenu-generator -p -i', 'Generate a pipe menu with icons', 'menu-editor']},
{item => ['obmenu-generator -s -i', 'Generate a static menu with icons', 'menu-editor']},
{sep => undef},
{item => ['obmenu-generator -d', 'Refresh Icon Set', 'gtk-refresh']},
{end_cat => undef},
# Openbox category
{begin_cat => ['Openbox', 'openbox']},
{item => ['openbox --reconfigure', 'Reconfigure Openbox', 'openbox']},
{item => ["$editor ~/.config/openbox/autostart", 'Openbox Autostart', $editor]},
{item => ["$editor ~/.config/openbox/rc.xml", 'Openbox RC', $editor]},
{item => ["$editor ~/.config/openbox/menu.xml", 'Openbox Menu', $editor]},
{end_cat => undef},
{end_cat => undef},
{sep => undef},
# This options uses the default Openbox's action "Exit"
{item => ['oblogout', 'Exit', 'exit']},
]
+112
View File
@@ -0,0 +1,112 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>openbox</Name>
<Homepage>http://openbox.org</Homepage>
<Packager>
<Name>Pisi Linux Admins</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>GPLv2</License>
<IsA>app:gui</IsA>
<Summary>A standarts compliant, fast, lightweight window manager</Summary>
<Description>Openbox is a window manager for the X11 windowing system.</Description>
<Archive sha1sum="0a1b878cc5a64bcf2488dbd19260554a22f4dac2" type="targz">http://openbox.org/dist/openbox/openbox-3.6.1.tar.gz</Archive>
<BuildDependencies>
<Dependency>pango-devel</Dependency>
<Dependency>libXft-devel</Dependency>
<Dependency>libICE-devel</Dependency>
<Dependency>imlib2-devel</Dependency>
<Dependency>libxml2-devel</Dependency>
<Dependency>libSM-devel</Dependency>
<Dependency>libgcc</Dependency>
<Dependency>libXrandr-devel</Dependency>
<Dependency>libXcursor-devel</Dependency>
<Dependency>libXinerama-devel</Dependency>
<Dependency>startup-notification-devel</Dependency>
<Dependency>dbus-devel</Dependency>
<Dependency>librsvg-devel</Dependency>
<!-- <Dependency>python-pyxdg</Dependency> -->
</BuildDependencies>
<Patches>
<Patch>openbox-3.5.0-which-2.20.patch</Patch>
<Patch>openbox-3.5.0-title-matching.patch</Patch>
<Patch>openbox-default-theme.patch</Patch>
</Patches>
</Source>
<Package>
<Name>openbox</Name>
<RuntimeDependencies>
<Dependency>cairo</Dependency>
<Dependency>glib2</Dependency>
<Dependency>pango</Dependency>
<Dependency>libSM</Dependency>
<Dependency>libXft</Dependency>
<Dependency>libICE</Dependency>
<Dependency>libX11</Dependency>
<Dependency>imlib2</Dependency>
<Dependency>libXext</Dependency>
<Dependency>libxml2</Dependency>
<Dependency>librsvg</Dependency>
<Dependency>libXrandr</Dependency>
<Dependency>libXcursor</Dependency>
<Dependency>libXinerama</Dependency>
<Dependency>startup-notification</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="executable">/usr/libexec</Path>
<Path fileType="config">/etc/xdg/openbox</Path>
<Path fileType="config">/etc/xdg/obmenu-generator</Path>
<Path fileType="library">/usr/lib</Path>
<Path fileType="data">/usr/share/openbox</Path>
<Path fileType="data">/usr/share/themes</Path>
<Path fileType="data">/usr/share/xsessions</Path>
<Path fileType="data">/usr/share/gnome</Path>
<Path fileType="data">/usr/share/gnome-session</Path>
<Path fileType="data">/usr/share/applications</Path>
<Path fileType="data">/usr/share/pixmaps</Path>
<Path fileType="localedata">/usr/share/locale</Path>
<Path fileType="man">/usr/share/man</Path>
<Path fileType="doc">/usr/share/doc</Path>
</Files>
<AdditionalFiles>
<AdditionalFile owner="root" permission="0755" target="/usr/bin/obmenu-generator">obmenu-generator</AdditionalFile>
<AdditionalFile owner="root" permission="0755" target="/etc/xdg/obmenu-generator/schema.pl">schema.pl</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/xdg/openbox/menu.xml">menu.xml</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/xdg/openbox/autostart">autostart</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/usr/share/openbox/kedicik.png">kedicik.png</AdditionalFile>
</AdditionalFiles>
</Package>
<Package>
<Name>openbox-devel</Name>
<Summary>Development headers for openbox</Summary>
<RuntimeDependencies>
<Dependency release="current">openbox</Dependency>
<Dependency>pango-devel</Dependency>
<Dependency>glib2-devel</Dependency>
<Dependency>libxml2-devel</Dependency>
<Dependency>libXft-devel</Dependency>
<Dependency>imlib2-devel</Dependency>
<Dependency>librsvg-devel</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="header">/usr/include</Path>
<Path fileType="data">/usr/lib/pkgconfig</Path>
</Files>
</Package>
<History>
<Update release="1">
<Date>2015-07-24</Date>
<Version>3.6.1</Version>
<Comment>First release</Comment>
<Name>Ayhan Yalçınsoy</Name>
<Email>ayhanyalcinsoy@pisilinux.org</Email>
</Update>
</History>
</PISI>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>openbox</Name>
<Summary xml:lang="tr">Standartlara uygun, hızlı, hafif bir pencere yöneticisi</Summary>
<Description xml:lang="tr">Openbox, X11 pencere sistemi için pencere yöneticisidir. </Description>
</Source>
<Package>
<Name>openbox-devel</Name>
<Summary xml:lang="tr">Openbox için geliştirme başlıkları</Summary>
</Package>
</PISI>