Desktop Switch Notification Linux

From Hack Sphere Labs Wiki
Revision as of 11:14, 16 January 2014 by Webdawg (talk | contribs) (Created page with "*https://bbs.archlinux.org/viewtopic.php?pid=1371631#p1371631 =script= <code> #!/bin/bash #Description: Using notify-send, pop-up the current workspace number when changing w...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

script

  1. !/bin/bash
  2. Description: Using notify-send, pop-up the current workspace number when changing workspaces
  3. Requires: xfce4-notifyd, libnotify, wmctrl

CURRENT_WORKSPACE=$(($(wmctrl -d | grep \* | cut -d' ' -f1)+1)) while true do

       sleep 1
       NEW_WORKSPACE=$(($(wmctrl -d | grep \* | cut -d' ' -f1)+1))
       if [ $CURRENT_WORKSPACE -ne $NEW_WORKSPACE ]; then
               notify-send -t 500 " workspace" "$NEW_WORKSPACE"
               CURRENT_WORKSPACE=$NEW_WORKSPACE
       fi

done exit 0