Giter Club home page Giter Club logo

azote's Introduction

Hi, I’m Piotr - a middle-aged clerk and after-hours FOSS developer. I’m interested in Linux, Wayland & GTK.

  • I use sway and Hyprland on Arch Linux;
  • I have been working on the GTK shell for sway and Hyprland called nwg-shell;
  • I prefer python to shell scripting and golang to C.

How to reach me:

  • Join the nwg-shell Discussions, or
  • submit an issue on GitHub on the appropriate project page, or
  • find me in the nwg-shell Matrix space, or
  • drop me a line by email.

Do not invite me to a live chat, unless you have diction like sir John Vincent Hurt. I'm quite useless at listening to English.

If you'd like to buy me a coffee, you may use GitHub Sponsors (link in the left column) or Liberapay:

Donate using Liberapay

GitHub Stats

azote's People

Contributors

andreafrati1969 avatar baryonicnonsense avatar bhepple avatar chocimier avatar emanuelserpa avatar fogapod avatar humang33k avatar jubalh avatar leon-plickat avatar lf-hernandez avatar markusvolk avatar mininuxdev avatar nwg-piotr avatar rabbitselector avatar rs-pro0 avatar sgse avatar sunderland93 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

azote's Issues

Enable "Discussions" for github

Is your feature request related to a problem? Please describe.
No it is not. "Discussions" is just a github feature

Describe the solution you'd like
Enable Discussions :)

Describe alternatives you've considered
Using an issue, but why clutter issues with nefarious junk which may however be useful to other users.

Additional context
I got azote working on debian/trixie/testing and perhaps other users would like to know how I did it. It's a bit rough because I haven't got the menu entry working but I did build a compliant debian package to install on my system using debuild, with quite a few warnings but it built, installed and runs without error.

screencap

20240613_20h33m45s_grim

Thanks for consideration and thanks for azote!

EDIT to add: As you may know I'm using labwc :)

Azote fails to start

Describe the bug
Azote fails to start due to scr_path (tools.py:441) returning None (programmer comment. You have a typo in the variable, although you followed up with the typo, you should correct it! :D)

To Reproduce
Steps to reproduce the behavior:

  1. Start azote (from terminal or launcher)

Expected behavior
Azote should start and allow wallpaper changes.

Screenshots
2020-08-02-12:17:26-screenshot

Transcript:

main.py:744: DeprecationWarning: Gdk.Screen.height is deprecated
  h = screen.height()
Traceback (most recent call last):
  File "main.py", line 1812, in <module>
    sys.exit(main())
  File "main.py", line 1803, in main
    app = GUI()
  File "main.py", line 770, in __init__
    common.preview = Preview()
  File "main.py", line 92, in __init__
    create_thumbnails(common.settings.src_path)
  File "/usr/lib/python3.8/site-packages/azote/tools.py", line 446, in create_thumbnails
    for in_path in glob.glob(os.path.join(scr_path, "*.{}".format(extension))):
  File "/usr/lib/python3.8/posixpath.py", line 76, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Desktop (please complete the following information):

  • Linux distribution: Arch
  • WM: sway 1.5
  • Kernel: 5.7.11-arch1-1
  • GTK3: 3.24.21-1
  • GTK2: 2.24.32-2
  • GDK-pixbuf2: 2.40.0+6+g5432316df-1
  • Wayland: 1.18.0-2
  • XWayland: 1.20.8-3

Azote version (please state it clearly if you use -git version):
1.7.12-1 stable

Additional context
Debugging the code a bit I see that src_path is completely empty from the start, here is the result of vars(common.settings)

{
    'file': '/home/oscarcp/.local/share/azote/settings.pkl',
    'src_path': None,
    'sorting': 'new',
    'custom_display': None,
    'old_thumb_width': 240,
    'clear_thumbnails': False,
    'copy_as':'#rgb',
    'color_dictionary': False,
    'image_menu_button': False,
    'track_files': True,
    'rc_file': '/home/oscarcp/.config/azote/azoterc',
    'thumb_width': 240,
    'thumb_height': 135,
    'thumb_size': (240, 135),
    'columns': 3,
    'color_icon_w': 100,
    'color_icon_h': 50,
    'clip_prev_size': 30,
    'palette_quality': 10,
    'tracking_interval_seconds': 5
}

Config and --restore option

Is your feature request related to a problem? Please describe.
Generating an executable script in homedir to be directly run from somewhere else does not seem like a clean solution.

