From 14a892e627a375334a02381351f139d94ad7ecf3 Mon Sep 17 00:00:00 2001 From: ダカマ Date: Mon, 2 Jun 2025 13:08:46 +0200 Subject: First dump --- scriptlets/thunar_batch_opener.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 scriptlets/thunar_batch_opener.sh (limited to 'scriptlets/thunar_batch_opener.sh') diff --git a/scriptlets/thunar_batch_opener.sh b/scriptlets/thunar_batch_opener.sh new file mode 100755 index 0000000..04fe54d --- /dev/null +++ b/scriptlets/thunar_batch_opener.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +browser="thunar" +winfile="$HOME/stuf/windows.txt" +mapfile -t < "$winfile" + +SAVEIFS=$IFS + +FLAG=0 +IFS=$'\n' +while IFS= read -r tab +do + + [[ -z "$tab" ]] && FLAG=1 && continue + + if [[ $FLAG -eq 1 ]]; then + FLAG=0 + xfconf-query -c thunar -p /misc-open-new-window-as-tab -s false + else + xfconf-query -c thunar -p /misc-open-new-window-as-tab -s true + fi + "$browser" "$( sed -r "s|\\\$HOME|$HOME|g" <<< "$tab" )" + sleep 0.5 + FLAG=0 +done < "$winfile" +IFS=$SAVEIFS +xfconf-query -c thunar -p /misc-open-new-window-as-tab -s true -- cgit v1.2.3