wrong picture path on GNOME #1

Open
opened 2022-12-19 22:16:17 +00:00 by murteza · 0 comments
Owner

command for getting minute gives minute without a leading zero (when it is single digit). This is why I added an if statement that adds the leading zero if MINUTE <= 9.

Except sometimes when date command returns minute with a leading zero, we add another zero and MINUTE may end up like 009. This causes us generating the wrong image path.

Observed on GNOME but error seems to be in my IF statement before generating image path.

$ gsettings get org.gnome.desktop.background picture-uri
> '/home/murteza/Pictures/Wallpapers/xkcd-clock/10h008m.png'
command for getting minute gives minute without a leading zero (when it is single digit). This is why I added an if statement that adds the leading zero if MINUTE <= 9. Except sometimes when date command returns minute with a leading zero, we add another zero and MINUTE may end up like `009`. This causes us generating the wrong image path. Observed on GNOME but error seems to be in my IF statement before generating image path. ``` $ gsettings get org.gnome.desktop.background picture-uri > '/home/murteza/Pictures/Wallpapers/xkcd-clock/10h008m.png' ```
murteza self-assigned this 2022-12-19 22:16:26 +00:00
murteza added reference main 2022-12-19 22:16:37 +00:00
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: murteza/xkcd-clock#1
No description provided.