Skip to content

Commit

Permalink
Merge pull request #170 from nwg-piotr/fix-169
Browse files Browse the repository at this point in the history
Revert #166
  • Loading branch information
nwg-piotr committed Nov 7, 2022
2 parents 1e3bf38 + 6f5f0de commit dcb248c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
17 changes: 1 addition & 16 deletions azote/main.py
Expand Up @@ -448,7 +448,6 @@ def on_apply_button(button):

# Prepare, save and execute the shell script for swaybg. It'll be placed in ~/.azotebg for further use.
batch_content = ['#!/usr/bin/env bash', 'pkill swaybg']
outputs = []
for box in common.display_boxes_list:
if box.color:
# if a color chosen, the wallpaper won't appear
Expand All @@ -463,8 +462,6 @@ def on_apply_button(button):
else:
display_name = box.display_name

outputs.append(display_name)

# Escape some special characters which would mess up the script
wallpaper_path = box.wallpaper_path.replace('\\', '\\\\').replace("$", "\$").replace("`",
"\\`").replace('"',
Expand All @@ -489,18 +486,6 @@ def on_apply_button(button):
entry = {"name": box.display_name, "path": box.wallpaper_path, "thumb": thumb}
restore_from.append(entry)

# save to ~/.azotebg
if os.path.isfile(common.cmd_file):
with open(common.cmd_file, 'r') as f:
oldazotebg = f.readlines()
oldazotebg = [line.rstrip() for line in oldazotebg]
for item in oldazotebg.copy():
for output in outputs:
if output in item:
oldazotebg.remove(item)

batch_content = list(dict.fromkeys(batch_content + oldazotebg))

with open(common.cmd_file, 'w') as f:
# print(batch_content)
for item in batch_content:
Expand Down Expand Up @@ -606,7 +591,7 @@ def on_about_button(button):

dialog.set_keep_above(True)
dialog.set_logo(logo)
dialog.set_copyright('(c) 2019-2020 Piotr Miller')
dialog.set_copyright('(c) 2019-2022 Piotr Miller')
dialog.set_website('https://github.com/nwg-piotr/azote')
dialog.set_comments(common.lang['app_desc'])
dialog.set_license_type(Gtk.License.GPL_3_0)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -8,7 +8,7 @@ def read(f_name):

setup(
name='azote',
version='1.9.6',
version='1.9.7',
description='Wallpaper manager for Sway, i3 and some other WMs',
packages=['azote'],
include_package_data=True,
Expand Down

0 comments on commit dcb248c

Please sign in to comment.