home-manager/gui: Working randomised doomsaver
This commit is contained in:
@@ -15,10 +15,21 @@ let
|
||||
url = "https://distro.ibiblio.org/slitaz/sources/packages/d/doom1.wad";
|
||||
hash = "sha256-HX1DvlAeZ9kn5BXguPPinDvzMHXoWXIYFvZSpSbKx3E=";
|
||||
};
|
||||
doomNcurses = pkgs.writeShellScript "doom-ncurses" ''
|
||||
SDL_AUDIODRIVER=null SDL_VIDEODRIVER=caca CACA_DRIVER=ncurses exec ${pkgs.chocolate-doom2xx}/bin/chocolate-doom -iwad ${doomWad}
|
||||
# doomNcurses = pkgs.writeShellScript "doom-ncurses" ''
|
||||
# SDL_AUDIODRIVER=null SDL_VIDEODRIVER=caca CACA_DRIVER=ncurses exec ${pkgs.chocolate-doom2xx}/bin/chocolate-doom -iwad ${doomWad}
|
||||
# '';
|
||||
# lockCmd = "swaylock-plugin --command-each '${pkgs.windowtolayer}/bin/windowtolayer -- alacritty -e ${doomNcurses}'";
|
||||
|
||||
doomsaver = pkgs.runCommand "doomsaver" {
|
||||
inherit (pkgs) windowtolayer;
|
||||
chocoDoom = pkgs.chocolate-doom2xx;
|
||||
python = pkgs.python3.withPackages (ps: [ ps.filelock ]);
|
||||
inherit doomWad;
|
||||
} ''
|
||||
mkdir -p "$out"/bin
|
||||
substituteAll ${./screensaver.py} "$out"/bin/doomsaver
|
||||
chmod +x "$out"/bin/doomsaver
|
||||
'';
|
||||
lockCmd = "swaylock-plugin --command-each '${pkgs.windowtolayer}/bin/windowtolayer -- alacritty -e ${doomNcurses}'";
|
||||
in
|
||||
{
|
||||
options.my.gui = {
|
||||
@@ -46,6 +57,7 @@ in
|
||||
zls # zig language server
|
||||
rust-analyzer
|
||||
neofetch
|
||||
doomsaver
|
||||
];
|
||||
};
|
||||
|
||||
@@ -198,7 +210,7 @@ in
|
||||
in
|
||||
lib.mkOptionDefault {
|
||||
"${mod}+d" = null;
|
||||
"${mod}+l" = "exec ${lockCmd}";
|
||||
"${mod}+l" = "exec ${doomsaver}/bin/doomsaver";
|
||||
"${mod}+x" = "exec ${cfg.menu}";
|
||||
"${mod}+Shift+x" = "exec rofi -show drun";
|
||||
"${mod}+q" = "kill";
|
||||
|
Reference in New Issue
Block a user