forked from dalyIsaac/Whim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGapsCommands.cs
45 lines (41 loc) · 1.31 KB
/
GapsCommands.cs
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
using Windows.Win32.UI.Input.KeyboardAndMouse;
namespace Whim.Gaps;
/// <summary>
/// The commands for the floating layout plugin.
/// </summary>
public class GapsCommands : PluginCommands
{
private readonly IGapsPlugin _gapsPlugin;
/// <summary>
/// Creates a new instance of the floating layout commands.
/// </summary>
public GapsCommands(IGapsPlugin gapsPlugin)
: base(gapsPlugin.Name)
{
_gapsPlugin = gapsPlugin;
Add(
identifier: "outer.increase",
title: "Increase outer gap",
() => _gapsPlugin.UpdateOuterGap(_gapsPlugin.GapsConfig.DefaultOuterDelta),
keybind: new Keybind(IKeybind.WinCtrlShift, VIRTUAL_KEY.VK_L)
)
.Add(
identifier: "outer.decrease",
title: "Decrease outer gap",
() => _gapsPlugin.UpdateOuterGap(-_gapsPlugin.GapsConfig.DefaultOuterDelta),
keybind: new Keybind(IKeybind.WinCtrlShift, VIRTUAL_KEY.VK_H)
)
.Add(
identifier: "inner.increase",
title: "Increase inner gap",
() => _gapsPlugin.UpdateInnerGap(_gapsPlugin.GapsConfig.DefaultInnerDelta),
keybind: new Keybind(IKeybind.WinCtrlShift, VIRTUAL_KEY.VK_K)
)
.Add(
identifier: "inner.decrease",
title: "Decrease inner gap",
() => _gapsPlugin.UpdateInnerGap(-_gapsPlugin.GapsConfig.DefaultInnerDelta),
keybind: new Keybind(IKeybind.WinCtrlShift, VIRTUAL_KEY.VK_J)
);
}
}