diff options
| author | 2015-03-30 10:25:12 +0200 | |
|---|---|---|
| committer | 2015-03-30 10:25:12 +0200 | |
| commit | 8eee1c45bef74aa6094f463f9888ac653958b3dc (patch) | |
| tree | 0e2a066fd4da4afcf08f0bef348511b5c9ac48f7 /config/herbstluftwm/popup.sh | |
| parent | c7ebce541a9914d4e5a3b52e838e2ac66dd139a0 (diff) | |
| download | dotfiles-8eee1c45bef74aa6094f463f9888ac653958b3dc.tar.gz dotfiles-8eee1c45bef74aa6094f463f9888ac653958b3dc.tar.bz2 dotfiles-8eee1c45bef74aa6094f463f9888ac653958b3dc.zip | |
Moving back to stow for management
reasons: dotfiles.sh misbehaving on freebsd
Diffstat (limited to 'config/herbstluftwm/popup.sh')
| -rwxr-xr-x | config/herbstluftwm/popup.sh | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/config/herbstluftwm/popup.sh b/config/herbstluftwm/popup.sh deleted file mode 100755 index eda37f5..0000000 --- a/config/herbstluftwm/popup.sh +++ /dev/null | |||
| @@ -1,46 +0,0 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | help () { | ||
| 4 | echo -e "Usage: popup.sh [OPTIONS]" | ||
| 5 | echo -e "Spawns a popup for a certain amount of time" | ||
| 6 | echo -e "" | ||
| 7 | echo -e "Options:" | ||
| 8 | echo -e " -m MESSAGE\t\tSpecifies message to be displayed" | ||
| 9 | echo -e " -t TIMEOUT\t\tAmount of time in seconds the popup is displayed" | ||
| 10 | echo -e " -u LEVEL\t\tUrgency level (info or high)" | ||
| 11 | } | ||
| 12 | |||
| 13 | dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | ||
| 14 | source "$dir/theme.sh" | ||
| 15 | |||
| 16 | timeout=10 | ||
| 17 | message="" | ||
| 18 | urgency="info" | ||
| 19 | |||
| 20 | while getopts ":m:t:x:y:w:h:u:" opt; do | ||
| 21 | case $opt in | ||
| 22 | m) message=$OPTARG ;; | ||
| 23 | t) timeout=$OPTARG ;; | ||
| 24 | u) urgency=$OPTARG ;; | ||
| 25 | esac | ||
| 26 | done | ||
| 27 | |||
| 28 | if test ! $message; then | ||
| 29 | help | ||
| 30 | else | ||
| 31 | |||
| 32 | bar_opts="-f $font,$font_sec -B $acolor_bg -F $acolor_fg -g ${popup_width}x${height}+${popup_x}+${popup_y} -u 2" | ||
| 33 | |||
| 34 | t=$(date +%T) | ||
| 35 | |||
| 36 | if [ $urgency == "info" ]; then | ||
| 37 | prefix="Info:" | ||
| 38 | elif [ $urgency == "high" ]; then | ||
| 39 | prefix="!!WARNING:" | ||
| 40 | fi | ||
| 41 | |||
| 42 | { | ||
| 43 | echo "%{F$acolor_accent} $prefix %{F$acolor_fg}$message %{F$acolor_fg}($t)%{F-}" | ||
| 44 | sleep $timeout | ||
| 45 | } | bar $bar_opts | ||
| 46 | fi | ||
