summaryrefslogtreecommitdiff
path: root/pkgs/astal/src/shell.lua
blob: 4baede78345f9e368c44aac865591b9f1f18d7ae (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
29
local App = require("astal.gtk3.app")
local lib = require("lib")
local Variable = require("astal").Variable

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,
})