zsh: attempt to fix fzf-tab

This commit is contained in:
Rouven Seifert 2024-04-11 11:58:00 +02:00
parent 2297f6506d
commit 1474c79742
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
2 changed files with 17 additions and 6 deletions

View file

@ -47,6 +47,17 @@ in
withHiredis = false; withHiredis = false;
}; };
zsh-fzf-tab = prev.zsh-fzf-tab.overrideAttrs (_: rec {
version = "1.1.1";
src = fetchFromGitHub {
owner = "Aloxaf";
repo = "fzf-tab";
rev = "v${version}";
sha256 = "sha256-0/YOL1/G2SWncbLNaclSYUz7VyfWu+OB8TYJYm4NYkM=";
};
});
gnome-break-timer = callPackage ../pkgs/gnome-break-timer { }; gnome-break-timer = callPackage ../pkgs/gnome-break-timer { };
jmri = callPackage ../pkgs/jmri { }; jmri = callPackage ../pkgs/jmri { };
adguardian-term = callPackage ../pkgs/adguardian-term { }; adguardian-term = callPackage ../pkgs/adguardian-term { };

View file

@ -3,7 +3,6 @@
programs.command-not-found.enable = false; programs.command-not-found.enable = false;
programs.nix-index-database.comma.enable = true; programs.nix-index-database.comma.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# fzf
bat bat
eza eza
duf duf
@ -12,6 +11,7 @@
iperf iperf
]; ];
users.defaultUserShell = pkgs.zsh; users.defaultUserShell = pkgs.zsh;
programs.fzf.enable = true;
programs.zsh = { programs.zsh = {
enable = true; enable = true;
shellAliases = { shellAliases = {
@ -49,7 +49,7 @@
function svpn() { function svpn() {
unit=$(systemctl list-unit-files | grep "openconnect\|wg-quick\|wireguard\|openvpn\|openfortivpn" | cut -d "." -f1 | fzf --preview 'systemctl status {}') unit=$(systemctl list-unit-files | grep "openconnect\|wg-quick\|wireguard\|openvpn\|openfortivpn" | cut -d "." -f1 | ${pkgs.fzf}/bin/fzf --preview 'systemctl status {}')
if [ $(systemctl is-active $unit) = "inactive" ]; then if [ $(systemctl is-active $unit) = "inactive" ]; then
systemctl start $unit systemctl start $unit
else else
@ -85,10 +85,10 @@
''; '';
promptInit = promptInit =
'' ''
if [[ "$(hostname)" == "thinkpad" ]] # if [[ "$(hostname)" == "thinkpad" ]]
then # then
cat ${../images/cat.sixel} # cat ${../images/cat.sixel}
fi # fi
eval "$(${pkgs.mcfly}/bin/mcfly init zsh)" eval "$(${pkgs.mcfly}/bin/mcfly init zsh)"
eval "$(${pkgs.zoxide}/bin/zoxide init zsh)" eval "$(${pkgs.zoxide}/bin/zoxide init zsh)"
''; '';