diff options
Diffstat (limited to 'bin/dskm')
| -rwxr-xr-x | bin/dskm | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/bin/dskm b/bin/dskm new file mode 100755 index 0000000..c5a0abf --- /dev/null +++ b/bin/dskm @@ -0,0 +1,26 @@ +#!/bin/bash +set -eu + +# shellcheck disable=2034 +description="desk height manager" + +export FUZL_PROMPT=dskm +export FUZL_ICON= +. libfuzl.sh + +main() { + local pos + + pos=$( + idesk config | + awk '/positions:/{ok=1; next} ok==1{print gensub(":", "", "g", $1)}' | + fuzl_menu $FUZL_MENU_FILTER + ) + test -n "$pos" || return + + fuzl_loading "moving desk to position: $pos" + idesk "$pos" + fuzl_loading_cancel +} + +main |