vineetred / flowy Goto Github PK
View Code? Open in Web Editor NEWA lean, privacy-preserving dynamic wallpaper changer written in Rust.
License: GNU General Public License v3.0
A lean, privacy-preserving dynamic wallpaper changer written in Rust.
License: GNU General Public License v3.0
wallpaper_rs
should change all properties ending with last-image
in XFCE. As of the latest commit, it only changes wallpaper in the primary screen and first workspace, whereas it should account for multiple workspaces and monitors.
Describe the solution you'd like
In bash/command line, the values to change with xfconf-query
can be found with
xfconf-query -c xfce4-desktop -p /backdrop/screen0 -lv | grep -E '^\/.+(last-image)\ ' -o
/backdrop/screen0/monitor0/last-image /backdrop/screen0/monitor0/workspace0/last-image /backdrop/screen0/monitor0/workspace1/last-image /backdrop/screen0/monitor0/workspace2/last-image /backdrop/screen0/monitor0/workspace3/last-image /backdrop/screen0/monitor0/workspace4/last-image /backdrop/screen0/monitoreDP-1-1/workspace0/last-image /backdrop/screen0/monitoreDP-1-1/workspace1/last-image /backdrop/screen0/monitoreDP-1-1/workspace2/last-image /backdrop/screen0/monitoreDP-1-1/workspace3/last-image /backdrop/screen0/monitoreDP-1-1/workspace4/last-image /backdrop/screen0/monitoreDP-1/workspace0/last-image /backdrop/screen0/monitoreDP1/workspace0/last-image /backdrop/screen0/monitoreDP-1/workspace1/last-image /backdrop/screen0/monitoreDP1/workspace1/last-image /backdrop/screen0/monitoreDP-1/workspace2/last-image /backdrop/screen0/monitoreDP1/workspace2/last-image /backdrop/screen0/monitoreDP-1/workspace3/last-image /backdrop/screen0/monitoreDP1/workspace3/last-image /backdrop/screen0/monitoreDP-1/workspace4/last-image /backdrop/screen0/monitoreDP1/workspace4/last-image /backdrop/screen0/monitorHDMI-1-2/workspace0/last-image /backdrop/screen0/monitorHDMI-1-2/workspace1/last-image /backdrop/screen0/monitorHDMI-1-2/workspace2/last-image /backdrop/screen0/monitorHDMI-1-2/workspace3/last-image /backdrop/screen0/monitorHDMI-2/workspace0/last-image /backdrop/screen0/monitorHDMI-2/workspace1/last-image /backdrop/screen0/monitorHDMI-2/workspace2/last-image /backdrop/screen0/monitorHDMI-2/workspace3/last-image /backdrop/screen0/monitorHDMI-2/workspace4/last-image
Describe alternatives you've considered
There should be an easy enough way to interface with xfconf-query, I was thinking about parsing the output of xfconf-query -c xfce4-desktop -p /backdrop/screen0 -lv
Since only the blocking API of reqwest
is used, it could be easily replaced with ureq
to reduce the number of dependencies. ureq
is very lightweight and offers several features to select only the required functionality. It is well tested and free of unsafe
.
Building from 0.4.0
flowy
thread 'main' panicked at 'Unknown setting 'multiple' in YAML file for arg 'solar'', /home/waflera/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.0.0-beta.4/src/build/arg/mod.rs:4822:25
When run with RUST_BACKTRACE=1
RUST_BACKTRACE=full flowy
thread 'main' panicked at 'Unknown setting 'multiple' in YAML file for arg 'solar'', /home/waflera/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.0.0-beta.4/src/build/arg/mod.rs:4822:25
stack backtrace:
0: 0x55736f92c6a0 - std::backtrace_rs::backtrace::libunwind::trace::hdee71ab8389d1a85
at /build/rust/src/rustc-1.55.0-src/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
1: 0x55736f92c6a0 - std::backtrace_rs::backtrace::trace_unsynchronized::hb87d1848acf53db4
at /build/rust/src/rustc-1.55.0-src/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x55736f92c6a0 - std::sys_common::backtrace::_print_fmt::hdc3c002df42eb2a8
at /build/rust/src/rustc-1.55.0-src/library/std/src/sys_common/backtrace.rs:67:5
3: 0x55736f92c6a0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h7e7c5f80320a5555
at /build/rust/src/rustc-1.55.0-src/library/std/src/sys_common/backtrace.rs:46:22
4: 0x55736f9531bc - core::fmt::write::hc2943c27b07a73ca
at /build/rust/src/rustc-1.55.0-src/library/core/src/fmt/mod.rs:1115:17
5: 0x55736f925295 - std::io::Write::write_fmt::hb7f935476897f155
at /build/rust/src/rustc-1.55.0-src/library/std/src/io/mod.rs:1665:15
6: 0x55736f92e6fb - std::sys_common::backtrace::_print::hb66bd912df539f1a
at /build/rust/src/rustc-1.55.0-src/library/std/src/sys_common/backtrace.rs:49:5
7: 0x55736f92e6fb - std::sys_common::backtrace::print::hc4b23a5c9cc2f820
at /build/rust/src/rustc-1.55.0-src/library/std/src/sys_common/backtrace.rs:36:9
8: 0x55736f92e6fb - std::panicking::default_hook::{{closure}}::h0a3927c9f62688b2
at /build/rust/src/rustc-1.55.0-src/library/std/src/panicking.rs:208:50
9: 0x55736f92e1d1 - std::panicking::default_hook::h0e16f7372c7d097b
at /build/rust/src/rustc-1.55.0-src/library/std/src/panicking.rs:225:9
10: 0x55736f92edd4 - std::panicking::rust_panic_with_hook::h4e2752775b3d350d
at /build/rust/src/rustc-1.55.0-src/library/std/src/panicking.rs:622:17
11: 0x55736f92e8a7 - std::panicking::begin_panic_handler::{{closure}}::hfb4a3e2dde3b8c71
at /build/rust/src/rustc-1.55.0-src/library/std/src/panicking.rs:519:13
12: 0x55736f92cb9c - std::sys_common::backtrace::__rust_end_short_backtrace::h6a002c3bf329dba7
at /build/rust/src/rustc-1.55.0-src/library/std/src/sys_common/backtrace.rs:141:18
13: 0x55736f92e809 - rust_begin_unwind
at /build/rust/src/rustc-1.55.0-src/library/std/src/panicking.rs:515:5
14: 0x55736f77d0fb - std::panicking::begin_panic_fmt::h9dba142acffc0d13
at /build/rust/src/rustc-1.55.0-src/library/std/src/panicking.rs:457:5
15: 0x55736f8b7e52 - <clap::build::arg::Arg as core::convert::From<&yaml_rust::yaml::Yaml>>::from::h9e08e0b95087aeb9
16: 0x55736f8cde5f - <clap::build::app::App as core::convert::From<&yaml_rust::yaml::Yaml>>::from::hfd83a99563cef08a
17: 0x55736f78b656 - flowy::main::h03460e5e0448dffc
18: 0x55736f786973 - std::sys_common::backtrace::__rust_begin_short_backtrace::h98857a467d4c86f3
19: 0x55736f7870dd - std::rt::lang_start::{{closure}}::h634570cb2392a8d9
20: 0x55736f92f2da - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::he929d724dd89b556
at /build/rust/src/rustc-1.55.0-src/library/core/src/ops/function.rs:259:13
21: 0x55736f92f2da - std::panicking::try::do_call::h2df3a84498fdb06d
at /build/rust/src/rustc-1.55.0-src/library/std/src/panicking.rs:401:40
22: 0x55736f92f2da - std::panicking::try::h3186ada0c3637457
at /build/rust/src/rustc-1.55.0-src/library/std/src/panicking.rs:365:19
23: 0x55736f92f2da - std::panic::catch_unwind::h9b0a0baea8d3f3d7
at /build/rust/src/rustc-1.55.0-src/library/std/src/panic.rs:434:14
24: 0x55736f92f2da - std::rt::lang_start_internal::{{closure}}::h260a4ba42547a154
at /build/rust/src/rustc-1.55.0-src/library/std/src/rt.rs:45:48
25: 0x55736f92f2da - std::panicking::try::do_call::hfa4414a2d71a7b5a
at /build/rust/src/rustc-1.55.0-src/library/std/src/panicking.rs:401:40
26: 0x55736f92f2da - std::panicking::try::h68e06ded764fd93e
at /build/rust/src/rustc-1.55.0-src/library/std/src/panicking.rs:365:19
27: 0x55736f92f2da - std::panic::catch_unwind::hf18287b454779689
at /build/rust/src/rustc-1.55.0-src/library/std/src/panic.rs:434:14
28: 0x55736f92f2da - std::rt::lang_start_internal::hb422823954dcbf29
at /build/rust/src/rustc-1.55.0-src/library/std/src/rt.rs:45:20
29: 0x55736f78bf82 - main
30: 0x7fbfd6b6cb25 - __libc_start_main
31: 0x55736f77e58e - _start
32: 0x0 - <unknown>
I tried reinstalling flowy several times, and I don't know how to format text I am quite new to git hub
Describe the bug
Even after creating the file flowy.service in /etc/systemd/user and enabling it, after login the process is dead
To Reproduce
[Unit]
Description=flowy
[Service]
Environment=XDG_CURRENT_DESKTOP=GNOME
ExecStart=/home/user/.cargo/bin/flowy -p lake
[Install]
WantedBy=multi-user.target
systemctl --user enable flowy.service
systemctl --user start flowy.service
Expected behavior
The service should start after boot with the unit file provided
Desktop (please complete the following information):
I am using Gnome Wayland on ArchLinux
Running flowy in i3wm still results in a kernel panic. I suppose this is because the wallpaper_rs cargo package has not been rebuilt yet.
Could you please update the package to include the latest changes?
With the get_current_wallpaper_idx
function, we don't need clokwerk
anymore. In the main loop, we can simply call get_current_wallpaper_idx
and check if the returned index has changed since the last time.
To make this more efficient, times should be parsed ahead of time (using a Vec<NaiveTime>
instead of Vec<String>
).
Another possible optimization is to perform binary search instead of linear search in get_current_wallpaper_idx
, although the number of wallpapers is likely never large enough that this matters.
Since clokwerk
is a fairly small crate (its only dependency is chrono
, which we use anyway), I understand if this is low priority.
Building from Master branch requires downloading heavy .gif files.
Move .gif files to the other branch or add gifs to a specially created Issue and link back to Readme.md.
I can do this if you want.
The current README.md file does an okay job of explaining flowy. However, there is not much logical flow and topics are not segregated well. Someone could take it up and edit the README.md file.
Describe the bug
When releasing the binary for macOS, the function is_gnome_compliant
in lib.rs
gets compiled even though it is never used.
To Reproduce
Can be seen in the file lib.rs
Expected behavior
The macOS version should not have this copy. A cfg
tag can help here.
Is your feature request related to a problem? Please describe.
Incorporate Sunset and Sunrise times into wallpaper changing times
Additional context
I have implemented that solar timetable program that @Baldomo ported. However, now I am still unsure of how to segregate the wallpapers between dark and bright. Should we have different folders or should we have different prefixes attached to the filename?
If we go with the folder system, it would mean that we have two function that generate the config file -- one for those that want the sunset and sunrise feature and the other for the ones that do not care about this feature.
If we go with the prefix system, it increases the setup overhead of the user.
What method do you guys think Flowy should implement @Aloso @Baldomo @swagggpickle?
As I mentioned in #6 (comment), it would be ideal if the functionality for setting the wallpaper was moved to a new crate.
A similar crate, wallpaper
, already exists, but it appears unmaintained and has more dependencies than necessary; therefore, a new crate could prove useful for other people. For flowy
, the main benefits are improved compile times and a more modular code base.
I don't know how the crate should be called.
If someone other than me wants to implement this, you might find the chapter about workspaces in the Cargo book useful.
So I tried installing it, but after typing cargo install flowy I got stuck and I'm unable to proceed in the installation. If anyone could help me that would be great
Describe the bug
i started the script from using systmctl start An2Linux.service, the service start but dont show the notifications, here is the log.
● An2Linux.service - Run script at startup after network becomes reachable
Loaded: loaded (/etc/systemd/system/An2Linux.service; disabled; vendor preset: enabled)
Active: active (running) since Thu 2020-09-17 11:43:04 CEST; 2min 29s ago
Main PID: 12737 (python3)
Tasks: 2 (limit: 9381)
Memory: 9.1M
CGroup: /system.slice/An2Linux.service
└─12737 python3 /home/dasemu/an2linuxserver-master/an2linuxserver.py
sep 17 11:43:04 Dasemu-PC systemd[1]: Started Run script at startup after network becomes reachable.
sep 17 11:43:05 Dasemu-PC an2linuxserver.py[12737]: 2020-09-17 11:43:05.036 root INFO Server certificate fingerprint: B7 40 C8 4C 1B AC D8 47 D9 50 3A 17 F9 B6 B4 A0 DF 8B 69 8D 33 5E 07>
sep 17 11:43:05 Dasemu-PC an2linuxserver.py[12737]: 2020-09-17 11:43:05.036 root INFO (TCP) Waiting for connections on port 46352 (an2linuxserver.py:850)
sep 17 11:43:09 Dasemu-PC an2linuxserver.py[12737]: 2020-09-17 11:43:09.444 root ERROR (TCP) Failed TLS handshake notif_conn: Empty certificate data (an2linuxserver.py:231)
sep 17 11:43:39 Dasemu-PC an2linuxserver.py[12737]: 2020-09-17 11:43:39.562 root ERROR (TCP) Failed TLS handshake notif_conn: Empty certificate data (an2linuxserver.py:231)
sep 17 11:43:45 Dasemu-PC an2linuxserver.py[12737]: 2020-09-17 11:43:45.869 root ERROR (TCP) Failed TLS handshake notif_conn: Empty certificate data (an2linuxserver.py:231)
sep 17 11:43:51 Dasemu-PC an2linuxserver.py[12737]: 2020-09-17 11:43:51.890 root ERROR (TCP) Failed TLS handshake notif_conn: Empty certificate data (an2linuxserver.py:231)
sep 17 11:44:33 Dasemu-PC an2linuxserver.py[12737]: 2020-09-17 11:44:33.706 root ERROR (TCP) Failed TLS handshake notif_conn: Empty certificate data (an2linuxserver.py:231)
sep 17 11:45:29 Dasemu-PC an2linuxserver.py[12737]: 2020-09-17 11:45:29.264 root ERROR (TCP) Failed TLS handshake notif_conn: Empty certificate data (an2linuxserver.py:231)
lines 1-18/18 (END)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should show the notifications, if i open the script manually i get the expected behavior but if i use systemctl, no.
Desktop (please complete the following information):
Laptop running on Manjaro.
Didn't have cargo installed so I went pacman -S cargo
; once cargo got installed I followed the readme cargo install flowy
; I then added .cargo/bin
to my $PATH
so that I could run flowy into my command line and everything worked fine.
When I tried making flowy a systemd automated process (once again following the readme), I got this error when trying to run flowy.service:
Failed to start flowy.service: Unit flowy.service has a bad unit file setting. See user logs and 'systemctl --user status flowy.service' for details.
systemctl --user status flowy.service
outputs:
août 06 15:40:54 smooshy systemd[950]: /etc/xdg/systemd/user/flowy.service:6: Executable "-dir" not found in path "/usr/local/bin:/usr/bin", ignoring août 06 15:40:54 smooshy systemd[950]: flowy.service: Service has no ExecStart=, ExecStop=, or SuccessAction=. Refusing.
Describe the bug
I have installed on ubuntu and configured using the command line.
Running from cli works as expected:
schneik@xps13-9300:$ flowy --dir /home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/
Generated config file
Times - [
"00:00",
"01:00",
"02:00",
"03:00",
"04:00",
"05:00",
"06:00",
"07:00",
"08:00",
"09:00",
"10:00",
"11:00",
"12:00",
"13:00",
"14:00",
"15:00",
"16:00",
"17:00",
"18:00",
"19:00",
"20:00",
"21:00",
"22:00",
"23:00",
]
Paths - [
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-01.jpg",
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-02.jpg",
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-03.jpg",
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-04.jpg",
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-05.jpg",
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-06.jpg",
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-07.jpg",
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-08.jpg",
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-09.jpg",
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-10.jpg",
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-11.jpg",
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-12.jpg",
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-13.jpg",
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-14.jpg",
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-15.jpg",
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-16.jpg",
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-17.jpg",
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-18.jpg",
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-19.jpg",
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-20.jpg",
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-21.jpg",
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-22.jpg",
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-23.jpg",
"file:///home/schneik/Dropbox/Profile/backgrounds/Dessert/namibia/Namibia-24.jpg",
]
when trying to run as a service it fails:
schneik@xps13-9300:$ systemctl --user start flowy.service
schneik@xps13-9300:$ systemctl status flowy
● flowy.service
Loaded: not-found (Reason: Unit flowy.service not found.)
Active: failed (Result: exit-code) since Thu 2020-07-16 22:46:23 PDT; 9min ago
Main PID: 38829 (code=exited, status=101)
Steps to Reproduce
systemctl --user start flowy.service
Other information
flowy.service file has placeholder txt --dir=REPLACEME
. I assume this is the value that install shuld have promptem for and then used when creating flow.service.
I atempted to edit/replace this with --dir /path to images/
and then --dir=/path to images/
. this did not work
I copied flowy.service from /etc/systemd/user to /etc/stystemd/system. this did not work
i ensured
i can run flow from command line as expected but can not run as a service.
Describe the bug
Exemple is better than a long discuss:
~/Downloads/flowy_linux_gnu
➜ ./flowy --solar ~/Pictures/wallpapers/ 46.3177490234375 -0.45138877630233765
<---- Solar Mode ---->
Lat: 46.3177490234375 Long: -0.45138877630233765
Times - [
"04:13",
"19:57",
]
Paths - [
"file:///home/welcomattic/Pictures/wallpapers/DAY-01.jpg",
"file:///home/welcomattic/Pictures/wallpapers/NIGHT-02.jpg",
]
<--- Daemon Listening --->
Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }
~/Downloads/flowy_linux_gnu
❯ ls /home/welcomattic/Pictures/wallpapers/
DAY-01.jpg NIGHT-02.jpg
~/Downloads/flowy_linux_gnu
➜
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Background must be set
Desktop (please complete the following information):
Is there a way to enable the wallpaper on lock screen?
When using flowy with the lake preset, no background image will be set and the background will be gray/black.
The lake preset files contain spaces, which always worked fine until recently.
Removing the spaces from the files seems to resolve my issue.
Steps to reproduce the behavior:
This might also be an issue related to feh
? Possibly a new version?
Describe the bug
The wallpaper is updated at certain times of the day, but is in not updated when initially starting flowy
.
To Reproduce
flowy -p lake
Expected behavior
The wallpaper changes
Desktop (please complete the following information):
master
branchI use KDE and would like to use this tool. However, KDE is not supported according to the README.
Is your feature request related to a problem? Please describe.
Windows support needs to be added.
Describe the solution you'd like
The only way I can think of is by using the winapi
Describe alternatives you've considered
Using image viewer tools. But that solution is too bulky so scrapped it.
Additional context
The Rust crate wallpaper
already does this. Since it is unmaintained, it's methods can be ported instead to flowy.
We already have a CI CD pipeline. I would like to edit this and automate the releases of binaries so that they are the most up to date versions of the source code.
Is your feature request related to a problem? Please describe.
Need a function that can contact the sunrise-sunset.org
API to get the sunset and sunrise times.
Describe the solution you'd like
Ideally a function which takes the coordinates as the argument and returns the sunset and sunrise times.
Additional context
Let's stick to using the Reqwest
module as it is already being used.
Describe the bug
I have Ubuntu 20.04 virtual machine in VirtualBox. Sometimes after saving state of working machine and restoring later background is black.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Normal background wallpaper.
Desktop (please complete the following information):
Configuration files should be placed in the appropriate location depending on the OS. For example, on Linux, it should be in ~/.config
.
I recommend to use the directories-next crate for this.
Negative longitude or negative latitude causes it to interpret the values as arguments instead of Longitude or latitude
Hi there, so i saw this project and thought it was cool so I tryed installing it and got this:
Compiling flowy v0.3.3
error[E0432]: unresolved import `wallpaper_rs::DesktopEnvt`
--> C:\Users\milan\.cargo\registry\src\github.com-1ecc6299db9ec823\flowy-0.3.3\src\lib.rs:10:29
|
10 | use wallpaper_rs::{Desktop, DesktopEnvt};
| ^^^^^^^^^^^ no `DesktopEnvt` in the root
error: aborting due to previous error
For more information about this error, try `rustc --explain E0432`.
error: could not compile `flowy`.
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `flowy v0.3.3`, intermediate artifacts can be found at `C:\Users\milan\AppData\Local\Temp\cargo-installyVhPck`
Caused by:
build failed
Now I am probably only one that actually tries to run this on windows so I am think this may not be something youre aware of.
Is your feature request related to a problem? Please describe.
The get
and set
wallpaper functions are very messy currently as they have to handle multiple OSes.
Describe the solution you'd like
Check desktop once and use enum type from there on out (match Some(enum))
.
Additional context
The config file, times.toml
must be edited for this as well as struct Config
in lib.rs
I'm using manjaro i3 i downloaded flowy from the aur with no problem
i followed the instructions from the README but when running the command in the terminal flowy prints
thread 'main' panicked at 'Desktop envt could not be determined: NotPresent', flowy/src/lib.rs:168:43
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
when i run echo $XDG_CURRENT_DESKTOP it doesn't print anything and runing RUST_BACKTRACE=1 or RUST_BACKTRACE=full doesn't print anything either
i got flowy to work on xfce but it doesn't work on i3 i dont know what causing this problem.
I've set up Flowy to use systemd automation to swap out 16 of a set. These are Apple's Mojave wallpapers and this is the version I downoaded. I renamed them as required:
I set up the flowy.service file as so:
[Unit]
Description=flowy
[Service]
Environment=XDG_CURRENT_DESKTOP=X-Cinnamon
ExecStart= /home/lazar/Dropbox/Slike/wallpaper/flowy --solar /home/lazar/Dropbox/Slike/wallpaper/mojave 44.81 20.46
[Install]
WantedBy=multi-user.target
And it seems to work, for the most part. Except that when it's time to show NIGHT-14 it jumps to NIGHT-16. All others show up at their correct times. If I just run the actual command, this is what I get:
<---- Solar Mode ---->
Lat: 44.81 Long: 20.46
Times - [
"06:08",
"07:16",
"08:24",
"09:33",
"10:41",
"11:49",
"12:58",
"14:06",
"15:14",
"16:23",
"17:31",
"19:37",
"21:43",
"23:49",
"01:55",
"04:02",
]
Paths - [
"file:///home/lazar/Dropbox/Slike/wallpaper/mojave/DAY-01.jpeg",
"file:///home/lazar/Dropbox/Slike/wallpaper/mojave/DAY-02.jpeg",
"file:///home/lazar/Dropbox/Slike/wallpaper/mojave/DAY-03.jpeg",
"file:///home/lazar/Dropbox/Slike/wallpaper/mojave/DAY-04.jpeg",
"file:///home/lazar/Dropbox/Slike/wallpaper/mojave/DAY-05.jpeg",
"file:///home/lazar/Dropbox/Slike/wallpaper/mojave/DAY-06.jpeg",
"file:///home/lazar/Dropbox/Slike/wallpaper/mojave/DAY-07.jpeg",
"file:///home/lazar/Dropbox/Slike/wallpaper/mojave/DAY-08.jpeg",
"file:///home/lazar/Dropbox/Slike/wallpaper/mojave/DAY-09.jpeg",
"file:///home/lazar/Dropbox/Slike/wallpaper/mojave/DAY-10.jpeg",
"file:///home/lazar/Dropbox/Slike/wallpaper/mojave/NIGHT-11.jpeg",
"file:///home/lazar/Dropbox/Slike/wallpaper/mojave/NIGHT-12.jpeg",
"file:///home/lazar/Dropbox/Slike/wallpaper/mojave/NIGHT-13.jpeg",
"file:///home/lazar/Dropbox/Slike/wallpaper/mojave/NIGHT-14.jpeg",
"file:///home/lazar/Dropbox/Slike/wallpaper/mojave/NIGHT-15.jpeg",
"file:///home/lazar/Dropbox/Slike/wallpaper/mojave/NIGHT-16.jpeg",
]
<--- Daemon Listening --->
And these are indeed the times when it switches... except for 23:49 when it shows the wrong one. I'm not sure what happens after that as I go to sleep, but in the morning it's back to the proper order.
I am on Linux Mint 20.3 using Cinnamon. Any help to resolve this is apprecated.
Describe the bug
Refactor the generate_config_solar
function in the file flowy/lib.rs
. The function is just a nightmare to look at in it's current state. While it gets the job done, it can also look nice while still doing its job.
Hi!
I was trying to install the .deb package and I got a strange bug.
Running the installation in terminal it seems to get stuck at this point:
Configurazione` di flowy (0.2.5)...
Desktop (please complete the following information):
Is your feature request related to a problem? Please describe.
GUI that can allow user to setup Flowy
Well sometimes due to Window's sleep feature, the running terminal program for flowy stops working. Would it be a service, then it won't be treated as an application and could perhaps be more resource efficient.
Describe the bug
Building 0.2.0 from source:
$ flowy
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/lib.rs:181:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
$ RUST_BACKTRACE=full flowy
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/lib.rs:181:18
stack backtrace:
0: 0x5562d184c005 - backtrace::backtrace::libunwind::trace::he332cdcbba52aaad
at /build/rust/src/rustc-1.44.1-src/vendor/backtrace/src/backtrace/libunwind.rs:86
1: 0x5562d184c005 - backtrace::backtrace::trace_unsynchronized::hef03e255f1bf514f
at /build/rust/src/rustc-1.44.1-src/vendor/backtrace/src/backtrace/mod.rs:66
2: 0x5562d184c005 - std::sys_common::backtrace::_print_fmt::hb165a755ba92b1b4
at src/libstd/sys_common/backtrace.rs:78
3: 0x5562d184c005 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h45e432f08dbe7d76
at src/libstd/sys_common/backtrace.rs:59
4: 0x5562d18734cc - core::fmt::write::h73c3f84d9cf018c3
at src/libcore/fmt/mod.rs:1069
5: 0x5562d1844dd3 - std::io::Write::write_fmt::h8ac7e773e542f3e7
at src/libstd/io/mod.rs:1504
6: 0x5562d184e750 - std::sys_common::backtrace::_print::he776a3581f8527e1
at src/libstd/sys_common/backtrace.rs:62
7: 0x5562d184e750 - std::sys_common::backtrace::print::h969151019a7e30fc
at src/libstd/sys_common/backtrace.rs:49
8: 0x5562d184e750 - std::panicking::default_hook::{{closure}}::hac98c3c5d7e976ca
at src/libstd/panicking.rs:198
9: 0x5562d184e49c - std::panicking::default_hook::h4e2eee37e61c3121
at src/libstd/panicking.rs:218
10: 0x5562d184eda1 - std::panicking::rust_panic_with_hook::heb6c94442a23e0d6
at src/libstd/panicking.rs:511
11: 0x5562d184e98b - rust_begin_unwind
at src/libstd/panicking.rs:419
12: 0x5562d1871bc1 - core::panicking::panic_fmt::h4cb2b865a9fe0609
at src/libcore/panicking.rs:111
13: 0x5562d18719e3 - core::option::expect_none_failed::h9d99908668e725ae
at src/libcore/option.rs:1268
14: 0x5562d162f4a8 - flowy::set_times::hdc94ccdd1c762f84
15: 0x5562d1629d54 - flowy::main::hd4de0d3e0a035220
16: 0x5562d1628a73 - std::rt::lang_start::{{closure}}::he9ae725c8e451724
17: 0x5562d184f2a8 - std::rt::lang_start_internal::{{closure}}::hbfd5d2d2e29ca3fd
at src/libstd/rt.rs:52
18: 0x5562d184f2a8 - std::panicking::try::do_call::h2185ede4ed6d658a
at src/libstd/panicking.rs:331
19: 0x5562d184f2a8 - std::panicking::try::h86936ac9fc3ad867
at src/libstd/panicking.rs:274
20: 0x5562d184f2a8 - std::panic::catch_unwind::h724716514d9df9d1
at src/libstd/panic.rs:394
21: 0x5562d184f2a8 - std::rt::lang_start_internal::he9685c4c8d86dfd9
at src/libstd/rt.rs:51
22: 0x5562d1629f02 - main
23: 0x7f3cf262c002 - __libc_start_main
24: 0x5562d16210ee - _start
25: 0x0 - <unknown>
Building from latest commit:
$ flowy
Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }
No difference running with RUST_BACKTRACE
To Reproduce
Build with Rust 1.44.1:
cargo build --release --locked --all-features
I also tried without --locked
and --all-features
.
Desktop
Describe the bug
When flowy is run in the solar mode, the get_wallpaper_idx
returns the wrong index.
To Reproduce
Steps to reproduce the behavior:
Run flowy --solar <dir> <lat> <long>
Expected behavior
It should return the index of the closest time.
Desktop (please complete the following information):
Additional context
Currently, the logic written down by @Aloso involves seeing how much time has passed in the day and then finding the index based on that. However, if we were instead to parse the configs file and find the time, we can just modify the function to return the index of the closest time. We need to do this because the solar mode does not generate equal intervals of time.
Describe the bug
Attempted to install via cargo install flowy
via terminal on a fresh installation of Linux Mint 21. Installed cargo
version is 1.64.0 (387270bc7 2022-09-16). Installed rustc
version is 1.64.0 (a55dd71d5 2022-09-19).
To Reproduce
cargo install flowy
on LM21
Error Output
Updating crates.io index
Installing flowy v0.4.0
Compiling libc v0.2.133
Compiling proc-macro2 v1.0.45
Compiling quote v1.0.21
Compiling unicode-ident v1.0.4
Compiling syn v1.0.101
Compiling autocfg v1.1.0
Compiling cfg-if v1.0.0
Compiling cc v1.0.73
Compiling spin v0.5.2
Compiling once_cell v1.15.0
Compiling untrusted v0.7.1
Compiling serde_derive v1.0.145
Compiling serde v1.0.145
Compiling tinyvec_macros v0.1.0
Compiling thiserror v1.0.37
Compiling crc32fast v1.3.2
Compiling log v0.4.17
Compiling unicode-bidi v0.3.8
Compiling percent-encoding v2.2.0
Compiling rustls v0.20.6
Compiling adler v1.0.2
Compiling serde_json v1.0.85
Compiling os_str_bytes v6.3.0
Compiling linked-hash-map v0.5.6
Compiling ryu v1.0.11
Compiling itoa v1.0.3
Compiling hashbrown v0.12.3
Compiling textwrap v0.15.1
Compiling chunked_transfer v1.4.0
Compiling bitflags v1.3.2
Compiling strsim v0.10.0
Compiling iana-time-zone v0.1.50
Compiling termcolor v1.1.3
Compiling base64 v0.13.0
Compiling tinyvec v1.6.0
Compiling form_urlencoded v1.1.0
Compiling miniz_oxide v0.5.4
Compiling num-traits v0.2.15
Compiling indexmap v1.9.1
Compiling num-integer v0.1.45
Compiling yaml-rust v0.4.5
Compiling clap_lex v0.2.4
Compiling flate2 v1.0.24
Compiling unicode-normalization v0.1.22
Compiling ring v0.16.20
Compiling dirs-sys-next v0.1.2
Compiling time v0.1.44
Compiling atty v0.2.14
Compiling xattr v0.2.3
Compiling filetime v0.2.17
Compiling dirs-next v2.0.0
Compiling directories-next v2.0.0
Compiling clap v3.2.22
Compiling tar v0.4.38
Compiling idna v0.3.0
Compiling url v2.3.1
Compiling chrono v0.4.22
Compiling thiserror-impl v1.0.37
Compiling webpki v0.22.0
Compiling sct v0.7.0
Compiling webpki-roots v0.22.5
Compiling enquote v1.1.0
Compiling wallpaper_rs v0.1.1
Compiling toml v0.5.9
Compiling ureq v2.5.0
Compiling flowy v0.4.0
error[E0308]: mismatched types
--> /home/edmund/.cargo/registry/src/github.com-1ecc6299db9ec823/flowy-0.4.0/src/main.rs:9:29
|
9 | let matches = App::from(yaml).get_matches();
| --------- ^^^^ expected struct `App`, found `&yaml_rust::yaml::Yaml`
| |
| arguments to this function are incorrect
|
note: associated function defined here
For more information about this error, try `rustc --explain E0308`.
error: could not compile `flowy` due to previous error
error: failed to compile `flowy v0.4.0`, intermediate artifacts can be found at `/tmp/cargo-installffKvZC`
System Information:
Describe the bug
When I try to install flowy using cargo install flowy
, the build fails with the following output:
Compiling clap v3.0.13
Compiling chrono v0.4.19
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/hoven/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.0.13/src/lib.rs:8:39
|
8 | #![cfg_attr(feature = "derive", doc = include_str!("../README.md"))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
Compiling url v2.2.2
error: aborting due to previous error
For more information about this error, try `rustc --explain E0658`.
error: could not compile `clap`
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `flowy v0.4.0`, intermediate artifacts can be found at `/tmp/cargo-installYXCvki`
Caused by:
build failed
To Reproduce
Steps to reproduce the behavior:
Use cargo install flowy
on Linux Mint 20.3 x86_64 Cinnamon
Expected behavior
flowy should be downloaded and compiled by cargo.
Desktop (please complete the following information):
Multiple folders for different times of day synced with sunset and sunrise times like redshift
Then we can have daytime folder and nightitme folders with light and dark wallpapers
Also synced with sunset and sunrise times like redshift/F.lux
In the example of Pop!_OS, we have dark and light variants of our theme. It's been a commonly-requested feature to support alternating between them based on time of day. A light theme during the day, and a dark theme at night.
Description
Solar mode mode alternates day and night wallpapers twice per day on Windows.
To Reproduce
Using a folder with two wallpapers, one named "DAY-1.jpg" and one named "NIGHT-2.jpg", run flowy in solar mode providing latitude and longitude.
Flowy will output four different times of day and four wallpapers: it will be "DAY-1.jpg", "NIGHT-2.jpg", "DAY-1.jpg", "NIGHT-2.jpg".
e.g.
.\flowy.exe --solar "D:/Pictures/Wallpapers/Test/" 47.10 9.61
System info:
Describe the bug:
I'm using openbox on Arch and flowy doesn't seem to support it.
To Reproduce:
Steps to reproduce the behavior:
./flowy -d <dir name>
on openboxExpected Behavior:
Wallpaper should be changed.
Desktop:
Additional context
Here's the error message produced:
thread 'main' panicked at 'Desktop envt could not be determined: NotPresent', flowy/src/lib.rs:163:24
I have also tried some things such as setting the environment variable XDG_CURRENT_DESKTOP
before running flowy:
env XDG_CURRENT_DESKTOP=openbox ./flowy -d <dir name>
gives thread 'main' panicked at 'Unsupported Desktop Environment', wallpaper_rs/src/linux.rs:34:22
.env XDG_CURRENT_DESKTOP=i3 ./flowy -d <dir name>
(I "lied" about my WM) doesn't produce any error, however the console output is stuck at <--- Daemon Listening --->
and my wallpaper doesn't change (even though I already have feh
installed).A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.