chore: format
This commit is contained in:
@@ -1,31 +1,29 @@
|
||||
{
|
||||
"KPackageStructure": "Plasma/LookAndFeel",
|
||||
"KPlugin": {
|
||||
"Authors": [
|
||||
{
|
||||
"Email": "eliverlara@gmail.com",
|
||||
"Name": "EliverLara"
|
||||
}
|
||||
],
|
||||
"Category": "Plasma Look And Feel",
|
||||
"EnabledByDefault": true,
|
||||
"Id": "Ant-Dark",
|
||||
"License": "GPL 3+",
|
||||
"Name": "Ant-Dark",
|
||||
"ServiceTypes": [
|
||||
"Plasma/LookAndFeel"
|
||||
],
|
||||
"Version": "0.1",
|
||||
"Website": "https://github.com/EliverLara/Ant/tree/master/kde/Dark"
|
||||
},
|
||||
"X-KPackage-Dependencies": [
|
||||
"kns://colorschemes.knsrc/api.kde-look.org/1464285",
|
||||
"kns://plasma-themes.knsrc/api.kde-look.org/1464321",
|
||||
"kns://aurorae.knsrc/api.kde-look.org/1464309",
|
||||
"kns://sddmtheme.knsrc/api.kde-look.org/2139782",
|
||||
"kns://wallpaper.knsrc/api.kde-look.org/1473492",
|
||||
"kns://icons.knsrc/api.kde-look.org/1640981",
|
||||
"kns://plasmoids.knsrc/api.kde-look.org/2144212",
|
||||
"kns://plasmoids.knsrc/api.kde-look.org/2196105"
|
||||
]
|
||||
"KPackageStructure": "Plasma/LookAndFeel",
|
||||
"KPlugin": {
|
||||
"Authors": [
|
||||
{
|
||||
"Email": "eliverlara@gmail.com",
|
||||
"Name": "EliverLara"
|
||||
}
|
||||
],
|
||||
"Category": "Plasma Look And Feel",
|
||||
"EnabledByDefault": true,
|
||||
"Id": "Ant-Dark",
|
||||
"License": "GPL 3+",
|
||||
"Name": "Ant-Dark",
|
||||
"ServiceTypes": ["Plasma/LookAndFeel"],
|
||||
"Version": "0.1",
|
||||
"Website": "https://github.com/EliverLara/Ant/tree/master/kde/Dark"
|
||||
},
|
||||
"X-KPackage-Dependencies": [
|
||||
"kns://colorschemes.knsrc/api.kde-look.org/1464285",
|
||||
"kns://plasma-themes.knsrc/api.kde-look.org/1464321",
|
||||
"kns://aurorae.knsrc/api.kde-look.org/1464309",
|
||||
"kns://sddmtheme.knsrc/api.kde-look.org/2139782",
|
||||
"kns://wallpaper.knsrc/api.kde-look.org/1473492",
|
||||
"kns://icons.knsrc/api.kde-look.org/1640981",
|
||||
"kns://plasmoids.knsrc/api.kde-look.org/2144212",
|
||||
"kns://plasmoids.knsrc/api.kde-look.org/2196105"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,34 +1,32 @@
|
||||
{
|
||||
"KPackageStructure": "Plasma/LookAndFeel",
|
||||
"KPlugin": {
|
||||
"Authors": [
|
||||
{
|
||||
"Email": "eliverlara@gmail.com",
|
||||
"Name": "EliverLara"
|
||||
}
|
||||
],
|
||||
"Category": "Plasma Look And Feel",
|
||||
"EnabledByDefault": true,
|
||||
"Id": "Nordic-bluish",
|
||||
"License": "GPL 3+",
|
||||
"Name": "Nordic-bluish",
|
||||
"ServiceTypes": [
|
||||
"Plasma/LookAndFeel"
|
||||
],
|
||||
"Version": "0.1",
|
||||
"Website": "https://github.com/EliverLara/Nordic"
|
||||
},
|
||||
"X-KPackage-Dependencies": [
|
||||
"kns://colorschemes.knsrc/api.kde-look.org/1801631",
|
||||
"kns://plasma-themes.knsrc/api.kde-look.org/1801641",
|
||||
"kns://aurorae.knsrc/api.kde-look.org/1326274",
|
||||
"kns://sddmtheme.knsrc/api.kde-look.org/2144235",
|
||||
"kns://xcursor.knsrc/api.kde-look.org/1662218",
|
||||
"kns://wallpaper.knsrc/api.kde-look.org/1683121",
|
||||
"kns://icons.knsrc/api.kde-look.org/1733012",
|
||||
"kns://plasma-themes.knsrc/api.kde-look.org/1810707",
|
||||
"kns://plasmoids.knsrc/api.kde-look.org/2144212",
|
||||
"kns://wallpaper.knsrc/api.kde-look.org/2086140",
|
||||
"kns://plasmoids.knsrc/api.kde-look.org/2196105"
|
||||
]
|
||||
"KPackageStructure": "Plasma/LookAndFeel",
|
||||
"KPlugin": {
|
||||
"Authors": [
|
||||
{
|
||||
"Email": "eliverlara@gmail.com",
|
||||
"Name": "EliverLara"
|
||||
}
|
||||
],
|
||||
"Category": "Plasma Look And Feel",
|
||||
"EnabledByDefault": true,
|
||||
"Id": "Nordic-bluish",
|
||||
"License": "GPL 3+",
|
||||
"Name": "Nordic-bluish",
|
||||
"ServiceTypes": ["Plasma/LookAndFeel"],
|
||||
"Version": "0.1",
|
||||
"Website": "https://github.com/EliverLara/Nordic"
|
||||
},
|
||||
"X-KPackage-Dependencies": [
|
||||
"kns://colorschemes.knsrc/api.kde-look.org/1801631",
|
||||
"kns://plasma-themes.knsrc/api.kde-look.org/1801641",
|
||||
"kns://aurorae.knsrc/api.kde-look.org/1326274",
|
||||
"kns://sddmtheme.knsrc/api.kde-look.org/2144235",
|
||||
"kns://xcursor.knsrc/api.kde-look.org/1662218",
|
||||
"kns://wallpaper.knsrc/api.kde-look.org/1683121",
|
||||
"kns://icons.knsrc/api.kde-look.org/1733012",
|
||||
"kns://plasma-themes.knsrc/api.kde-look.org/1810707",
|
||||
"kns://plasmoids.knsrc/api.kde-look.org/2144212",
|
||||
"kns://wallpaper.knsrc/api.kde-look.org/2086140",
|
||||
"kns://plasmoids.knsrc/api.kde-look.org/2196105"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,35 +1,33 @@
|
||||
{
|
||||
"KPackageStructure": "Plasma/LookAndFeel",
|
||||
"KPlugin": {
|
||||
"Authors": [
|
||||
{
|
||||
"Email": "eliverlara@gmail.com",
|
||||
"Name": "EliverLara"
|
||||
}
|
||||
],
|
||||
"Category": "Plasma Look And Feel",
|
||||
"EnabledByDefault": true,
|
||||
"Id": "Nordic-darker",
|
||||
"License": "GPL 3+",
|
||||
"Name": "Nordic-darker",
|
||||
"ServiceTypes": [
|
||||
"Plasma/LookAndFeel"
|
||||
],
|
||||
"Version": "0.1",
|
||||
"Website": "https://github.com/EliverLara/Nordic"
|
||||
},
|
||||
"X-KPackage-Dependencies": [
|
||||
"kns://colorschemes.knsrc/api.kde-look.org/1629062",
|
||||
"kns://plasma-themes.knsrc/api.kde-look.org/1633673",
|
||||
"kns://aurorae.knsrc/api.kde-look.org/1326274",
|
||||
"kns://sddmtheme.knsrc/api.kde-look.org/2146572",
|
||||
"kns://xcursor.knsrc/api.kde-look.org/1662218",
|
||||
"kns://wallpaper.knsrc/api.kde-look.org/1683121",
|
||||
"kns://plasma-themes.knsrc/api.kde-look.org/1704303",
|
||||
"kns://icons.knsrc/api.kde-look.org/1733012",
|
||||
"kns://lookandfeel.knsrc/api.kde-look.org/2145004",
|
||||
"kns://plasmoids.knsrc/api.kde-look.org/2144212",
|
||||
"kns://wallpaper.knsrc/api.kde-look.org/2086140",
|
||||
"kns://plasmoids.knsrc/api.kde-look.org/2196105"
|
||||
]
|
||||
"KPackageStructure": "Plasma/LookAndFeel",
|
||||
"KPlugin": {
|
||||
"Authors": [
|
||||
{
|
||||
"Email": "eliverlara@gmail.com",
|
||||
"Name": "EliverLara"
|
||||
}
|
||||
],
|
||||
"Category": "Plasma Look And Feel",
|
||||
"EnabledByDefault": true,
|
||||
"Id": "Nordic-darker",
|
||||
"License": "GPL 3+",
|
||||
"Name": "Nordic-darker",
|
||||
"ServiceTypes": ["Plasma/LookAndFeel"],
|
||||
"Version": "0.1",
|
||||
"Website": "https://github.com/EliverLara/Nordic"
|
||||
},
|
||||
"X-KPackage-Dependencies": [
|
||||
"kns://colorschemes.knsrc/api.kde-look.org/1629062",
|
||||
"kns://plasma-themes.knsrc/api.kde-look.org/1633673",
|
||||
"kns://aurorae.knsrc/api.kde-look.org/1326274",
|
||||
"kns://sddmtheme.knsrc/api.kde-look.org/2146572",
|
||||
"kns://xcursor.knsrc/api.kde-look.org/1662218",
|
||||
"kns://wallpaper.knsrc/api.kde-look.org/1683121",
|
||||
"kns://plasma-themes.knsrc/api.kde-look.org/1704303",
|
||||
"kns://icons.knsrc/api.kde-look.org/1733012",
|
||||
"kns://lookandfeel.knsrc/api.kde-look.org/2145004",
|
||||
"kns://plasmoids.knsrc/api.kde-look.org/2144212",
|
||||
"kns://wallpaper.knsrc/api.kde-look.org/2086140",
|
||||
"kns://plasmoids.knsrc/api.kde-look.org/2196105"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,35 +1,33 @@
|
||||
{
|
||||
"KPackageStructure": "Plasma/LookAndFeel",
|
||||
"KPlugin": {
|
||||
"Authors": [
|
||||
{
|
||||
"Email": "eliverlara@gmail.com",
|
||||
"Name": "EliverLara"
|
||||
}
|
||||
],
|
||||
"Category": "Plasma Look And Feel",
|
||||
"EnabledByDefault": true,
|
||||
"Id": "Nordic",
|
||||
"License": "GPL 3+",
|
||||
"Name": "Nordic",
|
||||
"ServiceTypes": [
|
||||
"Plasma/LookAndFeel"
|
||||
],
|
||||
"Version": "0.1",
|
||||
"Website": "https://github.com/EliverLara/Nordic"
|
||||
},
|
||||
"X-KPackage-Dependencies": [
|
||||
"kns://colorschemes.knsrc/api.kde-look.org/1326271",
|
||||
"kns://plasma-themes.knsrc/api.kde-look.org/1326896",
|
||||
"kns://plasma-themes.knsrc/api.kde-look.org/1416702",
|
||||
"kns://aurorae.knsrc/api.kde-look.org/1326274",
|
||||
"kns://sddmtheme.knsrc/api.kde-look.org/2144235",
|
||||
"kns://xcursor.knsrc/api.kde-look.org/1662218",
|
||||
"kns://wallpaper.knsrc/api.kde-look.org/1683121",
|
||||
"kns://icons.knsrc/api.kde-look.org/1733012",
|
||||
"kns://plasmoids.knsrc/api.kde-look.org/2144212",
|
||||
"kns://wallpaper.knsrc/api.kde-look.org/2086140",
|
||||
"kns://plasmoids.knsrc/api.kde-look.org/2196105",
|
||||
"kns://lookandfeel.knsrc/api.kde-look.org/2146574"
|
||||
]
|
||||
"KPackageStructure": "Plasma/LookAndFeel",
|
||||
"KPlugin": {
|
||||
"Authors": [
|
||||
{
|
||||
"Email": "eliverlara@gmail.com",
|
||||
"Name": "EliverLara"
|
||||
}
|
||||
],
|
||||
"Category": "Plasma Look And Feel",
|
||||
"EnabledByDefault": true,
|
||||
"Id": "Nordic",
|
||||
"License": "GPL 3+",
|
||||
"Name": "Nordic",
|
||||
"ServiceTypes": ["Plasma/LookAndFeel"],
|
||||
"Version": "0.1",
|
||||
"Website": "https://github.com/EliverLara/Nordic"
|
||||
},
|
||||
"X-KPackage-Dependencies": [
|
||||
"kns://colorschemes.knsrc/api.kde-look.org/1326271",
|
||||
"kns://plasma-themes.knsrc/api.kde-look.org/1326896",
|
||||
"kns://plasma-themes.knsrc/api.kde-look.org/1416702",
|
||||
"kns://aurorae.knsrc/api.kde-look.org/1326274",
|
||||
"kns://sddmtheme.knsrc/api.kde-look.org/2144235",
|
||||
"kns://xcursor.knsrc/api.kde-look.org/1662218",
|
||||
"kns://wallpaper.knsrc/api.kde-look.org/1683121",
|
||||
"kns://icons.knsrc/api.kde-look.org/1733012",
|
||||
"kns://plasmoids.knsrc/api.kde-look.org/2144212",
|
||||
"kns://wallpaper.knsrc/api.kde-look.org/2086140",
|
||||
"kns://plasmoids.knsrc/api.kde-look.org/2196105",
|
||||
"kns://lookandfeel.knsrc/api.kde-look.org/2146574"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
function isDark(color) {
|
||||
var r = color.r;
|
||||
var g = color.g;
|
||||
var b = color.b;
|
||||
|
||||
var r = color.r;
|
||||
var g = color.g;
|
||||
var b = color.b;
|
||||
// Using the HSP value, determine whether the color is light or dark
|
||||
var colorArray = [r, g, b].map((v) => {
|
||||
if (v <= 0.03928) {
|
||||
return v / 12.92;
|
||||
}
|
||||
|
||||
// Using the HSP value, determine whether the color is light or dark
|
||||
var colorArray = [r, g , b ].map(v => {
|
||||
if (v <= 0.03928) {
|
||||
return v / 12.92
|
||||
}
|
||||
return Math.pow((v + 0.055) / 1.055, 2.4);
|
||||
});
|
||||
|
||||
return Math.pow((v + 0.055) / 1.055, 2.4)
|
||||
})
|
||||
var luminance =
|
||||
0.2126 * colorArray[0] + 0.7152 * colorArray[1] + 0.0722 * colorArray[2];
|
||||
|
||||
var luminance = 0.2126 * colorArray[0] + 0.7152 * colorArray[1] + 0.0722 * colorArray[2]
|
||||
|
||||
return luminance <= 0.179
|
||||
}
|
||||
return luminance <= 0.179;
|
||||
}
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
{
|
||||
"KPackageStructure": "Plasma/Applet",
|
||||
"KPlugin": {
|
||||
"Authors": [
|
||||
{
|
||||
"Email": "eliverlara@gmail.com",
|
||||
"Name": "EliverLara"
|
||||
}
|
||||
],
|
||||
"Category": "Application Launchers",
|
||||
"Description": "A modern Launcher for plasma!",
|
||||
"EnabledByDefault": true,
|
||||
"Icon": "start-here-kde",
|
||||
"Id": "AndromedaLauncher",
|
||||
"Name": "Andromeda Launcher",
|
||||
"KPackageStructure": "Plasma/Applet",
|
||||
"KPlugin": {
|
||||
"Authors": [
|
||||
{
|
||||
"Email": "eliverlara@gmail.com",
|
||||
"Name": "EliverLara"
|
||||
}
|
||||
],
|
||||
"Category": "Application Launchers",
|
||||
"Description": "A modern Launcher for plasma!",
|
||||
"EnabledByDefault": true,
|
||||
"Icon": "start-here-kde",
|
||||
"Id": "AndromedaLauncher",
|
||||
"Name": "Andromeda Launcher",
|
||||
|
||||
"Version": "0.6",
|
||||
"Website": "https://github.com/EliverLara/AndromedaLauncher"
|
||||
},
|
||||
"X-Plasma-Provides": [ "org.kde.plasma.launchermenu" ],
|
||||
"X-Plasma-API-Minimum-Version": "6.0"
|
||||
"Version": "0.6",
|
||||
"Website": "https://github.com/EliverLara/AndromedaLauncher"
|
||||
},
|
||||
"X-Plasma-Provides": ["org.kde.plasma.launchermenu"],
|
||||
"X-Plasma-API-Minimum-Version": "6.0"
|
||||
}
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
function updateBrightness(rootItem, source) {
|
||||
if (rootItem.updateScreenBrightnessJob)
|
||||
return;
|
||||
if (rootItem.updateScreenBrightnessJob) return;
|
||||
|
||||
if (!source.data["PowerDevil"]) {
|
||||
return;
|
||||
}
|
||||
if (!source.data["PowerDevil"]) {
|
||||
return;
|
||||
}
|
||||
|
||||
// we don't want passive brightness change send setBrightness call
|
||||
rootItem.disableBrightnessUpdate = true;
|
||||
// we don't want passive brightness change send setBrightness call
|
||||
rootItem.disableBrightnessUpdate = true;
|
||||
|
||||
if (typeof source.data["PowerDevil"]["Screen Brightness"] === 'number') {
|
||||
rootItem.screenBrightness = source.data["PowerDevil"]["Screen Brightness"];
|
||||
}
|
||||
rootItem.disableBrightnessUpdate = false;
|
||||
}
|
||||
if (typeof source.data["PowerDevil"]["Screen Brightness"] === "number") {
|
||||
rootItem.screenBrightness = source.data["PowerDevil"]["Screen Brightness"];
|
||||
}
|
||||
rootItem.disableBrightnessUpdate = false;
|
||||
}
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
function isDark(color) {
|
||||
//color = color.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);
|
||||
|
||||
//color = color.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);
|
||||
var r = color.r;
|
||||
var g = color.g;
|
||||
var b = color.b;
|
||||
|
||||
var r = color.r;
|
||||
var g = color.g;
|
||||
var b = color.b;
|
||||
var colorArray = [r, g, b].map((v) => {
|
||||
if (v <= 0.03928) {
|
||||
return v / 12.92;
|
||||
}
|
||||
|
||||
return Math.pow((v + 0.055) / 1.055, 2.4);
|
||||
});
|
||||
|
||||
var colorArray = [r, g , b ].map(v => {
|
||||
if (v <= 0.03928) {
|
||||
return v / 12.92
|
||||
}
|
||||
|
||||
return Math.pow((v + 0.055) / 1.055, 2.4)
|
||||
})
|
||||
|
||||
var luminance = 0.2126 * colorArray[0] + 0.7152 * colorArray[1] + 0.0722 * colorArray[2]
|
||||
|
||||
return luminance <= 0.179
|
||||
}
|
||||
var luminance =
|
||||
0.2126 * colorArray[0] + 0.7152 * colorArray[1] + 0.0722 * colorArray[2];
|
||||
|
||||
return luminance <= 0.179;
|
||||
}
|
||||
|
||||
@@ -1,163 +1,168 @@
|
||||
function getBtDevice() {
|
||||
var connectedDevices = [];
|
||||
var connectedDevices = [];
|
||||
|
||||
var status = {
|
||||
active: false,
|
||||
message: ""
|
||||
}
|
||||
var status = {
|
||||
active: false,
|
||||
message: "",
|
||||
};
|
||||
|
||||
for (var i = 0; i < btManager.devices.length; ++i) {
|
||||
var device = btManager.devices[i];
|
||||
if (device.connected) {
|
||||
connectedDevices.push(device);
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < btManager.devices.length; ++i) {
|
||||
var device = btManager.devices[i];
|
||||
if (device.connected) {
|
||||
connectedDevices.push(device);
|
||||
}
|
||||
}
|
||||
|
||||
if (btManager.bluetoothBlocked) {
|
||||
status.active = false;
|
||||
status.message = "Disabled";
|
||||
} else if (!btManager.bluetoothOperational) {
|
||||
if (!btManager.adapters.length) {
|
||||
status.active = false;
|
||||
status.message = "Unavailable";
|
||||
} else {
|
||||
status.active = false;
|
||||
status.message = "Offline";
|
||||
}
|
||||
} else if (connectedDevices.length >= 1) {
|
||||
status.active = true;
|
||||
status.message = connectedDevices[0].name;
|
||||
} else {
|
||||
status.active = true;
|
||||
status.message = "Not Connected";
|
||||
}
|
||||
return status;
|
||||
if (btManager.bluetoothBlocked) {
|
||||
status.active = false;
|
||||
status.message = "Disabled";
|
||||
} else if (!btManager.bluetoothOperational) {
|
||||
if (!btManager.adapters.length) {
|
||||
status.active = false;
|
||||
status.message = "Unavailable";
|
||||
} else {
|
||||
status.active = false;
|
||||
status.message = "Offline";
|
||||
}
|
||||
} else if (connectedDevices.length >= 1) {
|
||||
status.active = true;
|
||||
status.message = connectedDevices[0].name;
|
||||
} else {
|
||||
status.active = true;
|
||||
status.message = "Not Connected";
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
function toggleBluetooth()
|
||||
{
|
||||
var enable = !btManager.bluetoothOperational;
|
||||
btManager.bluetoothBlocked = !enable;
|
||||
function toggleBluetooth() {
|
||||
var enable = !btManager.bluetoothOperational;
|
||||
btManager.bluetoothBlocked = !enable;
|
||||
|
||||
for (var i = 0; i < btManager.adapters.length; ++i) {
|
||||
var adapter = btManager.adapters[i];
|
||||
adapter.powered = enable;
|
||||
}
|
||||
for (var i = 0; i < btManager.adapters.length; ++i) {
|
||||
var adapter = btManager.adapters[i];
|
||||
adapter.powered = enable;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function checkInhibition() {
|
||||
var inhibited = false;
|
||||
var inhibited = false;
|
||||
|
||||
if (!NotificationManager.Server.valid) {
|
||||
return false;
|
||||
}
|
||||
var inhibitedUntil = notificationSettings.notificationsInhibitedUntil;
|
||||
if (!isNaN(inhibitedUntil.getTime())) {
|
||||
inhibited |= (Date.now() < inhibitedUntil.getTime());
|
||||
}
|
||||
if (!NotificationManager.Server.valid) {
|
||||
return false;
|
||||
}
|
||||
var inhibitedUntil = notificationSettings.notificationsInhibitedUntil;
|
||||
if (!isNaN(inhibitedUntil.getTime())) {
|
||||
inhibited |= Date.now() < inhibitedUntil.getTime();
|
||||
}
|
||||
|
||||
if (notificationSettings.notificationsInhibitedByApplication) {
|
||||
inhibited |= true;
|
||||
}
|
||||
if (notificationSettings.notificationsInhibitedByApplication) {
|
||||
inhibited |= true;
|
||||
}
|
||||
|
||||
if (notificationSettings.inhibitNotificationsWhenScreensMirrored) {
|
||||
inhibited |= notificationSettings.screensMirrored;
|
||||
}
|
||||
return inhibited;
|
||||
if (notificationSettings.inhibitNotificationsWhenScreensMirrored) {
|
||||
inhibited |= notificationSettings.screensMirrored;
|
||||
}
|
||||
return inhibited;
|
||||
}
|
||||
|
||||
function toggleDnd() {
|
||||
if (Funcs.checkInhibition()) {
|
||||
notificationSettings.notificationsInhibitedUntil = undefined;
|
||||
notificationSettings.revokeApplicationInhibitions();
|
||||
if (Funcs.checkInhibition()) {
|
||||
notificationSettings.notificationsInhibitedUntil = undefined;
|
||||
notificationSettings.revokeApplicationInhibitions();
|
||||
|
||||
// overrules current mirrored screen setup, updates again when screen configuration
|
||||
notificationSettings.screensMirrored = false;
|
||||
notificationSettings.save();
|
||||
// overrules current mirrored screen setup, updates again when screen configuration
|
||||
notificationSettings.screensMirrored = false;
|
||||
notificationSettings.save();
|
||||
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
var d = new Date();
|
||||
d.setYear(d.getFullYear()+1)
|
||||
var d = new Date();
|
||||
d.setYear(d.getFullYear() + 1);
|
||||
|
||||
notificationSettings.notificationsInhibitedUntil = d
|
||||
notificationSettings.save()
|
||||
notificationSettings.notificationsInhibitedUntil = d;
|
||||
notificationSettings.save();
|
||||
}
|
||||
|
||||
function revokeInhibitions() {
|
||||
notificationSettings.notificationsInhibitedUntil = undefined;
|
||||
notificationSettings.revokeApplicationInhibitions();
|
||||
// overrules current mirrored screen setup, updates again when screen configuration changes
|
||||
notificationSettings.screensMirrored = false;
|
||||
notificationSettings.notificationsInhibitedUntil = undefined;
|
||||
notificationSettings.revokeApplicationInhibitions();
|
||||
// overrules current mirrored screen setup, updates again when screen configuration changes
|
||||
notificationSettings.screensMirrored = false;
|
||||
|
||||
notificationSettings.save();
|
||||
notificationSettings.save();
|
||||
}
|
||||
|
||||
function toggleRedshiftInhibition() {
|
||||
if (!monitor.available) {
|
||||
return;
|
||||
}
|
||||
switch (inhibitor.state) {
|
||||
case Redshift.Inhibitor.Inhibiting:
|
||||
case Redshift.Inhibitor.Inhibited:
|
||||
inhibitor.uninhibit();
|
||||
break;
|
||||
case Redshift.Inhibitor.Uninhibiting:
|
||||
case Redshift.Inhibitor.Uninhibited:
|
||||
inhibitor.inhibit();
|
||||
break;
|
||||
}
|
||||
if (!monitor.available) {
|
||||
return;
|
||||
}
|
||||
switch (inhibitor.state) {
|
||||
case Redshift.Inhibitor.Inhibiting:
|
||||
case Redshift.Inhibitor.Inhibited:
|
||||
inhibitor.uninhibit();
|
||||
break;
|
||||
case Redshift.Inhibitor.Uninhibiting:
|
||||
case Redshift.Inhibitor.Uninhibited:
|
||||
inhibitor.inhibit();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function volumePercent(volume) {
|
||||
return volume / Vol.PulseAudio.NormalVolume * 100
|
||||
return (volume / Vol.PulseAudio.NormalVolume) * 100;
|
||||
}
|
||||
|
||||
function boundVolume(volume) {
|
||||
return Math.max(Vol.PulseAudio.MinimalVolume, Math.min(volume, Vol.PulseAudio.NormalVolume));
|
||||
return Math.max(
|
||||
Vol.PulseAudio.MinimalVolume,
|
||||
Math.min(volume, Vol.PulseAudio.NormalVolume),
|
||||
);
|
||||
}
|
||||
|
||||
function changeVolumeByPercent(volumeObject, deltaPercent) {
|
||||
const oldVolume = volumeObject.volume;
|
||||
const oldPercent = volumePercent(oldVolume);
|
||||
const targetPercent = oldPercent + deltaPercent;
|
||||
const newVolume = boundVolume(Math.round(Vol.PulseAudio.NormalVolume * (targetPercent/100)));
|
||||
const newPercent = volumePercent(newVolume);
|
||||
volumeObject.muted = newPercent == 0;
|
||||
volumeObject.volume = newVolume;
|
||||
return newPercent;
|
||||
const oldVolume = volumeObject.volume;
|
||||
const oldPercent = volumePercent(oldVolume);
|
||||
const targetPercent = oldPercent + deltaPercent;
|
||||
const newVolume = boundVolume(
|
||||
Math.round(Vol.PulseAudio.NormalVolume * (targetPercent / 100)),
|
||||
);
|
||||
const newPercent = volumePercent(newVolume);
|
||||
volumeObject.muted = newPercent == 0;
|
||||
volumeObject.volume = newVolume;
|
||||
return newPercent;
|
||||
}
|
||||
function volIconName(volume, muted, prefix) {
|
||||
if (!prefix) {
|
||||
prefix = "audio-volume";
|
||||
}
|
||||
var icon = null;
|
||||
var percent = volume / Vol.PulseAudio.NormalVolume
|
||||
if (percent <= 0.0 || muted) {
|
||||
icon = prefix + "-muted";
|
||||
} else if (percent <= 0.25) {
|
||||
icon = prefix + "-low";
|
||||
} else if (percent <= 0.75) {
|
||||
icon = prefix + "-medium";
|
||||
} else {
|
||||
icon = prefix + "-high";
|
||||
}
|
||||
return icon;
|
||||
if (!prefix) {
|
||||
prefix = "audio-volume";
|
||||
}
|
||||
var icon = null;
|
||||
var percent = volume / Vol.PulseAudio.NormalVolume;
|
||||
if (percent <= 0.0 || muted) {
|
||||
icon = prefix + "-muted";
|
||||
} else if (percent <= 0.25) {
|
||||
icon = prefix + "-low";
|
||||
} else if (percent <= 0.75) {
|
||||
icon = prefix + "-medium";
|
||||
} else {
|
||||
icon = prefix + "-high";
|
||||
}
|
||||
return icon;
|
||||
}
|
||||
|
||||
function getNetworkConnectionName() {
|
||||
var status = network.networkStatus.activeConnections;
|
||||
var statusParts;
|
||||
var status = network.networkStatus.activeConnections;
|
||||
var statusParts;
|
||||
|
||||
if(isAirplane){ return "On"; }
|
||||
if (isAirplane) {
|
||||
return "On";
|
||||
}
|
||||
|
||||
if(status && status !== "Disconnected") {
|
||||
statusParts = status.split(":");
|
||||
var connectionName = statusParts[1]?.trim().split(" ").slice(2).join(" ");
|
||||
return connectionName || "Connected";
|
||||
}
|
||||
if (status && status !== "Disconnected") {
|
||||
statusParts = status.split(":");
|
||||
var connectionName = statusParts[1]?.trim().split(" ").slice(2).join(" ");
|
||||
return connectionName || "Connected";
|
||||
}
|
||||
|
||||
return "Disconnected";
|
||||
}
|
||||
return "Disconnected";
|
||||
}
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
function listProperty(item) {
|
||||
for (var p in item)
|
||||
{
|
||||
if( typeof item[p] != "function" )
|
||||
if(p != "objectName")
|
||||
console.log(p + ":" + item[p]);
|
||||
}
|
||||
|
||||
}
|
||||
for (var p in item) {
|
||||
if (typeof item[p] != "function")
|
||||
if (p != "objectName") console.log(p + ":" + item[p]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,9 +18,7 @@
|
||||
"Name[de]": "KDE Kontrollzentrum",
|
||||
"Name[ko]": "KDE 제어 센터",
|
||||
"Name[pt_BR]": "Estação de controle KDE",
|
||||
"ServiceTypes": [
|
||||
"Plasma/Applet"
|
||||
],
|
||||
"ServiceTypes": ["Plasma/Applet"],
|
||||
"Version": "0.1.0",
|
||||
"Website": "https://github.com/EliverLara/kde-control-station/tree/plasma6"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user