Skip to content

Commit

Permalink
Fixed magick for Debian
Browse files Browse the repository at this point in the history
  • Loading branch information
Faugus authored Dec 13, 2024
1 parent 4d29325 commit a68a9fc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions faugus-launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
xdg_data_dirs = os.getenv('XDG_DATA_DIRS', '/usr/local/share:/usr/share')
data_dirs = xdg_data_dirs.split(':')
share_dir_system = data_dirs[-1]
faugus_banner = f'{share_dir_system}/faugus-launcher/faugus-banner.png'
faugus_banner = '/usr/share/faugus-launcher/faugus-banner.png'

config_dir = os.getenv('XDG_CONFIG_HOME', os.path.expanduser('~/.config'))
faugus_launcher_dir = f'{config_dir}/faugus-launcher'
Expand Down Expand Up @@ -1419,8 +1419,9 @@ def on_dialog_response(self, dialog, response_id, add_game_dialog):
temp_banner_path = add_game_dialog.banner_path_temp
try:
# Use `magick` to resize the image
command_magick = shutil.which("magick") or shutil.which("convert")
subprocess.run([
"magick",
command_magick,
temp_banner_path,
"-resize", "230x345!",
banner
Expand Down Expand Up @@ -1765,8 +1766,9 @@ def on_edit_dialog_response(self, dialog, response_id, edit_game_dialog, game):
temp_banner_path = edit_game_dialog.banner_path_temp
try:
# Use `magick` to resize the image
command_magick = shutil.which("magick") or shutil.which("convert")
subprocess.run([
"magick",
command_magick,
temp_banner_path,
"-resize", "230x345!",
banner
Expand Down

0 comments on commit a68a9fc

Please sign in to comment.