mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-12-23 20:09:44 +00:00
feat(task list): task names shortcuts (#628)
* Rust setup * Updated tasklists * More space
This commit is contained in:
parent
e8b208f2b4
commit
62bcac4853
|
@ -7,43 +7,43 @@ name = "Developer Tools"
|
|||
name = "Github Desktop"
|
||||
description = "GitHub Desktop is a user-friendly application that simplifies the process of managing Git repositories and interacting with GitHub, providing a graphical interface for tasks like committing, branching, and syncing changes."
|
||||
script = "Developer-tools/githubdesktop-setup.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data.entries]]
|
||||
name = "Neovim"
|
||||
description = "Neovim is a refactor, and sometimes redactor, in the tradition of Vim.\nIt is not a rewrite but a continuation and extension of Vim.\nThis command configures neovim from CTT's neovim configuration.\nhttps://github.com/ChrisTitusTech/neovim"
|
||||
script = "Developer-tools/neovim-setup.sh"
|
||||
task_list = "installation, file modification"
|
||||
task_list = "I FM"
|
||||
|
||||
[[data.entries]]
|
||||
name = "Sublime Text"
|
||||
description = "Sublime Text is a fast, lightweight, and customizable text editor known for its simplicity, powerful features, and wide range of plugins for various programming languages."
|
||||
script = "Developer-tools/sublime-setup.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[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."
|
||||
script = "Developer-tools/vscode-setup.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data.entries]]
|
||||
name = "VS Codium"
|
||||
description = "VSCodium is a free, open-source version of Visual Studio Code (VS Code) that removes Microsoft-specific telemetry and branding."
|
||||
script = "Developer-tools/vscodium-setup.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data.entries]]
|
||||
name = "Meld"
|
||||
description = "Meld is a visual diff and merge tool that helps compare files, directories, and version-controlled projects."
|
||||
script = "Developer-tools/meld-setup.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data.entries]]
|
||||
name = "Ngrok"
|
||||
description = "Ngrok is a tool that creates secure, temporary tunnels to expose local servers to the internet for testing and development."
|
||||
script = "Developer-tools/ngrok-setup.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data]]
|
||||
name = "Communication Apps"
|
||||
|
@ -52,112 +52,112 @@ name = "Communication Apps"
|
|||
name = "Discord"
|
||||
description = "Discord is a versatile communication platform for gamers and communities, offering voice, video, and text chat features."
|
||||
script = "communication-apps/discord-setup.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data.entries]]
|
||||
name = "Jitsi"
|
||||
description = "Jitsi Meet is an open-source video conferencing tool that allows users to host and join secure meetings directly from their web browsers without the need for downloads."
|
||||
script = "communication-apps/jitsi-setup.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data.entries]]
|
||||
name = "Signal"
|
||||
description = "Signal is a privacy-focused messaging app that provides end-to-end encryption for secure text, voice, and video communication."
|
||||
script = "communication-apps/signal-setup.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data.entries]]
|
||||
name = "Slack"
|
||||
description = "Slack is a collaboration platform designed for team communication, featuring channels, direct messaging, file sharing, and integrations with various productivity tools."
|
||||
script = "communication-apps/slack-setup.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data.entries]]
|
||||
name = "Telegram"
|
||||
description = "Telegram is a cloud-based messaging app known for its speed and security, offering features like group chats, channels, and end-to-end encrypted calls."
|
||||
script = "communication-apps/telegram-setup.sh"
|
||||
task_list = "installation"
|
||||
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"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data.entries]]
|
||||
name = "Thunderbird"
|
||||
description = "Thunderbird is a free, open-source email client that offers powerful features like customizable email management, a built-in calendar, and extensive add-ons for enhanced functionality."
|
||||
script = "communication-apps/thunderbird-setup.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data]]
|
||||
name = "Alacritty"
|
||||
description = "Alacritty is a modern terminal emulator that comes with sensible defaults, but allows for extensive configuration. By integrating with other applications, rather than reimplementing their functionality, it manages to provide a flexible set of features with high performance. The supported platforms currently consist of BSD, Linux, macOS and Windows.\nThis command installs and condifures alacritty terminal emulator."
|
||||
script = "alacritty-setup.sh"
|
||||
task_list = "installation, file modification"
|
||||
task_list = "I FM"
|
||||
|
||||
[[data]]
|
||||
name = "Android Debloater"
|
||||
description = "Universal Android Debloater (UAD) is a tool designed to help users remove bloatware and unnecessary pre-installed applications from Android devices, enhancing performance and user experience."
|
||||
script = "android-debloat.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data]]
|
||||
name = "Bash Prompt"
|
||||
description = "The .bashrc file is a script that runs every time a new terminal session is started in Unix-like operating systems.\nIt is used to configure the shell session, set up aliases, define functions, and more, making the terminal easier to use and more powerful.\nThis command configures the key sections and functionalities defined in the .bashrc file from CTT's mybash repository.\nhttps://github.com/ChrisTitusTech/mybash"
|
||||
script = "mybash-setup.sh"
|
||||
task_list = "installation, file modification"
|
||||
task_list = "I FM"
|
||||
|
||||
[[data]]
|
||||
name = "Bottles"
|
||||
script = "bottles-setup.sh"
|
||||
task_list = "flatpak installation"
|
||||
task_list = "FI"
|
||||
|
||||
[[data]]
|
||||
name = "Web Browsers"
|
||||
description = "An interactive script to install popular browsers."
|
||||
script = "browser-setup.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data]]
|
||||
name = "DWM-Titus"
|
||||
description = "DWM is a dynamic window manager for X.\nIt manages windows in tiled, monocle and floating layouts.\nAll of the layouts can be applied dynamically, optimising the environment for the application in use and the task performed.\nThis command installs and configures DWM and a desktop manager.\nThe list of patches applied can be found in CTT's DWM repository\nhttps://github.com/ChrisTitusTech/dwm-titus"
|
||||
script = "dwmtitus-setup.sh"
|
||||
task_list = "installation, privileged file modification, systemd actions"
|
||||
task_list = "I PFM SS"
|
||||
|
||||
[[data]]
|
||||
name = "Docker"
|
||||
script = "docker-setup.sh"
|
||||
task_list = "installation, systemd actions"
|
||||
task_list = "I SS"
|
||||
|
||||
[[data]]
|
||||
name = "Fastfetch"
|
||||
description = "Fastfetch is a neofetch-like tool for fetching system information and displaying it prettily.\nIt is written mainly in C, with performance and customizability in mind.\nThis command installs fastfetch and configures from CTT's mybash repository.\nhttps://github.com/ChrisTitusTech/mybash"
|
||||
script = "fastfetch-setup.sh"
|
||||
task_list = "installation, file modification"
|
||||
task_list = "I FM"
|
||||
|
||||
[[data]]
|
||||
name = "Flatpak / Flathub"
|
||||
description = "Flatpak is a universal application sandbox for Linux that uses isolated packages from Flathub to prevent conflicts and system alterations, while alleviating dependency concerns.\nThis command installs Flatpak and adds the Flathub repository"
|
||||
script = "setup-flatpak.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data]]
|
||||
name = "Grub Theme"
|
||||
script = "grub-theme.sh"
|
||||
task_list = "privileged file modification"
|
||||
task_list = "PFM"
|
||||
|
||||
[[data]]
|
||||
name = "Kitty"
|
||||
description = "kitty is a free and open-source GPU-accelerated terminal emulator for Linux, macOS, and some BSD distributions, focused on performance and features.\nkitty is written in a mix of C and Python programming languages.\n This command installs and configures kitty."
|
||||
script = "kitty-setup.sh"
|
||||
task_list = "installation, file modification"
|
||||
task_list = "I FM"
|
||||
|
||||
[[data]]
|
||||
name = "Linutil Installer"
|
||||
description = "Installs a distro-specific Linutil package locally."
|
||||
script = "linutil-installer.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data.preconditions]]
|
||||
matches = false
|
||||
|
@ -168,7 +168,7 @@ values = [ "linutil" ]
|
|||
name = "Linutil Updater"
|
||||
description = "Updates your local Linutil crate installation."
|
||||
script = "linutil-updater.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data.preconditions]]
|
||||
matches = true
|
||||
|
@ -179,19 +179,19 @@ values = [ "linutil" ]
|
|||
name = "Office Suite"
|
||||
description = "An office suite installer is a software package that installs productivity tools such as word processing, spreadsheets, presentations, and pdf viewers for business and personal use."
|
||||
script = "office-suite-setup.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data]]
|
||||
name = "Rofi"
|
||||
description = "Rofi is a window switcher, run dialog, ssh-launcher and dmenu replacement that started as a clone of simpleswitcher, written by Sean Pringle and later expanded by Dave Davenport.\nThis command installs and configures rofi with configuration from CTT's DWM repo.\nhttps://github.com/ChrisTitusTech/dwm-titus"
|
||||
script = "rofi-setup.sh"
|
||||
task_list = "installation, file modification"
|
||||
task_list = "I FM"
|
||||
|
||||
[[data]]
|
||||
name = "Waydroid"
|
||||
description = "Waydroid is an emulator that allows you to run Android apps and games on Linux."
|
||||
script = "waydroid-setup.sh"
|
||||
task_list = "installation, emulation"
|
||||
task_list = "I SS"
|
||||
[[data.preconditions]]
|
||||
matches = true
|
||||
data = { environment = "XDG_SESSION_TYPE" }
|
||||
|
@ -201,4 +201,4 @@ values = [ "wayland", "Wayland" ]
|
|||
name = "ZSH Prompt"
|
||||
description = "The Z shell is a Unix shell that can be used as an interactive login shell and as a command interpreter for shell scripting. Zsh is an extended Bourne shell with many improvements, including some features of Bash, ksh, and tcsh.\nThis command installs ZSH prompt and provides basic configuration."
|
||||
script = "zsh-setup.sh"
|
||||
task_list = "installation, file modification"
|
||||
task_list = "I FM"
|
||||
|
|
|
@ -7,4 +7,4 @@ name = "Diablo II Resurrected"
|
|||
name = "Loot Filter"
|
||||
description = "This is a loot filter for Diablo II Resurrected.\nIt's designed to be a simple, clean, and easy to read loot filter that highlights the most important items.\nWorks on battle.net and single player.\nNo frills, no config, just highlights high runes and other valuable items.\nFor more information visit: https://github.com/ChrisTitusTech/d2r-loot-filter"
|
||||
script = "diablo-ii/d2r-loot-filters.sh"
|
||||
task_list = "file modification"
|
||||
task_list = "FM"
|
||||
|
|
|
@ -4,4 +4,4 @@ name = "Security"
|
|||
name = "Firewall Baselines (CTT)"
|
||||
description = "Developed to ease iptables firewall configuration, UFW provides a user friendly way to create an IPv4 or IPv6 host-based firewall.\nThis command installs UFW and configures UFW based on CTT's recommended rules.\nFor more information visit: https://christitus.com/linux-security-mistakes"
|
||||
script = "firewall-baselines.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I SS"
|
||||
|
|
|
@ -13,19 +13,19 @@ values = ["pacman"]
|
|||
name = "Arch Server Setup"
|
||||
description = "This command installs a minimal arch server setup under 5 minutes."
|
||||
script = "arch/server-setup.sh"
|
||||
task_list = "full system installation, including partitioning"
|
||||
task_list = "SI D"
|
||||
|
||||
[[data.entries]]
|
||||
name = "Paru AUR Helper"
|
||||
description = "Paru is your standard pacman wrapping AUR helper with lots of features and minimal interaction.\nTo know more about AUR helpers visit: https://wiki.archlinux.org/title/AUR_helpers"
|
||||
script = "arch/paru-setup.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data.entries]]
|
||||
name = "Yay AUR Helper"
|
||||
description = "Yet Another Yogurt - An AUR Helper Written in Go.\nTo know more about AUR helpers visit: https://wiki.archlinux.org/title/AUR_helpers"
|
||||
script = "arch/yay-setup.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data]]
|
||||
name = "Fedora"
|
||||
|
@ -39,61 +39,61 @@ values = ["dnf"]
|
|||
name = "Configure DNF"
|
||||
description = "Optimizes DNF for parallel downloads"
|
||||
script = "fedora/configure-dnf.sh"
|
||||
task_list = "privileged file modification"
|
||||
task_list = "PFM"
|
||||
|
||||
[[data.entries]]
|
||||
name = "Multimedia Codecs"
|
||||
script = "fedora/multimedia-codecs.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data.entries]]
|
||||
name = "Nvidia Proprietary Drivers"
|
||||
script = "fedora/nvidia-proprietary-driver-setup.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data.entries]]
|
||||
name = "RPM Fusion"
|
||||
description = "RPM Fusion provides software that the Fedora Project or Red Hat doesn't want to ship.\nThat software is provided as precompiled RPMs for all current Fedora versions and current Red Hat Enterprise Linux or clones versions; you can use the RPM Fusion repositories with tools like yum and PackageKit.\nFor more information visit: https://rpmfusion.org/"
|
||||
script = "fedora/rpm-fusion-setup.sh"
|
||||
task_list = "repo installation"
|
||||
task_list = "MP"
|
||||
|
||||
[[data.entries]]
|
||||
name = "Virtualization"
|
||||
description = "Enables Virtualization through dnf"
|
||||
script = "fedora/virtualization.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data]]
|
||||
name = "Build Prerequisites"
|
||||
description = "This script is designed to handle the installation of various software dependencies across different Linux distributions"
|
||||
script = "compile-setup.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data]]
|
||||
name = "Full System Cleanup"
|
||||
script = "system-cleanup.sh"
|
||||
task_list = "package removal, privileged file modification"
|
||||
task_list = "RP PFM"
|
||||
|
||||
[[data]]
|
||||
name = "Full System Update"
|
||||
description = "This command updates your system to the latest packages available for your distro"
|
||||
script = "system-update.sh"
|
||||
task_list = "privileged file modification"
|
||||
task_list = "PFM"
|
||||
|
||||
[[data]]
|
||||
name = "Gaming Dependencies"
|
||||
description = "This script is designed to handle the installation of gaming dependencies across different Linux distributions"
|
||||
script = "gaming-setup.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data]]
|
||||
name = "Global Theme"
|
||||
description = "This script is designed to handle the installation and configuration of global theming"
|
||||
script = "global-theme.sh"
|
||||
task_list = "installation, privileged file modification"
|
||||
task_list = "I PFM"
|
||||
|
||||
[[data]]
|
||||
name = "Remove Snaps"
|
||||
description = "This script is designed to remove snap"
|
||||
script = "remove-snaps.sh"
|
||||
task_list = "package removal"
|
||||
task_list = "RP"
|
||||
|
|
|
@ -22,7 +22,7 @@ script = "monitor-control/auto_detect_displays.sh"
|
|||
[[data]]
|
||||
name = "Auto Mount Drive"
|
||||
script = "auto-mount.sh"
|
||||
task_list = "privileged file modification"
|
||||
task_list = "PFM"
|
||||
|
||||
[[data.entries]]
|
||||
name = "Change Orientation"
|
||||
|
@ -63,7 +63,7 @@ matches = true
|
|||
[[data]]
|
||||
name = "SSH-Samba"
|
||||
script = "samba-ssh-setup.sh"
|
||||
task_list = "installation, systemd actions, privileged file modification"
|
||||
task_list = "I SS PFM"
|
||||
|
||||
[[data.entries]]
|
||||
name = "Scale Monitors"
|
||||
|
@ -111,54 +111,54 @@ task_list = "DE setup"
|
|||
[[data]]
|
||||
name = "Auto Power Profiling"
|
||||
script = "power-profile.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data]]
|
||||
name = "Bluetooth Manager"
|
||||
description = "This utility is designed to manage bluetooth in your system"
|
||||
script = "bluetooth-control.sh"
|
||||
task_list = "installation, systemd actions"
|
||||
task_list = "I SS"
|
||||
|
||||
[[data]]
|
||||
name = "Bootable USB Creator"
|
||||
script = "create-bootable-usb.sh"
|
||||
task_list = "disk modification"
|
||||
task_list = "D"
|
||||
|
||||
[[data]]
|
||||
name = "Crypto tool"
|
||||
script = "encrypt_decrypt_tool.sh"
|
||||
task_list = "installation, file modification"
|
||||
task_list = "I FM"
|
||||
|
||||
[[data]]
|
||||
name = "Numlock on Startup"
|
||||
description = "This utility is designed to configure auto enabling of numlock on boot"
|
||||
script = "numlock.sh"
|
||||
task_list = "privileged file modification, systemd actions"
|
||||
task_list = "PFM SS"
|
||||
|
||||
[[data]]
|
||||
name = "Ollama"
|
||||
description = "This utility is designed to manage ollama in your system"
|
||||
script = "ollama.sh"
|
||||
task_list = "installation, systemd actions"
|
||||
task_list = "I SS"
|
||||
|
||||
[[data]]
|
||||
name = "Service Manager"
|
||||
description = "This utility is designed to manage services in your system"
|
||||
script = "service-control.sh"
|
||||
task_list = "installation, privileged file modification, systemd actions"
|
||||
task_list = "I PFM SS"
|
||||
|
||||
[[data]]
|
||||
name = "SSH Commands"
|
||||
script = "ssh.sh"
|
||||
task_list = "installation, file modification, systemd actions"
|
||||
task_list = "I FM SS"
|
||||
|
||||
[[data]]
|
||||
name = "Timeshift Backup"
|
||||
script = "timeshift.sh"
|
||||
task_list = "installation"
|
||||
task_list = "I"
|
||||
|
||||
[[data]]
|
||||
name = "WiFi Manager"
|
||||
description = "This utility is designed to manage wifi in your system"
|
||||
script = "wifi-control.sh"
|
||||
task_list = "installation, systemd actions"
|
||||
task_list = "I SS"
|
||||
|
|
|
@ -56,7 +56,11 @@ impl Float {
|
|||
// Returns true if the floating window is finished.
|
||||
pub fn handle_key_event(&mut self, key: &KeyEvent) -> bool {
|
||||
match key.code {
|
||||
KeyCode::Enter | KeyCode::Char('p') | KeyCode::Char('d') | KeyCode::Esc
|
||||
KeyCode::Enter
|
||||
| KeyCode::Char('p')
|
||||
| KeyCode::Char('d')
|
||||
| KeyCode::Char('g')
|
||||
| KeyCode::Esc
|
||||
if self.content.is_finished() =>
|
||||
{
|
||||
true
|
||||
|
|
|
@ -30,6 +30,7 @@ use zips::zip_result;
|
|||
pub enum FloatingTextMode {
|
||||
Preview,
|
||||
Description,
|
||||
ActionsGuide,
|
||||
}
|
||||
|
||||
pub struct FloatingText {
|
||||
|
@ -182,6 +183,7 @@ impl FloatingText {
|
|||
match mode {
|
||||
FloatingTextMode::Preview => "Command Preview",
|
||||
FloatingTextMode::Description => "Command Description",
|
||||
FloatingTextMode::ActionsGuide => "Important Actions Guide",
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -299,7 +301,7 @@ impl FloatContent for FloatingText {
|
|||
Shortcut::new(vec!["k", "Up"], "Scroll up"),
|
||||
Shortcut::new(vec!["h", "Left"], "Scroll left"),
|
||||
Shortcut::new(vec!["l", "Right"], "Scroll right"),
|
||||
Shortcut::new(vec!["Enter", "p", "d"], "Close window"),
|
||||
Shortcut::new(vec!["Enter", "p", "d", "g"], "Close window"),
|
||||
],
|
||||
}
|
||||
}
|
||||
|
|
|
@ -144,6 +144,7 @@ pub fn draw_shortcuts(state: &AppState, frame: &mut Frame, area: Rect) {
|
|||
}
|
||||
hints.push(Shortcut::new(vec!["Tab"], "Next tab"));
|
||||
hints.push(Shortcut::new(vec!["Shift-Tab"], "Previous tab"));
|
||||
hints.push(Shortcut::new(vec!["g"], "Important actions guide"));
|
||||
ShortcutList {
|
||||
scope_name: "Command list",
|
||||
hints,
|
||||
|
|
|
@ -22,6 +22,19 @@ use ratatui::{
|
|||
const MIN_WIDTH: u16 = 77;
|
||||
const MIN_HEIGHT: u16 = 19;
|
||||
const TITLE: &str = concat!("Linux Toolbox - ", env!("BUILD_DATE"));
|
||||
const ACTIONS_GUIDE: &str = "List of important tasks performed by commands' names:
|
||||
|
||||
D - disk modifications (ex. partitioning) (privileged)
|
||||
FI - flatpak installation
|
||||
FM - file modification
|
||||
I - installation (privileged)
|
||||
MP - package manager actions
|
||||
SI - full system installation
|
||||
SS - systemd actions (privileged)
|
||||
RP - package removal
|
||||
|
||||
P* - privileged *
|
||||
";
|
||||
|
||||
pub struct AppState {
|
||||
/// Selected theme
|
||||
|
@ -188,7 +201,7 @@ impl AppState {
|
|||
|
||||
let list_chunks = Layout::default()
|
||||
.direction(Direction::Horizontal)
|
||||
.constraints([Constraint::Percentage(60), Constraint::Percentage(40)].as_ref())
|
||||
.constraints([Constraint::Percentage(70), Constraint::Percentage(30)].as_ref())
|
||||
.split(chunks[1]);
|
||||
|
||||
self.filter.draw_searchbar(frame, chunks[0], &self.theme);
|
||||
|
@ -365,6 +378,7 @@ impl AppState {
|
|||
KeyCode::Char('/') => self.enter_search(),
|
||||
KeyCode::Char('t') => self.theme.next(),
|
||||
KeyCode::Char('T') => self.theme.prev(),
|
||||
KeyCode::Char('g') => self.toggle_task_list_guide(),
|
||||
_ => {}
|
||||
},
|
||||
Focus::List if key.kind != KeyEventKind::Release => match key.code {
|
||||
|
@ -383,6 +397,7 @@ impl AppState {
|
|||
KeyCode::Char('/') => self.enter_search(),
|
||||
KeyCode::Char('t') => self.theme.next(),
|
||||
KeyCode::Char('T') => self.theme.prev(),
|
||||
KeyCode::Char('g') => self.toggle_task_list_guide(),
|
||||
KeyCode::Char('v') | KeyCode::Char('V') => self.toggle_multi_select(),
|
||||
KeyCode::Char(' ') if self.multi_select => self.toggle_selection(),
|
||||
_ => {}
|
||||
|
@ -558,6 +573,14 @@ impl AppState {
|
|||
self.selection.select(Some(0));
|
||||
self.update_items();
|
||||
}
|
||||
|
||||
fn toggle_task_list_guide(&mut self) {
|
||||
self.spawn_float(
|
||||
FloatingText::new(ACTIONS_GUIDE.to_string(), FloatingTextMode::ActionsGuide),
|
||||
80,
|
||||
80,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "tips")]
|
||||
|
|
Loading…
Reference in New Issue
Block a user