Created
March 7, 2014 02:33
-
-
Save blueyed/9404008 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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