diff --git a/README.md b/README.md index 71fe2c2..a25c828 100755 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ config here](https://github.com/Frost-Phoenix/nixos-config/tree/catppuccin) ![desktop-neofetch](./assets/screens/desktop-neofetch.png) ![busy-desktop](./assets/screens/desktop-busy.png) -Screenshots up to date as of [this commit](https://github.com/pagedMov/nixos-config/commit/0bb0b6ce81a4b214158b5fb4bb0da7105f8d9a17) +Screenshots up to date as of [this commit](https://github.com/pagedMov/nixos-config/commit/50decf03c9d1a7792d5ea0056eb51f6a400654f0) ## Programs diff --git a/assets/screens/desktop-busy.png b/assets/screens/desktop-busy.png index 6cc73d3..9d5f023 100755 Binary files a/assets/screens/desktop-busy.png and b/assets/screens/desktop-busy.png differ diff --git a/assets/screens/desktop-neofetch.png b/assets/screens/desktop-neofetch.png index eb939dc..e8801fd 100755 Binary files a/assets/screens/desktop-neofetch.png and b/assets/screens/desktop-neofetch.png differ diff --git a/modules/home/scripts/commands/viconf.nix b/modules/home/scripts/commands/viconf.nix index 92b9858..c1bd8a9 100755 --- a/modules/home/scripts/commands/viconf.nix +++ b/modules/home/scripts/commands/viconf.nix @@ -23,9 +23,23 @@ pkgs.writeShellApplication { results=$(echo "$results" | cut -d'/' -f4-) results=$(echo "$results" | grep "$1") - echo "$results" | tr ' ' '\n' | fzf | xargs -I {} nvim "$results_prefix"/{} + file=$(echo "$results" | tr ' ' '\n' | fzf) + file="$results_prefix/$file" + + # Check if the file contains any non-UTF-8 characters + if grep --color='auto' -P -q "[^\x00-\x7F]" "$file"; then + NIXD_FLAGS="--semantic-tokens=false" nvim "$results_prefix"/"$file" + else + nvim "$file" + fi + else - nvim "$results" + # Check if the file contains any non-UTF-8 characters + if grep --color='auto' -P -q "[^\x00-\x7F]" "$results"; then + NIXD_FLAGS="--semantic-tokens=false" nvim "$results" + else + nvim "$results" + fi fi ''; }