Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.2:Ports
awesome-freedesktop
awesome-freedesktop-3.5-compat.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File awesome-freedesktop-3.5-compat.patch of Package awesome-freedesktop
--- 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
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor