aboutsummaryrefslogtreecommitdiffhomepage
path: root/X11/show_timer.sh
blob: 6ff405a0acbd559315b61cd38cf190d098edc2ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#! /bin/sh

export origin=`xdotool getactivewindow`; \

# If timer is set, focus to it
xdotool search --name "TIMER" windowactivate && exit 0

# Add new window for a timer
# Use SIGINT
alacritty --title TIMER --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 sh -c '~/helper/bin/unix/timer.sh SIGINT "xdotool windowactivate $origin"'