-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathunity_fix.lua
More file actions
86 lines (76 loc) · 5 KB
/
Copy pathunity_fix.lua
File metadata and controls
86 lines (76 loc) · 5 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
-- TODO: Replace all window rules with a for loop
-- Opaque
hl.window_rule({ match = { class = "Unity", title = "Font Asset Creator" }, tag = "+unity_opaque" })
hl.window_rule({ match = { class = "Unity", title = "UI Builder" }, tag = "+unity_opaque" })
hl.window_rule({ match = { class = "Unity", title = "Color" }, tag = "+unity_opaque" })
hl.window_rule({ match = { class = "Unity", title = "HDR Color" }, tag = "+unity_opaque" })
hl.window_rule({ match = { class = "Unity", title = "Gradient Editor.*" }, tag = "+unity_opaque" })
hl.window_rule({ match = { class = "Unity", title = "HDR Gradient Editor.*" }, tag = "+unity_opaque" })
hl.window_rule({
name = "unity_opaque",
match = { tag = "unity_opaque" },
opaque = true
})
-- Selectors
local selector_pos = { "cursor_x - (window_w * 0.5)", "cursor_y - (window_h * 0.5)" }
hl.window_rule({ match = { class = "Unity", title = "" }, tag = "+unity_selector" })
hl.window_rule({ match = { class = "Unity", title = "Select.*" }, tag = "+unity_selector" })
hl.window_rule({ match = { class = "Unity", title = "UnityEditor.AddComponent.AddComponentWindow" }, tag = "+unity_selector" })
hl.window_rule({ match = { class = "Unity", title = "UnityEditor.Rendering.FilterWindow.*" }, tag = "+unity_selector" })
hl.window_rule({ match = { class = "Unity", title = "UnityEditor.IconSelector" }, tag = "+unity_selector" })
hl.window_rule({ match = { class = "Unity", title = "UnityEditor.IMGUI.Controls.AdvancedDropdownWindow" }, tag = "+unity_selector" })
hl.window_rule({ match = { class = "Unity", title = "UnityEditor.Searcher.SearcherWindow" }, tag = "+unity_selector" })
hl.window_rule({ match = { class = "Unity", title = "UnityEditor.VFX.UI.VFXFilterWindow" }, tag = "+unity_selector" })
hl.window_rule({ match = { class = "Unity", title = "Tile Palette" }, tag = "+unity_selector" })
hl.window_rule({ match = { class = "Unity", title = "UnityEditor.Rendering.FilterWindow" }, tag = "+unity_selector" })
hl.window_rule({ match = { class = "Unity", title = "UnityEditor.IMGUI.Controls.AdvancedDropdownWindow" }, tag = "+unity_selector" })
hl.window_rule({ match = { class = "Unity", title = "UnityEditorInternal.AddCurvesPopup" }, tag = "+unity_selector" })
hl.window_rule({ match = { class = "Unity", title = "UnityEngine.InputSystem.Editor.AdvancedDropdownWindow" }, tag = "+unity_selector" })
hl.window_rule({ match = { class = "Unity", title = "Save Layout" }, tag = "+unity_selector" })
hl.window_rule({ match = { class = "Unity", title = "UnityEditor.PackageManager.UI.Internal.DropdownContainer" }, tag = "+unity_selector" })
hl.window_rule({ match = { class = "Unity", title = "Color" }, tag = "+unity_selector" })
hl.window_rule({ match = { class = "Unity", title = "HDR Color" }, tag = "+unity_selector" })
hl.window_rule({ match = { class = "Unity", title = "Gradient Editor.*" }, tag = "+unity_selector" })
hl.window_rule({ match = { class = "Unity", title = "HDR Gradient Editor.*" }, tag = "+unity_selector" })
hl.window_rule({ match = { class = "Unity", title = "Curve.*" }, tag = "+unity_selector" })
hl.window_rule({
name = "unity_selector",
match = { tag = "unity_selector" },
move = selector_pos
})
-- Makes new windows immediately accept input and fixes other X related issues
-- Can introduce some unexpected behavior
hl.window_rule({
name = "unity_x_fix",
match = { class = "Unity" },
allows_input = true
})
-- Tooltips Stealing Focus
-- Discussions: https://discussions.unity.com/t/unset-tooltip-titles/1522964
-- Support: https://unity3d.atlassian.net/servicedesk/customer/portal/2/IN-85635
-- Issue Tracker: https://issuetracker.unity3d.com/issues/linux-tooltips-have-an-unset-title-which-causes-the-inability-to-modify-tooltip-behavior-on-window-managers
-- Thanks Unity devs <3
hl.window_rule({
name = "unity_tooltips",
match = {
class = "Unity",
initial_title = "UnityTooltipWindow"
},
allows_input = false,
no_focus = true,
no_initial_focus = true,
focus_on_activate = false
})
-- Fix for https://github.com/yasirkula/UnityAssetUsageDetector tooltips
hl.window_rule({
name = "asset_usage_detector_tooltips",
match = {
class = "Unity",
title = "AssetUsageDetectorNamespace.SearchResultTooltip"
},
allows_input = false,
no_focus = true,
no_initial_focus = true,
focus_on_activate = false,
min_size = { 25, 25 }
})