diff options
Diffstat (limited to 'run-shell')
-rw-r--r-- | run-shell/blur.png | bin | 329592 -> 0 bytes | |||
-rw-r--r-- | run-shell/pixelate.png | bin | 133469 -> 0 bytes | |||
-rw-r--r-- | run-shell/run-shell.lua | 89 |
3 files changed, 64 insertions, 25 deletions
diff --git a/run-shell/blur.png b/run-shell/blur.png Binary files differdeleted file mode 100644 index 4e8b54c..0000000 --- a/run-shell/blur.png +++ /dev/null diff --git a/run-shell/pixelate.png b/run-shell/pixelate.png Binary files differdeleted file mode 100644 index fedf320..0000000 --- a/run-shell/pixelate.png +++ /dev/null diff --git a/run-shell/run-shell.lua b/run-shell/run-shell.lua index 31d17aa..c2a2e29 100644 --- a/run-shell/run-shell.lua +++ b/run-shell/run-shell.lua @@ -7,21 +7,19 @@ -- @copyright 2019 Pavel Makhov ------------------------------------------------- -local capi = { - screen = screen, - client = client, -} local awful = require("awful") local gfs = require("gears.filesystem") local wibox = require("wibox") local gears = require("gears") local completion = require("awful.completion") +local naughty = require("naughty") local run_shell = awful.widget.prompt() local widget = {} function widget.new() + local widget_instance = { _cached_wiboxes = {} } @@ -32,41 +30,82 @@ function widget.new() ontop = true, height = 1060, width = 1920, - opacity = 0.6, - bg = '#000002' + opacity = 0.9, + bg = 'radial:960,540,20:960,540,700:0,#00000022:0.2,#33333388:1,#000000ff' + } + + local suspend_button = wibox.widget { + image = '/usr/share/icons/Arc/actions/symbolic/system-shutdown-symbolic.svg', + widget = wibox.widget.imagebox, + resize = false, + set_hover = function(self, opacity) + naughty.notify{text = tostring(self.opacity)} + self.opacity = opacity + self.image = '/usr/share/icons/Arc/actions/symbolic/system-shutdown-symbolic.svg' + end } + suspend_button:connect_signal("mouse::enter", function() + suspend_button:set_hover(1) + end) + + suspend_button:connect_signal("mouse::leave", function() + suspend_button:set_hover(0.2) + end) + w:setup { { { { { - markup = '<span font="awesomewm-font 14" color="#ffffff">a</span>', - widget = wibox.widget.textbox, + { + markup = '<span font="awesomewm-font 14" color="#ffffff">a</span>', + widget = wibox.widget.textbox, + }, + id = 'icon', + left = 10, + layout = wibox.container.margin + }, + { + run_shell, + left = 10, + layout = wibox.container.margin, }, - id = 'icon', - left = 10, - layout = wibox.container.margin + id = 'left', + layout = wibox.layout.fixed.horizontal + }, + bg = '#333333', + shape = function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, 3) + end, + shape_border_color = '#74aeab', + shape_border_width = 1, + forced_width = 200, + forced_height = 50, + widget = wibox.container.background + }, + valign = 'center', + layout = wibox.container.place + }, + { + { + suspend_button, + { + image = '/usr/share/icons/Arc/actions/symbolic/application-exit-symbolic.svg', + resize = false, + widget = wibox.widget.imagebox, }, { - run_shell, - left = 10, - layout = wibox.container.margin, + image = '/usr/share/icons/Arc/actions/symbolic/application-exit-symbolic.svg', + resize = false, + widget = wibox.widget.imagebox }, - id = 'left', layout = wibox.layout.fixed.horizontal }, - widget = wibox.container.background, - bg = '#333333', - shape = function(cr, width, height) - gears.shape.rounded_rect(cr, width, height, 3) - end, - shape_border_color = '#74aeab', - shape_border_width = 1, - forced_width = 200, - forced_height = 50 + valign = 'bottom', + layout = wibox.container.place, }, - layout = wibox.container.place + layout = wibox.layout.stack } return w |