From 560d9afd2370a4f53269e9bffa7005ff2d90ff75 Mon Sep 17 00:00:00 2001 From: unsecretised Date: Mon, 13 Jul 2026 14:03:05 +0800 Subject: [PATCH 1/3] fix spacing --- src/app/apps.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/apps.rs b/src/app/apps.rs index 8bc063f..30180ea 100644 --- a/src/app/apps.rs +++ b/src/app/apps.rs @@ -99,7 +99,7 @@ impl AppIcon { .width(30) .scale_step(0.) .into(), - Self::None => space().into(), + Self::None => space().width(0).into(), } } From c60bb9392ffd5c2858082e1942931f416cadeb8f Mon Sep 17 00:00:00 2001 From: unsecretised Date: Mon, 13 Jul 2026 14:09:19 +0800 Subject: [PATCH 2/3] arrow key fix for cbhist --- src/app/apps.rs | 2 +- src/app/tile/update.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/apps.rs b/src/app/apps.rs index 30180ea..218fef5 100644 --- a/src/app/apps.rs +++ b/src/app/apps.rs @@ -300,7 +300,7 @@ impl App { .height(40); if theme.show_icons { - row = row.push(container(self.icons.render()).width(30).height(30)); + row = row.push(container(self.icons.render())); } row = row .push(container(text_block).width(Fill)) diff --git a/src/app/tile/update.rs b/src/app/tile/update.rs index 3cfd319..a1c92af 100644 --- a/src/app/tile/update.rs +++ b/src/app/tile/update.rs @@ -307,7 +307,8 @@ pub fn handle_update(tile: &mut Tile, message: Message) -> Task { }; let quantity = match tile.page { - Page::Main | Page::FileSearch | Page::ClipboardHistory => 56., + Page::Main | Page::FileSearch => 56., + Page::ClipboardHistory => 40., Page::EmojiSearch => 5., }; From b115c1b2e879711156fad7c71d27dde9eda22232 Mon Sep 17 00:00:00 2001 From: unsecretised Date: Mon, 13 Jul 2026 17:08:10 +0800 Subject: [PATCH 3/3] switch clipboard db path --- src/database.rs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/database.rs b/src/database.rs index df63e85..071ebf7 100644 --- a/src/database.rs +++ b/src/database.rs @@ -1,5 +1,5 @@ use std::{ - env, + fs, io::Cursor, path::Path, time::{Duration, SystemTime, UNIX_EPOCH}, @@ -12,13 +12,17 @@ use rusqlite::{Connection, params}; use crate::clipboard::ClipBoardContentType; pub fn initialise_database() -> Connection { - let current_exe = env::current_exe() - .ok() - .and_then(|x| x.parent().map(|x| x.to_path_buf())) - .unwrap_or(Path::new("/tmp").to_path_buf()); + let data_path = std::env::var("HOME").unwrap_or("/tmp".to_string()) + + "/Library/Application Support/rustcast"; - let conn = Connection::open(current_exe.join(Path::new("clipboard.db"))) - .expect("Couldn't open a connection to 'clipboard.db'"); + fs::create_dir_all(&data_path).expect("Unable to create datapath"); + + let conn = Connection::open( + Path::new(&(data_path + "/")) + .to_path_buf() + .join(Path::new("clipboard.db")), + ) + .expect("Couldn't open a connection to 'clipboard.db'"); if !conn .table_exists(None, "clipboard_entries")