Fix config and IPC lifecycle issues and remove obsolete code
This commit is contained in:
1 parent
8007f7a107
commit
5d9673aad3
14 files changed
+723
-753
No files matched your search
-140
@@ -1,140 +0,0 @@
|
||||
// Progressive enhancement for the handbook. Navigation and content work without JS.
|
||||
const handbookNavigation = document.querySelector('.handbook-navigation');
|
||||
if (handbookNavigation) {
|
||||
const compactLayout = matchMedia('(max-width: 900px)');
|
||||
const updateNavigation = () => { handbookNavigation.open = !compactLayout.matches; };
|
||||
updateNavigation();
|
||||
compactLayout.addEventListener('change', updateNavigation);
|
||||
handbookNavigation.addEventListener('click', (event) => {
|
||||
if (compactLayout.matches && event.target.closest('nav a')) handbookNavigation.open = false;
|
||||
});
|
||||
}
|
||||
const search = document.querySelector("#docs-search");
|
||||
const results = document.querySelector("#search-results");
|
||||
const status = document.querySelector("#search-status");
|
||||
let indexPromise;
|
||||
if (search) {
|
||||
search.closest(".docs-search").hidden = false;
|
||||
const loadIndex = () =>
|
||||
(indexPromise ||= fetch("search-index.json")
|
||||
.then((response) => {
|
||||
if (!response.ok) throw new Error("Search index unavailable");
|
||||
return response.json();
|
||||
})
|
||||
.catch((error) => {
|
||||
indexPromise = null;
|
||||
throw error;
|
||||
}));
|
||||
search.addEventListener("focus", () => {
|
||||
loadIndex().catch(() => {});
|
||||
});
|
||||
search.addEventListener("input", async () => {
|
||||
const query = search.value.trim().toLocaleLowerCase();
|
||||
if (!query) {
|
||||
results.hidden = true;
|
||||
results.replaceChildren();
|
||||
status.textContent = "";
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const index = await loadIndex();
|
||||
if (search.value.trim().toLocaleLowerCase() !== query) return;
|
||||
const words = query.split(/\s+/);
|
||||
const matches = index
|
||||
.filter((item) =>
|
||||
words.every((word) =>
|
||||
`${item.page} ${item.heading} ${item.text}`
|
||||
.toLocaleLowerCase()
|
||||
.includes(word),
|
||||
),
|
||||
)
|
||||
.sort(
|
||||
(a, b) =>
|
||||
Number(b.heading.toLocaleLowerCase().includes(query)) -
|
||||
Number(a.heading.toLocaleLowerCase().includes(query)),
|
||||
)
|
||||
.slice(0, 10);
|
||||
results.replaceChildren();
|
||||
for (const item of matches) {
|
||||
const link = document.createElement("a");
|
||||
link.href = item.url;
|
||||
const title = document.createElement("strong");
|
||||
title.textContent = `${item.page} / ${item.heading}`;
|
||||
const snippet = document.createElement("span");
|
||||
const position = Math.max(
|
||||
0,
|
||||
item.text.toLocaleLowerCase().indexOf(words[0]) - 45,
|
||||
);
|
||||
snippet.textContent = `${position ? "…" : ""}${item.text.slice(position, position + 165)}${item.text.length > position + 165 ? "…" : ""}`;
|
||||
link.append(title, snippet);
|
||||
results.append(link);
|
||||
}
|
||||
if (!matches.length) {
|
||||
const empty = document.createElement("p");
|
||||
empty.textContent =
|
||||
"No matching sections. Try “wallpaper”, “shortcuts”, or “notifications”.";
|
||||
results.append(empty);
|
||||
}
|
||||
results.hidden = false;
|
||||
status.textContent = `${matches.length} matching sections.`;
|
||||
} catch {
|
||||
if (search.value.trim().toLocaleLowerCase() !== query) return;
|
||||
results.hidden = true;
|
||||
status.textContent = "Search is unavailable. Browse the guides below.";
|
||||
}
|
||||
});
|
||||
document.addEventListener("keydown", (event) => {
|
||||
if (event.key === "Escape") {
|
||||
results.hidden = true;
|
||||
search.focus();
|
||||
}
|
||||
if (
|
||||
event.key === "/" &&
|
||||
!["INPUT", "TEXTAREA"].includes(document.activeElement.tagName) &&
|
||||
!event.ctrlKey &&
|
||||
!event.metaKey &&
|
||||
!event.altKey
|
||||
) {
|
||||
event.preventDefault();
|
||||
search.focus();
|
||||
}
|
||||
if (
|
||||
event.key === "ArrowDown" &&
|
||||
document.activeElement === search &&
|
||||
!results.hidden
|
||||
) {
|
||||
const first = results.querySelector("a");
|
||||
if (first) {
|
||||
event.preventDefault();
|
||||
first.focus();
|
||||
}
|
||||
}
|
||||
});
|
||||
document.addEventListener("click", (event) => {
|
||||
if (!event.target.closest(".docs-search")) results.hidden = true;
|
||||
});
|
||||
}
|
||||
if (navigator.clipboard?.writeText) {
|
||||
for (const block of document.querySelectorAll(".prose pre")) {
|
||||
const button = document.createElement("button");
|
||||
button.type = "button";
|
||||
button.className = "code-copy";
|
||||
button.textContent = "Copy";
|
||||
button.setAttribute("aria-label", "Copy code example");
|
||||
button.addEventListener("click", async () => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(
|
||||
block.querySelector("code").textContent,
|
||||
);
|
||||
button.textContent = "Copied";
|
||||
if (status) status.textContent = "Code example copied.";
|
||||
} catch {
|
||||
button.textContent = "Select to copy";
|
||||
if (status)
|
||||
status.textContent =
|
||||
"Copy failed. Select the code to copy it manually.";
|
||||
}
|
||||
});
|
||||
block.append(button);
|
||||
}
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
# Ferese handbook
|
||||
|
||||
Ferese combines a window manager and desktop shell with one configuration.
|
||||
This handbook covers installation, settings and desktop controls.
|
||||
|
||||
[Browse screenshots](screenshots.md) to see the themes, layouts and desktop controls in
|
||||
use.
|
||||
|
||||
## Get started
|
||||
|
||||
1. [Install Ferese](installation.md), or try a [nested preview](installation.md#preview-and-logs).
|
||||
2. Choose Light, Dark, or Auto in **Control Center**. Open **Settings** for theme files and presets.
|
||||
3. Use the [configuration reference](configuration.md) for shortcuts, gestures, window rules, and displays.
|
||||
|
||||
## Default shortcuts
|
||||
|
||||
Use `Super`, usually the Windows key, for the shortcuts below, and make them your own in
|
||||
**Settings → Keyboard & mouse → Shortcuts**.
|
||||
|
||||
| Control | Action |
|
||||
| --- | --- |
|
||||
| Super + Enter | Open a terminal |
|
||||
| Super + H / J / K / L | Focus left / down / up / right |
|
||||
| Super + F | Maximize the window |
|
||||
| Super + Shift + F | Toggle fullscreen |
|
||||
| Super + Tab | Open overview |
|
||||
| Super + M | Switch scrolling / tree layout |
|
||||
| Print Screen | Capture the active monitor and open Satty |
|
||||
| Super + Shift + S | Select a screenshot area |
|
||||
| Super + Shift + E | Ask to log out |
|
||||
| Super + left-button drag | Move a floating window |
|
||||
| Super + right-button drag | Resize a floating window |
|
||||
| Three-finger swipe up / down | Next / previous workspace |
|
||||
| Three-finger swipe left / right | Focus the window to the right / left |
|
||||
| Login shortcut guide | Appears at login; disable in Settings → Keyboard & mouse → Shortcuts |
|
||||
|
||||
The [shortcuts and mouse actions guide](shortcuts.md) covers the rest, including how to
|
||||
group windows, resize them and move between workspaces.
|
||||
|
||||
## Desktop guides
|
||||
|
||||
- [Panel configuration](panel-configuration.md): choose a style, arrange controls, and configure Morph.
|
||||
- [Lock screen](locking.md): appearance, automatic locking, and display sleep.
|
||||
- [Screen sharing and recording](screen-sharing.md): share an app or display, or save a video.
|
||||
- [Desktop portals](portals.md): integration with applications.
|
||||
- [Animation model](animation-model.md): spring motion, geometry ownership, and resize presentation.
|
||||
|
||||
Configure the desktop in Settings or edit `~/.config/ferese/config.kdl` directly;
|
||||
changes apply live, and an invalid edit leaves the last working configuration in
|
||||
place.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
If you need to end a session, `feresectl request-logout` asks for confirmation and
|
||||
`feresectl exit` exits immediately, so save your work first. The [logs and recovery
|
||||
guide](installation.md#logout-and-recovery) helps when something stops responding.
|
||||
|
||||
To [report a problem](https://github.com/ferese-wm/ferese/issues), include the steps to
|
||||
reproduce it, relevant logs and whether you were using a nested preview or a direct
|
||||
session. See [Development](development.md) to contribute.
|
||||
@@ -1,128 +0,0 @@
|
||||
.docs-layout {
|
||||
display: grid;
|
||||
grid-template-columns: 195px minmax(0, 1fr) 165px;
|
||||
gap: 38px;
|
||||
align-items: start;
|
||||
padding-block: 48px 90px;
|
||||
}
|
||||
.docs-sidebar, .docs-toc {
|
||||
position: sticky;
|
||||
top: 110px;
|
||||
max-height: calc(100dvh - 145px);
|
||||
overflow-y: auto;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--line) transparent;
|
||||
}
|
||||
.docs-sidebar { z-index: 2; }
|
||||
.docs-sidebar summary { list-style: none; color: var(--muted); font-size: 12px; font-weight: 550; margin: 0 0 14px; }
|
||||
.docs-sidebar summary::-webkit-details-marker { display: none; }
|
||||
.docs-sidebar summary .icon { display: none; }
|
||||
.docs-sidebar nav { display: grid; gap: 4px; }
|
||||
.docs-sidebar nav a {
|
||||
display: block;
|
||||
padding: 9px 12px;
|
||||
color: var(--muted);
|
||||
border-radius: 8px;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
transition: background .15s, color .15s;
|
||||
}
|
||||
.docs-sidebar nav a:hover { background: var(--soft); color: var(--ink); }
|
||||
.docs-sidebar nav a[aria-current=page] { background: #3d7be618; color: var(--accent); font-weight: 550; }
|
||||
.sidebar-links { display: grid; gap: 14px; margin-top: 25px; padding: 21px 12px 0; border-top: 1px solid var(--line); }
|
||||
.sidebar-links a { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
|
||||
.sidebar-links a:hover { color: var(--ink); }
|
||||
.sidebar-links .icon { width: 12px; height: 12px; }
|
||||
.docs-article { min-width: 0; }
|
||||
.breadcrumb { display: flex; align-items: center; gap: 9px; margin-bottom: 20px; color: var(--muted); font-size: 11px; line-height: 1.6; }
|
||||
.breadcrumb a:hover { color: var(--accent); }
|
||||
.prose { min-width: 0; font-size: 15px; line-height: 1.95; overflow-wrap: anywhere; }
|
||||
.prose h1 { margin: 0 0 24px; color: var(--ink); font-size: 44px; font-weight: 560; line-height: 1.15; letter-spacing: -1.7px; text-wrap: balance; }
|
||||
.prose > p { margin: 18px 0; color: var(--muted); }
|
||||
.prose > p:first-of-type { font-size: 17px; line-height: 1.85; }
|
||||
.prose h2 { margin: 48px 0 18px; padding-top: 27px; border-top: 1px solid var(--line); font-size: 27px; font-weight: 550; letter-spacing: -.8px; line-height: 1.25; text-wrap: balance; }
|
||||
.prose h3 { margin: 31px 0 12px; font-size: 19px; font-weight: 550; letter-spacing: -.3px; line-height: 1.4; }
|
||||
.prose h4 { margin: 25px 0 10px; font-size: 16px; font-weight: 550; }
|
||||
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
|
||||
.prose a:hover { color: var(--ink); }
|
||||
.prose strong { color: var(--ink); font-weight: 550; }
|
||||
.prose a:has(img) { display: block; max-width: 100%; line-height: 0; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
|
||||
.prose img { display: block; width: 100%; height: auto; }
|
||||
.prose code { font: .85em var(--mono); color: #dbe7fa; padding: 2px 5px; background: var(--raised); border-radius: 4px; overflow-wrap: anywhere; }
|
||||
.prose pre { position: relative; margin: 25px 0; padding: 43px 18px 18px; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); color: #dbe7fa; font: 12px/1.85 var(--mono); }
|
||||
.prose pre code { padding: 0; background: none; white-space: pre; overflow-wrap: normal; font: inherit; }
|
||||
.code-copy { position: absolute; top: 9px; right: 10px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--raised); color: var(--muted); font-size: 10px; }
|
||||
.code-copy:hover { color: var(--ink); border-color: #ffffff25; }
|
||||
.prose ul, .prose ol { padding-left: 22px; color: var(--muted); }
|
||||
.prose li { margin-bottom: 9px; }
|
||||
.prose li::marker { color: var(--muted); }
|
||||
.prose li > p { margin-block: 8px; }
|
||||
.prose blockquote { margin: 26px 0; padding: 4px 20px; border-left: 2px solid var(--accent); background: var(--soft); border-radius: 0 10px 10px 0; color: var(--muted); }
|
||||
.prose blockquote p { margin: 12px 0; }
|
||||
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 35px; }
|
||||
.table-scroll { max-width: 100%; margin: 25px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
|
||||
.prose table { width: 100%; border-collapse: collapse; color: var(--muted); font-size: 12px; line-height: 1.8; }
|
||||
.prose th { text-align: left; color: var(--ink); background: var(--soft); font-weight: 550; white-space: nowrap; }
|
||||
.prose td, .prose th { padding: 13px 15px; border-bottom: 1px solid var(--line); min-width: 110px; vertical-align: top; }
|
||||
.prose td:first-child { min-width: 145px; }
|
||||
.prose tr:last-child td { border-bottom: 0; }
|
||||
.docs-toc > p { margin: 0 0 15px; color: var(--muted); font-size: 11px; font-weight: 550; }
|
||||
.docs-toc nav { display: grid; gap: 12px; padding-left: 14px; border-left: 1px solid var(--line); }
|
||||
.docs-toc a { color: var(--muted); font-size: 11px; line-height: 1.65; }
|
||||
.docs-toc a:hover { color: var(--accent); }
|
||||
.mobile-contents { display: none; }
|
||||
.edit-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 28px; color: var(--muted); font-size: 11px; }
|
||||
.edit-link:hover { color: var(--accent); }
|
||||
.edit-link .icon { width: 12px; height: 12px; }
|
||||
.docs-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
|
||||
.docs-pager a { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; line-height: 1.6; transition: background .15s, border-color .15s; }
|
||||
.docs-pager a:hover { background: var(--soft); border-color: #ffffff25; }
|
||||
.docs-pager .pager-next { grid-column: 2; text-align: right; }
|
||||
.docs-pager small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; }
|
||||
.docs-search { position: relative; margin-bottom: 26px; }
|
||||
.docs-search input { display: block; width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); color: var(--ink); font-size: 12px; }
|
||||
.docs-search input::placeholder { color: var(--muted); opacity: 1; }
|
||||
.search-results { position: absolute; z-index: 10; top: calc(100% + 8px); left: 0; width: min(560px, calc(100vw - 80px)); max-height: 60dvh; overflow: auto; border: 1px solid #ffffff25; border-radius: 12px; background: var(--raised); box-shadow: 0 20px 50px #0006; }
|
||||
.search-results a { display: block; padding: 16px; border-bottom: 1px solid var(--line); }
|
||||
.search-results a:last-child { border-bottom: 0; }
|
||||
.search-results a:hover { background: #ffffff06; }
|
||||
.search-results strong { display: block; color: var(--accent); font-size: 13px; font-weight: 550; }
|
||||
.search-results span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.7; }
|
||||
.search-results > p { margin: 0; padding: 16px; color: var(--muted); font-size: 12px; line-height: 1.7; }
|
||||
.docs-sidebar:has(.search-results:not([hidden])) { overflow: visible; }
|
||||
@media (max-width: 1100px) {
|
||||
.docs-layout { grid-template-columns: 185px minmax(0, 1fr); gap: 36px; }
|
||||
.docs-toc { display: none; }
|
||||
.mobile-contents { display: block; margin-bottom: 25px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
|
||||
.mobile-contents summary { cursor: pointer; color: var(--muted); font-size: 12px; }
|
||||
.mobile-contents nav { display: grid; gap: 11px; margin-top: 15px; }
|
||||
.mobile-contents a { color: var(--muted); font-size: 12px; line-height: 1.5; }
|
||||
.mobile-contents a:hover { color: var(--accent); }
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
.docs-layout { display: block; padding-block: 30px 70px; }
|
||||
.docs-sidebar { position: static; max-height: none; overflow: visible; margin-bottom: 36px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--soft); }
|
||||
.docs-search { margin-bottom: 15px; }
|
||||
.docs-search input { background: var(--page); }
|
||||
.docs-sidebar summary { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0; cursor: pointer; font-size: 13px; color: var(--ink); }
|
||||
.docs-sidebar summary .icon { display: block; width: 14px; height: 14px; transform: rotate(90deg); }
|
||||
.docs-sidebar details[open] summary .icon { transform: rotate(-90deg); }
|
||||
.docs-sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 15px; }
|
||||
.docs-sidebar nav a { font-size: 12px; }
|
||||
.sidebar-links { display: none; }
|
||||
.search-results { width: 100%; }
|
||||
.prose h1 { font-size: 40px; letter-spacing: -1.3px; }
|
||||
}
|
||||
@media (max-width: 700px) {
|
||||
.docs-layout { padding-block: 24px 60px; }
|
||||
.docs-sidebar { margin-bottom: 30px; }
|
||||
.breadcrumb { flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
|
||||
.prose { font-size: 15px; line-height: 1.9; }
|
||||
.prose > p:first-of-type { font-size: 16px; }
|
||||
.prose h1 { font-size: 35px; letter-spacing: -1px; }
|
||||
.prose h2 { margin-top: 37px; padding-top: 23px; font-size: 25px; }
|
||||
.prose h3 { font-size: 18px; }
|
||||
.prose pre { padding-inline: 14px; font-size: 11px; }
|
||||
.docs-pager { gap: 10px; }
|
||||
.docs-pager a { padding: 14px 12px; font-size: 12px; }
|
||||
}
|
||||
Reference in new issue
Block a user