From 62a6893709f7d90c841900c13a217f1836590cc1 Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 19 Jun 2024 21:17:47 +0200 Subject: [PATCH] fix: clone script --- flake.nix | 1 + nix/devshell.nix | 2 +- pkgs/scripts/clone-term.nix | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 4b1fd35..07965ef 100644 --- a/flake.nix +++ b/flake.nix @@ -164,6 +164,7 @@ inherit system; config.allowUnfree = true; }; + packages = pkgs; topology = import nix-topology { inherit pkgs; diff --git a/nix/devshell.nix b/nix/devshell.nix index 1ce4022..93e4db1 100644 --- a/nix/devshell.nix +++ b/nix/devshell.nix @@ -23,7 +23,7 @@ in rage nix nix-diff - nixpkgs-update + nix-update ]; commands = [ { diff --git a/pkgs/scripts/clone-term.nix b/pkgs/scripts/clone-term.nix index 79e623a..8709801 100644 --- a/pkgs/scripts/clone-term.nix +++ b/pkgs/scripts/clone-term.nix @@ -10,7 +10,7 @@ writeShellApplication { runtimeInputs = [ps procps xdotool jq]; text = '' - if [[ $XDG_CURRENT_DESKTOP == sway ]]; then + if [[ ''${XDG_CURRENT_DESKTOP-} == sway ]]; then PAREN=$(swaymsg -t get_tree | jq '.. | select(.type?) | select(.focused==true).pid') else PAREN=$(xdotool getwindowfocus getwindowpid)