finally an lfrc

This commit is contained in:
vibikim 2020-11-22 14:36:39 +02:00
parent 91595d7150
commit bf95e02fc1
3 changed files with 98 additions and 3 deletions

View file

@ -18,10 +18,10 @@ gohome .Xresources
goconfig bspwm goconfig bspwm
goconfig dunst goconfig dunst
goconfig polybar goconfig polybar
goconfig kitty
goconfig sxhkd goconfig sxhkd
goconfig picom.conf goconfig picom.conf
goconfig nvim goconfig nvim
goconfig lf
#install fonts #install fonts
cp -r $PWD/polybar/fonts/* ~/.local/share/fonts cp -r $PWD/polybar/fonts/* ~/.local/share/fonts

91
lf/lfrc Normal file
View file

@ -0,0 +1,91 @@
set previewer ~/.config/lf/preview
# Basic Settings
set preview true
set hidden true
set color256 true
set icons true
set ignorecase true
# Custom Functions
cmd open ${{
case $(file --mime-type "$f" -bL) in
text/*|application/json) $EDITOR "$f";;
video/*|image/*/application/pdf) xdg-open "$f";;
*) xdg-open "$f" ;;
esac
}}
# exectue the file (it has to be executable, ofc)
map X !$f
cmd mkdir ${{
printf "Directory Name: "
read ans
mkdir $ans
}}
cmd mkfile ${{
printf "File Name: "
read ans
$EDITOR $ans
}}
cmd chmod ${{
printf "Mode Bits: "
read ans
for file in "$fx"
do
chmod $ans $file
done
lf -remote 'send reload'
}}
cmd sudomkfile ${{
printf "File Name: "
read ans
sudo $EDITOR $ans
}}
# Archive bindings
cmd unarchive ${{
case "$f" in
*.zip) unzip "$f" ;;
*.tar.gz) tar -xzvf "$f" ;;
*.tar.bz2) tar -xjvf "$f" ;;
*.tar) tar -xvf "$f" ;;
*) echo "Unsupported format" ;;
esac
}}
###
# Basic Binds
###
map ua unarchive
map DD delete
map x cut
map x cut
map y copy
map <enter> open
map mf mkfile
map mr sudomkfile
map x cut
map y copy
map <enter> open
map mf mkfile
map mr sudomkfile
map md mkdirap md mkdir
###
# Directory shortcuts
###
map gh :cd ~/
map gw :cd /run/media/vibikim/WAD
map gc :cd ~/.config
map gd :cd ~/Downloads
map gD :cd ~/Documents
map gr :cd ~/repos
map gf :cd ~/facultate

View file

@ -18,7 +18,7 @@ super + shift + f
super + shift + n super + shift + n
thunderbird thunderbird
super + shift + Return super + shift + Return
$FILEMANAGER $TERMINAL -e lf
super + shift + d super + shift + d
discord discord
@ -137,7 +137,7 @@ super + bracket{left,right}
bspc desktop -f {prev,next}.local bspc desktop -f {prev,next}.local
# focus the older or newer node in the focus history # focus the older or newer node in the focus history
super + {o,i}sdfsdf super + {o,i}
bspc wm -h off; \ bspc wm -h off; \
bspc node {older,newer} -f; \ bspc node {older,newer} -f; \
bspc wm -h on bspc wm -h on
@ -146,6 +146,10 @@ super + {o,i}sdfsdf
super + {_,shift + }{1-9,0} super + {_,shift + }{1-9,0}
bspc {desktop -f,node -d} '^{1-9,10}' bspc {desktop -f,node -d} '^{1-9,10}'
# rotate the tree rooted at the selected node
super + {r,R}
bspc node @parent -R {90,270}
# #
# preselect # preselect
# #