video: moved screen key script to video module

feature/hass
Ingolf Wagner 2020-03-28 17:04:00 +08:00
parent a676e87011
commit e6ffb1542c
Signed by: palo
GPG Key ID: 76BF5F1928B9618B
2 changed files with 21 additions and 21 deletions

View File

@ -6,6 +6,26 @@ let
cfg = config.programs.custom.video;
# show keyboard input on desktop for screencasts
screenKey = pkgs.symlinkJoin {
name = "screen-keys";
paths = let
screenKeyScript = { position ? "bottom", size ? "small", ... }:
pkgs.writeShellScriptBin "screenkeys-${position}-${size}" # sh
''
${pkgs.screenkey}/bin/screenkey \
--no-detach \
--bg-color '#fdf6e3' \
--font-color '#073642' \
-p ${position} \
-s ${size} \
"$@"
'';
in lib.flatten (lib.flip map [ "large" "small" "medium" ] (size:
lib.flip map [ "top" "center" "bottom" ]
(position: screenKeyScript { inherit size position; })));
};
in {
options.programs.custom.video.enable = mkEnableOption "enable video tools";
@ -19,7 +39,7 @@ in {
# to record your screen
# ---------------------
simplescreenrecorder
# todo : the tool to show the keys pressing
screenKey
# to transcode video material
# ---------------------------

View File

@ -44,25 +44,6 @@ let
"$@"
'';
# show keyboard input on desktop for screencasts
screenKey = pkgs.symlinkJoin {
name = "screen-keys";
paths = let
screenKeyScript = { position ? "bottom", size ? "small", ... }:
pkgs.writeShellScriptBin "screenkeys-${position}-${size}" # sh
''
${pkgs.screenkey}/bin/screenkey \
--no-detach \
--bg-color '#fdf6e3' \
--font-color '#073642' \
-p ${position} \
-s ${size} \
"$@"
'';
in lib.flatten (lib.flip map [ "large" "small" "medium" ] (size:
lib.flip map [ "top" "center" "bottom" ]
(position: screenKeyScript { inherit size position; })));
};
connectToSpeaker = name: id:
pkgs.writeShellScriptBin "connect-to-speaker-${name}" # sh
@ -305,7 +286,6 @@ in {
(writeShellScriptBin "music-making"
(fileContents <assets/music-making.sh>))
screenKey
replaceLinks
image-generator