aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/OS-detect.pri4
-rw-r--r--src-qt5/core/libLumina/LuminaOS-Slackware.cpp252
-rw-r--r--src-qt5/core/lumina-desktop/i18n/lumina-desktop_lt.ts14
-rw-r--r--src-qt5/core/lumina-desktop/i18n/lumina-desktop_pl.ts4
-rw-r--r--src-qt5/core/lumina-open/i18n/lumina-open_lt.ts6
-rw-r--r--src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_lt.ts10
-rw-r--r--src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_da.ts10
7 files changed, 277 insertions, 23 deletions
diff --git a/src-qt5/OS-detect.pri b/src-qt5/OS-detect.pri
index a7f917fa..4ac280cf 100644
--- a/src-qt5/OS-detect.pri
+++ b/src-qt5/OS-detect.pri
@@ -67,8 +67,10 @@ isEmpty(OS){
LINUX_DISTRO = $$system(lsb_release -si)
} else:exists(/etc/gentoo-release){
LINUX_DISTRO = Gentoo
+ } else:exists(/etc/slackware-version){
+ LINUX_DISTRO = Slackware
}
- }
+ }
#Apply any special rules for particular distros
equals(LINUX_DISTRO,"Fedora"){
isEmpty(L_ETCDIR){ L_ETCDIR=/etc }
diff --git a/src-qt5/core/libLumina/LuminaOS-Slackware.cpp b/src-qt5/core/libLumina/LuminaOS-Slackware.cpp
new file mode 100644
index 00000000..6a7bee10
--- /dev/null
+++ b/src-qt5/core/libLumina/LuminaOS-Slackware.cpp
@@ -0,0 +1,252 @@
+//===========================================
+// Lumina-DE source code
+// Copyright (c) 2014, Ken Moore
+// Available under the 3-clause BSD license
+// See the LICENSE file for full details
+//===========================================
+#ifdef __linux__
+#include <QDebug>
+#include "LuminaOS.h"
+#include <unistd.h>
+#include <stdio.h> // Needed for BUFSIZ
+
+//can't read xbrightness settings - assume invalid until set
+static int screenbrightness = -1;
+
+QString LOS::OSName(){ return "Slackware Linux"; }
+
+//OS-specific prefix(s)
+// NOTE: PREFIX, L_ETCDIR, L_SHAREDIR are defined in the OS-detect.pri project file and passed in
+QString LOS::LuminaShare(){ return (L_SHAREDIR+"/lumina-desktop/"); } //Install dir for Lumina share files
+QString LOS::AppPrefix(){ return "/usr/"; } //Prefix for applications
+QString LOS::SysPrefix(){ return "/etc/"; } //Prefix for system
+
+//OS-specific application shortcuts (*.desktop files)
+QString LOS::ControlPanelShortcut(){ return ""; } //system control panel
+QString LOS::AppStoreShortcut(){ return ""; } //graphical app/pkg manager
+//OS-specific RSS feeds (Format: QStringList[ <name>::::<url> ]; )
+QStringList LOS::RSSFeeds(){ return QStringList(); }
+
+// ==== ExternalDevicePaths() ====
+QStringList LOS::ExternalDevicePaths(){
+ //Returns: QStringList[<type>::::<filesystem>::::<path>]
+ //Note: <type> = [USB, HDRIVE, DVD, SDCARD, UNKNOWN]
+ QStringList devs = LUtils::getCmdOutput("mount");
+ //Now check the output
+ for(int i=0; i<devs.length(); i++){
+ if(devs[i].startsWith("/dev/")){
+ devs[i] = devs[i].simplified();
+ QString type = devs[i].section(" ",0,0);
+ type.remove("/dev/");
+ //Determine the type of hardware device based on the dev node
+ if(type.startsWith("sd") || type.startsWith("nvme")){ type = "HDRIVE"; }
+ else if(type.startsWith("sr")){ type="DVD"; }
+ else if(type.contains("mapper")){ type="LVM"; }
+ else{ type = "UNKNOWN"; }
+ //Now put the device in the proper output format
+ devs[i] = type+"::::"+devs[i].section(" ",4,4)+"::::"+devs[i].section(" ",2,2);
+ }else{
+ //invalid device - remove it from the list
+ devs.removeAt(i);
+ i--;
+ }
+ }
+ return devs;
+}
+
+//Read screen brightness information
+int LOS::ScreenBrightness(){
+ //Returns: Screen Brightness as a percentage (0-100, with -1 for errors)
+ if(screenbrightness==-1){
+ if(QFile::exists(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness")){
+ int val = LUtils::readFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness").join("").simplified().toInt();
+ screenbrightness = val;
+ }
+ }
+ return screenbrightness;
+
+}
+
+//Set screen brightness
+void LOS::setScreenBrightness(int percent){
+ //ensure bounds
+ if(percent<0){percent=0;}
+ else if(percent>100){ percent=100; }
+ // float pf = percent/100.0; //convert to a decimel
+ //Run the command
+ QString cmd = "xbacklight -set %1";
+ // cmd = cmd.arg( QString::number( int(65535*pf) ) );
+ cmd = cmd.arg( QString::number( percent ) );
+ int ret = LUtils::runCmd(cmd);
+ //Save the result for later
+ if(ret!=0){ screenbrightness = -1; }
+ else{ screenbrightness = percent; }
+ LUtils::writeFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness", QStringList() << QString::number(screenbrightness), true);
+
+}
+
+//Read the current volume
+int LOS::audioVolume(){ //Returns: audio volume as a percentage (0-100, with -1 for errors)
+QString info = LUtils::getCmdOutput("amixer get Master").join("").simplified();;
+ int out = -1;
+ int start_position, end_position;
+ QString current_volume;
+ if(!info.isEmpty()){
+ start_position = info.indexOf("[");
+ start_position++;
+ end_position = info.indexOf("%");
+ current_volume = info.mid(start_position, end_position - start_position);
+ out = current_volume.toInt();
+ }
+ return out;
+
+
+}
+
+//Set the current volume
+void LOS::setAudioVolume(int percent){
+ if(percent<0){percent=0;}
+ else if(percent>100){percent=100;}
+ QString info = "amixer set Master " + QString::number(percent) + "%";
+ //Run Command
+ LUtils::runCmd(info);
+}
+
+//Change the current volume a set amount (+ or -)
+void LOS::changeAudioVolume(int percentdiff){
+ int old_volume = audioVolume();
+ int new_volume = old_volume + percentdiff;
+ if (new_volume < 0)
+ new_volume = 0;
+ if (new_volume > 100)
+ new_volume = 100;
+ qDebug() << "Setting new volume to: " << new_volume;
+ setAudioVolume(new_volume);
+}
+
+//Check if a graphical audio mixer is installed
+bool LOS::hasMixerUtility(){
+ return QFile::exists(LOS::AppPrefix() + "bin/pavucontrol");
+}
+
+//Launch the graphical audio mixer utility
+void LOS::startMixerUtility(){
+ QProcess::startDetached(LOS::AppPrefix() + "bin/pavucontrol");
+}
+
+//Check for user system permission (shutdown/restart)
+bool LOS::userHasShutdownAccess(){
+ return true; //not implemented yet
+}
+
+//Check for whether the system is safe to power off (no updates being perfomed)
+bool LOS::systemPerformingUpdates(){
+ return false; //Not implemented yet
+}
+
+//Return the details of any updates which are waiting to apply on shutdown
+QString LOS::systemPendingUpdates(){
+ return "";
+}
+
+//System Shutdown
+void LOS::systemShutdown(bool skipupdates){ //start poweroff sequence
+ QProcess::startDetached("dbus-send --system --print-reply=literal --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop");
+}
+
+//System Restart
+void LOS::systemRestart(bool skipupdates){ //start reboot sequence
+ QProcess::startDetached("dbus-send --system --print-reply=literal --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart");
+}
+
+//Check for suspend support
+bool LOS::systemCanSuspend(){
+ return false;
+}
+
+//Put the system into the suspend state
+void LOS::systemSuspend(){
+
+}
+
+//Battery Availability
+bool LOS::hasBattery(){
+ QString my_status = LUtils::getCmdOutput("acpi -b").join("");
+ bool no_battery = my_status.contains("No support");
+ if (no_battery) return false;
+ return true;
+}
+
+//Battery Charge Level
+int LOS::batteryCharge(){ //Returns: percent charge (0-100), anything outside that range is counted as an error
+ QString my_status = LUtils::getCmdOutput("acpi -b").join("");
+ int my_start = my_status.indexOf("%");
+ // get the number right before the % sign
+ int my_end = my_start;
+ my_start--;
+ while ( (my_status[my_start] != ' ') && (my_start > 0) )
+ my_start--;
+ my_start++;
+ int my_charge = my_status.mid(my_start, my_end - my_start).toInt();
+ if ( (my_charge < 0) || (my_charge > 100) ) return -1;
+ return my_charge;
+}
+
+//Battery Charging State
+// Many possible values are returned if the laptop is plugged in
+// these include "Unknown, Full and No support.
+// However, it seems just one status is returned when running
+// on battery and that is "Discharging". So if the value we get
+// is NOT Discharging then we assume the battery is charging.
+bool LOS::batteryIsCharging(){
+ QString my_status = LUtils::getCmdOutput("acpi -b").join("");
+ bool discharging = my_status.contains("Discharging");
+ if (discharging) return false;
+ return true;
+}
+
+//Battery Time Remaining
+int LOS::batterySecondsLeft(){ //Returns: estimated number of seconds remaining
+ return 0; //not implemented yet for Linux
+}
+
+//File Checksums
+QStringList LOS::Checksums(QStringList filepaths){ //Return: checksum of the input file
+ QStringList info = LUtils::getCmdOutput("md5sum \""+filepaths.join("\" \"")+"\"");
+ for(int i=0; i<info.length(); i++){
+ // first: md5sum: = error ; second: there's always one empty entry generated by getCmdOutput
+ if( info[i].startsWith("md5sum:") || info[i].isEmpty()){ info.removeAt(i); i--; }
+ else{
+ //Strip out the extra information
+ info[i] = info[i].section(" ",0,0);
+ }
+ }
+ return info;
+}
+
+//file system capacity
+QString LOS::FileSystemCapacity(QString dir) { //Return: percentage capacity as give by the df command
+ QStringList mountInfo = LUtils::getCmdOutput("df \"" + dir+"\"");
+ QString::SectionFlag skipEmpty = QString::SectionSkipEmpty;
+ //we take the 5th word on the 2 line
+ QString capacity = mountInfo[1].section(" ",4,4, skipEmpty) + " used";
+ return capacity;
+}
+
+QStringList LOS::CPUTemperatures(){ //Returns: List containing the temperature of any CPU's ("50C" for example)
+ return QStringList(); //not implemented yet
+}
+
+int LOS::CPUUsagePercent(){ //Returns: Overall percentage of the amount of CPU cycles in use (-1 for errors)
+ return -1; //not implemented yet
+}
+
+int LOS::MemoryUsagePercent(){
+ return -1; //not implemented yet
+}
+
+QStringList LOS::DiskUsage(){ //Returns: List of current read/write stats for each device
+ return QStringList(); //not implemented yet
+}
+
+#endif
diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lt.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lt.ts
index a4a5ff5c..fbb3784c 100644
--- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lt.ts
+++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lt.ts
@@ -246,7 +246,7 @@
<message>
<location filename="../BootSplash.cpp" line="75"/>
<source>The way to get started is to quit talking and begin doing.</source>
- <translation type="unfinished"></translation>
+ <translation>Darbo pradžios paslaptis yra nustoti kalbėti ir pradėti daryti.</translation>
</message>
<message>
<location filename="../BootSplash.cpp" line="77"/>
@@ -306,7 +306,7 @@
<message>
<location filename="../BootSplash.cpp" line="99"/>
<source>I find that the harder I work, the more luck I seem to have.</source>
- <translation type="unfinished"></translation>
+ <translation>Aš suprantu, kad kuo daugiau aš dirbu, tuo labiau man sekasi.</translation>
</message>
<message>
<location filename="../BootSplash.cpp" line="101"/>
@@ -331,7 +331,7 @@
<message>
<location filename="../BootSplash.cpp" line="109"/>
<source>It's kind of fun to do the impossible.</source>
- <translation type="unfinished"></translation>
+ <translation>Smagu yra daryti tai, kas neįmanoma.</translation>
</message>
<message>
<location filename="../BootSplash.cpp" line="111"/>
@@ -346,7 +346,7 @@
<message>
<location filename="../BootSplash.cpp" line="115"/>
<source>Success usually comes to those who are too busy to be looking for it.</source>
- <translation type="unfinished"></translation>
+ <translation>Sėkmė, dažniausiai, nusišypso tiems, kas yra pernelyg užsiėmę, kad jos ieškotų.</translation>
</message>
<message>
<location filename="../BootSplash.cpp" line="117"/>
@@ -361,7 +361,7 @@
<message>
<location filename="../BootSplash.cpp" line="121"/>
<source>The best way to predict the future is to invent it.</source>
- <translation type="unfinished"></translation>
+ <translation>Geriausiai būdas išpranašauti ateitį yra ją išrasti.</translation>
</message>
<message>
<location filename="../BootSplash.cpp" line="123"/>
@@ -371,7 +371,7 @@
<message>
<location filename="../BootSplash.cpp" line="125"/>
<source>Sometimes it is not enough that we do our best; we must do what is required.</source>
- <translation type="unfinished"></translation>
+ <translation>Kartais, mums nepakanka daryti tai, kas geriausia; privalome daryti tai, kas reikalinga.</translation>
</message>
<message>
<location filename="../BootSplash.cpp" line="127"/>
@@ -1032,7 +1032,7 @@
<message>
<location filename="../panel-plugins/audioplayer/PPlayerWidget.cpp" line="161"/>
<source>Multimedia URL</source>
- <translation type="unfinished">Multimedijos URL</translation>
+ <translation>Multimedijos URL</translation>
</message>
</context>
<context>
diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pl.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pl.ts
index 8ce06739..9a73dc96 100644
--- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pl.ts
+++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pl.ts
@@ -647,12 +647,12 @@
<message>
<location filename="../desktop-plugins/LDPlugin.cpp" line="42"/>
<source>Start Moving Item</source>
- <translation>Zacznij przesuwać element</translation>
+ <translation>Przesuń element</translation>
</message>
<message>
<location filename="../desktop-plugins/LDPlugin.cpp" line="43"/>
<source>Start Resizing Item</source>
- <translation>Zacznij zmieniać rozmiar elementu</translation>
+ <translation>Zmień rozmiar elementu</translation>
</message>
<message>
<location filename="../desktop-plugins/LDPlugin.cpp" line="45"/>
diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_lt.ts b/src-qt5/core/lumina-open/i18n/lumina-open_lt.ts
index acb59691..fce7de40 100644
--- a/src-qt5/core/lumina-open/i18n/lumina-open_lt.ts
+++ b/src-qt5/core/lumina-open/i18n/lumina-open_lt.ts
@@ -161,7 +161,7 @@
<message>
<location filename="../main.cpp" line="264"/>
<source>Application entry is invalid: %1</source>
- <translation type="unfinished"></translation>
+ <translation>Programos įrašas yra neteisingas: %1</translation>
</message>
<message>
<location filename="../main.cpp" line="273"/>
@@ -190,8 +190,8 @@
</message>
<message>
<location filename="../main.cpp" line="363"/>
- <source>Could not find &quot;%1&quot;. Please ensure it is installed first.</source>
- <translation>Nepavyko rasti &quot;%1&quot;. Iš pradžių, įsitikinkite ar ji įdiegta.</translation>
+ <source>Could not find "%1". Please ensure it is installed first.</source>
+ <translation>Nepavyko rasti "%1". Iš pradžių, įsitikinkite ar ji įdiegta.</translation>
</message>
<message>
<location filename="../main.cpp" line="413"/>
diff --git a/src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_lt.ts b/src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_lt.ts
index b5720165..ee094ccf 100644
--- a/src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_lt.ts
+++ b/src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_lt.ts
@@ -331,8 +331,8 @@
</message>
<message>
<location filename="../widgets/DirWidget2.cpp" line="460"/>
- <source>The &quot;lumina-fileinfo&quot; utility could not be found on the system. Please install it first.</source>
- <translation>Sistemoje nepavyko rasti &quot;lumina-fileinfo&quot; paslaugų programos. Prašome, iš pradžių, ją įdiegti.</translation>
+ <source>The "lumina-fileinfo" utility could not be found on the system. Please install it first.</source>
+ <translation>Sistemoje nepavyko rasti "lumina-fileinfo" paslaugų programos. Prašome, iš pradžių, ją įdiegti.</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.cpp" line="485"/>
@@ -566,8 +566,8 @@ Nauja vieta: %2</translation>
</message>
<message>
<location filename="../gitWizard.ui" line="232"/>
- <source>Click &quot;Next&quot; to start downloading the repository</source>
- <translation>Spustelėkite &quot;Kitas&quot;, kad pradėtumėte saugyklos atsisiuntimą</translation>
+ <source>Click "Next" to start downloading the repository</source>
+ <translation>Spustelėkite "Kitas", kad pradėtumėte saugyklos atsisiuntimą</translation>
</message>
<message>
<location filename="../gitWizard.h" line="58"/>
@@ -1037,7 +1037,7 @@ Nauja vieta: %2</translation>
<message>
<location filename="../OPWidget.cpp" line="96"/>
<source>File Operation Errors</source>
- <translation type="unfinished"></translation>
+ <translation>Failų operacijos klaidos</translation>
</message>
<message>
<location filename="../OPWidget.cpp" line="108"/>
diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_da.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_da.ts
index ff5233cb..595177bd 100644
--- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_da.ts
+++ b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_da.ts
@@ -6,12 +6,12 @@
<message>
<location filename="../TerminalWidget.cpp" line="60"/>
<source>Copy Selection</source>
- <translation type="unfinished"></translation>
+ <translation>Kopiér markering</translation>
</message>
<message>
<location filename="../TerminalWidget.cpp" line="61"/>
<source>Paste</source>
- <translation type="unfinished"></translation>
+ <translation>Indsæt</translation>
</message>
</context>
<context>
@@ -29,17 +29,17 @@
<message>
<location filename="../TrayIcon.cpp" line="130"/>
<source>Close Terminal</source>
- <translation type="unfinished"></translation>
+ <translation>Luk terminal</translation>
</message>
<message>
<location filename="../TrayIcon.cpp" line="139"/>
<source>Move To Monitor</source>
- <translation type="unfinished"></translation>
+ <translation>Flyt til skærm</translation>
</message>
<message>
<location filename="../TrayIcon.cpp" line="142"/>
<source>Monitor %1</source>
- <translation type="unfinished"></translation>
+ <translation>Skærm %1</translation>
</message>
</context>
</TS>
bgstack15