summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-01-28 08:30:19 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-01-28 08:30:19 +0900
commit77cba8ddf0527a180cbe60d40f4eb92a722543d3 (patch)
tree95d857a41d068b0a56789f1cade53d8af9b722a6
parent3dd247dfecb46356e25925e9c4e9fd2d7b40d1e7 (diff)
modified Makefile, modified share/mutt-wizard.muttrc
-rw-r--r--Makefile64
-rw-r--r--share/mutt-wizard.muttrc1
2 files changed, 4 insertions, 61 deletions
diff --git a/Makefile b/Makefile
index 90a5730..052d52d 100644
--- a/Makefile
+++ b/Makefile
@@ -2,72 +2,14 @@
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
-DEPENDENCIES = neomutt curl msmtp pass gettext urlscan
NON_EXEC_DEPS = isync ca-certificates
-check-dependencies:
- @for dep in $(DEPENDENCIES); do \
- if ! command -v $$dep >/dev/null 2>&1; then \
- echo "Error: $$dep is not installed."; \
- exit 1; \
- fi; \
- done
- @for dep in $(NON_EXEC_DEPS); do \
- if command -v pacman >/dev/null 2>&1; then \
- if ! pacman -Q $$dep >/dev/null 2>&1; then \
- echo "Error: $$dep is not installed."; \
- exit 1; \
- fi; \
- elif command -v dpkg >/dev/null 2>&1; then \
- if ! dpkg -s $$dep >/dev/null 2>&1; then \
- echo "Error: $$dep is not installed."; \
- exit 1; \
- fi; \
- elif command -v rpm >/dev/null 2>&1; then \
- if ! rpm -q $$dep >/dev/null 2>&1; then \
- echo "Error: $$dep is not installed."; \
- exit 1; \
- fi; \
- elif command -v zypper >/dev/null 2>&1; then \
- if ! zypper se -i $$dep >/dev/null 2>&1; then \
- echo "Error: $$dep is not installed."; \
- exit 1; \
- fi; \
- else \
- echo "Error: Unsupported package manager. Cannot verify installation of $$dep."; \
- exit 1; \
- fi; \
- done
- @echo "All dependencies are installed."
-
-install-dependencies:
- @if command -v apt-get >/dev/null 2>&1; then \
- echo "Using apt-get to install dependencies..."; \
- sudo apt-get update; \
- sudo apt-get install -y $(DEPENDENCIES); \
- elif command -v yum >/dev/null 2>&1; then \
- echo "Using yum to install dependencies..."; \
- sudo yum install -y $(DEPENDENCIES); \
- elif command -v dnf >/dev/null 2>&1; then \
- echo "Using dnf to install dependencies..."; \
- sudo dnf install -y $(DEPENDENCIES); \
- elif command -v pacman >/dev/null 2>&1; then \
- echo "Using pacman to install dependencies..."; \
- sudo pacman -S --needed $(DEPENDENCIES); \
- elif command -v zypper >/dev/null 2>&1; then \
- echo "Using zypper to install dependencies..."; \
- sudo zypper install -y $(DEPENDENCIES); \
- else \
- echo "Error: No supported package manager found. Please install dependencies manually."; \
- exit 1; \
- fi
-
-install: install-dependencies check-dependencies
+install:
mkdir -p $(DESTDIR)$(PREFIX)/bin
mkdir -p $(DESTDIR)$(PREFIX)/lib/mutt-wizard
mkdir -p $(DESTDIR)$(PREFIX)/share/mutt-wizard
cp -f bin/mailsync $(DESTDIR)$(PREFIX)/bin
- cp -f lib/openfile $(DESTDIR)$(PREFIX)/lib/mutt-wizard
+ cp -f lib/openfile $(DESTDIR)$(PREFIX)/lib/mutt-wizard/openfile
chmod 755 $(DESTDIR)$(PREFIX)/share/mutt-wizard
for shared in share/*; do \
cp -f $$shared $(DESTDIR)$(PREFIX)/share/mutt-wizard; \
@@ -92,4 +34,4 @@ uninstall:
rm -f $(DESTDIR)$(MANPREFIX)/man1/mw.1 $(DESTDIR)$(MANPREFIX)/man1/mailsync.1
rm -f $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_mutt-wizard.zsh
-.PHONY: install uninstall check-dependencies install-dependencies
+.PHONY: install uninstall
diff --git a/share/mutt-wizard.muttrc b/share/mutt-wizard.muttrc
index 647f76f..fd78998 100644
--- a/share/mutt-wizard.muttrc
+++ b/share/mutt-wizard.muttrc
@@ -48,6 +48,7 @@ bind pager,attach h exit
bind pager j next-line
bind pager k previous-line
bind pager l view-attachments
+bind index \Ca toggle-read
bind index D delete-message
bind index U undelete-message
bind index L limit