diff options
| author | delta <darkussdelta@gmail.com> | 2023-05-12 16:18:24 +0200 |
|---|---|---|
| committer | delta <darkussdelta@gmail.com> | 2023-05-12 16:18:24 +0200 |
| commit | f5612f081db0dc69f5c0ebc69e67fa3b098a9ad9 (patch) | |
| tree | 7a04027efe5fede7f08688a9524c5dbe6628635b /.config/awesome/ui/decorations/titlebar.lua | |
| parent | ea1bdf6585caed2c0ba8669ca5c3b3b92232281a (diff) | |
restructure services, add get_essid to quarrel.native and other wip work
Diffstat (limited to '.config/awesome/ui/decorations/titlebar.lua')
| -rw-r--r-- | .config/awesome/ui/decorations/titlebar.lua | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/.config/awesome/ui/decorations/titlebar.lua b/.config/awesome/ui/decorations/titlebar.lua deleted file mode 100644 index ab96457..0000000 --- a/.config/awesome/ui/decorations/titlebar.lua +++ /dev/null @@ -1,84 +0,0 @@ -local awful = require "awful" -local cfg = require "misc.cfg" -local gears = require "gears" -local qvars = require "quarrel.vars" -local rubato = require "lib.rubato" -local wibox = require "wibox" - -local function button(color, color_focus, callback) - local widget = wibox.widget { - widget = wibox.container.background, - forced_height = qvars.button_size, - forced_width = qvars.button_size, - bg = color, - shape = qvars.shape, - buttons = { callback } - } - - widget:connect_signal("mouse::enter", function() - local timed = rubato.timed { - duration = 0.1, - intro = 0.05, - pos = qvars.button_size, - subscribed = function(pos) - widget.forced_width = pos - end - } - - timed.target = qvars.button_size * 2 - widget.bg = color_focus - end) - - widget:connect_signal("mouse::leave", function() - local timed = rubato.timed { - duration = 0.1, - intro = 0.05, - pos = qvars.button_size * 2, - subscribed = function(pos) - widget.forced_width = pos - end - } - - timed.target = qvars.button_size - widget.bg = color - end) - - return widget -end - -client.connect_signal("request::titlebars", function(c) - if not cfg.draw_titlebar then return end - - local titlebar = awful.titlebar(c, { - position = "top", - size = qvars.button_size + qvars.padding * 2 - }) - - awful.titlebar.enable_tooltip = false - - titlebar.widget = { - widget = wibox.container.margin, - margins = qvars.padding, - { - nil, - nil, - { - button(qvars.colors.green, qvars.colors.bright.green, awful.button({}, 1, function() - c.maximized = not c.maximized - end)), - button(qvars.colors.yellow, qvars.colors.bright.yellow, awful.button({}, 1, function() - gears.timer.delayed_call(function() - c.minimized = true - end) - end)), - button(qvars.colors.red, qvars.colors.bright.red, awful.button({}, 1, function() - c:kill() - end)), - - spacing = qvars.padding, - layout = wibox.layout.fixed.horizontal - }, - layout = wibox.layout.align.horizontal - } - } -end) |
