From 6f13255bddb149f5130f9088b5d2248275021ae8 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Wed, 11 Aug 2021 17:39:47 +0530 Subject: [PATCH] fish: Add helper to generate dot graph --- fish/.config/fish/config.fish | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish index 4ee87f5..769b8e7 100644 --- a/fish/.config/fish/config.fish +++ b/fish/.config/fish/config.fish @@ -322,6 +322,23 @@ function vo --description "Pipe a command output to neovim" $argv | nvim -R end +function dotp --description "Generate Pipewire dot graph for linked nodes" + pw-dot -L -s -o /tmp/pw.dot + dot -Tsvg /tmp/pw.dot > ~/Pictures/pipewire/pw-dot-(date +%T).svg + rm /tmp/pw.dot +end + +function dotP --description "Generate Pipewire dot graph for all nodes" + pw-dot -L -a -o /tmp/pw.dot + dot -Tsvg /tmp/pw.dot > ~/Pictures/pipewire/pw-dot-(date +%T).svg + rm /tmp/pw.dot +end + +function dotg --description "Generate gstreamer dot graph for selected file" + find $argv -maxdepth 1 -regextype posix-extended -regex ".*\.(dot)" | fzf | read -l result; and dot -Tsvg "$result" -O + mv "$result".svg ~/Pictures/gstreamer +end + fzf_key_bindings starship init fish | source