summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-10-26 13:18:11 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-10-26 13:18:11 +0200
commit0e5e622952fe51588f1537e621c63cbe4a91c136 (patch)
tree33340f5d0b790115b5c34558b815e9d00f42a15b /bin
parent4be9d55ad63853dd1562ab4f0537b0b403aa9ca5 (diff)
checkpoint
Diffstat (limited to 'bin')
-rwxr-xr-xbin/extra/tmux-sessionizer20
-rwxr-xr-xbin/guiscripts/vrec2
2 files changed, 8 insertions, 14 deletions
diff --git a/bin/extra/tmux-sessionizer b/bin/extra/tmux-sessionizer
index 8b04b0b..ca9f921 100755
--- a/bin/extra/tmux-sessionizer
+++ b/bin/extra/tmux-sessionizer
@@ -4,33 +4,27 @@ if [ $# -eq 1 ]; then
selected="$1"
else
pfx="$HOME/proj"
- d="$(find "$pfx" -mindepth 1 -maxdepth 1 -type d | sed "s@$pfx/@@" | fzf)"
- { [ "$d" ] && [ -d "$pfx/$d" ]; } || exit 1
- selected="${d##*/}"
+ selected="$(find "$pfx" -mindepth 1 -maxdepth 1 -type d | sed "s@$pfx/@@" | fzf)"
+ { [ "$selected" ] && [ -d "$pfx/$selected" ]; } || exit 1
fi
->&2 printf 'selected: %s\n' "$selected"
if [ -z "$selected" ]; then
exit 0
fi
-selected_name="$(basename "$selected" | tr '.' '_')"
tmux_running="$(pgrep "tmux" | head -n1)"
->&2 printf 'tmux_running: "%s"\n' "$tmux_running"
->&2 printf 'selected_name: %s\n' "$selected_name"
-
if [ -z $TMUX ] && [ -z "$tmux_running" ]; then
- tmux new-session -s "$selected_name" -c "$selected"
+ tmux new-session -s "$selected" -c "$pfx"/"$selected"
exit 0
fi
-if ! tmux has-session -t="$selected_name" 2> /dev/null; then
- tmux new-session -ds "$selected_name" -c "$selected"
+if ! tmux has-session -t="$selected" 2> /dev/null; then
+ tmux new-session -ds "$selected" -c "$pfx"/"$selected"
fi
if [ -z $TMUX ]; then
- tmux attach -t "$selected_name"
+ tmux attach -t "$selected"
else
- tmux switch-client -t "$selected_name"
+ tmux switch-client -t "$selected"
fi
diff --git a/bin/guiscripts/vrec b/bin/guiscripts/vrec
index f01a5c7..a383f33 100755
--- a/bin/guiscripts/vrec
+++ b/bin/guiscripts/vrec
@@ -29,7 +29,7 @@ record_cmd()
touch "$lock"
fi
- herbe "started recording." &
+ herbe "started recording." # use notification to know when recording started
w=$(($3 + $3 % 2))
h=$(($4 + $4 % 2))
ffmpeg $audio \