From a1e3f605c9436b8d2d78d38505e93c0ff3e468d8 Mon Sep 17 00:00:00 2001 From: Joe Date: Tue, 17 May 2022 21:24:23 +0200 Subject: setwp udpate --- .config/emacs/org/config.org | 2 +- .local/bin/setwp | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.config/emacs/org/config.org b/.config/emacs/org/config.org index 3dbb8f8..e6cf563 100644 --- a/.config/emacs/org/config.org +++ b/.config/emacs/org/config.org @@ -107,7 +107,7 @@ vimish-fold bind-key all-the-icons all-the-icons-dired all-the-icons-ibuffer - mutt-mode vimrc-mode nginx-mode gemini-mode yaml-mode + mutt-mode vimrc-mode nginx-mode gemini-mode yaml-mode crontab-mode )) (when (cl-find-if-not #'package-installed-p package-selected-packages) diff --git a/.local/bin/setwp b/.local/bin/setwp index 70577ae..6686e67 100755 --- a/.local/bin/setwp +++ b/.local/bin/setwp @@ -81,9 +81,14 @@ sub main my $wp; my $ret; - $wp = choose_wp(get_pool_files()); - $ret = set_wp($wp); - if (@ARGV == 0 || $ARGV[0] ne "-nw") { + if (@ARGV != 0 && -f $ARGV[0]) { + $ret = set_wp($ARGV[0]); + } + else { + $wp = choose_wp(get_pool_files()); + $ret = set_wp($wp); + } + if (@ARGV != 0 && $ARGV[0] eq "-nw") { notify() if ($ret == 0); notify_error() if ($ret != 0); } -- cgit v1.2.3