Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
Made -d accept colon seperated list
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonesad-ETSU committed Mar 27, 2021
1 parent 79f0894 commit 5339005
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sgtk_menu/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def main():
global build_from_file
parser = argparse.ArgumentParser(description="Application grid for sgtk-menu")

parser.add_argument('-d',type=str, default="", help="use alternate folder for .Desktop files (default behavior searches through $PATH")
parser.add_argument('-d',type=str, default="", help="use alternate folder list (: delimited) for .Desktop files")
parser.add_argument('-c', type=int, default=6, help="number of grid columns (default: 6)")
parser.add_argument('-t', type=int, default=30, help="top margin width in px (default: 30)")
parser.add_argument('-b', type=int, default=15, help="bottom margin width in px (default: 15)")
Expand Down Expand Up @@ -350,7 +350,10 @@ def list_entries():
apps = []
paths = ([os.path.join(p, 'applications') for p in data_dirs()])
if args.d != "":
paths=[args.d]
if ":" not in args.d:
paths=[args.d]
else:
paths=args.d.split(':')
for path in paths:
if os.path.exists(path):
for f in os.listdir(path):
Expand Down

0 comments on commit 5339005

Please sign in to comment.