summaryrefslogtreecommitdiff
path: root/translate-widget
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@gmail.com>2018-04-14 19:38:32 -0400
committerstreetturtle <streetturtle@gmail.com>2018-04-14 19:38:32 -0400
commitb35cd08f56ee20249cc43441ceb7f03370fd973b (patch)
tree3cb96536f61b3984cc0e8fa6652101be0c185b1f /translate-widget
parent0a1aaef4245955d132078e09dbcab452cc1cbd99 (diff)
add border to translate widget
Diffstat (limited to 'translate-widget')
-rw-r--r--translate-widget/translate.lua14
1 files changed, 13 insertions, 1 deletions
diff --git a/translate-widget/translate.lua b/translate-widget/translate.lua
index b1944dc..e046604 100644
--- a/translate-widget/translate.lua
+++ b/translate-widget/translate.lua
@@ -12,6 +12,7 @@ local https = require("ssl.https")
local json = require("json")
local naughty = require("naughty")
local wibox = require("wibox")
+local gears = require("gears")
local API_KEY = '<your api key>'
local BASE_URL = 'https://translate.yandex.net/api/v1.5/tr.json/translate'
@@ -41,11 +42,17 @@ end
local w = wibox {
width = 300,
+ border_width = 1,
+ border_color = '#66ccff',
ontop = true,
screen = mouse.screen,
expand = true,
bg = '#1e252c',
- max_widget_size = 500
+ max_widget_size = 500,
+ shape = function(cr, width, height)
+ gears.shape.rounded_rect(cr, width, height, 3)
+ end
+
}
w:setup {
@@ -140,6 +147,11 @@ local input_widget = wibox {
bg = '#1e252c',
max_widget_size = 500,
border_width = 1;
+ border_width = 1,
+ border_color = '#66ccff',
+ shape = function(cr, width, height)
+ gears.shape.rounded_rect(cr, width, height, 3)
+ end
}
local prompt = awful.widget.prompt()