#!/bin/sh ## # USAGE: # icewm-change-workspace # - "workspace_number": integer starting from 1 up to the number # of workspaces available ## # REQUIREMENTS: # icesh - included in icewm # grep # sed ## # altblue 2000 WS=${1:-1} ICESH='icesh -window root' WSM=$(icesh -window root listWorkspaces |grep -c .) if [ $WS -gt $WSM ] ; then echo "Only $WSM workspaces available!" exit 1 fi $ICESH setWorkspace \ $($ICESH listWorkspaces |sed -n "$WS{s/^.*: .\(.\+\).\$/\1/;p;q;}")