1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-09 15:05:39 -05:00

weather auto location option

This commit is contained in:
bbedward
2025-08-05 07:34:46 -04:00
parent 4bf525ce0d
commit 54d8ca450f
3 changed files with 46 additions and 1 deletions

View File

@@ -25,6 +25,7 @@ Singleton {
property string profileImage: ""
property string weatherLocation: "New York, NY"
property string weatherCoordinates: "40.7128,-74.0060"
property bool useAutoLocation: false
property bool showLauncherButton: true
property bool showWorkspaceSwitcher: true
property bool showFocusedWindow: true
@@ -149,6 +150,7 @@ Singleton {
profileImage = settings.profileImage !== undefined ? settings.profileImage : "";
weatherLocation = settings.weatherLocation !== undefined ? settings.weatherLocation : "New York, NY";
weatherCoordinates = settings.weatherCoordinates !== undefined ? settings.weatherCoordinates : "40.7128,-74.0060";
useAutoLocation = settings.useAutoLocation !== undefined ? settings.useAutoLocation : false;
showLauncherButton = settings.showLauncherButton !== undefined ? settings.showLauncherButton : true;
showWorkspaceSwitcher = settings.showWorkspaceSwitcher !== undefined ? settings.showWorkspaceSwitcher : true;
showFocusedWindow = settings.showFocusedWindow !== undefined ? settings.showFocusedWindow : true;
@@ -230,6 +232,7 @@ Singleton {
"profileImage": profileImage,
"weatherLocation": weatherLocation,
"weatherCoordinates": weatherCoordinates,
"useAutoLocation": useAutoLocation,
"showLauncherButton": showLauncherButton,
"showWorkspaceSwitcher": showWorkspaceSwitcher,
"showFocusedWindow": showFocusedWindow,
@@ -568,6 +571,11 @@ Singleton {
saveSettings();
}
function setAutoLocation(enabled) {
useAutoLocation = enabled;
saveSettings();
}
// Network preference setter
function setNetworkPreference(preference) {
networkPreference = preference;