Reno is the second iteration of the AWMTK-powered AwesomeWM config.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

18 lines
1.1 KiB

-- This file is part of Reno desktop.
--
-- Reno desktop 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.
--
-- Reno desktop 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 Reno desktop. If not, see <https://www.gnu.org/licenses/>.
-- If possible, try to blur the image and return its path via callback. Relies on ImageMagick
local awful = require("awful")
return function(image_path,callback)
local blurred_wallpaper_path = "/tmp/.blur_"..image_path:match("[^/]$")
if select(3,os.execute("convert -version")) == 0 then
awful.spawn.easy_async("convert "..image_path.." -blur 0x10 "..blurred_wallpaper_path,function()
callback(blurred_wallpaper_path)
end)
end
return image_path
end