Awesome configs for Ben.

This commit is contained in:
Derek Taylor
2023-04-05 14:32:50 -05:00
parent 1966d656c1
commit 6252ad30c1
608 changed files with 9300 additions and 3600 deletions

21
.config/awesome/lain/widget/contrib/task.lua Executable file → Normal file
View File

@@ -10,7 +10,7 @@ local markup = require("lain.util").markup
local awful = require("awful")
local naughty = require("naughty")
local mouse = mouse
local string = string
local string = { format = string.format, gsub = string.gsub }
-- Taskwarrior notification
-- lain.widget.contrib.task
@@ -23,7 +23,12 @@ function task.hide()
end
function task.show(scr)
task.notification_preset.screen = task.followtag and awful.screen.focused() or scr or 1
if task.followtag then
task.notification_preset.screen = awful.screen.focused()
elseif scr then
task.notification_preset.screen = scr
end
helpers.async({ awful.util.shell, "-c", task.show_cmd }, function(f)
local widget_focused = true
@@ -40,12 +45,12 @@ function task.show(scr)
if widget_focused then
task.hide()
task.notification = naughty.notify {
preset = task.notification_preset,
title = "task next",
text = markup.font(task.notification_preset.font,
awful.util.escape(f:gsub("\n*$", "")))
}
task.notification = naughty.notify({
preset = task.notification_preset,
title = "task next",
text = markup.font(task.notification_preset.font,
awful.util.escape(f:gsub("\n*$", "")))
})
end
end)
end