You are not logged in.
Pages: 1
Anybody get these to work? I've been trying to work on one that will display background images and select one upon choosing it, but I can't for the life of me get anything to work. Here's a script I've been messing around trying to get to work if anyone wants to take a look:
#!/usr/bin/env python
import os
#program = os.popen('feh --bg-scale')
dir = os.listdir('/home/brad/Backgrounds')
dir2 = '/home/brad/Backgrounds/'
print '<openbox_pipe_menu>'
print " <item label="planexpress.jpg""
#print '<item label="BG">'
#for x in dir:
# print " <item label=""+ x + "">"
# print " </item>"
#program = x
# x =
# program = os.popen('feh --bg-scale "%s%s"' % (dir2,x))
#str(program)
# program = 'feh --bg-scale %s%s' % (dir2,x)
print ' <action name="Execute"><execute>feh --bg-scale /home/brad/Backgrounds/planexpress.jpg</execute></action>'# % (program)
print ' </item>'
print '</openbox_pipe_menu>'
I know this script obviously won't work, but I'm just trying to get something to show up on the OB menu
Offline
Anyway, here's a script that as far as I can figure should work, but doesn't. If anyone has any ideas that'd be great:
#!/usr/bin/env python
import os
import sys
def main():
dir2 = '/home/brad/Backgrounds/'
dir = os.listdir('/home/brad/Backgrounds')
for x in dir:
print " <item label=""+ x + "">"
print ' <action name="Execute">'
print ' <execute>feh --bg-scale '+dir2+ x+'</execute>'
print ' </action>'
print ' </item>'
# print '<seperator />'
print '<openbox_pipe_menu>'
main()
print '</openbox_pipe_menu>'
Offline
Pages: 1