mirror of
https://forge.katzen.cafe/schrottkatze/nix-configs.git
synced 2026-04-15 06:13:58 +02:00
blargh
This commit is contained in:
parent
63d865be00
commit
70e5b25e38
19 changed files with 286 additions and 236 deletions
18
modules/shell/elvish/lib/direnv.elv
Normal file
18
modules/shell/elvish/lib/direnv.elv
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
## hook for direnv
|
||||
set @edit:before-readline = $@edit:before-readline {
|
||||
try {
|
||||
var m = [("/nix/store/kv03kmfwkinhv4ar2hvh79jfkm1n5id5-direnv-2.37.1/bin/direnv" export elvish | from-json)]
|
||||
if (> (count $m) 0) {
|
||||
set m = (all $m)
|
||||
keys $m | each { |k|
|
||||
if $m[$k] {
|
||||
set-env $k $m[$k]
|
||||
} else {
|
||||
unset-env $k
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch e {
|
||||
echo $e
|
||||
}
|
||||
}
|
||||
28
modules/shell/elvish/rc.elv
Normal file
28
modules/shell/elvish/rc.elv
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# <aliases>
|
||||
|
||||
fn gnix {|@a| cd ~/nix-configs $@a }
|
||||
fn grepo {|@a| cd ~/Documents/repos $@a }
|
||||
fn wh {|@a| wormhole-rs $@a }
|
||||
|
||||
fn gc {|@a| git commit $@a }
|
||||
fn gca {|@a| git commit --all $@a }
|
||||
fn gp {|@a| git push $@a }
|
||||
fn gl {|@a| git pull $@a }
|
||||
fn gs {|@a| git status $@a }
|
||||
|
||||
fn cr {|@a| cargo run $@a }
|
||||
fn cl {|@a| cargo clippy $@a }
|
||||
fn cb {|@a| cargo build $@a }
|
||||
fn cch {|@a| cargo check $@a }
|
||||
|
||||
fn jb {|@a| just build $@a }
|
||||
|
||||
fn px {|@a| pulsemixer $@a }
|
||||
|
||||
fn guni {|@a| cd ~/Docs/uni $@a }
|
||||
|
||||
fn juts {|@a| just $@a }
|
||||
|
||||
# </aliases>
|
||||
|
||||
use direnv
|
||||
Loading…
Add table
Add a link
Reference in a new issue