mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-05 21:15:38 -05:00
Compare commits
3 Commits
468e569bc7
...
f96a2e2325
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f96a2e2325 | ||
|
|
344c4f9385 | ||
|
|
89aa146845 |
@@ -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
|
||||
|
||||
@@ -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 ===
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)"
|
||||
|
||||
@@ -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])
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -99,7 +99,7 @@ Rectangle {
|
||||
backgroundColor: "transparent"
|
||||
onClicked: {
|
||||
root.settingsButtonClicked();
|
||||
PopoutService.openSettings();
|
||||
PopoutService.focusOrToggleSettings();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -301,7 +301,7 @@ DankPopout {
|
||||
let settingsIndex = SettingsData.weatherEnabled ? 4 : 3;
|
||||
if (index === settingsIndex) {
|
||||
dashVisible = false;
|
||||
PopoutService.openSettings();
|
||||
PopoutService.focusOrToggleSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user