Describe the solution you'd like
Similar to nitrogen, generate a passive config file instead (minding #154), and have a --restore option.

Folder selector does not respect current path

Right now, when tapping the button to bring up the folder selector for wallpapers, it opens the file dialog into "Recents". Would it be possible to make it open on the current selected folder instead?

cannot use "Split selection between displays"

Describe the bug
I am attempting to use Azote to split a wallpaper over my 2 monitors. (1 landscape, 1 portrait). When I select my wallpaper and use the split selection button, azote closes.

To Reproduce
Steps to reproduce the behavior:

  1. launch Azote with azote -l en_US (no lang for en_GB)
  2. click on my desired wallpaper
  3. click on split slection...
  4. hangs for a few seconds
  5. crashes

full output of console:

$ azote -l en_US
Running on sway
Available screen height: 1824 px
Gdk-Message: 19:21:49.375: Lost connection to Wayland compositor.

Expected behavior
applying wallpaper works over multiple displays, a la superpaper

Desktop (please complete the following information):

  • Linux distribution: Arch
  • WM: sway

Azote version (please state it clearly if you use -git version):

  • v1.11.0

Additional context
Using nvidia proprietary drivers and fixes from sway-nvidia package.

Animated wallpapers

I am a huge fan of wallpaper engine linux, would love to see if this project will be able to mimic some of the functionality :)

  1. be able to allow videos as wallpapers. Since mpvpaper already exist, it will be awesome to merge the feature in this project .

  2. If possible, since kde already has a plugin for wallpaper engine, this can be implemented as well :)

Invalid $LIB resolution (Fedora 40 i3 Spin)

Describe the bug
I apologize if this is the wrong place to post this issue, but I wanted to bring to light my experience on a fresh Fedora 40 i3 Spin install.

When first attempting to run azote I was met with an error hinting that the python package was not found:

$ azote
/usr/bin/azote: line 4: cd: /usr/local/lib/python3.12/site-packages/azote: No such file or directory
/usr/bin/python3: can't open file '/home/felipe/main.py': [Errno 2] No such file or directory

I checked and reinstalled azote via dnf, without any error. I had to install pip which was not installed by default sudo dnf install python3-pip. Once I had installed pip I ran pip show azote to see where the package was located and was met with:

$ pip show azote
Name: azote
Version: 1.12.7
Summary: Wallpaper manager for sway and some other WMs
Home-page: https://github.com/nwg-piotr/azote
Author: Piotr Miller
Author-email: [email protected]
License: GPL3
Location: /usr/lib/python3.12/site-packages
Requires: 
Required-by: 

When comparing the locations, I noticed the discrepancy,

In order to resolve this issue and be able to launch azote I edited /usr/bin/azote to point to the path set in pip show

#!/usr/bin/sh

# LIB=$(python3 -Ic "from sysconfig import get_path; print(get_path('purelib'))")
# cd $LIB/azote
cd /usr/lib/python3.12/site-packages/azote
exec /usr/bin/python3 main.py "$@"

Once I made this change I was able to run azote. It seems purelib changes based on the python installation. This could very well be an issue with my specific python installation but I'm curious if it would be helpful to add more descriptive error handling to point to a possible solution:

#!/bin/bash

LIB=$(python3 -Ic "from sysconfig import get_path; print(get_path('purelib'))")

if [ -d "$LIB/azote" ]; then
  cd "$LIB/azote"
  exec /usr/bin/python3 main.py "$@"
else
  echo "Error: Azote directory not found in $LIB"
  echo "Run pip show azote to verify package location"
  exit 1
fi

If this is deemed valid and wroth pursuing I can open a PR for it.

2 crash maybe more bugs

I currently use debian testing with sway from unstable experimental .

Nothing special done

python3 main.py 
Gdk-Message: 23:30:12.296: Lost connection to Wayland compositor

Try to open a directory with lot of pictures, more than 1800 Azote say 1864 but my terminal and thunar say 1857

python3 main.py 
Gdk-Message: 23:32:31.436: Error reading events from display: Broken pipe (pipe)

Next load thumb are here.

When i try to refresh again (i do some other stuff)

python3 main.py 
Gdk-Message: 23:43:05.744: Window 0x21a7a020 is a temporary window without parent, application will not be able to position it on screen.
Gdk-Message: 23:43:05.744: Window 0x21a7a020 is a temporary window without parent, application will not be able to position it on screen.

(main.py:29826): Gdk-CRITICAL **: 23:43:05.764: gdk_wayland_window_handle_configure_popup: assertion 'impl->transient_for' failed
2019-07-26 23:43:09 - [main.c:300] Found config * for output DP-2 ()
2019-07-26 23:43:09 - [main.c:300] Found config * for output DP-1 ()
Gdk-Message: 23:43:31.072: Window 0x1b2b8190 is a temporary window without parent, application will not be able to position it on screen.
Gdk-Message: 23:43:31.072: Window 0x1b2b8190 is a temporary window without parent, application will not be able to position it on screen.

(main.py:29826): Gdk-CRITICAL **: 23:43:31.097: gdk_wayland_window_handle_configure_popup: assertion 'impl->transient_for' failed
2019-07-26 23:43:48 - [main.c:300] Found config DP-2 for output DP-2 ()
2019-07-26 23:43:48 - [main.c:296] Could not find config for output DP-1 ()
2019-07-26 23:43:48 - [main.c:296] Could not find config for output DP-2 ()
2019-07-26 23:43:48 - [main.c:300] Found config DP-1 for output DP-1 ()
Gdk-Message: 23:44:15.895: Lost connection to Wayland compositor.

