Skip to content

Commit

Permalink
✏️ Remove wrong path
Browse files Browse the repository at this point in the history
✨ Now you can custom the path to the QEMU sessions file
  • Loading branch information
sergius02 committed Dec 5, 2020
1 parent 316e27e commit 56555e3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import logging
import re
from datetime import datetime
from os.path import expanduser

from ulauncher.api.client.EventListener import EventListener
from ulauncher.api.client.Extension import Extension
Expand Down Expand Up @@ -40,7 +41,8 @@ def searchBoxes(self, search_str):
pattern = re.compile(re.escape("[") + "display")

config_lines = []
with open("/home/sergio/.config/gnome-boxes/sources/QEMU Session") as boxesFile:
qemu_path = self.preferences.get("gbox_sessions_path")
with open(expanduser(qemu_path)) as boxesFile:
config_lines = boxesFile.readlines()

config_blocks = []
Expand Down
7 changes: 7 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
"type": "keyword",
"name": "GBox",
"default_value": "box"
},
{
"id": "gbox_sessions_path",
"type": "input",
"name": "QEMU Sessions",
"description": "The path to the QEMU Sessions",
"default_value": "~/.config/gnome-boxes/sources/QEMU Session"
}
]
}

0 comments on commit 56555e3

Please sign in to comment.