mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-30 00:12:50 -05:00
Compare commits
2 Commits
ad43053b94
...
e6d289d48c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6d289d48c | ||
|
|
745d7f26ce |
20
.github/workflows/stable.yml
vendored
20
.github/workflows/stable.yml
vendored
@@ -5,15 +5,27 @@ on:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
update-stable:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Create GitHub App token
|
||||
id: app_token
|
||||
uses: actions/create-github-app-token@v1
|
||||
with:
|
||||
app-id: ${{ secrets.APP_ID }}
|
||||
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ steps.app_token.outputs.token }}
|
||||
|
||||
- name: Push to stable branch
|
||||
run: git push origin HEAD:refs/heads/stable --force
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.app_token.outputs.token }}
|
||||
run: git push https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git HEAD:refs/heads/stable --force
|
||||
|
||||
@@ -1588,6 +1588,7 @@ Singleton {
|
||||
}
|
||||
|
||||
function updateCompositorCursor() {
|
||||
updateXResources();
|
||||
if (typeof CompositorService === "undefined")
|
||||
return;
|
||||
if (CompositorService.isNiri && typeof NiriService !== "undefined") {
|
||||
@@ -1604,6 +1605,36 @@ Singleton {
|
||||
}
|
||||
}
|
||||
|
||||
function updateXResources() {
|
||||
const homeDir = Paths.strip(StandardPaths.writableLocation(StandardPaths.HomeLocation));
|
||||
const xresourcesPath = homeDir + "/.Xresources";
|
||||
const themeName = cursorSettings.theme === "System Default" ? systemDefaultCursorTheme : cursorSettings.theme;
|
||||
const size = cursorSettings.size || 24;
|
||||
|
||||
if (!themeName)
|
||||
return;
|
||||
|
||||
const script = `
|
||||
xresources_file="${xresourcesPath}"
|
||||
temp_file="\${xresources_file}.tmp.$$"
|
||||
theme_name="${themeName}"
|
||||
cursor_size="${size}"
|
||||
|
||||
if [ -f "$xresources_file" ]; then
|
||||
grep -v '^[[:space:]]*Xcursor\\.theme:' "$xresources_file" | grep -v '^[[:space:]]*Xcursor\\.size:' > "$temp_file" 2>/dev/null || true
|
||||
else
|
||||
touch "$temp_file"
|
||||
fi
|
||||
|
||||
echo "Xcursor.theme: $theme_name" >> "$temp_file"
|
||||
echo "Xcursor.size: $cursor_size" >> "$temp_file"
|
||||
mv "$temp_file" "$xresources_file"
|
||||
xrdb -merge "$xresources_file" 2>/dev/null || true
|
||||
`;
|
||||
|
||||
Quickshell.execDetached(["sh", "-c", script]);
|
||||
}
|
||||
|
||||
function getCursorEnvironment() {
|
||||
const isSystemDefault = cursorSettings.theme === "System Default";
|
||||
const isDefaultSize = !cursorSettings.size || cursorSettings.size === 24;
|
||||
|
||||
Reference in New Issue
Block a user