aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2023-03-13 18:25:05 +0800
committerHsieh Chin Fan <pham@topo.tw>2023-03-13 18:25:05 +0800
commit62a689a181ae9f67206436705e947cbfe3d2ec7a (patch)
tree72e6b30db9e231e0dadecf945ddc0ebccbe64738
parent3b396b67111ecf963716d70ac5ee93a1522fef5e (diff)
Update
-rw-r--r--X11/openbox/rc.xml28
1 files changed, 20 insertions, 8 deletions
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 @@
574 </keybind> 574 </keybind>
575 <keybind key="W-m"> 575 <keybind key="W-m">
576 <action name="Execute"> 576 <action name="Execute">
577 <command>alacritty --title Mutt 577 <command>
578 --working-directory=/home/pham/Downloads 578 sh -c '
579 -o "window.dimensions.lines=32" 579 xdotool search --name "Mutt" windowactivate || \
580 -o "window.dimensions.columns=110" 580 alacritty --title Mutt --class "CONFIRM_BEFORE_CLOSE" \
581 -e mutt 581 --working-directory=/home/pham/Downloads \
582 -o "window.dimensions.lines=32" \
583 -o "window.dimensions.columns=110" \
584 -e mutt
585 '
582 </command> 586 </command>
583 </action> 587 </action>
584 </keybind> 588 </keybind>
@@ -716,7 +720,17 @@
716 </keybind> 720 </keybind>
717 <keybind key="A-q"> 721 <keybind key="A-q">
718 <action name="Execute"> 722 <action name="Execute">
719 <command>~/helper/X11/ask_before_close.sh</command> 723 <command>
724 sh -c '
725 current_window=$(xdotool getwindowfocus);
726
727 if [ $(xdotool getwindowclassname $current_window) = CONFIRM_BEFORE_CLOSE ]; then
728 zenity --question --text "Are you sure you want to close this window?" || exit 1;
729 fi
730
731 xdotool windowkill $current_window;
732 '
733 </command>
720 </action> 734 </action>
721 </keybind> 735 </keybind>
722 <keybind key="A-w"> 736 <keybind key="A-w">
@@ -1135,5 +1149,3 @@
1135--> 1149-->
1136 </applications> 1150 </applications>
1137</openbox_config> 1151</openbox_config>
1138<!-- vim:sw=2
1139-->