diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2023-03-20 21:46:49 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2023-03-20 21:47:08 +0800 |
commit | a5e1492da2997072eda4aa53e4acb5d2c287426d (patch) | |
tree | 5a0687412ab94fa86cc3f02db555fb449c1868d6 /X11 | |
parent | cccc6479e509d20f082671743fa7baf2b89d029c (diff) |
Improve timer.sh
- Change window focus to previous after timer is set
- Orignal variable "DISPLAY" was a mistake, it is necessary for xdotool
(value is :0 in most of the cased)
Diffstat (limited to 'X11')
-rw-r--r-- | X11/openbox/rc.xml | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/X11/openbox/rc.xml b/X11/openbox/rc.xml index e7736f8..d7c0345 100644 --- a/X11/openbox/rc.xml +++ b/X11/openbox/rc.xml | |||
@@ -499,15 +499,17 @@ | |||
499 | <action name="Execute"> | 499 | <action name="Execute"> |
500 | <command> | 500 | <command> |
501 | sh -c ' | 501 | sh -c ' |
502 | origin=`xdotool getactivewindow`; \ | ||
502 | xdotool search --name "TIMER" windowactivate || \ | 503 | xdotool search --name "TIMER" windowactivate || \ |
503 | alacritty --title TIMER --hold \ | 504 | alacritty --title TIMER --hold \ |
504 | -o "window.dimensions.columns=8" \ | 505 | -o "window.dimensions.columns=8" \ |
505 | -o "window.dimensions.lines=1" \ | 506 | -o "window.dimensions.lines=1" \ |
506 | -o "window.position.x=-0" \ | 507 | -o "window.position.x=-0" \ |
507 | -o "window.position.y=0" \ | 508 | -o "window.position.y=0" \ |
508 | -o "window.opacity=0.6" \ | 509 | -o "window.opacity=0.6" \ |
509 | -o "font.size=40" \ | 510 | -o "font.size=40" \ |
510 | -e ~/helper/bin/unix/timer.sh SIGINT | 511 | -e ~/helper/bin/unix/timer.sh SIGINT \ |
512 | "xdotool windowactivate $origin" | ||
511 | ' | 513 | ' |
512 | </command> | 514 | </command> |
513 | </action> | 515 | </action> |