Beaucoup de changements, du coup, je ne sais plus lesquels
This commit is contained in:
parent
19045449bc
commit
4f5dd6ea11
|
@ -1,11 +1,11 @@
|
|||
edit:add-var adguard~ {|@argv|
|
||||
use str
|
||||
sudo chattr -i /etc/resolv.conf
|
||||
doas chattr -i /etc/resolv.conf
|
||||
var beg = 's|^.*\(192\.168\.0\.25\)|'
|
||||
var end = 'nameserver \1|'
|
||||
if (and (> (count $argv) 0) (str:has-prefix $argv[0] u)) {
|
||||
set end = '# '$end
|
||||
}
|
||||
sudo sed -i $beg$end /etc/resolv.conf
|
||||
sudo chattr +i /etc/resolv.conf
|
||||
doas sed -i $beg$end /etc/resolv.conf
|
||||
doas chattr +i /etc/resolv.conf
|
||||
}
|
||||
|
|
|
@ -10,10 +10,13 @@ edit:add-var du~ {|@argv| e:du -h $@argv }
|
|||
#edit:add-var git~ $e:hub~
|
||||
edit:add-var grep~ {|@argv| e:grep --color=tty -d skip $@argv }
|
||||
#edit:add-var grep~ {|@argv| e:ack $@argv }
|
||||
edit:add-var hx~ {|@argv| e:helix $@argv }
|
||||
edit:add-var mv~ {|@argv| e:mv -iv $@argv }
|
||||
edit:add-var pf~ {|@argv| e:pkgfile -vri $@argv }
|
||||
edit:add-var rm~ {|@argv| e:rm -Iv $@argv }
|
||||
edit:add-var rename~ $e:go-rename~
|
||||
edit:add-var sudo~ {|@argv| fail 'Use doas instead'}
|
||||
edit:add-var timidity~ {|@argv| e:timidity -a -K -1 $@argv }
|
||||
edit:add-var tree~ {|@argv| e:tree -puhC --dirsfirst --du -D $@argv }
|
||||
edit:add-var wget~ {|@argv| e:wget2 $@argv }
|
||||
edit:add-var ungron~ {|@argv| e:gron --ungron $@argv }
|
||||
#edit:add-var wget~ {|@argv| e:wget2 $@argv }
|
||||
|
|
|
@ -3,7 +3,7 @@ use str
|
|||
fn -check {|f|
|
||||
use str
|
||||
var @missings = (try {
|
||||
sudo ldd $f 2>/dev/null | grep 'not found' | eawk {|_ m @_| put $m }
|
||||
doas ldd $f 2>/dev/null | grep 'not found' | eawk {|_ m @_| put $m }
|
||||
} catch e {
|
||||
})
|
||||
if (> (count $missings) 1) {
|
||||
|
@ -20,17 +20,17 @@ fn -check-executable {|f|
|
|||
|
||||
fn -cbin {||
|
||||
echo (styled 'Searching broken binaries…' bold bright-yellow)
|
||||
sudo find /usr/bin -maxdepth 1 -type f 2>/dev/null | each $-check~
|
||||
doas find /usr/bin -maxdepth 1 -type f 2>/dev/null | each $-check~
|
||||
}
|
||||
|
||||
fn -clib {||
|
||||
echo (styled 'Searching broken libs…' bold bright-yellow)
|
||||
sudo find /usr/lib/*.so* -maxdepth 1 -type f 2>/dev/null | each $-check-executable~
|
||||
doas find /usr/lib/*.so* -maxdepth 1 -type f 2>/dev/null | each $-check-executable~
|
||||
}
|
||||
|
||||
fn -copt {||
|
||||
echo (styled 'Searching broken binariess in opt…' bold bright-yellow)
|
||||
sudo find /opt -maxdepth 3 -type f 2>/dev/null | each $-check-executable~
|
||||
doas find /opt -maxdepth 3 -type f 2>/dev/null | each $-check-executable~
|
||||
}
|
||||
|
||||
edit:add-var checklinks~ {||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
var domain = https://transfer.hostux.net/
|
||||
edit:add-var transfer~ {|@argv|
|
||||
use path
|
||||
if (not-eq (count $argv) 0) {
|
||||
fail('Usage: transfer <fichier_ou_repertoire>')
|
||||
}
|
||||
var file = $argv[0]
|
||||
var filename = (basename $file)
|
||||
var is_dir = (path:is-dir &follow-symlink=$true $file)
|
||||
var is_regular = (path:is-regular &follow-symlink=$true $file)
|
||||
if (not (and is_dir is_regular)) {
|
||||
fail("'"$file"' n’existe pas")
|
||||
}
|
||||
if is_dir {
|
||||
set filename = $filename'.tar.gz'
|
||||
cd $file
|
||||
tar -c . | e:curl --progress-bar --upload-file - $domain$filename | tee /dev/null
|
||||
} else {
|
||||
cat $file | e:curl --progress-bar --upload-file - $domain$filename | teee /dev/null
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
edit:add-var upd~ {|@args|
|
||||
if ?(mirror-check --fast) {
|
||||
sudo pacman -Syu
|
||||
doas pacman -Syu
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
var cmd = $e:vim~
|
||||
var cmd = $e:nvim~
|
||||
#var cmd = $e:helix~
|
||||
#var cmd = $e:kak~
|
||||
#var cmd = $e:emacs~
|
||||
|
||||
|
|
6
rc.elv
6
rc.elv
|
@ -1,7 +1,9 @@
|
|||
#set-env BAT_THEME Coldark-Cold
|
||||
set-env BAT_PAGER 'less -RF'
|
||||
set-env EDITOR vim
|
||||
set-env VIEW 'vim -R'
|
||||
#set-env EDITOR vim
|
||||
set-env EDITOR kak
|
||||
#set-env VIEW 'vim -R'
|
||||
set-env VIEW 'kak -ro'
|
||||
set-env CURRENT_SHELL 'elvish'
|
||||
set-env STARSHIP_CONFIG ~/.config/starship/starship.toml
|
||||
set-env PERL5LIB /home/benjamin/perl5/lib/perl5
|
||||
|
|
Loading…
Reference in New Issue