diff --git a/modules/programs/video.nix b/modules/programs/video.nix index 82eeadf..6409831 100644 --- a/modules/programs/video.nix +++ b/modules/programs/video.nix @@ -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 # --------------------------- diff --git a/system/desktop/packages.nix b/system/desktop/packages.nix index 153a483..3bcf01c 100644 --- a/system/desktop/packages.nix +++ b/system/desktop/packages.nix @@ -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 )) - screenKey replaceLinks image-generator