summaryrefslogtreecommitdiff
path: root/run-shell-3
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@gmail.com>2020-12-05 20:57:04 -0500
committerstreetturtle <streetturtle@gmail.com>2020-12-05 20:57:04 -0500
commita0cd854a4d36167456bb28d255bf96a32321bf2a (patch)
treeb42aa4e39d0b46144ed64d1d4f20e90c28465d3d /run-shell-3
parentd9eb3885eea90e06b79ff8fc4b2d1c1b8f5e4cfd (diff)
fix more warnings
Diffstat (limited to 'run-shell-3')
-rw-r--r--run-shell-3/run-shell.lua21
1 files changed, 8 insertions, 13 deletions
diff --git a/run-shell-3/run-shell.lua b/run-shell-3/run-shell.lua
index 51feaf4..0015232 100644
--- a/run-shell-3/run-shell.lua
+++ b/run-shell-3/run-shell.lua
@@ -8,10 +8,6 @@
-- @copyright 2019 Pavel Makhov
-------------------------------------------------
-local capi = {
- screen = screen,
- client = client,
-}
local awful = require("awful")
local gfs = require("gears.filesystem")
local wibox = require("wibox")
@@ -26,8 +22,10 @@ local widget = {}
function widget.new()
local widget_instance = {
_cached_wiboxes = {},
- _cmd_pixelate = [[bash -c 'ffmpeg -loglevel panic -f x11grab -video_size 1920x1060 -y -i :0.0+%s,20 -vf frei0r=pixeliz0r -vframes 1 /tmp/i3lock-%s.png ; echo done']],
- _cmd_blur = [[bash -c 'ffmpeg -loglevel panic -f x11grab -video_size 1920x1060 -y -i :0.0+%s,20 -filter_complex "boxblur=9" -vframes 1 /tmp/i3lock-%s.png ; echo done']]
+ _cmd_pixelate = [[sh -c 'ffmpeg -loglevel panic -f x11grab -video_size 1920x1060 -y -i :0.0+%s,20 -vf ]]
+ .. [[frei0r=pixeliz0r -vframes 1 /tmp/i3lock-%s.png ; echo done']],
+ _cmd_blur = [[sh -c 'ffmpeg -loglevel panic -f x11grab -video_size 1920x1060 -y -i :0.0+%s,20 ]]
+ .. [[-filter_complex "boxblur=9" -vframes 1 /tmp/i3lock-%s.png ; echo done']]
}
function widget_instance:_create_wibox()
@@ -74,21 +72,18 @@ function widget.new()
return w
end
- function widget_instance:launch(s, c)
- c = c or capi.client.focus
- s = mouse.screen
- -- naughty.notify { text = 'screen ' .. s.index }
+ function widget_instance:launch()
+ local s = mouse.screen
if not self._cached_wiboxes[s] then
self._cached_wiboxes[s] = {}
- -- naughty.notify { text = 'nope' }
end
if not self._cached_wiboxes[s][1] then
self._cached_wiboxes[s][1] = self:_create_wibox()
- -- naughty.notify { text = 'nope' }
end
local w = self._cached_wiboxes[s][1]
local rnd = math.random()
- awful.spawn.with_line_callback(string.format(self._cmd_blur, tostring(awful.screen.focused().geometry.x), rnd), {
+ awful.spawn.with_line_callback(
+ string.format(self._cmd_blur, tostring(awful.screen.focused().geometry.x), rnd), {
stdout = function()
w.visible = true
w.bgimage = '/tmp/i3lock-' .. rnd ..'.png'