I am trying to make a simple graphical Zenity+Bash script that will list all the icon themes available in /usr/share/icons, then let the user select one and click "OK" to replace gtk-icon-theme-name="Humanity" in ~/.gtkrc-2.0.mine to say the theme name they chose instead of Humanity. I am doing this to provide a graphical method of choosing your icon theme under Openbox, since there is no mainstream program for that yet.
This is what I have so far:
#!/bin/bash
ICONS=$(ls -I "*.*" /usr/share/icons); SELECTED=$(zenity --list --column=/usr/share/icons \ $ICONS); echo 'gtk-icon-theme-name="$SELECTED"' >~/.gtkrc-2.0.mine
It works, except that echo will actually write $SELECTED in the text file, instead of taking the argument and replacing it with the user's choice.
Thank you in advance to anyone who can help me learn to do this and Zenity basics.