- Split line format strings break python 3.10 and 3.11
- Quoted string in format strings break 3.10 and 3.11
This commit is contained in:
parent
08c8ba23f4
commit
b0940e19af
5 changed files with 7 additions and 15 deletions
|
|
@ -101,8 +101,7 @@ class BazziteAutostart:
|
|||
else:
|
||||
log.error("No ability to request root privs. Cancel")
|
||||
return
|
||||
command = f" sed -i 's/AUTO_LAUNCH_DISCOVER_OVERLAY=./AUTO_LAUNCH_DISCOVER_OVERLAY={
|
||||
value}/g' /etc/default/discover-overlay"
|
||||
command = f" sed -i 's/AUTO_LAUNCH_DISCOVER_OVERLAY=./AUTO_LAUNCH_DISCOVER_OVERLAY={value}/g' /etc/default/discover-overlay"
|
||||
command_with_permissions = root + command
|
||||
os.system(command_with_permissions)
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ class Discover:
|
|||
Read in arg list from command or RPC and act accordingly
|
||||
"""
|
||||
if "--help" in data or "-h" in data:
|
||||
print(f"{_("Usage")}: discover-overlay [OPTIONS]... ")
|
||||
print(f"{_('Usage')}: discover-overlay [OPTIONS]... ")
|
||||
print(_("Show an X11 or wlroots overlay with information"))
|
||||
print(_("from Discord client"))
|
||||
print("")
|
||||
|
|
|
|||
|
|
@ -1291,8 +1291,7 @@ class MainSettingsWindow():
|
|||
self.config_set("notification", "show_icon", f"{button.get_active()}")
|
||||
|
||||
def notification_icon_position_changed(self, button):
|
||||
self.config_set("notification", "icon_left", f"{
|
||||
int(button.get_active() != 1)}")
|
||||
self.config_set("notification", "icon_left", f"{int(button.get_active() != 1)}")
|
||||
|
||||
def notification_icon_padding_changed(self, button):
|
||||
self.config_set("notification", "icon_padding",
|
||||
|
|
|
|||
|
|
@ -146,16 +146,12 @@ class TextOverlayWindow(OverlayWindow):
|
|||
ret = message['surrogate']
|
||||
else:
|
||||
### Add Image ###
|
||||
self.image_list.append(
|
||||
f"https://cdn.discordapp.com/emojis/{
|
||||
message['emojiId']}.png?v=1"
|
||||
)
|
||||
self.image_list.append(f"https://cdn.discordapp.com/emojis/{message['emojiId']}.png?v=1")
|
||||
ret = "`"
|
||||
elif (message['type'] == 'inlineCode' or
|
||||
message['type'] == 'codeBlock' or
|
||||
message['type'] == 'blockQuote'):
|
||||
ret = f"<span font_family=\"monospace\" background=\"#0004\">{
|
||||
self.make_line(message['content'])}</span>"
|
||||
ret = f"<span font_family=\"monospace\" background=\"#0004\">{self.make_line(message['content'])}</span>"
|
||||
elif message['type'] == 'u':
|
||||
ret = f"<u>{self.make_line(message['content'])}</u>"
|
||||
elif message['type'] == 'em':
|
||||
|
|
@ -247,8 +243,7 @@ class TextOverlayWindow(OverlayWindow):
|
|||
else:
|
||||
log.warning("Unknown file extension '%s'", extension)
|
||||
# cy = self.draw_text(cy, "%s" % (line['attach']))
|
||||
message = f"<span foreground='{self.sanitize_string(col)}'>{self.sanitize_string(
|
||||
line["nick"])}</span>: {out_line}"
|
||||
message = f"<span foreground='{self.sanitize_string(col)}'>{self.sanitize_string(line['nick'])}</span>: {out_line}"
|
||||
current_y = self.draw_text(current_y, message)
|
||||
if current_y <= 0:
|
||||
# We've done enough
|
||||
|
|
|
|||
|
|
@ -790,8 +790,7 @@ class VoiceOverlayWindow(OverlayWindow):
|
|||
"""Draw avatar at given Y position. Includes both text and image based on settings"""
|
||||
# Ensure pixbuf for avatar
|
||||
if user["id"] not in self.avatars and user["avatar"] and avatar_size > 0:
|
||||
url = f"https://cdn.discordapp.com/avatars/{
|
||||
user['id']}/{user['avatar']}.png"
|
||||
url = f"https://cdn.discordapp.com/avatars/{user['id']}/{user['avatar']}.png"
|
||||
get_surface(self.recv_avatar, url, user["id"],
|
||||
self.avatar_size)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue