lfp


Logs | Files | README | LICENSE | GitLab


1
commit 0ac3f02acea4aa15bab5a59537799644e9fab896
2
Author: Connor Etherington <[email protected]>
3
Date:   Sat Aug 26 12:58:10 2023 +0200
4
5
    Auto-Commit Update - 20230826
6
---
7
 PKGBUILD                    |  2 +-
8
 README.md                   |  2 +-
9
 usr/share/doc/lfp/README.md |  2 +-
10
 usr/share/lfp/lfprc         | 16 +++++++++++-----
11
 4 files changed, 14 insertions(+), 8 deletions(-)
12
13
diff --git a/PKGBUILD b/PKGBUILD
14
index 6b486a4..3665c3e 100644
15
--- a/PKGBUILD
16
+++ b/PKGBUILD
17
@@ -1,7 +1,7 @@
18
 # Maintainer: Connor Etherington <[email protected]>
19
 # ---
20
 pkgname=lfp
21
-pkgver=4.0.0
22
+pkgver=4.0.1
23
 pkgrel=1
24
 pkgdesc='A wrapper for the lf file manager with in-terminal media previews, on-exit directory changing and much more'
25
 license=('MIT')
26
diff --git a/README.md b/README.md
27
index c456528..a5aac82 100644
28
--- a/README.md
29
+++ b/README.md
30
@@ -3,7 +3,7 @@
31
 ### `lfp` is a simple wrapper for the `lf` file manager, with built-in file, image, and video previews, as well as on-exit directory changing.
32
 ### The program makes use of `ueberzug` to preview images, documents, and video thumbnails. Preview behavior can be altered by editing the *scope* file.
33
 
34
-**Version: 4.0.0**
35
+**Version: 4.0.1**
36
 
37
 ***
38
 
39
diff --git a/usr/share/doc/lfp/README.md b/usr/share/doc/lfp/README.md
40
index c456528..a5aac82 100644
41
--- a/usr/share/doc/lfp/README.md
42
+++ b/usr/share/doc/lfp/README.md
43
@@ -3,7 +3,7 @@
44
 ### `lfp` is a simple wrapper for the `lf` file manager, with built-in file, image, and video previews, as well as on-exit directory changing.
45
 ### The program makes use of `ueberzug` to preview images, documents, and video thumbnails. Preview behavior can be altered by editing the *scope* file.
46
 
47
-**Version: 4.0.0**
48
+**Version: 4.0.1**
49
 
50
 ***
51
 
52
diff --git a/usr/share/lfp/lfprc b/usr/share/lfp/lfprc
53
index 11b021a..676d290 100644
54
--- a/usr/share/lfp/lfprc
55
+++ b/usr/share/lfp/lfprc
56
@@ -171,7 +171,7 @@ EOF
57
     '--color=fg:#0A9396,bg:#272822,hl:#C9CB3C,fg+:#E9D8A6,bg+:#2B2B27,hl+:#EE6C4D'
58
   )
59
 
60
-  BAT="bat -pn --style=numbers,grid --color=always --line-range :500"
61
+  BAT="bat -pn --style=numbers,grid,changes --italic-text=always --paging=always --pager='less -R' --color=always --line-range :500 --decorations=always"
62
   FROM=`echo ${*:-$PWD} | sed 's/\/$//'`
63
 
64
   selectNodeScript(){
65
@@ -188,6 +188,7 @@ EOF
66
         fzf --ansi --no-sort --cycle --pointer "▶" \
67
           $RandomColor \
68
           --prompt="Select JavaScript File: " \
69
+          --info=inline --padding=1 --border --margin=1 \
70
           --header "
71
 Enter : proceed
72
 Space : toggle sort
73
@@ -196,7 +197,7 @@ Tab   : toggle preview
74
           --height 60% \
75
           --preview-window right:60% \
76
           --bind "tab:toggle-preview,space:toggle-sort" \
77
-          --preview "[ -f $srtdir/{} ] && $BAT $srtdir/{} || { echo -e '\n\e[32mDirectory Listing:\n\e[0m'; ls -1 $srtdir/{}; } | $BAT"
78
+          --preview "[ -f $srtdir/{} ] && $BAT $srtdir/{} || { echo -e '\n\e[32mDirectory Listing:\e[0m\n'; ls -1 $srtdir/{}; } | $BAT"
79
       )
80
 
81
       [ -z "$file" ] && exit 1
82
@@ -216,6 +217,10 @@ Tab   : toggle preview
83
 
84
 
85
   runScript(){
86
+    yarn $@ && echo -en "\npress any key to continue..." && read -n 1 -s -r -p "" || return 1
87
+  }
88
+
89
+  exeScript(){
90
     node $@ && echo -en "\npress any key to continue..." && read -n 1 -s -r -p "" || return 1
91
   }
92
 
93
@@ -227,7 +232,7 @@ Tab   : toggle preview
94
     case $mode in
95
       '[A'|'u'|'s') npm init -y && notify-send "📦 Package.json created" ;;
96
       '[D') clear && getPKGs && for x in ${pkgs[@]}; do eval "runScript add $x >/dev/null 2>&1 && notify-send '✅ $x installed'" ; done ;;
97
-      '[B'|'y') clear && { selectNodeScript && runScript $file; } || notify-send "📦 Failed to run script" "'$file' is not a valid JavaScript file." ;;
98
+      '[B'|'y') clear && { selectNodeScript && exeScript $file; } || notify-send "📦 Failed to run script" "'$file' is not a valid JavaScript file." ;;
99
       '[C') clear && notify-send "📦 Starting Server..." && runScript start ;;
100
       'h') notify-send "📦 Starting Server in Development Mode..." && runScript dev ;;
101
       'd'|'m') notify-send "📦 Starting Server in Development Mode..."&& runScript dev >/dev/null 2>&1 & disown ;;
102
@@ -300,7 +305,7 @@ EOF
103
     echo -en "\n\e[1,33m [+] \e[36m Enter package name(s): \e[0m" ; read pkgs
104
   }
105
 
106
-  BAT="bat -l yaml --color=always --theme=ansi --style=numbers,changes,grid --italic-text=always --paging=always --pager='less -R'"
107
+  BAT="bat -pn --style=numbers,grid,changes --italic-text=always --paging=always --pager='less -R' --color=always --line-range :500 --decorations=always"
108
   FROM=`echo ${*:-$PWD} | sed 's/\/$//'`
109
 
110
   selectPyScript(){
111
@@ -316,6 +321,7 @@ EOF
112
       file=$(printf "%s\n" "${choices[@]}" |
113
         fzf --ansi --no-sort --cycle --pointer "▶" \
114
           $RandomColor \
115
+          --info=inline --padding=1 --border --margin=1 \
116
           --prompt="Select Python Script: " \
117
           --header "
118
 Enter : proceed
119
@@ -325,7 +331,7 @@ Tab   : toggle preview
120
           --height 60% \
121
           --preview-window right:60% \
122
           --bind "tab:toggle-preview,space:toggle-sort" \
123
-          --preview "[ -f $srtdir/{} ] && $BAT $srtdir/{} || { echo -e '\n\e[32mDirectory Listing:\n\e[0m'; ls -1 $srtdir/{}; } | $BAT"
124
+          --preview "[ -f $srtdir/{} ] && $BAT $srtdir/{} || { echo -e '\n\e[32mDirectory Listing:\e[0m\n'; ls -1 $srtdir/{}; } | $BAT"
125
       )
126
 
127
       [ -z "$file" ] && exit 1