-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic weather information to screensaver
Get basic temperature, conditions, location working with scaled icon Code cleanup Add IP Geolocation to weather component Cleanup, settings integrations, bugfixes, translation Fix Localization cleanup
- Loading branch information
queenkjuul
committed
Nov 22, 2024
1 parent
f4fb467
commit bcbd584
Showing
11 changed files
with
737 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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.