aboutsummaryrefslogtreecommitdiff
path: root/.config/awesome/ui/fresnel
diff options
context:
space:
mode:
Diffstat (limited to '.config/awesome/ui/fresnel')
-rw-r--r--.config/awesome/ui/fresnel/init.lua19
-rw-r--r--.config/awesome/ui/fresnel/text_input.lua4
2 files changed, 9 insertions, 14 deletions
diff --git a/.config/awesome/ui/fresnel/init.lua b/.config/awesome/ui/fresnel/init.lua
index dc8e333..613bc9c 100644
--- a/.config/awesome/ui/fresnel/init.lua
+++ b/.config/awesome/ui/fresnel/init.lua
@@ -1,7 +1,5 @@
local text_input = require "ui.fresnel.text_input"
local awful = require "awful"
-local qdebug = require "quarrel.debug"
-local cfg = require "misc.cfg"
local gshape = require "gears.shape"
local gtable = require "gears.table"
local qanim = require "quarrel.animation"
@@ -152,7 +150,7 @@ function fresnel:_exec_entry(entry)
local exec = entry.exec
if type(exec) ~= "userdata" and type(exec) ~= "nil" then
if exec[2] then
- awful.spawn(cfg.terminal .. " -e /bin/sh -c " .. exec[1] .. " 1>/dev/null 2>&1")
+ awful.spawn.with_shell("xdg-terminal-exec /bin/sh -c '" .. exec[1]:gsub("'", [[\']]) .. "' 1>/dev/null 2>&1")
else
awful.spawn.with_shell(exec[1] .. " 1>/dev/null 2>&1")
end
@@ -318,17 +316,17 @@ fresnel._w_status = wibox.widget {
widget = wibox.widget.textbox,
text = "0/0",
}
-fresnel._w_popup = qui.popup {
+fresnel._w_popup = qui.animateable_shape(qui.popup {
-- visible = false,
ontop = true,
placement = false,
- shape = function(cr, w)
- gshape.partially_rounded_rect(cr, w, 0, false, false, true, true, qui.BORDER_RADIUS)
+ shape = function(cr, w, h)
+ gshape.partially_rounded_rect(cr, w, h, false, false, true, true, qui.BORDER_RADIUS)
end,
x = width / 2,
+ y = -qui.BORDER_WIDTH,
minimum_width = width,
maximum_width = width,
- -- maximum_height = max_height,
widget = {
qui.styled {
widget = wibox.container.background,
@@ -373,7 +371,7 @@ fresnel._w_popup = qui.popup {
},
layout = wibox.layout.align.vertical,
},
-}
+})
function fresnel:show()
self._prev_scroll_amount = DEFAULT_SCROLL_AMOUNT
@@ -406,13 +404,10 @@ fresnel._t_height = qanim:new {
pos = 0,
easing = qvars.easing,
subscribed = function(pos)
- fresnel._w_popup.shape = function(cr, w)
- gshape.partially_rounded_rect(cr, w, pos, false, false, true, true, qui.BORDER_RADIUS)
- end
+ fresnel._w_popup.shape_height = pos
end,
}
--- TODO: optimize the search algo to be more efficient and not require making fresnel invisible
fresnel._t_opacity = rubato.timed {
duration = qvars.anim_duration,
pos = 0,
diff --git a/.config/awesome/ui/fresnel/text_input.lua b/.config/awesome/ui/fresnel/text_input.lua
index 2dc7368..5b6525b 100644
--- a/.config/awesome/ui/fresnel/text_input.lua
+++ b/.config/awesome/ui/fresnel/text_input.lua
@@ -3,8 +3,8 @@
-- @copyright 2021-2025 Kasper24
-------------------------------------------
local lgi = require('lgi')
-local Gtk = lgi.require('Gtk', '3.0')
-local Gdk = lgi.require('Gdk', '3.0')
+local Gtk = lgi.require('Gtk', '3.0')-- somewm:ignore
+local Gdk = lgi.require('Gdk', '3.0')-- somewm:ignore
local Pango = lgi.Pango
local awful = require("awful")
local gtable = require("gears.table")