From 272b158a0246e1f173394783266636e78c7cc1ef Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Thu, 24 Sep 2020 22:59:47 +0200 Subject: [PATCH] watchit hides cursor now --- .local/bin/statusbar/popupgrade | 9 --------- .local/bin/tools/watchit | 12 +++++++++++- 2 files changed, 11 insertions(+), 10 deletions(-) delete mode 100755 .local/bin/statusbar/popupgrade diff --git a/.local/bin/statusbar/popupgrade b/.local/bin/statusbar/popupgrade deleted file mode 100755 index d1f2c33..0000000 --- a/.local/bin/statusbar/popupgrade +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -printf "Beginning upgrade.\\n" - -yay -Qyu -pkill -RTMIN+8 i3blocks - -printf "\\nUpgrade complete.\\nPress to exit window.\\n\\n" -read -r diff --git a/.local/bin/tools/watchit b/.local/bin/tools/watchit index 51aa9c5..8a1d895 100755 --- a/.local/bin/tools/watchit +++ b/.local/bin/tools/watchit @@ -1,8 +1,17 @@ -#!/bin/sh +#!/bin/bash HOME=$(tput cup 0 0) ED=$(tput ed) EL=$(tput el) printf '%s%s' "$HOME" "$ED" + +cleanup(){ + tput cnorm + exit +} +trap cleanup INT + + +tput civis while true do ROWS=$(tput lines) @@ -14,3 +23,4 @@ do printf '%s%s' "$ED" "$HOME" sleep 0.2 done +tput cnorm