mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 13:32:50 -05:00
Compare commits
8 Commits
972fc534a4
...
6d4c31492c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d4c31492c | ||
|
|
f8c5f07e9f | ||
|
|
11e23feb0e | ||
|
|
b4ba2dac37 | ||
|
|
d013c3b718 | ||
|
|
b3ea28c5c4 | ||
|
|
775b381987 | ||
|
|
3a41f2f1ed |
@@ -6,6 +6,8 @@ This file is more of a quick reference so I know what to account for before next
|
||||
- dbus API for plugins, KDEConnect
|
||||
- new dank16 algorithm
|
||||
- launcher actions, customize env, args, name, icon
|
||||
- launcher v2 - omega stuff, GIF search, supa powerful
|
||||
- dock on bar
|
||||
|
||||
# 1.2.0
|
||||
|
||||
|
||||
@@ -91,6 +91,9 @@ bind = SUPER CTRL, up, movetoworkspace, e-1
|
||||
bind = SUPER CTRL, U, movetoworkspace, e+1
|
||||
bind = SUPER CTRL, I, movetoworkspace, e-1
|
||||
|
||||
# === Workspace Management ===
|
||||
bind = CTRL SHIFT, R, exec, dms ipc call workspace-rename open
|
||||
|
||||
# === Move Workspaces ===
|
||||
bind = SUPER SHIFT, Page_Down, movetoworkspace, e+1
|
||||
bind = SUPER SHIFT, Page_Up, movetoworkspace, e-1
|
||||
|
||||
@@ -133,6 +133,11 @@ binds {
|
||||
Mod+Ctrl+U { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+I { move-column-to-workspace-up; }
|
||||
|
||||
// === Workspace Management ===
|
||||
Ctrl+Shift+R hotkey-overlay-title="Rename Workspace" {
|
||||
spawn "dms" "ipc" "call" "workspace-rename" "open";
|
||||
}
|
||||
|
||||
// === Move Workspaces ===
|
||||
Mod+Shift+Page_Down { move-workspace-down; }
|
||||
Mod+Shift+Page_Up { move-workspace-up; }
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
pragma Singleton
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
readonly property var facts: [
|
||||
"A photon takes 100,000 to 200,000 years bouncing through the Sun's dense core, then races to Earth in just 8 minutes 20 seconds.",
|
||||
"A teaspoon of neutron star matter would weigh a billion metric tons here on Earth.",
|
||||
"Right now, 100 trillion solar neutrinos are passing through your body every second.",
|
||||
"The Sun converts 4 million metric tons of matter into pure energy every second—enough to power Earth for 500,000 years.",
|
||||
"The universe still glows with leftover heat from the Big Bang—just 2.7 degrees above absolute zero.",
|
||||
"There's a nebula out there that's actually colder than empty space itself.",
|
||||
"We've detected black holes crashing together by measuring spacetime stretch by less than 1/10,000th the width of a proton.",
|
||||
"Fast radio bursts can release more energy in 5 milliseconds than our Sun produces in 3 days.",
|
||||
"Our galaxy might be crawling with billions of rogue planets drifting alone in the dark.",
|
||||
"Distant galaxies can move away from us faster than light because space itself is stretching.",
|
||||
"The edge of what we can see is 46.5 billion light-years away, even though the universe is only 13.8 billion years old.",
|
||||
"The universe is mostly invisible: 5% regular matter, 27% dark matter, 68% dark energy.",
|
||||
"A day on Venus lasts longer than its entire year around the Sun.",
|
||||
"On Mercury, the time between sunrises is 176 Earth days long.",
|
||||
"In about 4.5 billion years, our galaxy will smash into Andromeda.",
|
||||
"Most of the gold in your jewelry was forged when neutron stars collided somewhere in space.",
|
||||
"PSR J1748-2446ad, the fastest spinning star, rotates 716 times per second—its equator moves at 24% the speed of light.",
|
||||
"Cosmic rays create particles that shouldn't make it to Earth's surface, but time dilation lets them sneak through.",
|
||||
"Jupiter's magnetic field is so huge that if we could see it, it would look bigger than the Moon in our sky.",
|
||||
"Interstellar space is so empty it's like a cube 32 kilometers wide containing just a single grain of sand.",
|
||||
"Voyager 1 is 24 billion kilometers away but won't leave the Sun's gravitational influence for another 30,000 years.",
|
||||
"Counting to a billion at one number per second would take over 31 years.",
|
||||
"Space is so vast, even speeding at light-speed, you'd never return past the cosmic horizon.",
|
||||
"Astronauts on the ISS age about 0.01 seconds less each year than people on Earth.",
|
||||
"Sagittarius B2, a dust cloud near our galaxy's center, contains ethyl formate—the compound that gives raspberries their flavor and rum its smell.",
|
||||
"Beyond 16 billion light-years, the cosmic event horizon marks where space expands too fast for light to ever reach us again.",
|
||||
"Even at light-speed, you'd never catch up to most galaxies—space expands faster.",
|
||||
"Only around 5% of galaxies are ever reachable—even at light-speed.",
|
||||
"If the Sun vanished, we'd still orbit it for 8 minutes before drifting away.",
|
||||
"If a planet 65 million light-years away looked at Earth now, it'd see dinosaurs.",
|
||||
"Our oldest radio signals will reach the Milky Way's center in 26,000 years.",
|
||||
"Every atom in your body heavier than hydrogen was forged in the nuclear furnace of a dying star.",
|
||||
"The Moon moves 3.8 centimeters farther from Earth every year.",
|
||||
"The universe creates 275 million new stars every single day.",
|
||||
"Jupiter's Great Red Spot is a storm twice the size of Earth that has been raging for at least 350 years.",
|
||||
"If you watched someone fall into a black hole, they'd appear frozen at the event horizon forever—time effectively stops from your perspective.",
|
||||
"The Boötes Supervoid is a cosmic desert 1.8 billion light-years across with 60% fewer galaxies than it should have."
|
||||
]
|
||||
|
||||
function getRandomFact() {
|
||||
return facts[Math.floor(Math.random() * facts.length)]
|
||||
}
|
||||
}
|
||||
@@ -100,7 +100,8 @@ const DMS_ACTIONS = [
|
||||
{ id: "spawn dms ipc call hypr openOverview", label: "Hyprland: Open Overview", compositor: "hyprland" },
|
||||
{ id: "spawn dms ipc call hypr closeOverview", label: "Hyprland: Close Overview", compositor: "hyprland" },
|
||||
{ id: "spawn dms ipc call wallpaper next", label: "Wallpaper: Next" },
|
||||
{ id: "spawn dms ipc call wallpaper prev", label: "Wallpaper: Previous" }
|
||||
{ id: "spawn dms ipc call wallpaper prev", label: "Wallpaper: Previous" },
|
||||
{ id: "spawn dms ipc call workspace-rename open", label: "Workspace: Rename" }
|
||||
];
|
||||
|
||||
const NIRI_ACTIONS = {
|
||||
|
||||
@@ -146,6 +146,7 @@ Singleton {
|
||||
|
||||
property bool use24HourClock: true
|
||||
property bool showSeconds: false
|
||||
property bool padHours12Hour: false
|
||||
property bool useFahrenheit: false
|
||||
property string windSpeedUnit: "kmh"
|
||||
property bool nightModeEnabled: false
|
||||
@@ -273,6 +274,8 @@ Singleton {
|
||||
property string spotlightModalViewMode: "list"
|
||||
property string browserPickerViewMode: "grid"
|
||||
property var browserUsageHistory: ({})
|
||||
property string appPickerViewMode: "grid"
|
||||
property var filePickerUsageHistory: ({})
|
||||
property bool sortAppsAlphabetically: false
|
||||
property int appLauncherGridColumns: 4
|
||||
property bool spotlightCloseNiriOverview: true
|
||||
@@ -452,6 +455,7 @@ Singleton {
|
||||
property bool lockScreenShowDate: true
|
||||
property bool lockScreenShowProfileImage: true
|
||||
property bool lockScreenShowPasswordField: true
|
||||
property bool lockScreenShowMediaPlayer: true
|
||||
property bool lockScreenPowerOffMonitorsOnLock: false
|
||||
|
||||
property bool enableFprint: false
|
||||
@@ -1251,11 +1255,11 @@ Singleton {
|
||||
}
|
||||
|
||||
function getEffectiveTimeFormat() {
|
||||
if (use24HourClock) {
|
||||
if (use24HourClock)
|
||||
return showSeconds ? "hh:mm:ss" : "hh:mm";
|
||||
} else {
|
||||
return showSeconds ? "h:mm:ss AP" : "h:mm AP";
|
||||
}
|
||||
if (padHours12Hour)
|
||||
return showSeconds ? "hh:mm:ss AP" : "hh:mm AP";
|
||||
return showSeconds ? "h:mm:ss AP" : "h:mm AP";
|
||||
}
|
||||
|
||||
function getEffectiveClockDateFormat() {
|
||||
|
||||
@@ -32,6 +32,7 @@ var SPEC = {
|
||||
|
||||
use24HourClock: { def: true },
|
||||
showSeconds: { def: false },
|
||||
padHours12Hour: { def: false },
|
||||
useFahrenheit: { def: false },
|
||||
windSpeedUnit: { def: "kmh" },
|
||||
nightModeEnabled: { def: false },
|
||||
@@ -132,6 +133,10 @@ var SPEC = {
|
||||
|
||||
appLauncherViewMode: { def: "list" },
|
||||
spotlightModalViewMode: { def: "list" },
|
||||
browserPickerViewMode: { def: "grid" },
|
||||
browserUsageHistory: { def: {} },
|
||||
appPickerViewMode: { def: "grid" },
|
||||
filePickerUsageHistory: { def: {} },
|
||||
sortAppsAlphabetically: { def: false },
|
||||
appLauncherGridColumns: { def: 4 },
|
||||
spotlightCloseNiriOverview: { def: true },
|
||||
@@ -276,6 +281,7 @@ var SPEC = {
|
||||
lockScreenShowDate: { def: true },
|
||||
lockScreenShowProfileImage: { def: true },
|
||||
lockScreenShowPasswordField: { def: true },
|
||||
lockScreenShowMediaPlayer: { def: true },
|
||||
lockScreenPowerOffMonitorsOnLock: { def: false },
|
||||
enableFprint: { def: false },
|
||||
maxFprintTries: { def: 15 },
|
||||
|
||||
@@ -550,6 +550,11 @@ Item {
|
||||
AppPickerModal {
|
||||
id: filePickerModal
|
||||
title: I18n.tr("Open with...")
|
||||
viewMode: SettingsData.appPickerViewMode || "grid"
|
||||
|
||||
onViewModeChanged: {
|
||||
SettingsData.set("appPickerViewMode", viewMode)
|
||||
}
|
||||
|
||||
function shellEscape(str) {
|
||||
return "'" + str.replace(/'/g, "'\\''") + "'";
|
||||
@@ -644,6 +649,18 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
LazyLoader {
|
||||
id: workspaceRenameModalLoader
|
||||
|
||||
active: false
|
||||
|
||||
Component.onCompleted: PopoutService.workspaceRenameModalLoader = workspaceRenameModalLoader
|
||||
|
||||
WorkspaceRenameModal {
|
||||
id: workspaceRenameModal
|
||||
}
|
||||
}
|
||||
|
||||
LazyLoader {
|
||||
id: processListModalLoader
|
||||
|
||||
@@ -769,6 +786,7 @@ Item {
|
||||
hyprKeybindsModalLoader: hyprKeybindsModalLoader
|
||||
dankBarRepeater: dankBarRepeater
|
||||
hyprlandOverviewLoader: hyprlandOverviewLoader
|
||||
workspaceRenameModalLoader: workspaceRenameModalLoader
|
||||
}
|
||||
|
||||
Variants {
|
||||
|
||||
@@ -15,6 +15,7 @@ Item {
|
||||
required property var hyprKeybindsModalLoader
|
||||
required property var dankBarRepeater
|
||||
required property var hyprlandOverviewLoader
|
||||
required property var workspaceRenameModalLoader
|
||||
|
||||
function getFirstBar() {
|
||||
if (!root.dankBarRepeater || root.dankBarRepeater.count === 0)
|
||||
@@ -1062,7 +1063,7 @@ Item {
|
||||
}
|
||||
|
||||
function toggleQuery(query: string): string {
|
||||
PopoutService.toggleDankLauncherV2();
|
||||
PopoutService.toggleDankLauncherV2WithQuery(query);
|
||||
return "LAUNCHER_TOGGLE_QUERY_SUCCESS";
|
||||
}
|
||||
|
||||
@@ -1106,7 +1107,7 @@ Item {
|
||||
}
|
||||
|
||||
function toggleQuery(query: string): string {
|
||||
PopoutService.toggleDankLauncherV2();
|
||||
PopoutService.toggleDankLauncherV2WithQuery(query);
|
||||
return "SPOTLIGHT_TOGGLE_QUERY_SUCCESS";
|
||||
}
|
||||
|
||||
@@ -1292,4 +1293,40 @@ Item {
|
||||
|
||||
target: "desktopWidget"
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
function open(): string {
|
||||
root.workspaceRenameModalLoader.active = true;
|
||||
if (root.workspaceRenameModalLoader.item) {
|
||||
const ws = NiriService.workspaces[NiriService.focusedWorkspaceId];
|
||||
root.workspaceRenameModalLoader.item.show(ws?.name || "");
|
||||
return "WORKSPACE_RENAME_MODAL_OPENED";
|
||||
}
|
||||
return "WORKSPACE_RENAME_MODAL_NOT_FOUND";
|
||||
}
|
||||
|
||||
function close(): string {
|
||||
if (root.workspaceRenameModalLoader.item) {
|
||||
root.workspaceRenameModalLoader.item.hide();
|
||||
return "WORKSPACE_RENAME_MODAL_CLOSED";
|
||||
}
|
||||
return "WORKSPACE_RENAME_MODAL_NOT_FOUND";
|
||||
}
|
||||
|
||||
function toggle(): string {
|
||||
root.workspaceRenameModalLoader.active = true;
|
||||
if (root.workspaceRenameModalLoader.item) {
|
||||
if (root.workspaceRenameModalLoader.item.visible) {
|
||||
root.workspaceRenameModalLoader.item.hide();
|
||||
return "WORKSPACE_RENAME_MODAL_CLOSED";
|
||||
}
|
||||
const ws = NiriService.workspaces[NiriService.focusedWorkspaceId];
|
||||
root.workspaceRenameModalLoader.item.show(ws?.name || "");
|
||||
return "WORKSPACE_RENAME_MODAL_OPENED";
|
||||
}
|
||||
return "WORKSPACE_RENAME_MODAL_NOT_FOUND";
|
||||
}
|
||||
|
||||
target: "workspace-rename"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,6 +50,13 @@ Rectangle {
|
||||
result.push(selectedItem.actions[i]);
|
||||
}
|
||||
}
|
||||
if (SessionService.nvidiaCommand) {
|
||||
result.push({
|
||||
name: I18n.tr("Launch on dGPU"),
|
||||
icon: "memory",
|
||||
action: "launch_dgpu"
|
||||
});
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -686,14 +686,6 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
if (SessionService.nvidiaCommand) {
|
||||
actions.push({
|
||||
name: I18n.tr("Launch on dGPU"),
|
||||
icon: "memory",
|
||||
action: "launch_dgpu"
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
id: appId,
|
||||
type: "app",
|
||||
|
||||
@@ -186,6 +186,14 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
function toggleWithQuery(query) {
|
||||
if (spotlightOpen) {
|
||||
hide();
|
||||
} else {
|
||||
showWithQuery(query);
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: closeCleanupTimer
|
||||
interval: Theme.expressiveDurations.expressiveFastSpatial + 50
|
||||
|
||||
@@ -131,6 +131,16 @@ Popup {
|
||||
items.push({
|
||||
type: "separator"
|
||||
});
|
||||
|
||||
if (isRegularApp && SessionService.nvidiaCommand) {
|
||||
items.push({
|
||||
type: "item",
|
||||
icon: "memory",
|
||||
text: I18n.tr("Launch on dGPU"),
|
||||
action: launchWithNvidia
|
||||
});
|
||||
}
|
||||
|
||||
items.push({
|
||||
type: "item",
|
||||
icon: "launch",
|
||||
|
||||
229
quickshell/Modals/WorkspaceRenameModal.qml
Normal file
229
quickshell/Modals/WorkspaceRenameModal.qml
Normal file
@@ -0,0 +1,229 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
FloatingWindow {
|
||||
id: root
|
||||
|
||||
readonly property int inputFieldHeight: Theme.fontSizeMedium + Theme.spacingL * 2
|
||||
|
||||
objectName: "workspaceRenameModal"
|
||||
title: I18n.tr("Rename Workspace")
|
||||
minimumSize: Qt.size(400, 160)
|
||||
maximumSize: Qt.size(400, 160)
|
||||
color: Theme.surfaceContainer
|
||||
visible: false
|
||||
|
||||
function show(name) {
|
||||
nameInput.text = name;
|
||||
visible = true;
|
||||
Qt.callLater(() => nameInput.forceActiveFocus());
|
||||
}
|
||||
|
||||
function hide() {
|
||||
visible = false;
|
||||
}
|
||||
|
||||
function submitAndClose() {
|
||||
renameWorkspace(nameInput.text);
|
||||
hide();
|
||||
}
|
||||
|
||||
function renameWorkspace(name) {
|
||||
if (CompositorService.isNiri) {
|
||||
NiriService.renameWorkspace(name);
|
||||
} else if (CompositorService.isHyprland) {
|
||||
HyprlandService.renameWorkspace(name);
|
||||
} else {
|
||||
console.warn("WorkspaceRenameModal: rename not supported for this compositor");
|
||||
}
|
||||
}
|
||||
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
Qt.callLater(() => nameInput.forceActiveFocus());
|
||||
return;
|
||||
}
|
||||
nameInput.text = "";
|
||||
}
|
||||
|
||||
FocusScope {
|
||||
id: contentFocusScope
|
||||
|
||||
anchors.fill: parent
|
||||
focus: true
|
||||
|
||||
Keys.onEscapePressed: event => {
|
||||
hide();
|
||||
event.accepted = true;
|
||||
}
|
||||
|
||||
Column {
|
||||
id: contentCol
|
||||
anchors.centerIn: parent
|
||||
width: parent.width - Theme.spacingL * 2
|
||||
spacing: Theme.spacingM
|
||||
|
||||
Item {
|
||||
width: contentCol.width
|
||||
height: Math.max(headerText.height, buttonRow.height)
|
||||
|
||||
MouseArea {
|
||||
anchors.left: parent.left
|
||||
anchors.right: buttonRow.left
|
||||
anchors.rightMargin: Theme.spacingM
|
||||
height: parent.height
|
||||
onPressed: windowControls.tryStartMove()
|
||||
onDoubleClicked: windowControls.tryToggleMaximize()
|
||||
}
|
||||
|
||||
StyledText {
|
||||
id: headerText
|
||||
text: I18n.tr("Enter a new name for this workspace")
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.surfaceTextMedium
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: parent.width - buttonRow.width - Theme.spacingM
|
||||
}
|
||||
|
||||
Row {
|
||||
id: buttonRow
|
||||
anchors.right: parent.right
|
||||
spacing: Theme.spacingXS
|
||||
|
||||
DankActionButton {
|
||||
visible: windowControls.supported && windowControls.canMaximize
|
||||
iconName: root.maximized ? "fullscreen_exit" : "fullscreen"
|
||||
iconSize: Theme.iconSize - 4
|
||||
iconColor: Theme.surfaceText
|
||||
onClicked: windowControls.tryToggleMaximize()
|
||||
}
|
||||
|
||||
DankActionButton {
|
||||
iconName: "close"
|
||||
iconSize: Theme.iconSize - 4
|
||||
iconColor: Theme.surfaceText
|
||||
onClicked: hide()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: inputFieldHeight
|
||||
radius: Theme.cornerRadius
|
||||
color: Theme.surfaceHover
|
||||
border.color: nameInput.activeFocus ? Theme.primary : Theme.outlineStrong
|
||||
border.width: nameInput.activeFocus ? 2 : 1
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: nameInput.forceActiveFocus()
|
||||
}
|
||||
|
||||
DankTextField {
|
||||
id: nameInput
|
||||
|
||||
anchors.fill: parent
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
textColor: Theme.surfaceText
|
||||
placeholderText: I18n.tr("Workspace name")
|
||||
backgroundColor: "transparent"
|
||||
enabled: root.visible
|
||||
onAccepted: submitAndClose()
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
width: parent.width
|
||||
height: 40
|
||||
|
||||
Row {
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: Theme.spacingM
|
||||
|
||||
Rectangle {
|
||||
width: Math.max(70, cancelText.contentWidth + Theme.spacingM * 2)
|
||||
height: 36
|
||||
radius: Theme.cornerRadius
|
||||
color: cancelArea.containsMouse ? Theme.surfaceTextHover : "transparent"
|
||||
border.color: Theme.surfaceVariantAlpha
|
||||
border.width: 1
|
||||
|
||||
StyledText {
|
||||
id: cancelText
|
||||
anchors.centerIn: parent
|
||||
text: I18n.tr("Cancel")
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.surfaceText
|
||||
font.weight: Font.Medium
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: cancelArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: hide()
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: Math.max(80, renameText.contentWidth + Theme.spacingM * 2)
|
||||
height: 36
|
||||
radius: Theme.cornerRadius
|
||||
color: renameArea.containsMouse ? Qt.darker(Theme.primary, 1.1) : Theme.primary
|
||||
|
||||
StyledText {
|
||||
id: renameText
|
||||
anchors.centerIn: parent
|
||||
text: I18n.tr("Rename")
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.background
|
||||
font.weight: Font.Medium
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: renameArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: submitAndClose()
|
||||
}
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: Theme.shortDuration
|
||||
easing.type: Theme.standardEasing
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FloatingWindowControls {
|
||||
id: windowControls
|
||||
targetWindow: root
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
target: "workspace-rename"
|
||||
|
||||
function open(): string {
|
||||
const ws = NiriService.workspaces[NiriService.focusedWorkspaceId];
|
||||
show(ws?.name || "");
|
||||
return "WORKSPACE_RENAME_MODAL_OPENED";
|
||||
}
|
||||
|
||||
function close(): string {
|
||||
hide();
|
||||
return "WORKSPACE_RENAME_MODAL_CLOSED";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,13 +30,13 @@ BasePill {
|
||||
|
||||
StyledText {
|
||||
text: {
|
||||
if (SettingsData.use24HourClock) {
|
||||
return String(systemClock?.date?.getHours()).padStart(2, '0').charAt(0);
|
||||
} else {
|
||||
const hours = systemClock?.date?.getHours();
|
||||
const display = hours === 0 ? 12 : hours > 12 ? hours - 12 : hours;
|
||||
const hours = systemClock?.date?.getHours();
|
||||
if (SettingsData.use24HourClock)
|
||||
return String(hours).padStart(2, '0').charAt(0);
|
||||
const display = hours === 0 ? 12 : hours > 12 ? hours - 12 : hours;
|
||||
if (SettingsData.padHours12Hour)
|
||||
return String(display).padStart(2, '0').charAt(0);
|
||||
}
|
||||
return display >= 10 ? String(display).charAt(0) : "";
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
color: Theme.widgetTextColor
|
||||
@@ -47,13 +47,13 @@ BasePill {
|
||||
|
||||
StyledText {
|
||||
text: {
|
||||
if (SettingsData.use24HourClock) {
|
||||
return String(systemClock?.date?.getHours()).padStart(2, '0').charAt(1);
|
||||
} else {
|
||||
const hours = systemClock?.date?.getHours();
|
||||
const display = hours === 0 ? 12 : hours > 12 ? hours - 12 : hours;
|
||||
const hours = systemClock?.date?.getHours();
|
||||
if (SettingsData.use24HourClock)
|
||||
return String(hours).padStart(2, '0').charAt(1);
|
||||
const display = hours === 0 ? 12 : hours > 12 ? hours - 12 : hours;
|
||||
if (SettingsData.padHours12Hour)
|
||||
return String(display).padStart(2, '0').charAt(1);
|
||||
}
|
||||
return display >= 10 ? String(display).charAt(1) : String(display);
|
||||
}
|
||||
font.pixelSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale)
|
||||
color: Theme.widgetTextColor
|
||||
|
||||
@@ -20,6 +20,7 @@ Singleton {
|
||||
property string matugenScheme: "scheme-tonal-spot"
|
||||
property bool use24HourClock: true
|
||||
property bool showSeconds: false
|
||||
property bool padHours12Hour: false
|
||||
property bool useFahrenheit: false
|
||||
property bool nightModeEnabled: false
|
||||
property string weatherLocation: "New York, NY"
|
||||
@@ -39,6 +40,7 @@ Singleton {
|
||||
property string widgetBackgroundColor: "sch"
|
||||
property string lockDateFormat: ""
|
||||
property bool lockScreenShowPowerActions: true
|
||||
property bool lockScreenShowProfileImage: true
|
||||
property var screenPreferences: ({})
|
||||
property int animationSpeed: 2
|
||||
property string wallpaperFillMode: "Fill"
|
||||
@@ -52,6 +54,7 @@ Singleton {
|
||||
matugenScheme = settings.matugenScheme !== undefined ? settings.matugenScheme : "scheme-tonal-spot";
|
||||
use24HourClock = settings.use24HourClock !== undefined ? settings.use24HourClock : true;
|
||||
showSeconds = settings.showSeconds !== undefined ? settings.showSeconds : false;
|
||||
padHours12Hour = settings.padHours12Hour !== undefined ? settings.padHours12Hour : false;
|
||||
useFahrenheit = settings.useFahrenheit !== undefined ? settings.useFahrenheit : false;
|
||||
nightModeEnabled = settings.nightModeEnabled !== undefined ? settings.nightModeEnabled : false;
|
||||
weatherLocation = settings.weatherLocation !== undefined ? settings.weatherLocation : "New York, NY";
|
||||
@@ -71,6 +74,7 @@ Singleton {
|
||||
widgetBackgroundColor = settings.widgetBackgroundColor !== undefined ? settings.widgetBackgroundColor : "sch";
|
||||
lockDateFormat = settings.lockDateFormat !== undefined ? settings.lockDateFormat : "";
|
||||
lockScreenShowPowerActions = settings.lockScreenShowPowerActions !== undefined ? settings.lockScreenShowPowerActions : true;
|
||||
lockScreenShowProfileImage = settings.lockScreenShowProfileImage !== undefined ? settings.lockScreenShowProfileImage : true;
|
||||
screenPreferences = settings.screenPreferences !== undefined ? settings.screenPreferences : ({});
|
||||
animationSpeed = settings.animationSpeed !== undefined ? settings.animationSpeed : 2;
|
||||
wallpaperFillMode = settings.wallpaperFillMode !== undefined ? settings.wallpaperFillMode : "Fill";
|
||||
@@ -88,6 +92,14 @@ Singleton {
|
||||
}
|
||||
}
|
||||
|
||||
function getEffectiveTimeFormat() {
|
||||
if (use24HourClock)
|
||||
return showSeconds ? "hh:mm:ss" : "hh:mm";
|
||||
if (padHours12Hour)
|
||||
return showSeconds ? "hh:mm:ss AP" : "hh:mm AP";
|
||||
return showSeconds ? "h:mm:ss AP" : "h:mm AP";
|
||||
}
|
||||
|
||||
function getEffectiveLockDateFormat() {
|
||||
return lockDateFormat && lockDateFormat.length > 0 ? lockDateFormat : Locale.LongFormat;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ Item {
|
||||
|
||||
readonly property string xdgDataDirs: Quickshell.env("XDG_DATA_DIRS")
|
||||
property string screenName: ""
|
||||
property string randomFact: ""
|
||||
property string hyprlandCurrentLayout: ""
|
||||
property string hyprlandKeyboard: ""
|
||||
property int hyprlandLayoutCount: 0
|
||||
@@ -31,10 +30,6 @@ Item {
|
||||
|
||||
signal launchRequested
|
||||
|
||||
function pickRandomFact() {
|
||||
randomFact = Facts.getRandomFact();
|
||||
}
|
||||
|
||||
property bool weatherInitialized: false
|
||||
|
||||
function initWeatherService() {
|
||||
@@ -58,7 +53,6 @@ Item {
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
pickRandomFact();
|
||||
initWeatherService();
|
||||
|
||||
if (isPrimaryScreen)
|
||||
@@ -223,7 +217,7 @@ Item {
|
||||
spacing: 0
|
||||
|
||||
property string fullTimeStr: {
|
||||
const format = GreetdSettings.use24HourClock ? (GreetdSettings.showSeconds ? "HH:mm:ss" : "HH:mm") : (GreetdSettings.showSeconds ? "h:mm:ss AP" : "h:mm AP");
|
||||
const format = GreetdSettings.getEffectiveTimeFormat();
|
||||
return systemClock.date.toLocaleTimeString(Qt.locale(), format);
|
||||
}
|
||||
property var timeParts: fullTimeStr.split(':')
|
||||
@@ -369,6 +363,7 @@ Item {
|
||||
return PortalService.profileImage;
|
||||
}
|
||||
fallbackIcon: "person"
|
||||
visible: GreetdSettings.lockScreenShowProfileImage
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@@ -961,20 +956,6 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
StyledText {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.margins: Theme.spacingL
|
||||
width: Math.min(parent.width - Theme.spacingXL * 2, implicitWidth)
|
||||
text: root.randomFact
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: "white"
|
||||
opacity: 0.8
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
wrapMode: Text.NoWrap
|
||||
visible: root.randomFact !== ""
|
||||
}
|
||||
|
||||
DankActionButton {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
|
||||
@@ -25,7 +25,6 @@ Item {
|
||||
property string screenName: ""
|
||||
property bool unlocking: false
|
||||
property string pamState: ""
|
||||
property string randomFact: ""
|
||||
property string hyprlandCurrentLayout: ""
|
||||
property string hyprlandKeyboard: ""
|
||||
property int hyprlandLayoutCount: 0
|
||||
@@ -41,15 +40,7 @@ Item {
|
||||
pamState = "";
|
||||
}
|
||||
|
||||
function pickRandomFact() {
|
||||
randomFact = Facts.getRandomFact();
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
if (demoMode) {
|
||||
pickRandomFact();
|
||||
}
|
||||
|
||||
WeatherService.addRef();
|
||||
UserInfoService.getUserInfo();
|
||||
|
||||
@@ -61,11 +52,6 @@ Item {
|
||||
lockerReadyArmed = true;
|
||||
}
|
||||
|
||||
onDemoModeChanged: {
|
||||
if (demoMode) {
|
||||
pickRandomFact();
|
||||
}
|
||||
}
|
||||
Component.onDestruction: {
|
||||
WeatherService.removeRef();
|
||||
if (CompositorService.isHyprland) {
|
||||
@@ -1195,12 +1181,12 @@ Item {
|
||||
height: 24
|
||||
color: Qt.rgba(255, 255, 255, 0.2)
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: MprisController.activePlayer
|
||||
visible: MprisController.activePlayer && SettingsData.lockScreenShowMediaPlayer
|
||||
}
|
||||
|
||||
Row {
|
||||
spacing: Theme.spacingS
|
||||
visible: MprisController.activePlayer
|
||||
visible: MprisController.activePlayer && SettingsData.lockScreenShowMediaPlayer
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Item {
|
||||
@@ -1369,7 +1355,7 @@ Item {
|
||||
height: 24
|
||||
color: Qt.rgba(255, 255, 255, 0.2)
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: MprisController.activePlayer && WeatherService.weather.available
|
||||
visible: MprisController.activePlayer && SettingsData.lockScreenShowMediaPlayer && WeatherService.weather.available
|
||||
}
|
||||
|
||||
Row {
|
||||
@@ -1606,20 +1592,6 @@ Item {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StyledText {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.margins: Theme.spacingL
|
||||
width: Math.min(parent.width - Theme.spacingXL * 2, implicitWidth)
|
||||
text: root.randomFact
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: "white"
|
||||
opacity: 0.8
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
wrapMode: Text.NoWrap
|
||||
visible: root.randomFact !== ""
|
||||
}
|
||||
}
|
||||
|
||||
Pam {
|
||||
|
||||
@@ -42,8 +42,6 @@ DankPopout {
|
||||
if (!shouldBeVisible) {
|
||||
searchText = "";
|
||||
expandedPid = "";
|
||||
if (processesView)
|
||||
processesView.reset();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,8 +106,11 @@ DankPopout {
|
||||
Connections {
|
||||
target: processListPopout
|
||||
function onShouldBeVisibleChanged() {
|
||||
if (processListPopout.shouldBeVisible)
|
||||
if (processListPopout.shouldBeVisible) {
|
||||
Qt.callLater(() => processListContent.forceActiveFocus());
|
||||
} else {
|
||||
processesView.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -76,6 +76,14 @@ Item {
|
||||
onToggled: checked => SettingsData.set("lockScreenShowPasswordField", checked)
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "lockScreenShowMediaPlayer"
|
||||
tags: ["lock", "screen", "media", "player", "music", "mpris"]
|
||||
text: I18n.tr("Show Media Player", "Enable media player controls on the lock screen window")
|
||||
checked: SettingsData.lockScreenShowMediaPlayer
|
||||
onToggled: checked => SettingsData.set("lockScreenShowMediaPlayer", checked)
|
||||
}
|
||||
|
||||
SettingsDropdownRow {
|
||||
settingKey: "lockScreenNotificationMode"
|
||||
tags: ["lock", "screen", "notification", "notifications", "privacy"]
|
||||
|
||||
@@ -49,6 +49,17 @@ Item {
|
||||
checked: SettingsData.showSeconds
|
||||
onToggled: checked => SettingsData.set("showSeconds", checked)
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
tab: "time"
|
||||
tags: ["time", "12hour", "format", "padding", "leading", "zero"]
|
||||
settingKey: "padHours12Hour"
|
||||
text: I18n.tr("Pad Hours")
|
||||
description: "02:31 PM vs 2:31 PM"
|
||||
checked: SettingsData.padHours12Hour
|
||||
onToggled: checked => SettingsData.set("padHours12Hour", checked)
|
||||
visible: !SettingsData.use24HourClock
|
||||
}
|
||||
}
|
||||
|
||||
SettingsCard {
|
||||
|
||||
@@ -737,4 +737,10 @@ Singleton {
|
||||
if (callback) callback(response);
|
||||
});
|
||||
}
|
||||
|
||||
function renameWorkspace(name, callback) {
|
||||
sendRequest("extworkspace.renameWorkspace", {
|
||||
"name": name
|
||||
}, callback);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -308,4 +308,18 @@ decoration {
|
||||
reloadConfig();
|
||||
});
|
||||
}
|
||||
|
||||
function renameWorkspace(newName) {
|
||||
if (!Hyprland.focusedWorkspace)
|
||||
return;
|
||||
const wsId = Hyprland.focusedWorkspace.id;
|
||||
if (!wsId)
|
||||
return;
|
||||
const fullName = wsId + " " + newName;
|
||||
Proc.runCommand("hyprland-rename-ws", ["hyprctl", "dispatch", "renameworkspace", String(wsId), fullName], (output, exitCode) => {
|
||||
if (exitCode !== 0) {
|
||||
console.warn("HyprlandService: Failed to rename workspace:", output);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1422,6 +1422,17 @@ Singleton {
|
||||
return block;
|
||||
}
|
||||
|
||||
function renameWorkspace(name) {
|
||||
return send({
|
||||
"Action": {
|
||||
"SetWorkspaceName": {
|
||||
"name": name,
|
||||
"workspace": null
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
function screenshot(): string {
|
||||
if (!CompositorService.isNiri) {
|
||||
|
||||
@@ -416,6 +416,17 @@ Singleton {
|
||||
}
|
||||
}
|
||||
|
||||
function toggleDankLauncherV2WithQuery(query: string) {
|
||||
if (dankLauncherV2Modal) {
|
||||
dankLauncherV2Modal.toggleWithQuery(query);
|
||||
} else if (dankLauncherV2ModalLoader) {
|
||||
_dankLauncherV2PendingQuery = query;
|
||||
_dankLauncherV2WantsOpen = true;
|
||||
_dankLauncherV2WantsToggle = false;
|
||||
dankLauncherV2ModalLoader.active = true;
|
||||
}
|
||||
}
|
||||
|
||||
function _onDankLauncherV2ModalLoaded() {
|
||||
if (_dankLauncherV2WantsOpen) {
|
||||
_dankLauncherV2WantsOpen = false;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @name dms-midnight
|
||||
* @description midnight-discord, generated by dms
|
||||
* @name midnight
|
||||
* @description A dark, rounded discord theme.
|
||||
* @author refact0r
|
||||
* @version 1.6.2
|
||||
* @invite nz87hXyvcy
|
||||
@@ -17,13 +17,13 @@
|
||||
/* customize things here */
|
||||
:root {
|
||||
/* font, change to 'gg sans' for default discord font*/
|
||||
--font: 'figtree';
|
||||
--font: 'gg sans';
|
||||
|
||||
/* top left corner text */
|
||||
--corner-text: 'Midnight';
|
||||
|
||||
/* color of status indicators and window controls */
|
||||
--online-indicator: {{colors.inverse_primary.default.hex}}; /* change to #23a55a for default green */
|
||||
--online-indicator: {{colors.inverse_primary.default.hex}}; /* change to #23a55a for default green */
|
||||
--dnd-indicator: {{colors.error.default.hex}}; /* change to #f13f43 for default red */
|
||||
--idle-indicator: {{colors.tertiary_container.default.hex}}; /* change to #f0b232 for default yellow */
|
||||
--streaming-indicator: {{colors.on_primary.default.hex}}; /* change to #593695 for default purple */
|
||||
@@ -34,11 +34,11 @@
|
||||
--accent-3: {{colors.primary.default.hex}}; /* accent buttons */
|
||||
--accent-4: {{colors.surface_bright.default.hex}}; /* accent buttons when hovered */
|
||||
--accent-5: {{colors.primary_fixed_dim.default.hex}}; /* accent buttons when clicked */
|
||||
--mention: {{colors.background.default.hex}}; /* mentions & mention messages */
|
||||
--mention: {{colors.surface.default.hex}}; /* mentions & mention messages */
|
||||
--mention-hover: {{colors.surface_bright.default.hex}}; /* mentions & mention messages when hovered */
|
||||
|
||||
/* text colors */
|
||||
--text-0: {{colors.background.default.hex}}; /* text on colored elements */
|
||||
--text-0: {{colors.surface.default.hex}}; /* text on colored elements */
|
||||
--text-1: {{colors.on_surface.default.hex}}; /* other normally white text */
|
||||
--text-2: {{colors.on_surface.default.hex}}; /* headings and important text */
|
||||
--text-3: {{colors.on_surface_variant.default.hex}}; /* normal text */
|
||||
@@ -46,10 +46,10 @@
|
||||
--text-5: {{colors.outline.default.hex}}; /* muted channels/chats and timestamps */
|
||||
|
||||
/* background and dark colors */
|
||||
--bg-1: {{colors.primary.default.hex}}; /* dark buttons when clicked */
|
||||
--bg-2: {{colors.surface_container.default.hex}}; /* dark buttons */
|
||||
--bg-1: {{colors.surface_variant.default.hex}}; /* dark buttons when clicked */
|
||||
--bg-2: {{colors.surface_container_high.default.hex}}; /* dark buttons */
|
||||
--bg-3: {{colors.surface_container_low.default.hex}}; /* spacing, secondary elements */
|
||||
--bg-4: {{colors.background.default.hex}}; /* main background color */
|
||||
--bg-4: {{colors.surface.default.hex}}; /* main background color */
|
||||
--hover: {{colors.surface_bright.default.hex}}; /* channels and buttons when hovered */
|
||||
--active: {{colors.surface_bright.default.hex}}; /* channels and buttons when clicked or selected */
|
||||
--message-hover: {{colors.surface_bright.default.hex}}; /* messages when hovered */
|
||||
|
||||
Reference in New Issue
Block a user