#!/bin/bash

# Copyright Jean-Philippe Guillemin <h1p8r10n@yandex.com>. This program is free software; you can redistribute
# it and/or modify it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or (at your option)
# any later version. Please take a look at http://www.gnu.org/copyleft/gpl.htm

cd "$1"
command="$( cat $HOME/.cache/.last-thunar-command )"
command="$(Xdialog --stdout --icon "run" --title "Execute in $1" --inputbox "Command :" 10 70 "$command" )"
if [[ "$command" != "" ]] ; then
	xfce4-terminal --hold --command="bash -c \"$command\""
	echo "$command" > $HOME/.cache/.last-thunar-command
fi



# | xargs -I % bash -c "%"	
