aboutsummaryrefslogtreecommitdiff
path: root/env/.config/lf/lfrc
diff options
context:
space:
mode:
authoriceyrazor <iceyrazor@mailfence.com>2025-12-29 02:42:08 -0600
committericeyrazor <iceyrazor@mailfence.com>2025-12-29 02:42:08 -0600
commit0300e55167f1df80b6dddf946bb16a2c063b6d67 (patch)
tree2fb07df62c530e15fabbd6bcfaf2d7f1bd73505f /env/.config/lf/lfrc
parent5c4872f306338944e0bbaa60db7157c5c828028d (diff)
Squashed commit of the following:
- set icons for mon2 in i3 - exluded a blender render dir - two flash backup thingys - lfrc filebrowser dectetion and formatting - changed music dir for mpd - moved browser backup to its own script. log too big - added DIAGRAM_PLANTUML_CLASSPATH var for plantuml - added web reqs script - added asciidoc preview - fixed ft_to_lang error by disabling treesitter in telescope - copy media script
Diffstat (limited to 'env/.config/lf/lfrc')
-rwxr-xr-xenv/.config/lf/lfrc54
1 files changed, 29 insertions, 25 deletions
diff --git a/env/.config/lf/lfrc b/env/.config/lf/lfrc
index d8d72f0..90a49fd 100755
--- a/env/.config/lf/lfrc
+++ b/env/.config/lf/lfrc
@@ -111,21 +111,21 @@ cmd zip ${{
}}
cmd trash ${{
- files=$(printf "$fx" | tr '\n' ';')
- while [ "$files" ]; do
- file=${files%%;*}
+ files=$(printf "$fx" | tr '\n' ';')
+ while [ "$files" ]; do
+ file=${files%%;*}
- mv "$(basename "$file")" ~/.trash
- if [ "$files" = "$file" ]; then
- files=''
- else
- files="${files#*;}"
- fi
- done
+ mv "$(basename "$file")" ~/.trash
+ if [ "$files" = "$file" ]; then
+ files=''
+ else
+ files="${files#*;}"
+ fi
+ done
}}
cmd vim ${{
- nvim $f
+ nvim $f
}}
cmd Sxiv ${{
@@ -136,19 +136,19 @@ cmd clipf ${{
# printf "$f" | xclip -selection clipboard
# xclip -selection clipboard -t "$(file -b --mime-type $f)" -i $f
# echo -n '$f' | xclip -sel clip -t text/uri-list -i
-case "$(file -b --mime-type $f)" in
-image/png|image/jpeg|image/gif)
- xclip -selection clipboard -t image/png -i $f
- ;;
-video/mp4)
- # !! doesnt work. no clue how todo uri-list. ICCCM section 2.6.2 is confusing
- # echo -n '$f' | xclip -selection clipboard -t x-special/gnome-copied-files -i
- xclip -selection clipboard -t text/uri-list -i $f
- ;;
-*)
- xclip -selection clipboard -t "$(file -b --mime-type $f)" -i $f
- ;;
-esac
+ case "$(file -b --mime-type $f)" in
+ image/png|image/jpeg|image/gif)
+ xclip -selection clipboard -t image/png -i $f
+ ;;
+ video/mp4)
+ # !! doesnt work. no clue how todo uri-list. ICCCM section 2.6.2 is confusing
+ # echo -n '$f' | xclip -selection clipboard -t x-special/gnome-copied-files -i
+ xclip -selection clipboard -t text/uri-list -i $f
+ ;;
+ *)
+ xclip -selection clipboard -t "$(file -b --mime-type $f)" -i $f
+ ;;
+ esac
}}
cmd clip-path ${{
@@ -160,7 +160,11 @@ cmd clip-path ${{
}}
cmd filebrowser ${{
- nohup pcmanfm $f > /dev/null 2> /dev/null < /dev/null & disown
+ if [ "$(file -b --mime-type "$f")" == "inode/directory" ]; then
+ nohup pcmanfm -- "$f" > /dev/null 2> /dev/null < /dev/null & disown
+ else
+ nohup pcmanfm -- "$(dirname -- $f)" > /dev/null 2> /dev/null < /dev/null & disown
+ fi
}}
map DD trash