Re-add output switcher
This commit is contained in:
parent
a2185ada67
commit
9203bef1ba
|
@ -86,6 +86,9 @@
|
|||
"XF86AudioMute" = "pamixer -t";
|
||||
"XF86Audio{Prev,Next}" = "playerctl {previous,next}";
|
||||
"XF86AudioPlay" = "playerctl play-pause";
|
||||
# Switch outputs
|
||||
"super + o" = ''
|
||||
dunstify -r 112119 "Sound output switched to $(${pkgs.pads}/bin/pads next && ${pkgs.pads}/bin/pads list | rg '^\*' | choose 1:)"'';
|
||||
# Screenshot
|
||||
"Print" = "flameshot gui && bspc desktop --focus focused";
|
||||
"shift + Print" =
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
{ rustPlatform, fetchFromGitHub, libpulseaudio, pkg-config }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "pads";
|
||||
version = "89d69d4b9b199e08671c947120d5b2e1b6295d68";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dogue";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-vVmEKvRSBiHv4skh2/B6cl17jVsgRI0IJeSgpSpPPTE=";
|
||||
};
|
||||
|
||||
cargoLock = { lockFile = "${src}/Cargo.lock"; };
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ libpulseaudio ];
|
||||
|
||||
meta = {
|
||||
description =
|
||||
"A simple CLI tool for swtiching the default/active output device for PulseAudio.";
|
||||
homepage = "https://github.com/dogue/pads";
|
||||
};
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, ... }: {
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../common/fragments/graphical
|
||||
|
@ -6,6 +6,10 @@
|
|||
../../common/home_manager/common.nix
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: { pads = final.callPackage ../../common/pkgs/pads.nix { }; })
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
|
Loading…
Reference in New Issue