From 3e94a3e724c36267fa2e4039e3759473c59e8510 Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Sat, 25 Oct 2014 22:26:54 +0200 Subject: Restructured dotfile repo to take advantage of GNU Stow --- .config/herbstluftwm/popup.sh | 60 ------------------------------------------- 1 file changed, 60 deletions(-) delete mode 100755 .config/herbstluftwm/popup.sh (limited to '.config/herbstluftwm/popup.sh') diff --git a/.config/herbstluftwm/popup.sh b/.config/herbstluftwm/popup.sh deleted file mode 100755 index 41c5e9c..0000000 --- a/.config/herbstluftwm/popup.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -help () { - echo -e "Usage: popup.sh [OPTIONS]" - echo -e "Spawns a popup for a certain amount of time" - echo -e "" - echo -e "Options:" - echo -e " -m MESSAGE\t\tSpecifies message to be displayed" - echo -e " -t TIMEOUT\t\tAmount of time in seconds the popup is displayed" -} - -add_alpha_channel(){ - echo "$1" | \ - sed "s/.*#\([0-9a-fA-F]*\).*/#ff\1/" -} - -timeout=10 -message="" -x=0 -y=0 -width=120 -height=90 -urgency="info" - -while getopts ":m:t:x:y:w:h:u:" opt; do - case $opt in - m) message=$OPTARG ;; - t) timeout=$OPTARG ;; - x) x=$OPTARG ;; - y) y=$OPTARG ;; - w) width=$OPTARG ;; - h) height=$OPTARG ;; - u) urgency=$OPTARG ;; - esac -done - -if test ! $message; then - help -else - light=$(add_alpha_channel $WM_LIGHT) - llight=$(add_alpha_channel $WM_LLIGHT) - accent=$(add_alpha_channel $WM_ACCENT) - ldark=$(add_alpha_channel $WM_LDARK) - dark=$(add_alpha_channel $WM_DARK) - font="-*-fixed-medium-*-*-*-$(echo "$height - 10" | bc)-*-*-*-*-*-*-*" - bar_opts="-f ${font} -B $dark -F $light -g ${width}x${height}+${x}+${y} -u 2" - - t=$(date +%T) - - if [ $urgency == "info" ]; then - prefix="Info:" - elif [ $urgency == "high" ]; then - prefix="!!WARNING:" - fi - - { - echo "%{F$accent} $prefix %{F$light}$message %{F$llight}($t)%{F-}" - sleep $timeout - } | bar $bar_opts -fi -- cgit v1.2.3