mirror of
https://github.com/kmein/niveum
synced 2026-03-19 19:41:08 +01:00
add wcd and where scripts
This commit is contained in:
@@ -183,7 +183,19 @@
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
environment.interactiveShellInit = "export PATH=$PATH:$HOME/.cargo/bin";
|
environment.interactiveShellInit = "export PATH=$PATH:$HOME/.cargo/bin";
|
||||||
environment.shellAliases = {
|
environment.shellAliases =
|
||||||
|
let
|
||||||
|
wcd =
|
||||||
|
pkgs.writeScript "wcd" ''
|
||||||
|
#!/bin/sh
|
||||||
|
cd "$(${pkgs.coreutils}/bin/readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" | ${pkgs.findutils}/bin/xargs ${pkgs.coreutils}/bin/dirname)/.."
|
||||||
|
'';
|
||||||
|
where =
|
||||||
|
pkgs.writeScript "where" ''
|
||||||
|
#!/bin/sh
|
||||||
|
${pkgs.coreutils}/bin/readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" | ${pkgs.findutils}/bin/xargs ${pkgs.coreutils}/bin/dirname
|
||||||
|
'';
|
||||||
|
in {
|
||||||
clipboard = "${pkgs.xclip}/bin/xclip -se c";
|
clipboard = "${pkgs.xclip}/bin/xclip -se c";
|
||||||
o = "${pkgs.xdg_utils}/bin/xdg-open";
|
o = "${pkgs.xdg_utils}/bin/xdg-open";
|
||||||
tmux = "${pkgs.tmux}/bin/tmux -2";
|
tmux = "${pkgs.tmux}/bin/tmux -2";
|
||||||
@@ -198,6 +210,8 @@
|
|||||||
ll = "${pkgs.exa}/bin/exa -l";
|
ll = "${pkgs.exa}/bin/exa -l";
|
||||||
la = "${pkgs.exa}/bin/exa -la";
|
la = "${pkgs.exa}/bin/exa -la";
|
||||||
dig = "dig +short";
|
dig = "dig +short";
|
||||||
|
wcd = "source ${wcd}";
|
||||||
|
where = "source ${where}";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user