dotfiles

*nix config files
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

commit 2743f1b1bcaf221989c4d6403050b4e646181182
parent 2a09bb7091781007db30cbfe7412c927c6a6131b
Author: pyratebeard <root@pyratebeard.net>
Date:   Thu, 25 Feb 2021 16:55:36 +0000

quick tool to see hidden windows and raise them

Diffstat:
Abin/bin/raise | 27+++++++++++++++++++++++++++
1 file changed, 27 insertions(+), 0 deletions(-)

diff --git a/bin/bin/raise b/bin/bin/raise @@ -0,0 +1,27 @@ +#!/bin/sh + +createmenu () +{ + arrsize=$1 + + PS3="select window to raise: " + select option in "${@:2}"; do + if [ "$REPLY" -eq "$arrsize" ]; + then + echo "bye..." + break; + elif [ 1 -le "$REPLY" ] && [ "$REPLY" -le $((arrsize-1)) ]; + then + $(hidden -c | grep -i ${window_list[REPLY]} | awk -F: '{print $NF}' | tr -d "'") + break; + else + echo "no window. select a number 1-$arrsize" + fi + done +} + +declare -a window_list=($(/usr/local/bin/hidden | awk '{print $1}' | tr '[:upper:]' '[:lower:]')) + +window_list+=("quit") + +createmenu "${#window_list[@]}" "${window_list[@]}"