Skip to content

Commit bb7387b

Browse files
committed
Path expand for HOME
1 parent efc109a commit bb7387b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

devdeck/controls/command_control.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
from subprocess import Popen, DEVNULL
23

34
from devdeck_core.controls.deck_control import DeckControl
@@ -7,7 +8,7 @@ class CommandControl(DeckControl):
78
def initialize(self):
89
with self.deck_context() as context:
910
with context.renderer() as r:
10-
r.image(self.settings['icon']).end()
11+
r.image(os.path.expanduser(self.settings['icon'])).end()
1112

1213
def pressed(self):
1314
Popen(self.settings['command'], stdout=DEVNULL, stderr=DEVNULL)

devdeck/decks/single_page_deck_controller.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
import os
23

34
from devdeck_core.decks.deck_controller import DeckController
45
from devdeck.settings.control_settings import ControlSettings
@@ -14,7 +15,7 @@ def __init__(self, key_no, **kwargs):
1415
def initialize(self):
1516
with self.deck_context() as context:
1617
with context.renderer() as r:
17-
r.image(self.settings['icon']).end()
18+
r.image(os.path.expanduser(self.settings['icon'])).end()
1819

1920
def deck_controls(self):
2021
controls = [ControlSettings(control_settings) for control_settings in self.settings['controls']]

0 commit comments

Comments
 (0)