Update
This commit is contained in:
@@ -5,11 +5,9 @@
|
||||
#- - `nerdfont-fzf` - Search for Nerd Fonts icons using fzf.
|
||||
{ pkgs, config, ... }:
|
||||
let
|
||||
homedir = config.home.homeDirectory;
|
||||
|
||||
nerdfont-fzf = pkgs.writeShellScriptBin "nerdfont-fzf" ''
|
||||
# Dependencies: jq, fzf, wl-copy, wget
|
||||
icons=$(jq -r 'to_entries[] | "\(.key):\(.value.char)"' "${homedir}/.config/nerdfont_glyphnames.json" | awk -F: '{print "\033[95m "$2" \033[0m "$1}')
|
||||
icons=$(jq -r 'to_entries[] | "\(.key):\(.value.char)"' "/home/${config.var.username}/.config/nerdfont_glyphnames.json" | awk -F: '{print "\033[95m "$2" \033[0m "$1}')
|
||||
fzf_result=$(echo "$icons" | fzf --ansi --border none | awk '{print $1}')
|
||||
if [ -z "$fzf_result" ]; then
|
||||
echo "No icon selected"
|
||||
|
||||
Reference in New Issue
Block a user