Skip to content
2 changes: 2 additions & 0 deletions config/Config.qml
Original file line number Diff line number Diff line change
Expand Up @@ -1039,13 +1039,15 @@ Singleton {
property bool chi_sim: false
property bool chi_tra: false
property bool kor: false
property bool rus: false
}
property JsonObject pomodoro: JsonObject {
property int workTime: 1500
property int restTime: 300
property bool autoStart: false
property bool syncSpotify: false
}
property string language: "auto"
}
}

Expand Down
90 changes: 46 additions & 44 deletions config/defaults/system.js
Original file line number Diff line number Diff line change
@@ -1,48 +1,50 @@
.pragma library

var data = {
"disks": ["/"],
"updateServiceEnabled": true,
"idle": {
"general": {
"lock_cmd": "ambxst lock",
"before_sleep_cmd": "loginctl lock-session",
"after_sleep_cmd": "ambxst screen on"
},
"listeners": [
{
"timeout": 150,
"onTimeout": "ambxst brightness 10 -s",
"onResume": "ambxst brightness -r"
},
{
"timeout": 300,
"onTimeout": "loginctl lock-session"
},
{
"timeout": 330,
"onTimeout": "ambxst screen off",
"onResume": "ambxst screen on"
},
{
"timeout": 1800,
"onTimeout": "ambxst suspend"
}
]
},
"ocr": {
"eng": true,
"spa": true,
"lat": false,
"jpn": false,
"chi_sim": false,
"chi_tra": false,
"kor": false
},
"pomodoro": {
"workTime": 1500,
"restTime": 300,
"autoStart": false,
"syncSpotify": false
}
"disks": ["/"],
"updateServiceEnabled": true,
"idle": {
"general": {
"lock_cmd": "ambxst lock",
"before_sleep_cmd": "loginctl lock-session",
"after_sleep_cmd": "ambxst screen on"
},
"listeners": [
{
"timeout": 150,
"onTimeout": "ambxst brightness 10 -s",
"onResume": "ambxst brightness -r"
},
{
"timeout": 300,
"onTimeout": "loginctl lock-session"
},
{
"timeout": 330,
"onTimeout": "ambxst screen off",
"onResume": "ambxst screen on"
},
{
"timeout": 1800,
"onTimeout": "ambxst suspend"
}
]
},
"ocr": {
"eng": true,
"spa": true,
"lat": false,
"jpn": false,
"chi_sim": false,
"chi_tra": false,
"kor": false,
"rus": false
},
"pomodoro": {
"workTime": 1500,
"restTime": 300,
"autoStart": false,
"syncSpotify": false
},
"language": "auto"
}
4 changes: 2 additions & 2 deletions modules/bar/BarContent.qml
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ Item {

StyledToolTip {
show: pinButton.hovered
tooltipText: root.pinned ? "Unpin bar" : "Pin bar"
tooltipText: root.pinned ? I18n.t("bar.tooltip.unpin_bar") : I18n.t("bar.tooltip.pin_bar")
}
}
}
Expand Down Expand Up @@ -708,7 +708,7 @@ Item {

StyledToolTip {
show: pinButtonV.hovered
tooltipText: root.pinned ? "Unpin bar" : "Pin bar"
tooltipText: root.pinned ? I18n.t("bar.tooltip.unpin_bar") : I18n.t("bar.tooltip.pin_bar")
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions modules/bar/BatteryIndicator.qml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ Item {

StyledToolTip {
visible: root.isHovered && !root.popupOpen
tooltipText: Battery.available ? ("Battery: " + Math.round(Battery.percentage) + "%" + (Battery.isCharging ? " (Charging)" : "")) : ("Power Profile: " + PowerProfile.getProfileDisplayName(PowerProfile.currentProfile))
tooltipText: Battery.available ? I18n.t("battery.status", Math.round(Battery.percentage)) : I18n.t("battery.power_profile", PowerProfile.getProfileDisplayName(PowerProfile.currentProfile))
}
}

Expand Down Expand Up @@ -240,15 +240,15 @@ Item {

Text {
Layout.fillWidth: true
text: Battery.isPluggedIn ? (Battery.isCharging ? "Charging" : "Full") : "On battery"
text: Battery.isPluggedIn ? (Battery.isCharging ? I18n.t("battery.charging") : I18n.t("battery.full")) : I18n.t("battery.on_battery")
font.family: Styling.defaultFont
font.pixelSize: Styling.fontSize(0)
font.bold: true
color: Colors.overBackground
}

Text {
text: Battery.isPluggedIn ? (Battery.timeToFull !== "" ? "Full in " + Battery.timeToFull : "Fully charged") : (Battery.timeToEmpty !== "" ? Battery.timeToEmpty + " remaining" : "")
text: Battery.isPluggedIn ? (Battery.timeToFull !== "" ? I18n.t("battery.full_in", Battery.timeToFull) : I18n.t("battery.fully_charged")) : (Battery.timeToEmpty !== "" ? I18n.t("battery.remaining", Battery.timeToEmpty) : "")
font.family: Styling.defaultFont
font.pixelSize: Styling.fontSize(-1)
color: Colors.overBackground
Expand Down
2 changes: 1 addition & 1 deletion modules/bar/ControlsButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Item {

StyledToolTip {
show: root.isHovered && !root.popupOpen
tooltipText: "Audio & Brightness Controls"
tooltipText: I18n.t("bar.tooltip.controls")
}

HoverHandler {
Expand Down
2 changes: 1 addition & 1 deletion modules/bar/LayoutSelectorButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Item {

StyledToolTip {
visible: root.isHovered && !root.popupOpen
tooltipText: "Layout: " + root.getLayoutDisplayName(GlobalStates.compositorLayout)
tooltipText: I18n.t("bar.tooltip.layout", root.getLayoutDisplayName(GlobalStates.compositorLayout))
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/bar/ToolsButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import qs.modules.services
ToggleButton {
id: toolsButton
buttonIcon: Icons.toolbox
tooltipText: "Tools"
tooltipText: I18n.t("bar.tooltip.tools")
onToggle: function () {
if (Visibilities.currentActiveModule === "tools") {
Visibilities.setActiveModule("");
Expand Down
52 changes: 40 additions & 12 deletions modules/bar/clock/Clock.qml
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,16 @@ Item {
anchors.topMargin: 16
spacing: 4

// Helper function to capitalize first letter
function capitalizeMonth(date) {
var month = date.toLocaleDateString(Qt.locale(), "MMMM");
return month.charAt(0).toUpperCase() + month.slice(1);
function getMonthName(date) {
var keys = [
"calendar.month.january", "calendar.month.february",
"calendar.month.march", "calendar.month.april",
"calendar.month.may", "calendar.month.june",
"calendar.month.july", "calendar.month.august",
"calendar.month.september", "calendar.month.october",
"calendar.month.november", "calendar.month.december"
];
return I18n.t(keys[date.getMonth()]);
}

// Header row: Month and events count
Expand All @@ -229,7 +235,7 @@ Item {
id: monthText
anchors.left: parent.left
anchors.leftMargin: 4
text: calendarContent.capitalizeMonth(calendarWrapper.currentDate)
text: calendarContent.getMonthName(calendarWrapper.currentDate)
color: Colors.outline
font.family: Config.theme.font
font.pixelSize: Styling.fontSize(0)
Expand Down Expand Up @@ -270,13 +276,16 @@ Item {
}
property bool isToday: index === calendarWrapper.currentDayOfWeek

// Day abbreviation from locale
Text {
anchors.horizontalCenter: parent.horizontalCenter
text: {
var dayName = dayColumn.dayDate.toLocaleDateString(Qt.locale(), "ddd");
// Capitalize first letter and limit to 2 chars
return (dayName.charAt(0).toUpperCase() + dayName.slice(1, 2)).replace(".", "");
var keys = [
"calendar.day.mon", "calendar.day.tue",
"calendar.day.wed", "calendar.day.thu",
"calendar.day.fri", "calendar.day.sat",
"calendar.day.sun"
];
return I18n.t(keys[dayColumn.index]);
}
color: Colors.overBackground
font.family: Config.theme.font
Expand Down Expand Up @@ -631,9 +640,28 @@ Item {

function updateDay() {
var now = new Date();
var day = Qt.formatDateTime(now, Qt.locale(), "ddd");
root.currentDayAbbrev = day.slice(0, 3).charAt(0).toUpperCase() + day.slice(1, 3);
root.currentFullDate = Qt.formatDateTime(now, Qt.locale(), "dddd, MMMM d, yyyy");
var dayKeys = [
"calendar.day.sun", "calendar.day.mon", "calendar.day.tue",
"calendar.day.wed", "calendar.day.thu", "calendar.day.fri",
"calendar.day.sat"
];
var dayFullKeys = [
"calendar.day_full.sunday", "calendar.day_full.monday",
"calendar.day_full.tuesday", "calendar.day_full.wednesday",
"calendar.day_full.thursday", "calendar.day_full.friday",
"calendar.day_full.saturday"
];
var monthKeys = [
"calendar.month.january", "calendar.month.february",
"calendar.month.march", "calendar.month.april",
"calendar.month.may", "calendar.month.june",
"calendar.month.july", "calendar.month.august",
"calendar.month.september", "calendar.month.october",
"calendar.month.november", "calendar.month.december"
];
root.currentDayAbbrev = I18n.t(dayKeys[now.getDay()]);
root.currentFullDate = I18n.t(dayFullKeys[now.getDay()]) + ", "
+ I18n.t(monthKeys[now.getMonth()]) + " " + now.getDate() + ", " + now.getFullYear();
scheduleNextDayUpdate();
}

Expand Down
12 changes: 6 additions & 6 deletions modules/bar/clock/Pomodoro.qml
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ Item {

Text {
anchors.centerIn: parent
text: root.isWorkSession ? "Work Session" : "Rest Session"
text: root.isWorkSession ? I18n.t("pomodoro.work_session") : I18n.t("pomodoro.rest_session")
font.family: Config.theme.font
font.pixelSize: Styling.fontSize(-1)
font.weight: Font.Bold
Expand Down Expand Up @@ -361,7 +361,7 @@ Item {
spacing: 12

ControlBtn {
text: "-1m"
text: I18n.t("pomodoro.minus_1m")
onClicked: {
if (root.timeLeft >= 60) {
root.timeLeft -= 60;
Expand All @@ -383,7 +383,7 @@ Item {

Text {
anchors.centerIn: parent
text: root.alarmActive ? "STOP ALARM" : (root.isRunning ? "PAUSE" : (root.isResuming ? "RESUME" : "START " + (root.isWorkSession ? "WORK" : "REST")))
text: root.alarmActive ? I18n.t("pomodoro.stop_alarm") : (root.isRunning ? I18n.t("pomodoro.pause") : (root.isResuming ? I18n.t("pomodoro.resume") : (root.isWorkSession ? I18n.t("pomodoro.start_work") : I18n.t("pomodoro.start_rest"))))
font.family: Config.theme.font
font.pixelSize: Styling.fontSize(0)
font.weight: Font.Black
Expand All @@ -398,7 +398,7 @@ Item {
}

ControlBtn {
text: "+1m"
text: I18n.t("pomodoro.plus_1m")
onClicked: {
root.timeLeft += 60;
if (!root.isRunning) {
Expand All @@ -420,7 +420,7 @@ Item {
RowLayout {
spacing: 8
Text {
text: "Auto"
text: I18n.t("common.auto")
font.family: Config.theme.font
font.pixelSize: Styling.fontSize(-1)
color: Colors.outline
Expand Down Expand Up @@ -450,7 +450,7 @@ Item {
RowLayout {
spacing: 8
Text {
text: "Sync Spotify"
text: I18n.t("pomodoro.sync_spotify")
font.family: Config.theme.font
font.pixelSize: Styling.fontSize(-1)
color: Colors.outline
Expand Down
9 changes: 7 additions & 2 deletions modules/bar/clock/Weather.qml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Quickshell.Io
import qs.config
import qs.modules.theme
import qs.modules.components
import qs.modules.services

StyledRect {
id: weatherContainer
Expand Down Expand Up @@ -182,8 +183,12 @@ StyledRect {

function updateDay() {
var now = new Date();
var day = Qt.formatDateTime(now, Qt.locale(), "ddd");
weatherContainer.currentDayAbbrev = day.slice(0, 3).charAt(0).toUpperCase() + day.slice(1, 3);
var dayKeys = [
"calendar.day.sun", "calendar.day.mon", "calendar.day.tue",
"calendar.day.wed", "calendar.day.thu", "calendar.day.fri",
"calendar.day.sat"
];
weatherContainer.currentDayAbbrev = I18n.t(dayKeys[now.getDay()]);
scheduleNextDayUpdate();
}

Expand Down
6 changes: 3 additions & 3 deletions modules/desktop/Desktop.qml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ PanelWindow {
console.log("Context menu requested for:", itemName);
Visibilities.contextMenu.openCustomMenu([
{
text: "Open",
text: I18n.t("desktop.open"),
icon: Icons.launch,
isSeparator: false,
onTriggered: function () {
Expand All @@ -121,7 +121,7 @@ PanelWindow {
text: ""
},
{
text: "Delete",
text: I18n.t("desktop.delete"),
icon: Icons.trash,
textColor: Colors.overError,
highlightColor: Colors.error,
Expand Down Expand Up @@ -239,7 +239,7 @@ PanelWindow {

Text {
anchors.centerIn: parent
text: "Loading desktop..."
text: I18n.t("lockscreen.loading")
color: "white"
font.family: Config.defaultFont
font.pixelSize: Styling.fontSize(0)
Expand Down
Loading