tangled
alpha
login
or
join now
wiro.world
/
dotfiles
2
fork
atom
yep, more dotfiles
2
fork
atom
overview
issues
1
pulls
1
pipelines
feat: allow disabling integrated keyboard via swaybar
wiro.world
10 months ago
1c7556df
84ec1e9b
+24
-7
1 changed file
expand all
collapse all
unified
split
home-manager
fragments
vm-bar.nix
+24
-7
home-manager/fragments/vm-bar.nix
···
7
7
let
8
8
cfg = config.local.fragment.vm;
9
9
10
10
+
integrated-keyboard-id = "1:1:AT_Translated_Set_2_keyboard";
11
11
+
10
12
theme = config.local.colorScheme.palette;
11
13
in
12
14
{
···
20
22
blocks = [
21
23
{
22
24
block = "custom";
25
25
+
command = ''
26
26
+
echo $(swaymsg --raw --type get_inputs \
27
27
+
| jq --raw-output '
28
28
+
.[]
29
29
+
| select(.identifier=="${integrated-keyboard-id}")
30
30
+
| .libinput.send_events')
31
31
+
'';
32
32
+
click = [{
33
33
+
button = "left";
34
34
+
cmd = "${lib.getExe' pkgs.sway "swaymsg"} input ${integrated-keyboard-id} events toggle";
35
35
+
update = true;
36
36
+
}];
37
37
+
interval = "once";
38
38
+
}
39
39
+
40
40
+
{
41
41
+
block = "custom";
23
42
command = "echo $(${lib.getExe' pkgs.mako "makoctl"} mode)";
24
24
-
click = [
25
25
-
{
26
26
-
button = "left";
27
27
-
cmd = "${lib.getExe' pkgs.mako "makoctl"} mode -t dnd";
28
28
-
update = true;
29
29
-
}
30
30
-
];
43
43
+
click = [{
44
44
+
button = "left";
45
45
+
cmd = "${lib.getExe' pkgs.mako "makoctl"} mode -t dnd";
46
46
+
update = true;
47
47
+
}];
31
48
interval = "once";
32
49
}
33
50