summaryrefslogtreecommitdiff
path: root/pkgs/astal/src/shell.lua
blob: 417f754e7115f6f3960c0ebb45b5105e2a97edfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
local App = require("astal.gtk3.app")
local lib = require("lib")

local Bar = require("widget.bar")
local Corners = require("widget.corners")
local Deck = require("widget.deck")
local Launcher = require("widget.launcher")

local launcher_visible

App:start({
	css = lib.src("main.css"),
	main = function()
		for _, mon in pairs(App.monitors) do
			Bar(mon)
			Corners(mon)
			Deck(mon)
		end
		launcher_visible = Launcher()
	end,
	request_handler = function(req, res)
		if req == "launcher" then
			launcher_visible:set(true)
			return res("opening launcher")
		end
		res("unknown command")
	end,
})