diff --git a/aliases/checklinks.elv b/aliases/checklinks.elv index 5204f8a..3dc5814 100644 --- a/aliases/checklinks.elv +++ b/aliases/checklinks.elv @@ -1,9 +1,10 @@ +use re use str fn -check {|f| use str var @missings = (try { - doas ldd $f 2>/dev/null | grep 'not found' | eawk {|_ m @_| put $m } + doas ldd $f 2>/dev/null | grep 'not found' | re:awk {|_ m @_| put $m } } catch e { }) if (> (count $missings) 1) { diff --git a/aliases/cleankh.elv b/aliases/cleankh.elv index 1de810f..4babaf1 100644 --- a/aliases/cleankh.elv +++ b/aliases/cleankh.elv @@ -1,4 +1,5 @@ edit:add-var cleankh~ {|@argv| + use re use str use framagit.org/benjamin.vaudour/elv-lib/mods/common use framagit.org/benjamin.vaudour/elv-lib/mods/ip @@ -14,7 +15,7 @@ edit:add-var cleankh~ {|@argv| if (not (str:has-prefix $l '#')) { put $l } - } | eawk {|_ host @rest| + } | re:awk {|_ host @rest| var id = (str:join ' ' $rest) var ihosts = [] str:split ',' $host | each {|h| diff --git a/aliases/digall.elv b/aliases/digall.elv index 793e9a5..28b5c9d 100644 --- a/aliases/digall.elv +++ b/aliases/digall.elv @@ -1,4 +1,5 @@ edit:add-var digall~ {|@argv| + use re use str use framagit.org/benjamin.vaudour/elv-lib/mods/common use framagit.org/benjamin.vaudour/elv-lib/mods/format @@ -44,7 +45,7 @@ edit:add-var digall~ {|@argv| } fn format {|results| - eawk {|_ @args| + re:awk {|_ @args| put [ $args[0] (all $args[2..]) ] } $results | list:remove-duplicate | list:sort {|l1 l2| var c = (compare $l1[0] $l2[0]) diff --git a/aliases/ipof.elv b/aliases/ipof.elv index 9b7c59f..0c5df01 100644 --- a/aliases/ipof.elv +++ b/aliases/ipof.elv @@ -1,4 +1,5 @@ edit:add-var ipof~ {|@argv| + use re use str use framagit.org/benjamin.vaudour/elv-lib/mods/common use framagit.org/benjamin.vaudour/elv-lib/mods/ip @@ -52,7 +53,7 @@ edit:add-var ipof~ {|@argv| if (and (not-eq $ll '') (not-eq $ll[0] '#')) { put $ll } - } | eawk {|_ ip @domains| + } | re:awk {|_ ip @domains| peach {|d| var dd = $d if (has-key $hosts $dd) { diff --git a/aliases/ls.elv b/aliases/ls.elv index c007afb..b2b9591 100644 --- a/aliases/ls.elv +++ b/aliases/ls.elv @@ -14,6 +14,14 @@ fn -exal {|@argv| -exa -lghH@ --time-style long-iso $@argv } +fn -lsd {|@argv| + e:lsd --color auto --group-directories-first --date +'%Y.%m.%d %H:%M' $@argv +} + +fn -lsdl {|@argv| + -lsd -lg --header $@argv +} + var cmd = $-exa~ var cmdl = $-exal~ @@ -21,6 +29,9 @@ 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 -aa $@argv } -edit:add-var ll~ {|@argv| $cmdl -l $@argv } -edit:add-var lla~ {|@argv| $cmdl -aa $@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 } +edit:add-var la~ {|@argv| $cmd -a $@argv } +edit:add-var ll~ {|@argv| $cmdl $@argv } +edit:add-var lla~ {|@argv| $cmdl -a $@argv } diff --git a/aliases/vi.elv b/aliases/vi.elv index ec264e1..7764bfe 100644 --- a/aliases/vi.elv +++ b/aliases/vi.elv @@ -1,4 +1,4 @@ -var app = 'nvim' +var app = 'helix' var editors = [ &emac=[ diff --git a/aliases/vpn.elv b/aliases/vpn.elv index 59d93d2..d1d3887 100644 --- a/aliases/vpn.elv +++ b/aliases/vpn.elv @@ -1,3 +1,4 @@ +use re use str use framagit.org/benjamin.vaudour/elv-lib/mods/list @@ -7,8 +8,8 @@ var vpnType = [ ] var shortcut = [ - &ca=ca.kaosx.cf - &fr=fr.kaosx.cf + &ca=ca.kaosx.ovh + &fr=fr.kaosx.ovh &lu=luence-wg &lu2=luence-ovpn &cli=luence-client @@ -18,8 +19,8 @@ var shortcut = [ ] var next = [ - &ca.kaosx.cf=fr.kaosx.cf - &fr.kaosx.cf=luence-wg + &ca.kaosx.ovh=fr.kaosx.ovh + &fr.kaosx.ovh=luence-wg &luence-wg=luence-client &luence-ovpn=luence-client # &luence-client=proton_nl5 @@ -32,7 +33,7 @@ fn -list {|&active=$false| if $active { set @argv = $@argv --active } - nmcli $@argv | eawk {|_ @name uuid tpe dev| + nmcli $@argv | re:awk {|_ @name uuid tpe dev| if (has-key $vpnType $tpe) { str:join ' ' $name } @@ -60,7 +61,7 @@ fn -next {|| if (== 1 (count $n)) { put $next[$n[0]] } else { - put ca.kaosx.cf + put ca.kaosx.ovh } } diff --git a/rc.elv b/rc.elv index b9d5319..36ab91e 100644 --- a/rc.elv +++ b/rc.elv @@ -1,10 +1,12 @@ #set-env BAT_THEME Coldark-Cold set-env BAT_PAGER 'less -RF' 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 nvim +set-env EDITOR vim #set-env EDITOR kak #set-env EDITOR hx -set-env VISUAL 'nvim -R' +#set-env VISUAL 'nvim -R' +set-env VISUAL 'vim -R' #set-env VISUAL 'kak -ro' #set-env VISUAL hx set-env CURRENT_SHELL 'elvish'