mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-05-16 09:12:47 -04:00
Compare commits
2 Commits
727d9c6c22
...
e86227f05f
| Author | SHA1 | Date | |
|---|---|---|---|
| e86227f05f | |||
| 53da60e4ca |
@@ -628,6 +628,7 @@ func EnsureGreeterCacheDir(logFunc func(string), sudoPassword string) error {
|
||||
runtimeDirs := []string{
|
||||
filepath.Join(cacheDir, ".local"),
|
||||
filepath.Join(cacheDir, ".local", "state"),
|
||||
filepath.Join(cacheDir, ".local", "state", "wireplumber"),
|
||||
filepath.Join(cacheDir, ".local", "share"),
|
||||
filepath.Join(cacheDir, ".cache"),
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ export DMS_RUN_GREETER=1
|
||||
|
||||
ensure_cache_tree() {
|
||||
local base="$1"
|
||||
mkdir -p "$base/.local/state" "$base/.local/share" "$base/.cache"
|
||||
mkdir -p "$base/.local/state" "$base/.local/state/wireplumber" "$base/.local/share" "$base/.cache"
|
||||
}
|
||||
|
||||
if ! ensure_cache_tree "$CACHE_DIR" 2>/dev/null; then
|
||||
@@ -270,6 +270,10 @@ hotkey-overlay {
|
||||
|
||||
environment {
|
||||
DMS_RUN_GREETER "1"
|
||||
HOME "$CACHE_DIR"
|
||||
XDG_STATE_HOME "$CACHE_DIR/.local/state"
|
||||
XDG_DATA_HOME "$CACHE_DIR/.local/share"
|
||||
XDG_CACHE_HOME "$CACHE_DIR/.cache"
|
||||
}
|
||||
|
||||
debug {
|
||||
@@ -323,6 +327,10 @@ NIRI_EOF
|
||||
TEMP_CONFIG=$(mktemp)
|
||||
cat > "$TEMP_CONFIG" << HYPRLAND_EOF
|
||||
env = DMS_RUN_GREETER,1
|
||||
env = HOME,$CACHE_DIR
|
||||
env = XDG_STATE_HOME,$CACHE_DIR/.local/state
|
||||
env = XDG_DATA_HOME,$CACHE_DIR/.local/share
|
||||
env = XDG_CACHE_HOME,$CACHE_DIR/.cache
|
||||
|
||||
misc {
|
||||
disable_hyprland_logo = true
|
||||
@@ -336,6 +344,10 @@ HYPRLAND_EOF
|
||||
cat "$COMPOSITOR_CONFIG" > "$TEMP_CONFIG"
|
||||
cat >> "$TEMP_CONFIG" << HYPRLAND_EOF
|
||||
|
||||
env = HOME,$CACHE_DIR
|
||||
env = XDG_STATE_HOME,$CACHE_DIR/.local/state
|
||||
env = XDG_DATA_HOME,$CACHE_DIR/.local/share
|
||||
env = XDG_CACHE_HOME,$CACHE_DIR/.cache
|
||||
exec-once = sh -c "$QS_CMD; hyprctl dispatch exit"
|
||||
HYPRLAND_EOF
|
||||
COMPOSITOR_CONFIG="$TEMP_CONFIG"
|
||||
@@ -352,6 +364,7 @@ HYPRLAND_EOF
|
||||
if [[ -z "$COMPOSITOR_CONFIG" ]]; then
|
||||
TEMP_CONFIG=$(mktemp)
|
||||
cat > "$TEMP_CONFIG" << SWAY_EOF
|
||||
exec --no-startup-id dbus-update-activation-environment --systemd HOME XDG_STATE_HOME XDG_DATA_HOME XDG_CACHE_HOME
|
||||
exec "$QS_CMD; swaymsg exit"
|
||||
SWAY_EOF
|
||||
COMPOSITOR_CONFIG="$TEMP_CONFIG"
|
||||
@@ -360,6 +373,7 @@ SWAY_EOF
|
||||
cat "$COMPOSITOR_CONFIG" > "$TEMP_CONFIG"
|
||||
cat >> "$TEMP_CONFIG" << SWAY_EOF
|
||||
|
||||
exec --no-startup-id dbus-update-activation-environment --systemd HOME XDG_STATE_HOME XDG_DATA_HOME XDG_CACHE_HOME
|
||||
exec "$QS_CMD; swaymsg exit"
|
||||
SWAY_EOF
|
||||
COMPOSITOR_CONFIG="$TEMP_CONFIG"
|
||||
@@ -372,6 +386,7 @@ SWAY_EOF
|
||||
if [[ -z "$COMPOSITOR_CONFIG" ]]; then
|
||||
TEMP_CONFIG=$(mktemp)
|
||||
cat > "$TEMP_CONFIG" << SCROLL_EOF
|
||||
exec --no-startup-id dbus-update-activation-environment --systemd HOME XDG_STATE_HOME XDG_DATA_HOME XDG_CACHE_HOME
|
||||
exec "$QS_CMD; scrollmsg exit"
|
||||
SCROLL_EOF
|
||||
COMPOSITOR_CONFIG="$TEMP_CONFIG"
|
||||
@@ -380,6 +395,7 @@ SCROLL_EOF
|
||||
cat "$COMPOSITOR_CONFIG" > "$TEMP_CONFIG"
|
||||
cat >> "$TEMP_CONFIG" << SCROLL_EOF
|
||||
|
||||
exec --no-startup-id dbus-update-activation-environment --systemd HOME XDG_STATE_HOME XDG_DATA_HOME XDG_CACHE_HOME
|
||||
exec "$QS_CMD; scrollmsg exit"
|
||||
SCROLL_EOF
|
||||
COMPOSITOR_CONFIG="$TEMP_CONFIG"
|
||||
|
||||
@@ -252,7 +252,7 @@ Scope {
|
||||
configDirectory: u2fConfigWatcher.loaded ? "/etc/pam.d" : Quickshell.shellDir + "/assets/pam"
|
||||
|
||||
onMessageChanged: {
|
||||
if (message.toLowerCase().includes("touch"))
|
||||
if (message !== "")
|
||||
root.u2fState = "waiting";
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ import QtCore
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import qs.Common
|
||||
import qs.Modals.FileBrowser
|
||||
import qs.Services
|
||||
@@ -751,6 +750,24 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: I18n.tr("No themes installed. Browse themes to install from the registry.", "no registry themes installed hint")
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceVariantText
|
||||
wrapMode: Text.WordWrap
|
||||
width: parent.width
|
||||
visible: themeColorsTab.installedRegistryThemes.length === 0
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
|
||||
DankButton {
|
||||
text: I18n.tr("Browse Themes", "browse themes button")
|
||||
iconName: "store"
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
onClicked: showThemeBrowser()
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
id: variantSelector
|
||||
width: parent.width
|
||||
@@ -758,7 +775,9 @@ Item {
|
||||
visible: activeThemeId !== "" && activeThemeVariants !== null && (isMultiVariant || (activeThemeVariants.options && activeThemeVariants.options.length > 0))
|
||||
|
||||
property string activeThemeId: {
|
||||
if (Theme.currentThemeCategory !== "registry" || Theme.currentTheme !== "custom")
|
||||
switch (Theme.currentThemeCategory) {
|
||||
case "registry":
|
||||
if (Theme.currentTheme !== "custom")
|
||||
return "";
|
||||
for (var i = 0; i < themeColorsTab.installedRegistryThemes.length; i++) {
|
||||
var t = themeColorsTab.installedRegistryThemes[i];
|
||||
@@ -766,16 +785,28 @@ Item {
|
||||
return t.id;
|
||||
}
|
||||
return "";
|
||||
case "custom":
|
||||
return Theme.currentThemeId || "";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
property var activeThemeVariants: {
|
||||
if (!activeThemeId)
|
||||
return null;
|
||||
switch (Theme.currentThemeCategory) {
|
||||
case "registry":
|
||||
for (var i = 0; i < themeColorsTab.installedRegistryThemes.length; i++) {
|
||||
var t = themeColorsTab.installedRegistryThemes[i];
|
||||
if (t.id === activeThemeId && t.hasVariants)
|
||||
return t.variants;
|
||||
}
|
||||
return null;
|
||||
case "custom":
|
||||
return Theme.currentThemeVariants || null;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
property bool isMultiVariant: activeThemeVariants?.type === "multi"
|
||||
property string colorMode: Theme.isLightMode ? "light" : "dark"
|
||||
@@ -892,7 +923,7 @@ Item {
|
||||
width: accentColorsGrid.dotSize
|
||||
height: accentColorsGrid.dotSize
|
||||
radius: width / 2
|
||||
color: modelData.color || Theme.primary
|
||||
color: modelData.color || modelData[variantSelector.selectedFlavor]?.primary || Theme.primary
|
||||
border.color: Theme.outline
|
||||
border.width: isSelected ? 2 : 1
|
||||
scale: isSelected ? 1.1 : 1
|
||||
@@ -978,24 +1009,6 @@ Item {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: I18n.tr("No themes installed. Browse themes to install from the registry.", "no registry themes installed hint")
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceVariantText
|
||||
wrapMode: Text.WordWrap
|
||||
width: parent.width
|
||||
visible: themeColorsTab.installedRegistryThemes.length === 0
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
|
||||
DankButton {
|
||||
text: I18n.tr("Browse Themes", "browse themes button")
|
||||
iconName: "store"
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
onClicked: showThemeBrowser()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user