replaced tabs with 2 spaces in script docs

This commit is contained in:
pagedmov
2024-11-07 15:07:08 -05:00
parent 46b8eb6a93
commit da191e5ae4
2 changed files with 67 additions and 63 deletions

View File

@@ -1,49 +1,49 @@
# pagedMov's Custom Command Scripts # pagedMov's Custom Command Scripts
## icanhazip ## icanhazip
- Leverages ip and icanhazip.com to return relevant ip info for the current machine. - Leverages ip and icanhazip.com to return relevant ip info for the current machine.
- Usage: - Usage:
- `icanhazip` - returns public ip, local ip, and default gateway - `icanhazip` - returns public ip, local ip, and default gateway
- `icanhazip -p` - returns only public ip - `icanhazip -p` - returns only public ip
- `icanhazip -l` - returns only local ip - `icanhazip -l` - returns only local ip
- `icanhazip -d` - returns only default gateway - `icanhazip -d` - returns only default gateway
- Defined in 'modules/home/scripts/commands/icanhazip.nix' - Defined in 'modules/home/scripts/commands/icanhazip.nix'
## invoke ## invoke
- Leverages `nix run` to run any command once. Works with arguments. - Leverages `nix run` to run any command once. Works with arguments.
- Usage: - Usage:
- `invoke <command>` - `invoke <command>`
- Example: - Example:
- `invoke hello` - `invoke hello`
- Defined in 'modules/home/scripts/commands/invoke.nix' - Defined in 'modules/home/scripts/commands/invoke.nix'
## runbg ## runbg
- Runs a command and detaches the process from the shell silently. Works with arguments. Credit to [Frost-Phoenix](https://github.com/Frost-Phoenix) for writing this script. - Runs a command and detaches the process from the shell silently. Works with arguments. Credit to [Frost-Phoenix](https://github.com/Frost-Phoenix) for writing this script.
- Usage: - Usage:
- `runbg <command> <args>` - `runbg <command> <args>`
- Example: - Example:
- `runbg waybar` - `runbg waybar`
- Defined in 'modules/home/scripts/commands/runbg.nix' - Defined in 'modules/home/scripts/commands/runbg.nix'
## toolbelt ## toolbelt
- Opens a fuzzyfinder window with some useful utilities. Meant to be used with the Super + P bind defined in hyprland.nix, and not invoked directly from the shell. - Opens a fuzzyfinder window with some useful utilities. Meant to be used with the Super + P bind defined in hyprland.nix, and not invoked directly from the shell.
- Defined in 'modules/home/scripts/commands/toolbelt.nix' - Defined in 'modules/home/scripts/commands/toolbelt.nix'
## viconf ## viconf
- Searches the directory held in the $FLAKEPATH environment variable for a given nix file or directory name. Opens the file found in neovim, or if there are multiple matches, opens a fuzzyfinder window to allow you to choose one. - Searches the directory held in the $FLAKEPATH environment variable for a given nix file or directory name. Opens the file found in neovim, or if there are multiple matches, opens a fuzzyfinder window to allow you to choose one.
- Usage: - Usage:
- `viconf <part of path or filename>` - `viconf <part of path or filename>`
- Examples: - Examples:
- `viconf hyprland` - Opens $FLAKEPATH/modules/home/environment/hyprland.nix - `viconf hyprland` - Opens $FLAKEPATH/modules/home/environment/hyprland.nix
- `viconf sys` - Opens fuzzyfinder window containing all nix files in modules/sys and its subdirectories - `viconf sys` - Opens fuzzyfinder window containing all nix files in modules/sys and its subdirectories
- `viconf config` - Opens fuzzyfinder window containing all nix files called 'config.nix' - `viconf config` - Opens fuzzyfinder window containing all nix files called 'config.nix'
- `viconf scripts/def` - Opens $FLAKEPATH/modules/home/scripts/default.nix - `viconf scripts/def` - Opens $FLAKEPATH/modules/home/scripts/default.nix
- Defined in 'modules/home/scripts/commands/viconf.nix' - Defined in 'modules/home/scripts/commands/viconf.nix'
## vipkg ## vipkg
- Searches the pkgs directory from the nixpkgs github repository. Works almost identically to viconf with a few tweaks to accomodate the different directory structure. Useful for when you want to override a package's build attributes. Can also just be used to search for a package name. - Searches the pkgs directory from the nixpkgs github repository. Works almost identically to viconf with a few tweaks to accomodate the different directory structure. Useful for when you want to override a package's build attributes. Can also just be used to search for a package name.
- Usage: - Usage:
- `vipkg <part of package name>` - `vipkg <part of package name>`
- Example: - Example:
- `vipkg neofetch` - Opens nixpkgs/pkgs/tools/misc/neofetch/default.nix - `vipkg neofetch` - Opens nixpkgs/pkgs/tools/misc/neofetch/default.nix
- Defined in 'modules/home/scripts/commands/vipkg.nix' - Defined in 'modules/home/scripts/commands/vipkg.nix'

View File

@@ -1,36 +1,40 @@
# pagedMov's Nix Aliases # pagedMov's Nix Aliases
## fetchfromgh ## fetchfromgh
- Given a username and repo name like someuser/somerepo, generates a full pkgs.fetchFromGitHub call. - Given a username and repo name like someuser/somerepo, generates a full pkgs.fetchFromGitHub call.
- Usage: - Usage:
- `fetchfromgh someuser/somerepo` - `fetchfromgh someuser/somerepo`
- Example: - Example:
- `fetchfromgh pagedMov/nixos-config` - returns this: - `fetchfromgh pagedMov/nixos-config` - returns this:
src = pkgs.fetchFromGitHub {
owner = "pagedMov";
repo = "nixos-config"; ```
rev = "fcf19c65971c667f67abf57bcaf88be410fb0759"; src = pkgs.fetchFromGitHub {
hash = "sha256-z+3E+ueSd2QNqtrbBKt8bwIfboPCXSUrGn690Hc/kl0="; owner = "pagedMov";
}; repo = "nixos-config";
- Defined in 'modules/home/scripts/nix/fetchfromgh.nix' rev = "fcf19c65971c667f67abf57bcaf88be410fb0759";
hash = "sha256-z+3E+ueSd2QNqtrbBKt8bwIfboPCXSUrGn690Hc/kl0=";
};
```
- Defined in 'modules/home/scripts/nix/fetchfromgh.nix'
## garbage-collect ## garbage-collect
- Runs the Nix garbage collector and also deletes all files in .local/share/Trash - Runs the Nix garbage collector and also deletes all files in .local/share/Trash
- Usage: - Usage:
- `garbage-collect` - Does not take any arguments - `garbage-collect` - Does not take any arguments
- Defined in 'modules/home/scripts/nix/garbage-collect.nix' - Defined in 'modules/home/scripts/nix/garbage-collect.nix'
## nsp ## nsp
- Simple alias for `nix-shell -p` - Simple alias for `nix-shell -p`
- Usage: - Usage:
- `nsp <package name>` - `nsp <package name>`
- Example: - Example:
- `nsp hello` - `nsp hello`
- Defined in 'modules/home/scripts/nix/nsp.nix' - Defined in 'modules/home/scripts/nix/nsp.nix'
## rebuild ## rebuild
- nh os switch and nh home switch packaged into one command - nh os switch and nh home switch packaged into one command
- Usage: - Usage:
- `rebuild -h` - Runs `nh home switch -c <currenthostname> $FLAKEPATH` - `rebuild -h` - Runs `nh home switch -c <currenthostname> $FLAKEPATH`
- `rebuild -s` - Runs `nh os switch -H <currenthostname> $FLAKEPATH` - `rebuild -s` - Runs `nh os switch -H <currenthostname> $FLAKEPATH`
- Defined in 'modules/home/scripts/nix/rebuild.nix' - Defined in 'modules/home/scripts/nix/rebuild.nix'