Joystickwake + background
This commit is contained in:
parent
e080d5b9b8
commit
8acab53e36
10 changed files with 135 additions and 35 deletions
|
|
@ -6,7 +6,9 @@ let
|
|||
callPackage = pkgs.lib.callPackageWith (pkgs // self);
|
||||
self = {
|
||||
gallery-tagger = callPackage ./gallery-tagger {};
|
||||
lockscreen = callPackage ./lockscreen pkgs.extra.colorPalette // {};
|
||||
lockscreen = callPackage ./lockscreen {};
|
||||
update-background = callPackage ./update-background {};
|
||||
joystickwake = callPackage ./joystickwake {};
|
||||
};
|
||||
in
|
||||
(self)
|
||||
|
|
|
|||
36
custom/joystickwake/default.nix
Normal file
36
custom/joystickwake/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib, python3, fetchFromGitHub }:
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "joystickwake";
|
||||
version = "0.2.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "foresto";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0j8xwfmzzmc9s88zvzc3lv67821r6x28vy6vli3srvx859wprppd";
|
||||
};
|
||||
|
||||
buildInputs = with python3.pkgs; [
|
||||
pyudev
|
||||
xlib
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
pyudev
|
||||
xlib
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A joystick-aware screen waker";
|
||||
longDescription = ''
|
||||
Linux gamers often find themselves unexpectedly staring at a blank screen, because their display server fails to recognize game controllers as input devices, allowing the screen blanker to activate during gameplay.
|
||||
This program works around the problem by temporarily disabling screen blankers when joystick activity is detected.
|
||||
'';
|
||||
homepage = "https://github.com/foresto/joystickwake";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
|
||||
}
|
||||
12
custom/update-background/default.nix
Normal file
12
custom/update-background/default.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ lib, stdenv, feh, findutils, gnugrep, coreutils, writeScript, backgrounds_directory ? "$HOME/Immagini/Sfondi" }:
|
||||
let
|
||||
find = "${findutils}/bin/find";
|
||||
grep = "${gnugrep}/bin/grep";
|
||||
shuf = "${coreutils}/bin/shuf";
|
||||
in
|
||||
writeScript "update-background.sh" ''
|
||||
#!/bin/sh
|
||||
image=`${find} ${backgrounds_directory} -type f | ${grep} -v "/\." | ${shuf} -n 1`
|
||||
echo "image: $image"
|
||||
${feh}/bin/feh --bg-fill --no-fehbg "$image"
|
||||
''
|
||||
Loading…
Add table
Add a link
Reference in a new issue