Skip to content

Instantly share code, notes, and snippets.

@juliangroen
Created July 17, 2020 18:50
Show Gist options
  • Save juliangroen/c1bc495006849abe229797a7234c17f8 to your computer and use it in GitHub Desktop.
Save juliangroen/c1bc495006849abe229797a7234c17f8 to your computer and use it in GitHub Desktop.
Bash script to display a centered notification with dzen2. Uses getres.sh script.
res_h=`~/.scripts/getres.sh -h`
res_v=`~/.scripts/getres.sh -v`
height=128
width=256
let "pos_x=(${res_h}/2)-(${width}/2)"
let "pos_y=(${res_v}/2)-(${height}/2)"
date +"%r %dth %B, %Y" | dzen2 -p 4 -h $height -w $width -x $pos_x -y $pos_y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment