mirror of
https://github.com/ForeverPyrite/dotfiles.git
synced 2025-12-10 01:08:06 +00:00
Okay bro I didn't mean to yap for that long. I meant to do some new stuff with tmux plugins, but I got carried away explaning everything for NO REASON!!! Now I can't even figure out how to get the nvim colorscheme to work, rip.
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,2 +1,2 @@
|
|||||||
# This is for some silly goofy ssh keys I have going on to push to the repo.
|
# For some reason, btop has it's log in the .config dir
|
||||||
.github*
|
*.log
|
||||||
|
|||||||
229
README.md
229
README.md
@@ -1 +1,230 @@
|
|||||||
# dotfiles
|
# dotfiles
|
||||||
|
|
||||||
|
It's my dotfiles! Woah!!!!
|
||||||
|
|
||||||
|
This git repo really just stores a bootstrap script for new systems (`install.sh`, because I felt like naming it that for some reason...), along with...well...my .config configuration files.
|
||||||
|
Absolutely insane, I know.
|
||||||
|
|
||||||
|
okay yeah maybe a bootstrap script isn't exactly a dotfile, but oh well, it's not getting it's own repo.
|
||||||
|
|
||||||
|
# Setup Synopsis
|
||||||
|
|
||||||
|
I use `alacritty` as my terminal editor, if I'm on a desktop environment (sorry Xfce Terminal, your time has come).
|
||||||
|
For the shell, I use `fish`, as it has batteries included autocompletion, nice configuration syntax, and some other goodies. (I still have a decent amount of compatibility with `bash`, and the `.bash*` files are somewhat up to date...kind of)
|
||||||
|
In order to have a cutesy little shell prompt, I use `starship`
|
||||||
|
Of course, we must have the over-engineered `tmux` setup for terminal multiplexing.
|
||||||
|
Then there is a suite of Rust based commands for use in the CLI for the most baller terminal navigation imaginable. (The list is too large to put here, just check out [[#Short and sweet:]])
|
||||||
|
For consistent theming, I'm just like other girls and use [catppuccin](https://catppuccin.com/).
|
||||||
|
|
||||||
|
## Script Rundown
|
||||||
|
|
||||||
|
The script has a few phases that are pretty extensively commented on, but the gist is this:
|
||||||
|
(I'm not going to talk about OS detection and stuff because that's boring)
|
||||||
|
|
||||||
|
1. The script checks that the `git` and `stow` command are installed, to clone the repo (if it's not already in it) and `stow` the dotfiles (symlink them to where they are supposed to be under the `~/` directory)
|
||||||
|
2. The script installs a few packages from the system package manager:
|
||||||
|
- `curl`, to install `rustup`, `docker`, `tailscale`, sometimes `starship`, and a [Nerd Font](https://www.nerdfonts.com/), depending on the flags
|
||||||
|
- `tmux`, not only is it a godsend, but the script uses it to install packages in parallel because that's baller
|
||||||
|
- `btop`, because I can't install it with `cargo install` (it's written in C)
|
||||||
|
- `fish`, because I also can't build it that easily (largely written in Rust, but would require cloning the repo and having a few extra dependencies...and why do that?), and I'd prefer the shell be installed system-wide.
|
||||||
|
3. The script then runs a bunch of steps in parallel, using `tmux` to make individual sessions:
|
||||||
|
- "dotfiles" - Always runs
|
||||||
|
- Installs all the rust packages with `cargo`
|
||||||
|
- Clones/installs `fzf`
|
||||||
|
- Installs the Tmux Plugin Manager
|
||||||
|
- "docker" - Runs when the `--docker` flag is passed
|
||||||
|
- Installs Docker via the convenience, what the hell else would it be doing
|
||||||
|
- "extended" - Runs when the `--extended` flag is specified (meant for GUI/Desktop setups)
|
||||||
|
- Installs the "Hack Nerd Font" (very haphazardly, naively assumes Debian-based distro and that `fc-cache` is installed)
|
||||||
|
- Installs `alacritty` as the terminal emulator
|
||||||
|
- Changes the shell to `fish` (shouldn't it do that anyway?)
|
||||||
|
|
||||||
|
|
||||||
|
Quick shoutout to my man `gemini-2.5-pro-preview-05-06`, saved me from a large chunk of lame bash scripting.
|
||||||
|
Although I clearly didn't review the changes well enough if we have undefined variables, but I'll figure it out some day (it works, for the most part, so I'm not too worried. All my concerns are commented for my future self to fix if needed).
|
||||||
|
|
||||||
|
# holy Rust what is your problem (all of the Rust utilities)
|
||||||
|
|
||||||
|
Honestly, that's a valid question. The amount of oxidization my workflow has undergone must be some kind of unhealthy.
|
||||||
|
There isn't a whole lot of it that is me doing it just because "Rust", really.
|
||||||
|
If I was, I'd be full sending it and even replacing the GNU coreutils with the [Rust "uutils" rewrite](https://github.com/uutils/coreutils), but I don't even know what to call something that egregious.
|
||||||
|
Hell, that'd give off some "I use arch btw" energy.
|
||||||
|
|
||||||
|
While yes, I do enjoy coding in Rust, and yes, I just have a bias for Rust utilities over, say, Python, it makes sense.
|
||||||
|
Rust is the most loved programming language- and it's fast.
|
||||||
|
Due to it's popularity and how much people love writing programs in it, it makes sense that there are several useful, focused programs that are simply better than their predecessors.
|
||||||
|
Not to say you can't write powerful or tools with good UX in C/C++ or anything. Don't get it twisted.
|
||||||
|
I use tools like `btop` and "ImHex" rather frequently, which are largely written in C++. I'm simply pointing out that more people want to write in Rust, and that's probably why it's used for a large majority of these upgrades.
|
||||||
|
(I feel like it's also worth mentioning `ffmpeg` here, which is a pretty good example of how well-written C can surpass Rust)
|
||||||
|
|
||||||
|
That being said, I have actually found these utilities to vastly improve upon their couple decade-old counterparts.
|
||||||
|
|
||||||
|
## Short and sweet:
|
||||||
|
|
||||||
|
|
||||||
|
- `bat` - Drop in `cat` replacement, more modern formatting, uhh "cat with wings" is what they said. I agree.
|
||||||
|
- `ripgrep` - Drop in `grep` replacement, and it's FASTTTTTTTTTTTTTT. Has unironically saved me trying to find a file I misplaced so many times. FASTTTTTTTTTTTTTT.
|
||||||
|
- `eza` - Drop in `ls` replacement, more modern formatting, and even has a built in tree command! (The amount of times I've had to install `tree`...)
|
||||||
|
- `zoxide` - Drop in `cd` replacement, can use `fzf` to...well...fuzzy find, and it also just knows where to go. Even without filepaths.
|
||||||
|
- `fd-find` - Drop in `find` replacement. Much like `ripgrep`, it is incredibly fast and simply more modernized. The main difference is that `ripgrep` looks through file contents, and `fd` looks for file(path)s.
|
||||||
|
- `atuin` - This is kinda like zoxide, but for your shell commands. Pressing the up arrow now shows your entire command history, and you can fuzzy find through them. I imagine it's more secure than .bash_history too.
|
||||||
|
- `dua-cli` - Disk-usage-analyzer. Plain and simple. , so this'll do. Useful for my limited storage cloud VPS and stuff.
|
||||||
|
- `starship` - Super customizable cross-shell prompt. Very informative, yet very brief (at least, by default).
|
||||||
|
- `bob-nvim` - Neovim manager. Simple as that.
|
||||||
|
- `alacritty` - GPU accelerated and extremely customizable terminal emulator
|
||||||
|
- `cargo-cache` - Actually just used for this script so far. It'll clean up all the, likely useless, sizable compiled dependencies used to build all of this.
|
||||||
|
Not Rust
|
||||||
|
- `fish` - It's a really friendly and interactive shell, I like it's configuration/scripting a decent amount, and it has things like command autocompletion included, and that's pretty hype. (It's also mostly Rust, btw)
|
||||||
|
- `btop` - It's a resource monitoring TUI, but like, the most badass one out there. Incredibly intuitive and informative. Even if you open it just to find and kill a process, you're gonna look like a hacker doing it.
|
||||||
|
|
||||||
|
When I say drop in replacement, I mean I literally set aliases for all of the commands with the original GNU ones, so my muscle memory stays the same and it is yet to have backfired on me.
|
||||||
|
Something to note about these modern Rust alternatives: most of them not only ignore hidden `.files`, but they will also respect `.gitignore` when present. Keep that in mind if they seem like they aren't working.
|
||||||
|
|
||||||
|
|
||||||
|
## As for the extended yap sesh:
|
||||||
|
|
||||||
|
|
||||||
|
### [bat](https://github.com/sharkdp/bat)
|
||||||
|
It has freaking SYNTAX HIGHLIGHTING
|
||||||
|
Not that that's *super* impressive or anything, but for an upgraded version of `cat`? That's AWESOME.
|
||||||
|
|
||||||
|
On top of syntax highlighting, it prints line numbers, the filename, will even show git diffs when relevant, and is just beautifully formatted.
|
||||||
|
If the output would go beyond the size of the screen, by default, `bat` will automatically page content using `less` by default.
|
||||||
|
It can also act as a pager, which is also neat.
|
||||||
|
|
||||||
|
`bat` still acts just like `cat` when it's being used for pipes or output redirection, or by passing the `-pp` flag (once for `--plain` to disable any formatting, and then `--paging=never` to disable paging)
|
||||||
|
|
||||||
|
You can also unlock some secret synergies with [batextras](https://github.com/eth-p/bat-extras).
|
||||||
|
|
||||||
|
### [ripgrep](https://github.com/BurntSushi/ripgrep)
|
||||||
|
Command: `rg`
|
||||||
|
|
||||||
|
Actually an obscenely fast, and useful, file content search. Oh, and it also can work just like `grep`, which is pretty neat.
|
||||||
|
|
||||||
|
Lets say you remember the content of a file, but not the file name, somehow (I would *NEVER* do something this impractical)
|
||||||
|
You can simply run `rg "content"` and oh shit there it is.
|
||||||
|
Like no deadass by the time you press enter, the command has actually ran while you were typing it.
|
||||||
|
There is no hyperbole here, I couldn't be more serious.
|
||||||
|
|
||||||
|
I was expecting this command take a while since my old method of running the og `find -type f -exec grep "pattern" {} \;` was considerably slower.
|
||||||
|
At least a second?
|
||||||
|
Oh god no.
|
||||||
|
With `ripgrep`, I'm never waiting on the command to find results: I'm waiting on the commands output to finish printing on the screen.
|
||||||
|
|
||||||
|
The days of me running commands like the og `find` with `grep`, or `cat`ing the output of `.bash_history` to find a command I've used before are SO far gone, partly thanks to `ripgrep` (it helped start the whole Rust endeavour)
|
||||||
|
|
||||||
|
### [eza](https://eza.rocks)
|
||||||
|
I really don't have a ton to say, it's just `ls` but full of useful features that simply make it more modern (you'll notice this is a reoccurring theme with these tools).
|
||||||
|
|
||||||
|
As it is a drop in replacement for `ls`, and there are so many options.
|
||||||
|
I took the default aliases set in [.bashrc](./bash/.bashrc), and essentially converted them into `.bash_aliases`, before ultimately deciding to use `fish`.
|
||||||
|
Now the `eza` aliases for `ls` are in [config.fish](./fish/.config/fish/conf.d/aliases.fish), still mirroring the old `bash` aliases I've been using for years, but looking way better doing it.
|
||||||
|
|
||||||
|
### [zoxide](https://github.com/ajeetdsouza/zoxide)
|
||||||
|
Command: `z`
|
||||||
|
`zi` for interactive mode
|
||||||
|
|
||||||
|
As I said, it "just knows where to go", learning from your long ass paths, and letting you simply type in a keyword, or use fzf in interactive mode to find the directory you want.
|
||||||
|
|
||||||
|
Basically the command logs what directories you've been in when you run it.
|
||||||
|
Lets say you run `z really/annoying/and/long/file/path/omg/is-it/over.yet`
|
||||||
|
Well, you'd then be able to run `z over.yet` and it would find the directory to change into for you based off that.
|
||||||
|
It has a really smart algorithm to determine what the best path is using recency and frequency
|
||||||
|
|
||||||
|
You can also use it with two directory names
|
||||||
|
I have all of my code in `~/Documents/code`, sorted by language and some enough subdirectories to annoy me, even though the organizational benefit is worth it.
|
||||||
|
If I have an overlapping directory name outside of my `code` folder (like `~/docker/discord-bot` and `~/Documents/code/python/discord-bot`), and I want to specify that I want the one within the code directory:
|
||||||
|
`z code project-name`
|
||||||
|
|
||||||
|
To top it all off, there is an interactive mode with `fzf` with `zi` to go through your directories and their weights
|
||||||
|
|
||||||
|
Unlike the others, it actually has a `--cmd [cmd]` flag that will essential change `z` and `zi` to `[cmd]` and `[cmd]i`
|
||||||
|
This means you can easily directly replace `cd` by using the flag `--cmd cd` on the init command in your .bashrc or equivalent.
|
||||||
|
|
||||||
|
[The GitHub README](https://github.com/ajeetdsouza/zoxide?tab=readme-ov-file#installation) details it all incredibly well, and it supports most major shells, so you can certainly find a use for it no matter who you are. (well, unless you never touch the terminal, I guess)
|
||||||
|
|
||||||
|
### [fd-find](https://github.com/sharkdp/fd)
|
||||||
|
Command: `fd`
|
||||||
|
|
||||||
|
Gonna cut to the chase here, it's effectively the same as `ripgrep`, but on your files and filepaths instead.
|
||||||
|
Again, more modernized with features you'd expect from modern equivalents just like the rest of these.
|
||||||
|
The `--exec` options are SO much more useful here, as the most simple example.
|
||||||
|
|
||||||
|
This in tandem with `fzf` is actually a diabolical combo for any kind of interactive path selection (as in really effective).
|
||||||
|
|
||||||
|
### [autin](https://atuin.sh/)
|
||||||
|
|
||||||
|
It it's really useful compared to `history | grep "cmd i'm trying to find"` or `cat ~/.bash_history | grep "what was the name of that damn flag"`
|
||||||
|
There is also a feature I haven't used where you can sync your history to a server, which is kinda neat.
|
||||||
|
You can also see some pretty cool statistics too, but that's just a novelty.
|
||||||
|
|
||||||
|
I will, again, bitch when I'm the problem, but since it takes up so much more space than the literally non I'm used to, it'll push content I was about to use off the screen.
|
||||||
|
So for example, I might run `docker compose exec --help` to figure out how format a command, and then I press the up arrow so I can actually use the command (replace `--help` with `bash service_name` or whatever) and the `autin` window will open, pushing the formatting I was going to use as a reference for the next command out of the window.
|
||||||
|
This is partially an old habit of how shell histories usually work dying hard, but it's also me not giving enough fucks to just read some documentation and change some configuration.
|
||||||
|
Again, I'm absolutely the problem here, but I do find that default behavior a little annoying.
|
||||||
|
|
||||||
|
### [dua-cli](https://github.com/Byron/dua-cli)
|
||||||
|
Command: `dua`
|
||||||
|
|
||||||
|
Alright, it analyzes your disk usage. What else do I need to say? You know you need to clean your drive.
|
||||||
|
|
||||||
|
For some reason I can't figure out how to find folder sizes (I wouldn't be surprised if you could with `eza`)
|
||||||
|
Extremely useful, especially on my cloud VPSes with extremely limited space.
|
||||||
|
It's how I figured out that AdGuard was logging every single DNS request since I started using it, which was around a dozen or so gigs after a few months.
|
||||||
|
gigs
|
||||||
|
Allegedly, it's able to help you remove files faster than `rm`, and while I don't have much experience with that, I don't doubt it one bit.
|
||||||
|
|
||||||
|
### [starship](https://starship.rs/)
|
||||||
|
uhh
|
||||||
|
It works as advertised, so I don't have a ton to say about it.
|
||||||
|
It works between shells, is extremely customizable, and...yeah
|
||||||
|
|
||||||
|
I haven't toyed with the configuration myself too much yet, just installed the catppuccin theme and moved on.
|
||||||
|
And honestly, I'm happy.
|
||||||
|
It tells you when you're one a remote host, github repo, codebase (along with a corresponding emoji), always useful and brief.
|
||||||
|
|
||||||
|
### [bob-nvim](https://github.com/MordechaiHadad/bob)
|
||||||
|
Command: `bob`
|
||||||
|
|
||||||
|
It's a neovim version manager I mean I don't really have a lot to say.
|
||||||
|
Pretty straight-forward.
|
||||||
|
Why does it exist?
|
||||||
|
I don't know, but I like it.
|
||||||
|
|
||||||
|
Unfortunately, it hasn't been properly symlinking the `nvim` binary to anywhere within PATH, and I want to have it easily executable system-wide (so I can still invoke it via `sudo` or as another user (particularly for editing files owned by root))
|
||||||
|
I can either quit bitching and solve the problem, or complain about it here when it's my fault.
|
||||||
|
I'll stick with the latter for the time being.
|
||||||
|
|
||||||
|
(for desktop)
|
||||||
|
### [alacritty](https://alacritty.org/)
|
||||||
|
It's a GPU accelerated terminal emulator.
|
||||||
|
Pretty simple.
|
||||||
|
But it's super customizable.
|
||||||
|
|
||||||
|
Yet this is the one that pissed me off the most.
|
||||||
|
In all my bitching, I keep mentioning how I'm the problem, and this is the perfect example.
|
||||||
|
Alacritty, by default, would open up in a small window with a title bar, and I'd go to to fullscreen it with `F11` and it would literally interpret the key as terminal input.
|
||||||
|
After about 3 days of this I couldn't take it anymore, checked out some documentation, and found that there was so much customization that I wasn't even mad about it.
|
||||||
|
|
||||||
|
I think that is part of the beauty of all these free open source tools, and why I am making how idiotic my complaints are so clear.
|
||||||
|
They have so many options for you to do whatever you want with.
|
||||||
|
Even if they are missing something you want, there's nothing from stopping you forking the project yourself and creating what you want for yourself, and potentially everyone else too.
|
||||||
|
|
||||||
|
~~I yapped so much for the other commands, I had to figure out something to talk about.~~
|
||||||
|
|
||||||
|
### [cargo-cache](https://lib.rs/crates/cargo-cache)
|
||||||
|
Simply use it in the script to clean up, not a whole lot to it.
|
||||||
|
Yet to use it outside of the script, haven't found much of a use for it and dua is pretty good.
|
||||||
|
|
||||||
|
This is probably the oldest thing here, but hey, if it works.
|
||||||
|
There's a crate, [cargo-wash](https://lib.rs/crates/cargo-wash) that I should probably check out.
|
||||||
|
If it has the same feature set I might replace this one.
|
||||||
|
|
||||||
|
## possible additions
|
||||||
|
I could add `gitoxide`, but that kinda falls under the "why though" of the "uutils coreutils" rewrite, especially if I'm using `lazygit` instead of the CLI.
|
||||||
|
I also don't as frequently use `git` on ALL of machines like I do the other utilities.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Yes this README in my dotfiles repo is absolutely talking about everything BUT my dotfiles (mostly cause I try to go through and comment in the doftiles for my future self anyways, but the last thing anyone else would want is my config. Instead, I choose to advertise better tools.)
|
||||||
|
|||||||
@@ -3,12 +3,90 @@
|
|||||||
normal = { family = "Hack Nerd Font", style = "Regular" }
|
normal = { family = "Hack Nerd Font", style = "Regular" }
|
||||||
bold = { family = "Hack Nerd Font", style = "Bold" }
|
bold = { family = "Hack Nerd Font", style = "Bold" }
|
||||||
italic = { family = "Hack Nerd Font", style = "Italic" }
|
italic = { family = "Hack Nerd Font", style = "Italic" }
|
||||||
size = 11.0
|
size = 9.0
|
||||||
|
|
||||||
[window]
|
[window]
|
||||||
decorations = "full"
|
decorations = "None"
|
||||||
opacity = 0.95
|
opacity = 0.85
|
||||||
|
startup_mode = "Fullscreen"
|
||||||
|
|
||||||
[shell]
|
[terminal.shell]
|
||||||
program = "/usr/bin/fish"
|
program = "/usr/bin/fish"
|
||||||
args = ["-l"]
|
args = ["-l"]
|
||||||
|
|
||||||
|
|
||||||
|
[[keyboard.bindings]]
|
||||||
|
action = "ToggleFullscreen"
|
||||||
|
key = "F11"
|
||||||
|
mods = "None"
|
||||||
|
|
||||||
|
[env]
|
||||||
|
TERM = "xterm-256color"
|
||||||
|
|
||||||
|
|
||||||
|
# Catppuccin theme
|
||||||
|
[colors.primary]
|
||||||
|
background = "#1e1e2e"
|
||||||
|
foreground = "#cdd6f4"
|
||||||
|
dim_foreground = "#7f849c"
|
||||||
|
bright_foreground = "#cdd6f4"
|
||||||
|
|
||||||
|
[colors.cursor]
|
||||||
|
text = "#1e1e2e"
|
||||||
|
cursor = "#f5e0dc"
|
||||||
|
|
||||||
|
[colors.vi_mode_cursor]
|
||||||
|
text = "#1e1e2e"
|
||||||
|
cursor = "#b4befe"
|
||||||
|
|
||||||
|
[colors.search.matches]
|
||||||
|
foreground = "#1e1e2e"
|
||||||
|
background = "#a6adc8"
|
||||||
|
|
||||||
|
[colors.search.focused_match]
|
||||||
|
foreground = "#1e1e2e"
|
||||||
|
background = "#a6e3a1"
|
||||||
|
|
||||||
|
[colors.footer_bar]
|
||||||
|
foreground = "#1e1e2e"
|
||||||
|
background = "#a6adc8"
|
||||||
|
|
||||||
|
[colors.hints.start]
|
||||||
|
foreground = "#1e1e2e"
|
||||||
|
background = "#f9e2af"
|
||||||
|
|
||||||
|
[colors.hints.end]
|
||||||
|
foreground = "#1e1e2e"
|
||||||
|
background = "#a6adc8"
|
||||||
|
|
||||||
|
[colors.selection]
|
||||||
|
text = "#1e1e2e"
|
||||||
|
background = "#f5e0dc"
|
||||||
|
|
||||||
|
[colors.normal]
|
||||||
|
black = "#45475a"
|
||||||
|
red = "#f38ba8"
|
||||||
|
green = "#a6e3a1"
|
||||||
|
yellow = "#f9e2af"
|
||||||
|
blue = "#89b4fa"
|
||||||
|
magenta = "#f5c2e7"
|
||||||
|
cyan = "#94e2d5"
|
||||||
|
white = "#bac2de"
|
||||||
|
|
||||||
|
[colors.bright]
|
||||||
|
black = "#585b70"
|
||||||
|
red = "#f38ba8"
|
||||||
|
green = "#a6e3a1"
|
||||||
|
yellow = "#f9e2af"
|
||||||
|
blue = "#89b4fa"
|
||||||
|
magenta = "#f5c2e7"
|
||||||
|
cyan = "#94e2d5"
|
||||||
|
white = "#a6adc8"
|
||||||
|
|
||||||
|
[[colors.indexed_colors]]
|
||||||
|
index = 16
|
||||||
|
color = "#fab387"
|
||||||
|
|
||||||
|
[[colors.indexed_colors]]
|
||||||
|
index = 17
|
||||||
|
color = "#f5e0dc"
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Including this from .bashrc because maybe I'll remember it exists and find a use for it if I put it here.
|
# Including this from .bashrc because maybe I'll remember it exists and find a use for it if I put it here.
|
||||||
# Add an "alert" alias for long running commands. Use like so:
|
# Add an "alert" alias for long running commands. Use like so:
|
||||||
# sleep 10; alert
|
# sleep 10; alert
|
||||||
@@ -25,10 +21,11 @@ alias la="eza -a --icons --group-directories-first"
|
|||||||
alias lt="eza --tree --level=2 --long --git --icons"
|
alias lt="eza --tree --level=2 --long --git --icons"
|
||||||
|
|
||||||
# If docker is actually installed on the host...
|
# If docker is actually installed on the host...
|
||||||
if command docker -v &> /dev/null; then
|
if command docker -v &>/dev/null; then
|
||||||
alias dc="docker compose"
|
alias dc="docker compose"
|
||||||
alias dcb="dc build"
|
alias dcd="dc down"
|
||||||
alias dcu="dc up -d"
|
alias dcb="dc build"
|
||||||
alias dcl="dc logs -f"
|
alias dcu="dc up -d"
|
||||||
alias dcf="dcu && dcl" # Think "docker compose full", yes all of this is peak laziness but this is probably my most used command.
|
alias dcl="dc logs -f"
|
||||||
|
alias dcf="dcu && dcl" # Think "docker compose full", yes all of this is peak laziness but this is probably my most used command.
|
||||||
fi
|
fi
|
||||||
|
|||||||
213
bash/.bashrc
213
bash/.bashrc
@@ -4,141 +4,144 @@
|
|||||||
|
|
||||||
# If not running interactively, don't do anything
|
# If not running interactively, don't do anything
|
||||||
case $- in
|
case $- in
|
||||||
*i*) ;;
|
*i*) ;;
|
||||||
*) return;;
|
*) return ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# wait if we are running interactive literally just use fish lmao (assuming it's installed, ofc)
|
# wait if we are running interactive literally just use fish lmao (assuming it's installed, ofc)
|
||||||
if ! command -v fish &> /dev/null; then
|
if ! command -v fish &>/dev/null; then
|
||||||
# don't put duplicate lines or lines starting with space in the history.
|
# don't put duplicate lines or lines starting with space in the history.
|
||||||
# See bash(1) for more options
|
# See bash(1) for more options
|
||||||
HISTCONTROL=ignoreboth
|
HISTCONTROL=ignoreboth
|
||||||
|
|
||||||
# append to the history file, don't overwrite it
|
# append to the history file, don't overwrite it
|
||||||
shopt -s histappend
|
shopt -s histappend
|
||||||
|
|
||||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||||
HISTSIZE=1000
|
HISTSIZE=1000
|
||||||
HISTFILESIZE=2000
|
HISTFILESIZE=2000
|
||||||
|
|
||||||
# check the window size after each command and, if necessary,
|
# check the window size after each command and, if necessary,
|
||||||
# update the values of LINES and COLUMNS.
|
# update the values of LINES and COLUMNS.
|
||||||
shopt -s checkwinsize
|
shopt -s checkwinsize
|
||||||
|
|
||||||
# If set, the pattern "**" used in a pathname expansion context will
|
# If set, the pattern "**" used in a pathname expansion context will
|
||||||
# match all files and zero or more directories and subdirectories.
|
# match all files and zero or more directories and subdirectories.
|
||||||
#shopt -s globstar
|
#shopt -s globstar
|
||||||
|
|
||||||
# make less more friendly for non-text input files, see lesspipe(1)
|
# make less more friendly for non-text input files, see lesspipe(1)
|
||||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||||
|
|
||||||
# set variable identifying the chroot you work in (used in the prompt below)
|
# set variable identifying the chroot you work in (used in the prompt below)
|
||||||
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||||
debian_chroot=$(cat /etc/debian_chroot)
|
debian_chroot=$(cat /etc/debian_chroot)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||||
case "$TERM" in
|
case "$TERM" in
|
||||||
xterm-color|*-256color) color_prompt=yes;;
|
xterm-color | *-256color) color_prompt=yes ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||||
# off by default to not distract the user: the focus in a terminal window
|
# off by default to not distract the user: the focus in a terminal window
|
||||||
# should be on the output of commands, not on the prompt
|
# should be on the output of commands, not on the prompt
|
||||||
#force_color_prompt=yes
|
#force_color_prompt=yes
|
||||||
|
|
||||||
if [ -n "$force_color_prompt" ]; then
|
if [ -n "$force_color_prompt" ]; then
|
||||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||||
# We have color support; assume it's compliant with Ecma-48
|
# We have color support; assume it's compliant with Ecma-48
|
||||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||||
# a case would tend to support setf rather than setaf.)
|
# a case would tend to support setf rather than setaf.)
|
||||||
color_prompt=yes
|
color_prompt=yes
|
||||||
else
|
|
||||||
color_prompt=
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$color_prompt" = yes ]; then
|
|
||||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
|
||||||
else
|
else
|
||||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
color_prompt=
|
||||||
fi
|
fi
|
||||||
unset color_prompt force_color_prompt
|
fi
|
||||||
|
|
||||||
# If this is an xterm set the title to user@host:dir
|
if [ "$color_prompt" = yes ]; then
|
||||||
case "$TERM" in
|
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||||
xterm*|rxvt*)
|
else
|
||||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||||
;;
|
fi
|
||||||
*)
|
unset color_prompt force_color_prompt
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# enable color support of ls and also add handy aliases
|
# If this is an xterm set the title to user@host:dir
|
||||||
if [ -x /usr/bin/dircolors ]; then
|
case "$TERM" in
|
||||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
xterm* | rxvt*)
|
||||||
alias ls='ls --color=auto'
|
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||||
#alias dir='dir --color=auto'
|
;;
|
||||||
#alias vdir='vdir --color=auto'
|
*) ;;
|
||||||
|
esac
|
||||||
|
|
||||||
alias grep='grep --color=auto'
|
# enable color support of ls and also add handy aliases
|
||||||
alias fgrep='fgrep --color=auto'
|
if [ -x /usr/bin/dircolors ]; then
|
||||||
alias egrep='egrep --color=auto'
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||||
fi
|
alias ls='ls --color=auto'
|
||||||
|
#alias dir='dir --color=auto'
|
||||||
|
#alias vdir='vdir --color=auto'
|
||||||
|
|
||||||
# colored GCC warnings and errors
|
alias grep='grep --color=auto'
|
||||||
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
alias fgrep='fgrep --color=auto'
|
||||||
|
alias egrep='egrep --color=auto'
|
||||||
|
fi
|
||||||
|
|
||||||
# some more ls aliases
|
# colored GCC warnings and errors
|
||||||
alias ll='ls -alF'
|
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||||
alias la='ls -A'
|
|
||||||
alias l='ls -CF'
|
|
||||||
|
|
||||||
# Add an "alert" alias for long running commands. Use like so:
|
# some more ls aliases
|
||||||
# sleep 10; alert
|
alias ll='ls -alF'
|
||||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
alias la='ls -A'
|
||||||
|
alias l='ls -CF'
|
||||||
|
|
||||||
# Alias definitions.
|
# Add an "alert" alias for long running commands. Use like so:
|
||||||
# You may want to put all your additions into a separate file like
|
# sleep 10; alert
|
||||||
# ~/.bash_aliases, instead of adding them here directly.
|
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||||
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
|
||||||
|
|
||||||
if [ -f ~/.bash_aliases ]; then
|
# Alias definitions.
|
||||||
. ~/.bash_aliases
|
# You may want to put all your additions into a separate file like
|
||||||
fi
|
# ~/.bash_aliases, instead of adding them here directly.
|
||||||
|
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||||
|
|
||||||
# enable programmable completion features (you don't need to enable
|
if [ -f ~/.bash_aliases ]; then
|
||||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
. ~/.bash_aliases
|
||||||
# sources /etc/bash.bashrc).
|
fi
|
||||||
if ! shopt -oq posix; then
|
|
||||||
|
# enable programmable completion features (you don't need to enable
|
||||||
|
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||||
|
# sources /etc/bash.bashrc).
|
||||||
|
if ! shopt -oq posix; then
|
||||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||||
. /usr/share/bash-completion/bash_completion
|
. /usr/share/bash-completion/bash_completion
|
||||||
elif [ -f /etc/bash_completion ]; then
|
elif [ -f /etc/bash_completion ]; then
|
||||||
. /etc/bash_completion
|
. /etc/bash_completion
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
. "$HOME/.cargo/env"
|
. "$HOME/.cargo/env"
|
||||||
|
|
||||||
|
# impl Bash for FZF
|
||||||
|
export FZF_DEFAULT_OPTS='--tmux'
|
||||||
|
eval "$(fzf --bash)"
|
||||||
|
|
||||||
# impl Bash for FZF
|
# impl Bash for Autin
|
||||||
export FZF_DEFAULT_OPTS='--tmux'
|
eval "$(atuin init bash)"
|
||||||
eval "$(fzf --bash)"
|
|
||||||
|
|
||||||
# impl Bash for Autin
|
# impl Bash<T> for Zoxide where T = FZF
|
||||||
eval "$(atuin init bash)"
|
export _ZO_FZF_OPTS='--tmux'
|
||||||
|
export _ZO_DOCTOR=0 # Since starship should be last ig
|
||||||
|
eval "$(zoxide init --cmd cd bash)"
|
||||||
|
|
||||||
# impl Bash<T> for Zoxide where T = FZF
|
# theming? Who needs that. OH WAIT IT'S WRITTEN IN RUST!? HELL YEAH!!!
|
||||||
export _ZO_FZF_OPTS='--tmux'
|
eval "$(starship init bash)"
|
||||||
export _ZO_DOCTOR=0 # Since starship should be last ig
|
|
||||||
eval "$(zoxide init --cmd cd bash)"
|
|
||||||
|
|
||||||
|
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
|
||||||
|
|
||||||
# theming? Who needs that. OH WAIT IT'S WRITTEN IN RUST!? HELL YEAH!!!
|
else
|
||||||
eval "$(starship init bash)"
|
# I assume this will be a weird thing where you have to exit exit since it's not the login shell?
|
||||||
|
exec fish
|
||||||
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
|
|
||||||
|
|
||||||
else
|
|
||||||
# I assume this will be a weird thing where you have to exit exit since it's not the login shell?
|
|
||||||
exec fish
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
export NVM_DIR="$HOME/.nvm"
|
||||||
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||||
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||||
|
|
||||||
|
. "$HOME/.local/bin/env"
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#? Config file for btop v. 1.2.13
|
#? Config file for btop v. 1.3.0
|
||||||
|
|
||||||
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
|
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
|
||||||
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
|
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
|
||||||
color_theme = "/root/.config/btop/themes/catppuccin_mocha.theme"
|
color_theme = "/home/foreverpyrite/.config/btop/themes/catppuccin_mocha.theme"
|
||||||
|
|
||||||
#* If the theme set background should be shown, set to False if you want terminal background transparency.
|
#* If the theme set background should be shown, set to False if you want terminal background transparency.
|
||||||
theme_background = True
|
theme_background = True
|
||||||
@@ -37,6 +37,9 @@ graph_symbol = "braille"
|
|||||||
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
||||||
graph_symbol_cpu = "default"
|
graph_symbol_cpu = "default"
|
||||||
|
|
||||||
|
# Graph symbol to use for graphs in gpu box, "default", "braille", "block" or "tty".
|
||||||
|
graph_symbol_gpu = "default"
|
||||||
|
|
||||||
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
||||||
graph_symbol_mem = "default"
|
graph_symbol_mem = "default"
|
||||||
|
|
||||||
@@ -46,7 +49,7 @@ graph_symbol_net = "default"
|
|||||||
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
||||||
graph_symbol_proc = "default"
|
graph_symbol_proc = "default"
|
||||||
|
|
||||||
#* Manually set which boxes to show. Available values are "cpu mem net proc", separate values with whitespace.
|
#* Manually set which boxes to show. Available values are "cpu mem net proc" and "gpu0" through "gpu5", separate values with whitespace.
|
||||||
shown_boxes = "cpu mem net proc"
|
shown_boxes = "cpu mem net proc"
|
||||||
|
|
||||||
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
|
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
|
||||||
@@ -54,7 +57,7 @@ update_ms = 2000
|
|||||||
|
|
||||||
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
|
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
|
||||||
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
|
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
|
||||||
proc_sorting = "cpu lazy"
|
proc_sorting = "memory"
|
||||||
|
|
||||||
#* Reverse sorting order, True or False.
|
#* Reverse sorting order, True or False.
|
||||||
proc_reversed = False
|
proc_reversed = False
|
||||||
@@ -69,7 +72,7 @@ proc_colors = True
|
|||||||
proc_gradient = True
|
proc_gradient = True
|
||||||
|
|
||||||
#* If process cpu usage should be of the core it's running on or usage of the total available cpu power.
|
#* If process cpu usage should be of the core it's running on or usage of the total available cpu power.
|
||||||
proc_per_core = False
|
proc_per_core = True
|
||||||
|
|
||||||
#* Show process memory as bytes instead of percent.
|
#* Show process memory as bytes instead of percent.
|
||||||
proc_mem_bytes = True
|
proc_mem_bytes = True
|
||||||
@@ -86,6 +89,9 @@ proc_left = False
|
|||||||
#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop).
|
#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop).
|
||||||
proc_filter_kernel = False
|
proc_filter_kernel = False
|
||||||
|
|
||||||
|
#* In tree-view, always accumulate child process resources in the parent process.
|
||||||
|
proc_aggregate = False
|
||||||
|
|
||||||
#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available.
|
#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available.
|
||||||
#* Select from a list of detected attributes from the options menu.
|
#* Select from a list of detected attributes from the options menu.
|
||||||
cpu_graph_upper = "total"
|
cpu_graph_upper = "total"
|
||||||
@@ -94,6 +100,9 @@ cpu_graph_upper = "total"
|
|||||||
#* Select from a list of detected attributes from the options menu.
|
#* Select from a list of detected attributes from the options menu.
|
||||||
cpu_graph_lower = "total"
|
cpu_graph_lower = "total"
|
||||||
|
|
||||||
|
#* If gpu info should be shown in the cpu box. Available values = "Auto", "On" and "Off".
|
||||||
|
show_gpu_info = "Auto"
|
||||||
|
|
||||||
#* Toggles if the lower CPU graph should be inverted.
|
#* Toggles if the lower CPU graph should be inverted.
|
||||||
cpu_invert_lower = True
|
cpu_invert_lower = True
|
||||||
|
|
||||||
@@ -160,7 +169,7 @@ show_swap = True
|
|||||||
swap_disk = True
|
swap_disk = True
|
||||||
|
|
||||||
#* If mem box should be split to also show disks info.
|
#* If mem box should be split to also show disks info.
|
||||||
show_disks = True
|
show_disks = False
|
||||||
|
|
||||||
#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar.
|
#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar.
|
||||||
only_physical = True
|
only_physical = True
|
||||||
@@ -209,4 +218,28 @@ selected_battery = "Auto"
|
|||||||
|
|
||||||
#* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG".
|
#* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG".
|
||||||
#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info.
|
#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info.
|
||||||
log_level = "WARNING"
|
log_level = "WARNING"
|
||||||
|
|
||||||
|
#* Measure PCIe throughput on NVIDIA cards, may impact performance on certain cards.
|
||||||
|
nvml_measure_pcie_speeds = True
|
||||||
|
|
||||||
|
#* Horizontally mirror the GPU graph.
|
||||||
|
gpu_mirror_graph = True
|
||||||
|
|
||||||
|
#* Custom gpu0 model name, empty string to disable.
|
||||||
|
custom_gpu_name0 = ""
|
||||||
|
|
||||||
|
#* Custom gpu1 model name, empty string to disable.
|
||||||
|
custom_gpu_name1 = ""
|
||||||
|
|
||||||
|
#* Custom gpu2 model name, empty string to disable.
|
||||||
|
custom_gpu_name2 = ""
|
||||||
|
|
||||||
|
#* Custom gpu3 model name, empty string to disable.
|
||||||
|
custom_gpu_name3 = ""
|
||||||
|
|
||||||
|
#* Custom gpu4 model name, empty string to disable.
|
||||||
|
custom_gpu_name4 = ""
|
||||||
|
|
||||||
|
#* Custom gpu5 model name, empty string to disable.
|
||||||
|
custom_gpu_name5 = ""
|
||||||
@@ -1,15 +1,12 @@
|
|||||||
# ~/.config/fish/conf.d/aliases.fish
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Core "Rust-first" Command Replacements
|
# Core "Rust-first" Command Replacements
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# These override the standard Unix commands with our modern alternatives.
|
# These override the standard Unix commands with our modern alternatives.
|
||||||
# Note: Fish syntax doesn't use '=' for aliases.
|
|
||||||
|
|
||||||
alias cat "bat --paging=never" # Use bat to view files
|
alias cat "bat --paging=never" # Use bat to view files
|
||||||
alias grep "rg" # Use ripgrep for searching
|
alias grep rg # Use ripgrep for searching
|
||||||
alias ls "eza --icons --group-directories-first" # The new default `ls`
|
alias ls "eza --icons --group-directories-first" # The new default `ls`
|
||||||
alias find "fd" # fd-find. you're smart, you'll figure it out
|
alias find fd # fd-find. you're smart, you'll figure it out
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Enhanced `eza` Aliases
|
# Enhanced `eza` Aliases
|
||||||
@@ -25,22 +22,25 @@ alias la "eza -a --icons --group-directories-first"
|
|||||||
# lt: tree view
|
# lt: tree view
|
||||||
alias lt "eza --tree --level=2 --long --git --icons"
|
alias lt "eza --tree --level=2 --long --git --icons"
|
||||||
|
|
||||||
|
# tree: deadass replacing the tree command
|
||||||
|
alias tree "eza -T"
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Context-Aware Aliases (Docker)
|
# Context-Aware Aliases (Docker)
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# These aliases are only defined if the `docker` command is available.
|
# These aliases are only defined if the `docker` command is available.
|
||||||
|
|
||||||
if command -v docker &> /dev/null
|
if command -v docker &>/dev/null
|
||||||
# Simple aliases for docker-compose
|
# Simple aliases for docker-compose
|
||||||
alias dc "docker compose"
|
alias dc "docker compose"
|
||||||
|
alias dcd "docker compose down"
|
||||||
alias dcb "docker compose build"
|
alias dcb "docker compose build"
|
||||||
alias dcu "docker compose up -d"
|
alias dcu "docker compose up -d"
|
||||||
alias dcl "docker compose logs -f"
|
alias dcl "docker compose logs -f"
|
||||||
|
|
||||||
# Your "full" command is better as a function for clarity
|
|
||||||
# You can put this in functions.fish or define it right here!
|
|
||||||
function dcf
|
function dcf
|
||||||
|
echo "==> Running 'docker compose build'..."
|
||||||
|
docker compose build
|
||||||
echo "==> Running 'docker compose up -d'..."
|
echo "==> Running 'docker compose up -d'..."
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
echo "==> Tailing logs with 'docker compose logs -f'..."
|
echo "==> Tailing logs with 'docker compose logs -f'..."
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ set -x EDITOR nvim
|
|||||||
# --- PATH Configuration ---
|
# --- PATH Configuration ---
|
||||||
# Add Cargo's bin directory to the path
|
# Add Cargo's bin directory to the path
|
||||||
fish_add_path "$HOME/.cargo/bin"
|
fish_add_path "$HOME/.cargo/bin"
|
||||||
|
# Add the local user bin to path as well
|
||||||
|
fish_add_path "$HOME/.local/bin"
|
||||||
|
|
||||||
# --- Tool Initialization ---
|
# --- Tool Initialization ---
|
||||||
# Starship Prompt
|
# Starship Prompt
|
||||||
@@ -14,7 +16,7 @@ starship init fish | source
|
|||||||
|
|
||||||
# Zoxide (replaces cd)
|
# Zoxide (replaces cd)
|
||||||
set -x FZF_DEFAULT_OPTS --tmux
|
set -x FZF_DEFAULT_OPTS --tmux
|
||||||
zoxide init fish | source
|
zoxide init --cmd cd fish | source
|
||||||
|
|
||||||
# Autin (rip unencrypted .bash_history)
|
# Autin (rip unencrypted .bash_history)
|
||||||
atuin init fish | source
|
atuin init fish | source
|
||||||
@@ -26,12 +28,8 @@ if test -f "$HOME/.fzf.fish"
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# --- ALIASES (The "Rust-first" way) ---
|
# # Hopefully fixes the length errors in nvim
|
||||||
# Use 'alias' for simple command replacements.
|
# set -gx XDG_CACHE_HOME "/tmp/.nv"
|
||||||
# Note the syntax is 'alias new_command "old_command with args"'
|
|
||||||
|
|
||||||
alias ls 'eza --icons --group-directories-first' # a more feature-rich ls
|
|
||||||
alias ll 'eza -l --icons --group-directories-first'
|
# Should I go ahead and `tmux start-server` in here?
|
||||||
alias la 'eza -la --icons --group-directories-first'
|
|
||||||
alias cat 'bat --paging=never' # bat is a better cat
|
|
||||||
alias grep 'rg' # ripgrep is a better grep
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# This file contains fish universal variable definitions.
|
# This file contains fish universal variable definitions.
|
||||||
# VERSION: 3.0
|
# VERSION: 3.0
|
||||||
SETUVAR __fish_initialized:3800
|
SETUVAR __fish_initialized:3400
|
||||||
SETUVAR fish_color_autosuggestion:555\x1ebrblack
|
SETUVAR fish_color_autosuggestion:555\x1ebrblack
|
||||||
SETUVAR fish_color_cancel:\x2dr
|
SETUVAR fish_color_cancel:\x2dr
|
||||||
SETUVAR fish_color_command:blue
|
SETUVAR fish_color_command:blue
|
||||||
@@ -29,4 +29,4 @@ SETUVAR fish_pager_color_description:B3A06D\x1eyellow\x1e\x2di
|
|||||||
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
|
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
|
||||||
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
||||||
SETUVAR fish_pager_color_selected_background:\x2dr
|
SETUVAR fish_pager_color_selected_background:\x2dr
|
||||||
SETUVAR fish_user_paths:/home/foreverpyrite/\x2ecargo/bin\x1e/root/\x2ecargo/bin\x1e/root/\x2efzf/bin\x1e/home/foreverpyrite/\x2efzf/bin
|
SETUVAR fish_user_paths:/home/foreverpyrite/\x2elocal/bin\x1e/home/foreverpyrite/\x2ecargo/bin\x1e/root/\x2ecargo/bin\x1e/root/\x2efzf/bin\x1e/home/foreverpyrite/\x2efzf/bin
|
||||||
|
|||||||
38
install.sh
38
install.sh
@@ -23,18 +23,20 @@ DOCKER_INSTALL=false
|
|||||||
[[ " $* " =~ " --docker " ]] && DOCKER_INSTALL=true
|
[[ " $* " =~ " --docker " ]] && DOCKER_INSTALL=true
|
||||||
|
|
||||||
# Phased installation package lists
|
# Phased installation package lists
|
||||||
PREREQ_PACKAGES=(git stow)
|
PREREQ_PACKAGES=(git stow) # Git to clone my dotfiles repo, stow to symlink my conf from the cloned repo.
|
||||||
SYSTEM_PACKAGES=(curl tmux btop fish)
|
SYSTEM_PACKAGES=(curl tmux btop fish)
|
||||||
|
# Okay yes this may seem complete over-the-top oxidization, however:
|
||||||
RUST_PACKAGES=(
|
RUST_PACKAGES=(
|
||||||
eza
|
eza # Drop in `ls` replacement, more modern formatting, and even has a built in tree command! (The amount of times I've had to install tree...)
|
||||||
bat
|
bat # Drop in `cat` replacement, more modern formatting, uhh "cat with wings" is what they said. I agree.
|
||||||
ripgrep
|
ripgrep # Drop in `grep` replacement, and it's FASTTTTTTTTTTTTTT. Has unironically saved me trying to find a file I misplaced so many times. FASTTTTTTTTTTTTTT.
|
||||||
zoxide
|
fd-find # Drop in `find` replacement, and it's also FASTTTTTTTTTTTTTT. Very similar to `ripgrep`, but for file(path)s instead of file contents.
|
||||||
starship
|
zoxide # Drop in `cd` replacement, can use `fzf` to...well...fuzzy find, and it also just knows where to go
|
||||||
bob-nvim
|
starship # Super customizable cross-shell prompt. Very informative, yet very brief (at least, by default).
|
||||||
atuin
|
bob-nvim # Probably something I'll drop since installing up-to-date neovim seems like an impossible task. I'll figure out something...
|
||||||
dua-cli
|
atuin # This is kinda like zoxide, but for your shell commands. Pressing the up arrow now shows your entire command history, and you can fuzzy find through them. I imagine it's more secure than .bash_history too.
|
||||||
cargo-cache
|
dua-cli # Disk-usage-analyzer. Plain and simple. For some reason I can't figure out how to find folder sizes (you probably can with `eza`), so this'll do. Useful for my limited storage cloud VPS and stuff.
|
||||||
|
cargo-cache # Actually just used for this script so far. It'll clean up all the, likely useless, sizable compiled dependancies used to build all of this.
|
||||||
)
|
)
|
||||||
|
|
||||||
# Global variables for system context
|
# Global variables for system context
|
||||||
@@ -97,6 +99,7 @@ install_build_tools() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# lowk the best function tho
|
||||||
install_rust_toolchain() {
|
install_rust_toolchain() {
|
||||||
if command -v cargo &>/dev/null; then info "Rust toolchain is already installed."; else
|
if command -v cargo &>/dev/null; then info "Rust toolchain is already installed."; else
|
||||||
info "Installing Rust and Cargo via rustup..."
|
info "Installing Rust and Cargo via rustup..."
|
||||||
@@ -131,6 +134,8 @@ run_parallel_installs() {
|
|||||||
local session_name="dotfiles"
|
local session_name="dotfiles"
|
||||||
|
|
||||||
# --- Command Definitions ---
|
# --- Command Definitions ---
|
||||||
|
# Note: if fish is set up in the .bashrc/.profile at this point, tmux sessions will start in fish, which messes up these commands (since they for bash).
|
||||||
|
# Solution: bash -c 'command'
|
||||||
local cargo_cmd="export PATH='$HOME/.cargo/bin:$PATH'; for pkg in ${RUST_PACKAGES[@]}; do cargo install --locked \$pkg; done && bob use stable && \
|
local cargo_cmd="export PATH='$HOME/.cargo/bin:$PATH'; for pkg in ${RUST_PACKAGES[@]}; do cargo install --locked \$pkg; done && bob use stable && \
|
||||||
sudo ln -s ~/.local/share/bob/nvim-bob/nvim /usr/bin/nvim && \
|
sudo ln -s ~/.local/share/bob/nvim-bob/nvim /usr/bin/nvim && \
|
||||||
cargo cache -a -y && \
|
cargo cache -a -y && \
|
||||||
@@ -149,6 +154,7 @@ run_parallel_installs() {
|
|||||||
tmux split-window -v -t "$session_name:1.2"
|
tmux split-window -v -t "$session_name:1.2"
|
||||||
|
|
||||||
# Send commands to their respective panes
|
# Send commands to their respective panes
|
||||||
|
# Yeah, I talked about `bash -c 'command'`, but I don't wanna test all that right now
|
||||||
tmux send-keys -t "$session_name:1.1" "$cargo_cmd" C-m
|
tmux send-keys -t "$session_name:1.1" "$cargo_cmd" C-m
|
||||||
tmux send-keys -t "$session_name:1.2" "$tpm_cmd" C-m
|
tmux send-keys -t "$session_name:1.2" "$tpm_cmd" C-m
|
||||||
tmux send-keys -t "$session_name:1.3" "$fzf_cmd" C-m
|
tmux send-keys -t "$session_name:1.3" "$fzf_cmd" C-m
|
||||||
@@ -162,7 +168,7 @@ run_parallel_installs() {
|
|||||||
if [ "$EXTENDED_INSTALL" = true ]; then
|
if [ "$EXTENDED_INSTALL" = true ]; then
|
||||||
tmux new-window -t "$session_name" -n "Desktop"
|
tmux new-window -t "$session_name" -n "Desktop"
|
||||||
|
|
||||||
# Pane 1: Font Installation (your existing command)
|
# Pane 1: Font Installation
|
||||||
local font_cmd="mkdir -p ~/.local/share/fonts && curl -fLo f.tar.xz https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Hack.tar.xz && tar -xf f.tar.xz -C ~/.local/share/fonts && rm f.tar.xz && fc-cache -fv && echo '✅ Fonts installed.'"
|
local font_cmd="mkdir -p ~/.local/share/fonts && curl -fLo f.tar.xz https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Hack.tar.xz && tar -xf f.tar.xz -C ~/.local/share/fonts && rm f.tar.xz && fc-cache -fv && echo '✅ Fonts installed.'"
|
||||||
tmux send-keys -t "$session_name:Desktop.1" "$font_cmd" C-m
|
tmux send-keys -t "$session_name:Desktop.1" "$font_cmd" C-m
|
||||||
|
|
||||||
@@ -170,14 +176,17 @@ run_parallel_installs() {
|
|||||||
tmux split-window -h -t "$session_name:Desktop.1"
|
tmux split-window -h -t "$session_name:Desktop.1"
|
||||||
tmux split-window -v -t "$session_name:Desktop.2"
|
tmux split-window -v -t "$session_name:Desktop.2"
|
||||||
|
|
||||||
# Pane 2: Change Shell (your existing command)
|
# Pane 2: Change Shell
|
||||||
local shell_cmd="FISH_PATH=\$(which fish); if ! grep -q \"\$FISH_PATH\" /etc/shells; then echo \"\$FISH_PATH\" | $SUDO_CMD tee -a /etc/shells; fi; $SUDO_CMD chsh -s \"\$FISH_PATH\" \"$USER\" && echo '✅ Shell changed.'"
|
local shell_cmd="FISH_PATH=\$(which fish); if ! grep -q \"\$FISH_PATH\" /etc/shells; then echo \"\$FISH_PATH\" | $SUDO_CMD tee -a /etc/shells; fi; $SUDO_CMD chsh -s \"\$FISH_PATH\" \"$USER\" && echo '✅ Shell changed.'"
|
||||||
tmux send-keys -t "$session_name:Desktop.2" "$shell_cmd" C-m
|
tmux send-keys -t "$session_name:Desktop.2" "$shell_cmd" C-m
|
||||||
warn "The 'chsh' command inside tmux may require your password to complete."
|
warn "The 'chsh' command inside tmux may require your password to complete."
|
||||||
|
|
||||||
# Pane 3: Install Alacritty
|
# Pane 3: Install Alacritty
|
||||||
|
# Oh the unfortunate life of this command.
|
||||||
|
# See, you can build alacritty from source via cargo, however, to do that I would need to install all the build dependancies...and like...there's a certain point where it's just not worth it.
|
||||||
local alacritty_install_cmd
|
local alacritty_install_cmd
|
||||||
case "$PM" in
|
case "$PM" in
|
||||||
|
# wait where is GUI_PACKAGES defined? is it even defined? oh god.
|
||||||
brew) alacritty_install_cmd="brew install --cask ${GUI_PACKAGES[*]}" ;;
|
brew) alacritty_install_cmd="brew install --cask ${GUI_PACKAGES[*]}" ;;
|
||||||
apt-get) alacritty_install_cmd="$SUDO_CMD apt-get install -y ${GUI_PACKAGES[*]}" ;;
|
apt-get) alacritty_install_cmd="$SUDO_CMD apt-get install -y ${GUI_PACKAGES[*]}" ;;
|
||||||
dnf) alacritty_install_cmd="$SUDO_CMD dnf install -y ${GUI_PACKAGES[*]}" ;;
|
dnf) alacritty_install_cmd="$SUDO_CMD dnf install -y ${GUI_PACKAGES[*]}" ;;
|
||||||
@@ -219,7 +228,10 @@ install_rust_toolchain
|
|||||||
success "Core system tools installed."
|
success "Core system tools installed."
|
||||||
|
|
||||||
# Phase 3: Parallel Tool Installation
|
# Phase 3: Parallel Tool Installation
|
||||||
run_parallel_installs
|
run_parallel_installs # unfortunate part of this is that it'll require your password/sudo auth quite a bit.
|
||||||
|
# I think it would be cool to be able to run this script without root, given prerequisites are installed, since cargo installed binaries are stored in `~/.cargo/bin`
|
||||||
|
# All the system needs is "git", "stow", and a few build tools. rustup is installed without sudo just fine too.
|
||||||
|
# I'm not sure why I'm acting like I'd use this script on a multi-user system: I'd just ssh into my own machines.
|
||||||
|
|
||||||
# --- Final Message ---
|
# --- Final Message ---
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
@@ -32,15 +32,31 @@ bind -n M-Right select-pane -R
|
|||||||
bind -n M-Up select-pane -U
|
bind -n M-Up select-pane -U
|
||||||
bind -n M-Down select-pane -D
|
bind -n M-Down select-pane -D
|
||||||
|
|
||||||
# --- Plugins with TPM ---
|
# --- Plugins ---
|
||||||
set -g @plugin 'tmux-plugins/tpm'
|
# TPM
|
||||||
set -g @plugin 'tmux-plugins/tmux-sensible' # Sensible default settings
|
set -g @plugin 'tmux-plugins/tpm' # TPM itself (tmux plugin manager)
|
||||||
set -g @plugin 'catppuccin/tmux' # Your theme
|
|
||||||
|
|
||||||
# --- Theme Configuration (Optional) ---
|
# General
|
||||||
set -g @catppuccin_flavour 'mocha'
|
set -g @plugin 'tmux-plugins/tmux-sensible' # It tweaks a few default settings I wouldn't know to change otherwise.
|
||||||
|
set -g @plugin 'niqodea/tmux-matryoshka' # Makes nested tmux actually work
|
||||||
|
|
||||||
# --- Initialize TPM (MUST BE LAST) ---
|
|
||||||
|
# Session management
|
||||||
|
set -g @plugin 'omerxx/tmux-sessionx' # Session manager
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-resurrect' # Allows tmux environments to be saved and restored via prefix Ctrl+s and Ctrl+r
|
||||||
|
# I would also like to look into stuff like nvim session restoration: https://github.com/tmux-plugins/tmux-resurrect
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-continuum' # Automatically saves with ^ every 15 minutes, and restores on tmux server start.
|
||||||
|
# Note:
|
||||||
|
# > In order to be executed periodically, the plugin updates the status-right tmux variable.
|
||||||
|
# > In case some plugin (usually themes) overwrites the status-right variable, the autosave feature stops working.
|
||||||
|
# > To fix this issue, place the plugin last in the TPM plugins list.
|
||||||
|
# Keeping this in mind, in case I have issues.
|
||||||
|
|
||||||
|
# Appearance
|
||||||
|
set -g @plugin 'catppuccin/tmux' # Catppuccin on tmux because
|
||||||
|
set -g @catppuccin_flavour 'mocha' # The obvious best catppuccin flavor...
|
||||||
|
|
||||||
|
# Actually runs all the tmux plugin manager things
|
||||||
run '~/.tmux/plugins/tpm/tpm'
|
run '~/.tmux/plugins/tpm/tpm'
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user