Skip to content

Instantly share code, notes, and snippets.

@blueyed
Created March 7, 2014 02:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blueyed/9404008 to your computer and use it in GitHub Desktop.
Save blueyed/9404008 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Experimental: rename a AwesomeWM tag, using Zenity for UI.
#
# Should be easier.
# Query current tag name
cur=$(echo 'return require("awful").tag.selected().name' | awesome-client | sed -nE 's/.*?"(.*)"$/\1/p')
echo "cur: $cur"
# Ask for the new name
new=$(zenity --entry --text="New tag name" --entry-text=$cur | sed "s/'/\\\'/g")
echo "new (escaped): $new"
# Set the new name.
echo "require('awful').tag.selected().name = '${new}'" | awesome-client
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment