From c2fbc4d1717864a0055592e0b73d71c010e8686c Mon Sep 17 00:00:00 2001 From: Justine Smithies Date: Fri, 8 Nov 2024 20:48:58 +0000 Subject: Initial commit --- .config/lf/lfrc | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .config/lf/lfrc (limited to '.config/lf/lfrc') diff --git a/.config/lf/lfrc b/.config/lf/lfrc new file mode 100644 index 0000000..ebf11ba --- /dev/null +++ b/.config/lf/lfrc @@ -0,0 +1,61 @@ +# interpreter for shell commands +set shell bash + +# set '-eu' options for shell commands +# These options are used to have safer shell commands. Option '-e' is used to +# exit on error and option '-u' is used to give error for unset variables. +# Option '-f' disables pathname expansion which can be useful when $f, $fs, and +# $fx variables contain names with '*' or '?' characters. However, this option +# is used selectively within individual commands as it can be limiting at +# times. +set shellopts '-eu' + +# set internal field separator (IFS) to "\n" for shell commands +# This is useful to automatically split file names in $fs and $fx properly +# since default file separator used in these variables (i.e. 'filesep' option) +# is newline. You need to consider the values of these options and create your +# commands accordingly. +set ifs "\n" + +# leave some space at the top and the bottom of the screen +set scrolloff 10 + +# Use the `dim` attribute instead of underline for the cursor in the preview pane +set cursorpreviewfmt "\033[7;2m" + +# Show number of files in dirs instead of single size +set info size +set dircounts + +# Custom Additions +set drawbox true + +# Toggle hidden files +map . set hidden! + +# Set previewer and cleaner +set sixel +set previewer ~/.config/lf/previewer.sh + +# Set colours and icons +set icons + +# Custom Functions +cmd open ${{ + case $(file --mime-type $f -bL) in + image/*) setsid imv $f >/dev/null 2>&1 &;; + *pdf*) setsid zathura $fx >/dev/null 2>&1 & ;; + text/*|application/json) $EDITOR "$f";; + video/*) setsid mpv $f -quiet >/dev/null 2>&1 & ;; + *) for f in $fx; do setsid $OPENER $f 2>/dev/null & done ;; + esac +}} + +cmd setwallpaper ${{ + #cp -f "$f" ~/.cache/wallpaper; pkill swaybg > /dev/null 2>&1; nohup swaybg -m fill -i ~/.cache/wallpaper > /dev/null 2>&1 & + # cp -f "$f" ~/.cache/wallpaper && qtile cmd-obj -o cmd -f reload_config + echo "$f" > ~/.cache/wallpaper; sh ~/.config/hypr/scripts/wallpaper.sh > /dev/null 2>&1 & +}} + +# Key Mappings +map bg setwallpaper -- cgit v1.2.3