Add displayselect from Luke Smith's dotfiles
This commit is contained in:
parent
d1cbdf3bb4
commit
6585022138
|
@ -30,6 +30,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
displayselect
|
||||||
isync
|
isync
|
||||||
upload-to-files
|
upload-to-files
|
||||||
];
|
];
|
||||||
|
|
|
@ -7,6 +7,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
build-glove80 = callPackage ./build-glove80.nix { };
|
build-glove80 = callPackage ./build-glove80.nix { };
|
||||||
|
displayselect = callPackage ./displayselect { };
|
||||||
notes = callPackage ./notes { };
|
notes = callPackage ./notes { };
|
||||||
tmux-sessionizer = callPackage ./tmux-sessionizer { };
|
tmux-sessionizer = callPackage ./tmux-sessionizer { };
|
||||||
upload-to-files = callPackage ./upload-to-files.nix { };
|
upload-to-files = callPackage ./upload-to-files.nix { };
|
||||||
|
|
31
nix/pkgs/displayselect/default.nix
Normal file
31
nix/pkgs/displayselect/default.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
with pkgs;
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "displayselect";
|
||||||
|
version = "0.1.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "lukesmithxyz";
|
||||||
|
repo = "voidrice";
|
||||||
|
rev = "master";
|
||||||
|
sha256 = "BybEijy1zH+UNyCgWnenmcazwE8B3PXGc+Cl0FO/n3o=";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
bash
|
||||||
|
bc
|
||||||
|
xorg.xrandr
|
||||||
|
];
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./remove-setbg.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp .local/bin/displayselect $out/bin
|
||||||
|
chmod +x $out/bin/displayselect
|
||||||
|
'';
|
||||||
|
}
|
12
nix/pkgs/displayselect/remove-setbg.patch
Normal file
12
nix/pkgs/displayselect/remove-setbg.patch
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
diff --git a/.local/bin/displayselect b/.local/bin/displayselect
|
||||||
|
index 51dd468..f69f154 100755
|
||||||
|
--- a/.local/bin/displayselect
|
||||||
|
+++ b/.local/bin/displayselect
|
||||||
|
@@ -57,7 +57,6 @@ onescreen() { # If only one output available or chosen.
|
||||||
|
}
|
||||||
|
|
||||||
|
postrun() { # Stuff to run to clean up.
|
||||||
|
- setbg # Fix background if screen size/arangement has changed.
|
||||||
|
{ killall dunst ; setsid -f dunst ;} >/dev/null 2>&1 # Restart dunst to ensure proper location on screen
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue