Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions AUDIT_LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

This log tracks all significant changes, updates, and versions in the PaperCache project.

## 2026-06-23 - (Uncommitted)
**Change:** fix: shift all keybinds to Alt and disable window auto-hide

**Details/Why:**
Changed default keybindings across the application from `Ctrl/Cmd` to `Alt` to prevent conflicts. Disabled auto-hide on focus loss in `lib.rs` to allow the app to be used as a persistent window, fixing Wayland shortcut issues.

---

## 2026-06-23 - a250dce8a
**Change:** feat: enable auto-updates on startup and add manual check button
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- **Tauri Migration**: PaperCache has been fully migrated from Electron to Tauri, reducing memory usage, startup time, and application size while preserving existing workflows.
- The macOS distribution format is now `.tar.gz` and `.app` to circumvent strict macOS 14 runner restrictions with `osascript`. The Homebrew Cask automation pulls the `.tar.gz` bundle.
- **Keybindings**: Changed default global and internal keybindings from `Ctrl/Cmd` to `Alt` to prevent conflicts with terminal emulators and OS shortcuts.
- **Window Behavior**: Disabled the "hide on focus loss" behavior so the application acts as a standard window, fixing global shortcut limitations on Wayland compositors (like Hyprland).

### Fixed
- Addressed multiple edge-cases with `CodeMirror` state overwrites causing typed text to disappear or duplicate.
Expand Down
41 changes: 12 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 17 additions & 1 deletion src-tauri/src/commands/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,26 @@ pub fn set_dialog_open(state: tauri::State<'_, crate::DialogState>, open: bool)
}

pub fn run_onboarding() {
let is_hyprland = std::env::var("HYPRLAND_INSTANCE_SIGNATURE").is_ok() || std::env::var("HYPRLAND_CMD").is_ok();
let mod_key = if is_hyprland { "Alt" } else { "Command/Ctrl" };

if let Ok(base) = get_papercache_dir() {
let welcome_path = base.join("Welcome.md");

let welcome_content = format!(
"# Welcome to PaperCache\n\nThis is your first note. Start typing to edit it, or use {} + Shift + N to create a new one!",
mod_key
);

if !welcome_path.exists() {
let _ = fs::write(&welcome_path, "# Welcome to PaperCache\n\nThis is your first note. Start typing to edit it, or use shortcuts to create a new one!");
let _ = fs::write(&welcome_path, &welcome_content);
} else {
// Force update if the file contains the old generic shortcut text
if let Ok(content) = fs::read_to_string(&welcome_path) {
if content.contains("use shortcuts to create a new one!") || content.contains("Command/Ctrl + Shift + N") || content.contains("Alt + Shift + N") {
let _ = fs::write(&welcome_path, &welcome_content);
Comment thread
VariableThe marked this conversation as resolved.
}
}
}

let commands_dir = base.join("commands");
Expand Down
5 changes: 5 additions & 0 deletions src-tauri/src/commands/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,8 @@ pub async fn check_for_updates(app: tauri::AppHandle) -> Result<(), String> {
}
Ok(())
}

#[tauri::command]
pub fn is_hyprland() -> Result<bool, String> {
Ok(std::env::var("HYPRLAND_INSTANCE_SIGNATURE").is_ok() || std::env::var("HYPRLAND_CMD").is_ok())
}
6 changes: 5 additions & 1 deletion src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ pub fn run() {
tauri::WindowEvent::Focused(focused)
if !focused && !is_dialog_open.load(Ordering::SeqCst) =>
{
let _ = w.hide();
let is_hyprland = std::env::var("HYPRLAND_INSTANCE_SIGNATURE").is_ok() || std::env::var("HYPRLAND_CMD").is_ok();
if !is_hyprland {
let _ = w.hide();
}
}
_ => {}
}
Expand Down Expand Up @@ -107,6 +110,7 @@ pub fn run() {
commands::system::open_file,
commands::system::set_launch_at_startup,
commands::system::check_for_updates,
commands::system::is_hyprland,
commands::keychain::set_api_key,
commands::keychain::get_api_key_status,
commands::keychain::get_api_key,
Expand Down
3 changes: 3 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ function App() {

useEffect(() => {
window.electronAPI.checkForUpdates()
window.electronAPI.isHyprland().then((isHyp) => {
useAppStore.getState().setIsHyprland(isHyp)
})
Comment thread
VariableThe marked this conversation as resolved.
}, [])

useEffect(() => {
Expand Down
Loading
Loading