From 9e531f035a519001a07d253bb0d7de0d14b8cfeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Wed, 26 Apr 2023 09:01:44 +0200 Subject: [PATCH 1/4] fix(desktop): move synology-drive-client --- modules/profiles/desktop.nix | 1 - modules/profiles/personal.nix | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix index ef5a639..855c581 100644 --- a/modules/profiles/desktop.nix +++ b/modules/profiles/desktop.nix @@ -48,7 +48,6 @@ with lib; { pavucontrol stable.libreoffice # HACK to fix build error stable.signal-desktop - synology-drive-client texlive.combined.scheme-full thunderbird vlc diff --git a/modules/profiles/personal.nix b/modules/profiles/personal.nix index 6bf7167..80bb527 100644 --- a/modules/profiles/personal.nix +++ b/modules/profiles/personal.nix @@ -57,4 +57,8 @@ with lib; }; }; }; + + environment.systemPackages = with pkgs; [ + synology-drive-client + ]; } From 35c5d5ed4b146e63db8b69459cd7be2ddd62fee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Wed, 26 Apr 2023 10:57:43 +0200 Subject: [PATCH 2/4] perf(tmux-sessionizer): improve fd command speed --- modules/programs/tmux.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/tmux.nix b/modules/programs/tmux.nix index ef01b1f..e6ebf98 100644 --- a/modules/programs/tmux.nix +++ b/modules/programs/tmux.nix @@ -13,7 +13,7 @@ let if [[ $# -eq 1 ]]; then selected=$1 else - selected=$(fd -gH '.git' ~/ --min-depth 1 --max-depth 5 --type d --prune --exec dirname {} | fzf) + selected=$(fd -HIg '.git' ~/ --min-depth 1 --max-depth 5 --type d --prune --exec dirname {} | fzf) fi if [[ -z $selected ]]; then From 0b7e18a3f599ff8e5dc463ee2452513c5a57e091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Wed, 26 Apr 2023 11:23:28 +0200 Subject: [PATCH 3/4] feat(tmux-sessionizer): fuzzy match input --- modules/programs/tmux.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/programs/tmux.nix b/modules/programs/tmux.nix index e6ebf98..7d5677c 100644 --- a/modules/programs/tmux.nix +++ b/modules/programs/tmux.nix @@ -9,11 +9,15 @@ let runtimeInputs = with pkgs; [ tmux findutils coreutils procps fd ]; text = '' #!/usr/bin/env bash + + options=$(fd -HIg '.git' ~/ --min-depth 1 --max-depth 5 --type d --prune --exec dirname {} | fzf --filter "''$*") - if [[ $# -eq 1 ]]; then - selected=$1 + if [[ -z $options ]]; then + return 1 + elif [[ $(wc -l <<< "$options") -eq 1 ]]; then + selected="$options" else - selected=$(fd -HIg '.git' ~/ --min-depth 1 --max-depth 5 --type d --prune --exec dirname {} | fzf) + echo "$options" | fzf --query="$*" fi if [[ -z $selected ]]; then From 202f7e4558b3d5adfa7be1f7e7cb3c274c3ed1e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Wed, 26 Apr 2023 11:43:34 +0200 Subject: [PATCH 4/4] fix(tmux-sessionizer): unbound variable bug --- modules/programs/tmux.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/programs/tmux.nix b/modules/programs/tmux.nix index 7d5677c..aba543a 100644 --- a/modules/programs/tmux.nix +++ b/modules/programs/tmux.nix @@ -13,15 +13,15 @@ let options=$(fd -HIg '.git' ~/ --min-depth 1 --max-depth 5 --type d --prune --exec dirname {} | fzf --filter "''$*") if [[ -z $options ]]; then - return 1 + exit 1 elif [[ $(wc -l <<< "$options") -eq 1 ]]; then selected="$options" else - echo "$options" | fzf --query="$*" + selected=$(echo "$options" | fzf --query="$*") fi if [[ -z $selected ]]; then - exit 0 + exit 0 fi selected_name=$(basename "$selected" | tr . _)