From eca6cfba88a4a8e58a473911f2589706426a9198 Mon Sep 17 00:00:00 2001 From: Benjamin VAUDOUR Date: Mon, 20 Mar 2023 10:26:02 +0100 Subject: [PATCH] =?UTF-8?q?exa=20comme=20alias=20de=20ls=20+=20tambouille?= =?UTF-8?q?=20pour=20changer=20facilement=20d=E2=80=99=C3=A9diteur=20par?= =?UTF-8?q?=20d=C3=A9faut=20+=20modif=20changement=20de=20VPN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aliases/ls.elv | 20 ++++++++++++++++---- aliases/vi.elv | 36 ++++++++++++++++++++++++++++++++---- aliases/vpn.elv | 6 +++--- rc.elv | 11 +++++++---- 4 files changed, 58 insertions(+), 15 deletions(-) diff --git a/aliases/ls.elv b/aliases/ls.elv index e9f8235..c007afb 100644 --- a/aliases/ls.elv +++ b/aliases/ls.elv @@ -6,9 +6,21 @@ fn -go-ls {|@argv| e:go-ls --group-directories-first -T '+%Y.%m.%d %H:%M' --git $@argv } -var cmd = $-go-ls~ +fn -exa {|@argv| + e:exa --color auto --git --icons --group-directories-first $@argv +} + +fn -exal {|@argv| + -exa -lghH@ --time-style long-iso $@argv +} + +var cmd = $-exa~ +var cmdl = $-exal~ edit:add-var ls~ {|@argv| $cmd $@argv } -edit:add-var la~ {|@argv| $cmd -a $@argv } -edit:add-var ll~ {|@argv| $cmd -lh $@argv } -edit:add-var lla~ {|@argv| $cmd -lha $@argv } +#edit:add-var la~ {|@argv| $cmd -a $@argv } +#edit:add-var ll~ {|@argv| $cmd -lh $@argv } +#edit:add-var lla~ {|@argv| $cmd -lha $@argv } +edit:add-var la~ {|@argv| $cmd -aa $@argv } +edit:add-var ll~ {|@argv| $cmdl -l $@argv } +edit:add-var lla~ {|@argv| $cmdl -aa $@argv } diff --git a/aliases/vi.elv b/aliases/vi.elv index 382b568..ec264e1 100644 --- a/aliases/vi.elv +++ b/aliases/vi.elv @@ -1,7 +1,35 @@ +var app = 'nvim' + +var editors = [ + &emac=[ + &e={|@argv| e:emacs $@argv } + &v={|@argv| e:emacs $@argv --eval '(setq buffer-read-only)' } + ] + &helix=[ + &e={|@argv| e:helix $@argv } + &v={|@argv| e:helix $@argv } # Pas de lecture seule actuellement + ] + &kak=[ + &e={|@argv| e:kak $@argv } + &v={|@argv| e:kak -ro $@argv } + ] + &nvim=[ + &e={|@argv| e:nvim $@argv } + &v={|@argv| e:nvim -R $@argv } + ] + &vim=[ + &e={|@argv| e:vim $@argv } + &v={|@argv| e:vim -R $@argv } + ] +] + +var ce~ = $editors[$app]['e'] +var cv~ = $editors[$app]['v'] + # ÉDITEURS DISPOS #fn ce {|@argv| e:emacs $@argv } #fn ce {|@argv| e:helix $@argv } -fn ce {|@argv| e:kak $@argv } +#fn ce {|@argv| e:kak $@argv } #fn ce {|@argv| e:nvim $@argv } #fn ce {|@argv| e:vim $@argv } @@ -10,9 +38,9 @@ fn ce {|@argv| e:kak $@argv } #fn cv {|@argv| ce $@argv --eval '(setq buffer-read-only)' } ## helix (pas le lecture seule pour le moment) #fn cv {|@argv| ce $@argv } -# kak -fn cv {|@argv| ce -ro $@argv } -## nvim/vim +## kak +#fn cv {|@argv| ce -ro $@argv } +# nvim/vim #fn cv {|@argv| ce -R $@argv } edit:add-var vi~ $ce~ diff --git a/aliases/vpn.elv b/aliases/vpn.elv index df32a25..59d93d2 100644 --- a/aliases/vpn.elv +++ b/aliases/vpn.elv @@ -22,9 +22,9 @@ var next = [ &fr.kaosx.cf=luence-wg &luence-wg=luence-client &luence-ovpn=luence-client - &luence-client=proton_nl5 - &proton_nl5=proton_us3 - &proton_us3=proton_jp2 +# &luence-client=proton_nl5 +# &proton_nl5=proton_us3 +# &proton_us3=proton_jp2 ] fn -list {|&active=$false| diff --git a/rc.elv b/rc.elv index 3f567fe..e8e648d 100644 --- a/rc.elv +++ b/rc.elv @@ -1,9 +1,12 @@ #set-env BAT_THEME Coldark-Cold set-env BAT_PAGER 'less -RF' -#set-env EDITOR vim -set-env EDITOR kak -#set-env VISUAL 'vim -R' -set-env VISUAL 'kak -ro' +set-env EXA_COLORS 'da=36:*.pdf=4:*.doc=4:*.xls=4:*.docx=4:*.xlsx=4:*.odt=4:*.ods=4' +set-env EDITOR nvim +#set-env EDITOR kak +#set-env EDITOR hx +set-env VISUAL 'nvim -R' +#set-env VISUAL 'kak -ro' +#set-env VISUAL hx set-env CURRENT_SHELL 'elvish' set-env STARSHIP_CONFIG ~/.config/starship/starship.toml set-env PERL5LIB /home/benjamin/perl5/lib/perl5