personal fork of atuin without AI stuff, sync stuff, script management stuff
0

Configure Feed

Select the types of activity you want to include in your feed.

remove update-check notifications

nix solves this

Signed-off-by: oppiliappan <me@oppi.li>

author
oppiliappan
date (Jul 18, 2026, 9:50 AM +0100) commit 71d53f4a parent 275d7d01 change-id xvuupmzq
+8 -111
-1
crates/atuin-client/Cargo.toml
··· 15 15 16 16 [features] 17 17 default = [] 18 - check-update = [] 19 18 20 19 [dependencies] 21 20 derive_more = { workspace = true }
-3
crates/atuin-client/config.toml
··· 28 28 ## for example: "+9", "-05", "+03:30", "-01:23:45", etc. 29 29 # timezone = "local" 30 30 31 - ## enable or disable automatic update checks 32 - # update_check = true 33 - 34 31 ## which search mode to use 35 32 ## possible values: prefix, fulltext, fuzzy, skim 36 33 # search_mode = "fuzzy"
-68
crates/atuin-client/src/settings.rs
··· 8 8 use eyre::{Context, Error, Result, bail, eyre}; 9 9 use fs_err::{File, create_dir_all}; 10 10 use regex::RegexSet; 11 - use semver::Version; 12 11 use serde::{Deserialize, Serialize}; 13 12 use serde_with::DeserializeFromStr; 14 13 use std::{ ··· 781 780 pub dialect: Dialect, 782 781 pub timezone: Timezone, 783 782 pub style: Style, 784 - pub update_check: bool, 785 783 786 784 pub db_path: String, 787 785 pub record_store_path: String, ··· 931 929 } 932 930 } 933 931 934 - #[cfg(feature = "check-update")] 935 - async fn needs_update_check(&self) -> Result<bool> { 936 - let last_check = Settings::last_version_check().await?; 937 - let diff = OffsetDateTime::now_utc() - last_check; 938 - 939 - // Check a max of once per hour 940 - Ok(diff.whole_hours() >= 1) 941 - } 942 - 943 - #[cfg(feature = "check-update")] 944 - async fn latest_version(&self) -> Result<Version> { 945 - // Default to the current version, and if that doesn't parse, a version so high it's unlikely to ever 946 - // suggest upgrading. 947 - let current = 948 - Version::parse(env!("CARGO_PKG_VERSION")).unwrap_or(Version::new(100000, 0, 0)); 949 - 950 - if !self.needs_update_check().await? { 951 - let meta = Self::meta_store().await?; 952 - let version = match meta.latest_version().await? { 953 - Some(v) => Version::parse(&v).unwrap_or(current), 954 - None => current, 955 - }; 956 - 957 - return Ok(version); 958 - } 959 - 960 - let latest = current; 961 - 962 - let meta = Self::meta_store().await?; 963 - Settings::save_version_check_time().await?; 964 - meta.save_latest_version(&latest.to_string()).await?; 965 - 966 - Ok(latest) 967 - } 968 - 969 - // Return Some(latest version) if an update is needed. Otherwise, none. 970 - #[cfg(feature = "check-update")] 971 - pub async fn needs_update(&self) -> Option<Version> { 972 - if !self.update_check { 973 - return None; 974 - } 975 - 976 - let current = 977 - Version::parse(env!("CARGO_PKG_VERSION")).unwrap_or(Version::new(100000, 0, 0)); 978 - 979 - let latest = self.latest_version().await; 980 - 981 - if latest.is_err() { 982 - return None; 983 - } 984 - 985 - let latest = latest.unwrap(); 986 - 987 - if latest > current { 988 - return Some(latest); 989 - } 990 - 991 - None 992 - } 993 - 994 932 pub fn default_filter_mode(&self, git_root: bool) -> FilterMode { 995 933 self.filter_mode 996 934 .filter(|x| self.search.filters.contains(x)) ··· 1008 946 .unwrap_or(FilterMode::Global) 1009 947 } 1010 948 1011 - #[cfg(not(feature = "check-update"))] 1012 - pub async fn needs_update(&self) -> Option<Version> { 1013 - None 1014 - } 1015 - 1016 949 pub fn builder() -> Result<ConfigBuilder<DefaultState>> { 1017 950 Self::builder_with_data_dir(&atuin_common::utils::data_dir()) 1018 951 } ··· 1032 965 .set_default("key_path", key_path.to_str())? 1033 966 .set_default("dialect", "us")? 1034 967 .set_default("timezone", "local")? 1035 - .set_default("update_check", cfg!(feature = "check-update"))? 1036 968 .set_default("search_mode", "fuzzy")? 1037 969 .set_default("filter_mode", None::<String>)? 1038 970 .set_default("style", "compact")?
+1 -2
crates/atuin/Cargo.toml
··· 33 33 atuin = { path = "/usr/bin/atuin" } 34 34 35 35 [features] 36 - default = ["client", "clipboard", "check-update"] 36 + default = ["client", "clipboard"] 37 37 client = ["atuin-client"] 38 38 clipboard = ["arboard"] 39 - check-update = ["atuin-client/check-update"] 40 39 41 40 [dependencies] 42 41 atuin-client = { path = "../atuin-client", version = "18.17.1", optional = true, default-features = false }
+7 -37
crates/atuin/src/command/client/search/interactive.rs
··· 8 8 9 9 use atuin_common::{shell::Shell, string::EscapeNonPrintablePosixExt as _}; 10 10 use eyre::Result; 11 - use futures_util::FutureExt; 12 - use semver::Version; 13 11 use time::OffsetDateTime; 14 12 use unicode_width::{UnicodeWidthChar, UnicodeWidthStr}; 15 13 ··· 117 115 #[allow(clippy::struct_excessive_bools)] 118 116 pub struct State { 119 117 history_count: i64, 120 - update_needed: Option<Version>, 121 118 results_state: ListState, 122 119 switched_search_mode: bool, 123 120 search_mode: SearchMode, ··· 934 931 ) 935 932 .split(header_chunk); 936 933 937 - let title = self.build_title(theme); 934 + let title = Self::build_title(theme); 938 935 f.render_widget(title, header_chunks[0]); 939 936 940 937 let help = self.build_help(settings, theme); ··· 1089 1086 )); 1090 1087 } 1091 1088 1092 - fn build_title(&self, theme: &Theme) -> Paragraph<'_> { 1093 - let title = if self.update_needed.is_some() { 1094 - let error_style: Style = Style::from_crossterm(theme.get_error()); 1095 - Paragraph::new(Text::from(Span::styled( 1096 - format!("Atuin v{VERSION} - UPDATE"), 1097 - error_style.add_modifier(Modifier::BOLD), 1098 - ))) 1099 - } else { 1100 - let style: Style = Style::from_crossterm(theme.as_style(Meaning::Base)); 1101 - Paragraph::new(Text::from(Span::styled( 1102 - format!("Atuin v{VERSION}"), 1103 - style.add_modifier(Modifier::BOLD), 1104 - ))) 1105 - }; 1089 + fn build_title(theme: &Theme) -> Paragraph<'_> { 1090 + let style: Style = Style::from_crossterm(theme.as_style(Meaning::Base)); 1091 + let title = Paragraph::new(Text::from(Span::styled( 1092 + format!("Atuin v{VERSION}"), 1093 + style.add_modifier(Modifier::BOLD), 1094 + ))); 1106 1095 title.alignment(Alignment::Left) 1107 1096 } 1108 1097 ··· 1751 1740 // Put the cursor at the end of the query by default 1752 1741 input.end(); 1753 1742 1754 - let settings2 = settings.clone(); 1755 - let update_needed = tokio::spawn(async move { settings2.needs_update().await }).fuse(); 1756 - tokio::pin!(update_needed); 1757 - 1758 1743 let initial_context = current_context().await?; 1759 1744 1760 1745 let history_count = db.history_count(false).await?; ··· 1772 1757 let mut app = State { 1773 1758 history_count, 1774 1759 results_state: ListState::default(), 1775 - update_needed: None, 1776 1760 switched_search_mode: false, 1777 1761 search_mode, 1778 1762 tab_index: 0, ··· 1920 1904 } 1921 1905 } 1922 1906 } 1923 - update_needed = &mut update_needed => { 1924 - // Don't fail interactive search if update check fails 1925 - // The update check is a nice-to-have feature, not critical 1926 - app.update_needed = update_needed.ok().flatten(); 1927 - } 1928 1907 } 1929 1908 1930 1909 if initial_input != app.search.input.as_str() ··· 2253 2232 let settings = Settings::utc(); 2254 2233 let mut state = State { 2255 2234 history_count: 0, 2256 - update_needed: None, 2257 2235 results_state: ListState::default(), 2258 2236 switched_search_mode: false, 2259 2237 search_mode: SearchMode::Fuzzy, ··· 2309 2287 2310 2288 let mut state = State { 2311 2289 history_count: 1, 2312 - update_needed: None, 2313 2290 results_state: ListState::default(), 2314 2291 switched_search_mode: false, 2315 2292 search_mode: SearchMode::Fuzzy, ··· 2428 2405 2429 2406 let mut state = State { 2430 2407 history_count: 100, 2431 - update_needed: None, 2432 2408 results_state: ListState::default(), 2433 2409 switched_search_mode: false, 2434 2410 search_mode: SearchMode::Fuzzy, ··· 2487 2463 2488 2464 let mut state = State { 2489 2465 history_count: 100, 2490 - update_needed: None, 2491 2466 results_state: ListState::default(), 2492 2467 switched_search_mode: false, 2493 2468 search_mode: SearchMode::Fuzzy, ··· 2542 2517 2543 2518 let mut state = State { 2544 2519 history_count: 100, 2545 - update_needed: None, 2546 2520 results_state: ListState::default(), 2547 2521 switched_search_mode: false, 2548 2522 search_mode: SearchMode::Fuzzy, ··· 2593 2567 2594 2568 let mut state = State { 2595 2569 history_count: 100, 2596 - update_needed: None, 2597 2570 results_state: ListState::default(), 2598 2571 switched_search_mode: false, 2599 2572 search_mode: SearchMode::Fuzzy, ··· 2657 2630 2658 2631 let mut state = State { 2659 2632 history_count: 100, 2660 - update_needed: None, 2661 2633 results_state: ListState::default(), 2662 2634 switched_search_mode: false, 2663 2635 search_mode: SearchMode::Fuzzy, ··· 2722 2694 let settings = Settings::utc(); 2723 2695 let mut state = State { 2724 2696 history_count: i64::try_from(results_len).unwrap(), 2725 - update_needed: None, 2726 2697 results_state: ListState::default(), 2727 2698 switched_search_mode: false, 2728 2699 search_mode: SearchMode::Fuzzy, ··· 3160 3131 3161 3132 let mut state = State { 3162 3133 history_count: 100, 3163 - update_needed: None, 3164 3134 results_state: ListState::default(), 3165 3135 switched_search_mode: false, 3166 3136 search_mode: SearchMode::Fuzzy,