home: i3: setup bluetooth mouse battery block
This commit is contained in:
parent
93eccb76ec
commit
0cdb05ecf1
1
.gitattributes
vendored
1
.gitattributes
vendored
|
@ -1,2 +1,3 @@
|
||||||
secrets/*.secret filter=git-crypt diff=git-crypt
|
secrets/*.secret filter=git-crypt diff=git-crypt
|
||||||
secrets/wireguard.nix filter=git-crypt diff=git-crypt
|
secrets/wireguard.nix filter=git-crypt diff=git-crypt
|
||||||
|
home/secrets/*.secret filter=git-crypt diff=git-crypt
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./emacs.nix
|
./emacs.nix
|
||||||
./flameshot.nix
|
./flameshot.nix
|
||||||
|
./secrets
|
||||||
./tmux.nix
|
./tmux.nix
|
||||||
./x
|
./x
|
||||||
];
|
];
|
||||||
|
|
BIN
home/secrets/bluetooth-mouse-mac-address.secret
Normal file
BIN
home/secrets/bluetooth-mouse-mac-address.secret
Normal file
Binary file not shown.
13
home/secrets/default.nix
Normal file
13
home/secrets/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
with lib;
|
||||||
|
{
|
||||||
|
options.my.secrets = mkOption {
|
||||||
|
type = types.attrs;
|
||||||
|
};
|
||||||
|
|
||||||
|
config.my.secrets = {
|
||||||
|
# I'm not sure hiding this is very important, but it *seems* like a bad idea
|
||||||
|
# to expose this
|
||||||
|
bluetooth-mouse-mac-address = fileContents ./bluetooth-mouse-mac-address.secret;
|
||||||
|
};
|
||||||
|
}
|
|
@ -60,6 +60,13 @@ in
|
||||||
block = "networkmanager";
|
block = "networkmanager";
|
||||||
primary_only = true;
|
primary_only = true;
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
block = "bluetooth";
|
||||||
|
mac = config.my.secrets.bluetooth-mouse-mac-address;
|
||||||
|
hide_disconnected = true;
|
||||||
|
# TODO: use format when i3status-rust updates to v0.20
|
||||||
|
# format = "{percentage}";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
block = "sound";
|
block = "sound";
|
||||||
driver = "pulseaudio";
|
driver = "pulseaudio";
|
||||||
|
|
Loading…
Reference in a new issue