improvements for run shell
This commit is contained in:
parent
a89e2fe76a
commit
8dfc439d75
|
@ -15,9 +15,9 @@ local gears = require("gears")
|
||||||
local naughty = require("naughty")
|
local naughty = require("naughty")
|
||||||
local completion = require("awful.completion")
|
local completion = require("awful.completion")
|
||||||
|
|
||||||
local spotify_shell = awful.widget.prompt()
|
local run_shell = awful.widget.prompt()
|
||||||
|
|
||||||
local w = wibox{
|
local w = wibox {
|
||||||
-- bg = '#1e252c55',
|
-- bg = '#1e252c55',
|
||||||
-- bgimage = '/home/pmakhov/.config/awesome/themes/awesome-darkspace/somecity.jpg',
|
-- bgimage = '/home/pmakhov/.config/awesome/themes/awesome-darkspace/somecity.jpg',
|
||||||
visible = false,
|
visible = false,
|
||||||
|
@ -37,23 +37,37 @@ local w = wibox{
|
||||||
w:setup {
|
w:setup {
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
text = '',
|
{
|
||||||
font = 'Play 20',
|
{
|
||||||
widget = wibox.widget.textbox,
|
text = '',
|
||||||
|
font = 'Play 18',
|
||||||
|
widget = wibox.widget.textbox,
|
||||||
|
},
|
||||||
|
id = 'icon',
|
||||||
|
top = 9,
|
||||||
|
left = 10,
|
||||||
|
layout = wibox.container.margin
|
||||||
|
},
|
||||||
|
{
|
||||||
|
-- {
|
||||||
|
layout = wibox.container.margin,
|
||||||
|
left = 10,
|
||||||
|
run_shell,
|
||||||
|
},
|
||||||
|
id = 'left',
|
||||||
|
layout = wibox.layout.fixed.horizontal
|
||||||
},
|
},
|
||||||
id = 'icon',
|
widget = wibox.container.background,
|
||||||
top = 9,
|
bg = '#333333',
|
||||||
left = 10,
|
shape = function(cr, width, height)
|
||||||
layout = wibox.container.margin
|
gears.shape.rounded_rect(cr, width, height, 3)
|
||||||
|
end,
|
||||||
|
shape_border_color = '#74aeab',
|
||||||
|
shape_border_width = 1,
|
||||||
|
forced_width = 200,
|
||||||
|
forced_height = 50
|
||||||
},
|
},
|
||||||
{
|
layout = wibox.container.place
|
||||||
-- {
|
|
||||||
layout = wibox.container.margin,
|
|
||||||
left = 10,
|
|
||||||
spotify_shell,
|
|
||||||
},
|
|
||||||
id = 'left',
|
|
||||||
layout = wibox.layout.fixed.horizontal
|
|
||||||
}
|
}
|
||||||
|
|
||||||
local function launch(s)
|
local function launch(s)
|
||||||
|
@ -61,22 +75,21 @@ local function launch(s)
|
||||||
awful.spawn.with_line_callback(os.getenv("HOME") .. "/.config/awesome/awesome-wm-widgets/run-shell/scratch_6.sh", {
|
awful.spawn.with_line_callback(os.getenv("HOME") .. "/.config/awesome/awesome-wm-widgets/run-shell/scratch_6.sh", {
|
||||||
stdout = function(line)
|
stdout = function(line)
|
||||||
w.visible = true
|
w.visible = true
|
||||||
-- naughty.notify { text = "LINE:" .. line }
|
w.bgimage = '/tmp/i3lock' .. line .. '.png'
|
||||||
w.bgimage = '/tmp/i3lock' .. line.. '.png'
|
|
||||||
awful.placement.top(w, { margins = { top = 20 }, parent = awful.screen.focused() })
|
awful.placement.top(w, { margins = { top = 20 }, parent = awful.screen.focused() })
|
||||||
awful.prompt.run {
|
awful.prompt.run {
|
||||||
prompt = "<b>Run</b>: ",
|
prompt = "<b>Run</b>: ",
|
||||||
bg_cursor = '#74aeab',
|
bg_cursor = '#74aeab',
|
||||||
textbox = spotify_shell.widget,
|
textbox = run_shell.widget,
|
||||||
completion_callback = completion.shell,
|
completion_callback = completion.shell,
|
||||||
exe_callback = function(...)
|
exe_callback = function(...)
|
||||||
spotify_shell:spawn_and_handle_error(...)
|
run_shell:spawn_and_handle_error(...)
|
||||||
end,
|
end,
|
||||||
history_path = gfs.get_cache_dir() .. "/history",
|
history_path = gfs.get_cache_dir() .. "/history",
|
||||||
done_callback = function()
|
done_callback = function()
|
||||||
w.bgimage=''
|
-- w.bgimage=''
|
||||||
w.visible = false
|
w.visible = false
|
||||||
awful.spawn(os.getenv("HOME") .. '/.IntelliJIdea2018.2/config/scratches/scratch_7.sh')
|
awful.spawn([[bash -c 'rm -f /tmp/i3lock*']])
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
|
@ -84,25 +97,6 @@ local function launch(s)
|
||||||
naughty.notify { text = "ERR:" .. line }
|
naughty.notify { text = "ERR:" .. line }
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- w.bgimage = '/home/pmakhov/.config/awesome/themes/awesome-darkspace/somecity.jpg'
|
|
||||||
-- w.bg = '#333333',
|
|
||||||
|
|
||||||
-- w.visible = true
|
|
||||||
-- awful.placement.top(w, { margins = { top = 400 }, parent = awful.screen.focused() })
|
|
||||||
-- awful.prompt.run {
|
|
||||||
-- prompt = "<b>Run</b>: ",
|
|
||||||
-- bg_cursor = '#74aeab',
|
|
||||||
-- textbox = spotify_shell.widget,
|
|
||||||
-- completion_callback = completion.shell,
|
|
||||||
-- exe_callback = function(...)
|
|
||||||
-- spotify_shell:spawn_and_handle_error(...)
|
|
||||||
-- end,
|
|
||||||
-- history_path = gfs.get_cache_dir() .. "/history",
|
|
||||||
-- done_callback = function()
|
|
||||||
-- w.visible = false
|
|
||||||
-- end
|
|
||||||
-- }
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -28,10 +28,8 @@ RES=$(xrandr --current | grep '*' | uniq | awk '{print $1}')
|
||||||
RNDM=$(uuidgen)
|
RNDM=$(uuidgen)
|
||||||
IMAGE="/tmp/i3lock$RNDM.png"
|
IMAGE="/tmp/i3lock$RNDM.png"
|
||||||
|
|
||||||
if [[ $1 != "" ]]; then
|
|
||||||
TEXT=$1
|
|
||||||
fi
|
|
||||||
|
|
||||||
ffmpeg -loglevel panic -f x11grab -video_size 1920x1060 -grab_y 20 -y -i $DISPLAY -filter_complex "boxblur=5" -vframes 1 $IMAGE
|
ffmpeg -loglevel panic -f x11grab -video_size 1920x1060 -grab_y 20 -y -i :0.0+0,20 -filter_complex "boxblur=9" -vframes 1 $IMAGE
|
||||||
|
#ffmpeg -loglevel panic -f x11grab -video_size 1920x1060 -grab_y 20 -y -i :0.0+0,20 -filter_complex "boxblur=9" -vframes 1 "/tmp/i3lock$(uuidgen).png"
|
||||||
|
|
||||||
echo $RNDM
|
echo $RNDM
|
||||||
|
|
Loading…
Reference in New Issue