fish: Make life easier by setting GST_DEBUG_DUMP_DOT_DIR globally
This commit is contained in:
parent
9fb93edb72
commit
55685b3084
2 changed files with 15 additions and 2 deletions
|
@ -63,6 +63,9 @@ function __fish_setup_on_tty_login --description "Set up environment on tty logi
|
|||
set -Ux GST_DEBUG_NO_COLOR 1
|
||||
set -Ux GST_DEBUG_COLOR_MODE "off"
|
||||
|
||||
mkdir -p /tmp/gst-dot
|
||||
set -Ux GST_DEBUG_DUMP_DOT_DIR /tmp/gst-dot
|
||||
|
||||
# Start all tmux sessions on login
|
||||
~/.tmux/session-setup.sh
|
||||
end
|
||||
|
|
|
@ -1,4 +1,14 @@
|
|||
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
|
||||
if count $argv > /dev/null
|
||||
set dotpath "$argv"
|
||||
else
|
||||
set dotpath "$GST_DEBUG_DUMP_DOT_DIR"
|
||||
end
|
||||
|
||||
find $dotpath -maxdepth 1 -regextype posix-extended -regex ".*\.(dot)" | fzf | read -l result;
|
||||
|
||||
if test -n "$result"
|
||||
dot -Tsvg "$result" -O
|
||||
mv "$result".svg ~/Pictures/gstreamer
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue