Compare commits

...

77 Commits

Author SHA1 Message Date
d0b7f01cc8 Make script more variable 2025-06-08 05:50:22 -03:00
29fc927053 Add kioworker killer timer 2025-06-05 09:28:54 -03:00
841557d6f6 Add kioworker killer service 2025-06-05 09:27:57 -03:00
e95b46cb01 Add alias 2025-06-03 21:21:22 -03:00
511f210280 update 2025-05-29 00:15:08 -03:00
3acbf0d275 Discord settings 2025-05-25 22:25:17 -03:00
3dec19aa55 Change location 2025-05-24 14:26:07 -03:00
e58fb3ad35 Update starship config 2025-05-17 19:48:07 -03:00
611af2412d Update paru conf 2025-05-13 12:29:35 -03:00
a7eddf83c3 Update 2025-04-28 22:08:01 -03:00
38e7b666cf tweak 2025-04-28 17:48:35 -03:00
5c0ac04bab Tweak starship a little 2025-04-28 17:46:16 -03:00
b858d798ae Ahh 2025-04-25 18:22:51 -03:00
03c2016471 History options 2025-04-25 18:17:53 -03:00
72056fc85b idk why I was doing that 2025-04-25 17:55:17 -03:00
a74aec2dd2 minor tweak 2025-04-25 17:52:23 -03:00
7578995c96 Add termux special case 2025-04-25 17:50:08 -03:00
3490a06700 idk why I did it teh other way 2025-04-25 17:44:02 -03:00
3800dd08fb Fix case 2025-04-25 17:40:13 -03:00
d9fa71c045 Fix minor bug 2025-04-25 17:37:08 -03:00
6b56f14ffa Add final fallback case 2025-04-25 17:29:44 -03:00
396627f4cb Update zsh history stuff 2025-04-25 17:11:57 -03:00
b214a4541b Add tealdeer config 2025-04-25 12:03:20 -03:00
a11f9cd7e0 Add erdtree, tree/du alternative 2025-04-25 11:57:02 -03:00
2983c7d19e Update some alternatives 2025-04-25 11:54:32 -03:00
231bab7a13 Tweak aliases 2025-04-24 15:02:56 -03:00
d158b91169 Add symlink 2025-04-24 10:38:09 -03:00
3fe8bfd9d7 Move editorconfig 2025-04-24 10:37:48 -03:00
88a7fe6cfd Add simple fix for auto mute 2025-04-24 08:04:54 -03:00
978ac74893 Add simple fix for auto mute 2025-04-24 08:04:45 -03:00
e041d69918 try and fix ssh stuff 2025-04-24 03:46:09 -03:00
37a3e43fb7 Force tcsh to execute bash as login shell, like it should be 2025-04-24 03:29:27 -03:00
561933f814 Update tcsh a bit 2025-04-24 03:22:04 -03:00
d452db49a5 Update tcsh a bit 2025-04-24 03:21:42 -03:00
6e1219e0b5 Add mirror updating for other deb distros 2025-04-24 02:46:19 -03:00
edb70737e9 eol 2025-04-24 02:32:32 -03:00
c934ad515b Add symlink for compat 2025-04-24 02:31:39 -03:00
bf63e412c8 Add login shell check 2025-04-24 02:28:57 -03:00
3d966d48aa Change grep alias 2025-04-24 02:16:41 -03:00
c50c23ba5c Fix not exporting variables correctly 2025-04-24 02:13:59 -03:00
0d03127d06 Rework final init and SSH session fix 2025-04-24 02:03:55 -03:00
b314a6506d minor 2025-04-24 00:15:45 -03:00
cad7d6fc85 Add some aliases 2025-04-24 00:15:07 -03:00
e074cf8e11 Update others 2025-04-24 00:11:30 -03:00
adfa2a9144 add bash aliases 2025-04-24 00:11:13 -03:00
ea2efd1145 rework shell profiles 2025-04-23 20:57:09 -03:00
6c4e8102c7 move bash to config folder, and add symlinks 2025-04-23 20:12:43 -03:00
12ae5c9728 Add renpy symlink 2025-04-23 20:02:00 -03:00
4da7aad44b ssh template 2025-04-23 19:46:50 -03:00
ed4a0674ab Add dynamic ssh config 2025-04-23 19:31:53 -03:00
0c7367492c Add alternative to ftc 2025-04-22 20:15:17 -03:00
ddc2205035 Add find the command preferred options 2025-04-22 20:12:09 -03:00
9a0a0e69de Add find the command 2025-04-22 19:59:45 -03:00
41c1cff77c Re-sync. Re-add paru -c since it is required to clean after. Added clamav helpful alias 2025-04-17 02:59:00 -03:00
5b4449d7e9 Update 2025-04-09 12:02:00 -03:00
b472f6b758 Don't redefine standard unix tools 2025-04-07 21:21:20 -03:00
630a31ff35 Update eget config 2025-04-07 16:32:28 -03:00
89d2579bc8 Don't redefine core utils as some scripts may run in interactive mode even though they're not supposed to 2025-04-07 15:48:52 -03:00
6d3e8a7a9b tldr fix 2025-04-02 19:16:05 -03:00
27fd6700ff idk 2025-04-02 16:35:53 -03:00
95faf30824 Add kitty to eget 2025-04-02 16:19:50 -03:00
7b37d7b49f Add nushell env vars 2025-04-02 16:08:31 -03:00
862fca3554 Add nushell config 2025-04-02 16:08:12 -03:00
17681ff33b Add some more alias stuff 2025-04-02 16:07:49 -03:00
fd8ef13162 Fix zsh script 2025-04-02 15:55:34 -03:00
abb3c811f9 Make zshrc need an enter to interact with chezmoi functions 2025-04-02 15:43:47 -03:00
abe36b2490 Change alias 2025-04-02 15:28:01 -03:00
913a96cb27 Add aliases for most tooling I added 2025-04-02 15:25:29 -03:00
3064dd2b70 Containers were a pipe dream anyways 2025-04-02 15:10:14 -03:00
e0de67fad7 Fix libraries 2025-04-02 14:11:52 -03:00
d0574e433a Add updated VSCode 2025-04-02 13:49:15 -03:00
d40916c963 Add updated firefox & desktop file 2025-04-02 13:16:21 -03:00
dfbd41e132 Re-enable firefox 2025-04-02 12:59:31 -03:00
c007b4732d Add some other files 2025-04-02 12:56:54 -03:00
76a9a37e81 Update some core utilities 2025-04-02 12:30:30 -03:00
5d541a845a Add wireplumber configs 2025-03-29 23:04:45 -03:00
6a05fefc0e Add wireplumber configs 2025-03-29 23:04:35 -03:00
31 changed files with 543 additions and 188 deletions

View File

@ -1 +0,0 @@
[[ -f ~/.bashrc ]] && . ~/.bashrc

View File

@ -1,103 +0,0 @@
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# Required init for cli programs
# Do not install completions unless no working, check /usr/share/bash-completion
# Local bash-completion
if [[ -f $HOME/.local/bin/bash_completion ]]; then
. $HOME/.local/bin/bash_completion
fi
# Rust
if [[ -f $HOME/.local/share/cargo/env ]]; then
. $HOME/.local/share/cargo/env
fi
# Set aliases
if hash rg 2>/dev/null; then
alias grep="rg"
fi
if hash bat 2>/dev/null; then
alias cat="bat -p"
fi
if hash zoxide 2>/dev/null; then
alias cd="z"
fi
alias update="eget -D; . $HOME/.config/eget/post_install.sh"
alias rc="source ~/.bashrc"
if hash eza 2>/dev/null; then
function ls {
if [[ "$@" =~ "-a" || "$@" =~ "-A" || "$@" =~ "--all" || "$@" =~ "--almost-all" ]]; then
eza --icons --long $@
else
eza --icons --long --ignore-glob "$([[ -f .hidden ]] && cat .hidden | tr '\n' '|')" $@
fi
}
fi
# Dotfiles management
# TODO: Rewrite to use bash read instead of zsh read
function .add {
if [[ -z $1 || -z $2 ]]; then
echo "Usage: .add <file> <message>"
return 1
fi
chezmoi add $1
chezmoi git add .
chezmoi git status
read -p "Commit changes? [y/N] " -r answer
if [[ $answer =~ ^[Yy]$ ]]; then
chezmoi git -- commit -m "$2"
read -p "Push changes? [y/N] " -r answer
if [[ $answer =~ ^[Yy]$ ]]; then
chezmoi git push
fi
fi
}
# TODO: Rewrite to use bash read instead of zsh read
function .re-add {
if [[ -z $1 ]]; then
echo "Usage: .re-add <message>"
return 1
fi
chezmoi re-add
chezmoi git status
chezmoi git diff
read -p "Commit changes? [y/N] " -r answer
if [[ $answer =~ ^[Yy]$ ]]; then
chezmoi git -- commit -am "$1"
read -p "Push changes? [y/N] " -r answer
if [[ $answer =~ ^[Yy]$ ]]; then
chezmoi git push
fi
fi
}
alias .push="chezmoi git push"
alias .pull="chezmoi git pull"
alias .status="chezmoi git status"
alias .diff="chezmoi git diff"
alias .update="chezmoi update"
# XDG stuff
export HISTFILE="${XDG_STATE_HOME}"/bash/history
# XDG aliases
alias wget="wget --hsts-file='$XDG_DATA_HOME/wget-hsts'"
alias yarn="yarn --use-yarnrc '$XDG_CONFIG_HOME/yarn/config'"
alias units="units --history '$XDG_DATA_HOME/units_history'"
alias nvidia-settings="nvidia-settings --config='$XDG_CONFIG_HOME/nvidia/settings'"
alias adb="HOME='$XDG_DATA_HOME/android' adb"
# Helpful tool: https://bash-prompt-generator.org
# On github: https://github.com/Scriptim/bash-prompt-generator
PS1='[\u@\h \w]\$ '
# Starship after defining custom prompt, easy to remove
eval "$(starship init bash)"
# Zoxide
eval "$(zoxide init bash)"

View File

@ -0,0 +1,161 @@
# shellcheck shell=bash
# shellcheck disable=SC1090,SC1091,SC2034
# Set aliases
hash ug 2>/dev/null && alias grep="ugrep"
hash bat 2>/dev/null && alias cat="bat -p"
hash zoxide 2>/dev/null && alias cd="z"
hash fd 2>/dev/null && alias find="fd"
hash numbat 2>/dev/null && alias bc="numbat" # numbat is a bit more than just a bc alternative
# hash eva 2>/dev/null && alias bc="eva" # eva is a bc alternative, but don't want to switch yet
hash fend 2>/dev/null && alias units="fend" # fend's syntax is a bit different from units, don't want to switch yet
# hash sd 2>/dev/null && alias sed="sd" # Disabled because some scripts use sed, and don't set the -i flag
hash dust 2>/dev/null && alias du="dust"
hash erd 2>/dev/null && alias tree="erd"
hash dua 2>/dev/null && alias duai="dua interactive"
hash tealdeer 2>/dev/null && alias tldr="tealdeer"
hash hexyl 2>/dev/null && alias xxd="hexyl"
hash xdg-open 2>/dev/null && alias start="xdg-open" && alias open="xdg-open"
hash micro 2>/dev/null && alias edit="micro" && alias nano="micro"
hash nvim 2>/dev/null && alias vim="nvim" && alias vi="nvim"
hash trash-put 2>/dev/null && alias rm="trash-put" && alias tp="trash-put"
hash gallery-dl 2>/dev/null && alias gallery-dl="gallery-dl --cookies-from-browser firefox"
if hash lsb_release 2>/dev/null; then
if [[ $(lsb_release -si) =~ "Arch" ]]; then
alias update-mirrors="rate-mirrors arch | sudo tee /etc/pacman.d/mirrorlist; rate-mirrors chaotic-aur | sudo tee /etc/pacman.d/chaotic-mirrorlist"
# System package managers
hash pacman 2>/dev/null && command="sudo pacman -Syu; sudo pacman -Sc; "
hash pamac 2>/dev/null && command="pamac update; pamac clean; "
hash yay 2>/dev/null && command="yay; yay -Sc; "
hash paru 2>/dev/null && command="paru; paru -c; "
elif [[ $(lsb_release -si) =~ "Debian" || $(lsb_release -si) =~ "Ubuntu" ]]; then
alias update-mirrors="sudo nala fetch --auto -c US -c CA"
# System package managers
hash apt 2>/dev/null && command="sudo apt update && sudo apt upgrade && sudo apt autoremove; "
hash aptitude 2>/dev/null && command="sudo aptitude update && sudo aptitude upgrade && sudo aptitude autoremove; "
hash nala 2>/dev/null && command="sudo nala update && sudo nala upgrade && sudo nala autoremove; "
fi
# Non system packages
hash flatpak 2>/dev/null && command+="flatpak update && flatpak uninstall --unused; "
hash snap 2>/dev/null && command+="sudo snap refresh && sudo snap remove --purge $(snap list --all | awk '/^.*disabled/{print $1}'); "
# Firmware
hash fwupdmgr 2>/dev/null && command+="fwupdmgr refresh --force && fwupdmgr update;"
# We want this to be expanded to the command, as the command is not very helpful
# shellcheck disable=SC2139
alias update="$command"
elif [[ "$TERMUX_VERSION" ]]; then
# Termux, special case
alias update-mirrors="termux-change-repo"
alias update="pkg upgrade && pkg autoclean"
# Non privaledged environemnt, have to use local package managers like eget, nix, etc
else
alias update-mirrors="echo 'No mirrors to update'"
alias update='eget -D; . "$HOME"/.config/eget/post_install.sh'
alias nix-shell-local="nix-user-chroot ~/.local/share/nix bash"
if [ -e ~/.nix-profile/etc/profile.d/nix.sh ]; then
. ~/.nix-profile/etc/profile.d/nix.sh
fi
fi
if hash eza 2>/dev/null; then
function ls {
if [[ "$*" =~ "-a" || "$*" =~ "-A" || "$*" =~ "--all" || "$*" =~ "--almost-all" ]]; then
eza --icons --long "$@"
else
eza --icons --long --ignore-glob "$([[ -f .hidden ]] && < .hidden tr '\n' '|')" "$@"
fi
}
fi
if hash sigtool 2>/dev/null; then
# clamav-exception-add <file>
# Adds a file to the clamav user-defined exceptions list
# Usage: clamav-exception-add <file>
# Example: clamav-exception-add /path/to/file
# Note: This requires root privileges, so you may need to run it with sudo
function clamav-exception-add {
if [[ -z $1 ]]; then
echo "Usage: clamav-exception-add <file>"
return 1
fi
if [[ ! -f $1 ]]; then
echo "File not found: $1"
return 1
fi
sudo bash -c "sigtool --sha256 $1 >> /var/lib/clamav/user-defined-exceptions.sfp"
}
fi
# Dotfiles management
# TODO: Rewrite to use bash read instead of zsh read
if hash chezmoi 2>/dev/null; then
function .add {
if [[ -z $1 || -z $2 ]]; then
echo "Usage: .add <file> <message>"
return 1
fi
chezmoi add "$1"
chezmoi git add .
chezmoi git status
echo -n "Commit changes? [y/N] "
read -r answer
if [[ $answer =~ ^[Yy]$ ]]; then
chezmoi git -- commit -m "$2"
echo -n "Push changes? [y/N] "
read -r answer
if [[ $answer =~ ^[Yy]$ ]]; then
chezmoi git push
fi
fi
}
# TODO: Rewrite to use bash read instead of zsh read
function .re-add {
if [[ -z $1 ]]; then
echo "Usage: .re-add <message>"
return 1
fi
chezmoi re-add
chezmoi git status
chezmoi git diff
echo -n "Commit changes? [y/N] "
read -r answer
if [[ $answer =~ ^[Yy]$ ]]; then
chezmoi git -- commit -am "$1"
echo -n "Push changes? [y/N] "
read -r answer
if [[ $answer =~ ^[Yy]$ ]]; then
chezmoi git push
fi
fi
}
alias .push="chezmoi git push"
alias .pull="chezmoi git pull"
alias .status="chezmoi git status"
alias .diff="chezmoi git diff"
alias .update="chezmoi update"
fi
# Other aliases
alias rce='xdg-open $HOME/.bashrc && xdg-open $HOME/.zshrc && xdg-open $XDG_CONFIG_HOME/bash/.bash_aliases'
alias ftpd-simple='python -m pyftpdlib'
# XDG aliases
alias wget='wget --hsts-file="$XDG_DATA_HOME"/wget-hsts'
alias yarn='yarn --use-yarnrc "$XDG_CONFIG_HOME"/yarn/config'
alias units='units --history "$XDG_DATA_HOME"/units_history'
alias nvidia-settings='nvidia-settings --config="$XDG_CONFIG_HOME"/nvidia/settings'
alias adb='HOME="$XDG_DATA_HOME"/android adb'
# If we have local rust installed, set it up
if [[ -f $XDG_DATA_HOME/cargo/env ]]; then
. "$XDG_DATA_HOME/cargo/env"
fi

View File

@ -0,0 +1,52 @@
# shellcheck shell=bash
# shellcheck disable=SC1090,SC1091,SC2034
# Add local bin to PATH
export PATH="$HOME/.local/bin:$PATH"
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# Workaround for SSH/Login sessions
# https://github.com/systemd/systemd/issues/7641#issuecomment-680694017
set -a
if shopt -q login_shell && [[ -f /usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator ]]; then
eval "$(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator)"
# Fallback to to manually parsing environment.d
elif [[ -z "$XDG_DATA_HOME" && -z "$XDG_CONFIG_HOME" && -z "$XDG_STATE_HOME" && -z "$XDG_CACHE_HOME" ]]; then
eval "$(<"$HOME/.config/environment.d/xdg.conf")"
fi
set +a
# If we have local bash-completion, use it
[[ -f $HOME/.local/bin/bash_completion ]] && . "$HOME/.local/bin/bash_completion"
# Bash XDG history
HISTFILE="$XDG_STATE_HOME"/bash/history
HISTSIZE=10000
SAVEHIST=10000
HISTCONTROL=ignoredups:erasedups
shopt -s histappend
# Helpful tool: https://bash-prompt-generator.org
# On github: https://github.com/Scriptim/bash-prompt-generator
PS1='[\u@\h \w]\$ '
[[ -f $XDG_CONFIG_HOME/bash/.bash_aliases ]] && source "$XDG_CONFIG_HOME/bash/.bash_aliases"
# Bash specific alias
alias rc='source "$XDG_CONFIG_HOME"/bash/.bashrc'
# https://github.com/pkasemir/find-the-command
[[ -f /usr/share/doc/find-the-command/ftc.bash ]] && source /usr/share/doc/find-the-command/ftc.bash noupdate quiet info
# https://wiki.archlinux.org/title/Pkgfile#Command_not_found
# [[ -f /usr/share/doc/pkgfile/command-not-found.bash ]] && source /usr/share/doc/pkgfile/command-not-found.bash
# Starship after defining custom prompt, easy to remove
hash starship 2>/dev/null && eval "$(starship init bash)"
# Zoxide init has to be last
hash zoxide 2>/dev/null && eval "$(zoxide init bash)"
# Return 0 to indicate success that the script has been sourced to completion
return 0

View File

@ -0,0 +1,23 @@
{
"chromiumSwitches": {},
"IS_MAXIMIZED": true,
"IS_MINIMIZED": false,
"WINDOW_BOUNDS": {
"x": 4127,
"y": 144,
"width": 1280,
"height": 720
},
"OPEN_ON_STARTUP": false,
"DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING": true,
"SKIP_HOST_UPDATE": true,
"MIN_WIDTH": 940,
"MIN_HEIGHT": 500,
"openasar": {
"setup": true,
"quickstart": true
},
"trayBalloonShown": true,
"BACKGROUND_COLOR": "#000000",
"enableHardwareAcceleration": true
}

View File

@ -50,3 +50,61 @@
# Needs manual intervention to install, as its a bash script with a subfolder containing completions # Needs manual intervention to install, as its a bash script with a subfolder containing completions
download_only = true download_only = true
asset_filters = [ ".tar.xz" ] asset_filters = [ ".tar.xz" ]
["srevinsaju/Firefox-Appimage"]
target = "~/.local/bin/firefox"
tag = "firefox"
asset_filters = [ ".AppImage", "^zsync" ]
["BtbN/FFmpeg-Builds"]
asset_filters = [ "^lgpl", "shared", "master", ".tar.xz" ]
download_only = true # Shared libraries aren't extracted correctly, need to do in post install script
["romkatv/zsh-bin"]
asset_filters = [ "^asc" ]
# all = true
file = "bin/zsh"
["xyproto/gendesk"]
asset_filters = [ "static" ]
["neovide/neovide"]
["valicm/VSCode-AppImage"]
asset_filters = [ ".AppImage", "^zsync" ]
target = "~/.local/bin/code"
#["containers/podman"]
# target = "~/.local/bin/podman"
#["89luca89/lilipod"]
# target = "~/.local/bin/lilipod"
["sharkdp/numbat"]
asset_filters = [ "gnu", ".tar.gz" ]
["sharkdp/hexyl"]
asset_filters = [ "gnu", ".tar.gz" ]
["chmln/sd"]
asset_filters = [ "gnu", ".tar.gz" ]
["bootandy/dust"]
asset_filters = [ "gnu", ".tar.gz" ]
["tealdeer-rs/tealdeer"]
["nushell/nushell"]
asset_filters = [ "musl", ".tar.gz" ]
all = true
# TODO: Change to no extract so I can setup shared librarys and terminfo etc, as well as get kitten binary
["kovidgoyal/kitty"]
asset_filters = [ "^sig", "^kitten", "x86_64" ]
["nix-community/nix-user-chroot"]
asset_filters = [ "x86_64", "musl" ]
["fish-shell/fish-shell"]
asset_filters = [ "x86_64", "static" ]
all = true

View File

@ -42,5 +42,35 @@ if compgen -G "bash-completion*tar*" > /dev/null; then
chmod +x bash_completion chmod +x bash_completion
fi fi
if compgen -G "ffmpeg*tar*" > /dev/null; then
# Extract ffmpeg
tar xf ffmpeg*tar*
# Handle shared libraries
rsync --remove-source-files --links $(fd --glob "*.so*") ../lib
# Binaries
mv -f ffmpeg*/bin/* .
# Remove archive
rm -r ffmpeg*tar*
# Remove extracted files
rm -r ffmpeg-*
fi
# Gen Desktop files
gendesk -f -n --pkgname "firefox" --name "Firefox" --exec "firefox %u" --icon "firefox" --categories "Network" --comment "Firefox Web Browser" --genericname "Web Browser"
gendesk -f -n --pkgname "neovide" --name "Neovide" --exec "neovide %F" --icon "neovide" --categories "TextEditor;Development" --comment "Neovim GUI" --genericname "Neovim GUI"
gendesk -f -n --pkgname "code" --name "Visual Studio Code" --exec "code %F" --icon "vscode" --categories "TextEditor;Development" --comment "Visual Studio Code" --genericname "Code Editor"
gendesk -f -n --pkgname "kitty" --name "Kitty" --exec "kitty" --icon "kitty" --categories "Utility" --comment "Kitty Terminal Emulator" --genericname "Terminal Emulator"
gendesk -f -n --pkgname "micro" --name "Micro" --exec "micro %F" --icon "micro" --categories "TextEditor;Development" --comment "Micro Text Editor" --genericname "Text Editor" --terminal=true
# Move desktop files to applications directory
rsync --remove-source-files *.desktop ../share/applications
# Unchange directory # Unchange directory
popd > /dev/null popd > /dev/null

View File

@ -0,0 +1,5 @@
SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket
{{ if lookPath "ksshaskpass" -}}
SSH_ASKPASS={{- lookPath "ksshaskpass" }}
SSH_ASKPASS_REQUIRE=prefer
{{- end -}}

View File

@ -1 +0,0 @@
SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket

View File

@ -0,0 +1,32 @@
# config.nu
#
# Installed by:
# version = "0.103.0"
#
# This file is used to override default Nushell settings, define
# (or import) custom commands, or run any other startup tasks.
# See https://www.nushell.sh/book/configuration.html
#
# This file is loaded after env.nu and before login.nu
#
# You can open this file in your default editor using:
# config nu
#
# See `help config nu` for more options
#
# You can remove these comments if you want or leave
# them for future reference.
alias corels = ls
def --wrapped ls [...rest] {
if '-a' in $rest or '--all' in $rest or not (".hidden" | path exists) {
(corels ...$rest)
} else {
(corels ...$rest) | where name not-in (cat .hidden)
}
}
mkdir ($nu.data-dir | path join "vendor/autoload")
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")

22
dot_config/nushell/env.nu Normal file
View File

@ -0,0 +1,22 @@
# env.nu
#
# Installed by:
# version = "0.103.0"
#
# Previously, environment variables were typically configured in `env.nu`.
# In general, most configuration can and should be performed in `config.nu`
# or one of the autoload directories.
#
# This file is generated for backwards compatibility for now.
# It is loaded before config.nu and login.nu
#
# See https://www.nushell.sh/book/configuration.html
#
# Also see `help config env` for more options.
#
# You can remove these comments if you want or leave
# them for future reference.
$env.config.show_banner = false
$env.config.buffer_editor = "micro"

View File

@ -20,7 +20,8 @@ RemoveMake
#UseAsk #UseAsk
#SaveChanges #SaveChanges
CombinedUpgrade CombinedUpgrade
CleanAfter BatchInstall
#CleanAfter
#UpgradeMenu #UpgradeMenu
NewsOnUpgrade NewsOnUpgrade
SkipReview SkipReview

View File

@ -5,6 +5,7 @@ username.style_user = "white"
hostname.ssh_only = false hostname.ssh_only = false
hostname.format = "[$ssh_symbol$hostname]($style)" hostname.format = "[$ssh_symbol$hostname]($style)"
hostname.style = "white" hostname.style = "white"
hostname.ssh_symbol = " 🌐 "
directory.truncate_to_repo = false directory.truncate_to_repo = false
directory.format = "[$path]($style)[$read_only]($read_only_style)" directory.format = "[$path]($style)[$read_only]($read_only_style)"
directory.style = "white" directory.style = "white"

View File

@ -0,0 +1,6 @@
[Unit]
Description=Disable Auto-Mute on sound card on a range of 10 cards, since it can vary
[Service]
Type=oneshot
ExecStart=/usr/bin/bash -c 'for i in {1..10}; do amixer -c $i sset "Auto-Mute Mode" Disabled; done; exit 0'

View File

@ -0,0 +1,10 @@
[Unit]
Description=Run amixer autounmute every 10 minutes
[Timer]
OnBootSec=1min
OnUnitActiveSec=10min
Persistent=true
[Install]
WantedBy=timers.target

View File

@ -0,0 +1,6 @@
[Unit]
Description=Kill any long living kioworker threads
[Service]
Type=oneshot
ExecStart=/usr/bin/pkill kioworker

View File

@ -0,0 +1,10 @@
[Unit]
Description=Kill kioworker threads every 10 minutes
[Timer]
OnBootSec=1min
OnUnitActiveSec=10min
Persistent=true
[Install]
WantedBy=timers.target

View File

@ -0,0 +1,9 @@
# If not running interactively, don't do anything
if (! $?prompt) return
# Set starship if it's installed
if (! `which starship >& /dev/null`) eval `starship init tcsh`
# Just use bash
set SHELL = "/bin/bash"
exec $SHELL -l

View File

@ -0,0 +1,2 @@
[updates]
auto_update = true

View File

@ -0,0 +1,40 @@
# regular devices
monitor.alsa.rules = [
{
matches = [
{
# Matches all sources
node.name = "~alsa_input.*"
},
{
# Matches all sinks
node.name = "~alsa_output.*"
}
]
actions = {
update-props = {
session.suspend-timeout-seconds = 0
}
}
}
]
# bluetooth devices
monitor.bluez.rules = [
{
matches = [
{
# Matches all sources
node.name = "~bluez_input.*"
},
{
# Matches all sinks
node.name = "~bluez_output.*"
}
]
actions = {
update-props = {
session.suspend-timeout-seconds = 0
}
}
}
]

View File

@ -0,0 +1,16 @@
access.rules = [
{
matches = [
{
application.process.binary = discord
application.process.binary = chromeium
application.process.binary = firefox
}
]
actions = {
update-props = {
default_permissions = "rx"
}
}
}
]

View File

@ -1,92 +1,65 @@
# shellcheck shell=bash
# shellcheck disable=SC1090,SC1091,SC2034
# Add local bin to PATH
export PATH="$HOME/.local/bin:$PATH"
# If not running interactively, don't do anything # If not running interactively, don't do anything
[[ $- != *i* ]] && return [[ $- != *i* ]] && return
# Required init for cli programs # Workaround for SSH/Login sessions
# Do not install completions unless no working, check /usr/share/bash-completion # https://github.com/systemd/systemd/issues/7641#issuecomment-680694017
eval "$(zoxide init zsh)" set -a
if [[ -o login && -f /usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator ]]; then
eval "$(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator)"
# Fallback to to manually parsing environment.d
elif [[ -z "$XDG_DATA_HOME" && -z "$XDG_CONFIG_HOME" && -z "$XDG_STATE_HOME" && -z "$XDG_CACHE_HOME" ]]; then
eval "$(<"$HOME/.config/environment.d/xdg.conf")"
fi
set +a
autoload -Uz promptinit autoload -Uz promptinit
autoload -Uz compinit autoload -Uz compinit
compinit -d "$XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION"
promptinit promptinit
compinit
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh # Some zsh plugins
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh [[ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]] && source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
[[ -f /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh ]] && source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
bindkey '^[[H' beginning-of-line bindkey '^[[H' beginning-of-line
bindkey '^[[F' end-of-line bindkey '^[[F' end-of-line
bindkey "^[[3~" delete-char bindkey "^[[3~" delete-char
# Set aliases # Zsh XDG history
alias grep="rg" HISTFILE="$XDG_STATE_HOME"/zsh/history
alias cd="z" HISTSIZE=10000
alias cat="bat -p" SAVEHIST=10000
alias find="fd" setopt HIST_EXPIRE_DUPS_FIRST
alias bc="numbat" setopt HIST_IGNORE_DUPS
alias start="xdg-open" setopt HIST_IGNORE_ALL_DUPS
alias update-mirrors="rate-mirrors arch | sudo tee /etc/pacman.d/mirrorlist; rate-mirrors chaotic-aur | sudo tee /etc/pacman.d/chaotic-mirrorlist" setopt INC_APPEND_HISTORY_TIME
alias update="paru; flatpak update"
alias rc="source ~/.config/zsh/.zshrc"
function ls {
if [[ "$@" =~ "-a" || "$@" =~ "-A" || "$@" =~ "--all" || "$@" =~ "--almost-all" ]]; then
eza --icons --long $@
else
eza --icons --long --ignore-glob "$([[ -f .hidden ]] && cat .hidden | tr '\n' '|')" $@
fi
}
# Dotfiles management
function .add {
if [[ -z $1 || -z $2 ]]; then
echo "Usage: .add <file> <message>"
return 1
fi
chezmoi add $1
chezmoi git add .
chezmoi git status
if $(read -q "?Commit changes? [y/N]"); then
chezmoi git commit -- -am $2
if $(read -q "?Push changes? [y/N]"); then
chezmoi git push
fi
fi
}
function .re-add {
if [[ -z $1 ]]; then
echo "Usage: .re-add <message>"
return 1
fi
chezmoi re-add
chezmoi git status
chezmoi git diff
if $(read -q "?Commit changes? [y/N]"); then
chezmoi git commit -- -am $1
if $(read -q "?Push changes? [y/N]"); then
chezmoi git push
fi
fi
}
alias .push="chezmoi git push"
alias .pull="chezmoi git pull"
alias .status="chezmoi git status"
alias .diff="chezmoi git diff"
alias .update="chezmoi update"
# XDG zsh stuff
compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION"
export HISTFILE="$XDG_STATE_HOME"/zsh/history
# XDG aliases
alias wget="wget --hsts-file='$XDG_DATA_HOME/wget-hsts'"
alias yarn="yarn --use-yarnrc '$XDG_CONFIG_HOME/yarn/config'"
alias units="units --history '$XDG_DATA_HOME/units_history'"
alias nvidia-settings="nvidia-settings --config='$XDG_CONFIG_HOME/nvidia/settings'"
alias adb="HOME='$XDG_DATA_HOME/android' adb"
# Helpful tool: https://zsh-prompt-generator.site/ # Helpful tool: https://zsh-prompt-generator.site/
# On github: https://github.com/k-yokoishi/zsh-prompt-generator # On github: https://github.com/k-yokoishi/zsh-prompt-generator
PROMPT="[%n@%m %~]$ " PROMPT="[%n@%m %~]$ "
RPROMPT="%?:%h | %*" RPROMPT="%?:%h | %*"
[[ -f $XDG_CONFIG_HOME/bash/.bash_aliases ]] && source "$XDG_CONFIG_HOME/bash/.bash_aliases"
# Zsh specific alias
alias rc='source "$XDG_CONFIG_HOME"/zsh/.zshrc'
# https://github.com/pkasemir/find-the-command
[[ -f /usr/share/doc/find-the-command/ftc.zsh ]] && source /usr/share/doc/find-the-command/ftc.zsh noupdate quiet info
# https://wiki.archlinux.org/title/Pkgfile#Command_not_found
# [[ -f /usr/share/doc/pkgfile/command-not-found.zsh ]] && source /usr/share/doc/pkgfile/command-not-found.zsh
# Starship after defining custom prompt, easy to remove # Starship after defining custom prompt, easy to remove
eval "$(starship init zsh)" hash starship 2>/dev/null && eval "$(starship init zsh)"
# Zoxide init has to be last
hash zoxide 2>/dev/null && eval "$(zoxide init zsh)"
# Return 0 to indicate success that the script has been sourced to completion
return 0

View File

@ -18,6 +18,8 @@ Host fcslinux.cs.unb.ca
# Individual hosts for the CS department # Individual hosts for the CS department
Host *m??.cs.unb.ca Host *m??.cs.unb.ca
User ishoebot User ishoebot
AddKeysToAgent yes
ForwardAgent yes
ProxyJump fcslinux.cs.unb.ca ProxyJump fcslinux.cs.unb.ca
# GitHub ssh commits # GitHub ssh commits

View File

@ -1,5 +0,0 @@
# If running interactively, then:
if ($?prompt) then
set SHELL = "/usr/bin/bash"
exec $SHELL
endif

1
symlink_dot_bash_profile Normal file
View File

@ -0,0 +1 @@
.config/bash/.bashrc

1
symlink_dot_bashrc Normal file
View File

@ -0,0 +1 @@
.config/bash/.bashrc

1
symlink_dot_editorconfig Normal file
View File

@ -0,0 +1 @@
.config/editorconfig/.editorconfig

1
symlink_dot_renpy Normal file
View File

@ -0,0 +1 @@
.local/share/renpy

1
symlink_dot_tcshrc Normal file
View File

@ -0,0 +1 @@
.config/tcsh/.tcshrc

1
symlink_dot_zshrc Normal file
View File

@ -0,0 +1 @@
.config/zsh/.zshrc