From 1b2a869b25bd193f0b48533a55607693a3a56e0b Mon Sep 17 00:00:00 2001 From: Tyler Kelley Date: Sat, 10 Feb 2024 18:38:42 -0600 Subject: [PATCH] Inital testing with an install script --- config/home/packages.nix | 1 + config/scripts/zcc.nix | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 config/scripts/zcc.nix diff --git a/config/home/packages.nix b/config/home/packages.nix index 4f0950e..0966bc7 100644 --- a/config/home/packages.nix +++ b/config/home/packages.nix @@ -23,6 +23,7 @@ in { (import ./../scripts/web-search.nix { inherit pkgs; }) (import ./../scripts/rofi-launcher.nix { inherit pkgs; }) (import ./../scripts/screenshootin.nix { inherit pkgs; }) + (import ./../scripts/zcc.nix { inherit pkgs; }) ]; programs.gh.enable = true; diff --git a/config/scripts/zcc.nix b/config/scripts/zcc.nix new file mode 100644 index 0000000..a14eaa3 --- /dev/null +++ b/config/scripts/zcc.nix @@ -0,0 +1,25 @@ +{ pkgs, ... }: + +let + inherit (import ../../options.nix) flakeDir; +in +pkgs.writeShellScriptBin "zcc" '' + kdenlive=false + + # Function to toggle the boolean variable + toggle_kdenlive() { + kdenlive=$(yad --width=200 --height=100 --title="Toggle Kdenlive" \ + --text="Toggle Kdenlive" --button="Toggle:0" --button="Cancel:1" \ + --checkbox --value="$kdenlive") + + # If the user clicks "Toggle" button, update the boolean value + if [ "$?" -eq 0 ]; then + echo "Kdenlive is now set to: $kdenlive" + else + echo "Toggle canceled. Kdenlive remains set to: $kdenlive" + fi + } + + # Call the toggle function + toggle_kdenlive +''