Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into shortcut_macro
Browse files Browse the repository at this point in the history
  • Loading branch information
lj3954 committed Jan 10, 2025
2 parents 5566c0e + 50e9827 commit b3c5aaa
Show file tree
Hide file tree
Showing 11 changed files with 197 additions and 173 deletions.
326 changes: 179 additions & 147 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace.package]
license = "MIT"
version = "24.10.31"
version = "25.1.10"
edition = "2021"

[workspace]
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Chris Titus
Copyright (c) 2025 Chris Titus

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
9 changes: 3 additions & 6 deletions core/src/inner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,10 @@ impl Entry {
}| {
match data {
SystemDataType::Environment(var_name) => std::env::var(var_name)
.map_or(false, |var| values.contains(&var) == *matches),
.is_ok_and(|var| values.contains(&var) == *matches),
SystemDataType::File(path) => {
std::fs::read_to_string(path).map_or(false, |data| {
values
.iter()
.any(|matching_value| data.contains(matching_value))
== *matches
std::fs::read_to_string(path).is_ok_and(|data| {
values.iter().all(|matching| data.contains(matching)) == *matches
})
}
SystemDataType::CommandExists => values
Expand Down
17 changes: 6 additions & 11 deletions core/tabs/applications-setup/tab_data.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ description = "Thunderbird is a free, open-source email client that offers power
script = "communication-apps/thunderbird-setup.sh"
task_list = "I"

[[data.entries]]
name = "ZapZap"
description = "ZapZap is an open source whatsapp desktop client for Linux users developed by rafatosta."
script = "communication-apps/zapzap-setup.sh"
task_list = "I"

[[data.entries]]
name = "Zoom"
description = "Zoom is a widely-used video conferencing platform that allows users to host virtual meetings, webinars, and online collaboration with features like screen sharing and recording."
Expand Down Expand Up @@ -84,17 +90,6 @@ description = "Sublime Text is a fast, lightweight, and customizable text editor
script = "Developer-tools/sublime-setup.sh"
task_list = "I"

[[data.entries]]
name = "ZapZap"
description = "ZapZap is an open source whatsapp desktop client for Linux users developed by rafatosta."
script = "communication-apps/zapzap-setup.sh"
task_list = "I"

[[data.entries]]
name = "Zoom"
description = "Zoom is a widely-used video conferencing platform that allows users to host virtual meetings, webinars, and online collaboration with features like screen sharing and recording."
script = "communication-apps/zoom-setup.sh"

[[data.entries]]
name = "VS Code"
description = "Visual Studio Code (VS Code) is a lightweight, open-source code editor with built-in support for debugging, version control, and extensions for various programming languages and frameworks."
Expand Down
2 changes: 1 addition & 1 deletion man/linutil.1
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Please consider submitting feedback if you do.
https://github.com/ChrisTitusTech/linutil/issues

.SH COPYRIGHT
Copyright (c) 2024 Chris Titus.
Copyright (c) 2025 Chris Titus.
.br
MIT License.
https://opensource.org/license/MIT
2 changes: 1 addition & 1 deletion tui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ tui-term = { version = "0.2.0", default-features = false }
time = { version = "0.3.36", features = ["formatting", "local-offset", "macros"], default-features = false }
unicode-width = { version = "0.2.0", default-features = false }
rand = { version = "0.8.5", optional = true }
linutil_core = { version = "24.10.31", path = "../core" }
linutil_core = { version = "25.1.10", path = "../core" }
tree-sitter-highlight = "0.24.4"
tree-sitter-bash = "0.23.3"
nix = { version = "0.29.0", features = [ "user" ] }
Expand Down
2 changes: 1 addition & 1 deletion tui/src/floating_text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ impl<'a> FloatingText<'a> {
}
}

impl<'a> FloatContent for FloatingText<'a> {
impl FloatContent for FloatingText<'_> {
fn draw(&mut self, frame: &mut Frame, area: Rect, _theme: &Theme) {
let block = Block::default()
.borders(Borders::ALL)
Expand Down
2 changes: 1 addition & 1 deletion tui/src/hint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub fn create_shortcut_list(
.unwrap_or(0);

let columns = (render_width as usize / (max_shortcut_width + 4)).max(1);
let rows = (shortcut_spans.len() + columns - 1) / columns;
let rows = shortcut_spans.len().div_ceil(columns);

let mut lines: Vec<Line<'static>> = Vec::with_capacity(rows);

Expand Down
2 changes: 1 addition & 1 deletion tui/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mod floating_text;
mod hint;
mod root;
mod running_command;
pub mod state;
mod state;
mod theme;

#[cfg(feature = "tips")]
Expand Down
4 changes: 2 additions & 2 deletions tui/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ impl AppState {
}
match &mut self.focus {
Focus::FloatingWindow(float) => {
float.content.handle_mouse_event(event);
float.handle_mouse_event(event);
}
Focus::ConfirmationPrompt(confirm) => {
confirm.content.handle_mouse_event(event);
Expand Down Expand Up @@ -735,7 +735,7 @@ impl AppState {
self.filter
.item_list()
.get(selected_index)
.map_or(false, |item| item.has_children)
.is_some_and(|i| i.has_children)
}

pub fn selected_item_is_cmd(&self) -> bool {
Expand Down

0 comments on commit b3c5aaa

Please sign in to comment.