-
Notifications
You must be signed in to change notification settings - Fork 242
/
quake-terminal.lua
65 lines (58 loc) · 1.04 KB
/
quake-terminal.lua
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
local spawn = require('awful.spawn')
local app = require('configuration.apps').default.quake
local quake_id = 'notnil'
local quake_client
local opened = false
function create_shell()
quake_id =
spawn(
app,
{
skip_decoration = true
}
)
end
function open_quake()
quake_client.hidden = false
end
function close_quake()
quake_client.hidden = true
end
toggle_quake = function()
opened = not opened
if not quake_client then
create_shell()
else
if opened then
open_quake()
else
close_quake()
end
end
end
_G.client.connect_signal(
'manage',
function(c)
if (c.pid == quake_id) then
quake_client = c
c.opacity = 0.9
c.floating = true
c.skip_taskbar = true
c.ontop = true
c.above = true
c.sticky = true
c.hidden = not opened
c.maximized_horizontal = true
end
end
)
_G.client.connect_signal(
'unmanage',
function(c)
if (c.pid == quake_id) then
opened = false
quake_client = nil
end
end
)
-- create_shell()