Last active
September 18, 2022 10:17
-
-
Save tyjak/4c6b8326117e9aad86300bc67b8429db to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# simple timer for i3 | |
# depend on monitor_width and timer | |
# GistID: 4c6b8326117e9aad86300bc67b8429db | |
CMD="sh -c 'timer "$1"; echo -n "$1" time elapsed !'" | |
t_width=$(($(monitor_width)/2)) | |
t_height=50 #TODO calculate minimal height with height line, font size to adpat any screen resolution | |
p_v=$(($(monitor_height)-$t_height-2)) | |
p_h=$(($(monitor_width)/2-${t_width}/2)) | |
echo $p_v | |
echo $p_h | |
popup -p ${p_v}x${p_h} -f -s ${t_width}x${t_height} $CMD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment