From fdd98ab4a3c75f9351ced33ad494df3694309dc1 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Wed, 15 Mar 2023 12:15:16 +0800 Subject: Use @ as prefix to prevent window got killed --- X11/openbox/rc.xml | 70 +++++++++++++++++++++----------------------- X11/rename_current_window.sh | 2 +- 2 files changed, 34 insertions(+), 38 deletions(-) diff --git a/X11/openbox/rc.xml b/X11/openbox/rc.xml index abdff1e..f1315bc 100644 --- a/X11/openbox/rc.xml +++ b/X11/openbox/rc.xml @@ -522,30 +522,17 @@ - + - alacritty --title COUNTDOWN --hold - -o "window.dimensions.columns=8" - -o "window.dimensions.lines=1" - -o "window.position.x=-0" - -o "window.position.y=0" - -o "window.opacity=0.6" - -o "font.size=40" - -e ~/helper/bin/unix/countdown.sh + sh -c ' + id=`xdotool getactivewindow`; + name=`xdotool getwindowname $id` ; + xdotool set_window --name ${name##@} $id + ' - - - - COUNTDOWN - - - - - - thunar ~/Downloads @@ -572,12 +559,19 @@ alacritty --title MPD -e ncmpcpp + + + + alacritty --title YOO --class "CONFIRM_BEFORE_CLOSE" + + + sh -c ' - xdotool search --name "Mutt" windowactivate || \ - alacritty --title Mutt --class "CONFIRM_BEFORE_CLOSE" \ + xdotool search --name "@Mutt" windowactivate || \ + alacritty --title @Mutt \ --working-directory=/home/pham/Downloads \ -o "window.dimensions.lines=32" \ -o "window.dimensions.columns=110" \ @@ -586,15 +580,6 @@ - - - alacritty --title Mutt - -o "window.dimensions.lines=32" - -o "window.dimensions.columns=110" - -e mutt -F ~/helper/mutt/muttrc.gmail - - - ~/.config/openbox/rofi/bin/powermenu @@ -719,24 +704,35 @@ + + + ^@ + + + + + + + + + + diff --git a/X11/rename_current_window.sh b/X11/rename_current_window.sh index d686ba4..59caa26 100755 --- a/X11/rename_current_window.sh +++ b/X11/rename_current_window.sh @@ -1,3 +1,3 @@ #! /bin/sh -xdotool set_window --name "$1" --class CONFIRM_BEFORE_CLOSE "$(xdotool getactivewindow)" +xdotool set_window --name "@${1##@}" "$(xdotool getactivewindow)" -- cgit v1.2.3-70-g09d2