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

Compare commits

...

3 Commits

Author SHA1 Message Date
purian23
f96a2e2325 fix: OpenSuse package dir & hash versioning 2025-12-01 23:48:55 -05:00
bbedward
344c4f9385 ipc/focus: add focusOrToggle to settings and processlist 2025-12-01 23:16:06 -05:00
Álvaro
89aa146845 Readjustment of the audio display name for better fit (#874) 2025-12-01 20:27:51 -05:00
13 changed files with 89 additions and 16 deletions

View File

@@ -140,8 +140,8 @@ $mod = SUPER
bind = $mod, T, exec, {{TERMINAL_COMMAND}}
bind = $mod, space, exec, dms ipc call spotlight toggle
bind = $mod, V, exec, dms ipc call clipboard toggle
bind = $mod, M, exec, dms ipc call processlist toggle
bind = $mod, comma, exec, dms ipc call settings toggle
bind = $mod, M, exec, dms ipc call processlist focusOrToggle
bind = $mod, comma, exec, dms ipc call settings focusOrToggle
bind = $mod, N, exec, dms ipc call notifications toggle
bind = $mod SHIFT, N, exec, dms ipc call notepad toggle
bind = $mod, Y, exec, dms ipc call dankdash wallpaper
@@ -153,7 +153,7 @@ bind = $mod SHIFT, Slash, exec, dms ipc call keybinds toggle hyprland
# === Security ===
bind = $mod ALT, L, exec, dms ipc call lock lock
bind = $mod SHIFT, E, exit
bind = CTRL ALT, Delete, exec, dms ipc call processlist toggle
bind = CTRL ALT, Delete, exec, dms ipc call processlist focusOrToggle
# === Audio Controls ===
bindel = , XF86AudioRaiseVolume, exec, dms ipc call audio increment 3

View File

@@ -238,10 +238,10 @@ binds {
spawn "dms" "ipc" "call" "clipboard" "toggle";
}
Mod+M hotkey-overlay-title="Task Manager" {
spawn "dms" "ipc" "call" "processlist" "toggle";
spawn "dms" "ipc" "call" "processlist" "focusOrToggle";
}
Mod+Comma hotkey-overlay-title="Settings" {
spawn "dms" "ipc" "call" "settings" "toggle";
spawn "dms" "ipc" "call" "settings" "focusOrToggle";
}
Mod+Y hotkey-overlay-title="Browse Wallpapers" {
spawn "dms" "ipc" "call" "dankdash" "wallpaper";
@@ -255,7 +255,7 @@ binds {
}
Mod+Shift+E { quit; }
Ctrl+Alt+Delete hotkey-overlay-title="Task Manager" {
spawn "dms" "ipc" "call" "processlist" "toggle";
spawn "dms" "ipc" "call" "processlist" "focusOrToggle";
}
// === Audio Controls ===

View File

@@ -129,6 +129,9 @@ fi
%{_datadir}/quickshell/dms/
%{_userunitdir}/dms.service
%{_datadir}/applications/dms-open.desktop
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/scalable
%dir %{_datadir}/icons/hicolor/scalable/apps
%{_datadir}/icons/hicolor/scalable/apps/danklogo.svg
%changelog

View File

@@ -104,6 +104,9 @@ fi
%{_datadir}/quickshell/dms/
%{_userunitdir}/dms.service
%{_datadir}/applications/dms-open.desktop
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/scalable
%dir %{_datadir}/icons/hicolor/scalable/apps
%{_datadir}/icons/hicolor/scalable/apps/danklogo.svg
%changelog

View File

@@ -22,7 +22,16 @@ else
PACKAGES=("${ALL_PACKAGES[@]}")
fi
cd "$OBS_BASE"
# Ensure cache directory exists
if [[ ! -d "$OBS_BASE" ]]; then
echo "Creating OBS cache directory: $OBS_BASE"
mkdir -p "$OBS_BASE"
fi
cd "$OBS_BASE" || {
echo "ERROR: Failed to access OBS cache directory: $OBS_BASE"
exit 1
}
for pkg in "${PACKAGES[@]}"; do
case "$pkg" in

View File

@@ -477,11 +477,11 @@ if [[ "$UPLOAD_DEBIAN" == true ]] && [[ -d "distro/debian/$PACKAGE/debian" ]]; t
echo " Creating $SOURCE0 (directory: $DIR_NAME)"
cp -r "$SOURCE_DIR" "$DIR_NAME"
if [[ "$SOURCE0" == *.tar.xz ]]; then
tar --sort=name --mtime='2000-01-01 00:00:00' -cJf "$WORK_DIR/$SOURCE0" "$DIR_NAME"
tar --sort=name --mtime='2000-01-01 00:00:00' --owner=0 --group=0 -cJf "$WORK_DIR/$SOURCE0" "$DIR_NAME"
elif [[ "$SOURCE0" == *.tar.bz2 ]]; then
tar --sort=name --mtime='2000-01-01 00:00:00' -cjf "$WORK_DIR/$SOURCE0" "$DIR_NAME"
tar --sort=name --mtime='2000-01-01 00:00:00' --owner=0 --group=0 -cjf "$WORK_DIR/$SOURCE0" "$DIR_NAME"
else
tar --sort=name --mtime='2000-01-01 00:00:00' -czf "$WORK_DIR/$SOURCE0" "$DIR_NAME"
tar --sort=name --mtime='2000-01-01 00:00:00' --owner=0 --group=0 -czf "$WORK_DIR/$SOURCE0" "$DIR_NAME"
fi
rm -rf "$DIR_NAME"
echo " Created $SOURCE0 ($(stat -c%s "$WORK_DIR/$SOURCE0" 2>/dev/null || echo 0) bytes)"

View File

@@ -79,6 +79,14 @@ Item {
return "PROCESSLIST_TOGGLE_SUCCESS";
}
function focusOrToggle(): string {
root.processListModalLoader.active = true;
if (root.processListModalLoader.item)
root.processListModalLoader.item.focusOrToggle();
return "PROCESSLIST_FOCUS_OR_TOGGLE_SUCCESS";
}
target: "processlist"
}
@@ -598,6 +606,11 @@ Item {
return "SETTINGS_TOGGLE_SUCCESS";
}
function focusOrToggle(): string {
PopoutService.focusOrToggleSettings();
return "SETTINGS_FOCUS_OR_TOGGLE_SUCCESS";
}
function get(key: string): string {
return JSON.stringify(SettingsData?.[key])
}

View File

@@ -1,6 +1,7 @@
import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Wayland
import qs.Common
import qs.Modules.ProcessList
import qs.Services
@@ -39,6 +40,27 @@ FloatingWindow {
visible = !visible;
}
function focusOrToggle() {
if (!DgopService.dgopAvailable) {
console.warn("ProcessListModal: dgop is not available");
return;
}
if (visible) {
const modalTitle = I18n.tr("System Monitor", "sysmon window title");
for (const toplevel of ToplevelManager.toplevels.values) {
if (toplevel.title !== "System Monitor" && toplevel.title !== modalTitle)
continue;
if (toplevel.activated) {
hide();
return;
}
toplevel.activate();
return;
}
}
show();
}
objectName: "processListModal"
title: I18n.tr("System Monitor", "sysmon window title")
minimumSize: Qt.size(650, 400)

View File

@@ -73,6 +73,10 @@ DankModal {
borderWidth: 1
enableShadow: true
keepContentLoaded: true
animationScaleCollapsed: 0.96
animationDuration: Theme.expressiveDurations.expressiveDefaultSpatial
animationEnterCurve: Theme.expressiveCurves.expressiveDefaultSpatial
animationExitCurve: Theme.expressiveCurves.emphasized
onVisibleChanged: () => {
if (!visible)
return;

View File

@@ -99,7 +99,7 @@ Rectangle {
backgroundColor: "transparent"
onClicked: {
root.settingsButtonClicked();
PopoutService.openSettings();
PopoutService.focusOrToggleSettings();
}
}

View File

@@ -355,10 +355,10 @@ Rectangle {
StyledText {
text: {
const mediaName = modelData && modelData.properties ? (modelData.properties["media.name"] || "") : "";
const max = 30;
const truncated = mediaName.length > max ? mediaName.substring(0, max) + "..." : mediaName;
return AudioService.displayName(modelData) + (truncated ? ": " + truncated : "");
const modelDataMediaName = modelData && modelData.properties ? (modelData.properties["media.name"] || "") : "";
const mediaName = AudioService.displayName(modelData) + ": " + modelDataMediaName;
const max = 35;
return mediaName.length > max ? mediaName.substring(0, max) + "..." : mediaName;
}
font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceText

View File

@@ -301,7 +301,7 @@ DankPopout {
let settingsIndex = SettingsData.weatherEnabled ? 4 : 3;
if (index === settingsIndex) {
dashVisible = false;
PopoutService.openSettings();
PopoutService.focusOrToggleSettings();
}
}
}

View File

@@ -2,6 +2,8 @@ pragma Singleton
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Wayland
import qs.Common
Singleton {
id: root
@@ -219,6 +221,23 @@ Singleton {
}
}
function focusOrToggleSettings() {
if (settingsModal?.visible) {
const settingsTitle = I18n.tr("Settings", "settings window title");
for (const toplevel of ToplevelManager.toplevels.values) {
if (toplevel.title !== "Settings" && toplevel.title !== settingsTitle)
continue;
if (toplevel.activated) {
settingsModal.hide();
return;
}
toplevel.activate();
return;
}
}
openSettings();
}
function unloadSettings() {
if (settingsModalLoader) {
settingsModal = null;