-
Notifications
You must be signed in to change notification settings - Fork 89
Add basic weather information to screensaver #464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
queenkjuul
wants to merge
5
commits into
linuxmint:master
Choose a base branch
from
queenkjuul:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
bcbd584
Add basic weather information to screensaver
d3bcfcc
weather.py: Use all possible icon names to construct the weather
mtwebster bb681ad
Small fixes to accomodate floating widget changes (8137ba2).
mtwebster a1ada31
Fix copy/paste oops.
mtwebster d780f0b
Merge pull request #2 from mtwebster/float-changes
queenkjuul File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,61 +8,61 @@ msgid "" | |
| msgstr "" | ||
| "Project-Id-Version: PACKAGE VERSION\n" | ||
| "Report-Msgid-Bugs-To: \n" | ||
| "POT-Creation-Date: 2022-12-02 21:29+0000\n" | ||
| "POT-Creation-Date: 2024-11-22 04:11-0600\n" | ||
| "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
| "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
| "Language-Team: LANGUAGE <[email protected]>\n" | ||
| "Language: \n" | ||
| "MIME-Version: 1.0\n" | ||
| "Content-Type: text/plain; charset=CHARSET\n" | ||
| "Content-Type: text/plain; charset=UTF-8\n" | ||
| "Content-Transfer-Encoding: 8bit\n" | ||
| "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" | ||
|
|
||
| #: src/cinnamon-screensaver-command.py:41 | ||
| #: src/cinnamon-screensaver-command.py:43 | ||
| msgid "Causes the screensaver to exit gracefully" | ||
| msgstr "" | ||
|
|
||
| #: src/cinnamon-screensaver-command.py:43 | ||
| #: src/cinnamon-screensaver-command.py:45 | ||
| msgid "Query the state of the screensaver" | ||
| msgstr "" | ||
|
|
||
| #: src/cinnamon-screensaver-command.py:45 | ||
| #: src/cinnamon-screensaver-command.py:47 | ||
| msgid "Query the length of time the screensaver has been active" | ||
| msgstr "" | ||
|
|
||
| #: src/cinnamon-screensaver-command.py:47 | ||
| #: src/cinnamon-screensaver-command.py:49 | ||
| msgid "Tells the running screensaver process to lock the screen immediately" | ||
| msgstr "" | ||
|
|
||
| #: src/cinnamon-screensaver-command.py:49 | ||
| #: src/cinnamon-screensaver-command.py:51 | ||
| msgid "Turn the screensaver on (blank the screen)" | ||
| msgstr "" | ||
|
|
||
| #: src/cinnamon-screensaver-command.py:51 | ||
| #: src/cinnamon-screensaver-command.py:53 | ||
| msgid "If the screensaver is active then deactivate it (un-blank the screen)" | ||
| msgstr "" | ||
|
|
||
| #: src/cinnamon-screensaver-command.py:53 | ||
| #: src/cinnamon-screensaver-command.py:55 | ||
| msgid "Version of this application" | ||
| msgstr "" | ||
|
|
||
| #: src/cinnamon-screensaver-command.py:55 | ||
| #: src/cinnamon-screensaver-command.py:57 | ||
| msgid "Message to be displayed in lock screen" | ||
| msgstr "" | ||
|
|
||
| #: src/cinnamon-screensaver-command.py:105 | ||
| #: src/cinnamon-screensaver-command.py:106 | ||
| msgid "The screensaver is active\n" | ||
| msgstr "" | ||
|
|
||
| #: src/cinnamon-screensaver-command.py:107 | ||
| #: src/cinnamon-screensaver-command.py:108 | ||
| msgid "The screensaver is inactive\n" | ||
| msgstr "" | ||
|
|
||
| #: src/cinnamon-screensaver-command.py:111 | ||
| #: src/cinnamon-screensaver-command.py:112 | ||
| msgid "The screensaver is not currently active.\n" | ||
| msgstr "" | ||
|
|
||
| #: src/cinnamon-screensaver-command.py:113 | ||
| #: src/cinnamon-screensaver-command.py:114 | ||
| #, python-format | ||
| msgid "The screensaver has been active for %d second.\n" | ||
| msgid_plural "The screensaver has been active for %d seconds.\n" | ||
|
|
@@ -80,7 +80,7 @@ msgid "" | |
| "prior to this occurring." | ||
| msgstr "" | ||
|
|
||
| #: src/passwordEntry.py:23 src/unlock.py:216 | ||
| #: src/passwordEntry.py:23 src/unlock.py:215 | ||
| msgid "Please enter your password..." | ||
| msgstr "" | ||
|
|
||
|
|
@@ -92,52 +92,56 @@ msgstr "" | |
| msgid "Switch User" | ||
| msgstr "" | ||
|
|
||
| #: src/unlock.py:189 | ||
| #: src/unlock.py:188 | ||
| msgid "Incorrect password" | ||
| msgstr "" | ||
|
|
||
| #: src/unlock.py:206 | ||
| #: src/unlock.py:205 | ||
| msgid "Checking..." | ||
| msgstr "" | ||
|
|
||
| #: src/unlock.py:250 | ||
| #: src/unlock.py:249 | ||
| msgid "You have the Caps Lock key on." | ||
| msgstr "" | ||
|
|
||
| #: src/weather.py:102 | ||
| msgid "in" | ||
| msgstr "" | ||
|
|
||
| #. This is the first line of text for the backup-locker, explaining how to switch to tty | ||
| #. and run 'cinnamon-unlock-desktop' command. This appears if the screensaver crashes. | ||
| #: backup-locker/cs-backup-locker.c:255 | ||
| #: backup-locker/cs-backup-locker.c:306 | ||
| msgid "Something went wrong with the screensaver." | ||
| msgstr "" | ||
|
|
||
| #. (continued) This is a subtitle | ||
| #: backup-locker/cs-backup-locker.c:265 | ||
| #: backup-locker/cs-backup-locker.c:316 | ||
| msgid "We'll help you get your desktop back" | ||
| msgstr "" | ||
|
|
||
| #. (new section) Bulleted list of steps to take to unlock the desktop; | ||
| #: backup-locker/cs-backup-locker.c:276 | ||
| #: backup-locker/cs-backup-locker.c:327 | ||
| #, c-format | ||
| msgid "Switch to a console using <Control-Alt-F%u>." | ||
| msgstr "" | ||
|
|
||
| #. (list continued) | ||
| #: backup-locker/cs-backup-locker.c:278 | ||
| #: backup-locker/cs-backup-locker.c:329 | ||
| msgid "Log in by typing your user name followed by your password." | ||
| msgstr "" | ||
|
|
||
| #. (list continued) | ||
| #: backup-locker/cs-backup-locker.c:280 | ||
| #: backup-locker/cs-backup-locker.c:331 | ||
| msgid "At the prompt, type 'cinnamon-unlock-desktop' and press Enter." | ||
| msgstr "" | ||
|
|
||
| #. (list continued) | ||
| #: backup-locker/cs-backup-locker.c:282 | ||
| #: backup-locker/cs-backup-locker.c:333 | ||
| #, c-format | ||
| msgid "Switch back to your unlocked desktop using <Control-Alt-F%u>." | ||
| msgstr "" | ||
|
|
||
| #. (end section) Final words after the list of steps | ||
| #: backup-locker/cs-backup-locker.c:287 | ||
| #: backup-locker/cs-backup-locker.c:338 | ||
| msgid "If you can reproduce this behavior, please file a report here:" | ||
| msgstr "" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,6 +32,7 @@ app_py = [ | |
| 'status.py', | ||
| 'unlock.py', | ||
| 'volumeControl.py', | ||
| 'weather.py' | ||
| ] | ||
|
|
||
| app_css = [ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import json | ||
| from types import SimpleNamespace | ||
|
|
||
| import requests | ||
|
|
||
| from util.location import LocationProvider, LocationData | ||
|
|
||
| URL = "https://get.geojs.io/v1/ip/geo.json" | ||
|
|
||
| class GeoJSLocationProvider(LocationProvider): | ||
| """ | ||
| LocationProvider implementation for geojs.io | ||
| """ | ||
|
|
||
| def __init__(self): | ||
| pass | ||
|
|
||
| @staticmethod | ||
| def GetLocation() -> LocationData: | ||
| response = requests.get(URL) | ||
|
|
||
| data = json.loads(response.text, object_hook=lambda d: SimpleNamespace(**d)) | ||
|
|
||
| return LocationData(float(data.latitude), float(data.longitude), data.city, data.country, data.timezone, data.city) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| from abc import ABC, abstractmethod | ||
| from dataclasses import dataclass | ||
| from typing import Optional | ||
|
|
||
|
|
||
| @dataclass | ||
| class LocationData: | ||
| lat: float | ||
| lon: float | ||
| city: Optional[str] = None | ||
| country: Optional[str] = None | ||
| timeZone: Optional[str] = None | ||
| entryText: Optional[str] = None | ||
|
|
||
|
|
||
| class LocationProvider(ABC): | ||
| @abstractmethod | ||
| def GetLocation(self) -> LocationData: | ||
| pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.