fish: Add helper to generate dot graph

This commit is contained in:
Sanchayan Maity 2021-08-11 17:39:47 +05:30
parent 6af6dfa93a
commit 6f13255bdd

View file

@ -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