The sort popup is too bottom on my screen and i can t show all option.
I’m not an gnome expert but buttons should not be on the top ?

I absolutly not check dependancies but azote start well ;)

Support XDG Base Directory specification

Is your feature request related to a problem? Please describe.

The XDG Base Directory specification tells config files should be under $XDG_CONFIG_HOME which defaults to $HOME/.config. Azote at the moment saves its config to $HOME/.azotebg. This is a problem, since the home directory gets cluttered as more and more apps that don't support the specification are installed.

Describe the solution you'd like

The config file should default to $XDG_CONFIG_HOME/azote/azotebg or similar. I understand the config file is a script, but looking at the code told me it is also used to be read as configuration.

My proposal is to check ~/.azotebg, if it exists use that, but otherwise use $XDG_CONFIG_HOME/azote/azotebg and if both exist, use $XDG_CONFIG_HOME/azote/azotebg. This is what other apps did when they started transitioning to supporting the specification.

Azote could also check an environment variable, use its value as the path to the azotebg file, and if it's empty default to $XDG_CONFIG_HOME/azote/azotebg, so it can cater everyone. This is also something that many apps do.

Describe alternatives you've considered

A partial support solution would only check the environment variable, but that would require users to specify it if they want the specification to be followed.

Additional context

See the ArchWiki entry for a list of how applications support the specification.

The right half of the app is unresponsive in floating mode.

Describe the bug
A clear and concise description of what the bug is.

The half of the app becomes unresponsive when it's in floating mode and the right border is set in the middle.

To Reproduce
Steps to reproduce the behavior:

  1. Launch Azote
  2. Put it in floating mode

Expected behavior
The entire app should be responsive and the border should cross it in the middle.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):

  • Linux distribution: Arch
  • WM: sway

Azote version (please state it clearly if you use -git version):

  • v1.7.14

Additional context
Add any other context about the problem here.

Make azote work with swaylock somehow

I would love if azote could set the background for swaylock.

Currently I have my swaylock config like this:

image=/full/path/to/image.png
scaling=fit
color=000000

Ideally I'd like to see:

  1. swaylock detected if present on the system.
  2. A GUI option to add a specific background just for the lockscreen.
  3. Make it so the swaylock config can stay the same upon changing the wallpaper.

Since swaylock's config lives in $XDG_CONFIG_HOME/swaylock/config, the image setting could point to a specific directory or symbolic link to the image, which azote handles. A solution like this would allow one to not "hard-code" the image within the swaylock config for version control purposes.

minor issue : python version needs to be bumped up to 3.8

Had to change
/usr/bin/azote
to point to python3.8 to get azote working

cd /usr/lib/python3.8/site-packages/azote

am on fedora 32

uname -a
Linux ascesh-pc 5.6.6-300.fc32.x86_64 #1 SMP Tue Apr 21 13:44:19 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Azote doesn't handle correctly file paths with spaces

~ cat ~/.azotebg   
#!/usr/bin/env bash
pkill swaybg
swaybg -o* -i /home/luis/Pictures/backgrounds/Destiny Rasputn.jpg -m fit &

~ ~/.azotebg
2019-08-20 23:14:18 - [background-image.c:31] Failed to load background image (Failed to open file “/home/luis/Pictures/backgrounds/Destiny”: No such file or directory).
2019-08-20 23:14:18 - [main.c:438] Failed to load image: /home/luis/Pictures/backgrounds/Destiny
Usage: swaybg <options...>

  -c, --color            Set the background color.
  -h, --help             Show help message and quit.
  -i, --image            Set the image to display.
  -m, --mode             Set the mode to use for the image.
  -o, --output           Set the output to operate on or * for all.
  -v, --version          Show the version number and quit.

Background Modes:
  stretch, fit, fill, center, tile, or solid_color

Segmentation fault on release and master versions

Describe the bug

$ python azote/main.py
[1]    71532 segmentation fault (core dumped)  python azote/main.py

To Reproduce
Steps to reproduce the behavior:

  1. use azote with any arguments or without: $ azote $ azote --version $ python azote/main.py

Expected behavior
No error

Desktop (please complete the following information):

  • Linux distribution: Arch
  • WM: i3, xorg

Azote version (please state it clearly if you use -git version):

  • latest release and master branch

gtk3 dependency needed

Raised by HoaS on AUR:

I think you need to add gtk3 as a depends, the program fails otherwise:

Traceback (most recent call last):
  File "main.py", line 26, in <module>
    gi.require_version('Gtk', '3.0')
  File "/usr/lib/python3.7/site-packages/gi/__init__.py", line 129, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Gtk not available

