23Feb/100
Openbox: Nintendo 64 emu pipemenu
I wrote a small pipe-menu script for Openbox earlier today which lists all n64 Roms from a directory and creates a pipe-menu listing these files with executables. Nothing fancy but it might save others some time, or give others some insight in how easy it is to create pipe-menu's them selves. If you have any questions feel free to ask in the comment section below.
#!/usr/bin/env python # # 23 Feb 2010 # Author: Torstein S. Skulbru - serrghi # http://www.unyttig.info # # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # mupen64menu.py # This program will generate a Openbox Pipemenu to list all n64 roms in a directory # only requirement is mupen64plus. # # USAGE: # Place the script in ~/.config/openbox/scripts/ # Make the script executable by: chmod +x mupen64menu.py # Change the rom_dir to suit you # Add the following in menu.xml (.config/openbox/menu.xml) # somewhere inside but before root-menu: # # and then in the root-menu, add the menu where you want it to show up by adding the following: # import os, random rom_dir = '/home/serrghi/Documents/n64' command = "mupen64plus" def main(): files = os.listdir(rom_dir) files.sort() print "" for f in files: fullpath = os.path.join(rom_dir, f) (path, fullname) = os.path.split(fullpath) (name, ext) = os.path.splitext(fullname) action = command + " \"%s\"" % fullpath print " " % name print " %s" % action print " " print "" if __name__ == "__main__": main()
Related posts:
Tagged as: Howto, Linux, mupen64plus, openbox, pipemenu, Programming, Python
Leave a comment
Categories
- Games (4)
- General (9)
- Humor (20)
- Linux (8)
- Mobile (17)
- Movies (1)
- Network (6)
- News (5)
- Programming (23)
- School (2)
- Windows (2)
Polls
Recent Comments
- easyrhino on It works! Mkv2Vob in Linux
- giggsy on Google Code: Adding Paypal donations
- Pavel on It works! Mkv2Vob in Linux
- Torstein Skulbru on HellaDroid – How to configure
- Droid on HellaDroid – How to configure
Links
- anderns vevlogg
- Comstation.net
- Donkeh.com
- Engadget
- Gizmodo, the Gadget Guide
- HellaDroid
- Java 6 API
- Jocke: kek lol wtf?
- My Github repo
- Stub IT
- System-log
- Vakrest.com
Who's Online
5 visitors online now
1 guests, 4 bots, 0 members
Map of Visitors