1
0

Accepting request 449572 from home:XRevan86

- Update to version 0.0~git20170109.

OBS-URL: https://build.opensuse.org/request/show/449572
OBS-URL: https://build.opensuse.org/package/show/X11:windowmanagers/awesome-freedesktop?expand=0&rev=7
This commit is contained in:
Ondřej Súkup 2017-01-16 09:34:38 +00:00 committed by Git OBS Bridge
parent 74ea2c76ee
commit 9471e65eaa
5 changed files with 25 additions and 107 deletions

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:526868dd6d72c25fe73cf232d7f08dd890daefa15efcf1c4e3e99861ad74f726
size 36516

View File

@ -1,91 +0,0 @@
--- a/freedesktop/desktop.lua
+++ b/freedesktop/desktop.lua
@@ -6,7 +6,7 @@ local button = button
local table = table
local ipairs = ipairs
local awful = require("awful")
-local utils = require("freedesktop.utils")
+local utils = require("menubar.utils")
module("freedesktop.desktop")
@@ -76,14 +76,7 @@ end
-- @param dir The directory to parse, (default is ~/Desktop)
-- @param showlabels Shows icon captions (default is false)
function add_applications_icons(arg)
- for i, program in ipairs(utils.parse_desktop_files({
- dir = arg.dir or '~/Desktop/',
- icon_sizes = {
- iconsize.width .. "x" .. iconsize.height,
- "128x128", "96x96", "72x72", "64x64", "48x48",
- "36x36", "32x32", "24x24", "22x22", "16x6"
- }
- })) do
+ for i, program in ipairs(utils.parse_dir(arg.dir or '~/Desktop/')) do
if program.show then
add_icon({
label = arg.showlabels and program.Name or nil,
@@ -101,14 +94,7 @@ end
-- @param open_with The program to use to open clicked files and dirs (i.e. xdg_open, thunar, etc.)
function add_dirs_and_files_icons(arg)
arg.open_with = arg.open_width or 'thunar'
- for i, file in ipairs(utils.parse_dirs_and_files({
- dir = arg.dir or '~/Desktop/',
- icon_sizes = {
- iconsize.width .. "x" .. iconsize.height,
- "128x128", "96x96", "72x72", "64x64", "48x48",
- "36x36", "32x32", "24x24", "22x22", "16x6"
- }
- })) do
+ for i, file in ipairs(utils.parse_dir(arg.dir or '~/Desktop/')) do
if file.show then
add_icon({
label = arg.showlabels and file.filename or nil,
--- a/freedesktop/menu.lua
+++ b/freedesktop/menu.lua
@@ -1,5 +1,5 @@
-- Grab environment
-local utils = require("freedesktop.utils")
+local utils = require("menubar.utils")
local io = io
local string = string
local table = table
@@ -39,7 +39,7 @@ function new(arg)
programs['Other'] = {}
for i, dir in ipairs(config.menu_dirs or all_menu_dirs) do
- local entries = utils.parse_desktop_files({dir = dir})
+ local entries = utils.parse_dir(dir)
for j, program in ipairs(entries) do
-- check whether to include in the menu
if program.show and program.Name and program.cmdline then
@@ -71,17 +71,17 @@ function new(arg)
end
local menu = {
- { "Accessories", programs["Utility"], utils.lookup_icon({ icon = 'applications-accessories.png' }) },
- { "Development", programs["Development"], utils.lookup_icon({ icon = 'applications-development.png' }) },
- { "Education", programs["Education"], utils.lookup_icon({ icon = 'applications-science.png' }) },
- { "Games", programs["Game"], utils.lookup_icon({ icon = 'applications-games.png' }) },
- { "Graphics", programs["Graphics"], utils.lookup_icon({ icon = 'applications-graphics.png' }) },
- { "Internet", programs["Network"], utils.lookup_icon({ icon = 'applications-internet.png' }) },
- { "Multimedia", programs["AudioVideo"], utils.lookup_icon({ icon = 'applications-multimedia.png' }) },
- { "Office", programs["Office"], utils.lookup_icon({ icon = 'applications-office.png' }) },
- { "Other", programs["Other"], utils.lookup_icon({ icon = 'applications-other.png' }) },
- { "Settings", programs["Settings"], utils.lookup_icon({ icon = 'preferences-desktop.png' }) },
- { "System Tools", programs["System"], utils.lookup_icon({ icon = 'applications-system.png' }) },
+ { "Accessories", programs["Utility"], utils.lookup_icon('applications-accessories') },
+ { "Development", programs["Development"], utils.lookup_icon('applications-development') },
+ { "Education", programs["Education"], utils.lookup_icon('applications-science') },
+ { "Games", programs["Game"], utils.lookup_icon('applications-games') },
+ { "Graphics", programs["Graphics"], utils.lookup_icon('applications-graphics') },
+ { "Internet", programs["Network"], utils.lookup_icon('applications-internet') },
+ { "Multimedia", programs["AudioVideo"], utils.lookup_icon('applications-multimedia') },
+ { "Office", programs["Office"], utils.lookup_icon('applications-office') },
+ { "Other", programs["Other"], utils.lookup_icon('applications-other') },
+ { "Settings", programs["Settings"], utils.lookup_icon('preferences-desktop') },
+ { "System Tools", programs["System"], utils.lookup_icon('applications-system') },
}
-- Removing empty entries from menu
Only in a/freedesktop: utils.lua

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fb3daa25b6092fdbccb225ec3a96a99b61a91684e21017fa30eeec6d81f5e92d
size 63652

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Tue Jan 10 16:54:48 UTC 2017 - sor.alexei@meowr.ru
- Update to version 0.0~git20170109 (changes since 0.0+git20120906):
* Port to Lua 5.3.
* Port to Awesome 4.0.
* Fix gfind in utils.lua.
* desktop.lua: Fix a typo that caused Thunar to always be used.
* Look for icons in all directories from the specification.
- Remove awesome-freedesktop-3.5-compat.patch: obsolete.
-------------------------------------------------------------------
Tue Nov 10 14:07:23 UTC 2015 - sor.alexei@meowr.ru

View File

@ -1,7 +1,7 @@
#
# spec file for package awesome-freedesktop
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,17 +16,17 @@
#
%define _version 0.0~git20170109
Name: awesome-freedesktop
Version: git201209061058
Version: git201701091085
Release: 0
Summary: Desktop entries and menu for awesome
License: GPL-2.0+
Group: System/GUI/Other
Url: https://github.com/terceiro/awesome-freedesktop
Source: %{name}-%{version}.tar.xz
# PATCH-FIX-OPENSUSE awesome-freedesktop-3.5-compat.patch sor.alexei@meowr.ru -- Use upstream menubar.utils to gain awesome 3.5+ compatibility.
Patch0: awesome-freedesktop-3.5-compat.patch
Requires: awesome >= 3.5.0
Url: https://github.com/copycat-killer/awesome-freedesktop
Source: %{name}-%{_version}.tar.gz
BuildRequires: awesome >= 4.0
Requires: awesome >= 4.0
BuildArch: noarch
%description
@ -41,20 +41,18 @@ Main features:
You can choose any icon theme that's installed in %{_datadir}/icons/.
%prep
%setup -q -n %{name}
%patch0 -p1
# Superseded by menubar.utils (doesn't work with awesome 3.5+).
rm -f freedesktop/utils.lua
%setup -q -n %{name}-%{_version}
%build
# Nothing to build.
%install
mkdir -p %{buildroot}%{_datadir}/awesome/lib/freedesktop/
install -m 0644 freedesktop/*.lua %{buildroot}%{_datadir}/awesome/lib/freedesktop/.
install -pm 0644 *.lua %{buildroot}%{_datadir}/awesome/lib/freedesktop/
%files
%defattr(-,root,root)
%doc README TODO
%doc LICENSE README.rst
%dir %{_datadir}/awesome/
%dir %{_datadir}/awesome/lib/
%{_datadir}/awesome/lib/freedesktop/