Azote crashes when run

This is on x86_64 Void Linux (non-musl)
I installed Azote successfully but whenever I try to run it (with azote) it crashes with the following message:

Traceback (most recent call last):
  File "main.py", line 23, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

I didn't get this error when installing from the AUR when I was using Arch, but that was prior to your 1.2 release

Could Azote save a script to reapply the background (like .fehbg)?

When I use feh directly to set a wallpaper, it saves a script to my home directory called .fehbg, which I can run in my startup scripts so that my wallpaper change persists.

Could Azote do something similar, writing a script that runs whatever tool it is using to set the wallpaper?

Thanks for the great app!

Cant run azote

Describe the bug
Azote command is not working.

To Reproduce
Steps to reproduce the behavior:

  • Run azote either from terminal.

Expected behavior
It should open the application.

Screenshots
2023-01-24T11:12:11,772261614+05:30

Desktop (please complete the following information):

  • Linux distribution: Garuda Linux (Arch Based)
  • WM: sway

Azote version (please state it clearly if you use -git version):

  • version number from the "About" window (Cant get the windows opened)

Add recursive wallpaper search

I have my wallpapers packs in /usr/share/backgrounds without recursive search they don't appear.

I have solution using find command, so I'll probably submit pull request a bit later.

[python 3.9] No Such File or Directory

Hi.

I'm pretty new to posting issues on Github.

I have used Azote for months and it worked perfectly. Today something happened where it says the following and doesn't start.

/usr/bin/azote: line 4: cd: /usr/lib/python3.9/site-packages/azote: No such file or directory /usr/bin/python3: can't open file '/home/user/main.py': [Errno 2] No such file or directory

Any help would be greatly appreciated.

Mention fedora?

Hi again,

Sorry to be a nuisance, but you might want to mention Fedora in the initial description:

The program is confirmed to work on sway, i3, Openbox, Fluxbox and dwm window managers, on Arch Linux, Void Linux, Debian and Fedora.

Thanks for your patience!

`KeyError: 'generic-name'` when trying to set wallpaper from an image

Describe the bug
After trying to set a wallpaper from an image, nothing visibly happens. The stacktrace shows the following

Running on Wayland, but not sway
Available screen height: 708 px; measurement delay: 300 ms
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/azote/main.py", line 461, in on_apply_button
    display_name = item["generic-name"]
KeyError: 'generic-name'

To Reproduce
Steps to reproduce the behavior:

  1. Open Azote
  2. Select an image
  3. Click on the button to try to set the selected image as a wallpaper

Expected behavior
To have the wallpaper properly set.

Desktop:

  • Linux distribution: Artix Linux
  • WM: riverwm

Azote version:

  • v1.9.3

Additional context
I've mostly used Sway and there Azote works perfectly. I was just trying River and noticed this issue.

It seems using colors directly works just fine.

Set screens with wildcard [FEATURE REQUEST]

I have noticed when connecting to my dock after boot, my displays show up as a higher increment, i.e. DP-4 and DP-5 become DP-6 and DP-7 after disconnect and reconnect. As you can imagine it makes it kind of annoying if you want to retain a background instead of it being gray.

Something swaybg did that I liked was allowing the wildcard to be used to select all displays to set the background on all. This would hopefully prevent incremented device names from being excluded from the wallpaper.

Obviously the easy answer would be set wallpapers for a bunch of number but this is kind of hacky, and using azote to correct the behavior results in me needing to set the bg AGAIN at the next normal boot with the lowest increments of monitor names.

Loving the easy to manage interfaces though, very intuitive and efficient imo. Keep up the A+++ work!

No pictures shown

image

There's nothing obvious on the logs or the cli when I start the app from there:

2019-06-24 15:54:59,530 INFO: Spraying Azote!
2019-06-24 15:54:59,530 WARNING: Couldn't load lang: en_GB
2019-06-24 15:54:59,540 INFO: Output found: {'name': 'eDP-1', 'x': 960, 'y': 1081, 'width': 1920, 'height': 1080}
2019-06-24 15:54:59,540 INFO: Output found: {'name': 'DP-2', 'x': 1921, 'y': 0, 'width': 1920, 'height': 1080}
2019-06-24 15:54:59,540 INFO: Output found: {'name': 'HDMI-A-1', 'x': 0, 'y': 0, 'width': 1920, 'height': 1080}
2019-06-24 15:54:59,541 INFO: Environment: {'wm': 'sway', 'i3ipc': True, 'xrandr': True, 'send2trash': True}

ubuntu 19.04, Sway 1.1.1

(I did install the send2trash python3 module just in case)

setup.py installation error

Describe the bug
The package fails to install on Arch from both AUR and manual install.

To Reproduce
Steps to reproduce the behavior:
yay -S azote or python setup.py install from the current cloned repository.

Screenshots
sc_21407

Output

