New Setup 📦

This commit is contained in:
Luca 2023-02-05 05:02:49 +01:00
parent d16174b447
commit 415dbd08a1
10194 changed files with 1368647 additions and 4 deletions

View file

@ -0,0 +1,30 @@
-- ## Wearther ##
-- ~~~~~~~~~~~~~~
-- requirements
-- ~~~~~~~~~~~~
local awful = require("awful")
local gears = require("gears")
local city = "" -- Ex. London or Salt+Lake+City
local get_weather = function()
local script = [[
bash -c "$HOME/.config/awesome/signals/weather_script.sh ]] .. city.. [["
]]
awful.spawn.easy_async_with_shell(script, function(stdout)
local weather = stdout:match("(.+):")
local feels_like = stdout:match(".+[:](.+)")
awesome.emit_signal('signal::weather', weather, feels_like)
end)
end
gears.timer {
timeout = 1200,
call_now = true,
autostart = true,
callback = function()
get_weather()
end
}