Keyd: Use control taps for mutes.

This commit is contained in:
Dmitry Voronin 2025-01-21 10:46:32 +03:00
parent 27dbc54eb1
commit cac0e54f41
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
2 changed files with 49 additions and 46 deletions

View file

@ -6,6 +6,7 @@
}: }:
let let
cfg = config.module.keyd; cfg = config.module.keyd;
timeout = 150;
in in
{ {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
@ -18,19 +19,19 @@ in
settings = { settings = {
# NOTE: Use `wev` to find key names. # NOTE: Use `wev` to find key names.
main = { main = {
# down = "micmute";
# right = "compose";
# up = "mute";
backspace = "delete"; # Delete key on backspace. backspace = "delete"; # Delete key on backspace.
capslock = "overload(control, esc)"; # Ctrl/esc combo. capslock = "overload(control, esc)"; # Ctrl/esc combo.
compose = "layer(layer_number)"; # Number input layer. compose = "layer(layer_number)"; # Number input layer.
delete = "backslash"; delete = "backslash";
# down = "micmute"; esc = "timeout(grave, ${toString timeout}, print)"; # System controls.
esc = "timeout(grave, 150, print)"; # System controls.
left = "compose"; # Number input layer. left = "compose"; # Number input layer.
leftcontrol = "overload(layer_alternative, leftcontrol)"; # Alternative layer for home, end etc. leftcontrol = "overload(layer_alternative, micmute)"; # Alternative layer for home, end etc.
print = "compose"; print = "compose";
# right = "compose"; rightcontrol = "overload(layer_control, mute)"; # Media and other controls.
rightcontrol = "overload(layer_control, rightcontrol)"; # Media and other controls.
rightshift = "backspace"; # Backspace. rightshift = "backspace"; # Backspace.
# up = "mute";
}; };
# Alternative navigation. # Alternative navigation.
@ -70,7 +71,7 @@ in
v = "paste"; v = "paste";
w = "pageup"; w = "pageup";
x = "cut"; x = "cut";
z = "micmute"; # z = "micmute";
}; };
# Media controls. # Media controls.

View file

@ -1,45 +1,47 @@
{ pkgs, ... }: { { pkgs, ... }:
{
services.transmission = { services.transmission = {
enable = true; enable = true;
package = pkgs.transmission_4; package = pkgs.transmission_4;
# REF: https://github.com/transmission/transmission/blob/main/docs/Editing-Configuration-Files.md # REF: https://github.com/transmission/transmission/blob/main/docs/Editing-Configuration-Files.md
settings = let settings =
downloadDir = "/storage/hot/download"; let
in downloadDir = "/storage/hot/download";
{ in
bind-address-ipv4 = "0.0.0.0"; {
bind-address-ipv6 = "::"; bind-address-ipv4 = "0.0.0.0";
cache-size-mb = 4; bind-address-ipv6 = "::";
dht-enabled = true; cache-size-mb = 4;
download-dir = downloadDir; dht-enabled = true;
download-queue-enabled = true; download-dir = downloadDir;
download-queue-size = 10; download-queue-enabled = true;
encryption = 1; download-queue-size = 10;
incomplete-dir-enabled = false; encryption = 1;
message-level = 3; incomplete-dir-enabled = false;
peer-limit-global = 500; message-level = 3;
peer-limit-per-torrent = 50; peer-limit-global = 500;
peer-port = 51413; peer-limit-per-torrent = 50;
pex-enabled = true; peer-port = 51413;
port-forwarding-enabled = false; pex-enabled = true;
preallocation = 1; port-forwarding-enabled = false;
preferred-transport = "utp"; preallocation = 1;
rename-partial-files = true; preferred-transport = "utp";
rpc-bind-address = "::"; rename-partial-files = true;
rpc-host-whitelist-enabled = false; rpc-bind-address = "::";
rpc-password = ""; rpc-host-whitelist-enabled = false;
rpc-port = 9091; rpc-password = "";
rpc-username = "root"; rpc-port = 9091;
rpc-whitelist-enabled = false; rpc-username = "root";
start-added-torrents = true; rpc-whitelist-enabled = false;
tcp-enabled = true; start-added-torrents = true;
torrent-added-verify-mode = "fast"; tcp-enabled = true;
trash-can-enabled = false; torrent-added-verify-mode = "fast";
trash-original-torrent-files = true; trash-can-enabled = false;
umask = 22; trash-original-torrent-files = true;
utp-enabled = true; umask = 22;
watch-dir = "/var/lib/transmission/watchdir/"; utp-enabled = true;
watch-dir-enabled = true; watch-dir = "/var/lib/transmission/watchdir/";
}; watch-dir-enabled = true;
};
}; };
} }