Traceback (most recent call last):
  File "/home/sano/.cache/yay/azote/src/azote-1.10.1/setup.py", line 9, in <module>
    setup(
  File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup
    _install_setup_requires(attrs)
  File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 75, in _install_setup_requires
    dist = MinimalDistribution(attrs)
  File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 57, in __init__
    super().__init__(filtered)
  File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 486, in __init__
    for ep in metadata.entry_points(group='distutils.setup_keywords'):
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 1021, in entry_points
    return SelectableGroups.load(eps).select(**params)
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 459, in load
    ordered = sorted(eps, key=by_group)
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 1018, in <genexpr>
    eps = itertools.chain.from_iterable(
  File "/usr/lib/python3.10/importlib/metadata/_itertools.py", line 16, in unique_everseen
    k = key(element)
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 943, in _normalized_name
    or super()._normalized_name
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 622, in _normalized_name
    return Prepared.normalize(self.name)
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 871, in normalize
    return re.sub(r"[-_.]+", "-", name).lower().replace('-', '_')
  File "/usr/lib/python3.10/re.py", line 209, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or bytes-like object

Desktop:

  • Linux distribution: Arch on 6.2.2-arch2-1 kernel (latest)
  • WM: sway

Azote version:
azote-1.10.1

Additional context
python: 3.10.9

Previous versions worked fine (from AUR). The issue seems to be only related to the install script because I can run azote just fine from ./azote/main.py

remove x11 dependencies for wayland users

Hi, and thank you for making and maintaining this awesome-looking package!

I've recently switched over to wayland and using sway WM. When trying to install azote from Arch User repositories, I noticed that it tries installing feh and xorg-xrandr, which won't be used. Can we maybe improve the PKGFILE to detect the current display server? Or have 2 distinct packages azote-x11 and azote-wayland ?

for the time being, I installed azote by editing PKGBUILD and removing "feh" "xorg-xrandr" before running makepkg -si

It doesn't launch on River

Describe the bug
swaybg works just fine on River but azote doesn't launch.

To Reproduce
Steps to reproduce the behavior:

  1. Launch river
  2. Try to launch azote

Expected behavior
Azote should open.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):

  • Linux distribution: EndeavoursOS
  • WM: river

Azote version (please state it clearly if you use -git version):
azote-git 1.7.14.r17.g76607a2-3

Repository signature is invalid

Describe the bug
Looks like the signature for the apt repo in ubuntu has expired.

To Reproduce

~ sudo apt update
[...]
Err:10 http://download.opensuse.org/repositories/home:/Head_on_a_Stick:/azote/xUbuntu_20.04  InRelease
  The following signatures were invalid: EXPKEYSIG A0E2FC066309A9C9 home:Head_on_a_Stick OBS Project <home:[email protected]>

Expected behavior
It works.

Desktop (please complete the following information):

  • Linux distribution: Ubuntu 20.04
  • WM: Sway

Azote version (please state it clearly if you use -git version):
n/a

Additional context
n/a

'Open with' function broken for files with spaces

'Open with' function is broken for files with spaces - eg try opening a file called 'My Holiday Snap.jpg'. Most programs like imv/feh simply fail quietly. Others like pinta show a file opening failure dialog for each word ie 'My', 'Holiday', 'Snap' etc so I suspect stronger quoting is required somewhere

Using generic display names doesn't work for my laptop's built-in display

Describe the bug
When I am using azote with the "Use generic display names" feature, it doesn't set the background for my laptop's built-in display. Running .azotebg it gives me this:

❯ ./.azotebg
2022-06-17 10:52:50 - 2022-06-17 10:52:50 - [swaybg/main.c:256] Could not find config for output eDP-1 (Sharp Corporation 0x1516)                            
[swaybg/main.c:256] Could not find config for output eDP-1 (Sharp Corporation 0x1516)
2022-06-17 10:52:50 - 2022-06-17 10:52:50 - [swaybg/main.c:260] Found config Dell Inc. DELL S2817Q J42MC74R273M for output DP-8 (Dell Inc. DELL S2817Q J42MC74R273M)[swaybg/main.c:256] Could not find config for output DP-8 (Dell Inc. DELL S2817Q J42MC74R273M)

My .azotebg at the moment is:

❯ cat ./.azotebg
#!/usr/bin/env bash
pkill swaybg
swaybg -o 'Dell Inc. DELL S2817Q J42MC74R273M' -i "/home/zdonca/Pictures/wallpaper/swaying_tree_to_right.png" -m fill &
swaybg -o 'Sharp Corporation 0x1516 Unknown' -i "/home/zdonca/Pictures/wallpaper/swaying_tree_to_right.png" -m fill &

And my outputs are:

❯ swaymsg -t get_outputs
Output eDP-1 'Sharp Corporation 0x1516 Unknown'
  Current mode: 3840x2400 @ 59.994 Hz
  Position: 2560,0
  Scale factor: 2.000000
  Scale filter: nearest
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 2
  Max render time: off
  Adaptive sync: disabled
  Available modes:
    3840x2400 @ 59.994 Hz
    3840x2400 @ 47.995 Hz

Output DP-8 'Dell Inc. DELL S2817Q J42MC74R273M' (focused)
  Current mode: 3840x2160 @ 59.996 Hz
  Position: 0,0
  Scale factor: 1.500000
  Scale filter: linear
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 0:   
  Max render time: off
  Adaptive sync: disabled
  Available modes:
    3840x2160 @ 59.996 Hz
    3840x2160 @ 29.981 Hz
    1920x2160 @ 59.988 Hz
    ...

If I run swaybg without the word "Unknown" in the name of the output, it actually works.

To Reproduce
Steps to reproduce the behavior:

  1. Have an external display connected to my laptop.
  2. Run Azote, and check the "Use generic display names" checkbox.
  3. Apply the backrounds.
  4. Notice that the built-in display doesn't have a background set.

Expected behavior
My built-in display should have a background set when using the "Use generic display names" feature. I need this feature because the id of my external monitor doesn't stay consistent for whatever reason, and it varies between DP-5 and DP-8.

Desktop (please complete the following information):

  • Arch Linux
  • Latest development builds of sway and wlroots.

Azote version (please state it clearly if you use -git version):

❯ pacman -Qi azote
Name            : azote
Version         : 1.9.4-1

Monitor identifiers wrong/reversed

Azote is attaching the wrong identifiers to my monitors

Left monitor should be my HDMI-0 the 1920x1200 one, right is the vertical VGA-0 1080x1920

Fedora rawhide with i3

happening on version 1.12.3

image

Sorry I don't really have much info, I'm not sure why it's IDing them wrong.

Application name not visible in gnome3 menu

If I understand https://python-gtk-3-tutorial.readthedocs.io/en/latest/application.html correctly then you should use Gtk.Application and Gtk.ApplicationWindow() to fix this.

AFAIK the title of the application gets taken from the shipped desktop file, but only if this is an Gtk.Application.

I'm aware this project is geared towards i3 (etc) but I guess this is generally worth improving.

To Reproduce
Steps to reproduce the behavior:

  1. Open azote under gnome3
  2. Look at menubar
  3. You see main.py instead of azote~

Expected behavior
See the applications name.

Screenshots
az1

Desktop (please complete the following information):

  • Linux distribution: openSUSE
  • WM: gnome3

Azote version (please state it clearly if you use -git version):
1.7.12

Azote crashes if a display is connected but not enabled.

names = subprocess.check_output("xrandr | awk '/ connected/{print $1}'", shell=True).decode(

I technically have 4 monitors connected, but one of them is turned off (xrandr --output eDP-1-1 --off).

❯ xrandr | grep ' connected'
eDP-1-1 connected (normal left inverted right x axis y axis)
DP-1-3 connected 640x480+7680+0 (normal left inverted right x axis y axis) 708mm x 398mm
DP-1-1-1 connected 3840x2160+0+0 (normal left inverted right x axis y axis) 609mm x 349mm
DP-1-1-2 connected 3840x2160+3840+0 (normal left inverted right x axis y axis) 600mm x 340mm

Azote crashes with an error every time:

❯ azote 
Traceback (most recent call last):
  File "main.py", line 1814, in <module>
    sys.exit(main())
  File "main.py", line 1799, in main
    set_env(lang)  # detect displays, check installed modules, set paths and stuff
  File "/usr/lib/python3.8/site-packages/azote/tools.py", line 289, in set_env
    common.displays = check_displays()
  File "/usr/lib/python3.8/site-packages/azote/tools.py", line 155, in check_displays
    w_h = res[i].split('x')
IndexError: list index out of range

Newer sway/wlroots name certain outputs randomly causing displays not to have a bg image

Describe the bug
Looks like on the last versions of sway and wlroots, virtual outputs (like those on a thunderbolt dock) are named randomly. I have two displays on a thunderbolt dock that keep changing X where DP-X. Those outputs are virtual (one is in fact VGA and the other HDMI, but from the system's point of view they're displayport).

Anyhow the net result is that sometimes, when an output name is changed at random, I won't have a background image in there. For instance, this is the azotebg script before after I fixed it this morning because one of the displays somehow changed DP number after resuming from sleep:

# Before
 ~ cat .azotebg  
#!/usr/bin/env bash
pkill swaybg
swaybg -o DP-8 -i '/home/luis/Pictures/backgrounds/59853.jpg' -m fill &
swaybg -o eDP-1 -i '/home/luis/Pictures/backgrounds/59853.jpg' -m fill &
swaybg -o DP-7 -i '/home/luis/Pictures/backgrounds/59853.jpg' -m fill &

# After
 ~ cat .azotebg 
#!/usr/bin/env bash
pkill swaybg
swaybg -o DP-7 -i '/home/luis/Pictures/backgrounds/59853.jpg' -m fill &
swaybg -o eDP-1 -i '/home/luis/Pictures/backgrounds/59853.jpg' -m fill &
swaybg -o DP-10 -i '/home/luis/Pictures/backgrounds/59853.jpg' -m fill &

To Reproduce
It's pretty hard to reproduce, unless you have my setup exactly.

Expected behavior
The output names change, but obviously the display names remain the same. Perhaps the script could use these instead?

So instead of

swaybg -o DP-7 -i '/home/luis/Pictures/backgrounds/59853.jpg' -m fill

We could have:

swaybg -o "Iiyama North America PL2410HD 11046A0B03094" -i '/home/luis/Pictures/backgrounds/59853.jpg' -m fill

This is in fact the recommended method of configuring your display layouts in Kanshi so that you can have different setups off the same hardware ports (eg built in HDMI and eDP) as it's the only effective way to identify a particular screen.

Desktop (please complete the following information):

  • Linux distribution: Ubuntu 21.04
  • WM: Sway 1.6-rc2, wlroots master (pre 0.13)

Azote version (please state it clearly if you use -git version):
v1.9.0

No such file or directory

Describe the bug
The script fails to correctly identify the 'purelib' path when using pyenv. The python3 command points to a pyenv shim, leading to an incorrect 'purelib' path.

To Reproduce
Steps to reproduce the behavior:

$ azote
/usr/bin/azote: line 6: cd: /home/xyz/.pyenv/versions/3.12.0/lib/python3.12/site-packages/azote: No such file or directory
/usr/bin/python3: can't open file '/home/xyz/main.py': [Errno 2] No such file or directory

Expected behavior
azote to run as normal.
I modified the script as follows, it runs.

#!/bin/sh

if command -v pyenv > /dev/null 2>&1; then
    LIB=$(env -i /usr/bin/python3 -c "from sysconfig import get_path; print(get_path('purelib'))")
else
    LIB=$(python3 -Ic "from sysconfig import get_path; print(get_path('purelib'))")
fi

cd $LIB/azote
exec /usr/bin/python3 main.py "$@"

Desktop (please complete the following information):

  • Arch
  • WM: [sway]

Azote version (please state it clearly if you use -git version):

$ pacman -Qi azote
Name            : azote
Version         : 1.12.7-1

Python setup.py test Error with [email protected]:No module named 'gi',No module named 'common'

Describe the bug

When I run python setup.py test for testing, the error is as follows,I have installed gtk3-devel

ERROR: main (unittest.loader._FailedTest)

ImportError: Failed to import test module: main
Traceback (most recent call last):
File "/home/all_spack_env/spack/opt/spack/linux-centos8-aarch64/gcc-8.3.1/python-3.8.8-v5y6jnp6vpdq4knxwsgnnsumzantggar/lib/python3.8/unittest/loader.py", line 154, in loadTestsFromName
module = import(module_name)
File "/home/all_spack_env/spack_stage/root/spack-stage-py-azote-1.9.1-yaate3gsiv5ejhjpannyzzrud5l6kpxu/spack-src/azote/main.py", line 18, in
import common
ModuleNotFoundError: No module named 'common'

======================================================================
ERROR: plugins (unittest.loader._FailedTest)

ImportError: Failed to import test module: plugins
Traceback (most recent call last):
File "/home/all_spack_env/spack/opt/spack/linux-centos8-aarch64/gcc-8.3.1/python-3.8.8-v5y6jnp6vpdq4knxwsgnnsumzantggar/lib/python3.8/unittest/loader.py", line 154, in loadTestsFromName
module = import(module_name)
File "/home/all_spack_env/spack_stage/root/spack-stage-py-azote-1.9.1-yaate3gsiv5ejhjpannyzzrud5l6kpxu/spack-src/azote/plugins.py", line 4, in
import gi
ModuleNotFoundError: No module named 'gi'

Regression: .azotebg broken due to #166

Applying changes to the default .azotebg file provided by nwg-shell results in strange file content.

#!/usr/bin/env bash
pkill swaybg
swaybg -o 'Goldstar Company Ltd  0x00002B47' -i "/home/piotr/Obrazy/Wallpapers/badkarma-headphones2.jpeg" -m fill &
swaybg -o 'Iiyama North America PLT2336 11233G4600070' -i "/home/piotr/Obrazy/Wallpapers/badkarma-headphones2.jpeg" -m fill &
killall swaybg 2>/dev/null
swaybg -o '*' -i '/usr/share/backgrounds/nwg-shell.jpg'

Furthermore, if we check/uncheck "Use generic output names", we end up in even more trash content.

#!/usr/bin/env bash
pkill swaybg
swaybg -o 'DVI-I-1' -i "/home/piotr/Obrazy/Wallpapers/badkarma-springs.jpeg" -m fill &
swaybg -o 'DP-2' -i "/home/piotr/Obrazy/Wallpapers/badkarma-springs.jpeg" -m fill &
swaybg -o 'Goldstar Company Ltd  0x00002B47' -i "/home/piotr/Obrazy/Wallpapers/badkarma-headphones2.jpeg" -m fill &
swaybg -o 'Iiyama North America PLT2336 11233G4600070' -i "/home/piotr/Obrazy/Wallpapers/badkarma-headphones2.jpeg" -m fill &
killall swaybg 2>/dev/null
swaybg -o '*' -i '/usr/share/backgrounds/nwg-shell.jpg'

In order to #166, we must not rely on the .azotebg file content.

For some reason, still a bit mysterious to me, it also hangs Azote after pressing the "Apply" button.

@emanuelserpa - I'm about to revert #166

Unable to install

I am using Fedora 30, with Python 3.7

When running python3 setup.py install the site packages are not installed. They are also statically calling global installed locations so installing at the user level fails.

Allow graceful failures with helpful messages when optional dependencies are missing

It looks like you print some useful messages when optional dependencies like send2trash are not found. Please make sure that all of your optional dependencies provide clear failures when attempting to access features that require them, providing users with hints about what needs to be installed.

Also note that xrandr should be optional, because it is only useful or required when not running sway.

The motiviation is to clean up your Void template, which pulls in all of the optional dependencies but shouldn't---if a user has a pure Wayland setup, the xrandr dependency pulls in several X libraries; conversely, if the user has a simple X11 setup, grim and slurp dependencies will pull in wayland and a bunch of libraries that may not be desired.

If azote provides clear messages when it finds each optional package missing, the Void template can be simplified and only pull in the core dependencies. (It would be nice if Void supported optional dependencies, but that's a discussion for another time...)

Screen turns black when the app launch

Describe the bug
A clear and concise description of what the bug is.
Screen turns black when the app launch

To Reproduce
Steps to reproduce the behavior:

  1. Launch Azote

Expected behavior
Screen stays normal
https://drive.google.com/file/d/1fBueUR14N_AKwE0VoWprMygxctfQ_QGB/view?usp=sharing

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • Linux distribution: Arch
  • WM: sway

Azote version (please state it clearly if you use -git version):

  • 1.8.0 git version

Additional context
Add any other context about the problem here.

Allow setting one wallpaper to all outputs

The way I usually set wallpapers is one wallpaper for all outputs. With the current setup, azote generates one swaybg call per display output. Example below when I have no external displays:

#!/usr/bin/env bash
pkill swaybg
swaybg -o eDP-1 -i /home/luis/Pictures/Wallpapers/ubuntu-wallpapers/ubuntustudio/ubuntustudio-default.png -m fill &

Which is good until I connect another display and is showing nothing but my default background

output * bg ~/Pictures/backgrounds/kate-hazen-fractal-mountains.png fill
exec ~/.azotebg

I had to add my default background otherwise connecting another display shows a solid default colour that burns my retinas ;)

Anyhow, would it be possible to add an "all outputs" option? Could be, say, a checkbox that when checked hides the output buttons, and when unchecked shows them (as it is now).

Thank you!

[bug] Screen height is deprecated

Describe the bug
when running azote from command line, I get a warning

main.py:746: DeprecationWarning: Gdk.Screen.height is deprecated
  h = screen.height()

To Reproduce
Start azote from command line

Expected behavior
No warning

Desktop (please complete the following information):

  • Linux distribution: Gentoo
  • WM: Wayfire

Azote version (please state it clearly if you use -git version):

  • 1.7.14

Invalid escape sequence in main.py (Fedora 40 i3 Spin)

Describe the bug
When attempting to run azote on Fedora 40 i3 Spin, a syntax warning regarding the escape sequence for the $ character is encountered. This issue can be resolved by either properly escaping the string with \$ or using a raw string r'$'.

wallpaper_path = box.wallpaper_path.replace('\\', '\\\\').replace("$", "\$").replace("`",

$ azote
/usr/lib/python3.12/site-packages/azote/main.py:466: SyntaxWarning: invalid escape sequence '\$'
  wallpaper_path = box.wallpaper_path.replace('\\', '\\\\').replace("$", "\$").replace("`",
Running on i3

(main.py:7336): Gdk-CRITICAL **: 08:04:23.192: gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed
Available screen height: 1140 px; measurement delay: 300 ms

To Reproduce
Steps to reproduce the behavior:

  1. On a fresh install of Fedora i3 Spin run azote
$ azote
  1. Observe the SyntaxWarning and error log.

Expected behavior
Running azote should properly launch, and the GUI window should render without any syntax warnings.

Proposed solution
Modify the wallpaper_path assignment in main.py to escape the $ character properly using either:

  • wallpaper_path.replace("$", "\\$")
  • or wallpaper_path.replace("$", r"\$")

I will open a PR with the proposed fix.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.