dotfiles

Configuration dotfiles
git clone git://git.wimdupont.com/dotfiles.git
Log | Files | Refs | README | LICENSE

commit 15deb55beb748d044a937c29ac0f392b9dc4a1a7
parent a0eaf17d647dbae40011171cf296c6b2f0740163
Author: Wim Dupont <wim@wimdupont.com>
Date:   Sun, 16 Jun 2024 22:39:13 +0200

add chmod cmd to lf

Diffstat:
Mlfrc | 22++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/lfrc b/lfrc @@ -14,6 +14,19 @@ set ifs "\n" # Basic Settings set ignorecase true +cmd make_mod ${{ + perm=$1 + assu=$(test -w $f && echo 0 || echo 1) + if [ $perm != "a" ]; then + mod=$(test -$perm $f && echo "-$perm" || echo "+$perm") + else + mod="+rwx" + fi + + test $assu -eq 1 && sudo chmod $mod $f || chmod $mod $f + lf -remote "send $id :reload" +}} + cmd mkfile ${{ printf "File Name: " read ans @@ -68,6 +81,7 @@ cmd move-parent &{{ }} cmd create_access ${{ + mkdir -p $HOME/access ln -s $fx $HOME/access/ }} @@ -81,6 +95,10 @@ map K move-parent up map md push %mkdir<space> map mf mkfile +map mx make_mod "x" +map mr make_mod "r" +map mw make_mod "w" +map ma make_mod "a" map bg setwallpaper @@ -111,8 +129,8 @@ map oo $xdg-open "$f" # Movement map ga cd ~/access map gc cd ~/.config -map gD cd ~/Desktop -map gd cd ~/Downloads +map gD cd ~/desktop +map gd cd ~/downloads map gp cd ~/pictures map gr cd ~/repositories map gb cd /usr/local/bin