From 62a689a181ae9f67206436705e947cbfe3d2ec7a Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Mon, 13 Mar 2023 18:25:05 +0800 Subject: Update --- X11/openbox/rc.xml | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'X11') diff --git a/X11/openbox/rc.xml b/X11/openbox/rc.xml index 1a78d45..3ac0b81 100644 --- a/X11/openbox/rc.xml +++ b/X11/openbox/rc.xml @@ -574,11 +574,15 @@ - alacritty --title Mutt - --working-directory=/home/pham/Downloads - -o "window.dimensions.lines=32" - -o "window.dimensions.columns=110" - -e mutt + + sh -c ' + xdotool search --name "Mutt" windowactivate || \ + alacritty --title Mutt --class "CONFIRM_BEFORE_CLOSE" \ + --working-directory=/home/pham/Downloads \ + -o "window.dimensions.lines=32" \ + -o "window.dimensions.columns=110" \ + -e mutt + ' @@ -716,7 +720,17 @@ - ~/helper/X11/ask_before_close.sh + + sh -c ' + current_window=$(xdotool getwindowfocus); + + if [ $(xdotool getwindowclassname $current_window) = CONFIRM_BEFORE_CLOSE ]; then + zenity --question --text "Are you sure you want to close this window?" || exit 1; + fi + + xdotool windowkill $current_window; + ' + @@ -1135,5 +1149,3 @@ --> - -- cgit v1.2.3-70-g09d2