summaryrefslogtreecommitdiff
path: root/dswitcher
diff options
context:
space:
mode:
Diffstat (limited to 'dswitcher')
-rwxr-xr-xdswitcher10
1 files changed, 6 insertions, 4 deletions
diff --git a/dswitcher b/dswitcher
index 00504a5..9812733 100755
--- a/dswitcher
+++ b/dswitcher
@@ -14,10 +14,12 @@ fi
num=$(wmctrl -l \
| sed 's/ / /' \
| cut -d " " -f 4- \
- | nl -w 3 -n rn \
- | sed -r 's/^([ 0-9]+)[ \t]*(.*)$/\1 - \2/' \
+ | nl --number-width=2 --number-format=rn -s "| " \
| dmenu -i -p "$date" -l $heightfit \
- | cut -d '-' -f -1
+ | cut -d '|' -f -1
)
[[ -z "$num" ]] && exit
-wmctrl -l | sed -n "$num p" | cut -c -10 | xargs wmctrl -i -a
+wmctrl -l \
+ | sed -n "$num p" \
+ | cut -c -10 \
+ | xargs wmctrl -i -a