Skip to content

Commit

Permalink
style(ruff): enable Q
Browse files Browse the repository at this point in the history
  • Loading branch information
actionless committed Jan 26, 2023
1 parent 95f78ae commit fa5d340
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions oomox_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
)


OPTION_SPOTIFY_PATH = 'spotify_path'
OPTION_FONT_NAME = 'font_name'
OPTION_FONT_OPTIONS = 'font_options'
VALUE_FONT_DEFAULT = 'default'
VALUE_FONT_NORMALIZE = 'normalize'
VALUE_FONT_CUSTOM = 'custom'
OPTION_SPOTIFY_PATH = "spotify_path"
OPTION_FONT_NAME = "font_name"
OPTION_FONT_OPTIONS = "font_options"
VALUE_FONT_DEFAULT = "default"
VALUE_FONT_NORMALIZE = "normalize"
VALUE_FONT_CUSTOM = "custom"


class SpotifyExportDialog(FileBasedExportDialog):
Expand All @@ -35,13 +35,13 @@ def do_export(self):
"bash",
OOMOXIFY_SCRIPT_PATH,
self.temp_theme_path,
'--gui',
'--spotify-apps-path', self.export_config[OPTION_SPOTIFY_PATH],
"--gui",
"--spotify-apps-path", self.export_config[OPTION_SPOTIFY_PATH],
]
if self.export_config[OPTION_FONT_OPTIONS] == VALUE_FONT_NORMALIZE:
export_args.append('--font-weight')
export_args.append("--font-weight")
elif self.export_config[OPTION_FONT_OPTIONS] == VALUE_FONT_CUSTOM:
export_args.append('--font')
export_args.append("--font")
export_args.append(self.export_config[OPTION_FONT_NAME])

self.command = export_args
Expand Down Expand Up @@ -102,7 +102,7 @@ def __init__(self, transient_for, colorscheme, theme_name):
)
self.label.hide()
self.export_config = ExportConfig(
config_name='spotify',
config_name="spotify",
default_config={
OPTION_SPOTIFY_PATH: "/usr/share/spotify/Apps",
OPTION_FONT_NAME: "sans-serif",
Expand All @@ -111,15 +111,15 @@ def __init__(self, transient_for, colorscheme, theme_name):
)

export_options_headline = Gtk.Label()
export_options_headline.set_markup('<b>' + translate("Font Options") + '</b>')
export_options_headline.set_markup("<b>" + translate("Font Options") + "</b>")
export_options_headline.set_justify(Gtk.Justification.LEFT)
export_options_headline.set_alignment(0.0, 0.0)
self.options_box.add(export_options_headline)

self._init_radios()

hbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
spotify_path_label = Gtk.Label(label=translate('Spotify _path:'),
spotify_path_label = Gtk.Label(label=translate("Spotify _path:"),
use_underline=True)
self.spotify_path_entry = Gtk.Entry(text=self.export_config[OPTION_SPOTIFY_PATH])
spotify_path_label.set_mnemonic_widget(self.spotify_path_entry)
Expand All @@ -136,40 +136,40 @@ def __init__(self, transient_for, colorscheme, theme_name):

class Plugin(OomoxExportPlugin):

name = 'spotify'
display_name = 'Oomoxify'
name = "spotify"
display_name = "Oomoxify"
export_text = translate("Apply Spotif_y Theme…")
about_text = translate('Apply the current theme to Spotify Desktop app.')
about_text = translate("Apply the current theme to Spotify Desktop app.")
about_links = [
{
'name': translate('Homepage'),
'url': 'https://github.com/themix-project/oomoxify/',
"name": translate("Homepage"),
"url": "https://github.com/themix-project/oomoxify/",
},
]

export_dialog = SpotifyExportDialog

theme_model_extra = [
{
'type': 'separator',
'display_name': translate('Spotify')
"type": "separator",
"display_name": translate("Spotify")
},
{
'key': 'SPOTIFY_PROTO_BG',
'type': 'color',
'fallback_key': 'HDR_BG',
'display_name': translate('Background'),
"key": "SPOTIFY_PROTO_BG",
"type": "color",
"fallback_key": "HDR_BG",
"display_name": translate("Background"),
},
{
'key': 'SPOTIFY_PROTO_FG',
'type': 'color',
'fallback_key': 'HDR_FG',
'display_name': translate('Foreground'),
"key": "SPOTIFY_PROTO_FG",
"type": "color",
"fallback_key": "HDR_FG",
"display_name": translate("Foreground"),
},
{
'key': 'SPOTIFY_PROTO_SEL',
'type': 'color',
'fallback_key': 'SEL_BG',
'display_name': translate('Accent Color'),
"key": "SPOTIFY_PROTO_SEL",
"type": "color",
"fallback_key": "SEL_BG",
"display_name": translate("Accent Color"),
},
]

0 comments on commit fa5d340

Please sign in to comment.